@skybridge/devtools 2.0.0-alpha.d46620f → 2.0.0-alpha.deed804

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.
@@ -0,0 +1,271 @@
1
+ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(e){throw n=[e],e}},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 k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var A=/\/+/g;function j(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function M(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(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 N(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,N(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+j(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(A,`$&/`)+`/`),N(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(A,`$&/`)+`/`)+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+j(a,u),c+=N(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+j(a,u++),c+=N(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return N(M(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function P(e,t,n){if(e==null)return e;var r=[],i=0;return N(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function F(e){if(e._status===-1){var t=e._result;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 I=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},L={map:P,forEach:function(e,t,n){P(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return P(e,function(){t++}),t},toArray:function(e){return P(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=L,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:F}},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,I)}catch(e){I(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&&j(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),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`),k=Symbol.for(`react.activity`),A=Symbol.for(`react.memo_cache_sentinel`),j=Symbol.iterator;function M(e){return typeof e!=`object`||!e?null:(e=j&&e[j]||e[`@@iterator`],typeof e==`function`?e:null)}var N=Symbol.for(`react.client.reference`);function P(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===N?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 k: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?P(e.type)||`Memo`:t;case O:t=e._payload,e=e._init;try{return P(e(t))}catch{}}return null}var F=Array.isArray,I=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,L=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ee={pending:!1,data:null,method:null,action:null},te=[],ne=-1;function R(e){return{current:e}}function z(e){0>ne||(e.current=te[ne],te[ne]=null,ne--)}function B(e,t){ne++,te[ne]=e.current,e.current=t}var re=R(null),ie=R(null),ae=R(null),oe=R(null);function se(e,t){switch(B(ae,t),B(ie,e),B(re,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Xd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Xd(t),e=Zd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}z(re),B(re,e)}function ce(){z(re),z(ie),z(ae)}function le(e){e.memoizedState!==null&&B(oe,e);var t=re.current,n=Zd(t,e.type);t!==n&&(B(ie,e),B(re,n))}function ue(e){ie.current===e&&(z(re),z(ie)),oe.current===e&&(z(oe),sp._currentValue=ee)}var de,fe;function pe(e){if(de===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);de=t&&t[1]||``,fe=-1<e.stack.indexOf(`
2
+ at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
3
+ `+de+e+fe}var me=!1;function V(e,t){if(!e||me)return``;me=!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{me=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?pe(n):``}function he(e,t){switch(e.tag){case 26:case 27:case 5:return pe(e.type);case 16:return pe(`Lazy`);case 13:return e.child!==t&&t!==null?pe(`Suspense Fallback`):pe(`Suspense`);case 19:return pe(`SuspenseList`);case 0:case 15:return V(e.type,!1);case 11:return V(e.type.render,!1);case 1:return V(e.type,!0);case 31:return pe(`Activity`);default:return``}}function ge(e){try{var t=``,n=null;do t+=he(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
7
+ Error generating stack: `+e.message+`
8
+ `+e.stack}}var _e=Object.prototype.hasOwnProperty,ve=t.unstable_scheduleCallback,ye=t.unstable_cancelCallback,be=t.unstable_shouldYield,xe=t.unstable_requestPaint,Se=t.unstable_now,Ce=t.unstable_getCurrentPriorityLevel,we=t.unstable_ImmediatePriority,Te=t.unstable_UserBlockingPriority,Ee=t.unstable_NormalPriority,De=t.unstable_LowPriority,Oe=t.unstable_IdlePriority,ke=t.log,Ae=t.unstable_setDisableYieldValue,je=null,Me=null;function Ne(e){if(typeof ke==`function`&&Ae(e),Me&&typeof Me.setStrictMode==`function`)try{Me.setStrictMode(je,e)}catch{}}var Pe=Math.clz32?Math.clz32:Le,Fe=Math.log,Ie=Math.LN2;function Le(e){return e>>>=0,e===0?32:31-(Fe(e)/Ie|0)|0}var Re=256,ze=262144,Be=4194304;function Ve(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 He(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=Ve(n))):i=Ve(o):i=Ve(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Ve(n))):i=Ve(o)):i=Ve(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 Ue(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function H(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 We(){var e=Be;return Be<<=1,!(Be&62914560)&&(Be=4194304),e}function Ge(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ke(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function qe(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-Pe(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&&Je(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function Je(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Pe(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function Ye(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Pe(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function Xe(e,t){var n=t&-t;return n=n&42?1:Ze(n),(n&(e.suspendedLanes|t))===0?n:0}function Ze(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 Qe(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function $e(){var e=L.p;return e===0?(e=window.event,e===void 0?32:Cp(e.type)):e}function et(e,t){var n=L.p;try{return L.p=e,t()}finally{L.p=n}}var tt=Math.random().toString(36).slice(2),nt=`__reactFiber$`+tt,rt=`__reactProps$`+tt,it=`__reactContainer$`+tt,at=`__reactEvents$`+tt,ot=`__reactListeners$`+tt,st=`__reactHandles$`+tt,ct=`__reactResources$`+tt,lt=`__reactMarker$`+tt;function ut(e){delete e[nt],delete e[rt],delete e[at],delete e[ot],delete e[st]}function dt(e){var t=e[nt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[it]||n[nt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=bf(e);e!==null;){if(n=e[nt])return n;e=bf(e)}return t}e=n,n=e.parentNode}return null}function ft(e){if(e=e[nt]||e[it]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function pt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function mt(e){var t=e[ct];return t||=e[ct]={hoistableStyles:new Map,hoistableScripts:new Map},t}function ht(e){e[lt]=!0}var gt=new Set,_t={};function vt(e,t){yt(e,t),yt(e+`Capture`,t)}function yt(e,t){for(_t[e]=t,e=0;e<t.length;e++)gt.add(t[e])}var bt=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]*$`),xt={},St={};function Ct(e){return _e.call(St,e)?!0:_e.call(xt,e)?!1:bt.test(e)?St[e]=!0:(xt[e]=!0,!1)}function wt(e,t,n){if(Ct(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 Tt(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 Et(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 Dt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Ot(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function kt(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function At(e){if(!e._valueTracker){var t=Ot(e)?`checked`:`value`;e._valueTracker=kt(e,t,``+e[t])}}function jt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Ot(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function Mt(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 Nt=/[\n"\\]/g;function Pt(e){return e.replace(Nt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Ft(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=``+Dt(t)):e.value!==``+Dt(t)&&(e.value=``+Dt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Lt(e,o,Dt(n)):Lt(e,o,Dt(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=``+Dt(s):e.removeAttribute(`name`)}function It(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)){At(e);return}n=n==null?``:``+Dt(n),t=t==null?n:``+Dt(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),At(e)}function Lt(e,t,n){t===`number`&&Mt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Rt(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=``+Dt(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 zt(e,t,n){if(t!=null&&(t=``+Dt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+Dt(n)}function Bt(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(F(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=Dt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),At(e)}function Vt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Ht=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 Ut(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||Ht.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function Wt(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&&Ut(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&Ut(e,o,t[o])}function Gt(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 Kt=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`]]),qt=/^[\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 Jt(e){return qt.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function Yt(){}var Xt=null;function Zt(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Qt=null,$t=null;function en(e){var t=ft(e);if(t&&(e=t.stateNode)){var n=e[rt]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Ft(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="`+Pt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[rt]||null;if(!a)throw Error(i(90));Ft(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&jt(r)}break a;case`textarea`:zt(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Rt(e,!!n.multiple,t,!1)}}}var tn=!1;function nn(e,t,n){if(tn)return e(t,n);tn=!0;try{return e(t)}finally{if(tn=!1,(Qt!==null||$t!==null)&&(Eu(),Qt&&(t=Qt,e=$t,$t=Qt=null,en(t),e)))for(t=0;t<e.length;t++)en(e[t])}}function rn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[rt]||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 an=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),on=!1;if(an)try{var sn={};Object.defineProperty(sn,"passive",{get:function(){on=!0}}),window.addEventListener(`test`,sn,sn),window.removeEventListener(`test`,sn,sn)}catch{on=!1}var cn=null,ln=null,un=null;function dn(){if(un)return un;var e,t=ln,n=t.length,r,i=`value`in cn?cn.value:cn.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 un=i.slice(e,1<r?1-r:void 0)}function fn(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 pn(){return!0}function mn(){return!1}function hn(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)?pn:mn,this.isPropagationStopped=mn,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=pn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=pn)},persist:function(){},isPersistent:pn}),t}var gn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},_n=hn(gn),vn=f({},gn,{view:0,detail:0}),yn=hn(vn),bn,xn,Sn,Cn=f({},vn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Pn,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!==Sn&&(Sn&&e.type===`mousemove`?(bn=e.screenX-Sn.screenX,xn=e.screenY-Sn.screenY):xn=bn=0,Sn=e),bn)},movementY:function(e){return`movementY`in e?e.movementY:xn}}),wn=hn(Cn),Tn=hn(f({},Cn,{dataTransfer:0})),En=hn(f({},vn,{relatedTarget:0})),Dn=hn(f({},gn,{animationName:0,elapsedTime:0,pseudoElement:0})),On=hn(f({},gn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),kn=hn(f({},gn,{data:0})),An={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},jn={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`},Mn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Nn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Mn[e])?!!t[e]:!1}function Pn(){return Nn}var Fn=hn(f({},vn,{key:function(e){if(e.key){var t=An[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=fn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?jn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Pn,charCode:function(e){return e.type===`keypress`?fn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?fn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),In=hn(f({},Cn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Ln=hn(f({},vn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Pn})),Rn=hn(f({},gn,{propertyName:0,elapsedTime:0,pseudoElement:0})),zn=hn(f({},Cn,{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})),Bn=hn(f({},gn,{newState:0,oldState:0})),Vn=[9,13,27,32],Hn=an&&`CompositionEvent`in window,Un=null;an&&`documentMode`in document&&(Un=document.documentMode);var Wn=an&&`TextEvent`in window&&!Un,Gn=an&&(!Hn||Un&&8<Un&&11>=Un),Kn=` `,qn=!1;function Jn(e,t){switch(e){case`keyup`:return Vn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function Yn(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var Xn=!1;function Zn(e,t){switch(e){case`compositionend`:return Yn(t);case`keypress`:return t.which===32?(qn=!0,Kn):null;case`textInput`:return e=t.data,e===Kn&&qn?null:e;default:return null}}function Qn(e,t){if(Xn)return e===`compositionend`||!Hn&&Jn(e,t)?(e=dn(),un=ln=cn=null,Xn=!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 Gn&&t.locale!==`ko`?null:t.data;default:return null}}var $n={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 er(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!$n[e.type]:t===`textarea`}function tr(e,t,n,r){Qt?$t?$t.push(r):$t=[r]:Qt=r,t=Pd(t,`onChange`),0<t.length&&(n=new _n(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var nr=null,rr=null;function ir(e){Ed(e,0)}function ar(e){if(jt(pt(e)))return e}function or(e,t){if(e===`change`)return t}var sr=!1;if(an){var cr;if(an){var lr=`oninput`in document;if(!lr){var ur=document.createElement(`div`);ur.setAttribute(`oninput`,`return;`),lr=typeof ur.oninput==`function`}cr=lr}else cr=!1;sr=cr&&(!document.documentMode||9<document.documentMode)}function dr(){nr&&(nr.detachEvent(`onpropertychange`,fr),rr=nr=null)}function fr(e){if(e.propertyName===`value`&&ar(rr)){var t=[];tr(t,rr,e,Zt(e)),nn(ir,t)}}function pr(e,t,n){e===`focusin`?(dr(),nr=t,rr=n,nr.attachEvent(`onpropertychange`,fr)):e===`focusout`&&dr()}function mr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return ar(rr)}function hr(e,t){if(e===`click`)return ar(t)}function gr(e,t){if(e===`input`||e===`change`)return ar(t)}function _r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var vr=typeof Object.is==`function`?Object.is:_r;function yr(e,t){if(vr(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(!_e.call(t,i)||!vr(e[i],t[i]))return!1}return!0}function br(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function xr(e,t){var n=br(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=br(n)}}function Sr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Sr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Cr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Mt(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=Mt(e.document)}return t}function wr(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 Tr=an&&`documentMode`in document&&11>=document.documentMode,Er=null,Dr=null,Or=null,kr=!1;function Ar(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;kr||Er==null||Er!==Mt(r)||(r=Er,`selectionStart`in r&&wr(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}),Or&&yr(Or,r)||(Or=r,r=Pd(Dr,`onSelect`),0<r.length&&(t=new _n(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Er)))}function jr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Mr={animationend:jr(`Animation`,`AnimationEnd`),animationiteration:jr(`Animation`,`AnimationIteration`),animationstart:jr(`Animation`,`AnimationStart`),transitionrun:jr(`Transition`,`TransitionRun`),transitionstart:jr(`Transition`,`TransitionStart`),transitioncancel:jr(`Transition`,`TransitionCancel`),transitionend:jr(`Transition`,`TransitionEnd`)},Nr={},Pr={};an&&(Pr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Mr.animationend.animation,delete Mr.animationiteration.animation,delete Mr.animationstart.animation),`TransitionEvent`in window||delete Mr.transitionend.transition);function Fr(e){if(Nr[e])return Nr[e];if(!Mr[e])return e;var t=Mr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Pr)return Nr[e]=t[n];return e}var Ir=Fr(`animationend`),Lr=Fr(`animationiteration`),Rr=Fr(`animationstart`),zr=Fr(`transitionrun`),Br=Fr(`transitionstart`),Vr=Fr(`transitioncancel`),Hr=Fr(`transitionend`),Ur=new Map,Wr=`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(` `);Wr.push(`scrollEnd`);function Gr(e,t){Ur.set(e,t),vt(t,[e])}var Kr=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)},qr=[],Jr=0,Yr=0;function Xr(){for(var e=Jr,t=Yr=Jr=0;t<e;){var n=qr[t];qr[t++]=null;var r=qr[t];qr[t++]=null;var i=qr[t];qr[t++]=null;var a=qr[t];if(qr[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&&ei(n,i,a)}}function Zr(e,t,n,r){qr[Jr++]=e,qr[Jr++]=t,qr[Jr++]=n,qr[Jr++]=r,Yr|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Qr(e,t,n,r){return Zr(e,t,n,r),ti(e)}function $r(e,t){return Zr(e,null,null,t),ti(e)}function ei(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-Pe(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function ti(e){if(50<_u)throw _u=0,vu=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ni={};function ri(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 ii(e,t,n,r){return new ri(e,t,n,r)}function ai(e){return e=e.prototype,!(!e||!e.isReactComponent)}function oi(e,t){var n=e.alternate;return n===null?(n=ii(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 si(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 ci(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)ai(e)&&(s=1);else if(typeof e==`string`)s=Qf(e,n,re.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case k:return e=ii(31,n,t,a),e.elementType=k,e.lanes=o,e;case y:return li(n.children,a,o,t);case b:s=8,a|=24;break;case x:return e=ii(12,n,t,a|2),e.elementType=x,e.lanes=o,e;case T:return e=ii(13,n,t,a),e.elementType=T,e.lanes=o,e;case E:return e=ii(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=ii(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function li(e,t,n,r){return e=ii(7,e,r,t),e.lanes=n,e}function ui(e,t,n){return e=ii(6,e,null,t),e.lanes=n,e}function di(e){var t=ii(18,null,null,0);return t.stateNode=e,t}function fi(e,t,n){return t=ii(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var pi=new WeakMap;function mi(e,t){if(typeof e==`object`&&e){var n=pi.get(e);return n===void 0?(t={value:e,source:t,stack:ge(t)},pi.set(e,t),t):n}return{value:e,source:t,stack:ge(t)}}var hi=[],gi=0,_i=null,vi=0,yi=[],bi=0,xi=null,Si=1,Ci=``;function wi(e,t){hi[gi++]=vi,hi[gi++]=_i,_i=e,vi=t}function Ti(e,t,n){yi[bi++]=Si,yi[bi++]=Ci,yi[bi++]=xi,xi=e;var r=Si;e=Ci;var i=32-Pe(r)-1;r&=~(1<<i),n+=1;var a=32-Pe(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Si=1<<32-Pe(t)+i|n<<i|r,Ci=a+e}else Si=1<<a|n<<i|r,Ci=e}function Ei(e){e.return!==null&&(wi(e,1),Ti(e,1,0))}function Di(e){for(;e===_i;)_i=hi[--gi],hi[gi]=null,vi=hi[--gi],hi[gi]=null;for(;e===xi;)xi=yi[--bi],yi[bi]=null,Ci=yi[--bi],yi[bi]=null,Si=yi[--bi],yi[bi]=null}function Oi(e,t){yi[bi++]=Si,yi[bi++]=Ci,yi[bi++]=xi,Si=t.id,Ci=t.overflow,xi=e}var ki=null,Ai=null,ji=!1,Mi=null,Ni=!1,Pi=Error(i(519));function Fi(e){throw Vi(mi(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Pi}function Ii(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[nt]=e,t[rt]=r,n){case`dialog`:Dd(`cancel`,t),Dd(`close`,t);break;case`iframe`:case`object`:case`embed`:Dd(`load`,t);break;case`video`:case`audio`:for(n=0;n<wd.length;n++)Dd(wd[n],t);break;case`source`:Dd(`error`,t);break;case`img`:case`image`:case`link`:Dd(`error`,t),Dd(`load`,t);break;case`details`:Dd(`toggle`,t);break;case`input`:Dd(`invalid`,t),It(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Dd(`invalid`,t);break;case`textarea`:Dd(`invalid`,t),Bt(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||Bd(t.textContent,n)?(r.popover!=null&&(Dd(`beforetoggle`,t),Dd(`toggle`,t)),r.onScroll!=null&&Dd(`scroll`,t),r.onScrollEnd!=null&&Dd(`scrollend`,t),r.onClick!=null&&(t.onclick=Yt),t=!0):t=!1,t||Fi(e,!0)}function Li(e){for(ki=e.return;ki;)switch(ki.tag){case 5:case 31:case 13:Ni=!1;return;case 27:case 3:Ni=!0;return;default:ki=ki.return}}function Ri(e){if(e!==ki)return!1;if(!ji)return Li(e),ji=!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&&Ai&&Fi(e),Li(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Ai=yf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Ai=yf(e)}else t===27?(t=Ai,sf(e.type)?(e=vf,vf=null,Ai=e):Ai=t):Ai=ki?_f(e.stateNode.nextSibling):null;return!0}function zi(){Ai=ki=null,ji=!1}function Bi(){var e=Mi;return e!==null&&(ru===null?ru=e:ru.push.apply(ru,e),Mi=null),e}function Vi(e){Mi===null?Mi=[e]:Mi.push(e)}var Hi=R(null),Ui=null,Wi=null;function Gi(e,t,n){B(Hi,t._currentValue),t._currentValue=n}function Ki(e){e._currentValue=Hi.current,z(Hi)}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 Ji(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 Yi(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;vr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===oe.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[sp]:e.push(sp))}a=a.return}e!==null&&Ji(t,e,n,r),t.flags|=262144}function Xi(e){for(e=e.firstContext;e!==null;){if(!vr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Zi(e){Ui=e,Wi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Qi(e){return ea(Ui,e)}function $i(e,t){return Ui===null&&Zi(e),ea(e,t)}function ea(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Wi===null){if(e===null)throw Error(i(308));Wi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Wi=Wi.next=t;return n}var ta=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()})}},na=t.unstable_scheduleCallback,ra=t.unstable_NormalPriority,ia={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function aa(){return{controller:new ta,data:new Map,refCount:0}}function oa(e){e.refCount--,e.refCount===0&&na(ra,function(){e.controller.abort()})}var sa=null,ca=0,la=0,ua=null;function da(e,t){if(sa===null){var n=sa=[];ca=0,la=vd(),ua={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return ca++,t.then(fa,fa),t}function fa(){if(--ca===0&&sa!==null){ua!==null&&(ua.status=`fulfilled`);var e=sa;sa=null,la=0,ua=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function pa(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 ma=I.S;I.S=function(e,t){ou=Se(),typeof t==`object`&&t&&typeof t.then==`function`&&da(e,t),ma!==null&&ma(e,t)};var ha=R(null);function ga(){var e=ha.current;return e===null?Vl.pooledCache:e}function _a(e,t){t===null?B(ha,ha.current):B(ha,t.pool)}function va(){var e=ga();return e===null?null:{parent:ia._currentValue,pool:e}}var ya=Error(i(460)),ba=Error(i(474)),xa=Error(i(542)),Sa={then:function(){}};function Ca(e){return e=e.status,e===`fulfilled`||e===`rejected`}function wa(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Yt,Yt),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Oa(e),e;default:if(typeof t.status==`string`)t.then(Yt,Yt);else{if(e=Vl,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,Oa(e),e}throw Ea=t,ya}}function Ta(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Ea=e,ya):e}}var Ea=null;function Da(){if(Ea===null)throw Error(i(459));var e=Ea;return Ea=null,e}function Oa(e){if(e===ya||e===xa)throw Error(i(483))}var ka=null,Aa=0;function ja(e){var t=Aa;return Aa+=1,ka===null&&(ka=[]),wa(ka,e,t)}function Ma(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Na(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 Pa(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=oi(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=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=ui(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&&Ta(i)===t.type)?(t=a(t,n.props),Ma(t,n),t.return=e,t):(t=ci(n.type,n.key,n.props,null,e.mode,r),Ma(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=fi(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=li(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=ui(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case g:return n=ci(t.type,t.key,t.props,null,e.mode,n),Ma(n,t),n.return=e,n;case v:return t=fi(t,e.mode,n),t.return=e,t;case O:return t=Ta(t),f(e,t,n)}if(F(t)||M(t))return t=li(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,ja(t),n);if(t.$$typeof===C)return f(e,$i(e,t),n);Na(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=Ta(n),p(e,t,n,r)}if(F(n)||M(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,ja(n),r);if(n.$$typeof===C)return p(e,t,$i(e,n),r);Na(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=Ta(r),m(e,t,n,r,i)}if(F(r)||M(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,ja(r),i);if(r.$$typeof===C)return m(e,t,n,$i(t,r),i);Na(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),ji&&wi(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 ji&&wi(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)}),ji&&wi(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),ji&&wi(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 ji&&wi(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)}),ji&&wi(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&&Ta(l)===r.type){n(e,r.sibling),c=a(r,o.props),Ma(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===y?(c=li(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=ci(o.type,o.key,o.props,null,e.mode,c),Ma(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=fi(o,e.mode,c),c.return=e,e=c}return s(e);case O:return o=Ta(o),b(e,r,o,c)}if(F(o))return h(e,r,o,c);if(M(o)){if(l=M(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,ja(o),c);if(o.$$typeof===C)return b(e,r,$i(e,o),c);Na(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=ui(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Aa=0;var i=b(e,t,n,r);return ka=null,i}catch(t){if(t===ya||t===xa)throw t;var a=ii(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Fa=Pa(!0),Ia=Pa(!1),La=!1;function Ra(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function za(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 Ba(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Va(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Bl&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=ti(e),ei(e,null,n),t}return Zr(e,r,t,n),ti(e)}function Ha(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,Ye(e,n)}}function Ua(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 Wa=!1;function Ga(){if(Wa){var e=ua;if(e!==null)throw e}}function Ka(e,t,n,r){Wa=!1;var i=e.updateQueue;La=!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?(Ul&p)===p:(r&p)===p){p!==0&&p===la&&(Wa=!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:La=!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),Zl|=o,e.lanes=o,e.memoizedState=d}}function qa(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Ja(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)qa(n[e],t)}var Ya=R(null),Xa=R(0);function Za(e,t){e=Yl,B(Xa,e),B(Ya,t),Yl=e|t.baseLanes}function Qa(){B(Xa,Yl),B(Ya,Ya.current)}function $a(){Yl=Xa.current,z(Ya),z(Xa)}var eo=R(null),to=null;function no(e){var t=e.alternate;B(so,so.current&1),B(eo,e),to===null&&(t===null||Ya.current!==null||t.memoizedState!==null)&&(to=e)}function ro(e){B(so,so.current),B(eo,e),to===null&&(to=e)}function io(e){e.tag===22?(B(so,so.current),B(eo,e),to===null&&(to=e)):ao(e)}function ao(){B(so,so.current),B(eo,eo.current)}function oo(e){z(eo),to===e&&(to=null),z(so)}var so=R(0);function co(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||mf(n)||hf(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 lo=0,uo=null,fo=null,po=null,mo=!1,ho=!1,go=!1,_o=0,vo=0,yo=null,bo=0;function xo(){throw Error(i(321))}function So(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!vr(e[n],t[n]))return!1;return!0}function Co(e,t,n,r,i,a){return lo=a,uo=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,I.H=e===null||e.memoizedState===null?zs:Bs,go=!1,a=n(r,i),go=!1,ho&&(a=To(t,n,r,i)),wo(e),a}function wo(e){I.H=Rs;var t=fo!==null&&fo.next!==null;if(lo=0,po=fo=uo=null,mo=!1,vo=0,yo=null,t)throw Error(i(300));e===null||rc||(e=e.dependencies,e!==null&&Xi(e)&&(rc=!0))}function To(e,t,n,r){uo=e;var a=0;do{if(ho&&(yo=null),vo=0,ho=!1,25<=a)throw Error(i(301));if(a+=1,po=fo=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}I.H=Vs,o=t(n,r)}while(ho);return o}function Eo(){var e=I.H,t=e.useState()[0];return t=typeof t.then==`function`?No(t):t,e=e.useState()[0],(fo===null?null:fo.memoizedState)!==e&&(uo.flags|=1024),t}function Do(){var e=_o!==0;return _o=0,e}function Oo(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function ko(e){if(mo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}mo=!1}lo=0,po=fo=uo=null,ho=!1,vo=_o=0,yo=null}function Ao(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return po===null?uo.memoizedState=po=e:po=po.next=e,po}function jo(){if(fo===null){var e=uo.alternate;e=e===null?null:e.memoizedState}else e=fo.next;var t=po===null?uo.memoizedState:po.next;if(t!==null)po=t,fo=e;else{if(e===null)throw uo.alternate===null?Error(i(467)):Error(i(310));fo=e,e={memoizedState:fo.memoizedState,baseState:fo.baseState,baseQueue:fo.baseQueue,queue:fo.queue,next:null},po===null?uo.memoizedState=po=e:po=po.next=e}return po}function Mo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function No(e){var t=vo;return vo+=1,yo===null&&(yo=[]),e=wa(yo,e,t),t=uo,(po===null?t.memoizedState:po.next)===null&&(t=t.alternate,I.H=t===null||t.memoizedState===null?zs:Bs),e}function Po(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return No(e);if(e.$$typeof===C)return Qi(e)}throw Error(i(438,String(e)))}function Fo(e){var t=null,n=uo.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=uo.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=Mo(),uo.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]=A;return t.index++,n}function Io(e,t){return typeof t==`function`?t(e):t}function Lo(e){return Ro(jo(),fo,e)}function Ro(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(lo&f)===f:(Ul&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===la&&(d=!0);else if((lo&p)===p){u=u.next,p===la&&(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,uo.lanes|=p,Zl|=p;f=u.action,go&&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,uo.lanes|=f,Zl|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!vr(o,e.memoizedState)&&(rc=!0,d&&(n=ua,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 zo(e){var t=jo(),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);vr(o,t.memoizedState)||(rc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Bo(e,t,n){var r=uo,a=jo(),o=ji;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!vr((fo||a).memoizedState,n);if(s&&(a.memoizedState=n,rc=!0),a=a.queue,ds(Uo.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||po!==null&&po.memoizedState.tag&1){if(r.flags|=2048,os(9,{destroy:void 0},Ho.bind(null,r,a,n,t),null),Vl===null)throw Error(i(349));o||lo&127||Vo(r,t,n)}return n}function Vo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=uo.updateQueue,t===null?(t=Mo(),uo.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Ho(e,t,n,r){t.value=n,t.getSnapshot=r,Wo(t)&&Go(e)}function Uo(e,t,n){return n(function(){Wo(t)&&Go(e)})}function Wo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!vr(e,n)}catch{return!0}}function Go(e){var t=$r(e,2);t!==null&&xu(t,e,2)}function Ko(e){var t=Ao();if(typeof e==`function`){var n=e;if(e=n(),go){Ne(!0);try{n()}finally{Ne(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Io,lastRenderedState:e},t}function qo(e,t,n,r){return e.baseState=n,Ro(e,fo,typeof r==`function`?r:Io)}function Jo(e,t,n,r,a){if(Fs(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)}};I.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Yo(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Yo(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=I.T,o={};I.T=o;try{var s=n(i,r),c=I.S;c!==null&&c(o,s),Xo(e,t,s)}catch(n){Qo(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),I.T=a}}else try{a=n(i,r),Xo(e,t,a)}catch(n){Qo(e,t,n)}}function Xo(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Zo(e,t,n)},function(n){return Qo(e,t,n)}):Zo(e,t,n)}function Zo(e,t,n){t.status=`fulfilled`,t.value=n,$o(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Yo(e,n)))}function Qo(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,$o(t),t=t.next;while(t!==r)}e.action=null}function $o(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function es(e,t){return t}function ts(e,t){if(ji){var n=Vl.formState;if(n!==null){a:{var r=uo;if(ji){if(Ai){b:{for(var i=Ai,a=Ni;i.nodeType!==8;){if(!a){i=null;break b}if(i=_f(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){Ai=_f(i.nextSibling),r=i.data===`F!`;break a}}Fi(r)}r=!1}r&&(t=n[0])}}return n=Ao(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:es,lastRenderedState:t},n.queue=r,n=Ns.bind(null,uo,r),r.dispatch=n,r=Ko(!1),a=Ps.bind(null,uo,!1,r.queue),r=Ao(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Jo.bind(null,uo,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function ns(e){return rs(jo(),fo,e)}function rs(e,t,n){if(t=Ro(e,t,es)[0],e=Lo(Io)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=No(t)}catch(e){throw e===ya?xa:e}else r=t;t=jo();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(uo.flags|=2048,os(9,{destroy:void 0},is.bind(null,i,n),null)),[r,a,e]}function is(e,t){e.action=t}function as(e){var t=jo(),n=fo;if(n!==null)return rs(t,n,e);jo(),t=t.memoizedState,n=jo();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function os(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=uo.updateQueue,t===null&&(t=Mo(),uo.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 ss(){return jo().memoizedState}function cs(e,t,n,r){var i=Ao();uo.flags|=e,i.memoizedState=os(1|t,{destroy:void 0},n,r===void 0?null:r)}function ls(e,t,n,r){var i=jo();r=r===void 0?null:r;var a=i.memoizedState.inst;fo!==null&&r!==null&&So(r,fo.memoizedState.deps)?i.memoizedState=os(t,a,n,r):(uo.flags|=e,i.memoizedState=os(1|t,a,n,r))}function us(e,t){cs(8390656,8,e,t)}function ds(e,t){ls(2048,8,e,t)}function fs(e){uo.flags|=4;var t=uo.updateQueue;if(t===null)t=Mo(),uo.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function ps(e){var t=jo().memoizedState;return fs({ref:t,nextImpl:e}),function(){if(Bl&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function ms(e,t){return ls(4,2,e,t)}function hs(e,t){return ls(4,4,e,t)}function gs(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 _s(e,t,n){n=n==null?null:n.concat([e]),ls(4,4,gs.bind(null,t,e),n)}function vs(){}function ys(e,t){var n=jo();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&So(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function bs(e,t){var n=jo();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&So(t,r[1]))return r[0];if(r=e(),go){Ne(!0);try{e()}finally{Ne(!1)}}return n.memoizedState=[r,t],r}function xs(e,t,n){return n===void 0||lo&1073741824&&!(Ul&261930)?e.memoizedState=t:(e.memoizedState=n,e=bu(),uo.lanes|=e,Zl|=e,n)}function Ss(e,t,n,r){return vr(n,t)?n:Ya.current===null?!(lo&42)||lo&1073741824&&!(Ul&261930)?(rc=!0,e.memoizedState=n):(e=bu(),uo.lanes|=e,Zl|=e,t):(e=xs(e,n,r),vr(e,t)||(rc=!0),e)}function Cs(e,t,n,r,i){var a=L.p;L.p=a!==0&&8>a?a:8;var o=I.T,s={};I.T=s,Ps(e,!1,t,n);try{var c=i(),l=I.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?U(e,t,pa(c,r),yu(e)):U(e,t,r,yu(e))}catch(n){U(e,t,{then:function(){},status:`rejected`,reason:n},yu())}finally{L.p=a,o!==null&&s.types!==null&&(o.types=s.types),I.T=o}}function ws(){}function Ts(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=Es(e).queue;Cs(e,a,t,ee,n===null?ws:function(){return Ds(e),n(r)})}function Es(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ee,baseState:ee,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Io,lastRenderedState:ee},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Io,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ds(e){var t=Es(e);t.next===null&&(t=e.alternate.memoizedState),U(e,t.next.queue,{},yu())}function Os(){return Qi(sp)}function ks(){return jo().memoizedState}function As(){return jo().memoizedState}function js(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=yu();e=Ba(n);var r=Va(t,e,n);r!==null&&(xu(r,t,n),Ha(r,t,n)),t={cache:aa()},e.payload=t;return}t=t.return}}function Ms(e,t,n){var r=yu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Fs(e)?Is(t,n):(n=Qr(e,t,n,r),n!==null&&(xu(n,e,r),Ls(n,t,r)))}function Ns(e,t,n){U(e,t,n,yu())}function U(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Fs(e))Is(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,vr(s,o))return Zr(e,t,i,0),Vl===null&&Xr(),!1}catch{}if(n=Qr(e,t,i,r),n!==null)return xu(n,e,r),Ls(n,t,r),!0}return!1}function Ps(e,t,n,r){if(r={lane:2,revertLane:vd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Fs(e)){if(t)throw Error(i(479))}else t=Qr(e,n,r,2),t!==null&&xu(t,e,2)}function Fs(e){var t=e.alternate;return e===uo||t!==null&&t===uo}function Is(e,t){ho=mo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ls(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ye(e,n)}}var Rs={readContext:Qi,use:Po,useCallback:xo,useContext:xo,useEffect:xo,useImperativeHandle:xo,useLayoutEffect:xo,useInsertionEffect:xo,useMemo:xo,useReducer:xo,useRef:xo,useState:xo,useDebugValue:xo,useDeferredValue:xo,useTransition:xo,useSyncExternalStore:xo,useId:xo,useHostTransitionStatus:xo,useFormState:xo,useActionState:xo,useOptimistic:xo,useMemoCache:xo,useCacheRefresh:xo};Rs.useEffectEvent=xo;var zs={readContext:Qi,use:Po,useCallback:function(e,t){return Ao().memoizedState=[e,t===void 0?null:t],e},useContext:Qi,useEffect:us,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),cs(4194308,4,gs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return cs(4194308,4,e,t)},useInsertionEffect:function(e,t){cs(4,2,e,t)},useMemo:function(e,t){var n=Ao();t=t===void 0?null:t;var r=e();if(go){Ne(!0);try{e()}finally{Ne(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Ao();if(n!==void 0){var i=n(t);if(go){Ne(!0);try{n(t)}finally{Ne(!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=Ms.bind(null,uo,e),[r.memoizedState,e]},useRef:function(e){var t=Ao();return e={current:e},t.memoizedState=e},useState:function(e){e=Ko(e);var t=e.queue,n=Ns.bind(null,uo,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:vs,useDeferredValue:function(e,t){return xs(Ao(),e,t)},useTransition:function(){var e=Ko(!1);return e=Cs.bind(null,uo,e.queue,!0,!1),Ao().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=uo,a=Ao();if(ji){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Vl===null)throw Error(i(349));Ul&127||Vo(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,us(Uo.bind(null,r,o,e),[e]),r.flags|=2048,os(9,{destroy:void 0},Ho.bind(null,r,o,n,t),null),n},useId:function(){var e=Ao(),t=Vl.identifierPrefix;if(ji){var n=Ci,r=Si;n=(r&~(1<<32-Pe(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=_o++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=bo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:Os,useFormState:ts,useActionState:ts,useOptimistic:function(e){var t=Ao();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Ps.bind(null,uo,!0,n),n.dispatch=t,[e,t]},useMemoCache:Fo,useCacheRefresh:function(){return Ao().memoizedState=js.bind(null,uo)},useEffectEvent:function(e){var t=Ao(),n={impl:e};return t.memoizedState=n,function(){if(Bl&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Bs={readContext:Qi,use:Po,useCallback:ys,useContext:Qi,useEffect:ds,useImperativeHandle:_s,useInsertionEffect:ms,useLayoutEffect:hs,useMemo:bs,useReducer:Lo,useRef:ss,useState:function(){return Lo(Io)},useDebugValue:vs,useDeferredValue:function(e,t){return Ss(jo(),fo.memoizedState,e,t)},useTransition:function(){var e=Lo(Io)[0],t=jo().memoizedState;return[typeof e==`boolean`?e:No(e),t]},useSyncExternalStore:Bo,useId:ks,useHostTransitionStatus:Os,useFormState:ns,useActionState:ns,useOptimistic:function(e,t){return qo(jo(),fo,e,t)},useMemoCache:Fo,useCacheRefresh:As};Bs.useEffectEvent=ps;var Vs={readContext:Qi,use:Po,useCallback:ys,useContext:Qi,useEffect:ds,useImperativeHandle:_s,useInsertionEffect:ms,useLayoutEffect:hs,useMemo:bs,useReducer:zo,useRef:ss,useState:function(){return zo(Io)},useDebugValue:vs,useDeferredValue:function(e,t){var n=jo();return fo===null?xs(n,e,t):Ss(n,fo.memoizedState,e,t)},useTransition:function(){var e=zo(Io)[0],t=jo().memoizedState;return[typeof e==`boolean`?e:No(e),t]},useSyncExternalStore:Bo,useId:ks,useHostTransitionStatus:Os,useFormState:as,useActionState:as,useOptimistic:function(e,t){var n=jo();return fo===null?(n.baseState=e,[e,n.queue.dispatch]):qo(n,fo,e,t)},useMemoCache:Fo,useCacheRefresh:As};Vs.useEffectEvent=ps;function Hs(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 Us={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=yu(),i=Ba(r);i.payload=t,n!=null&&(i.callback=n),t=Va(e,i,r),t!==null&&(xu(t,e,r),Ha(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=yu(),i=Ba(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Va(e,i,r),t!==null&&(xu(t,e,r),Ha(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=yu(),r=Ba(n);r.tag=2,t!=null&&(r.callback=t),t=Va(e,r,n),t!==null&&(xu(t,e,n),Ha(t,e,n))}};function Ws(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?!yr(n,r)||!yr(i,a):!0}function Gs(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&&Us.enqueueReplaceState(t,t.state,null)}function Ks(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){Kr(e)}function Js(e){console.error(e)}function Ys(e){Kr(e)}function Xs(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Zs(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 Qs(e,t,n){return n=Ba(n),n.tag=3,n.payload={element:null},n.callback=function(){Xs(e,t)},n}function $s(e){return e=Ba(e),e.tag=3,e}function ec(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(){Zs(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Zs(t,n,r),typeof i!=`function`&&(lu===null?lu=new Set([this]):lu.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function tc(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&Yi(t,n,a,!0),n=eo.current,n!==null){switch(n.tag){case 31:case 13:return to===null?Nu():n.alternate===null&&Xl===0&&(Xl=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===Sa?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Qu(e,r,a)),!1;case 22:return n.flags|=65536,r===Sa?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)),Qu(e,r,a)),!1}throw Error(i(435,n.tag))}return Qu(e,r,a),Nu(),!1}if(ji)return t=eo.current,t===null?(r!==Pi&&(t=Error(i(423),{cause:r}),Vi(mi(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=mi(r,n),a=Qs(e.stateNode,r,a),Ua(e,a),Xl!==4&&(Xl=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==Pi&&(e=Error(i(422),{cause:r}),Vi(mi(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=mi(o,n),nu===null?nu=[o]:nu.push(o),Xl!==4&&(Xl=2),t===null)return!0;r=mi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Qs(n.stateNode,r,e),Ua(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`&&(lu===null||!lu.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=$s(a),ec(a,e,n,r),Ua(n,a),!1}n=n.return}while(n!==null);return!1}var nc=Error(i(461)),rc=!1;function W(e,t,n,r){t.child=e===null?Ia(t,null,n,r):Fa(t,e.child,n,r)}function ic(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 Zi(t),r=Co(e,t,n,o,a,i),s=Do(),e!==null&&!rc?(Oo(e,t,i),Oc(e,t,i)):(ji&&s&&Ei(t),t.flags|=1,W(e,t,r,i),t.child)}function ac(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!ai(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,oc(e,t,a,r,i)):(e=ci(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!kc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?yr:n,n(o,r)&&e.ref===t.ref)return Oc(e,t,i)}return t.flags|=1,e=oi(a,r),e.ref=t.ref,e.return=t,t.child=e}function oc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(yr(a,r)&&e.ref===t.ref)if(rc=!1,t.pendingProps=r=a,kc(e,i))e.flags&131072&&(rc=!0);else return t.lanes=e.lanes,Oc(e,t,i)}return mc(e,t,n,r,i)}function sc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return lc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&_a(t,a===null?null:a.cachePool),a===null?Qa():Za(t,a),io(t);else return r=t.lanes=536870912,lc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&_a(t,null),Qa(),ao(t)):(_a(t,a.cachePool),Za(t,a),ao(t),t.memoizedState=null);return W(e,t,i,n),t.child}function cc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function lc(e,t,n,r,i){var a=ga();return a=a===null?null:{parent:ia._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&_a(t,null),Qa(),io(t),e!==null&&Yi(e,t,r,!0),t.childLanes=i,null}function uc(e,t){return t=Cc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function dc(e,t,n){return Fa(t,e.child,null,n),e=uc(t,t.pendingProps),e.flags|=2,oo(t),t.memoizedState=null,e}function fc(e,t,n){var r=t.pendingProps,a=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(ji){if(r.mode===`hidden`)return e=uc(t,r),t.lanes=536870912,cc(null,e);if(ro(t),(e=Ai)?(e=pf(e,Ni),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:xi===null?null:{id:Si,overflow:Ci},retryLane:536870912,hydrationErrors:null},n=di(e),n.return=t,t.child=n,ki=t,Ai=null)):e=null,e===null)throw Fi(t);return t.lanes=536870912,null}return uc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(ro(t),a)if(t.flags&256)t.flags&=-257,t=dc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if(rc||Yi(e,t,n,!1),a=(n&e.childLanes)!==0,rc||a){if(r=Vl,r!==null&&(s=Xe(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,$r(e,s),xu(r,e,s),nc;Nu(),t=dc(e,t,n)}else e=o.treeContext,Ai=_f(s.nextSibling),ki=t,ji=!0,Mi=null,Ni=!1,e!==null&&Oi(t,e),t=uc(t,r),t.flags|=4096;return t}return e=oi(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function pc(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 mc(e,t,n,r,i){return Zi(t),n=Co(e,t,n,r,void 0,i),r=Do(),e!==null&&!rc?(Oo(e,t,i),Oc(e,t,i)):(ji&&r&&Ei(t),t.flags|=1,W(e,t,n,i),t.child)}function hc(e,t,n,r,i,a){return Zi(t),t.updateQueue=null,n=To(t,r,n,i),wo(e),r=Do(),e!==null&&!rc?(Oo(e,t,a),Oc(e,t,a)):(ji&&r&&Ei(t),t.flags|=1,W(e,t,n,a),t.child)}function gc(e,t,n,r,i){if(Zi(t),t.stateNode===null){var a=ni,o=n.contextType;typeof o==`object`&&o&&(a=Qi(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Us,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Ra(t),o=n.contextType,a.context=typeof o==`object`&&o?Qi(o):ni,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Hs(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&&Us.enqueueReplaceState(a,a.state,null),Ka(t,r,a,i),Ga(),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=Ks(n,s);a.props=c;var l=a.context,u=n.contextType;o=ni,typeof u==`object`&&u&&(o=Qi(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)&&Gs(t,a,r,o),La=!1;var f=t.memoizedState;a.state=f,Ka(t,r,a,i),Ga(),l=t.memoizedState,s||f!==l||La?(typeof d==`function`&&(Hs(t,n,d,r),l=t.memoizedState),(c=La||Ws(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,za(e,t),o=t.memoizedProps,u=Ks(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=ni,typeof l==`object`&&l&&(c=Qi(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)&&Gs(t,a,r,c),La=!1,f=t.memoizedState,a.state=f,Ka(t,r,a,i),Ga();var p=t.memoizedState;o!==d||f!==p||La||e!==null&&e.dependencies!==null&&Xi(e.dependencies)?(typeof s==`function`&&(Hs(t,n,s,r),p=t.memoizedState),(u=La||Ws(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&Xi(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,pc(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=Fa(t,e.child,null,i),t.child=Fa(t,null,n,i)):W(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Oc(e,t,i),e}function _c(e,t,n,r){return zi(),t.flags|=256,W(e,t,n,r),t.child}var vc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function yc(e){return{baseLanes:e,cachePool:va()}}function bc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=eu),e}function xc(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:(so.current&2)!=0),s&&(a=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(ji){if(a?no(t):ao(t),(e=Ai)?(e=pf(e,Ni),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:xi===null?null:{id:Si,overflow:Ci},retryLane:536870912,hydrationErrors:null},n=di(e),n.return=t,t.child=n,ki=t,Ai=null)):e=null,e===null)throw Fi(t);return hf(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(ao(t),a=t.mode,c=Cc({mode:`hidden`,children:c},a),r=li(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=yc(n),r.childLanes=bc(e,s,n),t.memoizedState=vc,cc(null,r)):(no(t),Sc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(no(t),t.flags&=-257,t=wc(e,t,n)):t.memoizedState===null?(ao(t),c=r.fallback,a=t.mode,r=Cc({mode:`visible`,children:r.children},a),c=li(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Fa(t,e.child,null,n),r=t.child,r.memoizedState=yc(n),r.childLanes=bc(e,s,n),t.memoizedState=vc,t=cc(null,r)):(ao(t),t.child=e.child,t.flags|=128,t=null);else if(no(t),hf(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,Vi({value:r,source:null,stack:null}),t=wc(e,t,n)}else if(rc||Yi(e,t,n,!1),s=(n&e.childLanes)!==0,rc||s){if(s=Vl,s!==null&&(r=Xe(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,$r(e,r),xu(s,e,r),nc;mf(c)||Nu(),t=wc(e,t,n)}else mf(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,Ai=_f(c.nextSibling),ki=t,ji=!0,Mi=null,Ni=!1,e!==null&&Oi(t,e),t=Sc(t,r.children),t.flags|=4096);return t}return a?(ao(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=oi(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=li(c,a,n,null),c.flags|=2):c=oi(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,cc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=yc(n):(a=c.cachePool,a===null?a=va():(l=ia._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=bc(e,s,n),t.memoizedState=vc,cc(e.child,r)):(no(t),n=e.child,e=n.sibling,n=oi(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 Sc(e,t){return t=Cc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function Cc(e,t){return e=ii(22,e,null,t),e.lanes=0,e}function wc(e,t,n){return Fa(t,e.child,null,n),e=Sc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Tc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),qi(e.return,t,n)}function Ec(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 Dc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=so.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,B(so,o),W(e,t,r,n),r=ji?vi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Tc(e,n,t);else if(e.tag===19)Tc(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&&co(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Ec(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&&co(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Ec(t,!0,n,null,a,r);break;case`together`:Ec(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Oc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Zl|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Yi(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=oi(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=oi(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function kc(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&Xi(e))):!0}function Ac(e,t,n){switch(t.tag){case 3:se(t,t.stateNode.containerInfo),Gi(t,ia,e.memoizedState.cache),zi();break;case 27:case 5:le(t);break;case 4:se(t,t.stateNode.containerInfo);break;case 10:Gi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,ro(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(no(t),e=Oc(e,t,n),e===null?null:e.sibling):xc(e,t,n):(no(t),t.flags|=128,null);no(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(Yi(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return Dc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),B(so,so.current),r)break;return null;case 22:return t.lanes=0,sc(e,t,n,t.pendingProps);case 24:Gi(t,ia,e.memoizedState.cache)}return Oc(e,t,n)}function jc(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)rc=!0;else{if(!kc(e,n)&&!(t.flags&128))return rc=!1,Ac(e,t,n);rc=!!(e.flags&131072)}else rc=!1,ji&&t.flags&1048576&&Ti(t,vi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Ta(t.elementType),t.type=e,typeof e==`function`)ai(e)?(r=Ks(e,r),t.tag=1,t=gc(null,t,e,r,n)):(t.tag=0,t=mc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===w){t.tag=11,t=ic(null,t,e,r,n);break a}else if(a===D){t.tag=14,t=ac(null,t,e,r,n);break a}}throw t=P(e)||e,Error(i(306,t,``))}}return t;case 0:return mc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Ks(r,t.pendingProps),gc(e,t,r,a,n);case 3:a:{if(se(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,za(e,t),Ka(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Gi(t,ia,r),r!==o.cache&&Ji(t,[ia],n,!0),Ga(),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=_c(e,t,r,n);break a}else if(r!==a){a=mi(Error(i(424)),t),Vi(a),t=_c(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(Ai=_f(e.firstChild),ki=t,ji=!0,Mi=null,Ni=!0,n=Ia(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(zi(),r===a){t=Oc(e,t,n);break a}W(e,t,r,n)}t=t.child}return t;case 26:return pc(e,t),e===null?(n=Rf(t.type,null,t.pendingProps,null))?t.memoizedState=n:ji||(n=t.type,e=t.pendingProps,r=Yd(ae.current).createElement(n),r[nt]=t,r[rt]=e,Ud(r,n,e),ht(r),t.stateNode=r):t.memoizedState=Rf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return le(t),e===null&&ji&&(r=t.stateNode=xf(t.type,t.pendingProps,ae.current),ki=t,Ni=!0,a=Ai,sf(t.type)?(vf=a,Ai=_f(r.firstChild)):Ai=a),W(e,t,t.pendingProps.children,n),pc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&ji&&((a=r=Ai)&&(r=df(r,t.type,t.pendingProps,Ni),r===null?a=!1:(t.stateNode=r,ki=t,Ai=_f(r.firstChild),Ni=!1,a=!0)),a||Fi(t)),le(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=Co(e,t,Eo,null,null,n),sp._currentValue=a),pc(e,t),W(e,t,r,n),t.child;case 6:return e===null&&ji&&((e=n=Ai)&&(n=ff(n,t.pendingProps,Ni),n===null?e=!1:(t.stateNode=n,ki=t,Ai=null,e=!0)),e||Fi(t)),null;case 13:return xc(e,t,n);case 4:return se(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Fa(t,null,r,n):W(e,t,r,n),t.child;case 11:return ic(e,t,t.type,t.pendingProps,n);case 7:return W(e,t,t.pendingProps,n),t.child;case 8:return W(e,t,t.pendingProps.children,n),t.child;case 12:return W(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Gi(t,t.type,r.value),W(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,Zi(t),a=Qi(a),r=r(a),t.flags|=1,W(e,t,r,n),t.child;case 14:return ac(e,t,t.type,t.pendingProps,n);case 15:return oc(e,t,t.type,t.pendingProps,n);case 19:return Dc(e,t,n);case 31:return fc(e,t,n);case 22:return sc(e,t,n,t.pendingProps);case 24:return Zi(t),r=Qi(ia),e===null?(a=ga(),a===null&&(a=Vl,o=aa(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},Ra(t),Gi(t,ia,a)):((e.lanes&n)!==0&&(za(e,t),Ka(t,null,null,n),Ga()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,Gi(t,ia,r),r!==a.cache&&Ji(t,[ia],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Gi(t,ia,r))),W(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function Mc(e){e.flags|=4}function Nc(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(Au())e.flags|=8192;else throw Ea=Sa,ba}else e.flags&=-16777217}function Pc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!$f(t))if(Au())e.flags|=8192;else throw Ea=Sa,ba}function Fc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:We(),e.lanes|=t,tu|=t)}function Ic(e,t){if(!ji)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 Lc(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 Rc(e,t,n){var r=t.pendingProps;switch(Di(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Lc(t),null;case 1:return Lc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Ki(ia),ce(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Ri(t)?Mc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Bi())),Lc(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(Mc(t),o===null?(Lc(t),Nc(t,a,null,r,n)):(Lc(t),Pc(t,o))):o?o===e.memoizedState?(Lc(t),t.flags&=-16777217):(Mc(t),Lc(t),Pc(t,o)):(e=e.memoizedProps,e!==r&&Mc(t),Lc(t),Nc(t,a,e,r,n)),null;case 27:if(ue(t),n=ae.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Mc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Lc(t),null}e=re.current,Ri(t)?Ii(t,e):(e=xf(a,r,n),t.stateNode=e,Mc(t))}return Lc(t),null;case 5:if(ue(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Mc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Lc(t),null}if(o=re.current,Ri(t))Ii(t,o);else{var s=Yd(ae.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[nt]=t,o[rt]=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(Ud(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&&Mc(t)}}return Lc(t),Nc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Mc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=ae.current,Ri(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=ki,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[nt]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Bd(e.nodeValue,n)),e||Fi(t,!0)}else e=Yd(e).createTextNode(r),e[nt]=t,t.stateNode=e}return Lc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Ri(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[nt]=t}else zi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Lc(t),e=!1}else n=Bi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(oo(t),t):(oo(t),null);if(t.flags&128)throw Error(i(558))}return Lc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Ri(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[nt]=t}else zi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Lc(t),a=!1}else a=Bi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(oo(t),t):(oo(t),null)}return oo(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),Fc(t,t.updateQueue),Lc(t),null);case 4:return ce(),e===null&&Ad(t.stateNode.containerInfo),Lc(t),null;case 10:return Ki(t.type),Lc(t),null;case 19:if(z(so),r=t.memoizedState,r===null)return Lc(t),null;if(a=(t.flags&128)!=0,o=r.rendering,o===null)if(a)Ic(r,!1);else{if(Xl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=co(e),o!==null){for(t.flags|=128,Ic(r,!1),e=o.updateQueue,t.updateQueue=e,Fc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)si(n,e),n=n.sibling;return B(so,so.current&1|2),ji&&wi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Se()>su&&(t.flags|=128,a=!0,Ic(r,!1),t.lanes=4194304)}else{if(!a)if(e=co(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Fc(t,e),Ic(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!ji)return Lc(t),null}else 2*Se()-r.renderingStartTime>su&&n!==536870912&&(t.flags|=128,a=!0,Ic(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?(Lc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Se(),e.sibling=null,n=so.current,B(so,a?n&1|2:n&1),ji&&wi(t,r.treeForkCount),e);case 22:case 23:return oo(t),$a(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Lc(t),t.subtreeFlags&6&&(t.flags|=8192)):Lc(t),n=t.updateQueue,n!==null&&Fc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&z(ha),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Ki(ia),Lc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function zc(e,t){switch(Di(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ki(ia),ce(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ue(t),null;case 31:if(t.memoizedState!==null){if(oo(t),t.alternate===null)throw Error(i(340));zi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(oo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));zi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return z(so),null;case 4:return ce(),null;case 10:return Ki(t.type),null;case 22:case 23:return oo(t),$a(),e!==null&&z(ha),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ki(ia),null;case 25:return null;default:return null}}function Bc(e,t){switch(Di(t),t.tag){case 3:Ki(ia),ce();break;case 26:case 27:case 5:ue(t);break;case 4:ce();break;case 31:t.memoizedState!==null&&oo(t);break;case 13:oo(t);break;case 19:z(so);break;case 10:Ki(t.type);break;case 22:case 23:oo(t),$a(),e!==null&&z(ha);break;case 24:Ki(ia)}}function Vc(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){Zu(t,t.return,e)}}function Hc(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){Zu(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Zu(t,t.return,e)}}function Uc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Ja(t,n)}catch(t){Zu(e,e.return,t)}}}function Wc(e,t,n){n.props=Ks(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Zu(e,t,n)}}function Gc(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){Zu(e,t,n)}}function Kc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){Zu(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){Zu(e,t,n)}else n.current=null}function qc(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){Zu(e,e.return,t)}}function Jc(e,t,n){try{var r=e.stateNode;Wd(r,e.type,n,t),r[rt]=t}catch(t){Zu(e,e.return,t)}}function Yc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&sf(e.type)||e.tag===4}function Xc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Yc(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&&sf(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 Zc(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=Yt));else if(r!==4&&(r===27&&sf(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Zc(e,t,n),e=e.sibling;e!==null;)Zc(e,t,n),e=e.sibling}function Qc(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&&sf(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Qc(e,t,n),e=e.sibling;e!==null;)Qc(e,t,n),e=e.sibling}function $c(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Ud(t,r,n),t[nt]=e,t[rt]=n}catch(t){Zu(e,e.return,t)}}var el=!1,tl=!1,nl=!1,rl=typeof WeakSet==`function`?WeakSet:Set,il=null;function al(e,t){if(e=e.containerInfo,qd=gp,e=Cr(e),wr(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(Jd={focusedElem:e,selectionRange:n},gp=!1,il=t;il!==null;)if(t=il,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,il=e;else for(;il!==null;){switch(t=il,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=Ks(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){Zu(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)uf(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:uf(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,il=e;break}il=t.return}}function ol(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:xl(e,n),r&4&&Vc(5,n);break;case 1:if(xl(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Zu(n,n.return,e)}else{var i=Ks(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Zu(n,n.return,e)}}r&64&&Uc(n),r&512&&Gc(n,n.return);break;case 3:if(xl(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{Ja(e,t)}catch(e){Zu(n,n.return,e)}}break;case 27:t===null&&r&4&&$c(n);case 26:case 5:xl(e,n),t===null&&r&4&&qc(n),r&512&&Gc(n,n.return);break;case 12:xl(e,n);break;case 31:xl(e,n),r&4&&fl(e,n);break;case 13:xl(e,n),r&4&&pl(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=td.bind(null,n),gf(e,n))));break;case 22:if(r=n.memoizedState!==null||el,!r){t=t!==null&&t.memoizedState!==null||tl,i=el;var a=tl;el=r,(tl=t)&&!a?Cl(e,n,(n.subtreeFlags&8772)!=0):xl(e,n),el=i,tl=a}break;case 30:break;default:xl(e,n)}}function sl(e){var t=e.alternate;t!==null&&(e.alternate=null,sl(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&ut(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 cl=null,ll=!1;function ul(e,t,n){for(n=n.child;n!==null;)dl(e,t,n),n=n.sibling}function dl(e,t,n){if(Me&&typeof Me.onCommitFiberUnmount==`function`)try{Me.onCommitFiberUnmount(je,n)}catch{}switch(n.tag){case 26:tl||Kc(n,t),ul(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:tl||Kc(n,t);var r=cl,i=ll;sf(n.type)&&(cl=n.stateNode,ll=!1),ul(e,t,n),Sf(n.stateNode),cl=r,ll=i;break;case 5:tl||Kc(n,t);case 6:if(r=cl,i=ll,cl=null,ul(e,t,n),cl=r,ll=i,cl!==null)if(ll)try{(cl.nodeType===9?cl.body:cl.nodeName===`HTML`?cl.ownerDocument.body:cl).removeChild(n.stateNode)}catch(e){Zu(n,t,e)}else try{cl.removeChild(n.stateNode)}catch(e){Zu(n,t,e)}break;case 18:cl!==null&&(ll?(e=cl,cf(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Vp(e)):cf(cl,n.stateNode));break;case 4:r=cl,i=ll,cl=n.stateNode.containerInfo,ll=!0,ul(e,t,n),cl=r,ll=i;break;case 0:case 11:case 14:case 15:Hc(2,n,t),tl||Hc(4,n,t),ul(e,t,n);break;case 1:tl||(Kc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Wc(n,t,r)),ul(e,t,n);break;case 21:ul(e,t,n);break;case 22:tl=(r=tl)||n.memoizedState!==null,ul(e,t,n),tl=r;break;default:ul(e,t,n)}}function fl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Vp(e)}catch(e){Zu(t,t.return,e)}}}function pl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Vp(e)}catch(e){Zu(t,t.return,e)}}function ml(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new rl),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new rl),t;default:throw Error(i(435,e.tag))}}function hl(e,t){var n=ml(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=nd.bind(null,e,t);t.then(r,r)}})}function gl(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(sf(c.type)){cl=c.stateNode,ll=!1;break a}break;case 5:cl=c.stateNode,ll=!1;break a;case 3:case 4:cl=c.stateNode.containerInfo,ll=!0;break a}c=c.return}if(cl===null)throw Error(i(160));dl(o,s,a),cl=null,ll=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)vl(t,e),t=t.sibling}var _l=null;function vl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:gl(t,e),yl(e),r&4&&(Hc(3,e,e.return),Vc(3,e),Hc(5,e,e.return));break;case 1:gl(t,e),yl(e),r&512&&(tl||n===null||Kc(n,n.return)),r&64&&el&&(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=_l;if(gl(t,e),yl(e),r&512&&(tl||n===null||Kc(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[lt]||o[nt]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head > title`))),Ud(o,r,n),o[nt]=e,ht(o),r=o;break a;case`link`:var s=Xf(`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),Ud(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=Xf(`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),Ud(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[nt]=e,ht(o),r=o}e.stateNode=r}else Zf(a,e.type,e.stateNode);else e.stateNode=Gf(a,r,e.memoizedProps);else o===r?r===null&&e.stateNode!==null&&Jc(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?Zf(a,e.type,e.stateNode):Gf(a,r,e.memoizedProps))}break;case 27:gl(t,e),yl(e),r&512&&(tl||n===null||Kc(n,n.return)),n!==null&&r&4&&Jc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(gl(t,e),yl(e),r&512&&(tl||n===null||Kc(n,n.return)),e.flags&32){a=e.stateNode;try{Vt(a,``)}catch(t){Zu(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,Jc(e,a,n===null?a:n.memoizedProps)),r&1024&&(nl=!0);break;case 6:if(gl(t,e),yl(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){Zu(e,e.return,t)}}break;case 3:if(Yf=null,a=_l,_l=Tf(t.containerInfo),gl(t,e),_l=a,yl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Vp(t.containerInfo)}catch(t){Zu(e,e.return,t)}nl&&(nl=!1,bl(e));break;case 4:r=_l,_l=Tf(e.stateNode.containerInfo),gl(t,e),yl(e),_l=r;break;case 12:gl(t,e),yl(e);break;case 31:gl(t,e),yl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,hl(e,r)));break;case 13:gl(t,e),yl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(au=Se()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,hl(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=el,d=tl;if(el=u||a,tl=d||l,gl(t,e),tl=d,el=u,yl(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||el||tl||Sl(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){Zu(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){Zu(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?lf(m,!0):lf(l.stateNode,!1)}catch(e){Zu(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,hl(e,n))));break;case 19:gl(t,e),yl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,hl(e,r)));break;case 30:break;case 21:break;default:gl(t,e),yl(e)}}function yl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Yc(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;Qc(e,Xc(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(Vt(o,``),n.flags&=-33),Qc(e,Xc(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;Zc(e,Xc(e),s);break;default:throw Error(i(161))}}catch(t){Zu(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function bl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;bl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function xl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)ol(e,t.alternate,t),t=t.sibling}function Sl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Hc(4,t,t.return),Sl(t);break;case 1:Kc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Wc(t,t.return,n),Sl(t);break;case 27:Sf(t.stateNode);case 26:case 5:Kc(t,t.return),Sl(t);break;case 22:t.memoizedState===null&&Sl(t);break;case 30:Sl(t);break;default:Sl(t)}e=e.sibling}}function Cl(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:Cl(i,a,n),Vc(4,a);break;case 1:if(Cl(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Zu(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){Zu(r,r.return,e)}}n&&o&64&&Uc(a),Gc(a,a.return);break;case 27:$c(a);case 26:case 5:Cl(i,a,n),n&&r===null&&o&4&&qc(a),Gc(a,a.return);break;case 12:Cl(i,a,n);break;case 31:Cl(i,a,n),n&&o&4&&fl(i,a);break;case 13:Cl(i,a,n),n&&o&4&&pl(i,a);break;case 22:a.memoizedState===null&&Cl(i,a,n),Gc(a,a.return);break;case 30:break;default:Cl(i,a,n)}t=t.sibling}}function wl(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&oa(n))}function Tl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&oa(e))}function El(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Dl(e,t,n,r),t=t.sibling}function Dl(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:El(e,t,n,r),i&2048&&Vc(9,t);break;case 1:El(e,t,n,r);break;case 3:El(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&&oa(e)));break;case 12:if(i&2048){El(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){Zu(t,t.return,e)}}else El(e,t,n,r);break;case 31:El(e,t,n,r);break;case 13:El(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?El(e,t,n,r):(a._visibility|=2,Ol(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?El(e,t,n,r):kl(e,t),i&2048&&wl(o,t);break;case 24:El(e,t,n,r),i&2048&&Tl(t.alternate,t);break;default:El(e,t,n,r)}}function Ol(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:Ol(a,o,s,c,i),Vc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Ol(a,o,s,c,i)):u._visibility&2?Ol(a,o,s,c,i):kl(a,o),i&&l&2048&&wl(o.alternate,o);break;case 24:Ol(a,o,s,c,i),i&&l&2048&&Tl(o.alternate,o);break;default:Ol(a,o,s,c,i)}t=t.sibling}}function kl(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:kl(n,r),i&2048&&wl(r.alternate,r);break;case 24:kl(n,r),i&2048&&Tl(r.alternate,r);break;default:kl(n,r)}t=t.sibling}}var Al=8192;function jl(e,t,n){if(e.subtreeFlags&Al)for(e=e.child;e!==null;)Ml(e,t,n),e=e.sibling}function Ml(e,t,n){switch(e.tag){case 26:jl(e,t,n),e.flags&Al&&e.memoizedState!==null&&ep(n,_l,e.memoizedState,e.memoizedProps);break;case 5:jl(e,t,n);break;case 3:case 4:var r=_l;_l=Tf(e.stateNode.containerInfo),jl(e,t,n),_l=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Al,Al=16777216,jl(e,t,n),Al=r):jl(e,t,n));break;default:jl(e,t,n)}}function Nl(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 Pl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];il=r,Ll(r,e)}Nl(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Fl(e),e=e.sibling}function Fl(e){switch(e.tag){case 0:case 11:case 15:Pl(e),e.flags&2048&&Hc(9,e,e.return);break;case 3:Pl(e);break;case 12:Pl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Il(e)):Pl(e);break;default:Pl(e)}}function Il(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];il=r,Ll(r,e)}Nl(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Hc(8,t,t.return),Il(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Il(t));break;default:Il(t)}e=e.sibling}}function Ll(e,t){for(;il!==null;){var n=il;switch(n.tag){case 0:case 11:case 15:Hc(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:oa(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,il=r;else a:for(n=e;il!==null;){r=il;var i=r.sibling,a=r.return;if(sl(r),r===n){il=null;break a}if(i!==null){i.return=a,il=i;break a}il=a}}}var Rl={getCacheForType:function(e){var t=Qi(ia),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Qi(ia).controller.signal}},zl=typeof WeakMap==`function`?WeakMap:Map,Bl=0,Vl=null,Hl=null,Ul=0,Wl=0,Gl=null,Kl=!1,ql=!1,Jl=!1,Yl=0,Xl=0,Zl=0,Ql=0,$l=0,eu=0,tu=0,nu=null,ru=null,iu=!1,au=0,ou=0,su=1/0,cu=null,lu=null,uu=0,du=null,fu=null,pu=0,mu=0,hu=null,gu=null,_u=0,vu=null;function yu(){return Bl&2&&Ul!==0?Ul&-Ul:I.T===null?$e():vd()}function bu(){if(eu===0)if(!(Ul&536870912)||ji){var e=ze;ze<<=1,!(ze&3932160)&&(ze=262144),eu=e}else eu=536870912;return e=eo.current,e!==null&&(e.flags|=32),eu}function xu(e,t,n){(e===Vl&&(Wl===2||Wl===9)||e.cancelPendingCommit!==null)&&(Ou(e,0),Tu(e,Ul,eu,!1)),Ke(e,n),(!(Bl&2)||e!==Vl)&&(e===Vl&&(!(Bl&2)&&(Ql|=n),Xl===4&&Tu(e,Ul,eu,!1)),ud(e))}function Su(e,t,n){if(Bl&6)throw Error(i(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||Ue(e,t),a=r?Iu(e,t):Pu(e,t,!0),o=r;do{if(a===0){ql&&!r&&Tu(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!wu(n)){a=Pu(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=nu;var l=c.current.memoizedState.isDehydrated;if(l&&(Ou(c,s).flags|=256),s=Pu(c,s,!1),s!==2){if(Jl&&!l){c.errorRecoveryDisabledLanes|=o,Ql|=o,a=4;break a}o=ru,ru=a,o!==null&&(ru===null?ru=o:ru.push.apply(ru,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Ou(e,0),Tu(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:Tu(r,t,eu,!Kl);break a;case 2:ru=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=au+300-Se(),10<a)){if(Tu(r,t,eu,!Kl),He(r,0,!0)!==0)break a;pu=t,r.timeoutHandle=tf(Cu.bind(null,r,n,ru,cu,iu,t,eu,Ql,tu,Kl,o,`Throttled`,-0,0),a);break a}Cu(r,n,ru,cu,iu,t,eu,Ql,tu,Kl,o,null,-0,0)}}break}while(1);ud(e)}function Cu(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:Yt},Ml(t,a,d);var m=(a&62914560)===a?au-Se():(a&4194048)===a?ou-Se():0;if(m=np(d,m),m!==null){pu=a,e.cancelPendingCommit=m(Uu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),Tu(e,a,o,!l);return}}Uu(e,t,a,n,r,i,o,s,c)}function wu(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(!vr(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 Tu(e,t,n,r){t&=~$l,t&=~Ql,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Pe(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&Je(e,n,t)}function Eu(){return Bl&6?!0:(dd(0,!1),!1)}function Du(){if(Hl!==null){if(Wl===0)var e=Hl.return;else e=Hl,Wi=Ui=null,ko(e),ka=null,Aa=0,e=Hl;for(;e!==null;)Bc(e.alternate,e),e=e.return;Hl=null}}function Ou(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,nf(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),pu=0,Du(),Vl=e,Hl=n=oi(e.current,null),Ul=t,Wl=0,Gl=null,Kl=!1,ql=Ue(e,t),Jl=!1,tu=eu=$l=Ql=Zl=Xl=0,ru=nu=null,iu=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Pe(r),a=1<<i;t|=e[i],r&=~a}return Yl=t,Xr(),n}function ku(e,t){uo=null,I.H=Rs,t===ya||t===xa?(t=Da(),Wl=3):t===ba?(t=Da(),Wl=4):Wl=t===nc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Gl=t,Hl===null&&(Xl=1,Xs(e,mi(t,e.current)))}function Au(){var e=eo.current;return e===null?!0:(Ul&4194048)===Ul?to===null:(Ul&62914560)===Ul||Ul&536870912?e===to:!1}function ju(){var e=I.H;return I.H=Rs,e===null?Rs:e}function Mu(){var e=I.A;return I.A=Rl,e}function Nu(){Xl=4,Kl||(Ul&4194048)!==Ul&&eo.current!==null||(ql=!0),!(Zl&134217727)&&!(Ql&134217727)||Vl===null||Tu(Vl,Ul,eu,!1)}function Pu(e,t,n){var r=Bl;Bl|=2;var i=ju(),a=Mu();(Vl!==e||Ul!==t)&&(cu=null,Ou(e,t)),t=!1;var o=Xl;a:do try{if(Wl!==0&&Hl!==null){var s=Hl,c=Gl;switch(Wl){case 8:Du(),o=6;break a;case 3:case 2:case 9:case 6:eo.current===null&&(t=!0);var l=Wl;if(Wl=0,Gl=null,Bu(e,s,c,l),n&&ql){o=0;break a}break;default:l=Wl,Wl=0,Gl=null,Bu(e,s,c,l)}}Fu(),o=Xl;break}catch(t){ku(e,t)}while(1);return t&&e.shellSuspendCounter++,Wi=Ui=null,Bl=r,I.H=i,I.A=a,Hl===null&&(Vl=null,Ul=0,Xr()),o}function Fu(){for(;Hl!==null;)Ru(Hl)}function Iu(e,t){var n=Bl;Bl|=2;var r=ju(),a=Mu();Vl!==e||Ul!==t?(cu=null,su=Se()+500,Ou(e,t)):ql=Ue(e,t);a:do try{if(Wl!==0&&Hl!==null){t=Hl;var o=Gl;b:switch(Wl){case 1:Wl=0,Gl=null,Bu(e,t,o,1);break;case 2:case 9:if(Ca(o)){Wl=0,Gl=null,zu(t);break}t=function(){Wl!==2&&Wl!==9||Vl!==e||(Wl=7),ud(e)},o.then(t,t);break a;case 3:Wl=7;break a;case 4:Wl=5;break a;case 7:Ca(o)?(Wl=0,Gl=null,zu(t)):(Wl=0,Gl=null,Bu(e,t,o,7));break;case 5:var s=null;switch(Hl.tag){case 26:s=Hl.memoizedState;case 5:case 27:var c=Hl;if(s?$f(s):c.stateNode.complete){Wl=0,Gl=null;var l=c.sibling;if(l!==null)Hl=l;else{var u=c.return;u===null?Hl=null:(Hl=u,Vu(u))}break b}}Wl=0,Gl=null,Bu(e,t,o,5);break;case 6:Wl=0,Gl=null,Bu(e,t,o,6);break;case 8:Du(),Xl=6;break a;default:throw Error(i(462))}}Lu();break}catch(t){ku(e,t)}while(1);return Wi=Ui=null,I.H=r,I.A=a,Bl=n,Hl===null?(Vl=null,Ul=0,Xr(),Xl):0}function Lu(){for(;Hl!==null&&!be();)Ru(Hl)}function Ru(e){var t=jc(e.alternate,e,Yl);e.memoizedProps=e.pendingProps,t===null?Vu(e):Hl=t}function zu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=hc(n,t,t.pendingProps,t.type,void 0,Ul);break;case 11:t=hc(n,t,t.pendingProps,t.type.render,t.ref,Ul);break;case 5:ko(t);default:Bc(n,t),t=Hl=si(t,Yl),t=jc(n,t,Yl)}e.memoizedProps=e.pendingProps,t===null?Vu(e):Hl=t}function Bu(e,t,n,r){Wi=Ui=null,ko(t),ka=null,Aa=0;var i=t.return;try{if(tc(e,i,t,n,Ul)){Xl=1,Xs(e,mi(n,e.current)),Hl=null;return}}catch(t){if(i!==null)throw Hl=i,t;Xl=1,Xs(e,mi(n,e.current)),Hl=null;return}t.flags&32768?(ji||r===1?e=!0:ql||Ul&536870912?e=!1:(Kl=e=!0,(r===2||r===9||r===3||r===6)&&(r=eo.current,r!==null&&r.tag===13&&(r.flags|=16384))),Hu(t,e)):Vu(t)}function Vu(e){var t=e;do{if(t.flags&32768){Hu(t,Kl);return}e=t.return;var n=Rc(t.alternate,t,Yl);if(n!==null){Hl=n;return}if(t=t.sibling,t!==null){Hl=t;return}Hl=t=e}while(t!==null);Xl===0&&(Xl=5)}function Hu(e,t){do{var n=zc(e.alternate,e);if(n!==null){n.flags&=32767,Hl=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Hl=e;return}Hl=e=n}while(e!==null);Xl=6,Hl=null}function Uu(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do Ju();while(uu!==0);if(Bl&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=Yr,qe(e,n,o,s,c,l),e===Vl&&(Hl=Vl=null,Ul=0),fu=t,du=e,pu=n,mu=o,hu=a,gu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,rd(Ee,function(){return Yu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=I.T,I.T=null,a=L.p,L.p=2,s=Bl,Bl|=4;try{al(e,t,n)}finally{Bl=s,L.p=a,I.T=r}}uu=1,Wu(),Gu(),Ku()}}function Wu(){if(uu===1){uu=0;var e=du,t=fu,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=I.T,I.T=null;var r=L.p;L.p=2;var i=Bl;Bl|=4;try{vl(t,e);var a=Jd,o=Cr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&Sr(s.ownerDocument.documentElement,s)){if(c!==null&&wr(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 _=xr(s,h),v=xr(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}}gp=!!qd,Jd=qd=null}finally{Bl=i,L.p=r,I.T=n}}e.current=t,uu=2}}function Gu(){if(uu===2){uu=0;var e=du,t=fu,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=I.T,I.T=null;var r=L.p;L.p=2;var i=Bl;Bl|=4;try{ol(e,t.alternate,t)}finally{Bl=i,L.p=r,I.T=n}}uu=3}}function Ku(){if(uu===4||uu===3){uu=0,xe();var e=du,t=fu,n=pu,r=gu;t.subtreeFlags&10256||t.flags&10256?uu=5:(uu=0,fu=du=null,qu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(lu=null),Qe(n),t=t.stateNode,Me&&typeof Me.onCommitFiberRoot==`function`)try{Me.onCommitFiberRoot(je,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=I.T,i=L.p,L.p=2,I.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{I.T=t,L.p=i}}pu&3&&Ju(),ud(e),i=e.pendingLanes,n&261930&&i&42?e===vu?_u++:(_u=0,vu=e):_u=0,dd(0,!1)}}function qu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,oa(t)))}function Ju(){return Wu(),Gu(),Ku(),Yu()}function Yu(){if(uu!==5)return!1;var e=du,t=mu;mu=0;var n=Qe(pu),r=I.T,a=L.p;try{L.p=32>n?32:n,I.T=null,n=hu,hu=null;var o=du,s=pu;if(uu=0,fu=du=null,pu=0,Bl&6)throw Error(i(331));var c=Bl;if(Bl|=4,Fl(o.current),Dl(o,o.current,s,n),Bl=c,dd(0,!1),Me&&typeof Me.onPostCommitFiberRoot==`function`)try{Me.onPostCommitFiberRoot(je,o)}catch{}return!0}finally{L.p=a,I.T=r,qu(e,t)}}function Xu(e,t,n){t=mi(n,t),t=Qs(e.stateNode,t,2),e=Va(e,t,2),e!==null&&(Ke(e,2),ud(e))}function Zu(e,t,n){if(e.tag===3)Xu(e,e,n);else for(;t!==null;){if(t.tag===3){Xu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(lu===null||!lu.has(r))){e=mi(n,e),n=$s(2),r=Va(t,n,2),r!==null&&(ec(n,r,t,e),Ke(r,2),ud(r));break}}t=t.return}}function Qu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new zl;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)||(Jl=!0,i.add(n),e=$u.bind(null,e,t,n),t.then(e,e))}function $u(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Vl===e&&(Ul&n)===n&&(Xl===4||Xl===3&&(Ul&62914560)===Ul&&300>Se()-au?!(Bl&2)&&Ou(e,0):$l|=n,tu===Ul&&(tu=0)),ud(e)}function ed(e,t){t===0&&(t=We()),e=$r(e,t),e!==null&&(Ke(e,t),ud(e))}function td(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),ed(e,n)}function nd(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),ed(e,n)}function rd(e,t){return ve(e,t)}var id=null,ad=null,od=!1,sd=!1,cd=!1,ld=0;function ud(e){e!==ad&&e.next===null&&(ad===null?id=ad=e:ad=ad.next=e),sd=!0,od||(od=!0,_d())}function dd(e,t){if(!cd&&sd){cd=!0;do for(var n=!1,r=id;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-Pe(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,gd(r,a))}else a=Ul,a=He(r,r===Vl?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Ue(r,a)||(n=!0,gd(r,a));r=r.next}while(n);cd=!1}}function fd(){pd()}function pd(){sd=od=!1;var e=0;ld!==0&&ef()&&(e=ld);for(var t=Se(),n=null,r=id;r!==null;){var i=r.next,a=md(r,t);a===0?(r.next=null,n===null?id=i:n.next=i,i===null&&(ad=n)):(n=r,(e!==0||a&3)&&(sd=!0)),r=i}uu!==0&&uu!==5||dd(e,!1),ld!==0&&(ld=0)}function md(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Pe(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=H(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Vl,n=Ul,n=He(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Wl===2||Wl===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&ye(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||Ue(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&ye(r),Qe(n)){case 2:case 8:n=Te;break;case 32:n=Ee;break;case 268435456:n=Oe;break;default:n=Ee}return r=hd.bind(null,e),n=ve(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&ye(r),e.callbackPriority=2,e.callbackNode=null,2}function hd(e,t){if(uu!==0&&uu!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Ju()&&e.callbackNode!==n)return null;var r=Ul;return r=He(e,e===Vl?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Su(e,r,t),md(e,Se()),e.callbackNode!=null&&e.callbackNode===n?hd.bind(null,e):null)}function gd(e,t){if(Ju())return null;Su(e,t,!0)}function _d(){af(function(){Bl&6?ve(we,fd):pd()})}function vd(){if(ld===0){var e=la;e===0&&(e=Re,Re<<=1,!(Re&261888)&&(Re=256)),ld=e}return ld}function yd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:Jt(``+e)}function bd(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 xd(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=yd((i[rt]||null).action),o=r.submitter;o&&(t=(t=o[rt]||null)?yd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new _n(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(ld!==0){var e=o?bd(i,o):new FormData(i);Ts(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?bd(i,o):new FormData(i),Ts(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var Sd=0;Sd<Wr.length;Sd++){var Cd=Wr[Sd];Gr(Cd.toLowerCase(),`on`+(Cd[0].toUpperCase()+Cd.slice(1)))}Gr(Ir,`onAnimationEnd`),Gr(Lr,`onAnimationIteration`),Gr(Rr,`onAnimationStart`),Gr(`dblclick`,`onDoubleClick`),Gr(`focusin`,`onFocus`),Gr(`focusout`,`onBlur`),Gr(zr,`onTransitionRun`),Gr(Br,`onTransitionStart`),Gr(Vr,`onTransitionCancel`),Gr(Hr,`onTransitionEnd`),yt(`onMouseEnter`,[`mouseout`,`mouseover`]),yt(`onMouseLeave`,[`mouseout`,`mouseover`]),yt(`onPointerEnter`,[`pointerout`,`pointerover`]),yt(`onPointerLeave`,[`pointerout`,`pointerover`]),vt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),vt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),vt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),vt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),vt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),vt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var wd=`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(` `),Td=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(wd));function Ed(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){Kr(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){Kr(e)}i.currentTarget=null,a=c}}}}function Dd(e,t){var n=t[at];n===void 0&&(n=t[at]=new Set);var r=e+`__bubble`;n.has(r)||(jd(t,e,2,!1),n.add(r))}function Od(e,t,n){var r=0;t&&(r|=4),jd(n,e,r,t)}var kd=`_reactListening`+Math.random().toString(36).slice(2);function Ad(e){if(!e[kd]){e[kd]=!0,gt.forEach(function(t){t!==`selectionchange`&&(Td.has(t)||Od(t,!1,e),Od(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[kd]||(t[kd]=!0,Od(`selectionchange`,!1,t))}}function jd(e,t,n,r){switch(Cp(t)){case 2:var i=_p;break;case 8:i=vp;break;default:i=yp}n=i.bind(null,t,n,e),i=void 0,!on||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 Md(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=dt(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}nn(function(){var r=a,i=Zt(n),s=[];a:{var c=Ur.get(e);if(c!==void 0){var l=_n,u=e;switch(e){case`keypress`:if(fn(n)===0)break a;case`keydown`:case`keyup`:l=Fn;break;case`focusin`:u=`focus`,l=En;break;case`focusout`:u=`blur`,l=En;break;case`beforeblur`:case`afterblur`:l=En;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=wn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=Tn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Ln;break;case Ir:case Lr:case Rr:l=Dn;break;case Hr:l=Rn;break;case`scroll`:case`scrollend`:l=yn;break;case`wheel`:l=zn;break;case`copy`:case`cut`:case`paste`:l=On;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=In;break;case`toggle`:case`beforetoggle`:l=Bn}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=rn(m,p),g!=null&&d.push(Nd(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!==Xt&&(u=n.relatedTarget||n.fromElement)&&(dt(u)||u[it]))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?dt(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=wn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=In,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:pt(l),h=u==null?c:pt(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,dt(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=Fd,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&&Id(s,c,l,d,!1),u!==null&&f!==null&&Id(s,f,u,d,!0)}}a:{if(c=r?pt(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=or;else if(er(c))if(sr)v=gr;else{v=mr;var y=pr}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&Gt(r.elementType)&&(v=or):v=hr;if(v&&=v(e,r)){tr(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Lt(c,`number`,c.value)}switch(y=r?pt(r):window,e){case`focusin`:(er(y)||y.contentEditable===`true`)&&(Er=y,Dr=r,Or=null);break;case`focusout`:Or=Dr=Er=null;break;case`mousedown`:kr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:kr=!1,Ar(s,n,i);break;case`selectionchange`:if(Tr)break;case`keydown`:case`keyup`:Ar(s,n,i)}var b;if(Hn)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 Xn?Jn(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(Gn&&n.locale!==`ko`&&(Xn||x!==`onCompositionStart`?x===`onCompositionEnd`&&Xn&&(b=dn()):(cn=i,ln=`value`in cn?cn.value:cn.textContent,Xn=!0)),y=Pd(r,x),0<y.length&&(x=new kn(x,e,null,n,i),s.push({event:x,listeners:y}),b?x.data=b:(b=Yn(n),b!==null&&(x.data=b)))),(b=Wn?Zn(e,n):Qn(e,n))&&(x=Pd(r,`onBeforeInput`),0<x.length&&(y=new kn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:y,listeners:x}),y.data=b)),xd(s,e,r,n,i)}Ed(s,t)})}function Nd(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Pd(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=rn(e,n),i!=null&&r.unshift(Nd(e,i,a)),i=rn(e,t),i!=null&&r.push(Nd(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Fd(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Id(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=rn(n,a),l!=null&&o.unshift(Nd(n,l,c))):i||(l=rn(n,a),l!=null&&o.push(Nd(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Ld=/\r\n?/g,Rd=/\u0000|\uFFFD/g;function zd(e){return(typeof e==`string`?e:``+e).replace(Ld,`
9
+ `).replace(Rd,``)}function Bd(e,t){return t=zd(t),zd(e)===t}function Vd(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Vt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Vt(e,``+r);break;case`className`:Tt(e,`class`,r);break;case`tabIndex`:Tt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Tt(e,n,r);break;case`style`:Wt(e,r,o);break;case`data`:if(t!==`object`){Tt(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=Jt(``+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`&&Vd(e,t,`name`,a.name,a,null),Vd(e,t,`formEncType`,a.formEncType,a,null),Vd(e,t,`formMethod`,a.formMethod,a,null),Vd(e,t,`formTarget`,a.formTarget,a,null)):(Vd(e,t,`encType`,a.encType,a,null),Vd(e,t,`method`,a.method,a,null),Vd(e,t,`target`,a.target,a,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Jt(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=Yt);break;case`onScroll`:r!=null&&Dd(`scroll`,e);break;case`onScrollEnd`:r!=null&&Dd(`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=Jt(``+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`:Dd(`beforetoggle`,e),Dd(`toggle`,e),wt(e,`popover`,r);break;case`xlinkActuate`:Et(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Et(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Et(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Et(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Et(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Et(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Et(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Et(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Et(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:wt(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=Kt.get(n)||n,wt(e,n,r))}}function Hd(e,t,n,r,a,o){switch(n){case`style`:Wt(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`?Vt(e,r):(typeof r==`number`||typeof r==`bigint`)&&Vt(e,``+r);break;case`onScroll`:r!=null&&Dd(`scroll`,e);break;case`onScrollEnd`:r!=null&&Dd(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=Yt);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!_t.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[rt]||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,``):wt(e,n,r)}}}function Ud(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Dd(`error`,e),Dd(`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:Vd(e,t,o,s,n,null)}}a&&Vd(e,t,`srcSet`,n.srcSet,n,null),r&&Vd(e,t,`src`,n.src,n,null);return;case`input`:Dd(`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:Vd(e,t,r,d,n,null)}}It(e,o,c,l,u,s,a,!1);return;case`select`:for(a in Dd(`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:Vd(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Rt(e,!!r,n,!0):Rt(e,!!r,t,!1);return;case`textarea`:for(s in Dd(`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:Vd(e,t,s,c,n,null)}Bt(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:Vd(e,t,l,r,n,null)}return;case`dialog`:Dd(`beforetoggle`,e),Dd(`toggle`,e),Dd(`cancel`,e),Dd(`close`,e);break;case`iframe`:case`object`:Dd(`load`,e);break;case`video`:case`audio`:for(r=0;r<wd.length;r++)Dd(wd[r],e);break;case`image`:Dd(`error`,e),Dd(`load`,e);break;case`details`:Dd(`toggle`,e);break;case`embed`:case`source`:case`link`:Dd(`error`,e),Dd(`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:Vd(e,t,u,r,n,null)}return;default:if(Gt(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Hd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Vd(e,t,c,r,n,null))}function Wd(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)||Vd(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&&Vd(e,t,p,m,r,f)}}Ft(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)||Vd(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&&Vd(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Rt(e,!!n,n?[]:``,!1):Rt(e,!!n,t,!0)):Rt(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:Vd(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&&Vd(e,t,s,a,r,o)}zt(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:Vd(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:Vd(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)&&Vd(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:Vd(e,t,u,p,r,m)}return;default:if(Gt(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Hd(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||Hd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Vd(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||Vd(e,t,f,p,r,m)}function Gd(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Kd(){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&&Gd(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&&Gd(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 qd=null,Jd=null;function Yd(e){return e.nodeType===9?e:e.ownerDocument}function Xd(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 $d=null;function ef(){var e=window.event;return e&&e.type===`popstate`?e===$d?!1:($d=e,!0):($d=null,!1)}var tf=typeof setTimeout==`function`?setTimeout:void 0,nf=typeof clearTimeout==`function`?clearTimeout:void 0,rf=typeof Promise==`function`?Promise:void 0,af=typeof queueMicrotask==`function`?queueMicrotask:rf===void 0?tf:function(e){return rf.resolve(null).then(e).catch(of)};function of(e){setTimeout(function(){throw e})}function sf(e){return e===`head`}function cf(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),Vp(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)Sf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,Sf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[lt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&Sf(e.ownerDocument.body);n=i}while(n);Vp(t)}function lf(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 uf(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`:uf(n),ut(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function df(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[lt])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=_f(e.nextSibling),e===null)break}return null}function ff(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=_f(e.nextSibling),e===null))return null;return e}function pf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=_f(e.nextSibling),e===null))return null;return e}function mf(e){return e.data===`$?`||e.data===`$~`}function hf(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function gf(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 _f(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 vf=null;function yf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return _f(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function bf(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 xf(e,t,n){switch(t=Yd(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 Sf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);ut(e)}var Cf=new Map,wf=new Set;function Tf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Ef=L.d;L.d={f:Df,r:Of,D:jf,C:Mf,L:Nf,m:Pf,X:If,S:Ff,M:Lf};function Df(){var e=Ef.f(),t=Eu();return e||t}function Of(e){var t=ft(e);t!==null&&t.tag===5&&t.type===`form`?Ds(t):Ef.r(e)}var kf=typeof document>`u`?null:document;function Af(e,t,n){var r=kf;if(r&&typeof t==`string`&&t){var i=Pt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),wf.has(i)||(wf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Ud(t,`link`,e),ht(t),r.head.appendChild(t)))}}function jf(e){Ef.D(e),Af(`dns-prefetch`,e,null)}function Mf(e,t){Ef.C(e,t),Af(`preconnect`,e,t)}function Nf(e,t,n){Ef.L(e,t,n);var r=kf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Pt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Pt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Pt(n.imageSizes)+`"]`)):i+=`[href="`+Pt(e)+`"]`;var a=i;switch(t){case`style`:a=zf(e);break;case`script`:a=Uf(e)}Cf.has(a)||(e=f({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),Cf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Bf(a))||t===`script`&&r.querySelector(Wf(a))||(t=r.createElement(`link`),Ud(t,`link`,e),ht(t),r.head.appendChild(t)))}}function Pf(e,t){Ef.m(e,t);var n=kf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Pt(r)+`"][href="`+Pt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Uf(e)}if(!Cf.has(a)&&(e=f({rel:`modulepreload`,href:e},t),Cf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Wf(a)))return}r=n.createElement(`link`),Ud(r,`link`,e),ht(r),n.head.appendChild(r)}}}function Ff(e,t,n){Ef.S(e,t,n);var r=kf;if(r&&e){var i=mt(r).hoistableStyles,a=zf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Bf(a)))s.loading=5;else{e=f({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=Cf.get(a))&&qf(e,n);var c=o=r.createElement(`link`);ht(c),Ud(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,Kf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function If(e,t){Ef.X(e,t);var n=kf;if(n&&e){var r=mt(n).hoistableScripts,i=Uf(e),a=r.get(i);a||(a=n.querySelector(Wf(i)),a||(e=f({src:e,async:!0},t),(t=Cf.get(i))&&Jf(e,t),a=n.createElement(`script`),ht(a),Ud(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Lf(e,t){Ef.M(e,t);var n=kf;if(n&&e){var r=mt(n).hoistableScripts,i=Uf(e),a=r.get(i);a||(a=n.querySelector(Wf(i)),a||(e=f({src:e,async:!0,type:`module`},t),(t=Cf.get(i))&&Jf(e,t),a=n.createElement(`script`),ht(a),Ud(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Rf(e,t,n,r){var a=(a=ae.current)?Tf(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=zf(n.href),n=mt(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=zf(n.href);var o=mt(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(Bf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),Cf.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},Cf.set(e,n),o||Hf(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=Uf(n),n=mt(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 zf(e){return`href="`+Pt(e)+`"`}function Bf(e){return`link[rel="stylesheet"][`+e+`]`}function Vf(e){return f({},e,{"data-precedence":e.precedence,precedence:null})}function Hf(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}),Ud(t,`link`,n),ht(t),e.head.appendChild(t))}function Uf(e){return`[src="`+Pt(e)+`"]`}function Wf(e){return`script[async]`+e}function Gf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Pt(n.href)+`"]`);if(r)return t.instance=r,ht(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`),ht(r),Ud(r,`style`,a),Kf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=zf(n.href);var o=e.querySelector(Bf(a));if(o)return t.state.loading|=4,t.instance=o,ht(o),o;r=Vf(n),(a=Cf.get(a))&&qf(r,a),o=(e.ownerDocument||e).createElement(`link`),ht(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Ud(o,`link`,r),t.state.loading|=4,Kf(o,n.precedence,e),t.instance=o;case`script`:return o=Uf(n.src),(a=e.querySelector(Wf(o)))?(t.instance=a,ht(a),a):(r=n,(a=Cf.get(o))&&(r=f({},n),Jf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),ht(a),Ud(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,Kf(r,n.precedence,e));return t.instance}function Kf(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 qf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Jf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Yf=null;function Xf(e,t,n){if(Yf===null){var r=new Map,i=Yf=new Map;i.set(n,r)}else i=Yf,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[lt]||a[nt]||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 Zf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Qf(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 $f(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function ep(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=zf(r.href),a=t.querySelector(Bf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=rp.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,ht(a);return}a=t.ownerDocument||t,r=Vf(r),(i=Cf.get(i))&&qf(r,i),a=a.createElement(`link`),ht(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Ud(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=rp.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var tp=0;function np(e,t){return e.stylesheets&&e.count===0&&ap(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&ap(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&tp===0&&(tp=62500*Kd());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ap(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>tp?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function rp(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ap(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ip=null;function ap(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ip=new Map,t.forEach(op,e),ip=null,rp.call(e))}function op(e,t){if(!(t.state.loading&4)){var n=ip.get(e);if(n)var r=n.get(null);else{n=new Map,ip.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=rp.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 sp={$$typeof:C,Provider:null,Consumer:null,_currentValue:ee,_currentValue2:ee,_threadCount:0};function cp(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=Ge(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ge(0),this.hiddenUpdates=Ge(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 lp(e,t,n,r,i,a,o,s,c,l,u,d){return e=new cp(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=ii(3,null,null,t),e.current=a,a.stateNode=e,t=aa(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Ra(a),e}function up(e){return e?(e=ni,e):ni}function dp(e,t,n,r,i,a){i=up(i),r.context===null?r.context=i:r.pendingContext=i,r=Ba(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Va(e,r,t),n!==null&&(xu(n,e,t),Ha(n,e,t))}function fp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function pp(e,t){fp(e,t),(e=e.alternate)&&fp(e,t)}function mp(e){if(e.tag===13||e.tag===31){var t=$r(e,67108864);t!==null&&xu(t,e,67108864),pp(e,67108864)}}function hp(e){if(e.tag===13||e.tag===31){var t=yu();t=Ze(t);var n=$r(e,t);n!==null&&xu(n,e,t),pp(e,t)}}var gp=!0;function _p(e,t,n,r){var i=I.T;I.T=null;var a=L.p;try{L.p=2,yp(e,t,n,r)}finally{L.p=a,I.T=i}}function vp(e,t,n,r){var i=I.T;I.T=null;var a=L.p;try{L.p=8,yp(e,t,n,r)}finally{L.p=a,I.T=i}}function yp(e,t,n,r){if(gp){var i=bp(r);if(i===null)Md(e,t,r,xp,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=ft(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Ve(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Pe(o);s.entanglements[1]|=c,o&=~c}ud(a),!(Bl&6)&&(su=Se()+500,dd(0,!1))}}break;case 31:case 13:s=$r(a,2),s!==null&&xu(s,a,2),Eu(),pp(a,2)}if(a=bp(r),a===null&&Md(e,t,r,xp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Md(e,t,r,null,n)}}function bp(e){return e=Zt(e),Sp(e)}var xp=null;function Sp(e){if(xp=null,e=dt(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 xp=e,null}function Cp(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(Ce()){case we:return 2;case Te:return 8;case Ee:case De:return 32;case Oe:return 268435456;default:return 32}default:return 32}}var wp=!1,Tp=null,Ep=null,Dp=null,Op=new Map,kp=new Map,G=[],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`:Tp=null;break;case`dragenter`:case`dragleave`:Ep=null;break;case`mouseover`:case`mouseout`:Dp=null;break;case`pointerover`:case`pointerout`:Op.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:kp.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=ft(t),t!==null&&mp(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 Tp=Mp(Tp,e,t,n,r,i),!0;case`dragenter`:return Ep=Mp(Ep,e,t,n,r,i),!0;case`mouseover`:return Dp=Mp(Dp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Op.set(a,Mp(Op.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,kp.set(a,Mp(kp.get(a)||null,e,t,n,r,i)),!0}return!1}function Pp(e){var t=dt(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,et(e.priority,function(){hp(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,et(e.priority,function(){hp(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=bp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Xt=r,n.target.dispatchEvent(r),Xt=null}else return t=ft(n),t!==null&&mp(t),e.blockedOn=n,!1;t.shift()}return!0}function Ip(e,t,n){Fp(e)&&n.delete(t)}function Lp(){wp=!1,Tp!==null&&Fp(Tp)&&(Tp=null),Ep!==null&&Fp(Ep)&&(Ep=null),Dp!==null&&Fp(Dp)&&(Dp=null),Op.forEach(Ip),kp.forEach(Ip)}function Rp(e,n){e.blockedOn===n&&(e.blockedOn=null,wp||(wp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Lp)))}var zp=null;function Bp(e){zp!==e&&(zp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){zp===e&&(zp=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(Sp(r||n)===null)continue;break}var a=ft(n);a!==null&&(e.splice(t,3),t-=3,Ts(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Vp(e){function t(t){return Rp(t,e)}Tp!==null&&Rp(Tp,e),Ep!==null&&Rp(Ep,e),Dp!==null&&Rp(Dp,e),Op.forEach(t),kp.forEach(t);for(var n=0;n<G.length;n++){var r=G[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<G.length&&(n=G[0],n.blockedOn===null);)Pp(n),n.blockedOn===null&&G.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[rt]||null;if(typeof a==`function`)o||Bp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[rt]||null)s=o.formAction;else if(Sp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Bp(n)}}}function Hp(){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 Up(e){this._internalRoot=e}Wp.prototype.render=Up.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;dp(n,yu(),e,t,null,null)},Wp.prototype.unmount=Up.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;dp(e.current,2,null,e,null,null),Eu(),t[it]=null}};function Wp(e){this._internalRoot=e}Wp.prototype.unstable_scheduleHydration=function(e){if(e){var t=$e();e={blockedOn:null,target:e,priority:t};for(var n=0;n<G.length&&t!==0&&t<G[n].priority;n++);G.splice(n,0,e),n===0&&Pp(e)}};var Gp=n.version;if(Gp!==`19.2.7`)throw Error(i(527,Gp,`19.2.7`));L.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 Kp={bundleType:0,version:`19.2.7`,rendererPackageName:`react-dom`,currentDispatcherRef:I,reconcilerVersion:`19.2.7`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var qp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!qp.isDisabled&&qp.supportsFiber)try{je=qp.inject(Kp),Me=qp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=qs,s=Js,c=Ys;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=lp(e,1,!1,null,null,n,r,null,o,s,c,Hp),e[it]=t.current,Ad(e),new Up(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(),1),x=y(),S=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},C=new class extends S{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},w={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},T=new class{#e=w;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function E(e){setTimeout(e,0)}var D=typeof window>`u`||`Deno`in globalThis;function O(){}function k(e,t){return typeof e==`function`?e(t):e}function A(e){return typeof e==`number`&&e>=0&&e!==1/0}function j(e,t){return Math.max(e+(t||0)-Date.now(),0)}function M(e,t){return typeof e==`function`?e(t):e}function N(e,t){return typeof e==`function`?e(t):e}function P(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==I(o,t.options))return!1}else if(!ee(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function F(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(L(t.options.mutationKey)!==L(a))return!1}else if(!ee(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function I(e,t){return(t?.queryKeyHashFn||L)(e)}function L(e){return JSON.stringify(e,(e,t)=>B(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function ee(e,t){return e===t?!0:typeof e==typeof t&&e&&t&&typeof e==`object`&&typeof t==`object`?Object.keys(t).every(n=>ee(e[n],t[n])):!1}var te=Object.prototype.hasOwnProperty;function ne(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=z(e)&&z(t);if(!r&&!(B(e)&&B(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:te.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=ne(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function R(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function z(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function B(e){if(!re(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!re(n)||!n.hasOwnProperty(`isPrototypeOf`)||Object.getPrototypeOf(e)!==Object.prototype)}function re(e){return Object.prototype.toString.call(e)===`[object Object]`}function ie(e){return new Promise(t=>{T.setTimeout(t,e)})}function ae(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:ne(e,t)}function oe(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function se(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var ce=Symbol();function le(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===ce?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function ue(e,t){return typeof e==`function`?e(...t):!!e}function de(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),r?i:(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0}),i))}),e}var fe=(()=>{let e=()=>D;return{isServer(){return e()},setIsServer(t){e=t}}})();function pe(){let e,t,n=new Promise((n,r)=>{e=n,t=r});n.status=`pending`,n.catch(()=>{});function r(e){Object.assign(n,e),delete n.resolve,delete n.reject}return n.resolve=t=>{r({status:`fulfilled`,value:t}),e(t)},n.reject=e=>{r({status:`rejected`,reason:e}),t(e)},n}var me=E;function V(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=me,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var he=V(),ge=new class extends S{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function _e(e){return Math.min(1e3*2**e,3e4)}function ve(e){return(e??`online`)!==`online`||ge.isOnline()}var ye=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function be(e){let t=!1,n=0,r,i=pe(),a=()=>i.status!==`pending`,o=t=>{if(!a()){let n=new ye(t);f(n),e.onCancel?.(n)}},s=()=>{t=!0},c=()=>{t=!1},l=()=>C.isFocused()&&(e.networkMode===`always`||ge.isOnline())&&e.canRun(),u=()=>ve(e.networkMode)&&e.canRun(),d=e=>{a()||(r?.(),i.resolve(e))},f=e=>{a()||(r?.(),i.reject(e))},p=()=>new Promise(t=>{r=e=>{(a()||l())&&t(e)},e.onPause?.()}).then(()=>{r=void 0,a()||e.onContinue?.()}),m=()=>{if(a())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(d).catch(r=>{if(a())return;let i=e.retry??(fe.isServer()?0:3),o=e.retryDelay??_e,s=typeof o==`function`?o(n,r):o,c=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);if(t||!c){f(r);return}n++,e.onFail?.(n,r),ie(s).then(()=>l()?void 0:p()).then(()=>{t?f(r):m()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(r?.(),i),cancelRetry:s,continueRetry:c,canStart:u,start:()=>(u()?m():p().then(m),i)}}var xe=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),A(this.gcTime)&&(this.#e=T.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(fe.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&(T.clearTimeout(this.#e),this.#e=void 0)}};function Se(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=e=>{de(e,()=>t.signal,()=>n=!0)},u=le(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject(t.signal.reason);if(r==null&&e.pages.length)return Promise.resolve(e);let a=(()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})(),o=await u(a),{maxPages:s}=t.options,c=i?se:oe;return{pages:c(e.pages,o,s),pageParams:c(e.pageParams,r,s)}};if(i&&a.length){let e=i===`backward`,t=e?we:Ce,n={pages:a,pageParams:o};s=await d(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]??r.initialPageParam:Ce(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(c<t)}return s};t.options.persister?t.fetchFn=()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=l}}}function Ce(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function we(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var Te=class extends xe{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e){super(),this.#s=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=Oe(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#o,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=Oe(this.options);e.data!==void 0&&(this.setState(De(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=ae(this.state.data,e,this.options);return this.#l({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#l({type:`setState`,state:e})}cancel(e){let t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(O).catch(O):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>N(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===ce||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>M(e.options.staleTime,this)===`static`)}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!j(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#a&&(this.#s||this.#c()?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#r.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}#c(){return this.state.fetchStatus===`paused`&&this.state.status===`pending`}invalidate(){this.state.isInvalidated||this.#l({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#a?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#s=!0,n.signal)})},i=()=>{let e=le(this.options,t),n=(()=>{let e={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#s=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return r(e),e})();(this.#e===`infinite`?Se(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#l({type:`fetch`,meta:a.fetchOptions?.meta}),this.#a=be({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof ye&&e.revert&&this.setState({...this.#n,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#l({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#l({type:`pause`})},onContinue:()=>{this.#l({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await this.#a.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#r.config.onSuccess?.(e,this),this.#r.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof ye){if(e.silent)return this.#a.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#l({type:`error`,error:e}),this.#r.config.onError?.(e,this),this.#r.config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}#l(e){let t=t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...Ee(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...De(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}};this.state=t(this.state),he.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function Ee(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:ve(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function De(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function Oe(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var ke=class extends S{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#o=pe(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),je(this.#t,this.options)?this.#h():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Me(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Me(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof N(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!R(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&Ne(this.#t,n,this.options,t)&&this.#h(),this.updateResult(),r&&(this.#t!==n||N(this.options.enabled,this.#t)!==N(t.enabled,this.#t)||M(this.options.staleTime,this.#t)!==M(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||N(this.options.enabled,this.#t)!==N(t.enabled,this.#t)||i!==this.#p)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return Fe(this,n)&&(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),n===`promise`&&(this.trackProp(`data`),!this.options.experimental_prefetchInRender&&this.#o.status===`pending`&&this.#o.reject(Error(`experimental_prefetchInRender feature flag is not enabled`))),Reflect.get(e,n))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#h({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#h(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(O)),t}#g(){this.#b();let e=M(this.options.staleTime,this.#t);if(fe.isServer()||this.#r.isStale||!A(e))return;let t=j(this.#r.dataUpdatedAt,e)+1;this.#d=T.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return(typeof this.options.refetchInterval==`function`?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#x(),this.#p=e,!(fe.isServer()||N(this.options.enabled,this.#t)===!1||!A(this.#p)||this.#p===0)&&(this.#f=T.setInterval(()=>{(this.options.refetchIntervalInBackground||C.isFocused())&&this.#h()},this.#p))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#d!==void 0&&(T.clearTimeout(this.#d),this.#d=void 0)}#x(){this.#f!==void 0&&(T.clearInterval(this.#f),this.#f=void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,s=e===n?this.#n:e.state,{state:c}=e,l={...c},u=!1,d;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&je(e,t),o=i&&Ne(e,n,t,r);(a||o)&&(l={...l,...Ee(c.data,e.options)}),t._optimisticResults===`isRestoring`&&(l.fetchStatus=`idle`)}let{error:f,errorUpdatedAt:p,status:m}=l;d=l.data;let h=!1;if(t.placeholderData!==void 0&&d===void 0&&m===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,h=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#u?.state.data,this.#u):t.placeholderData,e!==void 0&&(m=`success`,d=ae(i?.data,e,t),u=!0)}if(t.select&&d!==void 0&&!h)if(i&&d===a?.data&&t.select===this.#c)d=this.#l;else try{this.#c=t.select,d=t.select(d),d=ae(i?.data,d,t),this.#l=d,this.#s=null}catch(e){this.#s=e}this.#s&&(f=this.#s,d=this.#l,p=Date.now(),m=`error`);let g=l.fetchStatus===`fetching`,_=m===`pending`,v=m===`error`,y=_&&g,b=d!==void 0,x={status:m,fetchStatus:l.fetchStatus,isPending:_,isSuccess:m===`success`,isError:v,isInitialLoading:y,isLoading:y,data:d,dataUpdatedAt:l.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:l.dataUpdateCount>s.dataUpdateCount||l.errorUpdateCount>s.errorUpdateCount,isFetching:g,isRefetching:g&&!_,isLoadingError:v&&!b,isPaused:l.fetchStatus===`paused`,isPlaceholderData:u,isRefetchError:v&&b,isStale:Pe(e,t),refetch:this.refetch,promise:this.#o,isEnabled:N(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){let t=x.data!==void 0,r=x.status===`error`&&!t,i=e=>{r?e.reject(x.error):t&&e.resolve(x.data)},a=()=>{let e=this.#o=x.promise=pe();i(e)},o=this.#o;switch(o.status){case`pending`:e.queryHash===n.queryHash&&i(o);break;case`fulfilled`:(r||x.data!==o.value)&&a();break;case`rejected`:(!r||x.error!==o.reason)&&a();break}}return x}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#u=this.#t),!R(t,e)&&(this.#r=t,this.#C({listeners:(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#m.size)return!0;let r=new Set(n??this.#m);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})()}))}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#C(e){he.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}};function Ae(e,t){return N(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status===`error`&&N(t.retryOnMount,e)===!1)}function je(e,t){return Ae(e,t)||e.state.data!==void 0&&Me(e,t,t.refetchOnMount)}function Me(e,t,n){if(N(t.enabled,e)!==!1&&M(t.staleTime,e)!==`static`){let r=typeof n==`function`?n(e):n;return r===`always`||r!==!1&&Pe(e,t)}return!1}function Ne(e,t,n,r){return(e!==t||N(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&Pe(e,n)}function Pe(e,t){return N(t.enabled,e)!==!1&&e.isStaleByTime(M(t.staleTime,e))}function Fe(e,t){return!R(e.getCurrentResult(),t)}var Ie=class extends xe{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||Le(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=be({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});let r=this.state.status===`pending`,i=!this.#r.canStart();try{if(r)t();else{this.#i({type:`pending`,variables:e,isPaused:i}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:i})}let a=await this.#r.start();return await this.#n.config.onSuccess?.(a,e,this.state.context,this,n),await this.options.onSuccess?.(a,e,this.state.context,n),await this.#n.config.onSettled?.(a,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(a,null,e,this.state.context,n),this.#i({type:`success`,data:a}),a}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#n.runNext(this)}}#i(e){let t=t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}};this.state=t(this.state),he.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function Le(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var Re=class extends S{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){let r=new Ie({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=ze(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=ze(e);if(typeof t==`string`){let n=this.#t.get(t);if(n)if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=ze(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}else return!0}runNext(e){let t=ze(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){he.batch(()=>{this.#e.forEach(e=>{this.notify({type:`removed`,mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>F(t,e))}findAll(e={}){return this.getAll().filter(t=>F(e,t))}notify(e){he.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return he.batch(()=>Promise.all(e.map(e=>e.continue().catch(O))))}};function ze(e){return e.options.scope?.id}var Be=class extends S{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),R(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&L(t.mutationKey)!==L(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??Le();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){he.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,n=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{this.#r.onSuccess?.(e.data,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(e.data,null,t,n,r)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{this.#r.onError?.(e.error,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(void 0,e.error,t,n,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},Ve=class extends S{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){let r=t.queryKey,i=t.queryHash??I(r,t),a=this.get(i);return a||(a=new Te({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){he.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>P(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>P(e,t)):t}notify(e){he.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){he.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){he.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},He=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new Ve,this.#t=e.mutationCache||new Re,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=C.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=ge.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(M(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=k(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return he.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;he.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return he.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,...e},t)))}cancelQueries(e,t={}){let n={revert:!0,...t},r=he.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(O).catch(O)}invalidateQueries(e,t={}){return he.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=he.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(O)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(O)}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(M(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(O).catch(O)}fetchInfiniteQuery(e){return e._type=`infinite`,this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(O).catch(O)}ensureInfiniteQueryData(e){return e._type=`infinite`,this.ensureQueryData(e)}resumePausedMutations(){return ge.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(L(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{ee(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(L(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{ee(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=I(t.queryKey,t),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!==`always`),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode=`offlineFirst`),t.queryFn===ce&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},Ue=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})),H=s(((e,t)=>{t.exports=Ue()}))(),We=b.createContext(void 0),Ge=e=>{let t=b.useContext(We);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},Ke=({client:e,children:t})=>(b.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,H.jsx)(We.Provider,{value:e,children:t})),qe=b.createContext(!1),Je=()=>b.useContext(qe);qe.Provider;function Ye(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Xe=b.createContext(Ye()),Ze=()=>b.useContext(Xe),Qe=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?ue(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},$e=e=>{b.useEffect(()=>{e.clearReset()},[e])},et=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||ue(n,[e.error,r])),tt=(e,t)=>t.state.data===void 0,nt=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},rt=(e,t)=>e.isLoading&&e.isFetching&&!t,it=(e,t)=>e?.suspense&&t.isPending,at=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function ot(e,t,n){let r=Je(),i=Ze(),a=Ge(n),o=a.defaultQueryOptions(e);a.getDefaultOptions().queries?._experimental_beforeQuery?.(o);let s=a.getQueryCache().get(o.queryHash),c=e.subscribed!==!1;o._optimisticResults=r?`isRestoring`:c?`optimistic`:void 0,nt(o),Qe(o,i,s),$e(i);let l=!a.getQueryCache().get(o.queryHash),[u]=b.useState(()=>new t(a,o)),d=u.getOptimisticResult(o),f=!r&&c;if(b.useSyncExternalStore(b.useCallback(e=>{let t=f?u.subscribe(he.batchCalls(e)):O;return u.updateResult(),t},[u,f]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),b.useEffect(()=>{u.setOptions(o)},[o,u]),it(o,d))throw at(o,u,i);if(et({result:d,errorResetBoundary:i,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw d.error;return a.getDefaultOptions().queries?._experimental_afterQuery?.(o,d),o.experimental_prefetchInRender&&!fe.isServer()&&rt(d,r)&&(l?at(o,u,i):s?.promise)?.catch(O).finally(()=>{u.updateResult()}),o.notifyOnChangeProps?d:u.trackResult(d)}function st(e,t){return ot({...e,enabled:!0,suspense:!0,throwOnError:tt,placeholderData:void 0},ke,t)}function ct(e,t){let n=Ge(t),[r]=b.useState(()=>new Be(n,e));b.useEffect(()=>{r.setOptions(e)},[r,e]);let i=b.useSyncExternalStore(b.useCallback(e=>r.subscribe(he.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=b.useCallback((e,t)=>{r.mutate(e,t).catch(O)},[r]);if(i.error&&ue(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}var lt=null;function ut(e,...t){lt?.(e,t)}function dt(e,...t){lt?.(e,t,!0)}var ft={303:`Multiple adapter contexts detected. This might happen in monorepos.`,404:`nuqs requires an adapter to work with your framework.`,409:"Multiple versions of the library are loaded. This may lead to unexpected behavior. Currently using `%s`, but `%s` (via the %s adapter) was about to load on top.",414:`Max safe URL length exceeded. Some browsers may not be able to accept this URL. Consider limiting the amount of state stored in the URL.`,429:"URL update rate-limited by the browser. Consider increasing `throttleMs` for key(s) `%s`. %O",500:`Empty search params cache. Search params can't be accessed in Layouts.`,501:"Search params cache already populated. Have you called `parse` twice?"};function pt(e){return`[nuqs] ${ft[e]}
10
+ See https://nuqs.dev/NUQS-${e}`}function mt(e){if(e.size===0)return``;let t=[];for(let[n,r]of e.entries()){let e=n.replace(/#/g,`%23`).replace(/&/g,`%26`).replace(/\+/g,`%2B`).replace(/=/g,`%3D`).replace(/\?/g,`%3F`);t.push(`${e}=${ht(r)}`)}return`?`+t.join(`&`)}function ht(e){return e.replace(/%/g,`%25`).replace(/\+/g,`%2B`).replace(/ /g,`+`).replace(/#/g,`%23`).replace(/&/g,`%26`).replace(/"/g,`%22`).replace(/'/g,`%27`).replace(/`/g,`%60`).replace(/</g,`%3C`).replace(/>/g,`%3E`).replace(/[\x00-\x1F]/g,e=>encodeURIComponent(e))}var gt=`2.9.1`,_t={};function vt(e,t){let n=Symbol.for(`nuqs.${gt}.${e}`),r=globalThis;if(r[n]!=null)return r[n];let i=Object.isExtensible(r)?r:_t;return i[n]??=t()}function yt(e,t,n){let r=vt(e,()=>new WeakMap);return r.has(t)||r.set(t,n()),r.get(t)}var bt=yt(`adapter-context`,b.createContext,()=>{let e=(0,b.createContext)({useAdapter(){throw Error(pt(404))}});return e.displayName=`NuqsAdapterContext`,e});typeof window<`u`&&(window.__NuqsAdapterContext&&window.__NuqsAdapterContext!==bt&&console.error(pt(303)),window.__NuqsAdapterContext=bt);function xt(e){return({children:t,defaultOptions:n,processUrlSearchParams:r,...i})=>(0,b.createElement)(bt.Provider,{...i,value:{useAdapter:e,defaultOptions:n,processUrlSearchParams:r}},t)}function St(e){let t=(0,b.useContext)(bt);if(!(`useAdapter`in t))throw Error(pt(404));return t.useAdapter(e)}var Ct=()=>(0,b.useContext)(bt).defaultOptions,wt=()=>(0,b.useContext)(bt).processUrlSearchParams;function Tt(e,t){return e===t?!0:e===null||t===null||typeof e==`string`||typeof t==`string`||e.length!==t.length?!1:e.every((e,n)=>e===t[n])}function Et(e,t,n){if(t.length===0)return e;let r=n?new URLSearchParams(e):e;for(let n of Array.from(e.keys()))t.includes(n)||r.delete(n);return r}function Dt(){if(typeof window>`u`||!window.GestureEvent)return 50;try{let e=navigator.userAgent?.match(/version\/([\d\.]+) safari/i);return parseFloat(e[1])>=17?120:320}catch{return 320}}function Ot(e){return{method:`throttle`,timeMs:e}}var kt=Ot(Dt());function At(e){return e===null||Array.isArray(e)&&e.length===0}function jt(e,t,n){if(typeof n==`string`)e.set(t,n);else{e.delete(t);for(let r of n)e.append(t,r);e.has(t)||e.set(t,``)}return e}function Mt(){let e=new Map;return{on(t,n){let r=e.get(t)||[];return r.push(n),e.set(t,r),()=>this.off(t,n)},off(t,n){let r=e.get(t);r&&e.set(t,r.filter(e=>e!==n))},emit(t,n){e.get(t)?.forEach(e=>e(n))}}}function Nt(e,t,n){function r(){e(),n.removeEventListener(`abort`,a)}let i=setTimeout(r,t);function a(){clearTimeout(i),n.removeEventListener(`abort`,a)}n.addEventListener(`abort`,a)}function Pt(){let e=Promise;if(Promise.hasOwnProperty(`withResolvers`))return Promise.withResolvers();let t=()=>{},n=()=>{};return{promise:new e((e,r)=>{t=e,n=r}),resolve:t,reject:n}}function Ft(e,t){let n=t;for(let t=e.length-1;t>=0;t--){let r=e[t];if(!r)continue;let i=n;n=()=>r(i)}n()}function It(){return new URLSearchParams(location.search)}var Lt=class{updateMap=new Map;options={history:`replace`,scroll:!1,shallow:!0};timeMs=kt.timeMs;transitions=new Set;resolvers=null;controller=null;lastFlushedAt=0;resetQueueOnNextPush=!1;push({key:e,query:t,options:n},r=kt.timeMs){this.resetQueueOnNextPush&&=(this.reset(),!1),ut(7,e,t,n),this.updateMap.set(e,t),n.history===`push`&&(this.options.history=`push`),n.scroll&&(this.options.scroll=!0),n.shallow===!1&&(this.options.shallow=!1),n.startTransition&&this.transitions.add(n.startTransition),(!Number.isFinite(this.timeMs)||r>this.timeMs)&&(this.timeMs=r)}getQueuedQuery(e){return this.updateMap.get(e)}getPendingPromise({getSearchParamsSnapshot:e=It}){return this.resolvers?.promise??Promise.resolve(e())}flush({getSearchParamsSnapshot:e=It,rateLimitFactor:t=1,...n},r){if(this.controller??=new AbortController,!Number.isFinite(this.timeMs))return ut(8),Promise.resolve(e());if(this.resolvers)return this.resolvers.promise;this.resolvers=Pt();let i=()=>{this.lastFlushedAt=performance.now();let[t,i]=this.applyPendingUpdates({...n,autoResetQueueOnUpdate:n.autoResetQueueOnUpdate??!0,getSearchParamsSnapshot:e},r);i===null?(this.resolvers.resolve(t),this.resetQueueOnNextPush=!0):this.resolvers.reject(t),this.resolvers=null};return Nt(()=>{let e=performance.now()-this.lastFlushedAt,n=this.timeMs,r=t*Math.max(0,n-e);ut(9,r,n,t),r===0?i():Nt(i,r,this.controller.signal)},0,this.controller.signal),this.resolvers.promise}abort(){return this.controller?.abort(),this.controller=new AbortController,this.resolvers?.resolve(new URLSearchParams),this.resolvers=null,this.reset()}reset(){let e=Array.from(this.updateMap.keys());return ut(10,JSON.stringify(Object.fromEntries(this.updateMap))),this.updateMap.clear(),this.transitions.clear(),this.options={history:`replace`,scroll:!1,shallow:!0},this.timeMs=kt.timeMs,e}applyPendingUpdates(e,t){let{updateUrl:n,getSearchParamsSnapshot:r}=e,i=r();if(ut(11,this.updateMap.size,i.toString()),this.updateMap.size===0)return[i,null];let a=Array.from(this.updateMap.entries()),o={...this.options},s=Array.from(this.transitions);e.autoResetQueueOnUpdate&&this.reset(),ut(12,a,o);for(let[e,t]of a)t===null?i.delete(e):i=jt(i,e,t);t&&(i=t(i));try{return Ft(s,()=>n(i,o)),[i,null]}catch(e){return console.error(pt(429),a.map(([e])=>e).join(),e),[i,e]}}},Rt=vt(`throttle-queue`,()=>new Lt);function zt(e,t,n){let r=(0,b.useCallback)(()=>{let t=Object.fromEntries(e.map(e=>[e,n(e)]));return[JSON.stringify(t),t]},[e.join(`,`),n]),i=(0,b.useRef)(null);return i.current===null&&(i.current=r()),(0,b.useSyncExternalStore)((0,b.useCallback)(n=>{let r=e.map(e=>t(e,n));return()=>r.forEach(e=>e())},[e.join(`,`),t]),()=>{let[e,t]=r();return i.current[0]===e?i.current[1]:(i.current=[e,t],t)},()=>i.current[1])}var Bt=class{callback;resolvers=Pt();controller=new AbortController;queuedValue=void 0;constructor(e){this.callback=e}abort(){this.controller.abort(),this.queuedValue=void 0}push(e,t){return this.queuedValue=e,this.controller.abort(),this.controller=new AbortController,Nt(()=>{let t=this.resolvers;try{ut(13,e);let n=this.callback(e);ut(14,this.queuedValue),this.queuedValue=void 0,this.resolvers=Pt(),n.then(e=>t.resolve(e)).catch(e=>t.reject(e))}catch(e){this.queuedValue=void 0,t.reject(e)}},t,this.controller.signal),this.resolvers.promise}},Vt=class{throttleQueue;queues=new Map;queuedQuerySync=Mt();constructor(e=new Lt){this.throttleQueue=e}push(e,t,n,r){if(!Number.isFinite(t)){let e=n.getSearchParamsSnapshot??It;return Promise.resolve(e())}let i=e.key;if(!this.queues.has(i)){ut(15,i);let e=new Bt(e=>(this.throttleQueue.push(e),this.throttleQueue.flush(n,r).finally(()=>{this.queues.get(e.key)?.queuedValue===void 0&&(ut(16,e.key),this.queues.delete(e.key)),this.queuedQuerySync.emit(e.key)})));this.queues.set(i,e)}ut(17,e);let a=this.queues.get(i).push(e,t);return this.queuedQuerySync.emit(i),a}abort(e){let t=this.queues.get(e);return t?(ut(18,e,t.queuedValue?.query),this.queues.delete(e),t.abort(),this.queuedQuerySync.emit(e),e=>(e.then(t.resolvers.resolve,t.resolvers.reject),e)):e=>e}abortAll(){for(let[e,t]of this.queues.entries())ut(18,e,t.queuedValue?.query),t.abort(),t.resolvers.resolve(new URLSearchParams),this.queuedQuerySync.emit(e);this.queues.clear()}getQueuedQuery(e){let t=this.queues.get(e)?.queuedValue?.query;return t===void 0?this.throttleQueue.getQueuedQuery(e):t}},Ht=vt(`debounce-controller`,()=>new Vt(Rt));function Ut(e){return zt(e,(e,t)=>Ht.queuedQuerySync.on(e,t),e=>Ht.getQueuedQuery(e))}function Wt(e){return vt(`history-emitter.${e}`,()=>Mt())}var Gt=`__nuqs__`,Kt=Wt(`react`);function qt(e){return function(t,n){let r=new URL(location.href);r.search=mt(t),ut(20,`react`,r),e&&n.shallow===!1?(n.history===`push`?location.assign:location.replace).call(location,r):(n.history===`push`?history.pushState:history.replaceState).call(history,history.state,Gt,r),Kt.emit(`update`,t),n.scroll===!0&&window.scrollTo({top:0})}}var Jt=(0,b.createContext)({fullPageNavigationOnShallowFalseUpdates:!1}),Yt=new URLSearchParams;function Xt(){return Yt}function Zt(e){return Kt.on(`update`,e),window.addEventListener(`popstate`,e),()=>{Kt.off(`update`,e),window.removeEventListener(`popstate`,e)}}function Qt(e){let{fullPageNavigationOnShallowFalseUpdates:t}=(0,b.useContext)(Jt),n=(0,b.useRef)(null);return{searchParams:(0,b.useSyncExternalStore)(Zt,()=>{let t=Et(new URLSearchParams(location.search),e,!1),r=t.toString();return n.current?.key===r?n.current.search:(n.current={key:r,search:t},t)},Xt),updateUrl:(0,b.useMemo)(()=>qt(t),[t])}}var $t=xt(Qt);function en({children:e,fullPageNavigationOnShallowFalseUpdates:t=!1,...n}){return(0,b.createElement)(Jt.Provider,{value:{fullPageNavigationOnShallowFalseUpdates:t}},(0,b.createElement)($t,{...n,children:e}))}function tn(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=tn(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function nn(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=tn(e))&&(r&&(r+=` `),r+=t);return r}var rn=(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},an=(e,t)=>({classGroupId:e,validator:t}),on=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),sn=`-`,cn=[],ln=`arbitrary..`,un=e=>{let t=pn(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return fn(e);let n=e.split(sn);return dn(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?rn(i,t):t:i||cn}return n[e]||cn}}},dn=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=dn(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(sn):e.slice(t).join(sn),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},fn=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?ln+r:void 0})(),pn=e=>{let{theme:t,classGroups:n}=e;return mn(n,t)},mn=(e,t)=>{let n=on();for(let r in e){let i=e[r];hn(i,n,r,t)}return n},hn=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];gn(i,t,n,r)}},gn=(e,t,n,r)=>{if(typeof e==`string`){_n(e,t,n);return}if(typeof e==`function`){vn(e,t,n,r);return}yn(e,t,n,r)},_n=(e,t,n)=>{let r=e===``?t:bn(t,e);r.classGroupId=n},vn=(e,t,n,r)=>{if(xn(e)){hn(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(an(n,e))},yn=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];hn(o,bn(t,a),n,r)}},bn=(e,t)=>{let n=e,r=t.split(sn),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=on(),n.nextPart.set(t,i)),n=i}return n},xn=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,Sn=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)}}},Cn=`!`,wn=`:`,Tn=[],En=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),Dn=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===wn){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(Cn)?(c=s.slice(0,-1),l=!0):s.startsWith(Cn)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return En(t,l,c,u)};if(t){let e=t+wn,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):En(Tn,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},On=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}},kn=e=>({cache:Sn(e.cacheSize),parseClassName:Dn(e),sortModifiers:On(e),postfixLookupClassGroupIds:An(e),...un(e)}),An=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},jn=/\s+/,Mn=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(jn),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?_+Cn:_,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},Nn=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=Pn(n))&&(i&&(i+=` `),i+=r);return i},Pn=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=Pn(e[r]))&&(n&&(n+=` `),n+=t);return n},Fn=(e,...t)=>{let n,r,i,a,o=o=>(n=kn(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=Mn(e,n);return i(e,a),a};return a=o,(...e)=>a(Nn(...e))},In=[],Ln=e=>{let t=t=>t[e]||In;return t.isThemeGetter=!0,t},Rn=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,zn=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Bn=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Vn=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Hn=/\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$/,Un=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Wn=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Gn=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Kn=e=>Bn.test(e),qn=e=>!!e&&!Number.isNaN(Number(e)),Jn=e=>!!e&&Number.isInteger(Number(e)),Yn=e=>e.endsWith(`%`)&&qn(e.slice(0,-1)),Xn=e=>Vn.test(e),Zn=()=>!0,Qn=e=>Hn.test(e)&&!Un.test(e),$n=()=>!1,er=e=>Wn.test(e),tr=e=>Gn.test(e),nr=e=>!ar(e)&&!pr(e),rr=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)),ir=e=>xr(e,Tr,$n),ar=e=>Rn.test(e),or=e=>xr(e,Er,Qn),sr=e=>xr(e,Dr,qn),cr=e=>xr(e,kr,Zn),lr=e=>xr(e,Or,$n),ur=e=>xr(e,Cr,$n),dr=e=>xr(e,wr,tr),fr=e=>xr(e,Ar,er),pr=e=>zn.test(e),mr=e=>Sr(e,Er),hr=e=>Sr(e,Or),gr=e=>Sr(e,Cr),_r=e=>Sr(e,Tr),vr=e=>Sr(e,wr),yr=e=>Sr(e,Ar,!0),br=e=>Sr(e,kr,!0),xr=(e,t,n)=>{let r=Rn.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Sr=(e,t,n=!1)=>{let r=zn.exec(e);return r?r[1]?t(r[1]):n:!1},Cr=e=>e===`position`||e===`percentage`,wr=e=>e===`image`||e===`url`,Tr=e=>e===`length`||e===`size`||e===`bg-size`,Er=e=>e===`length`,Dr=e=>e===`number`,Or=e=>e===`family-name`,kr=e=>e===`number`||e===`weight`,Ar=e=>e===`shadow`,jr=Fn(()=>{let e=Ln(`color`),t=Ln(`font`),n=Ln(`text`),r=Ln(`font-weight`),i=Ln(`tracking`),a=Ln(`leading`),o=Ln(`breakpoint`),s=Ln(`container`),c=Ln(`spacing`),l=Ln(`radius`),u=Ln(`shadow`),d=Ln(`inset-shadow`),f=Ln(`text-shadow`),p=Ln(`drop-shadow`),m=Ln(`blur`),h=Ln(`perspective`),g=Ln(`aspect`),_=Ln(`ease`),v=Ln(`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(),pr,ar],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[pr,ar,c],T=()=>[Kn,`full`,`auto`,...w()],E=()=>[Jn,`none`,`subgrid`,pr,ar],D=()=>[`auto`,{span:[`full`,Jn,pr,ar]},Jn,pr,ar],O=()=>[Jn,`auto`,pr,ar],k=()=>[`auto`,`min`,`max`,`fr`,pr,ar],A=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],j=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],M=()=>[`auto`,...w()],N=()=>[Kn,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],P=()=>[Kn,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],F=()=>[Kn,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],I=()=>[e,pr,ar],L=()=>[...b(),gr,ur,{position:[pr,ar]}],ee=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],te=()=>[`auto`,`cover`,`contain`,_r,ir,{size:[pr,ar]}],ne=()=>[Yn,mr,or],R=()=>[``,`none`,`full`,l,pr,ar],z=()=>[``,qn,mr,or],B=()=>[`solid`,`dashed`,`dotted`,`double`],re=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],ie=()=>[qn,Yn,gr,ur],ae=()=>[``,`none`,m,pr,ar],oe=()=>[`none`,qn,pr,ar],se=()=>[`none`,qn,pr,ar],ce=()=>[qn,pr,ar],le=()=>[Kn,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[Xn],breakpoint:[Xn],color:[Zn],container:[Xn],"drop-shadow":[Xn],ease:[`in`,`out`,`in-out`],font:[nr],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[Xn],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[Xn],shadow:[Xn],spacing:[`px`,qn],text:[Xn],"text-shadow":[Xn],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,Kn,ar,pr,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,pr,ar]}],"container-named":[rr],columns:[{columns:[qn,ar,pr,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:[Jn,`auto`,pr,ar]}],basis:[{basis:[Kn,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[qn,Kn,`auto`,`initial`,`none`,ar]}],grow:[{grow:[``,qn,pr,ar]}],shrink:[{shrink:[``,qn,pr,ar]}],order:[{order:[Jn,`first`,`last`,`none`,pr,ar]}],"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":k()}],"auto-rows":[{"auto-rows":k()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...A(),`normal`]}],"justify-items":[{"justify-items":[...j(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...j()]}],"align-content":[{content:[`normal`,...A()]}],"align-items":[{items:[...j(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...j(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":A()}],"place-items":[{"place-items":[...j(),`baseline`]}],"place-self":[{"place-self":[`auto`,...j()]}],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:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mbs:[{mbs:M()}],mbe:[{mbe:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:N()}],"inline-size":[{inline:[`auto`,...P()]}],"min-inline-size":[{"min-inline":[`auto`,...P()]}],"max-inline-size":[{"max-inline":[`none`,...P()]}],"block-size":[{block:[`auto`,...F()]}],"min-block-size":[{"min-block":[`auto`,...F()]}],"max-block-size":[{"max-block":[`none`,...F()]}],w:[{w:[s,`screen`,...N()]}],"min-w":[{"min-w":[s,`screen`,`none`,...N()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...N()]}],h:[{h:[`screen`,`lh`,...N()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...N()]}],"max-h":[{"max-h":[`screen`,`lh`,...N()]}],"font-size":[{text:[`base`,n,mr,or]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,br,cr]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,Yn,ar]}],"font-family":[{font:[hr,lr,t]}],"font-features":[{"font-features":[ar]}],"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,pr,ar]}],"line-clamp":[{"line-clamp":[qn,`none`,pr,sr]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,pr,ar]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,pr,ar]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:I()}],"text-color":[{text:I()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...B(),`wavy`]}],"text-decoration-thickness":[{decoration:[qn,`from-font`,`auto`,pr,or]}],"text-decoration-color":[{decoration:I()}],"underline-offset":[{"underline-offset":[qn,`auto`,pr,ar]}],"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:[Jn,pr,ar]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,pr,ar]}],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`,pr,ar]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:L()}],"bg-repeat":[{bg:ee()}],"bg-size":[{bg:te()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},Jn,pr,ar],radial:[``,pr,ar],conic:[Jn,pr,ar]},vr,dr]}],"bg-color":[{bg:I()}],"gradient-from-pos":[{from:ne()}],"gradient-via-pos":[{via:ne()}],"gradient-to-pos":[{to:ne()}],"gradient-from":[{from:I()}],"gradient-via":[{via:I()}],"gradient-to":[{to:I()}],rounded:[{rounded:R()}],"rounded-s":[{"rounded-s":R()}],"rounded-e":[{"rounded-e":R()}],"rounded-t":[{"rounded-t":R()}],"rounded-r":[{"rounded-r":R()}],"rounded-b":[{"rounded-b":R()}],"rounded-l":[{"rounded-l":R()}],"rounded-ss":[{"rounded-ss":R()}],"rounded-se":[{"rounded-se":R()}],"rounded-ee":[{"rounded-ee":R()}],"rounded-es":[{"rounded-es":R()}],"rounded-tl":[{"rounded-tl":R()}],"rounded-tr":[{"rounded-tr":R()}],"rounded-br":[{"rounded-br":R()}],"rounded-bl":[{"rounded-bl":R()}],"border-w":[{border:z()}],"border-w-x":[{"border-x":z()}],"border-w-y":[{"border-y":z()}],"border-w-s":[{"border-s":z()}],"border-w-e":[{"border-e":z()}],"border-w-bs":[{"border-bs":z()}],"border-w-be":[{"border-be":z()}],"border-w-t":[{"border-t":z()}],"border-w-r":[{"border-r":z()}],"border-w-b":[{"border-b":z()}],"border-w-l":[{"border-l":z()}],"divide-x":[{"divide-x":z()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":z()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...B(),`hidden`,`none`]}],"divide-style":[{divide:[...B(),`hidden`,`none`]}],"border-color":[{border:I()}],"border-color-x":[{"border-x":I()}],"border-color-y":[{"border-y":I()}],"border-color-s":[{"border-s":I()}],"border-color-e":[{"border-e":I()}],"border-color-bs":[{"border-bs":I()}],"border-color-be":[{"border-be":I()}],"border-color-t":[{"border-t":I()}],"border-color-r":[{"border-r":I()}],"border-color-b":[{"border-b":I()}],"border-color-l":[{"border-l":I()}],"divide-color":[{divide:I()}],"outline-style":[{outline:[...B(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[qn,pr,ar]}],"outline-w":[{outline:[``,qn,mr,or]}],"outline-color":[{outline:I()}],shadow:[{shadow:[``,`none`,u,yr,fr]}],"shadow-color":[{shadow:I()}],"inset-shadow":[{"inset-shadow":[`none`,d,yr,fr]}],"inset-shadow-color":[{"inset-shadow":I()}],"ring-w":[{ring:z()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:I()}],"ring-offset-w":[{"ring-offset":[qn,or]}],"ring-offset-color":[{"ring-offset":I()}],"inset-ring-w":[{"inset-ring":z()}],"inset-ring-color":[{"inset-ring":I()}],"text-shadow":[{"text-shadow":[`none`,f,yr,fr]}],"text-shadow-color":[{"text-shadow":I()}],opacity:[{opacity:[qn,pr,ar]}],"mix-blend":[{"mix-blend":[...re(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":re()}],"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":[qn]}],"mask-image-linear-from-pos":[{"mask-linear-from":ie()}],"mask-image-linear-to-pos":[{"mask-linear-to":ie()}],"mask-image-linear-from-color":[{"mask-linear-from":I()}],"mask-image-linear-to-color":[{"mask-linear-to":I()}],"mask-image-t-from-pos":[{"mask-t-from":ie()}],"mask-image-t-to-pos":[{"mask-t-to":ie()}],"mask-image-t-from-color":[{"mask-t-from":I()}],"mask-image-t-to-color":[{"mask-t-to":I()}],"mask-image-r-from-pos":[{"mask-r-from":ie()}],"mask-image-r-to-pos":[{"mask-r-to":ie()}],"mask-image-r-from-color":[{"mask-r-from":I()}],"mask-image-r-to-color":[{"mask-r-to":I()}],"mask-image-b-from-pos":[{"mask-b-from":ie()}],"mask-image-b-to-pos":[{"mask-b-to":ie()}],"mask-image-b-from-color":[{"mask-b-from":I()}],"mask-image-b-to-color":[{"mask-b-to":I()}],"mask-image-l-from-pos":[{"mask-l-from":ie()}],"mask-image-l-to-pos":[{"mask-l-to":ie()}],"mask-image-l-from-color":[{"mask-l-from":I()}],"mask-image-l-to-color":[{"mask-l-to":I()}],"mask-image-x-from-pos":[{"mask-x-from":ie()}],"mask-image-x-to-pos":[{"mask-x-to":ie()}],"mask-image-x-from-color":[{"mask-x-from":I()}],"mask-image-x-to-color":[{"mask-x-to":I()}],"mask-image-y-from-pos":[{"mask-y-from":ie()}],"mask-image-y-to-pos":[{"mask-y-to":ie()}],"mask-image-y-from-color":[{"mask-y-from":I()}],"mask-image-y-to-color":[{"mask-y-to":I()}],"mask-image-radial":[{"mask-radial":[pr,ar]}],"mask-image-radial-from-pos":[{"mask-radial-from":ie()}],"mask-image-radial-to-pos":[{"mask-radial-to":ie()}],"mask-image-radial-from-color":[{"mask-radial-from":I()}],"mask-image-radial-to-color":[{"mask-radial-to":I()}],"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":[qn]}],"mask-image-conic-from-pos":[{"mask-conic-from":ie()}],"mask-image-conic-to-pos":[{"mask-conic-to":ie()}],"mask-image-conic-from-color":[{"mask-conic-from":I()}],"mask-image-conic-to-color":[{"mask-conic-to":I()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:L()}],"mask-repeat":[{mask:ee()}],"mask-size":[{mask:te()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,pr,ar]}],filter:[{filter:[``,`none`,pr,ar]}],blur:[{blur:ae()}],brightness:[{brightness:[qn,pr,ar]}],contrast:[{contrast:[qn,pr,ar]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,yr,fr]}],"drop-shadow-color":[{"drop-shadow":I()}],grayscale:[{grayscale:[``,qn,pr,ar]}],"hue-rotate":[{"hue-rotate":[qn,pr,ar]}],invert:[{invert:[``,qn,pr,ar]}],saturate:[{saturate:[qn,pr,ar]}],sepia:[{sepia:[``,qn,pr,ar]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,pr,ar]}],"backdrop-blur":[{"backdrop-blur":ae()}],"backdrop-brightness":[{"backdrop-brightness":[qn,pr,ar]}],"backdrop-contrast":[{"backdrop-contrast":[qn,pr,ar]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,qn,pr,ar]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[qn,pr,ar]}],"backdrop-invert":[{"backdrop-invert":[``,qn,pr,ar]}],"backdrop-opacity":[{"backdrop-opacity":[qn,pr,ar]}],"backdrop-saturate":[{"backdrop-saturate":[qn,pr,ar]}],"backdrop-sepia":[{"backdrop-sepia":[``,qn,pr,ar]}],"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`,pr,ar]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[qn,`initial`,pr,ar]}],ease:[{ease:[`linear`,`initial`,_,pr,ar]}],delay:[{delay:[qn,pr,ar]}],animate:[{animate:[`none`,v,pr,ar]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,pr,ar]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:oe()}],"rotate-x":[{"rotate-x":oe()}],"rotate-y":[{"rotate-y":oe()}],"rotate-z":[{"rotate-z":oe()}],scale:[{scale:se()}],"scale-x":[{"scale-x":se()}],"scale-y":[{"scale-y":se()}],"scale-z":[{"scale-z":se()}],"scale-3d":[`scale-3d`],skew:[{skew:ce()}],"skew-x":[{"skew-x":ce()}],"skew-y":[{"skew-y":ce()}],transform:[{transform:[pr,ar,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:le()}],"translate-x":[{"translate-x":le()}],"translate-y":[{"translate-y":le()}],"translate-z":[{"translate-z":le()}],"translate-none":[`translate-none`],zoom:[{zoom:[Jn,pr,ar]}],accent:[{accent:I()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:I()}],"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`,pr,ar]}],"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":I()}],"scrollbar-track-color":[{"scrollbar-track":I()}],"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`,pr,ar]}],fill:[{fill:[`none`,...I()]}],"stroke-w":[{stroke:[qn,mr,or,sr]}],stroke:[{stroke:[`none`,...I()]}],"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 Mr(...e){return jr(nn(e))}var Nr=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),Pr=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),Fr=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),Ir=e=>{let t=Fr(e);return t.charAt(0).toUpperCase()+t.slice(1)},Lr={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`},Rr=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},zr=(0,b.createContext)({}),Br=()=>(0,b.useContext)(zr),Vr=(0,b.forwardRef)(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>{let{size:l=24,strokeWidth:u=2,absoluteStrokeWidth:d=!1,color:f=`currentColor`,className:p=``}=Br()??{},m=r??d?Number(n??u)*24/Number(t??l):n??u;return(0,b.createElement)(`svg`,{ref:c,...Lr,width:t??l??Lr.width,height:t??l??Lr.height,stroke:e??f,strokeWidth:m,className:Nr(`lucide`,p,i),...!a&&!Rr(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,b.createElement)(e,t)),...Array.isArray(a)?a:[a]])}),Hr=(e,t)=>{let n=(0,b.forwardRef)(({className:n,...r},i)=>(0,b.createElement)(Vr,{ref:i,iconNode:t,className:Nr(`lucide-${Pr(Ir(e))}`,`lucide-${e}`,n),...r}));return n.displayName=Ir(e),n},Ur=Hr(`arrow-left-right`,[[`path`,{d:`M8 3 4 7l4 4`,key:`9rb6wj`}],[`path`,{d:`M4 7h16`,key:`6tx8e3`}],[`path`,{d:`m16 21 4-4-4-4`,key:`siv7j2`}],[`path`,{d:`M20 17H4`,key:`h6l3hr`}]]),Wr=Hr(`arrow-up`,[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]),Gr=Hr(`braces`,[[`path`,{d:`M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1`,key:`ezmyqa`}],[`path`,{d:`M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1`,key:`e1hn23`}]]),Kr=Hr(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),qr=Hr(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),Jr=Hr(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),Yr=Hr(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),Xr=Hr(`circle-alert`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]]),Zr=Hr(`circle-plus`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M8 12h8`,key:`1wcyev`}],[`path`,{d:`M12 8v8`,key:`napkw2`}]]),Qr=Hr(`circle`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]),$r=Hr(`clipboard-check`,[[`rect`,{width:`8`,height:`4`,x:`8`,y:`2`,rx:`1`,ry:`1`,key:`tgr4d6`}],[`path`,{d:`M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2`,key:`116196`}],[`path`,{d:`m9 14 2 2 4-4`,key:`df797q`}]]),ei=Hr(`clipboard-list`,[[`rect`,{width:`8`,height:`4`,x:`8`,y:`2`,rx:`1`,ry:`1`,key:`tgr4d6`}],[`path`,{d:`M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2`,key:`116196`}],[`path`,{d:`M12 11h4`,key:`1jrz19`}],[`path`,{d:`M12 16h4`,key:`n85exb`}],[`path`,{d:`M8 11h.01`,key:`1dfujw`}],[`path`,{d:`M8 16h.01`,key:`18s6g9`}]]),ti=Hr(`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`}]]),ni=Hr(`external-link`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]),ri=Hr(`eye`,[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),ii=Hr(`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`}]]),ai=Hr(`info`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]),oi=Hr(`languages`,[[`path`,{d:`m5 8 6 6`,key:`1wu5hv`}],[`path`,{d:`m4 14 6-6 2-3`,key:`1k1g8d`}],[`path`,{d:`M2 5h12`,key:`or177f`}],[`path`,{d:`M7 2h1`,key:`1t2jsx`}],[`path`,{d:`m22 22-5-10-5 10`,key:`don7ne`}],[`path`,{d:`M14 18h6`,key:`1m8k6r`}]]),si=Hr(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),ci=Hr(`loader`,[[`path`,{d:`M12 2v4`,key:`3427ic`}],[`path`,{d:`m16.2 7.8 2.9-2.9`,key:`r700ao`}],[`path`,{d:`M18 12h4`,key:`wj9ykh`}],[`path`,{d:`m16.2 16.2 2.9 2.9`,key:`1bxg5t`}],[`path`,{d:`M12 18v4`,key:`jadmvz`}],[`path`,{d:`m4.9 19.1 2.9-2.9`,key:`bwix9q`}],[`path`,{d:`M2 12h4`,key:`j09sii`}],[`path`,{d:`m4.9 4.9 2.9 2.9`,key:`giyufr`}]]),li=Hr(`log-in`,[[`path`,{d:`m10 17 5-5-5-5`,key:`1bsop3`}],[`path`,{d:`M15 12H3`,key:`6jk70r`}],[`path`,{d:`M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4`,key:`u53s6r`}]]),ui=Hr(`log-out`,[[`path`,{d:`m16 17 5-5-5-5`,key:`1bji2h`}],[`path`,{d:`M21 12H9`,key:`dn1m92`}],[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`,key:`1uf3rs`}]]),di=Hr(`logs`,[[`path`,{d:`M3 5h1`,key:`1mv5vm`}],[`path`,{d:`M3 12h1`,key:`lp3yf2`}],[`path`,{d:`M3 19h1`,key:`w6f3n9`}],[`path`,{d:`M8 5h1`,key:`1nxr5w`}],[`path`,{d:`M8 12h1`,key:`1con00`}],[`path`,{d:`M8 19h1`,key:`k7p10e`}],[`path`,{d:`M13 5h8`,key:`a7qcls`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}]]),fi=Hr(`maximize-2`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`m21 3-7 7`,key:`1l2asr`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M9 21H3v-6`,key:`wtvkvv`}]]),pi=Hr(`messages-square`,[[`path`,{d:`M16 10a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 14.286V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z`,key:`1n2ejm`}],[`path`,{d:`M20 9a2 2 0 0 1 2 2v10.286a.71.71 0 0 1-1.212.502l-2.202-2.202A2 2 0 0 0 17.172 19H10a2 2 0 0 1-2-2v-1`,key:`1qfcsi`}]]),mi=Hr(`monitor`,[[`rect`,{width:`20`,height:`14`,x:`2`,y:`3`,rx:`2`,key:`48i651`}],[`line`,{x1:`8`,x2:`16`,y1:`21`,y2:`21`,key:`1svkeh`}],[`line`,{x1:`12`,x2:`12`,y1:`17`,y2:`21`,key:`vw1qmm`}]]),hi=Hr(`moon`,[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`,key:`kfwtm`}]]),gi=Hr(`picture-in-picture-2`,[[`path`,{d:`M21 9V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v10c0 1.1.9 2 2 2h4`,key:`daa4of`}],[`rect`,{width:`10`,height:`7`,x:`12`,y:`13`,rx:`2`,key:`1nb8gs`}]]),_i=Hr(`play`,[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]),vi=Hr(`plug-zap`,[[`path`,{d:`M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z`,key:`goz73y`}],[`path`,{d:`m2 22 3-3`,key:`19mgm9`}],[`path`,{d:`M7.5 13.5 10 11`,key:`7xgeeb`}],[`path`,{d:`M10.5 16.5 13 14`,key:`10btkg`}],[`path`,{d:`m18 3-4 4h6l-4 4`,key:`16psg9`}]]),yi=Hr(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),bi=Hr(`refresh-cw`,[[`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`}]]),xi=Hr(`save`,[[`path`,{d:`M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z`,key:`1c8476`}],[`path`,{d:`M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7`,key:`1ydtos`}],[`path`,{d:`M7 3v4a1 1 0 0 0 1 1h7`,key:`t51u73`}]]),Si=Hr(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),Ci=Hr(`sliders-vertical`,[[`path`,{d:`M10 8h4`,key:`1sr2af`}],[`path`,{d:`M12 21v-9`,key:`17s77i`}],[`path`,{d:`M12 8V3`,key:`13r4qs`}],[`path`,{d:`M17 16h4`,key:`h1uq16`}],[`path`,{d:`M19 12V3`,key:`o1uvq1`}],[`path`,{d:`M19 21v-5`,key:`qua636`}],[`path`,{d:`M3 14h4`,key:`bcjad9`}],[`path`,{d:`M5 10V3`,key:`cb8scm`}],[`path`,{d:`M5 21v-7`,key:`1w1uti`}]]),wi=Hr(`smartphone`,[[`rect`,{width:`14`,height:`20`,x:`5`,y:`2`,rx:`2`,ry:`2`,key:`1yt0o3`}],[`path`,{d:`M12 18h.01`,key:`mhygvu`}]]),Ti=Hr(`square-split-vertical`,[[`path`,{d:`M5 8V5c0-1 1-2 2-2h10c1 0 2 1 2 2v3`,key:`1pi83i`}],[`path`,{d:`M19 16v3c0 1-1 2-2 2H7c-1 0-2-1-2-2v-3`,key:`ido5k7`}],[`line`,{x1:`4`,x2:`20`,y1:`12`,y2:`12`,key:`1e0a9i`}]]),Ei=Hr(`sun`,[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`m17.66 17.66 1.41 1.41`,key:`ptbguv`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m6.34 17.66-1.41 1.41`,key:`1m8zz5`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}]]),Di=Hr(`trash-2`,[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]),Oi=Hr(`triangle-alert`,[[`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`}]]),ki=Hr(`unplug`,[[`path`,{d:`m19 5 3-3`,key:`yk6iyv`}],[`path`,{d:`m2 22 3-3`,key:`19mgm9`}],[`path`,{d:`M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z`,key:`goz73y`}],[`path`,{d:`M7.5 13.5 10 11`,key:`7xgeeb`}],[`path`,{d:`M10.5 16.5 13 14`,key:`10btkg`}],[`path`,{d:`m12 6 6 6 2.3-2.3a2.4 2.4 0 0 0 0-3.4l-2.6-2.6a2.4 2.4 0 0 0-3.4 0Z`,key:`1snsnr`}]]),Ai=Hr(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),ji=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,Mi=nn,Ni=(e,t)=>n=>{if(t?.variants==null)return Mi(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=ji(t)||ji(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 Mi(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)};function Pi(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function Fi(...e){return t=>{let n=!1,r=e.map(e=>{let r=Pi(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():Pi(e[t],null)}}}}function Ii(...e){return b.useCallback(Fi(...e),e)}function Li(e){let t=b.forwardRef((t,n)=>{let{children:r,...i}=t,a=null,o=!1,s=[];qi(r)&&typeof Zi==`function`&&(r=Zi(r._payload)),b.Children.forEach(r,e=>{if(Gi(e)){o=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;qi(n)&&typeof Zi==`function`&&(n=Zi(n._payload)),a=Hi(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?Wi(a):void 0,l=Ii(n,c);if(!a){if(r||r===0)throw Error(o?Xi(e):Yi(e));return r}let u=Ui(i,a.props??{});return a.type!==b.Fragment&&(u.ref=n?l:c),b.cloneElement(a,u)});return t.displayName=`${e}.Slot`,t}var Ri=Li(`Slot`),zi=Symbol.for(`radix.slottable`);function Bi(e){let t=e=>`child`in e?e.children(e.child):e.children;return t.displayName=`${e}.Slottable`,t.__radixId=zi,t}var Vi=Bi(`Slottable`),Hi=(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 Ui(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 Wi(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 Gi(e){return b.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===zi}var Ki=Symbol.for(`react.lazy`);function qi(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===Ki&&`_payload`in e&&Ji(e._payload)}function Ji(e){return typeof e==`object`&&!!e&&`then`in e}var Yi=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,Xi=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,Zi=b.use,Qi=Ni([`inline-flex items-center justify-center gap-1 whitespace-nowrap`,`h-8 px-2 rounded-md`,`font-medium`,`transition-colors`,`outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background`,`[&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0`,`disabled:pointer-events-none disabled:opacity-50`].join(` `),{variants:{variant:{primary:[`bg-primary text-primary-foreground`,`[@media(hover:hover)]:hover:bg-primary-hover`].join(` `),secondary:[`border border-border bg-background text-muted-foreground`,`[@media(hover:hover)]:hover:bg-background-hover [@media(hover:hover)]:hover:text-muted-foreground-hover`].join(` `),tertiary:[`text-muted-foreground`,`[@media(hover:hover)]:hover:bg-background-hover [@media(hover:hover)]:hover:text-muted-foreground-hover`,`focus-visible:bg-background`].join(` `),link:[`h-auto px-0 rounded-xs underline-offset-4`,`text-link`,`[@media(hover:hover)]:hover:underline`,`focus-visible:bg-background`].join(` `),"link-muted":[`h-auto px-0 rounded-xs underline-offset-4`,`text-link-muted`,`[@media(hover:hover)]:hover:underline`,`focus-visible:bg-background`].join(` `),destructive:[`bg-destructive text-destructive-foreground`,`[@media(hover:hover)]:hover:bg-destructive-hover`].join(` `),cta:[`button-cta`,`h-9 px-4 gap-2 rounded-md`,`dark:bg-inverted text-foreground`,`transition-[transform,filter] duration-300 ease-out`,`active:scale-[0.99]`].join(` `)},size:{default:`type-text-sm`,icon:`size-8 p-0 type-text-sm`,"icon-rounded":`size-8 p-0 rounded-full type-text-sm`,pill:`h-7 px-3 rounded-full type-text-xs`}},defaultVariants:{variant:`primary`,size:`default`}});function $i({className:e,variant:t,size:n,type:r=`button`,asChild:i=!1,loading:a=!1,icon:o,iconTrailing:s,disabled:c,children:l,...u}){return(0,H.jsxs)(i?Ri:`button`,{"data-slot":`button`,className:Mr(Qi({variant:t,size:n}),e),type:r,disabled:c||a,"aria-busy":a||void 0,...u,children:[a?(0,H.jsx)(si,{className:`motion-safe:animate-spin`}):o,i?(0,H.jsx)(Vi,{children:l}):l,!a&&s?(0,H.jsx)(`span`,{"data-cta-icon-trailing":!0,children:s}):null]})}function ea(e,t){let n=getComputedStyle(e);return t*parseFloat(n.fontSize)}function ta(e,t){let n=getComputedStyle(e.ownerDocument.documentElement);return t*parseFloat(n.fontSize)}function na(e){return e/100*window.innerHeight}function ra(e){return e/100*window.innerWidth}function ia(e){switch(typeof e){case`number`:return[e,`px`];case`string`:{let t=parseFloat(e);return e.endsWith(`%`)?[t,`%`]:e.endsWith(`px`)?[t,`px`]:e.endsWith(`rem`)?[t,`rem`]:e.endsWith(`em`)?[t,`em`]:e.endsWith(`vh`)?[t,`vh`]:e.endsWith(`vw`)?[t,`vw`]:[t,`%`]}}}function aa({groupSize:e,panelElement:t,styleProp:n}){let r,[i,a]=ia(n);switch(a){case`%`:r=i/100*e;break;case`px`:r=i;break;case`rem`:r=ta(t,i);break;case`em`:r=ea(t,i);break;case`vh`:r=na(i);break;case`vw`:r=ra(i);break}return r}function oa(e){return parseFloat(e.toFixed(3))}function sa({group:e}){let{orientation:t,panels:n}=e;return n.reduce((e,n)=>(e+=t===`horizontal`?n.element.offsetWidth:n.element.offsetHeight,e),0)}function ca(e){let{panels:t}=e,n=sa({group:e});return n===0?t.map(e=>({groupResizeBehavior:e.panelConstraints.groupResizeBehavior,collapsedSize:0,collapsible:e.panelConstraints.collapsible===!0,defaultSize:void 0,disabled:e.panelConstraints.disabled,minSize:0,maxSize:100,panelId:e.id})):t.map(e=>{let{element:t,panelConstraints:r}=e,i=0;r.collapsedSize!==void 0&&(i=oa(aa({groupSize:n,panelElement:t,styleProp:r.collapsedSize})/n*100));let a;r.defaultSize!==void 0&&(a=oa(aa({groupSize:n,panelElement:t,styleProp:r.defaultSize})/n*100));let o=0;r.minSize!==void 0&&(o=oa(aa({groupSize:n,panelElement:t,styleProp:r.minSize})/n*100));let s=100;return r.maxSize!==void 0&&(s=oa(aa({groupSize:n,panelElement:t,styleProp:r.maxSize})/n*100)),{groupResizeBehavior:r.groupResizeBehavior,collapsedSize:i,collapsible:r.collapsible===!0,defaultSize:a,disabled:r.disabled,minSize:o,maxSize:s,panelId:e.id}})}function la(e,t=`Assertion error`){if(!e)throw Error(t)}function ua(e,t){return Array.from(t).sort(e===`horizontal`?da:fa)}function da(e,t){let n=e.element.offsetLeft-t.element.offsetLeft;return n===0?e.element.offsetWidth-t.element.offsetWidth:n}function fa(e,t){let n=e.element.offsetTop-t.element.offsetTop;return n===0?e.element.offsetHeight-t.element.offsetHeight:n}function pa(e){return typeof e==`object`&&!!e&&`nodeType`in e&&e.nodeType===Node.ELEMENT_NODE}function ma(e,t){return{x:e.x>=t.left&&e.x<=t.right?0:Math.min(Math.abs(e.x-t.left),Math.abs(e.x-t.right)),y:e.y>=t.top&&e.y<=t.bottom?0:Math.min(Math.abs(e.y-t.top),Math.abs(e.y-t.bottom))}}function ha({orientation:e,rects:t,targetRect:n}){let r={x:n.x+n.width/2,y:n.y+n.height/2},i,a=Number.MAX_VALUE;for(let n of t){let{x:t,y:o}=ma(r,n),s=e===`horizontal`?t:o;s<a&&(a=s,i=n)}return la(i,`No rect found`),i}var ga;function _a(){return ga===void 0&&(ga=typeof matchMedia==`function`&&!!matchMedia(`(pointer:coarse)`).matches),ga}function va(e){let{element:t,orientation:n,panels:r,separators:i}=e,a=ua(n,Array.from(t.children).filter(pa).map(e=>({element:e}))).map(({element:e})=>e),o=[],s=!1,c=!1,l=-1,u=-1,d=0,f,p=[];{let e=-1;for(let t of a)t.hasAttribute(`data-panel`)&&(e++,t.hasAttribute(`data-disabled`)||(d++,l===-1&&(l=e),u=e))}if(d>1){let t=-1;for(let d of a)if(d.hasAttribute(`data-panel`)){t++;let i=r.find(e=>e.element===d);if(i){if(f){let r=f.element.getBoundingClientRect(),a=d.getBoundingClientRect(),m;if(c){let e=n===`horizontal`?new DOMRect(r.right,r.top,0,r.height):new DOMRect(r.left,r.bottom,r.width,0),t=n===`horizontal`?new DOMRect(a.left,a.top,0,a.height):new DOMRect(a.left,a.top,a.width,0);switch(p.length){case 0:m=[e,t];break;case 1:{let i=p[0];m=[i,ha({orientation:n,rects:[r,a],targetRect:i.element.getBoundingClientRect()})===r?t:e];break}default:m=p;break}}else m=p.length?p:[n===`horizontal`?new DOMRect(r.right,a.top,a.left-r.right,a.height):new DOMRect(a.left,r.bottom,a.width,a.top-r.bottom)];for(let n of m){let r=`width`in n?n:n.element.getBoundingClientRect(),a=_a()?e.resizeTargetMinimumSize.coarse:e.resizeTargetMinimumSize.fine;if(r.width<a){let e=a-r.width;r=new DOMRect(r.x-e/2,r.y,r.width+e,r.height)}if(r.height<a){let e=a-r.height;r=new DOMRect(r.x,r.y-e/2,r.width,r.height+e)}!s&&!(t<=l||t>u)&&o.push({group:e,groupSize:sa({group:e}),panels:[f,i],separator:`width`in n?void 0:n,rect:r}),s=!1}}c=!1,f=i,p=[]}}else if(d.hasAttribute(`data-separator`)){d.ariaDisabled!==null&&(s=!0);let e=i.find(e=>e.element===d);e?p.push(e):(f=void 0,p=[])}else c=!0}return o}var ya=class{#e={};addListener(e,t){let n=this.#e[e];return n===void 0?this.#e[e]=[t]:n.includes(t)||n.push(t),()=>{this.removeListener(e,t)}}emit(e,t){let n=this.#e[e];if(n!==void 0)if(n.length===1)n[0].call(null,t);else{let e=!1,r=null,i=Array.from(n);for(let n=0;n<i.length;n++){let a=i[n];try{a.call(null,t)}catch(t){r===null&&(e=!0,r=t)}}if(e)throw r}}removeAllListeners(){this.#e={}}removeListener(e,t){let n=this.#e[e];if(n!==void 0){let e=n.indexOf(t);e>=0&&n.splice(e,1)}}},ba={cursorFlags:0,state:`inactive`},xa=new ya;function Sa(){return ba}function Ca(e){return xa.addListener(`change`,e)}function wa(e){let t=ba,n={...ba};n.cursorFlags=e,ba=n,xa.emit(`change`,{prev:t,next:n})}function Ta(e){let t=ba;ba=e,xa.emit(`change`,{prev:t,next:e})}var Ea=e=>e,Da=()=>{},Oa=1,ka=2,Aa=4,ja=8,Ma=3,Na=12,Pa;function Fa(){return Pa===void 0&&(Pa=!1,typeof window<`u`&&(window.navigator.userAgent.includes(`Chrome`)||window.navigator.userAgent.includes(`Firefox`))&&(Pa=!0)),Pa}function Ia({cursorFlags:e,groups:t,state:n}){let r=0,i=0;switch(n){case`active`:case`hover`:t.forEach(e=>{if(!e.mutableState.disableCursor)switch(e.orientation){case`horizontal`:r++;break;case`vertical`:i++;break}})}if(!(r===0&&i===0)){switch(n){case`active`:if(e&&Fa()){let t=(e&Oa)!==0,n=(e&ka)!==0,r=(e&Aa)!==0,i=(e&ja)!==0;if(t)return r?`se-resize`:i?`ne-resize`:`e-resize`;if(n)return r?`sw-resize`:i?`nw-resize`:`w-resize`;if(r)return`s-resize`;if(i)return`n-resize`}break}return Fa()?r>0&&i>0?`move`:r>0?`ew-resize`:`ns-resize`:r>0&&i>0?`grab`:r>0?`col-resize`:`row-resize`}}var La=new WeakMap;function Ra(e){if(e.defaultView===null||e.defaultView===void 0)return;let{prevStyle:t,styleSheet:n}=La.get(e)??{};n===void 0&&(n=new e.defaultView.CSSStyleSheet,e.adoptedStyleSheets&&(Object.isExtensible(e.adoptedStyleSheets)?e.adoptedStyleSheets.push(n):e.adoptedStyleSheets=[...e.adoptedStyleSheets,n]));let r=Sa();switch(r.state){case`active`:case`hover`:{let e=Ia({cursorFlags:r.cursorFlags,groups:r.hitRegions.map(e=>e.group),state:r.state}),i=`*, *:hover {cursor: ${e} !important; }`;if(t===i)return;t=i,e?n.cssRules.length===0?n.insertRule(i):n.replaceSync(i):n.cssRules.length===1&&n.deleteRule(0);break}case`inactive`:t=void 0,n.cssRules.length===1&&n.deleteRule(0);break}La.set(e,{prevStyle:t,styleSheet:n})}var za=new Map,Ba=new ya;function Va(e){za=new Map(za),za.delete(e)}function Ha(e,t){for(let[t]of za)if(t.id===e)return t}function Ua(e,t){for(let[t,n]of za)if(t.id===e)return n;if(t)throw Error(`Could not find data for Group with id ${e}`)}function Wa(){return za}function Ga(e,t){return Ba.addListener(`groupChange`,n=>{n.group.id===e&&t(n)})}function Ka(e,t,n){let r=za.get(e);za=new Map(za),za.set(e,t),Ba.emit(`groupChange`,{group:e,isUserInteraction:n?.isUserInteraction===!0,prev:r,next:t})}function qa(e){let t=Sa(),n=!1;switch(t.state){case`active`:Ta({cursorFlags:0,state:`inactive`}),t.hitRegions.length>0&&(Ra(e),n=!0,t.hitRegions.forEach(e=>{let t=Ua(e.group.id,!0);Ka(e.group,t,{isUserInteraction:!0})}))}return n}function Ja(e){e.defaultPrevented||qa(e.currentTarget)}function Ya(e,t,n){let r,i={x:1/0,y:1/0};for(let a of t){let t=ma(n,a.rect);switch(e){case`horizontal`:t.x<=i.x&&(r=a,i=t);break;case`vertical`:t.y<=i.y&&(r=a,i=t);break}}return r?{distance:i,hitRegion:r}:void 0}function Xa(e){return typeof e==`object`&&!!e&&`nodeType`in e&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE}function Za(e,t){if(e===t)throw Error(`Cannot compare node with itself`);let n={a:ro(e),b:ro(t)},r;for(;n.a.at(-1)===n.b.at(-1);)r=n.a.pop(),n.b.pop();la(r,`Stacking order can only be calculated for elements with a common ancestor`);let i={a:no(to(n.a)),b:no(to(n.b))};if(i.a===i.b){let e=r.childNodes,t={a:n.a.at(-1),b:n.b.at(-1)},i=e.length;for(;i--;){let n=e[i];if(n===t.a)return 1;if(n===t.b)return-1}}return Math.sign(i.a-i.b)}var Qa=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function $a(e){let t=getComputedStyle(io(e)??e).display;return t===`flex`||t===`inline-flex`}function eo(e){let t=getComputedStyle(e);return!!(t.position===`fixed`||t.zIndex!==`auto`&&(t.position!==`static`||$a(e))||+t.opacity<1||`transform`in t&&t.transform!==`none`||`webkitTransform`in t&&t.webkitTransform!==`none`||`mixBlendMode`in t&&t.mixBlendMode!==`normal`||`filter`in t&&t.filter!==`none`||`webkitFilter`in t&&t.webkitFilter!==`none`||`isolation`in t&&t.isolation===`isolate`||Qa.test(t.willChange)||t.webkitOverflowScrolling===`touch`)}function to(e){let t=e.length;for(;t--;){let n=e[t];if(la(n,`Missing node`),eo(n))return n}return null}function no(e){return e&&Number(getComputedStyle(e).zIndex)||0}function ro(e){let t=[];for(;e;)t.push(e),e=io(e);return t}function io(e){let{parentNode:t}=e;return Xa(t)?t.host:t}function ao(e,t){return e.x<t.x+t.width&&e.x+e.width>t.x&&e.y<t.y+t.height&&e.y+e.height>t.y}function oo({groupElement:e,hitRegion:t,pointerEventTarget:n}){if(!pa(n)||n.contains(e)||e.contains(n))return!0;if(Za(n,e)>0){let r=n;for(;r;){if(r.contains(e))return!0;if(ao(r.getBoundingClientRect(),t))return!1;r=r.parentElement}}return!0}function so(e,t){let n=[];return t.forEach((t,r)=>{if(r.disabled)return;let i=va(r),a=Ya(r.orientation,i,{x:e.clientX,y:e.clientY});a&&a.distance.x<=0&&a.distance.y<=0&&oo({groupElement:r.element,hitRegion:a.hitRegion.rect,pointerEventTarget:e.target})&&n.push(a.hitRegion)}),n}function co(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!=t[n])return!1;return!0}function lo(e,t,n=0){return Math.abs(oa(e)-oa(t))<=n}function uo(e,t){return lo(e,t)?0:e>t?1:-1}function fo({overrideDisabledPanels:e,panelConstraints:t,prevSize:n,size:r}){let{collapsedSize:i=0,collapsible:a,disabled:o,maxSize:s=100,minSize:c=0}=t;if(o&&!e)return n;if(uo(r,c)<0)if(a){let e=(i+c)/2;r=uo(r,e)<0?i:c}else r=c;return r=Math.min(s,r),r=oa(r),r}function po({delta:e,initialLayout:t,panelConstraints:n,pivotIndices:r,prevLayout:i,trigger:a}){if(lo(e,0))return t;let o=a===`imperative-api`,s=Object.values(t),c=Object.values(i),l=[...s],[u,d]=r;la(u!=null,`Invalid first pivot index`),la(d!=null,`Invalid second pivot index`);let f=0;switch(a){case`keyboard`:{let t=e<0?d:u,r=n[t];la(r,`Panel constraints not found for index ${t}`);let{collapsedSize:i=0,collapsible:a,minSize:o=0}=r;if(a){let n=s[t];if(la(n!=null,`Previous layout not found for panel index ${t}`),lo(n,i)){let t=o-n;uo(t,Math.abs(e))>0&&(e=e<0?0-t:t)}}}{let t=e<0?u:d,r=n[t];la(r,`No panel constraints found for index ${t}`);let{collapsedSize:i=0,collapsible:a,minSize:o=0}=r;if(a){let n=s[t];if(la(n!=null,`Previous layout not found for panel index ${t}`),lo(n,o)){let t=n-i;uo(t,Math.abs(e))>0&&(e=e<0?0-t:t)}}}break;default:{let t=e<0?d:u,r=n[t];la(r,`Panel constraints not found for index ${t}`);let i=s[t],{collapsible:a,collapsedSize:o,minSize:c}=r;if(a&&uo(i,c)<0)if(e>0){let t=c-o,n=t/2;uo(i+e,c)<0&&(e=uo(e,n)<=0?0:t)}else{let t=c-o,n=100-t/2;uo(i-e,c)<0&&(e=uo(100+e,n)>0?0:-t)}break}}{let t=e<0?1:-1,r=e<0?d:u,i=0;for(;;){let e=s[r];la(e!=null,`Previous layout not found for panel index ${r}`);let a=fo({overrideDisabledPanels:o,panelConstraints:n[r],prevSize:e,size:100})-e;if(i+=a,r+=t,r<0||r>=n.length)break}let a=Math.min(Math.abs(e),Math.abs(i));e=e<0?0-a:a}{let t=e<0?u:d;for(;t>=0&&t<n.length;){let r=Math.abs(e)-Math.abs(f),i=s[t];la(i!=null,`Previous layout not found for panel index ${t}`);let a=i-r,c=fo({overrideDisabledPanels:o,panelConstraints:n[t],prevSize:i,size:a});if(!lo(i,c)&&(f+=i-c,l[t]=c,f.toFixed(3).localeCompare(Math.abs(e).toFixed(3),void 0,{numeric:!0})>=0))break;e<0?t--:t++}}if(co(c,l))return i;{let t=e<0?d:u,r=s[t];la(r!=null,`Previous layout not found for panel index ${t}`);let i=r+f,a=fo({overrideDisabledPanels:o,panelConstraints:n[t],prevSize:r,size:i});if(l[t]=a,!lo(a,i)){let t=i-a,r=e<0?d:u;for(;r>=0&&r<n.length;){let i=l[r];la(i!=null,`Previous layout not found for panel index ${r}`);let a=i+t,s=fo({overrideDisabledPanels:o,panelConstraints:n[r],prevSize:i,size:a});if(lo(i,s)||(t-=s-i,l[r]=s),lo(t,0))break;e>0?r--:r++}}}if(!lo(Object.values(l).reduce((e,t)=>t+e,0),100,.1))return i;let p=Object.keys(i);return l.reduce((e,t,n)=>(e[p[n]]=t,e),{})}function mo(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(t[n]===void 0||uo(e[n],t[n])!==0)return!1;return!0}function ho({layout:e,panelConstraints:t}){let n=Object.values(e),r=[...n],i=r.reduce((e,t)=>e+t,0);if(r.length!==t.length)throw Error(`Invalid ${t.length} panel layout: ${r.map(e=>`${e}%`).join(`, `)}`);if(!lo(i,100)&&r.length>0)for(let e=0;e<t.length;e++){let t=r[e];la(t!=null,`No layout data found for index ${e}`),r[e]=100/i*t}let a=0;for(let e=0;e<t.length;e++){let i=n[e];la(i!=null,`No layout data found for index ${e}`);let o=r[e];la(o!=null,`No layout data found for index ${e}`);let s=fo({overrideDisabledPanels:!0,panelConstraints:t[e],prevSize:i,size:o});o!=s&&(a+=o-s,r[e]=s)}if(!lo(a,0))for(let e=0;e<t.length;e++){let n=r[e];la(n!=null,`No layout data found for index ${e}`);let i=n+a,o=fo({overrideDisabledPanels:!0,panelConstraints:t[e],prevSize:n,size:i});if(n!==o&&(a-=o-n,r[e]=o,lo(a,0)))break}let o=Object.keys(e);return r.reduce((e,t,n)=>(e[o[n]]=t,e),{})}function go({groupId:e,panelId:t}){let n=()=>{let t=Wa();for(let[n,{defaultLayoutDeferred:r,derivedPanelConstraints:i,layout:a,groupSize:o,separatorToPanels:s}]of t)if(n.id===e)return{defaultLayoutDeferred:r,derivedPanelConstraints:i,group:n,groupSize:o,layout:a,separatorToPanels:s};throw Error(`Group ${e} not found`)},r=()=>{let e=n().derivedPanelConstraints.find(e=>e.panelId===t);if(e!==void 0)return e;throw Error(`Panel constraints not found for Panel ${t}`)},i=()=>{let e=n().group.panels.find(e=>e.id===t);if(e!==void 0)return e;throw Error(`Layout not found for Panel ${t}`)},a=()=>{let e=n().layout[t];if(e!==void 0)return e;throw Error(`Layout not found for Panel ${t}`)},o=({nextSize:e,panels:n,prevLayout:r,derivedPanelConstraints:i})=>{let o=a(),s=n.findIndex(e=>e.id===t),c=s===0,l=s===n.length-1;if(l&&e<o&&(c||n.slice(0,s).every((e,t)=>{let n=i[t];return n?.collapsible&&lo(n.collapsedSize,r[n.panelId])}))){let e=n.slice(0,s).reduce((e,t)=>e+r[t.id],0);return{...r,[t]:oa(100-e)}}return po({delta:l?o-e:e-o,initialLayout:r,panelConstraints:i,pivotIndices:l?[s-1,s]:[s,s+1],prevLayout:r,trigger:`imperative-api`})},s=e=>{if(e===a())return;let{defaultLayoutDeferred:t,derivedPanelConstraints:r,group:i,groupSize:s,layout:c,separatorToPanels:l}=n(),u=ho({layout:o({nextSize:e,panels:i.panels,prevLayout:c,derivedPanelConstraints:r}),panelConstraints:r});mo(c,u)||Ka(i,{defaultLayoutDeferred:t,derivedPanelConstraints:r,groupSize:s,layout:u,separatorToPanels:l})};return{collapse:()=>{let{collapsible:e,collapsedSize:t}=r(),{mutableValues:n}=i(),o=a();e&&o!==t&&(n.expandToSize=o,s(t))},expand:()=>{let{collapsible:e,collapsedSize:t,minSize:n}=r(),{mutableValues:o}=i(),c=a();if(e&&c===t){let e=o.expandToSize??n;e===0&&(e=1),s(e)}},getSize:()=>{let{group:e}=n(),t=a(),{element:r}=i();return{asPercentage:t,inPixels:e.orientation===`horizontal`?r.offsetWidth:r.offsetHeight}},isCollapsed:()=>{let{collapsible:e,collapsedSize:t}=r(),n=a();return e&&lo(t,n)},resize:e=>{let{group:t}=n(),{element:r}=i(),a=sa({group:t}),o=oa(aa({groupSize:a,panelElement:r,styleProp:e})/a*100);s(o)}}}function _o(e){e.defaultPrevented||so(e,Wa()).forEach(t=>{if(t.separator&&!t.separator.disableDoubleClick){let n=t.panels.find(e=>e.panelConstraints.defaultSize!==void 0);if(n){let r=n.panelConstraints.defaultSize,i=go({groupId:t.group.id,panelId:n.id});i&&r!==void 0&&(i.resize(r),e.preventDefault())}}})}function vo(e){let t=Wa();for(let[n]of t)if(n.separators.some(t=>t.element===e))return n;throw Error(`Could not find parent Group for separator element`)}function yo({groupId:e}){let t=()=>{let t=Wa();for(let[n,r]of t)if(n.id===e)return{group:n,...r};throw Error(`Could not find Group with id "${e}"`)};return{getLayout(){let{defaultLayoutDeferred:e,layout:n}=t();return e?{}:n},setLayout(e){let{defaultLayoutDeferred:n,derivedPanelConstraints:r,group:i,groupSize:a,layout:o,separatorToPanels:s}=t(),c=ho({layout:e,panelConstraints:r});return n?o:(mo(o,c)||Ka(i,{defaultLayoutDeferred:n,derivedPanelConstraints:r,groupSize:a,layout:c,separatorToPanels:s}),c)}}}function bo(e,t){let n=vo(e),r=Ua(n.id,!0),i=n.separators.find(t=>t.element===e);la(i,`Matching separator not found`);let a=r.separatorToPanels.get(i);la(a,`Matching panels not found`);let o=a.map(e=>n.panels.indexOf(e)),s=yo({groupId:n.id}).getLayout(),c=ho({layout:po({delta:t,initialLayout:s,panelConstraints:r.derivedPanelConstraints,pivotIndices:o,prevLayout:s,trigger:`keyboard`}),panelConstraints:r.derivedPanelConstraints});mo(s,c)||Ka(n,{defaultLayoutDeferred:r.defaultLayoutDeferred,derivedPanelConstraints:r.derivedPanelConstraints,groupSize:r.groupSize,layout:c,separatorToPanels:r.separatorToPanels},{isUserInteraction:!0})}function xo(e){if(e.defaultPrevented)return;let t=e.currentTarget,n=vo(t);if(!n.disabled)switch(e.key){case`ArrowDown`:e.preventDefault(),n.orientation===`vertical`&&bo(t,5);break;case`ArrowLeft`:e.preventDefault(),n.orientation===`horizontal`&&bo(t,-5);break;case`ArrowRight`:e.preventDefault(),n.orientation===`horizontal`&&bo(t,5);break;case`ArrowUp`:e.preventDefault(),n.orientation===`vertical`&&bo(t,-5);break;case`End`:e.preventDefault(),bo(t,100);break;case`Enter`:{e.preventDefault();let n=vo(t),{derivedPanelConstraints:r,layout:i,separatorToPanels:a}=Ua(n.id,!0),o=n.separators.find(e=>e.element===t);la(o,`Matching separator not found`);let s=a.get(o);la(s,`Matching panels not found`);let c=s[0],l=r.find(e=>e.panelId===c.id);if(la(l,`Panel metadata not found`),l.collapsible){let e=i[c.id];bo(t,(l.collapsedSize===e?n.mutableState.expandedPanelSizes[c.id]??l.minSize:l.collapsedSize)-e)}break}case`F6`:{e.preventDefault();let n=vo(t).separators.map(e=>e.element),r=Array.from(n).findIndex(t=>t===e.currentTarget);la(r!==null,`Index not found`),n[e.shiftKey?r>0?r-1:n.length-1:r+1<n.length?r+1:0].focus({preventScroll:!0});break}case`Home`:e.preventDefault(),bo(t,-100);break}}function So(e){if(e.defaultPrevented||e.pointerType===`mouse`&&e.button>0)return;let t=Wa(),n=so(e,t),r=new Map,i=!1;n.forEach(e=>{e.separator&&(i||(i=!0,e.separator.element.focus({focusVisible:!1,preventScroll:!0})));let n=t.get(e.group);n&&r.set(e.group,n.layout)}),Ta({cursorFlags:0,hitRegions:n,initialLayoutMap:r,pointerDownAtPoint:{x:e.clientX,y:e.clientY},state:`active`}),n.length&&e.preventDefault()}function Co({document:e,event:t,hitRegions:n,initialLayoutMap:r,mountedGroups:i,pointerDownAtPoint:a,prevCursorFlags:o}){let s=0;n.forEach(e=>{let{group:n,groupSize:o}=e,{orientation:c,panels:l}=n,{disableCursor:u}=n.mutableState,d=0;d=a?c===`horizontal`?(t.clientX-a.x)/o*100:(t.clientY-a.y)/o*100:c===`horizontal`?t.clientX<0?-100:100:t.clientY<0?-100:100;let f=r.get(n),p=i.get(n);if(!f||!p)return;let{defaultLayoutDeferred:m,derivedPanelConstraints:h,groupSize:g,layout:_,separatorToPanels:v}=p;if(h&&_&&v){let t=po({delta:d,initialLayout:f,panelConstraints:h,pivotIndices:e.panels.map(e=>l.indexOf(e)),prevLayout:_,trigger:`mouse-or-touch`});if(mo(t,_)){if(d!==0&&!u)switch(c){case`horizontal`:s|=d<0?Oa:ka;break;case`vertical`:s|=d<0?Aa:ja;break}}else Ka(e.group,{defaultLayoutDeferred:m,derivedPanelConstraints:h,groupSize:g,layout:t,separatorToPanels:v})}});let c=0;t.movementX===0?c|=o&Ma:c|=s&Ma,t.movementY===0?c|=o&Na:c|=s&Na,wa(c),Ra(e)}function wo(e){let t=Wa(),n=Sa();switch(n.state){case`active`:Co({document:e.currentTarget,event:e,hitRegions:n.hitRegions,initialLayoutMap:n.initialLayoutMap,mountedGroups:t,prevCursorFlags:n.cursorFlags})}}function To(e){if(e.defaultPrevented)return;let t=Sa(),n=Wa();switch(t.state){case`active`:if(e.buttons===0){Ta({cursorFlags:0,state:`inactive`}),t.hitRegions.forEach(e=>{let t=Ua(e.group.id,!0);Ka(e.group,t,{isUserInteraction:!0})});return}for(let n of t.hitRegions)if(n.separator){let{element:t}=n.separator;t.hasPointerCapture?.(e.pointerId)||t.setPointerCapture?.(e.pointerId)}Co({document:e.currentTarget,event:e,hitRegions:t.hitRegions,initialLayoutMap:t.initialLayoutMap,mountedGroups:n,pointerDownAtPoint:t.pointerDownAtPoint,prevCursorFlags:t.cursorFlags});break;default:{let r=so(e,n);r.length===0?t.state!==`inactive`&&Ta({cursorFlags:0,state:`inactive`}):Ta({cursorFlags:0,hitRegions:r,state:`hover`}),Ra(e.currentTarget);break}}}function Eo(e){if(e.relatedTarget instanceof HTMLIFrameElement)switch(Sa().state){case`hover`:Ta({cursorFlags:0,state:`inactive`})}}function Do(e){e.defaultPrevented||e.pointerType===`mouse`&&e.button>0||qa(e.currentTarget)&&e.preventDefault()}function Oo(e){let t=0,n=0,r={};for(let i of e)if(i.defaultSize!==void 0){t++;let e=oa(i.defaultSize);n+=e,r[i.panelId]=e}else r[i.panelId]=void 0;let i=e.length-t;if(i!==0){let t=oa((100-n)/i);for(let n of e)n.defaultSize===void 0&&(r[n.panelId]=t)}return r}function ko(e,t,n){if(!n[0])return;let r=e.panels.find(e=>e.element===t);if(!r||!r.onResize)return;let i=sa({group:e}),a=e.orientation===`horizontal`?r.element.offsetWidth:r.element.offsetHeight,o=r.mutableValues.prevSize,s={asPercentage:oa(a/i*100),inPixels:a};r.mutableValues.prevSize=s,r.onResize(s,r.id,o)}function Ao(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function jo({group:e,nextGroupSize:t,prevGroupSize:n,prevLayout:r}){if(n<=0||t<=0||n===t)return r;let i=0,a=0,o=!1,s=new Map,c=[];for(let l of e.panels){let e=r[l.id]??0;switch(l.panelConstraints.groupResizeBehavior){case`preserve-pixel-size`:{o=!0;let r=oa(e/100*n/t*100);s.set(l.id,r),i+=r;break}default:c.push(l.id),a+=e;break}}if(!o||c.length===0)return r;let l=100-i,u={...r};if(s.forEach((e,t)=>{u[t]=e}),a>0)for(let e of c)u[e]=oa((r[e]??0)/a*l);else{let e=oa(l/c.length);for(let t of c)u[t]=e}return u}function Mo(e,t){let n=e.map(e=>e.id),r=Object.keys(t);if(n.length!==r.length)return!1;for(let e of n)if(!r.includes(e))return!1;return!0}var No=new Map;function Po(e){let t=!0;la(e.element.ownerDocument.defaultView,`Cannot register an unmounted Group`);let n=e.element.ownerDocument.defaultView.ResizeObserver,r=new Set,i=new Set,a=new n(n=>{for(let r of n){let{borderBoxSize:n,target:i}=r;if(i===e.element){if(t){let t=sa({group:e});if(t===0)return;let n=Ua(e.id);if(!n)return;let r=ca(e),i=n.defaultLayoutDeferred?Oo(r):n.layout,a=ho({layout:jo({group:e,nextGroupSize:t,prevGroupSize:n.groupSize,prevLayout:i}),panelConstraints:r});if(!n.defaultLayoutDeferred&&mo(n.layout,a)&&Ao(n.derivedPanelConstraints,r)&&n.groupSize===t)return;Ka(e,{defaultLayoutDeferred:!1,derivedPanelConstraints:r,groupSize:t,layout:a,separatorToPanels:n.separatorToPanels})}}else ko(e,i,n)}});a.observe(e.element),e.panels.forEach(e=>{la(!r.has(e.id),`Panel ids must be unique; id "${e.id}" was used more than once`),r.add(e.id),e.onResize&&a.observe(e.element)});let o=sa({group:e}),s=ca(e),c=e.panels.map(({id:e})=>e).join(`,`),l=e.mutableState.defaultLayout;l&&(Mo(e.panels,l)||(l=void 0));let u=ho({layout:e.mutableState.layouts[c]??l??Oo(s),panelConstraints:s}),d=e.element.ownerDocument;No.set(d,(No.get(d)??0)+1);let f=new Map;return va(e).forEach(e=>{e.separator&&f.set(e.separator,e.panels)}),Ka(e,{defaultLayoutDeferred:o===0,derivedPanelConstraints:s,groupSize:o,layout:u,separatorToPanels:f}),e.separators.forEach(e=>{la(!i.has(e.id),`Separator ids must be unique; id "${e.id}" was used more than once`),i.add(e.id),e.element.addEventListener(`keydown`,xo)}),No.get(d)===1&&(d.addEventListener(`contextmenu`,Ja,!0),d.addEventListener(`dblclick`,_o,!0),d.addEventListener(`pointerdown`,So,!0),d.addEventListener(`pointerleave`,wo),d.addEventListener(`pointermove`,To),d.addEventListener(`pointerout`,Eo),d.addEventListener(`pointerup`,Do,!0)),function(){t=!1,No.set(d,Math.max(0,(No.get(d)??0)-1)),Va(e),e.separators.forEach(e=>{e.element.removeEventListener(`keydown`,xo)}),No.get(d)||(d.removeEventListener(`contextmenu`,Ja,!0),d.removeEventListener(`dblclick`,_o,!0),d.removeEventListener(`pointerdown`,So,!0),d.removeEventListener(`pointerleave`,wo),d.removeEventListener(`pointermove`,To),d.removeEventListener(`pointerout`,Eo),d.removeEventListener(`pointerup`,Do,!0)),a.disconnect()}}function Fo(){let[e,t]=(0,b.useState)({});return[e,(0,b.useCallback)(()=>t({}),[])]}function Io(e){let t=(0,b.useId)();return`${e??t}`}var Lo=typeof window<`u`?b.useLayoutEffect:b.useEffect;function Ro(e){let t=(0,b.useRef)(e);return Lo(()=>{t.current=e},[e]),(0,b.useCallback)((...e)=>t.current?.(...e),[t])}function zo(...e){return Ro(t=>{e.forEach(e=>{if(e)switch(typeof e){case`function`:e(t);break;case`object`:e.current=t;break}})})}function Bo(e){let t=(0,b.useRef)({...e});return Lo(()=>{for(let n in e)t.current[n]=e[n]},[e]),t.current}var Vo=(0,b.createContext)(null);function Ho(e,t){let n=(0,b.useRef)({getLayout:()=>({}),setLayout:Ea});(0,b.useImperativeHandle)(t,()=>n.current,[]),Lo(()=>{Object.assign(n.current,yo({groupId:e}))})}function Uo({children:e,className:t,defaultLayout:n,disableCursor:r,disabled:i,elementRef:a,groupRef:o,id:s,onLayoutChange:c,onLayoutChanged:l,orientation:u=`horizontal`,resizeTargetMinimumSize:d={coarse:20,fine:10},style:f,...p}){let m=(0,b.useRef)({onLayoutChange:{},onLayoutChanged:{}}),h=Ro(e=>{mo(m.current.onLayoutChange,e)||(m.current.onLayoutChange=e,c?.(e))}),g=Ro((e,t)=>{mo(m.current.onLayoutChanged,e)||(m.current.onLayoutChanged=e,l?.(e,{isUserInteraction:t}))}),_=Io(s),v=(0,b.useRef)(null),[y,x]=Fo(),S=(0,b.useRef)({lastExpandedPanelSizes:{},layouts:{},panels:[],resizeTargetMinimumSize:d,separators:[]}),C=zo(v,a);Ho(_,o);let w=Ro((e,t)=>{let r=Sa(),i=Ha(e),a=Ua(e);if(a){let e=!1;switch(r.state){case`active`:e=r.hitRegions.some(e=>e.group===i);break}return{flexGrow:a.layout[t]??1,pointerEvents:e?`none`:void 0}}if(n?.[t])return{flexGrow:n?.[t]}}),T=Bo({defaultLayout:n,disableCursor:r}),E=(0,b.useMemo)(()=>({get disableCursor(){return!!T.disableCursor},getPanelStyles:w,id:_,orientation:u,registerPanel:e=>{let t=S.current;return t.panels=ua(u,[...t.panels,e]),x(),()=>{t.panels=t.panels.filter(t=>t!==e),x()}},registerSeparator:e=>{let t=S.current;return t.separators=ua(u,[...t.separators,e]),x(),()=>{t.separators=t.separators.filter(t=>t!==e),x()}},updatePanelProps:(e,{disabled:t})=>{let n=S.current.panels.find(t=>t.id===e);n&&(n.panelConstraints.disabled=t);let r=Ha(_),i=Ua(_);r&&i&&Ka(r,{...i,derivedPanelConstraints:ca(r)})},updateSeparatorProps:(e,{disabled:t,disableDoubleClick:n})=>{let r=S.current.separators.find(t=>t.id===e);r&&(r.disabled=t,r.disableDoubleClick=n)}}),[w,_,x,u,T]),D=(0,b.useRef)(null);return Lo(()=>{let e=v.current;if(e===null)return;let t=S.current,n;if(T.defaultLayout!==void 0&&Object.keys(T.defaultLayout).length===t.panels.length){n={};for(let e of t.panels){let t=T.defaultLayout[e.id];t!==void 0&&(n[e.id]=t)}}let r={disabled:!!i,element:e,id:_,mutableState:{defaultLayout:n,disableCursor:!!T.disableCursor,expandedPanelSizes:S.current.lastExpandedPanelSizes,layouts:S.current.layouts},orientation:u,panels:t.panels,resizeTargetMinimumSize:t.resizeTargetMinimumSize,separators:t.separators};D.current=r;let a=Po(r),{defaultLayoutDeferred:o,derivedPanelConstraints:s,layout:c}=Ua(r.id,!0);!o&&s.length>0&&(h(c),g(c,!1));let l=Ga(_,e=>{let{defaultLayoutDeferred:t,derivedPanelConstraints:n,layout:i}=e.next;if(t||n.length===0)return;let a=r.panels.map(({id:e})=>e).join(`,`);r.mutableState.layouts[a]=i,n.forEach(t=>{if(t.collapsible){let{layout:n}=e.prev??{};if(n){let e=lo(t.collapsedSize,i[t.panelId]),a=lo(t.collapsedSize,n[t.panelId]);e&&!a&&(r.mutableState.expandedPanelSizes[t.panelId]=n[t.panelId])}}});let o=Sa().state!==`active`;h(i),o&&g(i,e.isUserInteraction)});return()=>{D.current=null,a(),l()}},[i,_,g,h,u,y,T]),(0,b.useEffect)(()=>{let e=D.current;e&&(e.mutableState.defaultLayout=n,e.mutableState.disableCursor=!!r)}),(0,H.jsx)(Vo.Provider,{value:E,children:(0,H.jsx)(`div`,{...p,className:t,"data-group":!0,"data-testid":_,id:_,ref:C,style:{height:`100%`,width:`100%`,overflow:`hidden`,...f,display:`flex`,flexDirection:u===`horizontal`?`row`:`column`,flexWrap:`nowrap`,touchAction:u===`horizontal`?`pan-y`:`pan-x`},children:e})})}Uo.displayName=`Group`;function Wo(e,t){return`react-resizable-panels:${[e,...t].join(`:`)}`}function Go({id:e,panelIds:t,storage:n}){let r=Wo(e,[]),i=n.getItem(r);if(i)try{let e=JSON.parse(i);if(t){let n=e[t.join(`,`)];if(n&&Array.isArray(n.layout)&&t.length===n.layout.length){let e={};for(let r=0;r<t.length;r++)e[t[r]]=n.layout[r];return e}}else{let t=Object.keys(e);if(t.length===1){let n=e[t[0]];if(n&&Array.isArray(n.layout)){let e=t[0].split(`,`);if(e.length===n.layout.length){let t={};for(let r=0;r<e.length;r++)t[e[r]]=n.layout[r];return t}}}}}catch{}}function Ko({debounceSaveMs:e=100,onlySaveAfterUserInteractions:t,panelIds:n,storage:r=localStorage,...i}){let a=n!==void 0,o=`id`in i?i.id:i.groupId,s=Wo(o,n??[]),c=(0,b.useSyncExternalStore)(qo,()=>r.getItem(s),()=>r.getItem(s)),l=(0,b.useMemo)(()=>{if(c){let e=JSON.parse(c),t=Object.values(e);if(Array.from(t).every(e=>typeof e==`number`))return e}},[c]),u=(0,b.useMemo)(()=>{if(!l)return Go({id:o,panelIds:n,storage:r})},[l,o,n,r]),d=l??u,f=(0,b.useRef)(null),p=(0,b.useCallback)(()=>{let e=f.current;e&&(f.current=null,clearTimeout(e))},[]);(0,b.useLayoutEffect)(()=>()=>{p()},[p]);let m=(0,b.useCallback)((e,n)=>{if(t&&!n.isUserInteraction)return;p();let i;i=a?Wo(o,Object.keys(e)):Wo(o,[]);try{r.setItem(i,JSON.stringify(e))}catch(e){console.error(e)}},[p,a,o,t,r]);return{defaultLayout:d,onLayoutChange:(0,b.useCallback)(t=>{p(),e===0?m(t,{isUserInteraction:!1}):f.current=setTimeout(()=>{m(t,{isUserInteraction:!1})},e)},[p,e,m]),onLayoutChanged:m}}function qo(){return function(){}}function Jo(){let e=(0,b.useContext)(Vo);return la(e,`Group Context not found; did you render a Panel or Separator outside of a Group?`),e}function Yo(e,t){let{id:n}=Jo(),r=(0,b.useRef)({collapse:Da,expand:Da,getSize:()=>({asPercentage:0,inPixels:0}),isCollapsed:()=>!1,resize:Da});(0,b.useImperativeHandle)(t,()=>r.current,[]),Lo(()=>{Object.assign(r.current,go({groupId:n,panelId:e}))})}function Xo({children:e,className:t,collapsedSize:n=`0%`,collapsible:r=!1,defaultSize:i,disabled:a,elementRef:o,groupResizeBehavior:s=`preserve-relative-size`,id:c,maxSize:l=`100%`,minSize:u=`0%`,onResize:d,panelRef:f,style:p,...m}){let h=!!c,g=Io(c),_=Bo({disabled:a}),v=(0,b.useRef)(null),y=zo(v,o),{getPanelStyles:x,id:S,orientation:C,registerPanel:w,updatePanelProps:T}=Jo(),E=d!==null,D=Ro((e,t,n)=>{d?.(e,c,n)});Lo(()=>{let e=v.current;if(e!==null){let t={element:e,id:g,idIsStable:h,mutableValues:{expandToSize:void 0,prevSize:void 0},onResize:E?D:void 0,panelConstraints:{groupResizeBehavior:s,collapsedSize:n,collapsible:r,defaultSize:i,disabled:_.disabled,maxSize:l,minSize:u}};return w(t)}},[s,n,r,i,E,g,h,l,u,D,w,_]),(0,b.useEffect)(()=>{T(g,{disabled:a})},[a,g,T]),Yo(g,f);let O=()=>{let e=x(S,g);if(e)return JSON.stringify(e)},k=(0,b.useSyncExternalStore)(e=>Ga(S,e),O,O),A;return A=k?JSON.parse(k):i===void 0?{flexGrow:1}:{flexGrow:void 0,flexShrink:void 0,flexBasis:i},(0,H.jsx)(`div`,{...m,"data-disabled":a||void 0,"data-panel":!0,"data-testid":g,id:g,ref:y,style:{...Zo,display:`flex`,flexBasis:0,flexShrink:1,overflow:`visible`,...A},children:(0,H.jsx)(`div`,{className:t,style:{maxHeight:`100%`,maxWidth:`100%`,flexGrow:1,overflow:`auto`,...p,touchAction:C===`horizontal`?`pan-y`:`pan-x`},children:e})})}Xo.displayName=`Panel`;var Zo={minHeight:0,maxHeight:`100%`,height:`auto`,minWidth:0,maxWidth:`100%`,width:`auto`,border:`none`,borderWidth:0,padding:0,margin:0};function Qo({layout:e,panelConstraints:t,panelId:n,panelIndex:r}){let i,a,o=e[n],s=t.find(e=>e.panelId===n);if(s){let c=s.maxSize,l=s.collapsible?s.collapsedSize:s.minSize,u=[r,r+1];a=ho({layout:po({delta:l-o,initialLayout:e,panelConstraints:t,pivotIndices:u,prevLayout:e}),panelConstraints:t})[n],i=ho({layout:po({delta:c-o,initialLayout:e,panelConstraints:t,pivotIndices:u,prevLayout:e}),panelConstraints:t})[n]}return{valueControls:n,valueMax:i,valueMin:a,valueNow:o}}function $o({children:e,className:t,disabled:n,disableDoubleClick:r,elementRef:i,id:a,style:o,...s}){let c=Io(a),l=Bo({disabled:n,disableDoubleClick:r}),[u,d]=(0,b.useState)({}),[f,p]=(0,b.useState)(`inactive`),[m,h]=(0,b.useState)(!1),g=(0,b.useRef)(null),_=zo(g,i),{disableCursor:v,id:y,orientation:x,registerSeparator:S,updateSeparatorProps:C}=Jo(),w=x===`horizontal`?`vertical`:`horizontal`;Lo(()=>{let e=g.current;if(e!==null){let t={disabled:l.disabled,disableDoubleClick:l.disableDoubleClick,element:e,id:c},n=S(t),r=Ca(e=>{p(e.next.state!==`inactive`&&e.next.hitRegions.some(e=>e.separator===t)?e.next.state:`inactive`)}),i=Ga(y,e=>{let{derivedPanelConstraints:n,layout:r,separatorToPanels:i}=e.next,a=i.get(t);if(a){let e=a[0],t=a.indexOf(e);d(Qo({layout:r,panelConstraints:n,panelId:e.id,panelIndex:t}))}});return()=>{r(),i(),n()}}},[y,c,S,l]),(0,b.useEffect)(()=>{C(c,{disabled:n,disableDoubleClick:r})},[n,r,c,C]);let T;n&&!v&&(T=`not-allowed`);let E;if(n)E=`disabled`;else switch(f){case`active`:E=`active`;break;default:E=m?`focus`:f}return(0,H.jsx)(`div`,{...s,"aria-controls":u.valueControls,"aria-disabled":n||void 0,"aria-orientation":w,"aria-valuemax":u.valueMax,"aria-valuemin":u.valueMin,"aria-valuenow":u.valueNow,children:e,className:t,"data-separator":E,"data-testid":c,id:c,onBlur:()=>h(!1),onFocus:()=>h(!0),ref:_,role:`separator`,style:{flexBasis:`auto`,cursor:T,...o,flexGrow:0,flexShrink:0,touchAction:`none`},tabIndex:n?void 0:0})}$o.displayName=`Separator`;var es=e=>{let t,n=new Set,r=(e,r)=>{let i=typeof e==`function`?e(t):e;if(!Object.is(i,t)){let e=t;t=r??(typeof i!=`object`||!i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e))},o=t=e(r,i,a);return a},ts=(e=>e?es(e):es),ns=e=>e;function rs(e,t=ns){let n=b.useSyncExternalStore(e.subscribe,b.useCallback(()=>t(e.getState()),[e,t]),b.useCallback(()=>t(e.getInitialState()),[e,t]));return b.useDebugValue(n),n}var is=e=>{let t=ts(e),n=e=>rs(t,e);return Object.assign(n,t),n},as=(e=>e?is(e):is),os=as()(e=>({status:`idle`,requiresAuth:!1,hasAuthRequiredTools:!1,isSignedIn:!1,error:null,setStatus:t=>e({status:t}),setRequiresAuth:t=>e({requiresAuth:t}),setHasAuthRequiredTools:t=>e({hasAuthRequiredTools:t}),setIsSignedIn:t=>e({isSignedIn:t}),setError:t=>e({error:t}),reset:()=>e({status:`idle`,requiresAuth:!1,hasAuthRequiredTools:!1,isSignedIn:!1,error:null})}));function ss(e,t){let n;try{n=e()}catch{return}return{getItem:e=>{let r=e=>e===null?null:JSON.parse(e,t?.reviver),i=n.getItem(e)??null;return i instanceof Promise?i.then(r):r(i)},setItem:(e,r)=>n.setItem(e,JSON.stringify(r,t?.replacer)),removeItem:e=>n.removeItem(e)}}var cs=e=>t=>{try{let n=e(t);return n instanceof Promise?n:{then(e){return cs(e)(n)},catch(e){return this}}}catch(e){return{then(e){return this},catch(t){return cs(t)(e)}}}},ls=(e,t)=>(n,r,i)=>{let a={storage:ss(()=>window.localStorage),partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},o=!1,s=0,c=new Set,l=new Set,u=a.storage;if(!u)return e((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),n(...e)},r,i);let d=()=>{let e=a.partialize({...r()});return u.setItem(a.name,{state:e,version:a.version})},f=i.setState;i.setState=(e,t)=>(f(e,t),d());let p=e((...e)=>(n(...e),d()),r,i);i.getInitialState=()=>p;let m,h=()=>{if(!u)return;let e=++s;o=!1,c.forEach(e=>e(r()??p));let t=a.onRehydrateStorage?.call(a,r()??p)||void 0;return cs(u.getItem.bind(u))(a.name).then(e=>{if(e)if(typeof e.version==`number`&&e.version!==a.version){if(a.migrate){let t=a.migrate(e.state,e.version);return t instanceof Promise?t.then(e=>[!0,e]):[!0,t]}console.error(`State loaded from storage couldn't be migrated since no migrate function was provided`)}else return[!1,e.state];return[!1,void 0]}).then(t=>{if(e!==s)return;let[i,o]=t;if(m=a.merge(o,r()??p),n(m,!0),i)return d()}).then(()=>{e===s&&(t?.(r(),void 0),m=r(),o=!0,l.forEach(e=>e(m)))}).catch(n=>{e===s&&t?.(void 0,n)})};return i.persist={setOptions:e=>{a={...a,...e},e.storage&&(u=e.storage)},clearStorage:()=>{u?.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>h(),hasHydrated:()=>o,onHydrate:e=>(c.add(e),()=>{c.delete(e)}),onFinishHydration:e=>(l.add(e),()=>{l.delete(e)})},a.skipHydration||h(),m||p},us={theme:`light`,locale:`en-US`,displayMode:`inline`,maxHeight:void 0,safeArea:{insets:{top:0,bottom:0,left:0,right:0}},userAgent:{device:{type:`desktop`},capabilities:{hover:!0,touch:!1}}},ds=as()(ls(e=>({...us,previewClient:null,setPreference:(t,n)=>e({[t]:n}),setPreviewClient:t=>e({previewClient:t})}),{name:`skybridge-devtools-inspector-preferences`,version:2,migrate:(e,t)=>{let n=e;return t<2&&delete n.displayMode,n},partialize:({displayMode:e,previewClient:t,setPreference:n,setPreviewClient:r,...i})=>i})),fs=()=>{let{setPreference:e,setPreviewClient:t,previewClient:n,...r}=ds.getState();return r},ps=e=>e?.device?.type===`mobile`,ms=()=>ds(e=>ps(e.userAgent)),hs=(e,t)=>e===`pip`?t.previewClient===`claude`?t.displayMode===`modal`?`inline`:t.displayMode:t.previewClient===`chatgpt`&&ps(t.userAgent)?`fullscreen`:e:e,gs=Object.create,_s=Object.defineProperty,vs=Object.getOwnPropertyDescriptor,ys=Object.getOwnPropertyNames,bs=Object.getPrototypeOf,xs=Object.prototype.hasOwnProperty,Ss=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Cs=(e,t)=>{let n={};for(var r in e)_s(n,r,{get:e[r],enumerable:!0});return t&&_s(n,Symbol.toStringTag,{value:`Module`}),n},ws=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=ys(t),a=0,o=i.length,s;a<o;a++)s=i[a],!xs.call(e,s)&&s!==n&&_s(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=vs(t,s))||r.enumerable});return e},Ts=(e,t,n)=>(n=e==null?{}:gs(bs(e)),ws(t||!e||!e.__esModule?_s(n,`default`,{value:e,enumerable:!0}):n,e)),Es=new Set([`https://json-schema.org/draft/2020-12/schema`,`http://json-schema.org/draft/2020-12/schema`]),Ds=new Set([`https://json-schema.org/draft/2019-09/schema`,`http://json-schema.org/draft/2019-09/schema`]),Os=new Set([`https://json-schema.org/draft-07/schema`,`http://json-schema.org/draft-07/schema`]),ks=new Set([`https://json-schema.org/draft-06/schema`,`http://json-schema.org/draft-06/schema`]);function As(e){return typeof e==`string`&&Ds.has(e.replace(/#$/,``))}function js(e,t){if(!(`$schema`in e)||typeof e.$schema!=`string`)return`2020-12`;let n=e.$schema.replace(/#$/,``);if(Es.has(n))return`2020-12`;if(Ds.has(n))return`2019-09`;if(Os.has(n)||ks.has(n))return`draft-7`;throw Error(`JSON Schema declares an unsupported dialect ("$schema": "${e.$schema.slice(0,200)}"). The default validator supports JSON Schema 2020-12, 2019-09, draft-07, and draft-06; ${t}`)}var Ms,Ns=Object.freeze({status:`aborted`});function U(e,t,n){function r(n,r){if(n._zod||Object.defineProperty(n,"_zod",{value:{def:r,constr:o,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,r);let i=o.prototype,a=Object.keys(i);for(let e=0;e<a.length;e++){let t=a[e];t in n||(n[t]=i[t].bind(n))}}let i=n?.Parent??Object;class a extends i{}Object.defineProperty(a,"name",{value:e});function o(e){var t;let i=n?.Parent?new a:this;r(i,e),(t=i._zod).deferred??(t.deferred=[]);for(let e of i._zod.deferred)e();return i}return Object.defineProperty(o,"init",{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:t=>n?.Parent&&t instanceof n.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(o,"name",{value:e}),o}var Ps=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},Fs=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(Ms=globalThis).__zod_globalConfig??(Ms.__zod_globalConfig={});var Is=globalThis.__zod_globalConfig;function Ls(e){return e&&Object.assign(Is,e),Is}function Rs(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function zs(e,t){return typeof t==`bigint`?t.toString():t}function Bs(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}throw Error(`cached value already set`)}}}function Vs(e){return e==null}function Hs(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function Us(e,t){let n=e/t,r=Math.round(n),i=2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)<i?0:n-r}var Ws=Symbol(`evaluating`);function Gs(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==Ws)return r===void 0&&(r=Ws,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function Ks(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function qs(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function Js(e){return JSON.stringify(e)}function Ys(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var Xs=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function Zs(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var Qs=Bs(()=>{if(Is.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function $s(e){if(Zs(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return!(Zs(n)===!1||Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)===!1)}function ec(e){return $s(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var tc=new Set([`string`,`number`,`symbol`]);function nc(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function rc(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function W(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function ic(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}var ac={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function oc(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return rc(e,qs(e._zod.def,{get shape(){let e={};for(let r in t){if(!(r in n.shape))throw Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return Ks(this,`shape`,e),e},checks:[]}))}function sc(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return rc(e,qs(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e in t){if(!(e in n.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return Ks(this,`shape`,r),r},checks:[]}))}function cc(e,t){if(!$s(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e in t)if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return rc(e,qs(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return Ks(this,`shape`,n),n}}))}function lc(e,t){if(!$s(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return rc(e,qs(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return Ks(this,`shape`,n),n}}))}function uc(e,t){if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);return rc(e,qs(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return Ks(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function dc(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw Error(`.partial() cannot be used on object schemas containing refinements`);return rc(t,qs(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in r))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t in r)i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return Ks(this,`shape`,i),i},checks:[]}))}function fc(e,t,n){return rc(t,qs(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t in r)i[t]=new e({type:`nonoptional`,innerType:r[t]});return Ks(this,`shape`,i),i}}))}function pc(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function mc(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function hc(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function gc(e){return typeof e==`string`?e:e?.message}function _c(e,t,n){let r=e.message?e.message:gc(e.inst?._zod.def?.error?.(e))??gc(t?.error?.(e))??gc(n.customError?.(e))??gc(n.localeError?.(e))??`Invalid input`,{inst:i,continue:a,input:o,...s}=e;return s.path??=[],s.message=r,t?.reportInput&&(s.input=o),s}function vc(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function yc(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}var bc=(e,t)=>{e.name=`$ZodError`,Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,zs,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},xc=U(`$ZodError`,bc),Sc=U(`$ZodError`,bc,{Parent:Error});function Cc(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}function wc(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;i<e.length;){let n=e[i];i===e.length-1?(r[n]=r[n]||{_errors:[]},r[n]._errors.push(t(a))):r[n]=r[n]||{_errors:[]},r=r[n],i++}}}};return r(e),n}var Tc=e=>(t,n,r,i)=>{let a=r?{...r,async:!1}:{async:!1},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise)throw new Ps;if(o.issues.length){let t=new((i?.Err)??e)(o.issues.map(e=>_c(e,a,Ls())));throw Xs(t,i?.callee),t}return o.value},Ec=e=>async(t,n,r,i)=>{let a=r?{...r,async:!0}:{async:!0},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise&&(o=await o),o.issues.length){let t=new((i?.Err)??e)(o.issues.map(e=>_c(e,a,Ls())));throw Xs(t,i?.callee),t}return o.value},Dc=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new Ps;return a.issues.length?{success:!1,error:new(e??xc)(a.issues.map(e=>_c(e,i,Ls())))}:{success:!0,data:a.value}},Oc=Dc(Sc),kc=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>_c(e,i,Ls())))}:{success:!0,data:a.value}},Ac=kc(Sc),jc=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Tc(e)(t,n,i)},Mc=e=>(t,n,r)=>Tc(e)(t,n,r),Nc=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Ec(e)(t,n,i)},Pc=e=>async(t,n,r)=>Ec(e)(t,n,r),Fc=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Dc(e)(t,n,i)},Ic=e=>(t,n,r)=>Dc(e)(t,n,r),Lc=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return kc(e)(t,n,i)},Rc=e=>async(t,n,r)=>kc(e)(t,n,r),zc=/^[cC][0-9a-z]{6,}$/,Bc=/^[0-9a-z]+$/,Vc=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Hc=/^[0-9a-vA-V]{20}$/,Uc=/^[A-Za-z0-9]{27}$/,Wc=/^[a-zA-Z0-9_-]{21}$/,Gc=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Kc=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,qc=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Jc=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Yc=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;function Xc(){return new RegExp(Yc,`u`)}var Zc=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Qc=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,$c=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,el=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,tl=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,nl=/^[A-Za-z0-9_-]*$/,rl=/^https?$/,il=/^\+[1-9]\d{6,14}$/,al=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`,ol=RegExp(`^${al}$`);function sl(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function cl(e){return RegExp(`^${sl(e)}$`)}function ll(e){let t=sl({precision:e.precision}),n=[`Z`];e.local&&n.push(``),e.offset&&n.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let r=`${t}(?:${n.join(`|`)})`;return RegExp(`^${al}T(?:${r})$`)}var ul=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},dl=/^-?\d+$/,fl=/^-?\d+(?:\.\d+)?$/,pl=/^(?:true|false)$/i,ml=/^null$/i,hl=/^[^A-Z]*$/,gl=/^[^a-z]*$/,_l=U(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),vl={number:`number`,bigint:`bigint`,object:`date`},yl=U(`$ZodCheckLessThan`,(e,t)=>{_l.init(e,t);let n=vl[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??1/0;t.value<r&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),bl=U(`$ZodCheckGreaterThan`,(e,t)=>{_l.init(e,t);let n=vl[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??-1/0;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),xl=U(`$ZodCheckMultipleOf`,(e,t)=>{_l.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?n.value%t.value===BigInt(0):Us(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),Sl=U(`$ZodCheckNumberFormat`,(e,t)=>{_l.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=ac[t.format];e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,r.minimum=i,r.maximum=a,n&&(r.pattern=dl)}),e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),Cl=U(`$ZodCheckMaxLength`,(e,t)=>{var n;_l.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!Vs(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;if(r.length<=t.maximum)return;let i=vc(r);n.issues.push({origin:i,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),wl=U(`$ZodCheckMinLength`,(e,t)=>{var n;_l.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!Vs(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;if(r.length>=t.minimum)return;let i=vc(r);n.issues.push({origin:i,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Tl=U(`$ZodCheckLengthEquals`,(e,t)=>{var n;_l.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!Vs(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length;if(i===t.length)return;let a=vc(r),o=i>t.length;n.issues.push({origin:a,...o?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),El=U(`$ZodCheckStringFormat`,(e,t)=>{var n,r;_l.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),Dl=U(`$ZodCheckRegex`,(e,t)=>{El.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Ol=U(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=hl,El.init(e,t)}),kl=U(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=gl,El.init(e,t)}),Al=U(`$ZodCheckIncludes`,(e,t)=>{_l.init(e,t);let n=nc(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),jl=U(`$ZodCheckStartsWith`,(e,t)=>{_l.init(e,t);let n=RegExp(`^${nc(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),Ml=U(`$ZodCheckEndsWith`,(e,t)=>{_l.init(e,t);let n=RegExp(`.*${nc(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),Nl=U(`$ZodCheckOverwrite`,(e,t)=>{_l.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),Pl=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
11
+ `).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.args,n=[...(this?.content??[``]).map(e=>` ${e}`)];return new e(...t,n.join(`
12
+ `))}},Fl={major:4,minor:4,patch:3},Il=U(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Fl;let r=[...e._zod.def.checks??[]];e._zod.traits.has(`$ZodCheck`)&&r.unshift(e);for(let t of r)for(let n of t._zod.onattach)n(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(e,t,n)=>{let r=pc(e),i;for(let a of t){if(a._zod.def.when){if(mc(e)||!a._zod.def.when(e))continue}else if(r)continue;let t=e.issues.length,o=a._zod.check(e);if(o instanceof Promise&&n?.async===!1)throw new Ps;if(i||o instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await o,e.issues.length!==t&&(r||=pc(e,t))});else{if(e.issues.length===t)continue;r||=pc(e,t)}}return i?i.then(()=>e):e},n=(n,i,a)=>{if(pc(n))return n.aborted=!0,n;let o=t(i,r,a);if(o instanceof Promise){if(a.async===!1)throw new Ps;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(i,a)=>{if(a.skipChecks)return e._zod.parse(i,a);if(a.direction===`backward`){let t=e._zod.parse({value:i.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,i,a)):n(t,i,a)}let o=e._zod.parse(i,a);if(o instanceof Promise){if(a.async===!1)throw new Ps;return o.then(e=>t(e,r,a))}return t(o,r,a)}}Gs(e,`~standard`,()=>({validate:t=>{try{let n=Oc(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch{return Ac(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:`zod`,version:1}))}),Ll=U(`$ZodString`,(e,t)=>{Il.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??ul(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),Rl=U(`$ZodStringFormat`,(e,t)=>{El.init(e,t),Ll.init(e,t)}),zl=U(`$ZodGUID`,(e,t)=>{t.pattern??=Kc,Rl.init(e,t)}),Bl=U(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=qc(e)}else t.pattern??=qc();Rl.init(e,t)}),Vl=U(`$ZodEmail`,(e,t)=>{t.pattern??=Jc,Rl.init(e,t)}),Hl=U(`$ZodURL`,(e,t)=>{Rl.init(e,t),e._zod.check=n=>{try{let r=n.value.trim();if(!t.normalize&&t.protocol?.source===rl.source&&!/^https?:\/\//i.test(r)){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}let i=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(`:`)?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=i.href:n.value=r;return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),Ul=U(`$ZodEmoji`,(e,t)=>{t.pattern??=Xc(),Rl.init(e,t)}),Wl=U(`$ZodNanoID`,(e,t)=>{t.pattern??=Wc,Rl.init(e,t)}),Gl=U(`$ZodCUID`,(e,t)=>{t.pattern??=zc,Rl.init(e,t)}),Kl=U(`$ZodCUID2`,(e,t)=>{t.pattern??=Bc,Rl.init(e,t)}),ql=U(`$ZodULID`,(e,t)=>{t.pattern??=Vc,Rl.init(e,t)}),Jl=U(`$ZodXID`,(e,t)=>{t.pattern??=Hc,Rl.init(e,t)}),Yl=U(`$ZodKSUID`,(e,t)=>{t.pattern??=Uc,Rl.init(e,t)}),Xl=U(`$ZodISODateTime`,(e,t)=>{t.pattern??=ll(t),Rl.init(e,t)}),Zl=U(`$ZodISODate`,(e,t)=>{t.pattern??=ol,Rl.init(e,t)}),Ql=U(`$ZodISOTime`,(e,t)=>{t.pattern??=cl(t),Rl.init(e,t)}),$l=U(`$ZodISODuration`,(e,t)=>{t.pattern??=Gc,Rl.init(e,t)}),eu=U(`$ZodIPv4`,(e,t)=>{t.pattern??=Zc,Rl.init(e,t),e._zod.bag.format=`ipv4`}),tu=U(`$ZodIPv6`,(e,t)=>{t.pattern??=Qc,Rl.init(e,t),e._zod.bag.format=`ipv6`,e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}}),nu=U(`$ZodCIDRv4`,(e,t)=>{t.pattern??=$c,Rl.init(e,t)}),ru=U(`$ZodCIDRv6`,(e,t)=>{t.pattern??=el,Rl.init(e,t),e._zod.check=n=>{let r=n.value.split(`/`);try{if(r.length!==2)throw Error();let[e,t]=r;if(!t)throw Error();let n=Number(t);if(`${n}`!==t||n<0||n>128)throw Error();new URL(`http://[${e}]`)}catch{n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}}});function iu(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var au=U(`$ZodBase64`,(e,t)=>{t.pattern??=tl,Rl.init(e,t),e._zod.bag.contentEncoding=`base64`,e._zod.check=n=>{iu(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}});function ou(e){if(!nl.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return iu(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var su=U(`$ZodBase64URL`,(e,t)=>{t.pattern??=nl,Rl.init(e,t),e._zod.bag.contentEncoding=`base64url`,e._zod.check=n=>{ou(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),cu=U(`$ZodE164`,(e,t)=>{t.pattern??=il,Rl.init(e,t)});function lu(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}var uu=U(`$ZodJWT`,(e,t)=>{Rl.init(e,t),e._zod.check=n=>{lu(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),du=U(`$ZodNumber`,(e,t)=>{Il.init(e,t),e._zod.pattern=e._zod.bag.pattern??fl,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:`Infinity`:void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),fu=U(`$ZodNumberFormat`,(e,t)=>{Sl.init(e,t),du.init(e,t)}),pu=U(`$ZodBoolean`,(e,t)=>{Il.init(e,t),e._zod.pattern=pl,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),mu=U(`$ZodNull`,(e,t)=>{Il.init(e,t),e._zod.pattern=ml,e._zod.values=new Set([null]),e._zod.parse=(t,n)=>{let r=t.value;return r===null||t.issues.push({expected:`null`,code:`invalid_type`,input:r,inst:e}),t}}),hu=U(`$ZodAny`,(e,t)=>{Il.init(e,t),e._zod.parse=e=>e}),gu=U(`$ZodUnknown`,(e,t)=>{Il.init(e,t),e._zod.parse=e=>e}),_u=U(`$ZodNever`,(e,t)=>{Il.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function vu(e,t,n){e.issues.length&&t.issues.push(...hc(n,e.issues)),t.value[n]=e.value}var yu=U(`$ZodArray`,(e,t)=>{Il.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!Array.isArray(i))return n.issues.push({expected:`array`,code:`invalid_type`,input:i,inst:e}),n;n.value=Array(i.length);let a=[];for(let e=0;e<i.length;e++){let o=i[e],s=t.element._zod.run({value:o,issues:[]},r);s instanceof Promise?a.push(s.then(t=>vu(t,n,e))):vu(s,n,e)}return a.length?Promise.all(a).then(()=>n):n}});function bu(e,t,n,r,i,a){let o=n in r;if(e.issues.length){if(i&&a&&!o)return;t.issues.push(...hc(n,e.issues))}if(!o&&!i){e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]});return}e.value===void 0?o&&(t.value[n]=void 0):t.value[n]=e.value}function xu(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${n}": expected a Zod schema`);let n=ic(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function Su(e,t,n,r,i,a){let o=[],s=i.keySet,c=i.catchall._zod,l=c.def.type,u=c.optin===`optional`,d=c.optout===`optional`;for(let i in t){if(i===`__proto__`||s.has(i))continue;if(l===`never`){o.push(i);continue}let a=c.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>bu(e,n,i,t,u,d))):bu(a,n,i,t,u,d)}return o.length&&n.issues.push({code:`unrecognized_keys`,keys:o,input:t,inst:a}),e.length?Promise.all(e).then(()=>n):n}var Cu=U(`$ZodObject`,(e,t)=>{if(Il.init(e,t),!Object.getOwnPropertyDescriptor(t,`shape`)?.get){let e=t.shape;Object.defineProperty(t,"shape",{get:()=>{let n={...e};return Object.defineProperty(t,"shape",{value:n}),n}})}let n=Bs(()=>xu(t));Gs(e._zod,`propValues`,()=>{let e=t.shape,n={};for(let t in e){let r=e[t]._zod;if(r.values){n[t]??(n[t]=new Set);for(let e of r.values)n[t].add(e)}}return n});let r=Zs,i=t.catchall,a;e._zod.parse=(t,o)=>{a??=n.value;let s=t.value;if(!r(s))return t.issues.push({expected:`object`,code:`invalid_type`,input:s,inst:e}),t;t.value={};let c=[],l=a.shape;for(let e of a.keys){let n=l[e],r=n._zod.optin===`optional`,i=n._zod.optout===`optional`,a=n._zod.run({value:s[e],issues:[]},o);a instanceof Promise?c.push(a.then(n=>bu(n,t,e,s,r,i))):bu(a,t,e,s,r,i)}return i?Su(c,s,t,o,n.value,e):c.length?Promise.all(c).then(()=>t):t}}),wu=U(`$ZodObjectJIT`,(e,t)=>{Cu.init(e,t);let n=e._zod.parse,r=Bs(()=>xu(t)),i=e=>{let t=new Pl([`shape`,`payload`,`ctx`]),n=r.value,i=e=>{let t=Js(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write(`const input = payload.value;`);let a=Object.create(null),o=0;for(let e of n.keys)a[e]=`key_${o++}`;t.write(`const newResult = {};`);for(let r of n.keys){let n=a[r],o=Js(r),s=e[r],c=s?._zod?.optin===`optional`,l=s?._zod?.optout===`optional`;t.write(`const ${n} = ${i(r)};`),c&&l?t.write(`
13
+ if (${n}.issues.length) {
14
+ if (${o} in input) {
15
+ payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
16
+ ...iss,
17
+ path: iss.path ? [${o}, ...iss.path] : [${o}]
18
+ })));
19
+ }
20
+ }
21
+
22
+ if (${n}.value === undefined) {
23
+ if (${o} in input) {
24
+ newResult[${o}] = undefined;
25
+ }
26
+ } else {
27
+ newResult[${o}] = ${n}.value;
28
+ }
29
+
30
+ `):c?t.write(`
31
+ if (${n}.issues.length) {
32
+ payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
33
+ ...iss,
34
+ path: iss.path ? [${o}, ...iss.path] : [${o}]
35
+ })));
36
+ }
37
+
38
+ if (${n}.value === undefined) {
39
+ if (${o} in input) {
40
+ newResult[${o}] = undefined;
41
+ }
42
+ } else {
43
+ newResult[${o}] = ${n}.value;
44
+ }
45
+
46
+ `):t.write(`
47
+ const ${n}_present = ${o} in input;
48
+ if (${n}.issues.length) {
49
+ payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
50
+ ...iss,
51
+ path: iss.path ? [${o}, ...iss.path] : [${o}]
52
+ })));
53
+ }
54
+ if (!${n}_present && !${n}.issues.length) {
55
+ payload.issues.push({
56
+ code: "invalid_type",
57
+ expected: "nonoptional",
58
+ input: undefined,
59
+ path: [${o}]
60
+ });
61
+ }
62
+
63
+ if (${n}_present) {
64
+ if (${n}.value === undefined) {
65
+ newResult[${o}] = undefined;
66
+ } else {
67
+ newResult[${o}] = ${n}.value;
68
+ }
69
+ }
70
+
71
+ `)}t.write(`payload.value = newResult;`),t.write(`return payload;`);let s=t.compile();return(t,n)=>s(e,t,n)},a,o=Zs,s=!Is.jitless,c=s&&Qs.value,l=t.catchall,u;e._zod.parse=(d,f)=>{u??=r.value;let p=d.value;return o(p)?s&&c&&f?.async===!1&&f.jitless!==!0?(a||=i(t.shape),d=a(d,f),l?Su([],p,d,f,u,e):d):n(d,f):(d.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),d)}});function Tu(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!pc(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>_c(e,r,Ls())))}),t)}var Eu=U(`$ZodUnion`,(e,t)=>{Il.init(e,t),Gs(e._zod,`optin`,()=>t.options.some(e=>e._zod.optin===`optional`)?`optional`:void 0),Gs(e._zod,`optout`,()=>t.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),Gs(e._zod,`values`,()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),Gs(e._zod,`pattern`,()=>{if(t.options.every(e=>e._zod.pattern)){let e=t.options.map(e=>e._zod.pattern);return RegExp(`^(${e.map(e=>Hs(e.source)).join(`|`)})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(t.issues.length===0)return t;o.push(t)}}return a?Promise.all(o).then(t=>Tu(t,r,e,i)):Tu(o,r,e,i)}}),Du=U(`$ZodDiscriminatedUnion`,(e,t)=>{t.inclusive=!1,Eu.init(e,t);let n=e._zod.parse;Gs(e._zod,`propValues`,()=>{let e={};for(let n of t.options){let r=n._zod.propValues;if(!r||Object.keys(r).length===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(n)}"`);for(let[t,n]of Object.entries(r)){e[t]||(e[t]=new Set);for(let r of n)e[t].add(r)}}return e});let r=Bs(()=>{let e=t.options,n=new Map;for(let r of e){let e=r._zod.propValues?.[t.discriminator];if(!e||e.size===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(r)}"`);for(let t of e){if(n.has(t))throw Error(`Duplicate discriminator value "${String(t)}"`);n.set(t,r)}}return n});e._zod.parse=(i,a)=>{let o=i.value;if(!Zs(o))return i.issues.push({code:`invalid_type`,expected:`object`,input:o,inst:e}),i;let s=r.value.get(o?.[t.discriminator]);return s?s._zod.run(i,a):t.unionFallback||a.direction===`backward`?n(i,a):(i.issues.push({code:`invalid_union`,errors:[],note:`No matching discriminator`,discriminator:t.discriminator,options:Array.from(r.value.keys()),input:o,path:[t.discriminator],inst:e}),i)}}),Ou=U(`$ZodIntersection`,(e,t)=>{Il.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>Au(e,t,n)):Au(e,i,a)}});function ku(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if($s(e)&&$s(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=ku(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=ku(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function Au(e,t,n){let r=new Map,i;for(let n of t.issues)if(n.code===`unrecognized_keys`){i??=n;for(let e of n.keys)r.has(e)||r.set(e,{}),r.get(e).l=!0}else e.issues.push(n);for(let t of n.issues)if(t.code===`unrecognized_keys`)for(let e of t.keys)r.has(e)||r.set(e,{}),r.get(e).r=!0;else e.issues.push(t);let a=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(a.length&&i&&e.issues.push({...i,keys:a}),pc(e))return e;let o=ku(t.value,n.value);if(!o.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}var ju=U(`$ZodRecord`,(e,t)=>{Il.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!$s(i))return n.issues.push({expected:`record`,code:`invalid_type`,input:i,inst:e}),n;let a=[],o=t.keyType._zod.values;if(o){n.value={};let s=new Set;for(let c of o)if(typeof c==`string`||typeof c==`number`||typeof c==`symbol`){s.add(typeof c==`number`?c.toString():c);let o=t.keyType._zod.run({value:c,issues:[]},r);if(o instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(o.issues.length){n.issues.push({code:`invalid_key`,origin:`record`,issues:o.issues.map(e=>_c(e,r,Ls())),input:c,path:[c],inst:e});continue}let l=o.value,u=t.valueType._zod.run({value:i[c],issues:[]},r);u instanceof Promise?a.push(u.then(e=>{e.issues.length&&n.issues.push(...hc(c,e.issues)),n.value[l]=e.value})):(u.issues.length&&n.issues.push(...hc(c,u.issues)),n.value[l]=u.value)}let c;for(let e in i)s.has(e)||(c??=[],c.push(e));c&&c.length>0&&n.issues.push({code:`unrecognized_keys`,input:i,inst:e,keys:c})}else{n.value={};for(let o of Reflect.ownKeys(i)){if(o===`__proto__`||!Object.prototype.propertyIsEnumerable.call(i,o))continue;let s=t.keyType._zod.run({value:o,issues:[]},r);if(s instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(typeof o==`string`&&fl.test(o)&&s.issues.length){let e=t.keyType._zod.run({value:Number(o),issues:[]},r);if(e instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);e.issues.length===0&&(s=e)}if(s.issues.length){t.mode===`loose`?n.value[o]=i[o]:n.issues.push({code:`invalid_key`,origin:`record`,issues:s.issues.map(e=>_c(e,r,Ls())),input:o,path:[o],inst:e});continue}let c=t.valueType._zod.run({value:i[o],issues:[]},r);c instanceof Promise?a.push(c.then(e=>{e.issues.length&&n.issues.push(...hc(o,e.issues)),n.value[s.value]=e.value})):(c.issues.length&&n.issues.push(...hc(o,c.issues)),n.value[s.value]=c.value)}}return a.length?Promise.all(a).then(()=>n):n}}),Mu=U(`$ZodEnum`,(e,t)=>{Il.init(e,t);let n=Rs(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=RegExp(`^(${n.filter(e=>tc.has(typeof e)).map(e=>typeof e==`string`?nc(e):e.toString()).join(`|`)})$`),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),Nu=U(`$ZodLiteral`,(e,t)=>{if(Il.init(e,t),t.values.length===0)throw Error(`Cannot create literal schema with no valid values`);let n=new Set(t.values);e._zod.values=n,e._zod.pattern=RegExp(`^(${t.values.map(e=>typeof e==`string`?nc(e):e?nc(e.toString()):String(e)).join(`|`)})$`),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}}),Pu=U(`$ZodTransform`,(e,t)=>{Il.init(e,t),e._zod.optin=`optional`,e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new Fs(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n.fallback=!0,n));if(i instanceof Promise)throw new Ps;return n.value=i,n.fallback=!0,n}});function Fu(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}var Iu=U(`$ZodOptional`,(e,t)=>{Il.init(e,t),e._zod.optin=`optional`,e._zod.optout=`optional`,Gs(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Gs(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${Hs(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(t.innerType._zod.optin===`optional`){let r=e.value,i=t.innerType._zod.run(e,n);return i instanceof Promise?i.then(e=>Fu(e,r)):Fu(i,r)}return e.value===void 0?e:t.innerType._zod.run(e,n)}}),Lu=U(`$ZodExactOptional`,(e,t)=>{Iu.init(e,t),Gs(e._zod,`values`,()=>t.innerType._zod.values),Gs(e._zod,`pattern`,()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),Ru=U(`$ZodNullable`,(e,t)=>{Il.init(e,t),Gs(e._zod,`optin`,()=>t.innerType._zod.optin),Gs(e._zod,`optout`,()=>t.innerType._zod.optout),Gs(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${Hs(e.source)}|null)$`):void 0}),Gs(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),zu=U(`$ZodDefault`,(e,t)=>{Il.init(e,t),e._zod.optin=`optional`,Gs(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>Bu(e,t)):Bu(r,t)}});function Bu(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var Vu=U(`$ZodPrefault`,(e,t)=>{Il.init(e,t),e._zod.optin=`optional`,Gs(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),Hu=U(`$ZodNonOptional`,(e,t)=>{Il.init(e,t),Gs(e._zod,`values`,()=>{let e=t.innerType._zod.values;return e?new Set([...e].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>Uu(t,e)):Uu(i,e)}});function Uu(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}var Wu=U(`$ZodCatch`,(e,t)=>{Il.init(e,t),e._zod.optin=`optional`,Gs(e._zod,`optout`,()=>t.innerType._zod.optout),Gs(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>_c(e,n,Ls()))},input:e.value}),e.issues=[],e.fallback=!0),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>_c(e,n,Ls()))},input:e.value}),e.issues=[],e.fallback=!0),e)}}),Gu=U(`$ZodPipe`,(e,t)=>{Il.init(e,t),Gs(e._zod,`values`,()=>t.in._zod.values),Gs(e._zod,`optin`,()=>t.in._zod.optin),Gs(e._zod,`optout`,()=>t.out._zod.optout),Gs(e._zod,`propValues`,()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>Ku(e,t.in,n)):Ku(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>Ku(e,t.out,n)):Ku(r,t.out,n)}});function Ku(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}var qu=U(`$ZodPreprocess`,(e,t)=>{Gu.init(e,t)}),Ju=U(`$ZodReadonly`,(e,t)=>{Il.init(e,t),Gs(e._zod,`propValues`,()=>t.innerType._zod.propValues),Gs(e._zod,`values`,()=>t.innerType._zod.values),Gs(e._zod,`optin`,()=>t.innerType?._zod?.optin),Gs(e._zod,`optout`,()=>t.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(Yu):Yu(r)}});function Yu(e){return e.value=Object.freeze(e.value),e}var Xu=U(`$ZodLazy`,(e,t)=>{Il.init(e,t),Gs(e._zod,`innerType`,()=>{let e=t;return e._cachedInner||=t.getter(),e._cachedInner}),Gs(e._zod,`pattern`,()=>e._zod.innerType?._zod?.pattern),Gs(e._zod,`propValues`,()=>e._zod.innerType?._zod?.propValues),Gs(e._zod,`optin`,()=>e._zod.innerType?._zod?.optin??void 0),Gs(e._zod,`optout`,()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(t,n)=>e._zod.innerType._zod.run(t,n)}),Zu=U(`$ZodCustom`,(e,t)=>{_l.init(e,t),Il.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>Qu(t,n,r,e));Qu(i,n,r,e)}});function Qu(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(yc(e))}}var $u,ed=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function td(){return new ed}($u=globalThis).__zod_globalRegistry??($u.__zod_globalRegistry=td());var nd=globalThis.__zod_globalRegistry;function rd(e,t){return new e({type:`string`,...W(t)})}function id(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...W(t)})}function ad(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...W(t)})}function od(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...W(t)})}function sd(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...W(t)})}function cd(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...W(t)})}function ld(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...W(t)})}function ud(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...W(t)})}function dd(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...W(t)})}function fd(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...W(t)})}function pd(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...W(t)})}function md(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...W(t)})}function hd(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...W(t)})}function gd(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...W(t)})}function _d(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...W(t)})}function vd(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...W(t)})}function yd(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...W(t)})}function bd(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...W(t)})}function xd(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...W(t)})}function Sd(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...W(t)})}function Cd(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...W(t)})}function wd(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...W(t)})}function Td(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...W(t)})}function Ed(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...W(t)})}function Dd(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...W(t)})}function Od(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...W(t)})}function kd(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...W(t)})}function Ad(e,t){return new e({type:`number`,checks:[],...W(t)})}function jd(e,t){return new e({type:`number`,coerce:!0,checks:[],...W(t)})}function Md(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...W(t)})}function Nd(e,t){return new e({type:`boolean`,...W(t)})}function Pd(e,t){return new e({type:`null`,...W(t)})}function Fd(e){return new e({type:`any`})}function Id(e){return new e({type:`unknown`})}function Ld(e,t){return new e({type:`never`,...W(t)})}function Rd(e,t){return new yl({check:`less_than`,...W(t),value:e,inclusive:!1})}function zd(e,t){return new yl({check:`less_than`,...W(t),value:e,inclusive:!0})}function Bd(e,t){return new bl({check:`greater_than`,...W(t),value:e,inclusive:!1})}function Vd(e,t){return new bl({check:`greater_than`,...W(t),value:e,inclusive:!0})}function Hd(e,t){return new xl({check:`multiple_of`,...W(t),value:e})}function Ud(e,t){return new Cl({check:`max_length`,...W(t),maximum:e})}function Wd(e,t){return new wl({check:`min_length`,...W(t),minimum:e})}function Gd(e,t){return new Tl({check:`length_equals`,...W(t),length:e})}function Kd(e,t){return new Dl({check:`string_format`,format:`regex`,...W(t),pattern:e})}function qd(e){return new Ol({check:`string_format`,format:`lowercase`,...W(e)})}function Jd(e){return new kl({check:`string_format`,format:`uppercase`,...W(e)})}function Yd(e,t){return new Al({check:`string_format`,format:`includes`,...W(t),includes:e})}function Xd(e,t){return new jl({check:`string_format`,format:`starts_with`,...W(t),prefix:e})}function Zd(e,t){return new Ml({check:`string_format`,format:`ends_with`,...W(t),suffix:e})}function Qd(e){return new Nl({check:`overwrite`,tx:e})}function $d(e){return Qd(t=>t.normalize(e))}function ef(){return Qd(e=>e.trim())}function tf(){return Qd(e=>e.toLowerCase())}function nf(){return Qd(e=>e.toUpperCase())}function rf(){return Qd(e=>Ys(e))}function af(e,t,n){return new e({type:`array`,element:t,...W(n)})}function of(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...W(n)})}function sf(e,t){let n=cf(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(yc(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,r.input??=t.value,r.inst??=n,r.continue??=!n._zod.def.abort,t.issues.push(yc(r))}},e(t.value,t)),t);return n}function cf(e,t){let n=new _l({check:`custom`,...W(t)});return n._zod.check=e,n}function lf(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??nd,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,external:e?.external??void 0}}function uf(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o);let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,uf(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Object.assign(o.schema,c),t.io===`input`&&pf(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&`_prefault`in o.schema&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function df(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${a}`}}if(t[1]===n)return{ref:`#`};let i=`#/${r}/`,a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+a}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root>
72
+
73
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}if(r.count>1&&e.reused===`ref`){a(n);continue}}}function ff(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):Object.assign(i,s),Object.assign(i,a),t._zod.parent===o)for(let e in i)e===`$ref`||e===`allOf`||e in a||delete i[e];if(s.$ref&&n.def)for(let e in i)e===`$ref`||e===`allOf`||e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e===`$ref`||e===`allOf`||e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};for(let t of[...e.seen.entries()].reverse())r(t[0]);let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Object.assign(i,n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,o[e.defId]=e.def)}e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:hf(t,`input`,e.processors),output:hf(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function pf(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return pf(r.element,n);if(r.type===`set`)return pf(r.valueType,n);if(r.type===`lazy`)return pf(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`)return pf(r.innerType,n);if(r.type===`intersection`)return pf(r.left,n)||pf(r.right,n);if(r.type===`record`||r.type===`map`)return pf(r.keyType,n)||pf(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:pf(r.in,n)||pf(r.out,n);if(r.type===`object`){for(let e in r.shape)if(pf(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(pf(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(pf(e,n))return!0;return!!(r.rest&&pf(r.rest,n))}return!1}var mf=(e,t={})=>n=>{let r=lf({...n,processors:t});return uf(e,r),df(r,e),ff(r,e)},hf=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=lf({...i??{},target:a,io:t,processors:n});return uf(e,o),df(o,e),ff(o,e)},gf={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},_f=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=gf[s]??s,i.format===``&&delete i.format,s===`time`&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c];e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},vf=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,format:s,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:u}=e._zod.bag;typeof s==`string`&&s.includes(`int`)?i.type=`integer`:i.type=`number`;let d=typeof u==`number`&&u>=(a??-1/0),f=typeof l==`number`&&l<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;d?p?(i.minimum=u,i.exclusiveMinimum=!0):i.exclusiveMinimum=u:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=l,i.exclusiveMaximum=!0):i.exclusiveMaximum=l:typeof o==`number`&&(i.maximum=o),typeof c==`number`&&(i.multipleOf=c)},yf=(e,t,n,r)=>{n.type=`boolean`},bf=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`BigInt cannot be represented in JSON Schema`)},xf=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Symbols cannot be represented in JSON Schema`)},Sf=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},Cf=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Undefined cannot be represented in JSON Schema`)},wf=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Void cannot be represented in JSON Schema`)},Tf=(e,t,n,r)=>{n.not={}},Ef=(e,t,n,r)=>{},Df=(e,t,n,r)=>{},Of=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Date cannot be represented in JSON Schema`)},kf=(e,t,n,r)=>{let i=e._zod.def,a=Rs(i.entries);a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},Af=(e,t,n,r)=>{let i=e._zod.def,a=[];for(let e of i.values)if(e===void 0){if(t.unrepresentable===`throw`)throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof e==`bigint`){if(t.unrepresentable===`throw`)throw Error(`BigInt literals cannot be represented in JSON Schema`);a.push(Number(e))}else a.push(e);if(a.length!==0)if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a},jf=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`NaN cannot be represented in JSON Schema`)},Mf=(e,t,n,r)=>{let i=n,a=e._zod.pattern;if(!a)throw Error(`Pattern not found in template literal`);i.type=`string`,i.pattern=a.source},Nf=(e,t,n,r)=>{let i=n,a={type:`string`,format:`binary`,contentEncoding:`binary`},{minimum:o,maximum:s,mime:c}=e._zod.bag;o!==void 0&&(a.minLength=o),s!==void 0&&(a.maxLength=s),c?c.length===1?(a.contentMediaType=c[0],Object.assign(i,a)):(Object.assign(i,a),i.anyOf=c.map(e=>({contentMediaType:e}))):Object.assign(i,a)},Pf=(e,t,n,r)=>{n.type=`boolean`},Ff=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)},If=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Function types cannot be represented in JSON Schema`)},Lf=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`)},Rf=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Map cannot be represented in JSON Schema`)},zf=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Set cannot be represented in JSON Schema`)},Bf=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=uf(a.element,t,{...r,path:[...r.path,`items`]})},Vf=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`,i.properties={};let o=a.shape;for(let e in o)i.properties[e]=uf(o[e],t,{...r,path:[...r.path,`properties`,e]});let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e]._zod;return t.io===`input`?n.optin===void 0:n.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=uf(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},Hf=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>uf(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},Uf=(e,t,n,r)=>{let i=e._zod.def,a=uf(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=uf(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1;n.allOf=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]]},Wf=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`array`;let o=t.target===`draft-2020-12`?`prefixItems`:`items`,s=t.target===`draft-2020-12`||t.target===`openapi-3.0`?`items`:`additionalItems`,c=a.items.map((e,n)=>uf(e,t,{...r,path:[...r.path,o,n]})),l=a.rest?uf(a.rest,t,{...r,path:[...r.path,s,...t.target===`openapi-3.0`?[a.items.length]:[]]}):null;t.target===`draft-2020-12`?(i.prefixItems=c,l&&(i.items=l)):t.target===`openapi-3.0`?(i.items={anyOf:c},l&&i.items.anyOf.push(l),i.minItems=c.length,l||(i.maxItems=c.length)):(i.items=c,l&&(i.additionalItems=l));let{minimum:u,maximum:d}=e._zod.bag;typeof u==`number`&&(i.minItems=u),typeof d==`number`&&(i.maxItems=d)},Gf=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=o._zod.bag?.patterns;if(a.mode===`loose`&&s&&s.size>0){let e=uf(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)i.patternProperties[t.source]=e}else(t.target===`draft-07`||t.target===`draft-2020-12`)&&(i.propertyNames=uf(a.keyType,t,{...r,path:[...r.path,`propertyNames`]})),i.additionalProperties=uf(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]});let c=o._zod.values;if(c){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e)}},Kf=(e,t,n,r)=>{let i=e._zod.def,a=uf(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},qf=(e,t,n,r)=>{let i=e._zod.def;uf(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Jf=(e,t,n,r)=>{let i=e._zod.def;uf(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},Yf=(e,t,n,r)=>{let i=e._zod.def;uf(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,t.io===`input`&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},Xf=(e,t,n,r)=>{let i=e._zod.def;uf(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{throw Error(`Dynamic catch values are not supported in JSON Schema`)}n.default=o},Zf=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;uf(o,t,r);let s=t.seen.get(e);s.ref=o},Qf=(e,t,n,r)=>{let i=e._zod.def;uf(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},$f=(e,t,n,r)=>{let i=e._zod.def;uf(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},ep=(e,t,n,r)=>{let i=e._zod.def;uf(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},tp=(e,t,n,r)=>{let i=e._zod.innerType;uf(i,t,r);let a=t.seen.get(e);a.ref=i},np={string:_f,number:vf,boolean:yf,bigint:bf,symbol:xf,null:Sf,undefined:Cf,void:wf,never:Tf,any:Ef,unknown:Df,date:Of,enum:kf,literal:Af,nan:jf,template_literal:Mf,file:Nf,success:Pf,custom:Ff,function:If,transform:Lf,map:Rf,set:zf,array:Bf,object:Vf,union:Hf,intersection:Uf,tuple:Wf,record:Gf,nullable:Kf,nonoptional:qf,default:Jf,prefault:Yf,catch:Xf,pipe:Zf,readonly:Qf,promise:$f,optional:ep,lazy:tp};function rp(e,t){if(`_idmap`in e){let n=e,r=lf({...t,processors:np}),i={};for(let e of n._idmap.entries()){let[t,n]=e;uf(n,r)}let a={};r.external={registry:n,uri:t?.uri,defs:i};for(let e of n._idmap.entries()){let[t,n]=e;df(r,n),a[t]=ff(r,n)}return Object.keys(i).length>0&&(a.__shared={[r.target===`draft-2020-12`?`$defs`:`definitions`]:i}),{schemas:a}}let n=lf({...t,processors:np});return uf(e,n),df(n,e),ff(n,e)}var ip=U(`ZodISODateTime`,(e,t)=>{Xl.init(e,t),Ap.init(e,t)});function ap(e){return Ed(ip,e)}var op=U(`ZodISODate`,(e,t)=>{Zl.init(e,t),Ap.init(e,t)});function sp(e){return Dd(op,e)}var cp=U(`ZodISOTime`,(e,t)=>{Ql.init(e,t),Ap.init(e,t)});function lp(e){return Od(cp,e)}var up=U(`ZodISODuration`,(e,t)=>{$l.init(e,t),Ap.init(e,t)});function dp(e){return kd(up,e)}var fp=U(`ZodError`,(e,t)=>{xc.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>wc(e,t)},flatten:{value:t=>Cc(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,zs,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,zs,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),pp=Tc(fp),mp=Ec(fp),hp=Dc(fp),gp=kc(fp),_p=jc(fp),vp=Mc(fp),yp=Nc(fp),bp=Pc(fp),xp=Fc(fp),Sp=Ic(fp),Cp=Lc(fp),wp=Rc(fp),Tp=new WeakMap;function Ep(e,t,n){let r=Object.getPrototypeOf(e),i=Tp.get(r);if(i||(i=new Set,Tp.set(r,i)),!i.has(t)){i.add(t);for(let e in n){let t=n[e];Object.defineProperty(r,e,{configurable:!0,enumerable:!1,get(){let n=t.bind(this);return Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:n}),n},set(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:t})}})}}}var Dp=U(`ZodType`,(e,t)=>(Il.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:hf(e,`input`),output:hf(e,`output`)}}),e.toJSONSchema=mf(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(t,n)=>pp(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>hp(e,t,n),e.parseAsync=async(t,n)=>mp(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>gp(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>_p(e,t,n),e.decode=(t,n)=>vp(e,t,n),e.encodeAsync=async(t,n)=>yp(e,t,n),e.decodeAsync=async(t,n)=>bp(e,t,n),e.safeEncode=(t,n)=>xp(e,t,n),e.safeDecode=(t,n)=>Sp(e,t,n),e.safeEncodeAsync=async(t,n)=>Cp(e,t,n),e.safeDecodeAsync=async(t,n)=>wp(e,t,n),Ep(e,`ZodType`,{check(...e){let t=this.def;return this.clone(qs(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return rc(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(mee(e,t))},superRefine(e,t){return this.check(hee(e,t))},overwrite(e){return this.check(Qd(e))},optional(){return Sm(this)},exactOptional(){return wm(this)},nullable(){return Em(this)},nullish(){return Sm(Em(this))},nonoptional(e){return oee(this,e)},array(){return q(this)},or(e){return lm([this,e])},and(e){return pm(this,e)},transform(e){return Nm(this,bm(e))},default(e){return Om(this,e)},prefault(e){return Am(this,e)},catch(e){return cee(this,e)},pipe(e){return Nm(this,e)},readonly(){return dee(this)},describe(e){let t=this.clone();return nd.add(t,{description:e}),t},meta(...e){if(e.length===0)return nd.get(this);let t=this.clone();return nd.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e){return e(this)}}),Object.defineProperty(e,"description",{get(){return nd.get(e)?.description},configurable:!0}),e)),Op=U(`_ZodString`,(e,t)=>{Ll.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(t,n,r)=>_f(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,Ep(e,`_ZodString`,{regex(...e){return this.check(Kd(...e))},includes(...e){return this.check(Yd(...e))},startsWith(...e){return this.check(Xd(...e))},endsWith(...e){return this.check(Zd(...e))},min(...e){return this.check(Wd(...e))},max(...e){return this.check(Ud(...e))},length(...e){return this.check(Gd(...e))},nonempty(...e){return this.check(Wd(1,...e))},lowercase(e){return this.check(qd(e))},uppercase(e){return this.check(Jd(e))},trim(){return this.check(ef())},normalize(...e){return this.check($d(...e))},toLowerCase(){return this.check(tf())},toUpperCase(){return this.check(nf())},slugify(){return this.check(rf())}})}),kp=U(`ZodString`,(e,t)=>{Ll.init(e,t),Op.init(e,t),e.email=t=>e.check(id(jp,t)),e.url=t=>e.check(ud(Fp,t)),e.jwt=t=>e.check(Td(Xp,t)),e.emoji=t=>e.check(dd(Lp,t)),e.guid=t=>e.check(ad(Np,t)),e.uuid=t=>e.check(od(Pp,t)),e.uuidv4=t=>e.check(sd(Pp,t)),e.uuidv6=t=>e.check(cd(Pp,t)),e.uuidv7=t=>e.check(ld(Pp,t)),e.nanoid=t=>e.check(fd(Rp,t)),e.guid=t=>e.check(ad(Np,t)),e.cuid=t=>e.check(pd(zp,t)),e.cuid2=t=>e.check(md(Bp,t)),e.ulid=t=>e.check(hd(Vp,t)),e.base64=t=>e.check(Sd(eee,t)),e.base64url=t=>e.check(Cd(Jp,t)),e.xid=t=>e.check(gd(Hp,t)),e.ksuid=t=>e.check(_d(Up,t)),e.ipv4=t=>e.check(vd(Wp,t)),e.ipv6=t=>e.check(yd(Gp,t)),e.cidrv4=t=>e.check(bd(Kp,t)),e.cidrv6=t=>e.check(xd(qp,t)),e.e164=t=>e.check(wd(Yp,t)),e.datetime=t=>e.check(ap(t)),e.date=t=>e.check(sp(t)),e.time=t=>e.check(lp(t)),e.duration=t=>e.check(dp(t))});function G(e){return rd(kp,e)}var Ap=U(`ZodStringFormat`,(e,t)=>{Rl.init(e,t),Op.init(e,t)}),jp=U(`ZodEmail`,(e,t)=>{Vl.init(e,t),Ap.init(e,t)});function Mp(e){return id(jp,e)}var Np=U(`ZodGUID`,(e,t)=>{zl.init(e,t),Ap.init(e,t)}),Pp=U(`ZodUUID`,(e,t)=>{Bl.init(e,t),Ap.init(e,t)}),Fp=U(`ZodURL`,(e,t)=>{Hl.init(e,t),Ap.init(e,t)});function Ip(e){return ud(Fp,e)}var Lp=U(`ZodEmoji`,(e,t)=>{Ul.init(e,t),Ap.init(e,t)}),Rp=U(`ZodNanoID`,(e,t)=>{Wl.init(e,t),Ap.init(e,t)}),zp=U(`ZodCUID`,(e,t)=>{Gl.init(e,t),Ap.init(e,t)}),Bp=U(`ZodCUID2`,(e,t)=>{Kl.init(e,t),Ap.init(e,t)}),Vp=U(`ZodULID`,(e,t)=>{ql.init(e,t),Ap.init(e,t)}),Hp=U(`ZodXID`,(e,t)=>{Jl.init(e,t),Ap.init(e,t)}),Up=U(`ZodKSUID`,(e,t)=>{Yl.init(e,t),Ap.init(e,t)}),Wp=U(`ZodIPv4`,(e,t)=>{eu.init(e,t),Ap.init(e,t)}),Gp=U(`ZodIPv6`,(e,t)=>{tu.init(e,t),Ap.init(e,t)}),Kp=U(`ZodCIDRv4`,(e,t)=>{nu.init(e,t),Ap.init(e,t)}),qp=U(`ZodCIDRv6`,(e,t)=>{ru.init(e,t),Ap.init(e,t)}),eee=U(`ZodBase64`,(e,t)=>{au.init(e,t),Ap.init(e,t)}),Jp=U(`ZodBase64URL`,(e,t)=>{su.init(e,t),Ap.init(e,t)}),Yp=U(`ZodE164`,(e,t)=>{cu.init(e,t),Ap.init(e,t)}),Xp=U(`ZodJWT`,(e,t)=>{uu.init(e,t),Ap.init(e,t)}),Zp=U(`ZodNumber`,(e,t)=>{du.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(t,n,r)=>vf(e,t,n,r),Ep(e,`ZodNumber`,{gt(e,t){return this.check(Bd(e,t))},gte(e,t){return this.check(Vd(e,t))},min(e,t){return this.check(Vd(e,t))},lt(e,t){return this.check(Rd(e,t))},lte(e,t){return this.check(zd(e,t))},max(e,t){return this.check(zd(e,t))},int(e){return this.check($p(e))},safe(e){return this.check($p(e))},positive(e){return this.check(Bd(0,e))},nonnegative(e){return this.check(Vd(0,e))},negative(e){return this.check(Rd(0,e))},nonpositive(e){return this.check(zd(0,e))},multipleOf(e,t){return this.check(Hd(e,t))},step(e,t){return this.check(Hd(e,t))},finite(){return this}});let n=e._zod.bag;e.minValue=Math.max(n.minimum??-1/0,n.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(n.maximum??1/0,n.exclusiveMaximum??1/0)??null,e.isInt=(n.format??``).includes(`int`)||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function K(e){return Ad(Zp,e)}var Qp=U(`ZodNumberFormat`,(e,t)=>{fu.init(e,t),Zp.init(e,t)});function $p(e){return Md(Qp,e)}var tee=U(`ZodBoolean`,(e,t)=>{pu.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(t,n,r)=>yf(e,t,n,r)});function em(e){return Nd(tee,e)}var nee=U(`ZodNull`,(e,t)=>{mu.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Sf(e,t,n,r)});function tm(e){return Pd(nee,e)}var nm=U(`ZodAny`,(e,t)=>{hu.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function rm(){return Fd(nm)}var im=U(`ZodUnknown`,(e,t)=>{gu.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function am(){return Id(im)}var ree=U(`ZodNever`,(e,t)=>{_u.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Tf(e,t,n,r)});function iee(e){return Ld(ree,e)}var aee=U(`ZodArray`,(e,t)=>{yu.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Bf(e,t,n,r),e.element=t.element,Ep(e,`ZodArray`,{min(e,t){return this.check(Wd(e,t))},nonempty(e){return this.check(Wd(1,e))},max(e,t){return this.check(Ud(e,t))},length(e,t){return this.check(Gd(e,t))},unwrap(){return this.element}})});function q(e,t){return af(aee,e,t)}var om=U(`ZodObject`,(e,t)=>{wu.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Vf(e,t,n,r),Gs(e,`shape`,()=>t.shape),Ep(e,`ZodObject`,{keyof(){return _m(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:am()})},loose(){return this.clone({...this._zod.def,catchall:am()})},strict(){return this.clone({...this._zod.def,catchall:iee()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return cc(this,e)},safeExtend(e){return lc(this,e)},merge(e){return uc(this,e)},pick(e){return oc(this,e)},omit(e){return sc(this,e)},partial(...e){return dc(xm,this,e[0])},required(...e){return fc(jm,this,e[0])}})});function J(e,t){return new om({type:`object`,shape:e??{},...W(t)})}function sm(e,t){return new om({type:`object`,shape:e,catchall:am(),...W(t)})}var cm=U(`ZodUnion`,(e,t)=>{Eu.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Hf(e,t,n,r),e.options=t.options});function lm(e,t){return new cm({type:`union`,options:e,...W(t)})}var um=U(`ZodDiscriminatedUnion`,(e,t)=>{cm.init(e,t),Du.init(e,t)});function dm(e,t,n){return new um({type:`union`,options:t,discriminator:e,...W(n)})}var fm=U(`ZodIntersection`,(e,t)=>{Ou.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Uf(e,t,n,r)});function pm(e,t){return new fm({type:`intersection`,left:e,right:t})}var mm=U(`ZodRecord`,(e,t)=>{ju.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Gf(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function hm(e,t,n){return!t||!t._zod?new mm({type:`record`,keyType:G(),valueType:e,...W(t)}):new mm({type:`record`,keyType:e,valueType:t,...W(n)})}var gm=U(`ZodEnum`,(e,t)=>{Mu.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(t,n,r)=>kf(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new gm({...t,checks:[],...W(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new gm({...t,checks:[],...W(r),entries:i})}});function _m(e,t){return new gm({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...W(t)})}var vm=U(`ZodLiteral`,(e,t)=>{Nu.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Af(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function Y(e,t){return new vm({type:`literal`,values:Array.isArray(e)?e:[e],...W(t)})}var ym=U(`ZodTransform`,(e,t)=>{Pu.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Lf(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new Fs(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(yc(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=n.value,t.inst??=e,n.issues.push(yc(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n.fallback=!0,n)):(n.value=i,n.fallback=!0,n)}});function bm(e){return new ym({type:`transform`,transform:e})}var xm=U(`ZodOptional`,(e,t)=>{Iu.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ep(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Sm(e){return new xm({type:`optional`,innerType:e})}var Cm=U(`ZodExactOptional`,(e,t)=>{Lu.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ep(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function wm(e){return new Cm({type:`optional`,innerType:e})}var Tm=U(`ZodNullable`,(e,t)=>{Ru.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Kf(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Em(e){return new Tm({type:`nullable`,innerType:e})}var Dm=U(`ZodDefault`,(e,t)=>{zu.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Jf(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Om(e,t){return new Dm({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():ec(t)}})}var km=U(`ZodPrefault`,(e,t)=>{Vu.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Yf(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Am(e,t){return new km({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():ec(t)}})}var jm=U(`ZodNonOptional`,(e,t)=>{Hu.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(t,n,r)=>qf(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function oee(e,t){return new jm({type:`nonoptional`,innerType:e,...W(t)})}var see=U(`ZodCatch`,(e,t)=>{Wu.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Xf(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function cee(e,t){return new see({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}var Mm=U(`ZodPipe`,(e,t)=>{Gu.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Zf(e,t,n,r),e.in=t.in,e.out=t.out});function Nm(e,t){return new Mm({type:`pipe`,in:e,out:t})}var lee=U(`ZodPreprocess`,(e,t)=>{Mm.init(e,t),qu.init(e,t)}),uee=U(`ZodReadonly`,(e,t)=>{Ju.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Qf(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function dee(e){return new uee({type:`readonly`,innerType:e})}var fee=U(`ZodLazy`,(e,t)=>{Xu.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(t,n,r)=>tp(e,t,n,r),e.unwrap=()=>e._zod.def.getter()});function Pm(e){return new fee({type:`lazy`,getter:e})}var pee=U(`ZodCustom`,(e,t)=>{Zu.init(e,t),Dp.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ff(e,t,n,r)});function mee(e,t={}){return of(pee,e,t)}function hee(e,t){return sf(e,t)}function Fm(e,t){return new lee({type:`pipe`,in:bm(e),out:t})}var gee={invalid_type:`invalid_type`,too_big:`too_big`,too_small:`too_small`,invalid_format:`invalid_format`,not_multiple_of:`not_multiple_of`,unrecognized_keys:`unrecognized_keys`,invalid_union:`invalid_union`,invalid_key:`invalid_key`,invalid_element:`invalid_element`,invalid_value:`invalid_value`,custom:`custom`},Im;Im||={};function Lm(e){return jd(Zp,e)}var Rm=`2025-11-25`,zm=[Rm,`2025-06-18`,`2025-03-26`,`2024-11-05`,`2024-10-07`],Bm=`io.modelcontextprotocol/related-task`,Vm=`io.modelcontextprotocol/protocolVersion`,Hm=`io.modelcontextprotocol/clientInfo`,Um=`io.modelcontextprotocol/serverInfo`,Wm=`io.modelcontextprotocol/clientCapabilities`,Gm=`io.modelcontextprotocol/subscriptionId`,Km=`io.modelcontextprotocol/logLevel`,qm=Pm(()=>lm([G(),K(),em(),tm(),hm(G(),qm),q(qm)])),Jm=hm(G(),qm),Ym=q(qm),Xm=lm([G(),K().int()]),Zm=G(),Qm=J({ttl:K().optional()}),$m=J({taskId:G()}),eh=sm({progressToken:Xm.optional(),[Bm]:$m.optional()}),th=J({_meta:eh.optional()}),nh=th.extend({task:Qm.optional()}),rh=J({method:G(),params:th.loose().optional()}),ih=J({_meta:eh.optional()}),ah=J({method:G(),params:ih.loose().optional()}),oh=sm({get[Um](){return xh.optional().catch(void 0)}}),sh=sm({_meta:oh.optional()}),ch=lm([G(),K().int()]),lh=J({jsonrpc:Y(`2.0`),id:ch,...rh.shape}).strict(),uh=J({jsonrpc:Y(`2.0`),...ah.shape}).strict(),dh=J({jsonrpc:Y(`2.0`),id:ch,result:sh}).strict(),fh=J({jsonrpc:Y(`2.0`),id:ch.optional(),error:J({code:K().int(),message:G(),data:am().optional()})}).strict(),ph=lm([lh,uh,dh,fh]),mh=lm([dh,fh]),hh=sh.strict(),gh=ih.extend({requestId:ch.optional(),reason:G().optional()}),_h=ah.extend({method:Y(`notifications/cancelled`),params:gh}),vh=J({src:G(),mimeType:G().optional(),sizes:q(G()).optional(),theme:_m([`light`,`dark`]).optional()}),yh=J({icons:q(vh).optional()}),bh=J({name:G(),title:G().optional()}),xh=bh.extend({...bh.shape,...yh.shape,version:G(),websiteUrl:G().optional(),description:G().optional()}),_ee=Fm(e=>e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,pm(J({form:pm(J({applyDefaults:em().optional()}),Jm).optional(),url:Jm.optional()}),Jm.optional())),Sh=sm({list:Jm.optional(),cancel:Jm.optional(),requests:sm({sampling:sm({createMessage:Jm.optional()}).optional(),elicitation:sm({create:Jm.optional()}).optional()}).optional()}),Ch=sm({list:Jm.optional(),cancel:Jm.optional(),requests:sm({tools:sm({call:Jm.optional()}).optional()}).optional()}),wh=J({experimental:hm(G(),Jm).optional(),sampling:J({context:Jm.optional(),tools:Jm.optional()}).optional(),elicitation:_ee.optional(),roots:J({listChanged:em().optional()}).optional(),tasks:Sh.optional(),extensions:hm(G(),Jm).optional()}),Th=th.extend({protocolVersion:G(),capabilities:wh,clientInfo:xh}),Eh=rh.extend({method:Y(`initialize`),params:Th}),Dh=J({experimental:hm(G(),Jm).optional(),logging:Jm.optional(),completions:Jm.optional(),prompts:J({listChanged:em().optional()}).optional(),resources:J({subscribe:em().optional(),listChanged:em().optional()}).optional(),tools:J({listChanged:em().optional()}).optional(),tasks:Ch.optional(),extensions:hm(G(),Jm).optional()}),Oh=sh.extend({protocolVersion:G(),capabilities:Dh,serverInfo:xh,instructions:G().optional()}),kh=ah.extend({method:Y(`notifications/initialized`),params:ih.optional()}),Ah=rh.extend({method:Y(`server/discover`),params:th.optional()}),jh=sh.extend({supportedVersions:q(G()),capabilities:Dh,instructions:G().optional()}),Mh=rh.extend({method:Y(`ping`),params:th.optional()}),Nh=J({progress:K(),total:Sm(K()),message:Sm(G())}),Ph=J({...ih.shape,...Nh.shape,progressToken:Xm}),Fh=ah.extend({method:Y(`notifications/progress`),params:Ph}),Ih=th.extend({cursor:Zm.optional()}),Lh=rh.extend({params:Ih.optional()}),Rh=sh.extend({nextCursor:Zm.optional()}),zh=J({uri:G(),mimeType:Sm(G()),_meta:hm(G(),am()).optional()}),Bh=zh.extend({text:G()}),Vh=G().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:`Invalid Base64 string`}),Hh=zh.extend({blob:Vh}),Uh=_m([`user`,`assistant`]),Wh=J({audience:q(Uh).optional(),priority:K().min(0).max(1).optional(),lastModified:ap({offset:!0}).optional()}),Gh=J({...bh.shape,...yh.shape,uri:G(),description:Sm(G()),mimeType:Sm(G()),size:Sm(K()),annotations:Wh.optional(),_meta:Sm(sm({}))}),Kh=J({...bh.shape,...yh.shape,uriTemplate:G(),description:Sm(G()),mimeType:Sm(G()),annotations:Wh.optional(),_meta:Sm(sm({}))}),qh=Lh.extend({method:Y(`resources/list`)}),Jh=Rh.extend({resources:q(Gh)}),Yh=Lh.extend({method:Y(`resources/templates/list`)}),Xh=Rh.extend({resourceTemplates:q(Kh)}),Zh=th.extend({uri:G()}),Qh=Zh,$h=rh.extend({method:Y(`resources/read`),params:Qh}),eg=sh.extend({contents:q(lm([Bh,Hh]))}),tg=ah.extend({method:Y(`notifications/resources/list_changed`),params:ih.optional()}),ng=Zh,rg=rh.extend({method:Y(`resources/subscribe`),params:ng}),ig=Zh,ag=rh.extend({method:Y(`resources/unsubscribe`),params:ig}),og=J({toolsListChanged:em().optional(),promptsListChanged:em().optional(),resourcesListChanged:em().optional(),resourceSubscriptions:q(G()).optional()}),sg=th.extend({notifications:og}),cg=rh.extend({method:Y(`subscriptions/listen`),params:sg}),lg=ih.extend({notifications:og}),ug=ah.extend({method:Y(`notifications/subscriptions/acknowledged`),params:lg}),dg=oh.extend({[Gm]:ch}),fg=sh.extend({_meta:dg}),pg=ih.extend({uri:G()}),mg=ah.extend({method:Y(`notifications/resources/updated`),params:pg}),hg=J({name:G(),description:Sm(G()),required:Sm(em())}),gg=J({...bh.shape,...yh.shape,description:Sm(G()),arguments:Sm(q(hg)),_meta:Sm(sm({}))}),_g=Lh.extend({method:Y(`prompts/list`)}),vg=Rh.extend({prompts:q(gg)}),yg=th.extend({name:G(),arguments:hm(G(),G()).optional()}),bg=rh.extend({method:Y(`prompts/get`),params:yg}),xg=J({type:Y(`text`),text:G(),annotations:Wh.optional(),_meta:hm(G(),am()).optional()}),Sg=J({type:Y(`image`),data:Vh,mimeType:G(),annotations:Wh.optional(),_meta:hm(G(),am()).optional()}),Cg=J({type:Y(`audio`),data:Vh,mimeType:G(),annotations:Wh.optional(),_meta:hm(G(),am()).optional()}),wg=J({type:Y(`tool_use`),name:G(),id:G(),input:hm(G(),am()),_meta:hm(G(),am()).optional()}),Tg=J({type:Y(`resource`),resource:lm([Bh,Hh]),annotations:Wh.optional(),_meta:hm(G(),am()).optional()}),Eg=Gh.extend({type:Y(`resource_link`)}),Dg=lm([xg,Sg,Cg,Eg,Tg]),Og=J({role:Uh,content:Dg}),kg=sh.extend({description:G().optional(),messages:q(Og)}),Ag=ah.extend({method:Y(`notifications/prompts/list_changed`),params:ih.optional()}),jg=J({title:G().optional(),readOnlyHint:em().optional(),destructiveHint:em().optional(),idempotentHint:em().optional(),openWorldHint:em().optional()}),Mg=J({taskSupport:_m([`required`,`optional`,`forbidden`]).optional()}),Ng=J({...bh.shape,...yh.shape,description:G().optional(),inputSchema:J({type:Y(`object`),properties:hm(G(),qm).optional(),required:q(G()).optional()}).catchall(am()),outputSchema:sm({$schema:G().optional()}).optional(),annotations:jg.optional(),execution:Mg.optional(),_meta:hm(G(),am()).optional()}),Pg=Lh.extend({method:Y(`tools/list`)}),Fg=Rh.extend({tools:q(Ng)}),Ig=sh.extend({content:q(Dg).default([]),structuredContent:am().optional(),isError:em().optional()}),vee=Ig.or(sh.extend({toolResult:am()})),Lg=nh.extend({name:G(),arguments:hm(G(),am()).optional()}),Rg=rh.extend({method:Y(`tools/call`),params:Lg}),zg=ah.extend({method:Y(`notifications/tools/list_changed`),params:ih.optional()}),Bg=J({autoRefresh:em().default(!0),debounceMs:K().int().nonnegative().default(300)}),Vg=_m([`debug`,`info`,`notice`,`warning`,`error`,`critical`,`alert`,`emergency`]),Hg=th.extend({level:Vg}),Ug=rh.extend({method:Y(`logging/setLevel`),params:Hg}),Wg=ih.extend({level:Vg,logger:G().optional(),data:am()}),Gg=ah.extend({method:Y(`notifications/message`),params:Wg}),Kg=J({name:G().optional()}),qg=J({hints:q(Kg).optional(),costPriority:K().min(0).max(1).optional(),speedPriority:K().min(0).max(1).optional(),intelligencePriority:K().min(0).max(1).optional()}),Jg=J({mode:_m([`auto`,`required`,`none`]).optional()}),Yg=J({type:Y(`tool_result`),toolUseId:G().describe(`The unique identifier for the corresponding tool call.`),content:q(Dg),structuredContent:am().optional(),isError:em().optional(),_meta:hm(G(),am()).optional()}),Xg=dm(`type`,[xg,Sg,Cg]),Zg=dm(`type`,[xg,Sg,Cg,wg,Yg]),Qg=J({role:Uh,content:lm([Zg,q(Zg)]),_meta:hm(G(),am()).optional()}),$g=nh.extend({messages:q(Qg),modelPreferences:qg.optional(),systemPrompt:G().optional(),includeContext:_m([`none`,`thisServer`,`allServers`]).optional(),temperature:K().optional(),maxTokens:K().int(),stopSequences:q(G()).optional(),metadata:Jm.optional(),tools:q(Ng).optional(),toolChoice:Jg.optional()}),e_=rh.extend({method:Y(`sampling/createMessage`),params:$g}),t_=sh.extend({model:G(),stopReason:Sm(_m([`endTurn`,`stopSequence`,`maxTokens`]).or(G())),role:Uh,content:Xg}),n_=sh.extend({model:G(),stopReason:Sm(_m([`endTurn`,`stopSequence`,`maxTokens`,`toolUse`]).or(G())),role:Uh,content:lm([Zg,q(Zg)])}),r_=J({type:Y(`boolean`),title:G().optional(),description:G().optional(),default:em().optional()}),i_=J({type:Y(`string`),title:G().optional(),description:G().optional(),minLength:K().optional(),maxLength:K().optional(),format:_m([`email`,`uri`,`date`,`date-time`]).optional(),default:G().optional()}),a_=J({type:_m([`number`,`integer`]),title:G().optional(),description:G().optional(),minimum:K().optional(),maximum:K().optional(),default:K().optional()}),o_=J({type:Y(`string`),title:G().optional(),description:G().optional(),enum:q(G()),default:G().optional()}),s_=J({type:Y(`string`),title:G().optional(),description:G().optional(),oneOf:q(J({const:G(),title:G()})),default:G().optional()}),c_=J({type:Y(`string`),title:G().optional(),description:G().optional(),enum:q(G()),enumNames:q(G()).optional(),default:G().optional()}),l_=lm([o_,s_]),u_=J({type:Y(`array`),title:G().optional(),description:G().optional(),minItems:K().optional(),maxItems:K().optional(),items:J({type:Y(`string`),enum:q(G())}),default:q(G()).optional()}),d_=J({type:Y(`array`),title:G().optional(),description:G().optional(),minItems:K().optional(),maxItems:K().optional(),items:J({anyOf:q(J({const:G(),title:G()}))}),default:q(G()).optional()}),f_=lm([u_,d_]),p_=lm([c_,l_,f_]),m_=lm([p_,r_,i_,a_]),h_=nh.extend({mode:Y(`form`).optional(),message:G(),requestedSchema:J({type:Y(`object`),properties:hm(G(),m_),required:q(G()).optional()}).catchall(am())}),g_=nh.extend({mode:Y(`url`),message:G(),elicitationId:G(),url:G().url()}),__=lm([h_,g_]),v_=rh.extend({method:Y(`elicitation/create`),params:__}),y_=ih.extend({elicitationId:G()}),b_=ah.extend({method:Y(`notifications/elicitation/complete`),params:y_}),x_=sh.extend({action:_m([`accept`,`decline`,`cancel`]),content:Fm(e=>e===null?void 0:e,hm(G(),lm([G(),K(),em(),q(G())])).optional())}),S_=J({type:Y(`ref/resource`),uri:G()}),C_=J({type:Y(`ref/prompt`),name:G()}),w_=th.extend({ref:lm([C_,S_]),argument:J({name:G(),value:G()}),context:J({arguments:hm(G(),G()).optional()}).optional()}),T_=rh.extend({method:Y(`completion/complete`),params:w_}),E_=sh.extend({completion:sm({values:q(G()).max(100),total:Sm(K().int()),hasMore:Sm(em())})}),D_=J({uri:G().startsWith(`file://`),name:G().optional(),_meta:hm(G(),am()).optional()}),O_=rh.extend({method:Y(`roots/list`),params:th.optional()}),k_=sh.extend({roots:q(D_)}),A_=ah.extend({method:Y(`notifications/roots/list_changed`),params:ih.optional()}),j_=sm({ttl:K().optional(),pollInterval:K().optional()}),M_=_m([`working`,`input_required`,`completed`,`failed`,`cancelled`]),N_=J({taskId:G(),status:M_,ttl:lm([K(),tm()]),createdAt:G(),lastUpdatedAt:G(),pollInterval:Sm(K()),statusMessage:Sm(G())}),P_=sh.extend({task:N_}),F_=ih.merge(N_),I_=ah.extend({method:Y(`notifications/tasks/status`),params:F_}),L_=rh.extend({method:Y(`tasks/get`),params:th.extend({taskId:G()})}),R_=sh.merge(N_),z_=rh.extend({method:Y(`tasks/result`),params:th.extend({taskId:G()})}),B_=sh.loose(),V_=Lh.extend({method:Y(`tasks/list`)}),H_=Rh.extend({tasks:q(N_)}),U_=rh.extend({method:Y(`tasks/cancel`),params:th.extend({taskId:G()})}),W_=sh.merge(N_),G_=lm([Mh,Eh,Ah,T_,Ug,bg,_g,qh,Yh,$h,rg,ag,cg,Rg,Pg]),K_=lm([_h,Fh,kh,A_]),q_=lm([hh,t_,n_,x_,k_]),J_=lm([Mh,e_,v_,O_]),Y_=lm([_h,Fh,Gg,mg,tg,zg,Ag,ug,b_]),X_=lm([hh,Oh,jh,E_,kg,vg,Jh,Xh,eg,Ig,Fg,fg]),Z_=Ip().superRefine((e,t)=>{if(!URL.canParse(e))return t.addIssue({code:gee.custom,message:`URL must be parseable`,fatal:!0}),Ns}).refine(e=>{let t=new URL(e);return t.protocol!==`javascript:`&&t.protocol!==`data:`&&t.protocol!==`vbscript:`},{message:`URL cannot use javascript:, data:, or vbscript: scheme`}),Q_=sm({resource:G().url(),authorization_servers:q(Z_).optional(),jwks_uri:G().url().optional(),scopes_supported:q(G()).optional(),bearer_methods_supported:q(G()).optional(),resource_signing_alg_values_supported:q(G()).optional(),resource_name:G().optional(),resource_documentation:G().optional(),resource_policy_uri:G().url().optional(),resource_tos_uri:G().url().optional(),tls_client_certificate_bound_access_tokens:em().optional(),authorization_details_types_supported:q(G()).optional(),dpop_signing_alg_values_supported:q(G()).optional(),dpop_bound_access_tokens_required:em().optional()}),$_=sm({issuer:G(),authorization_endpoint:Z_,token_endpoint:Z_,registration_endpoint:Z_.optional(),scopes_supported:q(G()).optional(),response_types_supported:q(G()),response_modes_supported:q(G()).optional(),grant_types_supported:q(G()).optional(),token_endpoint_auth_methods_supported:q(G()).optional(),token_endpoint_auth_signing_alg_values_supported:q(G()).optional(),service_documentation:Z_.optional(),revocation_endpoint:Z_.optional(),revocation_endpoint_auth_methods_supported:q(G()).optional(),revocation_endpoint_auth_signing_alg_values_supported:q(G()).optional(),introspection_endpoint:G().optional(),introspection_endpoint_auth_methods_supported:q(G()).optional(),introspection_endpoint_auth_signing_alg_values_supported:q(G()).optional(),code_challenge_methods_supported:q(G()).optional(),client_id_metadata_document_supported:em().optional(),authorization_response_iss_parameter_supported:em().optional().catch(void 0)}),ev=sm({issuer:G(),authorization_endpoint:Z_,token_endpoint:Z_,userinfo_endpoint:Z_.optional(),jwks_uri:Z_,registration_endpoint:Z_.optional(),scopes_supported:q(G()).optional(),response_types_supported:q(G()),response_modes_supported:q(G()).optional(),grant_types_supported:q(G()).optional(),acr_values_supported:q(G()).optional(),subject_types_supported:q(G()),id_token_signing_alg_values_supported:q(G()),id_token_encryption_alg_values_supported:q(G()).optional(),id_token_encryption_enc_values_supported:q(G()).optional(),userinfo_signing_alg_values_supported:q(G()).optional(),userinfo_encryption_alg_values_supported:q(G()).optional(),userinfo_encryption_enc_values_supported:q(G()).optional(),request_object_signing_alg_values_supported:q(G()).optional(),request_object_encryption_alg_values_supported:q(G()).optional(),request_object_encryption_enc_values_supported:q(G()).optional(),token_endpoint_auth_methods_supported:q(G()).optional(),token_endpoint_auth_signing_alg_values_supported:q(G()).optional(),display_values_supported:q(G()).optional(),claim_types_supported:q(G()).optional(),claims_supported:q(G()).optional(),service_documentation:G().optional(),claims_locales_supported:q(G()).optional(),ui_locales_supported:q(G()).optional(),claims_parameter_supported:em().optional(),request_parameter_supported:em().optional(),request_uri_parameter_supported:em().optional(),require_request_uri_registration:em().optional(),op_policy_uri:Z_.optional(),op_tos_uri:Z_.optional(),client_id_metadata_document_supported:em().optional(),authorization_response_iss_parameter_supported:em().optional().catch(void 0)}),tv=J({...ev.shape,...$_.pick({code_challenge_methods_supported:!0}).shape}),nv=J({access_token:G(),id_token:G().optional(),token_type:G(),expires_in:Lm().optional(),scope:G().optional(),refresh_token:G().optional()}).strip(),rv=J({issued_token_type:Y(`urn:ietf:params:oauth:token-type:id-jag`),access_token:G(),token_type:G().optional(),expires_in:K().optional(),scope:G().optional()}).strip(),iv=J({error:G(),error_description:G().optional(),error_uri:G().optional()}),av=Z_.optional().or(Y(``).transform(()=>void 0)),ov=J({redirect_uris:q(Z_),token_endpoint_auth_method:G().optional(),grant_types:q(G()).optional(),response_types:q(G()).optional(),application_type:G().optional(),client_name:G().optional(),client_uri:Z_.optional(),logo_uri:av,scope:G().optional(),contacts:q(G()).optional(),tos_uri:av,policy_uri:G().optional(),jwks_uri:Z_.optional(),jwks:rm().optional(),software_id:G().optional(),software_version:G().optional(),software_statement:G().optional()}).strip(),sv=J({client_id:G(),client_secret:G().optional(),client_id_issued_at:K().optional(),client_secret_expires_at:K().optional()}).strip(),cv=ov.merge(sv),lv=J({error:G(),error_description:G().optional()}).strip(),uv=J({token:G(),token_type_hint:G().optional()}).strip(),dv=Symbol.for(`mcp.sdk.errorBrands`);function fv(e,t){let n=new Set,r=t;for(;typeof r==`function`;){let e=r.mcpBrand;Object.prototype.hasOwnProperty.call(r,`mcpBrand`)&&typeof e==`string`&&n.add(e),r=Object.getPrototypeOf(r)}n.size!==0&&Object.defineProperty(e,dv,{value:n,enumerable:!1,configurable:!0})}function pv(e,t){try{if(typeof t==`object`&&t&&Object.prototype.hasOwnProperty.call(e,`mcpBrand`)&&typeof e.mcpBrand==`string`&&Object.prototype.hasOwnProperty.call(t,dv)){let n=t[dv];if(n&&typeof n.has==`function`&&n.has(e.mcpBrand))return!0}}catch{}return Function.prototype[Symbol.hasInstance].call(e,t)}var mv=function(e){return e.InvalidRequest=`invalid_request`,e.InvalidClient=`invalid_client`,e.InvalidGrant=`invalid_grant`,e.UnauthorizedClient=`unauthorized_client`,e.UnsupportedGrantType=`unsupported_grant_type`,e.InvalidScope=`invalid_scope`,e.AccessDenied=`access_denied`,e.ServerError=`server_error`,e.TemporarilyUnavailable=`temporarily_unavailable`,e.UnsupportedResponseType=`unsupported_response_type`,e.UnsupportedTokenType=`unsupported_token_type`,e.InvalidToken=`invalid_token`,e.MethodNotAllowed=`method_not_allowed`,e.TooManyRequests=`too_many_requests`,e.InvalidClientMetadata=`invalid_client_metadata`,e.InvalidRedirectUri=`invalid_redirect_uri`,e.InsufficientScope=`insufficient_scope`,e.InvalidTarget=`invalid_target`,e}({}),hv=class e extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.OAuthError`})}static[Symbol.hasInstance](e){return pv(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return pv(this,e)}constructor(e,t,n){super(t),this.code=e,this.errorUri=n,this.name=`OAuthError`,fv(this,new.target)}toResponseObject(){let e={error:this.code,error_description:this.message};return this.errorUri&&(e.error_uri=this.errorUri),e}static fromResponse(t){return new e(t.error,t.error_description??t.error,t.error_uri)}},gv=function(e){return e.NotConnected=`NOT_CONNECTED`,e.AlreadyConnected=`ALREADY_CONNECTED`,e.NotInitialized=`NOT_INITIALIZED`,e.CapabilityNotSupported=`CAPABILITY_NOT_SUPPORTED`,e.RequestTimeout=`REQUEST_TIMEOUT`,e.ConnectionClosed=`CONNECTION_CLOSED`,e.SendFailed=`SEND_FAILED`,e.InvalidResult=`INVALID_RESULT`,e.UnsupportedResultType=`UNSUPPORTED_RESULT_TYPE`,e.InputRequiredRoundsExceeded=`INPUT_REQUIRED_ROUNDS_EXCEEDED`,e.ListPaginationExceeded=`LIST_PAGINATION_EXCEEDED`,e.MethodNotSupportedByProtocolVersion=`METHOD_NOT_SUPPORTED_BY_PROTOCOL_VERSION`,e.EraNegotiationFailed=`ERA_NEGOTIATION_FAILED`,e.ClientHttpNotImplemented=`CLIENT_HTTP_NOT_IMPLEMENTED`,e.ClientHttpAuthentication=`CLIENT_HTTP_AUTHENTICATION`,e.ClientHttpForbidden=`CLIENT_HTTP_FORBIDDEN`,e.ClientHttpUnexpectedContent=`CLIENT_HTTP_UNEXPECTED_CONTENT`,e.ClientHttpFailedToOpenStream=`CLIENT_HTTP_FAILED_TO_OPEN_STREAM`,e.ClientHttpFailedToTerminateSession=`CLIENT_HTTP_FAILED_TO_TERMINATE_SESSION`,e}({}),_v=class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.SdkError`})}static[Symbol.hasInstance](e){return pv(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return pv(this,e)}constructor(e,t,n){super(t),this.code=e,this.data=n,this.name=`SdkError`,fv(this,new.target)}},vv=class extends _v{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.SdkHttpError`})}constructor(e,t,n){super(e,t,n),this.name=`SdkHttpError`}get status(){return this.data.status}get statusText(){return this.data.statusText}};function yee(e){let t=typeof e==`string`?new URL(e):new URL(e.href);return t.hash=``,t}function bee({requestedResource:e,configuredResource:t}){let n=typeof e==`string`?new URL(e):new URL(e.href),r=typeof t==`string`?new URL(t):new URL(t.href);if(n.origin!==r.origin||n.pathname.length<r.pathname.length)return!1;let i=n.pathname.endsWith(`/`)?n.pathname:n.pathname+`/`,a=r.pathname.endsWith(`/`)?r.pathname:r.pathname+`/`;return i.startsWith(a)}var yv=`2026-07-28`,bv=[yv];function xv(e){return e>=yv}function Sv(e){return e.filter(e=>!xv(e))}function Cv(e){return e.filter(e=>xv(e))}function wv(e){let t=e.structuredContent;return t===void 0||!(typeof t!=`object`||!t||Array.isArray(t))||(e.content?.some(e=>e.type===`text`)??!1)?e:{...e,content:[...e.content??[],{type:`text`,text:JSON.stringify(t)}]}}var Tv=[`task`,`inputRequests`,`requestState`];function xee(e){return typeof e!=`object`||!e||Array.isArray(e)||e.content!==void 0||Tv.some(t=>t in e)?e:{...e,content:[]}}function See(){let e=Pm(()=>lm([G(),K(),em(),tm(),hm(G(),e),q(e)])),t=hm(G(),e),n=lm([G(),K().int()]),r=G(),i=J({ttl:K().optional()}),a=J({taskId:G()}),o=sm({progressToken:n.optional(),"io.modelcontextprotocol/related-task":a.optional()}),s=J({_meta:o.optional()}),c=s.extend({task:i.optional()}),l=J({method:G(),params:s.loose().optional()}),u=J({_meta:o.optional()}),d=J({method:G(),params:u.loose().optional()}),f=sm({_meta:o.optional()}),p=lm([G(),K().int()]),m=f.strict(),h=u.extend({requestId:p.optional(),reason:G().optional()}),g=d.extend({method:Y(`notifications/cancelled`),params:h}),_=J({src:G(),mimeType:G().optional(),sizes:q(G()).optional(),theme:_m([`light`,`dark`]).optional()}),v=J({icons:q(_).optional()}),y=J({name:G(),title:G().optional()}),b=y.extend({...y.shape,...v.shape,version:G(),websiteUrl:G().optional(),description:G().optional()}),x=Fm(e=>e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,pm(J({form:pm(J({applyDefaults:em().optional()}),t).optional(),url:t.optional()}),t.optional())),S=sm({list:t.optional(),cancel:t.optional(),requests:sm({sampling:sm({createMessage:t.optional()}).optional(),elicitation:sm({create:t.optional()}).optional()}).optional()}),C=sm({list:t.optional(),cancel:t.optional(),requests:sm({tools:sm({call:t.optional()}).optional()}).optional()}),w=J({experimental:hm(G(),t).optional(),sampling:J({context:t.optional(),tools:t.optional()}).optional(),elicitation:x.optional(),roots:J({listChanged:em().optional()}).optional(),tasks:S.optional(),extensions:hm(G(),t).optional()}),T=s.extend({protocolVersion:G(),capabilities:w,clientInfo:b}),E=l.extend({method:Y(`initialize`),params:T}),D=J({experimental:hm(G(),t).optional(),logging:t.optional(),completions:t.optional(),prompts:J({listChanged:em().optional()}).optional(),resources:J({subscribe:em().optional(),listChanged:em().optional()}).optional(),tools:J({listChanged:em().optional()}).optional(),tasks:C.optional(),extensions:hm(G(),t).optional()}),O=f.extend({protocolVersion:G(),capabilities:D,serverInfo:b,instructions:G().optional()}),k=d.extend({method:Y(`notifications/initialized`),params:u.optional()}),A=l.extend({method:Y(`ping`),params:s.optional()}),j=J({progress:K(),total:Sm(K()),message:Sm(G())}),M=J({...u.shape,...j.shape,progressToken:n}),N=d.extend({method:Y(`notifications/progress`),params:M}),P=s.extend({cursor:r.optional()}),F=l.extend({params:P.optional()}),I=f.extend({nextCursor:r.optional()}),L=J({uri:G(),mimeType:Sm(G()),_meta:hm(G(),am()).optional()}),ee=L.extend({text:G()}),te=G().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:`Invalid Base64 string`}),ne=L.extend({blob:te}),R=_m([`user`,`assistant`]),z=J({audience:q(R).optional(),priority:K().min(0).max(1).optional(),lastModified:ap({offset:!0}).optional()}),B=J({...y.shape,...v.shape,uri:G(),description:Sm(G()),mimeType:Sm(G()),size:Sm(K()),annotations:z.optional(),_meta:Sm(sm({}))}),re=J({...y.shape,...v.shape,uriTemplate:G(),description:Sm(G()),mimeType:Sm(G()),annotations:z.optional(),_meta:Sm(sm({}))}),ie=F.extend({method:Y(`resources/list`)}),ae=I.extend({resources:q(B)}),oe=F.extend({method:Y(`resources/templates/list`)}),se=I.extend({resourceTemplates:q(re)}),ce=s.extend({uri:G()}),le=ce,ue=l.extend({method:Y(`resources/read`),params:le}),de=f.extend({contents:q(lm([ee,ne]))}),fe=d.extend({method:Y(`notifications/resources/list_changed`),params:u.optional()}),pe=ce,me=l.extend({method:Y(`resources/subscribe`),params:pe}),V=ce,he=l.extend({method:Y(`resources/unsubscribe`),params:V}),ge=u.extend({uri:G()}),_e=d.extend({method:Y(`notifications/resources/updated`),params:ge}),ve=J({name:G(),description:Sm(G()),required:Sm(em())}),ye=J({...y.shape,...v.shape,description:Sm(G()),arguments:Sm(q(ve)),_meta:Sm(sm({}))}),be=F.extend({method:Y(`prompts/list`)}),xe=I.extend({prompts:q(ye)}),Se=s.extend({name:G(),arguments:hm(G(),G()).optional()}),Ce=l.extend({method:Y(`prompts/get`),params:Se}),we=J({type:Y(`text`),text:G(),annotations:z.optional(),_meta:hm(G(),am()).optional()}),Te=J({type:Y(`image`),data:te,mimeType:G(),annotations:z.optional(),_meta:hm(G(),am()).optional()}),Ee=J({type:Y(`audio`),data:te,mimeType:G(),annotations:z.optional(),_meta:hm(G(),am()).optional()}),De=J({type:Y(`tool_use`),name:G(),id:G(),input:hm(G(),am()),_meta:hm(G(),am()).optional()}),Oe=J({type:Y(`resource`),resource:lm([ee,ne]),annotations:z.optional(),_meta:hm(G(),am()).optional()}),ke=B.extend({type:Y(`resource_link`)}),Ae=lm([we,Te,Ee,ke,Oe]),je=J({role:R,content:Ae}),Me=f.extend({description:G().optional(),messages:q(je)}),Ne=d.extend({method:Y(`notifications/prompts/list_changed`),params:u.optional()}),Pe=J({title:G().optional(),readOnlyHint:em().optional(),destructiveHint:em().optional(),idempotentHint:em().optional(),openWorldHint:em().optional()}),Fe=J({taskSupport:_m([`required`,`optional`,`forbidden`]).optional()}),Ie=J({...y.shape,...v.shape,description:G().optional(),inputSchema:J({type:Y(`object`),properties:hm(G(),e).optional(),required:q(G()).optional()}).catchall(am()),outputSchema:J({type:Y(`object`),properties:hm(G(),e).optional(),required:q(G()).optional()}).catchall(am()).optional(),annotations:Pe.optional(),execution:Fe.optional(),_meta:hm(G(),am()).optional()}),Le=F.extend({method:Y(`tools/list`)}),Re=I.extend({tools:q(Ie)}),ze=f.extend({content:q(Ae),structuredContent:hm(G(),am()).optional(),isError:em().optional()}),Be=c.extend({name:G(),arguments:hm(G(),am()).optional()}),Ve=l.extend({method:Y(`tools/call`),params:Be}),He=d.extend({method:Y(`notifications/tools/list_changed`),params:u.optional()}),Ue=_m([`debug`,`info`,`notice`,`warning`,`error`,`critical`,`alert`,`emergency`]),H=s.extend({level:Ue}),We=l.extend({method:Y(`logging/setLevel`),params:H}),Ge=u.extend({level:Ue,logger:G().optional(),data:am()}),Ke=d.extend({method:Y(`notifications/message`),params:Ge}),qe=J({name:G().optional()}),Je=J({hints:q(qe).optional(),costPriority:K().min(0).max(1).optional(),speedPriority:K().min(0).max(1).optional(),intelligencePriority:K().min(0).max(1).optional()}),Ye=J({mode:_m([`auto`,`required`,`none`]).optional()}),Xe=J({type:Y(`tool_result`),toolUseId:G().describe(`The unique identifier for the corresponding tool call.`),content:q(Ae),structuredContent:J({}).loose().optional(),isError:em().optional(),_meta:hm(G(),am()).optional()}),Ze=dm(`type`,[we,Te,Ee]),Qe=dm(`type`,[we,Te,Ee,De,Xe]),$e=J({role:R,content:lm([Qe,q(Qe)]),_meta:hm(G(),am()).optional()}),et=c.extend({messages:q($e),modelPreferences:Je.optional(),systemPrompt:G().optional(),includeContext:_m([`none`,`thisServer`,`allServers`]).optional(),temperature:K().optional(),maxTokens:K().int(),stopSequences:q(G()).optional(),metadata:t.optional(),tools:q(Ie).optional(),toolChoice:Ye.optional()}),tt=l.extend({method:Y(`sampling/createMessage`),params:et}),nt=f.extend({model:G(),stopReason:Sm(_m([`endTurn`,`stopSequence`,`maxTokens`]).or(G())),role:R,content:Ze}),rt=f.extend({model:G(),stopReason:Sm(_m([`endTurn`,`stopSequence`,`maxTokens`,`toolUse`]).or(G())),role:R,content:lm([Qe,q(Qe)])}),it=J({type:Y(`boolean`),title:G().optional(),description:G().optional(),default:em().optional()}),at=J({type:Y(`string`),title:G().optional(),description:G().optional(),minLength:K().optional(),maxLength:K().optional(),format:_m([`email`,`uri`,`date`,`date-time`]).optional(),default:G().optional()}),ot=J({type:_m([`number`,`integer`]),title:G().optional(),description:G().optional(),minimum:K().optional(),maximum:K().optional(),default:K().optional()}),st=J({type:Y(`string`),title:G().optional(),description:G().optional(),enum:q(G()),default:G().optional()}),ct=J({type:Y(`string`),title:G().optional(),description:G().optional(),oneOf:q(J({const:G(),title:G()})),default:G().optional()}),lt=J({type:Y(`string`),title:G().optional(),description:G().optional(),enum:q(G()),enumNames:q(G()).optional(),default:G().optional()}),ut=lm([st,ct]),dt=J({type:Y(`array`),title:G().optional(),description:G().optional(),minItems:K().optional(),maxItems:K().optional(),items:J({type:Y(`string`),enum:q(G())}),default:q(G()).optional()}),ft=J({type:Y(`array`),title:G().optional(),description:G().optional(),minItems:K().optional(),maxItems:K().optional(),items:J({anyOf:q(J({const:G(),title:G()}))}),default:q(G()).optional()}),pt=lm([dt,ft]),mt=lm([lt,ut,pt]),ht=lm([mt,it,at,ot]),gt=c.extend({mode:Y(`form`).optional(),message:G(),requestedSchema:J({type:Y(`object`),properties:hm(G(),ht),required:q(G()).optional()}).catchall(am())}),_t=c.extend({mode:Y(`url`),message:G(),elicitationId:G(),url:G().url()}),vt=lm([gt,_t]),yt=l.extend({method:Y(`elicitation/create`),params:vt}),bt=u.extend({elicitationId:G()}),xt=d.extend({method:Y(`notifications/elicitation/complete`),params:bt}),St=f.extend({action:_m([`accept`,`decline`,`cancel`]),content:Fm(e=>e===null?void 0:e,hm(G(),lm([G(),K(),em(),q(G())])).optional())}),Ct=J({type:Y(`ref/resource`),uri:G()}),wt=J({type:Y(`ref/prompt`),name:G()}),Tt=s.extend({ref:lm([wt,Ct]),argument:J({name:G(),value:G()}),context:J({arguments:hm(G(),G()).optional()}).optional()}),Et=l.extend({method:Y(`completion/complete`),params:Tt}),Dt=f.extend({completion:sm({values:q(G()).max(100),total:Sm(K().int()),hasMore:Sm(em())})}),Ot=J({uri:G().startsWith(`file://`),name:G().optional(),_meta:hm(G(),am()).optional()}),kt=l.extend({method:Y(`roots/list`),params:s.optional()}),At=f.extend({roots:q(Ot)}),jt=d.extend({method:Y(`notifications/roots/list_changed`),params:u.optional()}),Mt=sm({ttl:K().optional(),pollInterval:K().optional()}),Nt=_m([`working`,`input_required`,`completed`,`failed`,`cancelled`]),Pt=J({taskId:G(),status:Nt,ttl:lm([K(),tm()]),createdAt:G(),lastUpdatedAt:G(),pollInterval:Sm(K()),statusMessage:Sm(G())}),Ft=f.extend({task:Pt}),It=u.merge(Pt),Lt=d.extend({method:Y(`notifications/tasks/status`),params:It}),Rt=l.extend({method:Y(`tasks/get`),params:s.extend({taskId:G()})}),zt=f.merge(Pt),Bt=l.extend({method:Y(`tasks/result`),params:s.extend({taskId:G()})}),Vt=f.loose(),Ht=F.extend({method:Y(`tasks/list`)}),Ut=I.extend({tasks:q(Pt)}),Wt=l.extend({method:Y(`tasks/cancel`),params:s.extend({taskId:G()})});return{JSONValueSchema:e,JSONObjectSchema:t,ProgressTokenSchema:n,CursorSchema:r,TaskMetadataSchema:i,RelatedTaskMetadataSchema:a,RequestMetaSchema:o,BaseRequestParamsSchema:s,TaskAugmentedRequestParamsSchema:c,RequestSchema:l,NotificationsParamsSchema:u,NotificationSchema:d,ResultSchema:f,RequestIdSchema:p,EmptyResultSchema:m,CancelledNotificationParamsSchema:h,CancelledNotificationSchema:g,IconSchema:_,IconsSchema:v,BaseMetadataSchema:y,ImplementationSchema:b,ClientTasksCapabilitySchema:S,ServerTasksCapabilitySchema:C,ClientCapabilitiesSchema:w,InitializeRequestParamsSchema:T,InitializeRequestSchema:E,ServerCapabilitiesSchema:D,InitializeResultSchema:O,InitializedNotificationSchema:k,PingRequestSchema:A,ProgressSchema:j,ProgressNotificationParamsSchema:M,ProgressNotificationSchema:N,PaginatedRequestParamsSchema:P,PaginatedRequestSchema:F,PaginatedResultSchema:I,ResourceContentsSchema:L,TextResourceContentsSchema:ee,BlobResourceContentsSchema:ne,RoleSchema:R,AnnotationsSchema:z,ResourceSchema:B,ResourceTemplateSchema:re,ListResourcesRequestSchema:ie,ListResourcesResultSchema:ae,ListResourceTemplatesRequestSchema:oe,ListResourceTemplatesResultSchema:se,ResourceRequestParamsSchema:ce,ReadResourceRequestParamsSchema:le,ReadResourceRequestSchema:ue,ReadResourceResultSchema:de,ResourceListChangedNotificationSchema:fe,SubscribeRequestParamsSchema:pe,SubscribeRequestSchema:me,UnsubscribeRequestParamsSchema:V,UnsubscribeRequestSchema:he,ResourceUpdatedNotificationParamsSchema:ge,ResourceUpdatedNotificationSchema:_e,PromptArgumentSchema:ve,PromptSchema:ye,ListPromptsRequestSchema:be,ListPromptsResultSchema:xe,GetPromptRequestParamsSchema:Se,GetPromptRequestSchema:Ce,TextContentSchema:we,ImageContentSchema:Te,AudioContentSchema:Ee,ToolUseContentSchema:De,EmbeddedResourceSchema:Oe,ResourceLinkSchema:ke,ContentBlockSchema:Ae,PromptMessageSchema:je,GetPromptResultSchema:Me,PromptListChangedNotificationSchema:Ne,ToolAnnotationsSchema:Pe,ToolExecutionSchema:Fe,ToolSchema:Ie,ListToolsRequestSchema:Le,ListToolsResultSchema:Re,CallToolResultSchema:ze,CallToolRequestParamsSchema:Be,CallToolRequestSchema:Ve,ToolListChangedNotificationSchema:He,LoggingLevelSchema:Ue,SetLevelRequestParamsSchema:H,SetLevelRequestSchema:We,LoggingMessageNotificationParamsSchema:Ge,LoggingMessageNotificationSchema:Ke,ModelHintSchema:qe,ModelPreferencesSchema:Je,ToolChoiceSchema:Ye,ToolResultContentSchema:Xe,SamplingContentSchema:Ze,SamplingMessageContentBlockSchema:Qe,SamplingMessageSchema:$e,CreateMessageRequestParamsSchema:et,CreateMessageRequestSchema:tt,CreateMessageResultSchema:nt,CreateMessageResultWithToolsSchema:rt,BooleanSchemaSchema:it,StringSchemaSchema:at,NumberSchemaSchema:ot,UntitledSingleSelectEnumSchemaSchema:st,TitledSingleSelectEnumSchemaSchema:ct,LegacyTitledEnumSchemaSchema:lt,SingleSelectEnumSchemaSchema:ut,UntitledMultiSelectEnumSchemaSchema:dt,TitledMultiSelectEnumSchemaSchema:ft,MultiSelectEnumSchemaSchema:pt,EnumSchemaSchema:mt,PrimitiveSchemaDefinitionSchema:ht,ElicitRequestFormParamsSchema:gt,ElicitRequestURLParamsSchema:_t,ElicitRequestParamsSchema:vt,ElicitRequestSchema:yt,ElicitationCompleteNotificationParamsSchema:bt,ElicitationCompleteNotificationSchema:xt,ElicitResultSchema:St,ResourceTemplateReferenceSchema:Ct,PromptReferenceSchema:wt,CompleteRequestParamsSchema:Tt,CompleteRequestSchema:Et,CompleteResultSchema:Dt,RootSchema:Ot,ListRootsRequestSchema:kt,ListRootsResultSchema:At,RootsListChangedNotificationSchema:jt,TaskCreationParamsSchema:Mt,TaskStatusSchema:Nt,TaskSchema:Pt,CreateTaskResultSchema:Ft,TaskStatusNotificationParamsSchema:It,TaskStatusNotificationSchema:Lt,GetTaskRequestSchema:Rt,GetTaskResultSchema:zt,GetTaskPayloadRequestSchema:Bt,GetTaskPayloadResultSchema:Vt,ListTasksRequestSchema:Ht,ListTasksResultSchema:Ut,CancelTaskRequestSchema:Wt,CancelTaskResultSchema:f.merge(Pt),ClientRequestSchema:lm([A,E,Et,We,Ce,be,ie,oe,ue,me,he,Ve,Le,Rt,Bt,Ht,Wt]),ClientNotificationSchema:lm([g,N,k,jt,Lt]),ClientResultSchema:lm([m,nt,rt,St,At,zt,Ut,Ft]),ServerRequestSchema:lm([A,tt,yt,kt,Rt,Bt,Ht,Wt]),ServerNotificationSchema:lm([g,N,Ke,_e,fe,He,Ne,Lt,xt]),ServerResultSchema:lm([m,O,Dt,Me,xe,ae,se,de,ze,Re,zt,Ut,Ft]),CallToolResultWireSchema:am().superRefine((e,t)=>{if(!(typeof e!=`object`||!e||Array.isArray(e)||e.content!==void 0)){for(let n of Tv)if(n in e){t.addIssue({code:`custom`,message:`content is required when the body carries '${n}' — another result family cannot default into an empty tools/call success`});return}}}).transform(xee).pipe(ze)}}var Cee;function Ev(){return Cee??=See()}function Dv(e){return e.type!==`object`}var wee=new Set([`const`,`enum`,`default`,`examples`]),Tee=new Set([`properties`,`patternProperties`,`$defs`,`definitions`,`dependentSchemas`,`dependencies`]);function Ov(e){return e!==void 0&&!(typeof e==`string`&&e.startsWith(`#`))}function Eee(e){let t=typeof e.$schema==`string`?e.$schema:void 0;if(Ov(e.$id))return{...t!==void 0&&{$schema:t},type:`object`,properties:{result:e},required:[`result`]};let n=As(e.$schema)&&e.$recursiveAnchor!==!0,r=(e,t)=>{if(Array.isArray(e))return e.map(e=>r(e,!1));if(typeof e!=`object`||!e||!t&&Ov(e.$id))return e;let i={},a=!1;for(let[o,s]of Object.entries(e))t?i[o]=r(s,!1):(o===`$ref`||o===`$dynamicRef`)&&typeof s==`string`?i[o]=s===`#`?`#/properties/result`:s.startsWith(`#/`)?`#/properties/result${s.slice(1)}`:s:o===`$recursiveRef`&&s===`#`&&n?a=!0:wee.has(o)?i[o]=s:Tee.has(o)?i[o]=r(s,!0):i[o]=r(s,!1);return a&&(`$ref`in i?i.allOf=[...Array.isArray(i.allOf)?i.allOf:[],{$ref:`#/properties/result`}]:i.$ref=`#/properties/result`),i};return{...t!==void 0&&{$schema:t},type:`object`,properties:{result:r(e,!1)},required:[`result`]}}var kv={ping:null,initialize:null,"completion/complete":null,"logging/setLevel":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"resources/subscribe":null,"resources/unsubscribe":null,"tools/call":null,"tools/list":null,"tasks/get":null,"tasks/result":null,"tasks/list":null,"tasks/cancel":null,"sampling/createMessage":null,"elicitation/create":null,"roots/list":null},Av={"notifications/cancelled":null,"notifications/progress":null,"notifications/initialized":null,"notifications/roots/list_changed":null,"notifications/tasks/status":null,"notifications/message":null,"notifications/resources/updated":null,"notifications/resources/list_changed":null,"notifications/tools/list_changed":null,"notifications/prompts/list_changed":null,"notifications/elicitation/complete":null},Dee={ping:null,initialize:null,"completion/complete":null,"logging/setLevel":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"resources/subscribe":null,"resources/unsubscribe":null,"tools/call":null,"tools/list":null,"sampling/createMessage":null,"elicitation/create":null,"roots/list":null},jv;function Mv(){if(jv)return jv;let e=Ev();return jv={requestSchemas:{ping:e.PingRequestSchema,initialize:e.InitializeRequestSchema,"completion/complete":e.CompleteRequestSchema,"logging/setLevel":e.SetLevelRequestSchema,"prompts/get":e.GetPromptRequestSchema,"prompts/list":e.ListPromptsRequestSchema,"resources/list":e.ListResourcesRequestSchema,"resources/templates/list":e.ListResourceTemplatesRequestSchema,"resources/read":e.ReadResourceRequestSchema,"resources/subscribe":e.SubscribeRequestSchema,"resources/unsubscribe":e.UnsubscribeRequestSchema,"tools/call":e.CallToolRequestSchema,"tools/list":e.ListToolsRequestSchema,"tasks/get":e.GetTaskRequestSchema,"tasks/result":e.GetTaskPayloadRequestSchema,"tasks/list":e.ListTasksRequestSchema,"tasks/cancel":e.CancelTaskRequestSchema,"sampling/createMessage":e.CreateMessageRequestSchema,"elicitation/create":e.ElicitRequestSchema,"roots/list":e.ListRootsRequestSchema},notificationSchemas:{"notifications/cancelled":e.CancelledNotificationSchema,"notifications/progress":e.ProgressNotificationSchema,"notifications/initialized":e.InitializedNotificationSchema,"notifications/roots/list_changed":e.RootsListChangedNotificationSchema,"notifications/tasks/status":e.TaskStatusNotificationSchema,"notifications/message":e.LoggingMessageNotificationSchema,"notifications/resources/updated":e.ResourceUpdatedNotificationSchema,"notifications/resources/list_changed":e.ResourceListChangedNotificationSchema,"notifications/tools/list_changed":e.ToolListChangedNotificationSchema,"notifications/prompts/list_changed":e.PromptListChangedNotificationSchema,"notifications/elicitation/complete":e.ElicitationCompleteNotificationSchema},resultSchemas:{ping:e.EmptyResultSchema,initialize:e.InitializeResultSchema,"completion/complete":e.CompleteResultSchema,"logging/setLevel":e.EmptyResultSchema,"prompts/get":e.GetPromptResultSchema,"prompts/list":e.ListPromptsResultSchema,"resources/list":e.ListResourcesResultSchema,"resources/templates/list":e.ListResourceTemplatesResultSchema,"resources/read":e.ReadResourceResultSchema,"resources/subscribe":e.EmptyResultSchema,"resources/unsubscribe":e.EmptyResultSchema,"tools/call":e.CallToolResultWireSchema,"tools/list":e.ListToolsResultSchema,"sampling/createMessage":e.CreateMessageResultWithToolsSchema,"elicitation/create":e.ElicitResultSchema,"roots/list":e.ListRootsResultSchema}},jv}function Nv(e){return Object.prototype.hasOwnProperty.call(kv,e)}function Pv(e){return Object.prototype.hasOwnProperty.call(Av,e)}function Fv(e){return Object.prototype.hasOwnProperty.call(Dee,e)}function Iv(e){return Fv(e)?Mv().resultSchemas[e]:void 0}function Lv(e){return Nv(e)?Mv().requestSchemas[e]:void 0}function Rv(e){return Pv(e)?Mv().notificationSchemas[e]:void 0}Object.keys(kv),Object.keys(Av);function zv(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Bv(e,t){if(e===void 0)return{ok:!1,reason:`not-in-era`};let n=e.safeParse(t);return n.success?{ok:!0,value:n.data}:{ok:!1,reason:`invalid`,message:String(n.error)}}var Vv={ok:!1,reason:`not-in-era`};function Hv(e){return zv(e)&&zv(e.outputSchema)&&Dv(e.outputSchema)}function Uv(e){return e}var Wv={era:`2025-11-25`,hasRequestMethod:Nv,hasNotificationMethod:Pv,validateRequest:(e,t)=>Bv(Lv(e),t),validateResult:(e,t)=>Bv(Iv(e),t),validateNotification:(e,t)=>Bv(Rv(e),t),hasInputRequestMethod:()=>!1,validateInputRequest:()=>Vv,validateInputResponse:()=>Vv,samplingResultVariant:((e,t)=>{let n=Ev();return Bv(e?n.CreateMessageResultWithToolsSchema:n.CreateMessageResultSchema,t)}),outboundEnvelope:e=>void 0,validateEnvelopeMeta:e=>[],projectCallToolResult(e,t){let n=wv(e),r=n.structuredContent;if(r===void 0)return n;let i=typeof r!=`object`||!r||Array.isArray(r),a=t!==void 0&&Dv(t);return!i&&!a?n:{...n,structuredContent:{result:r}}},decodeResult(e,t){if(zv(t)&&`resultType`in t){let e={...t};return delete e.resultType,{kind:`complete`,result:Uv(e)}}return{kind:`complete`,result:Uv(t)}},encodeResult(e,t){if(e!==`tools/list`)return t;let n=t.tools;return!Array.isArray(n)||!n.some(e=>Hv(e))?t:{...t,tools:n.map(e=>Hv(e)?{...e,outputSchema:Eee(e.outputSchema)}:e)}},encodeErrorCode:e=>e===-32002?-32602:e,checkInboundEnvelope:e=>void 0};function Gv(){let e=Pm(()=>lm([G(),K(),em(),tm(),hm(G(),e),q(e)])),t=hm(G(),e),n=lm([G(),K().int()]),r=G(),i=lm([G(),K().int()]),a=_m([`user`,`assistant`]),o=_m([`debug`,`info`,`notice`,`warning`,`error`,`critical`,`alert`,`emergency`]),s=G().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:`Invalid Base64 string`}),c=J({ttl:K().optional()}),l=J({taskId:G()}),u=sm({progressToken:n.optional(),"io.modelcontextprotocol/related-task":l.optional()}),d=J({_meta:u.optional()}),f=d.extend({task:c.optional()}),p=J({_meta:u.optional()}),m=J({method:G(),params:p.loose().optional()}),h=J({src:G(),mimeType:G().optional(),sizes:q(G()).optional(),theme:_m([`light`,`dark`]).optional()}),g=J({icons:q(h).optional()}),_=J({name:G(),title:G().optional()}),v=_.extend({..._.shape,...g.shape,version:G(),websiteUrl:G().optional(),description:G().optional()}),y=Fm(e=>e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,pm(J({form:pm(J({applyDefaults:em().optional()}),t).optional(),url:t.optional()}),t.optional())),b=sm({list:t.optional(),cancel:t.optional(),requests:sm({sampling:sm({createMessage:t.optional()}).optional(),elicitation:sm({create:t.optional()}).optional()}).optional()}),x=sm({list:t.optional(),cancel:t.optional(),requests:sm({tools:sm({call:t.optional()}).optional()}).optional()}),S=J({experimental:hm(G(),t).optional(),sampling:J({context:t.optional(),tools:t.optional()}).optional(),elicitation:y.optional(),roots:J({listChanged:em().optional()}).optional(),tasks:b.optional(),extensions:hm(G(),t).optional()}),C=J({experimental:hm(G(),t).optional(),logging:t.optional(),completions:t.optional(),prompts:J({listChanged:em().optional()}).optional(),resources:J({subscribe:em().optional(),listChanged:em().optional()}).optional(),tools:J({listChanged:em().optional()}).optional(),tasks:x.optional(),extensions:hm(G(),t).optional()}),w=J({progress:K(),total:Sm(K()),message:Sm(G())}),T=J({...p.shape,...w.shape,progressToken:n}),E=m.extend({method:Y(`notifications/progress`),params:T}),D=p.extend({level:o,logger:G().optional(),data:am()}),O=m.extend({method:Y(`notifications/message`),params:D}),k=J({uri:G(),mimeType:Sm(G()),_meta:hm(G(),am()).optional()}),A=k.extend({text:G()}),j=k.extend({blob:s}),M=J({audience:q(a).optional(),priority:K().min(0).max(1).optional(),lastModified:ap({offset:!0}).optional()}),N=J({..._.shape,...g.shape,uri:G(),description:Sm(G()),mimeType:Sm(G()),size:Sm(K()),annotations:M.optional(),_meta:Sm(sm({}))}),P=J({..._.shape,...g.shape,uriTemplate:G(),description:Sm(G()),mimeType:Sm(G()),annotations:M.optional(),_meta:Sm(sm({}))}),F=m.extend({method:Y(`notifications/resources/list_changed`),params:p.optional()}),I=p.extend({uri:G()}),L=m.extend({method:Y(`notifications/resources/updated`),params:I}),ee=J({name:G(),description:Sm(G()),required:Sm(em())}),te=J({..._.shape,...g.shape,description:Sm(G()),arguments:Sm(q(ee)),_meta:Sm(sm({}))}),ne=m.extend({method:Y(`notifications/prompts/list_changed`),params:p.optional()}),R=J({type:Y(`text`),text:G(),annotations:M.optional(),_meta:hm(G(),am()).optional()}),z=J({type:Y(`image`),data:s,mimeType:G(),annotations:M.optional(),_meta:hm(G(),am()).optional()}),B=J({type:Y(`audio`),data:s,mimeType:G(),annotations:M.optional(),_meta:hm(G(),am()).optional()}),re=J({type:Y(`tool_use`),name:G(),id:G(),input:hm(G(),am()),_meta:hm(G(),am()).optional()}),ie=J({type:Y(`resource`),resource:lm([A,j]),annotations:M.optional(),_meta:hm(G(),am()).optional()}),ae=N.extend({type:Y(`resource_link`)}),oe=lm([R,z,B,ae,ie]),se=J({role:a,content:oe}),ce=J({title:G().optional(),readOnlyHint:em().optional(),destructiveHint:em().optional(),idempotentHint:em().optional(),openWorldHint:em().optional()}),le=m.extend({method:Y(`notifications/tools/list_changed`),params:p.optional()}),ue=J({name:G().optional()}),de=J({hints:q(ue).optional(),costPriority:K().min(0).max(1).optional(),speedPriority:K().min(0).max(1).optional(),intelligencePriority:K().min(0).max(1).optional()}),fe=J({mode:_m([`auto`,`required`,`none`]).optional()}),pe=J({type:Y(`boolean`),title:G().optional(),description:G().optional(),default:em().optional()}),me=J({type:Y(`string`),title:G().optional(),description:G().optional(),minLength:K().optional(),maxLength:K().optional(),format:_m([`email`,`uri`,`date`,`date-time`]).optional(),default:G().optional()}),V=J({type:_m([`number`,`integer`]),title:G().optional(),description:G().optional(),minimum:K().optional(),maximum:K().optional(),default:K().optional()}),he=J({type:Y(`string`),title:G().optional(),description:G().optional(),enum:q(G()),default:G().optional()}),ge=J({type:Y(`string`),title:G().optional(),description:G().optional(),oneOf:q(J({const:G(),title:G()})),default:G().optional()}),_e=J({type:Y(`string`),title:G().optional(),description:G().optional(),enum:q(G()),enumNames:q(G()).optional(),default:G().optional()}),ve=lm([he,ge]),ye=J({type:Y(`array`),title:G().optional(),description:G().optional(),minItems:K().optional(),maxItems:K().optional(),items:J({type:Y(`string`),enum:q(G())}),default:q(G()).optional()}),be=J({type:Y(`array`),title:G().optional(),description:G().optional(),minItems:K().optional(),maxItems:K().optional(),items:J({anyOf:q(J({const:G(),title:G()}))}),default:q(G()).optional()}),xe=lm([ye,be]),Se=lm([_e,ve,xe]),Ce=lm([Se,pe,me,V]),we=f.extend({mode:Y(`form`).optional(),message:G(),requestedSchema:J({type:Y(`object`),properties:hm(G(),Ce),required:q(G()).optional()}).catchall(am())}),Te=J({type:Y(`ref/resource`),uri:G()}),Ee=J({type:Y(`ref/prompt`),name:G()}),De=J({uri:G().startsWith(`file://`),name:G().optional(),_meta:hm(G(),am()).optional()}),Oe=S.shape,ke=J({experimental:Oe.experimental,sampling:Oe.sampling,elicitation:Oe.elicitation,roots:Oe.roots,extensions:Oe.extensions}),Ae=C.shape,je=J({experimental:Ae.experimental,logging:Ae.logging,completions:Ae.completions,prompts:Ae.prompts,resources:Ae.resources,tools:Ae.tools,extensions:Ae.extensions}),Me=sm({progressToken:n.optional(),[Vm]:G(),[Hm]:v.optional(),[Wm]:ke,[Km]:o.optional()}),Ne=J({..._.shape,...g.shape,description:G().optional(),inputSchema:sm({$schema:G().optional(),type:Y(`object`)}),outputSchema:sm({$schema:G().optional()}).optional(),annotations:ce.optional(),_meta:hm(G(),am()).optional()}),Pe=J({type:Y(`tool_result`),toolUseId:G(),content:q(oe),structuredContent:am().optional(),isError:em().optional(),_meta:hm(G(),am()).optional()}),Fe=lm([R,z,B,re,Pe]),Ie=J({role:a,content:lm([Fe,q(Fe)]),_meta:hm(G(),am()).optional()}),Le=G(),Re=sm({[Um]:v.optional().catch(void 0)}),ze=Re.optional();function Be(e){return sm({_meta:ze,resultType:Le.default(`complete`),...e})}let Ve=Be({}),He=Be({nextCursor:r.optional()}),Ue=Be({content:q(oe),structuredContent:am().optional(),isError:em().optional()}),H=Be({ttlMs:K().int().min(0),cacheScope:_m([`public`,`private`]),tools:q(Ne),nextCursor:r.optional()}),We=Be({ttlMs:K().int().min(0),cacheScope:_m([`public`,`private`]),prompts:q(te),nextCursor:r.optional()}),Ge=Be({description:G().optional(),messages:q(se)}),Ke=Be({ttlMs:K().int().min(0),cacheScope:_m([`public`,`private`]),resources:q(N),nextCursor:r.optional()}),qe=Be({ttlMs:K().int().min(0),cacheScope:_m([`public`,`private`]),resourceTemplates:q(P),nextCursor:r.optional()}),Je=Be({ttlMs:K().int().min(0),cacheScope:_m([`public`,`private`]),contents:q(lm([A,j]))}),Ye=Be({completion:J({values:q(G()).max(100),total:K().int().optional(),hasMore:em().optional()}).loose()}),Xe=Be({ttlMs:K().int().min(0),cacheScope:_m([`public`,`private`])}),Ze=Be({ttlMs:K().int().min(0).catch(0),cacheScope:_m([`public`,`private`]).catch(`private`),supportedVersions:q(G()),capabilities:je,instructions:G().optional()}),Qe=J({messages:q(Ie),modelPreferences:de.optional(),systemPrompt:G().optional(),includeContext:_m([`none`,`thisServer`,`allServers`]).optional(),temperature:K().optional(),maxTokens:K().int(),stopSequences:q(G()).optional(),metadata:t.optional(),tools:q(Ne).optional(),toolChoice:fe.optional()}),$e=J({method:Y(`sampling/createMessage`),params:Qe}),et=J({method:Y(`roots/list`),params:J({_meta:hm(G(),am()).optional()}).optional()}),tt=J({...Ie.shape,model:G(),stopReason:G().optional()}),nt=J({roots:q(De)}),rt=J({action:_m([`accept`,`decline`,`cancel`]),content:hm(G(),lm([G(),K(),em(),q(G())])).optional()}),it=J({mode:Y(`url`),message:G(),url:G().url()}),at=lm([we,it]),ot=J({method:Y(`elicitation/create`),params:at}),st=lm([$e,et,ot]),ct=lm([tt,nt,rt]),lt=hm(G(),st),ut=hm(G(),ct),dt=Be({inputRequests:lt.optional(),requestState:G().optional()}),ft={inputResponses:ut.optional(),requestState:G().optional()},pt=J({_meta:Me,...ft}),mt=sm({progressToken:n.optional()});function ht(e,t){return J({method:Y(e),params:J({_meta:Me,...t})})}function gt(e,t){return J({method:Y(e),params:J({_meta:mt.optional(),...t}).optional()})}let _t={name:G(),arguments:hm(G(),am()).optional(),...ft},vt={cursor:r.optional()},yt=ht(`tools/call`,_t),bt=ht(`tools/list`,vt),xt=ht(`prompts/list`,vt),St=ht(`prompts/get`,{name:G(),arguments:hm(G(),G()).optional(),...ft}),Ct=ht(`resources/list`,vt),wt=ht(`resources/templates/list`,vt),Tt=ht(`resources/read`,{uri:G(),...ft}),Et={ref:lm([Ee,Te]),argument:J({name:G(),value:G()}),context:J({arguments:hm(G(),G()).optional()}).optional()},Dt=ht(`completion/complete`,Et),Ot=ht(`server/discover`,{}),kt=J({toolsListChanged:em().optional(),promptsListChanged:em().optional(),resourcesListChanged:em().optional(),resourceSubscriptions:q(G()).optional()}),At={notifications:kt},jt=ht(`subscriptions/listen`,At),Mt=Re.extend({"io.modelcontextprotocol/subscriptionId":i}),Nt=sm({_meta:Mt,resultType:Le.default(`complete`)}),Pt={"tools/call":gt(`tools/call`,_t),"tools/list":gt(`tools/list`,vt),"prompts/get":gt(`prompts/get`,{name:G(),arguments:hm(G(),G()).optional()}),"prompts/list":gt(`prompts/list`,vt),"resources/list":gt(`resources/list`,vt),"resources/templates/list":gt(`resources/templates/list`,vt),"resources/read":gt(`resources/read`,{uri:G()}),"completion/complete":gt(`completion/complete`,Et),"server/discover":gt(`server/discover`,{}),"subscriptions/listen":gt(`subscriptions/listen`,At)};function Ft(e){return sm({_meta:ze,...e})}let It={"tools/call":Ft({content:q(oe),structuredContent:am().optional(),isError:em().optional()}),"tools/list":Ft({ttlMs:K().int().min(0),cacheScope:_m([`public`,`private`]),tools:q(Ne),nextCursor:r.optional()}),"prompts/get":Ft({description:G().optional(),messages:q(se)}),"prompts/list":Ft({ttlMs:K().int().min(0),cacheScope:_m([`public`,`private`]),prompts:q(te),nextCursor:r.optional()}),"resources/list":Ft({ttlMs:K().int().min(0),cacheScope:_m([`public`,`private`]),resources:q(N),nextCursor:r.optional()}),"resources/templates/list":Ft({ttlMs:K().int().min(0),cacheScope:_m([`public`,`private`]),resourceTemplates:q(P),nextCursor:r.optional()}),"resources/read":Ft({ttlMs:K().int().min(0),cacheScope:_m([`public`,`private`]),contents:q(lm([A,j]))}),"completion/complete":Ft({completion:J({values:q(G()).max(100),total:K().int().optional(),hasMore:em().optional()}).loose()}),"server/discover":Ft({ttlMs:K().int().min(0).catch(0),cacheScope:_m([`public`,`private`]).catch(`private`),supportedVersions:q(G()),capabilities:je,instructions:G().optional()}),"subscriptions/listen":Ft({})},Lt=sm({"io.modelcontextprotocol/subscriptionId":i.optional()}),Rt=J({method:Y(`notifications/subscriptions/acknowledged`),params:J({_meta:Lt.optional(),notifications:kt})}),zt=J({_meta:Lt.optional(),requestId:i,reason:G().optional()}),Bt=J({method:Y(`notifications/cancelled`),params:zt}),Vt={"notifications/cancelled":Bt,"notifications/progress":E,"notifications/message":O,"notifications/resources/updated":L,"notifications/resources/list_changed":F,"notifications/tools/list_changed":le,"notifications/prompts/list_changed":ne,"notifications/subscriptions/acknowledged":Rt},Ht=e=>J({jsonrpc:Y(`2.0`),id:lm([G(),K().int()]),result:e}).strict();return{JSONValueSchema:e,JSONObjectSchema:t,ProgressTokenSchema:n,CursorSchema:r,RequestIdSchema:i,RoleSchema:a,LoggingLevelSchema:o,TaskMetadataSchema:c,RelatedTaskMetadataSchema:l,RequestMetaSchema:u,BaseRequestParamsSchema:d,TaskAugmentedRequestParamsSchema:f,NotificationsParamsSchema:p,NotificationSchema:m,IconSchema:h,IconsSchema:g,BaseMetadataSchema:_,ImplementationSchema:v,ClientTasksCapabilitySchema:b,ServerTasksCapabilitySchema:x,ClientCapabilitiesSchema:S,ServerCapabilitiesSchema:C,ProgressSchema:w,ProgressNotificationParamsSchema:T,ProgressNotificationSchema:E,LoggingMessageNotificationParamsSchema:D,LoggingMessageNotificationSchema:O,ResourceContentsSchema:k,TextResourceContentsSchema:A,BlobResourceContentsSchema:j,AnnotationsSchema:M,ResourceSchema:N,ResourceTemplateSchema:P,ResourceListChangedNotificationSchema:F,ResourceUpdatedNotificationParamsSchema:I,ResourceUpdatedNotificationSchema:L,PromptArgumentSchema:ee,PromptSchema:te,PromptListChangedNotificationSchema:ne,TextContentSchema:R,ImageContentSchema:z,AudioContentSchema:B,ToolUseContentSchema:re,EmbeddedResourceSchema:ie,ResourceLinkSchema:ae,ContentBlockSchema:oe,PromptMessageSchema:se,ToolAnnotationsSchema:ce,ToolListChangedNotificationSchema:le,ModelHintSchema:ue,ModelPreferencesSchema:de,ToolChoiceSchema:fe,BooleanSchemaSchema:pe,StringSchemaSchema:me,NumberSchemaSchema:V,UntitledSingleSelectEnumSchemaSchema:he,TitledSingleSelectEnumSchemaSchema:ge,LegacyTitledEnumSchemaSchema:_e,SingleSelectEnumSchemaSchema:ve,UntitledMultiSelectEnumSchemaSchema:ye,TitledMultiSelectEnumSchemaSchema:be,MultiSelectEnumSchemaSchema:xe,EnumSchemaSchema:Se,PrimitiveSchemaDefinitionSchema:Ce,ElicitRequestFormParamsSchema:we,ResourceTemplateReferenceSchema:Te,PromptReferenceSchema:Ee,RootSchema:De,ClientCapabilities2026Schema:ke,ServerCapabilities2026Schema:je,RequestMetaEnvelopeSchema:Me,ToolSchema:Ne,ToolResultContentSchema:Pe,SamplingMessageContentBlockSchema:Fe,SamplingMessageSchema:Ie,ResultTypeSchema:Le,ResultMetaSchema:Re,ResultSchema:Ve,PaginatedResultSchema:He,CallToolResultSchema:Ue,ListToolsResultSchema:H,ListPromptsResultSchema:We,GetPromptResultSchema:Ge,ListResourcesResultSchema:Ke,ListResourceTemplatesResultSchema:qe,ReadResourceResultSchema:Je,CompleteResultSchema:Ye,CacheableResultSchema:Xe,DiscoverResultSchema:Ze,CreateMessageRequestParamsSchema:Qe,CreateMessageRequestSchema:$e,ListRootsRequestSchema:et,CreateMessageResultSchema:tt,ListRootsResultSchema:nt,ElicitResultSchema:rt,ElicitRequestURLParamsSchema:it,ElicitRequestParamsSchema:at,ElicitRequestSchema:ot,InputRequestSchema:st,InputResponseSchema:ct,InputRequestsSchema:lt,InputResponsesSchema:ut,InputRequiredResultSchema:dt,InputResponseRequestParamsSchema:pt,CallToolRequestSchema:yt,ListToolsRequestSchema:bt,ListPromptsRequestSchema:xt,GetPromptRequestSchema:St,ListResourcesRequestSchema:Ct,ListResourceTemplatesRequestSchema:wt,ReadResourceRequestSchema:Tt,CompleteRequestSchema:Dt,DiscoverRequestSchema:Ot,SubscriptionFilterSchema:kt,SubscriptionsListenRequestSchema:jt,SubscriptionsListenResultMetaSchema:Mt,SubscriptionsListenResultSchema:Nt,dispatchRequestSchemas:Pt,dispatchResultSchemas:It,NotificationMetaSchema:Lt,SubscriptionsAcknowledgedNotificationSchema:Rt,CancelledNotificationParamsSchema:zt,CancelledNotificationSchema:Bt,notificationSchemas2026:Vt,JSONRPCResultResponseSchema:Ht(Ve),CallToolResultResponseSchema:Ht(lm([Ue,dt])),ListToolsResultResponseSchema:Ht(H),ListPromptsResultResponseSchema:Ht(We),GetPromptResultResponseSchema:Ht(lm([Ge,dt])),ListResourcesResultResponseSchema:Ht(Ke),ListResourceTemplatesResultResponseSchema:Ht(qe),ReadResourceResultResponseSchema:Ht(lm([Je,dt])),CompleteResultResponseSchema:Ht(Ye),DiscoverResultResponseSchema:Ht(Ze)}}var Kv;function qv(){return Kv??=Gv()}var Jv=[`tools/list`,`prompts/list`,`resources/list`,`resources/templates/list`,`resources/read`,`server/discover`];function Yv(e){return Jv.includes(e)}var Xv=Symbol(`modelcontextprotocol.resultCacheHintFallback`);function Zv(e){return e[Xv]}function Qv(e){return typeof e==`number`&&Number.isSafeInteger(e)&&e>=0}function $v(e){return e===`public`||e===`private`}var ey=function(e){return e[e.ParseError=-32700]=`ParseError`,e[e.InvalidRequest=-32600]=`InvalidRequest`,e[e.MethodNotFound=-32601]=`MethodNotFound`,e[e.InvalidParams=-32602]=`InvalidParams`,e[e.InternalError=-32603]=`InternalError`,e[e.ResourceNotFound=-32002]=`ResourceNotFound`,e[e.MissingRequiredClientCapability=-32021]=`MissingRequiredClientCapability`,e[e.UnsupportedProtocolVersion=-32022]=`UnsupportedProtocolVersion`,e[e.UrlElicitationRequired=-32042]=`UrlElicitationRequired`,e}({}),ty=class e extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.ProtocolError`})}static[Symbol.hasInstance](e){return pv(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return pv(this,e)}constructor(e,t,n){super(t),this.code=e,this.data=n,this.name=`ProtocolError`,fv(this,new.target)}static fromError(t,n,r){if(t===ey.UrlElicitationRequired&&r){let e=r;if(e.elicitations)return new ry(e.elicitations,n)}if(t===ey.UnsupportedProtocolVersion&&r){let e=r;if(Array.isArray(e.supported)&&typeof e.requested==`string`)return new iy({supported:e.supported,requested:e.requested},n)}if(t===ey.InvalidParams||t===ey.ResourceNotFound){let e=r;if(typeof e?.uri==`string`&&(t===ey.ResourceNotFound||Object.keys(e).length===1))return new ny(e.uri,n)}if(t===ey.MissingRequiredClientCapability&&r){let e=r;if(e.requiredCapabilities!==null&&typeof e.requiredCapabilities==`object`&&!Array.isArray(e.requiredCapabilities))return new ay({requiredCapabilities:e.requiredCapabilities},n)}return new e(t,n,r)}},ny=class extends ty{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.ResourceNotFoundError`})}constructor(e,t=`Resource not found: ${e}`){super(ey.InvalidParams,t,{uri:e})}get uri(){return this.data.uri}},ry=class extends ty{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.UrlElicitationRequiredError`})}constructor(e,t=`URL elicitation${e.length>1?`s`:``} required`){super(ey.UrlElicitationRequired,t,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}},iy=class extends ty{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.UnsupportedProtocolVersionError`})}constructor(e,t=`Unsupported protocol version: ${e.requested}`){super(ey.UnsupportedProtocolVersion,t,e)}get supported(){return this.data.supported}get requested(){return this.data.requested}},ay=class extends ty{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.MissingRequiredClientCapabilityError`})}constructor(e,t=`Missing required client capabilities: ${Object.keys(e.requiredCapabilities).join(`, `)}`){super(ey.MissingRequiredClientCapability,t,e)}get requiredCapabilities(){return this.data.requiredCapabilities}},oy=0,sy=`private`,cy=[`tools/call`,`prompts/get`,`resources/read`];function ly(e,t){let n=t.resultType;if(n===void 0)return{...t,resultType:`complete`};if(n===`complete`||cy.includes(e))return t;throw new ty(ey.InternalError,`Handler for ${e} returned resultType '${String(n)}', but results of ${e} only support 'complete' on protocol revision 2026-07-28`)}function uy(e,t){let n=Zv(t);if(t.resultType!==`complete`||!Yv(e))return n===void 0?t:hy(t);let r=t,i=Qv(r.ttlMs)?r.ttlMs:py(n),a=$v(r.cacheScope)?r.cacheScope:my(n),o={...r,ttlMs:i,cacheScope:a};return delete o[Xv],o}function dy(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function fy(e,t){if(t===void 0)return e;let n=e._meta;return n===void 0?{...e,_meta:{[Um]:t}}:!dy(n)||n[`io.modelcontextprotocol/serverInfo`]!==void 0?e:{...e,_meta:{...n,[Um]:t}}}function py(e){return e!==void 0&&Qv(e.ttlMs)?e.ttlMs:oy}function my(e){return e!==void 0&&$v(e.cacheScope)?e.cacheScope:sy}function hy(e){let t={...e};return delete t[Xv],t}var gy=[`elicitation/create`,`sampling/createMessage`,`roots/list`],_y;function vy(){if(_y)return _y;let e=qv();return _y={request:{"elicitation/create":J({method:Y(`elicitation/create`),params:e.ElicitRequestParamsSchema}),"sampling/createMessage":J({method:Y(`sampling/createMessage`),params:e.CreateMessageRequestParamsSchema}),"roots/list":J({method:Y(`roots/list`),params:sm({}).optional()})},response:{"elicitation/create":e.ElicitResultSchema,"sampling/createMessage":e.CreateMessageResultSchema,"roots/list":e.ListRootsResultSchema}},_y}function yy(e){return gy.includes(e)}function by(e){return yy(e)?vy().request[e]:void 0}function xy(e){return yy(e)?vy().response[e]:void 0}var Sy={"tools/call":null,"tools/list":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"completion/complete":null,"server/discover":null,"subscriptions/listen":null},Cy={"notifications/cancelled":null,"notifications/progress":null,"notifications/message":null,"notifications/resources/updated":null,"notifications/resources/list_changed":null,"notifications/tools/list_changed":null,"notifications/prompts/list_changed":null,"notifications/subscriptions/acknowledged":null};function wy(e){return Object.prototype.hasOwnProperty.call(Sy,e)}function Ty(e){return Object.prototype.hasOwnProperty.call(Cy,e)}function Ey(e){return Object.prototype.hasOwnProperty.call(Sy,e)}function Dy(e){return wy(e)?qv().dispatchRequestSchemas[e]:void 0}function Oy(e){return Ey(e)?qv().dispatchResultSchemas[e]:void 0}function ky(e){return Ty(e)?qv().notificationSchemas2026[e]:void 0}Object.keys(Sy),Object.keys(Cy);function Ay(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function jy(e,t){if(e===void 0)return{ok:!1,reason:`not-in-era`};let n=e.safeParse(t);return n.success?{ok:!0,value:n.data}:{ok:!1,reason:`invalid`,message:String(n.error)}}var My={ok:!1,reason:`not-in-era`},Ny=[Vm,Wm];function Py(e,t){let n=t,r=!1,i=()=>(r||=(n={...n},!0),n),a=t.tools;e===`tools/list`&&Array.isArray(a)&&a.some(e=>Ay(e)&&`execution`in e)&&(i().tools=a.map(e=>{if(!Ay(e)||!(`execution`in e))return e;let t={...e};return delete t.execution,t}));let o=t.capabilities;if(Ay(o)&&`tasks`in o){let e={...o};delete e.tasks,i().capabilities=e}return n}var Fy={era:`2026-07-28`,hasRequestMethod:wy,hasNotificationMethod:Ty,hasInputRequestMethod:e=>by(e)!==void 0,validateRequest:(e,t)=>jy(Dy(e),t),validateResult:(e,t)=>jy(Oy(e),t),validateNotification:(e,t)=>jy(ky(e),t),validateInputRequest:(e,t)=>jy(by(e),t),validateInputResponse:(e,t)=>jy(xy(e),t),samplingResultVariant:()=>My,outboundEnvelope(e){return{[Vm]:e.protocolVersion,[Hm]:e.clientInfo,[Wm]:e.clientCapabilities,...e.logLevel!==void 0&&{"io.modelcontextprotocol/logLevel":e.logLevel}}},validateEnvelopeMeta(e){let t=[];for(let n of Ny)n in e||t.push({key:n,problem:`missing`});let n=qv().RequestMetaEnvelopeSchema.safeParse(e);if(!n.success)for(let e of n.error.issues){let n=e.path.map(String),r=n.length>0?n.join(`.`):`_meta`;n.length===1&&t.some(e=>e.key===r&&e.problem===`missing`)||t.push({key:r,problem:e.message})}return t},projectCallToolResult:e=>wv(e),inputRequestSchema:by,decodeResult(e,t){if(!Ay(t))return{kind:`invalid`,error:new _v(gv.InvalidResult,`Invalid result for ${e}: not an object`,{method:e})};let n=t.resultType;if(n===void 0)return{kind:`invalid`,error:new _v(gv.InvalidResult,`Invalid result for ${e}: missing required resultType — servers implementing protocol revision 2026-07-28 MUST include it (the absent-means-complete bridge applies only to earlier-revision servers)`,{method:e,violation:`missing-resultType`})};if(typeof n!=`string`)return{kind:`invalid`,error:new _v(gv.InvalidResult,`Invalid result for ${e}: non-string resultType`,{method:e,resultType:n})};if(n===`input_required`){let n=t.inputRequests,r=Ay(n)?n:{},i=t.requestState;return Object.keys(r).length===0&&typeof i!=`string`?{kind:`invalid`,error:new _v(gv.InvalidResult,`Invalid result for ${e}: input_required carries neither inputRequests nor requestState (every input_required result must include at least one of the two)`,{method:e,violation:`input-required-missing-both`})}:{kind:`input_required`,inputRequests:r,...typeof i==`string`&&{requestState:i}}}if(n!==`complete`)return{kind:`invalid`,error:new _v(gv.UnsupportedResultType,`Unsupported result type '${n}' for ${e}`,{resultType:n,method:e})};let r=Ly(),i=Object.hasOwn(r,e)?r[e]:void 0;if(i!==void 0){let n=i.safeParse(t);if(!n.success)return{kind:`invalid`,error:new _v(gv.InvalidResult,`Invalid result for ${e}: ${n.error}`,{method:e})}}let a={...t};return delete a.resultType,{kind:`complete`,result:a}},encodeResult(e,t,n){return fy(uy(e,ly(e,Py(e,t))),n)},encodeErrorCode:e=>e===-32002?-32602:e,checkInboundEnvelope(e){if(e.envelope===void 0)return`Request is missing the required _meta envelope for protocol revision 2026-07-28 (io.modelcontextprotocol/protocolVersion, io.modelcontextprotocol/clientCapabilities)`;let t=qv().RequestMetaEnvelopeSchema.safeParse(e.envelope);if(!t.success)return`Invalid _meta envelope for protocol revision 2026-07-28: ${t.error.issues.map(e=>e.message).join(`; `)}`}},Iy;function Ly(){if(Iy)return Iy;let e=qv();return Iy={"tools/call":e.CallToolResultSchema,"tools/list":e.ListToolsResultSchema,"prompts/get":e.GetPromptResultSchema,"prompts/list":e.ListPromptsResultSchema,"resources/list":e.ListResourcesResultSchema,"resources/templates/list":e.ListResourceTemplatesResultSchema,"resources/read":e.ReadResourceResultSchema,"completion/complete":e.CompleteResultSchema,"server/discover":e.DiscoverResultSchema},Iy}var Ry=`2026-07-28`;function zy(e){return e!==void 0&&xv(e)?Fy:Wv}function By(e){return e.revision===void 0?e.era===`modern`?Fy.era:Wv.era:zy(e.revision).era}function Vy(e){return Uy.some(t=>t.hasRequestMethod(e))}function Hy(e){return Uy.some(t=>t.hasNotificationMethod(e))}var Uy=[Wv,Fy],Wy=Cs({AnnotationsSchema:()=>Wh,AudioContentSchema:()=>Cg,BaseMetadataSchema:()=>bh,BaseRequestParamsSchema:()=>th,BlobResourceContentsSchema:()=>Hh,BooleanSchemaSchema:()=>r_,CallToolRequestParamsSchema:()=>Lg,CallToolRequestSchema:()=>Rg,CallToolResultSchema:()=>Ig,CancelTaskRequestSchema:()=>U_,CancelTaskResultSchema:()=>W_,CancelledNotificationParamsSchema:()=>gh,CancelledNotificationSchema:()=>_h,ClientCapabilitiesSchema:()=>wh,ClientNotificationSchema:()=>K_,ClientRequestSchema:()=>G_,ClientResultSchema:()=>q_,ClientTasksCapabilitySchema:()=>Sh,CompatibilityCallToolResultSchema:()=>vee,CompleteRequestParamsSchema:()=>w_,CompleteRequestSchema:()=>T_,CompleteResultSchema:()=>E_,ContentBlockSchema:()=>Dg,CreateMessageRequestParamsSchema:()=>$g,CreateMessageRequestSchema:()=>e_,CreateMessageResultSchema:()=>t_,CreateMessageResultWithToolsSchema:()=>n_,CreateTaskResultSchema:()=>P_,CursorSchema:()=>Zm,DiscoverRequestSchema:()=>Ah,DiscoverResultSchema:()=>jh,ElicitRequestFormParamsSchema:()=>h_,ElicitRequestParamsSchema:()=>__,ElicitRequestSchema:()=>v_,ElicitRequestURLParamsSchema:()=>g_,ElicitResultSchema:()=>x_,ElicitationCompleteNotificationParamsSchema:()=>y_,ElicitationCompleteNotificationSchema:()=>b_,EmbeddedResourceSchema:()=>Tg,EmptyResultSchema:()=>hh,EnumSchemaSchema:()=>p_,GetPromptRequestParamsSchema:()=>yg,GetPromptRequestSchema:()=>bg,GetPromptResultSchema:()=>kg,GetTaskPayloadRequestSchema:()=>z_,GetTaskPayloadResultSchema:()=>B_,GetTaskRequestSchema:()=>L_,GetTaskResultSchema:()=>R_,IconSchema:()=>vh,IconsSchema:()=>yh,ImageContentSchema:()=>Sg,ImplementationSchema:()=>xh,InitializeRequestParamsSchema:()=>Th,InitializeRequestSchema:()=>Eh,InitializeResultSchema:()=>Oh,InitializedNotificationSchema:()=>kh,JSONArraySchema:()=>Ym,JSONObjectSchema:()=>Jm,JSONRPCErrorResponseSchema:()=>fh,JSONRPCMessageSchema:()=>ph,JSONRPCNotificationSchema:()=>uh,JSONRPCRequestSchema:()=>lh,JSONRPCResponseSchema:()=>mh,JSONRPCResultResponseSchema:()=>dh,JSONValueSchema:()=>qm,LegacyTitledEnumSchemaSchema:()=>c_,ListChangedOptionsBaseSchema:()=>Bg,ListPromptsRequestSchema:()=>_g,ListPromptsResultSchema:()=>vg,ListResourceTemplatesRequestSchema:()=>Yh,ListResourceTemplatesResultSchema:()=>Xh,ListResourcesRequestSchema:()=>qh,ListResourcesResultSchema:()=>Jh,ListRootsRequestSchema:()=>O_,ListRootsResultSchema:()=>k_,ListTasksRequestSchema:()=>V_,ListTasksResultSchema:()=>H_,ListToolsRequestSchema:()=>Pg,ListToolsResultSchema:()=>Fg,LoggingLevelSchema:()=>Vg,LoggingMessageNotificationParamsSchema:()=>Wg,LoggingMessageNotificationSchema:()=>Gg,ModelHintSchema:()=>Kg,ModelPreferencesSchema:()=>qg,MultiSelectEnumSchemaSchema:()=>f_,NotificationSchema:()=>ah,NotificationsParamsSchema:()=>ih,NumberSchemaSchema:()=>a_,PaginatedRequestParamsSchema:()=>Ih,PaginatedRequestSchema:()=>Lh,PaginatedResultSchema:()=>Rh,PingRequestSchema:()=>Mh,PrimitiveSchemaDefinitionSchema:()=>m_,ProgressNotificationParamsSchema:()=>Ph,ProgressNotificationSchema:()=>Fh,ProgressSchema:()=>Nh,ProgressTokenSchema:()=>Xm,PromptArgumentSchema:()=>hg,PromptListChangedNotificationSchema:()=>Ag,PromptMessageSchema:()=>Og,PromptReferenceSchema:()=>C_,PromptSchema:()=>gg,ReadResourceRequestParamsSchema:()=>Qh,ReadResourceRequestSchema:()=>$h,ReadResourceResultSchema:()=>eg,RelatedTaskMetadataSchema:()=>$m,RequestIdSchema:()=>ch,RequestMetaSchema:()=>eh,RequestSchema:()=>rh,ResourceContentsSchema:()=>zh,ResourceLinkSchema:()=>Eg,ResourceListChangedNotificationSchema:()=>tg,ResourceRequestParamsSchema:()=>Zh,ResourceSchema:()=>Gh,ResourceTemplateReferenceSchema:()=>S_,ResourceTemplateSchema:()=>Kh,ResourceUpdatedNotificationParamsSchema:()=>pg,ResourceUpdatedNotificationSchema:()=>mg,ResultMetaObjectSchema:()=>oh,ResultSchema:()=>sh,RoleSchema:()=>Uh,RootSchema:()=>D_,RootsListChangedNotificationSchema:()=>A_,SamplingContentSchema:()=>Xg,SamplingMessageContentBlockSchema:()=>Zg,SamplingMessageSchema:()=>Qg,ServerCapabilitiesSchema:()=>Dh,ServerNotificationSchema:()=>Y_,ServerRequestSchema:()=>J_,ServerResultSchema:()=>X_,ServerTasksCapabilitySchema:()=>Ch,SetLevelRequestParamsSchema:()=>Hg,SetLevelRequestSchema:()=>Ug,SingleSelectEnumSchemaSchema:()=>l_,StringSchemaSchema:()=>i_,SubscribeRequestParamsSchema:()=>ng,SubscribeRequestSchema:()=>rg,SubscriptionFilterSchema:()=>og,SubscriptionsAcknowledgedNotificationParamsSchema:()=>lg,SubscriptionsAcknowledgedNotificationSchema:()=>ug,SubscriptionsListenRequestParamsSchema:()=>sg,SubscriptionsListenRequestSchema:()=>cg,SubscriptionsListenResultMetaSchema:()=>dg,SubscriptionsListenResultSchema:()=>fg,TaskAugmentedRequestParamsSchema:()=>nh,TaskCreationParamsSchema:()=>j_,TaskMetadataSchema:()=>Qm,TaskSchema:()=>N_,TaskStatusNotificationParamsSchema:()=>F_,TaskStatusNotificationSchema:()=>I_,TaskStatusSchema:()=>M_,TextContentSchema:()=>xg,TextResourceContentsSchema:()=>Bh,TitledMultiSelectEnumSchemaSchema:()=>d_,TitledSingleSelectEnumSchemaSchema:()=>s_,ToolAnnotationsSchema:()=>jg,ToolChoiceSchema:()=>Jg,ToolExecutionSchema:()=>Mg,ToolListChangedNotificationSchema:()=>zg,ToolResultContentSchema:()=>Yg,ToolSchema:()=>Ng,ToolUseContentSchema:()=>wg,UnsubscribeRequestParamsSchema:()=>ig,UnsubscribeRequestSchema:()=>ag,UntitledMultiSelectEnumSchemaSchema:()=>u_,UntitledSingleSelectEnumSchemaSchema:()=>o_}),Gy=e=>lh.safeParse(e).success,Ky=e=>uh.safeParse(e).success,qy=e=>dh.safeParse(e).success,Jy=e=>fh.safeParse(e).success,Oee=e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&e.resultType===`input_required`,Yy=e=>Eh.safeParse(e).success,kee=e=>kh.safeParse(e).success,Aee=`Mcp-Param-`,Xy=`x-mcp-header`,jee=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/,Mee=new Set([`string`,`integer`,`boolean`,`number`]);function Zy(e){let t=[],n=new Map,r=(e,i,a)=>{if(typeof e!=`object`||!e)return;let o=e;if(Xy in o){if(!a||i.length===0)return`${Qy(i)}: x-mcp-header is only permitted on properties statically reachable via a chain of 'properties' keys (not under items, additionalProperties, oneOf/anyOf/allOf/not, if/then/else, or $ref)`;let e=o[Xy];if(typeof e!=`string`||e.length===0)return`${Qy(i)}: x-mcp-header MUST be a non-empty string`;if(!jee.test(e))return`${Qy(i)}: x-mcp-header '${e}' is not a valid RFC 9110 token (no spaces, control characters or HTTP delimiters)`;let r=typeof o.type==`string`?o.type:void 0;if(r===void 0||!Mee.has(r))return`${Qy(i)}: x-mcp-header is only permitted on primitive-typed properties (string, integer, boolean); got ${r??`<none>`}`;let s=e.toLowerCase(),c=n.get(s);if(c!==void 0)return`x-mcp-header '${e}' is not case-insensitively unique (also declared as '${c}')`;n.set(s,e),t.push({path:i,headerName:e,type:r})}let s=o.properties;if(typeof s==`object`&&s)for(let[e,t]of Object.entries(s)){let n=r(t,[...i,e],a);if(n!==void 0)return n}for(let e of Nee){let t=o[e];if(t===void 0)continue;let n=Array.isArray(t)?t:typeof t==`object`&&t&&Pee.has(e)?Object.values(t):[t];for(let t of n){let n=r(t,[...i,`<${e}>`],!1);if(n!==void 0)return n}}},i=r(e,[],!0);return i===void 0?{valid:!0,declarations:t}:{valid:!1,reason:i}}var Nee=[`items`,`prefixItems`,`contains`,`additionalProperties`,`unevaluatedProperties`,`unevaluatedItems`,`propertyNames`,`patternProperties`,`dependentSchemas`,`oneOf`,`anyOf`,`allOf`,`not`,`if`,`then`,`else`,`$defs`,`definitions`],Pee=new Set([`patternProperties`,`dependentSchemas`,`$defs`,`definitions`]);function Qy(e){return e.length===0?`<root>`:e.join(`.`)}var $y=`=?base64?`,eb=`?=`;function Fee(e){if(typeof e==`string`)return e;if(typeof e==`boolean`)return e?`true`:`false`;if(typeof e==`number`)return!Number.isFinite(e)||Number.isInteger(e)&&!Number.isSafeInteger(e)?void 0:String(e)}function Iee(e){if(e.length===0||e.startsWith($y)&&e.endsWith(eb)||e!==e.trim())return!0;for(let t=0;t<e.length;t++){let n=e.codePointAt(t);if(!(n===9||n>=32&&n<=126))return!0}return!1}function Lee(e){let t=new TextEncoder().encode(e),n=``;for(let e of t)n+=String.fromCodePoint(e);return btoa(n)}function tb(e){return Iee(e)?`${$y}${Lee(e)}${eb}`:e}function Ree(e,t){let n=e;for(let e of t){if(typeof n!=`object`||!n)return;n=n[e]}return n}function zee(e,t){let n={};for(let r of e){let e=Ree(t,r.path);if(e==null)continue;let i=Fee(e);i!==void 0&&(n[`${Aee}${r.headerName}`]=tb(i))}return n}ey.InvalidRequest,ey.UnsupportedProtocolVersion,ey.InvalidParams,ey.MethodNotFound,ey.InvalidParams,ey.MissingRequiredClientCapability,ey.ParseError,ey.InvalidRequest,ey.MethodNotFound,ey.UnsupportedProtocolVersion,ey.MissingRequiredClientCapability;function nb(e,t){return hp(e,t)}function rb(e){return new Set(e.flatMap(e=>Object.keys(e.shape)))}function ib(e){if(e==null)return!1;let t=typeof e;return t!==`object`&&t!==`function`||!(`~standard`in e)?!1:typeof e[`~standard`]?.validate==`function`}var ab=!1,ob=`draft-2020-12`;function Bee(e,t=`input`){let n=e[`~standard`],r;if(n.jsonSchema)r=n.jsonSchema[t]({target:ob});else if(n.vendor===`zod`){if(!(`_zod`in e))throw Error(`Schema appears to be from zod 3, which the SDK cannot convert to JSON Schema. Upgrade to zod >=4.2.0, or wrap your JSON Schema with fromJsonSchema().`);ab||(ab=!0,console.warn("[mcp-sdk] Your zod version does not implement `~standard.jsonSchema` (added in zod 4.2.0). Falling back to z.toJSONSchema(). Upgrade to zod >=4.2.0 to silence this warning.")),r=rp(e,{target:ob,io:t})}else throw Error(`Schema library "${n.vendor}" does not implement StandardJSONSchemaV1 (\`~standard.jsonSchema\`). Upgrade to a version that does, or wrap your JSON Schema with fromJsonSchema().`);if(t===`output`)return r.type===void 0&&sb(r)?{type:`object`,...r}:r;if(r.type!==void 0&&r.type!==`object`)throw Error(`MCP tool and prompt schemas must describe objects (got type: ${JSON.stringify(r.type)}). Wrap your schema in z.object({...}) or equivalent.`);return{type:`object`,...r}}function sb(e){if(`properties`in e||`patternProperties`in e||`additionalProperties`in e||`required`in e)return!0;for(let t of[`oneOf`,`anyOf`,`allOf`]){let n=e[t];if(Array.isArray(n)&&n.length>0)return n.every(e=>typeof e==`object`&&!!e&&(e.type===`object`||sb(e)))}return!1}function Vee(e){return e.path?.length?`${e.path.map(e=>String(typeof e==`object`?e.key:e)).join(`.`)}: ${e.message}`:e.message}async function cb(e,t){let n=await e[`~standard`].validate(t);return n.issues&&n.issues.length>0?{success:!1,error:n.issues.map(e=>Vee(e)).join(`, `)}:{success:!0,data:n.value}}function Hee(e){let t=rp(e,{target:ob,io:`input`});return typeof t.pattern==`string`?t.pattern:void 0}var Uee=/\\\.\\d\{(\d+)\}/;function Wee(e){let t=Uee.exec(e),n=[void 0,-1,0];return t&&n.push(Number(t[1])),[!1,!0].flatMap(e=>[!1,!0].flatMap(t=>n.map(n=>ap({local:e,offset:t,precision:n}))))}function Gee(e,t){let n;switch(e){case`email`:n=[Mp()];break;case`uri`:n=[Ip()];break;case`date`:n=[sp()];break;case`date-time`:n=Wee(t);break}return new Set(n.map(e=>Hee(e)).filter(e=>e!==void 0))}function Kee(e,t,n){return n!==`zod`||Gee(e,t).has(t)}function lb(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function qee(e){try{return Bee(e,`input`)}catch(e){let t=e instanceof Error?e.message:String(e);throw new ty(ey.InvalidParams,`Elicitation requestedSchema must describe an object with flat primitive properties: ${t}`)}}var Jee=new Set([`$comment`,`deprecated`,`description`,`examples`,`readOnly`,`title`,`writeOnly`]);function ub(e){return Jee.has(e)||e.startsWith(`x-`)}var Yee=new Set([`$schema`,...Object.keys(h_.shape.requestedSchema.shape)]),db={string:rb([i_,o_,s_,c_]),number:rb([a_]),integer:rb([a_]),boolean:rb([r_]),array:rb([u_,d_])},Xee=new Set(i_.shape.format.unwrap().options);function Zee(e,t,n,r){if(!lb(e))return e;let i=typeof e.type==`string`&&Object.hasOwn(db,e.type)?db[e.type]:void 0;if(i===void 0)return e;let a={};for(let[o,s]of Object.entries(e))i.has(o)||ub(o)?a[o]=s:o===`pattern`&&e.type===`string`&&typeof e.format==`string`?Xee.has(e.format)?(typeof s!=`string`||!Kee(e.format,s,n))&&r.push(`${t}.${o}`):a[o]=s:r.push(`${t}.${o}`);return a}function Qee(e,t){let n={},r=[];for(let[i,a]of Object.entries(e))i===`properties`&&lb(a)?n[i]=Object.fromEntries(Object.entries(a).map(([e,n])=>[e,Zee(n,`properties.${e}`,t,r)])):Yee.has(i)?n[i]=a:ub(i)||r.push(i);if(r.length>0)throw new ty(ey.InvalidParams,`Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${r.join(`, `)}`);return n}function $ee(e,t){if(!lb(e.properties))return t;let n=Object.entries(e.properties).filter(([,e])=>!nb(m_,e).success).map(([e])=>`properties.${e}`);return n.length>0?n.join(`, `):t}function fb(e,t,n=``){return Array.isArray(e)&&Array.isArray(t)?e.flatMap((e,r)=>fb(e,t[r],`${n}[${r}]`)):!lb(e)||!lb(t)?[]:Object.entries(e).flatMap(([e,r])=>{let i=n?`${n}.${e}`:e;return Object.prototype.hasOwnProperty.call(t,e)?fb(r,t[e],i):ub(e)?[]:[i]})}function ete(e){if(!ib(e.requestedSchema))return{...e,mode:`form`,requestedSchema:e.requestedSchema};let t=e.requestedSchema[`~standard`].vendor,n=Qee(qee(e.requestedSchema),t),r=nb(h_.shape.requestedSchema,n);if(!r.success)throw new ty(ey.InvalidParams,`Elicitation requestedSchema only supports flat primitive properties (string, number, integer, boolean, and string enums): ${$ee(n,r.error.message)}`);let i=fb(n,r.data);if(i.length>0)throw new ty(ey.InvalidParams,`Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${i.join(`, `)}`);let a=(r.data.required??[]).filter(e=>!Object.prototype.hasOwnProperty.call(r.data.properties,e));if(a.length>0)throw new ty(ey.InvalidParams,`Elicitation requestedSchema lists required properties that are not defined in properties: ${a.join(`, `)}`);return{...e,mode:`form`,requestedSchema:r.data}}function tte(e){let t=e.inputRequests!==void 0&&Object.keys(e.inputRequests).length>0,n=typeof e.requestState==`string`;if(!t&&!n)throw TypeError(`inputRequired() requires at least one of inputRequests (with at least one entry) or requestState (spec: every InputRequiredResult MUST include at least one of the two)`);return{resultType:`input_required`,...e.inputRequests!==void 0&&{inputRequests:e.inputRequests},...e.requestState!==void 0&&{requestState:e.requestState}}}Object.assign(tte,{elicit(e){try{return{method:`elicitation/create`,params:ete(e)}}catch(e){throw e instanceof ty?TypeError(e.message,{cause:e}):e}},elicitUrl(e){return{method:`elicitation/create`,params:{...e,mode:`url`}}},createMessage(e){return{method:`sampling/createMessage`,params:e}},listRoots(){return{method:`roots/list`}}});var nte=!0,rte=10,ite=250;function ate(e){return{autoFulfill:e?.autoFulfill??nte,maxRounds:e?.maxRounds??rte}}function ote(e,t,n){let r=t!==void 0&&Object.keys(t).length>0;return!r&&n===void 0?e:{...e,...r&&{inputResponses:t},...n!==void 0&&{requestState:n}}}function ste(e,t){return`Multi-round-trip request '${e}' still required input after ${t} rounds (inputRequired.maxRounds)`}function cte(e,t){return new Promise((n,r)=>{if(t?.aborted){r(t.reason instanceof _v?t.reason:new _v(gv.RequestTimeout,String(t.reason)));return}let i=setTimeout(()=>{t?.removeEventListener(`abort`,a),n()},e),a=()=>{clearTimeout(i),r(t?.reason instanceof _v?t.reason:new _v(gv.RequestTimeout,String(t?.reason)))};t?.addEventListener(`abort`,a,{once:!0})})}function lte(e){let t=new AbortController,n=()=>t.abort(e?.reason);return e?.addEventListener(`abort`,n,{once:!0}),e?.aborted&&t.abort(e.reason),{signal:t.signal,abort:e=>t.abort(e),dispose:()=>e?.removeEventListener(`abort`,n)}}async function ute(e){let{config:t,method:n,originalParams:r,requestOptions:i,hooks:a,signal:o}=e,s=e.flowStartedAt??Date.now(),c=e.firstPayload,l=0;for(;;){if(l+=1,l>t.maxRounds)throw new _v(gv.InputRequiredRoundsExceeded,ste(n,t.maxRounds),{rounds:t.maxRounds,lastResult:{inputRequests:c.inputRequests,...c.requestState!==void 0&&{requestState:c.requestState}}});i.onprogress?.({progress:l,message:`Fulfilling input required by '${n}' (round ${l})`});let e=Object.entries(c.inputRequests??{}),u;if(e.length>0){let t=lte(o);try{let n=await Promise.all(e.map(async([e,n])=>{try{return[e,await a.dispatchInputRequest(e,n,t.signal)]}catch(e){throw t.abort(e),e}}));u=Object.fromEntries(n)}finally{t.dispose()}}else await cte(ite,o);let d={...i.timeout!==void 0&&{timeout:i.timeout}};if(i.maxTotalTimeout!==void 0){let e=Date.now()-s,t=i.maxTotalTimeout-e;if(t<=0)throw new _v(gv.RequestTimeout,`Maximum total timeout exceeded`,{maxTotalTimeout:i.maxTotalTimeout,totalElapsed:e});d.maxTotalTimeout=t}let f=await a.retry(ote(r,u,c.requestState),d);if(Oee(f)){c={inputRequests:f.inputRequests??{},...f.requestState!==void 0&&{requestState:f.requestState}};continue}return f}}var dte=`AnnotationsSchema.AudioContentSchema.BaseMetadataSchema.BlobResourceContentsSchema.BooleanSchemaSchema.CallToolRequestSchema.CallToolRequestParamsSchema.CallToolResultSchema.CancelledNotificationSchema.CancelledNotificationParamsSchema.CancelTaskRequestSchema.CancelTaskResultSchema.ClientCapabilitiesSchema.ClientNotificationSchema.ClientRequestSchema.ClientResultSchema.CompatibilityCallToolResultSchema.CompleteRequestSchema.CompleteRequestParamsSchema.CompleteResultSchema.ContentBlockSchema.CreateMessageRequestSchema.CreateMessageRequestParamsSchema.CreateMessageResultSchema.CreateMessageResultWithToolsSchema.CreateTaskResultSchema.CursorSchema.DiscoverRequestSchema.DiscoverResultSchema.ElicitationCompleteNotificationSchema.ElicitationCompleteNotificationParamsSchema.ElicitRequestSchema.ElicitRequestFormParamsSchema.ElicitRequestParamsSchema.ElicitRequestURLParamsSchema.ElicitResultSchema.EmbeddedResourceSchema.EmptyResultSchema.EnumSchemaSchema.GetPromptRequestSchema.GetPromptRequestParamsSchema.GetPromptResultSchema.GetTaskPayloadRequestSchema.GetTaskPayloadResultSchema.GetTaskRequestSchema.GetTaskResultSchema.IconSchema.IconsSchema.ImageContentSchema.ImplementationSchema.InitializedNotificationSchema.InitializeRequestSchema.InitializeRequestParamsSchema.InitializeResultSchema.JSONArraySchema.JSONObjectSchema.JSONRPCErrorResponseSchema.JSONRPCMessageSchema.JSONRPCNotificationSchema.JSONRPCRequestSchema.JSONRPCResponseSchema.JSONRPCResultResponseSchema.JSONValueSchema.LegacyTitledEnumSchemaSchema.ListPromptsRequestSchema.ListPromptsResultSchema.ListResourcesRequestSchema.ListResourcesResultSchema.ListResourceTemplatesRequestSchema.ListResourceTemplatesResultSchema.ListRootsRequestSchema.ListRootsResultSchema.ListTasksRequestSchema.ListTasksResultSchema.ListToolsRequestSchema.ListToolsResultSchema.LoggingLevelSchema.LoggingMessageNotificationSchema.LoggingMessageNotificationParamsSchema.ModelHintSchema.ModelPreferencesSchema.MultiSelectEnumSchemaSchema.NotificationSchema.NumberSchemaSchema.PaginatedRequestSchema.PaginatedRequestParamsSchema.PaginatedResultSchema.PingRequestSchema.PrimitiveSchemaDefinitionSchema.ProgressSchema.ProgressNotificationSchema.ProgressNotificationParamsSchema.ProgressTokenSchema.PromptSchema.PromptArgumentSchema.PromptListChangedNotificationSchema.PromptMessageSchema.PromptReferenceSchema.ReadResourceRequestSchema.ReadResourceRequestParamsSchema.ReadResourceResultSchema.RelatedTaskMetadataSchema.RequestSchema.RequestIdSchema.RequestMetaSchema.ResourceSchema.ResourceContentsSchema.ResourceLinkSchema.ResourceListChangedNotificationSchema.ResourceRequestParamsSchema.ResourceTemplateSchema.ResourceTemplateReferenceSchema.ResourceUpdatedNotificationSchema.ResourceUpdatedNotificationParamsSchema.ResultMetaObjectSchema.ResultSchema.RoleSchema.RootSchema.RootsListChangedNotificationSchema.SamplingContentSchema.SamplingMessageSchema.SamplingMessageContentBlockSchema.ServerCapabilitiesSchema.ServerNotificationSchema.ServerRequestSchema.ServerResultSchema.SetLevelRequestSchema.SetLevelRequestParamsSchema.SingleSelectEnumSchemaSchema.StringSchemaSchema.SubscribeRequestSchema.SubscribeRequestParamsSchema.SubscriptionFilterSchema.SubscriptionsAcknowledgedNotificationSchema.SubscriptionsAcknowledgedNotificationParamsSchema.SubscriptionsListenRequestSchema.SubscriptionsListenRequestParamsSchema.SubscriptionsListenResultSchema.SubscriptionsListenResultMetaSchema.TaskAugmentedRequestParamsSchema.TaskCreationParamsSchema.TaskMetadataSchema.TaskSchema.TaskStatusSchema.TaskStatusNotificationSchema.TaskStatusNotificationParamsSchema.TextContentSchema.TextResourceContentsSchema.TitledMultiSelectEnumSchemaSchema.TitledSingleSelectEnumSchemaSchema.ToolSchema.ToolAnnotationsSchema.ToolChoiceSchema.ToolExecutionSchema.ToolListChangedNotificationSchema.ToolResultContentSchema.ToolUseContentSchema.UnsubscribeRequestSchema.UnsubscribeRequestParamsSchema.UntitledMultiSelectEnumSchemaSchema.UntitledSingleSelectEnumSchemaSchema`.split(`.`),fte={IdJagTokenExchangeResponseSchema:rv,OAuthClientInformationFullSchema:cv,OAuthClientInformationSchema:sv,OAuthClientMetadataSchema:ov,OAuthClientRegistrationErrorSchema:lv,OAuthErrorResponseSchema:iv,OAuthMetadataSchema:$_,OAuthProtectedResourceMetadataSchema:Q_,OAuthTokenRevocationRequestSchema:uv,OAuthTokensSchema:nv,OpenIdProviderDiscoveryMetadataSchema:tv,OpenIdProviderMetadataSchema:ev},pb={},mb={};function hb(e,t){let n=e.slice(0,-6);pb[n]=t,mb[n]=e=>t.safeParse(e).success}for(let e of dte)hb(e,Wy[e]);for(let[e,t]of Object.entries(fte))hb(e,t);Object.freeze(pb);var pte=Object.freeze(mb);function mte(e){switch(e){case`initialize`:case`notifications/initialized`:return zy(void 0);case`server/discover`:return zy(Ry);default:return}}var hte=[Vm,Hm,Wm,Km],gte=[`inputResponses`,`requestState`];function gb(e,t){let n=e.params;if(!yb(n))return{message:e,lifted:{}};let r=n._meta,i=yb(r)?hte.filter(e=>e in r):[],a=t===`request`?gte.filter(e=>e in n):[];if(i.length===0&&a.length===0)return{message:e,lifted:{}};let o={},s={...n};if(i.length>0&&yb(r)){let e={},t={...r};for(let n of i)e[n]=r[n],delete t[n];o.envelope=e,Object.keys(t).length>0?s._meta=t:delete s._meta}for(let e of a)e===`inputResponses`&&(o.inputResponses=s[e]),e===`requestState`&&(o.requestState=s[e]),delete s[e];return{message:{...e,params:s},lifted:o}}function _b(e,t){let n=e.validateResult(t,void 0);if(!(!n.ok&&n.reason===`not-in-era`))return{"~standard":{version:1,vendor:`mcp-wire-codec`,validate(n){let r=e.validateResult(t,n);return r.ok?{value:r.value}:{issues:[{message:r.reason===`invalid`?r.message:`not-in-era: ${t}`}]}}}}}function vb(e){return()=>e}var _te=vb(void 0),vte=class{_transport;_requestMessageId=0;_requestHandlers=new Map;_requestHandlerAbortControllers=new Map;_notificationHandlers=new Map;_responseHandlers=new Map;_progressHandlers=new Map;_timeoutInfo=new Map;_pendingDebouncedNotifications=new Set;_negotiatedProtocolVersion;_supportedProtocolVersions;onclose;onerror;fallbackRequestHandler;fallbackNotificationHandler;constructor(e){this._options=e,this._supportedProtocolVersions=e?.supportedProtocolVersions??zm,this.setNotificationHandler(`notifications/cancelled`,e=>{this._oncancel(e)}),this.setNotificationHandler(`notifications/progress`,e=>{this._onprogress(e)}),this.setRequestHandler(`ping`,e=>({}))}_shouldDropInbound(e){}_outboundMetaEnvelope(){}_envelopeOutbound(e){let t=this._outboundMetaEnvelope();if(t===void 0)return e;let n=e.params??{};return{...e,params:{...n,_meta:{...t,...n._meta}}}}_resolveNonCompleteResult(e,t){return Promise.reject(new _v(gv.UnsupportedResultType,`Unsupported result type '${e.kind}' for ${t.request.method}`,{resultType:e.kind,method:t.request.method}))}_getRequestHandler(e){return this._requestHandlers.get(e)}async _oncancel(e){e.params.requestId&&this._requestHandlerAbortControllers.get(e.params.requestId)?.abort(e.params.reason)}_setupTimeout(e,t,n,r,i=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(r,t),startTime:Date.now(),timeout:t,maxTotalTimeout:n,resetTimeoutOnProgress:i,onTimeout:r})}_resetTimeout(e){let t=this._timeoutInfo.get(e);if(!t)return!1;let n=Date.now()-t.startTime;if(t.maxTotalTimeout&&n>=t.maxTotalTimeout)throw this._timeoutInfo.delete(e),new _v(gv.RequestTimeout,`Maximum total timeout exceeded`,{maxTotalTimeout:t.maxTotalTimeout,totalElapsed:n});return clearTimeout(t.timeoutId),t.timeoutId=setTimeout(t.onTimeout,t.timeout),!0}_cleanupTimeout(e){let t=this._timeoutInfo.get(e);t&&(clearTimeout(t.timeoutId),this._timeoutInfo.delete(e))}async connect(e){this._transport=e;let t=this.transport?.onclose;this._transport.onclose=()=>{try{t?.()}finally{this._onclose()}};let n=this.transport?.onerror;this._transport.onerror=e=>{n?.(e),this._onerror(e)};let r=this._transport?.onmessage;this._transport.onmessage=(e,t)=>{r?.(e,t),qy(e)||Jy(e)?this._onresponse(e):Gy(e)?this._onrequest(e,t):Ky(e)?this._onnotification(e,t):this._onerror(Error(`Unknown message type: ${JSON.stringify(e)}`))},e.setSupportedProtocolVersions?.(this._supportedProtocolVersions),await this._transport.start()}_onclose(){let e=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._pendingDebouncedNotifications.clear();for(let e of this._timeoutInfo.values())clearTimeout(e.timeoutId);this._timeoutInfo.clear();let t=this._requestHandlerAbortControllers;this._requestHandlerAbortControllers=new Map;let n=new _v(gv.ConnectionClosed,`Connection closed`);this._transport=void 0;try{this.onclose?.()}finally{for(let t of e.values())t(n);for(let e of t.values())e.abort(n)}}_onerror(e){this.onerror?.(e)}_onnotification(e,t){let{message:n}=gb(e,`notification`),r=this._negotiatedWireCodec();if(t?.classification===void 0&&this._shouldDropInbound(e)===`drop`)return;if(t?.classification!==void 0){let e=By(t.classification);if(e!==r.era){this._onerror(Error(`Era mismatch on inbound notification '${n.method}': classified as ${e} but this instance serves ${r.era}`));return}}if(Hy(n.method)&&!r.hasNotificationMethod(n.method))return;let i=this._notificationHandlers.get(n.method),a=this.fallbackNotificationHandler;i===void 0&&a===void 0||Promise.resolve().then(()=>i===void 0?a(n):i(n,r)).catch(e=>this._onerror(Error(`Uncaught error in notification handler: ${e}`)))}_onrequest(e,t){let{message:n,lifted:r}=gb(e,`request`),i=this._negotiatedWireCodec();if(t?.classification===void 0&&this._shouldDropInbound(e)===`drop`){this._onerror(Error(`Dropped inbound request '${e.method}': not servable on this connection's protocol era`));return}let a=this._transport,o=(e,t,r)=>{let i={jsonrpc:`2.0`,id:n.id,error:{code:e,message:t,...r!==void 0&&{data:r}}};a?.send(i).catch(e=>this._onerror(Error(`Failed to send an error response: ${e}`)))};if(t?.classification!==void 0){let e=By(t.classification);if(e!==i.era){this._onerror(Error(`Era mismatch on inbound request '${n.method}': classified as ${e} but this instance serves ${i.era}`));let r=t.classification.revision??e;o(ey.UnsupportedProtocolVersion,`Unsupported protocol version: ${r}`,{supported:this._supportedProtocolVersions,requested:r});return}}if(Vy(n.method)&&!i.hasRequestMethod(n.method)){o(ey.MethodNotFound,`Method not found`);return}let s=this._requestHandlers.get(n.method)??this.fallbackRequestHandler;if(s===void 0){o(ey.MethodNotFound,`Method not found`);return}let c=i.checkInboundEnvelope(r);if(c!==void 0){o(ey.InvalidParams,c);return}let l=(e,t)=>this._notificationViaCodec(this._resolveOutboundCodec(e.method),e,{...t,relatedRequestId:n.id}),u=(e,t,r)=>this._requestWithSchemaViaCodec(this._resolveOutboundCodec(e.method),e,t,{...r,relatedRequestId:n.id}),d=new AbortController;this._requestHandlerAbortControllers.set(n.id,d);let f=r.inputResponses===void 0?void 0:bte(r.inputResponses),p={sessionId:a?.sessionId,mcpReq:{id:n.id,method:n.method,_meta:n.params?._meta,...r.envelope!==void 0&&{envelope:r.envelope},...f!==void 0&&{inputResponses:f.accepted},...f!==void 0&&f.droppedKeys.length>0&&{droppedInputResponseKeys:f.droppedKeys},requestState:r.requestState===void 0?_te:vb(r.requestState),signal:d.signal,send:((e,t,n)=>{let r=this._resolveOutboundCodec(e.method);if(this._assertOutboundRequestInEra(r,e.method),ib(t))return u(e,t,n);let i=_b(r,e.method);if(i===void 0)throw TypeError(`'${e.method}' is not a spec method; pass a result schema as the second argument to ctx.mcpReq.send().`);return u(e,i,t)}),notify:l},http:t?.authInfo?{authInfo:t.authInfo}:void 0},m=this.buildContext(p,t);Promise.resolve().then(()=>s(n,m)).then(async e=>{if(d.signal.aborted)return;let t;try{t=i.encodeResult(n.method,e,this._outboundServerInfo())}catch(e){this._onerror(Error(`Failed to encode result for ${n.method}: ${e}`)),o(ey.InternalError,`Internal error`);return}let r={result:t,jsonrpc:`2.0`,id:n.id};await a?.send(r)},async e=>{if(d.signal.aborted)return;let t=Number.isSafeInteger(e.code)?e.code:ey.InternalError,r={jsonrpc:`2.0`,id:n.id,error:{code:i.encodeErrorCode(t),message:e.message??`Internal error`,...e.data!==void 0&&{data:e.data}}};await a?.send(r)}).catch(e=>this._onerror(Error(`Failed to send response: ${e}`))).finally(()=>{this._requestHandlerAbortControllers.get(n.id)===d&&this._requestHandlerAbortControllers.delete(n.id)})}_onprogress(e){let{progressToken:t,...n}=e.params,r=Number(t),i=this._progressHandlers.get(r);if(!i){this._onerror(Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));return}let a=this._responseHandlers.get(r),o=this._timeoutInfo.get(r);if(o&&a&&o.resetTimeoutOnProgress)try{this._resetTimeout(r)}catch(e){this._responseHandlers.delete(r),this._progressHandlers.delete(r),this._cleanupTimeout(r),a(e);return}i(n)}_onresponse(e){let t=Number(e.id),n=this._responseHandlers.get(t);if(n===void 0){this._onerror(Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`));return}this._responseHandlers.delete(t),this._cleanupTimeout(t),this._progressHandlers.delete(t),qy(e)?n(e):n(ty.fromError(e.error.code,e.error.message,e.error.data))}get transport(){return this._transport}async close(){await this._transport?.close()}request(e,t,n){let r=this._resolveOutboundCodec(e.method);if(this._assertOutboundRequestInEra(r,e.method),ib(t))return this._requestWithSchemaViaCodec(r,e,t,n);let i=_b(r,e.method);if(i===void 0)throw TypeError(`'${e.method}' is not a spec method; pass a result schema as the second argument to request().`);return this._requestWithSchemaViaCodec(r,e,i,t)}_negotiatedWireCodec(){return zy(this._negotiatedProtocolVersion)}_wireCodec(){return this._negotiatedWireCodec()}_resolveOutboundCodec(e){if(this._negotiatedProtocolVersion===void 0){let t=mte(e);if(t)return t}return this._negotiatedWireCodec()}_assertOutboundRequestInEra(e,t){if(Vy(t)&&!e.hasRequestMethod(t))throw new _v(gv.MethodNotSupportedByProtocolVersion,`Method '${t}' is not supported by the negotiated protocol version (wire era ${e.era})`,{method:t,era:e.era})}_requestWithSchema(e,t,n){let r=this._resolveOutboundCodec(e.method);return this._assertOutboundRequestInEra(r,e.method),this._requestWithSchemaViaCodec(r,e,t,n)}_requestWithSchemaViaCodec(e,t,n,r){let{relatedRequestId:i,resumptionToken:a,onresumptiontoken:o,headers:s}=r??{},c=Date.now(),l,u;return new Promise((d,f)=>{let p=e=>{f(e)};if(!this._transport){p(Error(`Not connected`));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(t.method)}catch(e){p(e);return}if(r?.signal?.aborted){let e=r.signal.reason;throw e instanceof _v?e:new _v(gv.RequestTimeout,String(e))}let m=e.era===`2026-07-28`&&this._transport.hasPerRequestStream===!0?new AbortController:void 0,h=this._requestMessageId++;u=h;let g={...t,jsonrpc:`2.0`,id:h};r?.onprogress&&(this._progressHandlers.set(h,r.onprogress),g.params={...t.params,_meta:{...t.params?._meta,progressToken:h}});let _=this._envelopeOutbound(g),v=!1,y=e=>{v||(this._progressHandlers.delete(h),m===void 0?this._transport?.send(this._envelopeOutbound({jsonrpc:`2.0`,method:`notifications/cancelled`,params:{requestId:h,reason:String(e)}}),{relatedRequestId:i,resumptionToken:a,onresumptiontoken:o}).catch(e=>this._onerror(Error(`Failed to send cancellation: ${e}`))):m.abort(),f(e instanceof _v?e:new _v(gv.RequestTimeout,String(e))))};this._responseHandlers.set(h,i=>{if(r?.signal?.aborted)return;if(v=!0,i instanceof Error)return f(i);let a;try{a=e.decodeResult(t.method,i.result)}catch(e){return f(e instanceof Error?e:Error(String(e)))}if(a.kind===`invalid`)return f(a.error);if(a.kind===`input_required`){if(r?.allowInputRequired===!0)return d(Tte(a));let i={codec:e,request:t,resultSchema:n,options:r,flowStartedAt:c,retry:(r,i)=>this._requestWithSchemaViaCodec(e,r===void 0?{method:t.method}:{method:t.method,params:r},n,i)};return d(this._resolveNonCompleteResult(a,i))}let o=a.result;cb(n,o).then(e=>{e.success?d(e.data):f(new _v(gv.InvalidResult,`Invalid result for ${t.method}: ${e.error}`))},f)}),l=()=>y(r?.signal?.reason),r?.signal?.addEventListener(`abort`,l,{once:!0});let b=r?.timeout??6e4;this._setupTimeout(h,b,r?.maxTotalTimeout,()=>y(new _v(gv.RequestTimeout,`Request timed out`,{timeout:b})),r?.resetTimeoutOnProgress??!1),this._transport.send(_,{relatedRequestId:i,resumptionToken:a,onresumptiontoken:o,headers:s,requestSignal:m?.signal}).catch(e=>{this._progressHandlers.delete(h),f(e)})}).finally(()=>{l&&r?.signal?.removeEventListener(`abort`,l),u!==void 0&&(this._responseHandlers.delete(u),this._cleanupTimeout(u))})}async notification(e,t){return this._notificationViaCodec(this._resolveOutboundCodec(e.method),e,t)}async _notificationViaCodec(e,t,n){if(!this._transport)throw new _v(gv.NotConnected,`Not connected`);if(Hy(t.method)&&!e.hasNotificationMethod(t.method))throw new _v(gv.MethodNotSupportedByProtocolVersion,`Notification '${t.method}' is not supported by the negotiated protocol version (wire era ${e.era})`,{method:t.method,era:e.era});this.assertNotificationCapability(t.method);let r=this._envelopeOutbound({jsonrpc:`2.0`,...t});if((this._options?.debouncedNotificationMethods??[]).includes(t.method)&&!t.params&&!n?.relatedRequestId){if(this._pendingDebouncedNotifications.has(t.method))return;this._pendingDebouncedNotifications.add(t.method),Promise.resolve().then(()=>{this._pendingDebouncedNotifications.delete(t.method),this._transport&&this._transport?.send(r,n).catch(e=>this._onerror(e))});return}await this._transport.send(r,n)}setRequestHandler(e,t,n){this.assertRequestHandlerCapability(e);let r;if(typeof t==`function`){if(!Vy(e))throw TypeError(`'${e}' is not a spec request method; pass schemas as the second argument to setRequestHandler().`);r=(n,r)=>{let i=this._negotiatedWireCodec(),a=i.validateRequest(e,n);if(!a.ok&&a.reason===`not-in-era`&&(a=i.validateInputRequest(e,n)),!a.ok)throw a.reason===`not-in-era`?new ty(ey.InternalError,`No wire schema for ${e} in the resolved era`):Error(a.message);return Promise.resolve(t(a.value,r))}}else if(n)r=async(r,i)=>{let a=await cb(t.params,{...r.params});if(!a.success)throw new ty(ey.InvalidParams,`Invalid params for ${e}: ${a.error}`);return n(a.data,i)};else throw TypeError(`setRequestHandler: handler is required`);this._requestHandlers.set(e,this._wrapHandler(e,r))}_wrapHandler(e,t){return t}_outboundServerInfo(){}removeRequestHandler(e){this._requestHandlers.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,t,n){if(typeof t==`function`){if(!Hy(e))throw TypeError(`'${e}' is not a spec notification method; pass schemas as the second argument to setNotificationHandler().`);this._notificationHandlers.set(e,(n,r)=>{let i=r.validateNotification(e,n);if(!i.ok)throw i.reason===`not-in-era`?new ty(ey.InternalError,`No wire schema for ${e} in the resolved era`):Error(i.message);return Promise.resolve(t(i.value))});return}if(!n)throw TypeError(`setNotificationHandler: handler is required`);this._notificationHandlers.set(e,async r=>{let i=await cb(t.params,{...r.params});if(!i.success)throw new ty(ey.InvalidParams,`Invalid params for notification ${e}: ${i.error}`);await n(i.data,r)})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}};function yb(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function yte(e,t){let n={...e};for(let e in t){let r=e,i=t[r];if(i===void 0)continue;let a=n[r];n[r]=yb(a)&&yb(i)?{...a,...i}:i}return n}function bb(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function bte(e){let t={},n=[];if(!bb(e))return{accepted:t,droppedKeys:n};for(let[r,i]of Object.entries(e)){if(!bb(i)||`method`in i||`result`in i){n.push(r);continue}t[r]=i}return{accepted:t,droppedKeys:n}}function xb(e){throw new _v(gv.SendFailed,`ctx.mcpReq.${e} is not available while fulfilling an embedded input request: the request is fulfilled locally and has no related peer request`)}function xte(e,t,n,r,i){return{sessionId:i,mcpReq:{id:e,method:t,_meta:n?._meta,requestState:vb(void 0),signal:r,send:(()=>xb(`send`)),notify:()=>xb(`notify`)}}}async function Ste(e,t,n,r,i){if(!bb(r)||typeof r.method!=`string`)throw new _v(gv.InvalidResult,`Invalid input request '${n}': each inputRequests entry must be an embedded request object with a method`,{key:n});let a=r.method;if(!t.hasInputRequestMethod(a))throw new _v(gv.InvalidResult,`Invalid input request '${n}': '${a}' is not an embedded request the ${t.era} revision defines (expected elicitation/create, sampling/createMessage, or roots/list)`,{key:n,method:a});let o=e.getRequestHandler(a);if(o===void 0)throw new _v(gv.CapabilityNotSupported,`Cannot fulfil input request '${n}': no handler is registered for '${a}' on this client. Declare the corresponding capability and register a handler, or handle input_required results manually.`,{key:n,method:a});let s=bb(r.params)?r.params:void 0;return await o({jsonrpc:`2.0`,id:n,method:a,...s!==void 0&&{params:s}},e.buildContext(xte(n,a,s,i,e.sessionId)))}function Cte(e,t){return{...e?.signal!==void 0&&{signal:e.signal},...e?.onprogress!==void 0&&{onprogress:e.onprogress},...e?.resetTimeoutOnProgress!==void 0&&{resetTimeoutOnProgress:e.resetTimeoutOnProgress},...e?.headers!==void 0&&{headers:e.headers},...t.timeout!==void 0&&{timeout:t.timeout},...t.maxTotalTimeout!==void 0&&{maxTotalTimeout:t.maxTotalTimeout},allowInputRequired:!0}}function wte(e,t,n,r){let{codec:i,request:a,options:o,flowStartedAt:s}=r,c={inputRequests:n.inputRequests,...n.requestState!==void 0&&{requestState:n.requestState}},l={dispatchInputRequest:(t,n,r)=>Ste(e,i,t,n,r),retry:(e,t)=>r.retry(e,Cte(o,t))};return ute({config:t,method:a.method,originalParams:a.params,firstPayload:c,flowStartedAt:s,signal:o?.signal,requestOptions:{...o?.timeout!==void 0&&{timeout:o.timeout},...o?.maxTotalTimeout!==void 0&&{maxTotalTimeout:o.maxTotalTimeout},...o?.onprogress!==void 0&&{onprogress:o.onprogress}},hooks:l})}function Tte(e){return{resultType:`input_required`,inputRequests:e.inputRequests,...e.requestState!==void 0&&{requestState:e.requestState}}}var Ete=Ts(Ss((e=>{var t=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,n=/\\([\u000b\u0020-\u00ff])/g,r=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;e.parse=i;function i(e){if(!e)throw TypeError(`argument string is required`);var i=typeof e==`object`?a(e):e;if(typeof i!=`string`)throw TypeError(`argument string is required to be a string`);var s=i.indexOf(`;`),c=s===-1?i.trim():i.slice(0,s).trim();if(!r.test(c))throw TypeError(`invalid media type`);var l=new o(c.toLowerCase());if(s!==-1){var u,d,f;for(t.lastIndex=s;d=t.exec(i);){if(d.index!==s)throw TypeError(`invalid parameter format`);s+=d[0].length,u=d[1].toLowerCase(),f=d[2],f.charCodeAt(0)===34&&(f=f.slice(1,-1),f.indexOf(`\\`)!==-1&&(f=f.replace(n,`$1`))),l.parameters[u]=f}if(s!==i.length)throw TypeError(`invalid parameter format`)}return l}function a(e){var t;if(typeof e.getHeader==`function`?t=e.getHeader(`content-type`):typeof e.headers==`object`&&(t=e.headers&&e.headers[`content-type`]),typeof t!=`string`)throw TypeError(`content-type header is missing from object`);return t}function o(e){this.parameters=Object.create(null),this.type=e}}))(),1);function Dte(e){if(e)try{return Ete.parse(e).type}catch{let t=(e.split(`;`,1)[0]??``).trim().toLowerCase();return t===``||e.slice(t.length).includes(`,`)?void 0:t}}function Sb(e){return e?e instanceof Headers?Object.fromEntries(e.entries()):Array.isArray(e)?Object.fromEntries(e):{...e}:{}}function Ote(e=fetch,t){return t?async(n,r)=>e(n,{...t,...r,headers:r?.headers?{...Sb(t.headers),...Sb(r.headers)}:t.headers}):e}function Cb(e,t){let n=typeof e;if(n!==typeof t)return!1;if(Array.isArray(e)){if(!Array.isArray(t))return!1;let n=e.length;if(n!==t.length)return!1;for(let r=0;r<n;r++)if(!Cb(e[r],t[r]))return!1;return!0}if(n===`object`){if(!e||!t)return e===t;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(!Cb(e[r],t[r]))return!1;return!0}return e===t}function wb(e){return encodeURI(Tb(e))}function Tb(e){return e.replace(/~/g,`~0`).replace(/\//g,`~1`)}var Eb={prefixItems:!0,items:!0,allOf:!0,anyOf:!0,oneOf:!0},Db={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependentSchemas:!0},Ob={id:!0,$id:!0,$ref:!0,$schema:!0,$anchor:!0,$vocabulary:!0,$comment:!0,default:!0,enum:!0,const:!0,required:!0,type:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0},kb=typeof self<`u`&&self.location&&self.location.origin!==`null`?new URL(self.location.origin+self.location.pathname+location.search):new URL(`https://github.com/cfworker`);function Ab(e,t=Object.create(null),n=kb,r=``){if(e&&typeof e==`object`&&!Array.isArray(e)){let i=e.$id||e.id;if(i){let a=new URL(i,n.href);a.hash.length>1?t[a.href]=e:(a.hash=``,r===``?n=a:Ab(e,t,n))}}else if(e!==!0&&e!==!1)return t;let i=n.href+(r?`#`+r:``);if(t[i]!==void 0)throw Error(`Duplicate schema URI "${i}".`);if(t[i]=e,e===!0||e===!1)return t;if(e.__absolute_uri__===void 0&&Object.defineProperty(e,"__absolute_uri__",{enumerable:!1,value:i}),e.$ref&&e.__absolute_ref__===void 0){let t=new URL(e.$ref,n.href);t.hash=t.hash,Object.defineProperty(e,"__absolute_ref__",{enumerable:!1,value:t.href})}if(e.$recursiveRef&&e.__absolute_recursive_ref__===void 0){let t=new URL(e.$recursiveRef,n.href);t.hash=t.hash,Object.defineProperty(e,"__absolute_recursive_ref__",{enumerable:!1,value:t.href})}if(e.$anchor){let r=new URL(`#`+e.$anchor,n.href);t[r.href]=e}for(let i in e){if(Ob[i])continue;let a=`${r}/${wb(i)}`,o=e[i];if(Array.isArray(o)){if(Eb[i]){let e=o.length;for(let r=0;r<e;r++)Ab(o[r],t,n,`${a}/${r}`)}}else if(Db[i])for(let e in o)Ab(o[e],t,n,`${a}/${wb(e)}`);else Ab(o,t,n,a)}return t}var jb=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,Mb=[0,31,28,31,30,31,30,31,31,30,31,30,31],Nb=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i,Pb=/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,Fb=/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,Ib=/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,Lb=/^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)(?:\.(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,Rb=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,zb=/^(?:\/(?:[^~/]|~0|~1)*)*$/,Bb=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,Vb=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,Hb=e=>{if(e[0]===`"`)return!1;let[t,n,...r]=e.split(`@`);return!t||!n||r.length!==0||t.length>64||n.length>253||t[0]===`.`||t.endsWith(`.`)||t.includes(`..`)||!/^[a-z0-9.-]+$/i.test(n)||!/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+$/i.test(t)?!1:n.split(`.`).every(e=>/^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$/i.test(e))},Ub=/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,Wb=/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,Gb=e=>e.length>1&&e.length<80&&(/^P\d+([.,]\d+)?W$/.test(e)||/^P[\dYMDTHS]*(\d[.,]\d+)?[YMDHS]$/.test(e)&&/^P([.,\d]+Y)?([.,\d]+M)?([.,\d]+D)?(T([.,\d]+H)?([.,\d]+M)?([.,\d]+S)?)?$/.test(e));function Kb(e){return e.test.bind(e)}var qb={date:Yb,time:Xb.bind(void 0,!1),"date-time":Qb,duration:Gb,uri:tx,"uri-reference":Kb(Fb),"uri-template":Kb(Ib),url:Kb(Lb),email:Hb,hostname:Kb(Pb),ipv4:Kb(Ub),ipv6:Kb(Wb),regex:rx,uuid:Kb(Rb),"json-pointer":Kb(zb),"json-pointer-uri-fragment":Kb(Bb),"relative-json-pointer":Kb(Vb)};function Jb(e){return e%4==0&&(e%100!=0||e%400==0)}function Yb(e){let t=e.match(jb);if(!t)return!1;let n=+t[1],r=+t[2],i=+t[3];return r>=1&&r<=12&&i>=1&&i<=(r==2&&Jb(n)?29:Mb[r])}function Xb(e,t){let n=t.match(Nb);if(!n)return!1;let r=+n[1],i=+n[2],a=+n[3],o=!!n[5];return(r<=23&&i<=59&&a<=59||r==23&&i==59&&a==60)&&(!e||o)}var Zb=/t|\s/i;function Qb(e){let t=e.split(Zb);return t.length==2&&Yb(t[0])&&Xb(!0,t[1])}var $b=/\/|:/,ex=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function tx(e){return $b.test(e)&&ex.test(e)}var nx=/[^\\]\\Z/;function rx(e){if(nx.test(e))return!1;try{return new RegExp(e,`u`),!0}catch{return!1}}function ix(e){let t=0,n=e.length,r=0,i;for(;r<n;)t++,i=e.charCodeAt(r++),i>=55296&&i<=56319&&r<n&&(i=e.charCodeAt(r),(i&64512)==56320&&r++);return t}function ax(e,t,n=`2019-09`,r=Ab(t),i=!0,a=null,o=`#`,s=`#`,c=Object.create(null)){if(t===!0)return{valid:!0,errors:[]};if(t===!1)return{valid:!1,errors:[{instanceLocation:o,keyword:`false`,keywordLocation:o,error:`False boolean schema.`}]};let l=typeof e,u;switch(l){case`boolean`:case`number`:case`string`:u=l;break;case`object`:u=e===null?`null`:Array.isArray(e)?`array`:`object`;break;default:throw Error(`Instances of "${l}" type are not supported.`)}let{$ref:d,$recursiveRef:f,$recursiveAnchor:p,type:m,const:h,enum:g,required:_,not:v,anyOf:y,allOf:b,oneOf:x,if:S,then:C,else:w,format:T,properties:E,patternProperties:D,additionalProperties:O,unevaluatedProperties:k,minProperties:A,maxProperties:j,propertyNames:M,dependentRequired:N,dependentSchemas:P,dependencies:F,prefixItems:I,items:L,additionalItems:ee,unevaluatedItems:te,contains:ne,minContains:R,maxContains:z,minItems:B,maxItems:re,uniqueItems:ie,minimum:ae,maximum:oe,exclusiveMinimum:se,exclusiveMaximum:ce,multipleOf:le,minLength:ue,maxLength:de,pattern:fe,__absolute_ref__:pe,__absolute_recursive_ref__:me}=t,V=[];if(p===!0&&a===null&&(a=t),f===`#`){let l=a===null?r[me]:a,u=`${s}/$recursiveRef`,d=ax(e,a===null?t:a,n,r,i,l,o,u,c);d.valid||V.push({instanceLocation:o,keyword:`$recursiveRef`,keywordLocation:u,error:`A subschema had errors.`},...d.errors)}if(d!==void 0){let t=r[pe||d];if(t===void 0){let e=`Unresolved $ref "${d}".`;throw pe&&pe!==d&&(e+=` Absolute URI "${pe}".`),e+=`\nKnown schemas:\n- ${Object.keys(r).join(`
74
+ - `)}`,Error(e)}let l=`${s}/$ref`,u=ax(e,t,n,r,i,a,o,l,c);if(u.valid||V.push({instanceLocation:o,keyword:`$ref`,keywordLocation:l,error:`A subschema had errors.`},...u.errors),n===`4`||n===`7`)return{valid:V.length===0,errors:V}}if(Array.isArray(m)){let t=m.length,n=!1;for(let r=0;r<t;r++)if(u===m[r]||m[r]===`integer`&&u===`number`&&e%1==0&&e===e){n=!0;break}n||V.push({instanceLocation:o,keyword:`type`,keywordLocation:`${s}/type`,error:`Instance type "${u}" is invalid. Expected "${m.join(`", "`)}".`})}else m===`integer`?(u!==`number`||e%1||e!==e)&&V.push({instanceLocation:o,keyword:`type`,keywordLocation:`${s}/type`,error:`Instance type "${u}" is invalid. Expected "${m}".`}):m!==void 0&&u!==m&&V.push({instanceLocation:o,keyword:`type`,keywordLocation:`${s}/type`,error:`Instance type "${u}" is invalid. Expected "${m}".`});if(h!==void 0&&(u===`object`||u===`array`?Cb(e,h)||V.push({instanceLocation:o,keyword:`const`,keywordLocation:`${s}/const`,error:`Instance does not match ${JSON.stringify(h)}.`}):e!==h&&V.push({instanceLocation:o,keyword:`const`,keywordLocation:`${s}/const`,error:`Instance does not match ${JSON.stringify(h)}.`})),g!==void 0&&(u===`object`||u===`array`?g.some(t=>Cb(e,t))||V.push({instanceLocation:o,keyword:`enum`,keywordLocation:`${s}/enum`,error:`Instance does not match any of ${JSON.stringify(g)}.`}):g.some(t=>e===t)||V.push({instanceLocation:o,keyword:`enum`,keywordLocation:`${s}/enum`,error:`Instance does not match any of ${JSON.stringify(g)}.`})),v!==void 0){let t=`${s}/not`;ax(e,v,n,r,i,a,o,t).valid&&V.push({instanceLocation:o,keyword:`not`,keywordLocation:t,error:`Instance matched "not" schema.`})}let he=[];if(y!==void 0){let t=`${s}/anyOf`,l=V.length,u=!1;for(let s=0;s<y.length;s++){let l=y[s],d=Object.create(c),f=ax(e,l,n,r,i,p===!0?a:null,o,`${t}/${s}`,d);V.push(...f.errors),u||=f.valid,f.valid&&he.push(d)}u?V.length=l:V.splice(l,0,{instanceLocation:o,keyword:`anyOf`,keywordLocation:t,error:`Instance does not match any subschemas.`})}if(b!==void 0){let t=`${s}/allOf`,l=V.length,u=!0;for(let s=0;s<b.length;s++){let l=b[s],d=Object.create(c),f=ax(e,l,n,r,i,p===!0?a:null,o,`${t}/${s}`,d);V.push(...f.errors),u&&=f.valid,f.valid&&he.push(d)}u?V.length=l:V.splice(l,0,{instanceLocation:o,keyword:`allOf`,keywordLocation:t,error:`Instance does not match every subschema.`})}if(x!==void 0){let t=`${s}/oneOf`,l=V.length,u=x.filter((s,l)=>{let u=Object.create(c),d=ax(e,s,n,r,i,p===!0?a:null,o,`${t}/${l}`,u);return V.push(...d.errors),d.valid&&he.push(u),d.valid}).length;u===1?V.length=l:V.splice(l,0,{instanceLocation:o,keyword:`oneOf`,keywordLocation:t,error:`Instance does not match exactly one subschema (${u} matches).`})}if((u===`object`||u===`array`)&&Object.assign(c,...he),S!==void 0){let t=`${s}/if`;if(ax(e,S,n,r,i,a,o,t,c).valid){if(C!==void 0){let l=ax(e,C,n,r,i,a,o,`${s}/then`,c);l.valid||V.push({instanceLocation:o,keyword:`if`,keywordLocation:t,error:`Instance does not match "then" schema.`},...l.errors)}}else if(w!==void 0){let l=ax(e,w,n,r,i,a,o,`${s}/else`,c);l.valid||V.push({instanceLocation:o,keyword:`if`,keywordLocation:t,error:`Instance does not match "else" schema.`},...l.errors)}}if(u===`object`){if(_!==void 0)for(let t of _)t in e||V.push({instanceLocation:o,keyword:`required`,keywordLocation:`${s}/required`,error:`Instance does not have required property "${t}".`});let t=Object.keys(e);if(A!==void 0&&t.length<A&&V.push({instanceLocation:o,keyword:`minProperties`,keywordLocation:`${s}/minProperties`,error:`Instance does not have at least ${A} properties.`}),j!==void 0&&t.length>j&&V.push({instanceLocation:o,keyword:`maxProperties`,keywordLocation:`${s}/maxProperties`,error:`Instance does not have at least ${j} properties.`}),M!==void 0){let t=`${s}/propertyNames`;for(let s in e){let e=`${o}/${wb(s)}`,c=ax(s,M,n,r,i,a,e,t);c.valid||V.push({instanceLocation:o,keyword:`propertyNames`,keywordLocation:t,error:`Property name "${s}" does not match schema.`},...c.errors)}}if(N!==void 0){let t=`${s}/dependantRequired`;for(let n in N)if(n in e){let r=N[n];for(let i of r)i in e||V.push({instanceLocation:o,keyword:`dependentRequired`,keywordLocation:t,error:`Instance has "${n}" but does not have "${i}".`})}}if(P!==void 0)for(let t in P){let l=`${s}/dependentSchemas`;if(t in e){let s=ax(e,P[t],n,r,i,a,o,`${l}/${wb(t)}`,c);s.valid||V.push({instanceLocation:o,keyword:`dependentSchemas`,keywordLocation:l,error:`Instance has "${t}" but does not match dependant schema.`},...s.errors)}}if(F!==void 0){let t=`${s}/dependencies`;for(let s in F)if(s in e){let c=F[s];if(Array.isArray(c))for(let n of c)n in e||V.push({instanceLocation:o,keyword:`dependencies`,keywordLocation:t,error:`Instance has "${s}" but does not have "${n}".`});else{let l=ax(e,c,n,r,i,a,o,`${t}/${wb(s)}`);l.valid||V.push({instanceLocation:o,keyword:`dependencies`,keywordLocation:t,error:`Instance has "${s}" but does not match dependant schema.`},...l.errors)}}}let l=Object.create(null),u=!1;if(E!==void 0){let t=`${s}/properties`;for(let s in E){if(!(s in e))continue;let d=`${o}/${wb(s)}`,f=ax(e[s],E[s],n,r,i,a,d,`${t}/${wb(s)}`);if(f.valid)c[s]=l[s]=!0;else if(u=i,V.push({instanceLocation:o,keyword:`properties`,keywordLocation:t,error:`Property "${s}" does not match schema.`},...f.errors),u)break}}if(!u&&D!==void 0){let t=`${s}/patternProperties`;for(let s in D){let d=new RegExp(s,`u`),f=D[s];for(let p in e){if(!d.test(p))continue;let m=`${o}/${wb(p)}`,h=ax(e[p],f,n,r,i,a,m,`${t}/${wb(s)}`);h.valid?c[p]=l[p]=!0:(u=i,V.push({instanceLocation:o,keyword:`patternProperties`,keywordLocation:t,error:`Property "${p}" matches pattern "${s}" but does not match associated schema.`},...h.errors))}}}if(!u&&O!==void 0){let t=`${s}/additionalProperties`;for(let s in e){if(l[s])continue;let d=`${o}/${wb(s)}`,f=ax(e[s],O,n,r,i,a,d,t);f.valid?c[s]=!0:(u=i,V.push({instanceLocation:o,keyword:`additionalProperties`,keywordLocation:t,error:`Property "${s}" does not match additional properties schema.`},...f.errors))}}else if(!u&&k!==void 0){let t=`${s}/unevaluatedProperties`;for(let s in e)if(!c[s]){let l=`${o}/${wb(s)}`,u=ax(e[s],k,n,r,i,a,l,t);u.valid?c[s]=!0:V.push({instanceLocation:o,keyword:`unevaluatedProperties`,keywordLocation:t,error:`Property "${s}" does not match unevaluated properties schema.`},...u.errors)}}}else if(u===`array`){re!==void 0&&e.length>re&&V.push({instanceLocation:o,keyword:`maxItems`,keywordLocation:`${s}/maxItems`,error:`Array has too many items (${e.length} > ${re}).`}),B!==void 0&&e.length<B&&V.push({instanceLocation:o,keyword:`minItems`,keywordLocation:`${s}/minItems`,error:`Array has too few items (${e.length} < ${B}).`});let t=e.length,l=0,u=!1;if(I!==void 0){let d=`${s}/prefixItems`,f=Math.min(I.length,t);for(;l<f;l++){let t=ax(e[l],I[l],n,r,i,a,`${o}/${l}`,`${d}/${l}`);if(c[l]=!0,!t.valid&&(u=i,V.push({instanceLocation:o,keyword:`prefixItems`,keywordLocation:d,error:`Items did not match schema.`},...t.errors),u))break}}if(L!==void 0){let d=`${s}/items`;if(Array.isArray(L)){let s=Math.min(L.length,t);for(;l<s;l++){let t=ax(e[l],L[l],n,r,i,a,`${o}/${l}`,`${d}/${l}`);if(c[l]=!0,!t.valid&&(u=i,V.push({instanceLocation:o,keyword:`items`,keywordLocation:d,error:`Items did not match schema.`},...t.errors),u))break}}else for(;l<t;l++){let t=ax(e[l],L,n,r,i,a,`${o}/${l}`,d);if(c[l]=!0,!t.valid&&(u=i,V.push({instanceLocation:o,keyword:`items`,keywordLocation:d,error:`Items did not match schema.`},...t.errors),u))break}if(!u&&ee!==void 0){let d=`${s}/additionalItems`;for(;l<t;l++){let t=ax(e[l],ee,n,r,i,a,`${o}/${l}`,d);c[l]=!0,t.valid||(u=i,V.push({instanceLocation:o,keyword:`additionalItems`,keywordLocation:d,error:`Items did not match additional items schema.`},...t.errors))}}}if(ne!==void 0)if(t===0&&R===void 0)V.push({instanceLocation:o,keyword:`contains`,keywordLocation:`${s}/contains`,error:`Array is empty. It must contain at least one item matching the schema.`});else if(R!==void 0&&t<R)V.push({instanceLocation:o,keyword:`minContains`,keywordLocation:`${s}/minContains`,error:`Array has less items (${t}) than minContains (${R}).`});else{let l=`${s}/contains`,u=V.length,d=0;for(let s=0;s<t;s++){let t=ax(e[s],ne,n,r,i,a,`${o}/${s}`,l);t.valid?(c[s]=!0,d++):V.push(...t.errors)}d>=(R||0)&&(V.length=u),R===void 0&&z===void 0&&d===0?V.splice(u,0,{instanceLocation:o,keyword:`contains`,keywordLocation:l,error:`Array does not contain item matching schema.`}):R!==void 0&&d<R?V.push({instanceLocation:o,keyword:`minContains`,keywordLocation:`${s}/minContains`,error:`Array must contain at least ${R} items matching schema. Only ${d} items were found.`}):z!==void 0&&d>z&&V.push({instanceLocation:o,keyword:`maxContains`,keywordLocation:`${s}/maxContains`,error:`Array may contain at most ${z} items matching schema. ${d} items were found.`})}if(!u&&te!==void 0){let u=`${s}/unevaluatedItems`;for(;l<t;l++){if(c[l])continue;let t=ax(e[l],te,n,r,i,a,`${o}/${l}`,u);c[l]=!0,t.valid||V.push({instanceLocation:o,keyword:`unevaluatedItems`,keywordLocation:u,error:`Items did not match unevaluated items schema.`},...t.errors)}}if(ie)for(let n=0;n<t;n++){let r=e[n],i=typeof r==`object`&&!!r;for(let a=0;a<t;a++){if(n===a)continue;let t=e[a];(r===t||i&&typeof t==`object`&&t&&Cb(r,t))&&(V.push({instanceLocation:o,keyword:`uniqueItems`,keywordLocation:`${s}/uniqueItems`,error:`Duplicate items at indexes ${n} and ${a}.`}),n=2**53-1,a=2**53-1)}}}else if(u===`number`){if(n===`4`?(ae!==void 0&&(se===!0&&e<=ae||e<ae)&&V.push({instanceLocation:o,keyword:`minimum`,keywordLocation:`${s}/minimum`,error:`${e} is less than ${se?`or equal to `:``} ${ae}.`}),oe!==void 0&&(ce===!0&&e>=oe||e>oe)&&V.push({instanceLocation:o,keyword:`maximum`,keywordLocation:`${s}/maximum`,error:`${e} is greater than ${ce?`or equal to `:``} ${oe}.`})):(ae!==void 0&&e<ae&&V.push({instanceLocation:o,keyword:`minimum`,keywordLocation:`${s}/minimum`,error:`${e} is less than ${ae}.`}),oe!==void 0&&e>oe&&V.push({instanceLocation:o,keyword:`maximum`,keywordLocation:`${s}/maximum`,error:`${e} is greater than ${oe}.`}),se!==void 0&&e<=se&&V.push({instanceLocation:o,keyword:`exclusiveMinimum`,keywordLocation:`${s}/exclusiveMinimum`,error:`${e} is less than ${se}.`}),ce!==void 0&&e>=ce&&V.push({instanceLocation:o,keyword:`exclusiveMaximum`,keywordLocation:`${s}/exclusiveMaximum`,error:`${e} is greater than or equal to ${ce}.`})),le!==void 0){let t=e%le;Math.abs(0-t)>=1.1920929e-7&&Math.abs(le-t)>=1.1920929e-7&&V.push({instanceLocation:o,keyword:`multipleOf`,keywordLocation:`${s}/multipleOf`,error:`${e} is not a multiple of ${le}.`})}}else if(u===`string`){let t=ue===void 0&&de===void 0?0:ix(e);ue!==void 0&&t<ue&&V.push({instanceLocation:o,keyword:`minLength`,keywordLocation:`${s}/minLength`,error:`String is too short (${t} < ${ue}).`}),de!==void 0&&t>de&&V.push({instanceLocation:o,keyword:`maxLength`,keywordLocation:`${s}/maxLength`,error:`String is too long (${t} > ${de}).`}),fe!==void 0&&!new RegExp(fe,`u`).test(e)&&V.push({instanceLocation:o,keyword:`pattern`,keywordLocation:`${s}/pattern`,error:`String does not match pattern.`}),T!==void 0&&qb[T]&&!qb[T](e)&&V.push({instanceLocation:o,keyword:`format`,keywordLocation:`${s}/format`,error:`String does not match format "${T}".`})}return{valid:V.length===0,errors:V}}var ox=class{schema;draft;shortCircuit;lookup;constructor(e,t=`2019-09`,n=!0){this.schema=e,this.draft=t,this.shortCircuit=n,this.lookup=Ab(e)}validate(e){return ax(e,this.schema,this.draft,this.lookup,this.shortCircuit)}addSchema(e,t){t&&(e={...e,$id:t}),Ab(e,this.lookup)}},sx=class{shortcircuit;draft;constructor(e){this.shortcircuit=e?.shortcircuit??!0,this.draft=e?.draft}_draftFor(e){let t=js(e,`pass an explicit { draft } to CfWorkerJsonSchemaValidator to validate other dialects.`);return t===`draft-7`?`7`:t}getValidator(e){let t=new ox(e,this.draft??this._draftFor(e),this.shortcircuit);return e=>{let n=t.validate(e);return n.valid?{valid:!0,data:e,errorMessage:void 0}:{valid:!1,data:void 0,errorMessage:n.errors.map(e=>`${e.instanceLocation}: ${e.error}`).join(`; `)}}}},cx=globalThis.crypto;async function lx(e){return(await cx).getRandomValues(new Uint8Array(e))}async function ux(e){let t=``;for(;t.length<e;){let n=await lx(e-t.length);for(let e of n)e<198&&(t+=`abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~`[e%66])}return t}async function dx(e){return await ux(e)}async function fx(e){let t=await(await cx).subtle.digest(`SHA-256`,new TextEncoder().encode(e));return btoa(String.fromCharCode(...new Uint8Array(t))).replace(/\//g,`_`).replace(/\+/g,`-`).replace(/=/g,``)}async function px(e){if(e||=43,e<43||e>128)throw`Expected a length between 43 and 128. Received ${e}.`;let t=await dx(e);return{code_verifier:t,code_challenge:await fx(t)}}var mx=class extends Error{constructor(e,t){super(e),this.name=`ParseError`,this.type=t.type,this.field=t.field,this.value=t.value,this.line=t.line}};function hx(e){}function gx(e){if(typeof e==`function`)throw TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");let{onEvent:t=hx,onError:n=hx,onRetry:r=hx,onComment:i}=e,a=``,o=!0,s,c=``,l=``;function u(e){let t=o?e.replace(/^\xEF\xBB\xBF/,``):e,[n,r]=_x(`${a}${t}`);for(let e of n)d(e);a=r,o=!1}function d(e){if(e===``){p();return}if(e.startsWith(`:`)){i&&i(e.slice(e.startsWith(`: `)?2:1));return}let t=e.indexOf(`:`);if(t!==-1){let n=e.slice(0,t),r=e[t+1]===` `?2:1;f(n,e.slice(t+r),e);return}f(e,``,e)}function f(e,t,i){switch(e){case`event`:l=t;break;case`data`:c=`${c}${t}
75
+ `;break;case`id`:s=t.includes(`\0`)?void 0:t;break;case`retry`:/^\d+$/.test(t)?r(parseInt(t,10)):n(new mx(`Invalid \`retry\` value: "${t}"`,{type:`invalid-retry`,value:t,line:i}));break;default:n(new mx(`Unknown field "${e.length>20?`${e.slice(0,20)}\u2026`:e}"`,{type:`unknown-field`,field:e,value:t,line:i}));break}}function p(){c.length>0&&t({id:s,event:l||void 0,data:c.endsWith(`
76
+ `)?c.slice(0,-1):c}),s=void 0,c=``,l=``}function m(e={}){a&&e.consume&&d(a),o=!0,s=void 0,c=``,l=``,a=``}return{feed:u,reset:m}}function _x(e){let t=[],n=``,r=0;for(;r<e.length;){let i=e.indexOf(`\r`,r),a=e.indexOf(`
77
+ `,r),o=-1;if(i!==-1&&a!==-1?o=Math.min(i,a):i===-1?a!==-1&&(o=a):o=i===e.length-1?-1:i,o===-1){n=e.slice(r);break}else{let n=e.slice(r,o);t.push(n),r=o+1,e[r-1]===`\r`&&e[r]===`
78
+ `&&r++}}return[t,n]}var vx=class extends TransformStream{constructor({onError:e,onRetry:t,onComment:n}={}){let r;super({start(i){r=gx({onEvent:e=>{i.enqueue(e)},onError(t){e===`terminate`?i.error(t):typeof e==`function`&&e(t)},onRetry:t,onComment:n})},transform(e){r.feed(e)}})}},yx=class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.OAuthClientFlowError`})}static[Symbol.hasInstance](e){return pv(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return pv(this,e)}constructor(e){super(e),this.name=new.target.name,fv(this,new.target)}},bx=class extends yx{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.IssuerMismatchError`})}kind;expected;received;constructor(e,t,n){super(`Issuer mismatch in ${e===`metadata`?`authorization server metadata (RFC 8414 §3.3)`:`authorization response (RFC 9207)`}: expected ${JSON.stringify(t)}, received ${JSON.stringify(n)}`),this.kind=e,this.expected=t,this.received=n}},xx=class extends yx{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.RegistrationRejectedError`})}status;body;submittedMetadata;constructor(e){super(`Dynamic Client Registration rejected (HTTP ${e.status}): ${e.body}`),this.status=e.status,this.body=e.body,this.submittedMetadata=e.submittedMetadata}},Sx=class extends yx{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.InsecureTokenEndpointError`})}tokenEndpoint;constructor(e){super(`Refusing to send credentials to non-https token endpoint '${e}'. OAuth token requests MUST use TLS (localhost / 127.0.0.1 / ::1 are exempt).`),this.tokenEndpoint=e}},Cx=class extends yx{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.AuthorizationServerMismatchError`})}constructor(e,t){super(`Authorization server changed between redirect and callback (redirected to ${JSON.stringify(e)}, callback resolved ${JSON.stringify(t)}); refusing to send authorization_code/code_verifier to a different token endpoint`),this.recordedIssuer=e,this.currentIssuer=t}},wx=class extends yx{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.InsufficientScopeError`})}requiredScope;resourceMetadataUrl;errorDescription;constructor(e){super(`Insufficient scope${e.requiredScope?`: required "${e.requiredScope}"`:``}`),this.requiredScope=e.requiredScope,this.resourceMetadataUrl=e.resourceMetadataUrl,this.errorDescription=e.errorDescription}};function Tx(e,t,n){if(e!==void 0)return e.issuer===void 0?(n?.canPersistStamp!==!1&&console.warn(`[mcp-sdk] SEP-2352: stored OAuth credential has no 'issuer' stamp (pre-upgrade storage or provider not round-tripping the value). SEP-2352 isolation is inactive for this read; ensure your provider round-trips the issuer field.`),e):Ex(e.issuer,t)?e:void 0}function Ex(e,t){return e===t||e.endsWith(`/`)&&e.slice(0,-1)===t||t.endsWith(`/`)&&t.slice(0,-1)===e}function Dx(e){if(e==null)return!1;let t=e;return typeof t.tokens==`function`&&typeof t.clientInformation==`function`}async function Ox(e,t,n){let{resourceMetadataUrl:r,scope:i}=eS(t.response);if(await Yx(e,{serverUrl:t.serverUrl,resourceMetadataUrl:r,scope:i,fetchFn:t.fetchFn,...n})!==`AUTHORIZED`)throw new Ax}function kx(e,t){return{token:async()=>(await e.tokens())?.access_token,onUnauthorized:async n=>Ox(e,n,t)}}var Ax=class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.UnauthorizedError`})}static[Symbol.hasInstance](e){return pv(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return pv(this,e)}constructor(e){super(e??`Unauthorized`),this.name=`UnauthorizedError`,fv(this,new.target)}};function jx(e){return e?.authorization_response_iss_parameter_supported===!0}function Mx({iss:e,expectedIssuer:t,issParameterSupported:n}){if(t!==void 0){if(e===void 0){if(n)throw new bx(`authorization_response`,t,void 0);return}if(e!==t)throw new bx(`authorization_response`,t,e)}}function Nx(...e){let t=new Set;for(let n of e)if(n)for(let e of n.split(/\s+/))e&&t.add(e);return t.size>0?[...t].join(` `):void 0}function Px(e,t){if(!e)return!1;let n=new Set((t??``).split(/\s+/).filter(Boolean));for(let t of e.split(/\s+/))if(t&&!n.has(t))return!0;return!1}async function Fx(e,t,n,r,i){if(typeof e==`string`)return{authorizationCode:e,iss:t};let a=e.get(`iss`)??void 0,o=e.get(`code`);if(o)return{authorizationCode:o,iss:a};let s=(await n.discoveryState?.())?.authorizationServerMetadata;if(!s)try{s=(await uS(r,i)).authorizationServerMetadata}catch{s=void 0}if(!s)throw new Ax(`Authorization callback failed and the issuer could not be verified`);Mx({iss:a,expectedIssuer:s.issuer,issParameterSupported:jx(s)});let c=e.get(`error`);throw c?new hv(c,e.get(`error_description`)??c,e.get(`error_uri`)??void 0):new Ax("Authorization callback contained neither `code` nor `error`")}function Ix(e){return[`client_secret_basic`,`client_secret_post`,`none`].includes(e)}var Lx=`code`,Rx=`S256`;function zx(e,t){let n=e.client_secret!==void 0;return`token_endpoint_auth_method`in e&&e.token_endpoint_auth_method&&Ix(e.token_endpoint_auth_method)&&(t.length===0||t.includes(e.token_endpoint_auth_method))?e.token_endpoint_auth_method:t.length===0?n?`client_secret_basic`:`none`:n&&t.includes(`client_secret_basic`)?`client_secret_basic`:n&&t.includes(`client_secret_post`)?`client_secret_post`:t.includes(`none`)?`none`:n?`client_secret_post`:`none`}function Bx(e,t,n,r){let{client_id:i,client_secret:a}=t;switch(e){case`client_secret_basic`:Vx(i,a,n);return;case`client_secret_post`:Hx(i,a,r);return;case`none`:Ux(i,r);return;default:throw Error(`Unsupported client authentication method: ${e}`)}}function Vx(e,t,n){if(!t)throw Error(`client_secret_basic authentication requires a client_secret`);let r=btoa(`${e}:${t}`);n.set(`Authorization`,`Basic ${r}`)}function Hx(e,t,n){n.set(`client_id`,e),t&&n.set(`client_secret`,t)}function Ux(e,t){t.set(`client_id`,e)}function Wx(e){return e===`localhost`||e===`127.0.0.1`||e===`[::1]`||e===`::1`}function Gx(e){let t=new URL(String(e));if(t.protocol!==`https:`&&!Wx(t.hostname))throw new Sx(t.href);return t}function Kx(e){for(let t of e??[]){let e;try{e=new URL(t)}catch{continue}if(e.protocol!==`http:`&&e.protocol!==`https:`||Wx(e.hostname))return`native`}return`web`}function qx(e){let t=e.clientMetadata;return{...t,grant_types:t.grant_types??(e.redirectUrl===void 0?void 0:[`authorization_code`,`refresh_token`]),application_type:t.application_type??Kx(t.redirect_uris)}}async function Jx(e){let t=e instanceof Response?e.status:void 0,n=e instanceof Response?await e.text():e;try{let e=iv.parse(JSON.parse(n));return hv.fromResponse(e)}catch(e){let r=`${t?`HTTP ${t}: `:``}Invalid OAuth error response: ${e}. Raw body: ${n}`;return new hv(mv.ServerError,r)}}async function Yx(e,t){try{return await Zx(e,t)}catch(n){if(n instanceof hv){if(n.code===mv.InvalidClient||n.code===mv.UnauthorizedClient)return await e.invalidateCredentials?.(`client`),await e.invalidateCredentials?.(`tokens`),await Zx(e,t);if(n.code===mv.InvalidGrant)return await e.invalidateCredentials?.(`tokens`),await Zx(e,t)}throw n}}function Xx(e){let{requestedScope:t,resourceMetadata:n,authServerMetadata:r,clientMetadata:i}=e,a=t||n?.scopes_supported?.join(` `)||i.scope;return a&&r?.scopes_supported?.includes(`offline_access`)&&!a.split(` `).includes(`offline_access`)&&i.grant_types?.includes(`refresh_token`)&&(a=`${a} offline_access`),a}async function Zx(e,{serverUrl:t,authorizationCode:n,iss:r,scope:i,resourceMetadataUrl:a,fetchFn:o,skipIssuerMetadataValidation:s,forceReauthorization:c}){let l=qx(e),u=await e.discoveryState?.(),d,f,p,m,h=a;if(!h&&u?.resourceMetadataUrl&&(h=new URL(u.resourceMetadataUrl)),u?.authorizationServerUrl){if(f=u.authorizationServerUrl,d=u.resourceMetadata,p=u.authorizationServerMetadata??await lS(f,{fetchFn:o,skipIssuerValidation:s}),!d)try{d=await nS(t,{resourceMetadataUrl:h},o)}catch(e){if(e instanceof TypeError)throw e}(p!==u.authorizationServerMetadata||d!==u.resourceMetadata)&&await e.saveDiscoveryState?.({authorizationServerUrl:String(f),resourceMetadataUrl:h?.toString(),resourceMetadata:d,authorizationServerMetadata:p})}else{let e=await uS(t,{resourceMetadataUrl:h,fetchFn:o,skipIssuerMetadataValidation:s});f=e.authorizationServerUrl,p=e.authorizationServerMetadata,d=e.resourceMetadata,m={authorizationServerUrl:String(f),resourceMetadataUrl:h?.toString(),resourceMetadata:d,authorizationServerMetadata:p}}let g=p?.issuer??String(f),_={issuer:g};if(await e.saveAuthorizationServerUrl?.(g),n!==void 0){let t=u?.authorizationServerMetadata?.issuer??u?.authorizationServerUrl;if(t===void 0){if(e.saveDiscoveryState!==void 0)throw new Cx(`discoveryState was not available on the callback leg; ensure your provider persists discoveryState alongside codeVerifier`,g);console.warn(`[mcp-sdk] OAuthClientProvider does not implement saveDiscoveryState()/discoveryState(); the SEP-2352 callback-leg authorization-server binding cannot be checked. Implement discoveryState (persist alongside codeVerifier) — see docs/migration/upgrade-to-v2.md §SEP-2352.`)}else if(!Ex(t,g))throw new Cx(t,g)}m&&await e.saveDiscoveryState?.(m);let v=await $x(t,e,d);v&&await e.saveResourceUrl?.(String(v));let y=Xx({requestedScope:i,resourceMetadata:d,authServerMetadata:p,clientMetadata:e.clientMetadata}),b=await Promise.resolve(e.clientInformation(_)),x=Tx(b,g,{canPersistStamp:e.saveClientInformation!==void 0});if(x===void 0&&b?.issuer&&e.saveClientInformation===void 0)throw new Cx(b.issuer,g);if(x&&x.issuer===void 0&&(x={...x,issuer:g},await e.saveClientInformation?.(x,_)),!x){if(n!==void 0)throw Error(`Existing OAuth client information is required when exchanging an authorization code`);let t=p?.client_id_metadata_document_supported===!0,r=e.clientMetadataUrl;if(r&&!Qx(r))throw new hv(mv.InvalidClientMetadata,`clientMetadataUrl must be a valid HTTPS URL with a non-root pathname, got: ${r}`);if(t&&r)x={client_id:r,issuer:g},await e.saveClientInformation?.(x,_);else{if(!e.saveClientInformation)throw Error(`OAuth client information must be saveable for dynamic registration`);x={...await gS(f,{metadata:p,clientMetadata:l,scope:y,fetchFn:o}),issuer:g},await e.saveClientInformation(x,_)}}let S=!e.redirectUrl;if(n!==void 0||S){n!==void 0&&Mx({iss:r,expectedIssuer:p?.issuer,issParameterSupported:jx(p)});let t=await hS(e,f,{metadata:p,resource:v,authorizationCode:n,iss:r,scope:y,fetchFn:o});return await e.saveTokens({...t,issuer:g},_),`AUTHORIZED`}let C=Tx(await e.tokens(_),g);if(C&&C.issuer===void 0&&(C={...C,issuer:g},await e.saveTokens(C,_)),C?.refresh_token&&!c)try{let t=await mS(f,{metadata:p,clientInformation:x,refreshToken:C.refresh_token,resource:v,addClientAuthentication:e.addClientAuthentication,fetchFn:o});return await e.saveTokens({...t,issuer:g},_),`AUTHORIZED`}catch(e){if(e instanceof Sx||!(!(e instanceof hv)||e.code===mv.ServerError))throw e}let w=e.state?await e.state():void 0,{authorizationUrl:T,codeVerifier:E}=await dS(f,{metadata:p,clientInformation:x,state:w,redirectUrl:e.redirectUrl,scope:y,resource:v});return await e.saveCodeVerifier(E),await e.redirectToAuthorization(T),`REDIRECT`}function Qx(e){if(!e)return!1;try{let t=new URL(e);return t.protocol===`https:`&&t.pathname!==`/`}catch{return!1}}async function $x(e,t,n){let r=yee(e);if(t.validateResourceURL)return await t.validateResourceURL(r,n?.resource);if(n){if(!bee({requestedResource:r,configuredResource:n.resource}))throw Error(`Protected resource ${n.resource} does not match expected ${r} (or origin)`);return new URL(n.resource)}}function eS(e){let t=e.headers.get(`WWW-Authenticate`);if(!t)return{};let[n,r]=t.split(` `);if(n?.toLowerCase()!==`bearer`||!r)return{};let i=tS(e,`resource_metadata`)||void 0,a;if(i)try{a=new URL(i)}catch{}let o=tS(e,`scope`)||void 0,s=tS(e,`error`)||void 0,c=tS(e,`error_description`)||void 0;return{resourceMetadataUrl:a,scope:o,error:s,errorDescription:c}}function tS(e,t){let n=e.headers.get(`WWW-Authenticate`);if(!n)return null;let r=new RegExp(String.raw`${t}=(?:"([^"]+)"|([^\s,]+))`),i=n.match(r);if(i){let e=i[1]||i[2];if(e)return e}return null}async function nS(e,t,n=fetch){let r=await sS(e,`oauth-protected-resource`,n,{protocolVersion:t?.protocolVersion,metadataUrl:t?.resourceMetadataUrl});if(!r||r.status===404)throw await r?.text?.().catch(()=>{}),Error(`Resource server does not implement OAuth 2.0 Protected Resource Metadata.`);if(!r.ok)throw await r.text?.().catch(()=>{}),Error(`HTTP ${r.status} trying to load well-known OAuth protected resource metadata.`);return Q_.parse(await r.json())}async function rS(e,t,n=fetch){try{return await n(e,{headers:t})}catch(r){if(!(r instanceof TypeError))throw r;if(t)try{return await n(e,{})}catch(e){if(!(e instanceof TypeError))throw e;return}return}}function iS(e,t=``,n={}){return t.endsWith(`/`)&&(t=t.slice(0,-1)),n.prependPathname?`${t}/.well-known/${e}`:`/.well-known/${e}${t}`}async function aS(e,t,n=fetch){return await rS(e,{"MCP-Protocol-Version":t},n)}function oS(e,t){return e?t===`/`?!1:e.status>=400&&e.status<500||e.status===502:!0}async function sS(e,t,n,r){let i=new URL(e),a=r?.protocolVersion??`2025-11-25`,o;if(r?.metadataUrl)o=new URL(r.metadataUrl);else{let e=iS(t,i.pathname);o=new URL(e,r?.metadataServerUrl??i),o.search=i.search}let s=await aS(o,a,n);return!r?.metadataUrl&&oS(s,i.pathname)&&(s=await aS(new URL(`/.well-known/${t}`,i),a,n)),s}function cS(e){let t=typeof e==`string`?new URL(e):e,n=t.pathname!==`/`,r=[];if(!n)return r.push({url:new URL(`/.well-known/oauth-authorization-server`,t.origin),type:`oauth`},{url:new URL(`/.well-known/openid-configuration`,t.origin),type:`oidc`}),r;let i=t.pathname;return i.endsWith(`/`)&&(i=i.slice(0,-1)),r.push({url:new URL(`/.well-known/oauth-authorization-server${i}`,t.origin),type:`oauth`},{url:new URL(`/.well-known/openid-configuration${i}`,t.origin),type:`oidc`},{url:new URL(`${i}/.well-known/openid-configuration`,t.origin),type:`oidc`}),r}async function lS(e,{fetchFn:t=fetch,protocolVersion:n=Rm,skipIssuerValidation:r=!1}={}){let i={"MCP-Protocol-Version":n,Accept:`application/json`},a=cS(e);for(let{url:n,type:o}of a){let a=await rS(n,i,t);if(!a)continue;if(!a.ok){if(await a.text?.().catch(()=>{}),a.status>=400&&a.status<500||a.status===502)continue;throw Error(`HTTP ${a.status} trying to load ${o===`oauth`?`OAuth`:`OpenID provider`} metadata from ${n}`)}let s=o===`oauth`?$_.parse(await a.json()):tv.parse(await a.json());if(!r){let t=typeof e==`string`?e:e.href;if(!(s.issuer===t||t.endsWith(`/`)&&s.issuer===t.slice(0,-1)))throw new bx(`metadata`,t,s.issuer)}return s}}async function uS(e,t){let n,r;try{n=await nS(e,{resourceMetadataUrl:t?.resourceMetadataUrl},t?.fetchFn),n.authorization_servers&&n.authorization_servers.length>0&&(r=n.authorization_servers[0])}catch(e){if(e instanceof TypeError)throw e}r||=String(new URL(`/`,e));let i=await lS(r,{fetchFn:t?.fetchFn,skipIssuerValidation:t?.skipIssuerMetadataValidation});return{authorizationServerUrl:r,authorizationServerMetadata:i,resourceMetadata:n}}async function dS(e,{metadata:t,clientInformation:n,redirectUrl:r,scope:i,state:a,resource:o}){let s;if(t){if(s=new URL(t.authorization_endpoint),!t.response_types_supported.includes(Lx))throw Error(`Incompatible auth server: does not support response type ${Lx}`);if(t.code_challenge_methods_supported&&!t.code_challenge_methods_supported.includes(Rx))throw Error(`Incompatible auth server: does not support code challenge method ${Rx}`)}else s=new URL(`/authorize`,e);let c=await px(),l=c.code_verifier,u=c.code_challenge;return s.searchParams.set(`response_type`,Lx),s.searchParams.set(`client_id`,n.client_id),s.searchParams.set(`code_challenge`,u),s.searchParams.set(`code_challenge_method`,Rx),s.searchParams.set(`redirect_uri`,String(r)),a&&s.searchParams.set(`state`,a),i&&s.searchParams.set(`scope`,i),i?.split(` `).includes(`offline_access`)&&s.searchParams.append(`prompt`,`consent`),o&&s.searchParams.set(`resource`,o.href),{authorizationUrl:s,codeVerifier:l}}function fS(e,t,n){return new URLSearchParams({grant_type:`authorization_code`,code:e,code_verifier:t,redirect_uri:String(n)})}async function pS(e,{metadata:t,tokenRequestParams:n,clientInformation:r,addClientAuthentication:i,resource:a,fetchFn:o}){let s=Gx(t?.token_endpoint??new URL(`/token`,e)),c=new Headers({"Content-Type":`application/x-www-form-urlencoded`,Accept:`application/json`});a&&n.set(`resource`,a.href),i?await i(c,n,s,t):r&&Bx(zx(r,t?.token_endpoint_auth_methods_supported??[]),r,c,n);let l=await(o??fetch)(s,{method:`POST`,headers:c,body:n});if(!l.ok)throw await Jx(l);let u=await l.json();try{return nv.parse(u)}catch(e){throw typeof u==`object`&&u&&`error`in u?await Jx(JSON.stringify(u)):e}}async function mS(e,{metadata:t,clientInformation:n,refreshToken:r,resource:i,addClientAuthentication:a,fetchFn:o}){return{refresh_token:r,...await pS(e,{metadata:t,tokenRequestParams:new URLSearchParams({grant_type:`refresh_token`,refresh_token:r}),clientInformation:n,addClientAuthentication:a,resource:i,fetchFn:o})}}async function hS(e,t,{metadata:n,resource:r,authorizationCode:i,iss:a,scope:o,fetchFn:s}={}){i!==void 0&&Mx({iss:a,expectedIssuer:n?.issuer,issParameterSupported:jx(n)});let c=o??e.clientMetadata.scope,l;if(e.prepareTokenRequest&&(l=await e.prepareTokenRequest(c)),!l){if(!i)throw Error(`Either provider.prepareTokenRequest() or authorizationCode is required`);if(!e.redirectUrl)throw Error(`redirectUrl is required for authorization_code flow`);l=fS(i,await e.codeVerifier(),e.redirectUrl)}let u=await e.clientInformation({issuer:n?.issuer??String(t)});return pS(t,{metadata:n,tokenRequestParams:l,clientInformation:u??void 0,addClientAuthentication:e.addClientAuthentication,resource:r,fetchFn:s})}async function gS(e,{metadata:t,clientMetadata:n,scope:r,fetchFn:i}){let a;if(t){if(!t.registration_endpoint)throw Error(`Incompatible auth server: does not support dynamic client registration`);a=new URL(t.registration_endpoint)}else a=new URL(`/register`,e);let o={...n,...r===void 0?{}:{scope:r}},s=await(i??fetch)(a,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(o)});if(!s.ok)throw new xx({status:s.status,body:await s.text(),submittedMetadata:o});return cv.parse(await s.json())}var _S=new Set([`tools/list`,`prompts/list`,`resources/list`,`resources/templates/list`,`server/discover`]),vS=class{_entries=new Map;_maxEntries;_stamp=0;_cappedSize=0;constructor(e){this._maxEntries=e?.maxEntries??512}get size(){return this._entries.size}get(e){return this._entries.get(yS(e))}set(e,t){let n=yS(e),r=_S.has(e.method),i=!this._entries.has(n);if(!r&&i&&this._maxEntries>0&&this._cappedSize>=this._maxEntries){for(let e of this._entries.keys())if(!_S.has(e.slice(0,e.indexOf(`\0`)))){this._entries.delete(e),this._cappedSize--;break}}let a=++this._stamp;return this._entries.set(n,{...t,stamp:a}),i&&!r&&this._cappedSize++,a}delete(e){this._entries.delete(yS(e))&&!_S.has(e.method)&&this._cappedSize--}evict(e){let t=`${e}\0`,n=_S.has(e);for(let e of this._entries.keys())e.startsWith(t)&&(this._entries.delete(e),n||this._cappedSize--)}clear(){this._entries.clear(),this._cappedSize=0}};function yS(e){return`${e.method}\0${JSON.stringify([e.partition??``,e.params??``])}`}function bS(e,t){return t===void 0?e:`${e}\0${t}`}var xS=864e5,SS=class{_evictionGeneration=new Map;_toolIndex;_toolOutputValidatorIndex;_serverIdentity=``;constructor(e,t,n=()=>{},r=``,i=Date.now){this._store=e,this._isUserSupplied=t,this._reportError=n,this._cachePartition=r,this._now=i}now(){return this._now()}setServerIdentity(e){this._serverIdentity=e}_partitionFor(e){return JSON.stringify([this._serverIdentity,e===`public`?``:this._cachePartition])}async _probe(e,t){let n={method:e,params:t??``},r=this._partitionFor(`private`),i=await this._store.get({...n,partition:r});if(i!==void 0)return i;let a=this._partitionFor(`public`);if(a===r)return;let o=await this._store.get({...n,partition:a});return o?.scope===`public`?o:void 0}async evict(e){this._evictionGeneration.set(e,(this._evictionGeneration.get(e)??0)+1),await this._deleteBoth(e,``)}async _deleteBoth(e,t){let n=this._partitionFor(`private`),r=this._partitionFor(`public`);try{await this._store.delete({method:e,params:t,partition:n})}catch(e){this._reportError(e)}if(r!==n)try{await this._store.delete({method:e,params:t,partition:r})}catch(e){this._reportError(e)}}async evictKey(e,t){let n=bS(e,t),r=this._evictionGeneration.get(n);r!==void 0&&this._evictionGeneration.set(n,r+1),await this._deleteBoth(e,t)}captureGeneration(e,t){let n=bS(e,t),r=this._evictionGeneration.get(n)??0;return this._evictionGeneration.set(n,r),r}async write(e,t,n,r){if((this._evictionGeneration.get(bS(e,r?.params))??0)!==n)return;let i=r?.params??``,a=this._partitionFor(`private`),o=this._partitionFor(`public`),s=(r?.scope??`private`)===`public`?o:a;try{await this._store.set({method:e,params:i,partition:s},{value:CS(t),expiresAt:r?.expiresAt,scope:r?.scope})}catch(e){this._reportError(e)}if(o!==a)try{await this._store.delete({method:e,params:i,partition:s===a?o:a})}catch(e){this._reportError(e)}}async read(e,t){let n=await this._probe(e,t);if(!(n?.expiresAt===void 0||!(n.expiresAt>this.now())))try{let e=JSON.parse(n.value);if(typeof e!=`object`||!e||Array.isArray(e))throw TypeError(`cached document is not an object`);return{value:e}}catch(n){this._reportError(n),await this._deleteBoth(e,t??``);return}}resetForReconnect(){this._isUserSupplied||this._store.clear(),this._evictionGeneration.clear(),this._toolIndex=void 0,this._toolOutputValidatorIndex=void 0,this._serverIdentity=``}async toolDefinition(e){let t=await this._probe(`tools/list`);if(t===void 0){this._toolIndex=void 0;return}if(this._toolIndex?.stamp!==t.stamp){let e=this._decodeListTools(t),n=new Map;if(e!==void 0)for(let t of e.tools)n.set(t.name,t);this._toolIndex={stamp:t.stamp,byName:n}}return this._toolIndex.byName.get(e)}async outputValidator(e,t){let n=await this._probe(`tools/list`);if(n===void 0){this._toolOutputValidatorIndex=void 0;return}if(this._toolOutputValidatorIndex?.stamp!==n.stamp){let e=this._decodeListTools(n)??{tools:[]},r=new Map;for(let n of e.tools){let e=t(n);e!==void 0&&r.set(n.name,e)}this._toolOutputValidatorIndex={stamp:n.stamp,byName:r}}return this._toolOutputValidatorIndex.byName.get(e)}_decodeListTools(e){try{let t=JSON.parse(e.value);if(!Array.isArray(t?.tools)||!t.tools.every(e=>typeof e==`object`&&!!e))throw TypeError(`cached tools/list document has a malformed tools array`);return t}catch(e){this._reportError(e);return}}};function CS(e){let t;try{t=JSON.stringify(e)}catch(e){throw TypeError(`cache value is not JSON-serializable: ${e instanceof Error?e.message:String(e)}`)}if(typeof t!=`string`)throw TypeError(`cache value is not JSON-serializable: it has no JSON representation`);return t}var wS=Symbol.for(`mcp.authSeamEscape`);function TS(e){if(typeof e==`object`&&e||typeof e==`function`)try{Object.defineProperty(e,wS,{value:!0,configurable:!0})}catch{}return e}function ES(e){return(typeof e==`object`&&!!e||typeof e==`function`)&&e[wS]===!0}var DS=-32022,OS=new Set([-32001,-32020,-32021]);function kS(e,t){switch(e.kind){case`result`:return AS(e.result,t);case`rpc-error`:return jS(e,t);case`http-error`:return MS(e,t);case`network-error`:return NS(e.error,t);case`auth-required`:return{kind:`error`,error:e.error};case`closed`:return t.transportKind===`stdio`?{kind:`legacy`}:NS(Error(`Connection closed during the version negotiation probe`),t);case`timeout`:return t.transportKind===`stdio`?{kind:`legacy`}:{kind:`error`,error:new _v(gv.RequestTimeout,`Version negotiation probe timed out after ${e.timeoutMs}ms`,{timeout:e.timeoutMs})}}}function AS(e,t){let n=zy(Ry).validateResult(`server/discover`,e);if(!n.ok)return{kind:`legacy`};let r=n.value.supportedVersions,i=t.clientModernVersions.find(e=>r.includes(e));return i===void 0?t.fallbackAvailable?{kind:`legacy`}:{kind:`error`,error:new iy({supported:[...r],requested:t.requestedVersion})}:{kind:`modern`,version:i,discover:n.value}}function jS(e,t){let{code:n,message:r,data:i}=e;if(n===DS){let e=IS(i);if(e===void 0)return{kind:`legacy`};let n=new iy({supported:e,requested:LS(i)??t.requestedVersion},r),a=Cv(e),o=t.clientModernVersions.find(e=>a.includes(e));return o===void 0?a.length>0?{kind:`error`,error:n}:t.fallbackAvailable?{kind:`legacy`}:{kind:`error`,error:n}:{kind:`corrective`,version:o,error:n}}return OS.has(n),{kind:`legacy`}}function MS(e,t){if(e.status===401||e.status===403){let t=e.status===403;return{kind:`error`,error:new vv(t?gv.ClientHttpForbidden:gv.ClientHttpAuthentication,`Version negotiation failed: ${t?`the server denied access (HTTP 403)`:`the server requires authorization (HTTP 401)`}`,{status:e.status,statusText:e.statusText,text:e.body})}}if(e.status>=500)return{kind:`error`,error:new vv(gv.EraNegotiationFailed,`Version negotiation failed: the server answered the probe with HTTP ${e.status}`,{status:e.status,statusText:e.statusText,text:e.body})};let n=RS(e.body);return n===void 0?{kind:`legacy`}:jS(n,t)}function NS(e,t){return t.environment===`browser`&&PS(e)?{kind:`legacy`}:{kind:`error`,error:new _v(gv.EraNegotiationFailed,`Version negotiation probe failed: ${FS(e)}`,{cause:e})}}function PS(e){return e instanceof TypeError||e instanceof Error&&e.name===`TypeError`}function FS(e){return e instanceof Error?e.message:String(e)}function IS(e){if(typeof e!=`object`||!e)return;let t=e.supported;if(!(!Array.isArray(t)||t.length===0||!t.every(e=>typeof e==`string`)))return t}function LS(e){if(typeof e!=`object`||!e)return;let t=e.requested;return typeof t==`string`?t:void 0}function RS(e){if(e===void 0||e===``)return;let t;try{t=JSON.parse(e)}catch{return}if(typeof t!=`object`||!t)return;let n=t.error;if(typeof n!=`object`||!n)return;let{code:r,message:i,data:a}=n;if(typeof r==`number`)return{code:r,message:typeof i==`string`?i:``,data:a}}var zS=`legacy`;function BS(e,t){let n=e?.mode??zS;if(n===`legacy`)return{kind:`legacy`};let r=e?.probe??{};if(typeof n==`object`){if(!xv(n.pin))throw TypeError(`versionNegotiation: { pin: '${n.pin}' } is not a modern protocol revision — pinning is for 2026-07-28 and later; omit versionNegotiation (or use mode: 'legacy') for 2025-era servers.`);return{kind:`pin`,version:n.pin,probe:r}}let i=t?Cv(t):[];return{kind:`auto`,modernVersions:i.length>0?i:[...bv],fallbackAvailable:!t||Sv(t).length>0,probe:r}}function VS(){let e=globalThis;return e.window!==void 0&&e.document!==void 0?`browser`:`node`}function HS(e){return`stderr`in e&&`pid`in e?`stdio`:`http`}var US=class e{_pending;_probeCounter=0;_savedOnMessage;_savedOnError;_savedOnClose;_closeDelivered=!1;constructor(e){this._transport=e,this._savedOnMessage=e.onmessage,this._savedOnError=e.onerror,this._savedOnClose=e.onclose}static async open(t){let n=new e(t);t.onmessage=e=>{let t=n._pending;if(t!==void 0&&(qy(e)||Jy(e))&&e.id===t.id){n._pending=void 0,qy(e)?t.resolve({kind:`response`,result:e.result}):t.resolve({kind:`response`,error:e.error});return}},t.onerror=e=>{n._savedOnError?.(e)},t.onclose=()=>{let e=n._pending;e!==void 0&&(n._pending=void 0,e.resolve({kind:`closed`})),n._closeDelivered=!0,n._savedOnClose?.()};try{await t.start()}catch(e){throw n.detach(),e}return n}async exchange(e,t){let n=`server-discover-probe-${++this._probeCounter}`;return new Promise(r=>{let i=!1,a=e=>{i||(i=!0,clearTimeout(o),this._pending?.id===n&&(this._pending=void 0),r(e))},o=setTimeout(()=>a({kind:`timeout`}),t);this._pending={id:n,resolve:a},this._transport.send(e(n)).catch(e=>a({kind:`send-error`,error:e}))})}detach(){if(this._pending=void 0,this._transport.onmessage=this._savedOnMessage,this._transport.onerror=this._savedOnError,this._closeDelivered&&this._savedOnClose!==void 0){let e=this._savedOnClose,t=this._transport,n=!1,r=()=>{if(!n){n=!0;return}e()};t.onclose=r,WS.set(t,()=>{t.onclose===r&&(t.onclose=e)})}else this._transport.onclose=this._savedOnClose}release(){this.detach();let e=this._transport,t=e.start,n=!0;e.start=async function(){if(n){n=!1,e.start=t;return}return t.call(e)}}},WS=new WeakMap;function GS(e){let t=WS.get(e);WS.delete(e),t?.()}function KS(e,t,n,r){return{jsonrpc:`2.0`,id:e,method:`server/discover`,params:{_meta:zy(t).outboundEnvelope({protocolVersion:t,clientInfo:n,clientCapabilities:r})}}}function qS(e,t){switch(e.kind){case`response`:return e.error===void 0?{kind:`result`,result:e.result}:{kind:`rpc-error`,...e.error};case`send-error`:{let t=e.error;if(ES(t)||t instanceof Ax||t instanceof Error&&t.name===`UnauthorizedError`)return{kind:`auth-required`,error:t};if(t instanceof vv){let e=t.data?.text;return{kind:`http-error`,status:t.data.status,body:typeof e==`string`?e:void 0,statusText:t.data.statusText}}return{kind:`network-error`,error:t}}case`closed`:return{kind:`closed`};case`timeout`:return{kind:`timeout`,timeoutMs:t}}}async function JS(e,t){let n=e.probe.timeoutMs??t.defaultTimeoutMs,r=Math.max(0,e.probe.maxRetries??0),i=e.kind===`pin`?[e.version]:e.modernVersions,a=e.kind===`auto`&&e.fallbackAvailable,o=await US.open(t.transport),s=async()=>{let s=i[0],c=!1,l=r;for(;;){let r=await o.exchange(e=>KS(e,s,t.clientInfo,t.capabilities),n);if(r.kind===`timeout`&&l>0){l--;continue}let u=qS(r,n),d=kS(u,{clientModernVersions:i,requestedVersion:s,fallbackAvailable:a,environment:t.environment,transportKind:t.transportKind});switch(d.kind){case`modern`:return{era:`modern`,version:d.version,discover:d.discover};case`corrective`:if(c)throw d.error;c=!0,s=d.version;continue;case`legacy`:{let n=u.kind===`closed`?`the connection closed during the server/discover probe`:void 0;if(e.kind===`pin`)throw new _v(gv.EraNegotiationFailed,n===void 0?`Version negotiation failed: the server did not offer pinned protocol version ${e.version} via server/discover (no fallback in pin mode)`:`Version negotiation failed: ${n} before the server offered pinned protocol version ${e.version} (no fallback in pin mode)`);if(!e.fallbackAvailable)throw new _v(gv.EraNegotiationFailed,n===void 0?`Version negotiation failed: the server gave no modern evidence and this client supports no pre-2026-07-28 protocol version to fall back to`:`Version negotiation failed: ${n} and this client supports no pre-2026-07-28 protocol version to fall back to`);if(n!==void 0&&t.disposableProbe!==!0)throw new _v(gv.EraNegotiationFailed,`Version negotiation failed: ${n} (this transport probed in place — the disposable sibling probe requires the SDK's base StdioClientTransport)`);return{era:`legacy`}}case`error`:throw d.error}}},c;try{c=await s()}catch(e){throw o.detach(),e}return o.release(),c}function YS(e){let t=Object.getPrototypeOf(e);if(t===null||!Object.prototype.hasOwnProperty.call(t,`_dispose`))return;let n=e._serverParams;return typeof n==`object`&&n&&typeof n.command==`string`?n:void 0}async function XS(e,t,n,r){let i=t.constructor,a=new i({...n,stderr:`ignore`}),o=t.close,s=!1,c,l=new Promise((e,t)=>{c=()=>t(ZS())});t.close=async function(){return s=!0,c?.(),o.call(t)};let u;try{let t=JS(e,{...r,transport:a,transportKind:`stdio`,disposableProbe:!0});t.catch(()=>{}),u=await Promise.race([t,l])}finally{await QS(a),t.close=o}if(s)throw ZS();return u}function ZS(){return new _v(gv.EraNegotiationFailed,`Version negotiation failed: the transport was closed during the server/discover probe`)}async function QS(e){try{let t=e._dispose;await(typeof t==`function`?t.call(e):e.close())}catch{}}function $S(e){let t=e._meta?.[Um];return pte.Implementation(t)?t:void 0}function eC(e,t){if(!(!e||typeof t!=`object`||!t)){if(e.type===`object`&&e.properties&&typeof e.properties==`object`){let n=t,r=e.properties;for(let e of Object.keys(r)){let t=r[e];n[e]===void 0&&Object.prototype.hasOwnProperty.call(t,`default`)&&(n[e]=t.default),n[e]!==void 0&&eC(t,n[e])}}if(Array.isArray(e.anyOf))for(let n of e.anyOf)typeof n!=`boolean`&&eC(n,t);if(Array.isArray(e.oneOf))for(let n of e.oneOf)typeof n!=`boolean`&&eC(n,t)}}function tC(e){if(!e)return{supportsFormMode:!1,supportsUrlMode:!1};let t=e.form!==void 0,n=e.url!==void 0;return{supportsFormMode:t||!t&&!n,supportsUrlMode:n}}function nC(e){if(typeof e==`object`&&e&&(e.kind===`legacy`&&!(`supportedVersions`in e)&&!(`discover`in e)||e.kind===`modern`&&jh.safeParse(e.discover).success))return e;throw new _v(gv.EraNegotiationFailed,`connect({ prior }): unrecognized prior — expected { kind: 'modern', discover } or { kind: 'legacy' }`)}var rC={"notifications/tools/list_changed":[`tools/list`],"notifications/prompts/list_changed":[`prompts/list`],"notifications/resources/list_changed":[`resources/list`,`resources/templates/list`]},iC=64,aC=class extends vte{_serverCapabilities;_serverVersion;_capabilities;_instructions;_jsonSchemaValidator;_cache;_defaultCacheTtlMs;_listMaxPages;_listChangedDebounceTimers=new Map;_listChangedConfig;_enforceStrictCapabilities;_versionNegotiation;_supportedProtocolVersionsOption;_inputRequiredDriverConfig;_listenState=new Map;_nextListenId=0;_autoOpenedSubscription;_discoverResult;_resetConnectionState(){if(this._negotiatedProtocolVersion=void 0,this._serverCapabilities=void 0,this._serverVersion=void 0,this._instructions=void 0,this._discoverResult=void 0,this._autoOpenedSubscription=void 0,this._listenState.size>0){let e=new _v(gv.ConnectionClosed,`subscriptions/listen: client reconnected or closed; subscription state from the previous connection was reset`);for(let t of this._listenState.values())t.settle({cause:`remote`,error:e})}this._listenState.clear();for(let e of this._listChangedDebounceTimers.values())clearTimeout(e);this._listChangedDebounceTimers.clear(),this._cache.resetForReconnect()}async close(){try{await super.close()}finally{this._resetConnectionState()}}constructor(e,t){super(t),this._clientInfo=e,this._capabilities=t?.capabilities?{...t.capabilities}:{},this._jsonSchemaValidator=t?.jsonSchemaValidator??new sx,this._enforceStrictCapabilities=t?.enforceStrictCapabilities??!1,this._versionNegotiation=t?.versionNegotiation,this._supportedProtocolVersionsOption=t?.supportedProtocolVersions,this._inputRequiredDriverConfig=ate(t?.inputRequired),this._cache=new SS(t?.responseCacheStore??new vS,t?.responseCacheStore!==void 0,e=>this._reportStoreError(e),t?.cachePartition??``),this._defaultCacheTtlMs=t?.defaultCacheTtlMs??0,this._listMaxPages=t?.listMaxPages??iC,t?.listChanged&&(this._listChangedConfig=t.listChanged)}buildContext(e,t){return e}_shouldDropInbound(e){if(this._negotiatedProtocolVersion!==void 0&&xv(this._negotiatedProtocolVersion)&&Gy(e))return`drop`}_outboundMetaEnvelope(){let e=this._negotiatedProtocolVersion;if(e!==void 0)return this._wireCodec().outboundEnvelope({protocolVersion:e,clientInfo:this._clientInfo,clientCapabilities:this._capabilities})}_resolveNonCompleteResult(e,t){return this._inputRequiredDriverConfig.autoFulfill?wte({getRequestHandler:e=>this._getRequestHandler(e),buildContext:e=>this.buildContext(e,void 0),sessionId:this.transport?.sessionId},this._inputRequiredDriverConfig,e,t):Promise.reject(new _v(gv.UnsupportedResultType,`Unsupported result type 'input_required' for ${t.request.method}: multi-round-trip auto-fulfilment is not enabled on this instance — pass allowInputRequired: true to handle it manually, or enable inputRequired.autoFulfill`,{resultType:`input_required`,method:t.request.method}))}_setupListChangedHandlers(e){e.tools&&this._serverCapabilities?.tools?.listChanged&&this._setupListChangedHandler(`tools`,`notifications/tools/list_changed`,e.tools,async()=>(await this.listTools(void 0,{cacheMode:`refresh`})).tools),e.prompts&&this._serverCapabilities?.prompts?.listChanged&&this._setupListChangedHandler(`prompts`,`notifications/prompts/list_changed`,e.prompts,async()=>(await this.listPrompts(void 0,{cacheMode:`refresh`})).prompts),e.resources&&this._serverCapabilities?.resources?.listChanged&&this._setupListChangedHandler(`resources`,`notifications/resources/list_changed`,e.resources,async()=>(await this.listResources(void 0,{cacheMode:`refresh`})).resources)}registerCapabilities(e){if(this.transport)throw Error(`Cannot register capabilities after connecting to transport`);this._capabilities=yte(this._capabilities,e)}setVersionNegotiation(e){if(this.transport)throw Error(`Cannot configure version negotiation after connecting to transport`);this._versionNegotiation=e}_wrapHandler(e,t){return e===`elicitation/create`?async(e,n)=>{let r=zy(this._negotiatedProtocolVersion),i=r.validateRequest(`elicitation/create`,e);if(!i.ok&&i.reason===`not-in-era`&&(i=r.validateInputRequest(`elicitation/create`,e)),!i.ok)throw new ty(i.reason===`not-in-era`?ey.InternalError:ey.InvalidParams,i.reason===`not-in-era`?`No wire schema for elicitation/create in the resolved era`:`Invalid elicitation request: ${i.message}`);let{params:a}=i.value;a.mode=a.mode??`form`;let{supportsFormMode:o,supportsUrlMode:s}=tC(this._capabilities.elicitation);if(a.mode===`form`&&!o)throw new ty(ey.InvalidParams,`Client does not support form-mode elicitation requests`);if(a.mode===`url`&&!s)throw new ty(ey.InvalidParams,`Client does not support URL-mode elicitation requests`);let c=await t(e,n),l=r.validateResult(`elicitation/create`,c);if(!l.ok&&l.reason===`not-in-era`&&(l=r.validateInputResponse(`elicitation/create`,c)),!l.ok)throw new ty(l.reason===`not-in-era`?ey.InternalError:ey.InvalidParams,l.reason===`not-in-era`?`No wire schema for elicitation/create in the resolved era`:`Invalid elicitation result: ${l.message}`);let u=l.value,d=a.mode===`form`?a.requestedSchema:void 0;if(a.mode===`form`&&u.action===`accept`&&u.content&&d&&this._capabilities.elicitation?.form?.applyDefaults)try{eC(d,u.content)}catch{}return u}:e===`sampling/createMessage`?async(e,n)=>{let r=zy(this._negotiatedProtocolVersion),i=r.validateRequest(`sampling/createMessage`,e);if(!i.ok&&i.reason===`not-in-era`&&(i=r.validateInputRequest(`sampling/createMessage`,e)),!i.ok)throw new ty(i.reason===`not-in-era`?ey.InternalError:ey.InvalidParams,i.reason===`not-in-era`?`No wire schema for sampling/createMessage in the resolved era`:`Invalid sampling request: ${i.message}`);let{params:a}=i.value,o=await t(e,n),s=!!(a.tools||a.toolChoice),c=r.samplingResultVariant(s,o);if(!c.ok&&c.reason===`not-in-era`&&(c=r.validateInputResponse(`sampling/createMessage`,o)),!c.ok)throw new ty(c.reason===`not-in-era`?ey.InternalError:ey.InvalidParams,c.reason===`not-in-era`?`No result schema for sampling/createMessage in the resolved era`:`Invalid sampling result: ${c.message}`);return c.value}:t}assertCapability(e,t){if(!this._serverCapabilities?.[e])throw new _v(gv.CapabilityNotSupported,`Server does not support ${e} (required for ${t})`)}async connect(e,t){if(t?.prior!=null)return this._connectFromPrior(e,nC(t.prior),t);let n=BS(this._versionNegotiation,this._supportedProtocolVersionsOption);return n.kind===`legacy`?this._connectPlainLegacy(e,t):this._connectNegotiated(e,n,t)}async _connectPlainLegacy(e,t){if(await super.connect(e),e.sessionId!==void 0){let t=this._negotiatedProtocolVersion;t!==void 0&&e.setProtocolVersion?.(t);return}this._resetConnectionState(),await this._legacyHandshake(e,t)}async _legacyHandshake(e,t){let n=Sv(this._supportedProtocolVersions);try{let r=n[0];if(r===void 0)throw new _v(gv.EraNegotiationFailed,`Cannot run the initialize handshake: supportedProtocolVersions contains no pre-2026-07-28 protocol version`);let i=await this.request({method:`initialize`,params:{protocolVersion:r,capabilities:this._capabilities,clientInfo:this._clientInfo}},t);if(i===void 0)throw Error(`Server sent invalid initialize result: ${i}`);if(!n.includes(i.protocolVersion))throw Error(`Server's protocol version is not supported: ${i.protocolVersion}`);this._serverCapabilities=i.capabilities,this._serverVersion=i.serverInfo,this._cache.setServerIdentity(this._deriveServerIdentity(e)),e.setProtocolVersion&&e.setProtocolVersion(i.protocolVersion),this._instructions=i.instructions,await this.notification({method:`notifications/initialized`}),this._negotiatedProtocolVersion=i.protocolVersion,this._listChangedConfig&&this._setupListChangedHandlers(this._listChangedConfig)}catch(e){throw this.close(),e}}async _connectNegotiated(e,t,n){if(e.sessionId!==void 0){await super.connect(e);let t=this._negotiatedProtocolVersion;t!==void 0&&e.setProtocolVersion&&e.setProtocolVersion(t);return}this._resetConnectionState();let r;try{let i=HS(e),a={clientInfo:this._clientInfo,capabilities:this._capabilities,environment:VS(),defaultTimeoutMs:n?.timeout??6e4},o=i===`stdio`?YS(e):void 0;r=o===void 0?await JS(t,{...a,transport:e,transportKind:i}):await XS(t,e,o,a)}catch(t){throw await e.close().catch(()=>{}),GS(e),t}if(GS(e),await super.connect(e),r.era===`legacy`){await this._legacyHandshake(e,n);return}if(this._serverCapabilities=r.discover.capabilities,this._serverVersion=$S(r.discover),this._cache.setServerIdentity(this._deriveServerIdentity(e)),this._instructions=r.discover.instructions,this._discoverResult=r.discover,this._negotiatedProtocolVersion=r.version,e.setProtocolVersion&&e.setProtocolVersion(r.version),this._listChangedConfig){let e=this._listChangedConfig,t=this._serverCapabilities,r={...e.tools&&t?.tools?.listChanged&&{tools:e.tools},...e.prompts&&t?.prompts?.listChanged&&{prompts:e.prompts},...e.resources&&t?.resources?.listChanged&&{resources:e.resources}},i=!0;try{this._setupListChangedHandlers(r)}catch(e){i=!1,this.onerror?.(e instanceof Error?e:Error(String(e)))}let a=i?{...r.tools&&{toolsListChanged:!0},...r.prompts&&{promptsListChanged:!0},...r.resources&&{resourcesListChanged:!0}}:{};if(Object.keys(a).length>0){let e=new AbortController,t=()=>e.abort(n?.signal?.reason);n?.signal?.aborted&&t(),n?.signal?.addEventListener(`abort`,t);try{this._autoOpenedSubscription=await this.listen(a,{timeout:n?.timeout,signal:e.signal})}catch(e){if(n?.signal?.aborted)throw await this.close().catch(()=>{}),e;this.onerror?.(e instanceof Error?e:Error(String(e)))}finally{n?.signal?.removeEventListener(`abort`,t)}}}}async _connectFromPrior(e,t,n){if(t.kind===`legacy`)return this._connectPlainLegacy(e,n);let r=t.discover;this._resetConnectionState();let i=this._supportedProtocolVersionsOption,a=(i&&Cv(i).length>0?Cv(i):bv).find(e=>r.supportedVersions.includes(e));if(a===void 0)throw new _v(gv.EraNegotiationFailed,`connect({ prior }) with a modern verdict requires a 2026-07-28+ mutual protocol version; the supplied DiscoverResult and this client's supportedProtocolVersions have no modern overlap. For a server known to be legacy, pass prior: { kind: 'legacy' } to skip the probe and initialize directly, or use versionNegotiation: { mode: 'auto' } to re-probe with legacy fallback.`);if(await super.connect(e),this._discoverResult=r,this._serverCapabilities=r.capabilities,this._serverVersion=$S(r),this._cache.setServerIdentity(this._deriveServerIdentity(e)),this._instructions=r.instructions,this._negotiatedProtocolVersion=a,e.setProtocolVersion?.(a),this._listChangedConfig)try{this._setupListChangedHandlers(this._listChangedConfig)}catch(e){this.onerror?.(e instanceof Error?e:Error(String(e)))}}getServerCapabilities(){return this._serverCapabilities}getServerVersion(){return this._serverVersion}_deriveServerIdentity(e){let t=this._serverVersion;return t===void 0?e.sessionId??`anonymous:${Date.now()}-${Math.random().toString(36).slice(2)}`:`${t.name}@${t.version}`}getNegotiatedProtocolVersion(){return this._negotiatedProtocolVersion}getProtocolEra(){let e=this._negotiatedProtocolVersion;if(e!==void 0)return xv(e)?`modern`:`legacy`}getInstructions(){return this._instructions}getDiscoverResult(){return this._discoverResult}assertCapabilityForMethod(e){switch(e){case`logging/setLevel`:if(!this._serverCapabilities?.logging)throw new _v(gv.CapabilityNotSupported,`Server does not support logging (required for ${e})`);break;case`prompts/get`:case`prompts/list`:if(!this._serverCapabilities?.prompts)throw new _v(gv.CapabilityNotSupported,`Server does not support prompts (required for ${e})`);break;case`resources/list`:case`resources/templates/list`:case`resources/read`:case`resources/subscribe`:case`resources/unsubscribe`:if(!this._serverCapabilities?.resources)throw new _v(gv.CapabilityNotSupported,`Server does not support resources (required for ${e})`);if(e===`resources/subscribe`&&!this._serverCapabilities.resources.subscribe)throw new _v(gv.CapabilityNotSupported,`Server does not support resource subscriptions (required for ${e})`);break;case`tools/call`:case`tools/list`:if(!this._serverCapabilities?.tools)throw new _v(gv.CapabilityNotSupported,`Server does not support tools (required for ${e})`);break;case`completion/complete`:if(!this._serverCapabilities?.completions)throw new _v(gv.CapabilityNotSupported,`Server does not support completions (required for ${e})`);break;case`initialize`:break;case`server/discover`:break;case`ping`:break}}assertNotificationCapability(e){switch(e){case`notifications/roots/list_changed`:if(!this._capabilities.roots?.listChanged)throw new _v(gv.CapabilityNotSupported,`Client does not support roots list changed notifications (required for ${e})`);break;case`notifications/initialized`:break;case`notifications/cancelled`:break;case`notifications/progress`:break}}assertRequestHandlerCapability(e){switch(e){case`sampling/createMessage`:if(!this._capabilities.sampling)throw new _v(gv.CapabilityNotSupported,`Client does not support sampling capability (required for ${e})`);break;case`elicitation/create`:if(!this._capabilities.elicitation)throw new _v(gv.CapabilityNotSupported,`Client does not support elicitation capability (required for ${e})`);break;case`roots/list`:if(!this._capabilities.roots)throw new _v(gv.CapabilityNotSupported,`Client does not support roots capability (required for ${e})`);break;case`ping`:break}}async ping(e){return this.request({method:`ping`},e)}async discover(e){let t=await this._requestWithSchema({method:`server/discover`},jh,e);return this._discoverResult=t,t}async complete(e,t){return this.request({method:`completion/complete`,params:e},t)}async setLoggingLevel(e,t){return this.request({method:`logging/setLevel`,params:{level:e}},t)}async getPrompt(e,t){return this.request({method:`prompts/get`,params:e},t)}async listPrompts(e,t){if(!this._serverCapabilities?.prompts&&!this._enforceStrictCapabilities)return console.debug(`Client.listPrompts() called but server does not advertise prompts capability - returning empty list`),{prompts:[]};if(e?.cursor!==void 0)return this.request({method:`prompts/list`,params:e},t);let n=await this._serveFromCache(`prompts/list`,void 0,t);return n===void 0?this._listAllPages(`prompts/list`,e,t,(e,t)=>e.prompts.push(...t.prompts)):n}async listResources(e,t){if(!this._serverCapabilities?.resources&&!this._enforceStrictCapabilities)return console.debug(`Client.listResources() called but server does not advertise resources capability - returning empty list`),{resources:[]};if(e?.cursor!==void 0)return this.request({method:`resources/list`,params:e},t);let n=await this._serveFromCache(`resources/list`,void 0,t);return n===void 0?this._listAllPages(`resources/list`,e,t,(e,t)=>e.resources.push(...t.resources)):n}async listResourceTemplates(e,t){if(!this._serverCapabilities?.resources&&!this._enforceStrictCapabilities)return console.debug(`Client.listResourceTemplates() called but server does not advertise resources capability - returning empty list`),{resourceTemplates:[]};if(e?.cursor!==void 0)return this.request({method:`resources/templates/list`,params:e},t);let n=await this._serveFromCache(`resources/templates/list`,void 0,t);return n===void 0?this._listAllPages(`resources/templates/list`,e,t,(e,t)=>e.resourceTemplates.push(...t.resourceTemplates)):n}async _listAllPages(e,t,n,r,i){let a=n?.cacheMode===`bypass`,o=this._cache.captureGeneration(e),s=await this.request({method:e,...t&&{params:{...t}}},n),c=s.nextCursor,l=new Set,u=1;for(;c!==void 0&&!l.has(c);){if(this._listMaxPages!==0&&u>=this._listMaxPages)throw new _v(gv.ListPaginationExceeded,`${e}: exceeded listMaxPages (${this._listMaxPages}); server pagination did not terminate`,{method:e,listMaxPages:this._listMaxPages});l.add(c);let i=await this.request({method:e,params:{...t,cursor:c}},n);r(s,i),c=i.nextCursor,u++}return delete s.nextCursor,i?.(s),a||await this._cache.write(e,s,o,this._freshness(s)),s}_freshness(e,t){let n=e,r=typeof n.ttlMs==`number`?n.ttlMs:this._defaultCacheTtlMs,i=n.cacheScope===`public`?`public`:`private`;return{expiresAt:this._cache.now()+Math.min(Math.max(0,r),xS),scope:i,params:t}}async _serveFromCache(e,t,n){if(n?.cacheMode===`bypass`||n?.cacheMode===`refresh`)return;let r=await this._cache.read(e,t).catch(e=>void this._reportStoreError(e));if(r!==void 0){if(n?.signal?.aborted){let e=n.signal.reason;throw e instanceof _v?e:new _v(gv.RequestTimeout,String(e))}return r.value}}_reportStoreError(e){this.onerror?.(e instanceof Error?e:Error(String(e)))}_compileOutputValidator(e){if(e.outputSchema)try{return{ok:!0,validator:this._jsonSchemaValidator.getValidator(e.outputSchema)}}catch(e){return{ok:!1,compileError:e}}}async _resolveXMcpHeaderScan(e,t){let n=t??await this._cache.toolDefinition(e);return n===void 0?void 0:Zy(n.inputSchema)}async readResource(e,t){let n=await this._serveFromCache(`resources/read`,e.uri,t);if(n!==void 0)return n;let r=this._cache.captureGeneration(`resources/read`,e.uri),i=await this.request({method:`resources/read`,params:e},t);if(t?.cacheMode!==`bypass`){let n=this._freshness(i,e.uri);n.expiresAt>this._cache.now()?await this._cache.write(`resources/read`,i,r,n):t?.cacheMode===`refresh`&&await this._cache.evictKey(`resources/read`,e.uri)}return i}async subscribeResource(e,t){return this.request({method:`resources/subscribe`,params:e},t)}async unsubscribeResource(e,t){return this.request({method:`resources/unsubscribe`,params:e},t)}async listen(e,t){if(this.transport===void 0)throw new _v(gv.NotConnected,`Not connected`);let n=this._negotiatedProtocolVersion;if(n===void 0||!xv(n))throw new _v(gv.MethodNotSupportedByProtocolVersion,`subscriptions/listen requires a 2026-07-28-era connection (negotiated: ${n??`none`}). On a 2025-era connection, change notifications are delivered unsolicited: use ClientOptions.listChanged and resources/subscribe instead.`,{method:`subscriptions/listen`,protocolVersion:n});if(t?.signal?.aborted){let e=t.signal.reason;throw e instanceof _v?e:new _v(gv.RequestTimeout,String(e))}let r=new AbortController,i=`listen:${this._nextListenId++}`,a=`opening`,o,s,c,l,u=new Promise((e,t)=>{c=e,l=t}),d,f=new Promise(e=>{d=e}),p=e=>{if(a===`closed`)return;let n=a===`opening`;if(o!==void 0&&(clearTimeout(o),o=void 0),`ack`in e){a=`open`,c(e.ack);return}a=`closed`,s!==void 0&&t?.signal?.removeEventListener(`abort`,s),this._listenState.delete(i),r.abort(),d(e.cause),n&&l(e.error??new _v(gv.ConnectionClosed,`subscriptions/listen closed before the server acknowledged`))},m=async()=>{r.abort(),await this.notification({method:`notifications/cancelled`,params:{requestId:i}}).catch(()=>{})},h=async()=>{a!==`closed`&&(p({cause:`local`}),await m())};this._listenState.set(i,{settle:p});let g=t?.timeout??6e4;if(o=setTimeout(()=>{p({cause:`remote`,error:new _v(gv.RequestTimeout,`subscriptions/listen ack timed out`,{timeout:g})}),m().catch(()=>{})},g),t?.signal){let e=t.signal;s=()=>{if(a===`closed`)return;let t=e.reason;p({cause:`local`,error:t instanceof Error?t:Error(String(t??`Aborted`))}),m().catch(()=>{})},e.addEventListener(`abort`,s,{once:!0})}let _={jsonrpc:`2.0`,id:i,method:`subscriptions/listen`,params:{_meta:{...this._outboundMetaEnvelope()},notifications:e}};try{await this.transport.send(_,{requestSignal:r.signal,onRequestStreamEnd:()=>p({cause:`remote`,error:Error(`subscriptions/listen: stream ended`)})})}catch(e){p({cause:`remote`,error:e instanceof Error?e:Error(String(e))})}return{honoredFilter:await u,close:h,closed:f}}get autoOpenedSubscription(){return this._autoOpenedSubscription}_onnotification(e,t){let n=Object.hasOwn(rC,e.method)?rC[e.method]:void 0;if(e.method===`notifications/resources/updated`){let t=e.params?.uri;typeof t==`string`&&this._cache.evictKey(`resources/read`,t)}else if(n!==void 0)for(let e of n)this._cache.evict(e);if(e.method===`notifications/subscriptions/acknowledged`){let t=e.params?._meta?.[Gm],n=typeof t==`string`?this._listenState.get(t):void 0;if(n!==void 0){let t=this._wireCodec().validateNotification(`notifications/subscriptions/acknowledged`,e);n.settle({ack:t.ok?t.value.params.notifications:{}});return}}if(e.method===`notifications/cancelled`){let t=e.params?.requestId,n=typeof t==`string`?this._listenState.get(t):void 0;if(n!==void 0){n.settle({cause:`remote`,error:Error(`subscriptions/listen: server cancelled the subscription`)});return}}super._onnotification(e,t)}_onresponse(e){let t=e.id,n=typeof t==`string`?this._listenState.get(t):void 0;if(n!==void 0){Jy(e)?n.settle({cause:`remote`,error:ty.fromError(e.error.code,e.error.message,e.error.data)}):n.settle({cause:`graceful`,error:new _v(gv.ConnectionClosed,`subscriptions/listen: server closed the subscription gracefully before acknowledging`)});return}super._onresponse(e)}_onclose(){if(this._listenState.size>0){let e=new _v(gv.ConnectionClosed,`Connection closed`);for(let t of this._listenState.values())t.settle({cause:`remote`,error:e});this._listenState.clear()}super._onclose()}async callTool(e,t){let n=this.getProtocolEra()===`modern`&&VS()!==`browser`,r=async()=>{if(!n)return t;let r;try{r=await this._resolveXMcpHeaderScan(e.name,t?.toolDefinition)}catch(e){this._reportStoreError(e)}if(!r?.valid||r.declarations.length===0)return t;let i=zee(r.declarations,e.arguments);return Object.keys(i).length===0?t:{...t,headers:{...t?.headers,...i}}},i=t?.toolDefinition===void 0?await this._cache.outputValidator(e.name,e=>this._compileOutputValidator(e)).catch(e=>void this._reportStoreError(e)):this._compileOutputValidator(t.toolDefinition),a=()=>{if(i===void 0||i.ok)return;let t=i.compileError,n=(t instanceof Error?t.message:String(t)).slice(0,200);throw new ty(ey.InvalidParams,`Tool '${e.name}' has an invalid outputSchema: ${n}`)};a();let o;try{o=await this.request({method:`tools/call`,params:e},await r())}catch(s){let c=s instanceof ty&&s.code===-32020;if(!n||!c||t?.toolDefinition!==void 0)throw s;let l={signal:t?.signal,timeout:t?.timeout,cacheMode:`refresh`};await this._cache.evict(`tools/list`),await this.listTools(void 0,l).catch(e=>this._reportStoreError(e)),i=await this._cache.outputValidator(e.name,e=>this._compileOutputValidator(e)).catch(e=>void this._reportStoreError(e)),a(),o=await this.request({method:`tools/call`,params:e},await r())}let s=i!==void 0&&i.ok?i.validator:void 0;if(s){if(o.structuredContent===void 0&&!o.isError)throw new ty(ey.InvalidRequest,`Tool ${e.name} has an output schema but did not return structured content`);if(o.structuredContent!==void 0&&!o.isError)try{let e=s(o.structuredContent);if(!e.valid)throw new ty(ey.InvalidParams,`Structured content does not match the tool's output schema: ${e.errorMessage}`)}catch(e){throw e instanceof ty?e:new ty(ey.InvalidParams,`Failed to validate structured content: ${e instanceof Error?e.message:String(e)}`)}}return o}async listTools(e,t){if(!this._serverCapabilities?.tools&&!this._enforceStrictCapabilities)return console.debug(`Client.listTools() called but server does not advertise tools capability - returning empty list`),{tools:[]};if(e?.cursor!==void 0){let n=await this.request({method:`tools/list`,params:e},t);return this._excludeInvalidXMcpHeaderTools(n),n}let n=await this._serveFromCache(`tools/list`,void 0,t);return n===void 0?this._listAllPages(`tools/list`,e,t,(e,t)=>e.tools.push(...t.tools),e=>this._excludeInvalidXMcpHeaderTools(e)):n}_excludeInvalidXMcpHeaderTools(e){if(this.getProtocolEra()!==`modern`||!this.transport||HS(this.transport)===`stdio`)return;let t=e.tools.filter(e=>{let t=Zy(e.inputSchema);return t.valid?!0:(console.warn(`[mcp-sdk] excluding tool '${e.name}' from tools/list: invalid x-mcp-header declaration — ${t.reason}`),!1)});t.length!==e.tools.length&&(e.tools=t)}_setupListChangedHandler(e,t,n,r){let i=nb(Bg,n);if(!i.success)throw Error(`Invalid ${e} listChanged options: ${i.error.message}`);if(typeof n.onChanged!=`function`)throw TypeError(`Invalid ${e} listChanged options: onChanged must be a function`);let{autoRefresh:a,debounceMs:o}=i.data,{onChanged:s}=n,c=async()=>{if(!a){s(null,null);return}try{s(null,await r())}catch(e){s(e instanceof Error?e:Error(String(e)),null)}};this.setNotificationHandler(t,()=>{if(o){let t=this._listChangedDebounceTimers.get(e);t&&clearTimeout(t);let n=setTimeout(c,o);this._listChangedDebounceTimers.set(e,n)}else c()})}async sendRootsListChanged(){return this.notification({method:`notifications/roots/list_changed`})}};(class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.SseError`})}static[Symbol.hasInstance](e){return pv(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return pv(this,e)}constructor(e,t,n){super(`SSE error: ${t}`),this.code=e,this.event=n,fv(this,new.target)}});var oC=1,sC={initialReconnectionDelay:1e3,maxReconnectionDelay:3e4,reconnectionDelayGrowFactor:1.5,maxRetries:2},cC=new Set([`authorization`,`content-type`,`mcp-protocol-version`,`mcp-method`,`mcp-name`,`mcp-session-id`]);function lC(e,t){if(typeof AbortSignal.any==`function`)return AbortSignal.any([e,t]);let n=new AbortController;if(e.aborted)return n.abort(e.reason),n.signal;if(t.aborted)return n.abort(t.reason),n.signal;let r=()=>{e.removeEventListener(`abort`,i),t.removeEventListener(`abort`,a)};function i(){r(),n.abort(e.reason)}function a(){r(),n.abort(t.reason)}return e.addEventListener(`abort`,i,{once:!0}),t.addEventListener(`abort`,a,{once:!0}),n.signal}var uC=class{_abortController;_url;_resourceMetadataUrl;_scope;_requestInit;_authProvider;_oauthProvider;_skipIssuerMetadataValidation;_fetch;_fetchWithInit;_sessionId;_reconnectionOptions;_protocolVersion;_onInsufficientScope;_maxStepUpRetries;_serverRetryMs;_reconnectionScheduler;_cancelReconnection;onclose;onerror;onmessage;hasPerRequestStream=!0;constructor(e,t){this._url=e,this._resourceMetadataUrl=void 0,this._scope=void 0,this._requestInit=t?.requestInit,this._skipIssuerMetadataValidation=t?.skipIssuerMetadataValidation,Dx(t?.authProvider)?(this._oauthProvider=t.authProvider,this._authProvider=kx(t.authProvider,{skipIssuerMetadataValidation:t.skipIssuerMetadataValidation})):this._authProvider=t?.authProvider,this._fetch=t?.fetch,this._fetchWithInit=Ote(t?.fetch,t?.requestInit),this._sessionId=t?.sessionId,this._protocolVersion=t?.protocolVersion,this._reconnectionOptions=t?.reconnectionOptions??sC,this._reconnectionScheduler=t?.reconnectionScheduler,this._onInsufficientScope=t?.onInsufficientScope??`reauthorize`,this._maxStepUpRetries=Math.max(0,t?.maxStepUpRetries??oC)}async _stepUpAuthorize(e,t){try{return await this._stepUpAuthorizeInner(e,t)}catch(e){throw TS(e)}}async _stepUpAuthorizeInner(e,t){if(this._onInsufficientScope===`throw`||!this._oauthProvider)throw new wx({requiredScope:e.scope,resourceMetadataUrl:e.resourceMetadataUrl,errorDescription:e.errorDescription});if(t>=this._maxStepUpRetries)throw new vv(gv.ClientHttpForbidden,`Server returned 403 insufficient_scope after step-up re-authorization (retry limit ${this._maxStepUpRetries} reached)`,{status:403,statusText:e.statusText??`Forbidden`,text:e.text});e.resourceMetadataUrl&&(this._resourceMetadataUrl=e.resourceMetadataUrl);let n=await this._oauthProvider.tokens(),r=Nx(this._scope,n?.scope,e.scope);this._scope=r;let i=Px(r,n?.scope);return Yx(this._oauthProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:r,forceReauthorization:i,fetchFn:this._fetchWithInit,skipIssuerMetadataValidation:this._skipIssuerMetadataValidation})}async _commonHeaders(){let e={},t;try{t=await this._authProvider?.token()}catch(e){throw TS(e)}t&&(e.Authorization=`Bearer ${t}`),this._sessionId&&(e[`mcp-session-id`]=this._sessionId),this._protocolVersion&&(e[`mcp-protocol-version`]=this._protocolVersion);let n=Sb(this._requestInit?.headers);return new Headers({...e,...n})}_applyBodyDerivedHeaders(e,t){if(Array.isArray(t)||!Gy(t))return;let n=t.params?._meta?.[Vm];if(typeof n!=`string`)return;e.set(`mcp-protocol-version`,n),e.set(`mcp-method`,t.method);let r=t.params,i=t.method===`resources/read`?typeof r?.uri==`string`?r.uri:void 0:typeof r?.name==`string`?r.name:void 0;i!==void 0&&e.set(`mcp-name`,tb(i))}_isModernEnvelopedRequest(e){if(Array.isArray(e)||!Gy(e))return!1;let t=e.params?._meta?.[Vm];return typeof t==`string`&&xv(t)}async _startOrAuthSse(e,t=!1,n=0){let{resumptionToken:r,requestSignal:i}=e,a=()=>this._abortController?.signal.aborted===!0||i?.aborted===!0;try{let a=await this._commonHeaders(),o=[...a.get(`accept`)?.split(`,`).map(e=>e.trim().toLowerCase())??[],`text/event-stream`];a.set(`accept`,[...new Set(o)].join(`, `)),r&&a.set(`last-event-id`,r);let s=this._abortController?.signal,c=i!==void 0&&s!==void 0?lC(s,i):i??s,l=await(this._fetch??fetch)(this._url,{...this._requestInit,method:`GET`,headers:a,signal:c});if(!l.ok){if(l.status===401&&this._authProvider){if(l.headers.has(`www-authenticate`)){let{resourceMetadataUrl:e,scope:t}=eS(l);this._resourceMetadataUrl=e,this._scope=Nx(this._scope,t)}if(this._authProvider.onUnauthorized&&!t){try{await this._authProvider.onUnauthorized({response:l,serverUrl:this._url,fetchFn:this._fetchWithInit})}catch(e){throw TS(e)}return await l.text?.().catch(()=>{}),this._startOrAuthSse(e,!0,n)}throw await l.text?.().catch(()=>{}),TS(t?new vv(gv.ClientHttpAuthentication,`Server returned 401 after re-authentication`,{status:401,statusText:l.statusText}):new Ax)}if(l.status===403){let{resourceMetadataUrl:r,scope:i,error:a,errorDescription:o}=eS(l);if(a===`insufficient_scope`){let a=await l.text?.().catch(()=>null);if(await this._stepUpAuthorize({scope:i,resourceMetadataUrl:r,errorDescription:o,statusText:l.statusText,text:a},n)!==`AUTHORIZED`)throw TS(new Ax);return this._startOrAuthSse(e,t,n+1)}}if(await l.text?.().catch(()=>{}),l.status===405){e.onRequestStreamEnd?.();return}throw new vv(gv.ClientHttpFailedToOpenStream,`Failed to open SSE stream: ${l.statusText}`,{status:l.status,statusText:l.statusText})}this._handleSseStream(l.body,e,!0)}catch(e){throw a()||this.onerror?.(e),e}}_getNextReconnectionDelay(e){if(this._serverRetryMs!==void 0)return this._serverRetryMs;let t=this._reconnectionOptions.initialReconnectionDelay,n=this._reconnectionOptions.reconnectionDelayGrowFactor,r=this._reconnectionOptions.maxReconnectionDelay;return Math.min(t*n**+e,r)}_scheduleReconnection(e,t=0){let n=this._reconnectionOptions.maxRetries;if(t>=n){this.onerror?.(Error(`Maximum reconnection attempts (${n}) exceeded.`)),e.onRequestStreamEnd?.();return}let r=this._getNextReconnectionDelay(t),i=()=>{this._cancelReconnection=void 0,!(this._abortController?.signal.aborted||e.requestSignal?.aborted)&&this._startOrAuthSse(e).catch(n=>{if(!(this._abortController?.signal.aborted||e.requestSignal?.aborted)){this.onerror?.(Error(`Failed to reconnect SSE stream: ${n instanceof Error?n.message:String(n)}`));try{this._scheduleReconnection(e,t+1)}catch(e){this.onerror?.(e instanceof Error?e:Error(String(e)))}}})};if(this._reconnectionScheduler){let e=this._reconnectionScheduler(i,r,t);this._cancelReconnection=typeof e==`function`?e:void 0}else{let e=setTimeout(i,r);this._cancelReconnection=()=>clearTimeout(e)}}_handleSseStream(e,t,n){if(!e){t.onRequestStreamEnd?.();return}let{onresumptiontoken:r,replayMessageId:i,requestSignal:a,onRequestStreamEnd:o}=t,s=()=>this._abortController?.signal.aborted===!0||a?.aborted===!0,c,l=!1,u=!1;(async()=>{try{let t=e.pipeThrough(new TextDecoderStream).pipeThrough(new vx({onRetry:e=>{this._serverRetryMs=e}})).getReader();for(;;){let{value:e,done:n}=await t.read();if(n)break;if(e.id&&(c=e.id,l=!0,r?.(e.id)),e.data&&(!e.event||e.event===`message`))try{let t=ph.parse(JSON.parse(e.data));(qy(t)||Jy(t))&&(u=!0,i!==void 0&&(t.id=i)),this.onmessage?.(t)}catch(e){this.onerror?.(e)}}(n||l)&&!u&&this._abortController&&!s()?this._scheduleReconnection({resumptionToken:c,onresumptiontoken:r,replayMessageId:i,requestSignal:a,onRequestStreamEnd:o},0):s()||o?.()}catch(e){if(s())return;if(this.onerror?.(Error(`SSE stream disconnected: ${e}`)),(n||l)&&!u&&this._abortController&&!s())try{this._scheduleReconnection({resumptionToken:c,onresumptiontoken:r,replayMessageId:i,requestSignal:a,onRequestStreamEnd:o},0)}catch(e){this.onerror?.(Error(`Failed to reconnect: ${e instanceof Error?e.message:String(e)}`)),o?.()}else o?.()}})()}async start(){if(this._abortController)throw Error(`StreamableHTTPClientTransport already started! If using Client class, note that connect() calls start() automatically.`);this._abortController=new AbortController}async finishAuth(e,t){if(!this._oauthProvider)throw new Ax(`finishAuth requires an OAuthClientProvider`);let{authorizationCode:n,iss:r}=await Fx(e,t,this._oauthProvider,this._url,{fetchFn:this._fetchWithInit,resourceMetadataUrl:this._resourceMetadataUrl});if(await Yx(this._oauthProvider,{serverUrl:this._url,authorizationCode:n,iss:r,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit,skipIssuerMetadataValidation:this._skipIssuerMetadataValidation})!==`AUTHORIZED`)throw new Ax(`Failed to authorize`)}async close(){try{this._cancelReconnection?.()}finally{this._cancelReconnection=void 0,this._abortController?.abort(),this.onclose?.()}}async send(e,t){return this._send(e,t,!1)}async _send(e,t,n,r=0){try{let{resumptionToken:i,onresumptiontoken:a}=t||{};if(i){this._startOrAuthSse({resumptionToken:i,replayMessageId:Gy(e)?e.id:void 0,requestSignal:t?.requestSignal}).catch(e=>this.onerror?.(e));return}let o=await this._commonHeaders();this._applyBodyDerivedHeaders(o,e);let s=Array.isArray(e)?e.some(e=>Yy(e)):Yy(e);if(s&&o.delete(`mcp-session-id`),t?.headers!==void 0)for(let[e,n]of Object.entries(t.headers))cC.has(e.toLowerCase())||o.set(e,n);o.set(`content-type`,`application/json`);let c=[...o.get(`accept`)?.split(`,`).map(e=>e.trim().toLowerCase())??[],`application/json`,`text/event-stream`];o.set(`accept`,[...new Set(c)].join(`, `));let l=this._abortController?.signal,u=t?.requestSignal!==void 0&&l!==void 0?lC(l,t.requestSignal):t?.requestSignal??l,d={...this._requestInit,method:`POST`,headers:o,body:JSON.stringify(e),signal:u},f=await(this._fetch??fetch)(this._url,d);if(s&&f.ok&&(this._sessionId=f.headers.get(`mcp-session-id`)||void 0),!f.ok){if(f.status===401&&this._authProvider){if(f.headers.has(`www-authenticate`)){let{resourceMetadataUrl:e,scope:t}=eS(f);this._resourceMetadataUrl=e,this._scope=Nx(this._scope,t)}if(this._authProvider.onUnauthorized&&!n){try{await this._authProvider.onUnauthorized({response:f,serverUrl:this._url,fetchFn:this._fetchWithInit})}catch(e){throw TS(e)}return await f.text?.().catch(()=>{}),this._send(e,t,!0,r)}throw await f.text?.().catch(()=>{}),TS(n?new vv(gv.ClientHttpAuthentication,`Server returned 401 after re-authentication`,{status:401,statusText:f.statusText}):new Ax)}let i=await f.text?.().catch(()=>null);if(f.status===403){let{resourceMetadataUrl:a,scope:o,error:s,errorDescription:c}=eS(f);if(s===`insufficient_scope`){if(await this._stepUpAuthorize({scope:o,resourceMetadataUrl:a,errorDescription:c,statusText:f.statusText,text:i},r)!==`AUTHORIZED`)throw TS(new Ax);return this._send(e,t,n,r+1)}}if(f.status===400&&typeof i==`string`&&this._isModernEnvelopedRequest(e))try{let t=ph.parse(JSON.parse(i)),n=(Array.isArray(e)?e:[e]).filter(e=>Gy(e));if(Jy(t)&&n.some(e=>e.id===t.id)){this.onmessage?.(t);return}}catch{}throw new vv(gv.ClientHttpNotImplemented,`Error POSTing to endpoint: ${i}`,{status:f.status,statusText:f.statusText,text:i})}if(f.status===202){await f.text?.().catch(()=>{}),kee(e)&&this._startOrAuthSse({resumptionToken:void 0}).catch(e=>this.onerror?.(e));return}let p=(Array.isArray(e)?e:[e]).some(e=>`method`in e&&`id`in e&&e.id!==void 0),m=f.headers.get(`content-type`),h=Dte(m);if(p)if(h===`text/event-stream`)this._handleSseStream(f.body,{onresumptiontoken:a,requestSignal:t?.requestSignal,onRequestStreamEnd:t?.onRequestStreamEnd},!1);else if(h===`application/json`){let e=await f.json(),t=Array.isArray(e)?e.map(e=>ph.parse(e)):[ph.parse(e)];for(let e of t)this.onmessage?.(e)}else throw await f.text?.().catch(()=>{}),new _v(gv.ClientHttpUnexpectedContent,`Unexpected content type: ${m}`,{contentType:m});else await f.text?.().catch(()=>{})}catch(e){throw t?.requestSignal?.aborted!==!0&&this.onerror?.(e),e}}get sessionId(){return this._sessionId}async terminateSession(){if(this._sessionId)try{let e=await this._commonHeaders(),t={...this._requestInit,method:`DELETE`,headers:e,signal:this._abortController?.signal},n=await(this._fetch??fetch)(this._url,t);if(await n.text?.().catch(()=>{}),!n.ok&&n.status!==405)throw new vv(gv.ClientHttpFailedToTerminateSession,`Failed to terminate session: ${n.statusText}`,{status:n.status,statusText:n.statusText});this._sessionId=void 0}catch(e){throw this.onerror?.(e),e}}setProtocolVersion(e){this._protocolVersion=e}get protocolVersion(){return this._protocolVersion}async resumeStream(e,t){await this._startOrAuthSse({resumptionToken:e,onresumptiontoken:t?.onresumptiontoken})}},dC=5e3,fC=2e4;function pC(e){try{let t=JSON.stringify(e);return t?Math.ceil(new TextEncoder().encode(t).length/4):0}catch{return 0}}function mC(e){let{meta:t,...n}=e;return pC(n)}function hC(e){return pC(e?.modelContent)}function gC(e,t){let n=mC(e);n>=5e3&&console.warn(`[skybridge] Tool "${t}" returned ${n} estimated model-visible tokens; this reaches the ${dC}-token warning threshold and may overload model context. Content and structured content are included in this estimate.`)}function _C(e,t){let n=pC(e);n>=2e4&&console.warn(`[skybridge] ${t} is persisting ${n} estimated tokens in model-visible view state; this reaches the ${fC}-token warning threshold and may overload model context. Persisted view state and data-llm context are included in this estimate.`)}function vC(e,t){if(e instanceof Promise)throw Error(t)}function yC(e,t){let n={},r=[];for(let i in e){let a=e[i][`~standard`].validate(t[i]);if(vC(a,`Validation must be synchronous, but ${i} returned a Promise.`),a.issues){r.push(...a.issues.map(e=>({...e,message:e.message,path:[i,...e.path??[]]})));continue}n[i]=a.value}return r.length?{issues:r}:{value:n}}function bC(e){let t=e.runtimeEnvStrict??e.runtimeEnv??{};if(e.emptyStringAsUndefined??!1)for(let[e,n]of Object.entries(t))n===``&&delete t[e];if(e.skipValidation){if(e.extends)for(let t of e.extends)t.skipValidation=!0;return t}let n=typeof e.client==`object`?e.client:{},r=typeof e.server==`object`?e.server:{},i=typeof e.shared==`object`?e.shared:{},a=e.isServer??(typeof window>`u`||`Deno`in window),o=a?{...r,...i,...n}:{...n,...i},s=(e.createFinalSchema?.(o,a))?.[`~standard`].validate(t)??yC(o,t);vC(s,`Validation must be synchronous`);let c=e.onValidationError??(e=>{throw console.error(`❌ Invalid environment variables:`,e),Error(`Invalid environment variables`)}),l=e.onInvalidAccess??(()=>{throw Error(`❌ Attempted to access a server-side environment variable on the client`)});if(s.issues)return c(s.issues);let u=t=>!e.clientPrefix||!t.startsWith(e.clientPrefix)&&!(t in i),d=e=>a||!u(e),f=e=>e==="__esModule"||e===`$$typeof`,p=(e.extends??[]).reduce((e,t)=>Object.assign(e,t),{}),m=Object.assign(p,s.value);return new Proxy(m,{get(e,t){if(typeof t==`string`&&!f(t))return d(t)?Reflect.get(e,t):l(t)}})}var xC=bC({clientPrefix:`VITE_`,client:{VITE_MCP_SERVER_URL:G().default(`${window.location.origin}/mcp`)},runtimeEnv:{BASE_URL:`/`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1},emptyStringAsUndefined:!0}),SC=u(_(),1),CC=typeof global==`object`&&global&&global.Object===Object&&global,wC=typeof self==`object`&&self&&self.Object===Object&&self,TC=CC||wC||Function(`return this`)(),EC=TC.Symbol,DC=Object.prototype,OC=DC.hasOwnProperty,kC=DC.toString,AC=EC?EC.toStringTag:void 0;function jC(e){var t=OC.call(e,AC),n=e[AC];try{e[AC]=void 0;var r=!0}catch{}var i=kC.call(e);return r&&(t?e[AC]=n:delete e[AC]),i}var MC=Object.prototype.toString;function NC(e){return MC.call(e)}var PC=`[object Null]`,FC=`[object Undefined]`,IC=EC?EC.toStringTag:void 0;function LC(e){return e==null?e===void 0?FC:PC:IC&&IC in Object(e)?jC(e):NC(e)}function RC(e){return typeof e==`object`&&!!e}var zC=`[object Symbol]`;function BC(e){return typeof e==`symbol`||RC(e)&&LC(e)==zC}function VC(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var HC=Array.isArray,UC=1/0,WC=EC?EC.prototype:void 0,GC=WC?WC.toString:void 0;function KC(e){if(typeof e==`string`)return e;if(HC(e))return VC(e,KC)+``;if(BC(e))return GC?GC.call(e):``;var t=e+``;return t==`0`&&1/e==-UC?`-0`:t}var qC=/\s/;function JC(e){for(var t=e.length;t--&&qC.test(e.charAt(t)););return t}var YC=/^\s+/;function XC(e){return e&&e.slice(0,JC(e)+1).replace(YC,``)}function ZC(e){var t=typeof e;return e!=null&&(t==`object`||t==`function`)}var QC=NaN,$C=/^[-+]0x[0-9a-f]+$/i,ew=/^0b[01]+$/i,tw=/^0o[0-7]+$/i,nw=parseInt;function kte(e){if(typeof e==`number`)return e;if(BC(e))return QC;if(ZC(e)){var t=typeof e.valueOf==`function`?e.valueOf():e;e=ZC(t)?t+``:t}if(typeof e!=`string`)return e===0?e:+e;e=XC(e);var n=ew.test(e);return n||tw.test(e)?nw(e.slice(2),n?2:8):$C.test(e)?QC:+e}var rw=1/0,Ate=17976931348623157e292;function jte(e){return e?(e=kte(e),e===rw||e===-rw?(e<0?-1:1)*Ate:e===e?e:0):e===0?e:0}function iw(e){var t=jte(e),n=t%1;return t===t?n?t-n:t:0}function aw(e){return e}var Mte=`[object AsyncFunction]`,Nte=`[object Function]`,Pte=`[object GeneratorFunction]`,Fte=`[object Proxy]`;function ow(e){if(!ZC(e))return!1;var t=LC(e);return t==Nte||t==Pte||t==Mte||t==Fte}var sw=TC[`__core-js_shared__`],cw=function(){var e=/[^.]+$/.exec(sw&&sw.keys&&sw.keys.IE_PROTO||``);return e?`Symbol(src)_1.`+e:``}();function Ite(e){return!!cw&&cw in e}var Lte=Function.prototype.toString;function lw(e){if(e!=null){try{return Lte.call(e)}catch{}try{return e+``}catch{}}return``}var Rte=/[\\^$.*+?()[\]{}|]/g,zte=/^\[object .+?Constructor\]$/,Bte=Function.prototype,Vte=Object.prototype,Hte=Bte.toString,Ute=Vte.hasOwnProperty,Wte=RegExp(`^`+Hte.call(Ute).replace(Rte,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`);function Gte(e){return!ZC(e)||Ite(e)?!1:(ow(e)?Wte:zte).test(lw(e))}function Kte(e,t){return e?.[t]}function uw(e,t){var n=Kte(e,t);return Gte(n)?n:void 0}var dw=uw(TC,`WeakMap`),fw=Object.create,pw=function(){function e(){}return function(t){if(!ZC(t))return{};if(fw)return fw(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function qte(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function mw(){}function hw(e,t){var n=-1,r=e.length;for(t||=Array(r);++n<r;)t[n]=e[n];return t}var Jte=800,Yte=16,Xte=Date.now;function Zte(e){var t=0,n=0;return function(){var r=Xte(),i=Yte-(r-n);if(n=r,i>0){if(++t>=Jte)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function Qte(e){return function(){return e}}var gw=function(){try{var e=uw(Object,`defineProperty`);return e({},``,{}),e}catch{}}(),_w=Zte(gw?function(e,t){return gw(e,`toString`,{configurable:!0,enumerable:!1,value:Qte(t),writable:!0})}:aw);function vw(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}function $te(e,t,n,r){for(var i=e.length,a=n+(r?1:-1);r?a--:++a<i;)if(t(e[a],a,e))return a;return-1}function ene(e){return e!==e}function tne(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}function yw(e,t,n){return t===t?tne(e,t,n):$te(e,ene,n)}function bw(e,t){return!!(e!=null&&e.length)&&yw(e,t,0)>-1}var nne=9007199254740991,rne=/^(?:0|[1-9]\d*)$/;function xw(e,t){var n=typeof e;return t??=nne,!!t&&(n==`number`||n!=`symbol`&&rne.test(e))&&e>-1&&e%1==0&&e<t}function Sw(e,t,n){t==`__proto__`&&gw?gw(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Cw(e,t){return e===t||e!==e&&t!==t}var ine=Object.prototype.hasOwnProperty;function ww(e,t,n){var r=e[t];(!(ine.call(e,t)&&Cw(r,n))||n===void 0&&!(t in e))&&Sw(e,t,n)}function Tw(e,t,n,r){var i=!n;n||={};for(var a=-1,o=t.length;++a<o;){var s=t[a],c=r?r(n[s],e[s],s,n,e):void 0;c===void 0&&(c=e[s]),i?Sw(n,s,c):ww(n,s,c)}return n}var Ew=Math.max;function Dw(e,t,n){return t=Ew(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,a=Ew(r.length-t,0),o=Array(a);++i<a;)o[i]=r[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=r[i];return s[t]=n(o),qte(e,this,s)}}function Ow(e,t){return _w(Dw(e,t,aw),e+``)}var ane=9007199254740991;function kw(e){return typeof e==`number`&&e>-1&&e%1==0&&e<=ane}function Aw(e){return e!=null&&kw(e.length)&&!ow(e)}function one(e,t,n){if(!ZC(n))return!1;var r=typeof t;return(r==`number`?Aw(n)&&xw(t,n.length):r==`string`&&t in n)?Cw(n[t],e):!1}function jw(e){return Ow(function(t,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(a=e.length>3&&typeof a==`function`?(i--,a):void 0,o&&one(n[0],n[1],o)&&(a=i<3?void 0:a,i=1),t=Object(t);++r<i;){var s=n[r];s&&e(t,s,r,a)}return t})}var sne=Object.prototype;function Mw(e){var t=e&&e.constructor;return e===(typeof t==`function`&&t.prototype||sne)}function Nw(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var cne=`[object Arguments]`;function Pw(e){return RC(e)&&LC(e)==cne}var Fw=Object.prototype,lne=Fw.hasOwnProperty,une=Fw.propertyIsEnumerable,Iw=Pw(function(){return arguments}())?Pw:function(e){return RC(e)&&lne.call(e,`callee`)&&!une.call(e,`callee`)};function dne(){return!1}var Lw=typeof exports==`object`&&exports&&!exports.nodeType&&exports,Rw=Lw&&typeof module==`object`&&module&&!module.nodeType&&module,zw=Rw&&Rw.exports===Lw?TC.Buffer:void 0,Bw=(zw?zw.isBuffer:void 0)||dne,fne=`[object Arguments]`,pne=`[object Array]`,mne=`[object Boolean]`,hne=`[object Date]`,gne=`[object Error]`,_ne=`[object Function]`,vne=`[object Map]`,yne=`[object Number]`,bne=`[object Object]`,xne=`[object RegExp]`,Sne=`[object Set]`,Cne=`[object String]`,wne=`[object WeakMap]`,Tne=`[object ArrayBuffer]`,Ene=`[object DataView]`,Dne=`[object Float32Array]`,One=`[object Float64Array]`,kne=`[object Int8Array]`,Ane=`[object Int16Array]`,jne=`[object Int32Array]`,Mne=`[object Uint8Array]`,Nne=`[object Uint8ClampedArray]`,Pne=`[object Uint16Array]`,Fne=`[object Uint32Array]`,Vw={};Vw[Dne]=Vw[One]=Vw[kne]=Vw[Ane]=Vw[jne]=Vw[Mne]=Vw[Nne]=Vw[Pne]=Vw[Fne]=!0,Vw[fne]=Vw[pne]=Vw[Tne]=Vw[mne]=Vw[Ene]=Vw[hne]=Vw[gne]=Vw[_ne]=Vw[vne]=Vw[yne]=Vw[bne]=Vw[xne]=Vw[Sne]=Vw[Cne]=Vw[wne]=!1;function Ine(e){return RC(e)&&kw(e.length)&&!!Vw[LC(e)]}function Hw(e){return function(t){return e(t)}}var Uw=typeof exports==`object`&&exports&&!exports.nodeType&&exports,Ww=Uw&&typeof module==`object`&&module&&!module.nodeType&&module,Gw=Ww&&Ww.exports===Uw&&CC.process,Kw=function(){try{return Ww&&Ww.require&&Ww.require(`util`).types||Gw&&Gw.binding&&Gw.binding(`util`)}catch{}}(),qw=Kw&&Kw.isTypedArray,Jw=qw?Hw(qw):Ine,Lne=Object.prototype.hasOwnProperty;function Yw(e,t){var n=HC(e),r=!n&&Iw(e),i=!n&&!r&&Bw(e),a=!n&&!r&&!i&&Jw(e),o=n||r||i||a,s=o?Nw(e.length,String):[],c=s.length;for(var l in e)(t||Lne.call(e,l))&&!(o&&(l==`length`||i&&(l==`offset`||l==`parent`)||a&&(l==`buffer`||l==`byteLength`||l==`byteOffset`)||xw(l,c)))&&s.push(l);return s}function Xw(e,t){return function(n){return e(t(n))}}var Rne=Xw(Object.keys,Object),zne=Object.prototype.hasOwnProperty;function Zw(e){if(!Mw(e))return Rne(e);var t=[];for(var n in Object(e))zne.call(e,n)&&n!=`constructor`&&t.push(n);return t}function Qw(e){return Aw(e)?Yw(e):Zw(e)}var Bne=Object.prototype.hasOwnProperty,Vne=jw(function(e,t){if(Mw(t)||Aw(t)){Tw(t,Qw(t),e);return}for(var n in t)Bne.call(t,n)&&ww(e,n,t[n])});function Hne(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var Une=Object.prototype.hasOwnProperty;function Wne(e){if(!ZC(e))return Hne(e);var t=Mw(e),n=[];for(var r in e)r==`constructor`&&(t||!Une.call(e,r))||n.push(r);return n}function $w(e){return Aw(e)?Yw(e,!0):Wne(e)}var Gne=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Kne=/^\w*$/;function eT(e,t){if(HC(e))return!1;var n=typeof e;return n==`number`||n==`symbol`||n==`boolean`||e==null||BC(e)?!0:Kne.test(e)||!Gne.test(e)||t!=null&&e in Object(t)}var tT=uw(Object,`create`);function qne(){this.__data__=tT?tT(null):{},this.size=0}function Jne(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=+!!t,t}var Yne=`__lodash_hash_undefined__`,Xne=Object.prototype.hasOwnProperty;function Zne(e){var t=this.__data__;if(tT){var n=t[e];return n===Yne?void 0:n}return Xne.call(t,e)?t[e]:void 0}var Qne=Object.prototype.hasOwnProperty;function $ne(e){var t=this.__data__;return tT?t[e]!==void 0:Qne.call(t,e)}var ere=`__lodash_hash_undefined__`;function tre(e,t){var n=this.__data__;return this.size+=+!this.has(e),n[e]=tT&&t===void 0?ere:t,this}function nT(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}nT.prototype.clear=qne,nT.prototype.delete=Jne,nT.prototype.get=Zne,nT.prototype.has=$ne,nT.prototype.set=tre;function nre(){this.__data__=[],this.size=0}function rT(e,t){for(var n=e.length;n--;)if(Cw(e[n][0],t))return n;return-1}var rre=Array.prototype.splice;function ire(e){var t=this.__data__,n=rT(t,e);return n<0?!1:(n==t.length-1?t.pop():rre.call(t,n,1),--this.size,!0)}function are(e){var t=this.__data__,n=rT(t,e);return n<0?void 0:t[n][1]}function ore(e){return rT(this.__data__,e)>-1}function sre(e,t){var n=this.__data__,r=rT(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function iT(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}iT.prototype.clear=nre,iT.prototype.delete=ire,iT.prototype.get=are,iT.prototype.has=ore,iT.prototype.set=sre;var aT=uw(TC,`Map`);function cre(){this.size=0,this.__data__={hash:new nT,map:new(aT||iT),string:new nT}}function lre(e){var t=typeof e;return t==`string`||t==`number`||t==`symbol`||t==`boolean`?e!==`__proto__`:e===null}function oT(e,t){var n=e.__data__;return lre(t)?n[typeof t==`string`?`string`:`hash`]:n.map}function ure(e){var t=oT(this,e).delete(e);return this.size-=+!!t,t}function dre(e){return oT(this,e).get(e)}function fre(e){return oT(this,e).has(e)}function pre(e,t){var n=oT(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function sT(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}sT.prototype.clear=cre,sT.prototype.delete=ure,sT.prototype.get=dre,sT.prototype.has=fre,sT.prototype.set=pre;var mre=`Expected a function`;function cT(e,t){if(typeof e!=`function`||t!=null&&typeof t!=`function`)throw TypeError(mre);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(cT.Cache||sT),n}cT.Cache=sT;var hre=500;function gre(e){var t=cT(e,function(e){return n.size===hre&&n.clear(),e}),n=t.cache;return t}var _re=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,vre=/\\(\\)?/g,lT=gre(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(``),e.replace(_re,function(e,n,r,i){t.push(r?i.replace(vre,`$1`):n||e)}),t});function uT(e){return e==null?``:KC(e)}function dT(e,t){return HC(e)?e:eT(e,t)?[e]:lT(uT(e))}var yre=1/0;function fT(e){if(typeof e==`string`||BC(e))return e;var t=e+``;return t==`0`&&1/e==-yre?`-0`:t}function pT(e,t){t=dT(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[fT(t[n++])];return n&&n==r?e:void 0}function X(e,t,n){var r=e==null?void 0:pT(e,t);return r===void 0?n:r}function mT(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var hT=EC?EC.isConcatSpreadable:void 0;function bre(e){return HC(e)||Iw(e)||!!(hT&&e&&e[hT])}function gT(e,t,n,r,i){var a=-1,o=e.length;for(n||=bre,i||=[];++a<o;){var s=e[a];t>0&&n(s)?t>1?gT(s,t-1,n,r,i):mT(i,s):r||(i[i.length]=s)}return i}function _T(e){return e!=null&&e.length?gT(e,1):[]}function vT(e){return _w(Dw(e,void 0,_T),e+``)}var yT=Xw(Object.getPrototypeOf,Object),xre=`[object Object]`,Sre=Function.prototype,Cre=Object.prototype,bT=Sre.toString,wre=Cre.hasOwnProperty,Tre=bT.call(Object);function xT(e){if(!RC(e)||LC(e)!=xre)return!1;var t=yT(e);if(t===null)return!0;var n=wre.call(t,`constructor`)&&t.constructor;return typeof n==`function`&&n instanceof n&&bT.call(n)==Tre}function Ere(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(i);++r<i;)a[r]=e[r+t];return a}function Dre(e,t,n,r){var i=-1,a=e==null?0:e.length;for(r&&a&&(n=e[++i]);++i<a;)n=t(n,e[i],i,e);return n}function Ore(){this.__data__=new iT,this.size=0}function kre(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function Are(e){return this.__data__.get(e)}function jre(e){return this.__data__.has(e)}var Mre=200;function Nre(e,t){var n=this.__data__;if(n instanceof iT){var r=n.__data__;if(!aT||r.length<Mre-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new sT(r)}return n.set(e,t),this.size=n.size,this}function ST(e){var t=this.__data__=new iT(e);this.size=t.size}ST.prototype.clear=Ore,ST.prototype.delete=kre,ST.prototype.get=Are,ST.prototype.has=jre,ST.prototype.set=Nre;function Pre(e,t){return e&&Tw(t,Qw(t),e)}function Fre(e,t){return e&&Tw(t,$w(t),e)}var CT=typeof exports==`object`&&exports&&!exports.nodeType&&exports,wT=CT&&typeof module==`object`&&module&&!module.nodeType&&module,TT=wT&&wT.exports===CT?TC.Buffer:void 0,ET=TT?TT.allocUnsafe:void 0;function DT(e,t){if(t)return e.slice();var n=e.length,r=ET?ET(n):new e.constructor(n);return e.copy(r),r}function Ire(e,t){for(var n=-1,r=e==null?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}function OT(){return[]}var Lre=Object.prototype.propertyIsEnumerable,kT=Object.getOwnPropertySymbols,AT=kT?function(e){return e==null?[]:(e=Object(e),Ire(kT(e),function(t){return Lre.call(e,t)}))}:OT;function Rre(e,t){return Tw(e,AT(e),t)}var jT=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)mT(t,AT(e)),e=yT(e);return t}:OT;function zre(e,t){return Tw(e,jT(e),t)}function MT(e,t,n){var r=t(e);return HC(e)?r:mT(r,n(e))}function NT(e){return MT(e,Qw,AT)}function PT(e){return MT(e,$w,jT)}var FT=uw(TC,`DataView`),IT=uw(TC,`Promise`),LT=uw(TC,`Set`),RT=`[object Map]`,Bre=`[object Object]`,zT=`[object Promise]`,BT=`[object Set]`,VT=`[object WeakMap]`,HT=`[object DataView]`,Vre=lw(FT),Hre=lw(aT),Ure=lw(IT),Wre=lw(LT),Gre=lw(dw),UT=LC;(FT&&UT(new FT(new ArrayBuffer(1)))!=HT||aT&&UT(new aT)!=RT||IT&&UT(IT.resolve())!=zT||LT&&UT(new LT)!=BT||dw&&UT(new dw)!=VT)&&(UT=function(e){var t=LC(e),n=t==Bre?e.constructor:void 0,r=n?lw(n):``;if(r)switch(r){case Vre:return HT;case Hre:return RT;case Ure:return zT;case Wre:return BT;case Gre:return VT}return t});var WT=UT,Kre=Object.prototype.hasOwnProperty;function qre(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]==`string`&&Kre.call(e,`index`)&&(n.index=e.index,n.input=e.input),n}var GT=TC.Uint8Array;function KT(e){var t=new e.constructor(e.byteLength);return new GT(t).set(new GT(e)),t}function Jre(e,t){var n=t?KT(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var Yre=/\w*$/;function Xre(e){var t=new e.constructor(e.source,Yre.exec(e));return t.lastIndex=e.lastIndex,t}var qT=EC?EC.prototype:void 0,JT=qT?qT.valueOf:void 0;function Zre(e){return JT?Object(JT.call(e)):{}}function YT(e,t){var n=t?KT(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var Qre=`[object Boolean]`,$re=`[object Date]`,eie=`[object Map]`,tie=`[object Number]`,nie=`[object RegExp]`,rie=`[object Set]`,iie=`[object String]`,aie=`[object Symbol]`,oie=`[object ArrayBuffer]`,sie=`[object DataView]`,cie=`[object Float32Array]`,lie=`[object Float64Array]`,uie=`[object Int8Array]`,die=`[object Int16Array]`,fie=`[object Int32Array]`,pie=`[object Uint8Array]`,mie=`[object Uint8ClampedArray]`,hie=`[object Uint16Array]`,gie=`[object Uint32Array]`;function _ie(e,t,n){var r=e.constructor;switch(t){case oie:return KT(e);case Qre:case $re:return new r(+e);case sie:return Jre(e,n);case cie:case lie:case uie:case die:case fie:case pie:case mie:case hie:case gie:return YT(e,n);case eie:return new r;case tie:case iie:return new r(e);case nie:return Xre(e);case rie:return new r;case aie:return Zre(e)}}function XT(e){return typeof e.constructor==`function`&&!Mw(e)?pw(yT(e)):{}}var vie=`[object Map]`;function yie(e){return RC(e)&&WT(e)==vie}var ZT=Kw&&Kw.isMap,bie=ZT?Hw(ZT):yie,xie=`[object Set]`;function Sie(e){return RC(e)&&WT(e)==xie}var QT=Kw&&Kw.isSet,Cie=QT?Hw(QT):Sie,wie=1,Tie=2,Eie=4,$T=`[object Arguments]`,Die=`[object Array]`,Oie=`[object Boolean]`,kie=`[object Date]`,Aie=`[object Error]`,eE=`[object Function]`,jie=`[object GeneratorFunction]`,Mie=`[object Map]`,Nie=`[object Number]`,tE=`[object Object]`,Pie=`[object RegExp]`,Fie=`[object Set]`,Iie=`[object String]`,Lie=`[object Symbol]`,Rie=`[object WeakMap]`,zie=`[object ArrayBuffer]`,Bie=`[object DataView]`,Vie=`[object Float32Array]`,Hie=`[object Float64Array]`,Uie=`[object Int8Array]`,Wie=`[object Int16Array]`,Gie=`[object Int32Array]`,Kie=`[object Uint8Array]`,qie=`[object Uint8ClampedArray]`,Jie=`[object Uint16Array]`,Yie=`[object Uint32Array]`,nE={};nE[$T]=nE[Die]=nE[zie]=nE[Bie]=nE[Oie]=nE[kie]=nE[Vie]=nE[Hie]=nE[Uie]=nE[Wie]=nE[Gie]=nE[Mie]=nE[Nie]=nE[tE]=nE[Pie]=nE[Fie]=nE[Iie]=nE[Lie]=nE[Kie]=nE[qie]=nE[Jie]=nE[Yie]=!0,nE[Aie]=nE[eE]=nE[Rie]=!1;function rE(e,t,n,r,i,a){var o,s=t&wie,c=t&Tie,l=t&Eie;if(n&&(o=i?n(e,r,i,a):n(e)),o!==void 0)return o;if(!ZC(e))return e;var u=HC(e);if(u){if(o=qre(e),!s)return hw(e,o)}else{var d=WT(e),f=d==eE||d==jie;if(Bw(e))return DT(e,s);if(d==tE||d==$T||f&&!i){if(o=c||f?{}:XT(e),!s)return c?zre(e,Fre(o,e)):Rre(e,Pre(o,e))}else{if(!nE[d])return i?e:{};o=_ie(e,d,s)}}a||=new ST;var p=a.get(e);if(p)return p;a.set(e,o),Cie(e)?e.forEach(function(r){o.add(rE(r,t,n,r,e,a))}):bie(e)&&e.forEach(function(r,i){o.set(i,rE(r,t,n,i,e,a))});var m=u?void 0:(l?c?PT:NT:c?$w:Qw)(e);return vw(m||e,function(r,i){m&&(i=r,r=e[i]),ww(o,i,rE(r,t,n,i,e,a))}),o}var Xie=1,Zie=4;function iE(e){return rE(e,Xie|Zie)}var Qie=`__lodash_hash_undefined__`;function $ie(e){return this.__data__.set(e,Qie),this}function eae(e){return this.__data__.has(e)}function aE(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new sT;++t<n;)this.add(e[t])}aE.prototype.add=aE.prototype.push=$ie,aE.prototype.has=eae;function tae(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function oE(e,t){return e.has(t)}var nae=1,rae=2;function sE(e,t,n,r,i,a){var o=n&nae,s=e.length,c=t.length;if(s!=c&&!(o&&c>s))return!1;var l=a.get(e),u=a.get(t);if(l&&u)return l==t&&u==e;var d=-1,f=!0,p=n&rae?new aE:void 0;for(a.set(e,t),a.set(t,e);++d<s;){var m=e[d],h=t[d];if(r)var g=o?r(h,m,d,t,e,a):r(m,h,d,e,t,a);if(g!==void 0){if(g)continue;f=!1;break}if(p){if(!tae(t,function(e,t){if(!oE(p,t)&&(m===e||i(m,e,n,r,a)))return p.push(t)})){f=!1;break}}else if(!(m===h||i(m,h,n,r,a))){f=!1;break}}return a.delete(e),a.delete(t),f}function iae(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function cE(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}var aae=1,oae=2,sae=`[object Boolean]`,cae=`[object Date]`,lae=`[object Error]`,uae=`[object Map]`,dae=`[object Number]`,fae=`[object RegExp]`,pae=`[object Set]`,mae=`[object String]`,hae=`[object Symbol]`,gae=`[object ArrayBuffer]`,_ae=`[object DataView]`,lE=EC?EC.prototype:void 0,uE=lE?lE.valueOf:void 0;function vae(e,t,n,r,i,a,o){switch(n){case _ae:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case gae:return!(e.byteLength!=t.byteLength||!a(new GT(e),new GT(t)));case sae:case cae:case dae:return Cw(+e,+t);case lae:return e.name==t.name&&e.message==t.message;case fae:case mae:return e==t+``;case uae:var s=iae;case pae:var c=r&aae;if(s||=cE,e.size!=t.size&&!c)return!1;var l=o.get(e);if(l)return l==t;r|=oae,o.set(e,t);var u=sE(s(e),s(t),r,i,a,o);return o.delete(e),u;case hae:if(uE)return uE.call(e)==uE.call(t)}return!1}var yae=1,bae=Object.prototype.hasOwnProperty;function xae(e,t,n,r,i,a){var o=n&yae,s=NT(e),c=s.length;if(c!=NT(t).length&&!o)return!1;for(var l=c;l--;){var u=s[l];if(!(o?u in t:bae.call(t,u)))return!1}var d=a.get(e),f=a.get(t);if(d&&f)return d==t&&f==e;var p=!0;a.set(e,t),a.set(t,e);for(var m=o;++l<c;){u=s[l];var h=e[u],g=t[u];if(r)var _=o?r(g,h,u,t,e,a):r(h,g,u,e,t,a);if(!(_===void 0?h===g||i(h,g,n,r,a):_)){p=!1;break}m||=u==`constructor`}if(p&&!m){var v=e.constructor,y=t.constructor;v!=y&&`constructor`in e&&`constructor`in t&&!(typeof v==`function`&&v instanceof v&&typeof y==`function`&&y instanceof y)&&(p=!1)}return a.delete(e),a.delete(t),p}var Sae=1,dE=`[object Arguments]`,fE=`[object Array]`,pE=`[object Object]`,mE=Object.prototype.hasOwnProperty;function Cae(e,t,n,r,i,a){var o=HC(e),s=HC(t),c=o?fE:WT(e),l=s?fE:WT(t);c=c==dE?pE:c,l=l==dE?pE:l;var u=c==pE,d=l==pE,f=c==l;if(f&&Bw(e)){if(!Bw(t))return!1;o=!0,u=!1}if(f&&!u)return a||=new ST,o||Jw(e)?sE(e,t,n,r,i,a):vae(e,t,c,n,r,i,a);if(!(n&Sae)){var p=u&&mE.call(e,`__wrapped__`),m=d&&mE.call(t,`__wrapped__`);if(p||m){var h=p?e.value():e,g=m?t.value():t;return a||=new ST,i(h,g,n,r,a)}}return f?(a||=new ST,xae(e,t,n,r,i,a)):!1}function hE(e,t,n,r,i){return e===t?!0:e==null||t==null||!RC(e)&&!RC(t)?e!==e&&t!==t:Cae(e,t,n,r,hE,i)}var wae=1,Tae=2;function Eae(e,t,n,r){var i=n.length,a=i,o=!r;if(e==null)return!a;for(e=Object(e);i--;){var s=n[i];if(o&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<a;){s=n[i];var c=s[0],l=e[c],u=s[1];if(o&&s[2]){if(l===void 0&&!(c in e))return!1}else{var d=new ST;if(r)var f=r(l,u,c,e,t,d);if(!(f===void 0?hE(u,l,wae|Tae,r,d):f))return!1}}return!0}function gE(e){return e===e&&!ZC(e)}function Dae(e){for(var t=Qw(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,gE(i)]}return t}function _E(e,t){return function(n){return n!=null&&n[e]===t&&(t!==void 0||e in Object(n))}}function Oae(e){var t=Dae(e);return t.length==1&&t[0][2]?_E(t[0][0],t[0][1]):function(n){return n===e||Eae(n,e,t)}}function vE(e,t){return e!=null&&t in Object(e)}function yE(e,t,n){t=dT(t,e);for(var r=-1,i=t.length,a=!1;++r<i;){var o=fT(t[r]);if(!(a=e!=null&&n(e,o)))break;e=e[o]}return a||++r!=i?a:(i=e==null?0:e.length,!!i&&kw(i)&&xw(o,i)&&(HC(e)||Iw(e)))}function bE(e,t){return e!=null&&yE(e,t,vE)}var xE=1,SE=2;function CE(e,t){return eT(e)&&gE(t)?_E(fT(e),t):function(n){var r=X(n,e);return r===void 0&&r===t?bE(n,e):hE(t,r,xE|SE)}}function kae(e){return function(t){return t?.[e]}}function Aae(e){return function(t){return pT(t,e)}}function jae(e){return eT(e)?kae(fT(e)):Aae(e)}function wE(e){return typeof e==`function`?e:e==null?aw:typeof e==`object`?HC(e)?CE(e[0],e[1]):Oae(e):jae(e)}function Mae(e){return function(t,n,r){for(var i=-1,a=Object(t),o=r(t),s=o.length;s--;){var c=o[e?s:++i];if(n(a[c],c,a)===!1)break}return t}}var TE=Mae();function EE(e,t){return e&&TE(e,t,Qw)}function DE(e,t){return function(n,r){if(n==null)return n;if(!Aw(n))return e(n,r);for(var i=n.length,a=t?i:-1,o=Object(n);(t?a--:++a<i)&&r(o[a],a,o)!==!1;);return n}}var OE=DE(EE);function kE(e,t,n){(n!==void 0&&!Cw(e[t],n)||n===void 0&&!(t in e))&&Sw(e,t,n)}function AE(e){return RC(e)&&Aw(e)}function jE(e,t){if(!(t===`constructor`&&typeof e[t]==`function`)&&t!=`__proto__`)return e[t]}function Nae(e){return Tw(e,$w(e))}function Pae(e,t,n,r,i,a,o){var s=jE(e,n),c=jE(t,n),l=o.get(c);if(l){kE(e,n,l);return}var u=a?a(s,c,n+``,e,t,o):void 0,d=u===void 0;if(d){var f=HC(c),p=!f&&Bw(c),m=!f&&!p&&Jw(c);u=c,f||p||m?HC(s)?u=s:AE(s)?u=hw(s):p?(d=!1,u=DT(c,!0)):m?(d=!1,u=YT(c,!0)):u=[]:xT(c)||Iw(c)?(u=s,Iw(s)?u=Nae(s):(!ZC(s)||ow(s))&&(u=XT(c))):d=!1}d&&(o.set(c,u),i(u,c,r,a,o),o.delete(c)),kE(e,n,u)}function ME(e,t,n,r,i){e!==t&&TE(t,function(a,o){if(i||=new ST,ZC(a))Pae(e,t,o,n,ME,r,i);else{var s=r?r(jE(e,o),a,o+``,e,t,i):void 0;s===void 0&&(s=a),kE(e,o,s)}},$w)}function NE(e,t,n){for(var r=-1,i=e==null?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}var Fae=200;function Iae(e,t,n,r){var i=-1,a=bw,o=!0,s=e.length,c=[],l=t.length;if(!s)return c;n&&(t=VC(t,Hw(n))),r?(a=NE,o=!1):t.length>=Fae&&(a=oE,o=!1,t=new aE(t));outer:for(;++i<s;){var u=e[i],d=n==null?u:n(u);if(u=r||u!==0?u:0,o&&d===d){for(var f=l;f--;)if(t[f]===d)continue outer;c.push(u)}else a(t,d,r)||c.push(u)}return c}var Lae=Ow(function(e,t){return AE(e)?Iae(e,gT(t,1,AE,!0)):[]});function PE(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}function FE(e){return typeof e==`function`?e:aw}function Rae(e,t){return(HC(e)?vw:OE)(e,FE(t))}var IE=1/0;function LE(e){return e!=null&&e.length?gT(e,IE):[]}var RE=Object.prototype.hasOwnProperty;function zE(e,t){return e!=null&&RE.call(e,t)}function BE(e,t){return e!=null&&yE(e,t,zE)}var VE=`[object String]`;function HE(e){return typeof e==`string`||!HC(e)&&RC(e)&&LC(e)==VE}function UE(e,t){return VC(t,function(t){return e[t]})}function WE(e){return e==null?[]:UE(e,Qw(e))}var GE=Math.max;function KE(e,t,n,r){e=Aw(e)?e:WE(e),n=n&&!r?iw(n):0;var i=e.length;return n<0&&(n=GE(i+n,0)),HE(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&yw(e,t,n)>-1}var qE=Math.min;function JE(e,t,n){for(var r=n?NE:bw,i=e[0].length,a=e.length,o=a,s=Array(a),c=1/0,l=[];o--;){var u=e[o];o&&t&&(u=VC(u,Hw(t))),c=qE(u.length,c),s[o]=!n&&(t||i>=120&&u.length>=120)?new aE(o&&u):void 0}u=e[0];var d=-1,f=s[0];outer:for(;++d<i&&l.length<c;){var p=u[d],m=t?t(p):p;if(p=n||p!==0?p:0,!(f?oE(f,m):r(l,m,n))){for(o=a;--o;){var h=s[o];if(!(h?oE(h,m):r(e[o],m,n)))continue outer}f&&f.push(m),l.push(p)}}return l}function YE(e){return AE(e)?e:[]}var XE=Ow(function(e){var t=VC(e,YE);return t.length&&t[0]===e[0]?JE(t):[]});function ZE(e,t){return t.length<2?e:pT(e,Ere(t,0,-1))}var QE=`[object Map]`,$E=`[object Set]`,eD=Object.prototype.hasOwnProperty;function tD(e){if(e==null)return!0;if(Aw(e)&&(HC(e)||typeof e==`string`||typeof e.splice==`function`||Bw(e)||Jw(e)||Iw(e)))return!e.length;var t=WT(e);if(t==QE||t==$E)return!e.size;if(Mw(e))return!Zw(e).length;for(var n in e)if(eD.call(e,n))return!1;return!0}function nD(e,t){return hE(e,t)}var zae=`[object Number]`;function rD(e){return typeof e==`number`||RC(e)&&LC(e)==zae}function iD(e){return e==null}function aD(e){return e===void 0}var Bae=jw(function(e,t,n){ME(e,t,n)}),Vae=Object.prototype.hasOwnProperty;function oD(e,t){t=dT(t,e);var n=-1,r=t.length;if(!r)return!0;for(;++n<r;){var i=fT(t[n]);if(i===`__proto__`&&!Vae.call(e,`__proto__`)||(i===`constructor`||i===`prototype`)&&n<r-1)return!1}var a=ZE(e,t);return a==null||delete a[fT(PE(t))]}function Hae(e){return xT(e)?void 0:e}var Uae=1,Wae=2,Gae=4,sD=vT(function(e,t){var n={};if(e==null)return n;var r=!1;t=VC(t,function(t){return t=dT(t,e),r||=t.length>1,t}),Tw(e,PT(e),n),r&&(n=rE(n,Uae|Wae|Gae,Hae));for(var i=t.length;i--;)oD(n,t[i]);return n});function cD(e,t,n,r){if(!ZC(e))return e;t=dT(t,e);for(var i=-1,a=t.length,o=a-1,s=e;s!=null&&++i<a;){var c=fT(t[i]),l=n;if(c===`__proto__`||c===`constructor`||c===`prototype`)return e;if(i!=o){var u=s[c];l=r?r(u,c,s):void 0,l===void 0&&(l=ZC(u)?u:xw(t[i+1])?[]:{})}ww(s,c,l),s=s[c]}return e}function lD(e,t,n){for(var r=-1,i=t.length,a={};++r<i;){var o=t[r],s=pT(e,o);n(s,o)&&cD(a,dT(o,e),s)}return a}function Kae(e,t){if(e==null)return{};var n=VC(PT(e),function(e){return[e]});return t=wE(t),lD(e,n,function(e,n){return t(e,n[0])})}function qae(e,t){return lD(e,t,function(t,n){return bE(e,n)})}var uD=vT(function(e,t){return e==null?{}:qae(e,t)});function Jae(e,t,n,r,i){return i(e,function(e,i,a){n=r?(r=!1,e):t(n,e,i,a)}),n}function Yae(e,t,n){var r=HC(e)?Dre:Jae,i=arguments.length<3;return r(e,wE(t,4),n,i,OE)}function dD(e,t,n){return e==null?e:cD(e,t,n)}function Xae(e,t,n,r){return r=typeof r==`function`?r:void 0,e==null?e:cD(e,t,n,r)}var Zae=9007199254740991,fD=4294967295,Qae=Math.min;function pD(e,t){if(e=iw(e),e<1||e>Zae)return[];var n=fD,r=Qae(e,fD);t=FE(t),e-=fD;for(var i=Nw(r,t);++n<e;)t(n);return i}function mD(e){return HC(e)?VC(e,fT):BC(e)?[e]:hw(lT(uT(e)))}function $ae(e,t,n){var r=HC(e),i=r||Bw(e)||Jw(e);if(t=wE(t,4),n==null){var a=e&&e.constructor;n=i?r?new a:[]:ZC(e)&&ow(a)?pw(yT(e)):{}}return(i?vw:EE)(e,function(e,r,i){return t(n,e,r,i)}),n}var eoe=LT&&1/cE(new LT([,-0]))[1]==1/0?function(e){return new LT(e)}:mw,toe=200;function hD(e,t,n){var r=-1,i=bw,a=e.length,o=!0,s=[],c=s;if(n)o=!1,i=NE;else if(a>=toe){var l=t?null:eoe(e);if(l)return cE(l);o=!1,i=oE,c=new aE}else c=t?[]:s;outer:for(;++r<a;){var u=e[r],d=t?t(u):u;if(u=n||u!==0?u:0,o&&d===d){for(var f=c.length;f--;)if(c[f]===d)continue outer;t&&c.push(d),s.push(u)}else i(c,d,n)||(c!==s&&c.push(d),s.push(u))}return s}var noe=Ow(function(e){return hD(gT(e,1,AE,!0))});function gD(e){return e&&e.length?hD(e):[]}var _D=0;function vD(e){var t=++_D;return uT(e)+t}function yD(e,t){return e==null||oD(e,t)}var bD=as()(e=>({tools:{},setToolData:(t,n)=>e(e=>{let r=e.tools[t];if(r){let t=!0;for(let e of Object.keys(n))if(r[e]!==n[e]){t=!1;break}if(t)return e}return SD(e,`tools.${t}`,{...r??{},...n})}),updateOpenaiObject:(t,n,r)=>e(e=>e.tools[t]?.openaiObject?SD(e,`tools.${t}.openaiObject.${n}`,r):e),pushOpenAiLog:(t,n)=>e(e=>{let r=e.tools[t]?.openaiLogs||[];return SD(e,`tools.${t}.openaiLogs`,[...r,{...n,id:crypto.randomUUID()}])}),clearOpenAiLogs:t=>e(e=>e.tools[t]?.openaiLogs?.length?SD(e,`tools.${t}.openaiLogs`,[]):e),setOpenInAppUrl:(t,n)=>e(e=>e.tools[t]?.openInAppUrl===n?e:SD(e,`tools.${t}.openInAppUrl`,n))})),xD=e=>{let{tools:t}=bD();return t[e]},SD=(e,t,n)=>{let r=iE(e);return dD(r,t,n),r};function CD(e,t,n){try{return e(t)}catch(e){return n?dt(25,t,e,n):dt(24,t,e),null}}function wD(e){function t(t){if(t===void 0)return null;let n=``;if(Array.isArray(t)){if(t[0]===void 0)return null;n=t[0]}return typeof t==`string`&&(n=t),CD(e.parse,n)}return{type:`single`,eq:(e,t)=>e===t,...e,parseServerSide:t,withDefault(e){return{...this,defaultValue:e,parseServerSide(n){return t(n)??e}}},withOptions(e){return{...this,...e}}}}var TD=wD({parse:e=>e,serialize:String});wD({parse:e=>{let t=parseInt(e);return t==t?t:null},serialize:e=>``+Math.round(e)}),wD({parse:e=>{let t=parseInt(e);return t==t?t-1:null},serialize:e=>``+Math.round(e+1)}),wD({parse:e=>{let t=parseInt(e,16);return t==t?t:null},serialize:e=>{let t=Math.round(e).toString(16);return(t.length&1?`0`:``)+t}}),wD({parse:e=>{let t=parseFloat(e);return t==t?t:null},serialize:String}),wD({parse:e=>e.toLowerCase()===`true`,serialize:String});function ED(e,t){return e.valueOf()===t.valueOf()}wD({parse:e=>{let t=parseInt(e);return t==t?new Date(t):null},serialize:e=>``+e.valueOf(),eq:ED}),wD({parse:e=>{let t=new Date(e);return t.valueOf()==t.valueOf()?t:null},serialize:e=>e.toISOString(),eq:ED}),wD({parse:e=>{let t=new Date(e.slice(0,10));return t.valueOf()==t.valueOf()?t:null},serialize:e=>e.toISOString().slice(0,10),eq:ED});var DD=vt(`sync-emitter`,()=>Mt()),OD={};function kD(e,t={}){let n=(0,b.useId)(),r=Ct(),i=wt(),{history:a=r?.history??`replace`,scroll:o=r?.scroll??!1,shallow:s=r?.shallow??!0,throttleMs:c=kt.timeMs,limitUrlUpdates:l=r?.limitUrlUpdates,clearOnDefault:u=r?.clearOnDefault??!0,startTransition:d,urlKeys:f=OD}=t,p=Object.keys(e).join(`,`),m=(0,b.useMemo)(()=>Object.fromEntries(Object.keys(e).map(e=>[e,f[e]??e])),[p,JSON.stringify(f)]),h=St(Object.values(m)),g=h.searchParams,_=(0,b.useRef)({}),v=(0,b.useRef)(null),y=(0,b.useRef)(null),x=(0,b.useMemo)(()=>Object.fromEntries(Object.keys(e).map(t=>[t,e[t].defaultValue??null])),[Object.values(e).map(({defaultValue:e})=>e).join(`,`)]),S=Ut(Object.values(m)),[C,w]=(0,b.useState)(()=>AD(e,f,g,S).state),T=(0,b.useRef)(C),E=Object.values(m).map(e=>`${e}=${g.getAll(e)}`).join(`&`)+JSON.stringify(S),D=()=>{let{state:t,hasChanged:r}=AD(e,f,g,S,_.current,T.current);r&&(ut(1,n,p,t),T.current=t,w(t))},O=Object.keys(_.current).join(`&`)!==Object.values(m).join(`&`),k=y.current===null||y.current===(h.pathname??location.pathname);(O||k&&v.current!==E)&&(v.current=E,D(),O&&(_.current=Object.fromEntries(Object.entries(m).map(([t,n])=>[n,e[t]?.type===`multi`?g.getAll(n):g.get(n)??null])))),(0,b.useEffect)(()=>{y.current=h.pathname??location.pathname,D()},[E,h.pathname]),(0,b.useEffect)(()=>{let t=Object.keys(e).reduce((t,r)=>(t[r]=({state:t,query:i})=>{w(a=>{let{defaultValue:o}=e[r],s=m[r],c=t??o??null,l=a[r]??o??null;return Object.is(l,c)?(ut(2,n,p,s,t,o,T.current),a):(T.current={...T.current,[r]:c},_.current[s]=i,ut(3,n,p,s,t,o,T.current),T.current)})},t),{});for(let r of Object.keys(e)){let e=m[r];ut(4,n,e,p),DD.on(e,t[r])}return()=>{for(let r of Object.keys(e)){let e=m[r];ut(5,n,e,p),DD.off(e,t[r])}}},[p,m]);let A=(0,b.useCallback)((t,r={})=>{let f=Object.fromEntries(Object.keys(e).map(e=>[e,null])),g=typeof t==`function`?t(jD(T.current,x))??f:t??f;ut(6,n,p,g);let _,v=0,y=!1,b=[];for(let[t,n]of Object.entries(g)){let f=e[t],p=m[t];if(!f||n===void 0)continue;(r.clearOnDefault??f.clearOnDefault??u)&&n!==null&&f.defaultValue!==void 0&&(f.eq??((e,t)=>e===t))(n,f.defaultValue)&&(n=null);let g=n===null?null:(f.serialize??String)(n);DD.emit(p,{state:n,query:g});let x={key:p,query:g,options:{history:r.history??f.history??a,shallow:r.shallow??f.shallow??s,scroll:r.scroll??f.scroll??o,startTransition:r.startTransition??f.startTransition??d}},S=r.limitUrlUpdates??f.limitUrlUpdates??l;if(S?.method===`debounce`){let e=S.timeMs??kt.timeMs,t=Ht.push(x,e,h,i);v<e&&(_=t,v=e)}else{let e=S?.timeMs??r.throttleMs??f.throttleMs??c;b.push(Ht.abort(p)),Rt.push(x,e),y=!0}}let S=b.reduce((e,t)=>t(e),y?Rt.flush(h,i):Rt.getPendingPromise(h));return _??S},[p,a,s,o,c,l?.method,l?.timeMs,d,m,h.updateUrl,h.getSearchParamsSnapshot,h.rateLimitFactor,i,x]);return[(0,b.useMemo)(()=>jD(C,x),[C,x]),A]}function AD(e,t,n,r,i,a){let o=!1,s=Object.entries(e).reduce((e,[s,c])=>{let l=t?.[s]??s,u=r[l],d=c.type===`multi`?[]:null,f=u===void 0?(c.type===`multi`?n.getAll(l):n.get(l))??d:u;return i&&a&&Tt(i[l]??d,f)?(e[s]=a[s]??null,e):(o=!0,e[s]=(At(f)?null:CD(c.parse,f,l))??null,i&&(i[l]=f),e)},{});if(!o){let t=Object.keys(e),n=Object.keys(a??{});o=t.length!==n.length||t.some(e=>!n.includes(e))}return{state:s,hasChanged:o}}function jD(e,t){return Object.fromEntries(Object.keys(e).map(n=>[n,e[n]??t[n]??null]))}function MD(e,t={}){let{parse:n,type:r,serialize:i,eq:a,defaultValue:o,...s}=t,[{[e]:c},l]=kD({[e]:{parse:n??(e=>e),type:r,serialize:i,eq:a,defaultValue:o}},s);return[c,(0,b.useCallback)((t,n={})=>l(n=>({[e]:typeof t==`function`?t(n[e]):t}),n),[e,l])]}function ND(){return MD(`tool`,TD)}var PD=new He,FD=`skybridge-devtools-oauth`,ID={clientInfo:`${FD}:client-info`,tokens:`${FD}:tokens`,codeVerifier:`${FD}:code-verifier`,state:`${FD}:state`,discovery:`${FD}:discovery`},LD=class{get redirectUrl(){let e=new URL(window.location.origin+window.location.pathname);return e.searchParams.set(`oauth_callback`,`true`),e.toString()}get clientMetadata(){return{redirect_uris:[this.redirectUrl],token_endpoint_auth_method:`none`,grant_types:[`authorization_code`,`refresh_token`],response_types:[`code`],client_name:`Skybridge Devtools`,client_uri:window.location.origin}}clientInformation(){let e=localStorage.getItem(ID.clientInfo);return e?JSON.parse(e):void 0}saveClientInformation(e){localStorage.setItem(ID.clientInfo,JSON.stringify(e))}tokens(){let e=localStorage.getItem(ID.tokens);return e?JSON.parse(e):void 0}saveTokens(e){localStorage.setItem(ID.tokens,JSON.stringify(e))}state(){let e=localStorage.getItem(ID.state);if(e)return e;let t=crypto.randomUUID();return localStorage.setItem(ID.state,t),t}expectedState(){return localStorage.getItem(ID.state)??void 0}redirectToAuthorization(e){window.location.href=e.toString()}saveCodeVerifier(e){localStorage.setItem(ID.codeVerifier,e)}codeVerifier(){let e=localStorage.getItem(ID.codeVerifier);if(!e)throw Error(`Missing PKCE code verifier: the sign-in flow was not started in this browser, or its storage was cleared. Retry signing in.`);return e}saveDiscoveryState(e){localStorage.setItem(ID.discovery,JSON.stringify(e))}discoveryState(){let e=localStorage.getItem(ID.discovery);return e?JSON.parse(e):void 0}invalidateCredentials(e){(e===`all`||e===`tokens`)&&localStorage.removeItem(ID.tokens),(e===`all`||e===`client`)&&localStorage.removeItem(ID.clientInfo),(e===`all`||e===`verifier`)&&(localStorage.removeItem(ID.codeVerifier),localStorage.removeItem(ID.state)),(e===`all`||e===`discovery`)&&localStorage.removeItem(ID.discovery)}},RD=new class{client=null;transport=null;async connect(e,t){let n=typeof e==`string`?new URL(e):e;this.transport=new uC(n,{authProvider:t,fetch:(e,t)=>{let r=e instanceof Request?e.url:String(e);if(new URL(r).origin!==n.origin)return fetch(e,t);let i=new Headers(t?.headers);return i.set(`x-forwarded-host`,n.host),i.set(`x-forwarded-proto`,n.protocol.replace(/:$/,``)),fetch(e,{...t,headers:i})}}),this.client=new aC({name:`mcp-client`,version:`1.0.0`},{capabilities:{experimental:{tools:{},resources:{},prompts:{}}}}),await this.client.connect(this.transport)}async listTools(){if(!this.client)throw Error(`Client not connected. Call connect() first.`);try{return(await this.client.listTools()).tools}catch(e){if(e instanceof ty&&e.code===-32601)return[];throw e}}async callTool(e,t){if(!this.client)throw Error(`Client not connected. Call connect() first.`);let{_meta:n,...r}=await this.client.callTool({name:e,arguments:t??{}});return{...r,meta:n}}async listResources(){if(!this.client)throw Error(`Client not connected. Call connect() first.`);return(await this.client.listResources()).resources}async readResource(e){if(!this.client)throw Error(`Client not connected. Call connect() first.`);return await this.client.readResource({uri:e})}async listPrompts(){if(!this.client)throw Error(`Client not connected. Call connect() first.`);return(await this.client.listPrompts()).prompts}async getPrompt(e,t){if(!this.client)throw Error(`Client not connected. Call connect() first.`);return await this.client.getPrompt({name:e,...t&&{arguments:t}})}getServerInfo(){if(!this.client)throw Error(`Client not connected. Call connect() first.`);return this.client.getServerVersion()}async close(){this.client&&=(await this.client.close(),null),this.transport=null}},zD=null,BD=()=>xC.VITE_MCP_SERVER_URL;function VD(e){let t=e._meta?.securitySchemes;return!!t?.length&&t.every(e=>e?.type!==`noauth`)}function HD(e){return e instanceof Ax||e instanceof vv&&e.status===401}async function UD(){let e=BD(),{setStatus:t,setRequiresAuth:n,setHasAuthRequiredTools:r,setIsSignedIn:i,setError:a}=os.getState();t(`connecting`),a(null),await RD.close();let o=!1;try{(await nS(e))?.authorization_servers?.length&&(o=!0)}catch{}n(o);let s=o?new LD:null,c=!!s?.tokens();zD=s;let l=(e,n)=>{i(!1),r(!1),t(n),n===`error`&&a(e instanceof Error?e.message:`Connection failed`)};try{await RD.connect(e,c&&s?s:void 0)}catch(t){if(!HD(t)||!s){l(t,`error`);return}try{await RD.close(),await RD.connect(e,s)}catch(e){l(e,HD(e)?`unauthenticated`:`error`);return}}let u=null;try{u=await RD.listTools()}catch{}i(!!s?.tokens()),r((u??[]).some(VD)),t(`authenticated`),u?PD.setQueryData([`list-tools`],u):PD.invalidateQueries({queryKey:[`list-tools`]})}async function WD(){let e=BD(),t=zD??new LD;zD=t,t.invalidateCredentials(`all`),await Yx(t,{serverUrl:e})}async function GD(e,t,n){let r=BD(),i=new LD,a=i.expectedState();if(!a||n!==a)throw i.invalidateCredentials(`verifier`),Error(`OAuth callback state mismatch: the response does not match the sign-in this browser started. Retry signing in.`);await Yx(i,{serverUrl:r,authorizationCode:e,iss:t}),i.invalidateCredentials(`verifier`),await UD()}async function KD(){zD?.invalidateCredentials(`all`),zD=null,await RD.close(),os.getState().reset(),PD.invalidateQueries({queryKey:[`list-tools`]})}var qD=()=>{let e=fs();return{...e,view:{mode:e.displayMode},toolInput:{},toolOutput:null,toolResponseMetadata:null,widgetState:null}},JD=()=>{let{data:e}=st({queryKey:[`list-tools`],queryFn:()=>RD.listTools()});return e},YD=()=>{if(os(e=>e.status)===`authenticated`)return RD.getServerInfo()},XD=()=>{let{setToolData:e}=bD();return ct({mutationFn:async({toolName:t,args:n})=>{e(t,{input:n??{},response:void 0,durationMs:null,openaiRef:null,openaiLogs:[],openaiObject:null,openInAppUrl:null});let r=performance.now(),i=await RD.callTool(t,n);gC(i,t);let a=Math.round(performance.now()-r),o=Date.now();return e(t,{input:n??{},response:i,durationMs:a,openaiRef:null,openaiLogs:[{id:crypto.randomUUID(),timestamp:o-a,source:`server`,command:`callTool`,args:{name:t,args:n??{}},type:`default`},{id:crypto.randomUUID(),timestamp:o,source:`server`,command:`callTool response`,args:i,type:`response`}],openaiObject:{...qD(),toolInput:n??{},toolOutput:i.structuredContent,toolResponseMetadata:i.meta??null,widgetState:null},openInAppUrl:null}),i}})},ZD=()=>{let[e]=ND();return JD().find(t=>t.name===e)??null},roe=()=>{let e=ZD();if(!e)throw Error(`No tool is currently selected`);return e},ioe=e=>st({queryKey:[`resource`,e],queryFn:async()=>{if(!e)throw Error(`Resource URI is required`);return await RD.readResource(e)}}),QD=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=Li(`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,H.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function $D(e,t){e&&SC.flushSync(()=>e.dispatchEvent(t))}var aoe=`Separator`,eO=`horizontal`,ooe=[`horizontal`,`vertical`],tO=b.forwardRef((e,t)=>{let{decorative:n,orientation:r=eO,...i}=e,a=soe(r)?r:eO,o=n?{role:`none`}:{"aria-orientation":a===`vertical`?a:void 0,role:`separator`};return(0,H.jsx)(QD.div,{"data-orientation":a,...o,...i,ref:t})});tO.displayName=aoe;function soe(e){return ooe.includes(e)}var nO=tO;function rO({className:e,orientation:t=`horizontal`,decorative:n=!0,...r}){return(0,H.jsx)(nO,{"data-slot":`separator`,decorative:n,orientation:t,className:Mr(`shrink-0 bg-border-secondary`,`data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full`,`data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px`,e),...r})}var coe={idle:{bg:`bg-gray-100`,dot:`bg-gray-400`,text:`text-gray-600`,label:`Disconnected`},connecting:{bg:`bg-yellow-100`,dot:`bg-yellow-500`,text:`text-yellow-800`,label:`Connecting...`},authenticated:{bg:`bg-green-100`,dot:`bg-green-500`,text:`text-green-800`,label:`Connected`},unauthenticated:{bg:`bg-orange-100`,dot:`bg-orange-500`,text:`text-orange-800`,label:`Login required`},error:{bg:`bg-red-100`,dot:`bg-red-500`,text:`text-red-800`,label:`Error`}};function loe({status:e}){let t=coe[e];return(0,H.jsxs)(`span`,{className:`flex items-center gap-1 rounded-full ${t.bg} px-2 py-0.5 text-xs font-semibold ${t.text}`,children:[(0,H.jsx)(`span`,{className:`h-2 w-2 rounded-full ${t.dot} mr-1 inline-block`}),t.label]})}var uoe=Ni([`w-full rounded-md border px-4 py-3`,`grid grid-cols-[auto_1fr] gap-x-3 gap-y-0.5 items-start`,`[&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:mt-0.5`,`[&>:not(svg)]:col-start-2`].join(` `),{variants:{variant:{default:`bg-muted border-border [&>svg]:text-muted-foreground`,destructive:`bg-destructive/10 border-destructive/30 [&>svg]:text-destructive`,warning:`bg-badge-warning/10 border-badge-warning/30 [&>svg]:text-badge-warning`,success:`bg-badge-success/10 border-badge-success/30 [&>svg]:text-badge-success`}},defaultVariants:{variant:`default`}});function doe({className:e,variant:t,...n}){return(0,H.jsx)(`div`,{role:`alert`,className:Mr(uoe({variant:t}),e),...n})}function foe({className:e,...t}){return(0,H.jsx)(`p`,{className:Mr(`type-text-sm font-semibold leading-snug`,e),...t})}function poe({className:e,...t}){return(0,H.jsx)(`div`,{className:Mr(`type-text-sm text-muted-foreground [&_p]:leading-relaxed`,e),...t})}function iO({title:e,description:t,className:n}){return(0,H.jsxs)(doe,{variant:`warning`,className:n,children:[(0,H.jsx)(Oi,{}),(0,H.jsx)(foe,{children:e}),(0,H.jsx)(poe,{children:t})]})}var moe=Object.defineProperty,aO=(e,t)=>moe(e,`name`,{value:t,configurable:!0}),oO=!!(typeof window<`u`&&window.document&&window.document.createElement);function sO(e,t,{checkForDefaultPrevented:n=!0}={}){return aO(function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)},`handleEvent`)}aO(sO,`composeEventHandlers`);function hoe(e){if(!oO)throw Error(`Cannot access window outside of the DOM`);return e?.ownerDocument?.defaultView??window}aO(hoe,`getOwnerWindow`);function cO(e){if(!oO)throw Error(`Cannot access document outside of the DOM`);return e?.ownerDocument??document}aO(cO,`getOwnerDocument`);function lO(e,t=!1){let{activeElement:n}=cO(e);if(!n?.nodeName)return null;if(uO(n)&&n.contentDocument)return lO(n.contentDocument.body,t);if(t){let e=n.getAttribute(`aria-activedescendant`);if(e){let t=cO(n).getElementById(e);if(t)return t}}return n}aO(lO,`getActiveElement`);function uO(e){return e.tagName===`IFRAME`}aO(uO,`isFrame`);function dO(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,H.jsx)(s.Provider,{value:c,children:r})};o.displayName=t+`Provider`;function s(n,o,s={}){let{optional:c=!1}=s,l=o?.[e]?.[a]||i,u=b.useContext(l);if(u)return u;if(r!==void 0)return r;if(!c)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,goe(i,...t)]}function goe(...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 fO(e){let t=b.useRef(e);return b.useEffect(()=>{t.current=e}),b.useMemo(()=>((...e)=>t.current?.(...e)),[])}var _oe=Object.defineProperty,pO=(e,t)=>_oe(e,`name`,{value:t,configurable:!0}),mO=`dismissableLayer.update`,voe=`dismissableLayer.pointerDownOutside`,yoe=`dismissableLayer.focusOutside`,hO,gO=b.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),_O=b.forwardRef(pO(function(e,t){let{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:s,onDismiss:c,...l}=e,u=b.useContext(gO),[d,f]=b.useState(null),p=d?.ownerDocument??globalThis?.document,[,m]=b.useState({}),h=Ii(t,f),g=Array.from(u.layers),[_]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=_?g.indexOf(_):-1,y=d?g.indexOf(d):-1,x=u.layersWithOutsidePointerEventsDisabled.size>0,S=y>=v,C=b.useRef(!1),w=yO(e=>{a?.(e),s?.(e),e.defaultPrevented||c?.()},{ownerDocument:p,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:C,dismissableSurfaces:u.dismissableSurfaces,shouldHandlePointerDownOutside:b.useCallback(e=>{if(!(e instanceof Node))return!1;let t=[...u.branches].some(t=>t.contains(e));return S&&!t},[u.branches,S])}),T=bO(e=>{if(r&&C.current)return;let t=e.target;[...u.branches].some(e=>e.contains(t))||(o?.(e),s?.(e),e.defaultPrevented||c?.())},p),E=d?y===g.length-1:!1,D=fO(e=>{e.key===`Escape`&&(i?.(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))});return b.useEffect(()=>{if(E)return p.addEventListener(`keydown`,D,{capture:!0}),()=>p.removeEventListener(`keydown`,D,{capture:!0})},[p,E,D]),b.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(hO=p.body.style.pointerEvents,p.body.style.pointerEvents=`none`),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),xO(),()=>{n&&(u.layersWithOutsidePointerEventsDisabled.delete(d),u.layersWithOutsidePointerEventsDisabled.size===0&&(p.body.style.pointerEvents=hO))}},[d,p,n,u]),b.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),xO())},[d,u]),b.useEffect(()=>{let e=pO(()=>m({}),`handleUpdate`);return document.addEventListener(mO,e),()=>document.removeEventListener(mO,e)},[]),(0,H.jsx)(QD.div,{...l,ref:h,style:{pointerEvents:x?S?`auto`:`none`:void 0,...e.style},onFocusCapture:sO(e.onFocusCapture,T.onFocusCapture),onBlurCapture:sO(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:sO(e.onPointerDownCapture,w.onPointerDownCapture)})},`DismissableLayer`));function vO(){let e=b.useContext(gO),[t,n]=b.useState(null);return b.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}pO(vO,`useDismissableLayerSurface`);var boe=pO(()=>!0,`IS_TRUE`);function yO(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:a,shouldHandlePointerDownOutside:o=boe}=t,s=fO(e),c=b.useRef(!1),l=b.useRef(!1),u=b.useRef(new Map),d=b.useRef(()=>{});return b.useEffect(()=>{function e(){l.current=!1,i.current=!1,u.current.clear()}pO(e,`resetOutsideInteraction`);function t(){return Array.from(u.current.values()).some(Boolean)}pO(t,`isOutsideInteractionIntercepted`);function f(e){if(!l.current)return;let t=e.target;t instanceof Node&&[...a].some(e=>e.contains(t))||u.current.set(e.type,!0),e.type===`click`&&window.setTimeout(()=>{l.current&&d.current()},0)}pO(f,`handleInteractionCapture`);function p(e){l.current&&u.current.set(e.type,!1)}pO(p,`handleInteractionBubble`);let m=pO(a=>{if(a.target&&!c.current){let f=function(){n.removeEventListener(`click`,d.current);let r=t();e(),r||SO(voe,s,p,{discrete:!0})};if(pO(f,`handleAndDispatchPointerDownOutsideEvent`),!o(a.target)){n.removeEventListener(`click`,d.current),e(),c.current=!1;return}let p={originalEvent:a};l.current=!0,i.current=r&&a.button===0,u.current.clear(),!r||a.button!==0?f():(n.removeEventListener(`click`,d.current),d.current=f,n.addEventListener(`click`,d.current,{once:!0}))}else n.removeEventListener(`click`,d.current),e();c.current=!1},`handlePointerDown`),h=[`pointerup`,`mousedown`,`mouseup`,`touchstart`,`touchend`,`click`];for(let e of h)n.addEventListener(e,f,!0),n.addEventListener(e,p);let g=window.setTimeout(()=>{n.addEventListener(`pointerdown`,m)},0);return()=>{window.clearTimeout(g),n.removeEventListener(`pointerdown`,m),n.removeEventListener(`click`,d.current);for(let e of h)n.removeEventListener(e,f,!0),n.removeEventListener(e,p)}},[n,s,r,i,a,o]),{onPointerDownCapture:pO(()=>c.current=!0,`onPointerDownCapture`)}}pO(yO,`usePointerDownOutside`);function bO(e,t=globalThis?.document){let n=fO(e),r=b.useRef(!1);return b.useEffect(()=>{let e=pO(e=>{e.target&&!r.current&&SO(yoe,n,{originalEvent:e},{discrete:!1})},`handleFocus`);return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:pO(()=>r.current=!0,`onFocusCapture`),onBlurCapture:pO(()=>r.current=!1,`onBlurCapture`)}}pO(bO,`useFocusOutside`);function xO(){let e=new CustomEvent(mO);document.dispatchEvent(e)}pO(xO,`dispatchUpdate`);function SO(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?$D(i,a):i.dispatchEvent(a)}pO(SO,`handleAndDispatchCustomEvent`);var CO=0,wO=null;function TO(){b.useEffect(()=>{wO||={start:EO(),end:EO()};let{start:e,end:t}=wO;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement(`afterbegin`,e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement(`beforeend`,t),CO++,()=>{CO===1&&(wO?.start.remove(),wO?.end.remove(),wO=null),CO=Math.max(0,CO-1)}},[])}function EO(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}var xoe=Object.defineProperty,DO=(e,t)=>xoe(e,`name`,{value:t,configurable:!0}),OO=`focusScope.autoFocusOnMount`,kO=`focusScope.autoFocusOnUnmount`,AO={bubbles:!1,cancelable:!0},jO=b.forwardRef(DO(function(e,t){let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=b.useState(null),l=fO(i),u=fO(a),d=b.useRef(null),f=Ii(t,c),p=b.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;b.useEffect(()=>{if(r){let e=function(e){if(p.paused||!s)return;let t=e.target;s.contains(t)?d.current=t:RO(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||RO(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&RO(s)};DO(e,`handleFocusIn`),DO(t,`handleFocusOut`),DO(n,`handleMutations`),document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,s,p.paused]),b.useEffect(()=>{if(s){zO.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(OO,AO);s.addEventListener(OO,l),s.dispatchEvent(t),t.defaultPrevented||(MO(HO(PO(s)),{select:!0}),document.activeElement===e&&RO(s))}return()=>{s.removeEventListener(OO,l),setTimeout(()=>{let t=new CustomEvent(kO,AO);s.addEventListener(kO,u),s.dispatchEvent(t),t.defaultPrevented||RO(e??document.body,{select:!0}),s.removeEventListener(kO,u),zO.remove(p)},0)}}},[s,l,u,p]);let m=b.useCallback(e=>{if(!n&&!r||p.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=NO(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&RO(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&RO(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return(0,H.jsx)(QD.div,{tabIndex:-1,...o,ref:f,onKeyDown:m})},`FocusScope`));function MO(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(RO(r,{select:t}),document.activeElement!==n)return}DO(MO,`focusFirst`);function NO(e){let t=PO(e);return[FO(t,e),FO(t.reverse(),e)]}DO(NO,`getTabbableEdges`);function PO(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:DO(e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},`acceptNode`)});for(;n.nextNode();)t.push(n.currentNode);return t}DO(PO,`getTabbableCandidates`);function FO(e,t){let n=typeof t.checkVisibility==`function`&&t.checkVisibility({checkVisibilityCSS:!0});for(let r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):IO(r,{upTo:t})))return r}DO(FO,`findVisible`);function IO(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}DO(IO,`isHidden`);function LO(e){return e instanceof HTMLInputElement&&`select`in e}DO(LO,`isSelectableInput`);function RO(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&LO(e)&&t&&e.select()}}DO(RO,`focus`);var zO=BO();function BO(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=VO(e,t),e.unshift(t)},remove(t){e=VO(e,t),e[0]?.resume()}}}DO(BO,`createFocusScopesStack`);function VO(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}DO(VO,`arrayRemove`);function HO(e){return e.filter(e=>e.tagName!==`A`)}DO(HO,`removeLinks`);var UO=globalThis?.document?b.useLayoutEffect:()=>{},WO=b.useId||(()=>void 0),GO=0;function KO(e){let[t,n]=b.useState(WO());return UO(()=>{e||n(e=>e??String(GO++))},[e]),e||(t?`radix-${t}`:``)}var qO=[`top`,`right`,`bottom`,`left`],JO=Math.min,YO=Math.max,XO=Math.round,ZO=Math.floor,QO=e=>({x:e,y:e}),$O={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function ek(e,t,n){return YO(e,JO(t,n))}function tk(e,t){return typeof e==`function`?e(t):e}function nk(e){return e.split(`-`)[0]}function rk(e){return e.split(`-`)[1]}function ik(e){return e===`x`?`y`:`x`}function ak(e){return e===`y`?`height`:`width`}function ok(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function sk(e){return ik(ok(e))}function ck(e,t,n){n===void 0&&(n=!1);let r=rk(e),i=sk(e),a=ak(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=_k(o)),[o,_k(o)]}function lk(e){let t=_k(e);return[uk(e),t,uk(t)]}function uk(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var dk=[`left`,`right`],fk=[`right`,`left`],pk=[`top`,`bottom`],mk=[`bottom`,`top`];function hk(e,t,n){switch(e){case`top`:case`bottom`:return n?t?fk:dk:t?dk:fk;case`left`:case`right`:return t?pk:mk;default:return[]}}function gk(e,t,n,r){let i=rk(e),a=hk(nk(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(uk)))),a}function _k(e){let t=nk(e);return $O[t]+e.slice(t.length)}function vk(e){return{top:0,right:0,bottom:0,left:0,...e}}function yk(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:vk(e)}function bk(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function xk(e,t,n){let{reference:r,floating:i}=e,a=ok(t),o=sk(t),s=ak(o),c=nk(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(rk(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function Sk(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=tk(t,e),p=yk(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=bk(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=bk(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var Ck=50,wk=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:Sk},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=xk(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<Ck&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=xk(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},Tk=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=tk(e,t)||{};if(l==null)return{};let d=yk(u),f={x:n,y:r},p=sk(i),m=ak(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=JO(d[_],T),D=JO(d[v],T),O=E,k=C-h[m]-D,A=C/2-h[m]/2+w,j=ek(O,A,k),M=!c.arrow&&rk(i)!=null&&A!==j&&a.reference[m]/2-(A<O?E:D)-h[m]/2<0,N=M?A<O?A-O:A-k:0;return{[p]:f[p]+N,data:{[p]:j,centerOffset:A-j-N,...M&&{alignmentOffset:N}},reset:M}}}),Ek=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=tk(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=nk(r),_=ok(o),v=nk(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[_k(o)]:lk(o)),x=p!==`none`;!d&&x&&b.push(...gk(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=ck(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==ok(t))||T.every(e=>ok(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=ok(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function Dk(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ok(e){return qO.some(t=>e[t]>=0)}var kk=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=tk(e,t);switch(i){case`referenceHidden`:{let e=Dk(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Ok(e)}}}case`escaped`:{let e=Dk(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Ok(e)}}}default:return{}}}}},Ak=new Set([`left`,`top`]);async function jk(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=nk(n),s=rk(n),c=ok(n)===`y`,l=Ak.has(o)?-1:1,u=a&&c?-1:1,d=tk(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var Mk=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await jk(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},Nk=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=tk(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=ok(nk(i)),p=ik(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=ek(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=ek(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},Pk=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=tk(e,t),u={x:n,y:r},d=ok(i),f=ik(d),p=u[f],m=u[d],h=tk(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=Ak.has(nk(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},Fk=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=tk(e,t),u=await o.detectOverflow(t,l),d=nk(i),f=rk(i),p=ok(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=JO(h-u[g],v),x=JO(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=YO(u.left,0),t=YO(u.right,0),n=YO(u.top,0),r=YO(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:YO(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:YO(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function Ik(){return typeof window<`u`}function Lk(e){return Bk(e)?(e.nodeName||``).toLowerCase():`#document`}function Rk(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function zk(e){return((Bk(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Bk(e){return Ik()?e instanceof Node||e instanceof Rk(e).Node:!1}function Vk(e){return Ik()?e instanceof Element||e instanceof Rk(e).Element:!1}function Hk(e){return Ik()?e instanceof HTMLElement||e instanceof Rk(e).HTMLElement:!1}function Uk(e){return!Ik()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof Rk(e).ShadowRoot}function Wk(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=tA(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function Gk(e){return/^(table|td|th)$/.test(Lk(e))}function Kk(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var qk=/transform|translate|scale|rotate|perspective|filter/,Jk=/paint|layout|strict|content/,Yk=e=>!!e&&e!==`none`,Xk;function Zk(e){let t=Vk(e)?tA(e):e;return Yk(t.transform)||Yk(t.translate)||Yk(t.scale)||Yk(t.rotate)||Yk(t.perspective)||!$k()&&(Yk(t.backdropFilter)||Yk(t.filter))||qk.test(t.willChange||``)||Jk.test(t.contain||``)}function Qk(e){let t=rA(e);for(;Hk(t)&&!eA(t);){if(Zk(t))return t;if(Kk(t))return null;t=rA(t)}return null}function $k(){return Xk??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),Xk}function eA(e){return/^(html|body|#document)$/.test(Lk(e))}function tA(e){return Rk(e).getComputedStyle(e)}function nA(e){return Vk(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function rA(e){if(Lk(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Uk(e)&&e.host||zk(e);return Uk(t)?t.host:t}function iA(e){let t=rA(e);return eA(t)?e.ownerDocument?e.ownerDocument.body:e.body:Hk(t)&&Wk(t)?t:iA(t)}function aA(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=iA(e),i=r===e.ownerDocument?.body,a=Rk(r);if(i){let e=oA(a);return t.concat(a,a.visualViewport||[],Wk(r)?r:[],e&&n?aA(e):[])}else return t.concat(r,aA(r,[],n))}function oA(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function sA(e){let t=tA(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=Hk(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=XO(n)!==a||XO(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function cA(e){return Vk(e)?e:e.contextElement}function lA(e){let t=cA(e);if(!Hk(t))return QO(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=sA(t),o=(a?XO(n.width):n.width)/r,s=(a?XO(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var Soe=QO(0);function uA(e){let t=Rk(e);return!$k()||!t.visualViewport?Soe:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Coe(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Rk(e)?!1:t}function dA(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=cA(e),o=QO(1);t&&(r?Vk(r)&&(o=lA(r)):o=lA(e));let s=Coe(a,n,r)?uA(a):QO(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=Rk(a),t=r&&Vk(r)?Rk(r):r,n=e,i=oA(n);for(;i&&r&&t!==n;){let e=lA(i),t=i.getBoundingClientRect(),r=tA(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=Rk(i),i=oA(n)}}return bk({width:u,height:d,x:c,y:l})}function fA(e,t){let n=nA(e).scrollLeft;return t?t.left+n:dA(zk(e)).left+n}function pA(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-fA(e,n),y:n.top+t.scrollTop}}function woe(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=zk(r),s=t?Kk(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=QO(1),u=QO(0),d=Hk(r);if((d||!d&&!a)&&((Lk(r)!==`body`||Wk(o))&&(c=nA(r)),d)){let e=dA(r);l=lA(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?pA(o,c):QO(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function Toe(e){return Array.from(e.getClientRects())}function Eoe(e){let t=zk(e),n=nA(e),r=e.ownerDocument.body,i=YO(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=YO(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+fA(e),s=-n.scrollTop;return tA(r).direction===`rtl`&&(o+=YO(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var mA=25;function Doe(e,t){let n=Rk(e),r=zk(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=$k();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=fA(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=mA&&(a-=o)}else l<=mA&&(a+=l);return{width:a,height:o,x:s,y:c}}function Ooe(e,t){let n=dA(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Hk(e)?lA(e):QO(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function hA(e,t,n){let r;if(t===`viewport`)r=Doe(e,n);else if(t===`document`)r=Eoe(zk(e));else if(Vk(t))r=Ooe(t,n);else{let n=uA(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return bk(r)}function gA(e,t){let n=rA(e);return n===t||!Vk(n)||eA(n)?!1:tA(n).position===`fixed`||gA(n,t)}function koe(e,t){let n=t.get(e);if(n)return n;let r=aA(e,[],!1).filter(e=>Vk(e)&&Lk(e)!==`body`),i=null,a=tA(e).position===`fixed`,o=a?rA(e):e;for(;Vk(o)&&!eA(o);){let t=tA(o),n=Zk(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||Wk(o)&&!n&&gA(e,o))?r=r.filter(e=>e!==o):i=t,o=rA(o)}return t.set(e,r),r}function Aoe(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Kk(t)?[]:koe(t,this._c):[].concat(n),r],o=hA(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=hA(t,a[e],i);s=YO(n.top,s),c=JO(n.right,c),l=JO(n.bottom,l),u=YO(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function joe(e){let{width:t,height:n}=sA(e);return{width:t,height:n}}function Moe(e,t,n){let r=Hk(t),i=zk(t),a=n===`fixed`,o=dA(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=QO(0);function l(){c.x=fA(i)}if(r||!r&&!a)if((Lk(t)!==`body`||Wk(i))&&(s=nA(t)),r){let e=dA(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?pA(i,s):QO(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function _A(e){return tA(e).position===`static`}function vA(e,t){if(!Hk(e)||tA(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return zk(e)===n&&(n=n.ownerDocument.body),n}function yA(e,t){let n=Rk(e);if(Kk(e))return n;if(!Hk(e)){let t=rA(e);for(;t&&!eA(t);){if(Vk(t)&&!_A(t))return t;t=rA(t)}return n}let r=vA(e,t);for(;r&&Gk(r)&&_A(r);)r=vA(r,t);return r&&eA(r)&&_A(r)&&!Zk(r)?n:r||Qk(e)||n}var Noe=async function(e){let t=this.getOffsetParent||yA,n=this.getDimensions,r=await n(e.floating);return{reference:Moe(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Poe(e){return tA(e).direction===`rtl`}var Foe={convertOffsetParentRelativeRectToViewportRelativeRect:woe,getDocumentElement:zk,getClippingRect:Aoe,getOffsetParent:yA,getElementRects:Noe,getClientRects:Toe,getDimensions:joe,getScale:lA,isElement:Vk,isRTL:Poe};function bA(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ioe(e,t){let n=null,r,i=zk(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=ZO(d),h=ZO(i.clientWidth-(u+f)),g=ZO(i.clientHeight-(d+p)),_=ZO(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:YO(0,JO(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!bA(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function xA(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=cA(e),u=i||a?[...l?aA(l):[],...t?aA(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?Ioe(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?dA(e):null;c&&g();function g(){let t=dA(e);h&&!bA(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var Loe=Mk,Roe=Nk,zoe=Ek,Boe=Fk,Voe=kk,SA=Tk,Hoe=Pk,Uoe=(e,t,n)=>{let r=new Map,i={platform:Foe,...n},a={...i.platform,_c:r};return wk(e,t,{...i,platform:a})},CA=typeof document<`u`?b.useLayoutEffect:function(){};function wA(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!wA(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!wA(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function TA(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function EA(e,t){let n=TA(e);return Math.round(t*n)/n}function DA(e){let t=b.useRef(e);return CA(()=>{t.current=e}),t}function OA(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=b.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=b.useState(r);wA(f,r)||p(r);let[m,h]=b.useState(null),[g,_]=b.useState(null),v=b.useCallback(e=>{e!==C.current&&(C.current=e,h(e))},[]),y=b.useCallback(e=>{e!==w.current&&(w.current=e,_(e))},[]),x=a||m,S=o||g,C=b.useRef(null),w=b.useRef(null),T=b.useRef(u),E=c!=null,D=DA(c),O=DA(i),k=DA(l),A=b.useCallback(()=>{if(!C.current||!w.current)return;let e={placement:t,strategy:n,middleware:f};O.current&&(e.platform=O.current),Uoe(C.current,w.current,e).then(e=>{let t={...e,isPositioned:k.current!==!1};j.current&&!wA(T.current,t)&&(T.current=t,SC.flushSync(()=>{d(t)}))})},[f,t,n,O,k]);CA(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let j=b.useRef(!1);CA(()=>(j.current=!0,()=>{j.current=!1}),[]),CA(()=>{if(x&&(C.current=x),S&&(w.current=S),x&&S){if(D.current)return D.current(x,S,A);A()}},[x,S,A,D,E]);let M=b.useMemo(()=>({reference:C,floating:w,setReference:v,setFloating:y}),[v,y]),N=b.useMemo(()=>({reference:x,floating:S}),[x,S]),P=b.useMemo(()=>{let e={position:n,left:0,top:0};if(!N.floating)return e;let t=EA(N.floating,u.x),r=EA(N.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...TA(N.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,N.floating,u.x,u.y]);return b.useMemo(()=>({...u,update:A,refs:M,elements:N,floatingStyles:P}),[u,A,M,N,P])}var Woe=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:SA({element:r.current,padding:i}).fn(n):r?SA({element:r,padding:i}).fn(n):{}}}},kA=(e,t)=>{let n=Loe(e);return{name:n.name,fn:n.fn,options:[e,t]}},AA=(e,t)=>{let n=Roe(e);return{name:n.name,fn:n.fn,options:[e,t]}},jA=(e,t)=>({fn:Hoe(e).fn,options:[e,t]}),MA=(e,t)=>{let n=zoe(e);return{name:n.name,fn:n.fn,options:[e,t]}},NA=(e,t)=>{let n=Boe(e);return{name:n.name,fn:n.fn,options:[e,t]}},PA=(e,t)=>{let n=Voe(e);return{name:n.name,fn:n.fn,options:[e,t]}},FA=(e,t)=>{let n=Woe(e);return{name:n.name,fn:n.fn,options:[e,t]}};function IA(e){let[t,n]=b.useState(void 0);return UO(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else n(void 0)},[e]),t}var Goe=Object.defineProperty,LA=(e,t)=>Goe(e,`name`,{value:t,configurable:!0}),RA=`Popper`,[zA,BA]=dO(RA),[Koe,VA]=zA(RA),qoe=LA(e=>{let{__scopePopper:t,children:n}=e,[r,i]=b.useState(null),[a,o]=b.useState(void 0);return(0,H.jsx)(Koe,{scope:t,anchor:r,onAnchorChange:i,placementState:a,setPlacementState:o,children:n})},`Popper`),Joe=`PopperAnchor`,Yoe=b.forwardRef(LA(function(e,t){let{__scopePopper:n,virtualRef:r,...i}=e,a=VA(Joe,n),o=b.useRef(null),s=a.onAnchorChange,c=Ii(t,b.useCallback(e=>{o.current=e,e&&s(e)},[s])),l=b.useRef(null);b.useEffect(()=>{if(!r)return;let e=l.current;l.current=r.current,e!==l.current&&s(l.current)});let u=a.placementState&&WA(a.placementState),d=u?.[0],f=u?.[1];return r?null:(0,H.jsx)(QD.div,{"data-radix-popper-side":d,"data-radix-popper-align":f,...i,ref:c})},`PopperAnchor`)),HA=`PopperContent`,[Xoe,Zoe]=zA(HA),Qoe=b.forwardRef(LA(function(e,t){let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:d=`partial`,hideWhenDetached:f=!1,updatePositionStrategy:p=`optimized`,onPlaced:m,...h}=e,g=VA(HA,n),[_,v]=b.useState(null),y=Ii(t,v),[x,S]=b.useState(null),C=IA(x),w=C?.width??0,T=C?.height??0,E=r+(a===`center`?``:`-`+a),D=typeof u==`number`?u:{top:0,right:0,bottom:0,left:0,...u},O=Array.isArray(l)?l:[l],k=O.length>0,A={padding:D,boundary:O.filter(UA),altBoundary:k},{refs:j,floatingStyles:M,placement:N,isPositioned:P,middlewareData:F}=OA({strategy:`fixed`,placement:E,whileElementsMounted:LA((...e)=>xA(...e,{animationFrame:p===`always`}),`whileElementsMounted`),elements:{reference:g.anchor},middleware:[kA({mainAxis:i+T,alignmentAxis:o}),c&&AA({mainAxis:!0,crossAxis:!1,limiter:d===`partial`?jA():void 0,...A}),c&&MA({...A}),NA({...A,apply:LA(({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)},`apply`)}),x&&FA({element:x,padding:s}),$oe({arrowWidth:w,arrowHeight:T}),f&&PA({strategy:`referenceHidden`,...A,boundary:k?A.boundary:void 0})]}),I=g.setPlacementState;UO(()=>(I(N),()=>{I(void 0)}),[N,I]);let[L,ee]=WA(N),te=fO(m);UO(()=>{P&&te?.()},[P,te]);let ne=F.arrow?.x,R=F.arrow?.y,z=F.arrow?.centerOffset!==0,[B,re]=b.useState();return UO(()=>{_&&re(window.getComputedStyle(_).zIndex)},[_]),(0,H.jsx)(`div`,{ref:j.setFloating,"data-radix-popper-content-wrapper":``,style:{...M,transform:P?M.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:B,"--radix-popper-transform-origin":[F.transformOrigin?.x,F.transformOrigin?.y].join(` `),...F.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,H.jsx)(Xoe,{scope:n,placedSide:L,placedAlign:ee,onArrowChange:S,arrowX:ne,arrowY:R,shouldHideArrow:z,children:(0,H.jsx)(QD.div,{"data-side":L,"data-align":ee,...h,ref:y,style:{...h.style,animation:P?h.style?.animation:`none`}})})})},`PopperContent`));function UA(e){return e!==null}LA(UA,`isNotNull`);var $oe=LA(e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=WA(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}}),`transformOrigin`);function WA(e){let[t,n=`center`]=e.split(`-`);return[t,n]}LA(WA,`getSideAndAlignFromPlacement`);var GA=qoe,KA=Yoe,qA=Qoe,ese=Object.defineProperty,JA=b.forwardRef(((e,t)=>ese(e,`name`,{value:t,configurable:!0}))(function(e,t){let{container:n,...r}=e,[i,a]=b.useState(!1);UO(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?SC.createPortal((0,H.jsx)(QD.div,{...r,ref:t}),o):null},`Portal`)),tse=Object.defineProperty,YA=(e,t)=>tse(e,`name`,{value:t,configurable:!0});function XA(e,t){return b.useReducer((e,n)=>t[e][n]??e,e)}YA(XA,`useStateMachine`);var ZA=YA(e=>{let{present:t,children:n}=e,r=QA(t),i=typeof n==`function`?n({present:r.isPresent}):b.Children.only(n),a=ej(r.ref,nj(i));return typeof n==`function`||r.isPresent?b.cloneElement(i,{ref:a}):null},`Presence`);function QA(e){let[t,n]=b.useState(),r=b.useRef(null),i=b.useRef(e),a=b.useRef(`none`),o=b.useRef(void 0),[s,c]=XA(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return b.useEffect(()=>{s===`mounted`?(a.current=o.current??tj(r.current),o.current=void 0):a.current=`none`},[s]),UO(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,s=tj(t);e?(o.current=s,c(`MOUNT`)):s===`none`||t?.display===`none`?c(`UNMOUNT`):c(n&&r!==s?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,c]),UO(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=YA(a=>{let o=tj(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(c(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},`handleAnimationEnd`),s=YA(e=>{e.target===t&&(a.current=tj(r.current))},`handleAnimationStart`);return t.addEventListener(`animationstart`,s),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,s),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}else c(`ANIMATION_END`)},[t,c]),{isPresent:[`mounted`,`unmountSuspended`].includes(s),ref:b.useCallback(e=>{if(e){let t=getComputedStyle(e);r.current=t,o.current=tj(t)}else r.current=null;n(e)},[])}}YA(QA,`usePresence`);function $A(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}YA($A,`setRef`);function ej(...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=$A(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():$A(n[e],null)}}},[])}YA(ej,`useStableComposedRefs`);function tj(e){return e?.animationName||`none`}YA(tj,`getAnimationName`);function nj(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)}YA(nj,`getElementRef`);var rj=b.useEffectEvent,ij=b.useInsertionEffect;function nse(e){if(typeof rj==`function`)return rj(e);let t=b.useRef(()=>{throw Error(`Cannot call an event handler while rendering.`)});return typeof ij==`function`?ij(()=>{t.current=e}):UO(()=>{t.current=e}),b.useMemo(()=>((...e)=>t.current?.(...e)),[])}var rse=Object.defineProperty,aj=(e,t)=>rse(e,`name`,{value:t,configurable:!0}),ise=b.useInsertionEffect||UO;function oj({prop:e,defaultProp:t,onChange:n=aj(()=>{},`onChange`),caller:r}){let[i,a,o]=sj({defaultProp:t,onChange:n}),s=e!==void 0;return[s?e:i,b.useCallback(t=>{if(s){let n=cj(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}aj(oj,`useControllableState`);function sj({defaultProp:e,onChange:t}){let[n,r]=b.useState(e),i=b.useRef(n),a=b.useRef(t);return ise(()=>{a.current=t},[t]),b.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}aj(sj,`useUncontrolledState`);function cj(e){return typeof e==`function`}aj(cj,`isFunction`);var lj=Symbol(`RADIX:SYNC_STATE`);function ase(e,t,n,r){let{prop:i,defaultProp:a,onChange:o,caller:s}=t,c=i!==void 0,l=nse(o),u=[{...n,state:a}];r&&u.push(r);let[d,f]=b.useReducer((t,n)=>{if(n.type===lj)return{...t,state:n.state};let r=e(t,n);return c&&!Object.is(r.state,t.state)&&l(r.state),r},...u),p=d.state,m=b.useRef(p);b.useEffect(()=>{m.current!==p&&(m.current=p,c||l(p))},[p,m,c]);let h=b.useMemo(()=>i===void 0?d:{...d,state:i},[d,i]);return b.useEffect(()=>{c&&!Object.is(i,d.state)&&f({type:lj,state:i})},[i,d.state,c]),[h,f]}aj(ase,`useControllableStateReducer`);var ose=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},uj=new WeakMap,dj=new WeakMap,fj={},pj=0,mj=function(e){return e&&(e.host||mj(e.parentNode))},sse=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=mj(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},cse=function(e,t,n,r){var i=sse(t,Array.isArray(e)?e:[e]);fj[n]||(fj[n]=new WeakMap);var a=fj[n],o=[],s=new Set,c=new Set(i),l=function(e){!e||s.has(e)||(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){!e||c.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(uj.get(e)||0)+1,l=(a.get(e)||0)+1;uj.set(e,c),a.set(e,l),o.push(e),c===1&&i&&dj.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),pj++,function(){o.forEach(function(e){var t=uj.get(e)-1,i=a.get(e)-1;uj.set(e,t),a.set(e,i),t||(dj.has(e)||e.removeAttribute(r),dj.delete(e)),i||e.removeAttribute(n)}),pj--,pj||(uj=new WeakMap,uj=new WeakMap,dj=new WeakMap,fj={})}},hj=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||ose(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),cse(r,i,n,`aria-hidden`)):function(){return null}},gj=function(){return gj=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},gj.apply(this,arguments)};function _j(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function vj(e){var t=typeof Symbol==`function`&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length==`number`)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)}function yj(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-->0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function bj(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var xj=`right-scroll-bar-position`,Sj=`width-before-scroll-bar`,Cj=`with-scroll-bars-hidden`,wj=`--removed-body-scroll-bar-size`;function Tj(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function Ej(e,t){var n=(0,b.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var Dj=typeof window<`u`?b.useLayoutEffect:b.useEffect,Oj=new WeakMap;function kj(e,t){var n=Ej(t||null,function(t){return e.forEach(function(e){return Tj(e,t)})});return Dj(function(){var t=Oj.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||Tj(e,null)}),i.forEach(function(e){r.has(e)||Tj(e,a)})}Oj.set(n,e)},[e]),n}function Aj(e){return e}function jj(e,t){t===void 0&&(t=Aj);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function Mj(e){e===void 0&&(e={});var t=jj(null);return t.options=gj({async:!0,ssr:!1},e),t}var Nj=function(e){var t=e.sideCar,n=_j(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return b.createElement(r,gj({},n))};Nj.isSideCarExport=!0;function Pj(e,t){return e.useMedium(t),Nj}var Fj=Mj(),Ij=function(){},Lj=b.forwardRef(function(e,t){var n=b.useRef(null),r=b.useState({onScrollCapture:Ij,onWheelCapture:Ij,onTouchMoveCapture:Ij}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,_=e.as,v=_===void 0?`div`:_,y=e.gapMode,x=_j(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),S=f,C=kj([n,t]),w=gj(gj({},x),i);return b.createElement(b.Fragment,null,u&&b.createElement(S,{sideCar:Fj,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:y}),o?b.cloneElement(b.Children.only(s),gj(gj({},w),{ref:C})):b.createElement(v,gj({},w,{className:c,ref:C}),s))});Lj.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Lj.classNames={fullWidth:Sj,zeroRight:xj};var Rj,zj=function(){if(Rj)return Rj;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function Bj(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=zj();return t&&e.setAttribute(`nonce`,t),e}function Vj(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Hj(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var Uj=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Bj())&&(Vj(t,n),Hj(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Wj=function(){var e=Uj();return function(t,n){b.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Gj=function(){var e=Wj();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},Kj={left:0,top:0,right:0,gap:0},qj=function(e){return parseInt(e||``,10)||0},Jj=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[qj(n),qj(r),qj(i)]},Yj=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return Kj;var t=Jj(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Xj=Gj(),Zj=`data-scroll-locked`,Qj=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
79
+ .${Cj} {
80
+ overflow: hidden ${r};
81
+ padding-right: ${s}px ${r};
82
+ }
83
+ body[${Zj}] {
84
+ overflow: hidden ${r};
85
+ overscroll-behavior: contain;
86
+ ${[t&&`position: relative ${r};`,n===`margin`&&`
87
+ padding-left: ${i}px;
88
+ padding-top: ${a}px;
89
+ padding-right: ${o}px;
90
+ margin-left:0;
91
+ margin-top:0;
92
+ margin-right: ${s}px ${r};
93
+ `,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)}
94
+ }
95
+
96
+ .${xj} {
97
+ right: ${s}px ${r};
98
+ }
99
+
100
+ .${Sj} {
101
+ margin-right: ${s}px ${r};
102
+ }
103
+
104
+ .${xj} .${xj} {
105
+ right: 0 ${r};
106
+ }
107
+
108
+ .${Sj} .${Sj} {
109
+ margin-right: 0 ${r};
110
+ }
111
+
112
+ body[${Zj}] {
113
+ ${wj}: ${s}px;
114
+ }
115
+ `},$j=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},eM=function(){b.useEffect(function(){return document.body.setAttribute(Zj,($j()+1).toString()),function(){var e=$j()-1;e<=0?document.body.removeAttribute(Zj):document.body.setAttribute(Zj,e.toString())}},[])},tM=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;eM();var a=b.useMemo(function(){return Yj(i)},[i]);return b.createElement(Xj,{styles:Qj(a,!t,i,n?``:`!important`)})},nM=!1;if(typeof window<`u`)try{var rM=Object.defineProperty({},"passive",{get:function(){return nM=!0,!0}});window.addEventListener(`test`,rM,rM),window.removeEventListener(`test`,rM,rM)}catch{nM=!1}var iM=nM?{passive:!1}:!1,aM=function(e){return e.tagName===`TEXTAREA`},oM=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!aM(e)&&n[t]===`visible`)},sM=function(e){return oM(e,`overflowY`)},cM=function(e){return oM(e,`overflowX`)},lM=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),fM(e,r)){var i=pM(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},uM=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},dM=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},fM=function(e,t){return e===`v`?sM(t):cM(t)},pM=function(e,t){return e===`v`?uM(t):dM(t)},mM=function(e,t){return e===`h`&&t===`rtl`?-1:1},hM=function(e,t,n,r,i){var a=mM(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=pM(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&fM(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},gM=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},_M=function(e){return[e.deltaX,e.deltaY]},vM=function(e){return e&&`current`in e?e.current:e},yM=function(e,t){return e[0]===t[0]&&e[1]===t[1]},bM=function(e){return`
116
+ .block-interactivity-${e} {pointer-events: none;}
117
+ .allow-interactivity-${e} {pointer-events: all;}
118
+ `},xM=0,SM=[];function CM(e){var t=b.useRef([]),n=b.useRef([0,0]),r=b.useRef(),i=b.useState(xM++)[0],a=b.useState(Gj)[0],o=b.useRef(e);b.useEffect(function(){o.current=e},[e]),b.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=bj([e.lockRef.current],(e.shards||[]).map(vM),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=b.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=gM(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=lM(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=lM(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return hM(h,t,e,h===`h`?s:c,!0)},[]),c=b.useCallback(function(e){var n=e;if(!(!SM.length||SM[SM.length-1]!==a)){var r=`deltaY`in n?_M(n):gM(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&yM(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(vM).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=b.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:wM(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=b.useCallback(function(e){n.current=gM(e),r.current=void 0},[]),d=b.useCallback(function(t){l(t.type,_M(t),t.target,s(t,e.lockRef.current))},[]),f=b.useCallback(function(t){l(t.type,gM(t),t.target,s(t,e.lockRef.current))},[]);b.useEffect(function(){return SM.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,iM),document.addEventListener(`touchmove`,c,iM),document.addEventListener(`touchstart`,u,iM),function(){SM=SM.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,iM),document.removeEventListener(`touchmove`,c,iM),document.removeEventListener(`touchstart`,u,iM)}},[]);var p=e.removeScrollBar,m=e.inert;return b.createElement(b.Fragment,null,m?b.createElement(a,{styles:bM(i)}):null,p?b.createElement(tM,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function wM(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var TM=Pj(Fj,CM),EM=b.forwardRef(function(e,t){return b.createElement(Lj,gj({},e,{ref:t,sideCar:TM}))});EM.classNames=Lj.classNames;var DM=Object.defineProperty,OM=(e,t)=>DM(e,`name`,{value:t,configurable:!0}),kM=`Popover`,[AM,lse]=dO(kM,[BA]),jM=BA(),[MM,NM]=AM(kM),PM=OM(e=>{let{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!1}=e,s=jM(t),c=b.useRef(null),[l,u]=b.useState(!1),[d,f]=oj({prop:r,defaultProp:i??!1,onChange:a,caller:kM});return(0,H.jsx)(GA,{...s,children:(0,H.jsx)(MM,{scope:t,contentId:KO(),triggerRef:c,open:d,onOpenChange:f,onOpenToggle:b.useCallback(()=>f(e=>!e),[f]),hasCustomAnchor:l,onCustomAnchorAdd:b.useCallback(()=>u(!0),[]),onCustomAnchorRemove:b.useCallback(()=>u(!1),[]),modal:o,children:n})})},`Popover`),FM=`PopoverAnchor`,IM=b.forwardRef(OM(function(e,t){let{__scopePopover:n,...r}=e,i=NM(FM,n),a=jM(n),{onCustomAnchorAdd:o,onCustomAnchorRemove:s}=i;return b.useEffect(()=>(o(),()=>s()),[o,s]),(0,H.jsx)(KA,{...a,...r,ref:t})},`PopoverAnchor`)),LM=`PopoverTrigger`,RM=b.forwardRef(OM(function(e,t){let{__scopePopover:n,...r}=e,i=NM(LM,n),a=jM(n),o=Ii(t,i.triggerRef),s=(0,H.jsx)(QD.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":YM(i.open),...r,ref:o,onClick:sO(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?s:(0,H.jsx)(KA,{asChild:!0,...a,children:s})},`PopoverTrigger`)),zM=`PopoverPortal`,[BM,VM]=AM(zM,{forceMount:void 0}),HM=OM(e=>{let{__scopePopover:t,forceMount:n,children:r,container:i}=e,a=NM(zM,t);return(0,H.jsx)(BM,{scope:t,forceMount:n,children:(0,H.jsx)(ZA,{present:n||a.open,children:(0,H.jsx)(JA,{asChild:!0,container:i,children:r})})})},`PopoverPortal`),UM=`PopoverContent`,WM=b.forwardRef(OM(function(e,t){let n=VM(UM,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,a=NM(UM,e.__scopePopover);return(0,H.jsx)(ZA,{present:r||a.open,children:a.modal?(0,H.jsx)(KM,{...i,ref:t}):(0,H.jsx)(qM,{...i,ref:t})})},`PopoverContent`)),GM=Li(`PopoverContent.RemoveScroll`),KM=b.forwardRef(OM(function(e,t){let n=NM(UM,e.__scopePopover),r=b.useRef(null),i=Ii(t,r),a=b.useRef(!1);return b.useEffect(()=>{let e=r.current;if(e)return hj(e)},[]),(0,H.jsx)(EM,{as:GM,allowPinchZoom:!0,children:(0,H.jsx)(JM,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:sO(e.onCloseAutoFocus,e=>{e.preventDefault(),a.current||n.triggerRef.current?.focus()}),onPointerDownOutside:sO(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;a.current=r},{checkForDefaultPrevented:!1}),onFocusOutside:sO(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})},`PopoverContentModal`)),qM=b.forwardRef(OM(function(e,t){let n=NM(UM,e.__scopePopover),r=b.useRef(!1),i=b.useRef(!1);return(0,H.jsx)(JM,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})},`PopoverContentNonModal`)),JM=b.forwardRef(OM(function(e,t){let{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:o,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onInteractOutside:u,...d}=e,f=NM(UM,n),p=jM(n);return TO(),(0,H.jsx)(jO,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,H.jsx)(_O,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:u,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>f.onOpenChange(!1),deferPointerDownOutside:!0,children:(0,H.jsx)(qA,{"data-state":YM(f.open),role:`dialog`,id:f.contentId,...p,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-popover-content-available-width":`var(--radix-popper-available-width)`,"--radix-popover-content-available-height":`var(--radix-popper-available-height)`,"--radix-popover-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-popover-trigger-height":`var(--radix-popper-anchor-height)`}})})})},`PopoverContentImpl`));function YM(e){return e?`open`:`closed`}OM(YM,`getState`);var XM=PM,ZM=IM,QM=RM,$M=HM,eN=WM;function tN({...e}){return(0,H.jsx)(XM,{"data-slot":`popover`,...e})}function nN({...e}){return(0,H.jsx)(QM,{"data-slot":`popover-trigger`,...e})}function rN({...e}){return(0,H.jsx)(ZM,{"data-slot":`popover-anchor`,...e})}function iN({className:e,align:t=`center`,sideOffset:n=4,...r}){return(0,H.jsx)($M,{children:(0,H.jsx)(eN,{"data-slot":`popover-content`,align:t,sideOffset:n,className:Mr(`bg-popover text-popover-foreground`,`z-50 w-72 rounded-md border border-border-secondary p-4 shadow-lg outline-hidden`,`origin-(--radix-popover-content-transform-origin)`,`data-[state=open]:animate-in data-[state=closed]:animate-out`,`data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0`,`data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95`,`data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2`,`data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2`,e),...r})})}var aN=Ni(`motion-safe:animate-spin`,{variants:{variant:{primary:`text-primary`,secondary:`text-muted-foreground`},size:{sm:`size-3.5`,md:`size-4`,lg:`size-5`,xl:`size-8`}},defaultVariants:{variant:`primary`,size:`md`}});function oN({className:e,variant:t,size:n,...r}){return(0,H.jsx)(ci,{role:`status`,"aria-label":`Loading`,className:Mr(aN({variant:t,size:n}),e),...r})}var sN=Ni(`size-2.5 rounded-full`,{variants:{variant:{success:`bg-success`,destructive:`bg-destructive`,warning:`bg-warning`,muted:`bg-muted-foreground`},pulse:{true:`animate-pulse`,false:``}},defaultVariants:{variant:`muted`,pulse:!1}});function cN({className:e,variant:t,pulse:n,...r}){return(0,H.jsx)(`div`,{className:Mr(sN({variant:t,pulse:n}),e),...r})}function lN(...e){return jr(nn(e))}function uN(e){let t=new DOMParser().parseFromString(e,`text/html`),n=t.querySelector(`script[type="module"]#dev-view-entry`);if(!n)throw Error(`dev-view-entry script not found`);return n.textContent=`
119
+
120
+ const waitForOpenAI = () => new Promise((resolve, reject) => {
121
+ if (typeof window === "undefined") { reject(new Error("window is not available")); return; }
122
+ if ("openai" in window && window.openai != null) { resolve(); return; }
123
+ Object.defineProperty(window, "openai", {
124
+ configurable: true,
125
+ enumerable: true,
126
+ get() { return undefined; },
127
+ set(value) {
128
+ Object.defineProperty(window, "openai", {
129
+ configurable: true,
130
+ enumerable: true,
131
+ writable: true,
132
+ value,
133
+ });
134
+ resolve();
135
+ },
136
+ });
137
+ });
138
+
139
+ await waitForOpenAI();
140
+ ${n.textContent}
141
+ `,t.head.innerHTML+t.body.innerHTML}var dN=e=>typeof e==`string`?e:void 0,fN=(e,t)=>{let n=e.contentDocument;if(!n?.body)return 0;let r=t?.parentElement?.clientHeight??0,i=r>0?r:1/0,a=n.getElementById(`root`),o=a?a.getBoundingClientRect().height:Math.max(n.body.scrollHeight,n.documentElement.scrollHeight);return Math.min(o,i)};function pN(e){if(e<1024)return`${e}b`;let t=e/1024;if(t<1024)return`${t<10?t.toFixed(1):Math.round(t)}kb`;let n=t/1024;return`${n<10?n.toFixed(1):Math.round(n)}mb`}var mN={width:390,height:844},hN=1500;function gN(){let[e,t]=(0,b.useState)(!1),n=(0,b.useRef)(null);return(0,b.useEffect)(()=>()=>{n.current&&clearTimeout(n.current)},[]),{copied:e,copy:(0,b.useCallback)(async e=>{try{await navigator.clipboard.writeText(e),t(!0),n.current&&clearTimeout(n.current),n.current=setTimeout(()=>t(!1),hN)}catch(e){console.error(`Clipboard write failed`,e)}},[])}}function _N({value:e,label:t,className:n,stopPropagation:r}){let{copied:i,copy:a}=gN();return(0,H.jsx)(`button`,{type:`button`,"aria-label":t,onClick:t=>{r&&t.stopPropagation(),a(e)},className:lN(`text-quaternary-foreground hover:text-foreground`,n),children:i?(0,H.jsx)(Kr,{className:`size-3.5`}):(0,H.jsx)(ti,{className:`size-3.5`})})}var vN=J({id:G(),name:G()}),yN=dm(`state`,[J({state:Y(`signedOut`)}),J({state:Y(`noTeam`)}),J({state:Y(`needsProject`),teams:q(vN),defaultTeamId:G(),staleConfig:em().optional()}),J({state:Y(`ready`),lastDeployGit:J({ref:G().nullable(),commitMessage:G().nullable(),author:G().nullable()}).nullable().optional(),lastDeployStatus:_m([`ongoing`,`deployed`,`failed`,`canceled`]).optional(),lastDeployStartedAt:K().optional(),mcpServerUrl:G().optional(),deploymentPageUrl:G().nullable().optional()}),J({state:Y(`error`),message:G()})]),bN=dm(`status`,[J({status:Y(`idle`)}),J({status:Y(`deploying`),startedAt:K(),deploymentPageUrl:G().nullable()}),J({status:Y(`deployed`),mcpServerUrl:G(),deploymentPageUrl:G().nullable()}),J({status:Y(`failed`),message:G(),deploymentPageUrl:G().nullable()})]),xN=`/__skybridge/deploy`;async function SN(e,t,n=`Request failed`){let r=await fetch(e,{method:`POST`,...t!==void 0&&{headers:{"Content-Type":`application/json`},body:JSON.stringify(t)}});if(!r.ok){let{message:e}=await r.json().catch(()=>({}));throw Error(e??`${n} (${r.status})`)}}var CN=()=>({status:`deploying`,startedAt:Date.now(),deploymentPageUrl:null}),wN=as()((e,t)=>({status:{state:`loading`},progress:{status:`idle`},async refreshStatus(){try{let t=await fetch(`${xN}/status`),n=yN.safeParse(await t.json());e({status:n.success?n.data:{state:`error`,message:`Unexpected status response`}})}catch{e({status:{state:`error`,message:`Can't reach the dev server.`}})}},async signIn(){await SN(`${xN}/login`,void 0,`Sign-in failed`),await t().refreshStatus()},async createAndDeploy(t,n,r){e({progress:CN()});try{await SN(`${xN}/project`,{name:t,teamId:n,teamName:r},`Failed to create project`)}catch(t){throw e({progress:{status:`idle`}}),t}},async redeploy(){e({progress:CN()});try{await SN(xN,void 0,`Failed to deploy`)}catch(t){throw e({progress:{status:`idle`}}),t}},connect(){let n=new EventSource(`${xN}/events`);return n.addEventListener(`state`,n=>{try{let r=bN.safeParse(JSON.parse(n.data));if(r.success){let n=t().progress.status;e({progress:r.data}),(r.data.status===`deployed`||r.data.status===`failed`)&&r.data.status!==n&&t().refreshStatus()}}catch{}}),()=>{n.close()}}}));function TN(){let e=wN(e=>e.connect),t=wN(e=>e.refreshStatus),n=wN(e=>e.status.state===`ready`&&e.status.lastDeployStatus===`ongoing`);(0,b.useEffect)(()=>(t(),e()),[e,t]),(0,b.useEffect)(()=>{if(!n)return;let e=setInterval(()=>void t(),4e3);return()=>clearInterval(e)},[n,t])}var EN=dm(`status`,[J({status:Y(`idle`)}),J({status:Y(`starting`),message:G()}),J({status:Y(`connected`),url:G()}),J({status:Y(`error`),message:G()})]),DN=`/__skybridge/tunnel`,ON=as()((e,t)=>({state:{status:`idle`},async start(){if(!(t().state.status===`starting`||t().state.status===`connected`)){e({state:{status:`starting`,message:`Starting tunnel…`}});try{let e=await fetch(DN,{method:`POST`});if(!e.ok)throw Error(`Tunnel start failed (${e.status})`)}catch(n){t().state.status!==`connected`&&e({state:{status:`error`,message:n instanceof Error?n.message:`Failed to start tunnel`}})}}},async stop(){try{await fetch(DN,{method:`DELETE`})}catch{}},connect(){let t=new EventSource(`${DN}/events`);return t.addEventListener(`state`,t=>{if(t instanceof MessageEvent)try{let n=EN.safeParse(JSON.parse(t.data));n.success&&e({state:n.data})}catch{}}),t.addEventListener(`error`,()=>{t.readyState===EventSource.CLOSED&&e({state:{status:`error`,message:`Lost tunnel connection`}})}),()=>{t.close()}}}));function kN(){let e=ON(e=>e.connect);(0,b.useEffect)(()=>e(),[e])}var AN=Object.defineProperty,jN=(e,t)=>AN(e,`name`,{value:t,configurable:!0}),MN=`Dialog`,[NN,use]=dO(MN),[PN,FN]=NN(MN),IN=jN(e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=b.useRef(null),c=b.useRef(null),[l,u]=oj({prop:r,defaultProp:i??!1,onChange:a,caller:MN}),[d,f]=b.useState(0),[p,m]=b.useState(0);return(0,H.jsx)(PN,{scope:t,triggerRef:s,contentRef:c,contentId:KO(),titleId:KO(),descriptionId:KO(),titlePresent:d>0,descriptionPresent:p>0,setTitleCount:f,setDescriptionCount:m,open:l,onOpenChange:u,onOpenToggle:b.useCallback(()=>u(e=>!e),[u]),modal:o,children:n})},`Dialog`),LN=`DialogPortal`,[RN,zN]=NN(LN,{forceMount:void 0}),BN=jN(e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=FN(LN,t);return(0,H.jsx)(RN,{scope:t,forceMount:n,children:b.Children.map(r,e=>(0,H.jsx)(ZA,{present:n||a.open,children:(0,H.jsx)(JA,{asChild:!0,container:i,children:e})}))})},`DialogPortal`),VN=`DialogOverlay`,HN=b.forwardRef(jN(function(e,t){let n=zN(VN,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=FN(VN,e.__scopeDialog);return a.modal?(0,H.jsx)(ZA,{present:r||a.open,children:(0,H.jsx)(WN,{...i,ref:t})}):null},`DialogOverlay`)),UN=Li(`DialogOverlay.RemoveScroll`),WN=b.forwardRef(jN(function(e,t){let{__scopeDialog:n,...r}=e,i=FN(VN,n),a=Ii(t,vO());return(0,H.jsx)(EM,{as:UN,allowPinchZoom:!0,shards:[i.contentRef],children:(0,H.jsx)(QD.div,{"data-state":nP(i.open),...r,ref:a,style:{pointerEvents:`auto`,...r.style}})})},`DialogOverlayImpl`)),GN=`DialogContent`,KN=b.forwardRef(jN(function(e,t){let n=zN(GN,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=FN(GN,e.__scopeDialog);return(0,H.jsx)(ZA,{present:r||a.open,children:a.modal?(0,H.jsx)(qN,{...i,ref:t}):(0,H.jsx)(JN,{...i,ref:t})})},`DialogContent`)),qN=b.forwardRef(jN(function(e,t){let n=FN(GN,e.__scopeDialog),r=b.useRef(null),i=Ii(t,n.contentRef,r);return b.useEffect(()=>{let e=r.current;if(e)return hj(e)},[]),(0,H.jsx)(YN,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:sO(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:sO(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:sO(e.onFocusOutside,e=>e.preventDefault())})},`DialogContentModal`)),JN=b.forwardRef(jN(function(e,t){let n=FN(GN,e.__scopeDialog),r=b.useRef(!1),i=b.useRef(!1);return(0,H.jsx)(YN,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})},`DialogContentNonModal`)),YN=b.forwardRef(jN(function(e,t){let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=FN(GN,n);return TO(),(0,H.jsx)(H.Fragment,{children:(0,H.jsx)(jO,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,H.jsx)(_O,{role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionPresent?s.descriptionId:void 0,"aria-labelledby":s.titlePresent?s.titleId:void 0,"data-state":nP(s.open),...o,ref:t,deferPointerDownOutside:!0,onDismiss:()=>s.onOpenChange(!1)})})})},`DialogContentImpl`)),XN=`DialogTitle`,ZN=b.forwardRef(jN(function(e,t){let{__scopeDialog:n,...r}=e,i=FN(XN,n),{setTitleCount:a}=i;return UO(()=>(a(e=>e+1),()=>a(e=>e-1)),[a]),(0,H.jsx)(QD.h2,{id:i.titleId,...r,ref:t})},`DialogTitle`)),QN=`DialogDescription`,$N=b.forwardRef(jN(function(e,t){let{__scopeDialog:n,...r}=e,i=FN(QN,n),{setDescriptionCount:a}=i;return UO(()=>(a(e=>e+1),()=>a(e=>e-1)),[a]),(0,H.jsx)(QD.p,{id:i.descriptionId,...r,ref:t})},`DialogDescription`)),eP=`DialogClose`,tP=b.forwardRef(jN(function(e,t){let{__scopeDialog:n,...r}=e,i=FN(eP,n);return(0,H.jsx)(QD.button,{type:`button`,...r,ref:t,onClick:sO(e.onClick,()=>i.onOpenChange(!1))})},`DialogClose`));function nP(e){return e?`open`:`closed`}jN(nP,`getState`);function rP({...e}){return(0,H.jsx)(IN,{"data-slot":`dialog`,...e})}function iP({...e}){return(0,H.jsx)(BN,{"data-slot":`dialog-portal`,...e})}function aP({className:e,...t}){return(0,H.jsx)(HN,{"data-slot":`dialog-overlay`,className:Mr(`fixed inset-0 z-50 bg-overlay`,`data-[state=open]:animate-in data-[state=closed]:animate-out`,`data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0`,e),...t})}var oP=Ni([`bg-background fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2`,`max-h-[calc(100vh-4rem)] overflow-hidden rounded-2xl px-6 shadow-lg outline-none`,`data-[state=open]:animate-in data-[state=closed]:animate-out`,`data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0`,`data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95`,`duration-200`].join(` `),{variants:{size:{sm:`max-w-[400px]`,lg:`max-w-[544px]`}},defaultVariants:{size:`sm`}});function sP({className:e,children:t,size:n,showCloseButton:r=!0,...i}){return(0,H.jsxs)(iP,{children:[(0,H.jsx)(aP,{}),(0,H.jsxs)(KN,{"data-slot":`dialog-content`,className:Mr(oP({size:n}),e),...i,children:[t,r&&(0,H.jsxs)(tP,{"data-slot":`dialog-close`,className:Mr(`absolute top-3 right-4 flex size-8 items-center justify-center rounded-md`,`text-subtle-foreground transition-colors`,`[@media(hover:hover)]:hover:text-foreground`,`focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none`,`disabled:pointer-events-none`),children:[(0,H.jsx)(Ai,{className:`size-4`}),(0,H.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function cP({className:e,...t}){return(0,H.jsx)(`div`,{"data-slot":`dialog-header`,className:Mr(`flex flex-col gap-0.5 py-6 pr-10`,e),...t})}var lP=Ni(`pb-6 pt-6`,{variants:{layout:{horizontal:`flex gap-3 [&>*]:flex-1`,vertical:`flex flex-col gap-3`}},defaultVariants:{layout:`horizontal`}});function uP({className:e,layout:t,...n}){return(0,H.jsx)(`div`,{"data-slot":`dialog-footer`,className:Mr(lP({layout:t}),e),...n})}function dP({className:e,...t}){return(0,H.jsx)(ZN,{"data-slot":`dialog-title`,className:Mr(`type-text-md font-semibold text-foreground`,e),...t})}function fP({className:e,...t}){return(0,H.jsx)($N,{"data-slot":`dialog-description`,className:Mr(`type-text-sm text-subtle-foreground`,e),...t})}var pP=Object.defineProperty,mP=(e,t)=>pP(e,`name`,{value:t,configurable:!0}),hP=!!(typeof window<`u`&&window.document&&window.document.createElement);function gP(e,t,{checkForDefaultPrevented:n=!0}={}){return mP(function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)},`handleEvent`)}mP(gP,`composeEventHandlers`);function _P(e){if(!hP)throw Error(`Cannot access window outside of the DOM`);return e?.ownerDocument?.defaultView??window}mP(_P,`getOwnerWindow`);function vP(e){if(!hP)throw Error(`Cannot access document outside of the DOM`);return e?.ownerDocument??document}mP(vP,`getOwnerDocument`);function yP(e,t=!1){let{activeElement:n}=vP(e);if(!n?.nodeName)return null;if(bP(n)&&n.contentDocument)return yP(n.contentDocument.body,t);if(t){let e=n.getAttribute(`aria-activedescendant`);if(e){let t=vP(n).getElementById(e);if(t)return t}}return n}mP(yP,`getActiveElement`);function bP(e){return e.tagName===`IFRAME`}mP(bP,`isFrame`);var xP=Object.defineProperty,SP=(e,t)=>xP(e,`name`,{value:t,configurable:!0});function CP(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}SP(CP,`setRef`);function wP(...e){return t=>{let n=!1,r=e.map(e=>{let r=CP(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():CP(e[t],null)}}}}SP(wP,`composeRefs`);function TP(...e){return b.useCallback(wP(...e),e)}SP(TP,`useComposedRefs`);var EP=Object.defineProperty,DP=(e,t)=>EP(e,`name`,{value:t,configurable:!0});function OP(e,t){let n=b.createContext(t);n.displayName=e+`Context`;let r=DP(e=>{let{children:t,...r}=e,i=b.useMemo(()=>r,Object.values(r));return(0,H.jsx)(n.Provider,{value:i,children:t})},`Provider`);r.displayName=e+`Provider`;function i(r,i={}){let{optional:a=!1}=i,o=b.useContext(n);if(o)return o;if(t!==void 0)return t;if(!a)throw Error(`\`${r}\` must be used within \`${e}\``)}return DP(i,`useContext`),[r,i]}DP(OP,`createContext`);function kP(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=DP(t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=b.useMemo(()=>o,Object.values(o));return(0,H.jsx)(s.Provider,{value:c,children:r})},`Provider`);o.displayName=t+`Provider`;function s(n,o,s={}){let{optional:c=!1}=s,l=o?.[e]?.[a]||i,u=b.useContext(l);if(u)return u;if(r!==void 0)return r;if(!c)throw Error(`\`${n}\` must be used within \`${t}\``)}return DP(s,`useContext`),[o,s]}DP(r,`createContext`);let i=DP(()=>{let t=n.map(e=>b.createContext(e));return DP(function(n){let r=n?.[e]||t;return b.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])},`useScope`)},`createScope`);return i.scopeName=e,[r,AP(i,...t)]}DP(kP,`createContextScope`);function AP(...e){let t=e[0];if(e.length===1)return t;let n=DP(()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return DP(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])},`useComposedScopes`)},`createScope`);return n.scopeName=t.scopeName,n}DP(AP,`composeContextScopes`);var jP=Object.defineProperty,MP=(e,t)=>jP(e,`name`,{value:t,configurable:!0}),NP=MP(((e,t)=>{let n={...t};for(let r in t){let i=e[r],a=t[r];if(/^on[A-Z]/.test(r))if(i&&a){let e=typeof i==`function`,t=typeof a==`function`;n[r]=(...n)=>{let r=t?a(...n):void 0;return e&&i(...n),r}}else i&&(n[r]=i);else r===`style`?n[r]={...typeof i==`object`?i:null,...typeof a==`object`?a:null}:r===`className`?n[r]=[i,a].filter(Boolean).join(` `):r===`aria-describedby`&&(n[r]=PP(a,i))}return{...e,...n}}),`mergeProps`);function PP(...e){let t=new Set;for(let n of e)if(typeof n==`string`)for(let e of String(n).trim().split(/\s+/))e&&t.add(e);return t.size>0?Array.from(t).join(` `):void 0}MP(PP,`concatAriaDescribedby`);var FP=b.createContext(NP);FP.displayName=`SlotContext`;function IP(e){let t=b.forwardRef((t,n)=>{let r=b.useContext(FP),{children:i,mergeProps:a=r,...o}=t,s=null,c=!1,l=[];WP(i)&&typeof JP==`function`&&(i=JP(i._payload)),b.Children.forEach(i,e=>{if(HP(e)){c=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;WP(n)&&typeof JP==`function`&&(n=JP(n._payload)),s=BP(t,n),l.push(s?.props?.children)}else l.push(e)}),s?s=b.cloneElement(s,void 0,l):!c&&b.Children.count(i)===1&&b.isValidElement(i)&&(s=i);let u=s?VP(s):void 0,d=TP(n,u);if(!s){if(i||i===0)throw Error(c?qP(e):KP(e));return i}let f=a(o,s.props??{});return s.type!==b.Fragment&&(f.ref=n?d:u),b.cloneElement(s,f)});return t.displayName=`${e}.Slot`,t}MP(IP,`createSlot`);var LP=IP(`Slot`),RP=Symbol.for(`radix.slottable`);function zP(e){let t=MP(e=>`child`in e?e.children(e.child):e.children,`Slottable`);return t.displayName=`${e}.Slottable`,t.__radixId=RP,t}MP(zP,`createSlottable`);var BP=MP((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},`getSlottableElementFromSlottable`);function VP(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)}MP(VP,`getElementRef`);function HP(e){return b.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===RP}MP(HP,`isSlottable`);var UP=Symbol.for(`react.lazy`);function WP(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===UP&&`_payload`in e&&GP(e._payload)}MP(WP,`isLazyComponent`);function GP(e){return typeof e==`object`&&!!e&&`then`in e}MP(GP,`isPromiseLike`);var KP=MP(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,`createSlotError`),qP=MP(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,`createSlottableError`),JP=b.use,YP=Object.defineProperty,XP=(e,t)=>YP(e,`name`,{value:t,configurable:!0}),ZP=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=IP(`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,H.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function QP(e,t){e&&SC.flushSync(()=>e.dispatchEvent(t))}XP(QP,`dispatchDiscreteCustomEvent`);var $P=Object.defineProperty,eF=(e,t)=>$P(e,`name`,{value:t,configurable:!0});function tF(e){let t=b.useRef(e);return b.useEffect(()=>{t.current=e}),b.useMemo(()=>((...e)=>t.current?.(...e)),[])}eF(tF,`useCallbackRef`);var nF=Object.defineProperty,rF=(e,t)=>nF(e,`name`,{value:t,configurable:!0}),iF=`dismissableLayer.update`,aF=`dismissableLayer.pointerDownOutside`,oF=`dismissableLayer.focusOutside`,sF,cF=b.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),lF=b.forwardRef(rF(function(e,t){let{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:s,onDismiss:c,...l}=e,u=b.useContext(cF),[d,f]=b.useState(null),p=d?.ownerDocument??globalThis?.document,[,m]=b.useState({}),h=TP(t,f),g=Array.from(u.layers),[_]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=_?g.indexOf(_):-1,y=d?g.indexOf(d):-1,x=u.layersWithOutsidePointerEventsDisabled.size>0,S=y>=v,C=b.useRef(!1),w=fF(e=>{a?.(e),s?.(e),e.defaultPrevented||c?.()},{ownerDocument:p,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:C,dismissableSurfaces:u.dismissableSurfaces,shouldHandlePointerDownOutside:b.useCallback(e=>{if(!(e instanceof Node))return!1;let t=[...u.branches].some(t=>t.contains(e));return S&&!t},[u.branches,S])}),T=pF(e=>{if(r&&C.current)return;let t=e.target;[...u.branches].some(e=>e.contains(t))||(o?.(e),s?.(e),e.defaultPrevented||c?.())},p),E=d?y===g.length-1:!1,D=tF(e=>{e.key===`Escape`&&(i?.(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))});return b.useEffect(()=>{if(E)return p.addEventListener(`keydown`,D,{capture:!0}),()=>p.removeEventListener(`keydown`,D,{capture:!0})},[p,E,D]),b.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(sF=p.body.style.pointerEvents,p.body.style.pointerEvents=`none`),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),mF(),()=>{n&&(u.layersWithOutsidePointerEventsDisabled.delete(d),u.layersWithOutsidePointerEventsDisabled.size===0&&(p.body.style.pointerEvents=sF))}},[d,p,n,u]),b.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),mF())},[d,u]),b.useEffect(()=>{let e=rF(()=>m({}),`handleUpdate`);return document.addEventListener(iF,e),()=>document.removeEventListener(iF,e)},[]),(0,H.jsx)(ZP.div,{...l,ref:h,style:{pointerEvents:x?S?`auto`:`none`:void 0,...e.style},onFocusCapture:gP(e.onFocusCapture,T.onFocusCapture),onBlurCapture:gP(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:gP(e.onPointerDownCapture,w.onPointerDownCapture)})},`DismissableLayer`));function uF(){let e=b.useContext(cF),[t,n]=b.useState(null);return b.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}rF(uF,`useDismissableLayerSurface`);var dF=rF(()=>!0,`IS_TRUE`);function fF(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:a,shouldHandlePointerDownOutside:o=dF}=t,s=tF(e),c=b.useRef(!1),l=b.useRef(!1),u=b.useRef(new Map),d=b.useRef(()=>{});return b.useEffect(()=>{function e(){l.current=!1,i.current=!1,u.current.clear()}rF(e,`resetOutsideInteraction`);function t(){return Array.from(u.current.values()).some(Boolean)}rF(t,`isOutsideInteractionIntercepted`);function f(e){if(!l.current)return;let t=e.target;t instanceof Node&&[...a].some(e=>e.contains(t))||u.current.set(e.type,!0),e.type===`click`&&window.setTimeout(()=>{l.current&&d.current()},0)}rF(f,`handleInteractionCapture`);function p(e){l.current&&u.current.set(e.type,!1)}rF(p,`handleInteractionBubble`);let m=rF(a=>{if(a.target&&!c.current){let f=function(){n.removeEventListener(`click`,d.current);let r=t();e(),r||hF(aF,s,p,{discrete:!0})};if(rF(f,`handleAndDispatchPointerDownOutsideEvent`),!o(a.target)){n.removeEventListener(`click`,d.current),e(),c.current=!1;return}let p={originalEvent:a};l.current=!0,i.current=r&&a.button===0,u.current.clear(),!r||a.button!==0?f():(n.removeEventListener(`click`,d.current),d.current=f,n.addEventListener(`click`,d.current,{once:!0}))}else n.removeEventListener(`click`,d.current),e();c.current=!1},`handlePointerDown`),h=[`pointerup`,`mousedown`,`mouseup`,`touchstart`,`touchend`,`click`];for(let e of h)n.addEventListener(e,f,!0),n.addEventListener(e,p);let g=window.setTimeout(()=>{n.addEventListener(`pointerdown`,m)},0);return()=>{window.clearTimeout(g),n.removeEventListener(`pointerdown`,m),n.removeEventListener(`click`,d.current);for(let e of h)n.removeEventListener(e,f,!0),n.removeEventListener(e,p)}},[n,s,r,i,a,o]),{onPointerDownCapture:rF(()=>c.current=!0,`onPointerDownCapture`)}}rF(fF,`usePointerDownOutside`);function pF(e,t=globalThis?.document){let n=tF(e),r=b.useRef(!1);return b.useEffect(()=>{let e=rF(e=>{e.target&&!r.current&&hF(oF,n,{originalEvent:e},{discrete:!1})},`handleFocus`);return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:rF(()=>r.current=!0,`onFocusCapture`),onBlurCapture:rF(()=>r.current=!1,`onBlurCapture`)}}rF(pF,`useFocusOutside`);function mF(){let e=new CustomEvent(iF);document.dispatchEvent(e)}rF(mF,`dispatchUpdate`);function hF(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?QP(i,a):i.dispatchEvent(a)}rF(hF,`handleAndDispatchCustomEvent`);var gF=globalThis?.document?b.useLayoutEffect:()=>{},_F=Object.defineProperty,vF=(e,t)=>_F(e,`name`,{value:t,configurable:!0}),yF=b.useId||(()=>void 0),bF=0;function xF(e){let[t,n]=b.useState(yF());return gF(()=>{e||n(e=>e??String(bF++))},[e]),e||(t?`radix-${t}`:``)}vF(xF,`useId`);var SF=Object.defineProperty,CF=b.forwardRef(((e,t)=>SF(e,`name`,{value:t,configurable:!0}))(function(e,t){let{children:n,width:r=10,height:i=5,...a}=e;return(0,H.jsx)(ZP.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,H.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})},`Arrow`)),wF=Object.defineProperty,TF=(e,t)=>wF(e,`name`,{value:t,configurable:!0});function EF(e){let[t,n]=b.useState(void 0);return gF(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else n(void 0)},[e]),t}TF(EF,`useSize`);var DF=Object.defineProperty,OF=(e,t)=>DF(e,`name`,{value:t,configurable:!0}),kF=`Popper`,[AF,jF]=kP(kF),[MF,NF]=AF(kF),PF=OF(e=>{let{__scopePopper:t,children:n}=e,[r,i]=b.useState(null),[a,o]=b.useState(void 0);return(0,H.jsx)(MF,{scope:t,anchor:r,onAnchorChange:i,placementState:a,setPlacementState:o,children:n})},`Popper`),FF=`PopperAnchor`,IF=b.forwardRef(OF(function(e,t){let{__scopePopper:n,virtualRef:r,...i}=e,a=NF(FF,n),o=b.useRef(null),s=a.onAnchorChange,c=TP(t,b.useCallback(e=>{o.current=e,e&&s(e)},[s])),l=b.useRef(null);b.useEffect(()=>{if(!r)return;let e=l.current;l.current=r.current,e!==l.current&&s(l.current)});let u=a.placementState&&KF(a.placementState),d=u?.[0],f=u?.[1];return r?null:(0,H.jsx)(ZP.div,{"data-radix-popper-side":d,"data-radix-popper-align":f,...i,ref:c})},`PopperAnchor`)),LF=`PopperContent`,[RF,zF]=AF(LF),BF=b.forwardRef(OF(function(e,t){let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:d=`partial`,hideWhenDetached:f=!1,updatePositionStrategy:p=`optimized`,onPlaced:m,...h}=e,g=NF(LF,n),[_,v]=b.useState(null),y=TP(t,v),[x,S]=b.useState(null),C=EF(x),w=C?.width??0,T=C?.height??0,E=r+(a===`center`?``:`-`+a),D=typeof u==`number`?u:{top:0,right:0,bottom:0,left:0,...u},O=Array.isArray(l)?l:[l],k=O.length>0,A={padding:D,boundary:O.filter(WF),altBoundary:k},{refs:j,floatingStyles:M,placement:N,isPositioned:P,middlewareData:F}=OA({strategy:`fixed`,placement:E,whileElementsMounted:OF((...e)=>xA(...e,{animationFrame:p===`always`}),`whileElementsMounted`),elements:{reference:g.anchor},middleware:[kA({mainAxis:i+T,alignmentAxis:o}),c&&AA({mainAxis:!0,crossAxis:!1,limiter:d===`partial`?jA():void 0,...A}),c&&MA({...A}),NA({...A,apply:OF(({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)},`apply`)}),x&&FA({element:x,padding:s}),GF({arrowWidth:w,arrowHeight:T}),f&&PA({strategy:`referenceHidden`,...A,boundary:k?A.boundary:void 0})]}),I=g.setPlacementState;gF(()=>(I(N),()=>{I(void 0)}),[N,I]);let[L,ee]=KF(N),te=tF(m);gF(()=>{P&&te?.()},[P,te]);let ne=F.arrow?.x,R=F.arrow?.y,z=F.arrow?.centerOffset!==0,[B,re]=b.useState();return gF(()=>{_&&re(window.getComputedStyle(_).zIndex)},[_]),(0,H.jsx)(`div`,{ref:j.setFloating,"data-radix-popper-content-wrapper":``,style:{...M,transform:P?M.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:B,"--radix-popper-transform-origin":[F.transformOrigin?.x,F.transformOrigin?.y].join(` `),...F.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,H.jsx)(RF,{scope:n,placedSide:L,placedAlign:ee,onArrowChange:S,arrowX:ne,arrowY:R,shouldHideArrow:z,children:(0,H.jsx)(ZP.div,{"data-side":L,"data-align":ee,...h,ref:y,style:{...h.style,animation:P?h.style?.animation:`none`}})})})},`PopperContent`)),VF=`PopperArrow`,HF={top:`bottom`,right:`left`,bottom:`top`,left:`right`},UF=b.forwardRef(OF(function(e,t){let{__scopePopper:n,...r}=e,i=zF(VF,n),a=HF[i.placedSide];return(0,H.jsx)(`span`,{ref:i.onArrowChange,style:{position:`absolute`,left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[i.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[i.placedSide],visibility:i.shouldHideArrow?`hidden`:void 0},children:(0,H.jsx)(CF,{...r,ref:t,style:{...r.style,display:`block`}})})},`PopperArrow`));function WF(e){return e!==null}OF(WF,`isNotNull`);var GF=OF(e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=KF(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}}),`transformOrigin`);function KF(e){let[t,n=`center`]=e.split(`-`);return[t,n]}OF(KF,`getSideAndAlignFromPlacement`);var qF=Object.defineProperty,JF=b.forwardRef(((e,t)=>qF(e,`name`,{value:t,configurable:!0}))(function(e,t){let{container:n,...r}=e,[i,a]=b.useState(!1);gF(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?SC.createPortal((0,H.jsx)(ZP.div,{...r,ref:t}),o):null},`Portal`)),YF=Object.defineProperty,XF=(e,t)=>YF(e,`name`,{value:t,configurable:!0});function ZF(e,t){return b.useReducer((e,n)=>t[e][n]??e,e)}XF(ZF,`useStateMachine`);var QF=XF(e=>{let{present:t,children:n}=e,r=$F(t),i=typeof n==`function`?n({present:r.isPresent}):b.Children.only(n),a=tI(r.ref,rI(i));return typeof n==`function`||r.isPresent?b.cloneElement(i,{ref:a}):null},`Presence`);function $F(e){let[t,n]=b.useState(),r=b.useRef(null),i=b.useRef(e),a=b.useRef(`none`),o=b.useRef(void 0),[s,c]=ZF(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return b.useEffect(()=>{s===`mounted`?(a.current=o.current??nI(r.current),o.current=void 0):a.current=`none`},[s]),gF(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,s=nI(t);e?(o.current=s,c(`MOUNT`)):s===`none`||t?.display===`none`?c(`UNMOUNT`):c(n&&r!==s?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,c]),gF(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=XF(a=>{let o=nI(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(c(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},`handleAnimationEnd`),s=XF(e=>{e.target===t&&(a.current=nI(r.current))},`handleAnimationStart`);return t.addEventListener(`animationstart`,s),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,s),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}else c(`ANIMATION_END`)},[t,c]),{isPresent:[`mounted`,`unmountSuspended`].includes(s),ref:b.useCallback(e=>{if(e){let t=getComputedStyle(e);r.current=t,o.current=nI(t)}else r.current=null;n(e)},[])}}XF($F,`usePresence`);function eI(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}XF(eI,`setRef`);function tI(...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=eI(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():eI(n[e],null)}}},[])}XF(tI,`useStableComposedRefs`);function nI(e){return e?.animationName||`none`}XF(nI,`getAnimationName`);function rI(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)}XF(rI,`getElementRef`);var iI=Object.defineProperty,aI=(e,t)=>iI(e,`name`,{value:t,configurable:!0}),oI=b.useEffectEvent,sI=b.useInsertionEffect;function cI(e){if(typeof oI==`function`)return oI(e);let t=b.useRef(()=>{throw Error(`Cannot call an event handler while rendering.`)});return typeof sI==`function`?sI(()=>{t.current=e}):gF(()=>{t.current=e}),b.useMemo(()=>((...e)=>t.current?.(...e)),[])}aI(cI,`useEffectEvent`);var lI=Object.defineProperty,uI=(e,t)=>lI(e,`name`,{value:t,configurable:!0}),dI=b.useInsertionEffect||gF;function fI({prop:e,defaultProp:t,onChange:n=uI(()=>{},`onChange`),caller:r}){let[i,a,o]=pI({defaultProp:t,onChange:n}),s=e!==void 0;return[s?e:i,b.useCallback(t=>{if(s){let n=mI(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}uI(fI,`useControllableState`);function pI({defaultProp:e,onChange:t}){let[n,r]=b.useState(e),i=b.useRef(n),a=b.useRef(t);return dI(()=>{a.current=t},[t]),b.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}uI(pI,`useUncontrolledState`);function mI(e){return typeof e==`function`}uI(mI,`isFunction`);var hI=Symbol(`RADIX:SYNC_STATE`);function dse(e,t,n,r){let{prop:i,defaultProp:a,onChange:o,caller:s}=t,c=i!==void 0,l=cI(o),u=[{...n,state:a}];r&&u.push(r);let[d,f]=b.useReducer((t,n)=>{if(n.type===hI)return{...t,state:n.state};let r=e(t,n);return c&&!Object.is(r.state,t.state)&&l(r.state),r},...u),p=d.state,m=b.useRef(p);b.useEffect(()=>{m.current!==p&&(m.current=p,c||l(p))},[p,m,c]);let h=b.useMemo(()=>i===void 0?d:{...d,state:i},[d,i]);return b.useEffect(()=>{c&&!Object.is(i,d.state)&&f({type:hI,state:i})},[i,d.state,c]),[h,f]}uI(dse,`useControllableStateReducer`);var fse=Object.defineProperty,pse=(e,t)=>fse(e,`name`,{value:t,configurable:!0}),mse=Object.freeze({position:`absolute`,border:0,width:1,height:1,padding:0,margin:-1,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,wordWrap:`normal`}),hse=b.forwardRef(pse(function(e,t){return(0,H.jsx)(ZP.span,{...e,ref:t,style:{...mse,...e.style}})},`VisuallyHidden`)),gse=Object.defineProperty,gI=(e,t)=>gse(e,`name`,{value:t,configurable:!0}),[_I,_se]=kP(`Tooltip`,[jF]),vI=jF(),vse=`TooltipProvider`,yse=700,yI=`tooltip.open`,[bse,bI]=_I(vse),xse=gI(e=>{let{__scopeTooltip:t,delayDuration:n=yse,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:a}=e,o=b.useRef(!0),s=b.useRef(!1),c=b.useRef(0);return b.useEffect(()=>{let e=c.current;return()=>window.clearTimeout(e)},[]),(0,H.jsx)(bse,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:b.useCallback(()=>{r<=0||(window.clearTimeout(c.current),o.current=!1)},[r]),onClose:b.useCallback(()=>{r<=0||(window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.current=!0,r))},[r]),isPointerInTransitRef:s,onPointerInTransitChange:b.useCallback(e=>{s.current=e},[]),disableHoverableContent:i,children:a})},`TooltipProvider`),xI=`Tooltip`,[Sse,SI]=_I(xI),Cse=gI(e=>{let{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:a,disableHoverableContent:o,delayDuration:s}=e,c=bI(xI,e.__scopeTooltip),l=vI(t),[u,d]=b.useState(null),[f,p]=b.useState(void 0),m=xF(),h=b.useRef(0),g=o??c.disableHoverableContent,_=s??c.delayDuration,v=b.useRef(!1),[y,x]=fI({prop:r,defaultProp:i??!1,onChange:gI(e=>{e?(c.onOpen(),document.dispatchEvent(new CustomEvent(yI))):c.onClose(),a?.(e)},`onChange`),caller:xI}),S=b.useMemo(()=>y?v.current?`delayed-open`:`instant-open`:`closed`,[y]),C=b.useCallback(()=>{window.clearTimeout(h.current),h.current=0,v.current=!1,x(!0)},[x]),w=b.useCallback(()=>{window.clearTimeout(h.current),h.current=0,x(!1)},[x]),T=b.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{v.current=!0,x(!0),h.current=0},_)},[_,x]);b.useEffect(()=>()=>{h.current&&=(window.clearTimeout(h.current),0)},[]);let E=f??m;return(0,H.jsx)(PF,{...l,children:(0,H.jsx)(Sse,{scope:t,contentId:E,setContentId:p,open:y,stateAttribute:S,trigger:u,onTriggerChange:d,onTriggerEnter:b.useCallback(()=>{c.isOpenDelayedRef.current?T():C()},[c.isOpenDelayedRef,T,C]),onTriggerLeave:b.useCallback(()=>{g?w():(window.clearTimeout(h.current),h.current=0)},[w,g]),onOpen:C,onClose:w,disableHoverableContent:g,children:n})})},`Tooltip`),CI=`TooltipTrigger`,wse=b.forwardRef(gI(function(e,t){let{__scopeTooltip:n,"aria-describedby":r,...i}=e,a=SI(CI,n),o=bI(CI,n),s=vI(n),c=TP(t,b.useRef(null),a.onTriggerChange),l=b.useRef(!1),u=b.useRef(!1),d=b.useCallback(()=>l.current=!1,[]);return b.useEffect(()=>()=>document.removeEventListener(`pointerup`,d),[d]),(0,H.jsx)(IF,{asChild:!0,...s,children:(0,H.jsx)(ZP.button,{"aria-describedby":a.open?II(r,a.contentId):r,"data-state":a.stateAttribute,...i,ref:c,onPointerMove:gP(e.onPointerMove,e=>{e.pointerType!==`touch`&&!u.current&&!o.isPointerInTransitRef.current&&(a.onTriggerEnter(),u.current=!0)}),onPointerLeave:gP(e.onPointerLeave,()=>{a.onTriggerLeave(),u.current=!1}),onPointerDown:gP(e.onPointerDown,()=>{a.open&&a.onClose(),l.current=!0,document.addEventListener(`pointerup`,d,{once:!0})}),onFocus:gP(e.onFocus,()=>{l.current||a.onOpen()}),onBlur:gP(e.onBlur,a.onClose),onClick:gP(e.onClick,a.onClose)})})},`TooltipTrigger`)),wI=`TooltipPortal`,[Tse,Ese]=_I(wI,{forceMount:void 0}),TI=gI(e=>{let{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,a=SI(wI,t);return(0,H.jsx)(Tse,{scope:t,forceMount:n,children:(0,H.jsx)(QF,{present:n||a.open,children:(0,H.jsx)(JF,{asChild:!0,container:i,children:r})})})},`TooltipPortal`),EI=`TooltipContent`,DI=b.forwardRef(gI(function(e,t){let n=Ese(EI,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i=`top`,...a}=e,o=SI(EI,e.__scopeTooltip);return(0,H.jsx)(QF,{present:r||o.open,children:o.disableHoverableContent?(0,H.jsx)(OI,{side:i,...a,ref:t}):(0,H.jsx)(Dse,{side:i,...a,ref:t})})},`TooltipContent`)),Dse=b.forwardRef(gI(function(e,t){let n=SI(EI,e.__scopeTooltip),r=bI(EI,e.__scopeTooltip),i=b.useRef(null),a=TP(t,i),[o,s]=b.useState(null),{trigger:c,onClose:l}=n,u=i.current,{onPointerInTransitChange:d}=r,f=b.useCallback(()=>{s(null),d(!1)},[d]),p=b.useCallback((e,t)=>{let n=e.currentTarget,r={x:e.clientX,y:e.clientY},i=jI(r,AI(r,n.getBoundingClientRect())),a=MI(t.getBoundingClientRect()),o=PI([...i,...a]);s(o),d(!0)},[d]);return b.useEffect(()=>()=>f(),[f]),b.useEffect(()=>{if(c&&u){let e=gI(e=>p(e,u),`handleTriggerLeave`),t=gI(e=>p(e,c),`handleContentLeave`);return c.addEventListener(`pointerleave`,e),u.addEventListener(`pointerleave`,t),()=>{c.removeEventListener(`pointerleave`,e),u.removeEventListener(`pointerleave`,t)}}},[c,u,p,f]),b.useEffect(()=>{if(o){let e=gI(e=>{let t=e.target,n={x:e.clientX,y:e.clientY},r=c?.contains(t)||u?.contains(t),i=!NI(n,o);r?f():i&&(f(),l())},`handleTrackPointerGrace`);return document.addEventListener(`pointermove`,e),()=>document.removeEventListener(`pointermove`,e)}},[c,u,o,l,f]),(0,H.jsx)(OI,{...e,ref:a})},`TooltipContentHoverable`)),Ose=zP(`TooltipContent`),OI=b.forwardRef(gI(function(e,t){let{__scopeTooltip:n,children:r,"aria-label":i,id:a,onEscapeKeyDown:o,onPointerDownOutside:s,...c}=e,l=SI(EI,n),u=vI(n),{onClose:d}=l;b.useEffect(()=>(document.addEventListener(yI,d),()=>document.removeEventListener(yI,d)),[d]),b.useEffect(()=>{if(l.trigger){let e=gI(e=>{e.target instanceof Node&&e.target.contains(l.trigger)&&d()},`handleScroll`);return window.addEventListener(`scroll`,e,{capture:!0}),()=>window.removeEventListener(`scroll`,e,{capture:!0})}},[l.trigger,d]);let{setContentId:f}=l;return gF(()=>(f(a),()=>{f(void 0)}),[a,f]),(0,H.jsx)(lF,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:e=>e.preventDefault(),onDismiss:d,children:(0,H.jsxs)(BF,{"data-state":l.stateAttribute,role:i?void 0:`tooltip`,id:i?void 0:l.contentId,...u,...c,ref:t,style:{...c.style,"--radix-tooltip-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-tooltip-content-available-width":`var(--radix-popper-available-width)`,"--radix-tooltip-content-available-height":`var(--radix-popper-available-height)`,"--radix-tooltip-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-tooltip-trigger-height":`var(--radix-popper-anchor-height)`},children:[(0,H.jsx)(Ose,{children:r}),i?(0,H.jsx)(hse,{id:l.contentId,role:`tooltip`,children:i}):null]})})},`TooltipContentImpl`)),kI=b.forwardRef(gI(function(e,t){let{__scopeTooltip:n,...r}=e,i=vI(n);return(0,H.jsx)(UF,{...i,...r,ref:t})},`TooltipArrow`));function AI(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return`left`;case i:return`right`;case n:return`top`;case r:return`bottom`;default:throw Error(`unreachable`)}}gI(AI,`getExitSideFromRect`);function jI(e,t,n=5){let r=[];switch(t){case`top`:r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case`bottom`:r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case`left`:r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case`right`:r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}gI(jI,`getPaddedExitPoints`);function MI(e){let{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}gI(MI,`getPointsFromRect`);function NI(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}gI(NI,`isPointInPolygon`);function PI(e){let t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:+(e.y>t.y)),FI(t)}gI(PI,`getHull`);function FI(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n<e.length;n++){let r=e[n];for(;t.length>=2;){let e=t[t.length-1],n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n[n.length-1],t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}gI(FI,`getHullPresorted`);function II(...e){let t=new Set;for(let n of e)if(typeof n==`string`)for(let e of String(n).trim().split(/\s+/))e&&t.add(e);return t.size>0?Array.from(t).join(` `):void 0}gI(II,`concatAriaDescribedby`);function kse({delayDuration:e=0,...t}){return(0,H.jsx)(xse,{"data-slot":`tooltip-provider`,delayDuration:e,...t})}function LI({...e}){return(0,H.jsx)(kse,{children:(0,H.jsx)(Cse,{"data-slot":`tooltip`,...e})})}function RI({...e}){return(0,H.jsx)(wse,{"data-slot":`tooltip-trigger`,...e})}function zI({className:e,sideOffset:t=6,children:n,...r}){return(0,H.jsx)(TI,{children:(0,H.jsxs)(DI,{"data-slot":`tooltip-content`,sideOffset:t,className:Mr(`bg-inverted text-inverted-foreground dark:bg-subtle dark:text-foreground`,`z-50 w-fit rounded-md px-3 py-2 shadow-lg dark:shadow-none dark:drop-shadow-[0_0_0.5px_var(--color-border)]`,`type-text-xs font-semibold text-balance text-center whitespace-pre-line`,`animate-in fade-in-0 zoom-in-95`,`data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95`,`data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2`,`origin-(--radix-tooltip-content-transform-origin)`,e),...r,children:[n,(0,H.jsx)(kI,{className:`bg-inverted fill-inverted dark:bg-subtle dark:fill-subtle z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]`})]})})}var Ase=`Label`,BI=b.forwardRef((e,t)=>(0,H.jsx)(QD.label,{...e,ref:t,onMouseDown:t=>{t.target.closest(`button, input, select, textarea`)||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));BI.displayName=Ase;var VI=BI;function HI({className:e,...t}){return(0,H.jsx)(VI,{"data-slot":`label`,className:Mr(`flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50`,e),...t})}function jse({fieldId:e,label:t,required:n,hint:r,error:i,tooltip:a,children:o}){return(0,H.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[t&&(0,H.jsxs)(`div`,{className:`flex items-center gap-0.5`,children:[(0,H.jsx)(HI,{htmlFor:e,className:`type-text-sm font-medium text-muted-foreground`,children:t}),n&&(0,H.jsx)(`span`,{"aria-hidden":!0,className:`type-text-sm font-medium text-required`,children:`*`}),a&&(0,H.jsxs)(LI,{children:[(0,H.jsx)(RI,{asChild:!0,children:(0,H.jsx)(ai,{className:`size-4 text-muted-foreground`})}),(0,H.jsx)(zI,{children:a})]})]}),o,(r||i)&&(0,H.jsx)(`p`,{id:e?`${e}-description`:void 0,className:Mr(`type-text-sm`,i?`text-destructive`:`text-subtle-foreground`),children:i??r})]})}var Mse={sm:{standalone:`h-8 px-2 py-1.5 type-text-sm`,wrapper:`h-8`,inner:`px-2 py-1.5`,text:`type-text-sm`,leadingText:`pl-2 pr-2 type-text-sm`,leadingIcon:`pl-2 [&_svg]:size-4`},md:{standalone:`h-8 px-2.5 py-1.5 type-text-md`,wrapper:`h-8`,inner:`px-2.5 py-1.5`,text:`type-text-md`,leadingText:`pl-2.5 pr-2 type-text-md`,leadingIcon:`pl-2.5 [&_svg]:size-5`}};function UI({className:e,id:t,label:n,required:r,hint:i,error:a,tooltip:o,leadingText:s,leadingIcon:c,size:l=`md`,...u}){let d=b.useId(),f=t??d,p=s||c,m=Mse[l],h=(0,H.jsx)(`input`,{id:f,"data-slot":`input`,className:Mr(`w-full min-w-0 bg-transparent outline-none`,m.text,`text-foreground placeholder:text-placeholder`,`disabled:cursor-not-allowed`,!p&&[`flex`,m.standalone,`bg-background border border-border rounded-md`,`transition-colors`,`focus-visible:border-ring focus-visible:border-2`,`disabled:bg-disabled disabled:text-disabled-foreground`,`aria-invalid:border-border-error`,a&&`border-border-error`],p&&`flex-1 min-h-0`,e),required:r,"aria-invalid":a?!0:void 0,"aria-describedby":f&&(i||a)?`${f}-description`:void 0,...u});return(0,H.jsx)(jse,{fieldId:f,label:n,required:r,hint:i,error:a,tooltip:o,children:p?(0,H.jsxs)(`div`,{className:Mr(`flex items-center w-full overflow-hidden`,m.wrapper,`bg-background border border-border rounded-md`,`transition-colors`,`has-[input:focus-visible]:border-ring has-[input:focus-visible]:border-2`,`has-[input:disabled]:bg-disabled has-[input:disabled]:text-disabled-foreground has-[input:disabled]:cursor-not-allowed`,a&&`border-border-error`),children:[c&&(0,H.jsx)(`span`,{className:Mr(`flex items-center text-subtle-foreground [&_svg]:shrink-0`,m.leadingIcon),children:c}),s&&(0,H.jsx)(`span`,{className:Mr(`flex items-center text-subtle-foreground whitespace-nowrap border-r border-border self-stretch`,m.leadingText),children:s}),(0,H.jsx)(`div`,{className:Mr(`flex flex-1 items-center min-w-0`,m.inner),children:h})]}):h})}var WI=Ni([`flex w-full items-center gap-2 rounded-md border bg-background text-foreground shadow-xs outline-hidden`,`transition-colors`,`focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background`,`data-[state=open]:ring-2 data-[state=open]:ring-ring data-[state=open]:ring-offset-2 data-[state=open]:ring-offset-background`,`disabled:pointer-events-none disabled:bg-disabled disabled:text-disabled-foreground disabled:border-disabled`,`aria-invalid:border-border-error`,`[&_svg:not([class*='size-'])]:size-5 [&_svg]:shrink-0`].join(` `),{variants:{size:{sm:`min-h-8 px-2 py-1.5 type-text-sm`,md:`min-h-10 px-3.5 type-text-md`}},defaultVariants:{size:`md`}});function GI(e,[t,n]){return Math.min(n,Math.max(t,e))}function KI(e){let t=e+`CollectionProvider`,[n,r]=dO(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,H.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})};o.displayName=t;let s=e+`CollectionSlot`,c=Li(s),l=b.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=Ii(t,a(s,n).collectionRef);return(0,H.jsx)(c,{ref:i,children:r})});l.displayName=s;let u=e+`CollectionItemSlot`,d=`data-radix-collection-item`,f=Li(u),p=b.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=b.useRef(null),s=Ii(t,o),c=a(u,n);return b.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,H.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 Nse=b.createContext(void 0);function qI(e){let t=b.useContext(Nse);return e||t||`ltr`}function JI(e){let t=b.useRef({value:e,previous:e});return b.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Pse=Object.freeze({position:`absolute`,border:0,width:1,height:1,padding:0,margin:-1,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,wordWrap:`normal`}),Fse=Object.defineProperty,YI=(e,t)=>Fse(e,`name`,{value:t,configurable:!0}),Ise=[` `,`Enter`,`ArrowUp`,`ArrowDown`],Lse=[` `,`Enter`],XI=`Select`,[ZI,QI,Rse]=KI(XI),[$I,zse]=dO(XI,[Rse,BA]),eL=BA(),[Bse,tL]=$I(XI),[Vse,Hse]=$I(XI);function nL(e){let{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:a,value:o,defaultValue:s,onValueChange:c,dir:l,name:u,autoComplete:d,disabled:f,required:p,form:m,internal_do_not_use_render:h}=e,g=eL(t),[_,v]=b.useState(null),[y,x]=b.useState(null),[S,C]=b.useState(!1),w=qI(l),[T,E]=oj({prop:r,defaultProp:i??!1,onChange:a,caller:XI}),[D,O]=oj({prop:o,defaultProp:s,onChange:c,caller:XI}),k=b.useRef(null),A=b.useRef(D);b.useEffect(()=>{let e=m?_?.ownerDocument.getElementById(m):_?.form;if(e instanceof HTMLFormElement){let t=YI(()=>O(A.current),`reset`);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[m,_,O]);let j=!_||!!m||!!_.closest(`form`),[M,N]=b.useState(new Set),P=KO(),F=Array.from(M).map(e=>e.props.value).join(`;`),I=b.useCallback(e=>{N(t=>new Set(t).add(e))},[]),L=b.useCallback(e=>{N(t=>{let n=new Set(t);return n.delete(e),n})},[]),ee={required:p,trigger:_,onTriggerChange:v,valueNode:y,onValueNodeChange:x,valueNodeHasChildren:S,onValueNodeHasChildrenChange:C,contentId:P,value:D,onValueChange:O,open:T,onOpenChange:E,dir:w,triggerPointerDownPosRef:k,disabled:f,name:u,autoComplete:d,form:m,nativeOptions:M,nativeSelectKey:F,isFormControl:j};return(0,H.jsx)(GA,{...g,children:(0,H.jsx)(Bse,{scope:t,...ee,children:(0,H.jsx)(ZI.Provider,{scope:t,children:(0,H.jsx)(Vse,{scope:t,onNativeOptionAdd:I,onNativeOptionRemove:L,children:fL(h)?h(ee):n})})})})}YI(nL,`SelectProvider`);var Use=YI(e=>{let{__scopeSelect:t,children:n,...r}=e;return(0,H.jsx)(nL,{__scopeSelect:t,...r,internal_do_not_use_render:({isFormControl:e})=>(0,H.jsxs)(H.Fragment,{children:[n,e?(0,H.jsx)(mce,{__scopeSelect:t}):null]})})},`Select`),Wse=`SelectTrigger`,Gse=b.forwardRef(YI(function(e,t){let{__scopeSelect:n,disabled:r=!1,...i}=e,a=eL(n),o=tL(Wse,n),s=o.disabled||r,c=Ii(t,o.onTriggerChange),l=QI(n),u=b.useRef(`touch`),[d,f,p]=mL(e=>{let t=l().filter(e=>!e.disabled),n=hL(t,e,t.find(e=>e.value===o.value));n!==void 0&&o.onValueChange(n.value)}),m=YI(e=>{s||(o.onOpenChange(!0),p()),e&&(o.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})},`handleOpen`);return(0,H.jsx)(KA,{asChild:!0,...a,children:(0,H.jsx)(QD.button,{type:`button`,role:`combobox`,"aria-controls":o.open?o.contentId:void 0,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":`none`,dir:o.dir,"data-state":o.open?`open`:`closed`,disabled:s,"data-disabled":s?``:void 0,"data-placeholder":pL(o.value)?``:void 0,...i,ref:c,onClick:sO(i.onClick,e=>{e.currentTarget.focus(),u.current!==`mouse`&&m(e)}),onPointerDown:sO(i.onPointerDown,e=>{u.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),e.button===0&&e.ctrlKey===!1&&e.pointerType===`mouse`&&(m(e),e.preventDefault())}),onKeyDown:sO(i.onKeyDown,e=>{let t=d.current!==``;!(e.ctrlKey||e.altKey||e.metaKey)&&e.key.length===1&&f(e.key),!(t&&e.key===` `)&&Ise.includes(e.key)&&(m(),e.preventDefault())})})})},`SelectTrigger`)),Kse=`SelectValue`,qse=b.forwardRef(YI(function(e,t){let{__scopeSelect:n,className:r,style:i,children:a,placeholder:o=``,...s}=e,c=tL(Kse,n),{onValueNodeHasChildrenChange:l}=c,u=a!==void 0,d=Ii(t,c.onValueNodeChange);UO(()=>{l(u)},[l,u]);let f=pL(c.value);return(0,H.jsx)(QD.span,{...s,asChild:!f&&s.asChild,ref:d,style:{pointerEvents:`none`},children:(0,H.jsx)(b.Fragment,{children:f?o:a},f?`placeholder`:`value`)})},`SelectValue`)),Jse=b.forwardRef(YI(function(e,t){let{__scopeSelect:n,children:r,...i}=e;return(0,H.jsx)(QD.span,{"aria-hidden":!0,...i,ref:t,children:r||`▼`})},`SelectIcon`)),[Yse,Xse]=$I(`SelectPortal`,{forceMount:void 0}),Zse=YI(e=>{let{__scopeSelect:t,forceMount:n,...r}=e;return(0,H.jsx)(Yse,{scope:e.__scopeSelect,forceMount:n,children:(0,H.jsx)(JA,{asChild:!0,...r})})},`SelectPortal`),rL=`SelectContent`,Qse=b.forwardRef(YI(function(e,t){let n=Xse(rL,e.__scopeSelect),{forceMount:r=n.forceMount,...i}=e,a=tL(rL,e.__scopeSelect),[o,s]=b.useState();return UO(()=>{s(new DocumentFragment)},[]),(0,H.jsx)(ZA,{present:r||a.open,children:({present:e})=>e?(0,H.jsx)(tce,{...i,ref:t}):(0,H.jsx)($se,{...i,fragment:o})})},`SelectContent`)),$se=b.forwardRef(YI(function(e,t){let{__scopeSelect:n,children:r,fragment:i}=e;return i?SC.createPortal((0,H.jsx)(aL,{scope:n,children:(0,H.jsx)(ZI.Slot,{scope:n,children:(0,H.jsx)(`div`,{ref:t,children:r})})}),i):null},`SelectContentFragment`)),iL=10,[aL,oL]=$I(rL),ece=Li(`SelectContent.RemoveScroll`),tce=b.forwardRef(YI(function(e,t){let{__scopeSelect:n}=e,{position:r=`item-aligned`,onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:o,side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g,..._}=e,v=tL(rL,n),[y,x]=b.useState(null),[S,C]=b.useState(null),w=Ii(t,x),[T,E]=b.useState(null),[D,O]=b.useState(null),k=QI(n),[A,j]=b.useState(!1),M=b.useRef(!1);b.useEffect(()=>{if(y)return hj(y)},[y]),TO();let N=b.useCallback(e=>{let[t,...n]=k().map(e=>e.ref.current),[r]=n.slice(-1),i=document.activeElement;for(let n of e)if(n===i||(n?.scrollIntoView({block:`nearest`}),n===t&&S&&(S.scrollTop=0),n===r&&S&&(S.scrollTop=S.scrollHeight),n?.focus(),document.activeElement!==i))return},[k,S]),P=b.useCallback(()=>N([T,y]),[N,T,y]);b.useEffect(()=>{A&&P()},[A,P]);let{onOpenChange:F,triggerPointerDownPosRef:I}=v;b.useEffect(()=>{if(y){let e={x:0,y:0},t=YI(t=>{e={x:Math.abs(Math.round(t.pageX)-(I.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(I.current?.y??0))}},`handlePointerMove`),n=YI(n=>{e.x<=10&&e.y<=10?n.preventDefault():n.composedPath().includes(y)||F(!1),document.removeEventListener(`pointermove`,t),I.current=null},`handlePointerUp`);return I.current!==null&&(document.addEventListener(`pointermove`,t),document.addEventListener(`pointerup`,n,{capture:!0,once:!0})),()=>{document.removeEventListener(`pointermove`,t),document.removeEventListener(`pointerup`,n,{capture:!0})}}},[y,F,I]),b.useEffect(()=>{let e=YI(()=>F(!1),`close`);return window.addEventListener(`blur`,e),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`resize`,e)}},[F]);let[L,ee]=mL(e=>{let t=k().filter(e=>!e.disabled),n=hL(t,e,t.find(e=>e.ref.current===document.activeElement));n&&setTimeout(()=>n.ref.current?.focus())}),te=b.useCallback((e,t,n)=>{let r=!M.current&&!n;(v.value!==void 0&&v.value===t||r)&&(E(e),r&&(M.current=!0))},[v.value]),ne=b.useCallback(()=>y?.focus(),[y]),R=b.useCallback((e,t,n)=>{let r=!M.current&&!n;(v.value!==void 0&&v.value===t||r)&&O(e)},[v.value]),z=r===`popper`?sL:nce,B=z===sL?{side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g}:{};return(0,H.jsx)(aL,{scope:n,content:y,viewport:S,onViewportChange:C,itemRefCallback:te,selectedItem:T,onItemLeave:ne,itemTextRefCallback:R,focusSelectedItem:P,selectedItemText:D,position:r,isPositioned:A,searchRef:L,children:(0,H.jsx)(EM,{as:ece,allowPinchZoom:!0,children:(0,H.jsx)(jO,{asChild:!0,trapped:v.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:sO(i,e=>{v.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,H.jsx)(_O,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>v.onOpenChange(!1),children:(0,H.jsx)(z,{role:`listbox`,id:v.contentId,"data-state":v.open?`open`:`closed`,dir:v.dir,onContextMenu:e=>e.preventDefault(),..._,...B,onPlaced:()=>j(!0),ref:w,style:{display:`flex`,flexDirection:`column`,outline:`none`,..._.style},onKeyDown:sO(_.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if(e.key===`Tab`&&e.preventDefault(),!t&&e.key.length===1&&ee(e.key),[`ArrowUp`,`ArrowDown`,`Home`,`End`].includes(e.key)){let t=k().filter(e=>!e.disabled).map(e=>e.ref.current);if([`ArrowUp`,`End`].includes(e.key)&&(t=t.slice().reverse()),[`ArrowUp`,`ArrowDown`].includes(e.key)){let n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>N(t)),e.preventDefault()}})})})})})})},`SelectContentImpl`)),nce=b.forwardRef(YI(function(e,t){let{__scopeSelect:n,onPlaced:r,...i}=e,a=tL(rL,n),o=oL(rL,n),[s,c]=b.useState(null),[l,u]=b.useState(null),d=Ii(t,u),f=QI(n),p=b.useRef(!1),m=b.useRef(!0),{viewport:h,selectedItem:g,selectedItemText:_,focusSelectedItem:v}=o,y=b.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&l&&h&&g&&_){let e=a.trigger.getBoundingClientRect(),t=l.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),i=_.getBoundingClientRect();if(a.dir!==`rtl`){let r=i.left-t.left,a=n.left-r,o=e.left-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-iL,d=GI(a,[iL,Math.max(iL,u-l)]);s.style.minWidth=c+`px`,s.style.left=d+`px`}else{let r=t.right-i.right,a=window.innerWidth-n.right-r,o=window.innerWidth-e.right-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-iL,d=GI(a,[iL,Math.max(iL,u-l)]);s.style.minWidth=c+`px`,s.style.right=d+`px`}let o=f(),c=window.innerHeight-iL*2,u=h.scrollHeight,d=window.getComputedStyle(l),m=parseInt(d.borderTopWidth,10),v=parseInt(d.paddingTop,10),y=parseInt(d.borderBottomWidth,10),b=parseInt(d.paddingBottom,10),x=m+v+u+b+y,S=Math.min(g.offsetHeight*5,x),C=window.getComputedStyle(h),w=parseInt(C.paddingTop,10),T=parseInt(C.paddingBottom,10),E=e.top+e.height/2-iL,D=c-E,O=g.offsetHeight/2,k=g.offsetTop+O,A=m+v+k,j=x-A;if(A<=E){let e=o.length>0&&g===o[o.length-1].ref.current;s.style.bottom=`0px`;let t=l.clientHeight-h.offsetTop-h.offsetHeight,n=A+Math.max(D,O+(e?T:0)+t+y);s.style.height=n+`px`}else{let e=o.length>0&&g===o[0].ref.current;s.style.top=`0px`;let t=Math.max(E,m+h.offsetTop+(e?w:0)+O)+j;s.style.height=t+`px`,h.scrollTop=A-E+h.offsetTop}s.style.margin=`${iL}px 0`,s.style.minHeight=S+`px`,s.style.maxHeight=c+`px`,r?.(),requestAnimationFrame(()=>p.current=!0)}},[f,a.trigger,a.valueNode,s,l,h,g,_,a.dir,r]);UO(()=>y(),[y]);let[x,S]=b.useState();return UO(()=>{l&&S(window.getComputedStyle(l).zIndex)},[l]),(0,H.jsx)(rce,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:b.useCallback(e=>{e&&m.current===!0&&(y(),v?.(),m.current=!1)},[y,v]),children:(0,H.jsx)(`div`,{ref:c,style:{display:`flex`,flexDirection:`column`,position:`fixed`,zIndex:x},children:(0,H.jsx)(QD.div,{...i,ref:d,style:{boxSizing:`border-box`,maxHeight:`100%`,...i.style}})})})},`SelectItemAlignedPosition`)),sL=b.forwardRef(YI(function(e,t){let{__scopeSelect:n,align:r=`start`,collisionPadding:i=iL,...a}=e,o=eL(n);return(0,H.jsx)(qA,{...o,...a,ref:t,align:r,collisionPadding:i,style:{boxSizing:`border-box`,...a.style,"--radix-select-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-select-content-available-width":`var(--radix-popper-available-width)`,"--radix-select-content-available-height":`var(--radix-popper-available-height)`,"--radix-select-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-select-trigger-height":`var(--radix-popper-anchor-height)`}})},`SelectPopperPosition`)),[rce,ice]=$I(rL,{}),cL=`SelectViewport`,ace=b.forwardRef(YI(function(e,t){let{__scopeSelect:n,nonce:r,...i}=e,a=oL(cL,n),o=ice(cL,n),s=Ii(t,a.onViewportChange),c=b.useRef(0);return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}`},nonce:r}),(0,H.jsx)(ZI.Slot,{scope:n,children:(0,H.jsx)(QD.div,{"data-radix-select-viewport":``,role:`presentation`,...i,ref:s,style:{position:`relative`,flex:1,overflow:`hidden auto`,...i.style},onScroll:sO(i.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=o;if(r?.current&&n){let e=Math.abs(c.current-t.scrollTop);if(e>0){let r=window.innerHeight-iL*2,i=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),o=Math.max(i,a);if(o<r){let i=o+e,a=Math.min(r,i),s=i-a;n.style.height=a+`px`,n.style.bottom===`0px`&&(t.scrollTop=s>0?s:0,n.style.justifyContent=`flex-end`)}}}c.current=t.scrollTop})})})]})},`SelectViewport`)),[oce,sce]=$I(`SelectGroup`),lL=`SelectItem`,[cce,uL]=$I(lL),lce=b.forwardRef(YI(function(e,t){let{__scopeSelect:n,value:r,disabled:i=!1,textValue:a,...o}=e,s=tL(lL,n),c=oL(lL,n),l=s.value===r,[u,d]=b.useState(a??``),[f,p]=b.useState(!1),m=Ii(t,fO(e=>c.itemRefCallback?.(e,r,i))),h=KO(),g=b.useRef(`touch`),_=YI(()=>{i||(s.onValueChange(r),s.onOpenChange(!1))},`handleSelect`);return(0,H.jsx)(cce,{scope:n,value:r,disabled:i,textId:h,isSelected:l,onItemTextChange:b.useCallback(e=>{d(t=>t||(e?.textContent??``).trim())},[]),children:(0,H.jsx)(ZI.ItemSlot,{scope:n,value:r,disabled:i,textValue:u,children:(0,H.jsx)(QD.div,{role:`option`,"aria-labelledby":h,"data-highlighted":f?``:void 0,"aria-selected":l&&f,"data-state":l?`checked`:`unchecked`,"aria-disabled":i||void 0,"data-disabled":i?``:void 0,tabIndex:i?void 0:-1,...o,ref:m,onFocus:sO(o.onFocus,()=>p(!0)),onBlur:sO(o.onBlur,()=>p(!1)),onClick:sO(o.onClick,()=>{g.current!==`mouse`&&_()}),onPointerUp:sO(o.onPointerUp,()=>{g.current===`mouse`&&_()}),onPointerDown:sO(o.onPointerDown,e=>{g.current=e.pointerType}),onPointerMove:sO(o.onPointerMove,e=>{g.current=e.pointerType,i?c.onItemLeave?.():g.current===`mouse`&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:sO(o.onPointerLeave,e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:sO(o.onKeyDown,e=>{i||e.target!==e.currentTarget||c.searchRef?.current!==``&&e.key===` `||(Lse.includes(e.key)&&_(),e.key===` `&&e.preventDefault())})})})})},`SelectItem`)),dL=`SelectItemText`,uce=b.forwardRef(YI(function(e,t){let{__scopeSelect:n,className:r,style:i,...a}=e,o=tL(dL,n),s=oL(dL,n),c=uL(dL,n),l=Hse(dL,n),[u,d]=b.useState(null),f=fO(e=>s.itemTextRefCallback?.(e,c.value,c.disabled)),p=Ii(t,d,c.onItemTextChange,f),m=u?.textContent,h=b.useMemo(()=>(0,H.jsx)(`option`,{value:c.value,disabled:c.disabled,children:m},c.value),[c.disabled,c.value,m]),{onNativeOptionAdd:g,onNativeOptionRemove:_}=l;return UO(()=>(g(h),()=>_(h)),[g,_,h]),(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(QD.span,{id:c.textId,...a,ref:p}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren&&!pL(o.value)?SC.createPortal(a.children,o.valueNode):null]})},`SelectItemText`)),dce=`SelectItemIndicator`,fce=b.forwardRef(YI(function(e,t){let{__scopeSelect:n,...r}=e;return uL(dce,n).isSelected?(0,H.jsx)(QD.span,{"aria-hidden":!0,...r,ref:t}):null},`SelectItemIndicator`)),pce=`SelectBubbleInput`,mce=b.forwardRef(YI(function({__scopeSelect:e,...t},n){let r=tL(pce,e),{value:i,onValueChange:a,required:o,disabled:s,name:c,autoComplete:l,form:u}=r,{nativeOptions:d,nativeSelectKey:f}=r,p=b.useRef(null),m=Ii(n,p),h=i??``,g=JI(h),_=Array.from(d).some(e=>(e.props.value??``)===``);return b.useEffect(()=>{let e=p.current;if(!e)return;let t=window.HTMLSelectElement.prototype,n=Object.getOwnPropertyDescriptor(t,`value`).set;if(g!==h&&n){let t=new Event(`change`,{bubbles:!0});n.call(e,h),e.dispatchEvent(t)}},[g,h]),(0,H.jsxs)(QD.select,{"aria-hidden":!0,required:o,tabIndex:-1,name:c,autoComplete:l,disabled:s,form:u,onChange:e=>a(e.target.value),...t,style:{...Pse,...t.style},ref:m,defaultValue:h,children:[pL(i)&&!_?(0,H.jsx)(`option`,{value:``}):null,Array.from(d)]},f)},`SelectBubbleInput`));function fL(e){return typeof e==`function`}YI(fL,`isFunction`);function pL(e){return e===``||e===void 0}YI(pL,`shouldShowPlaceholder`);function mL(e){let t=fO(e),n=b.useRef(``),r=b.useRef(0),i=b.useCallback(e=>{let i=n.current+e;t(i),YI((function e(t){n.current=t,window.clearTimeout(r.current),t!==``&&(r.current=window.setTimeout(()=>e(``),1e3))}),`updateSearch`)(i)},[t]),a=b.useCallback(()=>{n.current=``,window.clearTimeout(r.current)},[]);return b.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}YI(mL,`useTypeaheadSearch`);function hL(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=gL(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.textValue.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}YI(hL,`findNextItem`);function gL(e,t){return e.map((n,r)=>e[(t+r)%e.length])}YI(gL,`wrapArray`);function _L({...e}){return(0,H.jsx)(Use,{"data-slot":`select`,...e})}function vL({...e}){return(0,H.jsx)(qse,{"data-slot":`select-value`,...e})}function yL({className:e,size:t=`md`,children:n,...r}){return(0,H.jsxs)(Gse,{"data-slot":`select-trigger`,className:Mr(WI({size:t}),`justify-between data-[placeholder]:text-placeholder`,`*:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2`,e),...r,children:[n,(0,H.jsx)(Jse,{asChild:!0,children:(0,H.jsx)(qr,{className:`size-5 shrink-0 text-muted-foreground`})})]})}function bL({className:e,children:t,position:n=`popper`,...r}){return(0,H.jsx)(Zse,{children:(0,H.jsx)(Qse,{"data-slot":`select-content`,className:Mr(`bg-popover text-popover-foreground`,`relative z-50 max-h-[min(var(--radix-select-content-available-height),300px)] min-w-[8rem] overflow-hidden rounded-md border border-border-secondary py-1 shadow-lg`,`origin-(--radix-select-content-transform-origin)`,`data-[state=open]:animate-in data-[state=closed]:animate-out`,`data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0`,`data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95`,`data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2`,`data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2`,n===`popper`&&`data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1`,e),position:n,...r,children:(0,H.jsx)(ace,{className:Mr(`p-1`,n===`popper`&&`h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1`),children:t})})})}function xL({className:e,children:t,...n}){return(0,H.jsxs)(lce,{"data-slot":`select-item`,className:Mr(`relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pl-2 outline-hidden select-none`,`type-text-md font-medium text-foreground mx-1 my-px`,`[@media(hover:hover)]:hover:bg-background-hover`,`focus:bg-background-hover`,`data-[disabled]:pointer-events-none data-[disabled]:text-disabled-foreground`,`[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),...n,children:[(0,H.jsx)(`span`,{className:`absolute right-2 flex size-4 items-center justify-center`,children:(0,H.jsx)(fce,{children:(0,H.jsx)(Kr,{className:`size-4 text-primary`})})}),(0,H.jsx)(uce,{children:t})]})}function hce({open:e,onOpenChange:t,defaultName:n,teams:r,defaultTeamId:i,staleConfig:a,onCreate:o}){let s=(0,b.useId)(),[c,l]=(0,b.useState)(n),[u,d]=(0,b.useState)(i),[f,p]=(0,b.useState)(null),[m,h]=(0,b.useState)(!1);(0,b.useEffect)(()=>{e&&(l(n),d(i),p(null))},[e,n,i]);let g=c.trim(),_=r.find(e=>e.id===u)??r[0];return(0,H.jsx)(rP,{open:e,onOpenChange:t,children:(0,H.jsxs)(sP,{children:[(0,H.jsxs)(cP,{children:[(0,H.jsx)(dP,{children:`Deploy to Alpic`}),(0,H.jsx)(fP,{children:a?`The linked project is no longer available. Create a new one to deploy.`:`Name your project to create it and run the first deployment.`})]}),(0,H.jsxs)(`form`,{onSubmit:async e=>{if(e.preventDefault(),!(!g||m)){h(!0),p(null);try{await o(g,u,_?.name),t(!1)}catch(e){p(e instanceof Error?e.message:`Failed to create project`)}finally{h(!1)}}},className:`space-y-3`,children:[(0,H.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,H.jsx)(HI,{htmlFor:s,children:`Project name`}),(0,H.jsx)(UI,{id:s,value:c,onChange:e=>l(e.target.value),placeholder:`my-mcp-app`,autoFocus:!0}),r.length>1?(0,H.jsxs)(`div`,{className:`flex items-center gap-1.5 text-xs text-muted-foreground`,children:[(0,H.jsx)(`span`,{children:`Team:`}),(0,H.jsxs)(_L,{value:u,onValueChange:d,children:[(0,H.jsx)(yL,{size:`sm`,className:`h-6 gap-1 border-none bg-transparent px-1 font-medium text-foreground text-xs shadow-none hover:bg-background-hover`,children:(0,H.jsx)(vL,{})}),(0,H.jsx)(bL,{align:`start`,className:`min-w-48`,children:r.map(e=>(0,H.jsx)(xL,{value:e.id,className:`cursor-pointer text-xs`,children:e.name},e.id))})]})]}):(0,H.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`Team: `,(0,H.jsx)(`span`,{className:`font-medium`,children:_?.name})]}),f&&(0,H.jsx)(`p`,{className:`text-destructive text-xs`,children:f})]}),(0,H.jsxs)(uP,{children:[(0,H.jsx)($i,{type:`button`,variant:`secondary`,onClick:()=>t(!1),children:`Cancel`}),(0,H.jsx)($i,{type:`submit`,variant:`primary`,disabled:!g||m,children:m?`Creating…`:`Create & deploy`})]})]})]})})}var gce={idle:{variant:`muted`,pulse:!1},starting:{variant:`warning`,pulse:!0},connected:{variant:`success`,pulse:!1},error:{variant:`destructive`,pulse:!1}},_ce=120,SL=`max-w-[200px]`;function vce(){let[e,t]=(0,b.useState)(!1),n=(0,b.useRef)(null);return(0,b.useEffect)(()=>()=>{n.current&&clearTimeout(n.current)},[]),{open:e,setOpen:t,onEnter:(0,b.useCallback)(()=>{n.current&&=(clearTimeout(n.current),null),t(!0)},[]),onLeave:(0,b.useCallback)(()=>{n.current&&clearTimeout(n.current),n.current=setTimeout(()=>t(!1),_ce)},[])}}function CL({trigger:e,className:t,children:n}){let{open:r,setOpen:i,onEnter:a,onLeave:o}=vce(),s=(0,b.useId)();return(0,H.jsxs)(tN,{open:r,onOpenChange:i,children:[(0,H.jsx)(rN,{asChild:!0,children:(0,b.cloneElement)(e,{onMouseEnter:a,onMouseLeave:o,"data-popover-anchor":s})}),(0,H.jsx)(iN,{align:`end`,sideOffset:0,className:lN(`p-4`,t),onMouseEnter:a,onMouseLeave:o,onOpenAutoFocus:e=>e.preventDefault(),onPointerDownOutside:e=>{e.target?.closest?.(`[data-popover-anchor="${CSS.escape(s)}"]`)&&e.preventDefault()},children:n})]})}function wL({label:e,icon:t,buildUrl:n,description:r}){let i=ON(e=>e.state),a=ON(e=>e.start),[o,s]=(0,b.useState)(!1),c=i.status===`connected`?n(i.url):null;(0,b.useEffect)(()=>{o&&i.status===`connected`?(window.open(n(i.url),`_blank`,`noreferrer,noopener`),s(!1)):o&&(i.status===`error`||i.status===`idle`)&&s(!1)},[o,i,n]);let l=()=>{if(c){window.open(c,`_blank`,`noreferrer,noopener`);return}s(!0),a()},u=o,d=!c&&i.status===`starting`;return(0,H.jsx)(CL,{className:`w-72`,trigger:(0,H.jsx)($i,{variant:`secondary`,"aria-disabled":d,className:lN(d&&`opacity-50 cursor-not-allowed`),icon:u?(0,H.jsx)(oN,{size:`sm`,className:`text-current`}):t,onClick:d?void 0:l,children:e}),children:c?(0,H.jsx)(`p`,{className:lN(`text-sm text-muted-foreground text-center mx-auto`,SL),children:r}):(0,H.jsx)(`p`,{className:`text-sm text-muted-foreground text-center`,children:u?`Starting the tunnel, ${e} will open shortly…`:`Click to start the tunnel and open ${e}.`})})}function yce(){return(0,H.jsx)(wL,{label:`Playground`,icon:(0,H.jsx)(pi,{className:`size-3.5`}),buildUrl:e=>`${e}/try`,description:`Chat with your MCP server with a real LLM and share it`})}function bce(){return(0,H.jsx)(wL,{label:`Audit`,icon:(0,H.jsx)($r,{className:`size-3.5`}),buildUrl:e=>`https://app.alpic.ai/beacon?url=${encodeURIComponent(`${e}/mcp`)}`,description:`Audit your MCP server's tools, prompts, and resources`})}var xce=`https://app.alpic.ai`;function Sce(){let e=wN(e=>e.status.state===`ready`&&e.status.mcpServerUrl?e.status.mcpServerUrl:e.progress.status===`deployed`?e.progress.mcpServerUrl:null),{copied:t,copy:n}=gN();if(!e)return null;let r=e.replace(/^https?:\/\//,``);return(0,H.jsxs)(`button`,{type:`button`,"aria-label":`Copy live MCP server URL`,onClick:()=>n(e),className:`inline-flex h-8 items-center gap-2 rounded-md border bg-light-gray px-2.5 text-sm hover:bg-background-hover`,children:[(0,H.jsx)(ii,{className:`size-3.5 text-quaternary-foreground`,"aria-hidden":!0}),(0,H.jsx)(`span`,{className:`max-w-48 truncate font-mono text-xs`,children:r}),(0,H.jsx)(`span`,{className:`text-quaternary-foreground`,children:t?(0,H.jsx)(Kr,{className:`size-3.5`}):(0,H.jsx)(ti,{className:`size-3.5`})})]})}function Cce(){let{status:e,progress:t,redeploy:n,createAndDeploy:r,signIn:i}=wN(),a=YD(),[o,s]=(0,b.useState)(!1),[c,l]=(0,b.useState)(!1),[u,d]=(0,b.useState)(null),f=t.status===`deploying`||e.state===`ready`&&e.lastDeployStatus===`ongoing`,p=e.state===`ready`&&!!e.lastDeployGit,m=c||f||p||e.state===`loading`||e.state===`noTeam`||e.state===`error`,h=()=>{d(null),l(!0),i().catch(e=>d(e instanceof Error?e.message:`Sign-in failed`)).finally(()=>l(!1))},g=()=>{d(null),n().catch(e=>d(e instanceof Error?e.message:`Deploy failed`))},_=()=>{if(d(null),e.state===`signedOut`){h();return}if(e.state===`ready`){g();return}e.state===`needsProject`&&s(!0)};return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(CL,{className:`w-72`,trigger:(0,H.jsx)($i,{variant:`cta`,className:lN(`h-8 px-2 gap-1`,m&&`opacity-50 cursor-not-allowed`),"aria-disabled":m,icon:c?(0,H.jsx)(oN,{size:`sm`,className:`text-current`}):(0,H.jsx)(cN,{className:`size-2`,...Ece(e,t),"aria-hidden":!0}),onClick:m?void 0:_,children:`Deploy`}),children:(0,H.jsx)(wce,{status:e,progress:t,signingIn:c,actionError:u,onRedeploy:g,onSignIn:h})}),e.state===`needsProject`&&(0,H.jsx)(hce,{open:o,onOpenChange:s,defaultName:a?.name??`my-mcp-app`,teams:e.teams,defaultTeamId:e.defaultTeamId,staleConfig:e.staleConfig,onCreate:r})]})}function wce({status:e,progress:t,signingIn:n,actionError:r,onRedeploy:i,onSignIn:a}){if(t.status===`deploying`)return(0,H.jsx)(TL,{startedAt:t.startedAt,deploymentPageUrl:t.deploymentPageUrl});let o=e.state===`ready`&&!!e.lastDeployGit;if(t.status===`deployed`&&!o)return(0,H.jsxs)(`div`,{className:`space-y-3`,children:[(0,H.jsx)(`p`,{className:`text-sm font-medium`,children:`Deployed`}),(0,H.jsx)(EL,{url:t.mcpServerUrl}),t.deploymentPageUrl&&(0,H.jsx)(DL,{href:t.deploymentPageUrl})]});if(t.status===`failed`&&!o)return(0,H.jsxs)(`div`,{className:`space-y-2`,children:[(0,H.jsx)(`p`,{className:`text-sm font-medium text-destructive`,children:`Deployment failed`}),(0,H.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:t.message}),t.deploymentPageUrl&&(0,H.jsx)(OL,{href:t.deploymentPageUrl,label:`Go to logs`})]});switch(e.state){case`loading`:return(0,H.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Checking Alpic…`});case`signedOut`:return(0,H.jsxs)(`div`,{className:`space-y-2`,children:[(0,H.jsx)(`p`,{className:`text-sm font-medium`,children:`Sign in to Alpic to deploy`}),(0,H.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Connect your Alpic account to deploy this server.`}),(0,H.jsx)($i,{variant:`primary`,className:`h-7 w-full`,disabled:n,onClick:a,children:n?`Signing in…`:`Sign in to Alpic`}),r&&(0,H.jsx)(`p`,{className:`text-xs text-destructive`,children:r})]});case`noTeam`:return(0,H.jsxs)(`div`,{className:`space-y-2`,children:[(0,H.jsx)(`p`,{className:`text-sm font-medium`,children:`No team yet`}),(0,H.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Create a team on Alpic before deploying.`}),(0,H.jsx)(OL,{href:xce,label:`Open Alpic`})]});case`needsProject`:return(0,H.jsx)(`p`,{className:`text-sm`,children:`Click to deploy to Alpic`});case`ready`:return e.lastDeployStatus===`ongoing`?(0,H.jsx)(TL,{startedAt:e.lastDeployStartedAt??null,deploymentPageUrl:e.deploymentPageUrl??null}):(0,H.jsxs)(`div`,{className:`space-y-2`,children:[!e.lastDeployGit&&(0,H.jsx)(`p`,{className:`text-sm`,children:`Click to deploy to Alpic`}),e.mcpServerUrl&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`p`,{className:`text-xs font-medium text-muted-foreground`,children:`Last Deployment:`}),(0,H.jsx)(EL,{url:e.mcpServerUrl})]}),e.deploymentPageUrl&&(0,H.jsx)(DL,{href:e.deploymentPageUrl}),e.lastDeployGit&&(0,H.jsx)(iO,{className:`px-3 py-2`,title:`Last deployed from Git`,description:(0,H.jsxs)(`div`,{className:`space-y-2`,children:[(0,H.jsx)(Dce,{git:e.lastDeployGit}),(0,H.jsx)($i,{variant:`primary`,className:`h-7 w-full`,onClick:i,children:`Deploy anyway`})]})}),r&&(0,H.jsx)(`p`,{className:`text-xs text-destructive`,children:r})]});case`error`:return(0,H.jsx)(`p`,{className:`text-xs text-destructive`,children:e.message})}}function Tce(e){let t=Math.max(0,Math.floor(e/1e3)),n=Math.floor(t/60),r=t%60;return n>0?`${n}m ${String(r).padStart(2,`0`)}s`:`${r}s`}function TL({startedAt:e,deploymentPageUrl:t}){let[n,r]=(0,b.useState)(()=>e==null?0:Date.now()-e);return(0,b.useEffect)(()=>{if(e==null)return;let t=()=>r(Date.now()-e);t();let n=setInterval(t,1e3);return()=>clearInterval(n)},[e]),(0,H.jsxs)(`div`,{className:`space-y-2`,children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,H.jsx)(oN,{size:`sm`,className:`shrink-0 text-current`}),(0,H.jsx)(`p`,{className:`text-sm`,children:`Deploying…`}),e!=null&&(0,H.jsx)(`span`,{className:`ml-auto font-mono text-xs text-muted-foreground`,children:Tce(n)})]}),t&&(0,H.jsx)(OL,{href:t,label:`Go to logs`})]})}function Ece(e,t){if(t.status===`deploying`)return{variant:`warning`,pulse:!0};let n=e.state===`ready`&&!!e.lastDeployGit;if(t.status===`failed`&&!n)return{variant:`destructive`,pulse:!1};if(t.status===`deployed`&&!n)return{variant:`success`,pulse:!1};if(e.state===`ready`)switch(e.lastDeployStatus){case`ongoing`:return{variant:`warning`,pulse:!0};case`failed`:case`canceled`:return{variant:`destructive`,pulse:!1};case`deployed`:return{variant:`success`,pulse:!1}}return{variant:`muted`,pulse:!1}}function EL({url:e}){let{copied:t,copy:n}=gN();return(0,H.jsxs)(`button`,{type:`button`,"aria-label":`Copy MCP server URL`,onClick:()=>n(e),className:`flex w-full items-center gap-2 rounded-md border bg-light-gray px-2 py-1.5 text-left hover:bg-background-hover`,children:[(0,H.jsx)(`span`,{className:`flex-1 truncate font-mono text-xs`,children:e}),(0,H.jsx)(`span`,{className:`text-quaternary-foreground`,children:t?(0,H.jsx)(Kr,{className:`size-3.5`}):(0,H.jsx)(ti,{className:`size-3.5`})})]})}function DL({href:e}){return(0,H.jsx)($i,{asChild:!0,variant:`tertiary`,className:`w-full`,children:(0,H.jsxs)(`a`,{href:e,target:`_blank`,rel:`noreferrer noopener`,children:[(0,H.jsx)(ni,{className:`size-3.5`}),`Go to deployment page`]})})}function Dce({git:e}){return!e.ref&&!e.commitMessage&&!e.author?null:(0,H.jsxs)(`div`,{className:`space-y-0.5 text-xs`,children:[e.ref&&(0,H.jsxs)(`p`,{children:[`Branch `,(0,H.jsx)(`span`,{className:`font-mono`,children:e.ref}),e.author&&(0,H.jsxs)(H.Fragment,{children:[` · by `,e.author]})]}),e.commitMessage&&(0,H.jsxs)(`p`,{className:`truncate`,children:[`“`,e.commitMessage,`”`]})]})}function OL({href:e,label:t}){return(0,H.jsxs)(`a`,{href:e,target:`_blank`,rel:`noreferrer`,className:`flex items-center gap-1.5 text-xs text-muted-foreground hover:text-foreground`,children:[(0,H.jsx)(ni,{className:`size-3.5`}),t]})}function Oce(){let{state:e,start:t,stop:n}=ON(),{copied:r,copy:i}=gN(),a=e.status===`connected`?`${e.url}/mcp`:null,o=a?()=>i(a):e.status===`starting`?n:t;return(0,H.jsxs)(CL,{className:lN(`w-60 text-center`,e.status===`starting`&&`animate-pulse w-60`),trigger:(0,H.jsxs)($i,{variant:`secondary`,onClick:o,children:[(0,H.jsx)(cN,{className:`size-2`,...gce[e.status],"aria-hidden":!0}),a?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`span`,{className:`mx-2 font-mono text-xs`,children:a.replace(/^https?:\/\//,``)}),r?(0,H.jsx)(Kr,{className:`size-3.5`}):(0,H.jsx)(ti,{className:`size-3.5`})]}):`Tunnel`]}),children:[e.status===`idle`&&(0,H.jsx)(kce,{}),e.status===`error`&&(0,H.jsx)(Ace,{message:e.message,onRetry:t}),e.status===`starting`&&(0,H.jsx)(jce,{message:e.message}),e.status===`connected`&&(0,H.jsx)(Mce,{onStop:n})]})}function kce(){return(0,H.jsx)(`div`,{className:`space-y-3`,children:(0,H.jsx)(`p`,{className:lN(`text-sm text-muted-foreground mx-auto`,SL),children:`Get a public URL that you can use in Claude or ChatGPT.`})})}function Ace({message:e,onRetry:t}){return(0,H.jsxs)(`div`,{className:`space-y-3 text-left`,children:[(0,H.jsx)(`p`,{className:`text-sm text-destructive`,children:e}),(0,H.jsx)($i,{variant:`primary`,className:`w-full`,onClick:t,children:`Retry`})]})}function jce({message:e}){return(0,H.jsx)(`div`,{className:`space-y-3`,children:(0,H.jsxs)(`div`,{className:`flex items-center justify-center gap-2`,children:[(0,H.jsx)(cN,{className:`size-2`,variant:`warning`,pulse:!0,"aria-hidden":!0}),(0,H.jsx)(`p`,{className:lN(`text-sm text-muted-foreground`,SL),children:e}),(0,H.jsx)(oN,{size:`sm`,className:`text-current`})]})})}function Mce({onStop:e}){return(0,H.jsxs)(`div`,{className:`space-y-3 text-left`,children:[(0,H.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,H.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Click to copy the tunnel URL to use in Claude or ChatGPT`})}),(0,H.jsx)(rO,{}),(0,H.jsx)($i,{variant:`tertiary`,className:`w-full`,onClick:e,icon:(0,H.jsx)(ki,{}),children:`Stop tunnel`})]})}var Nce=[{label:`discord`,href:`https://discord.gg/awV4gu74wK`},{label:`docs`,href:`https://docs.skybridge.tech/`},{label:`github`,href:`https://github.com/alpic-ai/skybridge`}];function Pce({children:e}){return(0,H.jsx)(`div`,{className:`inline-flex h-8 items-center gap-2 rounded-md px-2.5 text-sm bg-light-gray border`,children:e})}function Fce(){let e=YD(),t=e?.name??`skybridge`,n=e?.version;return(0,H.jsxs)(Pce,{children:[(0,H.jsx)(`img`,{src:`/skybridge.svg`,alt:``,"aria-hidden":!0,className:`size-3.5`}),(0,H.jsx)(`span`,{children:t}),(0,H.jsx)(rO,{orientation:`vertical`,className:`h-4 self-center!`}),n&&(0,H.jsx)(`span`,{className:`font-mono text-xs text-quaternary-foreground`,children:n})]})}var Ice=()=>{let{status:e,requiresAuth:t,hasAuthRequiredTools:n,isSignedIn:r,error:i}=os();return(0,H.jsxs)(`header`,{className:`flex h-13 items-center justify-between gap-3 border-b border-border px-4`,children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,H.jsx)(Fce,{}),(0,H.jsx)(Sce,{})]}),(0,H.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,H.jsx)(Oce,{}),(0,H.jsx)(yce,{}),(0,H.jsx)(bce,{}),(0,H.jsx)(Cce,{})]}),(0,H.jsxs)(`div`,{className:`flex items-center gap-3`,children:[i&&(0,H.jsx)(`span`,{className:`max-w-48 truncate text-xs text-destructive`,children:i}),t&&(0,H.jsx)(loe,{status:e}),t&&e===`authenticated`&&n&&!r&&(0,H.jsxs)($i,{variant:`tertiary`,onClick:()=>WD(),children:[(0,H.jsx)(li,{className:`size-3.5`}),`Sign in`]}),t&&e===`authenticated`&&r&&(0,H.jsxs)($i,{variant:`tertiary`,onClick:()=>KD(),children:[(0,H.jsx)(ui,{className:`size-3.5`}),`Sign out`]}),(0,H.jsx)(`nav`,{className:`flex items-center gap-1 text-xs`,children:Nce.map((e,t)=>(0,H.jsxs)(`span`,{className:`inline-flex items-center gap-1`,children:[t>0&&(0,H.jsx)(`span`,{"aria-hidden":!0,children:`·`}),(0,H.jsx)($i,{asChild:!0,variant:`tertiary`,children:(0,H.jsx)(`a`,{href:e.href,target:`_blank`,rel:`noreferrer noopener`,children:e.label})})]},e.label))})]})]})},kL=1,Lce=.9,Rce=.8,zce=.17,AL=.1,jL=.999,Bce=.9999,Vce=.99,Hce=/[\\\/_+.#"@\[\(\{&]/,Uce=/[\\\/_+.#"@\[\(\{&]/g,Wce=/[\s-]/,ML=/[\s-]/g;function NL(e,t,n,r,i,a,o){if(a===t.length)return i===e.length?kL:Vce;var s=`${i},${a}`;if(o[s]!==void 0)return o[s];for(var c=r.charAt(a),l=n.indexOf(c,i),u=0,d,f,p,m;l>=0;)d=NL(e,t,n,r,l+1,a+1,o),d>u&&(l===i?d*=kL:Hce.test(e.charAt(l-1))?(d*=Rce,p=e.slice(i,l-1).match(Uce),p&&i>0&&(d*=jL**+p.length)):Wce.test(e.charAt(l-1))?(d*=Lce,m=e.slice(i,l-1).match(ML),m&&i>0&&(d*=jL**+m.length)):(d*=zce,i>0&&(d*=jL**+(l-i))),e.charAt(l)!==t.charAt(a)&&(d*=Bce)),(d<AL&&n.charAt(l-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(l-1)!==r.charAt(a))&&(f=NL(e,t,n,r,l+1,a+2,o),f*AL>d&&(d=f*AL)),d>u&&(u=d),l=n.indexOf(c,l+1);return o[s]=u,u}function PL(e){return e.toLowerCase().replace(ML,` `)}function Gce(e,t,n){return e=n&&n.length>0?`${e+` `+n.join(` `)}`:e,NL(e,t,PL(e),PL(t),0,0,{})}typeof window<`u`&&window.document&&window.document.createElement;function FL(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}function IL(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function LL(...e){return t=>{let n=!1,r=e.map(e=>{let r=IL(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():IL(e[t],null)}}}}function RL(...e){return b.useCallback(LL(...e),e)}function Kce(e,t){let n=b.createContext(t),r=e=>{let{children:t,...r}=e,i=b.useMemo(()=>r,Object.values(r));return(0,H.jsx)(n.Provider,{value:i,children:t})};r.displayName=e+`Provider`;function i(r){let i=b.useContext(n);if(i)return i;if(t!==void 0)return t;throw Error(`\`${r}\` must be used within \`${e}\``)}return[r,i]}function zL(e,t=[]){let n=[];function r(t,r){let i=b.createContext(r),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,H.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,qce(i,...t)]}function qce(...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}var BL=globalThis?.document?b.useLayoutEffect:()=>{},Jce=b.useId||(()=>void 0),Yce=0;function VL(e){let[t,n]=b.useState(Jce());return BL(()=>{e||n(e=>e??String(Yce++))},[e]),e||(t?`radix-${t}`:``)}var Xce=b.useInsertionEffect||BL;function HL({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[i,a,o]=Zce({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=Qce(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}function Zce({defaultProp:e,onChange:t}){let[n,r]=b.useState(e),i=b.useRef(n),a=b.useRef(t);return Xce(()=>{a.current=t},[t]),b.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}function Qce(e){return typeof e==`function`}function UL(e){let t=$ce(e),n=b.forwardRef((e,n)=>{let{children:r,...i}=e,a=b.Children.toArray(r),o=a.find(tle);if(o){let e=o.props.children,r=a.map(t=>t===o?b.Children.count(e)>1?b.Children.only(null):b.isValidElement(e)?e.props.children:null:t);return(0,H.jsx)(t,{...i,ref:n,children:b.isValidElement(e)?b.cloneElement(e,void 0,r):null})}return(0,H.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function $ce(e){let t=b.forwardRef((e,t)=>{let{children:n,...r}=e;if(b.isValidElement(n)){let e=rle(n),i=nle(r,n.props);return n.type!==b.Fragment&&(i.ref=t?LL(t,e):e),b.cloneElement(n,i)}return b.Children.count(n)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ele=Symbol(`radix.slottable`);function tle(e){return b.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===ele}function nle(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 rle(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 WL=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=UL(`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,H.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function ile(e,t){e&&SC.flushSync(()=>e.dispatchEvent(t))}function GL(e){let t=b.useRef(e);return b.useEffect(()=>{t.current=e}),b.useMemo(()=>(...e)=>t.current?.(...e),[])}function ale(e,t=globalThis?.document){let n=GL(e);b.useEffect(()=>{let e=e=>{e.key===`Escape`&&n(e)};return t.addEventListener(`keydown`,e,{capture:!0}),()=>t.removeEventListener(`keydown`,e,{capture:!0})},[n,t])}var ole=`DismissableLayer`,KL=`dismissableLayer.update`,sle=`dismissableLayer.pointerDownOutside`,cle=`dismissableLayer.focusOutside`,qL,JL=b.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),YL=b.forwardRef((e,t)=>{let{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:s,...c}=e,l=b.useContext(JL),[u,d]=b.useState(null),f=u?.ownerDocument??globalThis?.document,[,p]=b.useState({}),m=RL(t,e=>d(e)),h=Array.from(l.layers),[g]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),_=h.indexOf(g),v=u?h.indexOf(u):-1,y=l.layersWithOutsidePointerEventsDisabled.size>0,x=v>=_,S=dle(e=>{let t=e.target,n=[...l.branches].some(e=>e.contains(t));!x||n||(i?.(e),o?.(e),e.defaultPrevented||s?.())},f),C=fle(e=>{let t=e.target;[...l.branches].some(e=>e.contains(t))||(a?.(e),o?.(e),e.defaultPrevented||s?.())},f);return ale(e=>{v===l.layers.size-1&&(r?.(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))},f),b.useEffect(()=>{if(u)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(qL=f.body.style.pointerEvents,f.body.style.pointerEvents=`none`),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),XL(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=qL)}},[u,f,n,l]),b.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),XL())},[u,l]),b.useEffect(()=>{let e=()=>p({});return document.addEventListener(KL,e),()=>document.removeEventListener(KL,e)},[]),(0,H.jsx)(WL.div,{...c,ref:m,style:{pointerEvents:y?x?`auto`:`none`:void 0,...e.style},onFocusCapture:FL(e.onFocusCapture,C.onFocusCapture),onBlurCapture:FL(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:FL(e.onPointerDownCapture,S.onPointerDownCapture)})});YL.displayName=ole;var lle=`DismissableLayerBranch`,ule=b.forwardRef((e,t)=>{let n=b.useContext(JL),r=b.useRef(null),i=RL(t,r);return b.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,H.jsx)(WL.div,{...e,ref:i})});ule.displayName=lle;function dle(e,t=globalThis?.document){let n=GL(e),r=b.useRef(!1),i=b.useRef(()=>{});return b.useEffect(()=>{let e=e=>{if(e.target&&!r.current){let r=function(){ZL(sle,n,a,{discrete:!0})},a={originalEvent:e};e.pointerType===`touch`?(t.removeEventListener(`click`,i.current),i.current=r,t.addEventListener(`click`,i.current,{once:!0})):r()}else t.removeEventListener(`click`,i.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener(`pointerdown`,e)},0);return()=>{window.clearTimeout(a),t.removeEventListener(`pointerdown`,e),t.removeEventListener(`click`,i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function fle(e,t=globalThis?.document){let n=GL(e),r=b.useRef(!1);return b.useEffect(()=>{let e=e=>{e.target&&!r.current&&ZL(cle,n,{originalEvent:e},{discrete:!1})};return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function XL(){let e=new CustomEvent(KL);document.dispatchEvent(e)}function ZL(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?ile(i,a):i.dispatchEvent(a)}var QL=`focusScope.autoFocusOnMount`,$L=`focusScope.autoFocusOnUnmount`,eR={bubbles:!1,cancelable:!0},ple=`FocusScope`,tR=b.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=b.useState(null),l=GL(i),u=GL(a),d=b.useRef(null),f=RL(t,e=>c(e)),p=b.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;b.useEffect(()=>{if(r){let e=function(e){if(p.paused||!s)return;let t=e.target;s.contains(t)?d.current=t:iR(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||iR(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&iR(s)};document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,s,p.paused]),b.useEffect(()=>{if(s){aR.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(QL,eR);s.addEventListener(QL,l),s.dispatchEvent(t),t.defaultPrevented||(mle(yle(nR(s)),{select:!0}),document.activeElement===e&&iR(s))}return()=>{s.removeEventListener(QL,l),setTimeout(()=>{let t=new CustomEvent($L,eR);s.addEventListener($L,u),s.dispatchEvent(t),t.defaultPrevented||iR(e??document.body,{select:!0}),s.removeEventListener($L,u),aR.remove(p)},0)}}},[s,l,u,p]);let m=b.useCallback(e=>{if(!n&&!r||p.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=hle(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&iR(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&iR(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return(0,H.jsx)(WL.div,{tabIndex:-1,...o,ref:f,onKeyDown:m})});tR.displayName=ple;function mle(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(iR(r,{select:t}),document.activeElement!==n)return}function hle(e){let t=nR(e);return[rR(t,e),rR(t.reverse(),e)]}function nR(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function rR(e,t){for(let n of e)if(!gle(n,{upTo:t}))return n}function gle(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}function _le(e){return e instanceof HTMLInputElement&&`select`in e}function iR(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&_le(e)&&t&&e.select()}}var aR=vle();function vle(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=oR(e,t),e.unshift(t)},remove(t){e=oR(e,t),e[0]?.resume()}}}function oR(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function yle(e){return e.filter(e=>e.tagName!==`A`)}var ble=`Portal`,sR=b.forwardRef((e,t)=>{let{container:n,...r}=e,[i,a]=b.useState(!1);BL(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?SC.createPortal((0,H.jsx)(WL.div,{...r,ref:t}),o):null});sR.displayName=ble;function xle(e,t){return b.useReducer((e,n)=>t[e][n]??e,e)}var cR=e=>{let{present:t,children:n}=e,r=Sle(t),i=typeof n==`function`?n({present:r.isPresent}):b.Children.only(n),a=RL(r.ref,Cle(i));return typeof n==`function`||r.isPresent?b.cloneElement(i,{ref:a}):null};cR.displayName=`Presence`;function Sle(e){let[t,n]=b.useState(),r=b.useRef(null),i=b.useRef(e),a=b.useRef(`none`),[o,s]=xle(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return b.useEffect(()=>{let e=lR(r.current);a.current=o===`mounted`?e:`none`},[o]),BL(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,o=lR(t);e?s(`MOUNT`):o===`none`||t?.display===`none`?s(`UNMOUNT`):s(n&&r!==o?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,s]),BL(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=a=>{let o=lR(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=lR(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 lR(e){return e?.animationName||`none`}function Cle(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 uR=0;function wle(){b.useEffect(()=>{let e=document.querySelectorAll(`[data-radix-focus-guard]`);return document.body.insertAdjacentElement(`afterbegin`,e[0]??dR()),document.body.insertAdjacentElement(`beforeend`,e[1]??dR()),uR++,()=>{uR===1&&document.querySelectorAll(`[data-radix-focus-guard]`).forEach(e=>e.remove()),uR--}},[])}function dR(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}var fR=`Dialog`,[pR,Tle]=zL(fR),[Ele,mR]=pR(fR),hR=e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=b.useRef(null),c=b.useRef(null),[l,u]=HL({prop:r,defaultProp:i??!1,onChange:a,caller:fR});return(0,H.jsx)(Ele,{scope:t,triggerRef:s,contentRef:c,contentId:VL(),titleId:VL(),descriptionId:VL(),open:l,onOpenChange:u,onOpenToggle:b.useCallback(()=>u(e=>!e),[u]),modal:o,children:n})};hR.displayName=fR;var gR=`DialogTrigger`,Dle=b.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=mR(gR,n),a=RL(t,i.triggerRef);return(0,H.jsx)(WL.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.contentId,"data-state":OR(i.open),...r,ref:a,onClick:FL(e.onClick,i.onOpenToggle)})});Dle.displayName=gR;var _R=`DialogPortal`,[Ole,vR]=pR(_R,{forceMount:void 0}),yR=e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=mR(_R,t);return(0,H.jsx)(Ole,{scope:t,forceMount:n,children:b.Children.map(r,e=>(0,H.jsx)(cR,{present:n||a.open,children:(0,H.jsx)(sR,{asChild:!0,container:i,children:e})}))})};yR.displayName=_R;var bR=`DialogOverlay`,xR=b.forwardRef((e,t)=>{let n=vR(bR,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=mR(bR,e.__scopeDialog);return a.modal?(0,H.jsx)(cR,{present:r||a.open,children:(0,H.jsx)(Ale,{...i,ref:t})}):null});xR.displayName=bR;var kle=UL(`DialogOverlay.RemoveScroll`),Ale=b.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=mR(bR,n);return(0,H.jsx)(EM,{as:kle,allowPinchZoom:!0,shards:[i.contentRef],children:(0,H.jsx)(WL.div,{"data-state":OR(i.open),...r,ref:t,style:{pointerEvents:`auto`,...r.style}})})}),SR=`DialogContent`,CR=b.forwardRef((e,t)=>{let n=vR(SR,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=mR(SR,e.__scopeDialog);return(0,H.jsx)(cR,{present:r||a.open,children:a.modal?(0,H.jsx)(jle,{...i,ref:t}):(0,H.jsx)(Mle,{...i,ref:t})})});CR.displayName=SR;var jle=b.forwardRef((e,t)=>{let n=mR(SR,e.__scopeDialog),r=b.useRef(null),i=RL(t,n.contentRef,r);return b.useEffect(()=>{let e=r.current;if(e)return hj(e)},[]),(0,H.jsx)(wR,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:FL(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:FL(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:FL(e.onFocusOutside,e=>e.preventDefault())})}),Mle=b.forwardRef((e,t)=>{let n=mR(SR,e.__scopeDialog),r=b.useRef(!1),i=b.useRef(!1);return(0,H.jsx)(wR,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),wR=b.forwardRef((e,t)=>{let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=mR(SR,n),c=b.useRef(null),l=RL(t,c);return wle(),(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(tR,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,H.jsx)(YL,{role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":OR(s.open),...o,ref:l,onDismiss:()=>s.onOpenChange(!1)})}),(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Lle,{titleId:s.titleId}),(0,H.jsx)(zle,{contentRef:c,descriptionId:s.descriptionId})]})]})}),TR=`DialogTitle`,Nle=b.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=mR(TR,n);return(0,H.jsx)(WL.h2,{id:i.titleId,...r,ref:t})});Nle.displayName=TR;var ER=`DialogDescription`,Ple=b.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=mR(ER,n);return(0,H.jsx)(WL.p,{id:i.descriptionId,...r,ref:t})});Ple.displayName=ER;var DR=`DialogClose`,Fle=b.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=mR(DR,n);return(0,H.jsx)(WL.button,{type:`button`,...r,ref:t,onClick:FL(e.onClick,()=>i.onOpenChange(!1))})});Fle.displayName=DR;function OR(e){return e?`open`:`closed`}var kR=`DialogTitleWarning`,[Ile,AR]=Kce(kR,{contentName:SR,titleName:TR,docsSlug:`dialog`}),Lle=({titleId:e})=>{let t=AR(kR),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
142
+
143
+ If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
144
+
145
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return b.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Rle=`DialogDescriptionWarning`,zle=({contentRef:e,descriptionId:t})=>{let n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${AR(Rle).contentName}}.`;return b.useEffect(()=>{let r=e.current?.getAttribute(`aria-describedby`);t&&r&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},Ble=hR,Vle=yR,Hle=xR,Ule=CR,Wle=Symbol.for(`react.lazy`),jR=b.use;function Gle(e){return typeof e==`object`&&!!e&&`then`in e}function MR(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===Wle&&`_payload`in e&&Gle(e._payload)}function Kle(e){let t=qle(e),n=b.forwardRef((e,n)=>{let{children:r,...i}=e;MR(r)&&typeof jR==`function`&&(r=jR(r._payload));let a=b.Children.toArray(r),o=a.find(Yle);if(o){let e=o.props.children,r=a.map(t=>t===o?b.Children.count(e)>1?b.Children.only(null):b.isValidElement(e)?e.props.children:null:t);return(0,H.jsx)(t,{...i,ref:n,children:b.isValidElement(e)?b.cloneElement(e,void 0,r):null})}return(0,H.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function qle(e){let t=b.forwardRef((e,t)=>{let{children:n,...r}=e;if(MR(n)&&typeof jR==`function`&&(n=jR(n._payload)),b.isValidElement(n)){let e=Zle(n),i=Xle(r,n.props);return n.type!==b.Fragment&&(i.ref=t?LL(t,e):e),b.cloneElement(n,i)}return b.Children.count(n)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Jle=Symbol(`radix.slottable`);function Yle(e){return b.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===Jle}function Xle(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 Zle(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 NR=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=Kle(`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,H.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),PR=`[cmdk-group=""]`,FR=`[cmdk-group-items=""]`,Qle=`[cmdk-group-heading=""]`,IR=`[cmdk-item=""]`,LR=`${IR}:not([aria-disabled="true"])`,RR=`cmdk-item-select`,zR=`data-value`,$le=(e,t,n)=>Gce(e,t,n),BR=b.createContext(void 0),VR=()=>b.useContext(BR),HR=b.createContext(void 0),UR=()=>b.useContext(HR),WR=b.createContext(void 0),GR=b.forwardRef((e,t)=>{let n=YR(()=>({search:``,value:e.value??e.defaultValue??``,selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}})),r=YR(()=>new Set),i=YR(()=>new Map),a=YR(()=>new Map),o=YR(()=>new Set),s=qR(e),{label:c,children:l,value:u,onValueChange:d,filter:f,shouldFilter:p,loop:m,disablePointerSelection:h=!1,vimBindings:g=!0,..._}=e,v=VL(),y=VL(),x=VL(),S=b.useRef(null),C=uue();JR(()=>{if(u!==void 0){let e=u.trim();n.current.value=e,w.emit()}},[u]),JR(()=>{C(6,A)},[]);let w=b.useMemo(()=>({subscribe:e=>(o.current.add(e),()=>o.current.delete(e)),snapshot:()=>n.current,setState:(e,t,r)=>{var i,a,o;if(!Object.is(n.current[e],t)){if(n.current[e]=t,e===`search`)k(),D(),C(1,O);else if(e===`value`){if(document.activeElement.hasAttribute(`cmdk-input`)||document.activeElement.hasAttribute(`cmdk-root`)){let e=document.getElementById(x);e?e.focus():(i=document.getElementById(v))==null||i.focus()}if(C(7,()=>{n.current.selectedItemId=j()?.id,w.emit()}),r||C(5,A),s.current?.value!==void 0){let e=t??``;(o=(a=s.current).onValueChange)==null||o.call(a,e);return}}w.emit()}},emit:()=>{o.current.forEach(e=>e())}}),[]),T=b.useMemo(()=>({value:(e,t,r)=>{t!==a.current.get(e)?.value&&(a.current.set(e,{value:t,keywords:r}),n.current.filtered.items.set(e,E(t,r)),C(2,()=>{D(),w.emit()}))},item:(e,t)=>(r.current.add(e),t&&(i.current.has(t)?i.current.get(t).add(e):i.current.set(t,new Set([e]))),C(3,()=>{k(),D(),n.current.value||O(),w.emit()}),()=>{a.current.delete(e),r.current.delete(e),n.current.filtered.items.delete(e);let t=j();C(4,()=>{k(),t?.getAttribute(`id`)===e&&O(),w.emit()})}),group:e=>(i.current.has(e)||i.current.set(e,new Set),()=>{a.current.delete(e),i.current.delete(e)}),filter:()=>s.current.shouldFilter,label:c||e[`aria-label`],getDisablePointerSelection:()=>s.current.disablePointerSelection,listId:v,inputId:x,labelId:y,listInnerRef:S}),[]);function E(e,t){let r=s.current?.filter??$le;return e?r(e,n.current.search,t):0}function D(){if(!n.current.search||s.current.shouldFilter===!1)return;let e=n.current.filtered.items,t=[];n.current.filtered.groups.forEach(n=>{let r=i.current.get(n),a=0;r.forEach(t=>{let n=e.get(t);a=Math.max(n,a)}),t.push([n,a])});let r=S.current;M().sort((t,n)=>{let r=t.getAttribute(`id`),i=n.getAttribute(`id`);return(e.get(i)??0)-(e.get(r)??0)}).forEach(e=>{let t=e.closest(FR);t?t.appendChild(e.parentElement===t?e:e.closest(`${FR} > *`)):r.appendChild(e.parentElement===r?e:e.closest(`${FR} > *`))}),t.sort((e,t)=>t[1]-e[1]).forEach(e=>{let t=S.current?.querySelector(`${PR}[${zR}="${encodeURIComponent(e[0])}"]`);t?.parentElement.appendChild(t)})}function O(){let e=M().find(e=>e.getAttribute(`aria-disabled`)!==`true`)?.getAttribute(zR);w.setState(`value`,e||void 0)}function k(){if(!n.current.search||s.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let e=0;for(let t of r.current){let r=E(a.current.get(t)?.value??``,a.current.get(t)?.keywords??[]);n.current.filtered.items.set(t,r),r>0&&e++}for(let[e,t]of i.current)for(let r of t)if(n.current.filtered.items.get(r)>0){n.current.filtered.groups.add(e);break}n.current.filtered.count=e}function A(){var e;let t=j();t&&(t.parentElement?.firstChild===t&&((e=t.closest(PR)?.querySelector(Qle))==null||e.scrollIntoView({block:`nearest`})),t.scrollIntoView({block:`nearest`}))}function j(){return S.current?.querySelector(`${IR}[aria-selected="true"]`)}function M(){return Array.from(S.current?.querySelectorAll(LR)||[])}function N(e){let t=M()[e];t&&w.setState(`value`,t.getAttribute(zR))}function P(e){var t;let n=j(),r=M(),i=r.findIndex(e=>e===n),a=r[i+e];(t=s.current)!=null&&t.loop&&(a=i+e<0?r[r.length-1]:i+e===r.length?r[0]:r[i+e]),a&&w.setState(`value`,a.getAttribute(zR))}function F(e){let t=j()?.closest(PR),n;for(;t&&!n;)t=e>0?cue(t,PR):lue(t,PR),n=t?.querySelector(LR);n?w.setState(`value`,n.getAttribute(zR)):P(e)}let I=()=>N(M().length-1),L=e=>{e.preventDefault(),e.metaKey?I():e.altKey?F(1):P(1)},ee=e=>{e.preventDefault(),e.metaKey?N(0):e.altKey?F(-1):P(-1)};return b.createElement(NR.div,{ref:t,tabIndex:-1,..._,"cmdk-root":``,onKeyDown:e=>{var t;(t=_.onKeyDown)==null||t.call(_,e);let n=e.nativeEvent.isComposing||e.keyCode===229;if(!(e.defaultPrevented||n))switch(e.key){case`n`:case`j`:g&&e.ctrlKey&&L(e);break;case`ArrowDown`:L(e);break;case`p`:case`k`:g&&e.ctrlKey&&ee(e);break;case`ArrowUp`:ee(e);break;case`Home`:e.preventDefault(),N(0);break;case`End`:e.preventDefault(),I();break;case`Enter`:{e.preventDefault();let t=j();if(t){let e=new Event(RR);t.dispatchEvent(e)}}}}},b.createElement(`label`,{"cmdk-label":``,htmlFor:T.inputId,id:T.labelId,style:fue},c),QR(e,e=>b.createElement(HR.Provider,{value:w},b.createElement(BR.Provider,{value:T},e))))}),eue=b.forwardRef((e,t)=>{let n=VL(),r=b.useRef(null),i=b.useContext(WR),a=VR(),o=qR(e),s=o.current?.forceMount??i?.forceMount;JR(()=>{if(!s)return a.item(n,i?.id)},[s]);let c=ZR(n,r,[e.value,e.children,r],e.keywords),l=UR(),u=XR(e=>e.value&&e.value===c.current),d=XR(e=>s||a.filter()===!1?!0:!e.search||e.filtered.items.get(n)>0);b.useEffect(()=>{let t=r.current;if(!(!t||e.disabled))return t.addEventListener(RR,f),()=>t.removeEventListener(RR,f)},[d,e.onSelect,e.disabled]);function f(){var e,t;p(),(t=(e=o.current).onSelect)==null||t.call(e,c.current)}function p(){l.setState(`value`,c.current,!0)}if(!d)return null;let{disabled:m,value:h,onSelect:g,forceMount:_,keywords:v,...y}=e;return b.createElement(NR.div,{ref:LL(r,t),...y,id:n,"cmdk-item":``,role:`option`,"aria-disabled":!!m,"aria-selected":!!u,"data-disabled":!!m,"data-selected":!!u,onPointerMove:m||a.getDisablePointerSelection()?void 0:p,onClick:m?void 0:f},e.children)}),tue=b.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:i,...a}=e,o=VL(),s=b.useRef(null),c=b.useRef(null),l=VL(),u=VR(),d=XR(e=>i||u.filter()===!1?!0:!e.search||e.filtered.groups.has(o));JR(()=>u.group(o),[]),ZR(o,s,[e.value,e.heading,c]);let f=b.useMemo(()=>({id:o,forceMount:i}),[i]);return b.createElement(NR.div,{ref:LL(s,t),...a,"cmdk-group":``,role:`presentation`,hidden:!d||void 0},n&&b.createElement(`div`,{ref:c,"cmdk-group-heading":``,"aria-hidden":!0,id:l},n),QR(e,e=>b.createElement(`div`,{"cmdk-group-items":``,role:`group`,"aria-labelledby":n?l:void 0},b.createElement(WR.Provider,{value:f},e))))}),nue=b.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,i=b.useRef(null),a=XR(e=>!e.search);return!n&&!a?null:b.createElement(NR.div,{ref:LL(i,t),...r,"cmdk-separator":``,role:`separator`})}),rue=b.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,i=e.value!=null,a=UR(),o=XR(e=>e.search),s=XR(e=>e.selectedItemId),c=VR();return b.useEffect(()=>{e.value!=null&&a.setState(`search`,e.value)},[e.value]),b.createElement(NR.input,{ref:t,...r,"cmdk-input":``,autoComplete:`off`,autoCorrect:`off`,spellCheck:!1,"aria-autocomplete":`list`,role:`combobox`,"aria-expanded":!0,"aria-controls":c.listId,"aria-labelledby":c.labelId,"aria-activedescendant":s,id:c.inputId,type:`text`,value:i?e.value:o,onChange:e=>{i||a.setState(`search`,e.target.value),n?.(e.target.value)}})}),iue=b.forwardRef((e,t)=>{let{children:n,label:r=`Suggestions`,...i}=e,a=b.useRef(null),o=b.useRef(null),s=XR(e=>e.selectedItemId),c=VR();return b.useEffect(()=>{if(o.current&&a.current){let e=o.current,t=a.current,n,r=new ResizeObserver(()=>{n=requestAnimationFrame(()=>{let n=e.offsetHeight;t.style.setProperty(`--cmdk-list-height`,n.toFixed(1)+`px`)})});return r.observe(e),()=>{cancelAnimationFrame(n),r.unobserve(e)}}},[]),b.createElement(NR.div,{ref:LL(a,t),...i,"cmdk-list":``,role:`listbox`,tabIndex:-1,"aria-activedescendant":s,"aria-label":r,id:c.listId},QR(e,e=>b.createElement(`div`,{ref:LL(o,c.listInnerRef),"cmdk-list-sizer":``},e)))}),aue=b.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:i,contentClassName:a,container:o,...s}=e;return b.createElement(Ble,{open:n,onOpenChange:r},b.createElement(Vle,{container:o},b.createElement(Hle,{"cmdk-overlay":``,className:i}),b.createElement(Ule,{"aria-label":e.label,"cmdk-dialog":``,className:a},b.createElement(GR,{ref:t,...s}))))}),oue=b.forwardRef((e,t)=>XR(e=>e.filtered.count===0)?b.createElement(NR.div,{ref:t,...e,"cmdk-empty":``,role:`presentation`}):null),sue=b.forwardRef((e,t)=>{let{progress:n,children:r,label:i=`Loading...`,...a}=e;return b.createElement(NR.div,{ref:t,...a,"cmdk-loading":``,role:`progressbar`,"aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},QR(e,e=>b.createElement(`div`,{"aria-hidden":!0},e)))}),KR=Object.assign(GR,{List:iue,Item:eue,Input:rue,Group:tue,Separator:nue,Dialog:aue,Empty:oue,Loading:sue});function cue(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function lue(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function qR(e){let t=b.useRef(e);return JR(()=>{t.current=e}),t}var JR=typeof window>`u`?b.useEffect:b.useLayoutEffect;function YR(e){let t=b.useRef();return t.current===void 0&&(t.current=e()),t}function XR(e){let t=UR(),n=()=>e(t.snapshot());return b.useSyncExternalStore(t.subscribe,n,n)}function ZR(e,t,n,r=[]){let i=b.useRef(),a=VR();return JR(()=>{var o;let s=(()=>{for(let e of n){if(typeof e==`string`)return e.trim();if(typeof e==`object`&&`current`in e)return e.current?e.current.textContent?.trim():i.current}})(),c=r.map(e=>e.trim());a.value(e,s,c),(o=t.current)==null||o.setAttribute(zR,s),i.current=s}),i}var uue=()=>{let[e,t]=b.useState(),n=YR(()=>new Map);return JR(()=>{n.current.forEach(e=>e()),n.current=new Map},[e]),(e,r)=>{n.current.set(e,r),t({})}};function due(e){let t=e.type;return typeof t==`function`?t(e.props):`render`in t?t.render(e.props):e}function QR({asChild:e,children:t},n){return e&&b.isValidElement(t)?b.cloneElement(due(t),{ref:t.ref},n(t.props.children)):n(t)}var fue={position:`absolute`,width:`1px`,height:`1px`,padding:`0`,margin:`-1px`,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,borderWidth:`0`};function pue({className:e,...t}){return(0,H.jsx)(KR,{"data-slot":`command`,className:Mr(`bg-popover text-foreground flex h-full w-full flex-col overflow-hidden rounded-md`,e),...t})}function mue({className:e,...t}){return(0,H.jsxs)(`div`,{"data-slot":`command-input-wrapper`,className:`flex h-14 items-center gap-2 border-b p-3`,children:[(0,H.jsx)(Si,{className:`size-5 shrink-0 text-muted-foreground`}),(0,H.jsx)(KR.Input,{"data-slot":`command-input`,className:Mr(`placeholder:text-placeholder flex h-full w-full bg-transparent type-text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50`,e),...t})]})}function hue({className:e,...t}){return(0,H.jsx)(KR.List,{"data-slot":`command-list`,className:Mr(`max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto`,e),...t})}function gue({...e}){return(0,H.jsx)(KR.Empty,{"data-slot":`command-empty`,className:`py-6 text-center type-text-sm text-muted-foreground`,...e})}function _ue({className:e,...t}){return(0,H.jsx)(KR.Group,{"data-slot":`command-group`,className:Mr(`text-foreground [&_[cmdk-group-heading]]:text-subtle-foreground overflow-hidden px-2 py-1 [&_[cmdk-group-heading]]:p-2 [&_[cmdk-group-heading]]:type-text-xs [&_[cmdk-group-heading]]:font-medium`,e),...t})}function vue({className:e,...t}){return(0,H.jsx)(KR.Item,{"data-slot":`command-item`,className:Mr(`data-[selected=true]:bg-background-hover [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-xs px-2 py-3 type-text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:text-disabled-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-5`,e),...t})}var $R=[{code:`am`,englishName:`Amharic`,localeName:`አማርኛ`},{code:`ar`,englishName:`Arabic`,localeName:`العربية`},{code:`bg`,englishName:`Bulgarian`,localeName:`български`},{code:`bn`,englishName:`Bengali`,localeName:`বাংলা`},{code:`bs`,englishName:`Bosnian`,localeName:`bosanski`},{code:`ca`,englishName:`Catalan`,localeName:`català`},{code:`cs`,englishName:`Czech`,localeName:`čeština`},{code:`da`,englishName:`Danish`,localeName:`dansk`},{code:`de`,englishName:`German`,localeName:`Deutsch`},{code:`el`,englishName:`Greek`,localeName:`Ελληνικά`},{code:`en-US`,englishName:`English (US)`,localeName:`English (US)`},{code:`es-419`,englishName:`Spanish (Latin America)`,localeName:`español (Latinoamérica)`},{code:`es-ES`,englishName:`Spanish (Spain)`,localeName:`español (España)`},{code:`et`,englishName:`Estonian`,localeName:`eesti`},{code:`fa`,englishName:`Persian`,localeName:`فارسی`},{code:`fi`,englishName:`Finnish`,localeName:`suomi`},{code:`fr-CA`,englishName:`French (Canada)`,localeName:`français (Canada)`},{code:`fr-FR`,englishName:`French (France)`,localeName:`français (France)`},{code:`gu`,englishName:`Gujarati`,localeName:`ગુજરાતી`},{code:`hi`,englishName:`Hindi`,localeName:`हिन्दी`},{code:`hr`,englishName:`Croatian`,localeName:`hrvatski`},{code:`hu`,englishName:`Hungarian`,localeName:`magyar`},{code:`hy`,englishName:`Armenian`,localeName:`հայերեն`},{code:`id`,englishName:`Indonesian`,localeName:`Indonesia`},{code:`is`,englishName:`Icelandic`,localeName:`íslenska`},{code:`it`,englishName:`Italian`,localeName:`italiano`},{code:`ja`,englishName:`Japanese`,localeName:`日本語`},{code:`ka`,englishName:`Georgian`,localeName:`ქართული`},{code:`kk`,englishName:`Kazakh`,localeName:`қазақ тілі`},{code:`kn`,englishName:`Kannada`,localeName:`ಕನ್ನಡ`},{code:`ko`,englishName:`Korean`,localeName:`한국어`},{code:`lt`,englishName:`Lithuanian`,localeName:`lietuvių`},{code:`lv`,englishName:`Latvian`,localeName:`latviešu`},{code:`mk`,englishName:`Macedonian`,localeName:`македонски`},{code:`ml`,englishName:`Malayalam`,localeName:`മലയാളം`},{code:`mn`,englishName:`Mongolian`,localeName:`монгол`},{code:`mr`,englishName:`Marathi`,localeName:`मराठी`},{code:`ms`,englishName:`Malay`,localeName:`Bahasa Melayu`},{code:`my`,englishName:`Burmese`,localeName:`မြန်မာ`},{code:`nb`,englishName:`Norwegian Bokmål`,localeName:`norsk bokmål`},{code:`nl`,englishName:`Dutch`,localeName:`Nederlands`},{code:`pa`,englishName:`Punjabi`,localeName:`ਪੰਜਾਬੀ`},{code:`pl`,englishName:`Polish`,localeName:`polski`},{code:`pt-BR`,englishName:`Portuguese (Brazil)`,localeName:`português (Brasil)`},{code:`pt-PT`,englishName:`Portuguese (Portugal)`,localeName:`português (Portugal)`},{code:`ro`,englishName:`Romanian`,localeName:`română`},{code:`ru`,englishName:`Russian`,localeName:`русский`},{code:`sk`,englishName:`Slovak`,localeName:`slovenčina`},{code:`sl`,englishName:`Slovenian`,localeName:`slovenščina`},{code:`so`,englishName:`Somali`,localeName:`Soomaali`},{code:`sq`,englishName:`Albanian`,localeName:`shqip`},{code:`sr`,englishName:`Serbian`,localeName:`српски`},{code:`sv`,englishName:`Swedish`,localeName:`svenska`},{code:`sw`,englishName:`Swahili`,localeName:`Kiswahili`},{code:`ta`,englishName:`Tamil`,localeName:`தமிழ்`},{code:`te`,englishName:`Telugu`,localeName:`తెలుగు`},{code:`th`,englishName:`Thai`,localeName:`ไทย`},{code:`tl`,englishName:`Tagalog`,localeName:`Tagalog`},{code:`tr`,englishName:`Turkish`,localeName:`Türkçe`},{code:`uk`,englishName:`Ukrainian`,localeName:`українська`},{code:`ur`,englishName:`Urdu`,localeName:`اردو`},{code:`vi`,englishName:`Vietnamese`,localeName:`Tiếng Việt`},{code:`zh-CN`,englishName:`Chinese (Simplified)`,localeName:`简体中文`},{code:`zh-HK`,englishName:`Chinese (Traditional, Hong Kong)`,localeName:`繁體中文(香港)`},{code:`zh-TW`,englishName:`Chinese (Traditional, Taiwan)`,localeName:`繁體中文(台灣)`}];function yue(e,t){return typeof e==`string`&&t.includes(e)}var bue=[{mode:`fullscreen`,icon:fi},{mode:`pip`,icon:gi},{mode:`inline`,icon:Ti}];function xue(e){let{userAgent:t,displayMode:n,previewClient:r,setPreference:i}=ds.getState();i(`theme`,e.has(`darkTheme`)?`dark`:`light`);let a=e.has(`mobileDevice`);i(`userAgent`,{...t,device:{...t?.device,type:a?`mobile`:`desktop`},capabilities:{hover:!a,touch:a}}),a&&n===`pip`&&r===`chatgpt`&&i(`displayMode`,`fullscreen`);let o=e.get(`locale`);yue(o,$R.map(e=>e.code))&&i(`locale`,o);let s=ds.getState();return`View preview options: displayMode=${s.displayMode}, theme=${s.theme}, locale=${s.locale}, device=${s.userAgent?.device?.type??`desktop`}.`}function Sue({name:e,description:t,value:n,options:r}){return(0,H.jsx)(`select`,{name:e,toolparamdescription:t,value:n,tabIndex:-1,onChange:e=>e.currentTarget.form?.requestSubmit(),children:r.map(e=>(0,H.jsx)(`option`,{value:e,children:e},e))})}var ez=`inline-flex h-7 cursor-pointer items-center gap-1.5 rounded-md px-2.5 text-xs font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring`,tz=`text-light-gray-foreground hover:bg-light-gray hover:text-foreground`,Cue=`bg-muted text-foreground`;function nz({icon:e,label:t,selected:n,onClick:r,className:i}){return(0,H.jsxs)(`button`,{type:`button`,onClick:r,"aria-pressed":n,className:lN(ez,`border border-border bg-background`,n?Cue:tz,i),children:[(0,H.jsx)(e,{className:`size-3.5`}),(0,H.jsx)(`span`,{children:t})]})}function rz({icon:e,label:t,name:n,description:r,checked:i}){return(0,H.jsxs)(`label`,{className:lN(ez,`border border-border bg-background`,tz,`has-focus-visible:ring-1 has-focus-visible:ring-ring`),children:[(0,H.jsx)(`input`,{type:`checkbox`,name:n,toolparamdescription:r,checked:i,onChange:e=>e.currentTarget.form?.requestSubmit(),className:`sr-only`}),(0,H.jsx)(e,{className:`size-3.5`}),(0,H.jsx)(`span`,{children:t})]})}var iz=({variant:e=`panel`,logsOpen:t,onOpenLogs:n})=>{let r=ds(e=>e.displayMode),i=ds(e=>e.theme),a=ds(e=>e.locale),o=ds(e=>e.userAgent),s=ds(e=>e.previewClient),c=ds(e=>e.setPreviewClient),l=ds(e=>e.setPreference),u=(0,b.useRef)(null),[d,f]=(0,b.useState)(!1),p=e=>{let t=u.current,n=t?.elements.namedItem(`locale`);n instanceof HTMLSelectElement&&(n.value=e),t?.requestSubmit()},m=i===`dark`,h=(o?.device?.type??`desktop`)===`mobile`,g=$R.find(e=>e.code===a)?.englishName??a,_=bue.find(e=>e.mode===r)?.icon??Ti;return(0,H.jsxs)(`form`,{ref:u,toolname:`devtools_set_view_options`,tooldescription:e===`panel`?`Set the Skybridge devtools view preview options. Any subset of fields can be changed: theme, locale, and device type.`:`Set the Skybridge devtools preview options: theme and device type.`,toolautosubmit:``,onSubmit:e=>{e.preventDefault();let t=xue(new FormData(e.currentTarget)),n=e.nativeEvent;n instanceof SubmitEvent&&n.agentInvoked&&typeof n.respondWith==`function`&&n.respondWith(Promise.resolve({content:[{type:`text`,text:t}]}))},className:lN(`flex w-full shrink-0 items-center gap-1.5`,e===`panel`?`mt-3 px-3`:`justify-end`),children:[e===`panel`&&(0,H.jsxs)(`div`,{title:`Display mode (driven by the view)`,className:`inline-flex h-7 cursor-default items-center gap-1.5 rounded-md bg-muted px-2.5 text-xs font-medium text-muted-foreground`,children:[(0,H.jsx)(_,{className:`size-3.5`}),(0,H.jsx)(`span`,{children:r})]}),(0,H.jsx)(rz,{icon:m?hi:Ei,label:m?`dark`:`light`,name:`darkTheme`,description:`Preview the view in dark theme (true) or light theme (false).`,checked:m}),e===`panel`&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(tN,{open:d,onOpenChange:f,children:[(0,H.jsx)(nN,{asChild:!0,children:(0,H.jsxs)(`button`,{type:`button`,"aria-label":`Locale`,className:lN(ez,`border border-border bg-background`,tz,`aria-expanded:bg-muted aria-expanded:text-foreground`),children:[(0,H.jsx)(oi,{className:`size-3.5`}),(0,H.jsx)(`span`,{children:g})]})}),(0,H.jsx)(iN,{className:`w-[260px] p-0`,align:`start`,children:(0,H.jsxs)(pue,{children:[(0,H.jsx)(mue,{placeholder:`Search locale...`}),(0,H.jsxs)(hue,{children:[(0,H.jsx)(gue,{children:`No locale found.`}),(0,H.jsx)(_ue,{children:$R.map(e=>(0,H.jsxs)(vue,{value:e.code,keywords:[e.englishName,e.localeName],onSelect:e=>{p(e),f(!1)},children:[(0,H.jsxs)(`span`,{className:`truncate`,children:[e.englishName,e.localeName===e.englishName?null:(0,H.jsx)(`span`,{className:`ml-1.5 text-muted-foreground`,children:e.localeName})]}),(0,H.jsx)(Kr,{className:lN(`ml-auto h-4 w-4`,a===e.code?`opacity-100`:`opacity-0`)})]},e.code))})]})]})})]}),(0,H.jsx)(`div`,{className:`sr-only`,"aria-hidden":!0,children:(0,H.jsx)(Sue,{name:`locale`,description:`The BCP 47 locale code to preview the view in.`,value:a,options:$R.map(e=>e.code)})})]}),(0,H.jsx)(rz,{icon:h?wi:mi,label:h?`mobile`:`desktop`,name:`mobileDevice`,description:`Preview the view on a mobile device (true) or desktop (false).`,checked:h}),e===`panel`&&r!==`fullscreen`&&(0,H.jsxs)(`div`,{className:`ml-auto flex items-center gap-1.5`,children:[(0,H.jsx)(nz,{icon:ri,label:`preview`,onClick:()=>c(`chatgpt`)}),!t&&(0,H.jsx)(nz,{icon:di,label:`logs`,onClick:n})]}),e===`preview`&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(nz,{icon:Ur,label:s===`claude`?`switch to ChatGPT`:`switch to Claude`,onClick:()=>{c(s===`claude`?`chatgpt`:`claude`),l(`displayMode`,`inline`)}}),(0,H.jsx)(nz,{icon:Ai,label:`quit preview`,onClick:()=>{c(null),l(`displayMode`,`inline`)}})]})]})},wue=({iframeRef:e,containerRef:t,enabled:n,onHeightChange:r,documentKey:i,clampToContainer:a=!0})=>{(0,b.useEffect)(()=>{if(!n||!i)return;let o=e.current;if(!o?.contentDocument?.body)return;let s=()=>{let e=fN(o,a?t.current:null),n=a?e:Math.min(e,window.innerHeight);n>0&&r(n)},c=new ResizeObserver(s),l=o.contentDocument.getElementById(`root`);l&&c.observe(l),c.observe(o.contentDocument.body),c.observe(o.contentDocument.documentElement);let u=t.current?.parentElement;return u&&c.observe(u),s(),()=>{c.disconnect()}},[t,n,e,r,i,a])},Tue=({iframeRef:e,documentKey:t})=>{let[n,r]=(0,b.useState)(!1);return(0,b.useEffect)(()=>{if(r(!1),!t)return;let n=e.current?.contentDocument;if(!n)return;let i=()=>{let e=n.getElementById(`root`);return!!(e&&e.childNodes.length>0)};if(i()){r(!0);return}let a=new MutationObserver(()=>{i()&&(r(!0),a.disconnect())});return a.observe(n.documentElement,{childList:!0,subtree:!0}),()=>a.disconnect()},[e,t]),n},Eue=32,Due=2,az={"--color-background-primary":`#fff`,"--color-background-secondary":`#f9f9f9`,"--color-background-tertiary":`#f3f3f3`,"--color-background-inverse":`#181818`,"--color-background-ghost":`color-mix(in oklab,#0d0d0d 0.0%,transparent)`,"--color-background-disabled":`color-mix(in oklab,#0d0d0d 5.0%,transparent)`,"--color-text-primary":`#0d0d0d`,"--color-text-secondary":`#5d5d5d`,"--color-text-tertiary":`#8f8f8f`,"--color-text-inverse":`#fff`,"--color-text-ghost":`#0d0d0d`,"--color-text-info":`#3a83f7`,"--color-text-danger":`#fa423e`,"--color-text-success":`#2c6732`,"--color-text-warning":`#87401d`,"--color-text-disabled":`#8f8f8f`,"--color-border-primary":`color-mix(in oklab,#0d0d0d 10.0%,transparent)`,"--color-border-secondary":`color-mix(in oklab,#0d0d0d 5.0%,transparent)`,"--color-border-tertiary":`color-mix(in oklab,#0d0d0d 15%,transparent)`,"--color-border-inverse":`#fff`,"--color-border-ghost":`color-mix(in oklab,#0d0d0d 0.0%,transparent)`,"--color-border-disabled":`color-mix(in oklab,#0d0d0d 6.0%,transparent)`,"--color-ring-primary":`#2c67c5`,"--color-ring-secondary":`#2c67c5`,"--color-ring-inverse":`#2c67c5`,"--color-ring-info":`#2c67c5`,"--color-ring-danger":`#ff8583`,"--color-ring-success":`#2c67c5`,"--color-ring-warning":`#2c67c5`,"--font-sans":`"ui-sans-serif", "-apple-system", "system-ui", "Segoe UI", "Helvetica", "Apple Color Emoji", "Arial", "sans-serif", "Segoe UI Emoji", "Segoe UI Symbol"`,"--font-mono":`"ui-monospace", "SFMono-Regular", "SF Mono", "Menlo", "Consolas", "Liberation Mono", "monospace"`,"--font-weight-normal":`400`,"--font-weight-medium":`500`,"--font-weight-semibold":`600`,"--font-weight-bold":`700`,"--font-text-xs-size":`.75rem`,"--font-text-sm-size":`.875rem`,"--font-text-md-size":`1rem`,"--font-text-lg-size":`1.125rem`,"--font-heading-xs-size":`1rem`,"--font-heading-sm-size":`1.125rem`,"--font-heading-md-size":`1.25rem`,"--font-heading-lg-size":`1.5rem`,"--font-heading-xl-size":`2rem`,"--font-heading-2xl-size":`2.25rem`,"--font-heading-3xl-size":`3rem`,"--font-text-xs-line-height":`1.125rem`,"--font-text-sm-line-height":`1.25rem`,"--font-text-md-line-height":`1.5rem`,"--font-text-lg-line-height":`1.8125rem`,"--font-heading-xs-line-height":`1.5rem`,"--font-heading-sm-line-height":`1.625rem`,"--font-heading-md-line-height":`1.625rem`,"--font-heading-lg-line-height":`1.75rem`,"--font-heading-xl-line-height":`2.375rem`,"--font-heading-2xl-line-height":`2.625rem`,"--font-heading-3xl-line-height":`3rem`,"--border-radius-xs":`.25rem`,"--border-radius-sm":`.375rem`,"--border-radius-md":`.5rem`,"--border-radius-lg":`.625rem`,"--border-radius-xl":`.75rem`,"--border-radius-full":`9999px`,"--border-width-regular":`.5px`,"--shadow-hairline":`0 0 0 .5px #0000001a`,"--shadow-sm":`0 1px 2px -1px rgb(0 0 0 / .08)`,"--shadow-md":`0 2px 4px -1px rgb(0 0 0 / .08)`,"--shadow-lg":`0 4px 8px -2px rgb(0 0 0 / .1)`},Oue={"--color-background-primary":`#212121`,"--color-background-secondary":`#303030`,"--color-background-tertiary":`#414141`,"--color-background-inverse":`#f3f3f3`,"--color-background-ghost":`color-mix(in oklab,#fff 0.0%,transparent)`,"--color-background-disabled":`color-mix(in oklab,#fff 5.0%,transparent)`,"--color-text-primary":`#fff`,"--color-text-secondary":`#cdcdcd`,"--color-text-tertiary":`#afafaf`,"--color-text-inverse":`#0d0d0d`,"--color-text-ghost":`#fff`,"--color-border-primary":`color-mix(in oklab,#fff 10.0%,transparent)`,"--color-border-secondary":`color-mix(in oklab,#fff 5.0%,transparent)`,"--color-border-tertiary":`color-mix(in oklab,#fff 15%,transparent)`,"--color-border-inverse":`#181818`,"--color-border-ghost":`color-mix(in oklab,#fff 0.0%,transparent)`,"--color-border-disabled":`color-mix(in oklab,#fff 6.0%,transparent)`};function oz(e){return e===`dark`?{...az,...Oue}:az}function kue(e,t){return{styles:{variables:oz(e)},containerDimensions:{maxWidth:t?mN.width-Eue-Due:768},availableDisplayModes:t?[`inline`,`fullscreen`]:[`inline`,`fullscreen`,`pip`],userAgent:`chatgpt`,timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone}}var Aue=32,sz={"--color-background-primary":`light-dark(rgba(255, 255, 255, 1), rgba(48, 48, 46, 1))`,"--color-background-secondary":`light-dark(rgba(245, 244, 237, 1), rgba(38, 38, 36, 1))`,"--color-background-tertiary":`light-dark(rgba(250, 249, 245, 1), rgba(20, 20, 19, 1))`,"--color-background-inverse":`light-dark(rgba(20, 20, 19, 1), rgba(250, 249, 245, 1))`,"--color-background-ghost":`light-dark(rgba(255, 255, 255, 0), rgba(48, 48, 46, 0))`,"--color-background-info":`light-dark(rgba(214, 228, 246, 1), rgba(37, 62, 95, 1))`,"--color-background-danger":`light-dark(rgba(247, 236, 236, 1), rgba(96, 42, 40, 1))`,"--color-background-success":`light-dark(rgba(233, 241, 220, 1), rgba(27, 70, 20, 1))`,"--color-background-warning":`light-dark(rgba(246, 238, 223, 1), rgba(72, 58, 15, 1))`,"--color-background-disabled":`light-dark(rgba(255, 255, 255, 0.5), rgba(48, 48, 46, 0.5))`,"--color-text-primary":`light-dark(rgba(20, 20, 19, 1), rgba(250, 249, 245, 1))`,"--color-text-secondary":`light-dark(rgba(61, 61, 58, 1), rgba(194, 192, 182, 1))`,"--color-text-tertiary":`light-dark(rgba(115, 114, 108, 1), rgba(156, 154, 146, 1))`,"--color-text-inverse":`light-dark(rgba(255, 255, 255, 1), rgba(20, 20, 19, 1))`,"--color-text-ghost":`light-dark(rgba(115, 114, 108, 0.5), rgba(156, 154, 146, 0.5))`,"--color-text-info":`light-dark(rgba(50, 102, 173, 1), rgba(128, 170, 221, 1))`,"--color-text-danger":`light-dark(rgba(127, 44, 40, 1), rgba(238, 136, 132, 1))`,"--color-text-success":`light-dark(rgba(38, 91, 25, 1), rgba(122, 185, 72, 1))`,"--color-text-warning":`light-dark(rgba(90, 72, 21, 1), rgba(209, 160, 65, 1))`,"--color-text-disabled":`light-dark(rgba(20, 20, 19, 0.5), rgba(250, 249, 245, 0.5))`,"--color-border-primary":`light-dark(rgba(31, 30, 29, 0.4), rgba(222, 220, 209, 0.4))`,"--color-border-secondary":`light-dark(rgba(31, 30, 29, 0.3), rgba(222, 220, 209, 0.3))`,"--color-border-tertiary":`light-dark(rgba(31, 30, 29, 0.15), rgba(222, 220, 209, 0.15))`,"--color-border-inverse":`light-dark(rgba(255, 255, 255, 0.3), rgba(20, 20, 19, 0.15))`,"--color-border-ghost":`light-dark(rgba(31, 30, 29, 0), rgba(222, 220, 209, 0))`,"--color-border-info":`light-dark(rgba(70, 130, 213, 1), rgba(70, 130, 213, 1))`,"--color-border-danger":`light-dark(rgba(167, 61, 57, 1), rgba(205, 92, 88, 1))`,"--color-border-success":`light-dark(rgba(67, 116, 38, 1), rgba(89, 145, 48, 1))`,"--color-border-warning":`light-dark(rgba(128, 92, 31, 1), rgba(168, 120, 41, 1))`,"--color-border-disabled":`light-dark(rgba(31, 30, 29, 0.1), rgba(222, 220, 209, 0.1))`,"--color-ring-primary":`light-dark(rgba(20, 20, 19, 0.7), rgba(250, 249, 245, 0.7))`,"--color-ring-secondary":`light-dark(rgba(61, 61, 58, 0.7), rgba(194, 192, 182, 0.7))`,"--color-ring-inverse":`light-dark(rgba(255, 255, 255, 0.7), rgba(20, 20, 19, 0.7))`,"--color-ring-info":`light-dark(rgba(50, 102, 173, 0.5), rgba(128, 170, 221, 0.5))`,"--color-ring-danger":`light-dark(rgba(167, 61, 57, 0.5), rgba(205, 92, 88, 0.5))`,"--color-ring-success":`light-dark(rgba(67, 116, 38, 0.5), rgba(89, 145, 48, 0.5))`,"--color-ring-warning":`light-dark(rgba(128, 92, 31, 0.5), rgba(168, 120, 41, 0.5))`,"--font-sans":`Anthropic Sans, sans-serif`,"--font-mono":`ui-monospace, monospace`,"--font-weight-normal":`400`,"--font-weight-medium":`500`,"--font-weight-semibold":`600`,"--font-weight-bold":`700`,"--font-text-xs-size":`12px`,"--font-text-sm-size":`14px`,"--font-text-md-size":`16px`,"--font-text-lg-size":`20px`,"--font-heading-xs-size":`12px`,"--font-heading-sm-size":`14px`,"--font-heading-md-size":`16px`,"--font-heading-lg-size":`20px`,"--font-heading-xl-size":`24px`,"--font-heading-2xl-size":`28px`,"--font-heading-3xl-size":`36px`,"--font-text-xs-line-height":`1.4`,"--font-text-sm-line-height":`1.4`,"--font-text-md-line-height":`1.4`,"--font-text-lg-line-height":`1.25`,"--font-heading-xs-line-height":`1.4`,"--font-heading-sm-line-height":`1.4`,"--font-heading-md-line-height":`1.4`,"--font-heading-lg-line-height":`1.25`,"--font-heading-xl-line-height":`1.25`,"--font-heading-2xl-line-height":`1.1`,"--font-heading-3xl-line-height":`1`,"--border-radius-xs":`4px`,"--border-radius-sm":`6px`,"--border-radius-md":`8px`,"--border-radius-lg":`10px`,"--border-radius-xl":`12px`,"--border-radius-full":`9999px`,"--border-width-regular":`0.5px`,"--shadow-hairline":`0 1px 2px 0 rgba(0, 0, 0, 0.05)`,"--shadow-sm":`0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1)`,"--shadow-md":`0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1)`,"--shadow-lg":`0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1)`},cz=`
146
+ @font-face {
147
+ font-family: "Anthropic Sans";
148
+ src: url("https://assets.claude.ai/Fonts/AnthropicSans-Text-Regular-Static.otf") format("opentype");
149
+ font-weight: 400;
150
+ font-style: normal;
151
+ font-display: swap;
152
+ }
153
+ @font-face {
154
+ font-family: "Anthropic Sans";
155
+ src: url("https://assets.claude.ai/Fonts/AnthropicSans-Text-RegularItalic-Static.otf") format("opentype");
156
+ font-weight: 400;
157
+ font-style: italic;
158
+ font-display: swap;
159
+ }
160
+ @font-face {
161
+ font-family: "Anthropic Sans";
162
+ src: url("https://assets.claude.ai/Fonts/AnthropicSans-Text-Medium-Static.otf") format("opentype");
163
+ font-weight: 500;
164
+ font-style: normal;
165
+ font-display: swap;
166
+ }
167
+ @font-face {
168
+ font-family: "Anthropic Sans";
169
+ src: url("https://assets.claude.ai/Fonts/AnthropicSans-Text-MediumItalic-Static.otf") format("opentype");
170
+ font-weight: 500;
171
+ font-style: italic;
172
+ font-display: swap;
173
+ }
174
+ @font-face {
175
+ font-family: "Anthropic Sans";
176
+ src: url("https://assets.claude.ai/Fonts/AnthropicSans-Text-Semibold-Static.otf") format("opentype");
177
+ font-weight: 600;
178
+ font-style: normal;
179
+ font-display: swap;
180
+ }
181
+ @font-face {
182
+ font-family: "Anthropic Sans";
183
+ src: url("https://assets.claude.ai/Fonts/AnthropicSans-Text-SemiboldItalic-Static.otf") format("opentype");
184
+ font-weight: 600;
185
+ font-style: italic;
186
+ font-display: swap;
187
+ }
188
+ @font-face {
189
+ font-family: "Anthropic Sans";
190
+ src: url("https://assets.claude.ai/Fonts/AnthropicSans-Text-Bold-Static.otf") format("opentype");
191
+ font-weight: 700;
192
+ font-style: normal;
193
+ font-display: swap;
194
+ }
195
+ @font-face {
196
+ font-family: "Anthropic Sans";
197
+ src: url("https://assets.claude.ai/Fonts/AnthropicSans-Text-BoldItalic-Static.otf") format("opentype");
198
+ font-weight: 700;
199
+ font-style: italic;
200
+ font-display: swap;
201
+ }
202
+ `;function jue(e){return{styles:{variables:sz,css:{fonts:cz}},containerDimensions:{width:e?mN.width-Aue:720,maxHeight:5e3},availableDisplayModes:[`inline`,`fullscreen`],userAgent:navigator.userAgent,timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone}}function Mue(e,t){e.contentWindow?.postMessage(t,`*`)}function lz(e,t,n){e({jsonrpc:`2.0`,id:t,result:n})}function uz(e,t,n,r){e({jsonrpc:`2.0`,id:t,error:{code:n,message:r}})}function dz(e,t,n){switch(e){case`chatgpt`:return kue(t,n);case`claude`:return jue(n);case null:return{}}}function Nue(){let e=ds.getState(),t=ps(e.userAgent);return{...dz(e.previewClient,e.theme,t),theme:e.theme,locale:e.locale,displayMode:e.displayMode,safeAreaInsets:e.safeArea?.insets??{top:0,right:0,bottom:0,left:0},platform:t?`mobile`:`web`,deviceCapabilities:e.userAgent?.capabilities}}function Pue(e,t,n,r){let i=t=>Mue(e,t),a=async a=>{if(a.source!==e.contentWindow)return;let o=a.data;if(o?.jsonrpc!==`2.0`)return;let{id:s,method:c,params:l}=o;if(c!==`ui/notifications/size-changed`&&c!==`ui/notifications/request-teardown`&&s!==void 0)switch(c){case`ui/initialize`:{lz(i,s,{protocolVersion:`2025-06-18`,hostInfo:{name:`skybridge-devtools`,version:`0.0.1`},hostCapabilities:{openLinks:{},serverTools:{}},hostContext:Nue()});let e=r();e.toolInput!=null&&i({jsonrpc:`2.0`,method:`ui/notifications/tool-input`,params:{arguments:e.toolInput}}),(e.toolOutput!=null||e.toolResponseMetadata!=null)&&i({jsonrpc:`2.0`,method:`ui/notifications/tool-result`,params:{content:[],structuredContent:e.toolOutput??{},isError:!1,_meta:e.toolResponseMetadata??{}}});break}case`ui/update-model-context`:n(`mcp:updateModelContext`,l??{}),lz(i,s,{});break;case`ui/request-display-mode`:{let e=l?.mode??`inline`,t=ds.getState(),n=hs(e,t);t.setPreference(`displayMode`,n),lz(i,s,{mode:n});break}case`ui/open-link`:{let e=l?.url;e&&window.open(e,`_blank`,`noopener,noreferrer`),lz(i,s,{});break}case`ui/download-file`:uz(i,s,-32603,`downloadFile capability disabled in devtools`);break;case`tools/call`:{let e=l?.name??``,r=l?.arguments??{};n(`mcp:tools/call`,{name:e,args:r});try{let a=await t(e,r);n(`mcp:tools/call response`,a,`response`),lz(i,s,a)}catch(e){let t=e instanceof Error?e.message:String(e);uz(i,s,-32603,t)}break}default:s!==void 0&&uz(i,s,-32601,`Method not found: ${c}`)}};window.addEventListener(`message`,a);let o=ds.subscribe((e,t)=>{let n={};e.theme!==t.theme&&(n.theme=e.theme,e.previewClient===`chatgpt`&&(n.styles={variables:oz(e.theme)})),(e.previewClient!==t.previewClient||e.previewClient!==null&&e.userAgent!==t.userAgent)&&Object.assign(n,dz(e.previewClient,e.theme,ps(e.userAgent))),e.locale!==t.locale&&(n.locale=e.locale),e.displayMode!==t.displayMode&&(n.displayMode=e.displayMode),e.safeArea!==t.safeArea&&(n.safeAreaInsets=e.safeArea?.insets),e.userAgent!==t.userAgent&&(n.platform=e.userAgent?.device?.type===`mobile`?`mobile`:`web`,n.deviceCapabilities=e.userAgent?.capabilities),Object.keys(n).length>0&&i({jsonrpc:`2.0`,method:`ui/notifications/host-context-changed`,params:n})});return()=>{window.removeEventListener(`message`,a),o()}}function Fue(e,t){e.contentWindow?.postMessage({jsonrpc:`2.0`,method:`ui/notifications/tool-input`,params:{arguments:t}},`*`)}function Iue(e,t){e.contentWindow?.postMessage({jsonrpc:`2.0`,method:`ui/notifications/tool-result`,params:{content:t.content??[],structuredContent:t.structuredContent??{},isError:t.isError??!1,_meta:t._meta??{}}},`*`)}var fz=`openai:set_globals`,Lue=class extends CustomEvent{type=fz};function Rue(e,t,n,r,i){return{callTool:async(e,n)=>{t(`callTool`,{name:e,args:n});let i=await r(e,n??{});return t(`← callTool response`,i,`response`),i},sendFollowUpMessage:async e=>{t(`sendFollowUpMessage`,e)},requestClose:async()=>{t(`requestClose`,{})},openExternal:e=>{window.open(e.href,`_blank`,`noopener,noreferrer`),t(`openExternal`,e)},requestDisplayMode:async r=>{t(`requestDisplayMode`,r);let i=ds.getState(),a=hs(r.mode,i);return e.displayMode=a,n(`displayMode`,a),i.setPreference(`displayMode`,a),{mode:a}},setWidgetState:async r=>{_C(r.modelContent,`setWidgetState`),t(`setWidgetState`,r),e.widgetState=r,n(`widgetState`,r)},requestModal:async r=>{t(`requestModal`,r),e.view={mode:`modal`,params:r.params},n(`displayMode`,`modal`)},uploadFile:async e=>(t(`uploadFile`,{name:e.name,size:e.size}),{fileId:`123`}),getFileDownloadUrl:async e=>(t(`getFileDownloadUrl`,e),{downloadUrl:`https://example.com/file.pdf`}),setOpenInAppUrl:async e=>{t(`setOpenInAppUrl`,e),i(e.href)}}}function zue(e,t){let n=[`theme`,`userAgent`,`locale`,`maxHeight`,`displayMode`,`safeArea`,`toolInput`,`toolOutput`,`toolResponseMetadata`,`view`,`widgetState`];return new Proxy(e||{},{set(e,r,i,a){let o=Reflect.set(e,r,i,a);if(n.includes(r)){let e=new Lue(fz,{detail:{globals:{[r]:i}}});t.dispatchEvent(e)}return o}})}function Bue(e,t,n,r,i,a){let o=zue(iE(t),e);Vne(o,Rue(o,n,r,i,a)),e.openai=o}var pz=`__host-fonts`,Vue=({iframeRef:e,theme:t,previewClient:n,documentKey:r})=>{(0,b.useEffect)(()=>{let i=e.current,a=i?.contentDocument,o=a?.documentElement;if(!i||!a||!o||!r||n===null)return;i.style.colorScheme=t,o.style.colorScheme=t;let s=n===`chatgpt`?oz(t):sz,c=Object.entries(s);for(let[e,t]of c)o.style.setProperty(e,t);if(n===`claude`&&!a.getElementById(pz)){let e=a.createElement(`style`);e.id=pz,e.textContent=cz,a.head?.appendChild(e)}return()=>{i.style.removeProperty(`color-scheme`),o.style.removeProperty(`color-scheme`);for(let[e]of c)o.style.removeProperty(e)}},[e,t,n,r])},mz=({iframeRef:e,toolName:t,globalKey:n,value:r,updateOpenaiObject:i})=>{(0,b.useEffect)(()=>{let a=e.current?.contentWindow?.openai;!a||a[n]===r||(a[n]=r,i(t,n,r))},[e,n,r,t,i])},Hue=345,Uue=770,hz=420,gz=()=>{let e=roe(),{openaiObject:t}=xD(e.name)??{},{data:n}=ioe(e._meta?.ui?.resourceUri),{setToolData:r,pushOpenAiLog:i,updateOpenaiObject:a,setOpenInAppUrl:o}=bD(),s=(0,b.useRef)(null),c=(0,b.useRef)(null),l=(0,b.useRef)(t);l.current=t;let[u,d]=(0,b.useState)(null),f=ds(e=>e.previewClient),p=f!==null,m=ms()&&!p,h=(0,b.useRef)(m);(0,b.useEffect)(()=>{h.current!==m&&(h.current=m,d(null))},[m]);let g=ds(e=>e.displayMode),_=g===`fullscreen`,v=g===`pip`,y=_&&!m,x=y||p?`100%`:`${m?Hue:Uue}px`,S=ds(e=>e.theme),C=ds(e=>e.locale),w=ds(e=>e.userAgent),T=n.contents[0],E=T.text,D=dN(T._meta?.ui?.domain??T._meta?.[`openai/widgetDomain`]);(0,b.useEffect)(()=>{let t=s.current;if(!t?.contentWindow||!t.contentDocument)return;D&&o(e.name,D);let n=(t,n,r=`default`)=>{i(e.name,{timestamp:Date.now(),source:`view`,command:t,args:n,type:r})};Bue(t.contentWindow,l.current,n,(t,n)=>{a(e.name,t,n)},(e,t)=>RD.callTool(e,t),t=>{o(e.name,t)});let c=Pue(t,(e,t)=>RD.callTool(e,t),n,()=>({toolInput:l.current?.toolInput,toolOutput:l.current?.toolOutput,toolResponseMetadata:l.current?.toolResponseMetadata}));return t.contentDocument.open(),t.contentDocument.write(uN(E)),t.contentDocument.close(),r(e.name,{openaiRef:s}),c},[E,D,e.name,i,r,a,o]),wue({iframeRef:s,containerRef:c,enabled:!!E&&!y,onHeightChange:d,documentKey:E,clampToContainer:!p});let O=Tue({iframeRef:s,documentKey:E});return mz({iframeRef:s,toolName:e.name,globalKey:`theme`,value:S,updateOpenaiObject:a}),mz({iframeRef:s,toolName:e.name,globalKey:`locale`,value:C,updateOpenaiObject:a}),mz({iframeRef:s,toolName:e.name,globalKey:`displayMode`,value:g,updateOpenaiObject:a}),mz({iframeRef:s,toolName:e.name,globalKey:`userAgent`,value:w,updateOpenaiObject:a}),Vue({iframeRef:s,theme:S,previewClient:f,documentKey:E}),(0,b.useEffect)(()=>{let e=s.current;!e||!t||(t.toolInput!=null&&Fue(e,t.toolInput),(t.toolOutput!=null||t.toolResponseMetadata!=null)&&Iue(e,{content:[],structuredContent:t.toolOutput,isError:!1,_meta:t.toolResponseMetadata}))},[t]),(0,H.jsx)(`div`,{ref:c,className:lN(`relative transition-[width] duration-150 ease-out`,y?`h-full w-full`:`mx-auto`,y&&!p&&`bg-background`),style:{width:y?void 0:x,height:y?`100%`:u==null?`auto`:`${v&&!p?Math.min(u,hz):u}px`,opacity:+!!O},children:(0,H.jsx)(`iframe`,{ref:s,src:`about:blank`,style:{width:`100%`,height:y||u==null?`100%`:`${v&&!p?Math.min(u,hz):u}px`,border:`none`,display:`block`},sandbox:`allow-scripts allow-same-origin allow-forms`,title:`html-preview`})})};function _z(e){return(0,H.jsx)(`svg`,{viewBox:`0 0 20 20`,"aria-hidden":`true`,fill:`currentColor`,...e,children:(0,H.jsxs)(`g`,{children:[(0,H.jsx)(`path`,{d:`M8.167 2.501a.665.665 0 0 1 0 1.33H5.834a2 2 0 0 0-2.002 2.002v8.333c0 1.106.896 2.002 2.002 2.002h8.333a2 2 0 0 0 2.002-2.002v-2.333a.665.665 0 0 1 1.33 0v2.333a3.33 3.33 0 0 1-3.332 3.332H5.834a3.33 3.33 0 0 1-3.332-3.332V5.833a3.333 3.333 0 0 1 3.332-3.332z`}),(0,H.jsx)(`path`,{fillRule:`evenodd`,d:`M13.427 3.104a2.451 2.451 0 0 1 3.46 3.472l-5.163 5.203a3.13 3.13 0 0 1-1.55.853l-2.386.524a.815.815 0 0 1-.97-.971l.525-2.38c.13-.59.429-1.131.86-1.556zm2.512.953a1.12 1.12 0 0 0-1.579-.006L9.136 9.197c-.247.244-.42.554-.495.894l-.351 1.594 1.598-.352c.338-.074.648-.245.892-.49l5.162-5.204a1.12 1.12 0 0 0-.003-1.582`,clipRule:`evenodd`})]})})}function Wue(e){return(0,H.jsx)(`svg`,{viewBox:`0 0 20 20`,"aria-hidden":`true`,fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`,...e,children:(0,H.jsx)(`path`,{d:`M6.95 2.668a3 3 0 0 1 1.763.574l1.064.774c.286.207.63.32.982.32h4.408a3 3 0 0 1 2.998 2.997v7a3 3 0 0 1-2.998 2.998H4.833a3 3 0 0 1-2.998-2.997V5.667a3 3 0 0 1 2.998-2.999zM3.164 9.831v4.503c0 .92.747 1.667 1.668 1.668h10.334c.921 0 1.668-.747 1.668-1.668V9.83zm1.668-5.832c-.921 0-1.668.746-1.668 1.668V8.5h13.67V7.334c0-.922-.747-1.668-1.668-1.668h-4.408a3 3 0 0 1-1.764-.575l-1.064-.773a1.67 1.67 0 0 0-.982-.32z`})})}function Gue(e){return(0,H.jsx)(`svg`,{viewBox:`0 0 20 20`,"aria-hidden":`true`,fill:`currentColor`,...e,children:(0,H.jsx)(`path`,{d:`M6.001 14.167a1.002 1.002 0 1 0-2.003-.001 1.002 1.002 0 0 0 2.003 0m10.665-.665.135.013a.665.665 0 0 1 0 1.303l-.135.014h-5.833a.665.665 0 0 1 0-1.33zM6.643 3.669a.666.666 0 0 1 1.042.78l-.07.117-2.5 3.333a.666.666 0 0 1-.958.111l-1.25-1.04-.094-.097a.665.665 0 0 1 .835-1.001l.111.076.712.593 2.08-2.774zm10.023 1.5.135.013a.665.665 0 0 1 0 1.303l-.135.014h-5.833a.665.665 0 0 1 0-1.33zm-9.335 8.998a2.332 2.332 0 1 1-4.663 0 2.332 2.332 0 0 1 4.663 0`})})}function vz(e){return(0,H.jsx)(`svg`,{viewBox:`0 0 20 20`,"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,...e,children:(0,H.jsx)(`path`,{strokeWidth:`1.33`,d:`M6.804 15.133V4.867m0 10.266c0 .847-.687 1.534-1.534 1.534H3.754a1.533 1.533 0 0 1-1.534-1.534V4.867c0-.847.687-1.534 1.534-1.534H5.27c.847 0 1.534.687 1.534 1.534m0 10.266c0 .847.686 1.534 1.533 1.534h1.517c.847 0 1.533-.687 1.533-1.534V4.867c0-.847-.686-1.534-1.533-1.534H8.337c-.847 0-1.533.687-1.533 1.534m8.536 11.83 1.493-.263a1.533 1.533 0 0 0 1.244-1.777l-1.783-10.11a1.533 1.533 0 0 0-1.776-1.244l-1.494.263a1.533 1.533 0 0 0-1.243 1.777l1.782 10.11c.147.834.943 1.391 1.777 1.244Z`})})}function Kue(e){return(0,H.jsx)(`svg`,{viewBox:`0 0 20 20`,"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,...e,children:(0,H.jsxs)(`g`,{strokeLinecap:`round`,strokeWidth:`1.33`,children:[(0,H.jsx)(`path`,{d:`M12.524 12.192c1.803 1.946 4.692.822 4.893-2.058.286-4.087-2.553-7.613-7.104-7.613-3.98 0-7.46 3.038-7.731 6.934-.3 4.3 2.766 7.974 7.416 7.974 1.57 0 3.184-.37 4.381-1.218M6.374 8.96l1.098 1.141M9.124 6.313l1.099 1.14`}),(0,H.jsx)(`path`,{d:`m11.028 6.89-4.142 3.987a.21.21 0 0 0-.006.295c.534.557 1.303 1.37 1.303 1.37 1.185 1.23 2.815.978 4.064-.224 1.25-1.203 1.606-2.795.38-4.053l-1.304-1.368a.21.21 0 0 0-.295-.007Z`})]})})}function que(e){return(0,H.jsx)(`svg`,{viewBox:`0 0 20 20`,"aria-hidden":`true`,fill:`currentColor`,...e,children:(0,H.jsxs)(`g`,{children:[(0,H.jsx)(`path`,{d:`M8.195 10.381c.423 0 .767.344.767.767v1.038a.768.768 0 0 1-1.534 0v-1.038c0-.423.344-.766.767-.767M11.715 10.381c.424 0 .767.344.767.767v1.038a.767.767 0 0 1-1.533 0v-1.038c0-.423.343-.766.766-.767`}),(0,H.jsx)(`path`,{fillRule:`evenodd`,d:`M10 1.667a1.694 1.694 0 0 1 .665 3.252v.884c1.425.028 2.833.145 4.24.368 1.299.207 2.394 1.182 2.623 2.529q.08.477.125.93a2.053 2.053 0 0 1 .03 4.068 15 15 0 0 1-.155 1.248c-.229 1.347-1.324 2.322-2.622 2.528A31 31 0 0 1 10 17.85c-1.653 0-3.28-.116-4.906-.375-1.298-.206-2.393-1.181-2.622-2.528a15 15 0 0 1-.155-1.248 2.052 2.052 0 0 1 .03-4.068q.045-.453.125-.93c.229-1.347 1.324-2.322 2.622-2.529a31 31 0 0 1 4.241-.368V4.92A1.693 1.693 0 0 1 10 1.667m0 5.46c-1.59 0-3.147.111-4.698.358-.786.125-1.394.702-1.518 1.436-.173 1.018-.202 1.945-.202 2.902l.006.714a15 15 0 0 0 .196 2.187c.124.734.732 1.311 1.518 1.437 1.551.246 3.108.358 4.698.358 1.589 0 3.146-.112 4.697-.358.786-.125 1.395-.703 1.52-1.437.172-1.018.201-1.944.202-2.901l-.008-.714a15 15 0 0 0-.195-2.188c-.124-.734-.733-1.311-1.52-1.436A30 30 0 0 0 10 7.126`,clipRule:`evenodd`})]})})}function Jue(e){return(0,H.jsx)(`svg`,{viewBox:`0 0 20 20`,"aria-hidden":`true`,fill:`currentColor`,...e,children:(0,H.jsxs)(`g`,{children:[(0,H.jsx)(`path`,{d:`M13.334 11.417a.666.666 0 0 1 0 1.33h-2.5a.665.665 0 0 1 0-1.33zM6.742 7.346a.665.665 0 0 1 .912.228l1.121 1.868c.206.343.206.771 0 1.114l-1.12 1.869a.666.666 0 0 1-1.141-.685L7.558 10 6.514 8.258a.665.665 0 0 1 .228-.912`}),(0,H.jsx)(`path`,{fillRule:`evenodd`,d:`M7.798 1.78a4.49 4.49 0 0 1 4.14.979 4.488 4.488 0 0 1 5.301 5.3 4.487 4.487 0 0 1-1.94 7.239 4.485 4.485 0 0 1-7.238 1.94 4.486 4.486 0 0 1-5.301-5.3A4.487 4.487 0 0 1 4.7 4.7 4.49 4.49 0 0 1 7.798 1.78m3.311 2.02a3.16 3.16 0 0 0-5.17 1.385c-.111.359-.393.642-.752.753A3.16 3.16 0 0 0 3.8 11.11c.255.277.358.662.275 1.029a3.16 3.16 0 0 0 3.785 3.785L8 15.9c.323-.032.649.075.89.298a3.16 3.16 0 0 0 5.17-1.385l.05-.13c.133-.297.389-.526.704-.623a3.16 3.16 0 0 0 1.385-5.17 1.15 1.15 0 0 1-.275-1.03 3.16 3.16 0 0 0-3.785-3.785 1.15 1.15 0 0 1-1.03-.275`,clipRule:`evenodd`})]})})}function Yue(e){return(0,H.jsx)(`svg`,{viewBox:`0 0 20 20`,"aria-hidden":`true`,fill:`currentColor`,...e,children:(0,H.jsx)(`path`,{d:`M9.79 18.51a1.8 1.8 0 0 1-.99.27 1.74 1.74 0 0 1-.97-.32l-3.48-2.38a2 2 0 0 1-.64-.71 1.9 1.9 0 0 1-.23-.91V6.53q0-.49.22-.89.23-.399.66-.66l5.72-3.52q.49-.3 1.06-.29.57 0 1.05.32l3.52 2.4q.39.28.6.67.21.381.21.84v7.89q0 .5-.25.95t-.69.71zm4.59-13.85-2.96-2.02a.52.52 0 0 0-.31-.1.5.5 0 0 0-.3.08L5.5 5.89l3.27 2.22zM8.14 9.33 4.86 7.11v3.1l3.28 2.24zm0 4.71L4.86 11.8v2.66q0 .15.06.28.06.12.19.21l3.03 2.07zm7-5.15V5.81L9.52 9.26v3.09zm-.28 4.9a.6.6 0 0 0 .21-.21.6.6 0 0 0 .07-.29v-2.81l-5.62 3.46v3.13z`})})}function yz(e){return(0,H.jsx)(`svg`,{viewBox:`0 0 20 20`,"aria-hidden":`true`,fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`,...e,children:(0,H.jsx)(`path`,{d:`M9.162 2.38a6.707 6.707 0 0 1 5.155 10.993l3.243 3.243a.665.665 0 1 1-.94.94l-3.25-3.249A6.707 6.707 0 1 1 9.162 2.38m0 1.33a5.377 5.377 0 1 0 0 10.754 5.377 5.377 0 0 0 0-10.754`})})}function Xue(e){return(0,H.jsx)(`svg`,{viewBox:`0 0 20 20`,"aria-hidden":`true`,fill:`currentColor`,...e,children:(0,H.jsx)(`path`,{d:`M6.835 4c-.451.004-.82.012-1.137.038-.386.032-.659.085-.876.162l-.2.086c-.44.224-.807.564-1.063.982l-.103.184c-.126.247-.206.562-.248 1.076-.043.523-.043 1.19-.043 2.135v2.664c0 .944 0 1.612.043 2.135.042.515.122.829.248 1.076l.103.184c.256.418.624.758 1.063.982l.2.086c.217.077.49.13.876.162.316.026.685.034 1.136.038zm11.33 7.327c0 .922 0 1.654-.048 2.243-.043.522-.125.977-.305 1.395l-.082.177a4 4 0 0 1-1.473 1.593l-.276.155c-.465.237-.974.338-1.57.387-.59.048-1.322.048-2.244.048H7.833c-.922 0-1.654 0-2.243-.048-.522-.042-.977-.126-1.395-.305l-.176-.082a4 4 0 0 1-1.594-1.473l-.154-.275c-.238-.466-.34-.975-.388-1.572-.048-.589-.048-1.32-.048-2.243V8.663c0-.922 0-1.654.048-2.243.049-.597.15-1.106.388-1.571l.154-.276a4 4 0 0 1 1.594-1.472l.176-.083c.418-.18.873-.263 1.395-.305.589-.048 1.32-.048 2.243-.048h4.334c.922 0 1.654 0 2.243.048.597.049 1.106.15 1.571.388l.276.154a4 4 0 0 1 1.473 1.594l.082.176c.18.418.262.873.305 1.395.048.589.048 1.32.048 2.243zm-10 4.668h4.002c.944 0 1.612 0 2.135-.043.514-.042.829-.122 1.076-.248l.184-.103c.418-.256.758-.624.982-1.063l.086-.2c.077-.217.13-.49.162-.876.043-.523.043-1.19.043-2.135V8.663c0-.944 0-1.612-.043-2.135-.032-.386-.085-.659-.162-.876l-.086-.2a2.67 2.67 0 0 0-.982-1.063l-.184-.103c-.247-.126-.562-.206-1.076-.248-.523-.043-1.19-.043-2.135-.043H8.164L8.165 4z`})})}function bz(e){return(0,H.jsx)(`svg`,{viewBox:`0 0 20 20`,"aria-hidden":`true`,fill:`currentColor`,...e,children:(0,H.jsx)(`path`,{d:`M10 2.533a.8.8 0 0 1 .8.8V9.2h5.866a.8.8 0 1 1 0 1.6H10.8v5.866a.8.8 0 1 1-1.6 0V10.8H3.333a.8.8 0 0 1 0-1.6H9.2V3.333a.8.8 0 0 1 .8-.8`})})}function xz(e){return(0,H.jsx)(`svg`,{viewBox:`0 0 24 24`,"aria-hidden":`true`,fill:`currentColor`,...e,children:(0,H.jsxs)(`g`,{children:[(0,H.jsx)(`path`,{d:`M18.585 13.412a.9.9 0 0 1 1.668.676 8.91 8.91 0 0 1-7.353 5.516V22a.9.9 0 0 1-1.8 0v-2.396a8.91 8.91 0 0 1-7.352-5.516.9.9 0 0 1 1.668-.676 7.104 7.104 0 0 0 13.169 0`}),(0,H.jsx)(`path`,{fillRule:`evenodd`,d:`M12 1.35a4.9 4.9 0 0 1 4.9 4.9v4.483a4.9 4.9 0 0 1-9.8 0V6.25a4.9 4.9 0 0 1 4.9-4.9m0 1.8a3.1 3.1 0 0 0-3.1 3.1v4.483a3.1 3.1 0 1 0 6.2 0V6.25a3.1 3.1 0 0 0-3.1-3.1`,clipRule:`evenodd`})]})})}function Sz(e){return(0,H.jsx)(`svg`,{viewBox:`0 0 20 20`,"aria-hidden":`true`,fill:`currentColor`,...e,children:(0,H.jsx)(`path`,{d:`M7.167 15.416V4.583a.75.75 0 0 1 1.5 0v10.833a.75.75 0 0 1-1.5 0m4.166-2.5V7.083a.75.75 0 0 1 1.5 0v5.833a.75.75 0 0 1-1.5 0M3 11.25v-2.5a.75.75 0 0 1 1.5 0v2.5a.75.75 0 0 1-1.5 0m12.5 0v-2.5a.75.75 0 0 1 1.5 0v2.5a.75.75 0 0 1-1.5 0`})})}function Cz(e){return(0,H.jsx)(`svg`,{viewBox:`0 0 20 20`,"aria-hidden":`true`,fill:`currentColor`,...e,children:(0,H.jsx)(`path`,{d:`M14.255 4.755a.7.7 0 0 1 .99.99L10.99 10l4.255 4.255.09.11a.7.7 0 0 1-.97.97l-.11-.09L10 10.99l-4.255 4.255a.7.7 0 0 1-.99-.99L9.01 10 4.755 5.745l-.09-.11a.7.7 0 0 1 .97-.97l.11.09L10 9.01z`})})}function Zue(e){return(0,H.jsx)(`svg`,{viewBox:`0 0 20 20`,"aria-hidden":`true`,fill:`currentColor`,...e,children:(0,H.jsx)(`path`,{d:`M11.248 18.25q-.825 0-1.568-.314a4.3 4.3 0 0 1-1.32-.874 4 4 0 0 1-1.303.214 4 4 0 0 1-2.046-.544 4.27 4.27 0 0 1-1.518-1.485 4 4 0 0 1-.561-2.095q0-.48.132-1.04A4.4 4.4 0 0 1 2.04 10.71a4.07 4.07 0 0 1 .016-3.4 4.2 4.2 0 0 1 1.056-1.418 3.8 3.8 0 0 1 1.6-.842 3.9 3.9 0 0 1 .76-1.683q.594-.759 1.452-1.188a4.04 4.04 0 0 1 1.831-.429q.825 0 1.568.313.742.314 1.32.875a4 4 0 0 1 1.303-.215q1.106 0 2.046.545a4.14 4.14 0 0 1 1.502 1.485q.577.941.577 2.095 0 .48-.132 1.04.66.61 1.023 1.419.363.792.363 1.666 0 .892-.38 1.717a4.3 4.3 0 0 1-1.072 1.435 3.8 3.8 0 0 1-1.584.825 3.8 3.8 0 0 1-.775 1.683 4.06 4.06 0 0 1-1.436 1.188 4.04 4.04 0 0 1-1.831.429m-4.076-2.062q.825 0 1.436-.347l3.102-1.782a.36.36 0 0 0 .165-.313v-1.42L7.882 14.62a.67.67 0 0 1-.726 0l-3.119-1.798a.5.5 0 0 1-.016.115v.198q0 .841.396 1.551.412.693 1.138 1.089a3.2 3.2 0 0 0 1.617.412m.165-2.69a.4.4 0 0 0 .182.05q.082 0 .165-.05l1.237-.71-3.976-2.31a.7.7 0 0 1-.363-.643v-3.58q-.825.362-1.32 1.122a2.9 2.9 0 0 0-.495 1.65q0 .809.412 1.55.413.743 1.073 1.123zm3.91 3.663q.876 0 1.585-.396a2.96 2.96 0 0 0 1.534-2.64v-3.564a.32.32 0 0 0-.165-.297l-1.254-.726v4.604a.7.7 0 0 1-.363.643l-3.118 1.799a3 3 0 0 0 1.782.577m.628-6.039V8.878L10.01 7.822 8.13 8.878v2.244l1.88 1.056zM7.057 5.859a.7.7 0 0 1 .363-.644l3.118-1.798a3 3 0 0 0-1.782-.578q-.874 0-1.584.396A2.96 2.96 0 0 0 6.05 4.324a3.07 3.07 0 0 0-.396 1.551v3.547q0 .199.165.314l1.238.726zm8.382 7.887q.825-.364 1.303-1.123.495-.758.495-1.65a3.15 3.15 0 0 0-.412-1.55q-.413-.743-1.073-1.123l-3.085-1.782q-.1-.065-.182-.049a.3.3 0 0 0-.165.05l-1.237.692 3.993 2.327a.6.6 0 0 1 .264.264.64.64 0 0 1 .099.363zm-3.317-8.382a.63.63 0 0 1 .726 0l3.135 1.831v-.297q0-.792-.396-1.501a2.86 2.86 0 0 0-1.105-1.155q-.71-.43-1.65-.43-.825 0-1.436.347L8.294 5.941a.36.36 0 0 0-.165.314v1.418z`})})}function Que(e){return(0,H.jsx)(`svg`,{viewBox:`0 0 20 20`,"aria-hidden":`true`,fill:`currentColor`,...e,children:(0,H.jsx)(`path`,{d:`M16.835 10c0-3.51-3.024-6.418-6.835-6.418S3.165 6.49 3.165 10c0 1.414.567 2.35 1.282 3.765.087.171.111.367.07.555l-.327 1.469 1.59-.412.145-.024a.8.8 0 0 1 .287.028l.136.051.459.212c1.062.472 2.06.775 3.193.775 3.811 0 6.835-2.91 6.835-6.42m1.33 0c0 4.314-3.692 7.749-8.165 7.749-1.52 0-2.804-.453-4.06-1.04l-2.204.572a.832.832 0 0 1-1.02-.986l.463-2.089C2.537 12.954 1.835 11.73 1.835 10 1.835 5.685 5.527 2.25 10 2.25S18.165 5.685 18.165 10`})})}function $ue(e){return(0,H.jsx)(`svg`,{viewBox:`0 0 20 20`,"aria-hidden":`true`,fill:`currentColor`,...e,children:(0,H.jsx)(`path`,{d:`M2.5 6.25h15a.75.75 0 0 1 0 1.5h-15a.75.75 0 0 1 0-1.5m0 5.25h10a.75.75 0 0 1 0 1.5h-10a.75.75 0 0 1 0-1.5`})})}function ede(e){return(0,H.jsx)(`svg`,{viewBox:`0 0 20 20`,"aria-hidden":`true`,fill:`currentColor`,...e,children:(0,H.jsx)(`path`,{d:`M5.5 10a1.6 1.6 0 1 1-3.2 0 1.6 1.6 0 0 1 3.2 0m6.1 0a1.6 1.6 0 1 1-3.2 0 1.6 1.6 0 0 1 3.2 0m6.1 0a1.6 1.6 0 1 1-3.2 0 1.6 1.6 0 0 1 3.2 0`})})}var tde=`ui-sans-serif, -apple-system, system-ui, "Segoe UI", Helvetica, "Apple Color Emoji", Arial, sans-serif`,nde={light:{"--main-surface-primary":`#fcfcfc`,"--sidebar-surface":`#fcfcfc`,"--message-surface":`#e9e9e980`,"--composer-surface-primary":`#fff`,"--text-primary":`#0d0d0d`,"--text-secondary":`#5d5d5d`,"--text-tertiary":`#8f8f8f`,"--border-default":`#0000001a`,"--bg-elevated-primary":`#fff`,"--sidebar-surface-secondary":`#ececec`},dark:{"--main-surface-primary":`#000`,"--sidebar-surface":`#000`,"--message-surface":`#323232d9`,"--composer-surface-primary":`#212121`,"--text-primary":`#fff`,"--text-secondary":`#cdcdcd`,"--text-tertiary":`#afafaf`,"--border-default":`#ffffff26`,"--bg-elevated-primary":`#1b1b1b`,"--sidebar-surface-secondary":`#303030`}};function wz({className:e}){return(0,H.jsx)(`div`,{className:lN(`rounded-md bg-[color-mix(in_oklab,var(--text-primary)_10%,transparent)] motion-safe:animate-pulse`,e)})}var rde=[{icon:_z,label:`New chat`},{icon:Wue,label:`Projects`},{icon:Gue,label:`Tasks`},{icon:vz,label:`Library`},{icon:Kue,label:`Plugins`},{icon:que,label:`Agents`},{icon:Jue,label:`Codex`},{icon:Yue,label:`GPTs`}],ide=[`w-[85%]`,`w-[70%]`,`w-[78%]`,`w-[62%]`,`w-[82%]`,`w-[68%]`,`w-[75%]`,`w-[60%]`];function Tz(){return(0,H.jsxs)(`div`,{"aria-hidden":!0,className:`absolute inset-x-0 top-0 z-10 flex h-[52px] cursor-not-allowed items-center justify-between px-3`,children:[(0,H.jsx)(`div`,{className:`flex size-10 items-center justify-center rounded-xl bg-[color-mix(in_oklab,var(--text-primary)_4%,transparent)] backdrop-blur-sm`,children:(0,H.jsx)($ue,{className:`size-6`})}),(0,H.jsxs)(`div`,{className:`flex h-10 items-center gap-5 rounded-xl bg-[color-mix(in_oklab,var(--text-primary)_4%,transparent)] px-4 backdrop-blur-sm`,children:[(0,H.jsx)(_z,{className:`size-6`}),(0,H.jsx)(ede,{className:`size-6`})]})]})}function Ez(){return(0,H.jsxs)(`div`,{className:`rounded-[28px] bg-(--composer-surface-primary) p-2 shadow-[0_2px_12px_rgba(0,0,0,0.08)]`,children:[(0,H.jsx)(`div`,{className:`px-2.5 pt-1.5 pb-3 text-(--text-tertiary)`,children:`Ask ChatGPT`}),(0,H.jsxs)(`div`,{className:`flex items-center gap-3 px-1.5 pb-0.5`,children:[(0,H.jsx)(bz,{className:`size-5 shrink-0`}),(0,H.jsx)(wz,{className:`h-4 w-16`}),(0,H.jsx)(`div`,{className:`flex-1`}),(0,H.jsx)(wz,{className:`h-4 w-14`}),(0,H.jsx)(xz,{className:`size-6 shrink-0`}),(0,H.jsx)(`div`,{className:`flex size-9 shrink-0 items-center justify-center rounded-full bg-(--text-primary) text-(--main-surface-primary)`,children:(0,H.jsx)(Sz,{className:`size-5`})})]})]})}function Dz(){return(0,H.jsxs)(`div`,{className:`flex h-[52px] items-center gap-3 rounded-full border border-(--border-default) bg-(--composer-surface-primary) px-4 shadow-[0_4px_16px_rgba(0,0,0,0.06)]`,children:[(0,H.jsx)(bz,{className:`size-5 shrink-0`}),(0,H.jsx)(`span`,{className:`flex-1 text-(--text-tertiary)`,children:`Ask ChatGPT`}),(0,H.jsx)(xz,{className:`size-6 shrink-0`}),(0,H.jsx)(`div`,{className:`flex size-9.5 shrink-0 items-center justify-center rounded-full bg-(--text-primary) text-(--main-surface-primary)`,children:(0,H.jsx)(Sz,{className:`size-5.5`})})]})}function Oz({className:e}){return(0,H.jsx)(`div`,{className:lN(`h-11 w-2/5 self-end rounded-3xl bg-(--message-surface) motion-safe:animate-pulse`,e)})}function kz({children:e}){let t=ds(e=>e.theme),n=ds(e=>e.displayMode),r=ds(e=>e.setPreference),i=ms(),a=n===`pip`,o=n===`fullscreen`,s=(0,b.useRef)(null),c=(0,b.useRef)(null);return(0,b.useEffect)(()=>{let e=s.current,t=c.current;if(!e||!t)return;let n=()=>{e.scrollTop=e.scrollHeight};n();let r=new ResizeObserver(n);r.observe(t);let i=()=>r.disconnect(),a=[`wheel`,`touchstart`,`pointerdown`];for(let t of a)e.addEventListener(t,i,{once:!0,passive:!0});return()=>{r.disconnect();for(let t of a)e.removeEventListener(t,i)}},[]),(0,H.jsxs)(`div`,{className:`@container/shell relative isolate flex h-full w-full overflow-hidden bg-(--main-surface-primary) text-(--text-primary)`,style:{fontFamily:tde,...nde[t]},children:[(0,H.jsxs)(`aside`,{"aria-hidden":!0,className:lN(`h-full shrink-0 cursor-not-allowed border-(--border-default) border-r bg-(--sidebar-surface) @max-[640px]/shell:hidden`,o?`w-[52px]`:`w-[260px]`,i&&`hidden`),children:[(0,H.jsxs)(`div`,{className:lN(`h-full flex-col px-1.5 pb-2`,o?`hidden`:`flex`),children:[(0,H.jsxs)(`div`,{className:`flex h-[52px] shrink-0 items-center justify-between pr-2.5 pl-3`,children:[(0,H.jsx)(`span`,{className:`font-semibold text-base`,children:`ChatGPT`}),(0,H.jsxs)(`div`,{className:`flex items-center gap-4 text-(--text-secondary)`,children:[(0,H.jsx)(yz,{className:`size-5`}),(0,H.jsx)(Xue,{className:`size-5`})]})]}),rde.map(({icon:e,label:t})=>(0,H.jsxs)(`div`,{className:`flex h-9 shrink-0 items-center gap-1.5 rounded-[10px] px-2.5 text-sm leading-5`,children:[(0,H.jsx)(e,{className:`size-5 shrink-0`}),(0,H.jsx)(`span`,{children:t})]},t)),(0,H.jsx)(wz,{className:`mt-6 mb-2 ml-2 h-3 w-14`}),ide.map(e=>(0,H.jsx)(`div`,{className:`px-2 py-2`,children:(0,H.jsx)(wz,{className:lN(`h-3.5`,e)})},e)),(0,H.jsxs)(`div`,{className:`mt-auto flex items-center gap-2 px-2 py-2`,children:[(0,H.jsx)(wz,{className:`size-8 rounded-full`}),(0,H.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,H.jsx)(wz,{className:`h-3 w-24`}),(0,H.jsx)(wz,{className:`h-2.5 w-16`})]})]})]}),(0,H.jsxs)(`div`,{className:lN(`h-full flex-col items-center gap-5 py-4`,o?`flex`:`hidden`),children:[(0,H.jsx)(Zue,{className:`size-6`}),(0,H.jsx)(_z,{className:`mt-4 size-5`}),(0,H.jsx)(yz,{className:`size-5`}),(0,H.jsx)(Que,{className:`size-5`}),(0,H.jsx)(vz,{className:`size-5`}),(0,H.jsx)(wz,{className:`mt-auto size-8 rounded-full`})]})]}),(0,H.jsxs)(`div`,{className:`relative flex h-full min-w-0 flex-1 flex-col`,children:[i&&!o&&(0,H.jsx)(Tz,{}),(0,H.jsxs)(`div`,{className:lN(`h-[52px] shrink-0 items-center px-4`,o?`flex`:`hidden`),children:[(0,H.jsx)(`button`,{type:`button`,"aria-label":`Exit fullscreen`,onClick:()=>r(`displayMode`,`inline`),className:`-ml-2 flex size-9 cursor-pointer items-center justify-center rounded-lg text-(--text-primary) transition-colors hover:bg-[color-mix(in_oklab,var(--text-primary)_5%,transparent)]`,children:(0,H.jsx)(Cz,{className:`size-5`})}),(0,H.jsxs)(`div`,{"aria-hidden":!0,className:`flex flex-1 items-center justify-center gap-2`,children:[(0,H.jsx)(wz,{className:`size-5 rounded-md`}),(0,H.jsx)(wz,{className:`h-4 w-28`})]}),(0,H.jsx)(`div`,{className:`w-5`})]}),(0,H.jsx)(`div`,{ref:s,className:`min-h-0 flex-1 overflow-y-auto [container-type:size]`,children:(0,H.jsxs)(`div`,{ref:c,className:lN(`mx-auto flex w-full max-w-[768px] flex-col px-4 py-6`,i&&!o&&`pt-16`,o&&`h-full max-w-none p-0`),children:[[[`w-[92%]`,`w-[80%]`,`w-[55%]`],[`w-[88%]`,`w-[76%]`,`w-[50%]`],[`w-[95%]`,`w-[70%]`,`w-[62%]`]].map((e,t)=>(0,H.jsxs)(`div`,{className:lN(`flex flex-col`,o&&`hidden`,t>0&&`mt-10`),children:[(0,H.jsx)(Oz,{}),(0,H.jsx)(`div`,{className:`mt-6 flex flex-col gap-3`,children:e.map(e=>(0,H.jsx)(wz,{className:lN(`h-4`,e)},e))})]},e[0])),(0,H.jsx)(Oz,{className:lN(`mt-10`,o&&`hidden`)}),(0,H.jsx)(wz,{className:lN(`mt-6 h-4 w-40`,o&&`hidden`)}),(0,H.jsxs)(`div`,{className:lN(`mt-6 flex items-center gap-2`,o&&`hidden`),children:[(0,H.jsx)(wz,{className:`size-5 rounded-md`}),(0,H.jsx)(wz,{className:`h-4 w-[110px]`})]}),(0,H.jsxs)(`div`,{className:lN(`relative mt-3 w-full`,!a&&!o&&!i&&`-mx-4 w-[calc(100%+2rem)]`,a&&`absolute top-4 left-1/2 z-30 mt-0 w-[min(768px,calc(100%-32px))] translate-x-[calc(-50%-8px)] rounded-3xl border border-(--border-default) bg-(--main-surface-primary) shadow-[0_8px_32px_rgba(0,0,0,0.12)]`,o&&`mt-0 min-h-0 flex-1`),children:[a?(0,H.jsx)(`button`,{type:`button`,"aria-label":`Exit picture-in-picture`,onClick:()=>r(`displayMode`,`inline`),className:`-top-2.5 -left-2.5 absolute z-10 flex size-8 cursor-pointer items-center justify-center rounded-full bg-[#414141] text-white`,children:(0,H.jsx)(Cz,{className:`size-4.5`})}):null,(0,H.jsx)(`div`,{className:lN(`w-full`,a&&`max-h-[80cqh] overflow-y-auto rounded-3xl`,o&&`h-full min-h-0`,i&&!a&&!o&&`overflow-hidden rounded-xl border border-(--border-default)`),children:e??(0,H.jsx)(wz,{className:`h-96 w-full rounded-2xl`})})]}),(0,H.jsx)(`div`,{className:lN(`mt-6 border-(--border-default) border-t`,o&&`hidden`)}),(0,H.jsxs)(`div`,{className:lN(`mt-6 flex flex-col gap-3`,o&&`hidden`),children:[(0,H.jsx)(wz,{className:`h-4 w-[95%]`}),(0,H.jsx)(wz,{className:`h-4 w-[88%]`}),(0,H.jsx)(wz,{className:`h-4 w-[60%]`})]}),(0,H.jsxs)(`div`,{className:lN(`mt-4 flex items-center gap-3 pb-4`,o&&`hidden`),children:[(0,H.jsx)(wz,{className:`size-4 rounded-full`}),(0,H.jsx)(wz,{className:`size-4 rounded-full`}),(0,H.jsx)(wz,{className:`size-4 rounded-full`}),(0,H.jsx)(wz,{className:`size-4 rounded-full`})]})]})}),(0,H.jsx)(`div`,{"aria-hidden":!0,className:lN(`w-full shrink-0 cursor-not-allowed px-4`,i?`pb-4`:`pb-6`,o&&`hidden`),children:(0,H.jsx)(`div`,{className:`mx-auto w-full max-w-[768px]`,children:i?(0,H.jsx)(Ez,{}):(0,H.jsx)(Dz,{})})})]})]})}function Az(e){return(0,H.jsx)(`svg`,{viewBox:`0 0 1000 1000`,fill:`currentColor`,"aria-hidden":`true`,...e,children:(0,H.jsx)(`path`,{d:`M471.88739013671875 665.9563838413783Q471.88739013671875 704.3330688476562 457.7486114501953 738.6877461887846Q443.6098327636719 773.042423529913 417.35210091727123 799.3136473790112Q390.08445630754744 826.5953029146131 355.74742235456193 840.7413465256659Q321.4103884015764 854.8873901367188 284.04361615862166 854.8873901367188Q245.66693115234375 854.8873901367188 211.31225381121538 840.7486114501953Q176.95757647008705 826.6098327636719 150.68635262098888 799.3421881539481Q123.40469708538696 773.0844563075475 109.2586534743341 738.747422354562Q95.11260986328125 704.4103884015765 95.11260986328125 666.0337033952985Q95.11260986328125 628.6669311523438 109.25138854980469 594.3122538112154Q123.39016723632812 559.957576470087 150.65781184605189 532.6759209344851Q176.91554369245256 506.40469708538694 211.25257764543807 492.2586534743341Q245.58961159842355 478.11260986328125 283.9662966047014 478.11260986328125Q321.33306884765625 478.11260986328125 355.6877461887846 492.2513885498047Q390.042423529913 506.3901672363281 417.32407906551487 532.6478990827288Q443.59530291461306 559.9155436924525 457.7413465256659 594.252577645438Q471.88739013671875 628.5896115984235 471.88739013671875 665.9563838413783ZM412.11260986328125 666.0401287768261Q412.11260986328125 631.5551147460938 394.3774597903332 602.4688213147615Q376.64230971738516 573.3825278834292 347.5763693200537 555.634959010074Q318.51042892272216 537.8873901367188 284.02541489198984 537.8873901367188Q248.55511474609375 537.8873901367188 219.4688213147615 555.6225402096668Q190.38252788342928 573.3576902826148 172.634959010074 602.4236306799463Q154.88739013671875 631.4895710772778 154.88739013671875 665.9745851080102Q154.88739013671875 701.4448852539062 172.6225402096668 730.5311786852385Q190.35769028261484 759.6174721165708 219.42363067994637 777.365040989926Q248.48957107727787 795.1126098632812 283.95987122317393 795.1126098632812Q318.44488525390625 795.1126098632812 347.5311786852385 777.3774597903332Q376.6174721165707 759.6423097173852 394.365040989926 730.5763693200537Q412.11260986328125 701.5104289227222 412.11260986328125 666.0401287768261ZM601.0 395.11260986328125H849.0Q871.7689367223669 395.11260986328125 888.3281634295429 411.6718365704572Q904.8873901367188 428.2310632776331 904.8873901367188 451.0V799.0Q904.8873901367188 821.7689367223669 888.3281634295429 838.3281634295429Q871.7689367223669 854.8873901367188 849.0 854.8873901367188H601.0Q578.2310632776331 854.8873901367188 561.6718365704571 838.3281634295429Q545.1126098632812 821.7689367223669 545.1126098632812 799.0V451.0Q545.1126098632812 428.2310632776331 561.6718365704571 411.6718365704572Q578.2310632776331 395.11260986328125 601.0 395.11260986328125ZM601.0 454.88739013671875 604.8873901367188 451.0V799.0L601.0 795.1126098632812H849.0L845.1126098632812 799.0V451.0L849.0 454.88739013671875ZM325.33465576171875 511.77716064453125V512.7771606445312Q303.1718221028646 461.44838945942536 299.1422159830729 409.11317178049393Q295.11260986328125 356.7779541015625 308.202328408731 307.9240358737713Q321.29204695418076 259.0701176459801 350.995639038086 218.77822632409038Q380.69923112199115 178.4863350022007 425.00289389120564 153.30390292601965Q470.31345808699325 127.2236328125 519.6516279890731 121.7236328125Q568.9897978911529 116.2236328125 618.3279677932327 129.2236328125Q667.6661376953125 142.2236328125 710.9897978184587 171.91258533184345Q754.3134579416048 201.6015378511869 786.5543212890625 246.8897705078125Q801.8873901367188 268.6151204427083 794.8873901367188 293.444091796875Q788.6568040114182 317.24662911551343 767.88818359375 329.66534423828125L406.88818359375 537.6653442382812Q393.4617545387962 545.8873901367188 377.4533198963512 545.8873901367188Q361.44488525390625 545.8873901367188 348.0325142996652 537.6098327636719L334.6201433454241 527.2628860473633ZM380.66534423828125 488.22283935546875 378.88818359375 486.33465576171875 377.00079345703125 485.4456787109375 738.0007934570312 277.4456787109375 737.1126098632812 278.555908203125 737.5567016601562 282.1102294921875Q703.8421892438616 234.41767765925476 655.2536272321429 208.08741466815655Q606.6650652204241 181.75715167705835 554.110089983259 180.26675943227917Q501.55511474609375 178.7763671875 455.0165774806016 205.55561225358827Q409.46822185905614 231.34303342834005 384.2185899384168 277.9587563211604Q358.9689580177774 324.5744792139808 357.48368555185743 379.6207051831623Q355.9984130859375 434.66693115234375 380.66534423828125 487.2310632776331Z`})})}function jz(e){return(0,H.jsx)(`svg`,{viewBox:`0 0 1000 1000`,fill:`currentColor`,"aria-hidden":`true`,...e,children:(0,H.jsx)(`path`,{d:`M500.045285676655 120.11260986328125Q578.444091796875 120.11260986328125 647.273644917806 149.76344038310805Q716.103198038737 179.41427090293485 768.3533697509765 231.68014164974818Q820.6035414632162 283.9460123965615 850.2454657999674 352.79624597649826Q879.8873901367188 421.646479556435 879.8873901367188 500.045285676655Q879.8873901367188 578.444091796875 850.2400938165251 643.7852350408381Q820.5927974963314 709.1263782848011 768.8356530729425 756.3730510919745Q717.0785086495536 803.6197238991477 647.7339850531685 829.2535570179332Q578.3894614567832 854.8873901367188 500.0 854.8873901367188H150.0Q136.15392855940195 854.8873901367188 128.16581042059536 846.340815617488Q120.1776922817888 837.7942410982572 119.64515107253501 825.508540226863Q119.11260986328125 813.2228393554688 128.667724609375 803.667724609375L228.667724609375 703.667724609375Q220.11260986328125 712.1950836181641 220.11260986328125 724.9861221313477Q220.11260986328125 737.7771606445312 228.667724609375 746.332275390625Q178.410727041739 696.0572959498355 149.26166845251012 638.2410695929277Q120.11260986328125 580.4248432360198 120.11260986328125 499.98487613075656Q120.11260986328125 421.555908203125 149.76344038310805 352.726355082194Q179.41427090293482 283.896801961263 231.68014164974812 231.64663024902342Q283.94601239656146 179.39645853678383 352.79624597649826 149.75453420003254Q421.64647955643505 120.11260986328125 500.045285676655 120.11260986328125ZM500.0425254998293 179.88739013671875Q433.444091796875 179.88739013671875 375.7723714192708 204.7367776087088Q318.10065104166665 229.58616508069883 273.85252075195314 273.8180747808412Q229.6043904622396 318.04998448098354 204.74589029947919 375.7005634160005Q179.88739013671875 433.3511423510174 179.88739013671875 499.9475007759508Q179.88739013671875 564.555908203125 203.2455945222274 611.7545601981027Q226.60379890773606 658.9532121930804 271.332275390625 703.667724609375Q279.88739013671875 712.1950836181641 279.88739013671875 724.9861221313477Q279.88739013671875 737.7771606445312 271.332275390625 746.332275390625L171.332275390625 846.332275390625Q180.7763671875 836.7702217102051 180.2763671875 824.5520420074463Q179.7763671875 812.3338623046875 171.80055454799106 803.7232360839844Q163.82474190848214 795.1126098632812 150.0 795.1126098632812H500.0Q565.6131436365732 795.1126098632812 623.7702482235359 774.2471184363732Q681.9273528104984 753.3816270094651 726.1665178381879 714.1346312302809Q770.4056828658773 674.8876354510967 795.2591463645792 620.7367172241211Q820.1126098632812 566.5857989971455 820.1126098632812 500.0149453970102Q820.1126098632812 433.444091796875 795.2624480338206 375.7723714192708Q770.4122862043602 318.10065104166665 726.1789981479203 273.85252075195314Q681.9457100914806 229.60439046223962 624.293334647132 204.74589029947919Q566.6409592027836 179.88739013671875 500.0425254998293 179.88739013671875Z`})})}function Mz(e){return(0,H.jsx)(`svg`,{viewBox:`0 0 1000 1000`,fill:`currentColor`,"aria-hidden":`true`,...e,children:(0,H.jsx)(`path`,{d:`M399.9508586946081 95.11260986328125Q463.33306884765625 95.11260986328125 518.6892674763997 118.75518031719605Q574.0454661051432 142.39775077111085 615.8142341613769 184.1495241258965Q657.5830022176107 225.90129748068216 681.2351961771647 281.23497301112104Q704.8873901367188 336.5686485415599 704.8873901367188 399.9508586946081Q704.8873901367188 463.33306884765625 681.2410083934419 518.6892674763998Q657.594626650165 574.0454661051433 615.8361227205485 615.814234161377Q574.0776187909319 657.5830022176107 518.7350232215605 681.2351961771647Q463.39242765218904 704.8873901367188 400.0 704.8873901367188H125.0Q111.15392855940193 704.8873901367188 103.16581042059536 696.340815617488Q95.1776922817888 687.7942410982572 94.64515107253501 675.508540226863Q94.11260986328125 663.2228393554688 103.667724609375 653.667724609375L184.667724609375 573.667724609375Q175.2236328125 582.2120951990928 175.2236328125 594.494627921812Q175.2236328125 606.7771606445312 184.667724609375 615.332275390625Q142.40576034717344 574.0857803950671 118.75918510522735 518.7551163766359Q95.11260986328125 463.4244523582046 95.11260986328125 400.0456917552741Q95.11260986328125 336.66693115234375 118.75518031719604 281.3107325236003Q142.39775077111082 225.9545338948568 184.1495241258965 184.18576583862307Q225.90129748068222 142.41699778238933 281.23497301112104 118.76480382283529Q336.5686485415599 95.11260986328125 399.9508586946081 95.11260986328125ZM399.95305741073304 154.88739013671875Q349.33306884765625 154.88739013671875 304.68992832728793 173.74581724845325Q260.04678780691967 192.60424436018775 226.31641496930803 226.35090340223888Q192.58604213169642 260.09756244429 173.7367161342076 304.7622582352401Q154.88739013671875 349.4269540261902 154.88739013671875 400.046942589267Q154.88739013671875 450.66693115234375 174.23704655965167 495.30431587465347Q193.58670298258463 539.9417005969632 226.332275390625 573.667724609375Q235.88739013671875 582.2120951990928 235.88739013671875 594.494627921812Q235.88739013671875 606.7771606445312 226.332275390625 615.332275390625L146.332275390625 696.332275390625Q155.7763671875 686.7702217102051 155.2763671875 674.5520420074463Q154.7763671875 662.3338623046875 146.80055454799106 653.7232360839844Q138.82474190848214 645.1126098632812 125.0 645.1126098632812H400.0Q450.6102959636735 645.1126098632812 495.2664394610324 626.2541827515468Q539.9225829583913 607.3957556398123 573.662780267507 573.6490965977611Q607.4029775766226 539.9024375557099 626.2577937199519 495.23774176475985Q645.1126098632812 450.5730459738098 645.1126098632812 399.953057410733Q645.1126098632812 349.33306884765625 626.2541827515468 304.68992832728793Q607.3957556398123 260.0467878069196 573.6490965977612 226.31641496930803Q539.90243755571 192.58604213169644 495.2377417647599 173.7367161342076Q450.57304597380977 154.88739013671875 399.95305741073304 154.88739013671875ZM364.55670166015625 794.2212524414062Q357.0015869140625 784.5551147460938 358.07375183105466 772.2823365864001Q359.1459167480469 760.0095584267065 368.79540100097654 751.471973619963Q378.44488525390625 744.0015869140625 390.6862320438508 745.0722378817471Q402.92757883379534 746.1428888494318 411.44329833984375 755.7787475585938Q444.19262020713404 796.4752848307292 493.3166030080695 820.7939473470052Q542.4405858090049 845.1126098632812 600.0 845.1126098632812H802.4480590820312L773.667724609375 815.332275390625Q764.1126098632812 806.7879048009072 764.1126098632812 794.505372078188Q764.1126098632812 782.2228393554688 773.667724609375 773.667724609375Q806.4132970174154 739.9269369886669 825.7629534403484 695.2700121965531Q845.1126098632812 650.6130874044394 845.1126098632812 600.0019059733771Q845.1126098632812 542.444091796875 820.7939473470052 493.3187942504883Q796.4752848307292 444.19349670410156 755.7787475585938 411.44329833984375Q746.1428888494319 402.92757883379534 745.0722378817472 390.6862320438508Q744.0015869140625 378.44488525390625 751.471973619963 368.79540100097654Q760.0095584267065 359.14591674804683 772.2823365864001 358.07375183105466Q784.5551147460938 357.0015869140625 794.2212524414062 364.55670166015625Q845.530098100142 406.81575520833337 875.2087441184303 468.1919996473525Q904.8873901367188 529.5682440863716 904.8873901367188 600.0Q904.8873901367188 654.9370488432264 886.5634408133371 704.3803928021302Q868.2394914899554 753.8237367610342 835.5535278320312 793.7779541015625L896.332275390625 853.667724609375Q905.7763671875 863.2297782897949 905.2763671875 875.4479579925537Q904.7763671875 887.6661376953125 896.800554547991 896.2767639160156Q888.8247419084821 904.8873901367188 875.0 904.8873901367188H600.0Q529.5682440863716 904.8873901367188 468.1919996473524 875.2087441184303Q406.8157552083333 845.530098100142 364.55670166015625 794.2212524414062Z`})})}function Nz(e){return(0,H.jsx)(`svg`,{viewBox:`0 0 1000 1000`,fill:`currentColor`,"aria-hidden":`true`,...e,children:(0,H.jsx)(`path`,{d:`M803.667724609375 328.667724609375Q812.1950836181641 320.11260986328125 824.9861221313477 320.11260986328125Q837.7771606445312 320.11260986328125 846.332275390625 328.6455200195312Q854.8873901367188 337.1784301757813 854.8873901367188 349.97779541015626Q854.8873901367188 362.77716064453125 846.332275390625 371.332275390625L521.332275390625 696.332275390625Q512.8049163818359 704.8873901367188 500.01387786865234 704.8873901367188Q487.22283935546875 704.8873901367188 478.667724609375 696.332275390625L153.667724609375 371.332275390625Q145.11260986328125 362.80491638183594 145.11260986328125 350.01387786865234Q145.11260986328125 337.22283935546875 153.64552001953126 328.667724609375Q162.17843017578124 320.11260986328125 174.97779541015626 320.11260986328125Q187.77716064453125 320.11260986328125 196.332275390625 328.667724609375L500.0 632.33544921875Z`})})}function Pz(e){return(0,H.jsxs)(`svg`,{viewBox:`0 0 21.2 21.2`,fill:`none`,"aria-hidden":`true`,...e,children:[(0,H.jsx)(`rect`,{x:`0`,y:`7.6`,height:`6`,width:`1.2`,rx:`0.6`,fill:`currentColor`}),(0,H.jsx)(`rect`,{x:`4`,y:`5.6`,height:`10`,width:`1.2`,rx:`0.6`,fill:`currentColor`}),(0,H.jsx)(`rect`,{x:`8`,y:`2.6`,height:`16`,width:`1.2`,rx:`0.6`,fill:`currentColor`}),(0,H.jsx)(`rect`,{x:`12`,y:`5.6`,height:`10`,width:`1.2`,rx:`0.6`,fill:`currentColor`}),(0,H.jsx)(`rect`,{x:`16`,y:`2.6`,height:`16`,width:`1.2`,rx:`0.6`,fill:`currentColor`}),(0,H.jsx)(`rect`,{x:`20`,y:`7.6`,height:`6`,width:`1.2`,rx:`0.6`,fill:`currentColor`})]})}function Fz(e){return(0,H.jsx)(`svg`,{viewBox:`30 0 82 24`,height:`20`,fill:`currentColor`,"aria-hidden":`true`,shapeRendering:`geometricPrecision`,...e,children:(0,H.jsx)(`path`,{d:`M39.504 21.2643C37.688 21.2643 36.06 20.9003 34.62 20.1723C33.18 19.4443 32.048 18.4163 31.224 17.0883C30.408 15.7603 30 14.2243 30 12.4803C30 10.6563 30.412 9.03233 31.236 7.60833C32.06 6.17633 33.196 5.06833 34.644 4.28433C36.1 3.49233 37.74 3.09633 39.564 3.09633C40.692 3.09633 41.82 3.22033 42.948 3.46833C44.084 3.71633 45.072 4.09633 45.912 4.60833V8.56833H44.832C44.536 7.16833 43.96 6.12433 43.104 5.43633C42.256 4.74833 41.076 4.40433 39.564 4.40433C38.164 4.40433 36.996 4.73233 36.06 5.38833C35.132 6.03633 34.444 6.93633 33.996 8.08833C33.548 9.24033 33.324 10.5643 33.324 12.0603C33.324 13.5483 33.576 14.8883 34.08 16.0803C34.584 17.2723 35.328 18.2163 36.312 18.9123C37.296 19.6003 38.476 19.9443 39.852 19.9443C40.796 19.9443 41.608 19.7483 42.288 19.3563C42.968 18.9643 43.54 18.4363 44.004 17.7723C44.468 17.1003 44.908 16.2803 45.324 15.3123H46.464L45.684 19.6803C44.892 20.2003 43.936 20.5963 42.816 20.8683C41.704 21.1323 40.6 21.2643 39.504 21.2643ZM47.964 21.0003V19.9563C48.356 19.9003 48.668 19.8403 48.9 19.7763C49.14 19.7043 49.332 19.5883 49.476 19.4283C49.628 19.2683 49.704 19.0443 49.704 18.7563V5.83233L47.964 5.08833V4.28433L51.612 2.73633H52.56V18.7563C52.56 19.0523 52.632 19.2803 52.776 19.4403C52.928 19.6003 53.12 19.7123 53.352 19.7763C53.592 19.8403 53.912 19.9003 54.312 19.9563V21.0003H47.964ZM59.028 21.2643C58.38 21.2643 57.792 21.1363 57.264 20.8803C56.736 20.6243 56.32 20.2563 56.016 19.7763C55.712 19.2963 55.56 18.7363 55.56 18.0963C55.56 17.1203 55.86 16.3443 56.46 15.7683C57.068 15.1843 57.916 14.7403 59.004 14.4363L63.24 13.2363V11.7123C63.24 10.8883 63.048 10.2523 62.664 9.80433C62.288 9.34833 61.708 9.12033 60.924 9.12033C60.228 9.12033 59.704 9.33233 59.352 9.75633C59.008 10.1723 58.836 10.7483 58.836 11.4843V12.6123H56.988C56.764 12.4683 56.588 12.2763 56.46 12.0363C56.34 11.7883 56.28 11.5163 56.28 11.2203C56.28 10.5563 56.516 9.98833 56.988 9.51633C57.46 9.03633 58.06 8.67633 58.788 8.43633C59.516 8.19633 60.256 8.07633 61.008 8.07633C62.592 8.07633 63.836 8.44033 64.74 9.16833C65.644 9.89633 66.096 11.0003 66.096 12.4803V18.5403C66.096 18.8603 66.168 19.1043 66.312 19.2723C66.456 19.4403 66.644 19.5603 66.876 19.6323C67.116 19.6963 67.44 19.7563 67.848 19.8123V20.8563C67.536 20.9683 67.208 21.0563 66.864 21.1203C66.528 21.1843 66.204 21.2163 65.892 21.2163C65.148 21.2163 64.548 21.0483 64.092 20.7123C63.644 20.3683 63.372 19.8643 63.276 19.2003C62.716 19.8643 62.08 20.3763 61.368 20.7363C60.664 21.0883 59.884 21.2643 59.028 21.2643ZM60.444 19.3443C60.948 19.3443 61.44 19.2283 61.92 18.9963C62.408 18.7563 62.848 18.4403 63.24 18.0483V14.3403L60.168 15.2523C59.592 15.4283 59.152 15.7003 58.848 16.0683C58.544 16.4363 58.392 16.9003 58.392 17.4603C58.392 17.8203 58.48 18.1443 58.656 18.4323C58.832 18.7203 59.076 18.9443 59.388 19.1043C59.7 19.2643 60.052 19.3443 60.444 19.3443ZM73.608 21.2643C72.32 21.2643 71.356 20.9283 70.716 20.2563C70.084 19.5843 69.768 18.6363 69.768 17.4123V10.9083L68.016 10.2603L68.112 9.45633L71.664 8.07633H72.624V16.9323C72.624 17.6923 72.812 18.2563 73.188 18.6243C73.564 18.9923 74.14 19.1763 74.916 19.1763C75.428 19.1763 75.964 19.0603 76.524 18.8283C77.084 18.5883 77.6 18.2803 78.072 17.9043V10.9083L76.32 10.2603V9.45633L79.98 8.07633H80.928V17.8323C80.928 18.1523 81 18.4003 81.144 18.5763C81.288 18.7443 81.476 18.8643 81.708 18.9363C81.948 19.0083 82.272 19.0723 82.68 19.1283V20.1603L79.02 21.1803H78.072V19.0803C77.44 19.7363 76.728 20.2643 75.936 20.6643C75.144 21.0643 74.368 21.2643 73.608 21.2643ZM89.328 21.2643C88.264 21.2643 87.312 21.0083 86.472 20.4963C85.632 19.9763 84.976 19.2683 84.504 18.3723C84.032 17.4763 83.796 16.4843 83.796 15.3963C83.796 13.9643 84.08 12.6963 84.648 11.5923C85.224 10.4883 86.032 9.62833 87.072 9.01233C88.112 8.38833 89.32 8.07633 90.696 8.07633C91.12 8.07633 91.556 8.12433 92.004 8.22033C92.46 8.30833 92.896 8.43633 93.312 8.60433V5.82033L91.56 5.08833V4.28433L95.22 2.73633H96.168V17.8323C96.168 18.1523 96.24 18.4003 96.384 18.5763C96.536 18.7443 96.728 18.8643 96.96 18.9363C97.2 19.0083 97.52 19.0723 97.92 19.1283V20.1603L94.26 21.1803H93.312V19.5843C92.752 20.1123 92.132 20.5243 91.452 20.8203C90.78 21.1163 90.072 21.2643 89.328 21.2643ZM90.504 19.3323C90.976 19.3323 91.456 19.2363 91.944 19.0443C92.432 18.8523 92.888 18.5883 93.312 18.2523V10.3563C92.584 9.76433 91.776 9.46833 90.888 9.46833C89.992 9.46833 89.236 9.69633 88.62 10.1523C88.004 10.6083 87.54 11.2283 87.228 12.0123C86.924 12.7883 86.772 13.6563 86.772 14.6163C86.772 15.5283 86.908 16.3403 87.18 17.0523C87.452 17.7563 87.868 18.3123 88.428 18.7203C88.988 19.1283 89.68 19.3323 90.504 19.3323ZM105.252 21.2643C104.068 21.2643 103.004 20.9883 102.06 20.4363C101.116 19.8843 100.376 19.1163 99.84 18.1323C99.304 17.1483 99.036 16.0443 99.036 14.8203C99.036 13.5563 99.308 12.4123 99.852 11.3883C100.404 10.3563 101.156 9.54833 102.108 8.96433C103.068 8.37233 104.136 8.07633 105.312 8.07633C106.216 8.07633 107.048 8.26433 107.808 8.64033C108.568 9.01633 109.2 9.54433 109.704 10.2243C110.216 10.9043 110.552 11.6883 110.712 12.5763L101.928 15.2883C102.168 16.4003 102.644 17.2763 103.356 17.9163C104.076 18.5563 104.968 18.8763 106.032 18.8763C106.92 18.8763 107.716 18.6523 108.42 18.2043C109.124 17.7483 109.748 17.0603 110.292 16.1403L111.228 16.4403C111.012 17.4003 110.62 18.2443 110.052 18.9723C109.484 19.7003 108.784 20.2643 107.952 20.6643C107.128 21.0643 106.228 21.2643 105.252 21.2643ZM107.628 12.2043C107.516 11.6523 107.324 11.1683 107.052 10.7523C106.788 10.3283 106.46 10.0003 106.068 9.76833C105.676 9.53633 105.244 9.42033 104.772 9.42033C104.18 9.42033 103.656 9.60033 103.2 9.96033C102.752 10.3123 102.4 10.8163 102.144 11.4723C101.896 12.1203 101.772 12.8723 101.772 13.7283C101.772 13.8803 101.776 13.9963 101.784 14.0763L107.628 12.2043Z`})})}function Iz(e){return(0,H.jsx)(`svg`,{viewBox:`0 0 1000 1000`,fill:`currentColor`,"aria-hidden":`true`,...e,children:(0,H.jsx)(`path`,{d:`M708.332275390625 696.332275390625Q699.7879048009073 704.8873901367188 687.505372078188 704.8873901367188Q675.2228393554688 704.8873901367188 666.7003784179688 696.3544799804688Q657.1126098632812 687.8215698242187 657.1126098632812 675.0222045898438Q657.1126098632812 662.2228393554688 666.667724609375 653.667724609375L820.33544921875 500.0L666.667724609375 346.332275390625Q657.1126098632812 337.80491638183594 657.1126098632812 325.01387786865234Q657.1126098632812 312.22283935546875 666.7121337890625 303.667724609375Q675.2450439453125 295.11260986328125 687.5111022949219 295.11260986328125Q699.7771606445312 295.11260986328125 708.332275390625 303.667724609375L883.332275390625 478.667724609375Q892.8873901367188 487.19508361816406 892.8873901367188 499.98612213134766Q892.8873901367188 512.7771606445312 883.332275390625 521.332275390625ZM479.7763671875 805.2220458984375Q477.65525124289775 816.9654169497283 467.57995050603694 824.3708920686141Q457.5046497691761 831.7763671875 444.7779541015625 829.7763671875Q433.03458305027175 827.6552512428977 425.6291079313859 817.579950506037Q418.2236328125 807.5046497691761 420.2236328125 794.7779541015625L520.2236328125 194.7779541015625Q522.3447487571023 183.03458305027175 532.420049493963 175.62910793138587Q542.4953502308239 168.2236328125 555.2220458984375 170.2236328125Q566.9654169497283 172.34474875710225 574.3708920686141 182.42004949396306Q581.7763671875 192.49535023082387 579.7763671875 205.2220458984375ZM333.332275390625 653.667724609375Q342.88739013671875 662.1950836181641 342.88739013671875 674.9861221313477Q342.88739013671875 687.7771606445312 333.2878662109375 696.332275390625Q324.7549560546875 704.8873901367188 312.4888977050781 704.8873901367188Q300.22283935546875 704.8873901367188 291.667724609375 696.332275390625L116.667724609375 521.332275390625Q107.11260986328125 512.8049163818359 107.11260986328125 500.01387786865234Q107.11260986328125 487.22283935546875 116.667724609375 478.667724609375L291.667724609375 303.667724609375Q300.21209519909274 295.11260986328125 312.494627921812 295.11260986328125Q324.77716064453125 295.11260986328125 333.29962158203125 303.6455200195312Q342.88739013671875 312.1784301757813 342.88739013671875 324.97779541015626Q342.88739013671875 337.77716064453125 333.332275390625 346.332275390625L179.66455078125 500.0Z`})})}function Lz(e){return(0,H.jsx)(`svg`,{viewBox:`0 0 1000 1000`,fill:`currentColor`,"aria-hidden":`true`,...e,children:(0,H.jsx)(`path`,{d:`M225.0 295.11260986328125H775.0Q810.516083240509 295.11260986328125 840.4510676860809 312.3632788658142Q870.3860521316528 329.61394786834717 887.6367211341858 359.54893231391907Q904.8873901367188 389.48391675949097 904.8873901367188 425.0V775.0Q904.8873901367188 797.5323408077925 894.133318387545 815.4557937230819Q883.3792466383713 833.3792466383713 865.4557937230819 844.133318387545Q847.5323408077925 854.8873901367188 825.0 854.8873901367188H175.0Q152.46765919220752 854.8873901367188 134.54420627691806 844.133318387545Q116.6207533616286 833.3792466383713 105.86668161245493 815.4557937230819Q95.11260986328125 797.5323408077925 95.11260986328125 775.0V425.0Q95.11260986328125 389.48391675949097 112.36327886581421 359.54893231391907Q129.61394786834717 329.61394786834717 159.54893231391907 312.3632788658142Q189.48391675949097 295.11260986328125 225.0 295.11260986328125ZM225.0 354.88739013671875Q195.78641255696616 354.88739013671875 175.33690134684247 375.33690134684247Q154.88739013671875 395.7864125569662 154.88739013671875 425.0V775.0Q154.88739013671875 783.2278858531605 160.82975214177912 789.1702478582208Q166.7721141468395 795.1126098632812 175.0 795.1126098632812H825.0Q833.2278858531605 795.1126098632812 839.1702478582208 789.1702478582208Q845.1126098632812 783.2278858531605 845.1126098632812 775.0V425.0Q845.1126098632812 395.7864125569662 824.6630986531575 375.33690134684247Q804.2135874430338 354.88739013671875 775.0 354.88739013671875ZM125.0 604.8873901367188V545.1126098632812H275.0Q287.77716064453125 545.1126098632812 296.332275390625 553.6455200195312Q304.88739013671875 562.1784301757813 304.88739013671875 574.9777954101562Q304.88739013671875 587.7771606445312 296.348135811942 596.332275390625Q287.8088814871652 604.8873901367188 275.0 604.8873901367188ZM375.0 604.8873901367188Q362.1911185128348 604.8873901367188 353.651864188058 596.3544799804688Q345.11260986328125 587.8215698242187 345.11260986328125 575.0222045898438Q345.11260986328125 562.2228393554688 353.651864188058 553.667724609375Q362.1911185128348 545.1126098632812 375.0 545.1126098632812H625.0Q637.8088814871652 545.1126098632812 646.348135811942 553.6455200195312Q654.8873901367188 562.1784301757813 654.8873901367188 574.9777954101562Q654.8873901367188 587.7771606445312 646.348135811942 596.332275390625Q637.8088814871652 604.8873901367188 625.0 604.8873901367188ZM354.88739013671875 325.0H295.11260986328125V225.0Q295.11260986328125 202.555908203125 305.86668161245495 184.60487747192383Q316.6207533616286 166.65384674072266 334.5442062769181 155.88322830200195Q352.4676591922075 145.11260986328125 375.0 145.11260986328125H625.0Q647.5323408077925 145.11260986328125 665.4557937230819 155.86668161245495Q683.3792466383713 166.62075336162866 694.133318387545 184.5442062769181Q704.8873901367188 202.46765919220752 704.8873901367188 225.0V325.0H645.1126098632812V225.0Q645.1126098632812 216.77716064453125 639.1702478582208 210.832275390625Q633.2278858531605 204.88739013671875 625.0 204.88739013671875H375.0Q366.7721141468395 204.88739013671875 360.8297521417791 210.82975214177912Q354.88739013671875 216.7721141468395 354.88739013671875 225.0ZM725.0 604.8873901367188Q712.2228393554688 604.8873901367188 703.667724609375 596.3544799804688Q695.1126098632812 587.8215698242187 695.1126098632812 575.0222045898438Q695.1126098632812 562.2228393554688 703.651864188058 553.667724609375Q712.1911185128348 545.1126098632812 725.0 545.1126098632812H875.0V604.8873901367188Z`})})}function Rz(e){return(0,H.jsx)(`svg`,{viewBox:`0 0 1000 1000`,fill:`currentColor`,"aria-hidden":`true`,...e,children:(0,H.jsx)(`path`,{d:`M120.11260986328125 500.0Q120.11260986328125 421.61053854321676 149.76344038310805 352.76851149463147Q179.41427090293482 283.9264844460462 231.68014164974812 231.6668434748574Q283.94601239656146 179.4072025036686 352.79624597649826 149.75990618347493Q421.64647955643505 120.11260986328125 500.045285676655 120.11260986328125Q578.444091796875 120.11260986328125 647.2545028997927 149.77072185647899Q716.0649140027105 179.42883384967672 768.300554547991 231.70753973599136Q820.5361950932717 283.986245622306 850.1562811403858 352.85338703023973Q879.7763671875 421.72052843817346 879.7763671875 500.13858726764545L876.7763671875 539.3476166823814Q873.7763671875 557.444091796875 867.6836138375198 572.67919921875Q861.5908604875395 587.914306640625 852.4517304625692 600.6102294921875Q843.3126004375989 613.30615234375 831.1270937376385 622.447216796875H832.1425526293018Q819.9570459293413 631.58828125 806.7560803377175 637.68232421875Q793.5551147460938 643.7763671875 781.4743707830256 646.8066461736505Q768.3868981563684 650.8470181551847 754.7960611979167 652.36215764826Q741.205224239465 653.8772971413352 727.1110229492188 654.8873901367188L605.1110229492188 652.8873901367188L580.444091796875 655.8873901367188L568.0791430664062 661.5701817103795Q560.4699438476563 667.2529732840402 556.6653442382812 675.7771606445312L549.7763671875 701.3330688476562L543.7763671875 794.4244417173672L539.7763671875 814.444091796875L531.6067141415028 833.9011362711589L518.3310279417574 852.334125773112Q501.991721849763 869.7430603027344 475.4403494502721 874.863335164388L448.88897705078125 875.8873901367188L418.72600758403814 870.8621576482599Q390.57390274841123 864.8318786621094 364.4326625439005 854.7814136851918Q293.0469681392751 827.6451582475142 237.7481907835794 774.8802171186967Q182.44941342788368 722.1152759898793 151.28101164558245 651.2594979026101Q120.11260986328125 580.403719815341 120.11260986328125 500.0ZM179.88739013671875 499.96734619140625Q179.88739013671875 568.555908203125 206.2155882007014 627.7110236600699Q232.5437862646841 686.8661391170149 279.2390809442005 731.6053020676455Q325.9343756237169 776.3444650182762 385.545390108206 799.2111483041541L431.2471678796476 812.1357953787808L452.11102294921875 816.1126098632812L465.51890055338544 815.1866251627604L472.22283935546875 813.3346557617188L478.33465576171875 806.2228393554688L484.11260986328125 785.7779541015625L487.11260986328125 733.7779541015625L490.11260986328125 692.7779541015625L494.1894719050481 671.4213745117188L502.3431959885817 651.0817749023438Q506.42005803034857 641.928955078125 513.5545666034405 631.7591552734375Q520.6890751765325 621.58935546875 531.9004457913912 613.453515625L543.11181640625 606.3346557617188L566.4200007997711 598.1980121319111L601.8889770507812 593.1126098632812L724.7870679257521 595.1126098632812Q735.7779541015625 594.1126098632812 746.1268395317925 592.6459167480468Q756.4757249620226 591.1792236328125 765.3461981879341 589.2236328125Q775.2022795500578 586.2902465820313 782.1015365035446 582.8679626464843Q789.0007934570312 579.4456787109375 793.8527628580729 575.5396212064303Q799.675126139323 570.6570493257963 804.0418986002604 564.7979630690354Q808.4086710611979 558.9388768122747 812.2902465820313 550.1502474271334L818.1126098632812 528.6669311523438L820.1126098632812 499.85038787754854Q820.1126098632812 433.2742361737113 795.2571978901708 375.6411496241208Q770.4017859170604 318.00806307453036 726.169876216918 273.7895742563101Q681.9379665167756 229.57108543808988 624.2873875817587 204.72923778740432Q566.6368086467418 179.88739013671875 500.0404502218084 179.88739013671875Q433.444091796875 179.88739013671875 375.7723714192708 204.73831840183425Q318.10065104166665 229.58924666694975 273.85252075195314 273.8238989788553Q229.6043904622396 318.0585512907609 204.74589029947919 375.7127048658288Q179.88739013671875 433.36685844089675 179.88739013671875 499.96734619140625ZM546.7779541015625 245.11260986328125Q558.5921223958334 244.11260986328125 568.2582600911459 252.61659561960323Q577.9243977864584 261.1205813759252 577.9243977864584 272.8597604851974Q578.9984130859375 285.6661376953125 570.9741380479601 294.74284023708765Q562.9498630099827 303.8195427788628 550.1110229492188 304.88739013671875L554.8873901367188 300.0L550.0 295.11260986328125L545.1126098632812 300.0L549.8889770507812 304.88739013671875Q537.0691152719351 303.8207763671875 529.0908625676082 294.7545593261719Q521.1126098632812 285.6883422851563 522.1126098632812 272.88897705078125Q522.1126098632812 261.137437086839 531.767262425916 252.62502347506012Q541.4219149885506 244.11260986328125 553.2220458984375 245.11260986328125Q574.9214904785156 246.14813720703125 589.9044403076172 262.19881103515627Q604.8873901367188 278.2494848632813 604.8873901367188 299.99555908203126Q604.8873901367188 322.77716064453125 588.8367163085937 338.832275390625Q572.7860424804687 354.88739013671875 550.0044409179687 354.88739013671875Q527.2228393554688 354.88739013671875 511.167724609375 338.82927477037583Q495.11260986328125 322.7711594040329 495.11260986328125 299.97899565825594Q495.11260986328125 278.22283935546875 510.09555969238284 262.18507194519043Q525.0785095214844 246.1473045349121 546.7779541015625 245.11260986328125ZM696.7779541015625 395.11260986328125Q708.5921223958334 394.11260986328125 718.2582600911459 402.61659561960323Q727.9243977864584 411.1205813759252 727.9243977864584 422.8597604851974Q728.9984130859375 435.6661376953125 720.9741380479601 444.74284023708765Q712.9498630099827 453.8195427788628 700.1110229492188 454.88739013671875L704.8873901367188 450.0L700.0 445.11260986328125L695.1126098632812 450.0L699.8889770507812 454.88739013671875Q687.0691152719351 453.8207763671875 679.0908625676082 444.7545593261719Q671.1126098632812 435.6883422851563 672.1126098632812 422.88897705078125Q672.1126098632812 411.137437086839 681.767262425916 402.6250234750601Q691.4219149885506 394.11260986328125 703.2220458984375 395.11260986328125Q724.9214904785156 396.14813720703125 739.9044403076172 412.19881103515627Q754.8873901367188 428.2494848632813 754.8873901367188 449.99555908203126Q754.8873901367188 472.77716064453125 738.8367163085937 488.832275390625Q722.7860424804687 504.88739013671875 700.0044409179687 504.88739013671875Q677.2228393554688 504.88739013671875 661.167724609375 488.82927477037583Q645.1126098632812 472.7711594040329 645.1126098632812 449.97899565825594Q645.1126098632812 428.22283935546875 660.0955596923828 412.18507194519043Q675.0785095214844 396.1473045349121 696.7779541015625 395.11260986328125ZM346.7779541015625 295.11260986328125Q358.5921223958333 294.11260986328125 368.2582600911458 302.61659561960323Q377.9243977864583 311.1205813759252 377.9243977864583 322.8597604851974Q378.9984130859375 335.6661376953125 370.9741380479601 344.74284023708765Q362.94986300998266 353.8195427788628 350.11102294921875 354.88739013671875L354.88739013671875 350.0L350.0 345.11260986328125L345.11260986328125 350.0L349.88897705078125 354.88739013671875Q337.0691152719351 353.8207763671875 329.09086256760816 344.7545593261719Q321.11260986328125 335.6883422851563 322.11260986328125 322.88897705078125Q322.11260986328125 311.137437086839 331.767262425916 302.6250234750601Q341.42191498855067 294.11260986328125 353.2220458984375 295.11260986328125Q374.92149047851564 296.14813720703125 389.90444030761716 312.19881103515627Q404.88739013671875 328.2494848632813 404.88739013671875 349.99555908203126Q404.88739013671875 372.77716064453125 388.83671630859374 388.832275390625Q372.7860424804687 404.88739013671875 350.00444091796874 404.88739013671875Q327.22283935546875 404.88739013671875 311.167724609375 388.82927477037583Q295.11260986328125 372.7711594040329 295.11260986328125 349.97899565825594Q295.11260986328125 328.22283935546875 310.09555969238284 312.18507194519043Q325.07850952148436 296.1473045349121 346.7779541015625 295.11260986328125ZM296.7779541015625 495.11260986328125Q308.5921223958333 494.11260986328125 318.2582600911458 502.61659561960323Q327.9243977864583 511.12058137592516 327.9243977864583 522.8597604851973Q328.9984130859375 535.6661376953125 320.9741380479601 544.7428402370876Q312.94986300998266 553.8195427788628 300.11102294921875 554.8873901367188L304.88739013671875 550.0L300.0 545.1126098632812L295.11260986328125 550.0L299.88897705078125 554.8873901367188Q287.0691152719351 553.8207763671875 279.09086256760816 544.7545593261718Q271.11260986328125 535.6883422851563 272.11260986328125 522.8889770507812Q272.11260986328125 511.13743708683893 281.767262425916 502.62502347506006Q291.42191498855067 494.11260986328125 303.2220458984375 495.11260986328125Q324.92149047851564 496.14813720703125 339.90444030761716 512.1988110351563Q354.88739013671875 528.2494848632812 354.88739013671875 549.9955590820313Q354.88739013671875 572.7771606445312 338.83671630859374 588.832275390625Q322.7860424804687 604.8873901367188 300.00444091796874 604.8873901367188Q277.22283935546875 604.8873901367188 261.167724609375 588.8292747703758Q245.11260986328125 572.7711594040329 245.11260986328125 549.9789956582559Q245.11260986328125 528.2228393554688 260.09555969238284 512.1850719451904Q275.07850952148436 496.1473045349121 296.7779541015625 495.11260986328125Z`})})}function zz(e){return(0,H.jsx)(`svg`,{viewBox:`0 0 1000 1000`,fill:`currentColor`,"aria-hidden":`true`,...e,children:(0,H.jsx)(`path`,{d:`M444.667724609375 124.55670166015625Q460.0378011067708 109.29024658203127 480.0189005533854 104.20142822265626Q500.0 99.11260986328125 519.9810994466145 104.20142822265626Q539.9621988932291 109.29024658203127 555.332275390625 124.55670166015625L830.332275390625 388.667724609375Q854.8873901367188 412.21490914481024 854.8873901367188 446.0V775.0Q854.8873901367188 796.5081434983474 844.133318387545 814.9436950683594Q833.3792466383713 833.3792466383713 815.4557937230819 844.133318387545Q797.5323408077925 854.8873901367188 775.0 854.8873901367188H600.0Q587.1911185128348 854.8873901367188 578.651864188058 846.348135811942Q570.1126098632812 837.8088814871652 570.1126098632812 825.0V600.0Q570.1126098632812 591.7721141468395 564.1702478582208 585.8297521417792Q558.2278858531605 579.8873901367188 550.0 579.8873901367188H450.0Q441.7721141468395 579.8873901367188 435.8297521417791 585.8297521417792Q429.88739013671875 591.7721141468395 429.88739013671875 600.0V825.0Q429.88739013671875 837.8088814871652 421.348135811942 846.348135811942Q412.8088814871652 854.8873901367188 400.0 854.8873901367188H225.0Q202.46765919220752 854.8873901367188 184.54420627691806 844.133318387545Q166.6207533616286 833.3792466383713 155.86668161245493 814.9436950683594Q145.11260986328125 796.5081434983474 145.11260986328125 775.0V446.0Q145.11260986328125 412.21490914481024 169.667724609375 388.667724609375ZM486.332275390625 167.332275390625 211.332275390625 432.332275390625Q204.88739013671875 437.79936523437505 204.88739013671875 446.0V775.0Q204.88739013671875 783.2278858531605 210.82975214177912 789.1702478582208Q216.7721141468395 795.1126098632812 225.0 795.1126098632812H400.0Q387.1911185128348 795.1126098632812 378.651864188058 803.651864188058Q370.11260986328125 812.1911185128348 370.11260986328125 825.0V600.0Q370.11260986328125 577.4676591922075 380.86668161245495 559.5442062769181Q391.6207533616286 541.6207533616287 409.5442062769181 530.866681612455Q427.4676591922075 520.1126098632812 450.0 520.1126098632812H550.0Q572.5323408077925 520.1126098632812 590.4557937230819 530.866681612455Q608.3792466383713 541.6207533616287 619.133318387545 559.5442062769181Q629.8873901367188 577.4676591922075 629.8873901367188 600.0V825.0Q629.8873901367188 812.1911185128348 621.348135811942 803.651864188058Q612.8088814871652 795.1126098632812 600.0 795.1126098632812H775.0Q783.2278858531605 795.1126098632812 789.1702478582208 789.1702478582208Q795.1126098632812 783.2278858531605 795.1126098632812 775.0V446.0Q795.1126098632812 437.79936523437505 788.7787475585938 432.332275390625L513.667724609375 167.332275390625Q508.19508361816406 161.88739013671875 499.98612213134766 161.88739013671875Q491.77716064453125 161.88739013671875 486.332275390625 167.332275390625Z`})})}function Bz(e){return(0,H.jsx)(`svg`,{viewBox:`0 0 1000 1000`,fill:`currentColor`,"aria-hidden":`true`,...e,children:(0,H.jsx)(`path`,{d:`M470.11260986328125 725.0H529.8873901367188V875.0Q529.8873901367188 887.8088814871652 521.348135811942 896.348135811942Q512.8088814871652 904.8873901367188 500.0 904.8873901367188H325.0Q312.1911185128348 904.8873901367188 303.651864188058 896.3544799804688Q295.11260986328125 887.8215698242187 295.11260986328125 875.0222045898438Q295.11260986328125 862.2228393554688 303.651864188058 853.667724609375Q312.1911185128348 845.1126098632812 325.0 845.1126098632812H470.11260986328125ZM675.0 845.1126098632812Q687.7771606445312 845.1126098632812 696.332275390625 853.6455200195312Q704.8873901367188 862.1784301757813 704.8873901367188 874.9777954101562Q704.8873901367188 887.7771606445312 696.348135811942 896.332275390625Q687.8088814871652 904.8873901367188 675.0 904.8873901367188H500.0V845.1126098632812ZM654.8873901367188 225.0V450.0Q654.8873901367188 492.5181070963542 634.1306139823719 527.9498630099827Q613.3738378280249 563.3816189236111 577.9354395157252 584.1345045301649Q542.4970412034255 604.8873901367188 499.9709632286659 604.8873901367188Q457.44488525390625 604.8873901367188 422.0247984190245 584.1345045301649Q386.60471158414276 563.3816189236111 365.858660723712 527.9498630099827Q345.11260986328125 492.5181070963542 345.11260986328125 450.0V225.0Q345.11260986328125 182.48189290364587 365.86938601762824 147.0501369900174Q386.6261621719752 111.61838107638891 422.06456048427486 90.86549546983508Q457.50295879657455 70.11260986328125 500.0290367713341 70.11260986328125Q542.5551147460938 70.11260986328125 577.9752015809755 90.86549546983508Q613.3952884158573 111.61838107638891 634.141339276288 147.0501369900174Q654.8873901367188 182.48189290364587 654.8873901367188 225.0ZM595.1126098632812 225.0Q595.1126098632812 198.52535601743716 582.3686789235761 176.95342388349707Q569.624747983871 155.38149174955697 548.05809562437 142.63444094313786Q526.491443264869 129.88739013671875 500.02327900548136 129.88739013671875Q473.55511474609375 129.88739013671875 451.97382986886157 142.63444094313786Q430.39254499162945 155.38149174955697 417.63996756417407 176.95342388349707Q404.88739013671875 198.52535601743716 404.88739013671875 225.0V450.0Q404.88739013671875 476.47464398256284 417.6313210764239 498.04657611650293Q430.375252016129 519.618508250443 451.94190437563003 532.3655590568621Q473.50855673513104 545.1126098632812 499.97672099451864 545.1126098632812Q526.4448852539062 545.1126098632812 548.0261701311383 532.3655590568621Q569.6074550083705 519.618508250443 582.3600324358258 498.04657611650293Q595.1126098632812 476.47464398256284 595.1126098632812 450.0ZM195.11260986328125 425.0Q195.11260986328125 412.1911185128348 203.64552001953126 403.651864188058Q212.17843017578124 395.11260986328125 224.97779541015626 395.11260986328125Q237.77716064453125 395.11260986328125 246.332275390625 403.651864188058Q254.88739013671875 412.1911185128348 254.88739013671875 425.0V449.8265266418457Q254.88739013671875 500.47264099121094 273.74581724845325 545.1603889465332Q292.6042443601877 589.8481369018555 326.3509034022389 623.6122131347656Q360.0975624442901 657.3762893676758 404.76225823524015 676.2444496154785Q449.42695402619023 695.1126098632812 500.04694258926696 695.1126098632812Q550.6669311523438 695.1126098632812 595.3100716727121 676.2444496154785Q639.9532121930804 657.3762893676758 673.683585030692 623.6122131347656Q707.4139578683036 589.8481369018555 726.2632838657923 545.1603889465332Q745.1126098632812 500.47264099121094 745.1126098632812 449.8265266418457V425.0Q745.1126098632812 412.1911185128348 753.6455200195312 403.651864188058Q762.1784301757813 395.11260986328125 774.9777954101562 395.11260986328125Q787.7771606445312 395.11260986328125 796.332275390625 403.651864188058Q804.8873901367188 412.1911185128348 804.8873901367188 425.0V450.14385595554256Q804.8873901367188 513.5063729635099 781.244819682804 568.8228560657036Q757.6022492288891 624.1393391678973 715.8504758741035 665.878140054098Q674.0987025193178 707.6169409402987 618.765026988879 731.2521655385087Q563.4313514584401 754.8873901367188 500.0491413053919 754.8873901367188Q436.66693115234375 754.8873901367188 381.3107325236002 731.2521655385087Q325.95453389485675 707.6169409402987 284.18576583862307 665.878140054098Q242.41699778238933 624.1393391678973 218.7648038228353 568.8228560657036Q195.11260986328125 513.5063729635099 195.11260986328125 450.14385595554256Z`})})}function Vz(e){return(0,H.jsx)(`svg`,{viewBox:`0 0 1000 1000`,fill:`currentColor`,"aria-hidden":`true`,...e,children:(0,H.jsx)(`path`,{d:`M470.11260986328125 225.0Q470.11260986328125 212.1911185128348 478.64552001953126 203.65186418805803Q487.1784301757813 195.11260986328125 499.97779541015626 195.11260986328125Q512.7771606445312 195.11260986328125 521.332275390625 203.65186418805803Q529.8873901367188 212.1911185128348 529.8873901367188 225.0V775.0Q529.8873901367188 787.8088814871652 521.3544799804688 796.348135811942Q512.8215698242187 804.8873901367188 500.02220458984374 804.8873901367188Q487.22283935546875 804.8873901367188 478.667724609375 796.348135811942Q470.11260986328125 787.8088814871652 470.11260986328125 775.0ZM775.0 470.11260986328125Q787.8088814871652 470.11260986328125 796.348135811942 478.64552001953126Q804.8873901367188 487.1784301757813 804.8873901367188 499.97779541015626Q804.8873901367188 512.7771606445312 796.348135811942 521.332275390625Q787.8088814871652 529.8873901367188 775.0 529.8873901367188H225.0Q212.19111851283483 529.8873901367188 203.65186418805803 521.3544799804688Q195.11260986328125 512.8215698242187 195.11260986328125 500.02220458984374Q195.11260986328125 487.22283935546875 203.65186418805803 478.667724609375Q212.19111851283483 470.11260986328125 225.0 470.11260986328125Z`})})}function Hz(e){return(0,H.jsx)(`svg`,{viewBox:`0 0 1000 1000`,fill:`currentColor`,"aria-hidden":`true`,...e,children:(0,H.jsx)(`path`,{d:`M225.0 304.88739013671875Q212.19111851283483 304.88739013671875 203.65186418805803 296.35447998046874Q195.11260986328125 287.8215698242187 195.11260986328125 275.0222045898438Q195.11260986328125 262.22283935546875 203.65186418805803 253.667724609375Q212.19111851283483 245.11260986328125 225.0 245.11260986328125H775.0Q787.8088814871652 245.11260986328125 796.348135811942 253.64552001953126Q804.8873901367188 262.1784301757813 804.8873901367188 274.9777954101562Q804.8873901367188 287.77716064453125 796.348135811942 296.332275390625Q787.8088814871652 304.88739013671875 775.0 304.88739013671875ZM300.0 154.88739013671875Q287.1911185128348 154.88739013671875 278.651864188058 146.35447998046874Q270.11260986328125 137.82156982421873 270.11260986328125 125.0222045898438Q270.11260986328125 112.22283935546875 278.651864188058 103.667724609375Q287.1911185128348 95.11260986328125 300.0 95.11260986328125H700.0Q712.8088814871652 95.11260986328125 721.348135811942 103.64552001953126Q729.8873901367188 112.17843017578127 729.8873901367188 124.9777954101562Q729.8873901367188 137.77716064453125 721.348135811942 146.332275390625Q712.8088814871652 154.88739013671875 700.0 154.88739013671875ZM209.0 395.11260986328125H791.0Q815.588277445211 395.11260986328125 835.0539970893365 408.4298182896205Q854.5197167334619 421.7470267159598 864.2035534350903 442.7472400036487Q873.8873901367188 463.7474532913376 869.8873901367188 488.33306884765625L811.7763671875 838.3330688476562Q806.6610186688312 867.0026226337139 784.1534851866884 885.9450063852164Q761.6459517045455 904.8873901367188 733.0 904.8873901367188H267.0Q238.35404829545453 904.8873901367188 215.84651481331167 885.9450063852164Q193.33898133116884 867.0026226337139 188.2236328125 838.3330688476562L130.11260986328125 488.33306884765625Q126.11260986328125 463.7474532913376 135.7964465649097 442.7472400036487Q145.48028326653815 421.7470267159598 164.94600291066354 408.4298182896205Q184.41172255478895 395.11260986328125 209.0 395.11260986328125ZM209.0 454.88739013671875Q199.85790460759944 454.88739013671875 193.8726473721591 462.2041719876803Q187.88739013671875 469.52095383864184 188.88739013671875 478.66693115234375L247.7763671875 828.6669311523438Q248.69177827380952 835.9761216905382 254.18424479166666 840.5443657769097Q259.6767113095238 845.1126098632812 267.0 845.1126098632812H733.0Q740.3232886904761 845.1126098632812 745.8157552083333 840.5443657769097Q751.3082217261905 835.9761216905382 752.2236328125 828.6669311523438L811.1126098632812 478.66693115234375Q812.1126098632812 469.52095383864184 806.127352627841 462.2041719876803Q800.1420953924006 454.88739013671875 791.0 454.88739013671875Z`})})}function Uz(e){return(0,H.jsxs)(`svg`,{viewBox:`0 0 16 16`,fill:`none`,stroke:`currentColor`,strokeWidth:`1`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,...e,children:[(0,H.jsx)(`circle`,{cx:`8`,cy:`8`,r:`5.5`}),(0,H.jsx)(`line`,{x1:`8`,y1:`8`,x2:`10`,y2:`9`}),(0,H.jsx)(`line`,{x1:`8`,y1:`8`,x2:`8`,y2:`5.5`})]})}function Wz(e){return(0,H.jsx)(`svg`,{viewBox:`0 0 1000 1000`,fill:`currentColor`,"aria-hidden":`true`,...e,children:(0,H.jsx)(`path`,{d:`M754.8873901367188 425.0584777366114Q754.8873901367188 490.444091796875 729.7390770366173 551.276105293303Q704.5907639365159 612.108118789731 658.3178678323294 658.3605588035439Q612.0449717281429 704.6129988173568 551.1860540258975 729.7501944770378Q490.3271363236522 754.8873901367188 424.9415222633886 754.8873901367188Q359.555908203125 754.8873901367188 298.7238947066971 729.7390770366173Q237.89188121026913 704.5907639365159 191.63944119645615 658.3178678323295Q145.3870011826432 612.0449717281429 120.24980552296222 551.1860540258975Q95.11260986328125 490.3271363236522 95.11260986328125 424.9415222633886Q95.11260986328125 359.555908203125 120.26092296338264 298.7238947066971Q145.40923606348403 237.89188121026916 191.68213216767057 191.63944119645612Q237.95502827185712 145.3870011826432 298.81394597410247 120.24980552296222Q359.6728636763478 95.11260986328125 425.0584777366114 95.11260986328125Q490.444091796875 95.11260986328125 551.2761052933029 120.26092296338265Q612.1081187897308 145.40923606348406 658.3605588035439 191.6821321676706Q704.6129988173568 237.95502827185715 729.7501944770378 298.81394597410247Q754.8873901367188 359.6728636763478 754.8873901367188 425.0584777366114ZM695.1126098632812 424.96526275821986Q695.1126098632812 371.33306884765625 674.2556455647286 321.6895645561568Q653.3986812661761 272.0460602646574 615.6575077735573 234.31699700311788Q577.9163342809385 196.58793374157824 528.256895474861 175.7376619391485Q478.59745666878354 154.88739013671875 424.9652627582199 154.88739013671875Q371.33306884765625 154.88739013671875 321.6895645561568 175.7443544352713Q272.0460602646574 196.60131873382386 234.31699700311782 234.3424922264427Q196.58793374157827 272.0836657190615 175.7376619391485 321.74310452513896Q154.88739013671875 371.4025433312164 154.88739013671875 425.03473724178014Q154.88739013671875 478.66693115234375 175.74435443527128 528.3104354438432Q196.6013187338238 577.9539397353426 234.3424922264427 615.6830029968821Q272.0836657190615 653.4120662584218 321.74310452513896 674.2623380608516Q371.40254333121646 695.1126098632812 425.0347372417801 695.1126098632812Q478.66693115234375 695.1126098632812 528.3104354438432 674.2556455647288Q577.9539397353426 653.3986812661763 615.6830029968821 615.6575077735573Q653.4120662584218 577.9163342809385 674.2623380608516 528.256895474861Q695.1126098632812 478.5974566687836 695.1126098632812 424.96526275821986ZM616.667724609375 658.332275390625 658.332275390625 616.667724609375 896.332275390625 853.667724609375Q904.8873901367188 862.1950836181641 904.8873901367188 874.9861221313477Q904.8873901367188 887.7771606445312 896.3544799804688 896.332275390625Q887.8215698242187 904.8873901367188 875.0222045898438 904.8873901367188Q862.2228393554688 904.8873901367188 853.667724609375 896.332275390625Z`})})}function Gz(e){return(0,H.jsx)(`svg`,{viewBox:`0 0 1000 1000`,fill:`currentColor`,"aria-hidden":`true`,...e,children:(0,H.jsx)(`path`,{d:`M295.11260986328125 175.0H354.88739013671875V825.0H295.11260986328125ZM175.0 145.11260986328125H825.0Q847.5323408077925 145.11260986328125 865.4557937230819 155.86668161245495Q883.3792466383713 166.62075336162866 894.133318387545 184.5442062769181Q904.8873901367188 202.46765919220752 904.8873901367188 225.0V775.0Q904.8873901367188 797.5323408077925 894.133318387545 815.4557937230819Q883.3792466383713 833.3792466383713 865.4557937230819 844.133318387545Q847.5323408077925 854.8873901367188 825.0 854.8873901367188H175.0Q152.46765919220752 854.8873901367188 134.54420627691806 844.133318387545Q116.6207533616286 833.3792466383713 105.86668161245493 815.4557937230819Q95.11260986328125 797.5323408077925 95.11260986328125 775.0V225.0Q95.11260986328125 202.46765919220752 105.86668161245493 184.5442062769181Q116.6207533616286 166.62075336162866 134.54420627691806 155.86668161245495Q152.46765919220752 145.11260986328125 175.0 145.11260986328125ZM175.0 204.88739013671875Q166.7721141468395 204.88739013671875 160.82975214177912 210.82975214177912Q154.88739013671875 216.7721141468395 154.88739013671875 225.0V775.0Q154.88739013671875 783.2278858531605 160.82975214177912 789.1702478582208Q166.7721141468395 795.1126098632812 175.0 795.1126098632812H825.0Q833.2278858531605 795.1126098632812 839.1702478582208 789.1702478582208Q845.1126098632812 783.2278858531605 845.1126098632812 775.0V225.0Q845.1126098632812 216.7721141468395 839.1702478582208 210.82975214177912Q833.2278858531605 204.88739013671875 825.0 204.88739013671875Z`})})}var Kz=`"Anthropic Sans", ui-sans-serif, system-ui, sans-serif`,qz={light:{"--shell-surface":`#faf9f5`,"--shell-sidebar":`#fbfbf9`,"--shell-card":`#ffffff`,"--shell-panel":`#ffffff`,"--shell-text":`#141413`,"--shell-text-secondary":`#3d3d3a`,"--shell-text-tertiary":`#73726c`,"--shell-nav-text":`#52514e`,"--shell-icon-muted":`#898781`,"--shell-segment-bg":`#edece8`,"--shell-segment-active":`#f9f9f7`,"--shell-btn-bg":`#f3f3f3`,"--shell-border":`rgba(31, 30, 29, 0.08)`,"--shell-composer-border":`rgba(31, 30, 29, 0.08)`,"--shell-accent":`#d97757`},dark:{"--shell-surface":`#1a1a19`,"--shell-sidebar":`#1a1a19`,"--shell-card":`#383835`,"--shell-panel":`#383835`,"--shell-text":`#faf9f5`,"--shell-text-secondary":`#c2c0b6`,"--shell-text-tertiary":`#9c9a92`,"--shell-nav-text":`#c2c0b6`,"--shell-icon-muted":`#9c9a92`,"--shell-segment-bg":`#3a3a38`,"--shell-segment-active":`#4a4a47`,"--shell-btn-bg":`#3a3a38`,"--shell-border":`rgba(222, 220, 209, 0.1)`,"--shell-composer-border":`transparent`,"--shell-accent":`#d97757`}};function Jz({className:e}){return(0,H.jsx)(`div`,{className:lN(`rounded-md bg-[color-mix(in_oklab,var(--shell-text)_10%,transparent)] motion-safe:animate-pulse`,e)})}function Yz(){return(0,H.jsxs)(`div`,{"aria-hidden":!0,className:`flex h-12 shrink-0 cursor-not-allowed items-center gap-2.5 px-3`,children:[(0,H.jsx)(Gz,{className:`size-4.5 text-[#7b7974]`}),(0,H.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,H.jsx)(Jz,{className:`h-3.5 w-24`}),(0,H.jsx)(Nz,{className:`size-2.5 text-(--shell-text-tertiary)`})]}),(0,H.jsx)(`div`,{className:`ml-auto flex h-7 items-center rounded-[7px] bg-(--shell-btn-bg) px-3 text-(--shell-text) text-sm`,children:`Share`})]})}function Xz(){return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(`div`,{className:`flex min-h-[100px] flex-col justify-between rounded-[20px] bg-(--shell-card) p-3 shadow-[0_4px_20px_rgba(0,0,0,0.05)]`,children:[(0,H.jsx)(`span`,{className:`px-1.5 pt-1 text-[15px] text-(--shell-text-tertiary)`,children:`Write a message...`}),(0,H.jsxs)(`div`,{className:`flex items-center px-1 pb-0.5 text-(--shell-text-secondary)`,children:[(0,H.jsx)(Vz,{className:`size-5`}),(0,H.jsx)(`div`,{className:`flex-1`}),(0,H.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,H.jsx)(Jz,{className:`h-3.5 w-14`}),(0,H.jsx)(Jz,{className:`h-3.5 w-9`}),(0,H.jsx)(Nz,{className:`size-3`})]}),(0,H.jsx)(`div`,{className:`flex-1`}),(0,H.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,H.jsx)(Bz,{className:`size-5`}),(0,H.jsx)(`div`,{className:`flex size-8 items-center justify-center rounded-lg bg-(--shell-accent) text-white`,children:(0,H.jsx)(Wr,{className:`size-4.5`})})]})]})]}),(0,H.jsx)(`div`,{className:`pt-1.5 pb-1 text-center text-(--shell-text-tertiary) text-xs`,children:`Claude can make mistakes. Please double-check responses.`})]})}function Zz(){return(0,H.jsxs)(`div`,{className:`flex min-h-[100px] flex-col justify-between rounded-[20px] border border-(--shell-composer-border) bg-(--shell-card) p-4 shadow-[0_4px_16px_rgba(0,0,0,0.04)]`,children:[(0,H.jsx)(`span`,{className:`text-(--shell-text-tertiary)`,children:`Reply to Claude...`}),(0,H.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,H.jsx)(Vz,{className:`size-5 text-(--shell-text-secondary)`}),(0,H.jsxs)(`div`,{className:`flex items-center gap-4 text-(--shell-text-secondary)`,children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,H.jsx)(Jz,{className:`h-3.5 w-14`}),(0,H.jsx)(Jz,{className:`h-3.5 w-9`}),(0,H.jsx)(Nz,{className:`size-3`})]}),(0,H.jsx)(Bz,{className:`size-5`}),(0,H.jsx)(Pz,{className:`size-5`})]})]})]})}var Qz=[`w-[80%]`,`w-[65%]`,`w-[74%]`,`w-[58%]`,`w-[70%]`,`w-[62%]`];function $z({children:e}){let t=ds(e=>e.theme),n=ds(e=>e.displayMode),r=ds(e=>e.setPreference),i=ms(),a=n===`fullscreen`,[o,s]=(0,b.useState)(!1),c=(0,b.useRef)(null),l=(0,b.useRef)(null);return(0,b.useEffect)(()=>{let e=c.current,t=l.current;if(!e||!t)return;let n=()=>{e.scrollTop=e.scrollHeight};n();let r=new ResizeObserver(n);r.observe(t);let i=()=>r.disconnect(),a=[`wheel`,`touchstart`,`pointerdown`];for(let t of a)e.addEventListener(t,i,{once:!0,passive:!0});return()=>{r.disconnect();for(let t of a)e.removeEventListener(t,i)}},[]),(0,H.jsxs)(`div`,{className:`@container/shell relative isolate flex h-full w-full overflow-hidden bg-(--shell-surface) text-(--shell-text)`,style:{fontFamily:Kz,...qz[t]},children:[(0,H.jsx)(`style`,{children:cz}),(0,H.jsx)(`aside`,{"aria-hidden":!0,className:lN(`h-full w-[288px] shrink-0 cursor-not-allowed border-(--shell-border) border-r bg-(--shell-sidebar) @max-[640px]/shell:hidden`,(o||i)&&`hidden`),children:(0,H.jsxs)(`div`,{className:`flex h-full flex-col px-2 pb-2`,children:[(0,H.jsxs)(`div`,{className:`flex h-11 shrink-0 items-center justify-between px-2`,children:[(0,H.jsx)(Fz,{className:`h-5`}),(0,H.jsxs)(`div`,{className:`flex items-center gap-1 text-[#7b7974]`,children:[(0,H.jsx)(`button`,{type:`button`,"aria-label":`Collapse sidebar`,onClick:()=>s(!0),className:`flex size-7 cursor-pointer items-center justify-center rounded-md transition-colors hover:bg-[color-mix(in_oklab,var(--shell-text)_5%,transparent)]`,children:(0,H.jsx)(Gz,{className:`size-4`})}),(0,H.jsx)(`div`,{className:`flex size-7 items-center justify-center`,children:(0,H.jsx)(Wz,{className:`size-4`})})]})]}),(0,H.jsxs)(`div`,{className:`mb-2 flex h-8 shrink-0 rounded-lg bg-(--shell-segment-bg) p-px`,children:[(0,H.jsxs)(`div`,{className:`flex flex-[1.1] items-center justify-center gap-1.5 rounded-[7px] bg-(--shell-segment-active) text-(--shell-text) text-sm shadow-[inset_0_0_0_0.5px_rgba(11,11,11,0.1),0_1px_2px_rgba(0,0,0,0.06),0_2px_6px_-1px_rgba(0,0,0,0.05)]`,children:[(0,H.jsx)(zz,{className:`size-4`}),(0,H.jsx)(`span`,{children:`Home`})]}),(0,H.jsxs)(`div`,{className:`flex flex-1 items-center justify-center gap-1.5 text-(--shell-text-tertiary) text-sm`,children:[(0,H.jsx)(Iz,{className:`size-4`}),(0,H.jsx)(`span`,{children:`Code`})]})]}),(0,H.jsxs)(`div`,{className:`flex h-8 shrink-0 items-center gap-2 rounded-lg px-1.5 text-(--shell-nav-text) text-sm`,children:[(0,H.jsx)(Vz,{className:`size-4`}),(0,H.jsx)(`span`,{children:`New`})]}),[{icon:Mz,label:`Chats and tasks`},{icon:Hz,label:`Projects`},{icon:Az,label:`Artifacts`},{icon:Uz,label:`Scheduled`},{icon:Lz,label:`Customize`}].map(({icon:e,label:t})=>(0,H.jsxs)(`div`,{className:`flex h-8 shrink-0 items-center gap-2 px-1.5 text-(--shell-nav-text) text-sm`,children:[(0,H.jsx)(e,{className:`size-5`}),(0,H.jsx)(`span`,{children:t})]},t)),(0,H.jsx)(`div`,{className:`mt-5 mb-1 px-1.5 text-(--shell-text-tertiary) text-xs`,children:`Pinned`}),(0,H.jsxs)(`div`,{className:`flex h-8 shrink-0 items-center gap-2 px-1.5`,children:[(0,H.jsx)(jz,{className:`size-5 shrink-0 text-(--shell-icon-muted)`}),(0,H.jsx)(Jz,{className:`h-3.5 w-32`})]}),(0,H.jsxs)(`div`,{className:`mt-5 mb-1 flex items-center justify-between px-1.5`,children:[(0,H.jsx)(`span`,{className:`text-(--shell-text-tertiary) text-xs`,children:`Recents`}),(0,H.jsx)(Ci,{className:`size-3.5 text-(--shell-text-tertiary)`})]}),Qz.map(e=>(0,H.jsxs)(`div`,{className:`flex h-8 shrink-0 items-center gap-2 px-1.5`,children:[(0,H.jsx)(jz,{className:`size-5 shrink-0 text-(--shell-icon-muted)`}),(0,H.jsx)(Jz,{className:lN(`h-3.5`,e)})]},e)),(0,H.jsxs)(`div`,{className:`mt-auto flex shrink-0 flex-col`,children:[(0,H.jsxs)(`div`,{className:`flex h-10 items-center gap-2.5 border-(--shell-border) border-t px-1.5 text-(--shell-nav-text) text-sm`,children:[(0,H.jsx)(Rz,{className:`size-5`}),(0,H.jsx)(`span`,{children:`Design`})]}),(0,H.jsxs)(`div`,{className:`flex h-11 items-center gap-2.5 border-(--shell-border) border-t px-1.5`,children:[(0,H.jsx)(Jz,{className:`size-7 rounded-full`}),(0,H.jsx)(Jz,{className:`h-3.5 w-24`})]})]})]})}),(0,H.jsxs)(`div`,{className:`relative flex h-full min-w-0 flex-1 flex-col`,children:[i&&!a&&(0,H.jsx)(Yz,{}),o&&!i&&(0,H.jsx)(`button`,{type:`button`,"aria-label":`Expand sidebar`,onClick:()=>s(!1),className:`absolute top-2 left-2 z-40 flex size-8 cursor-pointer items-center justify-center rounded-md text-[#7b7974] transition-colors hover:bg-[color-mix(in_oklab,var(--shell-text)_5%,transparent)]`,children:(0,H.jsx)(Gz,{className:`size-4`})}),(0,H.jsx)(`div`,{ref:c,className:`min-h-0 flex-1 overflow-y-auto [container-type:size]`,children:(0,H.jsxs)(`div`,{ref:l,className:lN(`mx-auto flex w-full max-w-[720px] flex-col px-4 pt-6 pb-24`,a&&`h-full max-w-none px-5 pt-2 pb-4`,a&&o&&!i&&`pl-12`),children:[[[`w-[92%]`,`w-[80%]`,`w-[55%]`],[`w-[88%]`,`w-[76%]`,`w-[50%]`]].map((e,t)=>(0,H.jsxs)(`div`,{className:lN(`flex flex-col`,a&&`hidden`,t>0&&`mt-10`),children:[(0,H.jsx)(`div`,{className:`h-16 w-[55%] self-end rounded-xl bg-[color-mix(in_oklab,var(--shell-text)_5%,transparent)] motion-safe:animate-pulse`}),(0,H.jsx)(`div`,{className:`mt-6 flex flex-col gap-3`,children:e.map(e=>(0,H.jsx)(Jz,{className:lN(`h-4`,e)},e))})]},e[0])),(0,H.jsx)(`div`,{className:lN(`mt-10 h-12 w-[45%] self-end rounded-xl bg-[color-mix(in_oklab,var(--shell-text)_5%,transparent)] motion-safe:animate-pulse`,a&&`hidden`)}),(0,H.jsx)(Jz,{className:lN(`mt-6 h-4 w-40`,a&&`hidden`)}),(0,H.jsxs)(`div`,{className:lN(`relative mt-3 w-full`,!a&&!i&&`-mx-4 w-[calc(100%+2rem)]`,a&&`mt-0 flex min-h-0 flex-1 flex-col overflow-hidden rounded-2xl border border-(--shell-border) bg-(--shell-panel)`),children:[a?(0,H.jsxs)(`div`,{className:`flex h-14 shrink-0 items-center gap-2.5 border-(--shell-border) border-b px-4`,children:[(0,H.jsx)(`div`,{className:`flex size-7 items-center justify-center rounded-lg border border-(--shell-border) bg-(--shell-segment-active)`,children:(0,H.jsx)(Jz,{className:`size-3.5 rounded`})}),(0,H.jsx)(Jz,{className:`h-4 w-44`}),(0,H.jsx)(`button`,{type:`button`,"aria-label":`Exit fullscreen`,onClick:()=>r(`displayMode`,`inline`),className:`ml-auto flex size-8 cursor-pointer items-center justify-center rounded-lg bg-(--shell-btn-bg) text-(--shell-text) transition-colors hover:bg-[color-mix(in_oklab,var(--shell-text)_10%,transparent)]`,children:(0,H.jsx)(Cz,{className:`size-4.5`})})]}):null,(0,H.jsx)(`div`,{className:lN(`w-full`,a&&`min-h-0 flex-1`),children:e??(0,H.jsx)(Jz,{className:`h-96 w-full rounded-2xl`})}),a&&!i?(0,H.jsx)(`div`,{className:`pointer-events-none absolute inset-x-0 bottom-4 mx-auto w-[min(680px,85%)]`,children:(0,H.jsxs)(`div`,{className:`flex min-h-[100px] flex-col justify-between rounded-[20px] border border-(--shell-composer-border) bg-(--shell-card) p-4 shadow-[0_4px_16px_rgba(0,0,0,0.08)]`,children:[(0,H.jsx)(`span`,{className:`text-(--shell-text-tertiary)`,children:`Write a message...`}),(0,H.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,H.jsx)(Vz,{className:`size-5 text-(--shell-text-secondary)`}),(0,H.jsxs)(`div`,{className:`flex items-center gap-4 text-(--shell-text-secondary)`,children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,H.jsx)(Jz,{className:`h-3.5 w-14`}),(0,H.jsx)(Jz,{className:`h-3.5 w-9`}),(0,H.jsx)(Nz,{className:`size-3`})]}),(0,H.jsx)(Bz,{className:`size-5`}),(0,H.jsx)(Pz,{className:`size-5`})]})]})]})}):null]}),(0,H.jsxs)(`div`,{className:lN(`mt-6 flex flex-col gap-3`,a&&`hidden`),children:[(0,H.jsx)(Jz,{className:`h-4 w-[95%]`}),(0,H.jsx)(Jz,{className:`h-4 w-[60%]`})]})]})}),(0,H.jsx)(`div`,{className:lN(`w-full shrink-0 cursor-not-allowed`,i?`px-2 pb-1`:`px-4 pb-5`,a&&`hidden`),children:(0,H.jsx)(`div`,{className:`mx-auto w-full max-w-[768px]`,children:i?(0,H.jsx)(Xz,{}):(0,H.jsx)(Zz,{})})})]})]})}var eB=24,tB=44,nB={light:{backdrop:`#e8e8e6`,label:`#6f6f6f`},dark:{backdrop:`#111110`,label:`#8f8f8f`}},rB=({theme:e,children:t})=>{let n=(0,b.useRef)(null),[r,i]=(0,b.useState)(1);return(0,b.useLayoutEffect)(()=>{let e=n.current;if(!e)return;let t=()=>{let{width:t,height:n}=e.getBoundingClientRect();i(Math.min(1,(t-eB)/mN.width,(n-tB)/mN.height))};t();let r=new ResizeObserver(t);return r.observe(e),()=>r.disconnect()},[]),(0,H.jsxs)(`div`,{ref:n,className:`flex h-full min-h-0 w-full flex-col items-center justify-center overflow-hidden`,style:{backgroundColor:nB[e].backdrop},children:[(0,H.jsxs)(`div`,{className:`pb-1.5 font-mono text-xs`,style:{color:nB[e].label},children:[mN.width,` × `,mN.height]}),(0,H.jsx)(`div`,{style:{width:mN.width*r,height:mN.height*r},children:(0,H.jsx)(`div`,{className:`overflow-hidden shadow-[0_2px_16px_rgba(0,0,0,0.2)]`,style:{width:mN.width,height:mN.height,transform:`scale(${r})`,transformOrigin:`top left`},children:t})})]})},iB=()=>{let e=ZD(),t=xD(e?.name??``),n=ds(e=>e.previewClient),r=ds(e=>e.theme),i=ms(),a=e?._meta?.ui?.resourceUri,o=!!(e&&t?.response&&a),s=(0,H.jsx)(n===`claude`?$z:kz,{children:o?(0,H.jsx)(b.Suspense,{fallback:null,children:(0,H.jsx)(gz,{})}):null});return(0,H.jsxs)(`div`,{className:`flex h-full min-h-0 w-full flex-col`,children:[(0,H.jsxs)(`div`,{className:`flex h-11 shrink-0 items-center gap-3 bg-primary px-3 text-primary-foreground`,children:[(0,H.jsx)(`span`,{className:`font-medium text-xs`,children:`Preview mode`}),(0,H.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,H.jsx)(iz,{variant:`preview`})})]}),(0,H.jsx)(`div`,{className:`min-h-0 flex-1`,children:i?(0,H.jsx)(rB,{theme:r,children:s}):s})]})},aB=function(e){return function(t,n){var r=(0,b.useRef)(!1);e(function(){return function(){r.current=!1}},[]),e(function(){if(!r.current)r.current=!0;else return t()},n)}},oB=function(e){return typeof e==`function`},sB=function(e){return typeof e==`string`},cB=function(e){return typeof e==`number`},lB=function(e){return e===void 0},uB=function(e){var t=(0,b.useRef)(e);t.current=(0,b.useMemo)(function(){return e},[e]);var n=(0,b.useRef)(void 0);return n.current||=function(){var e=[...arguments];return t.current.apply(this,e)},n.current},dB=aB(b.useEffect);function fB(e,t){if(e===t)return!0;for(var n=0;n<e.length;n++)if(!Object.is(e[n],t[n]))return!1;return!0}function pB(e){var t=(0,b.useRef)(e);return t.current=e,t}var mB=function(e){var t=pB(e);(0,b.useEffect)(function(){return function(){t.current()}},[])},hB=!!(typeof window<`u`&&window.document&&window.document.createElement);function gB(e,t){if(hB)return e?oB(e)?e():`current`in e?e.current:e:t}var _B=function(e){return function(t,n,r){var i=(0,b.useRef)(!1),a=(0,b.useRef)([]),o=(0,b.useRef)([]),s=(0,b.useRef)(void 0);e(function(){var e,c=(Array.isArray(r)?r:[r]).map(function(e){return gB(e)});if(!i.current){i.current=!0,a.current=c,o.current=n,s.current=t();return}(c.length!==a.current.length||!fB(a.current,c)||!fB(o.current,n))&&((e=s.current)==null||e.call(s),a.current=c,o.current=n,s.current=t())}),mB(function(){var e;(e=s.current)==null||e.call(s),i.current=!1})}}(b.useEffect),vB=u(s(((e,t)=>{var n=typeof Element<`u`,r=typeof Map==`function`,i=typeof Set==`function`,a=typeof ArrayBuffer==`function`&&!!ArrayBuffer.isView;function o(e,t){if(e===t)return!0;if(e&&t&&typeof e==`object`&&typeof t==`object`){if(e.constructor!==t.constructor)return!1;var s,c,l;if(Array.isArray(e)){if(s=e.length,s!=t.length)return!1;for(c=s;c--!==0;)if(!o(e[c],t[c]))return!1;return!0}var u;if(r&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(u=e.entries();!(c=u.next()).done;)if(!t.has(c.value[0]))return!1;for(u=e.entries();!(c=u.next()).done;)if(!o(c.value[1],t.get(c.value[0])))return!1;return!0}if(i&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(u=e.entries();!(c=u.next()).done;)if(!t.has(c.value[0]))return!1;return!0}if(a&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(s=e.length,s!=t.length)return!1;for(c=s;c--!==0;)if(e[c]!==t[c])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&typeof e.valueOf==`function`&&typeof t.valueOf==`function`)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&typeof e.toString==`function`&&typeof t.toString==`function`)return e.toString()===t.toString();if(l=Object.keys(e),s=l.length,s!==Object.keys(t).length)return!1;for(c=s;c--!==0;)if(!Object.prototype.hasOwnProperty.call(t,l[c]))return!1;if(n&&e instanceof Element)return!1;for(c=s;c--!==0;)if(!((l[c]===`_owner`||l[c]===`__v`||l[c]===`__o`)&&e.$$typeof)&&!o(e[l[c]],t[l[c]]))return!1;return!0}return e!==e&&t!==t}t.exports=function(e,t){try{return o(e,t)}catch(e){if((e.message||``).match(/stack|recursion/i))return console.warn(`react-fast-compare cannot handle circular refs`),!1;throw e}}}))()),yB=function(e,t){return e===void 0&&(e=[]),t===void 0&&(t=[]),(0,vB.default)(e,t)};function bB(e,t,n){n===void 0&&(n={});var r=n.enable,i=r===void 0||r,a=pB(t);_B(function(){if(i){var t=gB(n.target,window);if(t?.addEventListener){var r=function(e){return a.current(e)},o=Array.isArray(e)?e:[e];return o.forEach(function(e){t.addEventListener(e,r,{capture:n.capture,once:n.once,passive:n.passive})}),function(){o.forEach(function(e){t.removeEventListener(e,r,{capture:n.capture})})}}}},[e,n.capture,n.once,n.passive,i],n.target)}var xB=function(e,t,n){var r=(0,b.useRef)(void 0),i=(0,b.useRef)(0);yB(t,r.current)||(i.current+=1),r.current=t,_B(e,[i.current],n)},SB={0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,backspace:8,tab:9,enter:13,shift:16,ctrl:17,control:17,alt:18,pausebreak:19,pause:19,capslock:20,esc:27,escape:27,space:32,spacebar:32,pageup:33,pagedown:34,end:35,home:36,leftarrow:37,arrowleft:37,uparrow:38,arrowup:38,rightarrow:39,arrowright:39,downarrow:40,arrowdown:40,insert:45,delete:46,a:65,b:66,c:67,d:68,e:69,f:70,g:71,h:72,i:73,j:74,k:75,l:76,m:77,n:78,o:79,p:80,q:81,r:82,s:83,t:84,u:85,v:86,w:87,x:88,y:89,z:90,leftwindowkey:91,rightwindowkey:92,meta:/(mac|iphone|ipod|ipad)/i.test(typeof navigator<`u`?navigator==null?void 0:navigator.platform:``)?[91,93]:[91,92],selectkey:93,contextmenu:93,numpad0:96,numpad1:97,numpad2:98,numpad3:99,numpad4:100,numpad5:101,numpad6:102,numpad7:103,numpad8:104,numpad9:105,multiply:106,add:107,subtract:109,decimalpoint:110,divide:111,f1:112,f2:113,f3:114,f4:115,f5:116,f6:117,f7:118,f8:119,f9:120,f10:121,f11:122,f12:123,numlock:144,scrolllock:145,semicolon:186,equalsign:187,comma:188,dash:189,period:190,forwardslash:191,graveaccent:192,openbracket:219,backslash:220,closebracket:221,singlequote:222},CB={ctrl:function(e){return e.ctrlKey},shift:function(e){return e.shiftKey},alt:function(e){return e.altKey},meta:function(e){return e.type===`keyup`?SB.meta.includes(e.keyCode):e.metaKey}};function wB(e){return sB(e)||cB(e)}function TB(e){var t=Object.keys(CB).reduce(function(t,n){return CB[n](e)?t+1:t},0);return[16,17,18,91,92].includes(e.keyCode)?t:t+1}function EB(e,t,n){var r,i;if(!e.key)return!1;if(cB(t))return e.keyCode===t&&t;var a=t.split(`.`),o=0;try{for(var s=vj(a),c=s.next();!c.done;c=s.next()){var l=c.value,u=CB[l],d=SB[l.toLowerCase()];(u&&u(e)||d&&d===e.keyCode)&&o++}}catch(e){r={error:e}}finally{try{c&&!c.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}return n?o===a.length&&TB(e)===a.length&&t:o===a.length&&t}function DB(e,t){return oB(e)?e:wB(e)?function(n){return EB(n,e,t)}:Array.isArray(e)?function(n){return e.find(function(e){return EB(n,e,t)})}:function(){return!!e}}var OB=[`keydown`];function kB(e,t,n){var r=n||{},i=r.events,a=i===void 0?OB:i,o=r.target,s=r.exactMatch,c=s!==void 0&&s,l=r.useCapture,u=l!==void 0&&l,d=pB(t),f=pB(e);xB(function(){var e,t,n,r=gB(o,window);if(r){var i=function(e){var t=e,n=DB(f.current,c)(t),r=wB(n)?n:t.key;if(n)return d.current?.call(d,t,r)};try{for(var s=vj(a),l=s.next();!l.done;l=s.next()){var p=l.value;(n=r?.addEventListener)==null||n.call(r,p,i,u)}}catch(t){e={error:t}}finally{try{l&&!l.done&&(t=s.return)&&t.call(s)}finally{if(e)throw e.error}}return function(){var e,t,n;try{for(var o=vj(a),s=o.next();!s.done;s=o.next()){var c=s.value;(n=r?.removeEventListener)==null||n.call(r,c,i,u)}}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}}}},[a],o)}var AB=`AHOOKS_SYNC_STORAGE_EVENT_NAME`,jB=function(e){return function(t,n){n===void 0&&(n={});var r,i=n.listenStorageChange,a=i!==void 0&&i,o=oB(n.serializer)?n.serializer:JSON.stringify,s=oB(n.deserializer)?n.deserializer:JSON.parse,c=oB(n.onError)?n.onError:console.error;try{r=e()}catch(e){c(e)}var l=function(){try{var e=r?.getItem(t);if(e)return s(e)}catch(e){c(e)}return oB(n.defaultValue)?n.defaultValue():n.defaultValue},u=yj((0,b.useState)(l),2),d=u[0],f=u[1],p=(0,b.useRef)(d);p.current=d,dB(function(){var e=l();Object.is(e,p.current)||(p.current=e,f(e))},[t]);var m=function(e){var n=p.current,i=oB(e)?e(n):e;if(!Object.is(i,n)){a||(p.current=i,f(i));try{var s=void 0,l=r?.getItem(t);lB(i)?(s=null,r?.removeItem(t)):(s=o(i),r?.setItem(t,s)),dispatchEvent(new CustomEvent(AB,{detail:{key:t,newValue:s,oldValue:l,storageArea:r}}))}catch(e){c(e)}}},h=function(e){if(!(e.key!==t||e.storageArea!==r)){var n=l();Object.is(n,p.current)||(p.current=n,f(n))}};return bB(`storage`,h,{enable:a}),bB(AB,function(e){h(e.detail)},{enable:a}),[d,uB(m)]}}(function(){return hB?localStorage:void 0}),MB=function(e,t){var n=uB(e),r=(0,b.useRef)(null),i=(0,b.useCallback)(function(){r.current&&clearTimeout(r.current)},[]);return(0,b.useEffect)(function(){if(!(!cB(t)||t<0))return r.current=setTimeout(n,t),i},[t]),i},NB=Ni(`inline-flex items-center justify-center rounded-full border font-medium whitespace-nowrap shrink-0 [&>svg]:shrink-0 [&>svg]:pointer-events-none`,{variants:{variant:{secondary:`border-border bg-background text-muted-foreground`,primary:`border-transparent bg-primary text-primary-foreground`,success:`border-badge-success/30 bg-badge-success/10 text-badge-success`,warning:`border-badge-warning/30 bg-badge-warning/10 text-badge-warning`,error:`border-badge-error/30 bg-badge-error/10 text-badge-error`},size:{sm:`px-1.5 py-px gap-0.5 type-text-xs [&>svg]:size-2.5`,md:`px-[9px] py-0.5 gap-1 type-text-sm [&>svg]:size-3`}},defaultVariants:{variant:`secondary`,size:`md`}});function PB({className:e,variant:t,size:n,children:r,...i}){return(0,H.jsx)(`span`,{className:Mr(NB({variant:t,size:n}),e),...i,children:r})}var FB=new Intl.NumberFormat(`en`,{notation:`compact`,maximumFractionDigits:1}),IB=e=>`skybridge-devtools-dismissed-${e}-warning`,LB={"tool-output":{badge:`Large response`,title:`Large model-visible output`,description:`Content and structured content count toward this estimate. Large responses can consume significant context or exceed limits in some clients and models.`},"view-state":{badge:`Large context`,title:`Large model-visible view state`,description:`Persisted view state and data-llm context count toward this estimate. Keep only content the model needs.`}};function RB({kind:e}){return(0,H.jsx)(PB,{size:`sm`,variant:`warning`,children:LB[e].badge})}function zB({kind:e,tokenCount:t}){let n=LB[e],[r,i]=(0,b.useState)(()=>sessionStorage.getItem(IB(e))===`true`);return r?null:(0,H.jsxs)(`div`,{className:`relative shrink-0`,children:[(0,H.jsx)(iO,{className:`rounded-none border-x-0 border-t-0 py-2 pl-3 pr-10`,title:`${n.title} (~${FB.format(t)} tokens)`,description:n.description}),(0,H.jsx)(`button`,{type:`button`,"aria-label":`Dismiss ${n.badge.toLowerCase()} warning for this session`,onClick:()=>{sessionStorage.setItem(IB(e),`true`),i(!0)},className:`absolute right-2 top-2 inline-flex size-6 cursor-pointer items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-badge-warning/10 hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring`,children:(0,H.jsx)(Ai,{className:`size-3.5`})})]})}function BB(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function VB(e,t){if(e==null)return{};var n,r,i=BB(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function HB(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function UB(e){if(Array.isArray(e))return HB(e)}function WB(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function GB(e,t){if(e){if(typeof e==`string`)return HB(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?HB(e,t):void 0}}function KB(){throw TypeError(`Invalid attempt to spread non-iterable instance.
203
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qB(e){return UB(e)||WB(e)||GB(e)||KB()}function JB(e){"@babel/helpers - typeof";return JB=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},JB(e)}function YB(e,t){if(JB(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(JB(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function XB(e){var t=YB(e,`string`);return JB(t)==`symbol`?t:t+``}function ZB(e,t,n){return(t=XB(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function QB(){return QB=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},QB.apply(null,arguments)}function $B(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function eV(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?$B(Object(n),!0).forEach(function(t){ZB(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$B(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function tV(e){var t=e.length;if(t===0||t===1)return e;if(t===2)return[e[0],e[1],`${e[0]}.${e[1]}`,`${e[1]}.${e[0]}`];if(t===3)return[e[0],e[1],e[2],`${e[0]}.${e[1]}`,`${e[0]}.${e[2]}`,`${e[1]}.${e[0]}`,`${e[1]}.${e[2]}`,`${e[2]}.${e[0]}`,`${e[2]}.${e[1]}`,`${e[0]}.${e[1]}.${e[2]}`,`${e[0]}.${e[2]}.${e[1]}`,`${e[1]}.${e[0]}.${e[2]}`,`${e[1]}.${e[2]}.${e[0]}`,`${e[2]}.${e[0]}.${e[1]}`,`${e[2]}.${e[1]}.${e[0]}`];if(t>=4)return[e[0],e[1],e[2],e[3],`${e[0]}.${e[1]}`,`${e[0]}.${e[2]}`,`${e[0]}.${e[3]}`,`${e[1]}.${e[0]}`,`${e[1]}.${e[2]}`,`${e[1]}.${e[3]}`,`${e[2]}.${e[0]}`,`${e[2]}.${e[1]}`,`${e[2]}.${e[3]}`,`${e[3]}.${e[0]}`,`${e[3]}.${e[1]}`,`${e[3]}.${e[2]}`,`${e[0]}.${e[1]}.${e[2]}`,`${e[0]}.${e[1]}.${e[3]}`,`${e[0]}.${e[2]}.${e[1]}`,`${e[0]}.${e[2]}.${e[3]}`,`${e[0]}.${e[3]}.${e[1]}`,`${e[0]}.${e[3]}.${e[2]}`,`${e[1]}.${e[0]}.${e[2]}`,`${e[1]}.${e[0]}.${e[3]}`,`${e[1]}.${e[2]}.${e[0]}`,`${e[1]}.${e[2]}.${e[3]}`,`${e[1]}.${e[3]}.${e[0]}`,`${e[1]}.${e[3]}.${e[2]}`,`${e[2]}.${e[0]}.${e[1]}`,`${e[2]}.${e[0]}.${e[3]}`,`${e[2]}.${e[1]}.${e[0]}`,`${e[2]}.${e[1]}.${e[3]}`,`${e[2]}.${e[3]}.${e[0]}`,`${e[2]}.${e[3]}.${e[1]}`,`${e[3]}.${e[0]}.${e[1]}`,`${e[3]}.${e[0]}.${e[2]}`,`${e[3]}.${e[1]}.${e[0]}`,`${e[3]}.${e[1]}.${e[2]}`,`${e[3]}.${e[2]}.${e[0]}`,`${e[3]}.${e[2]}.${e[1]}`,`${e[0]}.${e[1]}.${e[2]}.${e[3]}`,`${e[0]}.${e[1]}.${e[3]}.${e[2]}`,`${e[0]}.${e[2]}.${e[1]}.${e[3]}`,`${e[0]}.${e[2]}.${e[3]}.${e[1]}`,`${e[0]}.${e[3]}.${e[1]}.${e[2]}`,`${e[0]}.${e[3]}.${e[2]}.${e[1]}`,`${e[1]}.${e[0]}.${e[2]}.${e[3]}`,`${e[1]}.${e[0]}.${e[3]}.${e[2]}`,`${e[1]}.${e[2]}.${e[0]}.${e[3]}`,`${e[1]}.${e[2]}.${e[3]}.${e[0]}`,`${e[1]}.${e[3]}.${e[0]}.${e[2]}`,`${e[1]}.${e[3]}.${e[2]}.${e[0]}`,`${e[2]}.${e[0]}.${e[1]}.${e[3]}`,`${e[2]}.${e[0]}.${e[3]}.${e[1]}`,`${e[2]}.${e[1]}.${e[0]}.${e[3]}`,`${e[2]}.${e[1]}.${e[3]}.${e[0]}`,`${e[2]}.${e[3]}.${e[0]}.${e[1]}`,`${e[2]}.${e[3]}.${e[1]}.${e[0]}`,`${e[3]}.${e[0]}.${e[1]}.${e[2]}`,`${e[3]}.${e[0]}.${e[2]}.${e[1]}`,`${e[3]}.${e[1]}.${e[0]}.${e[2]}`,`${e[3]}.${e[1]}.${e[2]}.${e[0]}`,`${e[3]}.${e[2]}.${e[0]}.${e[1]}`,`${e[3]}.${e[2]}.${e[1]}.${e[0]}`]}var nV={};function rV(e){if(e.length===0||e.length===1)return e;var t=e.join(`.`);return nV[t]||(nV[t]=tV(e)),nV[t]}function iV(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return rV(e.filter(function(e){return e!==`token`})).reduce(function(e,t){return eV(eV({},e),n[t])},t)}function aV(e){return e.join(` `)}function oV(e,t){var n=0;return function(r){return n+=1,r.map(function(r,i){return sV({node:r,stylesheet:e,useInlineStyles:t,key:`code-segment-${n}-${i}`})})}}function sV(e){var t=e.node,n=e.stylesheet,r=e.style,i=r===void 0?{}:r,a=e.useInlineStyles,o=e.key,s=t.properties,c=t.type,l=t.tagName,u=t.value;if(c===`text`)return u;if(l){var d=oV(n,a),f;if(!a)f=eV(eV({},s),{},{className:aV(s.className)});else{var p=Object.keys(n).reduce(function(e,t){return t.split(`.`).forEach(function(t){e.includes(t)||e.push(t)}),e},[]),m=s.className&&s.className.includes(`token`)?[`token`]:[],h=s.className&&m.concat(s.className.filter(function(e){return!p.includes(e)}));f=eV(eV({},s),{},{className:aV(h)||void 0,style:iV(s.className,Object.assign({},s.style,i),n)})}var g=d(t.children);return b.createElement(l,QB({key:o},f),g)}}var cV=(function(e,t){return e.listLanguages().indexOf(t)!==-1}),lV=[`language`,`children`,`style`,`customStyle`,`codeTagProps`,`useInlineStyles`,`showLineNumbers`,`showInlineLineNumbers`,`startingLineNumber`,`lineNumberContainerStyle`,`lineNumberStyle`,`wrapLines`,`wrapLongLines`,`lineProps`,`renderer`,`PreTag`,`CodeTag`,`code`,`astGenerator`];function uV(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function dV(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?uV(Object(n),!0).forEach(function(t){ZB(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uV(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var fV=/\n/g;function pV(e){return e.match(fV)}function mV(e){var t=e.lines,n=e.startingLineNumber,r=e.style;return t.map(function(e,t){var i=t+n;return b.createElement(`span`,{key:`line-${t}`,className:`react-syntax-highlighter-line-number`,style:typeof r==`function`?r(i):r},`${i}
204
+ `)})}function hV(e){var t=e.codeString,n=e.codeStyle,r=e.containerStyle,i=r===void 0?{float:`left`,paddingRight:`10px`}:r,a=e.numberStyle,o=a===void 0?{}:a,s=e.startingLineNumber;return b.createElement(`code`,{style:Object.assign({},n,i)},mV({lines:t.replace(/\n$/,``).split(`
205
+ `),style:o,startingLineNumber:s}))}function gV(e){return`${e.toString().length}.25em`}function _V(e,t){return{type:`element`,tagName:`span`,properties:{key:`line-number--${e}`,className:[`comment`,`linenumber`,`react-syntax-highlighter-line-number`],style:t},children:[{type:`text`,value:e}]}}function vV(e,t,n){var r={display:`inline-block`,minWidth:gV(n),paddingRight:`1em`,textAlign:`right`,userSelect:`none`},i=typeof e==`function`?e(t):e;return dV(dV({},r),i)}function yV(e){var t=e.children,n=e.lineNumber,r=e.lineNumberStyle,i=e.largestLineNumber,a=e.showInlineLineNumbers,o=e.lineProps,s=o===void 0?{}:o,c=e.className,l=c===void 0?[]:c,u=e.showLineNumbers,d=e.wrapLongLines,f=e.wrapLines,p=f!==void 0&&f?dV({},typeof s==`function`?s(n):s):{};if(p.className=p.className?[].concat(qB(p.className.trim().split(/\s+/)),qB(l)):l,n&&a){var m=vV(r,n,i);t.unshift(_V(n,m))}return d&u&&(p.style=dV({display:`flex`},p.style)),{type:`element`,tagName:`span`,properties:p,children:t}}function bV(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];e.length===void 0&&(e=[e]);for(var r=0;r<e.length;r++){var i=e[r];if(i.type===`text`)n.push(yV({children:[i],className:qB(new Set(t))}));else if(i.children){var a=t.concat(i.properties?.className||[]);bV(i.children,a).forEach(function(e){return n.push(e)})}}return n}function xV(e,t,n,r,i,a,o,s,c){var l,u=bV(e.value),d=[],f=-1,p=0;function m(e,a){return yV({children:e,lineNumber:a,lineNumberStyle:s,largestLineNumber:o,showInlineLineNumbers:i,lineProps:n,className:arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],showLineNumbers:r,wrapLongLines:c,wrapLines:t})}function h(e,t){if(r&&t&&i){var n=vV(s,t,o);e.unshift(_V(t,n))}return e}function g(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];return t||r.length>0?m(e,n,r):h(e,n)}for(var _=function(){var e=u[p],t=e.children[0].value;if(pV(t)){var n=t.split(`
206
+ `);n.forEach(function(t,i){var o=r&&d.length+a,s={type:`text`,value:`${t}
207
+ `};if(i===0){var c=g(u.slice(f+1,p).concat(yV({children:[s],className:e.properties.className})),o);d.push(c)}else if(i===n.length-1){var l=u[p+1]&&u[p+1].children&&u[p+1].children[0],m={type:`text`,value:`${t}`};if(l){var h=yV({children:[m],className:e.properties.className});u.splice(p+1,0,h)}else{var _=g([m],o,e.properties.className);d.push(_)}}else{var v=g([s],o,e.properties.className);d.push(v)}}),f=p}p++};p<u.length;)_();if(f!==u.length-1){var v=u.slice(f+1,u.length);if(v&&v.length){var y=g(v,r&&d.length+a);d.push(y)}}return t?d:(l=[]).concat.apply(l,d)}function SV(e){var t=e.rows,n=e.stylesheet,r=e.useInlineStyles;return t.map(function(e,t){return sV({node:e,stylesheet:n,useInlineStyles:r,key:`code-segment-${t}`})})}function CV(e){return e&&e.highlightAuto!==void 0}function wV(e){var t=e.astGenerator,n=e.language,r=e.code,i=e.defaultCodeValue;if(CV(t)){var a=cV(t,n);return n===`text`?{value:i,language:`text`}:a?t.highlight(n,r):t.highlightAuto(r)}try{return n&&n!==`text`?{value:t.highlight(r,n)}:{value:i}}catch{return{value:i}}}function TV(e,t){return function(n){var r=n.language,i=n.children,a=n.style,o=a===void 0?t:a,s=n.customStyle,c=s===void 0?{}:s,l=n.codeTagProps,u=l===void 0?{className:r?`language-${r}`:void 0,style:dV(dV({},o[`code[class*="language-"]`]),o[`code[class*="language-${r}"]`])}:l,d=n.useInlineStyles,f=d===void 0||d,p=n.showLineNumbers,m=p!==void 0&&p,h=n.showInlineLineNumbers,g=h===void 0||h,_=n.startingLineNumber,v=_===void 0?1:_,y=n.lineNumberContainerStyle,x=n.lineNumberStyle,S=x===void 0?{}:x,C=n.wrapLines,w=n.wrapLongLines,T=w!==void 0&&w,E=n.lineProps,D=E===void 0?{}:E,O=n.renderer,k=n.PreTag,A=k===void 0?`pre`:k,j=n.CodeTag,M=j===void 0?`code`:j,N=n.code,P=N===void 0?(Array.isArray(i)?i[0]:i)||``:N,F=n.astGenerator,I=VB(n,lV);F||=e;var L=m?b.createElement(hV,{containerStyle:y,codeStyle:u.style||{},numberStyle:S,startingLineNumber:v,codeString:P}):null,ee=o.hljs||o[`pre[class*="language-"]`]||{backgroundColor:`#fff`},te=CV(F)?`hljs`:`prismjs`,ne=f?Object.assign({},I,{style:Object.assign({},ee,c)}):Object.assign({},I,{className:I.className?`${te} ${I.className}`:te,style:Object.assign({},c)});if(T?u.style=dV({whiteSpace:`pre-wrap`},u.style):u.style=dV({whiteSpace:`pre`},u.style),!F)return b.createElement(A,ne,L,b.createElement(M,u,P));(C===void 0&&O||T)&&(C=!0),O||=SV;var R=[{type:`text`,value:P}],z=wV({astGenerator:F,language:r,code:P,defaultCodeValue:R});z.language===null&&(z.value=R);var B=v+(P.match(/\n/g)?.length??0),re=xV(z,C,D,m,g,v,B,S,T);return b.createElement(A,ne,b.createElement(M,u,!g&&L,O({rows:re,stylesheet:o,useInlineStyles:f})))}}var EV=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};EV.prototype.normal={},EV.prototype.property={},EV.prototype.space=void 0;function DV(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new EV(n,r,t)}function OV(e){return e.toLowerCase()}var kV=class{constructor(e,t){this.attribute=t,this.property=e}};kV.prototype.attribute=``,kV.prototype.booleanish=!1,kV.prototype.boolean=!1,kV.prototype.commaOrSpaceSeparated=!1,kV.prototype.commaSeparated=!1,kV.prototype.defined=!1,kV.prototype.mustUseProperty=!1,kV.prototype.number=!1,kV.prototype.overloadedBoolean=!1,kV.prototype.property=``,kV.prototype.spaceSeparated=!1,kV.prototype.space=void 0;var AV=c({boolean:()=>MV,booleanish:()=>NV,commaOrSpaceSeparated:()=>LV,commaSeparated:()=>IV,number:()=>Z,overloadedBoolean:()=>PV,spaceSeparated:()=>FV}),jV=0,MV=RV(),NV=RV(),PV=RV(),Z=RV(),FV=RV(),IV=RV(),LV=RV();function RV(){return 2**++jV}var zV=Object.keys(AV),BV=class extends kV{constructor(e,t,n,r){let i=-1;if(super(e,t),VV(this,`space`,r),typeof n==`number`)for(;++i<zV.length;){let e=zV[i];VV(this,zV[i],(n&AV[e])===AV[e])}}};BV.prototype.defined=!0;function VV(e,t,n){n&&(e[t]=n)}function HV(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new BV(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[OV(r)]=r,n[OV(a.attribute)]=r}return new EV(t,n,e.space)}var UV=HV({properties:{ariaActiveDescendant:null,ariaAtomic:NV,ariaAutoComplete:null,ariaBusy:NV,ariaChecked:NV,ariaColCount:Z,ariaColIndex:Z,ariaColSpan:Z,ariaControls:FV,ariaCurrent:null,ariaDescribedBy:FV,ariaDetails:null,ariaDisabled:NV,ariaDropEffect:FV,ariaErrorMessage:null,ariaExpanded:NV,ariaFlowTo:FV,ariaGrabbed:NV,ariaHasPopup:null,ariaHidden:NV,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:FV,ariaLevel:Z,ariaLive:null,ariaModal:NV,ariaMultiLine:NV,ariaMultiSelectable:NV,ariaOrientation:null,ariaOwns:FV,ariaPlaceholder:null,ariaPosInSet:Z,ariaPressed:NV,ariaReadOnly:NV,ariaRelevant:null,ariaRequired:NV,ariaRoleDescription:FV,ariaRowCount:Z,ariaRowIndex:Z,ariaRowSpan:Z,ariaSelected:NV,ariaSetSize:Z,ariaSort:null,ariaValueMax:Z,ariaValueMin:Z,ariaValueNow:Z,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function WV(e,t){return t in e?e[t]:t}function GV(e,t){return WV(e,t.toLowerCase())}var KV=HV({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:IV,acceptCharset:FV,accessKey:FV,action:null,allow:null,allowFullScreen:MV,allowPaymentRequest:MV,allowUserMedia:MV,alt:null,as:null,async:MV,autoCapitalize:null,autoComplete:FV,autoFocus:MV,autoPlay:MV,blocking:FV,capture:null,charSet:null,checked:MV,cite:null,className:FV,cols:Z,colSpan:null,content:null,contentEditable:NV,controls:MV,controlsList:FV,coords:Z|IV,crossOrigin:null,data:null,dateTime:null,decoding:null,default:MV,defer:MV,dir:null,dirName:null,disabled:MV,download:PV,draggable:NV,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:MV,formTarget:null,headers:FV,height:Z,hidden:PV,high:Z,href:null,hrefLang:null,htmlFor:FV,httpEquiv:FV,id:null,imageSizes:null,imageSrcSet:null,inert:MV,inputMode:null,integrity:null,is:null,isMap:MV,itemId:null,itemProp:FV,itemRef:FV,itemScope:MV,itemType:FV,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:MV,low:Z,manifest:null,max:null,maxLength:Z,media:null,method:null,min:null,minLength:Z,multiple:MV,muted:MV,name:null,nonce:null,noModule:MV,noValidate:MV,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:MV,optimum:Z,pattern:null,ping:FV,placeholder:null,playsInline:MV,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:MV,referrerPolicy:null,rel:FV,required:MV,reversed:MV,rows:Z,rowSpan:Z,sandbox:FV,scope:null,scoped:MV,seamless:MV,selected:MV,shadowRootClonable:MV,shadowRootDelegatesFocus:MV,shadowRootMode:null,shape:null,size:Z,sizes:null,slot:null,span:Z,spellCheck:NV,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Z,step:null,style:null,tabIndex:Z,target:null,title:null,translate:null,type:null,typeMustMatch:MV,useMap:null,value:NV,width:Z,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:FV,axis:null,background:null,bgColor:null,border:Z,borderColor:null,bottomMargin:Z,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:MV,declare:MV,event:null,face:null,frame:null,frameBorder:null,hSpace:Z,leftMargin:Z,link:null,longDesc:null,lowSrc:null,marginHeight:Z,marginWidth:Z,noResize:MV,noHref:MV,noShade:MV,noWrap:MV,object:null,profile:null,prompt:null,rev:null,rightMargin:Z,rules:null,scheme:null,scrolling:NV,standby:null,summary:null,text:null,topMargin:Z,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Z,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:MV,disableRemotePlayback:MV,prefix:null,property:null,results:Z,security:null,unselectable:null},space:`html`,transform:GV}),qV=HV({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,dominantBaseline:`dominant-baseline`,enableBackground:`enable-background`,fillOpacity:`fill-opacity`,fillRule:`fill-rule`,floodColor:`flood-color`,floodOpacity:`flood-opacity`,fontFamily:`font-family`,fontSize:`font-size`,fontSizeAdjust:`font-size-adjust`,fontStretch:`font-stretch`,fontStyle:`font-style`,fontVariant:`font-variant`,fontWeight:`font-weight`,glyphName:`glyph-name`,glyphOrientationHorizontal:`glyph-orientation-horizontal`,glyphOrientationVertical:`glyph-orientation-vertical`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,renderingIntent:`rendering-intent`,shapeRendering:`shape-rendering`,stopColor:`stop-color`,stopOpacity:`stop-opacity`,strikethroughPosition:`strikethrough-position`,strikethroughThickness:`strikethrough-thickness`,strokeDashArray:`stroke-dasharray`,strokeDashOffset:`stroke-dashoffset`,strokeLineCap:`stroke-linecap`,strokeLineJoin:`stroke-linejoin`,strokeMiterLimit:`stroke-miterlimit`,strokeOpacity:`stroke-opacity`,strokeWidth:`stroke-width`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,underlinePosition:`underline-position`,underlineThickness:`underline-thickness`,unicodeBidi:`unicode-bidi`,unicodeRange:`unicode-range`,unitsPerEm:`units-per-em`,vAlphabetic:`v-alphabetic`,vHanging:`v-hanging`,vIdeographic:`v-ideographic`,vMathematical:`v-mathematical`,vectorEffect:`vector-effect`,vertAdvY:`vert-adv-y`,vertOriginX:`vert-origin-x`,vertOriginY:`vert-origin-y`,wordSpacing:`word-spacing`,writingMode:`writing-mode`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:LV,accentHeight:Z,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Z,amplitude:Z,arabicForm:null,ascent:Z,attributeName:null,attributeType:null,azimuth:Z,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Z,by:null,calcMode:null,capHeight:Z,className:FV,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Z,diffuseConstant:Z,direction:null,display:null,dur:null,divisor:Z,dominantBaseline:null,download:MV,dx:null,dy:null,edgeMode:null,editable:null,elevation:Z,enableBackground:null,end:null,event:null,exponent:Z,externalResourcesRequired:null,fill:null,fillOpacity:Z,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:IV,g2:IV,glyphName:IV,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Z,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Z,horizOriginX:Z,horizOriginY:Z,id:null,ideographic:Z,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Z,k:Z,k1:Z,k2:Z,k3:Z,k4:Z,kernelMatrix:LV,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Z,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Z,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Z,overlineThickness:Z,paintOrder:null,panose1:null,path:null,pathLength:Z,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:FV,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Z,pointsAtY:Z,pointsAtZ:Z,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:LV,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:LV,rev:LV,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:LV,requiredFeatures:LV,requiredFonts:LV,requiredFormats:LV,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Z,specularExponent:Z,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Z,strikethroughThickness:Z,string:null,stroke:null,strokeDashArray:LV,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Z,strokeOpacity:Z,strokeWidth:null,style:null,surfaceScale:Z,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:LV,tabIndex:Z,tableValues:null,target:null,targetX:Z,targetY:Z,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:LV,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Z,underlineThickness:Z,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Z,values:null,vAlphabetic:Z,vMathematical:Z,vectorEffect:null,vHanging:Z,vIdeographic:Z,version:null,vertAdvY:Z,vertOriginX:Z,vertOriginY:Z,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Z,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:WV}),JV=HV({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),YV=HV({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:GV}),XV=HV({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),ZV=/[A-Z]/g,QV=/-[a-z]/g,$V=/^data[-\w.:]+$/i;function eH(e,t){let n=OV(t),r=t,i=kV;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&$V.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(QV,nH);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!QV.test(e)){let n=e.replace(ZV,tH);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=BV}return new i(r,t)}function tH(e){return`-`+e.toLowerCase()}function nH(e){return e.charAt(1).toUpperCase()}var rH=DV([UV,KV,JV,YV,XV],`html`),iH=DV([UV,qV,JV,YV,XV],`svg`);function aH(e){let t=[],n=String(e||``),r=n.indexOf(`,`),i=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);let e=n.slice(i,r).trim();(e||!a)&&t.push(e),i=r+1,r=n.indexOf(`,`,i)}return t}var oH=/[#.]/g;function sH(e,t){let n=e||``,r={},i=0,a,o;for(;i<n.length;){oH.lastIndex=i;let e=oH.exec(n),t=n.slice(i,e?e.index:n.length);t&&(a?a===`#`?r.id=t:Array.isArray(r.className)?r.className.push(t):r.className=[t]:o=t,i+=t.length),e&&(a=e[0],i++)}return{type:`element`,tagName:o||t||`div`,properties:r,children:[]}}function cH(e){let t=String(e||``).trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function lH(e,t,n){let r=n?hH(n):void 0;function i(n,i,...a){let o;if(n==null){o={type:`root`,children:[]};let e=i;a.unshift(e)}else{o=sH(n,t);let s=o.tagName.toLowerCase(),c=r?r.get(s):void 0;if(o.tagName=c||s,uH(i))a.unshift(i);else for(let[t,n]of Object.entries(i))dH(e,o.properties,t,n)}for(let e of a)fH(o.children,e);return o.type===`element`&&o.tagName===`template`&&(o.content={type:`root`,children:o.children},o.children=[]),o}return i}function uH(e){if(typeof e!=`object`||!e||Array.isArray(e))return!0;if(typeof e.type!=`string`)return!1;let t=e,n=Object.keys(e);for(let e of n){let n=t[e];if(n&&typeof n==`object`){if(!Array.isArray(n))return!0;let e=n;for(let t of e)if(typeof t!=`number`&&typeof t!=`string`)return!0}}return!!(`children`in e&&Array.isArray(e.children))}function dH(e,t,n,r){let i=eH(e,n),a;if(r!=null){if(typeof r==`number`){if(Number.isNaN(r))return;a=r}else a=typeof r==`boolean`?r:typeof r==`string`?i.spaceSeparated?cH(r):i.commaSeparated?aH(r):i.commaOrSpaceSeparated?cH(aH(r).join(` `)):pH(i,i.property,r):Array.isArray(r)?[...r]:i.property===`style`?mH(r):String(r);if(Array.isArray(a)){let e=[];for(let t of a)e.push(pH(i,i.property,t));a=e}i.property===`className`&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[i.property]=a}}function fH(e,t){if(t!=null)if(typeof t==`number`||typeof t==`string`)e.push({type:`text`,value:String(t)});else if(Array.isArray(t))for(let n of t)fH(e,n);else if(typeof t==`object`&&`type`in t)t.type===`root`?fH(e,t.children):e.push(t);else throw Error("Expected node, nodes, or string, got `"+t+"`")}function pH(e,t,n){if(typeof n==`string`){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===``||OV(n)===OV(t)))return!0}return n}function mH(e){let t=[];for(let[n,r]of Object.entries(e))t.push([n,r].join(`: `));return t.join(`; `)}function hH(e){let t=new Map;for(let n of e)t.set(n.toLowerCase(),n);return t}var gH=`altGlyph.altGlyphDef.altGlyphItem.animateColor.animateMotion.animateTransform.clipPath.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feDropShadow.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.foreignObject.glyphRef.linearGradient.radialGradient.solidColor.textArea.textPath`.split(`.`),_H=lH(rH,`div`);lH(iH,`g`,gH);var vH=`AElig.AMP.Aacute.Acirc.Agrave.Aring.Atilde.Auml.COPY.Ccedil.ETH.Eacute.Ecirc.Egrave.Euml.GT.Iacute.Icirc.Igrave.Iuml.LT.Ntilde.Oacute.Ocirc.Ograve.Oslash.Otilde.Ouml.QUOT.REG.THORN.Uacute.Ucirc.Ugrave.Uuml.Yacute.aacute.acirc.acute.aelig.agrave.amp.aring.atilde.auml.brvbar.ccedil.cedil.cent.copy.curren.deg.divide.eacute.ecirc.egrave.eth.euml.frac12.frac14.frac34.gt.iacute.icirc.iexcl.igrave.iquest.iuml.laquo.lt.macr.micro.middot.nbsp.not.ntilde.oacute.ocirc.ograve.ordf.ordm.oslash.otilde.ouml.para.plusmn.pound.quot.raquo.reg.sect.shy.sup1.sup2.sup3.szlig.thorn.times.uacute.ucirc.ugrave.uml.uuml.yacute.yen.yuml`.split(`.`),yH={0:`�`,128:`€`,130:`‚`,131:`ƒ`,132:`„`,133:`…`,134:`†`,135:`‡`,136:`ˆ`,137:`‰`,138:`Š`,139:`‹`,140:`Œ`,142:`Ž`,145:`‘`,146:`’`,147:`“`,148:`”`,149:`•`,150:`–`,151:`—`,152:`˜`,153:`™`,154:`š`,155:`›`,156:`œ`,158:`ž`,159:`Ÿ`};function bH(e){let t=typeof e==`string`?e.charCodeAt(0):e;return t>=48&&t<=57}function xH(e){let t=typeof e==`string`?e.charCodeAt(0):e;return t>=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57}function SH(e){let t=typeof e==`string`?e.charCodeAt(0):e;return t>=97&&t<=122||t>=65&&t<=90}function CH(e){return SH(e)||bH(e)}var wH=document.createElement(`i`);function TH(e){let t=`&`+e+`;`;wH.innerHTML=t;let n=wH.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`?!1:n!==t&&n}var EH=[``,`Named character references must be terminated by a semicolon`,`Numeric character references must be terminated by a semicolon`,`Named character references cannot be empty`,`Numeric character references cannot be empty`,`Named character references must be known`,`Numeric character references cannot be disallowed`,`Numeric character references cannot be outside the permissible Unicode range`];function DH(e,t){let n=t||{},r=typeof n.additional==`string`?n.additional.charCodeAt(0):n.additional,i=[],a=0,o=-1,s=``,c,l;n.position&&(`start`in n.position||`indent`in n.position?(l=n.position.indent,c=n.position.start):c=n.position);let u=(c?c.line:0)||1,d=(c?c.column:0)||1,f=m(),p;for(a--;++a<=e.length;)if(p===10&&(d=(l?l[o]:0)||1),p=e.charCodeAt(a),p===38){let t=e.charCodeAt(a+1);if(t===9||t===10||t===12||t===32||t===38||t===60||Number.isNaN(t)||r&&t===r){s+=String.fromCharCode(p),d++;continue}let o=a+1,c=o,l=o,u;if(t===35){l=++c;let t=e.charCodeAt(l);t===88||t===120?(u=`hexadecimal`,l=++c):u=`decimal`}else u=`named`;let _=``,v=``,y=``,b=u===`named`?CH:u===`decimal`?bH:xH;for(l--;++l<=e.length;){let t=e.charCodeAt(l);if(!b(t))break;y+=String.fromCharCode(t),u===`named`&&vH.includes(y)&&(_=y,v=TH(y))}let x=e.charCodeAt(l)===59;if(x){l++;let e=u===`named`&&TH(y);e&&(_=y,v=e)}let S=1+l-o,C=``;if(!(!x&&n.nonTerminated===!1))if(!y)u!==`named`&&h(4,S);else if(u===`named`){if(x&&!v)h(5,1);else if(_!==y&&(l=c+_.length,S=1+l-c,x=!1),!x){let t=_?1:3;if(n.attribute){let n=e.charCodeAt(l);n===61?(h(t,S),v=``):CH(n)?v=``:h(t,S)}else h(t,S)}C=v}else{x||h(2,S);let e=Number.parseInt(y,u===`hexadecimal`?16:10);if(OH(e))h(7,S),C=`�`;else if(e in yH)h(6,S),C=yH[e];else{let t=``;kH(e)&&h(6,S),e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10|55296),e=56320|e&1023),C=t+String.fromCharCode(e)}}if(C){g(),f=m(),a=l-1,d+=l-o+1,i.push(C);let t=m();t.offset++,n.reference&&n.reference.call(n.referenceContext||void 0,C,{start:f,end:t},e.slice(o-1,l)),f=t}else y=e.slice(o-1,l),s+=y,d+=y.length,a=l-1}else p===10&&(u++,o++,d=0),Number.isNaN(p)?g():(s+=String.fromCharCode(p),d++);return i.join(``);function m(){return{line:u,column:d,offset:a+((c?c.offset:0)||0)}}function h(e,t){let r;n.warning&&(r=m(),r.column+=t,r.offset+=t,n.warning.call(n.warningContext||void 0,EH[e],r,e))}function g(){s&&=(i.push(s),n.text&&n.text.call(n.textContext||void 0,s,{start:f,end:m()}),``)}}function OH(e){return e>=55296&&e<=57343||e>1114111}function kH(e){return e>=1&&e<=8||e===11||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||(e&65535)==65535||(e&65535)==65534}var AH=0,jH={},MH={util:{type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++AH}),e.__id},clone:function e(t,n){n||={};var r,i;switch(MH.util.type(t)){case`Object`:if(i=MH.util.objId(t),n[i])return n[i];for(var a in r={},n[i]=r,t)t.hasOwnProperty(a)&&(r[a]=e(t[a],n));return r;case`Array`:return i=MH.util.objId(t),n[i]?n[i]:(r=[],n[i]=r,t.forEach(function(t,i){r[i]=e(t,n)}),r);default:return t}}},languages:{plain:jH,plaintext:jH,text:jH,txt:jH,extend:function(e,t){var n=MH.util.clone(MH.languages[e]);for(var r in t)n[r]=t[r];return n},insertBefore:function(e,t,n,r){r||=MH.languages;var i=r[e],a={};for(var o in i)if(i.hasOwnProperty(o)){if(o==t)for(var s in n)n.hasOwnProperty(s)&&(a[s]=n[s]);n.hasOwnProperty(o)||(a[o]=i[o])}var c=r[e];return r[e]=a,MH.languages.DFS(MH.languages,function(t,n){n===c&&t!=e&&(this[t]=a)}),a},DFS:function e(t,n,r,i){i||={};var a=MH.util.objId;for(var o in t)if(t.hasOwnProperty(o)){n.call(t,o,t[o],r||o);var s=t[o],c=MH.util.type(s);c===`Object`&&!i[a(s)]?(i[a(s)]=!0,e(s,n,null,i)):c===`Array`&&!i[a(s)]&&(i[a(s)]=!0,e(s,n,o,i))}}},plugins:{},highlight:function(e,t,n){var r={code:e,grammar:t,language:n};if(MH.hooks.run(`before-tokenize`,r),!r.grammar)throw Error(`The language "`+r.language+`" has no grammar.`);return r.tokens=MH.tokenize(r.code,r.grammar),MH.hooks.run(`after-tokenize`,r),NH.stringify(MH.util.encode(r.tokens),r.language)},tokenize:function(e,t){var n=t.rest;if(n){for(var r in n)t[r]=n[r];delete t.rest}var i=new IH;return LH(i,i.head,e),FH(e,i,t,i.head,0),zH(i)},hooks:{all:{},add:function(e,t){var n=MH.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=MH.hooks.all[e];if(!(!n||!n.length))for(var r=0,i;i=n[r++];)i(t)}},Token:NH};function NH(e,t,n,r){this.type=e,this.content=t,this.alias=n,this.length=(r||``).length|0}function PH(e,t,n,r){e.lastIndex=t;var i=e.exec(n);if(i&&r&&i[1]){var a=i[1].length;i.index+=a,i[0]=i[0].slice(a)}return i}function FH(e,t,n,r,i,a){for(var o in n)if(!(!n.hasOwnProperty(o)||!n[o])){var s=n[o];s=Array.isArray(s)?s:[s];for(var c=0;c<s.length;++c){if(a&&a.cause==o+`,`+c)return;var l=s[c],u=l.inside,d=!!l.lookbehind,f=!!l.greedy,p=l.alias;if(f&&!l.pattern.global){var m=l.pattern.toString().match(/[imsuy]*$/)[0];l.pattern=RegExp(l.pattern.source,m+`g`)}for(var h=l.pattern||l,g=r.next,_=i;g!==t.tail&&!(a&&_>=a.reach);_+=g.value.length,g=g.next){var v=g.value;if(t.length>e.length)return;if(!(v instanceof NH)){var y=1,b;if(f){if(b=PH(h,_,e,d),!b||b.index>=e.length)break;var x=b.index,S=b.index+b[0].length,C=_;for(C+=g.value.length;x>=C;)g=g.next,C+=g.value.length;if(C-=g.value.length,_=C,g.value instanceof NH)continue;for(var w=g;w!==t.tail&&(C<S||typeof w.value==`string`);w=w.next)y++,C+=w.value.length;y--,v=e.slice(_,C),b.index-=_}else if(b=PH(h,0,v,d),!b)continue;var x=b.index,T=b[0],E=v.slice(0,x),D=v.slice(x+T.length),O=_+v.length;a&&O>a.reach&&(a.reach=O);var k=g.prev;E&&(k=LH(t,k,E),_+=E.length),RH(t,k,y);var A=new NH(o,u?MH.tokenize(T,u):T,p,T);if(g=LH(t,k,A),D&&LH(t,g,D),y>1){var j={cause:o+`,`+c,reach:O};FH(e,t,n,g.prev,_,j),a&&j.reach>a.reach&&(a.reach=j.reach)}}}}}}function IH(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function LH(e,t,n){var r=t.next,i={value:n,prev:t,next:r};return t.next=i,r.prev=i,e.length++,i}function RH(e,t,n){for(var r=t.next,i=0;i<n&&r!==e.tail;i++)r=r.next;t.next=r,r.prev=t,e.length-=i}function zH(e){for(var t=[],n=e.head.next;n!==e.tail;)t.push(n.value),n=n.next;return t}var BH=MH;function VH(){}VH.prototype=BH;var HH=new VH;HH.highlight=UH,HH.register=WH,HH.alias=GH,HH.registered=KH,HH.listLanguages=qH,HH.util.encode=YH,HH.Token.stringify=JH;function UH(e,t){if(typeof e!=`string`)throw TypeError("Expected `string` for `value`, got `"+e+"`");let n,r;if(t&&typeof t==`object`)n=t;else{if(r=t,typeof r!=`string`)throw TypeError("Expected `string` for `name`, got `"+r+"`");if(Object.hasOwn(HH.languages,r))n=HH.languages[r];else throw Error("Unknown language: `"+r+"` is not registered")}return{type:`root`,children:BH.highlight.call(HH,e,n,r)}}function WH(e){if(typeof e!=`function`||!e.displayName)throw Error("Expected `function` for `syntax`, got `"+e+"`");Object.hasOwn(HH.languages,e.displayName)||e(HH)}function GH(e,t){let n=HH.languages,r={};typeof e==`string`?t&&(r[e]=t):r=e;let i;for(i in r)if(Object.hasOwn(r,i)){let e=r[i],t=typeof e==`string`?[e]:e,a=-1;for(;++a<t.length;)n[t[a]]=n[i]}}function KH(e){if(typeof e!=`string`)throw TypeError("Expected `string` for `aliasOrLanguage`, got `"+e+"`");return Object.hasOwn(HH.languages,e)}function qH(){let e=HH.languages,t=[],n;for(n in e)Object.hasOwn(e,n)&&typeof e[n]==`object`&&t.push(n);return t}function JH(e,t){if(typeof e==`string`)return{type:`text`,value:e};if(Array.isArray(e)){let n=[],r=-1;for(;++r<e.length;)e[r]!==null&&e[r]!==void 0&&e[r]!==``&&n.push(JH(e[r],t));return n}let n={attributes:{},classes:[`token`,e.type],content:JH(e.content,t),language:t,tag:`span`,type:e.type};return e.alias&&n.classes.push(...typeof e.alias==`string`?[e.alias]:e.alias),HH.hooks.run(`wrap`,n),_H(n.tag+`.`+n.classes.join(`.`),XH(n.attributes),n.content)}function YH(e){return e}function XH(e){let t;for(t in e)Object.hasOwn(e,t)&&(e[t]=DH(e[t]));return e}var ZH=TV(HH,{});ZH.registerLanguage=function(e,t){return HH.register(t)},ZH.alias=function(e,t){return HH.alias(e,t)},QH.displayName=`json`,QH.aliases=[`webmanifest`];function QH(e){e.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:`keyword`}},e.languages.webmanifest=e.languages.json}var $H=QH,eU={'code[class*="language-"]':{background:`hsl(230, 1%, 98%)`,color:`hsl(230, 8%, 24%)`,fontFamily:`"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace`,direction:`ltr`,textAlign:`left`,whiteSpace:`pre`,wordSpacing:`normal`,wordBreak:`normal`,lineHeight:`1.5`,MozTabSize:`2`,OTabSize:`2`,tabSize:`2`,WebkitHyphens:`none`,MozHyphens:`none`,msHyphens:`none`,hyphens:`none`},'pre[class*="language-"]':{background:`hsl(230, 1%, 98%)`,color:`hsl(230, 8%, 24%)`,fontFamily:`"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace`,direction:`ltr`,textAlign:`left`,whiteSpace:`pre`,wordSpacing:`normal`,wordBreak:`normal`,lineHeight:`1.5`,MozTabSize:`2`,OTabSize:`2`,tabSize:`2`,WebkitHyphens:`none`,MozHyphens:`none`,msHyphens:`none`,hyphens:`none`,padding:`1em`,margin:`0.5em 0`,overflow:`auto`,borderRadius:`0.3em`},'code[class*="language-"]::-moz-selection':{background:`hsl(230, 1%, 90%)`,color:`inherit`},'code[class*="language-"] *::-moz-selection':{background:`hsl(230, 1%, 90%)`,color:`inherit`},'pre[class*="language-"] *::-moz-selection':{background:`hsl(230, 1%, 90%)`,color:`inherit`},'code[class*="language-"]::selection':{background:`hsl(230, 1%, 90%)`,color:`inherit`},'code[class*="language-"] *::selection':{background:`hsl(230, 1%, 90%)`,color:`inherit`},'pre[class*="language-"] *::selection':{background:`hsl(230, 1%, 90%)`,color:`inherit`},':not(pre) > code[class*="language-"]':{padding:`0.2em 0.3em`,borderRadius:`0.3em`,whiteSpace:`normal`},comment:{color:`hsl(230, 4%, 64%)`,fontStyle:`italic`},prolog:{color:`hsl(230, 4%, 64%)`},cdata:{color:`hsl(230, 4%, 64%)`},doctype:{color:`hsl(230, 8%, 24%)`},punctuation:{color:`hsl(230, 8%, 24%)`},entity:{color:`hsl(230, 8%, 24%)`,cursor:`help`},"attr-name":{color:`hsl(35, 99%, 36%)`},"class-name":{color:`hsl(35, 99%, 36%)`},boolean:{color:`hsl(35, 99%, 36%)`},constant:{color:`hsl(35, 99%, 36%)`},number:{color:`hsl(35, 99%, 36%)`},atrule:{color:`hsl(35, 99%, 36%)`},keyword:{color:`hsl(301, 63%, 40%)`},property:{color:`hsl(5, 74%, 59%)`},tag:{color:`hsl(5, 74%, 59%)`},symbol:{color:`hsl(5, 74%, 59%)`},deleted:{color:`hsl(5, 74%, 59%)`},important:{color:`hsl(5, 74%, 59%)`},selector:{color:`hsl(119, 34%, 47%)`},string:{color:`hsl(119, 34%, 47%)`},char:{color:`hsl(119, 34%, 47%)`},builtin:{color:`hsl(119, 34%, 47%)`},inserted:{color:`hsl(119, 34%, 47%)`},regex:{color:`hsl(119, 34%, 47%)`},"attr-value":{color:`hsl(119, 34%, 47%)`},"attr-value > .token.punctuation":{color:`hsl(119, 34%, 47%)`},variable:{color:`hsl(221, 87%, 60%)`},operator:{color:`hsl(221, 87%, 60%)`},function:{color:`hsl(221, 87%, 60%)`},url:{color:`hsl(198, 99%, 37%)`},"attr-value > .token.punctuation.attr-equals":{color:`hsl(230, 8%, 24%)`},"special-attr > .token.attr-value > .token.value.css":{color:`hsl(230, 8%, 24%)`},".language-css .token.selector":{color:`hsl(5, 74%, 59%)`},".language-css .token.property":{color:`hsl(230, 8%, 24%)`},".language-css .token.function":{color:`hsl(198, 99%, 37%)`},".language-css .token.url > .token.function":{color:`hsl(198, 99%, 37%)`},".language-css .token.url > .token.string.url":{color:`hsl(119, 34%, 47%)`},".language-css .token.important":{color:`hsl(301, 63%, 40%)`},".language-css .token.atrule .token.rule":{color:`hsl(301, 63%, 40%)`},".language-javascript .token.operator":{color:`hsl(301, 63%, 40%)`},".language-javascript .token.template-string > .token.interpolation > .token.interpolation-punctuation.punctuation":{color:`hsl(344, 84%, 43%)`},".language-json .token.operator":{color:`hsl(230, 8%, 24%)`},".language-json .token.null.keyword":{color:`hsl(35, 99%, 36%)`},".language-markdown .token.url":{color:`hsl(230, 8%, 24%)`},".language-markdown .token.url > .token.operator":{color:`hsl(230, 8%, 24%)`},".language-markdown .token.url-reference.url > .token.string":{color:`hsl(230, 8%, 24%)`},".language-markdown .token.url > .token.content":{color:`hsl(221, 87%, 60%)`},".language-markdown .token.url > .token.url":{color:`hsl(198, 99%, 37%)`},".language-markdown .token.url-reference.url":{color:`hsl(198, 99%, 37%)`},".language-markdown .token.blockquote.punctuation":{color:`hsl(230, 4%, 64%)`,fontStyle:`italic`},".language-markdown .token.hr.punctuation":{color:`hsl(230, 4%, 64%)`,fontStyle:`italic`},".language-markdown .token.code-snippet":{color:`hsl(119, 34%, 47%)`},".language-markdown .token.bold .token.content":{color:`hsl(35, 99%, 36%)`},".language-markdown .token.italic .token.content":{color:`hsl(301, 63%, 40%)`},".language-markdown .token.strike .token.content":{color:`hsl(5, 74%, 59%)`},".language-markdown .token.strike .token.punctuation":{color:`hsl(5, 74%, 59%)`},".language-markdown .token.list.punctuation":{color:`hsl(5, 74%, 59%)`},".language-markdown .token.title.important > .token.punctuation":{color:`hsl(5, 74%, 59%)`},bold:{fontWeight:`bold`},italic:{fontStyle:`italic`},namespace:{Opacity:`0.8`},"token.tab:not(:empty):before":{color:`hsla(230, 8%, 24%, 0.2)`},"token.cr:before":{color:`hsla(230, 8%, 24%, 0.2)`},"token.lf:before":{color:`hsla(230, 8%, 24%, 0.2)`},"token.space:before":{color:`hsla(230, 8%, 24%, 0.2)`},"div.code-toolbar > .toolbar.toolbar > .toolbar-item":{marginRight:`0.4em`},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button":{background:`hsl(230, 1%, 90%)`,color:`hsl(230, 6%, 44%)`,padding:`0.1em 0.4em`,borderRadius:`0.3em`},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a":{background:`hsl(230, 1%, 90%)`,color:`hsl(230, 6%, 44%)`,padding:`0.1em 0.4em`,borderRadius:`0.3em`},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span":{background:`hsl(230, 1%, 90%)`,color:`hsl(230, 6%, 44%)`,padding:`0.1em 0.4em`,borderRadius:`0.3em`},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:hover":{background:`hsl(230, 1%, 78%)`,color:`hsl(230, 8%, 24%)`},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:focus":{background:`hsl(230, 1%, 78%)`,color:`hsl(230, 8%, 24%)`},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:hover":{background:`hsl(230, 1%, 78%)`,color:`hsl(230, 8%, 24%)`},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:focus":{background:`hsl(230, 1%, 78%)`,color:`hsl(230, 8%, 24%)`},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:hover":{background:`hsl(230, 1%, 78%)`,color:`hsl(230, 8%, 24%)`},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:focus":{background:`hsl(230, 1%, 78%)`,color:`hsl(230, 8%, 24%)`},".line-highlight.line-highlight":{background:`hsla(230, 8%, 24%, 0.05)`},".line-highlight.line-highlight:before":{background:`hsl(230, 1%, 90%)`,color:`hsl(230, 8%, 24%)`,padding:`0.1em 0.6em`,borderRadius:`0.3em`,boxShadow:`0 2px 0 0 rgba(0, 0, 0, 0.2)`},".line-highlight.line-highlight[data-end]:after":{background:`hsl(230, 1%, 90%)`,color:`hsl(230, 8%, 24%)`,padding:`0.1em 0.6em`,borderRadius:`0.3em`,boxShadow:`0 2px 0 0 rgba(0, 0, 0, 0.2)`},"pre[id].linkable-line-numbers.linkable-line-numbers span.line-numbers-rows > span:hover:before":{backgroundColor:`hsla(230, 8%, 24%, 0.05)`},".line-numbers.line-numbers .line-numbers-rows":{borderRightColor:`hsla(230, 8%, 24%, 0.2)`},".command-line .command-line-prompt":{borderRightColor:`hsla(230, 8%, 24%, 0.2)`},".line-numbers .line-numbers-rows > span:before":{color:`hsl(230, 1%, 62%)`},".command-line .command-line-prompt > span:before":{color:`hsl(230, 1%, 62%)`},".rainbow-braces .token.token.punctuation.brace-level-1":{color:`hsl(5, 74%, 59%)`},".rainbow-braces .token.token.punctuation.brace-level-5":{color:`hsl(5, 74%, 59%)`},".rainbow-braces .token.token.punctuation.brace-level-9":{color:`hsl(5, 74%, 59%)`},".rainbow-braces .token.token.punctuation.brace-level-2":{color:`hsl(119, 34%, 47%)`},".rainbow-braces .token.token.punctuation.brace-level-6":{color:`hsl(119, 34%, 47%)`},".rainbow-braces .token.token.punctuation.brace-level-10":{color:`hsl(119, 34%, 47%)`},".rainbow-braces .token.token.punctuation.brace-level-3":{color:`hsl(221, 87%, 60%)`},".rainbow-braces .token.token.punctuation.brace-level-7":{color:`hsl(221, 87%, 60%)`},".rainbow-braces .token.token.punctuation.brace-level-11":{color:`hsl(221, 87%, 60%)`},".rainbow-braces .token.token.punctuation.brace-level-4":{color:`hsl(301, 63%, 40%)`},".rainbow-braces .token.token.punctuation.brace-level-8":{color:`hsl(301, 63%, 40%)`},".rainbow-braces .token.token.punctuation.brace-level-12":{color:`hsl(301, 63%, 40%)`},"pre.diff-highlight > code .token.token.deleted:not(.prefix)":{backgroundColor:`hsla(353, 100%, 66%, 0.15)`},"pre > code.diff-highlight .token.token.deleted:not(.prefix)":{backgroundColor:`hsla(353, 100%, 66%, 0.15)`},"pre.diff-highlight > code .token.token.deleted:not(.prefix)::-moz-selection":{backgroundColor:`hsla(353, 95%, 66%, 0.25)`},"pre.diff-highlight > code .token.token.deleted:not(.prefix) *::-moz-selection":{backgroundColor:`hsla(353, 95%, 66%, 0.25)`},"pre > code.diff-highlight .token.token.deleted:not(.prefix)::-moz-selection":{backgroundColor:`hsla(353, 95%, 66%, 0.25)`},"pre > code.diff-highlight .token.token.deleted:not(.prefix) *::-moz-selection":{backgroundColor:`hsla(353, 95%, 66%, 0.25)`},"pre.diff-highlight > code .token.token.deleted:not(.prefix)::selection":{backgroundColor:`hsla(353, 95%, 66%, 0.25)`},"pre.diff-highlight > code .token.token.deleted:not(.prefix) *::selection":{backgroundColor:`hsla(353, 95%, 66%, 0.25)`},"pre > code.diff-highlight .token.token.deleted:not(.prefix)::selection":{backgroundColor:`hsla(353, 95%, 66%, 0.25)`},"pre > code.diff-highlight .token.token.deleted:not(.prefix) *::selection":{backgroundColor:`hsla(353, 95%, 66%, 0.25)`},"pre.diff-highlight > code .token.token.inserted:not(.prefix)":{backgroundColor:`hsla(137, 100%, 55%, 0.15)`},"pre > code.diff-highlight .token.token.inserted:not(.prefix)":{backgroundColor:`hsla(137, 100%, 55%, 0.15)`},"pre.diff-highlight > code .token.token.inserted:not(.prefix)::-moz-selection":{backgroundColor:`hsla(135, 73%, 55%, 0.25)`},"pre.diff-highlight > code .token.token.inserted:not(.prefix) *::-moz-selection":{backgroundColor:`hsla(135, 73%, 55%, 0.25)`},"pre > code.diff-highlight .token.token.inserted:not(.prefix)::-moz-selection":{backgroundColor:`hsla(135, 73%, 55%, 0.25)`},"pre > code.diff-highlight .token.token.inserted:not(.prefix) *::-moz-selection":{backgroundColor:`hsla(135, 73%, 55%, 0.25)`},"pre.diff-highlight > code .token.token.inserted:not(.prefix)::selection":{backgroundColor:`hsla(135, 73%, 55%, 0.25)`},"pre.diff-highlight > code .token.token.inserted:not(.prefix) *::selection":{backgroundColor:`hsla(135, 73%, 55%, 0.25)`},"pre > code.diff-highlight .token.token.inserted:not(.prefix)::selection":{backgroundColor:`hsla(135, 73%, 55%, 0.25)`},"pre > code.diff-highlight .token.token.inserted:not(.prefix) *::selection":{backgroundColor:`hsla(135, 73%, 55%, 0.25)`},".prism-previewer.prism-previewer:before":{borderColor:`hsl(0, 0, 95%)`},".prism-previewer-gradient.prism-previewer-gradient div":{borderColor:`hsl(0, 0, 95%)`,borderRadius:`0.3em`},".prism-previewer-color.prism-previewer-color:before":{borderRadius:`0.3em`},".prism-previewer-easing.prism-previewer-easing:before":{borderRadius:`0.3em`},".prism-previewer.prism-previewer:after":{borderTopColor:`hsl(0, 0, 95%)`},".prism-previewer-flipped.prism-previewer-flipped.after":{borderBottomColor:`hsl(0, 0, 95%)`},".prism-previewer-angle.prism-previewer-angle:before":{background:`hsl(0, 0%, 100%)`},".prism-previewer-time.prism-previewer-time:before":{background:`hsl(0, 0%, 100%)`},".prism-previewer-easing.prism-previewer-easing":{background:`hsl(0, 0%, 100%)`},".prism-previewer-angle.prism-previewer-angle circle":{stroke:`hsl(230, 8%, 24%)`,strokeOpacity:`1`},".prism-previewer-time.prism-previewer-time circle":{stroke:`hsl(230, 8%, 24%)`,strokeOpacity:`1`},".prism-previewer-easing.prism-previewer-easing circle":{stroke:`hsl(230, 8%, 24%)`,fill:`transparent`},".prism-previewer-easing.prism-previewer-easing path":{stroke:`hsl(230, 8%, 24%)`},".prism-previewer-easing.prism-previewer-easing line":{stroke:`hsl(230, 8%, 24%)`}},tU=`#121212`,nU=`#3d6b69`,rU=`#c55a44`,iU=`#707070`,aU=`transparent`,oU=`"JetBrains Mono Variable", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace`,sU={...eU,'code[class*="language-"]':{...eU[`code[class*="language-"]`],background:aU,color:tU,fontFamily:oU},'pre[class*="language-"]':{...eU[`pre[class*="language-"]`],background:aU,color:tU,fontFamily:oU,padding:0,margin:0,overflow:`visible`},property:{color:tU},string:{color:nU},number:{color:rU},boolean:{color:rU},punctuation:{color:iU},operator:{color:iU},".language-json .token.operator":{color:iU},".language-json .token.null.keyword":{color:iU}};ZH.registerLanguage(`json`,$H);function cU({code:e}){return(0,H.jsx)(ZH,{language:`json`,style:sU,customStyle:{margin:0,padding:0,background:`transparent`,fontSize:`0.75rem`},codeTagProps:{className:`font-mono whitespace-pre`},showLineNumbers:!1,wrapLongLines:!0,children:e})}var lU=(0,b.createContext)({});function uU(e){let t=(0,b.useRef)(null);return t.current===null&&(t.current=e()),t.current}var dU=typeof window<`u`?b.useLayoutEffect:b.useEffect,fU=(0,b.createContext)(null);function pU(e,t){e.indexOf(t)===-1&&e.push(t)}function mU(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}var hU=(e,t,n)=>n>t?t:n<e?e:n,gU={},_U=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),vU=e=>typeof e==`object`&&!!e,yU=e=>/^0[^.\s]+$/u.test(e);function bU(e){let t;return()=>(t===void 0&&(t=e()),t)}var xU=e=>e,SU=(...e)=>e.reduce((e,t)=>n=>t(e(n))),CU=(e,t,n)=>{let r=t-e;return r?(n-e)/r:1},wU=class{constructor(){this.subscriptions=[]}add(e){return pU(this.subscriptions,e),()=>mU(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}},TU=e=>e*1e3,EU=e=>e/1e3,DU=(e,t)=>t?1e3/t*e:0,OU=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,kU=1e-7,AU=12;function jU(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=OU(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>kU&&++s<AU);return o}function MU(e,t,n,r){if(e===t&&n===r)return xU;let i=t=>jU(t,0,1,e,n);return e=>e===0||e===1?e:OU(i(e),t,r)}var NU=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,PU=e=>t=>1-e(1-t),FU=MU(.33,1.53,.69,.99),IU=PU(FU),LU=NU(IU),RU=e=>e>=1?1:(e*=2)<1?.5*IU(e):.5*(2-2**(-10*(e-1))),zU=e=>1-Math.sin(Math.acos(e)),BU=PU(zU),VU=NU(zU),HU=MU(.42,0,1,1),UU=MU(0,0,.58,1),WU=MU(.42,0,.58,1),GU=e=>Array.isArray(e)&&typeof e[0]!=`number`,KU=e=>Array.isArray(e)&&typeof e[0]==`number`,qU={linear:xU,easeIn:HU,easeInOut:WU,easeOut:UU,circIn:zU,circInOut:VU,circOut:BU,backIn:IU,backInOut:LU,backOut:FU,anticipate:RU},JU=e=>typeof e==`string`,YU=e=>{if(KU(e)){e.length;let[t,n,r,i]=e;return MU(t,n,r,i)}else if(JU(e))return qU[e],`${e}`,qU[e];return e},XU=[`setup`,`read`,`resolveKeyframes`,`preUpdate`,`update`,`preRender`,`render`,`postRender`];function ZU(e){let t=new Set,n=new Set,r=!1,i=!1,a=new WeakSet,o={delta:0,timestamp:0,isProcessing:!1};function s(t){a.has(t)&&(c.schedule(t),e()),t(o)}let c={schedule:(e,i=!1,o=!1)=>{let s=o&&r?t:n;return i&&a.add(e),s.add(e),e},cancel:e=>{n.delete(e),a.delete(e)},process:e=>{if(o=e,r){i=!0;return}r=!0;let a=t;t=n,n=a,t.forEach(s),t.clear(),r=!1,i&&(i=!1,c.process(e))}};return c}var QU=40;function $U(e,t){let n=!1,r=!0,i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=XU.reduce((e,t)=>(e[t]=ZU(a),e),{}),{setup:s,read:c,resolveKeyframes:l,preUpdate:u,update:d,preRender:f,render:p,postRender:m}=o,h=()=>{let a=gU.useManualTiming,o=a?i.timestamp:performance.now();n=!1,a||(i.delta=r?1e3/60:Math.max(Math.min(o-i.timestamp,QU),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:XU.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<XU.length;t++)o[XU[t]].cancel(e)},state:i,steps:o}}var{schedule:eW,cancel:tW,state:nW,steps:rW}=$U(typeof requestAnimationFrame<`u`?requestAnimationFrame:xU,!0),iW;function aW(){iW=void 0}var oW={now:()=>(iW===void 0&&oW.set(nW.isProcessing||gU.useManualTiming?nW.timestamp:performance.now()),iW),set:e=>{iW=e,queueMicrotask(aW)}},sW=e=>t=>typeof t==`string`&&t.startsWith(e),cW=sW(`--`),lW=sW(`var(--`),uW=e=>lW(e)?dW.test(e.split(`/*`)[0].trim()):!1,dW=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function fW(e){return typeof e==`string`&&e.split(`/*`)[0].includes(`var(--`)}var pW={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},mW={...pW,transform:e=>hU(0,1,e)},hW={...pW,default:1},gW=e=>Math.round(e*1e5)/1e5,_W=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function vW(e){return e==null}var yW=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,bW=(e,t)=>n=>!!(typeof n==`string`&&yW.test(n)&&n.startsWith(e)||t&&!vW(n)&&Object.prototype.hasOwnProperty.call(n,t)),xW=(e,t,n)=>r=>{if(typeof r!=`string`)return r;let[i,a,o,s]=r.match(_W);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},SW=e=>hU(0,255,e),CW={...pW,transform:e=>Math.round(SW(e))},wW={test:bW(`rgb`,`red`),parse:xW(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+CW.transform(e)+`, `+CW.transform(t)+`, `+CW.transform(n)+`, `+gW(mW.transform(r))+`)`};function TW(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 EW={test:bW(`#`),parse:TW,transform:wW.transform},DW=e=>({test:t=>typeof t==`string`&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),OW=DW(`deg`),kW=DW(`%`),AW=DW(`px`),jW=DW(`vh`),MW=DW(`vw`),NW={...kW,parse:e=>kW.parse(e)/100,transform:e=>kW.transform(e*100)},PW={test:bW(`hsl`,`hue`),parse:xW(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+kW.transform(gW(t))+`, `+kW.transform(gW(n))+`, `+gW(mW.transform(r))+`)`},FW={test:e=>wW.test(e)||EW.test(e)||PW.test(e),parse:e=>wW.test(e)?wW.parse(e):PW.test(e)?PW.parse(e):EW.parse(e),transform:e=>typeof e==`string`?e:e.hasOwnProperty(`red`)?wW.transform(e):PW.transform(e),getAnimatableNone:e=>{let t=FW.parse(e);return t.alpha=0,FW.transform(t)}},IW=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function LW(e){return isNaN(e)&&typeof e==`string`&&(e.match(_W)?.length||0)+(e.match(IW)?.length||0)>0}var RW=`number`,zW=`color`,BW=`var`,VW=`var(`,HW="${}",UW=/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 WW(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],a=0;return{values:n,split:t.replace(UW,e=>(FW.test(e)?(r.color.push(a),i.push(zW),n.push(FW.parse(e))):e.startsWith(VW)?(r.var.push(a),i.push(BW),n.push(e)):(r.number.push(a),i.push(RW),n.push(parseFloat(e))),++a,HW)).split(HW),indexes:r,types:i}}function GW(e){return WW(e).values}function KW({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===RW?i+=gW(r[a]):e===zW?i+=FW.transform(r[a]):i+=r[a]}return i}}function qW(e){return KW(WW(e))}var JW=e=>typeof e==`number`?0:FW.test(e)?FW.getAnimatableNone(e):e,YW=(e,t)=>typeof e==`number`?t?.trim().endsWith(`/`)?e:0:JW(e);function XW(e){let t=WW(e);return KW(t)(t.values.map((e,n)=>YW(e,t.split[n])))}var ZW={test:LW,parse:GW,createTransformer:qW,getAnimatableNone:XW};function QW(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 $W({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=QW(s,r,e+1/3),a=QW(s,r,e),o=QW(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function eG(e,t){return n=>n>0?t:e}var tG=(e,t,n)=>e+(t-e)*n,nG=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},rG=[EW,wW,PW],iG=e=>rG.find(t=>t.test(e));function aG(e){let t=iG(e);if(`${e}`,!t)return!1;let n=t.parse(e);return t===PW&&(n=$W(n)),n}var oG=(e,t)=>{let n=aG(e),r=aG(t);if(!n||!r)return eG(e,t);let i={...n};return e=>(i.red=nG(n.red,r.red,e),i.green=nG(n.green,r.green,e),i.blue=nG(n.blue,r.blue,e),i.alpha=tG(n.alpha,r.alpha,e),wW.transform(i))},sG=new Set([`none`,`hidden`]);function cG(e,t){return sG.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function lG(e,t){return n=>tG(e,t,n)}function uG(e){return typeof e==`number`?lG:typeof e==`string`?uW(e)?eG:FW.test(e)?oG:mG:Array.isArray(e)?dG:typeof e==`object`?FW.test(e)?oG:fG:eG}function dG(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>uG(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function fG(e,t){let n={...e,...t},r={};for(let i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=uG(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}function pG(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 mG=(e,t)=>{let n=ZW.createTransformer(t),r=WW(e),i=WW(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?sG.has(e)&&!i.values.length||sG.has(t)&&!r.values.length?cG(e,t):SU(dG(pG(r,i),i.values),n):(`${e}${t}`,eG(e,t))};function hG(e,t,n){return typeof e==`number`&&typeof t==`number`&&typeof n==`number`?tG(e,t,n):uG(e)(e,t)}var gG=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>eW.update(t,e),stop:()=>tW(t),now:()=>nW.isProcessing?nW.timestamp:oW.now()}},_G=(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)})`},vG=2e4;function yG(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 bG(e,t=100,n){let r=n({...e,keyframes:[0,t]}),i=Math.min(yG(r),vG);return{type:`keyframes`,ease:e=>r.next(i*e).value/t,duration:EU(i)}}var xG={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 SG(e,t){return e*Math.sqrt(1-t*t)}var CG=12;function wG(e,t,n){let r=n;for(let n=1;n<CG;n++)r-=e(r)/t(r);return r}var TG=.001;function EG({duration:e=xG.duration,bounce:t=xG.bounce,velocity:n=xG.velocity,mass:r=xG.mass}){let i,a;xG.maxDuration;let o=1-t;o=hU(xG.minDamping,xG.maxDamping,o),e=hU(xG.minDuration,xG.maxDuration,EU(e)),o<1?(i=t=>{let r=t*o,i=r*e,a=r-n,s=SG(t,o),c=Math.exp(-i);return TG-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=SG(t**2,o);return(-i(t)+TG>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=wG(i,a,s);if(e=TU(e),isNaN(c))return{stiffness:xG.stiffness,damping:xG.damping,duration:e};{let t=c**2*r;return{stiffness:t,damping:o*2*Math.sqrt(r*t),duration:e}}}var DG=[`duration`,`bounce`],OG=[`stiffness`,`damping`,`mass`];function kG(e,t){return t.some(t=>e[t]!==void 0)}function AG(e){let t={velocity:xG.velocity,stiffness:xG.stiffness,damping:xG.damping,mass:xG.mass,isResolvedFromDuration:!1,...e};if(!kG(e,OG)&&kG(e,DG))if(t.velocity=0,e.visualDuration){let n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,a=2*hU(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:xG.mass,stiffness:i,damping:a}}else{let n=EG({...e,velocity:0});t={...t,...n,mass:xG.mass},t.isResolvedFromDuration=!0}return t}function jG(e=xG.visualDuration,t=xG.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}=AG({...n,velocity:-EU(n.velocity||0)}),m=f||0,h=l/(2*Math.sqrt(c*u)),g=o-a,_=EU(Math.sqrt(c/u)),v=Math.abs(g)<5;r||=v?xG.restSpeed.granular:xG.restSpeed.default,i||=v?xG.restDelta.granular:xG.restDelta.default;let y,b,x,S,C,w;if(h<1)x=SG(_,h),S=(m+h*_*g)/x,y=e=>{let t=Math.exp(-h*_*e);return o-t*(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=>TU(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=TU(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=TU(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(yG(T),vG),t=_G(t=>T.next(e*t).value,e,30);return e+`ms `+t},toTransition:()=>{}};return T}jG.applyToOptions=e=>{let t=bG(e,100,jG);return e.ease=t.ease,e.duration=TU(t.duration),e.type=`keyframes`,e};var MG=5;function NG(e,t,n){let r=Math.max(t-MG,0);return DU(n-e(r),t-r)}function PG({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=jG({keyframes:[f.value,m(f.value)],velocity:NG(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 FG(e,t,n){let r=[],i=n||gU.mix||hG,a=e.length-1;for(let n=0;n<a;n++){let a=i(e[n],e[n+1]);t&&(a=SU(Array.isArray(t)?t[n]||xU:t,a)),r.push(a)}return r}function IG(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=FG(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=CU(e[r],e[r+1],n);return s[r](i)};return n?t=>l(hU(e[0],e[a-1],t)):l}function LG(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=CU(0,t,r);e.push(tG(n,1,i))}}function RG(e){let t=[0];return LG(t,e.length-1),t}function zG(e,t){return e.map(e=>e*t)}function BG(e,t){return e.map(()=>t||WU).splice(0,e.length-1)}function VG({duration:e=300,keyframes:t,times:n,ease:r=`easeInOut`}){let i=GU(r)?r.map(YU):YU(r),a={done:!1,value:t[0]},o=IG(zG(n&&n.length===t.length?n:RG(t),e),t,{ease:Array.isArray(i)?i:BG(t,i)});return{calculatedDuration:e,next:t=>(a.value=o(t),a.done=t>=e,a)}}var HG=e=>e!==null;function UG(e,{repeat:t,repeatType:n=`loop`},r,i=1){let a=e.filter(HG),o=i<0||t&&n!==`loop`&&t%2==1?0:a.length-1;return!o||r===void 0?a[o]:r}var WG={decay:PG,inertia:PG,tween:VG,keyframes:VG,spring:jG};function GG(e){typeof e.type==`string`&&(e.type=WG[e.type])}var KG=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)}},qG=e=>e/100,JG=class extends KG{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!==oW.now()&&this.tick(oW.now()),this.isStopped=!0,this.state!==`idle`&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){let{options:e}=this;GG(e);let{type:t=VG,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=e,{keyframes:o}=e,s=t||VG;s!==VG&&typeof o[0]!=`number`&&(this.mixKeyframes=SU(qG,hG(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=yG(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=hU(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!==PG&&(b.value=UG(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 EU(this.calculatedDuration)}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+EU(e)}get time(){return EU(this.currentTime)}set time(e){e=TU(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 NG(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(oW.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=EU(this.currentTime))}play(){if(this.isStopped)return;let{driver:e=gG,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(oW.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}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 YG(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var XG=e=>e*180/Math.PI,ZG=e=>$G(XG(Math.atan2(e[1],e[0]))),QG={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:ZG,rotateZ:ZG,skewX:e=>XG(Math.atan(e[1])),skewY:e=>XG(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},$G=e=>(e%=360,e<0&&(e+=360),e),eK=ZG,tK=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),nK=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),rK={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:tK,scaleY:nK,scale:e=>(tK(e)+nK(e))/2,rotateX:e=>$G(XG(Math.atan2(e[6],e[5]))),rotateY:e=>$G(XG(Math.atan2(-e[2],e[0]))),rotateZ:eK,rotate:eK,skewX:e=>XG(Math.atan(e[4])),skewY:e=>XG(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function iK(e){return+!!e.includes(`scale`)}function aK(e,t){if(!e||e===`none`)return iK(t);let n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),r,i;if(n)r=rK,i=n;else{let t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=QG,i=t}if(!i)return iK(t);let a=r[t],o=i[1].split(`,`).map(sK);return typeof a==`function`?a(o):o[a]}var oK=(e,t)=>{let{transform:n=`none`}=getComputedStyle(e);return aK(n,t)};function sK(e){return parseFloat(e.trim())}var cK=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`],lK=new Set([...cK,`pathRotation`]),uK=e=>e===pW||e===AW,dK=new Set([`x`,`y`,`z`]),fK=cK.filter(e=>!dK.has(e));function pK(e){let t=[];return fK.forEach(n=>{let r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(+!!n.startsWith(`scale`)))}),t}var mK={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})=>aK(t,`x`),y:(e,{transform:t})=>aK(t,`y`)};mK.translateX=mK.x,mK.translateY=mK.y;var hK=new Set,gK=!1,_K=!1,vK=!1;function yK(){if(_K){let e=Array.from(hK).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{let t=pK(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)})}_K=!1,gK=!1,hK.forEach(e=>e.complete(vK)),hK.clear()}function bK(){hK.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(_K=!0)})}function xK(){vK=!0,bK(),yK(),vK=!1}var SK=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?(hK.add(this),gK||(gK=!0,eW.read(bK),eW.resolveKeyframes(yK))):(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])}YG(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state=`complete`,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),hK.delete(this)}cancel(){this.state===`scheduled`&&(hK.delete(this),this.state=`pending`)}resume(){this.state===`pending`&&this.scheduleResolve()}},CK=e=>e.startsWith(`--`);function wK(e,t,n){CK(t)?e.style.setProperty(t,n):e.style[t]=n}var TK={};function EK(e,t){let n=bU(e);return()=>TK[t]??n()}var DK=EK(()=>window.ScrollTimeline!==void 0,`scrollTimeline`),OK=EK(()=>{try{document.createElement(`div`).animate({opacity:0},{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),kK=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,AK={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:kK([0,.65,.55,1]),circOut:kK([.55,0,1,.45]),backIn:kK([.31,.01,.66,-.59]),backOut:kK([.33,1.53,.69,.99])};function jK(e,t){if(e)return typeof e==`function`?OK()?_G(e,t):`ease-out`:KU(e)?kK(e):Array.isArray(e)?e.map(e=>jK(e,t)||AK.easeOut):AK[e]}function MK(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=jK(s,i);Array.isArray(d)&&(u.easing=d);let f={delay:r,duration:i,easing:Array.isArray(d)?`linear`:d,fill:`both`,iterations:a+1,direction:o===`reverse`?`alternate`:`normal`};return l&&(f.pseudoElement=l),e.animate(u,f)}function NK(e){return typeof e==`function`&&`applyToOptions`in e}function PK({type:e,...t}){return NK(e)&&OK()?e.applyToOptions(t):(t.duration??=300,t.ease??=`easeOut`,t)}var FK=class extends KG{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=PK(e);this.animation=MK(t,n,r,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){let e=UG(r,this.options,o,this.speed);this.updateMotionValue&&this.updateMotionValue(e),wK(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 EU(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+EU(e)}get time(){return EU(Number(this.animation.currentTime)||0)}set time(e){let t=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=TU(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&&DK()?(this.animation.timeline=e,t&&(this.animation.rangeStart=t),n&&(this.animation.rangeEnd=n),xU):r(this)}},IK={anticipate:RU,backInOut:LU,circInOut:VU};function LK(e){return e in IK}function RK(e){typeof e.ease==`string`&&LK(e.ease)&&(e.ease=IK[e.ease])}var zK=10,BK=class extends FK{constructor(e){RK(e),GG(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 JG({...a,autoplay:!1}),s=Math.max(zK,oW.now()-this.startTime),c=hU(0,zK,s-zK),l=o.sample(s).value,{name:u}=this.options;i&&u&&wK(i,u,l),t.setWithVelocity(o.sample(Math.max(0,s-c)).value,l,c),o.stop()}},VK=(e,t)=>t!==`zIndex`&&!!(typeof e==`number`||Array.isArray(e)||typeof e==`string`&&(ZW.test(e)||e===`0`)&&!e.startsWith(`url(`));function HK(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 UK(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=VK(i,t),s=VK(a,t);return`${t}${i}${a}${o?a:i}`,!o||!s?!1:HK(e)||(n===`spring`||NK(n))&&r}function WK(e){e.duration=0,e.type=`keyframes`}var GK=new Set([`opacity`,`clipPath`,`filter`,`transform`]),KK=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function qK(e){for(let t=0;t<e.length;t++)if(typeof e[t]==`string`&&KK.test(e[t]))return!0;return!1}var JK=new Set([`color`,`backgroundColor`,`outlineColor`,`fill`,`stroke`,`borderColor`,`borderTopColor`,`borderRightColor`,`borderBottomColor`,`borderLeftColor`]),YK=bU(()=>Object.hasOwnProperty.call(Element.prototype,`animate`));function XK(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 YK()&&n&&(GK.has(n)||JK.has(n)&&qK(s))&&(n!==`transform`||!l)&&!c&&!r&&i!==`mirror`&&a!==0&&o!==`inertia`}var ZK=40,QK=class extends KG{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=oW.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||SK;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=oW.now();let u=!0;UK(e,i,a,o)||(u=!1,(gU.instantAnimations||!s)&&l?.(UG(e,n,t)),e[0]=e[e.length-1],WK(n),n.repeat=0);let d={startTime:r?this.resolvedAt&&this.resolvedAt-this.createdAt>ZK?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},f=u&&!c&&XK(d),p=d.motionValue?.owner?.current,m;if(f)try{m=new BK({...d,element:p})}catch{m=new JG(d)}else m=new JG(d);m.finished.then(()=>{this.notifyFinished()}).catch(xU),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(),xK()),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 $K(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 eq=30,tq=e=>!isNaN(parseFloat(e)),nq={current:void 0},rq=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=oW.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=oW.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=tq(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 wU);let n=this.events[e].add(t);return e===`change`?()=>{n(),eW.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 nq.current&&nq.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=oW.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>eq)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,eq);return DU(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 iq(e,t){return new rq(e,t)}function aq(e,t){if(e?.inherit&&t){let{inherit:n,...r}=e;return{...t,...r}}return e}function oq(e,t){let n=e?.[t]??e?.default??e;return n===e?n:aq(n,e)}var sq={type:`spring`,stiffness:500,damping:25,restSpeed:10},cq=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),lq={type:`keyframes`,duration:.8},uq={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},dq=(e,{keyframes:t})=>t.length>2?lq:lK.has(e)?e.startsWith(`scale`)?cq(t[1]):sq:uq,fq=new Set([`when`,`delay`,`delayChildren`,`staggerChildren`,`staggerDirection`,`repeat`,`repeatType`,`repeatDelay`,`from`,`elapsed`]);function pq(e){for(let t in e)if(!fq.has(t))return!0;return!1}var mq=(e,t,n,r={},i,a)=>o=>{let s=oq(r,e)||{},c=s.delay||r.delay||0,{elapsed:l=0}=r;l-=TU(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};pq(s)||Object.assign(u,dq(e,u)),u.duration&&=TU(u.duration),u.repeatDelay&&=TU(u.repeatDelay),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(WK(u),u.delay===0&&(d=!0)),(gU.instantAnimations||gU.skipAnimations||i?.shouldSkipAnimations||s.skipAnimations)&&(d=!0,WK(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let e=UG(u.keyframes,s);if(e!==void 0){eW.update(()=>{u.onUpdate(e),u.onComplete()});return}}return s.isSync?new JG(u):new QK(u)},hq=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function gq(e){let t=hq.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}function _q(e,t,n=1){`${e}`;let[r,i]=gq(e);if(!r)return;let a=window.getComputedStyle(t).getPropertyValue(r);if(a){let e=a.trim();return _U(e)?parseFloat(e):e}return uW(i)?_q(i,t,n+1):i}function vq(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function yq(e,t,n,r){if(typeof t==`function`){let[i,a]=vq(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]=vq(r);t=t(n===void 0?e.custom:n,i,a)}return t}function bq(e,t,n){let r=e.getProps();return yq(r,t,n===void 0?r.custom:n,e)}var xq=new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,...cK]),Sq=e=>Array.isArray(e);function Cq(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,iq(n))}function wq(e){return Sq(e)?e[e.length-1]||0:e}function Tq(e,t){let{transitionEnd:n={},transition:r={},...i}=bq(e,t)||{};i={...i,...n};for(let t in i)Cq(e,t,wq(i[t]))}var Eq=e=>!!(e&&e.getVelocity);function Dq(e){return!!(Eq(e)&&e.add)}function Oq(e,t){let n=e.getValue(`willChange`);if(Dq(n))return n.add(t);if(!n&&gU.WillChange){let n=new gU.WillChange(`auto`);e.addValue(`willChange`,n),n.add(t)}}function kq(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}var Aq=`data-`+kq(`framerAppearId`);function jq(e){return e.props[Aq]}function Mq({protectedKeys:e,needsAnimating:t},n){let r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Nq(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a,transitionEnd:o,...s}=t,c=e.getDefaultTransition();a=a?aq(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&&Mq(f,t))continue;let o={delay:n,...oq(a||{},t)};u&&(o.skipAnimations=!0);let c=r.get();if(c!==void 0&&!r.isAnimating()&&!Array.isArray(i)&&i===c&&!o.velocity){eW.update(()=>r.set(i));continue}let p=!1;if(window.MotionHandoffAnimation){let n=jq(e);if(n){let e=window.MotionHandoffAnimation(n,t,eW);e!==null&&(o.startTime=e,p=!0)}}Oq(e,t);let m=l??e.shouldReduceMotion;r.start(mq(t,r,i,m&&xq.has(t)?{type:!1}:o,e,p));let h=r.animation;h&&d.push(h)}if(o){let t=()=>eW.update(()=>{o&&Tq(e,o)});d.length?Promise.all(d).then(t):t()}return d}function Pq(e,t,n={}){let r=bq(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(Nq(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(r=0)=>{let{delayChildren:a=0,staggerChildren:o,staggerDirection:s}=i;return Fq(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 Fq(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(Pq(c,t,{...o,delay:n+(typeof r==`function`?0:r)+$K(e.variantChildren,c,r,i,a)}).then(()=>c.notify(`AnimationComplete`,t)));return Promise.all(s)}function Iq(e,t,n={}){e.notify(`AnimationStart`,t);let r;if(Array.isArray(t)){let i=t.map(t=>Pq(e,t,n));r=Promise.all(i)}else if(typeof t==`string`)r=Pq(e,t,n);else{let i=typeof t==`function`?bq(e,t,n.custom):t;r=Promise.all(Nq(e,i,n))}return r.then(()=>{e.notify(`AnimationComplete`,t)})}var Lq={test:e=>e===`auto`,parse:e=>e},Rq=e=>t=>t.test(e),zq=[pW,AW,kW,OW,MW,jW,Lq],Bq=e=>zq.find(Rq(e));function Vq(e){return typeof e==`number`?e===0:e===null||e===`none`||e===`0`||yU(e)}var Hq=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function Uq(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(_W)||[];if(!r)return e;let i=n.replace(r,``),a=+!!Hq.has(t);return r!==n&&(a*=100),t+`(`+a+i+`)`}var Wq=/\b([a-z-]*)\(.*?\)/gu,Gq={...ZW,getAnimatableNone:e=>{let t=e.match(Wq);return t?t.map(Uq).join(` `):e}},Kq={...ZW,getAnimatableNone:e=>{let t=ZW.parse(e);return ZW.createTransformer(e)(t.map(e=>typeof e==`number`?0:typeof e==`object`?{...e,alpha:1}:e))}},qq={...pW,transform:Math.round},Jq={borderWidth:AW,borderTopWidth:AW,borderRightWidth:AW,borderBottomWidth:AW,borderLeftWidth:AW,borderRadius:AW,borderTopLeftRadius:AW,borderTopRightRadius:AW,borderBottomRightRadius:AW,borderBottomLeftRadius:AW,width:AW,maxWidth:AW,height:AW,maxHeight:AW,top:AW,right:AW,bottom:AW,left:AW,inset:AW,insetBlock:AW,insetBlockStart:AW,insetBlockEnd:AW,insetInline:AW,insetInlineStart:AW,insetInlineEnd:AW,padding:AW,paddingTop:AW,paddingRight:AW,paddingBottom:AW,paddingLeft:AW,paddingBlock:AW,paddingBlockStart:AW,paddingBlockEnd:AW,paddingInline:AW,paddingInlineStart:AW,paddingInlineEnd:AW,margin:AW,marginTop:AW,marginRight:AW,marginBottom:AW,marginLeft:AW,marginBlock:AW,marginBlockStart:AW,marginBlockEnd:AW,marginInline:AW,marginInlineStart:AW,marginInlineEnd:AW,fontSize:AW,backgroundPositionX:AW,backgroundPositionY:AW,rotate:OW,pathRotation:OW,rotateX:OW,rotateY:OW,rotateZ:OW,scale:hW,scaleX:hW,scaleY:hW,scaleZ:hW,skew:OW,skewX:OW,skewY:OW,distance:AW,translateX:AW,translateY:AW,translateZ:AW,x:AW,y:AW,z:AW,perspective:AW,transformPerspective:AW,opacity:mW,originX:NW,originY:NW,originZ:AW,zIndex:qq,fillOpacity:mW,strokeOpacity:mW,numOctaves:qq},Yq={...Jq,color:FW,backgroundColor:FW,outlineColor:FW,fill:FW,stroke:FW,borderColor:FW,borderTopColor:FW,borderRightColor:FW,borderBottomColor:FW,borderLeftColor:FW,filter:Gq,WebkitFilter:Gq,mask:Kq,WebkitMask:Kq},Xq=e=>Yq[e],Zq=new Set([Gq,Kq]);function Qq(e,t){let n=Xq(e);return Zq.has(n)||(n=ZW),n.getAnimatableNone?n.getAnimatableNone(t):void 0}var $q=new Set([`auto`,`none`,`0`]);function eJ(e,t,n){let r=0,i;for(;r<e.length&&!i;){let t=e[r];typeof t==`string`&&!$q.has(t)&&WW(t).values.length&&(i=e[r]),r++}if(i&&n)for(let r of t)e[r]=Qq(n,i)}var tJ=class extends SK{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(),uW(r))){let i=_q(r,t.current);i!==void 0&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!xq.has(n)||e.length!==2)return;let[r,i]=e,a=Bq(r),o=Bq(i);if(fW(r)!==fW(i)&&mK[n]){this.needsMeasurement=!0;return}if(a!==o)if(uK(a)&&uK(o))for(let t=0;t<e.length;t++){let n=e[t];typeof n==`string`&&(e[t]=parseFloat(n))}else mK[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(e[t]===null||Vq(e[t]))&&n.push(t);n.length&&eJ(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=mK[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]=mK[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()}},nJ=[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomRightRadius`,`borderBottomLeftRadius`];function rJ(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 iJ=(e,t)=>t&&typeof e==`number`?t.transform(e):e;function aJ(e){return vU(e)&&`offsetHeight`in e&&!(`ownerSVGElement`in e)}var{schedule:oJ,cancel:ade}=$U(queueMicrotask,!1),sJ={x:!1,y:!1};function cJ(){return sJ.x||sJ.y}function lJ(e){return e===`x`||e===`y`?sJ[e]?null:(sJ[e]=!0,()=>{sJ[e]=!1}):sJ.x||sJ.y?null:(sJ.x=sJ.y=!0,()=>{sJ.x=sJ.y=!1})}function uJ(e,t){let n=rJ(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function dJ(e){return!(e.pointerType===`touch`||cJ())}function fJ(e,t,n={}){let[r,i,a]=uJ(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(!dJ(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 pJ=(e,t)=>t?e===t||pJ(e,t.parentElement):!1,mJ=e=>e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1,hJ=new Set([`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`A`]);function gJ(e){return hJ.has(e.tagName)||e.isContentEditable===!0}var _J=new Set([`INPUT`,`SELECT`,`TEXTAREA`]);function vJ(e){return _J.has(e.tagName)||e.isContentEditable===!0}var yJ=new WeakSet;function bJ(e){return t=>{t.key===`Enter`&&e(t)}}function xJ(e,t){e.dispatchEvent(new PointerEvent(`pointer`+t,{isPrimary:!0,bubbles:!0}))}var SJ=(e,t)=>{let n=e.currentTarget;if(!n)return;let r=bJ(()=>{if(yJ.has(n))return;xJ(n,`down`);let e=bJ(()=>{xJ(n,`up`)});n.addEventListener(`keyup`,e,t),n.addEventListener(`blur`,()=>xJ(n,`cancel`),t)});n.addEventListener(`keydown`,r,t),n.addEventListener(`blur`,()=>n.removeEventListener(`keydown`,r),t)};function CJ(e){return mJ(e)&&!cJ()}var wJ=new WeakSet;function TJ(e,t,n={}){let[r,i,a]=uJ(e,n),o=e=>{let r=e.currentTarget;if(!CJ(e)||wJ.has(e))return;yJ.add(r),n.stopPropagation&&wJ.add(e);let a=t(r,e),o={...i,capture:!0},s=(e,t)=>{window.removeEventListener(`pointerup`,c,o),window.removeEventListener(`pointercancel`,l,o),yJ.has(r)&&yJ.delete(r),CJ(e)&&typeof a==`function`&&a(e,{success:t})},c=e=>{s(e,r===window||r===document||n.useGlobalTarget||pJ(r,e.target))},l=e=>{s(e,!1)};window.addEventListener(`pointerup`,c,o),window.addEventListener(`pointercancel`,l,o)};return r.forEach(e=>{(n.useGlobalTarget?window:e).addEventListener(`pointerdown`,o,i),aJ(e)&&(e.addEventListener(`focus`,e=>SJ(e,i)),!gJ(e)&&!e.hasAttribute(`tabindex`)&&(e.tabIndex=0))}),a}function EJ(e){return vU(e)&&`ownerSVGElement`in e}var DJ=new WeakMap,OJ,kJ=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+`Size`]:EJ(r)&&`getBBox`in r?r.getBBox()[t]:r[n],AJ=kJ(`inline`,`width`,`offsetWidth`),jJ=kJ(`block`,`height`,`offsetHeight`);function MJ({target:e,borderBoxSize:t}){DJ.get(e)?.forEach(n=>{n(e,{get width(){return AJ(e,t)},get height(){return jJ(e,t)}})})}function NJ(e){e.forEach(MJ)}function PJ(){typeof ResizeObserver>`u`||(OJ=new ResizeObserver(NJ))}function FJ(e,t){OJ||PJ();let n=rJ(e);return n.forEach(e=>{let n=DJ.get(e);n||(n=new Set,DJ.set(e,n)),n.add(t),OJ?.observe(e)}),()=>{n.forEach(e=>{let n=DJ.get(e);n?.delete(t),n?.size||OJ?.unobserve(e)})}}var IJ=new Set,LJ;function RJ(){LJ=()=>{let e={get width(){return window.innerWidth},get height(){return window.innerHeight}};IJ.forEach(t=>t(e))},window.addEventListener(`resize`,LJ)}function zJ(e){return IJ.add(e),LJ||RJ(),()=>{IJ.delete(e),!IJ.size&&typeof LJ==`function`&&(window.removeEventListener(`resize`,LJ),LJ=void 0)}}function BJ(e,t){return typeof e==`function`?zJ(e):FJ(e,t)}var VJ={value:null,addProjectionMetrics:null};function HJ(e){return EJ(e)&&e.tagName===`svg`}var UJ=[...zq,FW,ZW],WJ=e=>UJ.find(Rq(e)),GJ=()=>({translate:0,scale:1,origin:0,originPoint:0}),KJ=()=>({x:GJ(),y:GJ()}),qJ=()=>({min:0,max:0}),JJ=()=>({x:qJ(),y:qJ()}),YJ=new WeakMap;function XJ(e){return typeof e==`object`&&!!e&&typeof e.start==`function`}function ZJ(e){return typeof e==`string`||Array.isArray(e)}var QJ=[`animate`,`whileInView`,`whileFocus`,`whileHover`,`whileTap`,`whileDrag`,`exit`],$J=[`initial`,...QJ];function eY(e){return XJ(e.animate)||$J.some(t=>ZJ(e[t]))}function tY(e){return!!(eY(e)||e.variants)}function nY(e,t,n){for(let r in t){let i=t[r],a=n[r];if(Eq(i))e.addValue(r,i);else if(Eq(a))e.addValue(r,iq(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,iq(t===void 0?i:t,{owner:e}))}}for(let r in n)t[r]===void 0&&e.removeValue(r);return t}var rY={current:null},iY={current:!1},aY=typeof window<`u`;function oY(){if(iY.current=!0,aY)if(window.matchMedia){let e=window.matchMedia(`(prefers-reduced-motion)`),t=()=>rY.current=e.matches;e.addEventListener(`change`,t),t()}else rY.current=!1}var sY=[`AnimationStart`,`AnimationComplete`,`Update`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`],cY={};function lY(e){cY=e}function uY(){return cY}var dY=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=SK,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=oW.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,eW.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=eY(t),this.isVariantNode=tY(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&&Eq(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,YJ.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:(iY.current||oY(),this.shouldReduceMotion=rY.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(),tW(this.notifyUpdate),tW(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&&GK.has(e)&&this.current instanceof HTMLElement){let{factory:n,keyframes:r,times:i,ease:a,duration:o}=t.accelerate,s=new FK({element:this.current,name:e,keyframes:r,times:i,ease:a,duration:TU(o)}),c=n(s);this.valueSubscriptions.set(e,()=>{c(),s.cancel()});return}let n=lK.has(e);n&&this.onBindTransform&&this.onBindTransform();let r=t.on(`change`,t=>{this.latestValues[e]=t,this.props.onUpdate&&eW.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 cY){let t=cY[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):JJ()}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<sY.length;t++){let n=sY[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=nY(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=iq(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`&&(_U(n)||yU(n))?n=parseFloat(n):!WJ(n)&&ZW.test(t)&&(n=Qq(e,t)),this.setBaseTarget(e,Eq(n)?n.get():n)),Eq(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=yq(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&&!Eq(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 wU),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){oJ.render(this.render)}},fY=class extends dY{constructor(){super(...arguments),this.KeyframeResolver=tJ}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;Eq(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}},pY=class{constructor(e){this.isMounted=!1,this.node=e}update(){}};function mY({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function hY({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function gY(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 _Y(e){return e===void 0||e===1}function vY({scale:e,scaleX:t,scaleY:n}){return!_Y(e)||!_Y(t)||!_Y(n)}function yY(e){return vY(e)||bY(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function bY(e){return xY(e.x)||xY(e.y)}function xY(e){return e&&e!==`0%`}function SY(e,t,n){return n+t*(e-n)}function CY(e,t,n,r,i){return i!==void 0&&(e=SY(e,i,r)),SY(e,n,r)+t}function wY(e,t=0,n=1,r,i){e.min=CY(e.min,t,n,r,i),e.max=CY(e.max,t,n,r,i)}function TY(e,{x:t,y:n}){wY(e.x,t.translate,t.scale,t.originPoint),wY(e.y,n.translate,n.scale,n.originPoint)}var EY=.999999999999,DY=1.0000000000001;function OY(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&&(kY(e.x,-a.scroll.offset.x),kY(e.y,-a.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,TY(e,o)),r&&yY(a.latestValues)&&MY(e,a.latestValues,a.layout?.layoutBox))}t.x<DY&&t.x>EY&&(t.x=1),t.y<DY&&t.y>EY&&(t.y=1)}function kY(e,t){e.min+=t,e.max+=t}function AY(e,t,n,r,i=.5){wY(e,t,n,tG(e.min,e.max,i),r)}function jY(e,t){return typeof e==`string`?parseFloat(e)/100*(t.max-t.min):e}function MY(e,t,n){let r=n??e;AY(e.x,jY(t.x,r.x),t.scaleX,t.scale,t.originX),AY(e.y,jY(t.y,r.y),t.scaleY,t.scale,t.originY)}function NY(e,t){return mY(gY(e.getBoundingClientRect(),t))}function PY(e,t,n){let r=NY(e,n),{scroll:i}=t;return i&&(kY(r.x,i.offset.x),kY(r.y,i.offset.y)),r}var FY={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},IY=cK.length;function LY(e,t,n){let r=``,i=!0;for(let a=0;a<IY;a++){let o=cK[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=iJ(s,Jq[o]);if(!c){i=!1;let t=FY[o]||o;r+=`${t}(${e}) `}n&&(t[o]=e)}}let a=e.pathRotation;return a&&(i=!1,r+=`rotate(${iJ(a,Jq.pathRotation)}) `),r=r.trim(),n?r=n(t,i?``:r):i&&(r=`none`),r}function RY(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(lK.has(e)){o=!0;continue}else if(cW(e)){i[e]=n;continue}else{let t=iJ(n,Jq[e]);e.startsWith(`origin`)?(s=!0,a[e]=t):r[e]=t}}if(t.transform||(o||n?r.transform=LY(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 zY(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 BY(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var VY={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`)if(AW.test(e))e=parseFloat(e);else return e;return`${BY(e,t.target.x)}% ${BY(e,t.target.y)}%`}},HY={correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=ZW.parse(e);if(i.length>5)return r;let a=ZW.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=tG(s,c,.5);return typeof i[2+o]==`number`&&(i[2+o]/=l),typeof i[3+o]==`number`&&(i[3+o]/=l),a(i)}},UY={borderRadius:{...VY,applyTo:[...nJ]},borderTopLeftRadius:VY,borderTopRightRadius:VY,borderBottomLeftRadius:VY,borderBottomRightRadius:VY,boxShadow:HY};function WY(e,{layout:t,layoutId:n}){return lK.has(e)||e.startsWith(`origin`)||(t||n!==void 0)&&(!!UY[e]||e===`opacity`)}function GY(e,t,n){let r=e.style,i=t?.style,a={};if(!r)return a;for(let t in r)(Eq(r[t])||i&&Eq(i[t])||WY(t,e)||n?.getValue(t)?.liveStyle!==void 0)&&(a[t]=r[t]);return a}function KY(e){return window.getComputedStyle(e)}var qY=class extends fY{constructor(){super(...arguments),this.type=`html`,this.renderInstance=zY}readValueFromInstance(e,t){if(lK.has(t))return this.projection?.isProjecting?iK(t):oK(e,t);{let n=KY(e),r=(cW(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return NY(e,t)}build(e,t,n){RY(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return GY(e,t,n)}},JY={offset:`stroke-dashoffset`,array:`stroke-dasharray`},YY={offset:`strokeDashoffset`,array:`strokeDasharray`};function XY(e,t,n=1,r=0,i=!0){e.pathLength=1;let a=i?JY:YY;e[a.offset]=`${-r}`,e[a.array]=`${t} ${n}`}var ZY=[`offsetDistance`,`offsetPath`,`offsetRotate`,`offsetAnchor`];function QY(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...s},c,l,u){if(RY(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 ZY)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&&XY(d,i,a,o,!1)}var $Y=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`]),eX=e=>typeof e==`string`&&e.toLowerCase()===`svg`;function tX(e,t,n,r){zY(e,t,void 0,r);for(let n in t.attrs)e.setAttribute($Y.has(n)?n:kq(n),t.attrs[n])}function nX(e,t,n){let r=GY(e,t,n);for(let n in e)if(Eq(e[n])||Eq(t[n])){let t=cK.indexOf(n)===-1?n:`attr`+n.charAt(0).toUpperCase()+n.substring(1);r[t]=e[n]}return r}var rX=class extends fY{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=JJ}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(lK.has(t)){let e=Xq(t);return e&&e.default||0}return t=$Y.has(t)?t:kq(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return nX(e,t,n)}build(e,t,n){QY(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){tX(e,t,n,r)}mount(e){this.isSVGTag=eX(e.tagName),super.mount(e)}},iX=$J.length;function aX(e){if(!e)return;if(!e.isControllingVariants){let t=e.parent&&aX(e.parent)||{};return e.props.initial!==void 0&&(t.initial=e.props.initial),t}let t={};for(let n=0;n<iX;n++){let r=$J[n],i=e.props[r];(ZJ(i)||i===!1)&&(t[r]=i)}return t}function oX(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 sX=[...QJ].reverse(),cX=QJ.length;function lX(e){return t=>Promise.all(t.map(({animation:t,options:n})=>Iq(e,t,n)))}function uX(e){let t=lX(e),n=pX(),r=!0,i=!1,a=t=>(n,r)=>{let i=bq(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=aX(e.parent)||{},l=[],u=new Set,d={},f=1/0;for(let t=0;t<cX;t++){let p=sX[t],m=n[p],h=s[p]===void 0?c[p]:s[p],g=ZJ(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||XJ(h)||typeof h==`boolean`)continue;if(p===`exit`&&m.isActive&&_!==!0){m.prevResolvedValues&&(d={...d,...m.prevResolvedValues});continue}let y=dX(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=Sq(t)&&Sq(n)?!oX(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=bq(r,t);if(r.enteringChildren&&i){let{delayChildren:t}=i.transition||{};n.delay=$K(r.enteringChildren,e,t)}}return{animation:t,options:n}}))}if(u.size){let t={};if(typeof s.initial!=`boolean`){let n=bq(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=pX(),i=!0}}}function dX(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!oX(t,e):!1}function fX(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function pX(){return{animate:fX(!0),whileInView:fX(),whileHover:fX(),whileTap:fX(),whileDrag:fX(),whileFocus:fX(),exit:fX()}}function mX(e,t){e.min=t.min,e.max=t.max}function hX(e,t){mX(e.x,t.x),mX(e.y,t.y)}function gX(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}var _X=.9999,vX=1.0001,yX=-.01,bX=.01;function xX(e){return e.max-e.min}function SX(e,t,n){return Math.abs(e-t)<=n}function CX(e,t,n,r=.5){e.origin=r,e.originPoint=tG(t.min,t.max,e.origin),e.scale=xX(n)/xX(t),e.translate=tG(n.min,n.max,e.origin)-e.originPoint,(e.scale>=_X&&e.scale<=vX||isNaN(e.scale))&&(e.scale=1),(e.translate>=yX&&e.translate<=bX||isNaN(e.translate))&&(e.translate=0)}function wX(e,t,n,r){CX(e.x,t.x,n.x,r?r.originX:void 0),CX(e.y,t.y,n.y,r?r.originY:void 0)}function TX(e,t,n,r=0){e.min=(r?tG(n.min,n.max,r):n.min)+t.min,e.max=e.min+xX(t)}function EX(e,t,n,r){TX(e.x,t.x,n.x,r?.x),TX(e.y,t.y,n.y,r?.y)}function DX(e,t,n,r=0){let i=r?tG(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+xX(t)}function OX(e,t,n,r){DX(e.x,t.x,n.x,r?.x),DX(e.y,t.y,n.y,r?.y)}function kX(e,t,n,r,i){return e-=t,e=SY(e,1/n,r),i!==void 0&&(e=SY(e,1/i,r)),e}function AX(e,t=0,n=1,r=.5,i,a=e,o=e){if(kW.test(t)&&(t=parseFloat(t),t=tG(o.min,o.max,t/100)-o.min),typeof t!=`number`)return;let s=tG(a.min,a.max,r);e===a&&(s-=t),e.min=kX(e.min,t,n,s,i),e.max=kX(e.max,t,n,s,i)}function jX(e,t,[n,r,i],a,o){AX(e,t[n],t[r],t[i],t.scale,a,o)}var MX=[`x`,`scaleX`,`originX`],NX=[`y`,`scaleY`,`originY`];function PX(e,t,n,r){jX(e.x,t,MX,n?n.x:void 0,r?r.x:void 0),jX(e.y,t,NX,n?n.y:void 0,r?r.y:void 0)}function FX(e){return e.translate===0&&e.scale===1}function IX(e){return FX(e.x)&&FX(e.y)}function LX(e,t){return e.min===t.min&&e.max===t.max}function RX(e,t){return LX(e.x,t.x)&&LX(e.y,t.y)}function zX(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function BX(e,t){return zX(e.x,t.x)&&zX(e.y,t.y)}function VX(e){return xX(e.x)/xX(e.y)}function HX(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function UX(e){return[e(`x`),e(`y`)]}function WX(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 GX=nJ.length,KX=e=>typeof e==`string`?parseFloat(e):e,qX=e=>typeof e==`number`||AW.test(e);function JX(e,t,n,r,i,a){i?(e.opacity=tG(0,n.opacity??1,XX(r)),e.opacityExit=tG(t.opacity??1,0,ZX(r))):a&&(e.opacity=tG(t.opacity??1,n.opacity??1,r));for(let i=0;i<GX;i++){let a=nJ[i],o=YX(t,a),s=YX(n,a);o===void 0&&s===void 0||(o||=0,s||=0,o===0||s===0||qX(o)===qX(s)?(e[a]=Math.max(tG(KX(o),KX(s),r),0),(kW.test(s)||kW.test(o))&&(e[a]+=`%`)):e[a]=s)}(t.rotate||n.rotate)&&(e.rotate=tG(t.rotate||0,n.rotate||0,r))}function YX(e,t){return e[t]===void 0?e.borderRadius:e[t]}var XX=QX(0,.5,BU),ZX=QX(.5,.95,xU);function QX(e,t,n){return r=>r<e?0:r>t?1:n(CU(e,t,r))}function $X(e,t,n){let r=Eq(e)?e:iq(e);return r.start(mq(``,r,t,n)),r.animation}function eZ(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}var tZ=(e,t)=>e.depth-t.depth,nZ=class{constructor(){this.children=[],this.isDirty=!1}add(e){pU(this.children,e),this.isDirty=!0}remove(e){mU(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(tZ),this.isDirty=!1,this.children.forEach(e)}};function rZ(e,t){let n=oW.now(),r=({timestamp:i})=>{let a=i-n;a>=t&&(tW(r),e(a-t))};return eW.setup(r,!0),()=>tW(r)}function iZ(e){return Eq(e)?e.get():e}var aZ=class{constructor(){this.members=[]}add(e){pU(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&&(mU(this.members,n),n.unmount())}e.scheduleRender()}remove(e){if(mU(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)}},oZ={hasAnimatedSinceResize:!0,hasEverUpdated:!1},sZ={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},cZ=[``,`X`,`Y`,`Z`],lZ=1e3,uZ=0;function dZ(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function fZ(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let n=jq(t);if(window.MotionHasOptimisedAnimation(n,`transform`)){let{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,`transform`,eW,!(t||r))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&fZ(r)}function pZ({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=t?.()){this.id=uZ++,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,VJ.value&&(sZ.nodes=sZ.calculatedTargetDeltas=sZ.calculatedProjections=0),this.nodes.forEach(gZ),this.nodes.forEach(TZ),this.nodes.forEach(EZ),this.nodes.forEach(_Z),VJ.addProjectionMetrics&&VJ.addProjectionMetrics(sZ)},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 nZ)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new wU),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=EJ(t)&&!HJ(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;eW.read(()=>{r=window.innerWidth}),e(t,()=>{let e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n&&n(),n=rZ(i,250),oZ.hasAnimatedSinceResize&&(oZ.hasAnimatedSinceResize=!1,this.nodes.forEach(wZ)))})}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()||NZ,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=i.getProps(),c=!this.targetLayout||!BX(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={...oq(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||wZ(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(),tW(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(DZ),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&&fZ(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(bZ),this.nodes.forEach(yZ);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(xZ);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(SZ),this.nodes.forEach(CZ),this.nodes.forEach(mZ),this.nodes.forEach(hZ)):this.nodes.forEach(xZ),this.clearAllSnapshots();let e=oW.now();nW.delta=hU(0,1e3/60,e-nW.timestamp),nW.timestamp=e,nW.isProcessing=!0,rW.update.process(nW),rW.preRender.process(nW),rW.render.process(nW),nW.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,oJ.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(vZ),this.sharedNodes.forEach(OZ)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,eW.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){eW.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!xX(this.snapshot.measuredBox.x)&&!xX(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||=JJ(),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&&!IX(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,``):void 0,a=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||yY(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)),LZ(n),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return JJ();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(zZ))){let{scroll:e}=this.root;e&&(kY(t.x,e.offset.x),kY(t.y,e.offset.y))}return t}removeElementScroll(e){let t=JJ();if(hX(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&&hX(t,e),kY(t.x,i.offset.x),kY(t.y,i.offset.y))}return t}applyTransform(e,t=!1,n){let r=n||JJ();hX(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&&(kY(r.x,-n.scroll.offset.x),kY(r.y,-n.scroll.offset.y)),yY(n.latestValues)&&MY(r,n.latestValues,n.layout?.layoutBox)}return yY(this.latestValues)&&MY(r,this.latestValues,this.layout?.layoutBox),r}removeTransform(e){let t=JJ();hX(t,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!yY(n.latestValues))continue;let r;n.instance&&(vY(n.latestValues)&&n.updateSnapshot(),r=JJ(),hX(r,n.measurePageBox())),PX(t,n.latestValues,n.snapshot?.layoutBox,r)}return yY(this.latestValues)&&PX(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||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!==nW.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=nW.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=JJ(),this.targetWithTransforms=JJ()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),EX(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):hX(this.target,this.layout.layoutBox),TY(this.target,this.targetDelta)):hX(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),VJ.value&&sZ.calculatedTargetDeltas++)}getClosestProjectingParent(){if(!(!this.parent||vY(this.parent.latestValues)||bY(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=JJ(),this.relativeTargetOrigin=JJ(),OX(this.relativeTargetOrigin,t,n,this.options.layoutAnchor||void 0),hX(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===nW.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;hX(this.layoutCorrected,this.layout.layoutBox);let a=this.treeScale.x,o=this.treeScale.y;OY(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=JJ());let{target:s}=e;if(!s){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(gX(this.prevProjectionDelta.x,this.projectionDelta.x),gX(this.prevProjectionDelta.y,this.projectionDelta.y)),wX(this.projectionDelta,this.layoutCorrected,s,this.latestValues),(this.treeScale.x!==a||this.treeScale.y!==o||!HX(this.projectionDelta.x,this.prevProjectionDelta.x)||!HX(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners(`projectionUpdate`,s)),VJ.value&&sZ.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=KJ(),this.projectionDelta=KJ(),this.projectionDeltaWithTransform=KJ()}setAnimationOrigin(e,t=!1,n){let r=this.snapshot,i=r?r.latestValues:{},a={...this.latestValues},o=KJ();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let s=JJ(),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(MZ));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=tG(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=tG(e.y.scale,1,n),o.y.origin=e.y.origin,o.y.originPoint=e.y.originPoint):(kZ(o.x,e.x,n),kZ(o.y,e.y,n)),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(OX(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),jZ(this.relativeTarget,this.relativeTargetOrigin,s,n),f&&RX(this.relativeTarget,f)&&(this.isProjectionDirty=!1),f||=JJ(),hX(f,this.relativeTarget)),c&&(this.animationValues=a,JX(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&&=(tW(this.pendingAnimation),void 0),this.pendingAnimation=eW.update(()=>{oZ.hasAnimatedSinceResize=!0,this.motionValue||=iq(0),this.motionValue.jump(0,!1),this.currentAnimation=$X(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{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(lZ),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&&RZ(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||JJ();let t=xX(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;let r=xX(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}hX(t,n),MY(t,i),wX(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new aZ),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}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&&dZ(`z`,e,r,this.animationValues);for(let t=0;t<cZ.length;t++)dZ(`rotate${cZ[t]}`,e,r,this.animationValues),dZ(`skew${cZ[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=iZ(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=iZ(t?.pointerEvents)||``),this.hasProjected&&!yY(this.latestValues)&&(e.transform=n?n({},``):`none`,this.hasProjected=!1);return}e.visibility=``;let i=r.animationValues||r.latestValues;this.applyTransformsToTarget();let a=WX(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 UY){if(i[t]===void 0)continue;let{correct:n,applyTo:o,isCSSVariable:s}=UY[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?iZ(t?.pointerEvents)||``:`none`)}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(yZ),this.root.sharedNodes.clear()}}}function mZ(e){e.updateLayout()}function hZ(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`)UX(e=>{let r=a?t.measuredBox[e]:t.layoutBox[e],i=xX(r);r.min=n[e].min,r.max=r.min+i});else if(i===`x`||i===`y`){let e=i===`x`?`y`:`x`;mX(a?t.measuredBox[e]:t.layoutBox[e],n[e])}else RZ(i,t.layoutBox,n)&&UX(r=>{let i=a?t.measuredBox[r]:t.layoutBox[r],o=xX(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=KJ();wX(o,n,t.layoutBox);let s=KJ();a?wX(s,e.applyTransform(r,!0),t.measuredBox):wX(s,n,t.layoutBox);let c=!IX(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=JJ();OX(s,t.layoutBox,i.layoutBox,o);let c=JJ();OX(c,n,a.layoutBox,o),BX(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 gZ(e){VJ.value&&sZ.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 _Z(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function vZ(e){e.clearSnapshot()}function yZ(e){e.clearMeasurements()}function bZ(e){e.isLayoutDirty=!0,e.updateLayout()}function xZ(e){e.isLayoutDirty=!1}function SZ(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function CZ(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify(`BeforeLayoutMeasure`),e.resetTransform()}function wZ(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function TZ(e){e.resolveTargetDelta()}function EZ(e){e.calcProjection()}function DZ(e){e.resetSkewAndRotation()}function OZ(e){e.removeLeadSnapshot()}function kZ(e,t,n){e.translate=tG(t.translate,0,n),e.scale=tG(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function AZ(e,t,n,r){e.min=tG(t.min,n.min,r),e.max=tG(t.max,n.max,r)}function jZ(e,t,n,r){AZ(e.x,t.x,n.x,r),AZ(e.y,t.y,n.y,r)}function MZ(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var NZ={duration:.45,ease:[.4,0,.1,1]},PZ=e=>typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),FZ=PZ(`applewebkit/`)&&!PZ(`chrome/`)?Math.round:xU;function IZ(e){e.min=FZ(e.min),e.max=FZ(e.max)}function LZ(e){IZ(e.x),IZ(e.y)}function RZ(e,t,n){return e===`position`||e===`preserve-aspect`&&!SX(VX(t),VX(n),.2)}function zZ(e){return e!==e.root&&e.scroll?.wasRoot}var BZ=pZ({attachResizeListener:(e,t)=>eZ(e,`resize`,t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),VZ={current:void 0},HZ=pZ({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!VZ.current){let e=new BZ({});e.mount(window),e.setOptions({layoutScroll:!0}),VZ.current=e}return VZ.current},resetTransform:(e,t)=>{e.style.transform=t===void 0?`none`:t},checkIsScrollRoot:e=>window.getComputedStyle(e).position===`fixed`}),UZ=(0,b.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:`never`});function WZ(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function GZ(...e){return t=>{let n=!1,r=e.map(e=>{let r=WZ(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():WZ(e[t],null)}}}}function KZ(...e){return b.useCallback(GZ(...e),e)}var qZ=class extends b.Component{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if(aJ(t)&&e.isPresent&&!this.props.isPresent&&this.props.pop!==!1){let e=t.offsetParent,n=aJ(e)&&e.offsetWidth||0,r=aJ(e)&&e.offsetHeight||0,i=getComputedStyle(t),a=this.props.sizeRef.current;a.height=parseFloat(i.height),a.width=parseFloat(i.width),a.top=t.offsetTop,a.left=t.offsetLeft,a.right=n-a.width-a.left,a.bottom=r-a.height-a.top,a.direction=i.direction}return null}componentDidUpdate(){}render(){return this.props.children}};function JZ({children:e,isPresent:t,anchorX:n,anchorY:r,root:i,pop:a}){let o=(0,b.useId)(),s=(0,b.useRef)(null),c=(0,b.useRef)({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:`ltr`}),{nonce:l}=(0,b.useContext)(UZ),u=KZ(s,e.props?.ref??e?.ref);return(0,b.useInsertionEffect)(()=>{let{width:e,height:u,top:d,left:f,right:p,bottom:m,direction:h}=c.current;if(t||a===!1||!s.current||!e||!u)return;let g=h===`rtl`,_=n===`left`?g?`right: ${p}`:`left: ${f}`:g?`left: ${f}`:`right: ${p}`,v=r===`bottom`?`bottom: ${m}`:`top: ${d}`;s.current.dataset.motionPopId=o;let y=document.createElement(`style`);l&&(y.nonce=l);let b=i??document.head;return b.appendChild(y),y.sheet&&y.sheet.insertRule(`
208
+ [data-motion-pop-id="${o}"] {
209
+ position: absolute !important;
210
+ width: ${e}px !important;
211
+ height: ${u}px !important;
212
+ ${_}px !important;
213
+ ${v}px !important;
214
+ }
215
+ `),()=>{s.current?.removeAttribute(`data-motion-pop-id`),b.contains(y)&&b.removeChild(y)}},[t]),(0,H.jsx)(qZ,{isPresent:t,childRef:s,sizeRef:c,pop:a,children:a===!1?e:b.cloneElement(e,{ref:u})})}var YZ=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:a,mode:o,anchorX:s,anchorY:c,root:l})=>{let u=uU(XZ),d=(0,b.useId)(),f=(0,b.useRef)(n),p=(0,b.useRef)(r);dU(()=>{f.current=n,p.current=r});let m=!0,h=(0,b.useMemo)(()=>(m=!1,{id:d,initial:t,isPresent:n,custom:i,onExitComplete:e=>{u.set(e,!0);for(let e of u.values())if(!e)return;r&&r()},register:e=>(u.set(e,!1),()=>{u.delete(e),!f.current&&!u.size&&p.current?.()})}),[n,u,r]);return a&&m&&(h={...h}),(0,b.useMemo)(()=>{u.forEach((e,t)=>u.set(t,!1))},[n]),b.useEffect(()=>{!n&&!u.size&&r&&r()},[n]),e=(0,H.jsx)(JZ,{pop:o===`popLayout`,isPresent:n,anchorX:s,anchorY:c,root:l,children:e}),(0,H.jsx)(fU.Provider,{value:h,children:e})};function XZ(){return new Map}function ZZ(e=!0){let t=(0,b.useContext)(fU);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 QZ=e=>e.key||``;function $Z(e){let t=[];return b.Children.forEach(e,e=>{(0,b.isValidElement)(e)&&t.push(e)}),t}var eQ=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:a=`sync`,propagate:o=!1,anchorX:s=`left`,anchorY:c=`top`,root:l})=>{let[u,d]=ZZ(o),f=(0,b.useMemo)(()=>$Z(e),[e]),p=o&&!u?[]:f.map(QZ),m=(0,b.useRef)(!0),h=(0,b.useRef)(f),g=uU(()=>new Map),_=(0,b.useRef)(new Set),[v,y]=(0,b.useState)(f),[x,S]=(0,b.useState)(f);dU(()=>{m.current=!1,h.current=f;for(let e=0;e<x.length;e++){let t=QZ(x[e]);p.includes(t)?(g.delete(t),_.current.delete(t)):g.get(t)!==!0&&g.set(t,!1)}},[x,p.length,p.join(`-`)]);let C=[];if(f!==v){let e=[...f];for(let t=0;t<x.length;t++){let n=x[t],r=QZ(n);p.includes(r)||(e.splice(t,0,n),C.push(n))}return a===`wait`&&C.length&&(e=C),S($Z(e)),y(f),null}let{forceRender:w}=(0,b.useContext)(lU);return(0,H.jsx)(H.Fragment,{children:x.map(e=>{let v=QZ(e),y=o&&!u?!1:f===x||p.includes(v);return(0,H.jsx)(YZ,{isPresent:y,initial:!m.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:a,root:l,onExitComplete:y?void 0:()=>{if(_.current.has(v))return;if(g.has(v))_.current.add(v),g.set(v,!0);else return;let e=!0;g.forEach(t=>{t||(e=!1)}),e&&(w?.(),S(h.current),o&&d?.(),r&&r())},anchorX:s,anchorY:c,children:e},v)})})},tQ=(0,b.createContext)({strict:!1}),nQ={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`]},rQ=!1;function iQ(){if(rQ)return;let e={};for(let t in nQ)e[t]={isEnabled:e=>nQ[t].some(t=>!!e[t])};lY(e),rQ=!0}function aQ(){return iQ(),uY()}function oQ(e){let t=aQ();for(let n in e)t[n]={...t[n],...e[n]};lY(t)}var sQ=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 cQ(e){return e.startsWith(`while`)||e.startsWith(`drag`)&&e!==`draggable`||e.startsWith(`layout`)||e.startsWith(`onTap`)||e.startsWith(`onPan`)||e.startsWith(`onLayout`)||sQ.has(e)}var lQ=c({default:()=>uQ}),uQ,dQ=o((()=>{throw uQ={},Error(`Could not resolve "@emotion/is-prop-valid" imported by "framer-motion". Is it installed?`)})),fQ=e=>!cQ(e);function pQ(e){typeof e==`function`&&(fQ=t=>t.startsWith(`on`)?!cQ(t):e(t))}try{pQ((dQ(),d(lQ)).default)}catch{}function mQ(e,t,n){let r={};for(let i in e)i===`values`&&typeof e.values==`object`||Eq(e[i])||(fQ(i)||n===!0&&cQ(i)||!t&&!cQ(i)||e.draggable&&i.startsWith(`onDrag`))&&(r[i]=e[i]);return r}var hQ=(0,b.createContext)({});function gQ(e,t){if(eY(e)){let{initial:t,animate:n}=e;return{initial:t===!1||ZJ(t)?t:void 0,animate:ZJ(n)?n:void 0}}return e.inherit===!1?{}:t}function _Q(e){let{initial:t,animate:n}=gQ(e,(0,b.useContext)(hQ));return(0,b.useMemo)(()=>({initial:t,animate:n}),[vQ(t),vQ(n)])}function vQ(e){return Array.isArray(e)?e.join(` `):e}var yQ=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function bQ(e,t,n){for(let r in t)!Eq(t[r])&&!WY(r,n)&&(e[r]=t[r])}function xQ({transformTemplate:e},t){return(0,b.useMemo)(()=>{let n=yQ();return RY(n,t,e),Object.assign({},n.vars,n.style)},[t])}function SQ(e,t){let n=e.style||{},r={};return bQ(r,n,e),Object.assign(r,xQ(e,t)),r}function CQ(e,t){let n={},r=SQ(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 wQ=()=>({...yQ(),attrs:{}});function TQ(e,t,n,r){let i=(0,b.useMemo)(()=>{let n=wQ();return QY(n,t,eX(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};bQ(t,e.style,e),i.style={...t,...i.style}}return i}var EQ=[`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 DQ(e){return typeof e!=`string`||e.includes(`-`)?!1:!!(EQ.indexOf(e)>-1||/[A-Z]/u.test(e))}function OQ(e,t,n,{latestValues:r},i,a=!1,o){let s=(o??DQ(e)?TQ:CQ)(t,r,i,e),c=mQ(t,typeof e==`string`,a),l=e===b.Fragment?{}:{...c,...s,ref:n},{children:u}=t,d=(0,b.useMemo)(()=>Eq(u)?u.get():u,[u]);return(0,b.createElement)(e,{...l,children:d})}function kQ({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:AQ(n,r,i,e),renderState:t()}}function AQ(e,t,n,r){let i={},a=r(e,{});for(let e in a)i[e]=iZ(a[e]);let{initial:o,animate:s}=e,c=eY(e),l=tY(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`&&!XJ(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){let r=yq(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 jQ=e=>(t,n)=>{let r=(0,b.useContext)(hQ),i=(0,b.useContext)(fU),a=()=>kQ(e,t,r,i);return n?a():uU(a)},MQ=jQ({scrapeMotionValuesFromProps:GY,createRenderState:yQ}),NQ=jQ({scrapeMotionValuesFromProps:nX,createRenderState:wQ}),PQ=Symbol.for(`motionComponentSymbol`);function FQ(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 IQ=(0,b.createContext)({});function LQ(e){return e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function RQ(e,t,n,r,i,a){let{visualElement:o}=(0,b.useContext)(hQ),s=(0,b.useContext)(tQ),c=(0,b.useContext)(fU),l=(0,b.useContext)(UZ),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)(IQ);m&&!m.projection&&i&&(m.type===`html`||m.type===`svg`)&&zQ(f.current,n,i,h);let g=(0,b.useRef)(!1);(0,b.useInsertionEffect)(()=>{m&&g.current&&m.update(n,c)});let _=n[Aq],v=(0,b.useRef)(!!_&&typeof window<`u`&&!window.MotionHandoffIsComplete?.(_)&&window.MotionHasOptimisedAnimation?.(_));return dU(()=>{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 zQ(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:BQ(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&LQ(s),visualElement:e,animationType:typeof a==`string`?a:`both`,initialPromotionConfig:r,crossfade:d,layoutScroll:c,layoutRoot:l,layoutAnchor:u})}function BQ(e){if(e)return e.options.allowProjection===!1?BQ(e.parent):e.projection}function VQ(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&oQ(r);let a=n?n===`svg`:DQ(e),o=a?NQ:MQ;function s(n,s){let c,l={...(0,b.useContext)(UZ),...n,layoutId:HQ(n)},{isStatic:u}=l,d=_Q(n),f=o(n,u);if(!u&&typeof window<`u`){UQ(l,r);let t=WQ(l);c=t.MeasureLayout,d.visualElement=RQ(e,f,l,i,t.ProjectionNode,a)}return(0,H.jsxs)(hQ.Provider,{value:d,children:[c&&d.visualElement?(0,H.jsx)(c,{visualElement:d.visualElement,...l}):null,OQ(e,n,FQ(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[PQ]=e,c}function HQ({layoutId:e}){let t=(0,b.useContext)(lU).id;return t&&e!==void 0?t+`-`+e:e}function UQ(e,t){(0,b.useContext)(tQ).strict}function WQ(e){let{drag:t,layout:n}=aQ();if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function GQ(e,t){if(typeof Proxy>`u`)return VQ;let n=new Map,r=(n,r)=>VQ(n,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(i,a)=>a===`create`?r:(n.has(a)||n.set(a,VQ(a,void 0,e,t)),n.get(a))})}var KQ=(e,t)=>t.isSVG??DQ(e)?new rX(t):new qY(t,{allowProjection:e!==b.Fragment}),qQ=class extends pY{constructor(e){super(e),e.animationState||=uX(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();XJ(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?.()}},JQ=0,YQ={animation:{Feature:qQ},exit:{Feature:class extends pY{constructor(){super(...arguments),this.id=JQ++,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=bq(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 XQ(e){return{point:{x:e.pageX,y:e.pageY}}}var ZQ=e=>t=>mJ(t)&&e(t,XQ(t));function QQ(e,t,n,r){return eZ(e,t,ZQ(n),r)}var $Q=({current:e})=>e?e.ownerDocument.defaultView:null,e$=(e,t)=>Math.abs(e-t);function ode(e,t){let n=e$(e.x,t.x),r=e$(e.y,t.y);return Math.sqrt(n**2+r**2)}var t$=new Set([`auto`,`scroll`]),n$=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=r$(this.lastRawMoveEventInfo,this.transformPagePoint));let e=a$(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=ode(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;let{point:r}=e,{timestamp:i}=nW;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=r$(t,this.transformPagePoint),eW.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=a$(e.type===`pointercancel`?this.lastMoveEventInfo:r$(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,a),r&&r(e,a)},!mJ(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=a,this.contextWindow=r||window;let s=r$(XQ(e),this.transformPagePoint),{point:c}=s,{timestamp:l}=nW;this.history=[{...c,timestamp:l}];let{onSessionStart:u}=t;u&&u(e,a$(s,this.history));let d={passive:!0,capture:!0};this.removeListeners=SU(QQ(this.contextWindow,`pointermove`,this.handlePointerMove,d),QQ(this.contextWindow,`pointerup`,this.handlePointerUp,d),QQ(this.contextWindow,`pointercancel`,this.handlePointerUp,d)),o&&this.startScrollTracking(o)}startScrollTracking(e){let t=e.parentElement;for(;t;){let e=getComputedStyle(t);(t$.has(e.overflowX)||t$.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),eW.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),tW(this.updatePoint)}};function r$(e,t){return t?{point:t(e.point)}:e}function i$(e,t){return{x:e.x-t.x,y:e.y-t.y}}function a$({point:e},t){return{point:e,delta:i$(e,o$(t)),offset:i$(e,sde(t)),velocity:cde(t,.1)}}function sde(e){return e[0]}function o$(e){return e[e.length-1]}function cde(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=o$(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>TU(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>TU(t)*2&&(r=e[1]);let a=EU(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 lde(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?tG(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?tG(n,e,r.max):Math.min(e,n)),e}function s$(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 ude(e,{top:t,left:n,bottom:r,right:i}){return{x:s$(e.x,n,i),y:s$(e.y,t,r)}}function c$(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 dde(e,t){return{x:c$(e.x,t.x),y:c$(e.y,t.y)}}function fde(e,t){let n=.5,r=xX(e),i=xX(t);return i>r?n=CU(t.min,t.max-r,e.min):r>i&&(n=CU(e.min,e.max-i,t.min)),hU(0,1,n)}function pde(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 l$=.35;function mde(e=l$){return e===!1?e=0:e===!0&&(e=l$),{x:u$(e,`left`,`right`),y:u$(e,`top`,`bottom`)}}function u$(e,t,n){return{min:d$(e,t),max:d$(e,n)}}function d$(e,t){return typeof e==`number`?e:e[t]||0}var hde=new WeakMap,gde=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=JJ(),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(XQ(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=lJ(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),UX(e=>{let t=this.getAxisMotionValue(e).get()||0;if(kW.test(t)){let{projection:n}=this.visualElement;if(n&&n.layout){let r=n.layout.layoutBox[e];r&&(t=xX(r)*(parseFloat(t)/100))}}this.originPoint[e]=t}),i&&eW.update(()=>i(e,t),!1,!0),Oq(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=vde(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&&eW.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 n$(e,{onSessionStart:i,onStart:a,onMove:o,onSessionEnd:s,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,distanceThreshold:n,contextWindow:$Q(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&&eW.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||!p$(e,r,this.currentDirection))return;let i=this.getAxisMotionValue(e),a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=lde(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&&LQ(e)?this.constraints||=this.resolveRefConstraints():e&&n?this.constraints=ude(n.layoutBox,e):this.constraints=!1,this.elastic=mde(t),r!==this.constraints&&!LQ(e)&&n&&this.constraints&&!this.hasMutatedConstraints&&UX(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=pde(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!LQ(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=PY(n,r.root,this.visualElement.getTransformPagePoint()),a=dde(r.layout.layoutBox,i);if(t){let e=t(hY(a));this.hasMutatedConstraints=!!e,e&&(a=mY(e))}return a}startAnimation(e){let{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),s=this.constraints||{},c=UX(o=>{if(!p$(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 Oq(this.visualElement,e),n.start(mq(e,n,0,t,this.visualElement,!1))}stopAnimation(){UX(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){UX(t=>{let{drag:n}=this.getProps();if(!p$(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]-tG(n,a,.5)+o)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!LQ(t)||!n||!this.constraints)return;this.stopAnimation();let r={x:0,y:0};UX(e=>{let t=this.getAxisMotionValue(e);if(t&&this.constraints!==!1){let n=t.get();r[e]=fde({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(),UX(t=>{if(!p$(t,e,null))return;let n=this.getAxisMotionValue(t),{min:i,max:a}=this.constraints[t];n.set(tG(i,a,r[t]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;hde.set(this.visualElement,this);let e=this.visualElement.current,t=QQ(e,`pointerdown`,t=>{let{drag:n,dragListener:r=!0}=this.getProps(),i=t.target,a=i!==e&&vJ(i);n&&r&&!a&&this.start(t)}),n,r=()=>{let{dragConstraints:t}=this.getProps();LQ(t)&&t.current&&(this.constraints=this.resolveRefConstraints(),n||=_de(e,t.current,()=>this.scalePositionWithinConstraints()))},{projection:i}=this.visualElement,a=i.addEventListener(`measure`,r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),eW.read(r);let o=eZ(window,`resize`,()=>this.scalePositionWithinConstraints()),s=i.addEventListener(`didUpdate`,(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(UX(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=l$,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:a,dragMomentum:o}}};function f$(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function _de(e,t,n){let r=BJ(e,f$(n)),i=BJ(t,f$(n));return()=>{r(),i()}}function p$(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function vde(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}var yde=class extends pY{constructor(e){super(e),this.removeGroupControls=xU,this.removeListeners=xU,this.controls=new gde(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||xU}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()}},m$=e=>(t,n)=>{e&&eW.update(()=>e(t,n),!1,!0)},bde=class extends pY{constructor(){super(...arguments),this.removePointerDownListener=xU}onPointerDown(e){this.session=new n$(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:$Q(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:m$(e),onStart:m$(t),onMove:m$(n),onEnd:(e,t)=>{delete this.session,r&&eW.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=QQ(this.node.current,`pointerdown`,e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}},h$=!1,xde=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),h$&&i.root.didUpdate(),i.addEventListener(`animationComplete`,()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),oZ.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}),h$=!0,r||e.layoutDependency!==t||t===void 0||e.isPresent!==i?a.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?a.promote():a.relegate()||eW.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(),oJ.postRender(()=>{!n.currentAnimation&&n.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;h$=!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 g$(e){let[t,n]=ZZ(),r=(0,b.useContext)(lU);return(0,H.jsx)(xde,{...e,layoutGroup:r,switchLayoutGroup:(0,b.useContext)(IQ),isPresent:t,safeToRemove:n})}var Sde={pan:{Feature:bde},drag:{Feature:yde,ProjectionNode:HZ,MeasureLayout:g$}};function _$(e,t,n){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive(`whileHover`,n===`Start`);let i=r[`onHover`+n];i&&eW.postRender(()=>i(t,XQ(t)))}var Cde=class extends pY{mount(){let{current:e}=this.node;e&&(this.unmount=fJ(e,(e,t)=>(_$(this.node,t,`Start`),e=>_$(this.node,e,`End`))))}unmount(){}},wde=class extends pY{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=SU(eZ(this.node.current,`focus`,()=>this.onFocus()),eZ(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}};function v$(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&&eW.postRender(()=>i(t,XQ(t)))}var Tde=class extends pY{mount(){let{current:e}=this.node;if(!e)return;let{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=TJ(e,(e,t)=>(v$(this.node,t,`Start`),(e,{success:t})=>v$(this.node,e,t?`End`:`Cancel`)),{useGlobalTarget:t,stopPropagation:n?.tap===!1})}unmount(){}},y$=new WeakMap,b$=new WeakMap,Ede=e=>{let t=y$.get(e.target);t&&t(e)},Dde=e=>{e.forEach(Ede)};function Ode({root:e,...t}){let n=e||document;b$.has(n)||b$.set(n,{});let r=b$.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(Dde,{root:e,...t})),r[i]}function kde(e,t,n){let r=Ode(t);return y$.set(e,n),r.observe(e),()=>{y$.delete(e),r.unobserve(e)}}var Ade={some:0,all:1},jde=class extends pY{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:Ade[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=kde(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(Mde(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}};function Mde({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}var Nde={inView:{Feature:jde},tap:{Feature:Tde},focus:{Feature:wde},hover:{Feature:Cde}},Pde={layout:{ProjectionNode:HZ,MeasureLayout:g$}},Fde=GQ({...YQ,...Nde,...Sde,...Pde},KQ),Ide=e=>new Date(e).toLocaleTimeString(`en-US`,{hour12:!1,hour:`2-digit`,minute:`2-digit`,second:`2-digit`,fractionalSecondDigits:3}),Lde=e=>e.source===`view`?`view`:e.type===`response`?`res`:`req`,Rde={duration:.2,ease:[.4,0,.2,1]},zde={req:{label:`req`,badge:`bg-sky-100 text-sky-700`,command:`text-sky-600`},res:{label:`res`,badge:`bg-emerald-100 text-emerald-700`,command:`text-emerald-600`},view:{label:`view`,badge:`bg-violet-100 text-violet-700`,command:`text-violet-600`}},Bde=({log:e,expanded:t,onToggle:n})=>{let r=Object.keys(e.args).length>0,i=zde[Lde(e)];return(0,H.jsxs)(`div`,{children:[(0,H.jsxs)(`button`,{type:`button`,onClick:()=>r&&n(),disabled:!r,className:lN(`flex w-full items-center gap-2 border-b border-border px-2 py-1.5 text-left font-mono text-xs bg-background`,r?`cursor-pointer hover:bg-light-gray`:`cursor-default`),children:[(0,H.jsx)(Jr,{className:lN(`size-3 shrink-0 text-muted-foreground transition-transform duration-200 ease-in-out`,!r&&`invisible`,t&&`rotate-90`)}),(0,H.jsx)(`span`,{className:`min-w-[80px] shrink-0 text-muted-foreground`,children:Ide(e.timestamp)}),(0,H.jsx)(`span`,{className:lN(`shrink-0 rounded px-1 text-[10px] font-medium uppercase tracking-wide`,i.badge),children:i.label}),(0,H.jsx)(`span`,{className:lN(`min-w-[120px] shrink-0 font-semibold`,i.command),children:e.command})]}),(0,H.jsx)(eQ,{initial:!1,children:t&&r?(0,H.jsx)(Fde.div,{initial:{height:0,opacity:0},animate:{height:`auto`,opacity:1},exit:{height:0,opacity:0},transition:Rde,className:`overflow-hidden border-b border-border bg-muted/40`,children:(0,H.jsx)(`div`,{className:`px-2 py-2`,children:(0,H.jsx)(`div`,{className:`overflow-x-auto`,children:(0,H.jsx)(cU,{code:JSON.stringify(e.args,null,2)})})})},`args`):null})]})},x$=({onClose:e})=>{let t=ZD(),n=xD(t?.name??``)?.openaiLogs??[],r=bD(e=>e.clearOpenAiLogs),[i,a]=(0,b.useState)(new Set);return(0,H.jsxs)(`div`,{className:`flex h-full min-h-0 flex-col overflow-hidden border-l-2 border-border bg-background`,children:[(0,H.jsxs)(`div`,{className:`flex h-10 shrink-0 items-center justify-between border-b border-border px-3`,children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,H.jsx)(`h3`,{className:`text-sm font-semibold text-foreground`,children:`Logs`}),(0,H.jsx)(`button`,{type:`button`,"aria-label":`Clear logs`,onClick:()=>t&&r(t.name),disabled:n.length===0,className:`inline-flex size-6 cursor-pointer items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-light-gray hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-40 disabled:hover:bg-transparent disabled:hover:text-muted-foreground`,children:(0,H.jsx)(Di,{className:`size-3.5`})}),(0,H.jsx)(_N,{value:JSON.stringify(n,null,2),label:`Copy logs`,className:`inline-flex size-6 items-center justify-center rounded-md transition-colors hover:bg-light-gray focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring`})]}),e?(0,H.jsx)(`button`,{type:`button`,"aria-label":`Close logs`,onClick:e,className:`inline-flex size-6 cursor-pointer items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-light-gray hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring`,children:(0,H.jsx)(Ai,{className:`size-3.5`})}):null]}),(0,H.jsx)(`div`,{className:`min-h-0 flex-1 overflow-auto bg-light-gray`,children:n.map(e=>(0,H.jsx)(Bde,{log:e,expanded:i.has(e.id),onToggle:()=>a(t=>{let n=new Set(t);return n.has(e.id)?n.delete(e.id):n.add(e.id),n})},e.id))})]})},Vde=({expanded:e,onToggle:t})=>{let n=ZD(),r=xD(n?.name??``);if(!n||!r?.response)return null;let{response:i,openaiObject:a,durationMs:o}=r,s=JSON.stringify(i,null,2),c=new TextEncoder().encode(s).length,l=mC(i),u=hC(a?.widgetState),d=l>=dC,f=u>=fC,p=i.isError===!0;return(0,H.jsxs)(`button`,{type:`button`,"aria-expanded":e,onClick:t,className:lN(`flex h-9 w-full shrink-0 cursor-pointer items-center border-border bg-white text-left outline-none hover:bg-light-gray focus-visible:ring-1`,e?`border-b`:`border-b-2`),children:[(0,H.jsxs)(`div`,{className:`text-sm text-muted-foreground flex-1 border-r border-dashed border-light-gray-foreground/40 px-3 h-full flex items-center`,children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-2 font-medium`,children:[`Tool output`,d&&(0,H.jsx)(RB,{kind:`tool-output`})]}),(0,H.jsxs)(`div`,{className:`text-xs text-light-gray-foreground flex items-center ml-auto gap-2 font-mono`,children:[(0,H.jsx)(`span`,{className:p?`text-destructive`:`text-success`,children:p?`Error`:`OK`}),o==null?null:(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`span`,{children:`·`}),(0,H.jsxs)(`span`,{children:[o,`ms`]})]}),(0,H.jsx)(`span`,{children:`·`}),(0,H.jsx)(`span`,{children:pN(c)})]})]}),(0,H.jsxs)(`div`,{className:`text-sm text-muted-foreground flex-1 px-3 h-full flex items-center`,children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-2 font-medium`,children:[`View state`,f&&(0,H.jsx)(RB,{kind:`view-state`})]}),(0,H.jsx)(`div`,{className:`text-xs text-light-gray-foreground flex items-center ml-auto gap-2 font-mono`,children:(0,H.jsxs)(`span`,{children:[u,` token`,u>1?`s`:``]})})]})]})},Hde=()=>{let e=ZD(),t=xD(e?.name??``);if(!e||!t?.response)return null;let{response:n,openaiObject:r}=t,i=JSON.stringify(n,null,2),a=JSON.stringify(r?.widgetState??null,null,2),o=mC(n),s=hC(r?.widgetState);return(0,H.jsxs)(`div`,{className:`flex h-full min-h-0 w-full flex-row overflow-hidden bg-light-gray`,children:[(0,H.jsxs)(`section`,{className:`flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden`,children:[o>=5e3&&(0,H.jsx)(zB,{kind:`tool-output`,tokenCount:o}),(0,H.jsxs)(`div`,{className:`relative min-h-0 flex-1 overflow-auto p-3`,children:[(0,H.jsx)(_N,{value:i,label:`Copy tool output`,className:`absolute right-2 top-2 z-10`}),(0,H.jsx)(cU,{code:i})]})]}),(0,H.jsxs)(`section`,{className:`flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden border-l border-border`,children:[s>=2e4&&(0,H.jsx)(zB,{kind:`view-state`,tokenCount:s}),(0,H.jsxs)(`div`,{className:`relative min-h-0 flex-1 overflow-auto p-3`,children:[(0,H.jsx)(_N,{value:a,label:`Copy view state`,className:`absolute right-2 top-2 z-10`}),(0,H.jsx)(cU,{code:a})]})]})]})},S$=({text:e})=>(0,H.jsx)(`div`,{className:`flex h-full items-center justify-center`,children:(0,H.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e})}),C$=`devtools-tool-panel-view-logs`,w$=`view`,T$=`logs`,E$=`devtools-tool-panel-output-logs`,D$=`output`,O$=`devtools-tool-panel-header-output`,k$=`header-output`,A$=`header-view`,Ude=()=>{let e=ZD(),t=xD(e?.name??``),[n,r]=jB(`devtools-tool-panel-logs-open`,{defaultValue:!1}),[i,a]=jB(`devtools-tool-panel-header-expanded`,{defaultValue:!1}),{defaultLayout:o,onLayoutChanged:s}=Ko({id:C$,panelIds:[w$,T$],storage:localStorage}),{defaultLayout:c,onLayoutChanged:l}=Ko({id:O$,panelIds:[k$,A$],storage:localStorage}),{defaultLayout:u,onLayoutChanged:d}=Ko({id:E$,panelIds:[D$,T$],storage:localStorage}),f=ds(e=>e.displayMode),p=ds(e=>e.theme),m=ds(e=>e.setPreference),h=ds(e=>e.userAgent?.device?.type??`desktop`)===`mobile`,g=f===`fullscreen`,_=g&&!h;kB(`esc`,e=>{e.defaultPrevented||g&&m(`displayMode`,`inline`)});let v=e?._meta?.ui?.resourceUri,y=!!(e&&t?.response),x=!!v;if(!e)return(0,H.jsx)(`div`,{className:`flex h-full min-h-0 w-full flex-col overflow-hidden preview-region transition-colors duration-150 ease-out`,"data-theme":p,children:(0,H.jsx)(S$,{text:`Choose a tool from the sidebar to begin`})});if(!y)return(0,H.jsx)(`div`,{className:`flex h-full min-h-0 w-full flex-col overflow-hidden preview-region transition-colors duration-150 ease-out`,"data-theme":p});if(!x){let n=t?.response,r=JSON.stringify(n??null,null,2),i=new TextEncoder().encode(r).length,a=mC(n),o=a>=dC,s=n?.isError===!0,c=t?.durationMs;return(0,H.jsx)(`div`,{className:`flex h-full min-h-0 w-full flex-col overflow-hidden preview-region transition-colors duration-150 ease-out`,"data-theme":p,children:(0,H.jsxs)(Uo,{orientation:`horizontal`,id:E$,className:`flex min-h-0 min-w-0 flex-1 overflow-hidden`,defaultLayout:u,onLayoutChanged:d,children:[(0,H.jsx)(Xo,{id:D$,minSize:320,className:`min-h-0 min-w-0`,children:(0,H.jsxs)(`div`,{className:`flex h-full min-h-0 min-w-0 flex-col overflow-hidden`,children:[(0,H.jsxs)(`div`,{className:`flex h-9 w-full shrink-0 items-center border-b-2 border-border bg-white px-3 text-sm text-muted-foreground`,children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-2 font-medium`,children:[`Tool output`,o&&(0,H.jsx)(RB,{kind:`tool-output`})]}),(0,H.jsxs)(`div`,{className:`ml-auto flex items-center gap-2 font-mono text-xs text-light-gray-foreground`,children:[(0,H.jsx)(`span`,{className:s?`text-destructive`:`text-success`,children:s?`Error`:`OK`}),c==null?null:(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`span`,{children:`·`}),(0,H.jsxs)(`span`,{children:[c,`ms`]})]}),(0,H.jsx)(`span`,{children:`·`}),(0,H.jsx)(`span`,{children:pN(i)})]})]}),(0,H.jsxs)(`section`,{className:`flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden bg-light-gray`,children:[o&&(0,H.jsx)(zB,{kind:`tool-output`,tokenCount:a}),(0,H.jsxs)(`div`,{className:`relative min-h-0 flex-1 overflow-auto p-3`,children:[(0,H.jsx)(_N,{value:r,label:`Copy tool output`,className:`absolute right-2 top-2 z-10`}),(0,H.jsx)(cU,{code:r})]})]})]})}),(0,H.jsx)($o,{className:`w-px shrink-0 bg-border transition-colors hover:bg-ring data-separator-active:bg-ring`}),(0,H.jsx)(Xo,{id:T$,defaultSize:360,minSize:240,maxSize:640,className:`min-h-0`,children:(0,H.jsx)(x$,{},e.name)})]})})}return(0,H.jsxs)(`div`,{className:`relative flex h-full min-h-0 w-full flex-col overflow-hidden preview-region transition-colors duration-150 ease-out`,"data-theme":p,children:[(0,H.jsx)(Vde,{expanded:i??!1,onToggle:()=>a(!i)}),(0,H.jsxs)(Uo,{orientation:`vertical`,id:O$,className:`flex min-h-0 min-w-0 flex-1 overflow-hidden`,defaultLayout:c,onLayoutChanged:l,children:[i&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Xo,{id:k$,defaultSize:200,minSize:80,maxSize:500,className:`min-h-0`,children:(0,H.jsx)(Hde,{})}),(0,H.jsx)($o,{className:`h-px shrink-0 bg-border transition-colors hover:bg-ring data-separator-active:bg-ring`})]}),(0,H.jsx)(Xo,{id:A$,minSize:200,className:`min-h-0 min-w-0`,children:(0,H.jsxs)(Uo,{orientation:`horizontal`,id:C$,className:`flex h-full min-h-0 min-w-0 overflow-hidden`,defaultLayout:o,onLayoutChanged:s,children:[(0,H.jsx)(Xo,{id:w$,minSize:320,className:`min-h-0 min-w-0`,children:(0,H.jsxs)(`div`,{className:lN(`flex flex-col overflow-hidden`,g?`absolute inset-0 z-50 bg-background`:`relative h-full min-h-0`),children:[(0,H.jsx)(iz,{logsOpen:n??!1,onOpenLogs:()=>r(!0)}),(0,H.jsx)(`div`,{className:lN(`flex min-h-0 flex-1 items-center justify-center`,_?`overflow-hidden pt-3`:g?`overflow-y-auto pt-3`:`mx-3 overflow-y-auto py-3`),children:(0,H.jsx)(b.Suspense,{fallback:(0,H.jsx)(S$,{text:`Loading view…`}),children:(0,H.jsx)(gz,{})})}),g&&(0,H.jsx)(`button`,{type:`button`,"aria-label":`Exit fullscreen`,onClick:()=>m(`displayMode`,`inline`),className:`absolute right-4 top-4 inline-flex size-8 cursor-pointer items-center justify-center rounded-full border border-border bg-background text-light-gray-foreground shadow-md transition-colors hover:bg-light-gray hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring`,children:(0,H.jsx)(Ai,{className:`size-4`})})]})}),n&&!g&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)($o,{className:`w-px shrink-0 bg-border transition-colors hover:bg-ring data-separator-active:bg-ring`}),(0,H.jsx)(Xo,{id:T$,defaultSize:360,minSize:240,maxSize:640,className:`min-h-0`,children:(0,H.jsx)(x$,{onClose:()=>r(!1)},e.name)})]})]})})]})]})},Wde=Object.defineProperty,j$=(e,t)=>Wde(e,`name`,{value:t,configurable:!0});function M$(e){let t=e+`CollectionProvider`,[n,r]=kP(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=j$(e=>{let{scope:t,children:n}=e,r=b.useRef(null),a=b.useRef(new Map).current;return(0,H.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})},`CollectionProvider`);o.displayName=t;let s=e+`CollectionSlot`,c=IP(s),l=b.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=TP(t,a(s,n).collectionRef);return(0,H.jsx)(c,{ref:i,children:r})});l.displayName=s;let u=e+`CollectionItemSlot`,d=`data-radix-collection-item`,f=IP(u),p=b.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=b.useRef(null),s=TP(t,o),c=a(u,n);return b.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,H.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 j$(m,`useCollection`),[{Provider:o,Slot:l,ItemSlot:p},m,r]}j$(M$,`createCollection`);var N$=new WeakMap,P$=class e extends Map{static{j$(this,`OrderedDict`)}#e;constructor(e){super(e),this.#e=[...super.keys()],N$.set(this,!0)}set(e,t){return N$.get(this)&&(this.has(e)?this.#e[this.#e.indexOf(e)]=e:this.#e.push(e)),super.set(e,t),this}insert(e,t,n){let r=this.has(t),i=this.#e.length,a=L$(e),o=a>=0?a:i+a,s=o<0||o>=i?-1:o;if(s===this.size||r&&s===this.size-1||s===-1)return this.set(t,n),this;let c=this.size+ +!r;a<0&&o++;let l=[...this.#e],u,d=!1;for(let e=o;e<c;e++)if(o===e){let i=l[e];l[e]===t&&(i=l[e+1]),r&&this.delete(t),u=this.get(i),this.set(t,n)}else{!d&&l[e-1]===t&&(d=!0);let n=l[d?e:e-1],r=u;u=this.get(n),this.delete(n),this.set(n,r)}return this}with(t,n,r){let i=new e(this);return i.insert(t,n,r),i}before(e){let t=this.#e.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,n){let r=this.#e.indexOf(e);return r===-1?this:this.insert(r,t,n)}after(e){let t=this.#e.indexOf(e);if(t=t===-1||t===this.size-1?-1:t+1,t!==-1)return this.entryAt(t)}setAfter(e,t,n){let r=this.#e.indexOf(e);return r===-1?this:this.insert(r+1,t,n)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(e){let t=super.delete(e);return t&&this.#e.splice(this.#e.indexOf(e),1),t}deleteAt(e){let t=this.keyAt(e);return t!==void 0&&this.delete(t)}at(e){let t=F$(this.#e,e);if(t!==void 0)return this.get(t)}entryAt(e){let t=F$(this.#e,e);if(t!==void 0)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return F$(this.#e,e)}from(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.at(r)}keyFrom(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.keyAt(r)}find(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return r;n++}}findIndex(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return n;n++}return-1}filter(t,n){let r=[],i=0;for(let e of this)Reflect.apply(t,n,[e,i,this])&&r.push(e),i++;return new e(r)}map(t,n){let r=[],i=0;for(let e of this)r.push([e[0],Reflect.apply(t,n,[e,i,this])]),i++;return new e(r)}reduce(...e){let[t,n]=e,r=0,i=n??this.at(0);for(let n of this)i=r===0&&e.length===1?n:Reflect.apply(t,this,[i,n,r,this]),r++;return i}reduceRight(...e){let[t,n]=e,r=n??this.at(-1);for(let n=this.size-1;n>=0;n--){let i=this.at(n);r=n===this.size-1&&e.length===1?i:Reflect.apply(t,this,[r,i,n,this])}return r}toSorted(t){let n=[...this.entries()].sort(t);return new e(n)}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let n=this.keyAt(e),r=this.get(n);t.set(n,r)}return t}toSpliced(...t){let n=[...this.entries()];return n.splice(...t),new e(n)}slice(t,n){let r=new e,i=this.size-1;if(t===void 0)return r;t<0&&(t+=this.size),n!==void 0&&n>0&&(i=n-1);for(let e=t;e<=i;e++){let t=this.keyAt(e),n=this.get(t);r.set(t,n)}return r}every(e,t){let n=0;for(let r of this){if(!Reflect.apply(e,t,[r,n,this]))return!1;n++}return!0}some(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return!0;n++}return!1}};function F$(e,t){if(`at`in Array.prototype)return Array.prototype.at.call(e,t);let n=I$(e,t);return n===-1?void 0:e[n]}j$(F$,`at`);function I$(e,t){let n=e.length,r=L$(t),i=r>=0?r:n+r;return i<0||i>=n?-1:i}j$(I$,`toSafeIndex`);function L$(e){return e!==e||e===0?0:Math.trunc(e)}j$(L$,`toSafeInteger`);function Gde(e){let t=e+`CollectionProvider`,[n,r]=kP(t),[i,a]=n(t,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new P$,setItemMap:j$(()=>void 0,`setItemMap`)}),o=j$(({state:e,...t})=>e?(0,H.jsx)(c,{...t,state:e}):(0,H.jsx)(s,{...t}),`CollectionProvider`);o.displayName=t;let s=j$(e=>{let t=h();return(0,H.jsx)(c,{...e,state:t})},`CollectionInit`);s.displayName=t+`Init`;let c=j$(e=>{let{scope:t,children:n,state:r}=e,a=b.useRef(null),[o,s]=b.useState(null),c=TP(a,s),[l,u]=r;return b.useEffect(()=>{if(!o)return;let e=V$(()=>{});return e.observe(o,{childList:!0,subtree:!0}),()=>{e.disconnect()}},[o]),(0,H.jsx)(i,{scope:t,itemMap:l,setItemMap:u,collectionRef:c,collectionRefObject:a,collectionElement:o,children:n})},`CollectionProviderImpl`);c.displayName=t+`Impl`;let l=e+`CollectionSlot`,u=IP(l),d=b.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=TP(t,a(l,n).collectionRef);return(0,H.jsx)(u,{ref:i,children:r})});d.displayName=l;let f=e+`CollectionItemSlot`,p=IP(f),m=b.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=b.useRef(null),[s,c]=b.useState(null),l=TP(t,o,c),{setItemMap:u}=a(f,n),d=b.useRef(i);R$(d.current,i)||(d.current=i);let m=d.current;return b.useEffect(()=>{let e=m;return u(t=>s?t.has(s)?t.set(s,{...e,element:s}).toSorted(B$):(t.set(s,{...e,element:s}),t.toSorted(B$)):t),()=>{u(e=>!s||!e.has(s)?e:(e.delete(s),new P$(e)))}},[s,m,u]),(0,H.jsx)(p,{"data-radix-collection-item":``,ref:l,children:r})});m.displayName=f;function h(){return b.useState(new P$)}j$(h,`useInitCollection`);function g(t){let{itemMap:n}=a(e+`CollectionConsumer`,t);return n}return j$(g,`useCollection`),[{Provider:o,Slot:d,ItemSlot:m},{createCollectionScope:r,useCollection:g,useInitCollection:h}]}j$(Gde,`createCollection`);function R$(e,t){if(e===t)return!0;if(typeof e!=`object`||typeof t!=`object`||e==null||t==null)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||e[r]!==t[r])return!1;return!0}j$(R$,`shallowEqual`);function z$(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}j$(z$,`isElementPreceding`);function B$(e,t){return!e[1].element||!t[1].element?0:z$(e[1].element,t[1].element)?-1:1}j$(B$,`sortByDocumentPosition`);function V$(e){return new MutationObserver(t=>{for(let n of t)if(n.type===`childList`){e();return}})}j$(V$,`getChildListObserver`);var Kde=Object.defineProperty,H$=(e,t)=>Kde(e,`name`,{value:t,configurable:!0}),U$=`Collapsible`,[qde,W$]=kP(U$),[Jde,G$]=qde(U$),Yde=b.forwardRef(H$(function(e,t){let{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:a,onOpenChange:o,...s}=e,[c,l]=fI({prop:r,defaultProp:i??!1,onChange:o,caller:U$});return(0,H.jsx)(Jde,{scope:n,disabled:a,contentId:xF(),open:c,onOpenToggle:b.useCallback(()=>l(e=>!e),[l]),children:(0,H.jsx)(ZP.div,{"data-state":q$(c),"data-disabled":a?``:void 0,...s,ref:t})})},`Collapsible`)),Xde=`CollapsibleTrigger`,Zde=b.forwardRef(H$(function(e,t){let{__scopeCollapsible:n,...r}=e,i=G$(Xde,n);return(0,H.jsx)(ZP.button,{type:`button`,"aria-controls":i.open?i.contentId:void 0,"aria-expanded":i.open||!1,"data-state":q$(i.open),"data-disabled":i.disabled?``:void 0,disabled:i.disabled,...r,ref:t,onClick:gP(e.onClick,i.onOpenToggle)})},`CollapsibleTrigger`)),K$=`CollapsibleContent`,Qde=b.forwardRef(H$(function(e,t){let{forceMount:n,...r}=e,i=G$(K$,e.__scopeCollapsible);return(0,H.jsx)(QF,{present:n||i.open,children:({present:e})=>(0,H.jsx)($de,{...r,ref:t,present:e})})},`CollapsibleContent`)),$de=b.forwardRef(H$(function(e,t){let{__scopeCollapsible:n,present:r,children:i,...a}=e,o=G$(K$,n),[s,c]=b.useState(r),l=b.useRef(null),u=TP(t,l),d=b.useRef(0),f=d.current,p=b.useRef(0),m=p.current,h=o.open||s,g=b.useRef(h),_=b.useRef(void 0);return b.useEffect(()=>{let e=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(e)},[]),gF(()=>{let e=l.current;if(e){_.current=_.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration=`0s`,e.style.animationName=`none`;let t=e.getBoundingClientRect();d.current=t.height,p.current=t.width,g.current||(e.style.transitionDuration=_.current.transitionDuration,e.style.animationName=_.current.animationName),c(r)}},[o.open,r]),(0,H.jsx)(ZP.div,{"data-state":q$(o.open),"data-disabled":o.disabled?``:void 0,id:o.contentId,hidden:!h,...a,ref:u,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":m?`${m}px`:void 0,...e.style},children:h&&i})},`CollapsibleContentImpl`));function q$(e){return e?`open`:`closed`}H$(q$,`getState`);var efe=Object.defineProperty,tfe=(e,t)=>efe(e,`name`,{value:t,configurable:!0}),nfe=b.createContext(void 0);function J$(e){let t=b.useContext(nfe);return e||t||`ltr`}tfe(J$,`useDirection`);var rfe=Object.defineProperty,Y$=(e,t)=>rfe(e,`name`,{value:t,configurable:!0}),X$=`Accordion`,ife=[`Home`,`End`,`ArrowDown`,`ArrowUp`,`ArrowLeft`,`ArrowRight`],[Z$,afe,ofe]=M$(X$),[Q$,sfe]=kP(X$,[ofe,W$]),$$=W$(),cfe=b.forwardRef(Y$(function(e,t){let{type:n,...r}=e,i=r,a=r;return(0,H.jsx)(Z$.Provider,{scope:e.__scopeAccordion,children:n===`multiple`?(0,H.jsx)(ffe,{...a,ref:t}):(0,H.jsx)(dfe,{...i,ref:t})})},`Accordion`)),[e1,lfe]=Q$(X$),[t1,ufe]=Q$(X$,{collapsible:!1}),dfe=b.forwardRef(Y$(function(e,t){let{value:n,defaultValue:r,onValueChange:i=Y$(()=>{},`onValueChange`),collapsible:a=!1,...o}=e,[s,c]=fI({prop:n,defaultProp:r??``,onChange:i,caller:X$});return(0,H.jsx)(e1,{scope:e.__scopeAccordion,value:b.useMemo(()=>s?[s]:[],[s]),onItemOpen:c,onItemClose:b.useCallback(()=>a&&c(``),[a,c]),children:(0,H.jsx)(t1,{scope:e.__scopeAccordion,collapsible:a,children:(0,H.jsx)(r1,{...o,ref:t})})})},`AccordionImplSingle`)),ffe=b.forwardRef(Y$(function(e,t){let{value:n,defaultValue:r,onValueChange:i=Y$(()=>{},`onValueChange`),...a}=e,[o,s]=fI({prop:n,defaultProp:r??[],onChange:i,caller:X$}),c=b.useCallback(e=>s((t=[])=>[...t,e]),[s]),l=b.useCallback(e=>s((t=[])=>t.filter(t=>t!==e)),[s]);return(0,H.jsx)(e1,{scope:e.__scopeAccordion,value:o,onItemOpen:c,onItemClose:l,children:(0,H.jsx)(t1,{scope:e.__scopeAccordion,collapsible:!0,children:(0,H.jsx)(r1,{...a,ref:t})})})},`AccordionImplMultiple`)),[pfe,n1]=Q$(X$),r1=b.forwardRef(Y$(function(e,t){let{__scopeAccordion:n,disabled:r,dir:i,orientation:a=`vertical`,...o}=e,s=TP(b.useRef(null),t),c=afe(n),l=J$(i)===`ltr`,u=gP(e.onKeyDown,e=>{if(!ife.includes(e.key))return;let t=e.target,n=c().filter(e=>!e.ref.current?.disabled),r=n.findIndex(e=>e.ref.current===t),i=n.length;if(r===-1)return;e.preventDefault();let o=r,s=i-1,u=Y$(()=>{o=r+1,o>s&&(o=0)},`moveNext`),d=Y$(()=>{o=r-1,o<0&&(o=s)},`movePrev`);switch(e.key){case`Home`:o=0;break;case`End`:o=s;break;case`ArrowRight`:a===`horizontal`&&(l?u():d());break;case`ArrowDown`:a===`vertical`&&u();break;case`ArrowLeft`:a===`horizontal`&&(l?d():u());break;case`ArrowUp`:a===`vertical`&&d();break}n[o%i].ref.current?.focus()});return(0,H.jsx)(pfe,{scope:n,disabled:r,direction:i,orientation:a,children:(0,H.jsx)(Z$.Slot,{scope:n,children:(0,H.jsx)(ZP.div,{...o,"data-orientation":a,ref:s,onKeyDown:r?void 0:u})})})},`AccordionImpl`)),i1=`AccordionItem`,[mfe,a1]=Q$(i1),hfe=b.forwardRef(Y$(function(e,t){let{__scopeAccordion:n,value:r,...i}=e,a=n1(i1,n),o=lfe(i1,n),s=$$(n),c=xF(),l=r&&o.value.includes(r)||!1,u=a.disabled||e.disabled;return(0,H.jsx)(mfe,{scope:n,open:l,disabled:u,triggerId:c,children:(0,H.jsx)(Yde,{"data-orientation":a.orientation,"data-state":s1(l),...s,...i,ref:t,disabled:u,open:l,onOpenChange:e=>{e?o.onItemOpen(r):o.onItemClose(r)}})})},`AccordionItem`)),gfe=`AccordionHeader`,_fe=b.forwardRef(Y$(function(e,t){let{__scopeAccordion:n,...r}=e,i=n1(X$,n),a=a1(gfe,n);return(0,H.jsx)(ZP.h3,{"data-orientation":i.orientation,"data-state":s1(a.open),"data-disabled":a.disabled?``:void 0,...r,ref:t})},`AccordionHeader`)),o1=`AccordionTrigger`,vfe=b.forwardRef(Y$(function(e,t){let{__scopeAccordion:n,...r}=e,i=n1(X$,n),a=a1(o1,n),o=ufe(o1,n),s=$$(n);return(0,H.jsx)(Z$.ItemSlot,{scope:n,children:(0,H.jsx)(Zde,{"aria-disabled":a.open&&!o.collapsible||void 0,"data-orientation":i.orientation,id:a.triggerId,...s,...r,ref:t})})},`AccordionTrigger`)),yfe=`AccordionContent`,bfe=b.forwardRef(Y$(function(e,t){let{__scopeAccordion:n,...r}=e,i=n1(X$,n),a=a1(yfe,n),o=$$(n);return(0,H.jsx)(Qde,{role:`region`,"aria-labelledby":a.triggerId,"data-orientation":i.orientation,...o,...r,ref:t,style:{"--radix-accordion-content-height":`var(--radix-collapsible-content-height)`,"--radix-accordion-content-width":`var(--radix-collapsible-content-width)`,...e.style}})},`AccordionContent`));function s1(e){return e?`open`:`closed`}Y$(s1,`getState`);function xfe({...e}){return(0,H.jsx)(cfe,{"data-slot":`accordion`,...e})}function Sfe({className:e,...t}){return(0,H.jsx)(hfe,{"data-slot":`accordion-item`,className:Mr(`border-b border-border-secondary`,e),...t})}function Cfe({className:e,children:t,...n}){return(0,H.jsx)(bfe,{"data-slot":`accordion-content`,className:`overflow-hidden data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down`,...n,children:(0,H.jsx)(`div`,{className:Mr(`pb-4 type-text-sm text-muted-foreground`,e),children:t})})}var c1=!1;function wfe(){let[e,t]=b.useState(c1);return b.useEffect(()=>{c1||(c1=!0,t(!0))},[]),e}var l1=b.useSyncExternalStore;function Tfe(){return()=>{}}function Efe(){return l1(Tfe,()=>!0,()=>!1)}var Dfe=typeof l1==`function`?Efe:wfe,Ofe=Object.defineProperty,u1=(e,t)=>Ofe(e,`name`,{value:t,configurable:!0}),d1=`rovingFocusGroup.onEntryFocus`,kfe={bubbles:!1,cancelable:!0},f1=`RovingFocusGroup`,[p1,m1,Afe]=KI(f1),[jfe,h1]=dO(f1,[Afe]),[Mfe,Nfe]=jfe(f1),Pfe=b.forwardRef(u1(function(e,t){return(0,H.jsx)(p1.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,H.jsx)(p1.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,H.jsx)(Ffe,{...e,ref:t})})})},`RovingFocusGroup`)),Ffe=b.forwardRef(u1(function(e,t){let{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:l,preventScrollOnEntryFocus:u=!1,...d}=e,f=b.useRef(null),p=Ii(t,f),m=qI(a),[h,g]=oj({prop:o,defaultProp:s??null,onChange:c,caller:f1}),[_,v]=b.useState(!1),y=fO(l),x=m1(n),S=b.useRef(!1),[C,w]=b.useState(0);return b.useEffect(()=>{let e=f.current;if(e)return e.addEventListener(d1,y),()=>e.removeEventListener(d1,y)},[y]),(0,H.jsx)(Mfe,{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,H.jsx)(QD.div,{tabIndex:_||C===0?-1:0,"data-orientation":r,...d,ref:p,style:{outline:`none`,...e.style},onMouseDown:sO(e.onMouseDown,()=>{S.current=!0}),onFocus:sO(e.onFocus,e=>{let t=!S.current;if(e.target===e.currentTarget&&t&&!_){let t=new CustomEvent(d1,kfe);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=x().filter(e=>e.focusable);v1([e.find(e=>e.active),e.find(e=>e.id===h),...e].filter(Boolean).map(e=>e.ref.current),u)}}S.current=!1}),onBlur:sO(e.onBlur,()=>v(!1))})})},`RovingFocusGroupImpl`)),Ife=`RovingFocusGroupItem`,Lfe=b.forwardRef(u1(function(e,t){let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...s}=e,c=KO(),l=a||c,u=Nfe(Ife,n),d=u.currentTabStopId===l,f=m1(n),{onFocusableItemAdd:p,onFocusableItemRemove:m,currentTabStopId:h}=u,g=Dfe();return UO(()=>{if(!(!g||!r))return p(),()=>m()},[g,r,p,m]),b.useEffect(()=>{if(!(g||!r))return p(),()=>m()},[g,r,p,m]),(0,H.jsx)(p1.ItemSlot,{scope:n,id:l,focusable:r,active:i,children:(0,H.jsx)(QD.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...s,ref:t,onMouseDown:sO(e.onMouseDown,e=>{r?u.onItemFocus(l):e.preventDefault()}),onFocus:sO(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:sO(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){u.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=_1(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?y1(n,r+1):n.slice(r+1)}setTimeout(()=>v1(n))}}),children:typeof o==`function`?o({isCurrentTabStop:d,hasTabStop:h!=null}):o})})},`RovingFocusGroupItem`)),Rfe={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function g1(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}u1(g1,`getDirectionAwareKey`);function _1(e,t,n){let r=g1(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return Rfe[r]}u1(_1,`getFocusIntent`);function v1(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}u1(v1,`focusFirst`);function y1(e,t){return e.map((n,r)=>e[(t+r)%e.length])}u1(y1,`wrapArray`);var zfe=Pfe,Bfe=Lfe,Vfe=Object.defineProperty,b1=(e,t)=>Vfe(e,`name`,{value:t,configurable:!0}),x1=`Tabs`,[Hfe,Ufe]=dO(x1,[h1]);h1();var[Wfe,Gfe]=Hfe(x1),Kfe=b.forwardRef(b1(function(e,t){let{__scopeTabs:n,value:r,onValueChange:i,defaultValue:a,orientation:o=`horizontal`,dir:s,activationMode:c=`automatic`,...l}=e,u=qI(s),[d,f]=oj({prop:r,onChange:i,defaultProp:a??``,caller:x1});return(0,H.jsx)(Wfe,{scope:n,baseId:KO(),value:d,onValueChange:f,orientation:o,dir:u,activationMode:c,children:(0,H.jsx)(QD.div,{dir:u,"data-orientation":o,...l,ref:t})})},`Tabs`)),qfe=`TabsContent`,Jfe=b.forwardRef(b1(function(e,t){let{__scopeTabs:n,value:r,forceMount:i,children:a,...o}=e,s=Gfe(qfe,n),c=S1(s.baseId,r),l=C1(s.baseId,r),u=r===s.value,d=b.useRef(u);return b.useEffect(()=>{let e=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,H.jsx)(ZA,{present:i||u,children:({present:n})=>(0,H.jsx)(QD.div,{"data-state":u?`active`:`inactive`,"data-orientation":s.orientation,role:`tabpanel`,"aria-labelledby":c,hidden:!n,id:l,tabIndex:0,...o,ref:t,style:{...e.style,animationDuration:d.current?`0s`:void 0},children:n&&a})})},`TabsContent`));function S1(e,t){return`${e}-trigger-${t}`}b1(S1,`makeTriggerId`);function C1(e,t){return`${e}-content-${t}`}b1(C1,`makeContentId`);var Yfe=Kfe,Xfe=Jfe;function Zfe({className:e,orientation:t=`horizontal`,...n}){return(0,H.jsx)(Yfe,{"data-slot":`tabs`,"data-orientation":t,orientation:t,className:Mr(`group/tabs flex gap-4`,`data-[orientation=horizontal]:flex-col`,`data-[orientation=vertical]:flex-row`,e),...n})}(0,b.createContext)(`default`);function w1({className:e,...t}){return(0,H.jsx)(Xfe,{"data-slot":`tabs-content`,className:Mr(`flex-1 outline-none`,e),...t})}(0,b.createContext)({orientation:`horizontal`,variant:`line`});function T1(e){return typeof e!=`object`||!e||typeof e.lastModified==`number`&&typeof File<`u`&&e instanceof File||typeof e.getMonth==`function`&&typeof Date<`u`&&e instanceof Date?!1:!Array.isArray(e)}function Qfe(e){return e.additionalItems===!0&&console.warn(`additionalItems=true is currently not supported`),T1(e.additionalItems)}function E1(e){if(e===``)return;if(e===null)return null;if(/\.$/.test(e)||/\.0$/.test(e)||/\.\d*0$/.test(e))return e;let t=Number(e);return typeof t==`number`&&!Number.isNaN(t)?t:e}var D1=Symbol(`__additional_property`),$fe=`additionalProperties`,O1=`allOf`,k1=`anyOf`,A1=`const`,j1=`default`,M1=`__errors`,N1=`items`,epe=`_$junk_option_schema_id$_`,P1=`$name`,F1=`oneOf`,I1=`properties`,L1=`readonly`,tpe=`required`,R1=`submitButtonOptions`,z1=`$ref`,B1=Symbol(`__rjsf_ref`),V1=Symbol(`__rjsf_ref_cycle`),H1=`root`,npe=[`discriminator`,`propertyName`],rpe=`formContext`,ipe=`layoutGridLookupMap`,U1=`__rjsf`,W1=`${U1}_additionalProperties`,G1=`${U1}_rootSchema`,K1=`ui:options`,q1=`ui:globalOptions`;function J1(e={},t={}){return e?Object.keys(e).filter(e=>e.startsWith(`ui:`)).reduce((t,n)=>{let r=e[n];return n===`ui:widget`&&T1(r)?(console.error(`Setting options via ui:widget object is no longer supported, use ui:options instead`),t):n===`ui:options`&&T1(r)?{...t,...r}:{...t,[n.substring(3)]:r}},{...t}):{...t}}function Y1(e,t={},n){if(!(e.additionalProperties||e.patternProperties))return!1;let{expandable:r=!0}=J1(t);return r===!1?r:e.maxProperties!==void 0&&n?Object.keys(n).length<e.maxProperties:!0}function X1(e){let t={[M1]:[],addError(e){this[M1].push(e)}};if(Array.isArray(e))return e.reduce((e,t,n)=>({...e,[n]:X1(t)}),t);if(xT(e)){let n=e;return Object.keys(n).reduce((e,t)=>({...e,[t]:X1(n[t])}),t)}return t}var{getOwnPropertyNames:ape,getOwnPropertySymbols:ope}=Object,{hasOwnProperty:spe}=Object.prototype;function Z1(e,t){return function(n,r,i){return e(n,r,i)&&t(n,r,i)}}function Q1(e){return function(t,n,r){if(!t||!n||typeof t!=`object`||typeof n!=`object`)return e(t,n,r);let{cache:i}=r,a=i.get(t),o=i.get(n);if(a&&o)return a===n&&o===t;i.set(t,n),i.set(n,t);let s=e(t,n,r);return i.delete(t),i.delete(n),s}}function $1(e){return ape(e).concat(ope(e))}var cpe=Object.hasOwn||((e,t)=>spe.call(e,t)),lpe=`__v`,upe=`__o`,dpe=`_owner`,{getOwnPropertyDescriptor:e0,keys:t0}=Object,n0=Object.is||function(e,t){return e===t?e!==0||1/e==1/t:e!==e&&t!==t};function fpe(e,t){return e===t}function ppe(e,t){return e.byteLength===t.byteLength&&o0(new Uint8Array(e),new Uint8Array(t))}function mpe(e,t,n){let r=e.length;if(t.length!==r)return!1;for(;r-->0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function hpe(e,t){return e.byteLength===t.byteLength&&o0(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function gpe(e,t){return n0(e.getTime(),t.getTime())}function _pe(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function r0(e,t,n){let r=e.size;if(r!==t.size)return!1;if(!r)return!0;let i=Array(r),a=e.entries(),o,s,c=0;for(;(o=a.next())&&!o.done;){let r=t.entries(),a=!1,l=0;for(;(s=r.next())&&!s.done;){if(i[l]){l++;continue}let r=o.value,u=s.value;if(n.equals(r[0],u[0],c,l,e,t,n)&&n.equals(r[1],u[1],r[0],u[0],e,t,n)){a=i[l]=!0;break}l++}if(!a)return!1;c++}return!0}function vpe(e,t,n){let r=t0(e),i=r.length;if(t0(t).length!==i)return!1;for(;i-->0;)if(!s0(e,t,n,r[i]))return!1;return!0}function i0(e,t,n){let r=$1(e),i=r.length;if($1(t).length!==i)return!1;let a,o,s;for(;i-->0;)if(a=r[i],!s0(e,t,n,a)||(o=e0(e,a),s=e0(t,a),(o||s)&&(!o||!s||o.configurable!==s.configurable||o.enumerable!==s.enumerable||o.writable!==s.writable)))return!1;return!0}function ype(e,t){return n0(e.valueOf(),t.valueOf())}function bpe(e,t){return e.source===t.source&&e.flags===t.flags}function a0(e,t,n){let r=e.size;if(r!==t.size)return!1;if(!r)return!0;let i=Array(r),a=e.values(),o,s;for(;(o=a.next())&&!o.done;){let r=t.values(),a=!1,c=0;for(;(s=r.next())&&!s.done;){if(!i[c]&&n.equals(o.value,s.value,o.value,s.value,e,t,n)){a=i[c]=!0;break}c++}if(!a)return!1}return!0}function o0(e,t){let n=e.byteLength;if(t.byteLength!==n||e.byteOffset!==t.byteOffset)return!1;for(;n-->0;)if(e[n]!==t[n])return!1;return!0}function xpe(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function s0(e,t,n,r){return(r===dpe||r===upe||r===lpe)&&(e.$$typeof||t.$$typeof)?!0:cpe(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}var Spe=Object.prototype.toString;function Cpe(e){let t=Dpe(e),{areArraysEqual:n,areDatesEqual:r,areFunctionsEqual:i,areMapsEqual:a,areNumbersEqual:o,areObjectsEqual:s,areRegExpsEqual:c,areSetsEqual:l,getUnsupportedCustomComparator:u}=e;return function(e,d,f){if(e===d)return!0;if(e==null||d==null)return!1;let p=typeof e;if(p!==typeof d)return!1;if(p!==`object`)return p===`number`||p===`bigint`?o(e,d,f):p===`function`&&i(e,d,f);let m=e.constructor;if(m!==d.constructor)return!1;if(m===Object)return s(e,d,f);if(m===Array)return n(e,d,f);if(m===Date)return r(e,d,f);if(m===RegExp)return c(e,d,f);if(m===Map)return a(e,d,f);if(m===Set)return l(e,d,f);if(m===Promise)return!1;if(Array.isArray(e))return n(e,d,f);let h=Spe.call(e),g=t[h];if(g)return g(e,d,f);let _=u&&u(e,d,f,h);return _?_(e,d,f):!1}}function wpe({circular:e,createCustomConfig:t,strict:n}){let r={areArrayBuffersEqual:ppe,areArraysEqual:n?i0:mpe,areDataViewsEqual:hpe,areDatesEqual:gpe,areErrorsEqual:_pe,areFunctionsEqual:fpe,areMapsEqual:n?Z1(r0,i0):r0,areNumbersEqual:n0,areObjectsEqual:n?i0:vpe,arePrimitiveWrappersEqual:ype,areRegExpsEqual:bpe,areSetsEqual:n?Z1(a0,i0):a0,areTypedArraysEqual:n?Z1(o0,i0):o0,areUrlsEqual:xpe,getUnsupportedCustomComparator:void 0};if(t&&(r=Object.assign({},r,t(r))),e){let e=Q1(r.areArraysEqual),t=Q1(r.areMapsEqual),n=Q1(r.areObjectsEqual),i=Q1(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:e,areMapsEqual:t,areObjectsEqual:n,areSetsEqual:i})}return r}function Tpe(e){return function(t,n,r,i,a,o,s){return e(t,n,s)}}function Epe({circular:e,comparator:t,createState:n,equals:r,strict:i}){if(n)return function(a,o){let{cache:s=e?new WeakMap:void 0,meta:c}=n();return t(a,o,{cache:s,equals:r,meta:c,strict:i})};if(e)return function(e,n){return t(e,n,{cache:new WeakMap,equals:r,meta:void 0,strict:i})};let a={cache:void 0,equals:r,meta:void 0,strict:i};return function(e,n){return t(e,n,a)}}function Dpe({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:n,areDatesEqual:r,areErrorsEqual:i,areFunctionsEqual:a,areMapsEqual:o,areNumbersEqual:s,areObjectsEqual:c,arePrimitiveWrappersEqual:l,areRegExpsEqual:u,areSetsEqual:d,areTypedArraysEqual:f,areUrlsEqual:p}){return{"[object Arguments]":c,"[object Array]":t,"[object ArrayBuffer]":e,"[object AsyncGeneratorFunction]":a,"[object BigInt]":s,"[object BigInt64Array]":f,"[object BigUint64Array]":f,"[object Boolean]":l,"[object DataView]":n,"[object Date]":r,"[object Error]":i,"[object Float16Array]":f,"[object Float32Array]":f,"[object Float64Array]":f,"[object Function]":a,"[object GeneratorFunction]":a,"[object Int8Array]":f,"[object Int16Array]":f,"[object Int32Array]":f,"[object Map]":o,"[object Number]":l,"[object Object]":(e,t,n)=>typeof e.then!=`function`&&typeof t.then!=`function`&&c(e,t,n),"[object RegExp]":u,"[object Set]":d,"[object String]":l,"[object URL]":p,"[object Uint8Array]":f,"[object Uint8ClampedArray]":f,"[object Uint16Array]":f,"[object Uint32Array]":f}}c0(),c0({strict:!0}),c0({circular:!0}),c0({circular:!0,strict:!0}),c0({createInternalComparator:()=>n0}),c0({strict:!0,createInternalComparator:()=>n0}),c0({circular:!0,createInternalComparator:()=>n0}),c0({circular:!0,createInternalComparator:()=>n0,strict:!0});function c0(e={}){let{circular:t=!1,createInternalComparator:n,createState:r,strict:i=!1}=e,a=Cpe(wpe(e));return Epe({circular:t,comparator:a,createState:r,equals:n?n(a):Tpe(a),strict:i})}var l0=c0({circular:!0,createCustomConfig:()=>({areFunctionsEqual(e,t){return typeof t==`function`}})}),u0=s(((e,t)=>{var n=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),r=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u),i=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),a=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),o=RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu),s=RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/?]$/iu);function c(e){let t=``,n=0,r=0;for(r=0;r<e.length;r++)if(n=e[r].charCodeAt(0),n!==48){if(!(n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102))return``;t+=e[r];break}for(r+=1;r<e.length;r++){if(n=e[r].charCodeAt(0),!(n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102))return``;t+=e[r]}return t}var l=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function u(e){return e.length=0,!0}function d(e,t,n){if(e.length){let r=c(e);if(r!==``)t.push(r);else return n.error=!0,!1;e.length=0}return!0}function f(e){let t=0,n={error:!1,address:``,zone:``},r=[],i=[],a=!1,o=!1,s=d;for(let c=0;c<e.length;c++){let l=e[c];if(!(l===`[`||l===`]`))if(l===`:`){if(a===!0&&(o=!0),!s(i,r,n))break;if(++t>7){n.error=!0;break}c>0&&e[c-1]===`:`&&(a=!0),r.push(`:`);continue}else if(l===`%`){if(!s(i,r,n))break;s=u}else{i.push(l);continue}}return i.length&&(s===u?n.zone=i.join(``):o?r.push(i.join(``)):r.push(c(i))),n.address=r.join(``),n}function p(e){if(m(e,`:`)<2)return{host:e,isIPV6:!1};let t=f(e);if(t.error)return{host:e,isIPV6:!1};{let e=t.address,n=t.address;return t.zone&&(e+=`%`+t.zone,n+=`%25`+t.zone),{host:e,isIPV6:!0,escapedHost:n}}}function m(e,t){let n=0;for(let r=0;r<e.length;r++)e[r]===t&&n++;return n}function h(e){let t=e,n=[],r=-1,i=0;for(;i=t.length;){if(i===1){if(t===`.`)break;if(t===`/`){n.push(`/`);break}else{n.push(t);break}}else if(i===2){if(t[0]===`.`){if(t[1]===`.`)break;if(t[1]===`/`){t=t.slice(2);continue}}else if(t[0]===`/`&&t[1]===`.`){n.push(`/`);break}}else if(i===3&&t===`/..`){n.length!==0&&n.pop(),n.push(`/`);break}if(t[0]===`.`){if(t[1]===`.`){if(t[2]===`/`){t=t.slice(3);continue}}else if(t[1]===`/`){t=t.slice(2);continue}}else if(t[0]===`/`&&t[1]===`.`){if(t[2]===`/`){t=t.slice(2);continue}else if(t[2]===`.`&&t[3]===`/`){t=t.slice(3),n.length!==0&&n.pop();continue}}if((r=t.indexOf(`/`,1))===-1){n.push(t);break}else n.push(t.slice(0,r)),t=t.slice(r)}return n.join(``)}var g={"@":`%40`,"/":`%2F`,"?":`%3F`,"#":`%23`,":":`%3A`},_=/[@/?#:]/g,v=/[@/?#]/g;function y(e,t){let n=t?v:_;return n.lastIndex=0,e.replace(n,e=>g[e])}function b(e,t=!1){if(e.indexOf(`%`)===-1)return e;let n=``;for(let r=0;r<e.length;r++){if(e[r]===`%`&&r+2<e.length){let o=e.slice(r+1,r+3);if(i(o)){let e=o.toUpperCase(),i=String.fromCharCode(parseInt(e,16));t&&a(i)?n+=i:n+=`%`+e,r+=2;continue}}n+=e[r]}return n}var x=Array(256);{let e=`0123456789ABCDEF`;for(let t=0;t<256;t++)x[t]=`%`+e[t>>4]+e[t&15]}function S(e){return e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||e===42||e===43||e===45||e===46||e===47||e===64||e===95}function C(e){return e<2048?x[192|e>>6]+x[128|e&63]:e<65536?x[224|e>>12]+x[128|e>>6&63]+x[128|e&63]:x[240|e>>18]+x[128|e>>12&63]+x[128|e>>6&63]+x[128|e&63]}function w(e){let t=``;for(let n=0;n<e.length;n++){let r=e[n];if(r===`%`&&n+2<e.length){let r=e.slice(n+1,n+3);if(i(r)){let e=r.toUpperCase(),i=String.fromCharCode(parseInt(e,16));i!==`.`&&a(i)?t+=i:t+=`%`+e,n+=2;continue}}if(o(r))t+=r;else{let i=e.charCodeAt(n);if(i<128)t+=S(i)?r:x[i];else if(i<55296||i>57343)t+=C(i);else if(i<=56319&&n+1<e.length){let r=e.charCodeAt(n+1);r>=56320&&r<=57343?(t+=C(65536+(i-55296<<10)+(r-56320)),n++):t+=C(65533)}else t+=C(65533)}}return t}function T(e){let t=``;for(let n=0;n<e.length;n++){let r=e[n];if(r===`%`&&n+2<e.length){let r=e.slice(n+1,n+3);if(i(r)){let e=r.toUpperCase(),i=String.fromCharCode(parseInt(e,16));a(i)?t+=i:t+=`%`+e,n+=2;continue}}if(s(r))t+=r;else{let i=e.charCodeAt(n);if(i<128)t+=S(i)?r:x[i];else if(i<55296||i>57343)t+=C(i);else if(i<=56319&&n+1<e.length){let r=e.charCodeAt(n+1);r>=56320&&r<=57343?(t+=C(65536+(i-55296<<10)+(r-56320)),n++):t+=C(65533)}else t+=C(65533)}}return t}function E(e){let t=``;for(let n=0;n<e.length;n++){let r=e[n];if(r===`%`&&n+2<e.length){let r=e.slice(n+1,n+3);if(i(r)){t+=`%`+r.toUpperCase(),n+=2;continue}}let a=e.charCodeAt(n);if(a<128)t+=S(a)?r:x[a];else if(a<55296||a>57343)t+=C(a);else if(a<=56319&&n+1<e.length){let r=e.charCodeAt(n+1);r>=56320&&r<=57343?(t+=C(65536+(a-55296<<10)+(r-56320)),n++):t+=C(65533)}else t+=C(65533)}return t}function D(e){let t=[];if(e.userinfo!==void 0&&(t.push(e.userinfo),t.push(`@`)),e.host!==void 0){let n=unescape(e.host);if(!r(n)){let e=p(n);n=e.isIPV6===!0?`[${e.escapedHost}]`:y(n,!1)}t.push(n)}return(typeof e.port==`number`||typeof e.port==`string`)&&(t.push(`:`),t.push(String(e.port))),t.length?t.join(``):void 0}t.exports={nonSimpleDomain:l,recomposeAuthority:D,reescapeHostDelimiters:y,normalizePercentEncoding:b,normalizePathEncoding:w,normalizeQueryFragmentEncoding:T,escapePreservingEscapes:E,removeDotSegments:h,isIPv4:r,isUUID:n,normalizeIPv6:p,stringArrayToHexStripped:c}})),Ope=s(((e,t)=>{var{isUUID:n}=u0(),r=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,i=[`http`,`https`,`ws`,`wss`,`urn`,`urn:uuid`];function a(e){return i.indexOf(e)!==-1}function o(e){return e.secure===!0?!0:e.secure===!1?!1:e.scheme?e.scheme.length===3&&(e.scheme[0]===`w`||e.scheme[0]===`W`)&&(e.scheme[1]===`s`||e.scheme[1]===`S`)&&(e.scheme[2]===`s`||e.scheme[2]===`S`):!1}function s(e){return e.host||(e.error=e.error||`HTTP URIs must have a host.`),e}function c(e){let t=String(e.scheme).toLowerCase()===`https`;return(e.port===(t?443:80)||e.port===``)&&(e.port=void 0),e.path||=`/`,e}function l(e){return e.secure=o(e),e.resourceName=(e.path||`/`)+(e.query?`?`+e.query:``),e.path=void 0,e.query=void 0,e}function u(e){if((e.port===(o(e)?443:80)||e.port===``)&&(e.port=void 0),typeof e.secure==`boolean`&&(e.scheme=e.secure?`wss`:`ws`,e.secure=void 0),e.resourceName){let[t,n]=e.resourceName.split(`?`);e.path=t&&t!==`/`?t:void 0,e.query=n,e.resourceName=void 0}return e.fragment=void 0,e}function d(e,t){if(!e.path)return e.error=`URN can not be parsed`,e;let n=e.path.match(r);if(n){let r=t.scheme||e.scheme||`urn`;e.nid=n[1].toLowerCase(),e.nss=n[2];let i=y(`${r}:${t.nid||e.nid}`);e.path=void 0,i&&(e=i.parse(e,t))}else e.error=e.error||`URN can not be parsed.`;return e}function f(e,t){if(e.nid===void 0)throw Error(`URN without nid cannot be serialized`);let n=t.scheme||e.scheme||`urn`,r=e.nid.toLowerCase(),i=y(`${n}:${t.nid||r}`);i&&(e=i.serialize(e,t));let a=e,o=e.nss;return a.path=`${r||t.nid}:${o}`,t.skipEscape=!0,a}function p(e,t){let r=e;return r.uuid=r.nss,r.nss=void 0,!t.tolerant&&(!r.uuid||!n(r.uuid))&&(r.error=r.error||`UUID is not valid.`),r}function m(e){let t=e;return t.nss=(e.uuid||``).toLowerCase(),t}var h={scheme:`http`,domainHost:!0,parse:s,serialize:c},g={scheme:`https`,domainHost:h.domainHost,parse:s,serialize:c},_={scheme:`ws`,domainHost:!0,parse:l,serialize:u},v={http:h,https:g,ws:_,wss:{scheme:`wss`,domainHost:_.domainHost,parse:_.parse,serialize:_.serialize},urn:{scheme:`urn`,parse:d,serialize:f,skipNormalize:!0},"urn:uuid":{scheme:`urn:uuid`,parse:p,serialize:m,skipNormalize:!0}};Object.setPrototypeOf(v,null);function y(e){return e&&(v[e]||v[e.toLowerCase()])||void 0}t.exports={wsIsSecure:o,SCHEMES:v,isValidSchemeName:a,getSchemeHandler:y}})),kpe=s(((e,t)=>{var{normalizeIPv6:n,removeDotSegments:r,recomposeAuthority:i,normalizePercentEncoding:a,normalizePathEncoding:o,normalizeQueryFragmentEncoding:s,escapePreservingEscapes:c,reescapeHostDelimiters:l,isIPv4:u,nonSimpleDomain:d}=u0(),{SCHEMES:f,getSchemeHandler:p}=Ope();function m(e,t){return typeof e==`string`?e=w(e,t):typeof e==`object`&&(e=C(v(e,t),t)),e}function h(e,t,n){let r=n?Object.assign({scheme:`null`},n):{scheme:`null`},i=g(C(e,r),C(t,r),r,!0);return r.skipEscape=!0,v(i,r)}function g(e,t,n,i){let a={};return i||(e=C(v(e,n),n),t=C(v(t,n),n)),n||={},!n.tolerant&&t.scheme?(a.scheme=t.scheme,a.userinfo=t.userinfo,a.host=t.host,a.port=t.port,a.path=r(t.path||``),a.query=t.query):(t.userinfo!==void 0||t.host!==void 0||t.port!==void 0?(a.userinfo=t.userinfo,a.host=t.host,a.port=t.port,a.path=r(t.path||``),a.query=t.query):(t.path?(t.path[0]===`/`?a.path=r(t.path):((e.userinfo!==void 0||e.host!==void 0||e.port!==void 0)&&!e.path?a.path=`/`+t.path:e.path?a.path=e.path.slice(0,e.path.lastIndexOf(`/`)+1)+t.path:a.path=t.path,a.path=r(a.path)),a.query=t.query):(a.path=e.path,t.query===void 0?a.query=e.query:a.query=t.query),a.userinfo=e.userinfo,a.host=e.host,a.port=e.port),a.scheme=e.scheme),a.fragment=t.fragment,a}function _(e,t,n){let r=E(e,n),i=E(t,n);return r!==void 0&&i!==void 0&&r.toLowerCase()===i.toLowerCase()}function v(e,t){let n={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:``},o=Object.assign({},t),s=[],l=p(o.scheme||n.scheme);l&&l.serialize&&l.serialize(n,o),n.path!==void 0&&(o.skipEscape?n.path=a(n.path):(n.path=c(n.path),n.scheme!==void 0&&(n.path=n.path.split(`%3A`).join(`:`)))),o.reference!==`suffix`&&n.scheme&&s.push(n.scheme,`:`);let u=i(n);if(u!==void 0&&(o.reference!==`suffix`&&s.push(`//`),s.push(u),n.path&&n.path[0]!==`/`&&s.push(`/`)),n.path!==void 0){let e=n.path;!o.absolutePath&&(!l||!l.absolutePath)&&(e=r(e)),u===void 0&&e[0]===`/`&&e[1]===`/`&&(e=`/%2F`+e.slice(2)),s.push(e)}return n.query!==void 0&&s.push(`?`,n.query),n.fragment!==void 0&&s.push(`#`,n.fragment),s.join(``)}var y=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u,b=/^(?:[^#/:?]+:)?\/\/([^/?#]*)/;function x(e,t){if(t[2]!==void 0&&e.path&&e.path[0]!==`/`)return`URI path must start with "/" when authority is present.`;if(typeof e.port==`number`&&(e.port<0||e.port>65535))return`URI port is malformed.`}function S(e,t){let r=Object.assign({},t),i={scheme:void 0,userinfo:void 0,host:``,port:void 0,path:``,query:void 0,fragment:void 0},a=!1,c=!1;r.reference===`suffix`&&(e=r.scheme?r.scheme+`:`+e:`//`+e);let f=e.match(b);f!==null&&f[1].indexOf(`\\`)!==-1&&(i.error=`URI authority must not contain a literal backslash.`,a=!0);let m=e.match(y);if(m){i.scheme=m[1]===void 0?void 0:m[1].toLowerCase(),i.userinfo=m[3],i.host=m[4],i.port=parseInt(m[5],10),i.path=m[6]||``,i.query=m[7],i.fragment=m[8],isNaN(i.port)&&(i.port=m[5]);let t=x(i,m);if(t!==void 0&&(i.error=i.error||t,a=!0),i.host)if(u(i.host)===!1){let e=n(i.host);i.host=e.host.toLowerCase(),c=e.isIPV6}else c=!0;i.scheme===void 0&&i.userinfo===void 0&&i.host===void 0&&i.port===void 0&&i.query===void 0&&!i.path?i.reference=`same-document`:i.scheme===void 0?i.reference=`relative`:i.fragment===void 0?i.reference=`absolute`:i.reference=`uri`,r.reference&&r.reference!==`suffix`&&r.reference!==i.reference&&(i.error=i.error||`URI is not a `+r.reference+` reference.`);let f=p(r.scheme||i.scheme);if(!r.unicodeSupport&&(!f||!f.unicodeSupport)&&i.host&&(r.domainHost||f&&f.domainHost)&&c===!1&&d(i.host))try{i.host=new URL(`http://`+i.host).hostname}catch(e){i.error=i.error||`Host's domain name can not be converted to ASCII: `+e}(!f||f&&!f.skipNormalize)&&(e.indexOf(`%`)!==-1&&(i.scheme!==void 0&&(i.scheme=unescape(i.scheme)),i.host!==void 0&&(i.host=l(unescape(i.host),c))),i.path&&=o(i.path),i.query&&=s(i.query),i.fragment&&=s(i.fragment)),f&&f.parse&&f.parse(i,r)}else i.error=i.error||`URI can not be parsed.`;return{parsed:i,malformedAuthorityOrPort:a}}function C(e,t){return S(e,t).parsed}function w(e,t){return T(e,t).normalized}function T(e,t){let{parsed:n,malformedAuthorityOrPort:r}=S(e,t);return{normalized:r?e:v(n,t),malformedAuthorityOrPort:r}}function E(e,t){if(typeof e==`string`){let{normalized:n,malformedAuthorityOrPort:r}=T(e,t);return r?void 0:n}if(typeof e==`object`)return v(e,t)}var D={SCHEMES:f,normalize:m,resolve:h,resolveComponent:g,equal:_,serialize:v,parse:C};t.exports=D,t.exports.default=D,t.exports.fastUri=D})),Ape=s((e=>{var t=/~/,n=/~[01]/g;function r(e){switch(e){case`~1`:return`/`;case`~0`:return`~`}throw Error(`Invalid tilde escape: `+e)}function i(e){return t.test(e)?e.replace(n,r):e}function a(e){if(typeof e==`string`){if(e=e.split(`/`),e[0]===``)return e;throw Error(`Invalid JSON pointer.`)}else if(Array.isArray(e)){for(let t of e)if(typeof t!=`string`&&typeof t!=`number`)throw Error(`Invalid JSON pointer. Must be of type string or number.`);return e}throw Error(`Invalid JSON pointer.`)}function o(e,t){if(typeof e!=`object`)throw Error(`Invalid input object.`);t=a(t);var n=t.length;if(n===1)return e;for(var r=1;r<n;){if(e=e[i(t[r++])],n===r)return e;if(typeof e!=`object`||!e)return}}e.get=o})),d0=u(kpe(),1),f0=u(Ape(),1);function p0(e,t){if(`$id`in e&&d0.default.equal(e.$id,t))return e;for(let n of Object.values(e))if(Array.isArray(n)){for(let e of n)if(ZC(e)){let n=p0(e,t);if(n!==void 0)return n}}else if(ZC(n)){let e=p0(n,t);if(e!==void 0)return e}}function m0(e,t){let n=X(e,`$id`,t),r=e;`$ref`in r&&(r={...r,[z1]:d0.default.resolve(n,r[z1])});for(let[e,t]of Object.entries(r))Array.isArray(t)?r={...r,[e]:t.map(e=>ZC(e)?m0(e,n):e)}:ZC(t)&&(r={...r,[e]:m0(t,n)});return r}function h0(e,t){let n=t[e];return[sD(t,[e]),n]}function g0(e,t={},n=[],r=X(t,[`$id`])){let i=e||``,a,o=r;if(i.startsWith(`#`)){let e=decodeURIComponent(i.substring(1));o===void 0||`$id`in t&&t.$id===o?a=f0.get(t,e):t.$schema===`https://json-schema.org/draft/2020-12/schema`&&(a=p0(t,o.replace(/\/$/,``)),a!==void 0&&(a=f0.get(a,e)))}else if(t.$schema===`https://json-schema.org/draft/2020-12/schema`){let[e,...n]=(o?d0.default.resolve(o,i):i).replace(/#\/?$/,``).split(`#`);a=p0(t,e.replace(/\/$/,``)),a!==void 0&&(o=a.$id,tD(n)||(a=f0.get(a,decodeURIComponent(n.join(`#`)))))}if(a===void 0)throw Error(`Could not find a definition for ${e}.`);let s=a[z1];if(s){if(n.includes(s)){if(n.length===1)throw Error(`Definition for ${e} is a circular reference`);let[t,...r]=n,a=[...r,i,t].join(` -> `);throw Error(`Definition for ${t} contains a circular reference through ${a}`)}let[r,c]=h0(z1,a),l=g0(c,t,[...n,i],o);return Object.keys(r).length>0?t.$schema===`https://json-schema.org/draft/2019-09/schema`||t.$schema===`https://json-schema.org/draft/2020-12/schema`?{[O1]:[r,l]}:{...r,...l}:l}return a}function _0(e,t={},n=X(t,[`$id`])){return g0(e,t,[],n)}function v0(e){let t,n=X(e,npe);return HE(n)?t=n:n!==void 0&&console.warn(`Expecting discriminator to be a string, got "${typeof n}" instead`),t}function y0(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:e==null?`null`:typeof e==`boolean`?`boolean`:typeof e==`number`&&!Number.isNaN(e)?`number`:typeof e==`object`?`object`:`string`}function b0(e){let{type:t}=e;return!t&&e.const?y0(e.const):!t&&e.enum?`string`:!t&&(e.properties||e.additionalProperties||e.patternProperties)?`object`:(Array.isArray(t)&&(t=t.length===2&&t.includes(`null`)?t.find(e=>e!==`null`):t[0]),t)}function x0(e,t){let n={...e},r=Object.keys(t).reduce((n,r)=>{let i=e?e[r]:{},a=t[r];return e&&r in e&&T1(a)?n[r]=x0(i,a):e&&t&&(b0(e)===`object`||b0(t)===`object`)&&r===`required`&&Array.isArray(i)&&Array.isArray(a)?n[r]=noe(i,a):n[r]=a,n},n);for(let e of Object.getOwnPropertySymbols(t))r[e]=t[e];return r}function S0(e,t,n){if(e&&n){let r=X(e,n);if(r===void 0)return;for(let e=0;e<t.length;e+=1){let i=t[e],a=X(i,[I1,n],{});if(a.type!==`object`&&a.type!==`array`&&(a.const===r||a.enum?.includes(r)))return e}}}function C0(e,t,n,r,i){if(t===void 0)return 0;let a=S0(t,n,i);if(rD(a))return a;for(let a=0;a<n.length;a+=1){let o=n[a];if(i&&BE(o,[`properties`,i])){let n=X(t,i),s=X(o,[I1,i],{});if(e.isValid(s,n,r))return a}else if(o.properties){let n={anyOf:Object.keys(o[I1]).map(e=>({required:[e]}))},i;if(o.anyOf){let{...e}=o;e.allOf?e.allOf=e.allOf.slice():e.allOf=[],e.allOf.push(n),i=e}else i={...o,...n};if(delete i.required,e.isValid(i,t,r))return a}else if(e.isValid(o,t,r))return a}return 0}var jpe=Object.prototype;function w0(e){for(let t in e)if(jpe.hasOwnProperty.call(e,t))return!1;return!0}var T0=[`$defs`,`definitions`,`properties`,`patternProperties`,`dependencies`];new Set(T0);var E0=[`items`,`allOf`,`oneOf`,`anyOf`];new Set(E0);var D0=[`items`,`additionalItems`,`additionalProperties`,`propertyNames`,`contains`,`if`,`then`,`else`,`not`];new Set(D0),[...T0,...E0,...D0];function O0(e){return typeof e==`object`}function k0(e){return O0(e)?w0(e):e===!0}function A0(e,t){return e<t?-1:+(e>t)}function j0(e,t){let n=e.length;if(n===0)return t;let r=t.length;if(r===0)return e;if(n<r){let i=e;e=t,t=i,r=n}let i=new Set(e);for(let e=0;e<r;e++)i.add(t[e]);return Array.from(i)}function Mpe(e,t){let n=[];if(e.length===0||t.length===0)return n;if(e.length>t.length){let n=e;e=t,t=n}let r=new Set(t);for(let t=0;t<e.length&&r.size>0;t++){let i=e[t];r.delete(i)&&n.push(i)}return n}function M0(e){return e.length===0}function N0(e){return(t,n)=>{let r=t.length-n.length;if(r!==0)return r;for(let r=0;r<t.length;r++)if(t[r]!==n[r]){let i=e(t[r],n[r]);if(i!==0)return i}return 0}}function P0(e,{threshold:t=12}={}){return n=>{let r=n.length;if(r===0)return n;if(r<=t){let t=[],i=0;outer:for(let a=0;a<r;a++){let r=n[a];for(let n=0;n<i;n++)if(e(r,t[n])===0)continue outer;i=t.push(r)}return t}let i=n.slice().sort(e),a=0;for(let t=1;t<r;t++)e(i[a],i[t])!==0&&++a!==t&&(i[a]=i[t]);return i.length=a+1,i}}function Npe(e){return(t,n)=>{let r=[],i=t.length,a=n.length;if(i===0||a===0)return r;if(i>a){let e=t;t=n,n=e;let r=i;i=a,a=r}let o=[...t].sort(e),s=[...n].sort(e),c=0,l=0;for(;c<i&&l<a;){let t=e(o[c],s[l]);t===0?((r.length===0||e(r[r.length-1],o[c])!==0)&&r.push(o[c]),c++,l++):t<0?c++:l++}return r}}function Ppe(e,t){return n=>{if(e.has(n))return e.get(n);let r=t(n);return e.set(n,r),r}}var F0=Ppe,I0=()=>0,Fpe=e=>e===void 0,Ipe=e=>typeof e!=`object`,L0={boolean:0,number:1,string:2};function Lpe(e,t){let n=typeof e,r=typeof t;return n===r?A0(e,t):L0[n]-L0[r]}function Rpe(e,t){let n=e.length;if(n===0)return t;let r=t.length;if(r===0)return e;if(r>n){let n=e;e=t,t=n}let i=new Set(e),a=t.length;for(let n=0;n<a;n++){let r=t[n];i.has(r)||e.push(r)}return e}function R0(e,t,n=I0){return(r,i)=>e(r)?e(i)?n(r,i):-1:e(i)?1:t(r,i)}function z0(e){return R0(Fpe,e)}function B0(e,t){return R0(t=>t===void 0||e(t),t)}function V0(e,t){return R0(Array.isArray,e,t)}var H0=z0(A0),U0=B0(e=>e===0,(e,t)=>e-t);function zpe({deduplicationCache:e=new WeakMap,sortedKeysCache:t=new WeakMap}={}){let n=F0(t,e=>Object.keys(e).sort());function r(e){return(t,r)=>{let i=n(t),a=n(r),o=Math.min(i.length,a.length);for(let e=0;e<o;e++){let t=A0(i[e],a[e]);if(t!==0)return t}if(i.length!==a.length)return i.length-a.length;for(let n=0;n<o;n++){let a=i[n],o=e(t[a],r[a]);if(o!==0)return o}return 0}}function i(t){let n=N0(t),r=F0(e,P0(t,{threshold:0}));return(e,t)=>n(r(e),r(t))}let a=i(A0);function o(e,t){if(O0(e)){if(O0(t)){let n=Rpe(Object.keys(e),Object.keys(t)),r=n.length;for(let i=0;i<r;i++){let r=n[i];if(e[r]===t[r])continue;let a=(m[r]??s)(e[r],t[r]);if(a!==0)return a}return 0}return t===!0&&w0(e)?0:1}return O0(t)?e===!0&&w0(t)?0:-1:A0(e,t)}let s=z0(l),c=R0(Ipe,V0(r(s),N0(l)),Lpe);function l(e,t){return e===null?-1:t===null?1:c(e,t)}let u=z0(o),d=B0(w0,r(u)),f=z0(i(o)),p=B0(k0,o),m={$id:H0,$comment:H0,$defs:d,$ref:H0,$schema:H0,const:s,contains:u,contentEncoding:H0,contentMediaType:H0,default:s,definitions:d,description:H0,else:u,examples:s,exclusiveMaximum:H0,exclusiveMinimum:H0,format:H0,if:u,maximum:H0,maxItems:H0,maxLength:H0,maxProperties:H0,minimum:H0,multipleOf:H0,not:u,pattern:H0,propertyNames:u,readOnly:H0,then:u,title:H0,writeOnly:H0,uniqueItems:B0(e=>e===!1,I0),minLength:U0,minItems:U0,minProperties:U0,required:B0(M0,a),enum:B0(M0,i(l)),type:z0((e,t)=>{let n=Array.isArray(e),r=Array.isArray(t);return!n&&!r?A0(e,t):a(n?e:[e],r?t:[t])}),items:B0(e=>!Array.isArray(e)&&k0(e),V0(o,N0(o))),anyOf:f,allOf:f,oneOf:f,properties:d,patternProperties:d,additionalProperties:p,additionalItems:p,dependencies:B0(w0,r(z0(V0(o,a))))};return{compareSchemaValues:l,compareSchemaDefinitions:o}}function W0(e){return e}var G0=(e,t)=>e?G0(t%e,e):t,Bpe=(e,t)=>Math.abs(e*t)/G0(e,t);function Vpe(e,t){return e===t?e:`^(?=.*(?:${e}))(?=.*(?:${t})).*$`}function K0(e,t,n){let r=e.length,i=t.length;if(r>0&&i>0)for(let a=0;a<r;a++){let r=e[a];for(let e=0;e<i;e++)n(r,t[e])}}function q0(e,t){return e||t}function J0(e){return(t,n)=>{let r={...t},i=Object.keys(n),a=i.length;for(let o=0;o<a;o++){let a=i[o];r[a]=t[a]===void 0?n[a]:e(t[a],n[a])}return r}}function Hpe(e){let t=new Map;for(let n of e)for(let e of n[0])t.set(e,n[1]);return t}function Y0(e,t,n){n===void 0||k0(n)?delete e[t]:e[t]=n}var Upe=[`properties`,`patternProperties`,`additionalProperties`];function X0(e){let t=Object.keys(e),n=t.length,r=[];for(let i=0;i<n;i++){let n=t[i];r.push({regExp:new RegExp(n),schema:e[n]})}return[r,t]}var Z0=[[],[]];function Q0(e,t,n){let r=n.length;for(let i=0;i<r;i++){let r=n[i];if(!r.regExp.test(t))continue;let a=r.schema;if(a===!1)return!0;e.push(a)}return!1}var Wpe=[`items`,`additionalItems`],Gpe=[`if`,`then`,`else`];function $0(e,t){return t.if!==void 0&&(e.if=t.if),t.then!==void 0&&(e.then=t.then),t.else!==void 0&&(e.else=t.else),e}function e2(e,t){if(e===t)return e;switch(e){case`number`:if(t===`integer`)return`integer`;case`integer`:if(t===`number`)return`integer`;default:return}}function t2(e,t,n){return[e,t,n]}function Kpe(e){let t=new Map;for(let[n,r,i]of e){let e=e=>{if(!i(e))throw Error(`Schema keys '${n}' and '${r}' are conflicting (${n}: ${JSON.stringify(e[n])}, ${r}: ${JSON.stringify(e[r])})`)};for(let i of[[n,r],[r,n]]){let n=t.get(i[0]);n===void 0&&(n=[],t.set(i[0],n)),n.push({oppositeKey:i[1],check:e})}}return t}var qpe=[t2(`minimum`,`maximum`,e=>e.maximum>=e.minimum),t2(`exclusiveMinimum`,`maximum`,e=>e.maximum>e.exclusiveMinimum),t2(`minimum`,`exclusiveMaximum`,e=>e.exclusiveMaximum>e.minimum),t2(`exclusiveMinimum`,`exclusiveMaximum`,e=>e.exclusiveMaximum>e.exclusiveMinimum),t2(`minLength`,`maxLength`,e=>e.maxLength>=e.minLength),t2(`minItems`,`maxItems`,e=>e.maxItems>=e.minItems),t2(`minProperties`,`maxProperties`,e=>e.maxProperties>=e.minProperties)];function Jpe({mergePatterns:e=Vpe,isSubRegExp:t=Object.is,intersectJson:n=Mpe,deduplicateJsonSchemaDef:r=W0,defaultMerger:i=W0,assigners:a=[],checks:o=qpe,mergers:s}={}){function c(e){let t=e.length,n=e[0];for(let r=1;r<t;r++){let t=_(n,e[r]);if(t===!1)return!1;k0(t)||(n=t)}return n}function l(e,t,n,r,i,a,o){if(e.length=0,n===!1)return!1;if(e.push(n),i!==void 0){if(i===!1)return!1;e.push(i)}if(Q0(e,t,a))return!1;let s=e.length<2;if(o===!1){if(s)return;if(Q0(e,t,r))return!1}else s&&o!==void 0&&e.push(o);return e.length===1?e[0]:c(e)}function u(e,t,n,r,i,a){let o=n.length;if(o>0&&i!==!1)if(a)Object.assign(e,t);else for(let a=0;a<o;a++){let o=n[a];r.has(o)||(e[o]=_(t[o],i))}return e}let d=(n,{properties:r={},patternProperties:i,additionalProperties:a=!0},{properties:o={},patternProperties:s,additionalProperties:c=!0})=>{let d=k0(a),f=k0(c);if(d&&f)return Y0(n,`properties`,v(r,o)),Y0(n,`patternProperties`,i&&s?v(i,s):i??s),delete n.additionalProperties,n;Y0(n,`additionalProperties`,_(a,c));let p={},m=Object.keys(r),h=m.length,[g,y]=i?X0(i):Z0,[b,x]=s?X0(s):Z0,S=[],C=new Set,w=f?void 0:c;for(let e=0;e<h;e++){let t=m[e];C.add(t);let n=l(S,t,r[t],g,o[t],b,w);n!==void 0&&(p[t]=n)}let T=Object.keys(o),E=T.length,D=d?void 0:a;for(let e=0;e<E;e++){let t=T[e];if(C.has(t))continue;let n=l(S,t,o[t],b,void 0,g,D);n!==void 0&&(p[t]=n)}Y0(n,`properties`,p);let O={},k=new Set;return y.length>0&&x.length>0&&K0(y,x,(n,r)=>{t(n,r)&&k.add(n),t(r,n)&&k.add(r),O[e(n,r)]=_(i[n],s[r])}),O=u(O,i,y,k,c,f),O=u(O,s,x,k,a,d),Y0(n,`patternProperties`,O),n},f=(e,{items:t=[],additionalItems:n},{items:r=[],additionalItems:i})=>{let a=Array.isArray(t),o=Array.isArray(r),s=[];if(e.items=s,a&&o){let[a,o,c]=t.length<r.length?[t.length,n,r]:[r.length,i,t],l=0;for(;l<a;l++)s.push(_(t[l],r[l]));if(o===!1)e.additionalItems=!1;else{let t=o===void 0||k0(o);for(;l<c.length;l++)s.push(t?c[l]:_(c[l],o));Y0(e,`additionalItems`,n!==void 0&&i!==void 0?_(n,i):n??i)}}else if(a||o){let[o,c,l]=a?[t,r,n]:[r,t,i];Y0(e,`additionalItems`,l&&_(l,c));for(let e=0;e<o.length;e++)s.push(_(o[e],c))}else delete e.additionalItems,e.items=_(t,r);return e},p=(e,t,n)=>{$0(e,t);let r=$0({},n);return e.allOf===void 0?e.allOf=[r]:e.allOf=e.allOf.concat(r),e};function m(e,t){let n=[];if(K0(e,t,(e,t)=>{try{n.push(_(e,t))}catch{}}),n.length===0)throw Error(`No valid schema combinations could be produced for "${JSON.stringify(e)}" and "${JSON.stringify(t)}"; the merged result is empty`);return r(n)}let h=Hpe([[Upe,d],[Wpe,f],[Gpe,p],...a]),g=Kpe(o);function _(e,t){if(e===!1||t===!1)return!1;if(k0(e))return k0(t)?!0:t;if(k0(t))return e;let n={...e},r=new Set,a=new Set,o=Object.keys(t),s=o.length;for(let c=0;c<s;c++){let s=o[c],l=t[s];if(l===void 0)continue;let u=g.get(s);if(u!==void 0){let t=u.length;for(let n=0;n<t;n++){let t=u[n];e[t.oppositeKey]!==void 0&&a.add(t.check)}}let d=e[s];if(d===void 0){n[s]=l;continue}let f=h.get(s);if(f){r.add(f);continue}let p=y[s]??i;n[s]=p(d,l)}for(let i of r)n=i(n,e,t);for(let e of a)e(n);return n}let v=J0(_),y={$id:i,$ref:i,$schema:i,$comment:i,$defs:v,definitions:v,type:(e,t)=>{if(e===t)return e;let n=Array.isArray(e),r=Array.isArray(t);if(!n&&!r){let n=e2(e,t);if(n!==void 0)return n}else if(n||r){let i=new Set;if(n&&r)K0(e,t,(e,t)=>{let n=e2(e,t);n!==void 0&&i.add(n)});else{let r=n?e:t,a=n?t:e,o=r.length;for(let e=0;e<o;e++){let t=e2(a,r[e]);t!==void 0&&i.add(t)}}let a=i.size;if(a===1)return i.values().next().value;if(a>1)return Array.from(i)}throw Error(`It is not possible to create an intersection of the following incompatible types: ${e.toString()}, ${t.toString()}`)},default:i,description:i,title:i,const:i,format:i,contentEncoding:i,contentMediaType:i,not:(e,t)=>{let n=r([e,t]);return n.length===1?n[0]:{anyOf:n}},pattern:e,readOnly:q0,writeOnly:q0,enum:(e,t)=>{let r=n(e,t);if(r.length===0)throw Error(`Intersection of the following enums is empty: "${JSON.stringify(e)}", "${JSON.stringify(t)}"`);return r},anyOf:m,oneOf:m,allOf:(e,t)=>r(e.concat(t)),propertyNames:_,contains:_,dependencies:J0((e,t)=>Array.isArray(e)?Array.isArray(t)?j0(e,t):_(t,{required:e}):Array.isArray(t)?_(e,{required:t}):_(e,t)),examples:(e,t)=>{if(!Array.isArray(e)||!Array.isArray(t))throw Error(`Value of the 'examples' field should be an array, but got "${JSON.stringify(e)}" and "${JSON.stringify(t)}"`);return j0(e,t)},multipleOf:(e,t)=>{let n=1;for(;!Number.isInteger(e)||!Number.isInteger(t);)n*=10,e*=10,t*=10;return Bpe(e,t)/n},exclusiveMaximum:Math.min,maximum:Math.min,maxItems:Math.min,maxLength:Math.min,maxProperties:Math.min,exclusiveMinimum:Math.max,minimum:Math.max,minItems:Math.max,minLength:Math.max,minProperties:Math.max,uniqueItems:q0,required:j0,...s};return{mergeSchemaDefinitions:_,mergeArrayOfSchemaDefinitions:c}}function Ype(e){let t=[],n=[e];for(;n.length>0;){let e=n.pop();if(typeof e==`boolean`||e.allOf===void 0){t.push(e);continue}let{allOf:r,...i}=e;t.push(i);for(let e=r.length-1;e>=0;e--)n.push(r[e])}return t}function Xpe(e){return t=>e(Ype(t))}var{compareSchemaDefinitions:Zpe,compareSchemaValues:Qpe}=zpe(),{mergeArrayOfSchemaDefinitions:$pe}=Jpe({intersectJson:Npe(Qpe),deduplicateJsonSchemaDef:P0(Zpe)}),n2=Xpe($pe);function r2(e,t,n={},r,i,a=!1){return l2(e,t,n,r,void 0,void 0,i,a)[0]}function i2(e){return typeof e==`boolean`?e?{}:{not:{}}:e}function eme(e,t,n,r,i,a,o){let{if:s,then:c,else:l,...u}=t,d=e.isValid(s,a||{},n),f=[u],p=[];if(r){if(c&&typeof c!=`boolean`){let t=c;p=p.concat(l2(e,t,n,a,r,i,o))}if(l&&typeof l!=`boolean`){let t=l;p=p.concat(l2(e,t,n,a,r,i,o))}}else{let t=d?c:l;if(t!==void 0){let s=i2(t);p=p.concat(l2(e,s,n,a,r,i,o))}}return p.length&&(f=p.map(e=>x0(u,e))),f.flatMap(t=>l2(e,t,n,a,r,i,o))}function a2(e){return e.reduce((e,t)=>t.length>1?t.flatMap(t=>pD(e.length,n=>[...e[n]].concat(t))):(e.forEach(e=>e.push(t[0])),e),[[]])}function o2(e,t){return Object.keys(e.patternProperties).filter(e=>RegExp(e).test(t)).reduce((t,n)=>(dD(t,[n],e.patternProperties[n]),t),{})}function tme(e,t,n,r,i,a,o,s){let c=s2(e,t,n,r,i,a,o,s);return c.length>1||c[0]!==t?c:`dependencies`in t?d2(e,t,n,r,i,a,o).flatMap(t=>l2(e,t,n,a,r,i,o)):`allOf`in t&&Array.isArray(t.allOf)?a2(t.allOf.map(t=>l2(e,t,n,a,r,i,o))).map(e=>({...t,allOf:e})):[t]}function s2(e,t,n,r,i,a,o,s){let c=c2(t,n,i,void 0,s);return c===t?[t]:l2(e,c,n,a,r,i,o,s)}function c2(e,t,n,r,i,a=!1){if(!T1(e))return e;let o=e,s=r;if(`$ref`in o){let{$ref:e,...r}=o;if(n.includes(e))return a?{...o,[V1]:!0}:o;n.push(e),o={..._0(e,t,s),...r,[B1]:e},`$id`in o&&(s=o.$id)}if(`properties`in o){let e=[],r=$ae(o[I1],(r,a,o)=>{let c=[...n];r[o]=c2(a,t,c,s,i,!i),e.push(c)},{});Bae(n,gD(LE(e))),o={...o,[I1]:r}}if(`items`in o&&!Array.isArray(o.items)&&typeof o.items!=`boolean`&&(o={...o,items:c2(o.items,t,n,s,i)}),i){let r,a;`anyOf`in e&&Array.isArray(e.anyOf)?(r=k1,a=o[k1]):`oneOf`in e&&Array.isArray(e.oneOf)&&(r=F1,a=o[F1]),r&&a&&(o={...o,[r]:a.map(e=>c2(e,t,n,s,i))})}return l0(e,o)?e:o}function nme(e,t,n,r,i){let a={...t,properties:{...t.properties}},o=r&&T1(r)?r:{};return Object.keys(o).forEach(t=>{if(!(t in a.properties)){if(`patternProperties`in a){let r=o2(a,t);if(!tD(r)){a.properties[t]=r2(e,{[O1]:Object.values(r)},n,X(o,[t]),i),a.properties[t][D1]=!0;return}}if(`additionalProperties`in a&&a.additionalProperties!==!1){let r;r=typeof a.additionalProperties==`boolean`?{type:y0(X(o,[t]))}:`$ref`in a.additionalProperties?r2(e,{[z1]:X(a.additionalProperties,[z1])},n,X(o,[t]),i):`type`in a.additionalProperties?{...a.additionalProperties}:`anyOf`in a.additionalProperties||`oneOf`in a.additionalProperties?{type:`object`,...a.additionalProperties}:{type:y0(X(o,[t]))},a.properties[t]=r,a.properties[t][D1]=!0}else a.properties[t]={type:`null`},a.properties[t][D1]=!0}}),a}function rme(e){return n2(e)}function l2(e,t,n,r,i=!1,a=[],o,s){return T1(t)?tme(e,t,n,i,a,r,o,s).flatMap(t=>{var s;let c=t;if(`if`in c)return eme(e,c,n,i,a,r,o);if(`allOf`in c){if(i){let{allOf:e,...t}=c;return[...e,t]}try{let e=[],t=[],n={};(s=c.allOf)==null||s.forEach(r=>{if(typeof r==`object`&&r.contains)e.push(r);else{t.push(r);for(let e of Object.getOwnPropertySymbols(r))e in n||(n[e]=r[e])}}),e.length&&(c={...c,allOf:t}),c=o?o(c):rme(c);for(let e of Object.getOwnPropertySymbols(n))c[e]=n[e];e.length&&(c.allOf=e)}catch(e){console.warn(`could not merge subschemas in allOf:
216
+ `,e);let{allOf:t,...n}=c;return n}}return`properties`in c&&`patternProperties`in c&&(c=Object.keys(c.properties).reduce((t,i)=>{let a=o2(t,i);return tD(a)||(t.properties[i]=r2(e,{allOf:[t.properties[i],...Object.values(a)]},n,X(r,[i]),o)),t},{...c,properties:{...c.properties}})),`patternProperties`in c||`additionalProperties`in c&&c.additionalProperties!==!1?nme(e,c,n,r,o):c}):[{}]}function ime(e,t,n,r,i){let a,{oneOf:o,anyOf:s,...c}=t;if(Array.isArray(o)?a=o:Array.isArray(s)&&(a=s),a){let o=i===void 0&&r?{}:i,s=v0(t);a=a.map(e=>c2(e,n,[]));let l=C0(e,o,a,n,s);return r?(C0(e,o,u2(a,!1,n),n,s),a.map(e=>x0(c,e))):[x0(c,a[l])]}return[t]}function u2(e,t=!1,n){return e.map(e=>{if(!T1(e))return i2(e);let r=t&&n?c2(e,n,[]):e;return r.additionalProperties===!1?{...r,additionalProperties:!0}:r})}function d2(e,t,n,r,i,a,o){let{dependencies:s,...c}=t;return ime(e,c,n,r,a).flatMap(t=>f2(e,s,t,n,r,i,a,o))}function f2(e,t,n,r,i,a,o,s){let c=[n];for(let l in t)if((i||X(o,[l])!==void 0)&&(!n.properties||l in n.properties)){let[u,d]=h0(l,t);return Array.isArray(d)?c[0]=ame(n,d):T1(d)&&(c=ome(e,n,r,l,d,i,a,o,s)),c.flatMap(t=>f2(e,u,t,r,i,a,o,s))}return c}function ame(e,t){if(!t)return e;let n=Array.isArray(e.required)?Array.from(new Set([...e.required,...t])):t;return{...e,required:n}}function ome(e,t,n,r,i,a,o,s,c){return l2(e,i,n,s,a,o,c).flatMap(i=>{let{oneOf:l,...u}=i,d=x0(t,u);return l===void 0?d:a2(l.map(t=>typeof t==`boolean`||!(`$ref`in t)?[t]:s2(e,t,n,a,o,s))).flatMap(t=>sme(e,d,n,r,t,a,o,s,c))})}function sme(e,t,n,r,i,a,o,s,c){let l=i.filter(t=>{if(typeof t==`boolean`||!t?.properties)return!1;let{[r]:i}=t.properties;if(i){let t={type:`object`,properties:{[r]:i}};return e.isValid(t,s,n)||a}return!1});return!a&&l.length!==1?(console.warn(`ignoring oneOf in dependencies because there isn't exactly one subschema that is valid`),[t]):l.flatMap(i=>{let l=i,[u]=h0(r,l.properties);return l2(e,{...l,properties:u},n,s,a,o,c).map(e=>x0(t,e))})}function p2(e,t,n,r,i,a={},o){if(Array.isArray(n[i])){let s=v0(n)||r,c=n[i].map(n=>r2(e,n,t,a,o)),l=X(a,s);if(l!==void 0)return c.find(e=>l0(X(e,[I1,s,j1],X(e,[I1,s,A1])),l))}}function m2(e,t,n,r,i){let a=n;if(BE(n,`$ref`)&&(a=r2(e,n,t,void 0,i)),tD(r))return a;let[o,...s]=Array.isArray(r)?[...r]:r.split(`.`);if(o!==void 0&&o!==``&&BE(a,o))return a=X(a,o),m2(e,t,a,s,i)}function h2(e,t,n,r,i,a){let o=m2(e,t,n,r,a);return o===void 0?i:o}var g2={title:`!@#$_UNKNOWN_$#@!`};function cme(e,t,n,r,i={},a){let o=Array.isArray(r)?[...r]:r.split(`.`),s=n,c=o.pop(),l=String(c);o.length&&o.forEach(n=>{s=h2(e,t,s,[I1,n],{},a),BE(s,`oneOf`)?s=p2(e,t,s,l,F1,X(i,n),a):BE(s,`anyOf`)&&(s=p2(e,t,s,l,k1,X(i,n),a))}),BE(s,`oneOf`)?s=p2(e,t,s,l,F1,i,a):BE(s,`anyOf`)&&(s=p2(e,t,s,l,k1,i,a));let u=h2(e,t,s,[I1,c],g2,a);u===g2&&(u=void 0);let d=h2(e,t,s,tpe,[],a),f;return u&&Array.isArray(d)&&(f=d.includes(l)),{field:u,isRequired:f}}var lme={type:`object`,$id:epe,properties:{__not_really_there__:{type:`number`}}};function _2(e,t,n,r,i){let a=0;return n&&(ZC(n.properties)?a+=Yae(n.properties,(n,a,o)=>{let s=X(r,o);if(typeof a==`boolean`)return n;if(BE(a,`$ref`))return n+_2(e,t,r2(e,a,t,s,i),s||{},i);if((BE(a,`oneOf`)||BE(a,`anyOf`))&&s){let r=BE(a,`oneOf`)?F1:k1,o=v0(a);return n+v2(e,t,s,X(a,r),-1,o,i)}if(a.type===`object`)return n+ +!!ZC(s)+_2(e,t,a,s,i);if(a.type===y0(s)){let e=n+1;return a.default?e+=s===a.default?1:-1:a.const&&(e+=s===a.const?1:-1),e}return n},0):HE(n.type)&&n.type===y0(r)&&(a+=1)),a}function v2(e,t,n,r,i=-1,a,o){let s=r.map(e=>c2(e,t,[])),c=S0(n,r,a);if(rD(c))return c;let l=s.reduce((r,i,o)=>(C0(e,n,[lme,i],t,a)===1&&r.push(o),r),[]);if(l.length===1)return l[0];l.length||pD(s.length,e=>l.push(e));let u=new Set,{bestIndex:d}=l.reduce((r,i)=>{let{bestScore:a}=r,c=s[i],l=_2(e,t,c,n,o);return u.add(l),l>a?{bestIndex:i,bestScore:l}:r},{bestIndex:i,bestScore:0});return u.size===1&&i>=0?i:d}function y2(e){let t=e[A1],n=b0(e);return T1(t)&&HE(t?.$data)&&n!==`object`&&n!==`array`}function b2(e){return Array.isArray(e.enum)&&e.enum.length===1||`const`in e}function x2(e){return Array.isArray(e.items)&&e.items.every(e=>T1(e))}function S2(e,t,n=!1,r=!1,i=!1){if(Array.isArray(t)){let a=Array.isArray(e)?e:[],o=i?a:t,s=i?t:a,c=o.map((e,o)=>s[o]===void 0?e:S2(a[o],t[o],n,r,i));return(n||i)&&c.length<s.length&&c.push(...s.slice(c.length)),c}if(T1(t)){let a=Object.assign({},e);return Object.keys(t).reduce((o,s)=>{let c=X(t,s),l=T1(e)&&s in e,u=s in t,d=X(e,s)??{},f=l&&T1(d)&&Object.values(d).some(e=>T1(e)),p=l&&T1(X(e,s)),m=u&&T1(c);return p&&m&&!f?(o[s]={...X(e,s),...c},o):(o[s]=S2(X(e,s),c,n,r,i&&(l||!u)),a)},a)}return r&&(e!==void 0&&iD(t)||typeof t==`number`&&Number.isNaN(t))||i&&!iD(t)?e:t}function C2(e,t,n=!1){return Object.keys(t).reduce((r,i)=>{let a=e?e[i]:{},o=t[i];if(e&&i in e&&T1(o))r[i]=C2(a,o,n);else if(n&&Array.isArray(a)&&Array.isArray(o)){let e=o;n===`preventDuplicates`&&(e=o.reduce((e,t)=>(a.includes(t)||e.push(t),e),[])),r[i]=a.concat(e)}else r[i]=o;return r},{...e})}function ume(e){if(`enum`in e&&Array.isArray(e.enum)&&e.enum.length===1)return e.enum[0];if(`const`in e)return e.const;throw Error(`schema cannot be inferred as a constant`)}function dme(e,t){let n=new Map(e.map(e=>[String(e.value),e])),r=new Set(t.filter(e=>e!==`*`).map(String)),i=e.filter(e=>!r.has(String(e.value)));return t.flatMap(e=>{if(e===`*`)return i;let t=n.get(String(e));return t?[t]:[]})}function w2(e,t){if(e.enum){let n,r;if(t){let{enumNames:e,enumOrder:i}=J1(t);n=e,r=i}let i=e.enum.map((e,t)=>({label:Array.isArray(n)?n[t]||String(e):n?.[String(e)]||String(e),value:e}));return r&&(i=dme(i,r)),i}let n,r;e.anyOf?(n=e.anyOf,r=t?.anyOf):e.oneOf&&(n=e.oneOf,r=t?.oneOf);let i=v0(e);if(t){let{optionsSchemaSelector:e=i}=J1(t);i=e}return n?.map((e,t)=>{let{title:n}=J1(r?.[t]),a=e,o,s=n;if(i){let e=X(a,[I1,i],{});o=X(e,j1,X(e,A1)),s=s??e?.title??a.title??String(o)}else o=ume(a),s=s??a.title??String(o);return{schema:a,label:s,value:o}})}function T2(e,t,n={},r){let i=r2(e,t,n,void 0,r),a=i.oneOf||i.anyOf;return Array.isArray(i.enum)?!0:Array.isArray(a)?a.every(e=>typeof e!=`boolean`&&b2(e)):!1}function E2(e,t,n,r){return!t.uniqueItems||!t.items||typeof t.items==`boolean`?!1:T2(e,t.items,n,r)}var fme=[`string`,`number`,`integer`,`boolean`,`null`],D2;(function(e){e[e.Ignore=0]=`Ignore`,e[e.Invert=1]=`Invert`,e[e.Fallback=2]=`Fallback`})(D2||={});function O2(e,t=D2.Ignore,n=-1){if(n>=0){if(Array.isArray(e.items)&&n<e.items.length){let t=e.items[n];if(typeof t!=`boolean`)return t}}else if(e.items&&!Array.isArray(e.items)&&typeof e.items!=`boolean`)return e.items;return t!==D2.Ignore&&T1(e.additionalItems)?e.additionalItems:{}}function k2(e,t){let{default:n,type:r}=e;return Array.isArray(r)&&r.includes(`null`)&&tD(t)&&n===null?null:t}function A2(e,t,n,r,i,a=[],o={},s=!1,c=!1){let{emptyObjectFields:l=`populateAllDefaults`}=o;if(r===!0||s)e[t]=n;else if(r===`excludeObjectChildren`)(c&&n!==void 0||!T1(n)||!tD(n))&&(e[t]=n);else if(l!==`skipDefaults`){let r=i===void 0?a.includes(t):i;T1(n)?l===`skipEmptyDefaults`?tD(n)||(e[t]=n):(!tD(n)||a.includes(t))&&(r||l!==`populateRequiredDefaults`)&&(e[t]=n):n!==void 0&&(l===`populateAllDefaults`||l===`skipEmptyDefaults`||r&&a.includes(t))&&(e[t]=n)}}function j2(e,t,n={}){let{parentDefaults:r,rawFormData:i,rootSchema:a={},includeUndefinedValues:o=!1,_recurseList:s=[],experimental_defaultFormStateBehavior:c,experimental_customMergeAllOf:l,required:u,shouldMergeDefaultsIntoFormData:d=!1,initialDefaultsGenerated:f}=n,p=T1(i)?i:{},m=T1(t)?t:{},h=r,g=h&&c?.nestedDefaultsPrecedence===`ancestorWins`,_=null,v=c,y=s;if(m.const!==void 0&&c?.constAsDefaults!==`never`&&!y2(m))h=m[A1];else if(T1(h)&&T1(m.default)&&!m.anyOf&&!m.oneOf&&!m.$ref)h=g?C2(m.default,h):C2(h,m.default);else if(`default`in m&&!g&&!m.anyOf&&!m.oneOf&&!m.$ref)h=m.default;else if(`$ref`in m){let e=m[z1];s.includes(e)||(y=s.concat(e),_=_0(e,a));let t=i===void 0||T1(i)&&tD(i);_&&!h&&t&&(h=m.default),d&&_&&!T1(i)&&(p=i)}else if(`dependencies`in m){let t=d2(e,m,a,!1,[],{...N2(e,m,n,h),...p},l);[_]=t}else if(x2(m)&&!g)h=m.items.map((t,n)=>j2(e,t,{rootSchema:a,includeUndefinedValues:o,_recurseList:s,experimental_defaultFormStateBehavior:c,experimental_customMergeAllOf:l,parentDefaults:Array.isArray(r)?r[n]:void 0,rawFormData:p,required:u,shouldMergeDefaultsIntoFormData:d}));else if(`oneOf`in m){let{oneOf:t,...n}=m;if(t.length===0)return;let r=v0(m),{type:o=`null`}=n;!Array.isArray(o)&&fme.includes(o)&&v?.constAsDefaults===`skipOneOf`&&(v={...v,constAsDefaults:`never`}),_=t[v2(e,a,i??m.default,t,0,r,l)],_=x0(n,_)}else if(`anyOf`in m){let{anyOf:t,...n}=m;if(t.length===0)return;let r=v0(m);_=t[v2(e,a,i??m.default,t,0,r,l)],_=x0(n,_)}if(_)return j2(e,_,{rootSchema:a,includeUndefinedValues:o,_recurseList:y,experimental_defaultFormStateBehavior:v,experimental_customMergeAllOf:l,parentDefaults:h,rawFormData:i??p,required:u,shouldMergeDefaultsIntoFormData:d,initialDefaultsGenerated:f});h===void 0&&(h=m.default);let b=N2(e,m,n,h)??h;if(d){let{arrayMinItems:t={}}=c||{},{mergeExtraDefaults:n}=t,r=M2(e,m,a,i,c,l);(!T1(i)||`allOf`in m)&&(b=S2(b,r,n,!0))}return b}function M2(e,t,n,r,i,a){let o=i?.allOf===`populateDefaults`&&`allOf`in t,s=o?r2(e,t,n,r,a):t,c=!b2(s)&&T2(e,s,n,a),l=r;return c&&(l=w2(s)?.some(e=>l0(e.value,r))?r:void 0),s.const&&i?.constAsDefaults===`always`?l=s.const:T1(l)&&T1(s.properties)&&(l=Object.keys(s.properties).reduce((t,r)=>{let c=X(s,[I1,r],{});return r in t&&(o||T1(c)&&`allOf`in c)&&(t[r]=M2(e,c,n,X(t,r),i,a)),t},{...l})),l}function pme(e,t,{rawFormData:n,rootSchema:r={},includeUndefinedValues:i=!1,_recurseList:a=[],experimental_defaultFormStateBehavior:o,experimental_customMergeAllOf:s,required:c,shouldMergeDefaultsIntoFormData:l,initialDefaultsGenerated:u}={},d){{let f=T1(n)?n:{},p=t,m=o?.allOf===`populateDefaults`&&`allOf`in p||o?.emptyObjectFields!==`skipEmptyDefaults`&&`if`in p?r2(e,p,r,f,s):p,h=m[A1],g=Object.keys(m.properties||{}).reduce((t,n)=>{let p=X(m,[I1,n],{}),g=T1(h)&&h[n]!==void 0,_=(T1(p)&&`const`in p||g)&&o?.constAsDefaults!==`never`&&!y2(p);return A2(t,n,j2(e,p,{rootSchema:r,_recurseList:a,experimental_defaultFormStateBehavior:o,experimental_customMergeAllOf:s,includeUndefinedValues:i===!0,parentDefaults:X(d,[n]),rawFormData:X(f,[n]),required:m.required?.includes(n),shouldMergeDefaultsIntoFormData:l,initialDefaultsGenerated:u}),i,c,m.required,o,_,p?.type===`null`),t},{});if(m.additionalProperties&&!u){let t=T1(m.additionalProperties)?m.additionalProperties:{},n=new Set,p=[];Object.keys(f).filter(e=>!m.properties||!m.properties[e]).forEach(e=>{n.add(e),p.push(e)}),T1(d)&&p.length===0&&Object.keys(d).filter(e=>!m.properties||!m.properties[e]).forEach(e=>n.add(e)),n.forEach(n=>{let h=j2(e,t,{rootSchema:r,_recurseList:a,experimental_defaultFormStateBehavior:o,experimental_customMergeAllOf:s,includeUndefinedValues:i===!0,parentDefaults:X(d,[n]),rawFormData:X(f,[n]),required:m.required?.includes(n),shouldMergeDefaultsIntoFormData:l,initialDefaultsGenerated:u});A2(g,n,h,i,c,p)})}return k2(t,g)}}function mme(e,t,{rawFormData:n,rootSchema:r={},_recurseList:i=[],experimental_defaultFormStateBehavior:a,experimental_customMergeAllOf:o,required:s,requiredAsRoot:c=!1,shouldMergeDefaultsIntoFormData:l,initialDefaultsGenerated:u}={},d){let f=d,p=t,m=a?.arrayMinItems??{},{populate:h,mergeExtraDefaults:g}=m,_=h===`never`,v=h===`requiredOnly`,y=h===`all`||!_&&!v,b=m?.computeSkipPopulate??(()=>!1),x=a?.emptyObjectFields===`skipEmptyDefaults`?void 0:[];if(Array.isArray(f)&&(f=f.map((t,c)=>j2(e,O2(p,D2.Fallback,c),{rootSchema:r,_recurseList:i,experimental_defaultFormStateBehavior:a,experimental_customMergeAllOf:o,parentDefaults:t,rawFormData:Array.isArray(n)?n[c]:void 0,required:s,shouldMergeDefaultsIntoFormData:l,initialDefaultsGenerated:u}))),Array.isArray(n)){let t=O2(p);if(_)f=n;else{let c=n.map((n,c)=>j2(e,t,{rootSchema:r,_recurseList:i,experimental_defaultFormStateBehavior:a,experimental_customMergeAllOf:o,rawFormData:n,parentDefaults:X(f,[c]),required:s,shouldMergeDefaultsIntoFormData:l,initialDefaultsGenerated:u}));f=S2(f,c,(v&&s||y)&&g)}}let S=Array.isArray(f)?f.length:0;if(_){if(l){if(p.minItems&&p.minItems>S){let e=Array.from({length:p.minItems-S},()=>null);return(f??[]).concat(e)}return f}return f??x}if(v&&!s)return f||void 0;let C;if(!p.minItems||E2(e,p,r,o)||b(e,p,r)||p.minItems<=S)C=f||!s&&!c?f:x;else{let t=f||[],n=O2(p,D2.Invert),c=n.default,u=Array.from({length:p.minItems-S},()=>j2(e,n,{parentDefaults:c,rootSchema:r,_recurseList:i,experimental_defaultFormStateBehavior:a,experimental_customMergeAllOf:o,required:s,shouldMergeDefaultsIntoFormData:l}));C=t.concat(u)}return k2(t,C)}function N2(e,t,n={},r){switch(b0(t)){case`object`:return pme(e,t,n,r);case`array`:return mme(e,t,n,r);default:return}}function P2(e,t,n,r,i=!1,a,o,s){if(!T1(t))throw Error(`Invalid schema: ${t}`);let c=r2(e,t,r,n,o),l=j2(e,c,{rootSchema:r,includeUndefinedValues:i,experimental_defaultFormStateBehavior:a,experimental_customMergeAllOf:o,rawFormData:n,shouldMergeDefaultsIntoFormData:!0,initialDefaultsGenerated:s,requiredAsRoot:!0});if(c.type!==`object`&&T1(c.default))return{...l,...n};if(T1(n)||Array.isArray(n)){let{mergeDefaultsIntoFormData:t}=a||{},i=t===`useDefaultIfFormDataUndefined`;return S2(l,M2(e,c,r??c,n,a,o),!0,i,!0)}return l}function F2(e={}){return`widget`in J1(e)&&J1(e).widget!==`hidden`}function I2(e,t,n={},r,i){if(n[`ui:widget`]===`files`)return!0;if(t.items){let n=r2(e,t.items,r,void 0,i);return n.type===`string`&&n.format===`data-url`}return!1}function hme(e,t,n={},r,i,a){let{label:o=!0}=J1(n,i),s=!!o;if(s){let i=b0(t),o=!!t[D1];i===`array`&&(s=o||E2(e,t,r,a)||I2(e,t,n,r,a)||F2(n)),i===`object`&&(s=o),i===`boolean`&&n&&!n[`ui:widget`]&&(s=!1),n?.[`ui:field`]&&(s=!1)}return s}function gme(e,t){if(t.length===0&&typeof e!=`object`)return e;let n=uD(e,t);return Array.isArray(e)?Object.keys(n).map(e=>n[e]):n}function _me(e,t){let n=(e,t)=>typeof e!=`object`||tD(e)||t&&!tD(e),r=(e,i=[],a=[[]])=>{let o=Object.keys(e);return o.forEach(s=>{let c=e[s];if(typeof c==`object`){let e=a.map(e=>[...e,s]);c[W1]&&c.$name!==``?i.push(c[P1]):r(c,i,e)}else s===`$name`&&c!==``&&a.forEach(e=>{let r=X(t,e),a=o.length===1;(n(r,a)||Array.isArray(r)&&r.every(e=>n(e,a)))&&i.push(e)})}),i};return r(e)}function L2(e){return iD(e)||e===``?!0:Array.isArray(e)?e.length===0:T1(e)?Object.values(e).every(L2):!1}function vme(e,t){return t?t(e):n2(e)}function yme(e,t,n={},r,i){function a(e){return T1(e)}function o(e){return T1(e)}function s(e,t,r){let{properties:i,additionalProperties:a,patternProperties:s,propertyNames:c}=e,l=new Set(e.required??[]);function u(e,t,i,a=!1){let s=p(t,i,r[e]);if(!a&&T1(s)){let e=o(t)?t:{};e.$ref!==void 0&&(e=_0(e.$ref,n));let r=new Set(e.required??[]);if(Object.entries(s).every(([e,t])=>!r.has(e)&&L2(t)))return}s!==void 0&&(r[e]=s)}if(i!==void 0)for(let[e,n]of Object.entries(i))u(e,n,t[e],l.has(e));let d;if(s!==void 0){d=[];let e=Object.entries(s).map(([e,t])=>[new RegExp(e),t]),n=new Set(Object.keys(i??{}));for(let[r,i]of Object.entries(t))if(!n.has(r)){let t=e.find(([e])=>e.test(r));t===void 0?d.push(r):u(r,t[1],i)}}if(a!==void 0&&a!==!1){let e=a;if(d!==void 0)for(let n of d)u(n,e,t[n]);else{let n=new Set(Object.keys(i??{}));for(let[r,i]of Object.entries(t))n.has(r)||u(r,e,i)}}if(c!==void 0)for(let[e,n]of Object.entries(t))r[e]=n;return r}function c(e,t,n){let{items:r,additionalItems:i}=e;if(r!==void 0)if(Array.isArray(r))for(let e=0;e<r.length;e+=1)n.push(p(r[e],t[e]));else for(let e=0;e<t.length;e+=1)n.push(p(r,t[e]));if(i)for(let e=n.length;e<t.length;e+=1)n.push(p(i,t[e]));return n}function l(t,r,i){let{if:a,then:s,else:c}=t;if(a===void 0)return i;let l=(o(a)?e.isValid(a,r,n):a)?s:c;return l===void 0?i:p(l,r,i)}function u(t,r,a,o){if(!Array.isArray(t)||T2(e,r,n,i))return o;let s=u2(t,!0,n),c=v2(e,n,a,s,0,v0(r),i),l=t[c];return p(T1(l)?c2(l,n,[]):s[c],a,o)}function d(e,t,n){let{anyOf:r}=e;if(!Array.isArray(r))return n;if(t===void 0||Array.isArray(t)&&t.length===0||T1(t)&&Object.keys(t).length===0){let e=n;for(let n of r)e=p(n,t,e);return e}return u(r,e,t,n)}function f(e,t,n){let{dependencies:r}=e;if(r===void 0||!a(t))return n;let i=n;for(let[e,n]of Object.entries(r))e in t&&!Array.isArray(n)&&(i=p(n,t,i));return i}function p(e,t,r){if(t===void 0||e===!1)return;if(e===!0||tD(e))return t;let o=e,{$ref:m,allOf:h}=o;if(m!==void 0)return p(_0(m,n),t,r);if(h){o=vme(o,i);let e=o.allOf;if(e)for(let n=0;n<e.length;n++)r=p(e[n],t,r)}let g=d(o,t,u(o.oneOf,o,t,r)),_=b0(o);if(_===`object`){if(!a(t))return;g=s(o,t,a(g)?g:{})}else if(_===`array`){if(!Array.isArray(t))return;g=c(o,t,Array.isArray(g)?g:[])}else g===void 0&&(g=t);return f(o,t,l(o,t,g))}return p(t,r)}var R2=Symbol(`no Value`);function z2(e){if(Array.isArray(e.enum))return e.enum;let t=e.oneOf||e.anyOf;if(!Array.isArray(t))return;let n=t.map(e=>`const`in e?e[A1]:Array.isArray(e.enum)&&e.enum.length===1?e.enum[0]:R2).filter(e=>e!==R2);return n.length>0?n:void 0}function bme(e,t){let n=z2(e);if(!n||n.some(e=>l0(e,t)))return R2;let r=X(e,j1,R2);return r!==R2&&n.some(e=>l0(e,r))?r:n.length===1?n[0]:void 0}function B2(e,t,n,r,i={},a){let o;if(BE(n,`properties`)){let s={};if(BE(r,`properties`)){let e=X(r,I1,{});Object.keys(e).forEach(e=>{BE(i,e)&&(s[e]=void 0)})}let c=Object.keys(X(n,I1,{})),l={};c.forEach(o=>{let c=X(i,o),u=X(r,[I1,o],{}),d=X(n,[I1,o],{});BE(u,`$ref`)&&(u=r2(e,u,t,c,a)),BE(d,`$ref`)&&(d=r2(e,d,t,c,a));let f=X(u,`type`),p=X(d,`type`);if(!f||f===p)if(BE(s,o)&&delete s[o],p===`object`||p===`array`&&Array.isArray(c)){let n=B2(e,t,d,u,c,a);(n!==void 0||p===`array`)&&(l[o]=n)}else{let e=X(d,j1,R2),t=X(u,j1,R2);e!==R2&&e!==c&&(t===c?s[o]=e:X(d,`readOnly`)===!0&&(s[o]=void 0));let n=X(d,A1,R2),r=X(u,A1,R2);if(n!==R2&&n!==c&&(s[o]=r===c?n:void 0),BE(i,o)){let e=bme(d,c);e!==R2&&(s[o]=e)}}}),o={...typeof i==`string`||Array.isArray(i)?void 0:i,...s,...l}}else if(X(r,`type`)===`array`&&X(n,`type`)===`array`&&Array.isArray(i)){let s=X(r,`items`),c=X(n,`items`);if(typeof s==`object`&&typeof c==`object`&&!Array.isArray(s)&&!Array.isArray(c)){BE(s,`$ref`)&&(s=r2(e,s,t,i,a)),BE(c,`$ref`)&&(c=r2(e,c,t,i,a));let r=X(s,`type`),l=X(c,`type`);if(!r||r===l){let r=X(n,`maxItems`,-1);if(l===`object`)o=i.reduce((n,i)=>{let o=B2(e,t,c,s,i,a);return o!==void 0&&(r<0||n.length<r)&&n.push(o),n},[]);else{let e=z2(c),t=e?i.filter(t=>e.some(e=>l0(e,t))):i;o=r>0&&t.length>r?t.slice(0,r):t}}}else typeof s==`boolean`&&typeof c==`boolean`&&s===c&&(o=i)}return o}function V2(e,t,n,r,i,a=[],o){if(`$ref`in t||`dependencies`in t||`allOf`in t||`if`in t){let s=r2(e,t,r,i,o);if(a.findIndex(e=>l0(e,s))===-1)return V2(e,s,n,r,i,a.concat(s),o)}let s={[P1]:n.replace(/^\./,``)};if(`oneOf`in t||`anyOf`in t){let c=`oneOf`in t?t.oneOf:t.anyOf,l=c[v2(e,r,i,c,0,v0(t),o)];s={...s,...V2(e,l,n,r,i,a,o)}}if(`additionalProperties`in t&&t.additionalProperties!==!1){dD(s,W1,!0);let c=ZC(t.additionalProperties)?t[$fe]:{},l=X(t,I1,{});for(let t of Object.keys(i??{}))t in l||(s[t]=V2(e,c,`${n}.${t}`,r,X(i,[t]),a,o))}if(`items`in t&&Array.isArray(i)){let{items:c,additionalItems:l}=t;Array.isArray(c)?i.forEach((t,i)=>{c[i]?s[i]=V2(e,c[i],`${n}.${i}`,r,t,a,o):l?s[i]=V2(e,l,`${n}.${i}`,r,t,a,o):console.warn(`Unable to generate path schema for "${n}.${i}". No schema defined for it`)}):i.forEach((t,i)=>{s[i]=V2(e,c,`${n}.${i}`,r,t,a,o)})}else if(`properties`in t)for(let c in t.properties){let l=X(t,[I1,c],{});s[c]=V2(e,l,`${n}.${c}`,r,X(i,[c]),a,o)}return s}function xme(e,t,n=``,r,i,a){return V2(e,t,n,r,i,void 0,a)}var Sme=class{constructor(e,t,n,r){t?.$schema===`https://json-schema.org/draft/2020-12/schema`?this.rootSchema=m0(t,X(t,`$id`,`#`)):this.rootSchema=t,this.validator=e,this.experimental_defaultFormStateBehavior=n,this.experimental_customMergeAllOf=r}getRootSchema(){return this.rootSchema}getValidator(){return this.validator}doesSchemaUtilsDiffer(e,t,n={},r){return!e||!t?!1:this.validator!==e||!l0(this.rootSchema,t)||!l0(this.experimental_defaultFormStateBehavior,n)||this.experimental_customMergeAllOf!==r}findFieldInSchema(e,t,n){return cme(this.validator,this.rootSchema,e,t,n,this.experimental_customMergeAllOf)}findSelectedOptionInXxxOf(e,t,n,r){return p2(this.validator,this.rootSchema,e,t,n,r,this.experimental_customMergeAllOf)}getDefaultFormState(e,t,n=!1,r){return P2(this.validator,e,t,this.rootSchema,n,this.experimental_defaultFormStateBehavior,this.experimental_customMergeAllOf,r)}getDisplayLabel(e,t,n){return hme(this.validator,e,t,this.rootSchema,n,this.experimental_customMergeAllOf)}getClosestMatchingOption(e,t,n,r){return v2(this.validator,this.rootSchema,e,t,n,r,this.experimental_customMergeAllOf)}getFirstMatchingOption(e,t,n){return C0(this.validator,e,t,this.rootSchema,n)}getFromSchema(e,t,n){return h2(this.validator,this.rootSchema,e,t,n,this.experimental_customMergeAllOf)}isFilesArray(e,t){return I2(this.validator,e,t,this.rootSchema,this.experimental_customMergeAllOf)}isMultiSelect(e){return E2(this.validator,e,this.rootSchema,this.experimental_customMergeAllOf)}isSelect(e){return T2(this.validator,e,this.rootSchema,this.experimental_customMergeAllOf)}omitExtraData(e,t){return yme(this.validator,e,this.rootSchema,t)}retrieveSchema(e,t,n){return r2(this.validator,e,this.rootSchema,t,this.experimental_customMergeAllOf,n)}sanitizeDataForNewSchema(e,t,n){return B2(this.validator,this.rootSchema,e,t,n,this.experimental_customMergeAllOf)}toPathSchema(e,t,n){return xme(this.validator,e,t,this.rootSchema,n,this.experimental_customMergeAllOf)}};function Cme(e,t,n={},r){return new Sme(e,t,n,r)}function wme(e){if(!e.includes(`data:`))throw Error(`File is invalid: URI must be a dataURI`);let t=e.slice(5).split(`;base64,`);if(t.length!==2)throw Error(`File is invalid: dataURI must be base64`);let[n,r]=t,[i,...a]=n.split(`;`),o=i||``,s=decodeURI(a.map(e=>e.split(`=`)).find(([e])=>e===`name`)?.[1]||`unknown`);try{let e=atob(r),t=Array(e.length);for(let n=0;n<e.length;n+=1)t[n]=e.charCodeAt(n);return{blob:new window.Blob([new Uint8Array(t)],{type:o}),name:s}}catch(e){throw Error(`File is invalid: ${e.message}`)}}function H2(e,t){let n=String(e);for(;n.length<t;)n=`0${n}`;return n}function U2(e,t){let n=e<=0&&t<=0;if(!n&&(e<0||t<0))throw Error(`Both start (${e}) and stop (${t}) must both be <= 0 or > 0, got one of each`);let r=new Date().getFullYear(),i=n?r+e:e,a=n?r+t:t;if(i>a)return U2(t,e).reverse();let o=[];for(let e=i;e<=a;e+=1)o.push({value:e,label:H2(e,2)});return o}function Tme(e,t){let n=e;if(Array.isArray(t)){let e=n.split(/(%\d)/);t.forEach((t,n)=>{let r=e.findIndex(e=>e===`%${n+1}`);r>=0&&(e[r]=t)}),n=e.join(``)}return n}function Eme(e,t){return Tme(e,t)}function W2(e,t=[],n){if(Array.isArray(e))return e.map(e=>W2(e,t)).filter(e=>e!==void 0);let r=t[e===``||e===null?-1:Number(e)];return r?r.value:n}function G2(e,t,n=[]){let r=W2(e,n);return Array.isArray(t)?t.filter(e=>!l0(e,r)):l0(r,t)?void 0:t}function K2(e,t){return Array.isArray(t)?t.some(t=>l0(t,e)):l0(t,e)}function q2(e,t=[],n=!1){let r=t.map((t,n)=>K2(t.value,e)?String(n):void 0).filter(e=>e!==void 0);return n?r:r[0]}function J2(e,t,n,r=`indexed`,i){if(e===void 0||n&&Array.isArray(e)&&e.length<1||!n&&e===i)return i;if(r===`realValue`)return n?e.map(String):String(e);let a=q2(e,t,n);return a===void 0?i:a}function Y2(e,t,n=[]){let r=W2(e,n);if(!iD(r)){let e=n.findIndex(e=>r===e.value),i=n.map(({value:e})=>e);return t.slice(0,e).concat(r,t.slice(e)).sort((e,t)=>Number(i.indexOf(e)>i.indexOf(t)))}return t}function X2(e,t,n){if(e===``||!Array.isArray(t))return n;let r=t.find(t=>String(t.value)===e);if(r)return r.value;let i=Number(e);return!Number.isNaN(i)&&i>=0&&i<t.length?t[i].value:n}function Z2(e,t,n=`indexed`,r){return n===`realValue`?Array.isArray(e)?e.map(e=>X2(e,t,r)):X2(e,t,r):W2(e,t,r)}function Q2(e,t,n=`indexed`){return n===`realValue`?iD(e)?``:String(typeof e==`object`?t:e):String(t)}var $2=class{constructor(e){this.errorSchema={},this.resetAllErrors(e)}get ErrorSchema(){return this.errorSchema}getOrCreateErrorBlock(e){let t=Array.isArray(e)&&e.length>0||typeof e==`string`?X(this.errorSchema,e):this.errorSchema;return!t&&e&&(t={},Xae(this.errorSchema,e,t,Object)),t}resetAllErrors(e){return this.errorSchema=e?iE(e):{},this}addErrors(e,t){let n=this.getOrCreateErrorBlock(t),r=X(n,M1);return Array.isArray(r)||(r=[],n[M1]=r),Array.isArray(e)?dD(n,M1,[...new Set([...r,...e])]):dD(n,M1,[...new Set([...r,e])]),this}setErrors(e,t){return dD(this.getOrCreateErrorBlock(t),M1,Array.isArray(e)?[...new Set([...e])]:[e]),this}clearErrors(e){return dD(this.getOrCreateErrorBlock(e),M1,[]),this}};function e4(e,t){let n=xT(e),r=xT(t);if(e===t||!n&&!r)return[];if(n&&!r)return Qw(e);if(!n&&r)return Qw(t);let i=Qw(Kae(e,(e,n)=>!l0(e,X(t,n)))),a=Lae(Qw(t),Qw(e));return[...i,...a]}function Dme(e,t,n=[1900,new Date().getFullYear()+2],r=`YMD`){let{day:i,month:a,year:o,hour:s,minute:c,second:l}=e,u={type:`day`,range:[1,31],value:i},d={type:`month`,range:[1,12],value:a},f={type:`year`,range:n,value:o},p=[];switch(r){case`MDY`:p.push(d,u,f);break;case`DMY`:p.push(u,d,f);break;default:p.push(f,d,u)}return t&&p.push({type:`hour`,range:[0,23],value:s},{type:`minute`,range:[0,59],value:c},{type:`second`,range:[0,59],value:l}),p}function t4(e){let t={};return e.multipleOf&&(t.step=e.multipleOf),(e.minimum||e.minimum===0)&&(t.min=e.minimum),(e.maximum||e.maximum===0)&&(t.max=e.maximum),t}function n4(e,t,n={},r=!0){let i={type:t||`text`,...t4(e)};return n.inputType?i.type=n.inputType:t||(e.type===`number`?(i.type=`number`,r&&i.step===void 0&&(i.step=`any`)):e.type===`integer`&&(i.type=`number`,i.step===void 0&&(i.step=1))),[`date`,`datetime-local`,`time`,`week`,`month`].includes(i.type)&&(e.formatMinimum!==void 0&&(i.min=e.formatMinimum),e.formatMaximum!==void 0&&(i.max=e.formatMaximum)),n.autocomplete&&(i.autoComplete=n.autocomplete),n.accept&&(i.accept=n.accept),i}function r4(e){return e?.optionValueFormat??`indexed`}var i4={props:{disabled:!1},submitText:`Submit`,norender:!1};function a4(e={}){let t=J1(e);if(t?.submitButtonOptions){let e=t[R1];return{...i4,...e}}return i4}function o4(e,t,n={}){let{templates:r}=t;return e===`ButtonTemplates`?r[e]:Object.hasOwn(n,e)&&typeof n[e]==`string`&&Object.hasOwn(r,n[e])?r[n[e]]:n[e]||r[e]}function s4(){if(X(globalThis,`process.env.NODE_ENV`)!==`test`)return{};let e=new Map;return new Proxy({},{get(t,n){return e.has(n)||e.set(n,vD(`test-id-`)),e.get(n)}})}var Ome=s((e=>{var t=Symbol.for(`react.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.provider`),s=Symbol.for(`react.context`),c=Symbol.for(`react.server_context`),l=Symbol.for(`react.forward_ref`),u=Symbol.for(`react.suspense`),d=Symbol.for(`react.suspense_list`),f=Symbol.for(`react.memo`),p=Symbol.for(`react.lazy`);function m(e){if(typeof e==`object`&&e){var m=e.$$typeof;switch(m){case t:switch(e=e.type,e){case r:case a:case i:case u:case d:return e;default:switch(e&&=e.$$typeof,e){case c:case s:case l:case p:case f:case o:return e;default:return m}}case n:return m}}}e.isForwardRef=function(e){return m(e)===l},e.isMemo=function(e){return m(e)===f}})),c4=u(s(((e,t)=>{t.exports=Ome()}))(),1),l4={boolean:{checkbox:`CheckboxWidget`,radio:`RadioWidget`,select:`SelectWidget`,hidden:`HiddenWidget`},string:{text:`TextWidget`,password:`PasswordWidget`,email:`EmailWidget`,hostname:`TextWidget`,ipv4:`TextWidget`,ipv6:`TextWidget`,uri:`URLWidget`,"data-url":`FileWidget`,radio:`RadioWidget`,select:`SelectWidget`,textarea:`TextareaWidget`,hidden:`HiddenWidget`,date:`DateWidget`,datetime:`DateTimeWidget`,"date-time":`DateTimeWidget`,"alt-date":`AltDateWidget`,"alt-datetime":`AltDateTimeWidget`,time:`TimeWidget`,color:`ColorWidget`,file:`FileWidget`},number:{text:`TextWidget`,select:`SelectWidget`,updown:`UpDownWidget`,range:`RangeWidget`,radio:`RadioWidget`,hidden:`HiddenWidget`},integer:{text:`TextWidget`,select:`SelectWidget`,updown:`UpDownWidget`,range:`RangeWidget`,radio:`RadioWidget`,hidden:`HiddenWidget`},array:{select:`SelectWidget`,checkboxes:`CheckboxesWidget`,files:`FileWidget`,hidden:`HiddenWidget`}};function kme(e){let t=X(e,`MergedWidget`);if(!t){let n=e.defaultProps?.options||{};t=({options:t,...r})=>(0,H.jsx)(e,{options:{...n,...t},...r}),dD(e,`MergedWidget`,t)}return t}function u4(e,t,n={}){let r=b0(e);if(typeof t==`function`||t&&c4.isForwardRef((0,b.createElement)(t))||c4.isMemo(t))return kme(t);if(typeof t!=`string`)throw Error(`Unsupported widget definition: ${typeof t} in schema: ${JSON.stringify(e)}`);if(t in n){let r=n[t];return u4(e,r,n)}if(typeof r==`string`){if(!(r in l4))throw Error(`No widget for type '${r}' in schema: ${JSON.stringify(e)}`);if(t in l4[r]){let i=n[l4[r][t]];return u4(e,i,n)}}throw Error(`No widget '${t}' for type '${r}' in schema: ${JSON.stringify(e)}`)}function d4(e){let t=0;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);t=(t<<5)-t+r,t&=t}return t.toString(16)}function f4(e){let t=new Set;return JSON.stringify(e,(e,n)=>(t.add(e),n)),JSON.stringify(e,Array.from(t).sort())}function p4(e){return d4(f4(e))}function Ame(e){return d4(f4(e))}function jme(e,t,n={}){try{return u4(e,t,n),!0}catch(e){let t=e;if(t.message&&(t.message.startsWith(`No widget`)||t.message.startsWith(`Unsupported widget`)))return!1;throw e}}function m4(e,t){return`${HE(e)?e:e.$id}__${t}`}function h4(e){return m4(e,`description`)}function g4(e){return m4(e,`error`)}function _4(e){return m4(e,`examples`)}function v4(e){return m4(e,`help`)}function y4(e){return m4(e,`title`)}function b4(e,t=!1){let n=t?` ${_4(e)}`:``;return`${g4(e)} ${h4(e)} ${v4(e)}${n}`}function x4(e,t){return`${e}-${t}`}function S4(e,t){return m4(e,t)}function C4(e,t){return m4(e,`optional${t}`)}function w4(e){return!iD(e)&&(!ZC(e)||Array.isArray(e)||!tD(e))}function Mme(e,t){let{rootSchema:n,schemaUtils:r}=e;return l0(t,n)?!0:`$ref`in n&&l0(t,r.retrieveSchema(n))}function T4(e,t,n){return t?n:e}function Nme(e){return e?new Date(e).toJSON():void 0}function E4(e,t,n,r=!1){!r&&Array.isArray(n)&&t.default!==void 0&&q2(t.default,n,r)===void 0&&console.error(`The schema default value "${t.default}" is not one of the values in the enum options for "${e}"`)}function D4(e,t,n){let r=[ipe];return BE(e,`formContext`)&&r.unshift(rpe),X(e,[...r,t],n)}function Pme(e,t){if(!Array.isArray(t))return e;let n=e=>e.reduce((e,t)=>(e[t]=!0,e),{}),r=e=>e.length>1?`properties '${e.join(`', '`)}'`:`property '${e[0]}'`,i=n(e),a=t.filter(e=>e===`*`||i[e]),o=n(a),s=e.filter(e=>!o[e]),c=a.indexOf(`*`);if(c===-1){if(s.length)throw Error(`uiSchema order list does not contain ${r(s)}`);return a}if(c!==a.lastIndexOf(`*`))throw Error(`uiSchema order list contains more than one wildcard item`);let l=[...a];return l.splice(c,1,...s),l}function O4(e,t=!0){if(!e)return{year:-1,month:-1,day:-1,hour:t?-1:0,minute:t?-1:0,second:t?-1:0};let n=new Date(e);if(Number.isNaN(n.getTime()))throw Error(`Unable to parse date ${e}`);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:t?n.getUTCHours():0,minute:t?n.getUTCMinutes():0,second:t?n.getUTCSeconds():0}}function Fme(e,t,n){let r=e[B1]??e[z1],i=n.uiSchemaDefinitions,a=r&&i?i[r]:void 0,o;if(o=a?!t||tD(t)?{...a}:C2(a,t):t||{},i){let t=e;if(r&&e.$ref&&!e[B1])try{t=_0(r,n.rootSchema)}catch(e){return console.warn(`could not resolve $ref in resolveUiSchema:
217
+ `,e),o}for(let e of[F1,k1]){let n=t[e];if(Array.isArray(n)&&n.length>0){let t=o[e],r=Array.isArray(t)?[...t]:[],a=!1;for(let e=0;e<n.length;e++){let t=n[e],o=t?.[B1]??t?.[z1];if(o&&o in i){let t=r[e]||{};r[e]=C2(i[o],t),a=!0}}a&&(o[e]=r)}}}return o}function k4(e){return e.const||e.enum?.length===1&&e.enum[0]===!0?!0:e.anyOf?.length===1?k4(e.anyOf[0]):e.oneOf?.length===1?k4(e.oneOf[0]):e.allOf?e.allOf.some(e=>k4(e)):!1}function A4({hideLabel:e,id:t,multiple:n,options:r,registry:i,uiSchema:a,value:o}){if(n||e)return null;let{label:s=!0}=J1(a,i.globalUiOptions);if(!s)return null;let c=r.enumOptions?.find(({value:e})=>K2(e,o)),l=c?.schema?.description;return l?(0,H.jsx)(o4(`DescriptionFieldTemplate`,i,r),{id:h4(t),description:l,schema:c.schema,uiSchema:a,registry:i}):null}function j4(e,t){if(Object.is(e,t))return!0;if(e==null||t==null||typeof e!=`object`||typeof t!=`object`)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r=0;r<n.length;r+=1){let i=n[r];if(!Object.hasOwn(t,i)||!Object.is(e[i],t[i]))return!1}return!0}function Ime(e,t,n,r=`customDeep`){if(r===`always`)return!0;if(r===`shallow`){let{props:r,state:i}=e;return!j4(r,t)||!j4(i,n)}let{props:i,state:a}=e;return!l0(i,t)||!l0(a,n)}function M4(e){let t=gD(e.map(e=>ZC(e)?b0(e):void 0).flat().filter(e=>e!==void 0));return t.length===1?t[0]:t}function N4(e,t,n,r){let{enableOptionalDataFieldForType:i=[]}=J1(r,e.globalUiOptions),a;return a=`anyOf`in t&&Array.isArray(t.anyOf)?M4(t[k1]):`oneOf`in t&&Array.isArray(t.oneOf)?M4(t[F1]):b0(t),!Mme(e,t)&&!n&&!!a&&!Array.isArray(a)&&!!i.find(e=>e===a)}function P4(e,t=!0){let{year:n,month:r,day:i,hour:a=0,minute:o=0,second:s=0}=e,c=Date.UTC(n,r-1,i,a,o,s),l=new Date(c).toJSON();return t?l:l.slice(0,10)}function F4(e,t=[]){if(!e)return[];let n=[];return`__errors`in e&&(n=n.concat(e[M1].map(e=>{let n=`.${t.join(`.`)}`;return{property:n,message:e,stack:`${n} ${e}`}}))),Object.keys(e).reduce((n,r)=>{if(r!==`__errors`){let i=e[r];if(xT(i))return n.concat(F4(i,[...t,r]))}return n},n)}function Lme(e){let t=new $2;return e.length&&e.forEach(e=>{let{property:n,message:r}=e,i=n===`.`?[]:mD(n);i.length>0&&i[0]===``&&i.splice(0,1),r&&t.addErrors(r,i)}),t.ErrorSchema}function I4(e,t,n,r){let i=Array.isArray(n)?n:n?.path,a=e===``?[]:[e],o=i?i.concat(...a):a,s=[t.idPrefix,...o].join(t.idSeparator),c;return t.nameGenerator&&o.length>0&&(c=t.nameGenerator(o,t.idPrefix,r)),{path:o,$id:s,...c!==void 0&&{name:c}}}function L4(e){return Object.keys(e).reduce((t,n)=>{if(n===`addError`)return t;let r=e[n];return xT(r)?{...t,[n]:L4(r)}:{...t,[n]:r}},{})}function Rme(e){return Object.values(e).every(e=>e!==-1)}function zme(e){let{className:t=`form-control`,type:n,range:r,value:i,select:a,rootId:o,name:s,disabled:c,readonly:l,autofocus:u,registry:d,onBlur:f,onFocus:p}=e,m=`${o}_${n}`,{SelectWidget:h}=d.widgets,g=(0,b.useCallback)(e=>a(n,e),[a,n]);return(0,H.jsx)(h,{schema:{type:`integer`},id:m,name:s,className:t,options:{enumOptions:U2(r[0],r[1])},placeholder:n,value:i,disabled:c,readonly:l,autofocus:u,onChange:g,onBlur:f,onFocus:p,registry:d,label:``,"aria-describedby":b4(o)})}function Bme(e){let{time:t=!1,disabled:n=!1,readonly:r=!1,options:i,onChange:a,value:o}=e,[s,c]=(0,b.useState)(O4(o,t));(0,b.useEffect)(()=>{c(O4(o,t))},[t,o]);let l=(0,b.useCallback)((e,n)=>{let r={...s,[e]:n===void 0?-1:n};Rme(r)?a(P4(r,t)):c(r)},[s,a,t]),u=(0,b.useCallback)(e=>{e.preventDefault(),!(n||r)&&a(void 0)},[n,r,a]),d=(0,b.useCallback)(e=>{if(e.preventDefault(),n||r)return;let i=O4(new Date().toJSON(),t);a(P4(i,t))},[n,r,t,a]);return{elements:(0,b.useMemo)(()=>Dme(s,t,i.yearsRange,i.format),[s,t,i.yearsRange,i.format]),handleChange:l,handleClear:u,handleSetNow:d}}function R4(e){let t=(0,b.useRef)(e);return l0(e,t.current)||(t.current=e),t.current}function Vme(e,t){return e.replace(`;base64`,`;name=${encodeURIComponent(t)};base64`)}async function Hme(e){let{name:t,size:n,type:r}=e;return new Promise((i,a)=>{let o=new window.FileReader;o.onerror=a,o.onload=e=>{typeof e.target?.result==`string`?i({dataURL:Vme(e.target.result,t),name:t,size:n,type:r}):i({dataURL:null,name:t,size:n,type:r})},o.readAsDataURL(e)})}async function Ume(e){return Promise.all(Array.from(e).map(Hme))}function Wme(e){return e.reduce((e,t)=>{if(!t)return e;try{let{blob:n,name:r}=wme(t);return[...e,{dataURL:t,name:r,size:n.size,type:n.type}]}catch{return e}},[])}function Gme(e,t,n=!1){let r=(0,b.useMemo)(()=>n&&e?Array.isArray(e)?e:[e]:[],[e,n]);return{filesInfo:(0,b.useMemo)(()=>Wme(Array.isArray(e)?e:[e||``]),[e]),handleChange:(0,b.useCallback)(async e=>{let i=(await Ume(e)).map(e=>e.dataURL||null);t(n?r.concat(...i):i[0])},[r,n,t]),handleRemove:(0,b.useCallback)(e=>{t(n?r.filter((t,n)=>n!==e):void 0)},[r,n,t])}}function Kme(e){if(!e)return``;let t=new Date(e);return`${H2(t.getFullYear(),4)}-${H2(t.getMonth()+1,2)}-${H2(t.getDate(),2)}T${H2(t.getHours(),2)}:${H2(t.getMinutes(),2)}:${H2(t.getSeconds(),2)}.${H2(t.getMilliseconds(),3)}`}function z4(e,t,n=!1){if(!t)return e;let{errors:r,errorSchema:i}=e,a=F4(t),o=t;return tD(i)||(o=C2(i,t,!n||`preventDuplicates`),a=[...r].concat(a)),{errorSchema:o,errors:a}}function qme(e){let t=e;for(let e in t)if(Object.hasOwn(t,e)){let n=t[e];e===`$ref`&&typeof n==`string`&&n.startsWith(`#`)?t[e]=G1+n:t[e]=B4(n)}return e}function Jme(e){return e.map(e=>B4(e))}function B4(e){return Array.isArray(e)?Jme([...e]):ZC(e)?qme({...e}):e}var V4;(function(e){e.ArrayItemTitle=`Item`,e.MissingItems=`Missing items definition`,e.EmptyArray=`No items yet. Use the button below to add some.`,e.YesLabel=`Yes`,e.NoLabel=`No`,e.CloseLabel=`Close`,e.ErrorsLabel=`Errors`,e.NewStringDefault=`New Value`,e.AddButton=`Add`,e.AddItemButton=`Add Item`,e.CopyButton=`Copy`,e.ExpandButton=`Expand Cycle`,e.MoveDownButton=`Move down`,e.MoveUpButton=`Move up`,e.RemoveButton=`Remove`,e.NowLabel=`Now`,e.ClearLabel=`Clear`,e.AriaDateLabel=`Select a date`,e.PreviewLabel=`Preview`,e.DecrementAriaLabel=`Decrease value by 1`,e.IncrementAriaLabel=`Increase value by 1`,e.OptionalObjectAdd=`Add data for optional field`,e.OptionalObjectRemove=`Remove data for optional field`,e.OptionalObjectEmptyMsg=`No data for optional field`,e.Type=`Type`,e.Value=`Value`,e.ClearButton=`clear input`,e.UnknownFieldType=`Unknown field type %1`,e.OptionPrefix=`Option %1`,e.TitleOptionPrefix=`%1 option %2`,e.KeyLabel=`%1 Key`,e.DeprecatedLabel=`%1 (deprecated)`,e.CycleDetected=`Circular reference ($ref cycle) detected for field "%1". You may choose to expand to the next cycle break`,e.InvalidObjectField=`Invalid "%1" object field configuration: _%2_.`,e.UnsupportedField=`Unsupported field schema.`,e.UnsupportedFieldWithId="Unsupported field schema for field `%1`.",e.UnsupportedFieldWithReason=`Unsupported field schema: _%1_.`,e.UnsupportedFieldWithIdAndReason="Unsupported field schema for field `%1`: _%2_.",e.FilesInfo=`**%1** (%2, %3 bytes)`})(V4||={});function H4(){return vD(`rjsf-array-item-`)}function U4(e){return Array.isArray(e)?e.map(e=>({key:H4(),item:e})):[]}function W4(e){return Array.isArray(e)?e.map(e=>e.item):[]}function Yme(e){return Array.isArray(e.type)?!e.type.includes(`null`):e.type!==`null`}function G4(e,t,n,r){let{addable:i}=J1(r,e.globalUiOptions);return i!==!1&&(i=t.maxItems===void 0||n.length<t.maxItems),i}function K4(e,t,n,r){if(typeof e.items==`function`)try{return e.items(t,n,r)}catch(e){console.error(`Error executing dynamic uiSchema.items function for item at index ${n}:`,e);return}else return e.items}function Xme(e,t){let{schemaUtils:n,globalFormOptions:r}=e,i=t.items;return r.useFallbackUiForUnsupportedType&&!i?i={}:x2(t)&&Qfe(t)&&(i=t.additionalItems),n.getDefaultFormState(i)}function Zme(e){let{schema:t,fieldPathId:n,uiSchema:r,formData:i=[],disabled:a=!1,readonly:o=!1,autofocus:s=!1,required:c=!1,placeholder:l,onBlur:u,onFocus:d,registry:f,rawErrors:p,name:m,onSelectChange:h}=e,{widgets:g,schemaUtils:_,globalFormOptions:v,globalUiOptions:y}=f,b=w2(_.retrieveSchema(t.items,i),r?.items??r),{widget:x=`select`,title:S,...C}=J1(r,y),w=u4(t,x,g),T=S??t.title??m,E=_.getDisplayLabel(t,r,y),D=R4(I4(``,v,n,!0));return(0,H.jsx)(w,{id:D.$id,name:m,multiple:!0,onChange:h,onBlur:u,onFocus:d,options:{...C,enumOptions:b},schema:t,uiSchema:r,registry:f,value:i,disabled:a,readonly:o,required:c,label:T,hideLabel:!E,placeholder:l,autofocus:s,rawErrors:p,htmlName:D.name})}function Qme(e){let{schema:t,fieldPathId:n,uiSchema:r,disabled:i=!1,readonly:a=!1,autofocus:o=!1,required:s=!1,hideError:c,placeholder:l,onBlur:u,onFocus:d,formData:f=[],registry:p,rawErrors:m,name:h,onSelectChange:g}=e,{widgets:_,schemaUtils:v,globalFormOptions:y,globalUiOptions:b}=p,{widget:x,title:S,...C}=J1(r,b),w=u4(t,x,_),T=S??t.title??h,E=v.getDisplayLabel(t,r,b),D=R4(I4(``,y,n,!0));return(0,H.jsx)(w,{id:D.$id,name:h,multiple:!0,onChange:g,onBlur:u,onFocus:d,options:C,schema:t,uiSchema:r,registry:p,value:f,disabled:i,readonly:a,hideError:c,required:s,label:T,hideLabel:!E,placeholder:l,autofocus:o,rawErrors:m,htmlName:D.name})}function $me(e){let{schema:t,uiSchema:n,fieldPathId:r,name:i,disabled:a=!1,readonly:o=!1,autofocus:s=!1,required:c=!1,onBlur:l,onFocus:u,registry:d,formData:f=[],rawErrors:p,onSelectChange:m}=e,{widgets:h,schemaUtils:g,globalFormOptions:_,globalUiOptions:v}=d,{widget:y=`files`,title:b,...x}=J1(n,v),S=u4(t,y,h),C=b??t.title??i,w=g.getDisplayLabel(t,n,v),T=R4(I4(``,_,r,!0));return(0,H.jsx)(S,{options:x,id:T.$id,name:i,multiple:!0,onChange:m,onBlur:l,onFocus:u,schema:t,uiSchema:n,value:f,disabled:a,readonly:o,required:c,registry:d,autofocus:s,rawErrors:p,label:C,hideLabel:!w,htmlName:T.name})}function ehe(e){let{itemKey:t,index:n,name:r,disabled:i,hideError:a,readonly:o,registry:s,uiOptions:c,parentUiSchema:l,canAdd:u,canRemove:d=!0,canMoveUp:f,canMoveDown:p,rawItemSchema:m,itemData:h,itemUiSchema:g,parentFieldPathId:_,itemErrorSchema:v,autofocus:y,onBlur:x,onFocus:S,onChange:C,rawErrors:w,totalItems:T,title:E,handleAddItem:D,handleCopyItem:O,handleRemoveItem:k,handleReorderItems:A}=e,{schemaUtils:j,fields:{ArraySchemaField:M,SchemaField:N},globalUiOptions:P,globalFormOptions:F}=s,I=(0,b.useMemo)(()=>j.retrieveSchema(m,h),[j,m,h]),L=(0,b.useMemo)(()=>I4(n,F,_),[n,F,_]),ee=M||N,te=o4(`ArrayFieldItemTemplate`,s,c),ne=j.getDisplayLabel(I,g,P),{description:R}=J1(g),z=!!R||!!I.description,{orderable:B=!0,removable:re=!0,copyable:ie=!1}=c,ae={moveUp:B&&f,moveDown:B&&p,copy:ie&&u,remove:re&&d,toolbar:!1};ae.toolbar=Object.keys(ae).some(e=>ae[e]);let oe=(0,b.useCallback)(e=>{D(e,n+1)},[D,n]),se=(0,b.useCallback)(e=>{O(e,n)},[O,n]),ce=(0,b.useCallback)(e=>{k(e,n)},[k,n]),le=(0,b.useCallback)(e=>{A(e,n,n-1)},[A,n]),ue=(0,b.useCallback)(e=>{A(e,n,n+1)},[A,n]);return(0,H.jsx)(te,{children:(0,H.jsx)(ee,{name:r,title:E,index:n,schema:I,uiSchema:g,formData:h,errorSchema:v,fieldPathId:L,required:Yme(I),onChange:C,onBlur:x,onFocus:S,registry:s,disabled:i,readonly:o,hideError:a,autofocus:y,rawErrors:w}),buttonsProps:{fieldPathId:L,disabled:i,readonly:o,canAdd:u,hasCopy:ae.copy,hasMoveUp:ae.moveUp,hasMoveDown:ae.moveDown,hasRemove:ae.remove,index:n,totalItems:T,onAddItem:oe,onCopyItem:se,onRemoveItem:ce,onMoveUpItem:le,onMoveDownItem:ue,registry:s,schema:I,uiSchema:g},itemKey:t,className:`rjsf-array-item`,disabled:i,hasToolbar:ae.toolbar,index:n,totalItems:T,readonly:o,registry:s,schema:I,uiSchema:g,parentUiSchema:l,displayLabel:ne,hasDescription:z})}var q4=(0,b.memo)(ehe);function the(e){let{schema:t,uiSchema:n={},errorSchema:r,fieldPathId:i,formData:a,name:o,title:s,disabled:c=!1,readonly:l=!1,autofocus:u=!1,required:d=!1,hideError:f=!1,registry:p,onBlur:m,onFocus:h,rawErrors:g,onChange:_,keyedFormData:v,handleAddItem:y,handleCopyItem:x,handleRemoveItem:S,handleReorderItems:C}=e,w=t.title||s||o,{schemaUtils:T,fields:E,formContext:D,globalUiOptions:O}=p,{OptionalDataControlsField:k}=E,A=(0,b.useMemo)(()=>J1(n,O),[n,O]),j=(0,b.useMemo)(()=>ZC(t.items)?t.items:{},[t.items]),M=(0,b.useMemo)(()=>T.retrieveSchema(j),[T,j]),N=(0,b.useMemo)(()=>W4(v),[v]),P=N4(p,t,d,n),F=w4(a),I=(0,b.useMemo)(()=>G4(p,t,N,n)&&(!P||F),[p,t,N,n,P,F]),L=F?v:[],ee=P?` rjsf-optional-array-field`:``,te=e.childFieldPathId??i,ne=P?(0,H.jsx)(k,{...e,fieldPathId:te}):void 0,R={canAdd:I,items:L.map((e,t)=>{let{key:i,item:a}=e,s=a,b=r?r[t]:void 0,T=K4(n,a,t,D),E={itemKey:i,index:t,name:o&&`${o}-${t}`,registry:p,uiOptions:A,parentUiSchema:n,hideError:f,readonly:l,disabled:c,required:d,title:w?`${w}-${t+1}`:void 0,canAdd:I,canMoveUp:t>0,canMoveDown:t<N.length-1,rawItemSchema:j,parentFieldPathId:te,itemErrorSchema:b,itemData:s,itemUiSchema:T,autofocus:u&&t===0,onBlur:m,onFocus:h,rawErrors:g,totalItems:v.length,handleAddItem:y,handleCopyItem:x,handleRemoveItem:S,handleReorderItems:C,onChange:_};return(0,H.jsx)(q4,{...E},i)}),className:`rjsf-field rjsf-field-array rjsf-field-array-of-${M.type}${ee}`,disabled:c,fieldPathId:i,uiSchema:n,onAddClick:y,readonly:l,required:d,schema:t,title:w,formData:N,rawErrors:g,registry:p,optionalDataControl:ne};return(0,H.jsx)(o4(`ArrayFieldTemplate`,p,A),{...R})}function nhe(e){let{schema:t,uiSchema:n={},formData:r,errorSchema:i,fieldPathId:a,name:o,title:s,disabled:c=!1,readonly:l=!1,autofocus:u=!1,required:d=!1,hideError:f=!1,registry:p,onBlur:m,onFocus:h,rawErrors:g,keyedFormData:_,onChange:v,handleAddItem:y,handleCopyItem:x,handleRemoveItem:S,handleReorderItems:C}=e,{formData:w=[]}=e,T=t.title||s||o,{fields:E,formContext:D,globalUiOptions:O}=p,k=(0,b.useMemo)(()=>J1(n,O),[n,O]),{OptionalDataControlsField:A}=E,j=N4(p,t,d,n),M=w4(r),N=(0,b.useMemo)(()=>ZC(t.items)?t.items:[],[t.items]),P=ZC(t.additionalItems),F=e.childFieldPathId??a;w.length<N.length&&(w=w.concat(Array(N.length-w.length)));let I=M?_:[],L=j?` rjsf-optional-array-field`:``,ee=j?(0,H.jsx)(A,{...e,fieldPathId:F}):void 0,te=G4(p,t,w,n)&&P&&(!j||M),ne={canAdd:te,className:`rjsf-field rjsf-field-array rjsf-field-array-fixed-items${L}`,disabled:c,fieldPathId:a,formData:r,items:I.map((e,r)=>{let{key:a,item:s}=e,b=s,E=r>=N.length,O=(E&&ZC(t.additionalItems)?t.additionalItems:N[r])||{},A;A=E?n.additionalItems:Array.isArray(n.items)?n.items[r]:K4(n,s,r,D);let j=i?i[r]:void 0,M={index:r,itemKey:a,name:o&&`${o}-${r}`,registry:p,uiOptions:k,parentUiSchema:n,hideError:f,readonly:l,disabled:c,required:d,title:T?`${T}-${r+1}`:void 0,canAdd:te,canRemove:E,canMoveUp:r>=N.length+1,canMoveDown:E&&r<w.length-1,rawItemSchema:O,itemData:b,itemUiSchema:A,parentFieldPathId:F,itemErrorSchema:j,autofocus:u&&r===0,onBlur:m,onFocus:h,rawErrors:g,totalItems:_.length,onChange:v,handleAddItem:y,handleCopyItem:x,handleRemoveItem:S,handleReorderItems:C};return(0,H.jsx)(q4,{...M},a)}),onAddClick:y,readonly:l,required:d,registry:p,schema:t,uiSchema:n,title:T,errorSchema:i,rawErrors:g,optionalDataControl:ee};return(0,H.jsx)(o4(`ArrayFieldTemplate`,p,k),{...ne})}function rhe(e=[]){let t=(0,b.useMemo)(()=>p4(e),[e]),[n,r]=(0,b.useState)(()=>({formDataHash:t,keyedFormData:U4(e)})),{keyedFormData:i,formDataHash:a}=n;if(t!==a){let n=Array.isArray(e)?e:[],o=i||[];i=n.length===o.length?o.map((e,t)=>({key:e.key,item:n[t]})):U4(n),a=t,r({formDataHash:a,keyedFormData:i})}let o=(0,b.useCallback)(e=>{let t=W4(e),n=p4(t);return r({formDataHash:n,keyedFormData:e}),t},[]);return{keyedFormData:i,updateKeyedFormData:o}}function ihe(e){let{schema:t,uiSchema:n,errorSchema:r,fieldPathId:i,registry:a,formData:o,onChange:s}=e,{globalFormOptions:c,schemaUtils:l,translateString:u}=a,{keyedFormData:d,updateKeyedFormData:f}=rhe(o),p=(0,b.useRef)(d);p.current=d;let m=(0,b.useRef)(r);m.current=r;let h=e.childFieldPathId??i,g=(0,b.useCallback)((e,n)=>{e&&e.preventDefault();let r;if(m.current){r={};for(let e of Object.keys(m.current)){let t=parseInt(e,10);n===void 0||t<n?dD(r,[t],m.current[t]):t>=n&&dD(r,[t+1],m.current[t])}}let i={key:H4(),item:Xme(a,t)},o=[...p.current];n===void 0?o.push(i):o.splice(n,0,i),s(f(o),h.path,r)},[a,t,s,f,h]),_=(0,b.useCallback)((e,t)=>{e&&e.preventDefault();let n;if(m.current){n={};for(let e of Object.keys(m.current)){let r=parseInt(e,10);r<=t?dD(n,[r],m.current[r]):r>t&&dD(n,[r+1],m.current[r])}}let r={key:H4(),item:iE(p.current[t].item)},i=[...p.current];t===void 0?i.push(r):i.splice(t+1,0,r),s(f(i),h.path,n)},[s,f,h]),v=(0,b.useCallback)((e,t)=>{e&&e.preventDefault();let n;if(m.current){n={};for(let e of Object.keys(m.current)){let r=parseInt(e,10);r<t?dD(n,[r],m.current[r]):r>t&&dD(n,[r-1],m.current[r])}}let r=p.current.filter((e,n)=>n!==t);s(f(r),h.path,n)},[s,f,h]),y=(0,b.useCallback)((e,t,n)=>{e&&(e.preventDefault(),e.currentTarget.blur());let r;if(m.current){r={};for(let e of Object.keys(m.current)){let i=parseInt(e,10);i===t?dD(r,[n],m.current[t]):i===n?dD(r,[t],m.current[n]):dD(r,[e],m.current[i])}}function i(){let e=p.current.slice();return e.splice(t,1),e.splice(n,0,p.current[t]),e}let a=i();s(f(a),h.path,r)},[s,f,h]),x=(0,b.useCallback)((e,t,n,r)=>{let i=typeof t.at(-1)==`number`;s(i&&e===void 0?null:e,t,n,r)},[s]),S=(0,b.useCallback)(e=>{s(e,h.path,void 0,h?.$id)},[s,h]),C={...e,formData:o,fieldPathId:h,onSelectChange:S},w={...e,handleAddItem:g,handleCopyItem:_,handleRemoveItem:v,handleReorderItems:y,keyedFormData:d,onChange:x};if(!(`items`in t)){if(!c.useFallbackUiForUnsupportedType)return(0,H.jsx)(o4(`UnsupportedFieldTemplate`,a,J1(n)),{schema:t,fieldPathId:i,reason:u(V4.MissingItems),registry:a});let e={...t,[N1]:{type:void 0}};C.schema=e,w.schema=e}return l.isMultiSelect(C.schema)?(0,H.jsx)(Zme,{...C}):F2(n)?(0,H.jsx)(Qme,{...C}):x2(C.schema)?(0,H.jsx)(nhe,{...w}):l.isFilesArray(C.schema,n)?(0,H.jsx)($me,{...C}):(0,H.jsx)(the,{...w})}function ahe(e){let{schema:t,name:n,uiSchema:r,fieldPathId:i,formData:a,registry:o,required:s,disabled:c,readonly:l,hideError:u,autofocus:d,title:f,onChange:p,onFocus:m,onBlur:h,rawErrors:g}=e,{title:_}=t,{widgets:v,translateString:y,globalUiOptions:x}=o,{widget:S=`checkbox`,title:C,label:w=!0,enumNames:T,...E}=J1(r,x),D=u4(t,S,v),O=y(V4.YesLabel),k=y(V4.NoLabel),A,j=C??_??f??n;if(Array.isArray(t.oneOf))A=w2({oneOf:t.oneOf.map(e=>{if(ZC(e))return{...e,title:e.title||(e.const===!0?O:k)}}).filter(e=>e)},r);else{let e=t.enum??[!0,!1];A=!T&&e.length===2&&e.every(e=>typeof e==`boolean`)?[{value:e[0],label:e[0]?O:k},{value:e[1],label:e[1]?O:k}]:w2({enum:e},r)}let M=(0,b.useCallback)((e,t,n)=>p(e,i.path,t,n),[p,i]);return(0,H.jsx)(D,{options:{...E,enumOptions:A},schema:t,uiSchema:r,id:i.$id,name:n,onChange:M,onFocus:m,onBlur:h,label:j,hideLabel:!w,value:a,required:s,disabled:c,readonly:l,hideError:u,registry:o,autofocus:d,rawErrors:g,htmlName:i.name})}function ohe(e){let[t,n]=(0,b.useState)(!1),{name:r,registry:i,schema:a,uiSchema:o,fieldPathId:s}=e,{globalUiOptions:c}=i,l=o4(`CyclicSchemaExpandTemplate`,i,J1(o,c));if(!t)return(0,H.jsx)(l,{registry:i,schema:a,uiSchema:o,name:r,fieldPathId:s,onExpand:()=>n(!0)});let{fields:u}=i,{SchemaField:d}=u;return(0,H.jsx)(d,{...e,schema:{...a,[V1]:!1}})}function she(e){return{type:`string`,enum:[`string`,`number`,`boolean`,`object`,`array`],default:`string`,title:e}}function che(e){let t=typeof e;return t===`string`||t===`number`||t===`boolean`?t:t===`object`?Array.isArray(e)?`array`:`object`:`string`}function lhe(e,t){switch(t){case`string`:return String(e);case`number`:{let t=Number(e);return Number.isNaN(t)?0:t}case`boolean`:return!!e;default:return e}}function uhe(e){let{id:t,formData:n,displayLabel:r=!0,schema:i,name:a,uiSchema:o,required:s,disabled:c=!1,readonly:l=!1,onBlur:u,onFocus:d,registry:f,fieldPathId:p,onChange:m,errorSchema:h}=e,{translateString:g,fields:_,globalFormOptions:v}=f,[y,x]=(0,b.useState)(che(n)),S=J1(o),C=R4(I4(`__internal_type_selector`,v,p)),w=g(V4.Type),T=(0,b.useMemo)(()=>she(w),[w]),E=e=>{e!=null&&(x(e),m(lhe(n,e),p.path,h,t))};if(!v.useFallbackUiForUnsupportedType){let{reason:t=g(V4.UnknownFieldType,[String(i.type)])}=e;return(0,H.jsx)(o4(`UnsupportedFieldTemplate`,f,S),{schema:i,fieldPathId:p,reason:t,registry:f})}let D=o4(`FallbackFieldTemplate`,f,S),{SchemaField:O}=_;return(0,H.jsx)(D,{schema:i,registry:f,typeSelector:(0,H.jsx)(O,{fieldPathId:C,name:`${a}__fallback_type`,schema:T,formData:y,onChange:E,onBlur:u,onFocus:d,registry:f,hideLabel:!r,disabled:c,readonly:l,required:s},n?p4(n):`__empty__`),schemaField:(0,H.jsx)(O,{...e,schema:{type:y,title:g(V4.Value),...y===`object`&&{additionalProperties:!0}}})})}var J4;(function(e){e.ROW=`ui:row`,e.COLUMN=`ui:col`,e.COLUMNS=`ui:columns`,e.CONDITION=`ui:condition`})(J4||={});var Y4;(function(e){e.ALL=`all`,e.SOME=`some`,e.NONE=`none`})(Y4||={});var dhe=/^\$lookup=(.+)/,X4=`layoutGrid`;`${X4}`;function Z4(e,t){return e??t}function fhe(e){return/^\d+?$/.test(e)}var Q4=s4();function phe(e,t,n,r,i){let a=X(n,[q1],{}),o=X(n,e),s={...X(o,[K1],{}),...t,...a},c={...o};tD(s)||dD(c,[K1],s),tD(a)||dD(c,[q1],a);let{readonly:l}=J1(c);return(i===!0||aD(l)&&r===!0)&&(l=!0,BE(s,`readonly`)?dD(c,[K1,L1],!0):dD(c,`ui:${L1}`,!0)),{fieldUiSchema:c,uiReadonly:l}}function mhe(e,t,n=`$0m3tH1nG Un3xP3cT3d`){let r=_T([t]).sort(),i=_T([n]).sort();switch(e){case Y4.ALL:return nD(r,i);case Y4.SOME:return XE(r,i).length>0;case Y4.NONE:return XE(r,i).length===0;default:return!1}}function $4(e,t,n){let r={},i=e[t];if(xT(i)){let{children:e,className:t,...a}=i;if(i=e,t){let e=t.split(` `).map(e=>D4(n,e,e)).join(` `);r={...a,className:e}}else r=a}if(!Array.isArray(i))throw TypeError(`Expected array for "${t}" in ${JSON.stringify(e)}`);return{children:i,gridProps:r}}function e3(e,t,n){let r,i=t;if(fhe(n)&&e&&e?.type===`array`&&BE(e,`items`)){let a=Number(n),o=e[N1];r=Array.isArray(o)?a>o.length?PE(o):o[a]:o,i={$id:t.$id,path:[...t.path.slice(0,t.path.length-1),a]}}return{rawSchema:r,fieldPathId:i}}function hhe(e,t,n,r,i){let{schemaUtils:a,globalFormOptions:o}=e,s=n,c=i,l=t.split(`.`),u=l.pop(),d=a.retrieveSchema(s,r),f=r,p=d.readOnly;l.forEach(e=>{if(c=I4(e,o,c),BE(d,`properties`))s=X(d,[I1,e],{});else if(d&&(BE(d,`oneOf`)||BE(d,`anyOf`))){let t=BE(d,`oneOf`)?F1:k1;s=X(a.findSelectedOptionInXxxOf(d,e,t,f),[I1,e],{})}else{let t=e3(d,c,e);s=t.rawSchema??{},c=t.fieldPathId}f=X(f,e,{}),d=a.retrieveSchema(s,f),p=Z4(d.readOnly,p)});let m,h=!1;if(tD(d)&&(d=void 0),d&&u){if(d&&(BE(d,`oneOf`)||BE(d,`anyOf`))){let e=BE(d,`oneOf`)?F1:k1;d=a.findSelectedOptionInXxxOf(d,u,e,f)}c=I4(u,o,c),h=d!==void 0&&Array.isArray(d.required)&&KE(d.required,u);let e=e3(d,c,u);if(e.rawSchema?(d=e.rawSchema,c=e.fieldPathId):(d=X(d,[I1,u]),d&&=a.retrieveSchema(d)),p=Z4(d?.readOnly,p),d&&(BE(d,`oneOf`)||BE(d,`anyOf`))){let e=BE(d,`oneOf`)?F1:k1,t=v0(d);m={options:d[e],hasDiscriminator:!!t}}}return{schema:d,isRequired:h,isReadonly:p,optionsInfo:m,fieldPathId:c}}function ghe(e,t){let n=e;return HE(n)&&(n=D4(t,n)),ow(n)?n:null}function _he(e,t){let n,r=null,i={},a;if(HE(t)||aD(t))n=t??``;else{let{name:o=``,render:s,...c}=t;n=o,i=c,tD(i)||Rae(i,(t,n)=>{if(HE(t)){let r=dhe.exec(t);if(Array.isArray(r)&&r.length>1){let t=r[1];i[n]=D4(e,t,t)}}}),r=ghe(s,e),!o&&r&&(a=(0,H.jsx)(r,{...c,"data-testid":Q4.uiComponent}))}return{name:n,UIComponent:r,uiProps:i,rendered:a}}function t3(e){let{childrenLayoutGridSchemaId:t,...n}=e,{registry:r,schema:i,formData:a}=n,{schemaUtils:o}=r,s=o.retrieveSchema(i,a);return t.map(e=>(0,b.createElement)(n3,{...n,key:`layoutGrid-${p4(e)}`,schema:s,layoutGridSchema:e}))}function vhe(e){let{layoutGridSchema:t,...n}=e,{formData:r,registry:i}=n,{children:a,gridProps:o}=$4(t,J4.CONDITION,i),{operator:s,field:c=``,value:l}=o;return mhe(s,X(r,c,null),l)?(0,H.jsx)(t3,{...n,childrenLayoutGridSchemaId:a}):null}function yhe(e){let{layoutGridSchema:t,...n}=e,{registry:r,uiSchema:i}=n,{children:a,gridProps:o}=$4(t,J4.COLUMN,r);return(0,H.jsx)(o4(`GridTemplate`,r,J1(i)),{column:!0,"data-testid":Q4.col,...o,children:(0,H.jsx)(t3,{...n,childrenLayoutGridSchemaId:a})})}function bhe(e){let{layoutGridSchema:t,...n}=e,{registry:r,uiSchema:i}=n,{children:a,gridProps:o}=$4(t,J4.COLUMNS,r),s=o4(`GridTemplate`,r,J1(i));return a.map(e=>(0,H.jsx)(s,{column:!0,"data-testid":Q4.col,...o,children:(0,H.jsx)(t3,{...n,childrenLayoutGridSchemaId:[e]})},`column-${p4(e)}`))}function xhe(e){let{layoutGridSchema:t,...n}=e,{registry:r,uiSchema:i}=n,{children:a,gridProps:o}=$4(t,J4.ROW,r);return(0,H.jsx)(o4(`GridTemplate`,r,J1(i)),{...o,"data-testid":Q4.row,children:(0,H.jsx)(t3,{...n,childrenLayoutGridSchemaId:a})})}function She(e){let{gridSchema:t,schema:n,uiSchema:r,errorSchema:i,fieldPathId:a,onBlur:o,onFocus:s,formData:c,readonly:l,registry:u,layoutGridSchema:d,...f}=e,{onChange:p}=f,{fields:m}=u,{SchemaField:h,LayoutMultiSchemaField:g}=m,_=_he(u,t),{name:v,UIComponent:y,uiProps:b}=_,{schema:x,isRequired:S,isReadonly:C,optionsInfo:w,fieldPathId:T}=hhe(u,v,n,c,a),E=R4(T);if(_.rendered)return _.rendered;if(x){let e=w?.hasDiscriminator?g:h,{fieldUiSchema:t,uiReadonly:n}=phe(v,b,r,C,l);return(0,H.jsx)(e,{"data-testid":w?.hasDiscriminator?Q4.layoutMultiSchemaField:Q4.field,...f,name:v,required:S,readonly:n,schema:x,uiSchema:t,errorSchema:X(i,v),fieldPathId:E,formData:X(c,v),onChange:p,onBlur:o,onFocus:s,options:w?.options,registry:u})}return y?(0,H.jsx)(y,{"data-testid":Q4.uiComponent,...f,name:v,required:S,formData:c,readOnly:!!C||l,errorSchema:i,uiSchema:r,schema:n,fieldPathId:a,onBlur:o,onFocus:s,registry:u,...b}):null}function n3(e){let{uiSchema:t}=e,{layoutGridSchema:n}=e,r=J1(t);if(!n&&`layoutGrid`in r&&ZC(r.layoutGrid)&&(n=r[X4]),ZC(n)){if(J4.ROW in n)return(0,H.jsx)(xhe,{...e,layoutGridSchema:n});if(J4.COLUMN in n)return(0,H.jsx)(yhe,{...e,layoutGridSchema:n});if(J4.COLUMNS in n)return(0,H.jsx)(bhe,{...e,layoutGridSchema:n});if(J4.CONDITION in n)return(0,H.jsx)(vhe,{...e,layoutGridSchema:n})}return(0,H.jsx)(She,{...e,gridSchema:n})}n3.TEST_IDS=Q4;function Che(e){let{fieldPathId:t,title:n,schema:r,uiSchema:i,required:a,registry:o,name:s}=e,c=J1(i,o.globalUiOptions),{title:l}=c,{title:u}=r,d=l||n||u||s;return d?(0,H.jsx)(o4(`TitleFieldTemplate`,o,c),{id:y4(t),title:d,required:a,schema:r,uiSchema:i,registry:o}):null}function r3(e,t,n){return e.map(({schema:e})=>e).find(e=>{let r=X(e,[I1,t]);return X(r,j1,X(r,A1,`!@#!@$@#$!@$#`))===n})}function i3(e,t,n,r,i){let a=t.map(e=>n.retrieveSchema(e,i)),o=e;BE(e,`oneOf`)?o={...e,[F1]:a}:BE(e,`anyOf`)&&(o={...e,[k1]:a});let s=w2(o,r);if(!s)throw Error(`No enumOptions were computed from the schema ${JSON.stringify(o)}`);return s}function whe(e){let{name:t,baseType:n,disabled:r=!1,formData:i,fieldPathId:a,onBlur:o,onChange:s,options:c,onFocus:l,registry:u,uiSchema:d,schema:f,autofocus:p,readonly:m,required:h,errorSchema:g,hideError:_=!1}=e,{widgets:v,schemaUtils:y,globalUiOptions:x}=u,[S,C]=(0,b.useState)(i3(f,c,y,d,i)),w=X(a,`$id`),T=v0(f),E=o4(`FieldErrorTemplate`,u,c),D=o4(`FieldTemplate`,u,c);(0,b.useEffect)(()=>{C(i3(f,c,y,d,i))},[p4(f),p4(c),y,d?p4(d):``,i?p4(i):``]);let{widget:O=T?`radio`:`select`,title:k=``,placeholder:A=``,optionsSchemaSelector:j=T,hideError:M,...N}=J1(d);if(!j)throw Error(`No selector field provided for the LayoutMultiSchemaField`);let P=X(i,j),F=X(S[0]?.schema,[I1,j],{}),I=r3(S,j,P);F=F?.type?F:{...F,type:I?.type||n};let L=u4(F,O,v),ee=M===void 0?_:!!M,te=X(g,[M1],[]),ne=sD(g,[M1]),R=y.getDisplayLabel(f,d,x),z=e=>{if(r||m)return;let t=r3(S,j,e),n=r3(S,j,P),o=y.sanitizeDataForNewSchema(t,n,i);o&&t&&(o=y.getDefaultFormState(t,o,`excludeObjectChildren`)),o&&dD(o,j,e),s(o,a.path,void 0,w)},B={enumOptions:S,...N},re=!ee&&te.length>0?(0,H.jsx)(E,{fieldPathId:a,schema:f,errors:te,registry:u}):void 0;return(0,H.jsx)(D,{fieldPathId:a,id:w,schema:f,label:(k||f.title)??``,disabled:r||Array.isArray(S)&&tD(S),uiSchema:d,required:h,readonly:!!m,registry:u,displayLabel:R,errors:re,onChange:s,onKeyRename:mw,onKeyRenameBlur:mw,onRemoveProperty:mw,children:(0,H.jsx)(L,{id:w,name:t,schema:f,label:(k||f.title)??``,disabled:r||Array.isArray(S)&&tD(S),uiSchema:d,autofocus:p,readonly:m,required:h,registry:u,multiple:!1,rawErrors:te,hideError:ee,hideLabel:!R,errorSchema:ne,placeholder:A,onChange:z,onBlur:o,onFocus:l,value:P,options:B,htmlName:a.name})})}function a3(e){let{name:t,disabled:n=!1,errorSchema:r={},formData:i,fieldPathId:a,onBlur:o,onChange:s,onFocus:c,options:l,readonly:u,registry:d,required:f=!1,schema:p,uiSchema:m}=e,{schemaUtils:h}=d,g=(0,b.useMemo)(()=>l.map(e=>h.retrieveSchema(e,i)),[l,h,p4(i??null)]),[_,v]=(0,b.useState)(()=>{let e=v0(p);return h.getClosestMatchingOption(i,g,0,e)}),y=(0,b.useRef)(!1),x=(0,b.useRef)(i),S=(0,b.useRef)(a.$id);(0,b.useEffect)(()=>{let e=x.current,t=S.current;if(x.current=i,S.current=a.$id,!l0(i,e)&&a.$id===t){if(y.current){y.current=!1;return}let e=v0(p),t=h.getClosestMatchingOption(i,g,_,e);t!==_&&v(t)}});let C=`${a.$id}${p.oneOf?`__oneof_select`:`__anyof_select`}`,w=(0,b.useCallback)(e=>{if(n||u)return;let t=e===void 0?-1:parseInt(e,10);if(t===_)return;let r=t>=0?g[t]:void 0,o=_>=0?g[_]:void 0,c=h.sanitizeDataForNewSchema(r,o,i);r&&(c=h.getDefaultFormState(r,c,`excludeObjectChildren`)),v(t),y.current=!0,s(c,a.path,void 0,C)},[_,g,n,u,h,i,a,s,C]),{widgets:T,fields:E,translateString:D,globalUiOptions:O}=d,{SchemaField:k}=E,A=o4(`MultiSchemaFieldTemplate`,d,O),j=N4(d,p,f,m),M=w4(i),{widget:N=`select`,placeholder:P,autofocus:F,autocomplete:I,title:L=p.title,...ee}=J1(m,O),te=u4({type:`number`},N,T),ne=X(r,M1,[]),R=sD(r,[M1]),z=h.getDisplayLabel(p,m,O),B=_>=0&&g[_]||null,re;if(B){let{required:e,type:t}=p,n={};e&&(n.required=e),t!==void 0&&!(`type`in B)&&(n.type=t),re=Object.keys(n).length>0?x0(n,B):B}let ie=[];`oneOf`in p&&m&&`oneOf`in m?Array.isArray(m.oneOf)?ie=m[F1]:console.warn(`uiSchema.oneOf is not an array for "${L||t}"`):`anyOf`in p&&m&&`anyOf`in m&&(Array.isArray(m.anyOf)?ie=m[k1]:console.warn(`uiSchema.anyOf is not an array for "${L||t}"`));let ae=m;_>=0&&ie.length>_&&(ae=ie[_]);let oe=L?V4.TitleOptionPrefix:V4.OptionPrefix,se=L?[L]:[],ce=g.map((e,t)=>{let{title:n=e.title}=J1(ie[t]);return{label:n||D(oe,se.concat(String(t+1))),value:t}});return(0,H.jsx)(A,{schema:p,registry:d,uiSchema:m,selector:!j||M?(0,H.jsx)(te,{id:C,name:`${t}${p.oneOf?`__oneof_select`:`__anyof_select`}`,schema:{type:`number`,default:0},onChange:w,onBlur:o,onFocus:c,disabled:n||tD(ce),multiple:!1,rawErrors:ne,errorSchema:R,value:_>=0?_:void 0,options:{enumOptions:ce,...ee},registry:d,placeholder:P,autocomplete:I,autofocus:F,label:L??t,hideLabel:!z,readonly:u}):void 0,optionSchemaField:re&&re.type!==`null`&&(0,H.jsx)(k,{...e,schema:re,uiSchema:ae})||null})}function The(e){let{formData:t,onChange:n,fieldPathId:r}=e;return(0,b.useEffect)(()=>{t===void 0&&n(null,r.path)},[r,t,n]),null}var Ehe=/\.([0-9]*0)*$/,Dhe=/[0.]0*$/;function Ohe(e){let{registry:t,onChange:n,formData:r,value:i}=e,[a,o]=(0,b.useState)(i),{StringField:s}=t.fields,c=r,l=(0,b.useCallback)((e,t,r,i)=>{o(e);let a=`${e}`.startsWith(`.`)?`0${e}`:e,s=typeof a==`string`&&Ehe.exec(a)?E1(a.replace(Dhe,``)):E1(a);n(s,t,r,i)},[n]);if(typeof a==`string`&&typeof c==`number`){let e=RegExp(`^(${String(c).replace(`.`,`\\.`)})?\\.?0*$`);a.match(e)&&(c=a)}return(0,H.jsx)(s,{...e,formData:c,onChange:l})}var o3;function khe(e){if(!o3)if(typeof document<`u`)o3=document.createElement(`textarea`);else return;var t=`&`+e+`;`;o3.innerHTML=t;var n=o3.value;return n===t?void 0:n}var Q=32,s3=9,c3=13,l3=10,u3=96,d3=126,f3=91,p3=94,m3=62,h3=35,g3=37,_3=45,v3=61,y3=92,b3=42,x3=95,S3=60,C3=64,w3=93,T3=33,E3=38,D3=58,O3=70,k3=102,A3=104,j3=119,M3=116,N3=112,P3=115,Ahe=160,jhe=12,Mhe=44,F3=59,I3=63,L3=46,R3=47,z3=39,B3=34,V3=43,H3=124,U3=123,W3=125,G3=40,K3=41,Nhe=120,Phe=88,q3=30,J3=48,Y3=57,X3=65,Z3=90,Q3=97,$3=122,e6=128,t6=32,$={blockQuote:0,breakLine:1,breakThematic:2,codeBlock:3,codeInline:4,footnote:5,footnoteReference:6,frontmatter:7,gfmTask:8,heading:9,htmlBlock:10,htmlComment:11,htmlSelfClosing:12,image:13,link:14,orderedList:15,paragraph:16,ref:17,refCollection:18,table:19,text:20,textFormatted:21,unorderedList:22};function Fhe(e){if(!u6(e,`---`))return null;let t=3;for(;t<e.length&&(e[t]===` `||e[t]===` `);)t++;if(t<e.length&&e[t]===`\r`&&t++,t>=e.length||e[t]!==`
218
+ `)return null;t++;let n=!1;for(;t<e.length;){let r=t;for(;t<e.length&&e[t]!==`
219
+ `&&e[t]!==`\r`;)t++;if(t>=e.length)break;let i=t;if(e[t]===`\r`&&t++,t<e.length&&e[t]===`
220
+ `&&t++,u6(e,`---`,r))return{endPos:t,hasValidYaml:n};if(!n){let t=Ghe(e,r,i);if(t<i){let r=e.charCodeAt(t);if(r>=Q3&&r<=$3||r>=X3&&r<=Z3||r>=J3&&r<=Y3||r===x3){for(t++;t<i&&(r=e.charCodeAt(t),r>=Q3&&r<=$3||r>=X3&&r<=Z3||r>=J3&&r<=Y3||r===x3||r===_3||r===L3);)t++;t<i&&e.charCodeAt(t)===D3&&(t++,t>=i?n=!0:(r=e.charCodeAt(t),(r===Q||r===s3)&&(n=!0)))}}}}return null}var Ihe=/&([a-zA-Z0-9]+|#[0-9]{1,7}|#x[0-9a-fA-F]{1,6});/gi,Lhe={class:`className`,for:`htmlFor`,allowfullscreen:`allowFullScreen`,allowtransparency:`allowTransparency`,autocomplete:`autoComplete`,autofocus:`autoFocus`,autoplay:`autoPlay`,cellpadding:`cellPadding`,cellspacing:`cellSpacing`,charset:`charSet`,classid:`classId`,colspan:`colSpan`,contenteditable:`contentEditable`,contextmenu:`contextMenu`,crossorigin:`crossOrigin`,enctype:`encType`,formaction:`formAction`,formenctype:`formEncType`,formmethod:`formMethod`,formnovalidate:`formNoValidate`,formtarget:`formTarget`,frameborder:`frameBorder`,hreflang:`hrefLang`,inputmode:`inputMode`,keyparams:`keyParams`,keytype:`keyType`,marginheight:`marginHeight`,marginwidth:`marginWidth`,maxlength:`maxLength`,mediagroup:`mediaGroup`,minlength:`minLength`,novalidate:`noValidate`,radiogroup:`radioGroup`,readonly:`readOnly`,rowspan:`rowSpan`,spellcheck:`spellCheck`,srcdoc:`srcDoc`,srclang:`srcLang`,srcset:`srcSet`,tabindex:`tabIndex`,usemap:`useMap`,viewbox:`viewBox`},Rhe={};function n6(e){if(!e)return Rhe;var t={};for(var n in e){var r=Lhe[n.toLowerCase()];if(r)t[r]=e[n];else{var i=n.indexOf(`:`);i===-1?t[n]=e[n]:t[n.slice(0,i)+n[i+1].toUpperCase()+n.slice(i+2)]=e[n]}}return t}var zhe=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s|^<(div|p|h[1-6]|ul|ol|li|blockquote|pre|table|thead|tbody|tr|td|th|dl|dt|dd|hr|address|article|aside|details|dialog|figure|figcaption|footer|form|header|main|menu|nav|section|summary|textarea|fieldset|legend|center|dir|hgroup|marquee|search|output|template)\b)/i;function r6(e){return e.indexOf(`&`)===-1?e:e.replace(Ihe,(e,t)=>{var n=khe(t);if(n)return n;if(t[0]===`#`){var r=t[1]===`x`||t[1]===`X`?parseInt(t.slice(2),16):parseInt(t.slice(1),10);return r===0||r>=55296&&r<=57343||r>1114111?`�`:r<=65535?String.fromCharCode(r):String.fromCharCode(55296+(r-65536>>10),56320+(r-65536&1023))}return e})}var i6=/(javascript|vbscript|data(?!:image)):/i;function a6(e){if(i6.test(e))return null;if(e.indexOf(`%`)===-1)return e;try{let t=decodeURIComponent(e).replace(/[^A-Za-z0-9/:]/g,``);if(i6.test(t))return null}catch{return null}return e}var o6={},s6,c6;for(s6=[192,193,194,195,196,197,224,225,226,227,228,229,230,198],c6=0;c6<s6.length;c6++)o6[s6[c6]]=`a`;for(o6[231]=o6[199]=`c`,o6[240]=o6[208]=`d`,s6=[200,201,202,203,233,232,234,235],c6=0;c6<s6.length;c6++)o6[s6[c6]]=`e`;for(s6=[207,239,206,238,205,237,204,236],c6=0;c6<s6.length;c6++)o6[s6[c6]]=`i`;for(o6[209]=o6[241]=`n`,s6=[248,216,339,338,213,245,212,244,211,243,210,242],c6=0;c6<s6.length;c6++)o6[s6[c6]]=`o`;for(s6=[220,252,219,251,218,250,217,249],c6=0;c6<s6.length;c6++)o6[s6[c6]]=`u`;o6[376]=o6[255]=o6[221]=o6[253]=`y`;function l6(e){for(var t=``,n=-1,r=e.length,i=0;i<r;i++){var a=e.charCodeAt(i);if(a>=Q3&&a<=$3||a>=J3&&a<=Y3){n<0&&(n=i);continue}if(a>=X3&&a<=Z3){n>=0&&(t+=e.slice(n,i),n=-1),t+=String.fromCharCode(a+t6);continue}if(a===Q||a===_3){n>=0&&(t+=e.slice(n,i),n=-1),t+=`-`;continue}n>=0&&(t+=e.slice(n,i),n=-1);var o=o6[a];o&&(t+=o)}return n>=0&&(t+=e.slice(n)),t}function u6(e,t,n){return e.startsWith(t,n)}var d6=new Set([`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`link`,`meta`,`param`,`source`,`track`,`wbr`,`circle`,`ellipse`,`line`,`path`,`polygon`,`polyline`,`rect`,`use`,`stop`,`animate`,`set`]);function f6(e){let t=e.toLowerCase();if(d6.has(t))return!0;let n=t.indexOf(`:`);return n===-1?!1:(t=t.slice(n+1),d6.has(t))}var p6=1,m6=2,h6=4,g6=8,Bhe=16,_6=32,v6=64,Vhe=(function(){var e=new Uint8Array(128),t;for(e[s3]=p6,e[l3]=p6|m6,e[jhe]=p6,e[c3]=p6|m6,e[Q]=p6,t=T3;t<=R3;t++)e[t]=h6;for(t=D3;t<=C3;t++)e[t]=h6;for(t=f3;t<=u3;t++)e[t]=h6;for(t=U3;t<=d3;t++)e[t]=h6;for(t=J3;t<=Y3;t++)e[t]=Bhe;for(t=X3;t<=Z3;t++)e[t]=g6;for(t=Q3;t<=$3;t++)e[t]=g6;return e})(),Hhe=/[\p{P}\p{S}]/u,Uhe=/\p{Zs}/u,y6=[];function Whe(e){var t=e.indexOf(`\r`),n=e.indexOf(`\0`);if(t===-1&&n===-1)return e;var r=e.length;y6.length=0;var i=0,a=0;for(a=t===-1?n:n===-1||t<n?t:n;a<r;a++){var o=e.charCodeAt(a);o===c3?(i<a&&y6.push(e.slice(i,a)),a+1<r&&e.charCodeAt(a+1)===l3&&a++,y6.push(`
221
+ `),i=a+1):o===0&&(i<a&&y6.push(e.slice(i,a)),y6.push(`�`),i=a+1)}return i<r&&y6.push(e.slice(i)),y6.join(``)}function Ghe(e,t,n){let r=n??e.length;for(;t<r&&(e[t]===` `||e[t]===` `);)t++;return t}function b6(e){if(!e)return!1;for(var t in e)return!0;return!1}function Khe(e){return{attrs:{},children:[{type:$.text,text:e}],d:!0,type:$.htmlBlock,tag:`header`}}var qhe=/^\n+/;function Jhe(e){for(var t=e.length;t>0&&(e[t-1]===`
222
+ `||e[t-1]===`\r`);)t--;return e.slice(0,t).replace(qhe,``)+`
223
+
224
+ `}function x6(e){if((e.type===$.htmlSelfClosing||e.type===$.htmlBlock)&&e.b)return[];if(e.type===$.paragraph){var t=e.children;return t?t.flatMap(x6):[]}return e.type===$.text?e.text?.trim()?[e]:[]:e.type===$.htmlBlock&&e.children?[{...e,children:e.children?.flatMap(x6)}]:[e]}function S6(e){for(var t=0;t<e.length;t++){if(e[t].type===$.htmlBlock){var n=e[t],r=!1;if(n.d&&n.a&&t===e.length-1){var i=`</`+String(n.tag).toLowerCase()+`>`,a=n.a.toLowerCase().indexOf(i);a!==-1&&n.a.slice(a+i.length).replace(/<\/[a-z][a-z0-9-]*\s*>/gi,``).trim()&&(r=!0)}r||(n.d=!1)}`children`in e[t]&&e[t].children&&S6(e[t].children)}}function Yhe(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.type===$.paragraph&&r.children)for(var i=r.children,a=0;a<i.length;a++){var o=i[a];if(o.type===$.htmlSelfClosing&&o.b&&o.tag.toLowerCase()===t){var s=e.slice(0,n);a>0&&s.push({type:$.paragraph,children:i.slice(0,a)});var c=[];if(a+1<i.length){var l=i.slice(a+1).filter(function(e){return!(e.type===$.htmlSelfClosing&&e.b)});l.length>0&&(c=l)}return c=c.concat(e.slice(n+1)),{found:!0,beforeClose:s,afterClose:c}}}if((r.type===$.htmlSelfClosing||r.type===$.htmlBlock)&&r.b&&r.tag.toLowerCase()===t)return{found:!0,beforeClose:e.slice(0,n),afterClose:e.slice(n+1)}}return{found:!1,beforeClose:e,afterClose:[]}}function Xhe(e,t,n){var r=e.replace(RegExp(`\\s*</`+t+`>\\s*$`,`i`),``);return n?D6(r):r}function C6(e){var t=``;for(var n in e){var r=e[n];r===!0?t+=` `+n:r!=null&&r!==!1&&(t+=` `+n+`="`+String(r)+`"`)}return t}function Zhe(e){var t=[];if(!e)return t;for(var n in e)n.charCodeAt(0)===94&&t.push({identifier:n,footnote:e[n].target});return t}function w6(e,t,n){if(t.indexOf(`.`)===-1)return e?.[t]||n;for(var r=e,i=t.split(`.`),a=0;a<i.length&&(r=r?.[i[a]],r!==void 0);)a++;return r||n}function Qhe(e){for(var t=!1,n=0;n<e.length;n++){var r=e.charCodeAt(n);if(r<=Q||r===B3||r===g3||r===S3||r===m3||r===f3||r===y3||r===w3||r===p3||r===u3||r>=123){t=!0;break}}if(!t)return e;for(var i=``,n=0;n<e.length;n++){var r=e.charCodeAt(n);if(r===g3&&n+2<e.length){var a=e.charCodeAt(n+1),o=e.charCodeAt(n+2);if((a>=J3&&a<=Y3||a>=X3&&a<=O3||a>=Q3&&a<=k3)&&(o>=J3&&o<=Y3||o>=X3&&o<=O3||o>=Q3&&o<=k3)){i+=e[n]+e[n+1]+e[n+2],n+=2;continue}}i+=encodeURI(e[n])}return i}function $he(...e){return e.filter(Boolean).join(` `)}var ege=new Set([`title`,`textarea`,`style`,`xmp`,`iframe`,`noembed`,`noframes`,`script`,`plaintext`]),T6=/<(\/?)(title|textarea|style|xmp|iframe|noembed|noframes|script|plaintext)(\s|>|\/)/gi;function E6(e){return ege.has(e.toLowerCase())}function tge(e){return T6.lastIndex=0,T6.test(e)}function D6(e){return T6.lastIndex=0,e.replace(T6,function(e,t,n,r){return`&lt;`+t+n+r})}var nge=/^<([a-zA-Z][a-zA-Z0-9-]*)\s[^>]*>/,rge=/^<[A-Z]/,O6=[`script`,`pre`,`style`,`textarea`],k6=new Set(O6),ige=/<(?:pre|script|style|textarea)\b/i,A6=/<(?:pre|script|style|textarea)\b/iy,j6=/^(\s{0,3}#[#\s]|\s{0,3}[-*+]\s|\s{0,3}\d+\.\s|\s{0,3}>\s|\s{0,3}```)/m,M6=/^<([a-z][^ >/\n\r]*) ?([^>]*?)>/im,N6=new Uint8Array(128);(function(){for(var e=[u3,b3,x3,d3,v3,f3,T3,S3,y3,E3,l3,A3,j3,k3],t=0;t<e.length;t++)N6[e[t]]=1})();var P6=/([a-zA-Z_][a-zA-Z0-9_-]*)=(?:"([^"]*)"|'([^']*)')/g;function age(e){return k6.has(e)}function oge(e){return ige.test(e)}function F6(e,t,n){for(var r=t,i=n;r<i&&(e.charCodeAt(r)===Q||e.charCodeAt(r)===s3);)r++;if(r>=i)return!1;e.charCodeAt(r)===H3&&r++;for(var a=0;r<i;){for(;r<i&&(e.charCodeAt(r)===Q||e.charCodeAt(r)===s3);)r++;if(r>=i)break;if(e.charCodeAt(r)===H3&&a>0){for(var o=r+1;o<i&&(e.charCodeAt(o)===Q||e.charCodeAt(o)===s3);)o++;if(o>=i)return!0}if(e.charCodeAt(r)===D3&&r++,r>=i||e.charCodeAt(r)!==_3)return!1;for(;r<i&&e.charCodeAt(r)===_3;)r++;for(r<i&&e.charCodeAt(r)===D3&&r++,a++;r<i&&(e.charCodeAt(r)===Q||e.charCodeAt(r)===s3);)r++;if(r<i)if(e.charCodeAt(r)===H3)r++;else return!1}return a>0}function I6(e,t){if(e.charCodeAt(t)!==S3)return null;let n=t+1,r=e.length,i=!1;e.charCodeAt(n)===R3&&(n++,i=!0);let a=n,o=e.charCodeAt(n);if(!(o>=Q3&&o<=$3||o>=X3&&o<=Z3))return null;for(;n<r&&(e.charCodeAt(n)>=Q3&&e.charCodeAt(n)<=$3||e.charCodeAt(n)>=X3&&e.charCodeAt(n)<=Z3||e.charCodeAt(n)>=J3&&e.charCodeAt(n)<=Y3||e.charCodeAt(n)===_3);)n++;let s=e.slice(a,n);if(!s)return null;let c=n;for(;n<r&&(e.charCodeAt(n)===Q||e.charCodeAt(n)===s3||e.charCodeAt(n)===l3);)n++;let l=e.slice(c,n);if(n===c&&n<r){var u=e.charCodeAt(n);if(u!==m3&&u!==R3)return null}let d=n,f={},p=!1;for(;n<r;){let t=e.charCodeAt(n);if(t===m3){let t=e.slice(d,n);return{tag:s,attrs:f,selfClosing:!1,end:n+1,rawAttrs:t,whitespaceBeforeAttrs:l,isClosing:i,hasSpaceBeforeSlash:p}}if(t===Q||t===s3||t===l3){n++;continue}if(t===R3&&n+1<r&&e.charCodeAt(n+1)===m3){let t=e.slice(d,n);return p=n>d&&e.charCodeAt(n-1)===Q,{tag:s,attrs:f,selfClosing:!0,end:n+2,rawAttrs:t,whitespaceBeforeAttrs:l,isClosing:i,hasSpaceBeforeSlash:p}}var m=n,h=e.charCodeAt(n);if(!(h>=Q3&&h<=$3||h>=X3&&h<=Z3||h===x3||h===D3))return null;for(n++;n<r;){var g=e.charCodeAt(n);if(g>=Q3&&g<=$3||g>=X3&&g<=Z3||g>=J3&&g<=Y3||g===x3||g===L3||g===D3||g===_3)n++;else break}for(var _=e.slice(m,n);n<r&&(e.charCodeAt(n)===Q||e.charCodeAt(n)===s3);)n++;if(e.charCodeAt(n)!==v3){f[_]=``;continue}for(n++;n<r&&(e.charCodeAt(n)===Q||e.charCodeAt(n)===s3);)n++;var v=e.charCodeAt(n);if(v===B3||v===z3){n++;for(var y=n;n<r&&e.charCodeAt(n)!==v;)n++;if(n>=r)return null;if(f[_]=e.slice(y,n),n++,n<r){var b=e.charCodeAt(n);if(b!==Q&&b!==s3&&b!==l3&&b!==m3&&b!==R3)return null}}else if(v===U3){var x=1,y=n;for(n++;n<r&&x>0;){var g=e.charCodeAt(n);g===U3?x++:g===W3&&x--,n++}f[_]=e.slice(y,n)}else{for(var y=n;n<r;){var S=e.charCodeAt(n);if(S===Q||S===s3||S===m3||S===l3||S===B3||S===z3||S===v3||S===S3||S===u3)break;n++}if(n===y)return null;f[_]=e.slice(y,n)}}return null}function sge(e,t,n){if(!n.optimizeForStreaming&&e.indexOf(`[`)===-1)return!1;for(var r=0,i=e.length,a=!1,o=!1;r<i;){for(var s=e.indexOf(`
225
+ `,r),c=s<0?i:s,l=r,u=0;l<c&&u<4;)if(e.charCodeAt(l)===Q)u++,l++;else if(e.charCodeAt(l)===s3)u+=4,l++;else break;if(l>=c){a=!1,r=s<0?i:s+1;continue}if(u<4){var d=e.charCodeAt(l);if(d===u3||d===d3){for(var f=d,p=0,m=l;m<c&&e.charCodeAt(m)===f;)p++,m++;if(p>=3){var h=!0;if(f===u3){for(var g=m;g<c;g++)if(e.charCodeAt(g)===u3){h=!1;break}}if(h){a=!1;for(var _=s<0?i:s+1;_<i;){for(var v=_,y=0;v<i&&y<4;){var b=e.charCodeAt(v);if(b===Q)y++,v++;else if(b===s3)y+=4,v++;else break}if(y<4&&v<i&&e.charCodeAt(v)===f){for(var x=0;v<i&&e.charCodeAt(v)===f;)x++,v++;if(x>=p){for(;v<i&&(e.charCodeAt(v)===Q||e.charCodeAt(v)===s3);)v++;if(v>=i||e.charCodeAt(v)===l3){r=v>=i?i:v+1;break}}}for(;_<i&&e.charCodeAt(_)!==l3;)_++;_<i&&_++}_>=i&&(r=i,o=!0);continue}}}}for(var S=l;S<c&&e.charCodeAt(S)===m3;){S++,S<c&&e.charCodeAt(S)===Q&&S++;for(var C=0;S<c&&C<4;)if(e.charCodeAt(S)===Q)C++,S++;else if(e.charCodeAt(S)===s3)C+=4,S++;else break;if(C>=4)break;a=!1}if(!a&&u<4&&S<c&&e.charCodeAt(S)===f3&&!(S+1<i&&e.charCodeAt(S+1)===p3)){var w=L6(e,S,t);if(w){r=w,a=!1;continue}}var T=e.charCodeAt(l);if(T===h3&&u<4)a=!1;else if(u<4&&(T===_3||T===b3||T===x3)){for(var E=l,D=0;E<c;){var O=e.charCodeAt(E);if(O===T)D++;else if(O!==Q&&O!==s3)break;E++}a=!(D>=3&&E>=c)}else a=!0;r=s<0?i:s+1}return o}function L6(e,t,n){let r=e.length;if(e.charCodeAt(t)!==f3)return null;let i=t+1<r&&e.charCodeAt(t+1)===p3,a=t+1;for(;a<r;){var o=e.charCodeAt(a);if(o===w3){a++;break}if(o===f3)return null;o===y3&&a+1<r&&a++,a++}if(a>r||e.charCodeAt(a-1)!==w3)return null;let s=e.slice(t+1,a-1);if(s.length>999)return null;let c=V6(s);if(!c||a>=r||e.charCodeAt(a)!==D3)return null;a++;let l=!1;for(;a<r;){let t=e.charCodeAt(a);if(t===Q||t===s3)a++;else if(t===l3&&!l)l=!0,a++;else break}if(i){let t=e.indexOf(`
226
+ `,a),i=t<0?r:t;return n[c]={target:e.slice(a,i).trim(),title:void 0},t<0?r:t+1}var u;if(a<r&&e.charCodeAt(a)===S3){a++;for(var d=a;a<r&&e.charCodeAt(a)!==m3&&e.charCodeAt(a)!==l3;)e.charCodeAt(a)===y3&&a+1<r&&a++,a++;if(a>=r||e.charCodeAt(a)!==m3)return null;u=e.slice(d,a),a++;for(var f=e.indexOf(`
227
+ `,a),p=f<0?r:f,m=a;m<p&&(e.charCodeAt(m)===Q||e.charCodeAt(m)===s3);)m++;if(m<p){if(m===a)return null;var h=e.charCodeAt(m);if(h!==B3&&h!==z3&&h!==G3)return null}}else{for(var d=a,g=0;a<r;){var o=e.charCodeAt(a);if(o===G3)g++;else if(o===K3){if(g===0)break;g--}else{if(o===Q||o===s3||o===l3)break;o===y3&&a+1<r&&a++}a++}if(u=e.slice(d,a),!u)return null}for(;a<r&&(e.charCodeAt(a)===Q||e.charCodeAt(a)===s3);)a++;var _=e.indexOf(`
228
+ `,a),v=_<0?r:_,y,b=!1,x=a,S=a;if(a===v&&a<r)for(S=a+1;S<r&&(e.charCodeAt(S)===Q||e.charCodeAt(S)===s3);)S++;if(S<r){var C=e.charCodeAt(S);if(C===B3||C===z3||C===G3){for(var w=C===G3?41:C,T=S+1,E=T;T<r;){var D=e.charCodeAt(T);if(D===w){for(var O=T+1;O<r&&(e.charCodeAt(O)===Q||e.charCodeAt(O)===s3);)O++;(O>=r||e.charCodeAt(O)===l3)&&(y=e.slice(E,T),b=!0,x=O<r?O+1:r);break}if(D===y3&&T+1<r){T+=2;continue}if(D===l3&&T+1<r&&e.charCodeAt(T+1)===l3)break;T++}if(!b&&S===a)return null}}if(b)return n[c]||(n[c]={target:U6(u),title:y===void 0?y:r6(U6(y))}),x;for(;a<v&&(e.charCodeAt(a)===Q||e.charCodeAt(a)===s3);)a++;return a<v?null:(n[c]||(n[c]={target:U6(u),title:y}),_<0?r:_+1)}var R6=new Uint8Array(Vhe);for(R6[h3]|=_6,R6[m3]|=_6,R6[_3]|=_6|v6,R6[V3]|=_6,R6[b3]|=_6|v6,R6[x3]|=_6|v6,R6[u3]|=_6|v6,R6[d3]|=_6|v6,R6[S3]|=_6|v6,R6[f3]|=v6,R6[T3]|=v6,R6[H3]|=_6,z6=J3;z6<=Y3;z6++)R6[z6]|=_6;var z6;function B6(e){if(e.indexOf(`[`)<0&&e.indexOf(`]`)<0)return!1;for(var t=0;t<e.length;t++){if(e.charCodeAt(t)===y3){t++;continue}if(e.charCodeAt(t)===f3||e.charCodeAt(t)===w3)return!0}return!1}function V6(e){for(var t=e.length,n=!0,r=t>0,i=0;i<t;i++){var a=e.charCodeAt(i);if(a===Q){if(n){r=!1;break}n=!0}else if(a<33||a>126||a>=X3&&a<=Z3){r=!1;break}else n=!1}if(r&&!n)return e;var o=e.replace(/\s+/g,` `).trim();return o.indexOf(`ẞ`)===-1?o.toLowerCase():o.replace(/\u1E9E/g,`ss`).toLowerCase()}function H6(e){return e<e6?R6[e]:e===Ahe?p6:0}function U6(e){return e.indexOf(`\\`)===-1?e:e.replace(/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,`$1`)}var W6=null,G6=-1,K6=-1;function q6(e,t){if(t>=G6&&t<=K6&&e===W6)return K6;var n=e.indexOf(`
229
+ `,t),r=n<0?e.length:n;return W6=e,G6=t,K6=r,r}function J6(e,t){let n=q6(e,t);return n<e.length?n+1:n}function Y6(e,t,n){for(;t<n;){let n=e.charCodeAt(t);if(n!==Q&&n!==s3)break;t++}return t}function X6(e,t){let n=J6(e,t);for(;n<e.length;){let t=q6(e,n);if(t8(e,n,t))return n;n=J6(e,n)}return e.length}function Z6(e,t,n,r){let i=0;for(;t+i<n&&e.charCodeAt(t+i)===r;)i++;return i}var Q6=0,$6=0;function e8(e,t,n){for(Q6=0,$6=0;t+$6<n;){let n=e.charCodeAt(t+$6);if(n===s3)Q6+=4-Q6%4;else if(n===Q)Q6++;else break;$6++}}function t8(e,t,n){return Y6(e,t,n)>=n}function cge(e,t,n,r){let i=q6(e,t);if(e8(e,t,i),Q6>3)return null;let a=t+$6;if(e.charCodeAt(a)!==h3)return null;let o=Z6(e,a,i,35);if(o<1||o>6||(a+=o,a<i&&e.charCodeAt(a)!==Q&&e.charCodeAt(a)!==s3))return null;a=Y6(e,a,i);for(var s=i;s>a&&e.charCodeAt(s-1)===Q;)s--;for(var c=s;s>a&&e.charCodeAt(s-1)===h3;)s--;if(s<c)if(s===a||e.charCodeAt(s-1)===Q)for(;s>a&&e.charCodeAt(s-1)===Q;)s--;else s=c;let l=e.slice(a,s),u=h8(l,!1,n,r),d=(r?.slugify||l6)(l);return{node:{type:$.heading,level:o,children:u,id:d},end:J6(e,i)}}function lge(e,t,n){var r=e.charCodeAt(t);if(r!==v3&&r!==_3)return!1;for(var i=t;i<n&&e.charCodeAt(i)===r;)i++;for(;i<n&&(e.charCodeAt(i)===Q||e.charCodeAt(i)===s3);)i++;return i>=n}function n8(e,t){let n=q6(e,t);if(e8(e,t,n),Q6>3)return null;let r=t+$6,i=e.charCodeAt(r);if(i!==_3&&i!==b3&&i!==x3)return null;let a=0;for(;r<n;){let t=e.charCodeAt(r);if(t===i)a++;else if(t!==Q&&t!==s3)return null;r++}return a<3?null:{node:{type:$.breakThematic},end:J6(e,n)}}function uge(e,t,n){let r=q6(e,t);if(e8(e,t,r),Q6>3)return null;let i=Q6,a=t+$6,o=e.charCodeAt(a);if(o!==u3&&o!==d3)return null;let s=Z6(e,a,r,o);if(s<3)return null;a+=s;let c=Y6(e,a,r),l=r;if(o===u3){for(let t=c;t<r;t++)if(e.charCodeAt(t)===u3)return null}for(;l>c&&(e.charCodeAt(l-1)===Q||e.charCodeAt(l-1)===s3);)l--;let u=e.slice(c,l),d=``,f=``,p=u.indexOf(` `);p===-1?d=u:(d=u.slice(0,p),f=u.slice(p+1).trim()),d=U6(d);var m=void 0;if(f){P6.lastIndex=0;for(var h;(h=P6.exec(f))!==null;)m||={},m[h[1]]=h[2]===void 0?h[3]:h[2]}let g=J6(e,r),_=e.length,v=e.length;for(var y=String.fromCharCode(o).repeat(s),b=g;b<e.length;){var x=e.indexOf(y,b);if(x===-1)break;for(var S=x,C=0;S>0&&C<4&&e.charCodeAt(S-1)===Q;)S--,C++;if(C<=3&&(S===0||e.charCodeAt(S-1)===l3)){for(var w=x+s;w<e.length&&e.charCodeAt(w)===o;)w++;var T=q6(e,w);if(t8(e,w,T)){_=S,v=J6(e,T);break}}b=x+1}var E;if(i===0)E=_>g&&e.charCodeAt(_-1)===l3?e.slice(g,_-1):e.slice(g,_);else{E=``;for(var D=g;D<_;){var O=q6(e,D);e8(e,D,O);var k=Math.min($6,i);E+=e.slice(D+k,O)+`
230
+ `,D=J6(e,O)}E.length>0&&E.charCodeAt(E.length-1)===l3&&(E=E.slice(0,-1))}return{node:{type:$.codeBlock,lang:d||void 0,text:E,infoString:f||void 0,attrs:m},end:v}}function dge(e,t){if(e8(e,t,q6(e,t)),Q6<4)return null;let n=``,r=t;for(;r<e.length;){let t=q6(e,r);if(e8(e,r,t),t8(e,r,t)){for(var i=0,a=J6(e,t);a<e.length;){var o=q6(e,a);if(t8(e,a,o)){i++,a=J6(e,o);continue}if(e8(e,a,o),Q6>=4){for(var s=0;s<=i;s++)n+=`
231
+ `;r=a;break}break}if(r!==a)break;continue}if(Q6<4)break;let f=0,p=0;var c=0;for(let n=r;n<t&&p<4;n++){if(e.charCodeAt(n)===s3){var l=4-p%4;p+l>4&&(c=p+l-4),p+=l}else p++;f++}var u=``;if(c>0)for(var d=0;d<c;d++)u+=` `;u+=e.slice(r+f,t),n+=u+`
232
+ `,r=J6(e,t)}for(;n.length>0&&n.charCodeAt(n.length-1)===l3;)n=n.slice(0,-1);return n?{node:{type:$.codeBlock,lang:void 0,text:n,infoString:void 0,attrs:void 0},end:r}:null}function fge(e,t,n,r){if(e8(e,t,q6(e,t)),Q6>3)return null;let i=t+$6;if(e.charCodeAt(i)!==m3)return null;let a=``,o=t,s,c=!1,l=!1,u=!1;for(;o<e.length;){let t=q6(e,o);e8(e,o,t);let n=o+$6;if(e.charCodeAt(n)===m3){let r=n+1;var d=Q6+1,f=!1;if(r<t){var p=e.charCodeAt(r);p===Q?(r++,d++,f=!0):p===s3&&(f=!0)}for(var m=``,h=!1,g=r;g<t;g++)if(e.charCodeAt(g)===s3){h=!0;break}if(h){var _=d;if(f&&r<t&&e.charCodeAt(r)===s3){for(var v=4-_%4,y=0;y<v-1;y++)m+=` `;_+=v,r++}for(var b=r;b<t;b++)if(e.charCodeAt(b)===s3){for(var x=4-_%4,S=0;S<x;S++)m+=` `;_+=x}else m+=e[b],_++}else m=e.slice(r,t);if(!a&&!s){let n=m.match(/^\[!([A-Za-z]+)\]\s*$/);if(n){s=n[1].toUpperCase(),o=J6(e,t);continue}}a+=m+`
233
+ `;var C=m.trimStart();C.startsWith("```")||C.startsWith(`~~~`)?u=!u:(m.startsWith(` `)||m.startsWith(` `))&&(u=!0),l=C.length>0,o=J6(e,t)}else if(a&&!t8(e,o,t)&&l){if(Q6<4){var w=o+$6,T=w<t?e.charCodeAt(w):0;if(T===h3||T===m3||T===u3||T===d3||T===S3||(T===_3||T===b3||T===x3)&&n8(e,o)||(T===_3||T===b3||T===V3)&&w+1<t&&(e.charCodeAt(w+1)===Q||e.charCodeAt(w+1)===s3))break;if(T>=J3&&T<=Y3){for(var E=w;E<t&&e.charCodeAt(E)>=J3&&e.charCodeAt(E)<=Y3;)E++;if(E<t&&(e.charCodeAt(E)===L3||e.charCodeAt(E)===K3))break}}if(u)break;a+=e.slice(o,t)+`
234
+ `,c=!0,o=J6(e,t)}else break}if(!a&&!s)return null;var{inBlockQuote:D,f:O}=n;n.inBlockQuote=!0,c&&(n.f=!0);let k=E8(a||``,n,r);return n.inBlockQuote=D,n.f=O,{node:{type:$.blockQuote,children:k,alert:s||void 0},end:o}}function r8(e,t,n){for(var r=0,i=t;i<n;i++)e.charCodeAt(i)===s3?r+=4-r%4:r++;return r}function i8(e,t,n){if(e8(e,t,n),Q6>3)return null;var r=t+$6;if(r>=n)return null;var i=e.charCodeAt(r),a=Q6,o=r;if(i===_3||i===b3||i===V3){if(o=r+1,o<n&&e.charCodeAt(o)!==Q&&e.charCodeAt(o)!==s3&&e.charCodeAt(o)!==l3)return null}else if(i>=J3&&i<=Y3){for(var s=r;s<n&&s-r<9;){var c=e.charCodeAt(s);if(c<J3||c>Y3)break;s++}if(s>r&&s<n){var l=e.charCodeAt(s);if(l===L3||l===K3){if(o=s+1,o<n&&e.charCodeAt(o)!==Q&&e.charCodeAt(o)!==s3&&e.charCodeAt(o)!==l3)return null}else return null}else return null}else return null;var u=o,d=r8(e,t,o),f=0,p=u,m=d;if(u>=n)return{ordered:i>=J3&&i<=Y3,marker:i>=J3&&i<=Y3?e[s]:e[r],start:i>=J3&&i<=Y3?parseInt(e.slice(r,s),10):void 0,contentStart:u,contentCol:d+1,markerCol:a,isEmpty:!0};for(;p<n&&(e.charCodeAt(p)===Q||e.charCodeAt(p)===s3);){if(e.charCodeAt(p)===s3){var h=4-m%4;m+=h}else m++;p++,f++}var g=p>=n,_=m-d;return g||_>4?(m=d+1,p=u+1,f=1):f===0&&(m=d+1,p=u,f=1),{ordered:i>=J3&&i<=Y3,marker:i>=J3&&i<=Y3?e[s]:e[r],start:i>=J3&&i<=Y3?parseInt(e.slice(r,s),10):void 0,contentStart:p,contentCol:m,markerCol:a,isEmpty:g}}var a8=0;function pge(e,t,n,r){var i=0,a=t;for(a8=0;a<n&&i<r;){var o=e.charCodeAt(a);if(o===s3){var s=4-i%4;if(i+s>r){a8=i+s-r,a++,i=r;break}i+=s}else if(o===Q)i++;else break;a++}return a}function o8(e,t,n,r){var i=q6(e,t),a=i8(e,t,i);if(!a)return null;var o=[],s=t,c=a.contentCol,l=``,u=a.isEmpty,d=!1,f=!1;if(!a.isEmpty){for(var p=!1,m=a.contentStart;m<i;m++)if(e.charCodeAt(m)===s3){p=!0;break}if(p){var h=``,g=r8(e,t,a.contentStart),_=g-a.contentCol;if(_>0)for(var v=0;v<_;v++)h+=` `;for(var y=a.contentStart;y<i;y++)if(e.charCodeAt(y)===s3){for(var b=4-g%4,x=0;x<b;x++)h+=` `;g+=b}else h+=e[y],g++;l=h+`
235
+ `}else l=e.slice(a.contentStart,i)+`
236
+ `}for(s=J6(e,i);s<e.length;){var S=q6(e,s);e8(e,s,S);var C=e.charCodeAt(s+$6);if(Q6<c&&(C===_3||C===b3||C===x3)&&Q6<=3&&n8(e,s))break;var w=i8(e,s,S);if(w&&w.ordered===a.ordered&&w.marker===a.marker&&w.markerCol<c){o.push({contentCol:c,raw:l,hasBlankAfter:d,isEmpty:u}),d&&(f=!0),c=w.contentCol,u=w.isEmpty,d=!1,l=w.isEmpty?``:e.slice(w.contentStart,S)+`
237
+ `,s=J6(e,S);continue}if(t8(e,s,S)){l+=`
238
+ `,s=J6(e,S);for(var T=!1,E=0;E<l.length;E++){var D=l.charCodeAt(E);if(D!==l3&&D!==c3&&D!==Q&&D!==s3){T=!0;break}}if(u&&!T)if(s<e.length){var O=q6(e,s),k=i8(e,s,O);if(!k||k.ordered!==a.ordered||k.marker!==a.marker)break;d=!0}else break;if(s<e.length){var A=q6(e,s);e8(e,s,A);var j=e.charCodeAt(s+$6);if((j===_3||j===b3||j===x3)&&Q6<=3&&n8(e,s))break;var M=i8(e,s,A);if(M&&M.ordered===a.ordered&&M.marker===a.marker&&M.markerCol<c){d=!0;continue}if(!t8(e,s,A)&&Q6<c)break}continue}if(Q6>=c){var N=pge(e,s,S,c);if(a8>0){for(var P=``,F=c,I=0;I<a8;I++)P+=` `,F++;for(var L=N;L<S;L++)if(e.charCodeAt(L)===s3){for(var ee=4-F%4,te=0;te<ee;te++)P+=` `;F+=ee}else P+=e[L],F++;l+=P+`
239
+ `}else l+=e.slice(N,S)+`
240
+ `;s=J6(e,S);continue}for(var ne=!1,R=0;R<l.length;R++){var z=l.charCodeAt(R);if(z!==l3&&z!==c3&&z!==Q&&z!==s3){ne=!0;break}}if(!d&&ne&&!u){var B=s+$6,re=e.charCodeAt(B);if(!(re===h3||re===m3||re===S3||re===u3||re===d3||(re===_3||re===b3||re===x3||re===V3)&&(n8(e,s)!==null||i8(e,s,S)!==null)||re>=J3&&re<=Y3&&i8(e,s,S)!==null)){l+=``+e.slice(B,S)+`
241
+ `,s=J6(e,S);continue}}break}if(o.push({contentCol:c,raw:l,hasBlankAfter:d,isEmpty:u}),o.length===0)return null;var ie=f;if(!ie)for(var ae=0;ae<o.length;ae++){if(o[ae].hasBlankAfter&&ae<o.length-1){ie=!0;break}if(!o[ae].isEmpty){for(var oe=o[ae].raw,se=oe.length,ce=0,le=!1,ue=!1,de=!1,fe=!1,pe=0,me=0,V=-1;ce<se;){var he=oe.indexOf(`
242
+ `,ce);if(he<0&&(he=se),fe){e8(oe,ce,he);for(var ge=oe.slice(ce+$6,he),_e=0;_e<ge.length&&ge.charCodeAt(_e)===pe;)_e++;_e>=me&&ge.slice(_e).trim()===``&&(fe=!1),ce=he<se?he+1:se;continue}if(t8(oe,ce,he)){V>=0?de=!0:le&&(ue=!0),ce=he<se?he+1:se;continue}if(e8(oe,ce,he),V>=0){if(Q6>=V){ce=he<se?he+1:se;continue}var ve=i8(oe,ce,he);if(ve&&ve.markerCol<V&&ve.contentCol<=V){ce=he<se?he+1:se;continue}if(ve){ce=he<se?he+1:se;continue}V=-1,de&&=(ue=!0,!1)}var ye=oe.slice(ce+$6,he),be=ye.charCodeAt(0);if((be===u3||be===d3)&&Q6<=3){for(var xe=0;xe<ye.length&&ye.charCodeAt(xe)===be;)xe++;if(xe>=3){if(ue&&le){ie=!0;break}fe=!0,pe=be,me=xe,le=!0,ce=he<se?he+1:se;continue}}var Se=Q6<=3?i8(oe,ce,he):null;if(Se&&le){if(ue){ie=!0;break}V=Se.contentCol,de=!1,ce=he<se?he+1:se,le=!0;continue}if(ue){ie=!0;break}le=!0,ce=he<se?he+1:se}if(ie)break}}for(var Ce=[],we=0;we<o.length;we++){for(var Te=o[we],Ee=Te.raw,De=Ee.length;De>0&&Ee.charCodeAt(De-1)===l3;)De--;var Oe=De<Ee.length?Ee.slice(0,De):Ee,ke=null;if(Oe.length>=3&&Oe.charCodeAt(0)===f3){var Ae=Oe[1];(Ae===` `||Ae===`x`||Ae===`X`)&&Oe.charCodeAt(2)===w3&&(ke={type:$.gfmTask,completed:Ae===`x`||Ae===`X`},Oe=Oe.slice(3))}var je;if(Te.isEmpty&&Oe.trim()===``)je=[];else if(ie){var Me=n.inList;n.inList=!0,je=E8(Oe,n,r),n.inList=Me}else{var Ne=n.inList;if(n.inList=!0,je=E8(Oe,n,r),n.inList=Ne,je.length===1&&je[0].type===$.paragraph)je=je[0].children;else if(n.h){var Pe=[];n.h.push({src:je,dest:Pe,unwrap:!0}),je=Pe}else{for(var Fe=[],Ie=0;Ie<je.length;Ie++)if(je[Ie].type===$.paragraph)for(var Le=je[Ie].children,Re=0;Re<Le.length;Re++)Fe.push(Le[Re]);else Fe.push(je[Ie]);je=Fe}}if(ke){var ze=[ke,{type:$.text,text:` `}];if(n.h)n.h.push({src:je,dest:ze,unwrap:!1});else for(var Be=0;Be<je.length;Be++)ze.push(je[Be]);Ce.push(ze)}else Ce.push(je)}return{node:{type:a.ordered?$.orderedList:$.unorderedList,start:a.ordered?a.start:void 0,items:Ce},end:s}}var s8=new Set(`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`));function c8(e,t,n){let r={};for(let[o,s]of Object.entries(e)){let e=o.toLowerCase();if(e===`style`&&typeof s==`string`){let e={},t=[],n=0,i=0;for(let e=0;e<s.length;e++){let r=s.charCodeAt(e);r===G3?n++:r===K3?n--:r===F3&&n===0&&(t.push(s.slice(i,e)),i=e+1)}i<s.length&&t.push(s.slice(i));let a=!1;t.forEach(t=>{let n=t.indexOf(`:`);if(n===-1)return;let r=t.slice(0,n).trim(),i=t.slice(n+1).trim();if(r&&i){if(/url\s*\(\s*(javascript|vbscript|data:(?!image\/))/i.test(i)){a=!0;return}let t=r.indexOf(`-`)===-1?r:r.replace(/-([a-z])/g,(e,t)=>t.toUpperCase());e[t]=i}}),!a&&Object.keys(e).length>0&&(r[o]=e)}else if((e===`href`||e===`src`)&&n?.sanitizer){let i=n.sanitizer(s,t,e);i!==null&&(r[o]=i)}else if(s===``)r[o]=!0;else if(s.length>=2&&s.charCodeAt(0)===U3&&s.charCodeAt(s.length-1)===W3){var i=s.slice(1,-1);if(i.length>0){var a=i.charCodeAt(0);if(a===f3||a===U3)try{r[o]=JSON.parse(i);continue}catch{}}if(i===`true`){r[o]=!0;continue}if(i===`false`){r[o]=!1;continue}if(n?.evalUnserializableExpressions)try{r[o]=(0,eval)(`(`+i+`)`);continue}catch{}r[o]=i}else r[o]=s}return r}function l8(e,t,n){let r=t.length;if(r===0)return n;var i=t.charCodeAt(0);if(!(i>=X3&&i<=Z3||i>=Q3&&i<=$3)){for(var a=String.fromCharCode(i),o=e.length-r,s=n;s<=o;){var c=e.indexOf(a,s);if(c===-1||c>o)return-1;for(var l=!0,u=1;u<r;u++){var d=e.charCodeAt(c+u),f=t.charCodeAt(u);if(d>=X3&&d<=Z3&&(d+=t6),f>=X3&&f<=Z3&&(f+=t6),d!==f){l=!1;break}}if(l)return c;s=c+1}return-1}i>=X3&&i<=Z3&&(i+=t6);for(let a=n;a<=e.length-r;a++){var p=e.charCodeAt(a);if(p>=X3&&p<=Z3&&(p+=t6),p!==i)continue;let n=!0;for(let i=1;i<r;i++){let r=e.charCodeAt(a+i),o=t.charCodeAt(i);if(r>=X3&&r<=Z3&&(r+=t6),o>=X3&&o<=Z3&&(o+=t6),r!==o){n=!1;break}}if(n)return a}return-1}function mge(e,t,n){let r=t.length;var i=t.charCodeAt(0);i>=X3&&i<=Z3&&(i+=t6);for(let o=Math.min(n,e.length-r);o>=0;o--){var a=e.charCodeAt(o);if(a>=X3&&a<=Z3&&(a+=t6),a!==i)continue;let n=!0;for(let i=1;i<r;i++){let r=e.charCodeAt(o+i),a=t.charCodeAt(i);if(r>=X3&&r<=Z3&&(r+=t6),a>=X3&&a<=Z3&&(a+=t6),r!==a){n=!1;break}}if(n)return o}return-1}var u8=-1;function d8(e,t,n){let r=n.toLowerCase(),i=`<`+r,a=`</`+r,o=1,s=t,c=e.length;for(u8=-1;s<c&&o>0;){let t=l8(e,i,s),n=l8(e,a,s);if(n===-1)return-1;if(t!==-1&&t<n){let n=I6(e,t);n?(n.tag.toLowerCase()===r&&!n.isClosing&&!n.selfClosing&&!f6(n.tag)&&o++,s=n.end):s=t+1}else{var l=n+a.length,u=l<c?e.charCodeAt(l):62;if((u===m3||u===Q||u===s3||u===l3)&&(o--,o===0)){u8=n;let t=n+a.length;for(;t<c&&e.charCodeAt(t)!==m3;)t++;return t+1}s=n+1}}return-1}function f8(e,t,n,r){if(r.ignoreHTMLBlocks||r.disableParsingRawHTML)return null;var i=q6(e,t);if(e8(e,t,i),Q6>3&&!n.inHTML)return null;var a=t+$6;if(e.charCodeAt(a)!==S3)return null;var o=e.indexOf(`>`,a+1);if(o!==-1&&o<i){var s=e.slice(a+1,o);if(/^[a-zA-Z][a-zA-Z0-9+.-]*:/.test(s)||/^[^\s@]+@[^\s@]+$/.test(s))return null}var c=hge(e,a);if(c>=1&&c<=5){var l=e.length;if(c===1){for(var u=e.length,d=0;d<O6.length;d++){var f=l8(e,`</`+O6[d]+`>`,a);f>=0&&f<u&&(u=f)}if(u<e.length){var p=e.indexOf(`>`,u);l=p>=0?J6(e,p+1):e.length}}else{var m=c===2?`-->`:c===3?`?>`:c===4?`>`:`]]>`,h=e.indexOf(m,a);h>=0&&(l=J6(e,h+m.length))}var g=e.slice(a,l);if(c>=2)return{node:{type:$.htmlComment,text:g,l:!1,raw:!0},end:l};var _=`div`,v=g.match(/^<\/?([a-zA-Z][a-zA-Z0-9-]*)/);v&&(_=v[1]);var y=I6(e,a),b={},x;y&&!y.isClosing&&(b=c8(y.attrs,_,r),x=y.whitespaceBeforeAttrs+y.rawAttrs);var S=[],C=l8(g,`</`+_.toLowerCase(),0),w=g,T=``;if(y&&y.isClosing)for(w=g.slice(y.end-a);w.length>0&&w.charCodeAt(w.length-1)===l3;)w=w.slice(0,-1);else if(y&&!y.isClosing){var E=y.end-a;if(C!==-1)for(w=g.slice(E),w.charCodeAt(0)===l3&&(w=w.slice(1));w.length>0&&w.charCodeAt(w.length-1)===l3;)w=w.slice(0,-1);else for(w=g;w.length>0&&w.charCodeAt(w.length-1)===l3;)w=w.slice(0,-1);C!==-1&&(T=g.slice(E,C).trim())}var D=y?y.isClosing:!1;return{node:{type:$.htmlBlock,tag:_,attrs:b,i:x,children:S,a:w,text:T,d:!0,b:D},end:l}}if(c===6||c===7){var O=X6(e,t),k=O<e.length?O:e.length,A=e.slice(a,k),j=O<e.length?J6(e,O):e.length,M=I6(e,a);if(M){var N=M.tag,P=N.toLowerCase();if(M.isClosing){var F=e.slice(M.end,k);return{node:{type:$.htmlBlock,tag:N,attrs:{},children:[],a:F,text:F,d:!0,b:!0},end:j}}if(M.selfClosing||f6(N))return{node:{type:$.htmlBlock,tag:N,attrs:c8(M.attrs,N,r),i:M.whitespaceBeforeAttrs+M.rawAttrs,children:[],a:``,text:``,d:!1,b:!1},end:M.end<e.length&&e.charCodeAt(M.end)===l3?M.end+1:M.end};var I=n.c||0,L=e.slice(a,k),ee=-1,te=-1;if(I<10){for(var ne=`</`+P,R=M.end-a,z=1,B=R;B<L.length&&z>0;){var re=l8(L,`<`+P,B),ie=l8(L,ne,B);if(ie===-1)break;if(re!==-1&&re<ie){var ae=re+P.length+1;if(ae<L.length){var oe=L.charCodeAt(ae);(oe===Q||oe===s3||oe===l3||oe===m3||oe===R3)&&z++}B=re+1}else{var se=ie+ne.length;if(se<L.length){var ce=L.charCodeAt(se);if((ce===m3||ce===Q||ce===s3||ce===l3)&&(z--,z===0)){ee=ie;for(var le=se;le<L.length&&L.charCodeAt(le)!==m3;)le++;te=le+1;break}}else if(z--,z===0){ee=ie,te=L.length;break}B=ie+1}}var ue=!1;if(ee===-1&&c===6&&!M.isClosing){var de=d8(e,M.end,P);if(de!==-1){for(var fe=u8,pe=M.end,me=!1,V=!1,he=!1,ge=0,_e=!1,ve=!1,ye=pe;ye<fe;){var be=e.charCodeAt(ye);if(be===l3)ve&&(me=!0),_e||ge++,ve=!0,ye++;else if(be===Q||be===s3)ye++;else{if(!_e&&(_e=!0,ge>=2&&be===S3)){he=!0;break}if(ve=!1,be===S3){var xe=e.charCodeAt(ye+1)|32;if((xe===N3||xe===P3||xe===M3)&&(A6.lastIndex=ye,A6.test(e))){V=!0;break}}ye++}}if(me&&!he&&!V){var Se=q6(e,de);k=Se,j=J6(e,Se),L=e.slice(a,k),A=e.slice(a,k),ee=fe-a,te=de-a,ue=!0}}}}var Ce=M.rawAttrs.indexOf(`
243
+ `)!==-1||M.whitespaceBeforeAttrs.indexOf(`
244
+ `)!==-1,we=!1;ee!==-1&&(we=L.slice(te).trim().length===0);var Te=!1,Ee=k,De=j;if(ee!==-1){var Oe=a+te,ke=q6(e,Oe-1);if(Oe<ke){for(var Ae=Oe;Ae<ke&&(e.charCodeAt(Ae)===Q||e.charCodeAt(Ae)===s3);)Ae++;if(Ae<ke&&e.charCodeAt(Ae)===S3){var je=I6(e,Ae);je&&!je.isClosing&&(Te=!0,Ee=Oe,De=Oe,we=!0)}}if(!Te){var Me=J6(e,ke);if(Me<k){for(var Ne=Me;Ne<k&&(e.charCodeAt(Ne)===Q||e.charCodeAt(Ne)===s3);)Ne++;Ne<k&&e.charCodeAt(Ne)===S3&&I6(e,Ne)&&(Te=!0,Ee=ke,De=Me,we=!0)}}!Te&&n.inHTML&&(Te=!0,Ee=ke,De=J6(e,ke),we=e.slice(Oe,ke).trim().length===0)}var Pe=[],Fe=``;if(ee!==-1){Fe=L.slice(M.end-a,ee);var Ie=Fe.trim();if(Ie){var{inline:Le,inHTML:Re,c:ze}=n;if(n.inHTML=!0,n.c=I+1,P===`p`)n.inline=!0,Pe=h8(Ie,!1,n,r);else{var Be=Fe.indexOf(`
245
+
246
+ `)!==-1,Ve=j6.test(Ie),He=M6.test(Ie),Ue=Be||Ve||n.inHTML&&He;Fe.length>=2&&Fe.charCodeAt(0)===l3&&Fe.charCodeAt(Fe.length-1)===l3&&!Be&&!Ve&&!He?Pe=[{type:$.text,text:Ie}]:Ue||He?(n.inline=!1,Pe=E8(Fe,n,r)):(n.inline=!0,Pe=h8(Ie,!1,n,r))}n.inline=Le,n.inHTML=Re,n.c=ze}}var H=!1;if(c===6&&ee!==-1&&!n.inHTML&&!Ce){var We=/<[a-zA-Z][^>]*>/.test(Fe),Ge=Fe.indexOf(`
247
+
248
+ `)!==-1||j6.test(Fe);We&&!Ge&&(H=!0)}if(!ue&&(n.inHTML||c===7||Ce||!we||H)){var Ke,qe=!1;if(ee!==-1&&Te){var Je=!1;if(n.inHTML&&te<L.length){for(var Ye=te;Ye<L.length&&L.charCodeAt(Ye)!==l3;)Ye++;var Xe=L.slice(te,Ye).trim();Je=Xe.length>1&&Xe.charCodeAt(0)===S3&&Xe.charCodeAt(1)!==R3}Ke=Je?L.slice(M.end-a):Fe,qe=!0}else(c===7||n.inHTML)&&ee!==-1?(Ke=L.slice(M.end-a),Ke.charCodeAt(0)===l3&&(Ke=Ke.slice(1))):Te?Ke=e.slice(a,Ee):Ce?Ke=A:(Ke=L.slice(M.end-a),Ke.charCodeAt(0)===l3&&(Ke=Ke.slice(1)));var Ze={type:$.htmlBlock,tag:N,attrs:c8(M.attrs,N,r),i:M.whitespaceBeforeAttrs+M.rawAttrs,children:Pe,a:Ke,text:Ke,d:!0,b:!1};return qe&&(Ze.n=!0),{node:Ze,end:De}}return{node:{type:$.htmlBlock,tag:N,attrs:c8(M.attrs,N,r),i:M.whitespaceBeforeAttrs+M.rawAttrs,children:Pe,a:ue?``:Fe,text:Fe,d:!1,b:!1},end:De}}var Qe=A.match(/^<(\/?)([a-zA-Z][a-zA-Z0-9-]*)/),$e=Qe?Qe[2]:`div`,et=Qe?Qe[1]===`/`:!1,tt=A;if(et){var nt=A.indexOf(`>`);nt!==-1&&(tt=A.slice(nt+1))}return{node:{type:$.htmlBlock,tag:$e,attrs:{},children:[],a:tt,text:tt,d:!0,b:et},end:j}}var rt=I6(e,a);if(!rt)return null;var it=rt.tag,at=it.toLowerCase(),ot=it.charCodeAt(0),st=ot>=X3&&ot<=Z3;if(!st&&!s8.has(at)&&!k6.has(at)&&!at.includes(`-`))return null;if(rt.isClosing)return{node:{type:$.htmlSelfClosing,tag:it,attrs:{},a:e.slice(a,rt.end),b:!0},end:rt.end};var ct=d8(e,rt.end,it),lt=[];if(ct!==-1){var ut=u8,dt=e.slice(rt.end,ut),ft=dt.trim();if(ft){var pt=dt.indexOf(`
249
+
250
+ `)!==-1,mt=j6.test(ft),ht=M6.test(ft),gt=n.inline,_t=n.inHTML,vt=n.c;n.inHTML=!0,n.c=(n.c||0)+1,pt||mt||ht?(n.inline=!1,lt=E8(dt,n,r)):(n.inline=!0,lt=h8(ft,!1,n,r)),n.inline=gt,n.inHTML=_t,n.c=vt}var yt=q6(e,ct),bt=e.slice(ct,yt).trim()?ct:J6(e,ct),xt=st?e.slice(a,ct):e.slice(a,bt);return{node:{type:$.htmlBlock,tag:it,attrs:c8(rt.attrs,it,r),i:rt.whitespaceBeforeAttrs+rt.rawAttrs,children:lt,a:xt,text:st?dt:xt,d:!0,b:!1},end:bt}}var St=X6(e,rt.end),Ct=St<e.length?J6(e,St):St,wt=e.slice(rt.end,St);if(wt.trim()){var{inline:Tt,inHTML:Et,c:Dt}=n;n.inline=!1,n.inHTML=!0,n.c=(n.c||0)+1,lt=E8(wt,n,r),n.inline=Tt,n.inHTML=Et,n.c=Dt}var Ot=e.slice(rt.end,St);return{node:{type:$.htmlBlock,tag:it,attrs:c8(rt.attrs,it,r),i:rt.whitespaceBeforeAttrs+rt.rawAttrs,children:lt,a:Ot,text:wt,d:!0,b:!1},end:Ct}}function hge(e,t){if(e.charCodeAt(t)!==S3)return 0;var n=t+1,r=e.length;if(e.charCodeAt(n)===T3&&e.charCodeAt(n+1)===_3&&e.charCodeAt(n+2)===_3)return 2;if(e.charCodeAt(n)===I3)return 3;if(e.charCodeAt(n)===T3){var i=e.charCodeAt(n+1);if(i>=X3&&i<=Z3)return 4;if(e.slice(n+1,n+8)===`[CDATA[`)return 5}for(var a=e.charCodeAt(n)===R3,o=a?n+1:n,s=o;s<r;){var c=e.charCodeAt(s);if(c>=X3&&c<=Z3||c>=Q3&&c<=$3||c>=J3&&c<=Y3||c===_3)s++;else break}if(s===o)return 0;var l=e.slice(o,s);if(k6.has(l.toLowerCase())){if(a)return 0;var u=e.charCodeAt(s);return+(u===Q||u===s3||u===m3||u===l3||s>=r)}if(s8.has(l.toLowerCase())){if(a){for(var d=s;d<r&&(e.charCodeAt(d)===Q||e.charCodeAt(d)===s3);)d++;return d<r&&e.charCodeAt(d)===m3?6:0}var f=s<r?e.charCodeAt(s):-1;return f===Q||f===s3||f===m3||f===l3||f===R3||f===-1?6:0}if(a){for(var p=s;p<r&&(e.charCodeAt(p)===Q||e.charCodeAt(p)===s3);)p++;if(p<r&&e.charCodeAt(p)===m3){var m=q6(e,t);if(e.slice(p+1,m).trim()===``)return 7}}else{var h=q6(e,t),g=I6(e,t);if(g&&g.end<=h&&e.slice(g.end,h).trim()===``)return 7}return 0}function p8(e,t,n){for(var r=0,i=e.length;r<i&&(e.charCodeAt(r)===Q||e.charCodeAt(r)===s3);)r++;for(;i>r&&(e.charCodeAt(i-1)===Q||e.charCodeAt(i-1)===s3);)i--;r<i&&e.charCodeAt(r)===H3&&r++,i>r&&e.charCodeAt(i-1)===H3&&(i-2<r||e.charCodeAt(i-2)!==y3)&&i--;for(var a=[],o=r,s=!1,c=[],l=r;l<i;){var u=e.charCodeAt(l);if(u===y3&&l+1<i){e.charCodeAt(l+1)===H3?(s||(s=!0,c=[]),c.push(e.slice(o,l)),c.push(`|`),l+=2,o=l):l+=2;continue}if(u===u3){for(var d=0;l<i&&e.charCodeAt(l)===u3;)d++,l++;for(var f=!1;l<i&&!f;){for(var p=0;l<i&&e.charCodeAt(l)===u3;)p++,l++;p===d?f=!0:p===0&&l++}continue}if(u===H3){var m=s?(c.push(e.slice(o,l)),c.join(``)):e.slice(o,l);a.push(m.trim()),l++,o=l,s=!1,c=[];continue}l++}var h=s?(c.push(e.slice(o,i)),c.join(``)):e.slice(o,i);return a.push(h.trim()),a.map(function(e){var r=e.indexOf(`\\|`)===-1?e:e.replace(/\\\|/g,`|`);return r?h8(r,!1,t,n):[]})}function m8(e,t,n,r){let i=q6(e,t);var a=e.indexOf(`|`,t);if(a<0||a>=i)return null;let o=J6(e,i);if(o>=e.length)return null;let s=q6(e,o);if(!F6(e,o,s))return null;let c=e.slice(t,i),l=e.slice(o,s);for(var u=[],d=0,f=l.length;d<f&&(l.charCodeAt(d)===Q||l.charCodeAt(d)===s3);)d++;for(d<f&&l.charCodeAt(d)===H3&&d++;d<f;){for(;d<f&&(l.charCodeAt(d)===Q||l.charCodeAt(d)===s3);)d++;if(d>=f||l.charCodeAt(d)===H3)break;var p=l.charCodeAt(d)===D3;for(p&&d++;d<f&&l.charCodeAt(d)===_3;)d++;var m=d<f&&l.charCodeAt(d)===D3;for(m&&d++,u.push(p&&m?`center`:m?`right`:p?`left`:null);d<f&&(l.charCodeAt(d)===Q||l.charCodeAt(d)===s3);)d++;d<f&&l.charCodeAt(d)===H3&&d++}let h=p8(c,n,r);if(u.length!==h.length)return null;let g=[],_=J6(e,s);for(;_<e.length;){let t=q6(e,_),i=e.slice(_,t);if(t8(e,_,t))break;if(e8(e,_,t),Q6<4){var v=e.charCodeAt(_+$6);if(v===m3||v===h3||(v===_3||v===b3||v===x3)&&n8(e,_))break;if(v===u3||v===d3){for(var y=_+$6,b=0;y<t&&e.charCodeAt(y)===v;)b++,y++;if(b>=3)break}}g.push(p8(i,n,r)),_=J6(e,t)}if(r.optimizeForStreaming&&g.length===0)return null;for(var x=h.length,S=0;S<g.length;S++)if(g[S].length<x)for(;g[S].length<x;)g[S].push([]);else g[S].length>x&&(g[S].length=x);return{node:{type:$.table,header:h,cells:g,align:u},end:_}}function gge(e,t,n){if(e8(e,t,q6(e,t)),Q6>3)return null;var r=t+$6;if(e.charCodeAt(r)!==f3)return null;if(r+1<e.length&&e.charCodeAt(r+1)===p3)return _ge(e,r,n)||null;n.refs||={};var i=L6(e,r,n.refs);return i===null?null:{node:{type:$.refCollection},end:i}}function _ge(e,t,n){var r=e.length;if(e.charCodeAt(t)!==f3||t+1>=r||e.charCodeAt(t+1)!==p3)return null;for(var i=t+2,a=i;i<r&&e.charCodeAt(i)!==w3;){if(e.charCodeAt(i)===l3)return null;i++}if(i>=r)return null;var o=(`^`+e.slice(a,i)).toLowerCase();if(i++,i>=r||e.charCodeAt(i)!==D3)return null;for(i++;i<r&&(e.charCodeAt(i)===Q||e.charCodeAt(i)===s3);)i++;if(i<r&&e.charCodeAt(i)===l3)for(i++;i<r&&(e.charCodeAt(i)===Q||e.charCodeAt(i)===s3);)i++;var s=e.indexOf(`
251
+ `,i);s<0&&(s=r);for(var c=e.slice(i,s).trim(),l=s<r?s+1:r;l<r;){var u=q6(e,l);if(e8(e,l,u),Q6>=2&&!t8(e,l,u))c+=`
252
+ `+e.slice(l,u),l=J6(e,u);else if(t8(e,l,u)){var d=J6(e,u);if(d<r&&(e8(e,d,q6(e,d)),Q6>=2)){c+=`
253
+ `,l=J6(e,u);continue}break}else break}return n.refs[o]||(n.refs[o]={target:c,title:void 0}),{node:{type:$.footnote},end:l}}function vge(e,t,n,r){let i=t,a=0,o=0,s=-1;for(;i<e.length;){let t=s>=0?s:q6(e,i);if(s=-1,t8(e,i,t))break;if(e8(e,i,t),Q6<4&&o>0&&!n.f){let n=e.charCodeAt(i+$6);if(n===v3||n===_3){let r=i+$6;for(;r<t&&e.charCodeAt(r)===n;)r++;for(;r<t&&(e.charCodeAt(r)===Q||e.charCodeAt(r)===s3);)r++;if(r>=t){a=n===v3?1:2,i=J6(e,t);break}}}o=t;let x=J6(e,t);if(x<e.length){if(e.charCodeAt(x)===q3){var c=q6(e,x);i=J6(e,c),o=c;continue}let t=q6(e,x);if(s=t,e8(e,x,t),Q6<4){let a=e.charCodeAt(x+$6);if(a===m3){i=x;break}if(a===h3){for(var l=x+$6,u=0;l<t&&e.charCodeAt(l)===h3&&u<=6;)u++,l++;if(u>=1&&u<=6&&(l>=t||e.charCodeAt(l)===Q||e.charCodeAt(l)===s3)){i=x;break}}if(a===u3||a===d3){for(var d=x+$6,f=0;d<t&&e.charCodeAt(d)===a;)f++,d++;if(f>=3){i=x;break}}if(a===S3){var p=x+$6+1,m=p<t?e.charCodeAt(p):0,h=m===T3||m===I3;if(!h&&m===R3){for(var g=p+1,_=g;_<t&&(e.charCodeAt(_)>=X3&&e.charCodeAt(_)<=Z3||e.charCodeAt(_)>=Q3&&e.charCodeAt(_)<=$3||e.charCodeAt(_)>=J3&&e.charCodeAt(_)<=Y3||e.charCodeAt(_)===_3);)_++;_>g&&(h=s8.has(e.slice(g,_).toLowerCase()))}else if(!h){for(var v=p;v<t&&(e.charCodeAt(v)>=X3&&e.charCodeAt(v)<=Z3||e.charCodeAt(v)>=Q3&&e.charCodeAt(v)<=$3||e.charCodeAt(v)>=J3&&e.charCodeAt(v)<=Y3||e.charCodeAt(v)===_3);)v++;if(v>p){var y=e.slice(p,v).toLowerCase();h=s8.has(y)||k6.has(y)}}if(h&&f8(e,x,n,r)){i=x;break}}if(a===_3||a===b3||a===V3){let n=x+$6+1;if(n<t&&(e.charCodeAt(n)===Q||e.charCodeAt(n)===s3)&&Y6(e,n,t)<t&&!n8(e,x)){i=x;break}}if(a>=J3&&a<=Y3){let n=x+$6;for(;n<t&&e.charCodeAt(n)>=J3&&e.charCodeAt(n)<=Y3;)n++;if(n<t&&(e.charCodeAt(n)===L3||e.charCodeAt(n)===K3)&&n-(x+$6)===1&&e.charCodeAt(x+$6)===49){var b=n+1;if(b<t&&(e.charCodeAt(b)===Q||e.charCodeAt(b)===s3)&&Y6(e,b,t)<t){i=x;break}}}if(a===H3){let n=J6(e,t);if(n<e.length&&F6(e,n,q6(e,n))){i=x;break}}if((a===_3||a===b3||a===x3)&&n8(e,x)){if(a!==_3){i=x;break}let n=0,r=x+$6;for(;r<t&&e.charCodeAt(r)===_3;)n++,r++;for(;r<t&&(e.charCodeAt(r)===Q||e.charCodeAt(r)===s3);)r++;if(r<t){i=x;break}}}}i=J6(e,t)}for(var x=a?o:i;x>t&&(e.charCodeAt(x-1)===l3||e.charCodeAt(x-1)===c3||e.charCodeAt(x-1)===Q||e.charCodeAt(x-1)===s3);)x--;for(var S=t;S<x&&(e.charCodeAt(S)===Q||e.charCodeAt(S)===s3);)S++;if(S>=x)return null;for(var C=!1,w=S;w<x;w++)if(e.charCodeAt(w)===q3){C=!0;break}var T=C?e.slice(S,x).replace(/\u001E/g,``):e.slice(S,x);if(!T)return null;let E=h8(T,!0,n,r);if(a){let e=(r?.slugify||l6)(T);return{node:{type:$.heading,level:a,children:E,id:e},end:i}}return{node:{type:$.paragraph,children:E},end:i}}function h8(e,t,n,r){var i=n.k;if(!i){var a=n.e;n.e=t;var o=T8(e,0,e.length,n,r);return n.e=a,o}var s=[];return i.push({dest:s,text:e,breaks:t,inline:n.inline,inAnchor:n.inAnchor,inHTML:n.inHTML,htmlDepth:n.c,inList:n.inList,inBlockQuote:n.inBlockQuote,noSetext:n.f,depth:n.j}),s}function yge(e,t,n){if(e.charCodeAt(t)!==u3)return null;let r=Z6(e,t,n,96),i=t+r;for(;i<n;){let a=e.indexOf("`",i);if(a<0||a>=n)return null;let o=Z6(e,a,n,96);if(o===r){let n=e.slice(t+r,a);return n.indexOf(`
254
+ `)!==-1&&(n=n.replace(/\n/g,` `)),n.length>0&&n[0]===` `&&n[n.length-1]===` `&&n.trim().length>0&&(n=n.slice(1,-1)),{node:{type:$.codeInline,text:n},end:a+o}}i=a+o}return null}function g8(e,t,n){if(e.charCodeAt(t)!==u3)return t;let r=Z6(e,t,n,96),i=t+r;for(;i<n;){let a=e.indexOf("`",i);if(a<0||a>=n)return t;let o=Z6(e,a,n,96);if(o===r)return a+o;i=a+o}return t}function bge(e,t,n){if(e.charCodeAt(t)!==S3)return t;if(t+1<n&&e.charCodeAt(t+1)===R3){let r=t+2;for(;r<n&&e.charCodeAt(r)!==m3;)r++;return r<n?r+1:t}if(t+3<n&&e.charCodeAt(t+1)===T3&&e.charCodeAt(t+2)===_3&&e.charCodeAt(t+3)===_3){let n=e.indexOf(`-->`,t+4);return n>=0?n+3:t}let r=t+1,i=r;for(;r<n;){let t=e.charCodeAt(r);if(t>=X3&&t<=Z3||t>=Q3&&t<=$3||t>=J3&&t<=Y3||t===_3)r++;else break}if(r===i)return t;let a=e.slice(i,r).toLowerCase(),o=!1;for(;r<n;){let i=e.charCodeAt(r);if(i===m3){r++;break}if(i===R3&&r+1<n&&e.charCodeAt(r+1)===m3){r+=2,o=!0;break}if(i===B3||i===z3){var s=i;for(r++;r<n&&e.charCodeAt(r)!==s;)r++;r<n&&r++;continue}if(i===l3)return t;r++}if(o||f6(a))return r;let c=1;for(;r<n&&c>0;)if(e.charCodeAt(r)===S3)if(r+1<n&&e.charCodeAt(r+1)===R3){let t=r+2,i=t;for(;i<n&&(e.charCodeAt(i)>=X3&&e.charCodeAt(i)<=Z3||e.charCodeAt(i)>=Q3&&e.charCodeAt(i)<=$3);)i++;if(e.slice(t,i).toLowerCase()===a){for(;i<n&&e.charCodeAt(i)!==m3;)i++;if(i<n&&i++,c--,c===0)return i}r=i}else{let t=r+1,i=t;for(;i<n&&(e.charCodeAt(i)>=X3&&e.charCodeAt(i)<=Z3||e.charCodeAt(i)>=Q3&&e.charCodeAt(i)<=$3);)i++;e.slice(t,i).toLowerCase()===a&&c++,r++}else r++;return r}function xge(e,t,n,r,i){if(e.charCodeAt(t)!==d3||t+1>=n||e.charCodeAt(t+1)!==d3)return null;let a=t+2;for(;a+1<n;){let o=e.charCodeAt(a);if(o===u3){let t=g8(e,a,n);if(t>a){a=t;continue}}if(o===d3&&e.charCodeAt(a+1)===d3){let n=e.slice(t+2,a),o=T8(n,0,n.length,r,i);return{node:{type:$.textFormatted,tag:`del`,children:o},end:a+2}}o===y3&&a+1<n&&a++,a++}return null}function Sge(e,t,n,r,i){if(e.charCodeAt(t)!==v3||t+1>=n||e.charCodeAt(t+1)!==v3)return null;let a=t+2;for(;a+1<n;){let o=e.charCodeAt(a);if(o===u3){let t=g8(e,a,n);if(t>a){a=t;continue}}if(o===v3&&e.charCodeAt(a+1)===v3&&a>t+2){let n=e.slice(t+2,a),o=T8(n,0,n.length,r,i);return{node:{type:$.textFormatted,tag:`mark`,children:o},end:a+2}}o===y3&&a+1<n&&a++,a++}return null}function _8(e,t,n){return e<e6?!!(H6(e)&h6):Hhe.test(t[n])}function v8(e,t,n){return e<e6?!!(H6(e)&p6):Uhe.test(t[n])}function Cge(e,t,n){var r=e.charCodeAt(t);if(r!==b3&&r!==x3)return null;var i=Z6(e,t,n,r);if(i===0)return null;var a=t>0?e.charCodeAt(t-1):32,o=t+i<n?e.charCodeAt(t+i):32,s=v8(a,e,t-1),c=v8(o,e,t+i),l=t>0&&_8(a,e,t-1),u=t+i<n&&_8(o,e,t+i),d=!c&&(!u||s||l),f=!s&&(!l||c||u),p,m;return r===b3?(p=d,m=f):(p=d&&(!f||l),m=f&&(!d||u)),{len:i,canOpen:p,canClose:m}}function wge(e,t,n,r){if(t.length!==0){for(var i=e.length,a=Array(i),o=null,s=null,c=0;c<i;c++){var l={node:e[c],prev:s,next:null};s?s.next=l:o=l,a[c]=l,s=l}for(var u=Array(t.length),d=0;d<t.length;d++)u[d]=a[t[d].idx];for(var f=[],p=0;p<12;p++)f[p]=-1;for(var m=0;m<t.length;){var h=t[m];if(!h.active||!h.canClose){m++;continue}for(var g=(h.ch===b3?0:1)*6+h.len%3*2+ +!!h.canOpen,_=f[g]===void 0?-1:f[g],v=-1,y=m-1;y>_;y--){var b=t[y];if(!(!b.active||b.ch!==h.ch||!b.canOpen)&&!((h.canOpen||b.canClose)&&(b.len+h.len)%3==0&&b.len%3!=0)){v=y;break}}if(v<0){f[g]=m-1,!h.canOpen&&(h.active=!1),m++;continue}var x=t[v],S=x.len>=2&&h.len>=2,C=S?2:1;x.len-=C,h.len-=C;var w=u[v],T=u[m],E=w.node,D=T.node;E.text=E.text.slice(0,E.text.length-C),D.text=D.text.slice(C);for(var O=[],k=w.next;k&&k!==T;)O.push(k.node),k=k.next;var A={node:{type:$.textFormatted,tag:S?`strong`:`em`,children:O},prev:w,next:T};w.next=A,T.prev=A;for(var j=v+1;j<m;j++)t[j].active=!1;if(x.len===0&&(x.active=!1,E.text===``)){var M=w.prev;A.prev=M,M?M.next=A:o=A}if(h.len===0){if(h.active=!1,D.text===``){var N=T.next;A.next=N,N&&(N.prev=A)}}else continue;m++}for(var P=0,F=o;F;){var I=F.node;if(I.type===$.text){var L=I;if(L.text===``){F=F.next;continue}if(P>0&&e[P-1].type===$.text){e[P-1].text+=L.text,F=F.next;continue}}e[P++]=I,F=F.next}e.length=P}}function y8(e,t,n,r,i){let a=e.charCodeAt(t)===T3,o=a?t+1:t;if(e.charCodeAt(o)!==f3)return null;var s=e.indexOf(`]`,o+1);if(s<0||s>=n)return null;for(var c=o+1,l=1;c<n&&l>0;){var u=e.charCodeAt(c);if(u===y3&&c+1<n){c+=2;continue}if(u===u3){var d=g8(e,c,n);if(d>c){c=d;continue}}if(u===S3){var f=b8(e,c,n);if(f){c=f.end;continue}var p=bge(e,c,n);if(p>c){c=p;continue}}u===f3?l++:u===w3&&l--,c++}if(l!==0)return null;var m=c-1,h=e.slice(o+1,m),g=c<n?e.charCodeAt(c):0,_=!1;if(g===G3){var v=!0;for(c++;c<n&&(e.charCodeAt(c)===Q||e.charCodeAt(c)===l3);)c++;var y=``,b=c;if(c<n&&e.charCodeAt(c)===S3){for(c++,b=c;b<n&&e.charCodeAt(b)!==m3;){if(e.charCodeAt(b)===y3&&b+1<n){b+=2;continue}if(e.charCodeAt(b)===l3){v=!1;break}b++}v&&(b>=n||e.charCodeAt(b)!==m3)&&(v=!1),v&&(y=e.slice(c,b),b++)}else if(v)if(r.g!==void 0&&c>=r.g)v=!1;else{for(var x=0,S=!1;b<n;){var C=e.charCodeAt(b);if(C===y3&&b+1<n){b+=2;continue}if(C===G3)x++;else if(C===K3){if(S=!0,x===0)break;x--}else if(C===Q||C===l3)break;b++}b>=n&&!S&&(r.g===void 0||c<r.g)&&(r.g=c),y=e.slice(c,b)}if(v){for(c=b;c<n&&(e.charCodeAt(c)===Q||e.charCodeAt(c)===l3);)c++;var w;if(c<n){var T=e.charCodeAt(c);if(T===B3||T===z3||T===G3){var E=T===G3?41:T;c++;for(var D=c;c<n&&e.charCodeAt(c)!==E;)e.charCodeAt(c)===y3&&c+1<n&&c++,c++;c>=n?v=!1:(w=e.slice(D,c),c++)}}if(v){for(;c<n&&(e.charCodeAt(c)===Q||e.charCodeAt(c)===l3);)c++;(c>=n||e.charCodeAt(c)!==K3)&&(v=!1)}}if(v){c++,y=U6(y),w!==void 0&&(w=r6(U6(w)));var O=(i?.sanitizer||a6)(y,a?`img`:`a`,a?`src`:`href`)===null?null:y;if(a){var k=S8(T8(h,0,h.length,r,i));return{node:{type:$.image,target:O,alt:k,title:w},end:c}}else{var A=r.inAnchor;r.inAnchor=!0;var j=A?[{type:$.text,text:h}]:T8(h,0,h.length,r,i);return r.inAnchor=A,!r.inAnchor&&x8(j)?null:{node:{type:$.link,target:O,title:w,children:j},end:c}}}else c=m+1,_=!0}var M=``,N=c;if(!_&&g===f3){var P=c+1;N=P;for(var F=!1;N<n&&e.charCodeAt(N)!==w3;){if(e.charCodeAt(N)===y3&&N+1<n){N+=2;continue}if(e.charCodeAt(N)===f3){F=!0;break}N++}if(F||N>=n)return null;var I=e.slice(P,N);if(I.trim())M=V6(I);else{if(B6(h))return null;M=V6(h)}N+=1}else{if(B6(h))return null;M=V6(h)}var L=r.refs[M];if(!L)return null;if(a)return{node:{type:$.image,target:L.target,alt:S8(T8(h,0,h.length,r,i)),title:L.title},end:N};var ee=r.inAnchor;r.inAnchor=!0;var j=ee?[{type:$.text,text:h}]:T8(h,0,h.length,r,i);return r.inAnchor=ee,!r.inAnchor&&x8(j)?null:{node:{type:$.link,target:L.target,title:L.title,children:j},end:N}}function b8(e,t,n){if(e.charCodeAt(t)!==S3)return null;for(var r=t+1;r<n;){var i=e.charCodeAt(r);if(i===m3)break;if(i===Q||i===l3||i===c3||i===S3)return null;r++}if(r>=n||e.charCodeAt(r)!==m3)return null;var a=e.slice(t+1,r);return a.match(/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^\x00-\x20]*)$/)?{node:{type:$.link,target:a,title:void 0,children:[{type:$.text,text:a}]},end:r+1}:a.indexOf(`@`)!==-1&&/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(a)?{node:{type:$.link,target:`mailto:`+a,title:void 0,children:[{type:$.text,text:a}]},end:r+1}:null}function Tge(e,t,n,r){if(e.charCodeAt(t)!==f3||t+1>=n||e.charCodeAt(t+1)!==p3)return null;let i=t+2;for(;i<n&&e.charCodeAt(i)!==w3&&e.charCodeAt(i)!==l3;)i++;if(i>=n||e.charCodeAt(i)!==w3)return null;let a=e.slice(t+2,i);return a?{node:{type:$.footnoteReference,target:`#`+l6(a),text:a},end:i+1}:null}function Ege(e,t,n,r){if(r.disableBareUrls)return null;var i=``,a=!1,o=e.charCodeAt(t);if(o===A3||o===72?t+8<=n&&e.charCodeAt(t+1)===M3&&e.charCodeAt(t+2)===M3&&e.charCodeAt(t+3)===N3&&(e.charCodeAt(t+4)===P3&&e.charCodeAt(t+5)===D3&&e.charCodeAt(t+6)===R3&&e.charCodeAt(t+7)===R3?i=`https://`:e.charCodeAt(t+4)===D3&&e.charCodeAt(t+5)===R3&&e.charCodeAt(t+6)===R3&&(i=`http://`)):o===k3||o===70?t+6<=n&&e.charCodeAt(t+1)===M3&&e.charCodeAt(t+2)===N3&&e.charCodeAt(t+3)===D3&&e.charCodeAt(t+4)===R3&&e.charCodeAt(t+5)===R3&&(i=`ftp://`):(o===j3||o===87)&&t+4<=n&&e.charCodeAt(t+1)===j3&&e.charCodeAt(t+2)===j3&&e.charCodeAt(t+3)===L3&&(i=`www.`,a=!0),!i)return null;let s=t+i.length;for(;s<n;){let t=e.charCodeAt(s);if(t===Q||t===l3||t===s3||t===c3||t===S3||t===m3)break;s++}for(var c=0,l=0,u=t;u<s;u++){var d=e.charCodeAt(u);d===G3?c++:d===K3&&l++}let f=s;for(;f>t+i.length;){let n=e.charCodeAt(f-1);if(n===L3||n===Mhe||n===D3||n===T3||n===I3||n===K3||n===b3||n===x3||n===d3){if(n===K3){if(c>=l)break;l--}f--}else if(n===F3){for(var p=f-2;p>t&&(e.charCodeAt(p)>=X3&&e.charCodeAt(p)<=Z3||e.charCodeAt(p)>=Q3&&e.charCodeAt(p)<=$3||e.charCodeAt(p)>=J3&&e.charCodeAt(p)<=Y3);)p--;p>=t&&e.charCodeAt(p)===E3?f=p:f--}else break}if(f<=t+i.length)return null;var m=t+(a?4:i.length),h=e.indexOf(`/`,m);if((h<0||h>f)&&(h=f),a&&e.indexOf(`.`,m)===-1)return null;for(var g=-1,_=-1,v=h-1;v>=m;v--)if(e.charCodeAt(v)===L3)if(g<0)g=v;else{_=v;break}for(var v=_>=0?_+1:m;v<h;v++)if(e.charCodeAt(v)===x3)return null;var y=e.slice(t,f),b=a?`http://`+y:y;return{node:{type:$.link,target:b,title:void 0,children:[{type:$.text,text:y}]},end:f}}function Dge(e,t,n,r){if(r.disableBareUrls)return null;for(var i=t,a=i;i<n;){var o=e.charCodeAt(i);if(o>=X3&&o<=Z3||o>=Q3&&o<=$3||o>=J3&&o<=Y3||o===L3||o===T3||o===h3||o===36||o===g3||o===E3||o===z3||o===b3||o===V3||o===R3||o===v3||o===I3||o===p3||o===x3||o===u3||o===U3||o===H3||o===W3||o===d3||o===_3)i++;else break}if(i===a||i>=n||e.charCodeAt(i)!==C3)return null;i++;for(var s=i,c=-1,l=i;i<n;){var o=e.charCodeAt(i);if(o>=X3&&o<=Z3||o>=Q3&&o<=$3||o>=J3&&o<=Y3)i++;else if((o===_3||o===x3)&&i>s)i++;else if(o===L3){if(i===s)break;var u=e.charCodeAt(i-1);if(u===_3||u===x3||i-l>63)break;if(i+1<n){var d=e.charCodeAt(i+1);if(d>=X3&&d<=Z3||d>=Q3&&d<=$3||d>=J3&&d<=Y3)c=i,l=i+1,i++;else break}else break}else break}if(i-l>63||c<0)return null;var f=e.charCodeAt(i-1);if(!(f>=X3&&f<=Z3||f>=Q3&&f<=$3||f>=J3&&f<=Y3)||i<=c+1)return null;for(var p=-1,m=c-1;m>=s;m--)if(e.charCodeAt(m)===L3){p=m;break}for(var m=p>=0?p+1:s;m<i;m++)if(e.charCodeAt(m)===x3)return null;var h=e.slice(t,i);return{node:{type:$.link,target:`mailto:`+h,title:void 0,children:[{type:$.text,text:h}]},end:i}}function x8(e){for(var t=0;t<e.length;t++)if(e[t].type===$.link||`children`in e[t]&&Array.isArray(e[t].children)&&x8(e[t].children))return!0;return!1}function S8(e){for(var t=``,n=0;n<e.length;n++){var r=e[n];r.type===$.text?t+=r.text:r.type===$.breakLine?t+=` `:r.type===$.codeInline?t+=r.text:`children`in r&&Array.isArray(r.children)?t+=S8(r.children):r.type===$.image&&(t+=r.alt||``)}return t}function C8(e){return{type:$.text,text:e}}function Oge(e,t,n){var r=t+1;if(r>=n)return-1;if(e.charCodeAt(r)===h3){r++;var i=r<n&&(e.charCodeAt(r)===Nhe||e.charCodeAt(r)===Phe);i&&r++;for(var a=r,o=i?6:7;r<n&&r-a<=o;){var s=e.charCodeAt(r);if(!(s>=J3&&s<=Y3||i&&(s>=X3&&s<=O3||s>=Q3&&s<=k3)))break;r++}return r===a||r-a>o?-1:r<n&&e.charCodeAt(r)===F3?r+1:-1}for(var c=r;r<n&&r-c<48;){var l=e.charCodeAt(r);if(l>=X3&&l<=Z3||l>=Q3&&l<=$3||l>=J3&&l<=Y3){r++;continue}break}return r===c?-1:r<n&&e.charCodeAt(r)===F3?r+1:-1}function kge(e,t,n,r,i){if(e.charCodeAt(t)!==S3)return null;var a=t+1;if(a>=n)return null;var o=e.charCodeAt(a);if(o===T3&&a+1<n&&e.charCodeAt(a+1)===_3&&a+2<n&&e.charCodeAt(a+2)===_3){var s=a+3;if(s<n&&e.charCodeAt(s)===m3)return{node:{type:$.htmlComment,text:``,l:!0},end:s+1};if(s+1<n&&e.charCodeAt(s)===_3&&e.charCodeAt(s+1)===m3)return{node:{type:$.htmlComment,text:`-`,l:!0},end:s+2};var c=e.indexOf(`-->`,s);return c!==-1&&c<=n-3?{node:{type:$.htmlComment,text:e.slice(t+4,c),l:!1},end:c+3}:null}if(o===I3){var l=e.indexOf(`?>`,a+1);return l!==-1&&l<n?{node:{type:$.htmlSelfClosing,tag:`?`,attrs:{},a:e.slice(t,l+2),b:!1},end:l+2}:null}if(o===T3&&a+1<n){var u=e.charCodeAt(a+1);if(u===f3&&e.slice(a+1,a+8)===`[CDATA[`){var d=e.indexOf(`]]>`,a+8);return d!==-1&&d<n?{node:{type:$.htmlSelfClosing,tag:`![CDATA[`,attrs:{},a:e.slice(t,d+3),b:!1},end:d+3}:null}if(u>=X3&&u<=Z3){var f=e.indexOf(`>`,a+2);return f!==-1&&f<n?{node:{type:$.htmlSelfClosing,tag:`!`+e.slice(a+1,f),attrs:{},a:e.slice(t,f+1),b:!1},end:f+1}:null}}if(o===R3){var p=a+1;if(p>=n)return null;var m=e.charCodeAt(p);if(!(m>=X3&&m<=Z3||m>=Q3&&m<=$3))return null;for(p++;p<n;){var h=e.charCodeAt(p);if(h>=X3&&h<=Z3||h>=Q3&&h<=$3||h>=J3&&h<=Y3||h===_3)p++;else break}for(;p<n&&(e.charCodeAt(p)===Q||e.charCodeAt(p)===s3||e.charCodeAt(p)===l3);)p++;if(p<n&&e.charCodeAt(p)===m3){var g=e.slice(a+1,p).trim();return{node:{type:$.htmlSelfClosing,tag:g,attrs:{},a:e.slice(t,p+1),b:!0},end:p+1}}return null}if(!(o>=X3&&o<=Z3||o>=Q3&&o<=$3))return null;var _=I6(e,t);if(!_)return null;var v=_.tag,y=v.toLowerCase();if(_.selfClosing||f6(v))return{node:{type:$.htmlSelfClosing,tag:v,attrs:c8(_.attrs,v,i),a:e.slice(t,_.end),b:!1},end:_.end};var b=k6.has(y),x=d8(e.slice(0,n),_.end,v);if(x===-1)return{node:{type:$.htmlSelfClosing,tag:v,attrs:c8(_.attrs,v,i),a:e.slice(t,_.end),b:!1},end:_.end};var S=mge(e,`</`+y,x),C=e.slice(_.end,S),w=[];if(b)C.trim()&&(w=[{type:$.text,text:C}]);else{var T=C.trim();if(T){var{inAnchor:E,inline:D,e:O}=r;y===`a`&&(r.inAnchor=!0),r.e=!1,T.indexOf(`
255
+
256
+ `)!==-1||/^#{1,6}\s/.test(T)?(r.inline=!1,w=E8(T,r,i)):w=T8(T,0,T.length,r,i),r.inAnchor=E,r.inline=D,r.e=O}}return{node:{type:$.htmlBlock,tag:v,attrs:c8(_.attrs,v,i),i:_.rawAttrs,children:w,a:void 0,text:C,d:!1,b:!1},end:x}}var Age=200,w8=0;function T8(e,t,n,r,i){if(w8++,w8>Age)return w8--,[{type:$.text,text:e.slice(t,n)}];var a=r.g;r.g=void 0;let o=r;if(i.optimizeForStreaming){let r=function(e,t){for(var n=1,r=t+1;r<e.length;r++){var i=e.charCodeAt(r);if(i===f3)n++;else if(i===w3&&(n--,n===0))return r}return-1},i=e.slice(t,n),a=i;for(var s=0,c=0,l=0,u=0,d=0,f=-1,p=-1,m=-1,h=-1,g=-1,_=0;_<i.length;_++){var v=i.charCodeAt(_);v===b3?_+1<i.length&&i.charCodeAt(_+1)===b3?(s++,f=_,_++):(c++,p=_):v===x3?_+1<i.length&&i.charCodeAt(_+1)===x3?(l++,m=_,_++):(u++,h=_):v===d3&&_+1<i.length&&i.charCodeAt(_+1)===d3&&(d++,g=_,_++)}var y=[];d%2==1&&g>=0&&y.push([g,2]),l%2==1&&m>=0&&y.push([m,2]),u%2==1&&h>=0&&y.push([h,1]),s%2==1&&f>=0&&y.push([f,2]),c%2==1&&p>=0&&y.push([p,1]),y.sort(function(e,t){return t[0]-e[0]});for(var b=0;b<y.length;b++){var x=y[b][0],S=y[b][1];i=i.slice(0,x)+i.slice(x+S)}let o=0,ne=-1;for(let e=0;e<i.length;e++)i.charCodeAt(e)===u3&&(o++,ne=e);if(o%2==1&&ne!==-1){let e=!1,t=-1,n=0;for(;n<i.length;)i.charCodeAt(n)===u3&&(e?(e=!1,t=-1):(t=n,e=!0)),n++;e&&t!==-1&&(i=i.slice(0,t))}for(var C=!0;C;){C=!1;for(var w=-1,T=-1,E=-1,D=!1,O=0;O<i.length;O++)if(i.charCodeAt(O)===f3&&(O===0||i.charCodeAt(O-1)!==y3)){var k=O>0&&i.charCodeAt(O-1)===T3,A=k?O-1:O,j=r(i,O);if(j===-1)w=A,D=k,T=O+1,E=i.length;else{var M=j+1;if(M>=i.length)w=A,D=k,T=O+1,E=j;else if(i.charCodeAt(M)===G3){var N=i.indexOf(`)`,M+1);N===-1?(w=A,D=k,T=O+1,E=j,O=i.length):O=N}else if(i.charCodeAt(M)===f3){var P=i.indexOf(`]`,M+1);P===-1?(w=A,D=k,T=O+1,E=j,O=i.length):O=P}else O=j}}if(w>=0){var F=D?``:i.slice(T,E);i=i.slice(0,w)+F,C=!0}}let R=i.match(/<([A-Z][A-Za-z0-9]*)(?:\s[^>]*)?>([^<]*)$/);if(R&&R.index!==void 0){var I=R[0].length-R[2].length;if(!(I>=2&&R[0].charCodeAt(I-2)===R3)){for(var L=!1,ee=0,te=0;te<R.index;te++)i.charCodeAt(te)===u3&&ee++;if(L=ee%2==1,!L){let e=R[1];l8(i,`</`+e,0)===-1&&(i=i.slice(0,R.index)+R[2])}}}i!==a&&(e=e.slice(0,t)+i,n=t+i.length)}let ne=[];var R=[];let z=t;var B=``,re=i.disableAutoLink||i.disableBareUrls||o.inAnchor?-1:e.indexOf(`@`,t);for(re>=n&&(re=-1);t<n;){let r=e.charCodeAt(t),a=null;if(r===u3){if(a=yge(e,t,n),!a){var ie=Z6(e,t,n,u3);t+=ie-1}}else if(r===b3||r===x3){var ae=Cge(e,t,n);if(ae){if(ae.canOpen||ae.canClose){(B||t>z)&&(ne.push(C8(B+e.slice(z,t))),B=``);var oe=C8(e.slice(t,t+ae.len));R.push({idx:ne.length,ch:r,len:ae.len,canOpen:ae.canOpen,canClose:ae.canClose,active:!0}),ne.push(oe),t+=ae.len,z=t;continue}t+=ae.len-1}}else if(r===d3)a=xge(e,t,n,o,i);else if(r===v3)a=Sge(e,t,n,o,i);else if(r===f3)t+1<n&&e.charCodeAt(t+1)===p3&&(a=Tge(e,t,n,o)),a||=y8(e,t,n,o,i);else if(r===T3&&t+1<n&&e.charCodeAt(t+1)===f3)a=y8(e,t,n,o,i);else if(r===S3)a=b8(e,t,n),!a&&!i.disableParsingRawHTML&&!i.ignoreHTMLBlocks&&(a=kge(e,t,n,o,i));else if(r===E3){var se=Oge(e,t,n);if(se!==-1){var ce=e.slice(t,se),le=r6(ce);if(le!==ce){B=B+e.slice(z,t)+le,t=se,z=se;continue}}}else if((r===A3||r===j3||r===k3)&&!o.inAnchor&&!i.disableAutoLink&&(t===0||e.charCodeAt(t-1)!==S3)){var ue=t+1<n?e.charCodeAt(t+1):0;(r===A3&&ue===M3||r===k3&&ue===M3||r===j3&&ue===j3)&&(a=Ege(e,t,n,i))}if(!a&&re>=0&&re-t<=64&&!o.inAnchor&&!i.disableAutoLink&&!i.disableBareUrls&&(r>=X3&&r<=Z3||r>=Q3&&r<=$3||r>=J3&&r<=Y3)&&(a=Dge(e,t,n,i),!a&&t>=re&&(re=e.indexOf(`@`,t+1),re>=n&&(re=-1))),r===l3&&o.e){var de=!1,fe=0;if(t>z&&e.charCodeAt(t-1)===y3)de=!0,fe=1;else{for(var pe=0,me=t-1;me>=z&&e.charCodeAt(me)===Q;)pe++,me--;pe>=2&&(de=!0,fe=pe)}if(de){for((B||t-fe>z)&&(ne.push(C8(B+e.slice(z,t-fe))),B=``),ne.push({type:$.breakLine}),t++;t<n&&e.charCodeAt(t)===Q;)t++;z=t;continue}var V=t>z&&e.charCodeAt(t-1)===Q,he=t+1<n&&e.charCodeAt(t+1)===Q;if(V||he){for(var ge=t;ge>z&&e.charCodeAt(ge-1)===Q;)ge--;for(B+=e.slice(z,ge)+`
257
+ `,t++;t<n&&e.charCodeAt(t)===Q;)t++;z=t;continue}}if(a)(B||t>z)&&(ne.push(C8(B+e.slice(z,t))),B=``),ne.push(a.node),t=a.end,z=t;else{if(r===y3&&t+1<n&&H6(e.charCodeAt(t+1))&h6){(B||t>z)&&(ne.push(C8(B+e.slice(z,t))),B=``),ne.push(C8(e[t+1])),t+=2,z=t;continue}if(t++,re<0||re-t>64)for(;t<n&&!(re>=0&&re-t<=64);){var _e=e.charCodeAt(t);if(_e<e6&&!N6[_e])t++;else break}}}return(B||n>z)&&(ne.push(C8(B+e.slice(z,n))),B=``),R.length>0&&wge(ne,R,r,i),r.g=a,w8--,ne}var jge=500;function E8(e,t,n){var r=t.j||0;if(r>jge)return[{type:$.text,text:e}];if(t.j=r+1,n.optimizeForStreaming&&!t.m){var i=e.length;i>0&&e.charCodeAt(i-1)===l3&&i--;for(var a=i;a>0&&e.charCodeAt(a-1)!==l3;)a--;if(a>0&&e.charCodeAt(a)===H3){for(var o=!0,s=a;s<i;s++){var c=e.charCodeAt(s);if(c!==Q&&c!==s3&&c!==_3&&c!==D3&&c!==H3){o=!1;break}}if(o){for(var l=a-1;l>0&&e.charCodeAt(l-1)!==l3;)l--;e.charCodeAt(l)===H3&&(e=e.slice(0,l).trimEnd())}}var u=e.trim(),d=u.lastIndexOf(`
258
+ `),f=d===-1?u:u.slice(d+1);if(f.length>0&&f.charCodeAt(0)===H3){for(var p=!1,m=!1,h=1;h<f.length;h++){var g=f.charCodeAt(h);g===H3&&(p=!0),g===_3&&(m=!0)}p&&m&&(e=d===-1?``:e.slice(0,e.lastIndexOf(f)).trimEnd())}for(var _=-1,v=-1,y=-1,b=e.length-1;b>=0;b--)if(e.charCodeAt(b)===S3){var x=b+1<e.length?e.charCodeAt(b+1):0;if(x>=X3&&x<=Z3||x>=Q3&&x<=$3){for(var S=b+2;S<e.length;){var C=e.charCodeAt(S);if(C>=X3&&C<=Z3||C>=Q3&&C<=$3||C>=J3&&C<=Y3)S++;else break}for(var w=S;w<e.length&&e.charCodeAt(w)!==m3;)w++;if(w<e.length&&e.charCodeAt(w-1)!==R3){for(var T=!1,E=w+1;E<e.length;E++)if(e.charCodeAt(E)===S3){T=!0;break}T||(_=b,v=S,y=w+1)}}break}if(_>=0){for(var D=0,O=0;O<_;O++)e.charCodeAt(O)===u3&&D++;if(D%2==0){var k=e.slice(_+1,v);l8(e,`</`+k,0)===-1&&(e=e.slice(0,_)+e.slice(y))}}for(var A=e.length;A>0&&e.charCodeAt(A-1)===l3;)A--;if(A>0){for(var j=A;j>0&&e.charCodeAt(j-1)!==l3;)j--;for(var M=j,N=0;M<A&&e.charCodeAt(M)===Q&&N<3;)M++,N++;if(j>0&&M<A&&lge(e,M,A)){for(var P=j-1,F=P;F>0&&e.charCodeAt(F-1)!==l3;)F--;t8(e,F,P)||(e=e.slice(0,j).trimEnd())}}var I=e.length;if(I>0){for(var L=e.lastIndexOf(`
259
+ `),ee=L===-1?0:L+1,te=I,ne=ee,R=0;ne<te&&e.charCodeAt(ne)===Q&&R<3;)ne++,R++;if(ne<te){var z=e.charCodeAt(ne),B=!1;if(z===b3||z===_3||z===V3){var re=ne+1;if(re>=te||e.charCodeAt(re)===Q||e.charCodeAt(re)===s3){for(var ie=re;ie<te&&(e.charCodeAt(ie)===Q||e.charCodeAt(ie)===s3);)ie++;ie>=te&&(B=!0)}}else if(z>=J3&&z<=Y3){for(var ae=ne;ae<te&&e.charCodeAt(ae)>=J3&&e.charCodeAt(ae)<=Y3;)ae++;if(ae<te&&(e.charCodeAt(ae)===L3||e.charCodeAt(ae)===K3)){var oe=ae+1;if(oe>=te||e.charCodeAt(oe)===Q||e.charCodeAt(oe)===s3){for(var se=oe;se<te&&(e.charCodeAt(se)===Q||e.charCodeAt(se)===s3);)se++;se>=te&&(B=!0)}}}B&&(e=e.slice(0,ee).trimEnd())}}}if(t.inline)return T8(e,0,e.length,t,n);let ce=[],le=0,ue=e.length;if(le===0&&!n.disableFrontmatter&&e.startsWith(`---`)){let t=Fhe(e);if(t&&t.hasValidYaml){if(n.preserveFrontmatter!==!1){let n=e.slice(0,t.endPos).trimEnd();ce.push({type:$.frontmatter,text:n})}le=t.endPos}}for(;le<ue;){for(var de=e.indexOf(`
260
+ `,le),fe=de<0?ue:de;le<ue&&t8(e,le,fe);)le=fe<ue?fe+1:fe,le<ue&&(de=e.indexOf(`
261
+ `,le),fe=de<0?ue:de);if(le>=ue)break;var pe=e.charCodeAt(le)===q3;e8(e,le,fe);let r=null;if(W6=e,G6=le,K6=fe,!pe&&Q6>=4&&!t.inHTML)r=dge(e,le);else if(!pe){let i=le+$6,a=e.charCodeAt(i);a===h3?r=cge(e,le,t,n):a===m3?r=fge(e,le,t,n):a===u3||a===d3?r=uge(e,le,t):a===_3||a===b3||a===x3?(r=n8(e,le),!r&&(r=o8(e,le,t,n))):a===V3||a>=J3&&a<=Y3?r=o8(e,le,t,n):a===S3?r=f8(e,le,t,n):a===H3?r=m8(e,le,t,n):a===f3&&(r=gge(e,le,t))}if(!r){for(var me=!1,V=le;V<fe;V++)if(e.charCodeAt(V)===H3){me=!0;break}me&&(r=m8(e,le,t,n))}if(r||=vge(e,le,t,n),r)r.node.type!==$.refCollection&&ce.push(r.node),le=r.end;else{var he=e.indexOf(`
262
+ `,le);le=he<0?ue:he+1}}return t.j=r,ce}function Mge(e,t,n,r){var i=I6(e,t);return i?{tagName:i.tag,tagLower:i.tag.toLowerCase(),attrs:i.rawAttrs,whitespaceBeforeAttrs:i.whitespaceBeforeAttrs,isSelfClosing:i.selfClosing,hasSpaceBeforeSlash:i.hasSpaceBeforeSlash,isClosing:i.isClosing,hasNewline:i.whitespaceBeforeAttrs.includes(`
263
+ `)||i.rawAttrs.includes(`
264
+ `),endPos:i.end}:null}function D8(e,t,n){w8=0,e=Whe(e),!t.refs&&(t.refs={}),(n.optimizeForStreaming||t.inline)&&(t.m=sge(e,t.refs,n));var r=!t.k;r&&(t.k=[],t.h=[]);let i=E8(e,t,n);if(r){for(var a=t.k,o={inline:t.inline,inAnchor:t.inAnchor,inHTML:t.inHTML,htmlDepth:t.c,inList:t.inList,inBlockQuote:t.inBlockQuote,noSetext:t.f,depth:t.j},s=0;s<a.length;s++){var c=a[s];t.inline=c.inline,t.inAnchor=c.inAnchor,t.inHTML=c.inHTML,t.c=c.htmlDepth,t.inList=c.inList,t.inBlockQuote=c.inBlockQuote,t.f=c.noSetext,t.j=c.depth,t.e=c.breaks;var l=T8(c.text,0,c.text.length,t,n);t.e=!1;for(var u=0;u<l.length;u++)c.dest.push(l[u])}t.inline=o.inline,t.inAnchor=o.inAnchor,t.inHTML=o.inHTML,t.c=o.htmlDepth,t.inList=o.inList,t.inBlockQuote=o.inBlockQuote,t.f=o.noSetext,t.j=o.depth;for(var d=t.h,f=0;f<d.length;f++)for(var p=d[f],m=0;m<p.src.length;m++){var h=p.src[m];if(p.unwrap&&h.type===$.paragraph)for(var g=h.children,_=0;_<g.length;_++)p.dest.push(g[_]);else p.dest.push(h)}t.k=void 0,t.h=void 0}return b6(t.refs)?[{type:$.refCollection,refs:t.refs},...i]:i}var O8;try{O8=b.createElement(`div`).$$typeof}catch{O8=Symbol.for(`react.transitional.element`)}function k8(e,t,n){return{$$typeof:O8,type:e,key:n==null?null:``+n,ref:null,props:t,_owner:null,_store:{},_debugStack:null,_debugTask:null}}var Nge=typeof b.createContext<`u`?b.createContext(void 0):void 0;function A8(e,t,n,r,i,a,o,s,c){switch(e.type){case $.blockQuote:{let i={key:n.key};return e.alert&&(i.className=`markdown-alert-`+a(e.alert.toLowerCase(),l6),e.children.unshift(Khe(e.alert))),r(`blockquote`,i,t(e.children,n))}case $.breakLine:return r(`br`,{key:n.key});case $.breakThematic:return r(`hr`,{key:n.key});case $.frontmatter:return s.preserveFrontmatter?r(`pre`,{key:n.key},e.text):null;case $.codeBlock:let f=e.lang?r6(e.lang):``;return r(`pre`,{key:n.key},r(`code`,{...n6(e.attrs),className:f?`language-${f} lang-${f}`:``},e.text));case $.codeInline:return r(`code`,{key:n.key},e.text);case $.footnoteReference:return r(`a`,{key:n.key,href:i(e.target,`a`,`href`)||void 0},r(`sup`,null,e.text));case $.gfmTask:return r(`input`,{checked:e.completed,key:n.key,readOnly:!0,type:`checkbox`});case $.heading:return r(`h${e.level}`,{id:e.id,key:n.key},t(e.children,n));case $.htmlBlock:{let f=e;if(s.tagfilter&&E6(f.tag))return r(`span`,{key:n.key},`<`+f.tag+C6(f.attrs)+`>`);if(f.a&&f.d){let r=f.tag.toLowerCase(),p=age(r),m=f.children&&f.children.length>0;if(p){let t=Xhe(f.a,r,s.tagfilter);return/<[a-z][^>]{0,100}>/i.test(f.a)?c(e.tag,{key:n.key,...n6(e.attrs),dangerouslySetInnerHTML:{__html:t}}):c(e.tag,{key:n.key,...n6(e.attrs)},t)}let h=RegExp(`^<${f.tag}(\\s|>)`,`i`);if(m&&!h.test(f.a)&&s.tagfilter&&tge(f.a))return c(e.tag,{key:n.key,...n6(e.attrs)},t(f.children,n));if(oge(f.a)){let t=s.tagfilter?D6(f.a):f.a;return c(e.tag,{key:n.key,...n6(e.attrs),dangerouslySetInnerHTML:{__html:t}})}let g={slugify:e=>a(e,l6),sanitizer:i,tagfilter:!0},_=f.a.replace(/>\s+</g,`><`).replace(/\n+/g,` `).trim();if(RegExp(`^<${f.tag}(\\s[^>]*)?>(\\s*</${f.tag}>)?$`,`i`).test(_))return f.children&&f.children.length>0?c(e.tag,{key:n.key,...n6(e.attrs)},t(f.children,n)):c(e.tag,{key:n.key,...n6(e.attrs)});let v=D8(_,{inline:!1,refs:o,inHTML:!1},g);S6(v);let y=f.tag.toLowerCase(),x=`</`+y+`>`,S=h.test(_),C=_.toLowerCase().trimEnd().endsWith(x),w=S&&C;if(w&&m)return c(e.tag,{key:n.key,...n6(e.attrs)},t(f.children,n));if(w)return t(v.flatMap(x6),n);var l=Yhe(v,y);if(l.found&&l.afterClose.length>0){var u=l.beforeClose.flatMap(x6),d=l.afterClose.flatMap(x6);return k8(b.Fragment,{children:[c(e.tag,{key:n.key,...n6(e.attrs)},t(u,n)),t(d,n)]},n.key)}return c(e.tag,{key:n.key,...n6(e.attrs)},t(v.flatMap(x6),n))}return f6(e.tag)?c(e.tag,{key:n.key,...n6(e.attrs)}):c(e.tag,{key:n.key,...n6(e.attrs)},e.children?t(e.children,n):``)}case $.htmlSelfClosing:{let t=e;return s.tagfilter&&E6(t.tag)?r(`span`,{key:n.key},`<`+t.tag+C6(t.attrs)+` />`):c(e.tag,{key:n.key,...n6(e.attrs)})}case $.image:{let t=e.target==null?null:i(e.target,`img`,`src`);return r(`img`,{key:n.key,alt:e.alt&&e.alt.length>0?e.alt:void 0,title:e.title||void 0,src:t||void 0})}case $.link:{let i={key:n.key};return e.target!=null&&(i.href=Qhe(e.target)),e.title&&(i.title=e.title),r(`a`,i,t(e.children,n))}case $.table:{let i=e;return r(`table`,{key:n.key},r(`thead`,{key:`thead`},r(`tr`,null,i.header.map(function(e,a){return r(`th`,{key:a,style:i.align[a]==null?{}:{textAlign:i.align[a]}},t(e,n))}))),i.cells.length>0&&r(`tbody`,{key:`tbody`},i.cells.map(function(e,a){return r(`tr`,{key:a},e.map(function(e,a){return r(`td`,{key:a,style:i.align[a]==null?{}:{textAlign:i.align[a]}},t(e,n))}))})))}case $.text:return e.text;case $.textFormatted:return r(e.tag,{key:n.key},t(e.children,n));case $.orderedList:case $.unorderedList:return r(e.type===$.orderedList?`ol`:`ul`,{key:n.key,start:e.type===$.orderedList?e.start:void 0},e.items.map(function(e,i){return r(`li`,{key:i},t(e,n))}));case $.paragraph:return r(`p`,{key:n.key},t(e.children,n));case $.ref:return null;default:return null}}var Pge=(e,t,n,r,i,a,o)=>{var s=e=>e.map(function(e){return`text`in e?e.text:``}),c=(l,u={})=>{var d=(u.renderDepth||0)+1;if(d>2500)return s(l);u.renderDepth=d;for(var f=u.key,p=[],m=!1,h=0;h<l.length;h++){u.key=h;var g=e?e(A8.bind(null,l[h],c,u,t,n,r,i,a,o),l[h],c,u):A8(l[h],c,u,t,n,r,i,a,o),_=typeof g==`string`;if(_&&m)p[p.length-1]+=g;else if(g!==null)if(Array.isArray(g))for(var v=0;v<g.length;v++)p.push(g[v]);else p.push(g);m=_}return u.key=f,u.renderDepth=d-1,p};return c},Fge=(e,t)=>{let n=w6(t,e,void 0);return n?typeof n==`function`||typeof n==`object`&&`render`in n?n:w6(t,`${e}.component`,e):e};function Ige(e,t){let n={...t||{}};n.overrides=n.overrides||{};let r=n.slugify||l6,i=n.sanitizer||a6,a=n.createElement,o=b6(n.overrides),s=e=>j8(e,{...n,wrapper:null});function c(e){for(var t in e){var n=e[t];if(typeof n==`string`&&n.length>0&&n.charCodeAt(0)===S3&&(nge.test(n)||rge.test(n)||Mge(n,0))){var r=s(n.trim());e[t]=t===`innerHTML`&&Array.isArray(r)?r[0]:r}}}function l(e,t,...r){var i=t||{},s=e;if(o){var c=w6(n.overrides,e+`.props`,{});s=Fge(e,n.overrides),i={...i,...c,className:$he(i.className,c.className)||void 0}}if(!a){var l=i.key;return l!=null&&delete i.key,r.length===1?i.children=r[0]:r.length>1&&(i.children=r),k8(s,i,l)}return a(s,i,...r)}function u(e,t,...n){return t&&c(t),l(e,t,...n)}let d={...n,slugify:n.slugify?e=>n.slugify(e,l6):l6,sanitizer:i,tagfilter:n.tagfilter!==!1},f=e[0]&&e[0].type===$.refCollection?e[0].refs:{},p=Pge(n.renderRule,l,i,r,f,n,u),m=p(e,{inline:n.forceInline,refs:f}),h=Zhe(f);if(h.length&&m.push(l(`footer`,{key:`footer`},h.map(function(e){let t=e.identifier.charCodeAt(0)===p3?e.identifier.slice(1):e.identifier,n=D8(e.footnote,{inline:!0,refs:f},d);return l(`div`,{id:r(t,l6),key:e.identifier},t+`: `,p(n,{inline:!0,refs:f}))}))),n.wrapper===null)return m;let g=n.wrapper||(n.forceInline?`span`:`div`),_;if(m.length>1||n.forceWrapper)_=m;else return m.length===1?m[0]:null;var v=n.wrapperProps?{...n.wrapperProps}:{};return v.children=_,k8(g,v,`outer`)}function j8(e=``,t={}){let n={...t||{}};n.overrides=n.overrides||{},n.slugify;let r=n.sanitizer||a6;function i(e){let t=n.forceInline||!n.forceBlock&&!zhe.test(e),i={...n,slugify:n.slugify?e=>n.slugify(e,l6):l6,sanitizer:r,tagfilter:n.tagfilter!==!1},o=t?e:Jhe(e);if(n.optimizeForStreaming){var s=o.lastIndexOf(`<`);s!==-1&&o.indexOf(`>`,s)===-1&&(o=o.slice(0,s))}return Ige(D8(o,{inline:t,refs:a},i),{...i,forceInline:t})}let a={};return i(e)}function Lge(e){let t=b.useRef(e),n=t.current;if(n!==e){var r=!0,i=0;for(var a in e)if(i++,!Object.is(n[a],e[a])){r=!1;break}if(r){var o=0;for(var s in n)o++;r=o===i}r||(t.current=e)}return t.current}var M8=({children:e,options:t,...n})=>{if(!(typeof b.useContext<`u`)){let r={...t,overrides:{...t?.overrides},wrapperProps:{...t?.wrapperProps,...n}};return j8(e??``,r)}let r=b.useContext(Nge),i=Lge(n),a=b.useMemo(()=>({...r,...t,overrides:{...r?.overrides,...t?.overrides},wrapperProps:{...r?.wrapperProps,...t?.wrapperProps,...i}}),[r,t,i]),o=e??``;return b.useMemo(()=>j8(o,a),[o,a])},N8=Symbol(`remove-this-key`),P8=Symbol(`reset`);function Rge(e,t){return Array.isArray(e.required)&&e.required.includes(t)}function zge(e,t){switch(t){case`array`:return[];case`boolean`:return!1;case`null`:return null;case`number`:return 0;case`object`:return{};default:return e(V4.NewStringDefault)}}function Bge(e){let{fieldPathId:t,schema:n,registry:r,uiSchema:i,errorSchema:a,formData:o,onChange:s,onBlur:c,onFocus:l,disabled:u,readonly:d,required:f,hideError:p,propertyName:m,handleKeyRename:h,handleRemoveProperty:g,addedByAdditionalProperties:_}=e,[v,y]=(0,b.useState)(!1),{globalFormOptions:x,fields:S}=r,{SchemaField:C}=S,w=R4(I4(m,x,t.path)),T=(0,b.useCallback)((e,t,n,r)=>{let i=e;e===void 0&&_&&(i=``),s(i,t,n,r)},[s,_]),E=(0,b.useCallback)(e=>{m!==e&&y(!0),h(m,e)},[m,h]);return(0,H.jsx)(C,{name:m,required:f,schema:n,uiSchema:i,errorSchema:a,fieldPathId:w,formData:o,wasPropertyKeyModified:v,onKeyRename:E,onKeyRenameBlur:(0,b.useCallback)(e=>{let{target:{value:t}}=e;E(t)},[E]),onRemoveProperty:(0,b.useCallback)(()=>{g(m)},[m,g]),onChange:T,onBlur:c,onFocus:l,registry:r,disabled:u,readonly:d,hideError:p})}var Vge=(0,b.memo)(Bge);function Hge(e){let{schema:t,uiSchema:n={},formData:r,errorSchema:i,fieldPathId:a,name:o,required:s=!1,disabled:c,readonly:l,hideError:u,onBlur:d,onFocus:f,onChange:p,registry:m,title:h}=e,{fields:g,schemaUtils:_,translateString:v,globalUiOptions:y}=m,{OptionalDataControlsField:x}=g,S=(0,b.useRef)(r);S.current=r;let C=(0,b.useMemo)(()=>_.retrieveSchema(t,r,!0),[_,t,r]),w=(0,b.useMemo)(()=>J1(n,y),[n,y]),{properties:T={}}=C,E=e.childFieldPathId??a,D=(0,b.useRef)({previousKey:``,currentKey:void 0}),O=w.title??C.title??h??o,k=w.description??C.description,A=N4(m,C,s,n),j=w4(r),M=[],N=(0,b.useCallback)((e,t)=>{let{duplicateKeySuffixSeparator:r=`-`}=J1(n,y),i=0,a=e;for(;BE(t,a);)i+=1,a=`${e}${r}${i}`;return a},[n,y]),P=(0,b.useCallback)(()=>{if(!(C.additionalProperties||C.patternProperties))return;let e={...r},t=N(`newKey`,e);if(C.patternProperties)dD(e,t,null);else{let n,i,a;if(ZC(C.additionalProperties)){n=C.additionalProperties.type,i=C.additionalProperties.const,a=C.additionalProperties.default;let e=C.additionalProperties;`$ref`in e&&(e=_.retrieveSchema({[z1]:e[z1]},r),n=e.type,i=e.const,a=_.getDefaultFormState(e,a)),!n&&(`anyOf`in e||`oneOf`in e)&&(n=`object`)}dD(e,t,i??a??zge(v,n))}D.current.previousKey===t&&(D.current.currentKey=t,D.current.previousKey=N(t,e)),p(e,E.path)},[r,p,v,_,E,N,C]),F=(0,b.useCallback)((e,t)=>{if(e!==t){let n=S.current,r=N(t,n),i={...n},a={[e]:r},o=Object.keys(i).map(e=>({[Object.hasOwn(a,e)?a[e]:e]:i[e]})),s=Object.assign({},...o);S.current=s,e!==D.current.currentKey&&(D.current.previousKey=e),D.current.currentKey=r,p(s,E.path)}},[p,E,N]),I=(0,b.useCallback)(e=>{p(N8,[...E.path,e])},[p,E]),L=(0,b.useCallback)(e=>D.current.currentKey===e?D.current.previousKey:e,[]);if(!A||j)try{M=Pme(Object.keys(T),w.order)}catch(e){return(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`p`,{className:`rjsf-config-error`,style:{color:`red`},children:(0,H.jsx)(M8,{options:{disableParsingRawHTML:!0},children:v(V4.InvalidObjectField,[o||`root`,e.message])})}),(0,H.jsx)(`pre`,{children:JSON.stringify(C)})]})}let ee=o4(`ObjectFieldTemplate`,m,w),te=A?(0,H.jsx)(x,{...e,fieldPathId:E,schema:C}):void 0;return(0,H.jsx)(ee,{title:w.label===!1?``:O,description:w.label===!1?void 0:k,properties:M.map(e=>{let t=!!C.properties?.[e]?.[D1],a=t?n.additionalProperties:n[e],o=J1(a).widget===`hidden`;return{content:(0,H.jsx)(Vge,{propertyName:e,required:Rge(C,e),schema:X(C,[I1,e],{}),uiSchema:a,errorSchema:X(i,[e]),fieldPathId:E,formData:X(r,[e]),handleKeyRename:F,handleRemoveProperty:I,addedByAdditionalProperties:t,onChange:p,onBlur:d,onFocus:f,registry:m,disabled:c,readonly:l,hideError:u},L(e)),name:e,readonly:l,disabled:c,required:s,hidden:o}}),readonly:l,disabled:c,required:s,fieldPathId:a,uiSchema:n,errorSchema:i,schema:C,formData:r,registry:m,optionalDataControl:te,className:A?`rjsf-optional-object-field`:void 0,onAddProperty:P})}function Uge(e){let{schema:t,uiSchema:n={},formData:r,disabled:i=!1,readonly:a=!1,onChange:o,errorSchema:s,fieldPathId:c,registry:l}=e,{globalUiOptions:u={},schemaUtils:d,translateString:f}=l,p=o4(`OptionalDataControlsTemplate`,l,J1(n,u)),m=w4(r),h,g,_,v;return i||a?(h=C4(c,`Msg`),g=m?void 0:f(V4.OptionalObjectEmptyMsg)):(g=f(m?V4.OptionalObjectRemove:V4.OptionalObjectAdd),m?(h=C4(c,`Remove`),v=()=>o(void 0,c.path,s)):(h=C4(c,`Add`),_=()=>{let e=d.getDefaultFormState(t,r,`excludeObjectChildren`);e===void 0&&(e=b0(t)===`array`?[]:{}),o(e,c.path,s)})),g&&(0,H.jsx)(p,{id:h,registry:l,schema:t,uiSchema:n,label:g,onAddClick:_,onRemoveClick:v})}var Wge={array:`ArrayField`,boolean:`BooleanField`,integer:`NumberField`,number:`NumberField`,object:`ObjectField`,string:`StringField`,null:`NullField`};function Gge(e,t,n){let{field:r}=t,{fields:i,schemaUtils:a}=n;if(typeof r==`function`)return r;if(typeof r==`string`&&r in i)return i[r];let o=b0(e),s=Array.isArray(o)?o[0]:o||``,c=e.$id,l=Wge[s];return c&&c in i&&(l=c),(e.anyOf||e.oneOf)&&!a.isSelect(e)&&l!==`ObjectField`?()=>null:l in i?i[l]:i.FallbackField}function Kge(e){let{schema:t,fieldPathId:n,uiSchema:r,formData:i,errorSchema:a,name:o,onChange:s,onKeyRename:c,onKeyRenameBlur:l,onRemoveProperty:u,required:d=!1,registry:f,wasPropertyKeyModified:p=!1}=e,{schemaUtils:m,globalFormOptions:h,globalUiOptions:g,fields:_}=f,{AnyOfField:v,OneOfField:y,CyclicSchemaField:x}=_,S=n.$id,C=(0,b.useCallback)((e,t,n,r)=>s(e,t,n,r||S),[S,s]);if(t[V1])return(0,H.jsx)(x,{...e});let w=Fme(t,r,f),T=J1(w,g),E=o4(`FieldTemplate`,f,T),D=o4(`DescriptionFieldTemplate`,f,T),O=o4(`FieldHelpTemplate`,f,T),k=o4(`FieldErrorTemplate`,f,T),A=m.retrieveSchema(t,i),j=Gge(A,T,f),M=A.deprecated?T.deprecatedHandling??`label`:void 0,N=!!(T.disabled??e.disabled)||M===`disable`,P=!!(T.readonly??(e.readonly||e.schema.readOnly||A.readOnly)),F=T.hideError,I=F===void 0?e.hideError:!!F,L=!!(T.autofocus??e.autofocus);if(Object.keys(A).length===0)return null;let ee=m.getDisplayLabel(A,w,g),te=T.field&&T.fieldReplacesAnyOrOneOf===!0,ne,R,z={fieldPathId:n};if((`anyOf`in A||`oneOf`in A)&&!te&&!m.isSelect(A)){A.anyOf?(ne=v,R=A[k1].map(e=>m.retrieveSchema(ZC(e)?e:{},i))):A.oneOf&&(ne=y,R=A[F1].map(e=>m.retrieveSchema(ZC(e)?e:{},i)));let e=N4(f,A,d,w),t=w4(i);ee&&=!e||t,z={childFieldPathId:n,fieldPathId:I4(`XxxOf`,h,n)}}let{__errors:B,...re}=a||{},ie=sD(w,[`ui:classNames`,`classNames`,`ui:style`]);`ui:options`in ie&&(ie[K1]=sD(ie[K1],[`classNames`,`style`]));let ae=(0,H.jsx)(j,{...e,onChange:C,...z,schema:A,uiSchema:ie,disabled:N,readonly:P,hideError:I,autofocus:L,errorSchema:re,rawErrors:B}),oe=n.$id,se;se=p||D1 in A?o:T.title||e.schema.title||A.title||e.title||o,M===`label`&&(se=f.translateString(V4.DeprecatedLabel,[se]));let ce=T.description||e.schema.description||A.description||``,{help:le}=T,ue=T.widget===`hidden`||M===`hide`,de=[`rjsf-field`,`rjsf-field-${b0(A)}`];!I&&B&&B.length>0&&de.push(`rjsf-field-error`),T.classNames&&de.push(T.classNames);let fe=(0,H.jsx)(O,{help:le,fieldPathId:n,schema:A,uiSchema:w,hasErrors:!I&&B&&B.length>0,registry:f}),pe=I||ne&&!m.isSelect(A)?void 0:(0,H.jsx)(k,{errors:B,errorSchema:a,fieldPathId:n,schema:A,uiSchema:w,registry:f});return(0,H.jsx)(E,{description:(0,H.jsx)(D,{id:h4(oe),description:ce,schema:A,uiSchema:w,registry:f}),rawDescription:ce,help:fe,rawHelp:typeof le==`string`?le:void 0,errors:pe,rawErrors:I?void 0:B,fieldPathId:n,id:oe,label:se,hidden:ue,onChange:s,onKeyRename:c,onKeyRenameBlur:l,onRemoveProperty:u,required:d,disabled:N,readonly:P,hideError:I,displayLabel:ee,classNames:de.join(` `).trim(),style:T.style,formData:i,schema:A,uiSchema:w,registry:f,children:(0,H.jsxs)(H.Fragment,{children:[ae,ne&&(0,H.jsx)(ne,{name:o,disabled:N,readonly:P,hideError:I,errorSchema:a,formData:i,fieldPathId:n,onBlur:e.onBlur,onChange:e.onChange,onFocus:e.onFocus,options:R,registry:f,required:d,schema:A,uiSchema:w})]})})}var qge=(0,b.memo)(Kge,(e,t)=>{let{experimental_componentUpdateStrategy:n=`customDeep`}=t.registry.globalFormOptions;return n===`always`?!1:n===`shallow`?j4(e,t):l0(e,t)});function Jge(e){let{schema:t,name:n,uiSchema:r,fieldPathId:i,formData:a,required:o,disabled:s=!1,readonly:c=!1,autofocus:l=!1,onChange:u,onBlur:d,onFocus:f,registry:p,rawErrors:m,hideError:h,title:g}=e,{title:_,format:v}=t,{widgets:y,schemaUtils:x,globalUiOptions:S}=p,C=x.isSelect(t)?w2(t,r):void 0,w=C?`select`:`text`;v&&jme(t,v,y)&&(w=v);let{widget:T=w,placeholder:E=``,title:D,...O}=J1(r),k=x.getDisplayLabel(t,r,S),A=D??g??_??n,j=u4(t,T,y),M=(0,b.useCallback)((e,t,n)=>u(e,i.path,t,n),[u,i]);return(0,H.jsx)(j,{options:{...O,enumOptions:C},schema:t,uiSchema:r,id:i.$id,name:n,label:A,hideLabel:!k,hideError:h,value:a,onChange:M,onBlur:d,onFocus:f,required:o,disabled:s,readonly:c,autofocus:l,registry:p,placeholder:E,rawErrors:m,htmlName:i.name})}function Yge(){return{AnyOfField:a3,ArrayField:ihe,BooleanField:ahe,CyclicSchemaField:ohe,FallbackField:uhe,LayoutGridField:n3,LayoutHeaderField:Che,LayoutMultiSchemaField:whe,NumberField:Ohe,ObjectField:Hge,OneOfField:a3,OptionalDataControlsField:Uge,SchemaField:qge,StringField:Jge,NullField:The}}function Xge(e){let{fieldPathId:t,description:n,registry:r,schema:i,uiSchema:a}=e,o=J1(a,r.globalUiOptions),{label:s=!0}=o;return!n||!s?null:(0,H.jsx)(o4(`DescriptionFieldTemplate`,r,o),{id:h4(t),description:n,schema:i,uiSchema:a,registry:r})}function Zge(e){let{disabled:t,hasCopy:n,hasMoveDown:r,hasMoveUp:i,hasRemove:a,fieldPathId:o,onCopyItem:s,onRemoveItem:c,onMoveDownItem:l,onMoveUpItem:u,readonly:d,registry:f,uiSchema:p}=e,{CopyButton:m,MoveDownButton:h,MoveUpButton:g,RemoveButton:_}=f.templates.ButtonTemplates;return(0,H.jsxs)(H.Fragment,{children:[(i||r)&&(0,H.jsx)(g,{id:S4(o,`moveUp`),className:`rjsf-array-item-move-up`,disabled:t||d||!i,onClick:u,uiSchema:p,registry:f}),(i||r)&&(0,H.jsx)(h,{id:S4(o,`moveDown`),className:`rjsf-array-item-move-down`,disabled:t||d||!r,onClick:l,uiSchema:p,registry:f}),n&&(0,H.jsx)(m,{id:S4(o,`copy`),className:`rjsf-array-item-copy`,disabled:t||d,onClick:s,uiSchema:p,registry:f}),a&&(0,H.jsx)(_,{id:S4(o,`remove`),className:`rjsf-array-item-remove`,disabled:t||d,onClick:c,uiSchema:p,registry:f})]})}function Qge(e){let{children:t,className:n,buttonsProps:r,displayLabel:i,hasDescription:a,hasToolbar:o,registry:s,uiSchema:c}=e,l=o4(`ArrayFieldItemButtonsTemplate`,s,J1(c)),u={flex:1,paddingLeft:6,paddingRight:6,fontWeight:`bold`},d=a?31:9,f={display:`flex`,alignItems:i?`center`:`baseline`},p={display:`flex`,justifyContent:`flex-end`,marginTop:i?`${d}px`:0};return(0,H.jsxs)(`div`,{className:n,style:f,children:[(0,H.jsx)(`div`,{className:o?`col-xs-9 col-md-10 col-xl-11`:`col-xs-12`,children:t}),o&&(0,H.jsx)(`div`,{className:`col-xs-3 col-md-2 col-xl-1 array-item-toolbox`,children:(0,H.jsx)(`div`,{className:`btn-group`,style:p,children:(0,H.jsx)(l,{...r,style:u})})})]})}function $ge(e){let{canAdd:t,className:n,disabled:r,fieldPathId:i,uiSchema:a,items:o,optionalDataControl:s,onAddClick:c,readonly:l,registry:u,required:d,schema:f,title:p}=e,m=J1(a),h=o4(`ArrayFieldDescriptionTemplate`,u,m),g=o4(`ArrayFieldTitleTemplate`,u,m),_=!l&&!r,{ButtonTemplates:{AddButton:v}}=u.templates;return(0,H.jsxs)(`fieldset`,{className:n,id:i.$id,children:[(0,H.jsx)(g,{fieldPathId:i,title:m.title||p,required:d,schema:f,uiSchema:a,registry:u,optionalDataControl:_?s:void 0}),(0,H.jsx)(h,{fieldPathId:i,description:m.description||f.description,schema:f,uiSchema:a,registry:u}),_?void 0:s,(0,H.jsx)(`div`,{className:`row array-item-list`,children:o}),t&&(0,H.jsx)(v,{id:S4(i,`add`),className:`rjsf-array-item-add`,onClick:c,disabled:r||l,uiSchema:a,registry:u})]})}function e_e(e){let{fieldPathId:t,title:n,schema:r,uiSchema:i,required:a,registry:o,optionalDataControl:s}=e,c=J1(i,o.globalUiOptions),{label:l=!0}=c;return!n||!l?null:(0,H.jsx)(o4(`TitleFieldTemplate`,o,c),{id:y4(t),title:n,required:a,schema:r,uiSchema:i,registry:o,optionalDataControl:s})}function F8(e){let{id:t,schema:n}=e,{examples:r,default:i}=n;return Array.isArray(r)?(0,H.jsx)(`datalist`,{id:_4(t),children:r.concat(i!==void 0&&!r.map(String).includes(String(i))?[i]:[]).map(e=>(0,H.jsx)(`option`,{value:e},String(e)))},`datalist_${t}`):null}function t_e(e){let{id:t,name:n,htmlName:r,value:i,readonly:a,disabled:o,autofocus:s,onBlur:c,onFocus:l,onChange:u,onChangeOverride:d,options:f,schema:p,uiSchema:m,registry:h,rawErrors:g,type:_,hideLabel:v,hideError:y,...x}=e,{ClearButton:S}=h.templates.ButtonTemplates;if(!t)throw console.log(`No id for`,e),Error(`no id for props ${JSON.stringify(e)}`);let C={...x,...n4(p,_,f)},w;w=C.type===`number`||C.type===`integer`?i||i===0?i:``:i??``;let T=(0,b.useCallback)(({target:{value:e}})=>u(e===``?f.emptyValue:e),[u,f]),E=(0,b.useCallback)(({target:e})=>c(t,e?.value),[c,t]),D=(0,b.useCallback)(({target:e})=>l(t,e?.value),[l,t]),O=(0,b.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),u(f.emptyValue??``)},[u,f.emptyValue]);return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`input`,{id:t,name:r||t,className:`form-control`,readOnly:a,disabled:o,autoFocus:s,value:w,...C,list:p.examples?_4(t):void 0,onChange:d||T,onBlur:E,onFocus:D,"aria-describedby":b4(t,!!p.examples)}),f.allowClearTextInputs&&!a&&!o&&w&&(0,H.jsx)(S,{registry:h,onClick:O}),(0,H.jsx)(F8,{id:t,schema:p})]})}function n_e(e){let{iconType:t=`default`,icon:n,className:r,uiSchema:i,registry:a,...o}=e;return(0,H.jsx)(`button`,{type:`button`,className:`btn btn-${t} ${r}`,...o,children:(0,H.jsx)(`i`,{className:`glyphicon glyphicon-${n}`})})}var I8=(0,b.memo)(n_e);function r_e(e){let{registry:{translateString:t}}=e;return(0,H.jsx)(I8,{title:t(V4.CopyButton),...e,icon:`copy`})}var i_e=(0,b.memo)(r_e);function a_e(e){let{registry:{translateString:t}}=e;return(0,H.jsx)(I8,{title:t(V4.MoveDownButton),...e,icon:`arrow-down`})}var o_e=(0,b.memo)(a_e);function s_e(e){let{registry:{translateString:t}}=e;return(0,H.jsx)(I8,{title:t(V4.MoveUpButton),...e,icon:`arrow-up`})}var c_e=(0,b.memo)(s_e);function l_e(e){let{registry:{translateString:t}}=e;return(0,H.jsx)(I8,{title:t(V4.RemoveButton),...e,iconType:`danger`,icon:`remove`})}var u_e=(0,b.memo)(l_e);function d_e({id:e,className:t,onClick:n,disabled:r,registry:i,...a}){let{translateString:o}=i;return(0,H.jsx)(I8,{id:e,iconType:`default`,icon:`remove`,className:`btn-clear col-xs-12`,title:o(V4.ClearButton),onClick:n,disabled:r,registry:i,...a})}var f_e=(0,b.memo)(d_e);function p_e({id:e,className:t,onClick:n,disabled:r,registry:i}){let{translateString:a}=i;return(0,H.jsx)(`div`,{className:`row`,children:(0,H.jsx)(`p`,{className:`col-xs-4 col-sm-2 col-lg-1 col-xs-offset-8 col-sm-offset-10 col-lg-offset-11 text-right ${t}`,children:(0,H.jsx)(I8,{id:e,iconType:`info`,icon:`plus`,className:`btn-add col-xs-12`,title:a(V4.AddButton),onClick:n,disabled:r,registry:i})})})}function m_e({uiSchema:e}){let{submitText:t,norender:n,props:r={}}=a4(e);return n?null:(0,H.jsx)(`div`,{children:(0,H.jsx)(`button`,{type:`submit`,...r,className:`btn btn-info ${r.className||``}`,children:t})})}function h_e(){return{SubmitButton:m_e,AddButton:p_e,CopyButton:i_e,MoveDownButton:o_e,MoveUpButton:c_e,RemoveButton:u_e,ClearButton:f_e}}function g_e(e){let{name:t,fieldPathId:n,registry:r,onExpand:i}=e,{translateString:a}=r,o=`${n.$id}-button`;return(0,H.jsxs)(`div`,{style:{marginTop:`1rem`},children:[(0,H.jsx)(`div`,{className:`text-danger`,children:a(V4.CycleDetected,[t])}),(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`button`,{id:o,type:`button`,className:`btn btn-sm btn-warning`,onClick:()=>i(n.$id),children:a(V4.ExpandButton)}),` `]})]})}var L8=s4();function R8({description:e,registry:t,uiSchema:n={}}){let{globalUiOptions:r}=t;return J1(n,r).enableMarkdownInDescription&&typeof e==`string`?(0,H.jsx)(M8,{options:{disableParsingRawHTML:!0},"data-testid":L8.markdown,children:e}):e}R8.TEST_IDS=L8;function __e(e){let{id:t,description:n,registry:r,uiSchema:i}=e;return n?(0,H.jsx)(`div`,{id:t,className:`field-description`,children:(0,H.jsx)(R8,{description:n,registry:r,uiSchema:i})}):null}function v_e({errors:e,registry:t}){let{translateString:n}=t;return(0,H.jsxs)(`div`,{className:`panel panel-danger errors`,children:[(0,H.jsx)(`div`,{className:`panel-heading`,children:(0,H.jsx)(`h3`,{className:`panel-title`,children:n(V4.ErrorsLabel)})}),(0,H.jsx)(`ul`,{className:`list-group`,children:e.map((e,t)=>(0,H.jsx)(`li`,{className:`list-group-item text-danger`,children:e.stack},t))})]})}function y_e(e){let{schema:t,registry:n,typeSelector:r,schemaField:i}=e;return(0,H.jsx)(o4(`MultiSchemaFieldTemplate`,n),{selector:r,optionSchemaField:i,schema:t,registry:n})}function b_e(e){let{errors:t=[],fieldPathId:n}=e;return t.length===0?null:(0,H.jsx)(`div`,{children:(0,H.jsx)(`ul`,{id:g4(n),className:`error-detail bs-callout bs-callout-info`,children:t.filter(e=>!!e).map((e,t)=>(0,H.jsx)(`li`,{className:`text-danger`,children:e},t))})})}var z8=s4();function B8({help:e,registry:t,uiSchema:n={}}){let{globalUiOptions:r}=t;return J1(n,r).enableMarkdownInHelp&&typeof e==`string`?(0,H.jsx)(M8,{options:{disableParsingRawHTML:!0},"data-testid":z8.markdown,children:e}):e}B8.TEST_IDS=z8;function x_e(e){let{fieldPathId:t,help:n,uiSchema:r,registry:i}=e;return n?(0,H.jsx)(`div`,{id:v4(t),className:`help-block`,children:(0,H.jsx)(B8,{help:n,registry:i,uiSchema:r})}):null}var S_e=`*`;function V8(e){let{label:t,required:n,id:r}=e;return t?(0,H.jsxs)(`label`,{className:`control-label`,htmlFor:r,children:[t,n&&(0,H.jsx)(`span`,{className:`required`,children:S_e})]}):null}function C_e(e){let{id:t,label:n,children:r,errors:i,help:a,description:o,hidden:s,required:c,displayLabel:l,registry:u,uiSchema:d}=e,f=J1(d),p=o4(`WrapIfAdditionalTemplate`,u,f);if(s)return(0,H.jsx)(`div`,{className:`hidden`,children:r});let m=f.widget===`checkbox`;return(0,H.jsxs)(p,{...e,children:[l&&!m&&(0,H.jsx)(V8,{label:n,required:c,id:t}),l&&o?o:null,r,i,a]})}var w_e=C_e;function T_e(e){let{children:t,column:n,className:r,...i}=e;return(0,H.jsx)(`div`,{className:r,...i,children:t})}function E_e(e){let{selector:t,optionSchemaField:n}=e;return(0,H.jsxs)(`div`,{className:`panel panel-default panel-body`,children:[(0,H.jsx)(`div`,{className:`form-group`,children:t}),n]})}function D_e(e){let{className:t,description:n,disabled:r,formData:i,fieldPathId:a,onAddProperty:o,optionalDataControl:s,properties:c,readonly:l,registry:u,required:d,schema:f,title:p,uiSchema:m}=e,h=J1(m),g=o4(`TitleFieldTemplate`,u,h),_=o4(`DescriptionFieldTemplate`,u,h);if((f.oneOf||f.anyOf)&&!f.properties&&c.length===0)return null;let v=!l&&!r,{ButtonTemplates:{AddButton:y}}=u.templates;return(0,H.jsxs)(`fieldset`,{className:t,id:a.$id,children:[p&&(0,H.jsx)(g,{id:y4(a),title:p,required:d,schema:f,uiSchema:m,registry:u,optionalDataControl:v?s:void 0}),n&&(0,H.jsx)(_,{id:h4(a),description:n,schema:f,uiSchema:m,registry:u}),v?void 0:s,c.map(e=>e.content),Y1(f,m,i)&&(0,H.jsx)(y,{id:S4(a,`add`),className:`rjsf-object-property-expand`,onClick:o,disabled:r||l,uiSchema:m,registry:u})]})}function O_e(e){let{id:t,registry:n,label:r,onAddClick:i,onRemoveClick:a}=e;return i?(0,H.jsx)(I8,{id:t,registry:n,icon:`plus`,className:`rjsf-add-optional-data btn-sm`,onClick:i,title:r}):a?(0,H.jsx)(I8,{id:t,registry:n,icon:`remove`,className:`rjsf-remove-optional-data btn-sm`,onClick:a,title:r}):(0,H.jsx)(`em`,{id:t,children:r})}var k_e=`*`;function A_e(e){let{id:t,title:n,required:r,optionalDataControl:i}=e;return(0,H.jsxs)(`legend`,{id:t,children:[n,r&&(0,H.jsx)(`span`,{className:`required`,children:k_e}),i&&(0,H.jsx)(`span`,{className:`pull-right`,style:{marginBottom:`2px`},children:i})]})}function j_e(e){let{schema:t,fieldPathId:n,reason:r,registry:i}=e,{translateString:a}=i,o=V4.UnsupportedField,s=[];return n?.$id&&(o=V4.UnsupportedFieldWithId,s.push(n.$id)),r&&(o=o===V4.UnsupportedField?V4.UnsupportedFieldWithReason:V4.UnsupportedFieldWithIdAndReason,s.push(r)),(0,H.jsxs)(`div`,{className:`unsupported-field`,children:[(0,H.jsx)(`p`,{children:(0,H.jsx)(M8,{options:{disableParsingRawHTML:!0},children:a(o,s)})}),t&&(0,H.jsx)(`pre`,{children:JSON.stringify(t,null,2)})]})}function M_e(e){let{id:t,classNames:n,style:r,disabled:i,displayLabel:a,label:o,onKeyRenameBlur:s,onRemoveProperty:c,rawDescription:l,readonly:u,required:d,schema:f,hideError:p,rawErrors:m,children:h,uiSchema:g,registry:_}=e,{templates:v,translateString:y}=_,{RemoveButton:b}=v.ButtonTemplates,x=y(V4.KeyLabel,[o]),S=D1 in f,C=!!l,w=[`form-group`,n];!p&&m&&m.length>0&&w.push(`has-error has-danger`);let T=w.join(` `).trim();if(!S)return(0,H.jsx)(`div`,{className:T,style:r,children:h});let E=C?46:26;return(0,H.jsx)(`div`,{className:T,style:r,children:(0,H.jsxs)(`div`,{className:`row`,children:[(0,H.jsx)(`div`,{className:`col-xs-5 form-additional`,children:(0,H.jsxs)(`div`,{className:`form-group`,children:[a&&(0,H.jsx)(V8,{label:x,required:d,id:`${t}-key`}),a&&l&&(0,H.jsx)(`div`,{children:`\xA0`}),(0,H.jsx)(`input`,{className:`form-control`,type:`text`,id:`${t}-key`,onBlur:s,defaultValue:o},o)]})}),(0,H.jsx)(`div`,{className:`form-additional form-group col-xs-5`,children:h}),(0,H.jsx)(`div`,{className:`col-xs-2`,style:{marginTop:a?`${E}px`:void 0},children:(0,H.jsx)(b,{id:S4(t,`remove`),className:`rjsf-object-property-remove btn-block`,style:{border:`0`},disabled:i||u,onClick:c,uiSchema:g,registry:_})})]})})}function N_e(){return{ArrayFieldDescriptionTemplate:Xge,ArrayFieldItemTemplate:Qge,ArrayFieldItemButtonsTemplate:Zge,ArrayFieldTemplate:$ge,ArrayFieldTitleTemplate:e_e,ButtonTemplates:h_e(),BaseInputTemplate:t_e,CyclicSchemaExpandTemplate:g_e,DescriptionFieldTemplate:__e,ErrorListTemplate:v_e,FallbackFieldTemplate:y_e,FieldTemplate:w_e,FieldErrorTemplate:b_e,FieldHelpTemplate:x_e,GridTemplate:T_e,MultiSchemaFieldTemplate:E_e,ObjectFieldTemplate:D_e,OptionalDataControlsTemplate:O_e,TitleFieldTemplate:A_e,UnsupportedFieldTemplate:j_e,WrapIfAdditionalTemplate:M_e}}function P_e({time:e=!0,...t}){let{AltDateWidget:n}=t.registry.widgets;return(0,H.jsx)(n,{time:e,...t})}function F_e(e){let{disabled:t=!1,readonly:n=!1,autofocus:r=!1,options:i,id:a,name:o,registry:s,onBlur:c,onFocus:l}=e,{translateString:u}=s,{elements:d,handleChange:f,handleClear:p,handleSetNow:m}=Bme(e);return(0,H.jsxs)(`ul`,{className:`list-inline`,children:[d.map((e,i)=>(0,H.jsx)(`li`,{className:`list-inline-item`,children:(0,H.jsx)(zme,{rootId:a,name:o,select:f,...e,disabled:t,readonly:n,registry:s,onBlur:c,onFocus:l,autofocus:r&&i===0})},i)),(i.hideNowButton===`undefined`||!i.hideNowButton)&&(0,H.jsx)(`li`,{className:`list-inline-item`,children:(0,H.jsx)(`button`,{type:`button`,className:`btn btn-info btn-now`,onClick:m,children:u(V4.NowLabel)})}),(i.hideClearButton===`undefined`||!i.hideClearButton)&&(0,H.jsx)(`li`,{className:`list-inline-item`,children:(0,H.jsx)(`button`,{type:`button`,className:`btn btn-warning btn-clear`,onClick:p,children:u(V4.ClearLabel)})})]})}function I_e({id:e,disabled:t,options:n,value:r,autofocus:i=!1,readonly:a,onChange:o,onBlur:s,onFocus:c,htmlName:l}){let{inline:u=!1,enumOptions:d,enumDisabled:f,emptyValue:p}=n,m=r4(n),h=Array.isArray(r)?r:[r],g=(0,b.useCallback)(({target:t})=>s(e,Z2(t?.value,d,m,p)),[s,e,d,p,m]),_=(0,b.useCallback)(({target:t})=>c(e,Z2(t?.value,d,m,p)),[c,e,d,p,m]);return(0,H.jsx)(`div`,{className:`checkboxes`,id:e,children:Array.isArray(d)&&d.map((n,r)=>{let s=K2(n.value,h),c=Array.isArray(f)&&f.includes(n.value),p=t||c||a?`disabled`:``,v=(0,H.jsxs)(`span`,{children:[(0,H.jsx)(`input`,{type:`checkbox`,id:x4(e,r),name:l||e,checked:s,value:Q2(n.value,r,m),disabled:t||c||a,autoFocus:i&&r===0,onChange:e=>{e.target.checked?o(Y2(r,h,d)):o(G2(r,h,d))},onBlur:g,onFocus:_,"aria-describedby":b4(e)}),(0,H.jsx)(`span`,{children:n.label})]});return u?(0,H.jsx)(`label`,{className:`checkbox-inline ${p}`,children:v},String(n.value)):(0,H.jsx)(`div`,{className:`checkbox ${p}`,children:(0,H.jsx)(`label`,{children:v})},String(n.value))})})}function L_e({schema:e,uiSchema:t,options:n,id:r,value:i,disabled:a,readonly:o,label:s,hideLabel:c,autofocus:l=!1,onBlur:u,onFocus:d,onChange:f,registry:p,htmlName:m}){let h=o4(`DescriptionFieldTemplate`,p,n),g=k4(e),_=(0,b.useCallback)(e=>f(e.target.checked),[f]),v=(0,b.useCallback)(e=>u(r,e.target.checked),[u,r]),y=(0,b.useCallback)(e=>d(r,e.target.checked),[d,r]),x=J1(t).widget===`checkbox`?void 0:n.description??e.description;return(0,H.jsxs)(`div`,{className:`checkbox ${a||o?`disabled`:``}`,children:[!c&&x&&(0,H.jsx)(h,{id:h4(r),description:x,schema:e,uiSchema:t,registry:p}),(0,H.jsxs)(`label`,{children:[(0,H.jsx)(`input`,{type:`checkbox`,id:r,name:m||r,checked:i!==void 0&&i,required:g,disabled:a||o,autoFocus:l,onChange:_,onBlur:v,onFocus:y,"aria-describedby":b4(r)}),T4((0,H.jsx)(`span`,{children:s}),c)]})]})}function R_e(e){let{disabled:t,readonly:n,options:r,registry:i}=e;return(0,H.jsx)(o4(`BaseInputTemplate`,i,r),{type:`color`,...e,disabled:t||n})}function z_e(e){let{onChange:t,value:n,options:r,registry:i}=e;return(0,H.jsx)(o4(`BaseInputTemplate`,i,r),{type:`datetime-local`,...e,value:Kme(n),onChange:e=>t(Nme(e))})}function B_e(e){let{onChange:t,options:n,registry:r}=e,i=o4(`BaseInputTemplate`,r,n),a=(0,b.useCallback)(e=>t(e||void 0),[t]);return(0,H.jsx)(i,{type:`date`,...e,onChange:a})}function V_e(e){let{options:t,registry:n}=e;return(0,H.jsx)(o4(`BaseInputTemplate`,n,t),{type:`email`,...e})}function H_e({fileInfo:e,registry:t}){let{translateString:n}=t,{dataURL:r,type:i,name:a}=e;if(!r)return null;let o=n(V4.PreviewLabel);return[`image/jpeg`,`image/png`].includes(i)?(0,H.jsx)(`img`,{src:r,alt:o,style:{maxWidth:`100%`},className:`file-preview`}):(0,H.jsxs)(H.Fragment,{children:[` `,(0,H.jsx)(`a`,{download:`preview-${a}`,href:r,className:`file-download`,children:o})]})}function U_e({filesInfo:e,registry:t,preview:n,onRemove:r,options:i}){if(e.length===0)return null;let{translateString:a}=t,{RemoveButton:o}=o4(`ButtonTemplates`,t,i);return(0,H.jsx)(`ul`,{className:`file-info`,children:e.map((e,i)=>{let{name:s,size:c,type:l}=e;return(0,H.jsxs)(`li`,{children:[(0,H.jsx)(M8,{children:a(V4.FilesInfo,[s,l,String(c)])}),n&&(0,H.jsx)(H_e,{fileInfo:e,registry:t}),(0,H.jsx)(o,{onClick:()=>r(i),registry:t})]},i)})})}function W_e(e){let{disabled:t,readonly:n,required:r,multiple:i,onChange:a,value:o,options:s,registry:c}=e,{filesInfo:l,handleChange:u,handleRemove:d}=Gme(o,a,i),f=o4(`BaseInputTemplate`,c,s),p=e=>{e.target.files&&u(e.target.files)};return(0,H.jsxs)(`div`,{children:[(0,H.jsx)(f,{...e,disabled:t||n,type:`file`,required:!o&&r,onChangeOverride:p,value:``,accept:s.accept?String(s.accept):void 0}),(0,H.jsx)(U_e,{filesInfo:l,onRemove:d,registry:c,preview:s.filePreview,options:s})]})}function G_e({id:e,value:t,htmlName:n}){return(0,H.jsx)(`input`,{type:`hidden`,id:e,name:n||e,value:t===void 0?``:t})}function K_e(e){let{options:t,registry:n}=e;return(0,H.jsx)(o4(`BaseInputTemplate`,n,t),{type:`password`,...e})}function q_e({options:e,value:t,required:n,disabled:r,readonly:i,autofocus:a=!1,onBlur:o,onFocus:s,onChange:c,id:l,htmlName:u}){let{enumOptions:d,enumDisabled:f,inline:p,emptyValue:m}=e,h=r4(e),g=(0,b.useCallback)(({target:e})=>o(l,Z2(e?.value,d,h,m)),[o,d,m,l,h]),_=(0,b.useCallback)(({target:e})=>s(l,Z2(e?.value,d,h,m)),[s,d,m,l,h]);return(0,H.jsx)(`div`,{className:`field-radio-group`,id:l,role:`radiogroup`,children:Array.isArray(d)&&d.map((e,o)=>{let s=K2(e.value,t),d=Array.isArray(f)&&f.includes(e.value),m=r||d||i?`disabled`:``,v=(0,H.jsxs)(`span`,{children:[(0,H.jsx)(`input`,{type:`radio`,id:x4(l,o),checked:s,name:u||l,required:n,value:Q2(e.value,o,h),disabled:r||d||i,autoFocus:a&&o===0,onChange:()=>c(e.value),onBlur:g,onFocus:_,"aria-describedby":b4(l)}),(0,H.jsx)(`span`,{children:e.label})]});return p?(0,H.jsx)(`label`,{className:`radio-inline ${m}`,children:v},String(e.value)):(0,H.jsx)(`div`,{className:`radio ${m}`,children:(0,H.jsx)(`label`,{children:v})},String(e.value))})})}function J_e(e){let{value:t,registry:{templates:{BaseInputTemplate:n}}}=e;return(0,H.jsxs)(`div`,{className:`field-range-wrapper`,children:[(0,H.jsx)(n,{type:`range`,...e}),(0,H.jsx)(`span`,{className:`range-view`,children:t})]})}function Y_e({id:e,value:t,required:n,disabled:r,readonly:i,autofocus:a,onChange:o,onFocus:s,onBlur:c,schema:l,options:u,htmlName:d}){let{stars:f=5,shape:p=`star`}=u,m=l.maximum?Math.min(l.maximum,5):Math.min(Math.max(f,1),5),h=l.minimum||0,g=(0,b.useCallback)(e=>{!r&&!i&&o(e)},[o,r,i]),_=(0,b.useCallback)(t=>{s&&s(e,Number(t.target.dataset.value))},[s,e]),v=(0,b.useCallback)(t=>{c&&c(e,Number(t.target.dataset.value))},[c,e]),y=e=>p===`heart`?e?`♥`:`♡`:e?`★`:`☆`;return(0,H.jsxs)(`div`,{className:`rating-widget`,style:{display:`inline-flex`,fontSize:`1.5rem`,cursor:r||i?`default`:`pointer`},children:[[...Array(m)].map((e,n)=>{let a=h+n,o=a<=t;return(0,H.jsx)(`span`,{onClick:()=>g(a),onKeyDown:e=>(e.key===`Enter`||e.key===` `)&&g(a),onFocus:_,onBlur:v,"data-value":a,tabIndex:r||i?-1:0,role:`radio`,"aria-checked":a===t,"aria-label":`${a} ${p===`heart`?`heart`:`star`}${a===1?``:`s`}`,style:{color:o?`#FFD700`:`#ccc`,padding:`0 0.2rem`,transition:`color 0.2s`,userSelect:`none`},children:y(o)},n)}),(0,H.jsx)(`input`,{type:`hidden`,id:e,name:d||e,value:t||``,required:n,disabled:r||i,"aria-hidden":`true`})]})}function H8(e,t){return t?Array.from(e.target.options).slice().filter(e=>e.selected).map(e=>e.value):e.target.value}function X_e({schema:e,id:t,options:n,value:r,required:i,disabled:a,readonly:o,multiple:s=!1,autofocus:c=!1,onChange:l,onBlur:u,onFocus:d,placeholder:f,htmlName:p,registry:m,uiSchema:h}){let{enumOptions:g,enumDisabled:_,emptyValue:v}=n,y=s?[]:``,x=r4(n),S=(0,b.useCallback)(e=>d(t,Z2(H8(e,s),g,x,v)),[d,t,s,g,v,x]),C=(0,b.useCallback)(e=>u(t,Z2(H8(e,s),g,x,v)),[u,t,s,g,v,x]),w=(0,b.useCallback)(e=>l(Z2(H8(e,s),g,x,v)),[l,s,g,v,x]),T=J2(r,g,s,x,y),E=!s&&e.default===void 0;return E4(t,e,g,s),(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(A4,{id:t,multiple:s,options:n,registry:m,uiSchema:h,value:r}),(0,H.jsxs)(`select`,{id:t,name:p||t,multiple:s,className:`form-control`,value:T,required:i,disabled:a||o,autoFocus:c,onBlur:C,onFocus:S,onChange:w,"aria-describedby":b4(t),children:[E&&(0,H.jsx)(`option`,{value:``,children:f}),Array.isArray(g)&&g.map(({value:e,label:t},n)=>{let r=_&&_.includes(e);return(0,H.jsx)(`option`,{value:Q2(e,n,x),disabled:r,children:t},String(e))})]})]})}function Z_e({id:e,options:t,placeholder:n,value:r,required:i,disabled:a,readonly:o,autofocus:s=!1,onChange:c,onBlur:l,onFocus:u,htmlName:d}){let f=(0,b.useCallback)(({target:{value:e}})=>c(e===``?t.emptyValue:e),[c,t.emptyValue]),p=(0,b.useCallback)(({target:t})=>l(e,t?.value),[l,e]),m=(0,b.useCallback)(({target:t})=>u(e,t?.value),[e,u]);return(0,H.jsx)(`textarea`,{id:e,name:d||e,className:`form-control`,value:r||``,placeholder:n,required:i,disabled:a,readOnly:o,autoFocus:s,rows:t.rows,onBlur:p,onFocus:m,onChange:f,"aria-describedby":b4(e)})}function Q_e(e){let{options:t,registry:n}=e;return(0,H.jsx)(o4(`BaseInputTemplate`,n,t),{...e})}function $_e(e){let{onChange:t,options:n,registry:r}=e,i=o4(`BaseInputTemplate`,r,n),a=(0,b.useCallback)(e=>t(e?`${e}:00`:void 0),[t]);return(0,H.jsx)(i,{type:`time`,...e,onChange:a})}function eve(e){let{options:t,registry:n}=e;return(0,H.jsx)(o4(`BaseInputTemplate`,n,t),{type:`number`,...e})}function tve(e){let{options:t,registry:n}=e;return(0,H.jsx)(o4(`BaseInputTemplate`,n,t),{type:`url`,...e})}function nve(){return{AltDateWidget:F_e,AltDateTimeWidget:P_e,CheckboxWidget:L_e,CheckboxesWidget:I_e,ColorWidget:R_e,DateWidget:B_e,DateTimeWidget:z_e,EmailWidget:V_e,FileWidget:W_e,HiddenWidget:G_e,PasswordWidget:K_e,RadioWidget:q_e,RangeWidget:J_e,RatingWidget:Y_e,SelectWidget:X_e,TextWidget:Q_e,TextareaWidget:Z_e,TimeWidget:$_e,UpDownWidget:eve,URLWidget:tve}}function rve(){return{fields:Yge(),templates:N_e(),widgets:nve(),rootSchema:{},formContext:{},translateString:Eme,globalFormOptions:{idPrefix:H1,idSeparator:`_`,useFallbackUiForUnsupportedType:!1}}}function U8(e,t){return{...uD(e,[`schema`,`uiSchema`,`fieldPathId`,`schemaUtils`,`formData`,`edit`,`errors`,`errorSchema`]),...t!==void 0&&{status:t}}}var ive=class e extends b.Component{formElement;pendingChanges=[];isProcessingUserChange=!1;static getDerivedStateFromProps(e,t){if(e.extraErrors!==t.prevExtraErrors){let n={errors:t.schemaValidationErrors||[],errorSchema:t.schemaValidationErrorSchema||{}},{errors:r,errorSchema:i}=n;return e.extraErrors&&({errors:r,errorSchema:i}=z4(n,e.extraErrors)),t.customErrors&&({errors:r,errorSchema:i}=z4({errors:r,errorSchema:i},t.customErrors.ErrorSchema,!0)),{prevExtraErrors:e.extraErrors,errors:r,errorSchema:i}}return null}constructor(e){if(super(e),!e.validator)throw Error(`A validator is required for Form functionality to work`);let{formData:t,initialFormData:n,onChange:r}=e,i=t??n;this.state={...this.getStateFromProps(e,i,void 0,void 0,void 0,!0),prevExtraErrors:e.extraErrors},r&&!l0(this.state.formData,i)&&r(U8(this.state)),this.formElement=(0,b.createRef)()}getSnapshotBeforeUpdate(e,t){if(!l0(this.props,e)){let n=e4(this.props.formData,e.formData),r=e4(this.props.formData,this.state.formData),i=!l0(e.schema,this.props.schema),a=n.length>0||!l0(e.formData,this.props.formData),o=r.length>0||!l0(this.state.formData,this.props.formData),s=this.getStateFromProps(this.props,this.props.formData,i||a?void 0:this.state.retrievedSchema,i,n,!o);return{nextState:s,shouldUpdate:!l0(s,t)}}return{shouldUpdate:!1}}componentDidUpdate(e,t,n){if(n.shouldUpdate){let{nextState:e}=n,r=!l0(e.formData,this.props.formData),i=this.isProcessingUserChange;if(this.isProcessingUserChange=!1,i&&r)return;r&&!l0(e.formData,t.formData)&&this.props.onChange&&this.props.onChange(U8(e)),this.setState(e)}}getStateFromProps(t,n,r,i=!1,a=[],o=!1,s=!1){let c=this.state||{},l=`schema`in t?t.schema:this.props.schema,u=`validator`in t?t.validator:this.props.validator,d=(`uiSchema`in t?t.uiSchema:this.props.uiSchema)||{},f=t.formData===void 0&&this.props.formData===void 0,p=n!==void 0,m=`liveValidate`in t?t.liveValidate:this.props.liveValidate,h=p&&!t.noValidate&&m,g=`experimental_defaultFormStateBehavior`in t?t.experimental_defaultFormStateBehavior:this.props.experimental_defaultFormStateBehavior,_=`experimental_customMergeAllOf`in t?t.experimental_customMergeAllOf:this.props.experimental_customMergeAllOf,{schemaUtils:v}=c;(!v||v.doesSchemaUtilsDiffer(u,l,g,_))&&(v=Cme(u,l,g,_));let y=v.getRootSchema(),b=n;n===P8?b=void 0:n===void 0&&f&&(b=c.formData);let x,S,C=!1,w=[];do{x=v.getDefaultFormState(y,b,!1,c.initialDefaultsGenerated);let e=s?p4({formData:x}):``;if(S=this.updateRetrievedSchema(r??v.retrieveSchema(y,x)),s&&!w.includes(e)&&!l0(S,c.retrievedSchema)){let t=v.sanitizeDataForNewSchema(S,c.retrievedSchema,x);if(C=!l0(t,x),C){x=t,b=t;let e=p4({formData:t});C=!w.includes(e),w.push(e)}w.push(e)}else C=!1}while(C);let T=()=>t.noValidate||i?{errors:[],errorSchema:{}}:t.liveValidate?{errors:c.errors||[],errorSchema:c.errorSchema||{}}:{errors:c.schemaValidationErrors||[],errorSchema:c.schemaValidationErrorSchema||{}},E,D,{schemaValidationErrors:O,schemaValidationErrorSchema:k}=c;if(h&&!o){let e=this.liveValidate(y,v,c.errorSchema,x,void 0,c.customErrors,r,r!==void 0);E=e.errors,D=e.errorSchema,O=e.schemaValidationErrors,k=e.schemaValidationErrorSchema}else{let n=T();if(E=n.errors,D=n.errorSchema,a.length>0&&!h){let e=a.reduce((e,t)=>(e[t]=void 0,e),{});k=C2(n.errorSchema,e,`preventDuplicates`),D=k}let r=e.mergeErrors({errorSchema:D,errors:E},t.extraErrors,c.customErrors);E=r.errors,D=r.errorSchema}let A=e.getRegistry(t,y,v),j=l0(c.registry,A)?c.registry:A,M=c.fieldPathId&&c.fieldPathId?.$id===j.globalFormOptions.idPrefix?c.fieldPathId:I4(``,j.globalFormOptions);return{schemaUtils:v,schema:y,uiSchema:d,fieldPathId:M,formData:x,edit:p,errors:E,errorSchema:D,schemaValidationErrors:O,schemaValidationErrorSchema:k,retrievedSchema:S,initialDefaultsGenerated:!0,registry:j}}shouldComponentUpdate(e,t){let{experimental_componentUpdateStrategy:n=`customDeep`}=this.props;return Ime(this,e,t,n)}validate(e,t=this.state.schema,n,r){let i=n||this.state.schemaUtils,{customValidate:a,transformErrors:o,uiSchema:s}=this.props,c=r??t,l=e?JSON.parse(JSON.stringify(e)):void 0;return i.getValidator().validateFormData(l,c,a,o,s)}renderErrors(e){let{errors:t,errorSchema:n,schema:r,uiSchema:i}=this.state,a=o4(`ErrorListTemplate`,e,J1(i));return t?.length?(0,H.jsx)(a,{errors:t,errorSchema:n||{},schema:r,uiSchema:i,registry:e}):null}static mergeErrors(e,t,n){let{errorSchema:r,errors:i}=e;if(t){let n=z4(e,t);r=n.errorSchema,i=n.errors}if(n){let e=z4({errors:i,errorSchema:r},n.ErrorSchema,!0);r=e.errorSchema,i=e.errors}return{errors:i,errorSchema:r}}liveValidate(t,n,r,i,a,o,s,c=!1){let l=this.validate(i,t,n,s),{errors:u}=l,{errorSchema:d}=l;c&&(d=C2(r,l.errorSchema,`preventDuplicates`));let f=u,p=d;return{...e.mergeErrors({errorSchema:d,errors:u},a,o),schemaValidationErrors:f,schemaValidationErrorSchema:p}}getUsedFormData=(e,t)=>gme(e,t);getFieldNames=(e,t)=>_me(e,t);omitExtraData=e=>{let{schema:t,schemaUtils:n}=this.state;return n.omitExtraData(t,e)};setFieldValue=(e,t)=>{let{registry:n}=this.state,r=Array.isArray(e)?e:e.split(`.`),i=I4(``,n.globalFormOptions,r);this.onChange(t,r,void 0,i.$id)};onChange=(e,t,n,r)=>{this.pendingChanges.push({newValue:e,path:t,newErrorSchema:n,id:r}),this.pendingChanges.length===1&&this.processPendingChange()};processPendingChange(){if(this.pendingChanges.length===0)return;this.isProcessingUserChange=!0;let{newValue:t,path:n,id:r}=this.pendingChanges[0],{newErrorSchema:i}=this.pendingChanges[0],{extraErrors:a,omitExtraData:o,liveOmit:s,noValidate:c,liveValidate:l,onChange:u,disabled:d,readonly:f}=this.props,{formData:p,schemaUtils:m,schema:h,fieldPathId:g,schemaValidationErrorSchema:_,errors:v}=this.state,{customErrors:y,retrievedSchema:b}=this.state,x=_,S=g.path[0]||``,C=!n||n.length===0||n.length===1&&n[0]===S,w=C?t:iE(p),T=T1(w)&&Object.keys(w).length>0&&Object.values(w).every(e=>e===void 0)&&p==null?void 0:w;if(T1(w)||Array.isArray(w)){let e=!1;if(t===N8)yD(w,n);else if(!C){let r=t;if(t===void 0)if(typeof n[n.length-1]==`number`)r=null;else{let{field:t}=m.findFieldInSchema(h,n,p),r=t;!(r&&(`oneOf`in r||`anyOf`in r))&&r!==void 0&&(e=!0)}e?dD(w,n,void 0):dD(w,n,r)}let r=b&&!C&&!T1(t)&&!Array.isArray(t)&&!d&&!f,i=this.getStateFromProps(this.props,T,void 0,void 0,void 0,!0,r);w=i.formData,b=i.retrievedSchema,e&&w&&dD(w,n,void 0)}let E=!c&&(l===!0||l===`onChange`),D={formData:w,retrievedSchema:b},O=w;if(o===!0&&(s===!0||s===`onChange`)&&(O=this.omitExtraData(w),D={...D,formData:O}),i)if(!tD(C?_:X(_,n)))C?x=i:(x=iE(_),dD(x,n,i));else if(y||=new $2,C){let e=X(i,M1);e&&y.setErrors(e)}else dD(y.ErrorSchema,n,i);else y&&X(y.ErrorSchema,[...n,`__errors`])&&y.clearErrors(n);if(E&&this.pendingChanges.length===1){let e=this.liveValidate(h,m,x,O,a,y,b);D={...D,formData:O,...e,customErrors:y}}else if(!c&&i){let t=e.mergeErrors({errorSchema:x,errors:v},a,y);D={...D,formData:O,...t,customErrors:y}}this.setState(D,()=>{u&&u(U8({...this.state,...D}),r),this.pendingChanges.shift(),this.processPendingChange()})}updateRetrievedSchema(e){return l0(e,this.state?.retrievedSchema)?this.state.retrievedSchema:e}reset=()=>{let{formData:e,initialFormData:t=P8,onChange:n}=this.props,r={formData:this.getStateFromProps(this.props,e??t,void 0,void 0,void 0,!0).formData,errorSchema:{},errors:[],schemaValidationErrors:[],schemaValidationErrorSchema:{},initialDefaultsGenerated:!1,customErrors:void 0};this.setState(r,()=>n?.(U8({...this.state,...r})))};onBlur=(e,t)=>{let{onBlur:n,omitExtraData:r,liveOmit:i,liveValidate:a}=this.props;if(n&&n(e,t),r===!0&&i===`onBlur`||a===`onBlur`){let{onChange:t,extraErrors:n}=this.props,{formData:o}=this.state,s=o,c={formData:s};if(r===!0&&i===`onBlur`&&(s=this.omitExtraData(o),c={formData:s}),a===`onBlur`){let{schema:e,schemaUtils:t,errorSchema:r,customErrors:i,retrievedSchema:a}=this.state,o=this.liveValidate(e,t,r,s,n,i,a);c={formData:s,...o,customErrors:i}}let l=Object.keys(c).filter(e=>!e.startsWith(`schemaValidation`)).some(e=>!l0(X(this.state,e),X(c,e)));this.setState(c,()=>{t&&l&&t(U8({...this.state,...c}),e)})}};onFocus=(e,t)=>{let{onFocus:n}=this.props;n&&n(e,t)};onSubmit=e=>{if(e.preventDefault(),e.target!==e.currentTarget)return;e.persist();let{omitExtraData:t,extraErrors:n,noValidate:r,onSubmit:i}=this.props,{formData:a}=this.state;if(t===!0&&(a=this.omitExtraData(a)),r||this.validateFormWithFormData(a)){let t=n||{},r=n?F4(n):[];this.setState({formData:a,errors:r,errorSchema:t,schemaValidationErrors:[],schemaValidationErrorSchema:{}},()=>{i&&i(U8({...this.state,formData:a},`submitted`),e)})}};static getGlobalFormOptions(e){let{uiSchema:t={},experimental_componentUpdateStrategy:n,idSeparator:r=`_`,idPrefix:i=H1,nameGenerator:a,useFallbackUiForUnsupportedType:o=!1}=e;return{idPrefix:t[`ui:rootFieldId`]||i,idSeparator:r,useFallbackUiForUnsupportedType:o,...n!==void 0&&{experimental_componentUpdateStrategy:n},...a!==void 0&&{nameGenerator:a}}}static getRegistry(t,n,r){let{translateString:i,uiSchema:a={}}=t,{fields:o,templates:s,widgets:c,formContext:l,translateString:u}=rve();return{fields:{...o,...t.fields},templates:{...s,...t.templates,ButtonTemplates:{...s.ButtonTemplates,...t.templates?.ButtonTemplates}},widgets:{...c,...t.widgets},rootSchema:n,formContext:t.formContext||l,schemaUtils:r,translateString:i||u,globalUiOptions:a[q1],globalFormOptions:e.getGlobalFormOptions(t),uiSchemaDefinitions:a[`ui:definitions`]??{}}}submit=()=>{if(this.formElement.current){let e=new CustomEvent(`submit`,{cancelable:!0});e.preventDefault(),this.formElement.current.dispatchEvent(e),this.formElement.current.requestSubmit()}};focusOnError(e){let{idPrefix:t=`root`,idSeparator:n=`_`}=this.props,{property:r}=e,i=mD(r);i[0]===``?i[0]=t:i.unshift(t);let a=i.join(n),o=this.formElement.current.elements[a];o||=this.formElement.current.querySelector(`input[id^="${a}"], button[id^="${a}"]`),o?.length&&(o=o[0]),o&&o.focus()}validateFormWithFormData=t=>{let{extraErrors:n,extraErrorsBlockSubmit:r,focusOnFirstError:i,onError:a}=this.props,{errors:o}=this.state,s=this.validate(t),{errors:c,errorSchema:l}=n?e.mergeErrors(s,n):s,u=s.errors.length>0||n&&r;return u?(i&&(typeof i==`function`?i(c[0]):this.focusOnError(c[0])),this.setState({errors:c,errorSchema:l,schemaValidationErrors:s.errors,schemaValidationErrorSchema:s.errorSchema},()=>{a?a(c):console.error(`Form validation failed`,c)})):c.length>0?this.setState({errors:c,errorSchema:l,schemaValidationErrors:[],schemaValidationErrorSchema:{}}):o.length>0&&this.setState({errors:[],errorSchema:{},schemaValidationErrors:[],schemaValidationErrorSchema:{}}),!u};validateForm(){let{omitExtraData:e}=this.props,{formData:t}=this.state;return e===!0&&(t=this.omitExtraData(t)),this.validateFormWithFormData(t)}render(){let{children:e,id:t,className:n=``,tagName:r,name:i,method:a,target:o,action:s,autoComplete:c,enctype:l,acceptCharset:u,noHtml5Validate:d=!1,disabled:f,readonly:p,showErrorList:m=`top`,_internalFormWrapper:h}=this.props,{schema:g,uiSchema:_,formData:v,errorSchema:y,fieldPathId:b,registry:x}=this.state,{SchemaField:S}=x.fields,{SubmitButton:C}=x.templates.ButtonTemplates,w=h?r:void 0,T=h||r||`form`,{[R1]:E={}}=J1(_);f&&(E={...E,props:{...E.props,disabled:!0}});let D={[K1]:{[R1]:E}};return(0,H.jsxs)(T,{className:n||`rjsf`,id:t,name:i,method:a,target:o,action:s,autoComplete:c,encType:l,acceptCharset:u,noValidate:d,onSubmit:this.onSubmit,as:w,ref:this.formElement,children:[m===`top`&&this.renderErrors(x),(0,H.jsx)(S,{name:``,schema:g,uiSchema:_,errorSchema:y,fieldPathId:b,formData:v,onChange:this.onChange,onBlur:this.onBlur,onFocus:this.onFocus,registry:x,disabled:f,readonly:p}),e||(0,H.jsx)(C,{uiSchema:D,registry:x}),m===`bottom`&&this.renderErrors(x)]})}};function ave(e,t=`none`){return t===`all`?e:e.reduce((e,n)=>{let{message:r,schemaPath:i}=n,a=t===`anyOf`?void 0:i?.indexOf(`/${k1}/`),o=t===`oneOf`?void 0:i?.indexOf(`/${F1}/`),s;return a&&a>=0?s=i?.substring(0,a):o&&o>=0&&(s=i?.substring(0,o)),s&&e.find(e=>e.message===r&&e.schemaPath?.startsWith(s))||e.push(n),e},[])}function ove(e=[],t,n,r){return ave(e.map(e=>{let{instancePath:n,keyword:i,params:a,schemaPath:o,parentSchema:s,...c}=e,{message:l=``}=c,u=n.replace(/\//g,`.`),d=`${u} ${l}`.trim(),f=``,p=[...a.deps?.split(`, `)||[],a.missingProperty,a.property].filter(e=>e);if(p.length>0)p.forEach(e=>{let n=J1(X(t,(u?`${u}.${e}`:e).replace(/^\./,``))).title;if(n===void 0&&(n=J1(X(t,o.replace(/\/properties\//g,`/`).split(`/`).slice(1,-1).concat([e]))).title),n===void 0&&(n=X(t,[...u.replace(/^\./,``).split(`.`).filter(Boolean),e,`title`])),n)l=l.replace(`'${e}'`,`'${n}'`),f=n;else{let t=X(s,[I1,e,`title`]);if(t)l=l.replace(`'${e}'`,`'${t}'`),f=t;else if(r){let t=u.replace(/^\./,``).split(`.`).filter(Boolean),n=[];for(let e of t)n.push(I1,e);n.push(I1,e,`title`);let i=X(r,n);i&&(l=l.replace(`'${e}'`,`'${i}'`),f=i)}}}),d=l;else{let e=J1(X(t,u.replace(/^\./,``))).title;if(e)d=`'${e}' ${l}`.trim(),f=e;else{let e=s?.title;e&&(d=`'${e}' ${l}`.trim(),f=e)}}return`missingProperty`in a&&(u=u?`${u}.${a.missingProperty}`:a.missingProperty),{name:i,property:u,message:l,params:a,stack:d,schemaPath:o,title:f}}),n)}function sve(e,t,n,r,i,a,o,s){let{validationError:c}=t,l=ove(t.errors,o,s,r);c&&(l=[...l,{stack:c.message}]),typeof a==`function`&&(l=a(l,o));let u=Lme(l);if(c&&(u={...u,$schema:{__errors:[c.message]}}),typeof i!=`function`)return{errors:l,errorSchema:u};let d=P2(e,r,n,r,!0),f=L4(i(d,X1(d),o,u));return z4({errors:l,errorSchema:u},f)}var W8=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;var t=class{};e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var n=class extends t{constructor(t){if(super(),!e.IDENTIFIER.test(t))throw Error(`CodeGen: name must be a valid identifier`);this.str=t}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};e.Name=n;var r=class extends t{constructor(e){super(),this._items=typeof e==`string`?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===``||e===`""`}get str(){return this._str??=this._items.reduce((e,t)=>`${e}${t}`,``)}get names(){return this._names??=this._items.reduce((e,t)=>(t instanceof n&&(e[t.str]=(e[t.str]||0)+1),e),{})}};e._Code=r,e.nil=new r(``);function i(e,...t){let n=[e[0]],i=0;for(;i<t.length;)s(n,t[i]),n.push(e[++i]);return new r(n)}e._=i;var a=new r(`+`);function o(e,...t){let n=[p(e[0])],i=0;for(;i<t.length;)n.push(a),s(n,t[i]),n.push(a,p(e[++i]));return c(n),new r(n)}e.str=o;function s(e,t){t instanceof r?e.push(...t._items):t instanceof n?e.push(t):e.push(d(t))}e.addCodeArg=s;function c(e){let t=1;for(;t<e.length-1;){if(e[t]===a){let n=l(e[t-1],e[t+1]);if(n!==void 0){e.splice(t-1,3,n);continue}e[t++]=`+`}t++}}function l(e,t){if(t===`""`)return e;if(e===`""`)return t;if(typeof e==`string`)return t instanceof n||e[e.length-1]!==`"`?void 0:typeof t==`string`?t[0]===`"`?e.slice(0,-1)+t.slice(1):void 0:`${e.slice(0,-1)}${t}"`;if(typeof t==`string`&&t[0]===`"`&&!(e instanceof n))return`"${e}${t.slice(1)}`}function u(e,t){return t.emptyStr()?e:e.emptyStr()?t:o`${e}${t}`}e.strConcat=u;function d(e){return typeof e==`number`||typeof e==`boolean`||e===null?e:p(Array.isArray(e)?e.join(`,`):e)}function f(e){return new r(p(e))}e.stringify=f;function p(e){return JSON.stringify(e).replace(/\u2028/g,`\\u2028`).replace(/\u2029/g,`\\u2029`)}e.safeStringify=p;function m(t){return typeof t==`string`&&e.IDENTIFIER.test(t)?new r(`.${t}`):i`[${t}]`}e.getProperty=m;function h(t){if(typeof t==`string`&&e.IDENTIFIER.test(t))return new r(`${t}`);throw Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)}e.getEsmExportName=h;function g(e){return new r(e.toString())}e.regexpCode=g})),G8=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;var t=W8(),n=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},r;(function(e){e[e.Started=0]=`Started`,e[e.Completed=1]=`Completed`})(r||(e.UsedValueState=r={})),e.varKinds={const:new t.Name(`const`),let:new t.Name(`let`),var:new t.Name(`var`)};var i=class{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof t.Name?e:this.name(e)}name(e){return new t.Name(this._newName(e))}_newName(e){let t=this._names[e]||this._nameGroup(e);return`${e}${t.index++}`}_nameGroup(e){if((this._parent?._prefixes)?.has(e)||this._prefixes&&!this._prefixes.has(e))throw Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}};e.Scope=i;var a=class extends t.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:n,itemIndex:r}){this.value=e,this.scopePath=(0,t._)`.${new t.Name(n)}[${r}]`}};e.ValueScopeName=a;var o=(0,t._)`\n`;e.ValueScope=class extends i{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?o:t.nil}}get(){return this._scope}name(e){return new a(e,this._newName(e))}value(e,t){if(t.ref===void 0)throw Error(`CodeGen: ref must be passed in value`);let n=this.toName(e),{prefix:r}=n,i=t.key??t.ref,a=this._values[r];if(a){let e=a.get(i);if(e)return e}else a=this._values[r]=new Map;a.set(i,n);let o=this._scope[r]||(this._scope[r]=[]),s=o.length;return o[s]=t.ref,n.setValue(t,{property:r,itemIndex:s}),n}getValue(e,t){let n=this._values[e];if(n)return n.get(t)}scopeRefs(e,n=this._values){return this._reduceValues(n,n=>{if(n.scopePath===void 0)throw Error(`CodeGen: name "${n}" has no value`);return(0,t._)`${e}${n.scopePath}`})}scopeCode(e=this._values,t,n){return this._reduceValues(e,e=>{if(e.value===void 0)throw Error(`CodeGen: name "${e}" has no value`);return e.value.code},t,n)}_reduceValues(i,a,o={},s){let c=t.nil;for(let l in i){let u=i[l];if(!u)continue;let d=o[l]=o[l]||new Map;u.forEach(i=>{if(d.has(i))return;d.set(i,r.Started);let o=a(i);if(o){let n=this.opts.es5?e.varKinds.var:e.varKinds.const;c=(0,t._)`${c}${n} ${i} = ${o};${this.opts._n}`}else if(o=s?.(i))c=(0,t._)`${c}${o}${this.opts._n}`;else throw new n(i);d.set(i,r.Completed)})}return c}}})),K8=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;var t=W8(),n=G8(),r=W8();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return r.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return r.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return r.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}});var i=G8();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return i.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return i.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return i.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return i.varKinds}}),e.operators={GT:new t._Code(`>`),GTE:new t._Code(`>=`),LT:new t._Code(`<`),LTE:new t._Code(`<=`),EQ:new t._Code(`===`),NEQ:new t._Code(`!==`),NOT:new t._Code(`!`),OR:new t._Code(`||`),AND:new t._Code(`&&`),ADD:new t._Code(`+`)};var a=class{optimizeNodes(){return this}optimizeNames(e,t){return this}},o=class extends a{constructor(e,t,n){super(),this.varKind=e,this.name=t,this.rhs=n}render({es5:e,_n:t}){let r=e?n.varKinds.var:this.varKind,i=this.rhs===void 0?``:` = ${this.rhs}`;return`${r} ${this.name}${i};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&=k(this.rhs,e,t),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}},s=class extends a{constructor(e,t,n){super(),this.lhs=e,this.rhs=t,this.sideEffects=n}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,n){if(!(this.lhs instanceof t.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=k(this.rhs,e,n),this}get names(){return O(this.lhs instanceof t.Name?{}:{...this.lhs.names},this.rhs)}},c=class extends s{constructor(e,t,n,r){super(e,n,r),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},l=class extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},u=class extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:``};`+e}},d=class extends a{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},f=class extends a{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=k(this.code,e,t),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}},p=class extends a{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((t,n)=>t+n.render(e),``)}optimizeNodes(){let{nodes:e}=this,t=e.length;for(;t--;){let n=e[t].optimizeNodes();Array.isArray(n)?e.splice(t,1,...n):n?e[t]=n:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){let{nodes:n}=this,r=n.length;for(;r--;){let i=n[r];i.optimizeNames(e,t)||(A(e,i.names),n.splice(r,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((e,t)=>D(e,t.names),{})}},m=class extends p{render(e){return`{`+e._n+super.render(e)+`}`+e._n}},h=class extends p{},g=class extends m{};g.kind=`else`;var _=class e extends m{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+=`else `+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let n=this.else;if(n){let e=n.optimizeNodes();n=this.else=Array.isArray(e)?new g(e):e}if(n)return t===!1?n instanceof e?n:n.nodes:this.nodes.length?this:new e(j(t),n instanceof e?[n]:n.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(e,t){if(this.else=this.else?.optimizeNames(e,t),super.optimizeNames(e,t)||this.else)return this.condition=k(this.condition,e,t),this}get names(){let e=super.names;return O(e,this.condition),this.else&&D(e,this.else.names),e}};_.kind=`if`;var v=class extends m{};v.kind=`for`;var y=class extends v{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=k(this.iteration,e,t),this}get names(){return D(super.names,this.iteration.names)}},b=class extends v{constructor(e,t,n,r){super(),this.varKind=e,this.name=t,this.from=n,this.to=r}render(e){let t=e.es5?n.varKinds.var:this.varKind,{name:r,from:i,to:a}=this;return`for(${t} ${r}=${i}; ${r}<${a}; ${r}++)`+super.render(e)}get names(){return O(O(super.names,this.from),this.to)}},x=class extends v{constructor(e,t,n,r){super(),this.loop=e,this.varKind=t,this.name=n,this.iterable=r}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iterable=k(this.iterable,e,t),this}get names(){return D(super.names,this.iterable.names)}},S=class extends m{constructor(e,t,n){super(),this.name=e,this.args=t,this.async=n}render(e){return`${this.async?`async `:``}function ${this.name}(${this.args})`+super.render(e)}};S.kind=`func`;var C=class extends p{render(e){return`return `+super.render(e)}};C.kind=`return`;var w=class extends m{render(e){let t=`try`+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),(e=this.catch)==null||e.optimizeNodes(),(t=this.finally)==null||t.optimizeNodes(),this}optimizeNames(e,t){var n,r;return super.optimizeNames(e,t),(n=this.catch)==null||n.optimizeNames(e,t),(r=this.finally)==null||r.optimizeNames(e,t),this}get names(){let e=super.names;return this.catch&&D(e,this.catch.names),this.finally&&D(e,this.finally.names),e}},T=class extends m{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};T.kind=`catch`;var E=class extends m{render(e){return`finally`+super.render(e)}};E.kind=`finally`,e.CodeGen=class{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?`
265
+ `:``},this._extScope=e,this._scope=new n.Scope({parent:e}),this._nodes=[new h]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){let n=this._extScope.value(e,t);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,n,r){let i=this._scope.toName(t);return n!==void 0&&r&&(this._constants[i.str]=n),this._leafNode(new o(e,i,n)),i}const(e,t,r){return this._def(n.varKinds.const,e,t,r)}let(e,t,r){return this._def(n.varKinds.let,e,t,r)}var(e,t,r){return this._def(n.varKinds.var,e,t,r)}assign(e,t,n){return this._leafNode(new s(e,t,n))}add(t,n){return this._leafNode(new c(t,e.operators.ADD,n))}code(e){return typeof e==`function`?e():e!==t.nil&&this._leafNode(new f(e)),this}object(...e){let n=[`{`];for(let[r,i]of e)n.length>1&&n.push(`,`),n.push(r),(r!==i||this.opts.es5)&&(n.push(`:`),(0,t.addCodeArg)(n,i));return n.push(`}`),new t._Code(n)}if(e,t,n){if(this._blockNode(new _(e)),t&&n)this.code(t).else().code(n).endIf();else if(t)this.code(t).endIf();else if(n)throw Error(`CodeGen: "else" body without "then" body`);return this}elseIf(e){return this._elseNode(new _(e))}else(){return this._elseNode(new g)}endIf(){return this._endBlockNode(_,g)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new y(e),t)}forRange(e,t,r,i,a=this.opts.es5?n.varKinds.var:n.varKinds.let){let o=this._scope.toName(e);return this._for(new b(a,o,t,r),()=>i(o))}forOf(e,r,i,a=n.varKinds.const){let o=this._scope.toName(e);if(this.opts.es5){let e=r instanceof t.Name?r:this.var(`_arr`,r);return this.forRange(`_i`,0,(0,t._)`${e}.length`,n=>{this.var(o,(0,t._)`${e}[${n}]`),i(o)})}return this._for(new x(`of`,a,o,r),()=>i(o))}forIn(e,r,i,a=this.opts.es5?n.varKinds.var:n.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,t._)`Object.keys(${r})`,i);let o=this._scope.toName(e);return this._for(new x(`in`,a,o,r),()=>i(o))}endFor(){return this._endBlockNode(v)}label(e){return this._leafNode(new l(e))}break(e){return this._leafNode(new u(e))}return(e){let t=new C;if(this._blockNode(t),this.code(e),t.nodes.length!==1)throw Error(`CodeGen: "return" should have one node`);return this._endBlockNode(C)}try(e,t,n){if(!t&&!n)throw Error(`CodeGen: "try" without "catch" and "finally"`);let r=new w;if(this._blockNode(r),this.code(e),t){let e=this.name(`e`);this._currNode=r.catch=new T(e),t(e)}return n&&(this._currNode=r.finally=new E,this.code(n)),this._endBlockNode(T,E)}throw(e){return this._leafNode(new d(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){let t=this._blockStarts.pop();if(t===void 0)throw Error(`CodeGen: not in self-balancing block`);let n=this._nodes.length-t;if(n<0||e!==void 0&&n!==e)throw Error(`CodeGen: wrong number of nodes: ${n} vs ${e} expected`);return this._nodes.length=t,this}func(e,n=t.nil,r,i){return this._blockNode(new S(e,n,r)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(S)}optimize(e=1){for(;e-->0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){let n=this._currNode;if(n instanceof e||t&&n instanceof t)return this._nodes.pop(),this;throw Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){let t=this._currNode;if(!(t instanceof _))throw Error(`CodeGen: "else" without "if"`);return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let t=this._nodes;t[t.length-1]=e}};function D(e,t){for(let n in t)e[n]=(e[n]||0)+(t[n]||0);return e}function O(e,n){return n instanceof t._CodeOrName?D(e,n.names):e}function k(e,n,r){if(e instanceof t.Name)return i(e);if(!a(e))return e;return new t._Code(e._items.reduce((e,n)=>(n instanceof t.Name&&(n=i(n)),n instanceof t._Code?e.push(...n._items):e.push(n),e),[]));function i(e){let t=r[e.str];return t===void 0||n[e.str]!==1?e:(delete n[e.str],t)}function a(e){return e instanceof t._Code&&e._items.some(e=>e instanceof t.Name&&n[e.str]===1&&r[e.str]!==void 0)}}function A(e,t){for(let n in t)e[n]=(e[n]||0)-(t[n]||0)}function j(e){return typeof e==`boolean`||typeof e==`number`||e===null?!e:(0,t._)`!${L(e)}`}e.not=j;var M=I(e.operators.AND);function N(...e){return e.reduce(M)}e.and=N;var P=I(e.operators.OR);function F(...e){return e.reduce(P)}e.or=F;function I(e){return(n,r)=>n===t.nil?r:r===t.nil?n:(0,t._)`${L(n)} ${e} ${L(r)}`}function L(e){return e instanceof t.Name?e:(0,t._)`(${e})`}})),q8=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.checkStrictMode=e.getErrorPath=e.Type=e.useFunc=e.setEvaluated=e.evaluatedPropsToName=e.mergeEvaluated=e.eachItem=e.unescapeJsonPointer=e.escapeJsonPointer=e.escapeFragment=e.unescapeFragment=e.schemaRefOrVal=e.schemaHasRulesButRef=e.schemaHasRules=e.checkUnknownRules=e.alwaysValidSchema=e.toHash=void 0;var t=K8(),n=W8();function r(e){let t={};for(let n of e)t[n]=!0;return t}e.toHash=r;function i(e,t){return typeof t==`boolean`?t:Object.keys(t).length===0?!0:(a(e,t),!o(t,e.self.RULES.all))}e.alwaysValidSchema=i;function a(e,t=e.schema){let{opts:n,self:r}=e;if(!n.strictSchema||typeof t==`boolean`)return;let i=r.RULES.keywords;for(let n in t)i[n]||x(e,`unknown keyword: "${n}"`)}e.checkUnknownRules=a;function o(e,t){if(typeof e==`boolean`)return!e;for(let n in e)if(t[n])return!0;return!1}e.schemaHasRules=o;function s(e,t){if(typeof e==`boolean`)return!e;for(let n in e)if(n!==`$ref`&&t.all[n])return!0;return!1}e.schemaHasRulesButRef=s;function c({topSchemaRef:e,schemaPath:n},r,i,a){if(!a){if(typeof r==`number`||typeof r==`boolean`)return r;if(typeof r==`string`)return(0,t._)`${r}`}return(0,t._)`${e}${n}${(0,t.getProperty)(i)}`}e.schemaRefOrVal=c;function l(e){return f(decodeURIComponent(e))}e.unescapeFragment=l;function u(e){return encodeURIComponent(d(e))}e.escapeFragment=u;function d(e){return typeof e==`number`?`${e}`:e.replace(/~/g,`~0`).replace(/\//g,`~1`)}e.escapeJsonPointer=d;function f(e){return e.replace(/~1/g,`/`).replace(/~0/g,`~`)}e.unescapeJsonPointer=f;function p(e,t){if(Array.isArray(e))for(let n of e)t(n);else t(e)}e.eachItem=p;function m({mergeNames:e,mergeToName:n,mergeValues:r,resultToName:i}){return(a,o,s,c)=>{let l=s===void 0?o:s instanceof t.Name?(o instanceof t.Name?e(a,o,s):n(a,o,s),s):o instanceof t.Name?(n(a,s,o),o):r(o,s);return c===t.Name&&!(l instanceof t.Name)?i(a,l):l}}e.mergeEvaluated={props:m({mergeNames:(e,n,r)=>e.if((0,t._)`${r} !== true && ${n} !== undefined`,()=>{e.if((0,t._)`${n} === true`,()=>e.assign(r,!0),()=>e.assign(r,(0,t._)`${r} || {}`).code((0,t._)`Object.assign(${r}, ${n})`))}),mergeToName:(e,n,r)=>e.if((0,t._)`${r} !== true`,()=>{n===!0?e.assign(r,!0):(e.assign(r,(0,t._)`${r} || {}`),g(e,r,n))}),mergeValues:(e,t)=>e===!0||{...e,...t},resultToName:h}),items:m({mergeNames:(e,n,r)=>e.if((0,t._)`${r} !== true && ${n} !== undefined`,()=>e.assign(r,(0,t._)`${n} === true ? true : ${r} > ${n} ? ${r} : ${n}`)),mergeToName:(e,n,r)=>e.if((0,t._)`${r} !== true`,()=>e.assign(r,n===!0||(0,t._)`${r} > ${n} ? ${r} : ${n}`)),mergeValues:(e,t)=>e===!0||Math.max(e,t),resultToName:(e,t)=>e.var(`items`,t)})};function h(e,n){if(n===!0)return e.var(`props`,!0);let r=e.var(`props`,(0,t._)`{}`);return n!==void 0&&g(e,r,n),r}e.evaluatedPropsToName=h;function g(e,n,r){Object.keys(r).forEach(r=>e.assign((0,t._)`${n}${(0,t.getProperty)(r)}`,!0))}e.setEvaluated=g;var _={};function v(e,t){return e.scopeValue(`func`,{ref:t,code:_[t.code]||(_[t.code]=new n._Code(t.code))})}e.useFunc=v;var y;(function(e){e[e.Num=0]=`Num`,e[e.Str=1]=`Str`})(y||(e.Type=y={}));function b(e,n,r){if(e instanceof t.Name){let i=n===y.Num;return r?i?(0,t._)`"[" + ${e} + "]"`:(0,t._)`"['" + ${e} + "']"`:i?(0,t._)`"/" + ${e}`:(0,t._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,t.getProperty)(e).toString():`/`+d(e)}e.getErrorPath=b;function x(e,t,n=e.opts.strictSchema){if(n){if(t=`strict mode: ${t}`,n===!0)throw Error(t);e.self.logger.warn(t)}}e.checkStrictMode=x})),J8=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=K8();e.default={data:new t.Name(`data`),valCxt:new t.Name(`valCxt`),instancePath:new t.Name(`instancePath`),parentData:new t.Name(`parentData`),parentDataProperty:new t.Name(`parentDataProperty`),rootData:new t.Name(`rootData`),dynamicAnchors:new t.Name(`dynamicAnchors`),vErrors:new t.Name(`vErrors`),errors:new t.Name(`errors`),this:new t.Name(`this`),self:new t.Name(`self`),scope:new t.Name(`scope`),json:new t.Name(`json`),jsonPos:new t.Name(`jsonPos`),jsonLen:new t.Name(`jsonLen`),jsonPart:new t.Name(`jsonPart`)}})),Y8=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;var t=K8(),n=q8(),r=J8();e.keywordError={message:({keyword:e})=>(0,t.str)`must pass "${e}" keyword validation`},e.keyword$DataError={message:({keyword:e,schemaType:n})=>n?(0,t.str)`"${e}" keyword must be ${n} ($data)`:(0,t.str)`"${e}" keyword is invalid ($data)`};function i(n,r=e.keywordError,i,a){let{it:o}=n,{gen:s,compositeRule:u,allErrors:f}=o,p=d(n,r,i);a??(u||f)?c(s,p):l(o,(0,t._)`[${p}]`)}e.reportError=i;function a(t,n=e.keywordError,i){let{it:a}=t,{gen:o,compositeRule:s,allErrors:u}=a;c(o,d(t,n,i)),s||u||l(a,r.default.vErrors)}e.reportExtraError=a;function o(e,n){e.assign(r.default.errors,n),e.if((0,t._)`${r.default.vErrors} !== null`,()=>e.if(n,()=>e.assign((0,t._)`${r.default.vErrors}.length`,n),()=>e.assign(r.default.vErrors,null)))}e.resetErrorsCount=o;function s({gen:e,keyword:n,schemaValue:i,data:a,errsCount:o,it:s}){if(o===void 0)throw Error(`ajv implementation error`);let c=e.name(`err`);e.forRange(`i`,o,r.default.errors,o=>{e.const(c,(0,t._)`${r.default.vErrors}[${o}]`),e.if((0,t._)`${c}.instancePath === undefined`,()=>e.assign((0,t._)`${c}.instancePath`,(0,t.strConcat)(r.default.instancePath,s.errorPath))),e.assign((0,t._)`${c}.schemaPath`,(0,t.str)`${s.errSchemaPath}/${n}`),s.opts.verbose&&(e.assign((0,t._)`${c}.schema`,i),e.assign((0,t._)`${c}.data`,a))})}e.extendErrors=s;function c(e,n){let i=e.const(`err`,n);e.if((0,t._)`${r.default.vErrors} === null`,()=>e.assign(r.default.vErrors,(0,t._)`[${i}]`),(0,t._)`${r.default.vErrors}.push(${i})`),e.code((0,t._)`${r.default.errors}++`)}function l(e,n){let{gen:r,validateName:i,schemaEnv:a}=e;a.$async?r.throw((0,t._)`new ${e.ValidationError}(${n})`):(r.assign((0,t._)`${i}.errors`,n),r.return(!1))}var u={keyword:new t.Name(`keyword`),schemaPath:new t.Name(`schemaPath`),params:new t.Name(`params`),propertyName:new t.Name(`propertyName`),message:new t.Name(`message`),schema:new t.Name(`schema`),parentSchema:new t.Name(`parentSchema`)};function d(e,n,r){let{createErrors:i}=e.it;return i===!1?(0,t._)`{}`:f(e,n,r)}function f(e,t,n={}){let{gen:r,it:i}=e,a=[p(i,n),m(e,n)];return h(e,t,a),r.object(...a)}function p({errorPath:e},{instancePath:i}){let a=i?(0,t.str)`${e}${(0,n.getErrorPath)(i,n.Type.Str)}`:e;return[r.default.instancePath,(0,t.strConcat)(r.default.instancePath,a)]}function m({keyword:e,it:{errSchemaPath:r}},{schemaPath:i,parentSchema:a}){let o=a?r:(0,t.str)`${r}/${e}`;return i&&(o=(0,t.str)`${o}${(0,n.getErrorPath)(i,n.Type.Str)}`),[u.schemaPath,o]}function h(e,{params:n,message:i},a){let{keyword:o,data:s,schemaValue:c,it:l}=e,{opts:d,propertyName:f,topSchemaRef:p,schemaPath:m}=l;a.push([u.keyword,o],[u.params,typeof n==`function`?n(e):n||(0,t._)`{}`]),d.messages&&a.push([u.message,typeof i==`function`?i(e):i]),d.verbose&&a.push([u.schema,c],[u.parentSchema,(0,t._)`${p}${m}`],[r.default.data,s]),f&&a.push([u.propertyName,f])}})),cve=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.boolOrEmptySchema=e.topBoolOrEmptySchema=void 0;var t=Y8(),n=K8(),r=J8(),i={message:`boolean schema is false`};function a(e){let{gen:t,schema:i,validateName:a}=e;i===!1?s(e,!1):typeof i==`object`&&i.$async===!0?t.return(r.default.data):(t.assign((0,n._)`${a}.errors`,null),t.return(!0))}e.topBoolOrEmptySchema=a;function o(e,t){let{gen:n,schema:r}=e;r===!1?(n.var(t,!1),s(e)):n.var(t,!0)}e.boolOrEmptySchema=o;function s(e,n){let{gen:r,data:a}=e,o={gen:r,keyword:`false schema`,data:a,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,t.reportError)(o,i,void 0,n)}})),X8=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getRules=e.isJSONType=void 0;var t=new Set([`string`,`number`,`integer`,`boolean`,`null`,`object`,`array`]);function n(e){return typeof e==`string`&&t.has(e)}e.isJSONType=n;function r(){let e={number:{type:`number`,rules:[]},string:{type:`string`,rules:[]},array:{type:`array`,rules:[]},object:{type:`object`,rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}e.getRules=r})),Z8=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.shouldUseRule=e.shouldUseGroup=e.schemaHasRulesForType=void 0;function t({schema:e,self:t},r){let i=t.RULES.types[r];return i&&i!==!0&&n(e,i)}e.schemaHasRulesForType=t;function n(e,t){return t.rules.some(t=>r(e,t))}e.shouldUseGroup=n;function r(e,t){return e[t.keyword]!==void 0||t.definition.implements?.some(t=>e[t]!==void 0)}e.shouldUseRule=r})),Q8=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.reportTypeError=e.checkDataTypes=e.checkDataType=e.coerceAndCheckDataType=e.getJSONTypes=e.getSchemaTypes=e.DataType=void 0;var t=X8(),n=Z8(),r=Y8(),i=K8(),a=q8(),o;(function(e){e[e.Correct=0]=`Correct`,e[e.Wrong=1]=`Wrong`})(o||(e.DataType=o={}));function s(e){let t=c(e.type);if(t.includes(`null`)){if(e.nullable===!1)throw Error(`type: null contradicts nullable: false`)}else{if(!t.length&&e.nullable!==void 0)throw Error(`"nullable" cannot be used without "type"`);e.nullable===!0&&t.push(`null`)}return t}e.getSchemaTypes=s;function c(e){let n=Array.isArray(e)?e:e?[e]:[];if(n.every(t.isJSONType))return n;throw Error(`type must be JSONType or JSONType[]: `+n.join(`,`))}e.getJSONTypes=c;function l(e,t){let{gen:r,data:i,opts:a}=e,s=d(t,a.coerceTypes),c=t.length>0&&!(s.length===0&&t.length===1&&(0,n.schemaHasRulesForType)(e,t[0]));if(c){let n=h(t,i,a.strictNumbers,o.Wrong);r.if(n,()=>{s.length?f(e,t,s):_(e)})}return c}e.coerceAndCheckDataType=l;var u=new Set([`string`,`number`,`integer`,`boolean`,`null`]);function d(e,t){return t?e.filter(e=>u.has(e)||t===`array`&&e===`array`):[]}function f(e,t,n){let{gen:r,data:a,opts:o}=e,s=r.let(`dataType`,(0,i._)`typeof ${a}`),c=r.let(`coerced`,(0,i._)`undefined`);o.coerceTypes===`array`&&r.if((0,i._)`${s} == 'object' && Array.isArray(${a}) && ${a}.length == 1`,()=>r.assign(a,(0,i._)`${a}[0]`).assign(s,(0,i._)`typeof ${a}`).if(h(t,a,o.strictNumbers),()=>r.assign(c,a))),r.if((0,i._)`${c} !== undefined`);for(let e of n)(u.has(e)||e===`array`&&o.coerceTypes===`array`)&&l(e);r.else(),_(e),r.endIf(),r.if((0,i._)`${c} !== undefined`,()=>{r.assign(a,c),p(e,c)});function l(e){switch(e){case`string`:r.elseIf((0,i._)`${s} == "number" || ${s} == "boolean"`).assign(c,(0,i._)`"" + ${a}`).elseIf((0,i._)`${a} === null`).assign(c,(0,i._)`""`);return;case`number`:r.elseIf((0,i._)`${s} == "boolean" || ${a} === null
266
+ || (${s} == "string" && ${a} && ${a} == +${a})`).assign(c,(0,i._)`+${a}`);return;case`integer`:r.elseIf((0,i._)`${s} === "boolean" || ${a} === null
267
+ || (${s} === "string" && ${a} && ${a} == +${a} && !(${a} % 1))`).assign(c,(0,i._)`+${a}`);return;case`boolean`:r.elseIf((0,i._)`${a} === "false" || ${a} === 0 || ${a} === null`).assign(c,!1).elseIf((0,i._)`${a} === "true" || ${a} === 1`).assign(c,!0);return;case`null`:r.elseIf((0,i._)`${a} === "" || ${a} === 0 || ${a} === false`),r.assign(c,null);return;case`array`:r.elseIf((0,i._)`${s} === "string" || ${s} === "number"
268
+ || ${s} === "boolean" || ${a} === null`).assign(c,(0,i._)`[${a}]`)}}}function p({gen:e,parentData:t,parentDataProperty:n},r){e.if((0,i._)`${t} !== undefined`,()=>e.assign((0,i._)`${t}[${n}]`,r))}function m(e,t,n,r=o.Correct){let a=r===o.Correct?i.operators.EQ:i.operators.NEQ,s;switch(e){case`null`:return(0,i._)`${t} ${a} null`;case`array`:s=(0,i._)`Array.isArray(${t})`;break;case`object`:s=(0,i._)`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case`integer`:s=c((0,i._)`!(${t} % 1) && !isNaN(${t})`);break;case`number`:s=c();break;default:return(0,i._)`typeof ${t} ${a} ${e}`}return r===o.Correct?s:(0,i.not)(s);function c(e=i.nil){return(0,i.and)((0,i._)`typeof ${t} == "number"`,e,n?(0,i._)`isFinite(${t})`:i.nil)}}e.checkDataType=m;function h(e,t,n,r){if(e.length===1)return m(e[0],t,n,r);let o,s=(0,a.toHash)(e);if(s.array&&s.object){let e=(0,i._)`typeof ${t} != "object"`;o=s.null?e:(0,i._)`!${t} || ${e}`,delete s.null,delete s.array,delete s.object}else o=i.nil;s.number&&delete s.integer;for(let e in s)o=(0,i.and)(o,m(e,t,n,r));return o}e.checkDataTypes=h;var g={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e==`string`?(0,i._)`{type: ${e}}`:(0,i._)`{type: ${t}}`};function _(e){let t=v(e);(0,r.reportError)(t,g)}e.reportTypeError=_;function v(e){let{gen:t,data:n,schema:r}=e,i=(0,a.schemaRefOrVal)(e,r,`type`);return{gen:t,keyword:`type`,data:n,schema:r.type,schemaCode:i,schemaValue:i,parentSchema:r,params:{},it:e}}})),lve=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.assignDefaults=void 0;var t=K8(),n=q8();function r(e,t){let{properties:n,items:r}=e.schema;if(t===`object`&&n)for(let t in n)i(e,t,n[t].default);else t===`array`&&Array.isArray(r)&&r.forEach((t,n)=>i(e,n,t.default))}e.assignDefaults=r;function i(e,r,i){let{gen:a,compositeRule:o,data:s,opts:c}=e;if(i===void 0)return;let l=(0,t._)`${s}${(0,t.getProperty)(r)}`;if(o){(0,n.checkStrictMode)(e,`default is ignored for: ${l}`);return}let u=(0,t._)`${l} === undefined`;c.useDefaults===`empty`&&(u=(0,t._)`${u} || ${l} === null || ${l} === ""`),a.if(u,(0,t._)`${l} = ${(0,t.stringify)(i)}`)}})),$8=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateUnion=e.validateArray=e.usePattern=e.callValidateCode=e.schemaProperties=e.allSchemaProperties=e.noPropertyInData=e.propertyInData=e.isOwnProperty=e.hasPropFunc=e.reportMissingProp=e.checkMissingProp=e.checkReportMissingProp=void 0;var t=K8(),n=q8(),r=J8(),i=q8();function a(e,n){let{gen:r,data:i,it:a}=e;r.if(d(r,i,n,a.opts.ownProperties),()=>{e.setParams({missingProperty:(0,t._)`${n}`},!0),e.error()})}e.checkReportMissingProp=a;function o({gen:e,data:n,it:{opts:r}},i,a){return(0,t.or)(...i.map(i=>(0,t.and)(d(e,n,i,r.ownProperties),(0,t._)`${a} = ${i}`)))}e.checkMissingProp=o;function s(e,t){e.setParams({missingProperty:t},!0),e.error()}e.reportMissingProp=s;function c(e){return e.scopeValue(`func`,{ref:Object.prototype.hasOwnProperty,code:(0,t._)`Object.prototype.hasOwnProperty`})}e.hasPropFunc=c;function l(e,n,r){return(0,t._)`${c(e)}.call(${n}, ${r})`}e.isOwnProperty=l;function u(e,n,r,i){let a=(0,t._)`${n}${(0,t.getProperty)(r)} !== undefined`;return i?(0,t._)`${a} && ${l(e,n,r)}`:a}e.propertyInData=u;function d(e,n,r,i){let a=(0,t._)`${n}${(0,t.getProperty)(r)} === undefined`;return i?(0,t.or)(a,(0,t.not)(l(e,n,r))):a}e.noPropertyInData=d;function f(e){return e?Object.keys(e).filter(e=>e!==`__proto__`):[]}e.allSchemaProperties=f;function p(e,t){return f(t).filter(r=>!(0,n.alwaysValidSchema)(e,t[r]))}e.schemaProperties=p;function m({schemaCode:e,data:n,it:{gen:i,topSchemaRef:a,schemaPath:o,errorPath:s},it:c},l,u,d){let f=d?(0,t._)`${e}, ${n}, ${a}${o}`:n,p=[[r.default.instancePath,(0,t.strConcat)(r.default.instancePath,s)],[r.default.parentData,c.parentData],[r.default.parentDataProperty,c.parentDataProperty],[r.default.rootData,r.default.rootData]];c.opts.dynamicRef&&p.push([r.default.dynamicAnchors,r.default.dynamicAnchors]);let m=(0,t._)`${f}, ${i.object(...p)}`;return u===t.nil?(0,t._)`${l}(${m})`:(0,t._)`${l}.call(${u}, ${m})`}e.callValidateCode=m;var h=(0,t._)`new RegExp`;function g({gen:e,it:{opts:n}},r){let a=n.unicodeRegExp?`u`:``,{regExp:o}=n.code,s=o(r,a);return e.scopeValue(`pattern`,{key:s.toString(),ref:s,code:(0,t._)`${o.code===`new RegExp`?h:(0,i.useFunc)(e,o)}(${r}, ${a})`})}e.usePattern=g;function _(e){let{gen:r,data:i,keyword:a,it:o}=e,s=r.name(`valid`);if(o.allErrors){let e=r.let(`valid`,!0);return c(()=>r.assign(e,!1)),e}return r.var(s,!0),c(()=>r.break()),s;function c(o){let c=r.const(`len`,(0,t._)`${i}.length`);r.forRange(`i`,0,c,i=>{e.subschema({keyword:a,dataProp:i,dataPropType:n.Type.Num},s),r.if((0,t.not)(s),o)})}}e.validateArray=_;function v(e){let{gen:r,schema:i,keyword:a,it:o}=e;if(!Array.isArray(i))throw Error(`ajv implementation error`);if(i.some(e=>(0,n.alwaysValidSchema)(o,e))&&!o.opts.unevaluated)return;let s=r.let(`valid`,!1),c=r.name(`_valid`);r.block(()=>i.forEach((n,i)=>{let o=e.subschema({keyword:a,schemaProp:i,compositeRule:!0},c);r.assign(s,(0,t._)`${s} || ${c}`),e.mergeValidEvaluated(o,c)||r.if((0,t.not)(s))})),e.result(s,()=>e.reset(),()=>e.error(!0))}e.validateUnion=v})),uve=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateKeywordUsage=e.validSchemaType=e.funcKeywordCode=e.macroKeywordCode=void 0;var t=K8(),n=J8(),r=$8(),i=Y8();function a(e,n){let{gen:r,keyword:i,schema:a,parentSchema:o,it:s}=e,c=n.macro.call(s.self,a,o,s),l=u(r,i,c);s.opts.validateSchema!==!1&&s.self.validateSchema(c,!0);let d=r.name(`valid`);e.subschema({schema:c,schemaPath:t.nil,errSchemaPath:`${s.errSchemaPath}/${i}`,topSchemaRef:l,compositeRule:!0},d),e.pass(d,()=>e.error(!0))}e.macroKeywordCode=a;function o(e,i){let{gen:a,keyword:o,schema:d,parentSchema:f,$data:p,it:m}=e;l(m,i);let h=u(a,o,!p&&i.compile?i.compile.call(m.self,d,f,m):i.validate),g=a.let(`valid`);e.block$data(g,_),e.ok(i.valid??g);function _(){if(i.errors===!1)b(),i.modifying&&s(e),x(()=>e.error());else{let t=i.async?v():y();i.modifying&&s(e),x(()=>c(e,t))}}function v(){let e=a.let(`ruleErrs`,null);return a.try(()=>b((0,t._)`await `),n=>a.assign(g,!1).if((0,t._)`${n} instanceof ${m.ValidationError}`,()=>a.assign(e,(0,t._)`${n}.errors`),()=>a.throw(n))),e}function y(){let e=(0,t._)`${h}.errors`;return a.assign(e,null),b(t.nil),e}function b(o=i.async?(0,t._)`await `:t.nil){let s=m.opts.passContext?n.default.this:n.default.self,c=!(`compile`in i&&!p||i.schema===!1);a.assign(g,(0,t._)`${o}${(0,r.callValidateCode)(e,h,s,c)}`,i.modifying)}function x(e){a.if((0,t.not)(i.valid??g),e)}}e.funcKeywordCode=o;function s(e){let{gen:n,data:r,it:i}=e;n.if(i.parentData,()=>n.assign(r,(0,t._)`${i.parentData}[${i.parentDataProperty}]`))}function c(e,r){let{gen:a}=e;a.if((0,t._)`Array.isArray(${r})`,()=>{a.assign(n.default.vErrors,(0,t._)`${n.default.vErrors} === null ? ${r} : ${n.default.vErrors}.concat(${r})`).assign(n.default.errors,(0,t._)`${n.default.vErrors}.length`),(0,i.extendErrors)(e)},()=>e.error())}function l({schemaEnv:e},t){if(t.async&&!e.$async)throw Error(`async keyword in sync schema`)}function u(e,n,r){if(r===void 0)throw Error(`keyword "${n}" failed to compile`);return e.scopeValue(`keyword`,typeof r==`function`?{ref:r}:{ref:r,code:(0,t.stringify)(r)})}function d(e,t,n=!1){return!t.length||t.some(t=>t===`array`?Array.isArray(e):t===`object`?e&&typeof e==`object`&&!Array.isArray(e):typeof e==t||n&&e===void 0)}e.validSchemaType=d;function f({schema:e,opts:t,self:n,errSchemaPath:r},i,a){if(Array.isArray(i.keyword)?!i.keyword.includes(a):i.keyword!==a)throw Error(`ajv implementation error`);let o=i.dependencies;if(o?.some(t=>!Object.prototype.hasOwnProperty.call(e,t)))throw Error(`parent schema must have dependencies of ${a}: ${o.join(`,`)}`);if(i.validateSchema&&!i.validateSchema(e[a])){let e=`keyword "${a}" value is invalid at path "${r}": `+n.errorsText(i.validateSchema.errors);if(t.validateSchema===`log`)n.logger.error(e);else throw Error(e)}}e.validateKeywordUsage=f})),dve=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.extendSubschemaMode=e.extendSubschemaData=e.getSubschema=void 0;var t=K8(),n=q8();function r(e,{keyword:r,schemaProp:i,schema:a,schemaPath:o,errSchemaPath:s,topSchemaRef:c}){if(r!==void 0&&a!==void 0)throw Error(`both "keyword" and "schema" passed, only one allowed`);if(r!==void 0){let a=e.schema[r];return i===void 0?{schema:a,schemaPath:(0,t._)`${e.schemaPath}${(0,t.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${r}`}:{schema:a[i],schemaPath:(0,t._)`${e.schemaPath}${(0,t.getProperty)(r)}${(0,t.getProperty)(i)}`,errSchemaPath:`${e.errSchemaPath}/${r}/${(0,n.escapeFragment)(i)}`}}if(a!==void 0){if(o===void 0||s===void 0||c===void 0)throw Error(`"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"`);return{schema:a,schemaPath:o,topSchemaRef:c,errSchemaPath:s}}throw Error(`either "keyword" or "schema" must be passed`)}e.getSubschema=r;function i(e,r,{dataProp:i,dataPropType:a,data:o,dataTypes:s,propertyName:c}){if(o!==void 0&&i!==void 0)throw Error(`both "data" and "dataProp" passed, only one allowed`);let{gen:l}=r;if(i!==void 0){let{errorPath:o,dataPathArr:s,opts:c}=r;u(l.let(`data`,(0,t._)`${r.data}${(0,t.getProperty)(i)}`,!0)),e.errorPath=(0,t.str)`${o}${(0,n.getErrorPath)(i,a,c.jsPropertySyntax)}`,e.parentDataProperty=(0,t._)`${i}`,e.dataPathArr=[...s,e.parentDataProperty]}o!==void 0&&(u(o instanceof t.Name?o:l.let(`data`,o,!0)),c!==void 0&&(e.propertyName=c)),s&&(e.dataTypes=s);function u(t){e.data=t,e.dataLevel=r.dataLevel+1,e.dataTypes=[],r.definedProperties=new Set,e.parentData=r.data,e.dataNames=[...r.dataNames,t]}}e.extendSubschemaData=i;function a(e,{jtdDiscriminator:t,jtdMetadata:n,compositeRule:r,createErrors:i,allErrors:a}){r!==void 0&&(e.compositeRule=r),i!==void 0&&(e.createErrors=i),a!==void 0&&(e.allErrors=a),e.jtdDiscriminator=t,e.jtdMetadata=n}e.extendSubschemaMode=a})),e5=s(((e,t)=>{t.exports=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t==`object`&&typeof n==`object`){if(t.constructor!==n.constructor)return!1;var r,i,a;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!e(t[i],n[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(a=Object.keys(t),r=a.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,a[i]))return!1;for(i=r;i--!==0;){var o=a[i];if(!e(t[o],n[o]))return!1}return!0}return t!==t&&n!==n}})),fve=s(((e,t)=>{var n=t.exports=function(e,t,n){typeof t==`function`&&(n=t,t={}),n=t.cb||n;var i=typeof n==`function`?n:n.pre||function(){},a=n.post||function(){};r(t,i,a,e,``,e)};n.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},n.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},n.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},n.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function r(e,t,a,o,s,c,l,u,d,f){if(o&&typeof o==`object`&&!Array.isArray(o)){for(var p in t(o,s,c,l,u,d,f),o){var m=o[p];if(Array.isArray(m)){if(p in n.arrayKeywords)for(var h=0;h<m.length;h++)r(e,t,a,m[h],s+`/`+p+`/`+h,c,s,p,o,h)}else if(p in n.propsKeywords){if(m&&typeof m==`object`)for(var g in m)r(e,t,a,m[g],s+`/`+p+`/`+i(g),c,s,p,o,g)}else(p in n.keywords||e.allKeys&&!(p in n.skipKeywords))&&r(e,t,a,m,s+`/`+p,c,s,p,o)}a(o,s,c,l,u,d,f)}}function i(e){return e.replace(/~/g,`~0`).replace(/\//g,`~1`)}})),t5=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getSchemaRefs=e.resolveUrl=e.normalizeId=e._getFullPath=e.getFullPath=e.inlineRef=void 0;var t=q8(),n=e5(),r=fve(),i=new Set([`type`,`format`,`pattern`,`maxLength`,`minLength`,`maxProperties`,`minProperties`,`maxItems`,`minItems`,`maximum`,`minimum`,`uniqueItems`,`multipleOf`,`required`,`enum`,`const`]);function a(e,t=!0){return typeof e==`boolean`?!0:t===!0?!s(e):t?c(e)<=t:!1}e.inlineRef=a;var o=new Set([`$ref`,`$recursiveRef`,`$recursiveAnchor`,`$dynamicRef`,`$dynamicAnchor`]);function s(e){for(let t in e){if(o.has(t))return!0;let n=e[t];if(Array.isArray(n)&&n.some(s)||typeof n==`object`&&s(n))return!0}return!1}function c(e){let n=0;for(let r in e)if(r===`$ref`||(n++,!i.has(r)&&(typeof e[r]==`object`&&(0,t.eachItem)(e[r],e=>n+=c(e)),n===1/0)))return 1/0;return n}function l(e,t=``,n){return n!==!1&&(t=f(t)),u(e,e.parse(t))}e.getFullPath=l;function u(e,t){return e.serialize(t).split(`#`)[0]+`#`}e._getFullPath=u;var d=/#\/?$/;function f(e){return e?e.replace(d,``):``}e.normalizeId=f;function p(e,t,n){return n=f(n),e.resolve(t,n)}e.resolveUrl=p;var m=/^[a-z_][-a-z0-9._]*$/i;function h(e,t){if(typeof e==`boolean`)return{};let{schemaId:i,uriResolver:a}=this.opts,o=f(e[i]||t),s={"":o},c=l(a,o,!1),u={},d=new Set;return r(e,{allKeys:!0},(e,t,n,r)=>{if(r===void 0)return;let a=c+t,o=s[r];typeof e[i]==`string`&&(o=l.call(this,e[i])),g.call(this,e.$anchor),g.call(this,e.$dynamicAnchor),s[t]=o;function l(t){let n=this.opts.uriResolver.resolve;if(t=f(o?n(o,t):t),d.has(t))throw h(t);d.add(t);let r=this.refs[t];return typeof r==`string`&&(r=this.refs[r]),typeof r==`object`?p(e,r.schema,t):t!==f(a)&&(t[0]===`#`?(p(e,u[t],t),u[t]=e):this.refs[t]=a),t}function g(e){if(typeof e==`string`){if(!m.test(e))throw Error(`invalid anchor "${e}"`);l.call(this,`#${e}`)}}}),u;function p(e,t,r){if(t!==void 0&&!n(e,t))throw h(r)}function h(e){return Error(`reference "${e}" resolves to more than one schema`)}}e.getSchemaRefs=h})),n5=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getData=e.KeywordCxt=e.validateFunctionCode=void 0;var t=cve(),n=Q8(),r=Z8(),i=Q8(),a=lve(),o=uve(),s=dve(),c=K8(),l=J8(),u=t5(),d=q8(),f=Y8();function p(e){if(S(e)&&(w(e),x(e))){_(e);return}m(e,()=>(0,t.topBoolOrEmptySchema)(e))}e.validateFunctionCode=p;function m({gen:e,validateName:t,schema:n,schemaEnv:r,opts:i},a){i.code.es5?e.func(t,(0,c._)`${l.default.data}, ${l.default.valCxt}`,r.$async,()=>{e.code((0,c._)`"use strict"; ${y(n,i)}`),g(e,i),e.code(a)}):e.func(t,(0,c._)`${l.default.data}, ${h(i)}`,r.$async,()=>e.code(y(n,i)).code(a))}function h(e){return(0,c._)`{${l.default.instancePath}="", ${l.default.parentData}, ${l.default.parentDataProperty}, ${l.default.rootData}=${l.default.data}${e.dynamicRef?(0,c._)`, ${l.default.dynamicAnchors}={}`:c.nil}}={}`}function g(e,t){e.if(l.default.valCxt,()=>{e.var(l.default.instancePath,(0,c._)`${l.default.valCxt}.${l.default.instancePath}`),e.var(l.default.parentData,(0,c._)`${l.default.valCxt}.${l.default.parentData}`),e.var(l.default.parentDataProperty,(0,c._)`${l.default.valCxt}.${l.default.parentDataProperty}`),e.var(l.default.rootData,(0,c._)`${l.default.valCxt}.${l.default.rootData}`),t.dynamicRef&&e.var(l.default.dynamicAnchors,(0,c._)`${l.default.valCxt}.${l.default.dynamicAnchors}`)},()=>{e.var(l.default.instancePath,(0,c._)`""`),e.var(l.default.parentData,(0,c._)`undefined`),e.var(l.default.parentDataProperty,(0,c._)`undefined`),e.var(l.default.rootData,l.default.data),t.dynamicRef&&e.var(l.default.dynamicAnchors,(0,c._)`{}`)})}function _(e){let{schema:t,opts:n,gen:r}=e;m(e,()=>{n.$comment&&t.$comment&&A(e),D(e),r.let(l.default.vErrors,null),r.let(l.default.errors,0),n.unevaluated&&v(e),T(e),j(e)})}function v(e){let{gen:t,validateName:n}=e;e.evaluated=t.const(`evaluated`,(0,c._)`${n}.evaluated`),t.if((0,c._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,c._)`${e.evaluated}.props`,(0,c._)`undefined`)),t.if((0,c._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,c._)`${e.evaluated}.items`,(0,c._)`undefined`))}function y(e,t){let n=typeof e==`object`&&e[t.schemaId];return n&&(t.code.source||t.code.process)?(0,c._)`/*# sourceURL=${n} */`:c.nil}function b(e,n){if(S(e)&&(w(e),x(e))){C(e,n);return}(0,t.boolOrEmptySchema)(e,n)}function x({schema:e,self:t}){if(typeof e==`boolean`)return!e;for(let n in e)if(t.RULES.all[n])return!0;return!1}function S(e){return typeof e.schema!=`boolean`}function C(e,t){let{schema:n,gen:r,opts:i}=e;i.$comment&&n.$comment&&A(e),O(e),k(e);let a=r.const(`_errs`,l.default.errors);T(e,a),r.var(t,(0,c._)`${a} === ${l.default.errors}`)}function w(e){(0,d.checkUnknownRules)(e),E(e)}function T(e,t){if(e.opts.jtd)return N(e,[],!1,t);let r=(0,n.getSchemaTypes)(e.schema);N(e,r,!(0,n.coerceAndCheckDataType)(e,r),t)}function E(e){let{schema:t,errSchemaPath:n,opts:r,self:i}=e;t.$ref&&r.ignoreKeywordsWithRef&&(0,d.schemaHasRulesButRef)(t,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${n}"`)}function D(e){let{schema:t,opts:n}=e;t.default!==void 0&&n.useDefaults&&n.strictSchema&&(0,d.checkStrictMode)(e,`default is ignored in the schema root`)}function O(e){let t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,u.resolveUrl)(e.opts.uriResolver,e.baseId,t))}function k(e){if(e.schema.$async&&!e.schemaEnv.$async)throw Error(`async schema in sync schema`)}function A({gen:e,schemaEnv:t,schema:n,errSchemaPath:r,opts:i}){let a=n.$comment;if(i.$comment===!0)e.code((0,c._)`${l.default.self}.logger.log(${a})`);else if(typeof i.$comment==`function`){let n=(0,c.str)`${r}/$comment`,i=e.scopeValue(`root`,{ref:t.root});e.code((0,c._)`${l.default.self}.opts.$comment(${a}, ${n}, ${i}.schema)`)}}function j(e){let{gen:t,schemaEnv:n,validateName:r,ValidationError:i,opts:a}=e;n.$async?t.if((0,c._)`${l.default.errors} === 0`,()=>t.return(l.default.data),()=>t.throw((0,c._)`new ${i}(${l.default.vErrors})`)):(t.assign((0,c._)`${r}.errors`,l.default.vErrors),a.unevaluated&&M(e),t.return((0,c._)`${l.default.errors} === 0`))}function M({gen:e,evaluated:t,props:n,items:r}){n instanceof c.Name&&e.assign((0,c._)`${t}.props`,n),r instanceof c.Name&&e.assign((0,c._)`${t}.items`,r)}function N(e,t,n,a){let{gen:o,schema:s,data:u,allErrors:f,opts:p,self:m}=e,{RULES:h}=m;if(s.$ref&&(p.ignoreKeywordsWithRef||!(0,d.schemaHasRulesButRef)(s,h))){o.block(()=>re(e,`$ref`,h.all.$ref.definition));return}p.jtd||F(e,t),o.block(()=>{for(let e of h.rules)g(e);g(h.post)});function g(d){(0,r.shouldUseGroup)(s,d)&&(d.type?(o.if((0,i.checkDataType)(d.type,u,p.strictNumbers)),P(e,d),t.length===1&&t[0]===d.type&&n&&(o.else(),(0,i.reportTypeError)(e)),o.endIf()):P(e,d),f||o.if((0,c._)`${l.default.errors} === ${a||0}`))}}function P(e,t){let{gen:n,schema:i,opts:{useDefaults:o}}=e;o&&(0,a.assignDefaults)(e,t.type),n.block(()=>{for(let n of t.rules)(0,r.shouldUseRule)(i,n)&&re(e,n.keyword,n.definition,t.type)})}function F(e,t){e.schemaEnv.meta||!e.opts.strictTypes||(I(e,t),e.opts.allowUnionTypes||L(e,t),ee(e,e.dataTypes))}function I(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(t=>{ne(e.dataTypes,t)||z(e,`type "${t}" not allowed by context "${e.dataTypes.join(`,`)}"`)}),R(e,t)}}function L(e,t){t.length>1&&!(t.length===2&&t.includes(`null`))&&z(e,`use allowUnionTypes to allow union type keyword`)}function ee(e,t){let n=e.self.RULES.all;for(let i in n){let a=n[i];if(typeof a==`object`&&(0,r.shouldUseRule)(e.schema,a)){let{type:n}=a.definition;n.length&&!n.some(e=>te(t,e))&&z(e,`missing type "${n.join(`,`)}" for keyword "${i}"`)}}}function te(e,t){return e.includes(t)||t===`number`&&e.includes(`integer`)}function ne(e,t){return e.includes(t)||t===`integer`&&e.includes(`number`)}function R(e,t){let n=[];for(let r of e.dataTypes)ne(t,r)?n.push(r):t.includes(`integer`)&&r===`number`&&n.push(`integer`);e.dataTypes=n}function z(e,t){let n=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${n}" (strictTypes)`,(0,d.checkStrictMode)(e,t,e.opts.strictTypes)}var B=class{constructor(e,t,n){if((0,o.validateKeywordUsage)(e,t,n),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=n,this.data=e.data,this.schema=e.schema[n],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,d.schemaRefOrVal)(e,this.schema,n,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const(`vSchema`,oe(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,o.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw Error(`${n} value must be ${JSON.stringify(t.schemaType)}`);(`code`in t?t.trackErrors:t.errors!==!1)&&(this.errsCount=e.gen.const(`_errs`,l.default.errors))}result(e,t,n){this.failResult((0,c.not)(e),t,n)}failResult(e,t,n){this.gen.if(e),n?n():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,t){this.failResult((0,c.not)(e),void 0,t)}fail(e){if(e===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);let{schemaCode:t}=this;this.fail((0,c._)`${t} !== undefined && (${(0,c.or)(this.invalid$data(),e)})`)}error(e,t,n){if(t){this.setParams(t),this._error(e,n),this.setParams({});return}this._error(e,n)}_error(e,t){(e?f.reportExtraError:f.reportError)(this,this.def.error,t)}$dataError(){(0,f.reportError)(this,this.def.$dataError||f.keyword$DataError)}reset(){if(this.errsCount===void 0)throw Error(`add "trackErrors" to keyword definition`);(0,f.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,t){t?Object.assign(this.params,e):this.params=e}block$data(e,t,n=c.nil){this.gen.block(()=>{this.check$data(e,n),t()})}check$data(e=c.nil,t=c.nil){if(!this.$data)return;let{gen:n,schemaCode:r,schemaType:i,def:a}=this;n.if((0,c.or)((0,c._)`${r} === undefined`,t)),e!==c.nil&&n.assign(e,!0),(i.length||a.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),e!==c.nil&&n.assign(e,!1)),n.else()}invalid$data(){let{gen:e,schemaCode:t,schemaType:n,def:r,it:a}=this;return(0,c.or)(o(),s());function o(){if(n.length){if(!(t instanceof c.Name))throw Error(`ajv implementation error`);let e=Array.isArray(n)?n:[n];return(0,c._)`${(0,i.checkDataTypes)(e,t,a.opts.strictNumbers,i.DataType.Wrong)}`}return c.nil}function s(){if(r.validateSchema){let n=e.scopeValue(`validate$data`,{ref:r.validateSchema});return(0,c._)`!${n}(${t})`}return c.nil}}subschema(e,t){let n=(0,s.getSubschema)(this.it,e);(0,s.extendSubschemaData)(n,this.it,e),(0,s.extendSubschemaMode)(n,e);let r={...this.it,...n,items:void 0,props:void 0};return b(r,t),r}mergeEvaluated(e,t){let{it:n,gen:r}=this;n.opts.unevaluated&&(n.props!==!0&&e.props!==void 0&&(n.props=d.mergeEvaluated.props(r,e.props,n.props,t)),n.items!==!0&&e.items!==void 0&&(n.items=d.mergeEvaluated.items(r,e.items,n.items,t)))}mergeValidEvaluated(e,t){let{it:n,gen:r}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return r.if(t,()=>this.mergeEvaluated(e,c.Name)),!0}};e.KeywordCxt=B;function re(e,t,n,r){let i=new B(e,n,t);`code`in n?n.code(i,r):i.$data&&n.validate?(0,o.funcKeywordCode)(i,n):`macro`in n?(0,o.macroKeywordCode)(i,n):(n.compile||n.validate)&&(0,o.funcKeywordCode)(i,n)}var ie=/^\/(?:[^~]|~0|~1)*$/,ae=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function oe(e,{dataLevel:t,dataNames:n,dataPathArr:r}){let i,a;if(e===``)return l.default.rootData;if(e[0]===`/`){if(!ie.test(e))throw Error(`Invalid JSON-pointer: ${e}`);i=e,a=l.default.rootData}else{let o=ae.exec(e);if(!o)throw Error(`Invalid JSON-pointer: ${e}`);let s=+o[1];if(i=o[2],i===`#`){if(s>=t)throw Error(u(`property/index`,s));return r[t-s]}if(s>t)throw Error(u(`data`,s));if(a=n[t-s],!i)return a}let o=a,s=i.split(`/`);for(let e of s)e&&(a=(0,c._)`${a}${(0,c.getProperty)((0,d.unescapeJsonPointer)(e))}`,o=(0,c._)`${o} && ${a}`);return o;function u(e,n){return`Cannot access ${e} ${n} levels up, current level is ${t}`}}e.getData=oe})),r5=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=class extends Error{constructor(e){super(`validation failed`),this.errors=e,this.ajv=this.validation=!0}}})),i5=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=t5();e.default=class extends Error{constructor(e,n,r,i){super(i||`can't resolve reference ${r} from id ${n}`),this.missingRef=(0,t.resolveUrl)(e,n,r),this.missingSchema=(0,t.normalizeId)((0,t.getFullPath)(e,this.missingRef))}}})),a5=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.resolveSchema=e.getCompilingSchema=e.resolveRef=e.compileSchema=e.SchemaEnv=void 0;var t=K8(),n=r5(),r=J8(),i=t5(),a=q8(),o=n5(),s=class{constructor(e){this.refs={},this.dynamicAnchors={};let t;typeof e.schema==`object`&&(t=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=e.baseId??(0,i.normalizeId)(t?.[e.schemaId||`$id`]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=t?.$async,this.refs={}}};e.SchemaEnv=s;function c(e){let a=d.call(this,e);if(a)return a;let s=(0,i.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:c,lines:l}=this.opts.code,{ownProperties:u}=this.opts,f=new t.CodeGen(this.scope,{es5:c,lines:l,ownProperties:u}),p;e.$async&&(p=f.scopeValue(`Error`,{ref:n.default,code:(0,t._)`require("ajv/dist/runtime/validation_error").default`}));let m=f.scopeName(`validate`);e.validateName=m;let h={gen:f,allErrors:this.opts.allErrors,data:r.default.data,parentData:r.default.parentData,parentDataProperty:r.default.parentDataProperty,dataNames:[r.default.data],dataPathArr:[t.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:f.scopeValue(`schema`,this.opts.code.source===!0?{ref:e.schema,code:(0,t.stringify)(e.schema)}:{ref:e.schema}),validateName:m,ValidationError:p,schema:e.schema,schemaEnv:e,rootId:s,baseId:e.baseId||s,schemaPath:t.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?``:`#`),errorPath:(0,t._)`""`,opts:this.opts,self:this},g;try{this._compilations.add(e),(0,o.validateFunctionCode)(h),f.optimize(this.opts.code.optimize);let n=f.toString();g=`${f.scopeRefs(r.default.scope)}return ${n}`,this.opts.code.process&&(g=this.opts.code.process(g,e));let i=Function(`${r.default.self}`,`${r.default.scope}`,g)(this,this.scope.get());if(this.scope.value(m,{ref:i}),i.errors=null,i.schema=e.schema,i.schemaEnv=e,e.$async&&(i.$async=!0),this.opts.code.source===!0&&(i.source={validateName:m,validateCode:n,scopeValues:f._values}),this.opts.unevaluated){let{props:e,items:n}=h;i.evaluated={props:e instanceof t.Name?void 0:e,items:n instanceof t.Name?void 0:n,dynamicProps:e instanceof t.Name,dynamicItems:n instanceof t.Name},i.source&&(i.source.evaluated=(0,t.stringify)(i.evaluated))}return e.validate=i,e}catch(t){throw delete e.validate,delete e.validateName,g&&this.logger.error(`Error compiling schema, function code:`,g),t}finally{this._compilations.delete(e)}}e.compileSchema=c;function l(e,t,n){n=(0,i.resolveUrl)(this.opts.uriResolver,t,n);let r=e.refs[n];if(r)return r;let a=p.call(this,e,n);if(a===void 0){let r=e.localRefs?.[n],{schemaId:i}=this.opts;r&&(a=new s({schema:r,schemaId:i,root:e,baseId:t}))}if(a!==void 0)return e.refs[n]=u.call(this,a)}e.resolveRef=l;function u(e){return(0,i.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:c.call(this,e)}function d(e){for(let t of this._compilations)if(f(t,e))return t}e.getCompilingSchema=d;function f(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function p(e,t){let n;for(;typeof(n=this.refs[t])==`string`;)t=n;return n||this.schemas[t]||m.call(this,e,t)}function m(e,t){let n=this.opts.uriResolver.parse(t),r=(0,i._getFullPath)(this.opts.uriResolver,n),a=(0,i.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&r===a)return g.call(this,n,e);let o=(0,i.normalizeId)(r),l=this.refs[o]||this.schemas[o];if(typeof l==`string`){let t=m.call(this,e,l);return typeof t?.schema==`object`?g.call(this,n,t):void 0}if(typeof l?.schema==`object`){if(l.validate||c.call(this,l),o===(0,i.normalizeId)(t)){let{schema:t}=l,{schemaId:n}=this.opts,r=t[n];return r&&(a=(0,i.resolveUrl)(this.opts.uriResolver,a,r)),new s({schema:t,schemaId:n,root:e,baseId:a})}return g.call(this,n,l)}}e.resolveSchema=m;var h=new Set([`properties`,`patternProperties`,`enum`,`dependencies`,`definitions`]);function g(e,{baseId:t,schema:n,root:r}){if(e.fragment?.[0]!==`/`)return;for(let r of e.fragment.slice(1).split(`/`)){if(typeof n==`boolean`)return;let e=n[(0,a.unescapeFragment)(r)];if(e===void 0)return;n=e;let o=typeof n==`object`&&n[this.opts.schemaId];!h.has(r)&&o&&(t=(0,i.resolveUrl)(this.opts.uriResolver,t,o))}let o;if(typeof n!=`boolean`&&n.$ref&&!(0,a.schemaHasRulesButRef)(n,this.RULES)){let e=(0,i.resolveUrl)(this.opts.uriResolver,t,n.$ref);o=m.call(this,r,e)}let{schemaId:c}=this.opts;if(o||=new s({schema:n,schemaId:c,root:r,baseId:t}),o.schema!==o.root.schema)return o}})),pve=c({$id:()=>o5,additionalProperties:()=>!1,default:()=>d5,description:()=>s5,properties:()=>u5,required:()=>l5,type:()=>c5}),o5,s5,c5,l5,u5,d5,mve=o((()=>{o5=`https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#`,s5=`Meta-schema for $data reference (JSON AnySchema extension proposal)`,c5=`object`,l5=[`$data`],u5={$data:{type:`string`,anyOf:[{format:`relative-json-pointer`},{format:`json-pointer`}]}},d5={$id:o5,description:s5,type:c5,required:l5,properties:u5,additionalProperties:!1}})),f5=s(((e,t)=>{var n=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),r=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u),i=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),a=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),o=RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);function s(e){let t=``,n=0,r=0;for(r=0;r<e.length;r++)if(n=e[r].charCodeAt(0),n!==48){if(!(n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102))return``;t+=e[r];break}for(r+=1;r<e.length;r++){if(n=e[r].charCodeAt(0),!(n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102))return``;t+=e[r]}return t}var c=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function l(e){return e.length=0,!0}function u(e,t,n){if(e.length){let r=s(e);if(r!==``)t.push(r);else return n.error=!0,!1;e.length=0}return!0}function d(e){let t=0,n={error:!1,address:``,zone:``},r=[],i=[],a=!1,o=!1,c=u;for(let s=0;s<e.length;s++){let u=e[s];if(!(u===`[`||u===`]`))if(u===`:`){if(a===!0&&(o=!0),!c(i,r,n))break;if(++t>7){n.error=!0;break}s>0&&e[s-1]===`:`&&(a=!0),r.push(`:`);continue}else if(u===`%`){if(!c(i,r,n))break;c=l}else{i.push(u);continue}}return i.length&&(c===l?n.zone=i.join(``):o?r.push(i.join(``)):r.push(s(i))),n.address=r.join(``),n}function f(e){if(p(e,`:`)<2)return{host:e,isIPV6:!1};let t=d(e);if(t.error)return{host:e,isIPV6:!1};{let e=t.address,n=t.address;return t.zone&&(e+=`%`+t.zone,n+=`%25`+t.zone),{host:e,isIPV6:!0,escapedHost:n}}}function p(e,t){let n=0;for(let r=0;r<e.length;r++)e[r]===t&&n++;return n}function m(e){let t=e,n=[],r=-1,i=0;for(;i=t.length;){if(i===1){if(t===`.`)break;if(t===`/`){n.push(`/`);break}else{n.push(t);break}}else if(i===2){if(t[0]===`.`){if(t[1]===`.`)break;if(t[1]===`/`){t=t.slice(2);continue}}else if(t[0]===`/`&&(t[1]===`.`||t[1]===`/`)){n.push(`/`);break}}else if(i===3&&t===`/..`){n.length!==0&&n.pop(),n.push(`/`);break}if(t[0]===`.`){if(t[1]===`.`){if(t[2]===`/`){t=t.slice(3);continue}}else if(t[1]===`/`){t=t.slice(2);continue}}else if(t[0]===`/`&&t[1]===`.`){if(t[2]===`/`){t=t.slice(2);continue}else if(t[2]===`.`&&t[3]===`/`){t=t.slice(3),n.length!==0&&n.pop();continue}}if((r=t.indexOf(`/`,1))===-1){n.push(t);break}else n.push(t.slice(0,r)),t=t.slice(r)}return n.join(``)}var h={"@":`%40`,"/":`%2F`,"?":`%3F`,"#":`%23`,":":`%3A`},g=/[@/?#:]/g,_=/[@/?#]/g;function v(e,t){let n=t?_:g;return n.lastIndex=0,e.replace(n,e=>h[e])}function y(e,t=!1){if(e.indexOf(`%`)===-1)return e;let n=``;for(let r=0;r<e.length;r++){if(e[r]===`%`&&r+2<e.length){let o=e.slice(r+1,r+3);if(i(o)){let e=o.toUpperCase(),i=String.fromCharCode(parseInt(e,16));t&&a(i)?n+=i:n+=`%`+e,r+=2;continue}}n+=e[r]}return n}function b(e){let t=``;for(let n=0;n<e.length;n++){if(e[n]===`%`&&n+2<e.length){let r=e.slice(n+1,n+3);if(i(r)){let e=r.toUpperCase(),i=String.fromCharCode(parseInt(e,16));i!==`.`&&a(i)?t+=i:t+=`%`+e,n+=2;continue}}o(e[n])?t+=e[n]:t+=escape(e[n])}return t}function x(e){let t=``;for(let n=0;n<e.length;n++){if(e[n]===`%`&&n+2<e.length){let r=e.slice(n+1,n+3);if(i(r)){t+=`%`+r.toUpperCase(),n+=2;continue}}t+=escape(e[n])}return t}function S(e){let t=[];if(e.userinfo!==void 0&&(t.push(e.userinfo),t.push(`@`)),e.host!==void 0){let n=unescape(e.host);if(!r(n)){let e=f(n);n=e.isIPV6===!0?`[${e.escapedHost}]`:v(n,!1)}t.push(n)}return(typeof e.port==`number`||typeof e.port==`string`)&&(t.push(`:`),t.push(String(e.port))),t.length?t.join(``):void 0}t.exports={nonSimpleDomain:c,recomposeAuthority:S,reescapeHostDelimiters:v,normalizePercentEncoding:y,normalizePathEncoding:b,escapePreservingEscapes:x,removeDotSegments:m,isIPv4:r,isUUID:n,normalizeIPv6:f,stringArrayToHexStripped:s}})),hve=s(((e,t)=>{var{isUUID:n}=f5(),r=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,i=[`http`,`https`,`ws`,`wss`,`urn`,`urn:uuid`];function a(e){return i.indexOf(e)!==-1}function o(e){return e.secure===!0?!0:e.secure===!1?!1:e.scheme?e.scheme.length===3&&(e.scheme[0]===`w`||e.scheme[0]===`W`)&&(e.scheme[1]===`s`||e.scheme[1]===`S`)&&(e.scheme[2]===`s`||e.scheme[2]===`S`):!1}function s(e){return e.host||(e.error=e.error||`HTTP URIs must have a host.`),e}function c(e){let t=String(e.scheme).toLowerCase()===`https`;return(e.port===(t?443:80)||e.port===``)&&(e.port=void 0),e.path||=`/`,e}function l(e){return e.secure=o(e),e.resourceName=(e.path||`/`)+(e.query?`?`+e.query:``),e.path=void 0,e.query=void 0,e}function u(e){if((e.port===(o(e)?443:80)||e.port===``)&&(e.port=void 0),typeof e.secure==`boolean`&&(e.scheme=e.secure?`wss`:`ws`,e.secure=void 0),e.resourceName){let[t,n]=e.resourceName.split(`?`);e.path=t&&t!==`/`?t:void 0,e.query=n,e.resourceName=void 0}return e.fragment=void 0,e}function d(e,t){if(!e.path)return e.error=`URN can not be parsed`,e;let n=e.path.match(r);if(n){let r=t.scheme||e.scheme||`urn`;e.nid=n[1].toLowerCase(),e.nss=n[2];let i=y(`${r}:${t.nid||e.nid}`);e.path=void 0,i&&(e=i.parse(e,t))}else e.error=e.error||`URN can not be parsed.`;return e}function f(e,t){if(e.nid===void 0)throw Error(`URN without nid cannot be serialized`);let n=t.scheme||e.scheme||`urn`,r=e.nid.toLowerCase(),i=y(`${n}:${t.nid||r}`);i&&(e=i.serialize(e,t));let a=e,o=e.nss;return a.path=`${r||t.nid}:${o}`,t.skipEscape=!0,a}function p(e,t){let r=e;return r.uuid=r.nss,r.nss=void 0,!t.tolerant&&(!r.uuid||!n(r.uuid))&&(r.error=r.error||`UUID is not valid.`),r}function m(e){let t=e;return t.nss=(e.uuid||``).toLowerCase(),t}var h={scheme:`http`,domainHost:!0,parse:s,serialize:c},g={scheme:`https`,domainHost:h.domainHost,parse:s,serialize:c},_={scheme:`ws`,domainHost:!0,parse:l,serialize:u},v={http:h,https:g,ws:_,wss:{scheme:`wss`,domainHost:_.domainHost,parse:_.parse,serialize:_.serialize},urn:{scheme:`urn`,parse:d,serialize:f,skipNormalize:!0},"urn:uuid":{scheme:`urn:uuid`,parse:p,serialize:m,skipNormalize:!0}};Object.setPrototypeOf(v,null);function y(e){return e&&(v[e]||v[e.toLowerCase()])||void 0}t.exports={wsIsSecure:o,SCHEMES:v,isValidSchemeName:a,getSchemeHandler:y}})),gve=s(((e,t)=>{var{normalizeIPv6:n,removeDotSegments:r,recomposeAuthority:i,normalizePercentEncoding:a,normalizePathEncoding:o,escapePreservingEscapes:s,reescapeHostDelimiters:c,isIPv4:l,nonSimpleDomain:u}=f5(),{SCHEMES:d,getSchemeHandler:f}=hve();function p(e,t){return typeof e==`string`?e=S(e,t):typeof e==`object`&&(e=x(_(e,t),t)),e}function m(e,t,n){let r=n?Object.assign({scheme:`null`},n):{scheme:`null`},i=h(x(e,r),x(t,r),r,!0);return r.skipEscape=!0,_(i,r)}function h(e,t,n,i){let a={};return i||(e=x(_(e,n),n),t=x(_(t,n),n)),n||={},!n.tolerant&&t.scheme?(a.scheme=t.scheme,a.userinfo=t.userinfo,a.host=t.host,a.port=t.port,a.path=r(t.path||``),a.query=t.query):(t.userinfo!==void 0||t.host!==void 0||t.port!==void 0?(a.userinfo=t.userinfo,a.host=t.host,a.port=t.port,a.path=r(t.path||``),a.query=t.query):(t.path?(t.path[0]===`/`?a.path=r(t.path):((e.userinfo!==void 0||e.host!==void 0||e.port!==void 0)&&!e.path?a.path=`/`+t.path:e.path?a.path=e.path.slice(0,e.path.lastIndexOf(`/`)+1)+t.path:a.path=t.path,a.path=r(a.path)),a.query=t.query):(a.path=e.path,t.query===void 0?a.query=e.query:a.query=t.query),a.userinfo=e.userinfo,a.host=e.host,a.port=e.port),a.scheme=e.scheme),a.fragment=t.fragment,a}function g(e,t,n){let r=w(e,n),i=w(t,n);return r!==void 0&&i!==void 0&&r.toLowerCase()===i.toLowerCase()}function _(e,t){let n={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:``},o=Object.assign({},t),c=[],l=f(o.scheme||n.scheme);l&&l.serialize&&l.serialize(n,o),n.path!==void 0&&(o.skipEscape?n.path=a(n.path):(n.path=s(n.path),n.scheme!==void 0&&(n.path=n.path.split(`%3A`).join(`:`)))),o.reference!==`suffix`&&n.scheme&&c.push(n.scheme,`:`);let u=i(n);if(u!==void 0&&(o.reference!==`suffix`&&c.push(`//`),c.push(u),n.path&&n.path[0]!==`/`&&c.push(`/`)),n.path!==void 0){let e=n.path;!o.absolutePath&&(!l||!l.absolutePath)&&(e=r(e)),u===void 0&&e[0]===`/`&&e[1]===`/`&&(e=`/%2F`+e.slice(2)),c.push(e)}return n.query!==void 0&&c.push(`?`,n.query),n.fragment!==void 0&&c.push(`#`,n.fragment),c.join(``)}var v=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function y(e,t){if(t[2]!==void 0&&e.path&&e.path[0]!==`/`)return`URI path must start with "/" when authority is present.`;if(typeof e.port==`number`&&(e.port<0||e.port>65535))return`URI port is malformed.`}function b(e,t){let r=Object.assign({},t),i={scheme:void 0,userinfo:void 0,host:``,port:void 0,path:``,query:void 0,fragment:void 0},a=!1,s=!1;r.reference===`suffix`&&(e=r.scheme?r.scheme+`:`+e:`//`+e);let d=e.match(v);if(d){i.scheme=d[1],i.userinfo=d[3],i.host=d[4],i.port=parseInt(d[5],10),i.path=d[6]||``,i.query=d[7],i.fragment=d[8],isNaN(i.port)&&(i.port=d[5]);let t=y(i,d);if(t!==void 0&&(i.error=i.error||t,a=!0),i.host)if(l(i.host)===!1){let e=n(i.host);i.host=e.host.toLowerCase(),s=e.isIPV6}else s=!0;i.scheme===void 0&&i.userinfo===void 0&&i.host===void 0&&i.port===void 0&&i.query===void 0&&!i.path?i.reference=`same-document`:i.scheme===void 0?i.reference=`relative`:i.fragment===void 0?i.reference=`absolute`:i.reference=`uri`,r.reference&&r.reference!==`suffix`&&r.reference!==i.reference&&(i.error=i.error||`URI is not a `+r.reference+` reference.`);let p=f(r.scheme||i.scheme);if(!r.unicodeSupport&&(!p||!p.unicodeSupport)&&i.host&&(r.domainHost||p&&p.domainHost)&&s===!1&&u(i.host))try{i.host=URL.domainToASCII(i.host.toLowerCase())}catch(e){i.error=i.error||`Host's domain name can not be converted to ASCII: `+e}if((!p||p&&!p.skipNormalize)&&(e.indexOf(`%`)!==-1&&(i.scheme!==void 0&&(i.scheme=unescape(i.scheme)),i.host!==void 0&&(i.host=c(unescape(i.host),s))),i.path&&=o(i.path),i.fragment))try{i.fragment=encodeURI(decodeURIComponent(i.fragment))}catch{i.error=i.error||`URI malformed`}p&&p.parse&&p.parse(i,r)}else i.error=i.error||`URI can not be parsed.`;return{parsed:i,malformedAuthorityOrPort:a}}function x(e,t){return b(e,t).parsed}function S(e,t){return C(e,t).normalized}function C(e,t){let{parsed:n,malformedAuthorityOrPort:r}=b(e,t);return{normalized:r?e:_(n,t),malformedAuthorityOrPort:r}}function w(e,t){if(typeof e==`string`){let{normalized:n,malformedAuthorityOrPort:r}=C(e,t);return r?void 0:n}if(typeof e==`object`)return _(e,t)}var T={SCHEMES:d,normalize:p,resolve:m,resolveComponent:h,equal:g,serialize:_,parse:x};t.exports=T,t.exports.default=T,t.exports.fastUri=T})),_ve=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=gve();t.code=`require("ajv/dist/runtime/uri").default`,e.default=t})),vve=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=n5();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var n=K8();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return n.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return n.CodeGen}});var r=r5(),i=i5(),a=X8(),o=a5(),s=K8(),c=t5(),l=Q8(),u=q8(),f=(mve(),d(pve).default),p=_ve(),m=(e,t)=>new RegExp(e,t);m.code=`new RegExp`;var h=[`removeAdditional`,`useDefaults`,`coerceTypes`],g=new Set([`validate`,`serialize`,`parse`,`wrapper`,`root`,`schema`,`keyword`,`pattern`,`formats`,`validate$data`,`func`,`obj`,`Error`]),_={errorDataPath:``,format:"`validateFormats: false` can be used instead.",nullable:`"nullable" keyword is supported by default.`,jsonPointers:`Deprecated jsPropertySyntax can be used instead.`,extendRefs:`Deprecated ignoreKeywordsWithRef can be used instead.`,missingRefs:`Pass empty schema with $id that should be ignored to ajv.addSchema.`,processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:`"uniqueItems" keyword is always validated.`,unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:`Map is used as cache, schema object as key.`,serialize:`Map is used as cache, schema object as key.`,ajvErrors:`It is default now.`},v={ignoreKeywordsWithRef:``,jsPropertySyntax:``,unicode:`"minLength"/"maxLength" account for unicode characters by default.`},y=200;function b(e){let t=e.strict,n=e.code?.optimize,r=n===!0||n===void 0?1:n||0,i=e.code?.regExp??m,a=e.uriResolver??p.default;return{strictSchema:e.strictSchema??t??!0,strictNumbers:e.strictNumbers??t??!0,strictTypes:e.strictTypes??t??`log`,strictTuples:e.strictTuples??t??`log`,strictRequired:e.strictRequired??t??!1,code:e.code?{...e.code,optimize:r,regExp:i}:{optimize:r,regExp:i},loopRequired:e.loopRequired??y,loopEnum:e.loopEnum??y,meta:e.meta??!0,messages:e.messages??!0,inlineRefs:e.inlineRefs??!0,schemaId:e.schemaId??`$id`,addUsedSchema:e.addUsedSchema??!0,validateSchema:e.validateSchema??!0,validateFormats:e.validateFormats??!0,unicodeRegExp:e.unicodeRegExp??!0,int32range:e.int32range??!0,uriResolver:a}}var x=class{constructor(e={}){this.schemas={},this.refs={},this.formats=Object.create(null),this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...b(e)};let{es5:t,lines:n}=this.opts.code;this.scope=new s.ValueScope({scope:{},prefixes:g,es5:t,lines:n}),this.logger=k(e.logger);let r=e.validateFormats;e.validateFormats=!1,this.RULES=(0,a.getRules)(),S.call(this,_,e,`NOT SUPPORTED`),S.call(this,v,e,`DEPRECATED`,`warn`),this._metaOpts=D.call(this),e.formats&&T.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&E.call(this,e.keywords),typeof e.meta==`object`&&this.addMetaSchema(e.meta),w.call(this),e.validateFormats=r}_addVocabularies(){this.addKeyword(`$async`)}_addDefaultMetaSchema(){let{$data:e,meta:t,schemaId:n}=this.opts,r=f;n===`id`&&(r={...f},r.id=r.$id,delete r.$id),t&&e&&this.addMetaSchema(r,r[n],!1)}defaultMeta(){let{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta=typeof e==`object`?e[t]||e:void 0}validate(e,t){let n;if(typeof e==`string`){if(n=this.getSchema(e),!n)throw Error(`no schema with key or ref "${e}"`)}else n=this.compile(e);let r=n(t);return`$async`in n||(this.errors=n.errors),r}compile(e,t){let n=this._addSchema(e,t);return n.validate||this._compileSchemaEnv(n)}compileAsync(e,t){if(typeof this.opts.loadSchema!=`function`)throw Error(`options.loadSchema should be a function`);let{loadSchema:n}=this.opts;return r.call(this,e,t);async function r(e,t){await a.call(this,e.$schema);let n=this._addSchema(e,t);return n.validate||o.call(this,n)}async function a(e){e&&!this.getSchema(e)&&await r.call(this,{$ref:e},!0)}async function o(e){try{return this._compileSchemaEnv(e)}catch(t){if(!(t instanceof i.default))throw t;return s.call(this,t),await c.call(this,t.missingSchema),o.call(this,e)}}function s({missingSchema:e,missingRef:t}){if(this.refs[e])throw Error(`AnySchema ${e} is loaded but ${t} cannot be resolved`)}async function c(e){let n=await l.call(this,e);this.refs[e]||await a.call(this,n.$schema),this.refs[e]||this.addSchema(n,e,t)}async function l(e){let t=this._loading[e];if(t)return t;try{return await(this._loading[e]=n(e))}finally{delete this._loading[e]}}}addSchema(e,t,n,r=this.opts.validateSchema){if(Array.isArray(e)){for(let t of e)this.addSchema(t,void 0,n,r);return this}let i;if(typeof e==`object`){let{schemaId:t}=this.opts;if(i=e[t],i!==void 0&&typeof i!=`string`)throw Error(`schema ${t} must be string`)}return t=(0,c.normalizeId)(t||i),this._checkUnique(t),this.schemas[t]=this._addSchema(e,n,t,r,!0),this}addMetaSchema(e,t,n=this.opts.validateSchema){return this.addSchema(e,t,!0,n),this}validateSchema(e,t){if(typeof e==`boolean`)return!0;let n;if(n=e.$schema,n!==void 0&&typeof n!=`string`)throw Error(`$schema must be a string`);if(n=n||this.opts.defaultMeta||this.defaultMeta(),!n)return this.logger.warn(`meta-schema not available`),this.errors=null,!0;let r=this.validate(n,e);if(!r&&t){let e=`schema is invalid: `+this.errorsText();if(this.opts.validateSchema===`log`)this.logger.error(e);else throw Error(e)}return r}getSchema(e){let t;for(;typeof(t=C.call(this,e))==`string`;)e=t;if(t===void 0){let{schemaId:n}=this.opts,r=new o.SchemaEnv({schema:{},schemaId:n});if(t=o.resolveSchema.call(this,r,e),!t)return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case`undefined`:return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case`string`:{let t=C.call(this,e);return typeof t==`object`&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this}case`object`:{let t=e;this._cache.delete(t);let n=e[this.opts.schemaId];return n&&(n=(0,c.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw Error(`ajv.removeSchema: invalid parameter`)}}addVocabulary(e){for(let t of e)this.addKeyword(t);return this}addKeyword(e,t){let n;if(typeof e==`string`)n=e,typeof t==`object`&&(this.logger.warn(`these parameters are deprecated, see docs for addKeyword`),t.keyword=n);else if(typeof e==`object`&&t===void 0){if(t=e,n=t.keyword,Array.isArray(n)&&!n.length)throw Error(`addKeywords: keyword must be string or non-empty array`)}else throw Error(`invalid addKeywords parameters`);if(j.call(this,n,t),!t)return(0,u.eachItem)(n,e=>M.call(this,e)),this;P.call(this,t);let r={...t,type:(0,l.getJSONTypes)(t.type),schemaType:(0,l.getJSONTypes)(t.schemaType)};return(0,u.eachItem)(n,r.type.length===0?e=>M.call(this,e,r):e=>r.type.forEach(t=>M.call(this,e,r,t))),this}getKeyword(e){let t=this.RULES.all[e];return typeof t==`object`?t.definition:!!t}removeKeyword(e){let{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(let n of t.rules){let t=n.rules.findIndex(t=>t.keyword===e);t>=0&&n.rules.splice(t,1)}return this}addFormat(e,t){return typeof t==`string`&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=`, `,dataVar:n=`data`}={}){return!e||e.length===0?`No errors`:e.map(e=>`${n}${e.instancePath} ${e.message}`).reduce((e,n)=>e+t+n)}$dataMetaSchema(e,t){let n=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(let r of t){let t=r.split(`/`).slice(1),i=e;for(let e of t)i=i[e];for(let e in n){let t=n[e];if(typeof t!=`object`)continue;let{$data:r}=t.definition,a=i[e];r&&a&&(i[e]=I(a))}}return e}_removeAllSchemas(e,t){for(let n in e){let r=e[n];(!t||t.test(n))&&(typeof r==`string`?delete e[n]:r&&!r.meta&&(this._cache.delete(r.schema),delete e[n]))}}_addSchema(e,t,n,r=this.opts.validateSchema,i=this.opts.addUsedSchema){let a,{schemaId:s}=this.opts;if(typeof e==`object`)a=e[s];else if(this.opts.jtd)throw Error(`schema must be object`);else if(typeof e!=`boolean`)throw Error(`schema must be object or boolean`);let l=this._cache.get(e);if(l!==void 0)return l;n=(0,c.normalizeId)(a||n);let u=c.getSchemaRefs.call(this,e,n);return l=new o.SchemaEnv({schema:e,schemaId:s,meta:t,baseId:n,localRefs:u}),this._cache.set(l.schema,l),i&&!n.startsWith(`#`)&&(n&&this._checkUnique(n),this.refs[n]=l),r&&this.validateSchema(e,!0),l}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):o.compileSchema.call(this,e),!e.validate)throw Error(`ajv implementation error`);return e.validate}_compileMetaSchema(e){let t=this.opts;this.opts=this._metaOpts;try{o.compileSchema.call(this,e)}finally{this.opts=t}}};x.ValidationError=r.default,x.MissingRefError=i.default,e.default=x;function S(e,t,n,r=`error`){for(let i in e){let a=i;a in t&&this.logger[r](`${n}: option ${i}. ${e[a]}`)}}function C(e){return e=(0,c.normalizeId)(e),this.schemas[e]||this.refs[e]}function w(){let e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(let t in e)this.addSchema(e[t],t)}function T(){for(let e in this.opts.formats){let t=this.opts.formats[e];t&&this.addFormat(e,t)}}function E(e){if(Array.isArray(e)){this.addVocabulary(e);return}this.logger.warn(`keywords option as map is deprecated, pass array`);for(let t in e){let n=e[t];n.keyword||=t,this.addKeyword(n)}}function D(){let e={...this.opts};for(let t of h)delete e[t];return e}var O={log(){},warn(){},error(){}};function k(e){if(e===!1)return O;if(e===void 0)return console;if(e.log&&e.warn&&e.error)return e;throw Error(`logger must implement log, warn and error methods`)}var A=/^[a-z_$][a-z0-9_$:-]*$/i;function j(e,t){let{RULES:n}=this;if((0,u.eachItem)(e,e=>{if(n.keywords[e])throw Error(`Keyword ${e} is already defined`);if(!A.test(e))throw Error(`Keyword ${e} has invalid name`)}),t&&t.$data&&!(`code`in t||`validate`in t))throw Error(`$data keyword must have "code" or "validate" function`)}function M(e,t,n){var r;let i=t?.post;if(n&&i)throw Error(`keyword with "post" flag cannot have "type"`);let{RULES:a}=this,o=i?a.post:a.rules.find(({type:e})=>e===n);if(o||(o={type:n,rules:[]},a.rules.push(o)),a.keywords[e]=!0,!t)return;let s={keyword:e,definition:{...t,type:(0,l.getJSONTypes)(t.type),schemaType:(0,l.getJSONTypes)(t.schemaType)}};t.before?N.call(this,o,s,t.before):o.rules.push(s),a.all[e]=s,(r=t.implements)==null||r.forEach(e=>this.addKeyword(e))}function N(e,t,n){let r=e.rules.findIndex(e=>e.keyword===n);r>=0?e.rules.splice(r,0,t):(e.rules.push(t),this.logger.warn(`rule ${n} is not defined`))}function P(e){let{metaSchema:t}=e;t!==void 0&&(e.$data&&this.opts.$data&&(t=I(t)),e.validateSchema=this.compile(t,!0))}var F={$ref:`https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#`};function I(e){return{anyOf:[e,F]}}})),yve=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={keyword:`id`,code(){throw Error(`NOT SUPPORTED: keyword "id", use "$id" for schema ID`)}}})),bve=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.callRef=e.getValidate=void 0;var t=i5(),n=$8(),r=K8(),i=J8(),a=a5(),o=q8(),s={keyword:`$ref`,schemaType:`string`,code(e){let{gen:n,schema:i,it:o}=e,{baseId:s,schemaEnv:u,validateName:d,opts:f,self:p}=o,{root:m}=u;if((i===`#`||i===`#/`)&&s===m.baseId)return g();let h=a.resolveRef.call(p,m,s,i);if(h===void 0)throw new t.default(o.opts.uriResolver,s,i);if(h instanceof a.SchemaEnv)return _(h);return v(h);function g(){if(u===m)return l(e,d,u,u.$async);let t=n.scopeValue(`root`,{ref:m});return l(e,(0,r._)`${t}.validate`,m,m.$async)}function _(t){l(e,c(e,t),t,t.$async)}function v(t){let a=n.scopeValue(`schema`,f.code.source===!0?{ref:t,code:(0,r.stringify)(t)}:{ref:t}),o=n.name(`valid`),s=e.subschema({schema:t,dataTypes:[],schemaPath:r.nil,topSchemaRef:a,errSchemaPath:i},o);e.mergeEvaluated(s),e.ok(o)}}};function c(e,t){let{gen:n}=e;return t.validate?n.scopeValue(`validate`,{ref:t.validate}):(0,r._)`${n.scopeValue(`wrapper`,{ref:t})}.validate`}e.getValidate=c;function l(e,t,a,s){let{gen:c,it:l}=e,{allErrors:u,schemaEnv:d,opts:f}=l,p=f.passContext?i.default.this:r.nil;s?m():h();function m(){if(!d.$async)throw Error(`async schema referenced by sync schema`);let i=c.let(`valid`);c.try(()=>{c.code((0,r._)`await ${(0,n.callValidateCode)(e,t,p)}`),_(t),u||c.assign(i,!0)},e=>{c.if((0,r._)`!(${e} instanceof ${l.ValidationError})`,()=>c.throw(e)),g(e),u||c.assign(i,!1)}),e.ok(i)}function h(){e.result((0,n.callValidateCode)(e,t,p),()=>_(t),()=>g(t))}function g(e){let t=(0,r._)`${e}.errors`;c.assign(i.default.vErrors,(0,r._)`${i.default.vErrors} === null ? ${t} : ${i.default.vErrors}.concat(${t})`),c.assign(i.default.errors,(0,r._)`${i.default.vErrors}.length`)}function _(e){if(!l.opts.unevaluated)return;let t=a?.validate?.evaluated;if(l.props!==!0)if(t&&!t.dynamicProps)t.props!==void 0&&(l.props=o.mergeEvaluated.props(c,t.props,l.props));else{let t=c.var(`props`,(0,r._)`${e}.evaluated.props`);l.props=o.mergeEvaluated.props(c,t,l.props,r.Name)}if(l.items!==!0)if(t&&!t.dynamicItems)t.items!==void 0&&(l.items=o.mergeEvaluated.items(c,t.items,l.items));else{let t=c.var(`items`,(0,r._)`${e}.evaluated.items`);l.items=o.mergeEvaluated.items(c,t,l.items,r.Name)}}}e.callRef=l,e.default=s})),xve=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=yve(),n=bve();e.default=[`$schema`,`$id`,`$defs`,`$vocabulary`,{keyword:`$comment`},`definitions`,t.default,n.default]})),Sve=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=K8(),n=t.operators,r={maximum:{okStr:`<=`,ok:n.LTE,fail:n.GT},minimum:{okStr:`>=`,ok:n.GTE,fail:n.LT},exclusiveMaximum:{okStr:`<`,ok:n.LT,fail:n.GTE},exclusiveMinimum:{okStr:`>`,ok:n.GT,fail:n.LTE}};e.default={keyword:Object.keys(r),type:`number`,schemaType:`number`,$data:!0,error:{message:({keyword:e,schemaCode:n})=>(0,t.str)`must be ${r[e].okStr} ${n}`,params:({keyword:e,schemaCode:n})=>(0,t._)`{comparison: ${r[e].okStr}, limit: ${n}}`},code(e){let{keyword:n,data:i,schemaCode:a}=e;e.fail$data((0,t._)`${i} ${r[n].fail} ${a} || isNaN(${i})`)}}})),Cve=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=K8();e.default={keyword:`multipleOf`,type:`number`,schemaType:`number`,$data:!0,error:{message:({schemaCode:e})=>(0,t.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,t._)`{multipleOf: ${e}}`},code(e){let{gen:n,data:r,schemaCode:i,it:a}=e,o=a.opts.multipleOfPrecision,s=n.let(`res`),c=o?(0,t._)`Math.abs(Math.round(${s}) - ${s}) > 1e-${o}`:(0,t._)`${s} !== parseInt(${s})`;e.fail$data((0,t._)`(${i} === 0 || (${s} = ${r}/${i}, ${c}))`)}}})),wve=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});function t(e){let t=e.length,n=0,r=0,i;for(;r<t;)n++,i=e.charCodeAt(r++),i>=55296&&i<=56319&&r<t&&(i=e.charCodeAt(r),(i&64512)==56320&&r++);return n}e.default=t,t.code=`require("ajv/dist/runtime/ucs2length").default`})),Tve=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=K8(),n=q8(),r=wve();e.default={keyword:[`maxLength`,`minLength`],type:`string`,schemaType:`number`,$data:!0,error:{message({keyword:e,schemaCode:n}){let r=e===`maxLength`?`more`:`fewer`;return(0,t.str)`must NOT have ${r} than ${n} characters`},params:({schemaCode:e})=>(0,t._)`{limit: ${e}}`},code(e){let{keyword:i,data:a,schemaCode:o,it:s}=e,c=i===`maxLength`?t.operators.GT:t.operators.LT,l=s.opts.unicode===!1?(0,t._)`${a}.length`:(0,t._)`${(0,n.useFunc)(e.gen,r.default)}(${a})`;e.fail$data((0,t._)`${l} ${c} ${o}`)}}})),Eve=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=$8(),n=q8(),r=K8();e.default={keyword:`pattern`,type:`string`,schemaType:`string`,$data:!0,error:{message:({schemaCode:e})=>(0,r.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,r._)`{pattern: ${e}}`},code(e){let{gen:i,data:a,$data:o,schema:s,schemaCode:c,it:l}=e,u=l.opts.unicodeRegExp?`u`:``;if(o){let{regExp:t}=l.opts.code,o=t.code===`new RegExp`?(0,r._)`new RegExp`:(0,n.useFunc)(i,t),s=i.let(`valid`);i.try(()=>i.assign(s,(0,r._)`${o}(${c}, ${u}).test(${a})`),()=>i.assign(s,!1)),e.fail$data((0,r._)`!${s}`)}else{let n=(0,t.usePattern)(e,s);e.fail$data((0,r._)`!${n}.test(${a})`)}}}})),Dve=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=K8();e.default={keyword:[`maxProperties`,`minProperties`],type:`object`,schemaType:`number`,$data:!0,error:{message({keyword:e,schemaCode:n}){let r=e===`maxProperties`?`more`:`fewer`;return(0,t.str)`must NOT have ${r} than ${n} properties`},params:({schemaCode:e})=>(0,t._)`{limit: ${e}}`},code(e){let{keyword:n,data:r,schemaCode:i}=e,a=n===`maxProperties`?t.operators.GT:t.operators.LT;e.fail$data((0,t._)`Object.keys(${r}).length ${a} ${i}`)}}})),Ove=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=$8(),n=K8(),r=q8();e.default={keyword:`required`,type:`object`,schemaType:`array`,$data:!0,error:{message:({params:{missingProperty:e}})=>(0,n.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,n._)`{missingProperty: ${e}}`},code(e){let{gen:i,schema:a,schemaCode:o,data:s,$data:c,it:l}=e,{opts:u}=l;if(!c&&a.length===0)return;let d=a.length>=u.loopRequired;if(l.allErrors?f():p(),u.strictRequired){let t=e.parentSchema.properties,{definedProperties:n}=e.it;for(let e of a)if(t?.[e]===void 0&&!n.has(e)){let t=`required property "${e}" is not defined at "${l.schemaEnv.baseId+l.errSchemaPath}" (strictRequired)`;(0,r.checkStrictMode)(l,t,l.opts.strictRequired)}}function f(){if(d||c)e.block$data(n.nil,m);else for(let n of a)(0,t.checkReportMissingProp)(e,n)}function p(){let n=i.let(`missing`);if(d||c){let t=i.let(`valid`,!0);e.block$data(t,()=>h(n,t)),e.ok(t)}else i.if((0,t.checkMissingProp)(e,a,n)),(0,t.reportMissingProp)(e,n),i.else()}function m(){i.forOf(`prop`,o,n=>{e.setParams({missingProperty:n}),i.if((0,t.noPropertyInData)(i,s,n,u.ownProperties),()=>e.error())})}function h(r,a){e.setParams({missingProperty:r}),i.forOf(r,o,()=>{i.assign(a,(0,t.propertyInData)(i,s,r,u.ownProperties)),i.if((0,n.not)(a),()=>{e.error(),i.break()})},n.nil)}}}})),kve=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=K8();e.default={keyword:[`maxItems`,`minItems`],type:`array`,schemaType:`number`,$data:!0,error:{message({keyword:e,schemaCode:n}){let r=e===`maxItems`?`more`:`fewer`;return(0,t.str)`must NOT have ${r} than ${n} items`},params:({schemaCode:e})=>(0,t._)`{limit: ${e}}`},code(e){let{keyword:n,data:r,schemaCode:i}=e,a=n===`maxItems`?t.operators.GT:t.operators.LT;e.fail$data((0,t._)`${r}.length ${a} ${i}`)}}})),p5=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=e5();t.code=`require("ajv/dist/runtime/equal").default`,e.default=t})),Ave=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Q8(),n=K8(),r=q8(),i=p5();e.default={keyword:`uniqueItems`,type:`array`,schemaType:`boolean`,$data:!0,error:{message:({params:{i:e,j:t}})=>(0,n.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,n._)`{i: ${e}, j: ${t}}`},code(e){let{gen:a,data:o,$data:s,schema:c,parentSchema:l,schemaCode:u,it:d}=e;if(!s&&!c)return;let f=a.let(`valid`),p=l.items?(0,t.getSchemaTypes)(l.items):[];e.block$data(f,m,(0,n._)`${u} === false`),e.ok(f);function m(){let t=a.let(`i`,(0,n._)`${o}.length`),r=a.let(`j`);e.setParams({i:t,j:r}),a.assign(f,!0),a.if((0,n._)`${t} > 1`,()=>(h()?g:_)(t,r))}function h(){return p.length>0&&!p.some(e=>e===`object`||e===`array`)}function g(r,i){let s=a.name(`item`),c=(0,t.checkDataTypes)(p,s,d.opts.strictNumbers,t.DataType.Wrong),l=a.const(`indices`,(0,n._)`{}`);a.for((0,n._)`;${r}--;`,()=>{a.let(s,(0,n._)`${o}[${r}]`),a.if(c,(0,n._)`continue`),p.length>1&&a.if((0,n._)`typeof ${s} == "string"`,(0,n._)`${s} += "_"`),a.if((0,n._)`typeof ${l}[${s}] == "number"`,()=>{a.assign(i,(0,n._)`${l}[${s}]`),e.error(),a.assign(f,!1).break()}).code((0,n._)`${l}[${s}] = ${r}`)})}function _(t,s){let c=(0,r.useFunc)(a,i.default),l=a.name(`outer`);a.label(l).for((0,n._)`;${t}--;`,()=>a.for((0,n._)`${s} = ${t}; ${s}--;`,()=>a.if((0,n._)`${c}(${o}[${t}], ${o}[${s}])`,()=>{e.error(),a.assign(f,!1).break(l)})))}}}})),jve=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=K8(),n=q8(),r=p5();e.default={keyword:`const`,$data:!0,error:{message:`must be equal to constant`,params:({schemaCode:e})=>(0,t._)`{allowedValue: ${e}}`},code(e){let{gen:i,data:a,$data:o,schemaCode:s,schema:c}=e;o||c&&typeof c==`object`?e.fail$data((0,t._)`!${(0,n.useFunc)(i,r.default)}(${a}, ${s})`):e.fail((0,t._)`${c} !== ${a}`)}}})),Mve=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=K8(),n=q8(),r=p5();e.default={keyword:`enum`,schemaType:`array`,$data:!0,error:{message:`must be equal to one of the allowed values`,params:({schemaCode:e})=>(0,t._)`{allowedValues: ${e}}`},code(e){let{gen:i,data:a,$data:o,schema:s,schemaCode:c,it:l}=e;if(!o&&s.length===0)throw Error(`enum must have non-empty array`);let u=s.length>=l.opts.loopEnum,d,f=()=>d??=(0,n.useFunc)(i,r.default),p;if(u||o)p=i.let(`valid`),e.block$data(p,m);else{if(!Array.isArray(s))throw Error(`ajv implementation error`);let e=i.const(`vSchema`,c);p=(0,t.or)(...s.map((t,n)=>h(e,n)))}e.pass(p);function m(){i.assign(p,!1),i.forOf(`v`,c,e=>i.if((0,t._)`${f()}(${a}, ${e})`,()=>i.assign(p,!0).break()))}function h(e,n){let r=s[n];return typeof r==`object`&&r?(0,t._)`${f()}(${a}, ${e}[${n}])`:(0,t._)`${a} === ${r}`}}}})),Nve=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Sve(),n=Cve(),r=Tve(),i=Eve(),a=Dve(),o=Ove(),s=kve(),c=Ave(),l=jve(),u=Mve();e.default=[t.default,n.default,r.default,i.default,a.default,o.default,s.default,c.default,{keyword:`type`,schemaType:[`string`,`array`]},{keyword:`nullable`,schemaType:`boolean`},l.default,u.default]})),m5=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateAdditionalItems=void 0;var t=K8(),n=q8(),r={keyword:`additionalItems`,type:`array`,schemaType:[`boolean`,`object`],before:`uniqueItems`,error:{message:({params:{len:e}})=>(0,t.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,t._)`{limit: ${e}}`},code(e){let{parentSchema:t,it:r}=e,{items:a}=t;if(!Array.isArray(a)){(0,n.checkStrictMode)(r,`"additionalItems" is ignored when "items" is not an array of schemas`);return}i(e,a)}};function i(e,r){let{gen:i,schema:a,data:o,keyword:s,it:c}=e;c.items=!0;let l=i.const(`len`,(0,t._)`${o}.length`);if(a===!1)e.setParams({len:r.length}),e.pass((0,t._)`${l} <= ${r.length}`);else if(typeof a==`object`&&!(0,n.alwaysValidSchema)(c,a)){let n=i.var(`valid`,(0,t._)`${l} <= ${r.length}`);i.if((0,t.not)(n),()=>u(n)),e.ok(n)}function u(a){i.forRange(`i`,r.length,l,r=>{e.subschema({keyword:s,dataProp:r,dataPropType:n.Type.Num},a),c.allErrors||i.if((0,t.not)(a),()=>i.break())})}}e.validateAdditionalItems=i,e.default=r})),h5=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateTuple=void 0;var t=K8(),n=q8(),r=$8(),i={keyword:`items`,type:`array`,schemaType:[`object`,`array`,`boolean`],before:`uniqueItems`,code(e){let{schema:t,it:i}=e;if(Array.isArray(t))return a(e,`additionalItems`,t);i.items=!0,!(0,n.alwaysValidSchema)(i,t)&&e.ok((0,r.validateArray)(e))}};function a(e,r,i=e.schema){let{gen:a,parentSchema:o,data:s,keyword:c,it:l}=e;f(o),l.opts.unevaluated&&i.length&&l.items!==!0&&(l.items=n.mergeEvaluated.items(a,i.length,l.items));let u=a.name(`valid`),d=a.const(`len`,(0,t._)`${s}.length`);i.forEach((r,i)=>{(0,n.alwaysValidSchema)(l,r)||(a.if((0,t._)`${d} > ${i}`,()=>e.subschema({keyword:c,schemaProp:i,dataProp:i},u)),e.ok(u))});function f(e){let{opts:t,errSchemaPath:a}=l,o=i.length,s=o===e.minItems&&(o===e.maxItems||e[r]===!1);if(t.strictTuples&&!s){let e=`"${c}" is ${o}-tuple, but minItems or maxItems/${r} are not specified or different at path "${a}"`;(0,n.checkStrictMode)(l,e,t.strictTuples)}}}e.validateTuple=a,e.default=i})),Pve=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=h5();e.default={keyword:`prefixItems`,type:`array`,schemaType:[`array`],before:`uniqueItems`,code:e=>(0,t.validateTuple)(e,`items`)}})),Fve=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=K8(),n=q8(),r=$8(),i=m5();e.default={keyword:`items`,type:`array`,schemaType:[`object`,`boolean`],before:`uniqueItems`,error:{message:({params:{len:e}})=>(0,t.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,t._)`{limit: ${e}}`},code(e){let{schema:t,parentSchema:a,it:o}=e,{prefixItems:s}=a;o.items=!0,!(0,n.alwaysValidSchema)(o,t)&&(s?(0,i.validateAdditionalItems)(e,s):e.ok((0,r.validateArray)(e)))}}})),Ive=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=K8(),n=q8();e.default={keyword:`contains`,type:`array`,schemaType:[`object`,`boolean`],before:`uniqueItems`,trackErrors:!0,error:{message:({params:{min:e,max:n}})=>n===void 0?(0,t.str)`must contain at least ${e} valid item(s)`:(0,t.str)`must contain at least ${e} and no more than ${n} valid item(s)`,params:({params:{min:e,max:n}})=>n===void 0?(0,t._)`{minContains: ${e}}`:(0,t._)`{minContains: ${e}, maxContains: ${n}}`},code(e){let{gen:r,schema:i,parentSchema:a,data:o,it:s}=e,c,l,{minContains:u,maxContains:d}=a;s.opts.next?(c=u===void 0?1:u,l=d):c=1;let f=r.const(`len`,(0,t._)`${o}.length`);if(e.setParams({min:c,max:l}),l===void 0&&c===0){(0,n.checkStrictMode)(s,`"minContains" == 0 without "maxContains": "contains" keyword ignored`);return}if(l!==void 0&&c>l){(0,n.checkStrictMode)(s,`"minContains" > "maxContains" is always invalid`),e.fail();return}if((0,n.alwaysValidSchema)(s,i)){let n=(0,t._)`${f} >= ${c}`;l!==void 0&&(n=(0,t._)`${n} && ${f} <= ${l}`),e.pass(n);return}s.items=!0;let p=r.name(`valid`);l===void 0&&c===1?h(p,()=>r.if(p,()=>r.break())):c===0?(r.let(p,!0),l!==void 0&&r.if((0,t._)`${o}.length > 0`,m)):(r.let(p,!1),m()),e.result(p,()=>e.reset());function m(){let e=r.name(`_valid`),t=r.let(`count`,0);h(e,()=>r.if(e,()=>g(t)))}function h(t,i){r.forRange(`i`,0,f,r=>{e.subschema({keyword:`contains`,dataProp:r,dataPropType:n.Type.Num,compositeRule:!0},t),i()})}function g(e){r.code((0,t._)`${e}++`),l===void 0?r.if((0,t._)`${e} >= ${c}`,()=>r.assign(p,!0).break()):(r.if((0,t._)`${e} > ${l}`,()=>r.assign(p,!1).break()),c===1?r.assign(p,!0):r.if((0,t._)`${e} >= ${c}`,()=>r.assign(p,!0)))}}}})),Lve=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;var t=K8(),n=q8(),r=$8();e.error={message:({params:{property:e,depsCount:n,deps:r}})=>{let i=n===1?`property`:`properties`;return(0,t.str)`must have ${i} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:n,deps:r,missingProperty:i}})=>(0,t._)`{property: ${e},
269
+ missingProperty: ${i},
270
+ depsCount: ${n},
271
+ deps: ${r}}`};var i={keyword:`dependencies`,type:`object`,schemaType:`object`,error:e.error,code(e){let[t,n]=a(e);o(e,t),s(e,n)}};function a({schema:e}){let t={},n={};for(let r in e){if(r===`__proto__`)continue;let i=Array.isArray(e[r])?t:n;i[r]=e[r]}return[t,n]}function o(e,n=e.schema){let{gen:i,data:a,it:o}=e;if(Object.keys(n).length===0)return;let s=i.let(`missing`);for(let c in n){let l=n[c];if(l.length===0)continue;let u=(0,r.propertyInData)(i,a,c,o.opts.ownProperties);e.setParams({property:c,depsCount:l.length,deps:l.join(`, `)}),o.allErrors?i.if(u,()=>{for(let t of l)(0,r.checkReportMissingProp)(e,t)}):(i.if((0,t._)`${u} && (${(0,r.checkMissingProp)(e,l,s)})`),(0,r.reportMissingProp)(e,s),i.else())}}e.validatePropertyDeps=o;function s(e,t=e.schema){let{gen:i,data:a,keyword:o,it:s}=e,c=i.name(`valid`);for(let l in t)(0,n.alwaysValidSchema)(s,t[l])||(i.if((0,r.propertyInData)(i,a,l,s.opts.ownProperties),()=>{let t=e.subschema({keyword:o,schemaProp:l},c);e.mergeValidEvaluated(t,c)},()=>i.var(c,!0)),e.ok(c))}e.validateSchemaDeps=s,e.default=i})),Rve=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=K8(),n=q8();e.default={keyword:`propertyNames`,type:`object`,schemaType:[`object`,`boolean`],error:{message:`property name must be valid`,params:({params:e})=>(0,t._)`{propertyName: ${e.propertyName}}`},code(e){let{gen:r,schema:i,data:a,it:o}=e;if((0,n.alwaysValidSchema)(o,i))return;let s=r.name(`valid`);r.forIn(`key`,a,n=>{e.setParams({propertyName:n}),e.subschema({keyword:`propertyNames`,data:n,dataTypes:[`string`],propertyName:n,compositeRule:!0},s),r.if((0,t.not)(s),()=>{e.error(!0),o.allErrors||r.break()})}),e.ok(s)}}})),g5=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=$8(),n=K8(),r=J8(),i=q8();e.default={keyword:`additionalProperties`,type:[`object`],schemaType:[`boolean`,`object`],allowUndefined:!0,trackErrors:!0,error:{message:`must NOT have additional properties`,params:({params:e})=>(0,n._)`{additionalProperty: ${e.additionalProperty}}`},code(e){let{gen:a,schema:o,parentSchema:s,data:c,errsCount:l,it:u}=e;if(!l)throw Error(`ajv implementation error`);let{allErrors:d,opts:f}=u;if(u.props=!0,f.removeAdditional!==`all`&&(0,i.alwaysValidSchema)(u,o))return;let p=(0,t.allSchemaProperties)(s.properties),m=(0,t.allSchemaProperties)(s.patternProperties);h(),e.ok((0,n._)`${l} === ${r.default.errors}`);function h(){a.forIn(`key`,c,e=>{!p.length&&!m.length?v(e):a.if(g(e),()=>v(e))})}function g(r){let o;if(p.length>8){let e=(0,i.schemaRefOrVal)(u,s.properties,`properties`);o=(0,t.isOwnProperty)(a,e,r)}else o=p.length?(0,n.or)(...p.map(e=>(0,n._)`${r} === ${e}`)):n.nil;return m.length&&(o=(0,n.or)(o,...m.map(i=>(0,n._)`${(0,t.usePattern)(e,i)}.test(${r})`))),(0,n.not)(o)}function _(e){a.code((0,n._)`delete ${c}[${e}]`)}function v(t){if(f.removeAdditional===`all`||f.removeAdditional&&o===!1){_(t);return}if(o===!1){e.setParams({additionalProperty:t}),e.error(),d||a.break();return}if(typeof o==`object`&&!(0,i.alwaysValidSchema)(u,o)){let r=a.name(`valid`);f.removeAdditional===`failing`?(y(t,r,!1),a.if((0,n.not)(r),()=>{e.reset(),_(t)})):(y(t,r),d||a.if((0,n.not)(r),()=>a.break()))}}function y(t,n,r){let a={keyword:`additionalProperties`,dataProp:t,dataPropType:i.Type.Str};r===!1&&Object.assign(a,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(a,n)}}}})),zve=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=n5(),n=$8(),r=q8(),i=g5();e.default={keyword:`properties`,type:`object`,schemaType:`object`,code(e){let{gen:a,schema:o,parentSchema:s,data:c,it:l}=e;l.opts.removeAdditional===`all`&&s.additionalProperties===void 0&&i.default.code(new t.KeywordCxt(l,i.default,`additionalProperties`));let u=(0,n.allSchemaProperties)(o);for(let e of u)l.definedProperties.add(e);l.opts.unevaluated&&u.length&&l.props!==!0&&(l.props=r.mergeEvaluated.props(a,(0,r.toHash)(u),l.props));let d=u.filter(e=>!(0,r.alwaysValidSchema)(l,o[e]));if(d.length===0)return;let f=a.name(`valid`);for(let t of d)p(t)?m(t):(a.if((0,n.propertyInData)(a,c,t,l.opts.ownProperties)),m(t),l.allErrors||a.else().var(f,!0),a.endIf()),e.it.definedProperties.add(t),e.ok(f);function p(e){return l.opts.useDefaults&&!l.compositeRule&&o[e].default!==void 0}function m(t){e.subschema({keyword:`properties`,schemaProp:t,dataProp:t},f)}}}})),Bve=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=$8(),n=K8(),r=q8(),i=q8();e.default={keyword:`patternProperties`,type:`object`,schemaType:`object`,code(e){let{gen:a,schema:o,data:s,parentSchema:c,it:l}=e,{opts:u}=l,d=(0,t.allSchemaProperties)(o),f=d.filter(e=>(0,r.alwaysValidSchema)(l,o[e]));if(d.length===0||f.length===d.length&&(!l.opts.unevaluated||l.props===!0))return;let p=u.strictSchema&&!u.allowMatchingProperties&&c.properties,m=a.name(`valid`);l.props!==!0&&!(l.props instanceof n.Name)&&(l.props=(0,i.evaluatedPropsToName)(a,l.props));let{props:h}=l;g();function g(){for(let e of d)p&&_(e),l.allErrors?v(e):(a.var(m,!0),v(e),a.if(m))}function _(e){for(let t in p)new RegExp(e).test(t)&&(0,r.checkStrictMode)(l,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}function v(r){a.forIn(`key`,s,o=>{a.if((0,n._)`${(0,t.usePattern)(e,r)}.test(${o})`,()=>{let t=f.includes(r);t||e.subschema({keyword:`patternProperties`,schemaProp:r,dataProp:o,dataPropType:i.Type.Str},m),l.opts.unevaluated&&h!==!0?a.assign((0,n._)`${h}[${o}]`,!0):!t&&!l.allErrors&&a.if((0,n.not)(m),()=>a.break())})})}}}})),Vve=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=q8();e.default={keyword:`not`,schemaType:[`object`,`boolean`],trackErrors:!0,code(e){let{gen:n,schema:r,it:i}=e;if((0,t.alwaysValidSchema)(i,r)){e.fail();return}let a=n.name(`valid`);e.subschema({keyword:`not`,compositeRule:!0,createErrors:!1,allErrors:!1},a),e.failResult(a,()=>e.reset(),()=>e.error())},error:{message:`must NOT be valid`}}})),Hve=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={keyword:`anyOf`,schemaType:`array`,trackErrors:!0,code:$8().validateUnion,error:{message:`must match a schema in anyOf`}}})),Uve=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=K8(),n=q8();e.default={keyword:`oneOf`,schemaType:`array`,trackErrors:!0,error:{message:`must match exactly one schema in oneOf`,params:({params:e})=>(0,t._)`{passingSchemas: ${e.passing}}`},code(e){let{gen:r,schema:i,parentSchema:a,it:o}=e;if(!Array.isArray(i))throw Error(`ajv implementation error`);if(o.opts.discriminator&&a.discriminator)return;let s=i,c=r.let(`valid`,!1),l=r.let(`passing`,null),u=r.name(`_valid`);e.setParams({passing:l}),r.block(d),e.result(c,()=>e.reset(),()=>e.error(!0));function d(){s.forEach((i,a)=>{let s;(0,n.alwaysValidSchema)(o,i)?r.var(u,!0):s=e.subschema({keyword:`oneOf`,schemaProp:a,compositeRule:!0},u),a>0&&r.if((0,t._)`${u} && ${c}`).assign(c,!1).assign(l,(0,t._)`[${l}, ${a}]`).else(),r.if(u,()=>{r.assign(c,!0),r.assign(l,a),s&&e.mergeEvaluated(s,t.Name)})})}}}})),Wve=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=q8();e.default={keyword:`allOf`,schemaType:`array`,code(e){let{gen:n,schema:r,it:i}=e;if(!Array.isArray(r))throw Error(`ajv implementation error`);let a=n.name(`valid`);r.forEach((n,r)=>{if((0,t.alwaysValidSchema)(i,n))return;let o=e.subschema({keyword:`allOf`,schemaProp:r},a);e.ok(a),e.mergeEvaluated(o)})}}})),Gve=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=K8(),n=q8(),r={keyword:`if`,schemaType:[`object`,`boolean`],trackErrors:!0,error:{message:({params:e})=>(0,t.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,t._)`{failingKeyword: ${e.ifClause}}`},code(e){let{gen:r,parentSchema:a,it:o}=e;a.then===void 0&&a.else===void 0&&(0,n.checkStrictMode)(o,`"if" without "then" and "else" is ignored`);let s=i(o,`then`),c=i(o,`else`);if(!s&&!c)return;let l=r.let(`valid`,!0),u=r.name(`_valid`);if(d(),e.reset(),s&&c){let t=r.let(`ifClause`);e.setParams({ifClause:t}),r.if(u,f(`then`,t),f(`else`,t))}else s?r.if(u,f(`then`)):r.if((0,t.not)(u),f(`else`));e.pass(l,()=>e.error(!0));function d(){let t=e.subschema({keyword:`if`,compositeRule:!0,createErrors:!1,allErrors:!1},u);e.mergeEvaluated(t)}function f(n,i){return()=>{let a=e.subschema({keyword:n},u);r.assign(l,u),e.mergeValidEvaluated(a,l),i?r.assign(i,(0,t._)`${n}`):e.setParams({ifClause:n})}}}};function i(e,t){let r=e.schema[t];return r!==void 0&&!(0,n.alwaysValidSchema)(e,r)}e.default=r})),Kve=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=q8();e.default={keyword:[`then`,`else`],schemaType:[`object`,`boolean`],code({keyword:e,parentSchema:n,it:r}){n.if===void 0&&(0,t.checkStrictMode)(r,`"${e}" without "if" is ignored`)}}})),qve=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=m5(),n=Pve(),r=h5(),i=Fve(),a=Ive(),o=Lve(),s=Rve(),c=g5(),l=zve(),u=Bve(),d=Vve(),f=Hve(),p=Uve(),m=Wve(),h=Gve(),g=Kve();function _(e=!1){let _=[d.default,f.default,p.default,m.default,h.default,g.default,s.default,c.default,o.default,l.default,u.default];return e?_.push(n.default,i.default):_.push(t.default,r.default),_.push(a.default),_}e.default=_})),Jve=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=K8();e.default={keyword:`format`,type:[`number`,`string`],schemaType:`string`,$data:!0,error:{message:({schemaCode:e})=>(0,t.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,t._)`{format: ${e}}`},code(e,n){let{gen:r,data:i,$data:a,schema:o,schemaCode:s,it:c}=e,{opts:l,errSchemaPath:u,schemaEnv:d,self:f}=c;if(!l.validateFormats)return;a?p():m();function p(){let a=r.scopeValue(`formats`,{ref:f.formats,code:l.code.formats}),o=r.const(`fDef`,(0,t._)`${a}[${s}]`),c=r.let(`fType`),u=r.let(`format`);r.if((0,t._)`typeof ${o} == "object" && !(${o} instanceof RegExp)`,()=>r.assign(c,(0,t._)`${o}.type || "string"`).assign(u,(0,t._)`${o}.validate`),()=>r.assign(c,(0,t._)`"string"`).assign(u,o)),e.fail$data((0,t.or)(p(),m()));function p(){return l.strictSchema===!1?t.nil:(0,t._)`${s} && !${u}`}function m(){let e=d.$async?(0,t._)`(${o}.async ? await ${u}(${i}) : ${u}(${i}))`:(0,t._)`${u}(${i})`,r=(0,t._)`(typeof ${u} == "function" ? ${e} : ${u}.test(${i}))`;return(0,t._)`${u} && ${u} !== true && ${c} === ${n} && !${r}`}}function m(){let a=f.formats[o];if(!a){m();return}if(a===!0)return;let[s,c,p]=h(a);s===n&&e.pass(g());function m(){if(l.strictSchema===!1){f.logger.warn(e());return}throw Error(e());function e(){return`unknown format "${o}" ignored in schema at path "${u}"`}}function h(e){let n=e instanceof RegExp?(0,t.regexpCode)(e):l.code.formats?(0,t._)`${l.code.formats}${(0,t.getProperty)(o)}`:void 0,i=r.scopeValue(`formats`,{key:o,ref:e,code:n});return typeof e==`object`&&!(e instanceof RegExp)?[e.type||`string`,e.validate,(0,t._)`${i}.validate`]:[`string`,e,i]}function g(){if(typeof a==`object`&&!(a instanceof RegExp)&&a.async){if(!d.$async)throw Error(`async format in sync schema`);return(0,t._)`await ${p}(${i})`}return typeof c==`function`?(0,t._)`${p}(${i})`:(0,t._)`${p}.test(${i})`}}}}})),Yve=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=[Jve().default]})),Xve=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.contentVocabulary=e.metadataVocabulary=void 0,e.metadataVocabulary=[`title`,`description`,`default`,`deprecated`,`readOnly`,`writeOnly`,`examples`],e.contentVocabulary=[`contentMediaType`,`contentEncoding`,`contentSchema`]})),Zve=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=xve(),n=Nve(),r=qve(),i=Yve(),a=Xve();e.default=[t.default,n.default,(0,r.default)(),i.default,a.metadataVocabulary,a.contentVocabulary]})),Qve=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.DiscrError=void 0;var t;(function(e){e.Tag=`tag`,e.Mapping=`mapping`})(t||(e.DiscrError=t={}))})),$ve=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=K8(),n=Qve(),r=a5(),i=i5(),a=q8();e.default={keyword:`discriminator`,type:`object`,schemaType:`object`,error:{message:({params:{discrError:e,tagName:t}})=>e===n.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:n,tagName:r}})=>(0,t._)`{error: ${e}, tag: ${r}, tagValue: ${n}}`},code(e){let{gen:o,data:s,schema:c,parentSchema:l,it:u}=e,{oneOf:d}=l;if(!u.opts.discriminator)throw Error(`discriminator: requires discriminator option`);let f=c.propertyName;if(typeof f!=`string`)throw Error(`discriminator: requires propertyName`);if(c.mapping)throw Error(`discriminator: mapping is not supported`);if(!d)throw Error(`discriminator: requires oneOf keyword`);let p=o.let(`valid`,!1),m=o.const(`tag`,(0,t._)`${s}${(0,t.getProperty)(f)}`);o.if((0,t._)`typeof ${m} == "string"`,()=>h(),()=>e.error(!1,{discrError:n.DiscrError.Tag,tag:m,tagName:f})),e.ok(p);function h(){let r=_();o.if(!1);for(let e in r)o.elseIf((0,t._)`${m} === ${e}`),o.assign(p,g(r[e]));o.else(),e.error(!1,{discrError:n.DiscrError.Mapping,tag:m,tagName:f}),o.endIf()}function g(n){let r=o.name(`valid`),i=e.subschema({keyword:`oneOf`,schemaProp:n},r);return e.mergeEvaluated(i,t.Name),r}function _(){let e={},t=o(l),n=!0;for(let e=0;e<d.length;e++){let c=d[e];if(c?.$ref&&!(0,a.schemaHasRulesButRef)(c,u.self.RULES)){let e=c.$ref;if(c=r.resolveRef.call(u.self,u.schemaEnv.root,u.baseId,e),c instanceof r.SchemaEnv&&(c=c.schema),c===void 0)throw new i.default(u.opts.uriResolver,u.baseId,e)}let l=c?.properties?.[f];if(typeof l!=`object`)throw Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${f}"`);n&&=t||o(c),s(l,e)}if(!n)throw Error(`discriminator: "${f}" must be required`);return e;function o({required:e}){return Array.isArray(e)&&e.includes(f)}function s(e,t){if(e.const)c(e.const,t);else if(e.enum)for(let n of e.enum)c(n,t);else throw Error(`discriminator: "properties/${f}" must have "const" or "enum"`)}function c(t,n){if(typeof t!=`string`||t in e)throw Error(`discriminator: "${f}" values must be unique strings`);e[t]=n}}}}})),eye=c({$id:()=>v5,$schema:()=>_5,default:()=>C5,definitions:()=>b5,properties:()=>S5,title:()=>y5,type:()=>x5}),_5,v5,y5,b5,x5,S5,C5,tye=o((()=>{_5=`http://json-schema.org/draft-07/schema#`,v5=`http://json-schema.org/draft-07/schema#`,y5=`Core schema meta-schema`,b5={schemaArray:{type:`array`,minItems:1,items:{$ref:`#`}},nonNegativeInteger:{type:`integer`,minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:`#/definitions/nonNegativeInteger`},{default:0}]},simpleTypes:{enum:[`array`,`boolean`,`integer`,`null`,`number`,`object`,`string`]},stringArray:{type:`array`,items:{type:`string`},uniqueItems:!0,default:[]}},x5=[`object`,`boolean`],S5={$id:{type:`string`,format:`uri-reference`},$schema:{type:`string`,format:`uri`},$ref:{type:`string`,format:`uri-reference`},$comment:{type:`string`},title:{type:`string`},description:{type:`string`},default:!0,readOnly:{type:`boolean`,default:!1},examples:{type:`array`,items:!0},multipleOf:{type:`number`,exclusiveMinimum:0},maximum:{type:`number`},exclusiveMaximum:{type:`number`},minimum:{type:`number`},exclusiveMinimum:{type:`number`},maxLength:{$ref:`#/definitions/nonNegativeInteger`},minLength:{$ref:`#/definitions/nonNegativeIntegerDefault0`},pattern:{type:`string`,format:`regex`},additionalItems:{$ref:`#`},items:{anyOf:[{$ref:`#`},{$ref:`#/definitions/schemaArray`}],default:!0},maxItems:{$ref:`#/definitions/nonNegativeInteger`},minItems:{$ref:`#/definitions/nonNegativeIntegerDefault0`},uniqueItems:{type:`boolean`,default:!1},contains:{$ref:`#`},maxProperties:{$ref:`#/definitions/nonNegativeInteger`},minProperties:{$ref:`#/definitions/nonNegativeIntegerDefault0`},required:{$ref:`#/definitions/stringArray`},additionalProperties:{$ref:`#`},definitions:{type:`object`,additionalProperties:{$ref:`#`},default:{}},properties:{type:`object`,additionalProperties:{$ref:`#`},default:{}},patternProperties:{type:`object`,additionalProperties:{$ref:`#`},propertyNames:{format:`regex`},default:{}},dependencies:{type:`object`,additionalProperties:{anyOf:[{$ref:`#`},{$ref:`#/definitions/stringArray`}]}},propertyNames:{$ref:`#`},const:!0,enum:{type:`array`,items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:`#/definitions/simpleTypes`},{type:`array`,items:{$ref:`#/definitions/simpleTypes`},minItems:1,uniqueItems:!0}]},format:{type:`string`},contentMediaType:{type:`string`},contentEncoding:{type:`string`},if:{$ref:`#`},then:{$ref:`#`},else:{$ref:`#`},allOf:{$ref:`#/definitions/schemaArray`},anyOf:{$ref:`#/definitions/schemaArray`},oneOf:{$ref:`#/definitions/schemaArray`},not:{$ref:`#`}},C5={$schema:_5,$id:v5,title:y5,definitions:b5,type:x5,properties:S5,default:!0}})),w5=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv=void 0;var n=vve(),r=Zve(),i=$ve(),a=(tye(),d(eye).default),o=[`/properties`],s=`http://json-schema.org/draft-07/schema`,c=class extends n.default{_addVocabularies(){super._addVocabularies(),r.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(i.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let e=this.opts.$data?this.$dataMetaSchema(a,o):a;this.addMetaSchema(e,s,!1),this.refs[`http://json-schema.org/schema`]=s}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(s)?s:void 0)}};e.Ajv=c,t.exports=e=c,t.exports.Ajv=c,Object.defineProperty(e,"__esModule",{value:!0}),e.default=c;var l=n5();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return l.KeywordCxt}});var u=K8();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return u._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return u.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return u.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return u.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return u.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return u.CodeGen}});var f=r5();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return f.default}});var p=i5();Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return p.default}})})),nye=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0;function t(e,t){return{validate:e,compare:t}}e.fullFormats={date:t(a,o),time:t(c,l),"date-time":t(d,f),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:h,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:w,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:_,int32:{type:`number`,validate:b},int64:{type:`number`,validate:x},float:{type:`number`,validate:S},double:{type:`number`,validate:S},password:!0,binary:!0},e.fastFormats={...e.fullFormats,date:t(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,o),time:t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,l),"date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,f),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},e.formatNames=Object.keys(e.fullFormats);function n(e){return e%4==0&&(e%100!=0||e%400==0)}var r=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,i=[0,31,28,31,30,31,30,31,31,30,31,30,31];function a(e){let t=r.exec(e);if(!t)return!1;let a=+t[1],o=+t[2],s=+t[3];return o>=1&&o<=12&&s>=1&&s<=(o===2&&n(a)?29:i[o])}function o(e,t){if(e&&t)return e>t?1:e<t?-1:0}var s=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;function c(e,t){let n=s.exec(e);if(!n)return!1;let r=+n[1],i=+n[2],a=+n[3],o=n[5];return(r<=23&&i<=59&&a<=59||r===23&&i===59&&a===60)&&(!t||o!==``)}function l(e,t){if(!(e&&t))return;let n=s.exec(e),r=s.exec(t);if(n&&r)return e=n[1]+n[2]+n[3]+(n[4]||``),t=r[1]+r[2]+r[3]+(r[4]||``),e>t?1:e<t?-1:0}var u=/t|\s/i;function d(e){let t=e.split(u);return t.length===2&&a(t[0])&&c(t[1],!0)}function f(e,t){if(!(e&&t))return;let[n,r]=e.split(u),[i,a]=t.split(u),s=o(n,i);if(s!==void 0)return s||l(r,a)}var p=/\/|:/,m=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function h(e){return p.test(e)&&m.test(e)}var g=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function _(e){return g.lastIndex=0,g.test(e)}var v=-(2**31),y=2**31-1;function b(e){return Number.isInteger(e)&&e<=y&&e>=v}function x(e){return Number.isInteger(e)}function S(){return!0}var C=/[^\\]\\Z/;function w(e){if(C.test(e))return!1;try{return new RegExp(e),!0}catch{return!1}}})),rye=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;var t=w5(),n=K8(),r=n.operators,i={formatMaximum:{okStr:`<=`,ok:r.LTE,fail:r.GT},formatMinimum:{okStr:`>=`,ok:r.GTE,fail:r.LT},formatExclusiveMaximum:{okStr:`<`,ok:r.LT,fail:r.GTE},formatExclusiveMinimum:{okStr:`>`,ok:r.GT,fail:r.LTE}};e.formatLimitDefinition={keyword:Object.keys(i),type:`string`,schemaType:`string`,$data:!0,error:{message:({keyword:e,schemaCode:t})=>n.str`should be ${i[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>n._`{comparison: ${i[e].okStr}, limit: ${t}}`},code(e){let{gen:r,data:a,schemaCode:o,keyword:s,it:c}=e,{opts:l,self:u}=c;if(!l.validateFormats)return;let d=new t.KeywordCxt(c,u.RULES.all.format.definition,`format`);d.$data?f():p();function f(){let t=r.scopeValue(`formats`,{ref:u.formats,code:l.code.formats}),i=r.const(`fmt`,n._`${t}[${d.schemaCode}]`);e.fail$data(n.or(n._`typeof ${i} != "object"`,n._`${i} instanceof RegExp`,n._`typeof ${i}.compare != "function"`,m(i)))}function p(){let t=d.schema,i=u.formats[t];if(!i||i===!0)return;if(typeof i!=`object`||i instanceof RegExp||typeof i.compare!=`function`)throw Error(`"${s}": format "${t}" does not define "compare" function`);let a=r.scopeValue(`formats`,{key:t,ref:i,code:l.code.formats?n._`${l.code.formats}${n.getProperty(t)}`:void 0});e.fail$data(m(a))}function m(e){return n._`${e}.compare(${a}, ${o}) ${i[s].fail} 0`}},dependencies:[`format`]},e.default=t=>(t.addKeyword(e.formatLimitDefinition),t)})),iye=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0});var n=nye(),r=rye(),i=K8(),a=new i.Name(`fullFormats`),o=new i.Name(`fastFormats`),s=(e,t={keywords:!0})=>{if(Array.isArray(t))return c(e,t,n.fullFormats,a),e;let[i,s]=t.mode===`fast`?[n.fastFormats,o]:[n.fullFormats,a];return c(e,t.formats||n.formatNames,i,s),t.keywords&&r.default(e),e};s.get=(e,t=`full`)=>{let r=(t===`fast`?n.fastFormats:n.fullFormats)[e];if(!r)throw Error(`Unknown format "${e}"`);return r};function c(e,t,n,r){var a;(a=e.opts.code).formats??(a.formats=i._`require("ajv-formats/dist/formats").${r}`);for(let r of t)e.addFormat(r,n[r])}t.exports=e=s,Object.defineProperty(e,"__esModule",{value:!0}),e.default=s})),aye=u(w5(),1),T5=u(iye(),1),oye={allErrors:!0,multipleOfPrecision:8,strict:!1,verbose:!0,discriminator:!1},sye=/^(#?([0-9A-Fa-f]{3}){1,2}\b|aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow|(rgb\(\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*\))|(rgb\(\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*\)))$/,cye=/^data:([a-z]+\/[a-z0-9-+.]+)?;(?:name=(.*);)?base64,(.*)$/;function lye(e,t,n={},r,i=aye.default,a){let o=new i({...oye,...n});return r?(0,T5.default)(o,r):r!==!1&&(0,T5.default)(o),o.addFormat(`data-url`,cye),o.addFormat(`color`,sye),o.addKeyword(W1),Array.isArray(e)&&o.addMetaSchema(e),ZC(t)&&Object.keys(t).forEach(e=>{o.addFormat(e,t[e])}),a&&(o=a(o)),o}var uye=class{constructor(e,t){this.hasRegisteredRootSchema=!1;let{additionalMetaSchemas:n,customFormats:r,ajvOptionsOverrides:i,ajvFormatOptions:a,AjvClass:o,extenderFn:s,suppressDuplicateFiltering:c}=e;this.ajv=lye(n,r,i,a,o,s),this.localizer=t,this.suppressDuplicateFiltering=c}reset(){this.ajv.removeSchema(),this.lastSeenRootSchema=void 0,this.hasRegisteredRootSchema=!1}rawValidation(e,t){let n,r;try{e.$id&&(r=this.ajv.getSchema(e.$id)),r===void 0&&(r=this.ajv.compile(e)),r(t)}catch(e){n=e}let i;return r&&(typeof this.localizer==`function`&&((r.errors??[]).forEach(e=>{[`missingProperty`,`property`].forEach(t=>{e.params?.[t]&&(e.params[t]=`'${e.params[t]}'`)}),e.params?.deps&&(e.params.deps=e.params.deps.split(`, `).map(e=>`'${e}'`).join(`, `))}),this.localizer(r.errors),(r.errors??[]).forEach(e=>{[`missingProperty`,`property`].forEach(t=>{e.params?.[t]&&(e.params[t]=e.params[t].slice(1,-1))}),e.params?.deps&&(e.params.deps=e.params.deps.split(`, `).map(e=>e.slice(1,-1)).join(`, `))})),i=r.errors||void 0,r.errors=null),{errors:i,validationError:n}}validateFormData(e,t,n,r,i){let a=this.rawValidation(t,e);return sve(this,a,e,t,n,r,i,this.suppressDuplicateFiltering)}handleSchemaUpdate(e){if(this.lastSeenRootSchema===e&&this.hasRegisteredRootSchema)return;let t=e.$id??G1;this.ajv.getSchema(t)===void 0?this.ajv.addSchema(e,t):l0(e,this.ajv.getSchema(t)?.schema)||(this.ajv.removeSchema(t),this.ajv.addSchema(e,t)),this.lastSeenRootSchema=e,this.hasRegisteredRootSchema=!0}isValid(e,t,n){try{this.handleSchemaUpdate(n);let r=B4(e),i=r.$id??Ame(r),a;return a=this.ajv.getSchema(i),a===void 0&&(a=this.ajv.addSchema(r,i).getSchema(i)||this.ajv.compile(r)),a(t)}catch(e){return console.warn(`Error encountered compiling schema:`,e),!1}}};function dye(e={},t){return new uye(e,t)}var E5=dye();function fye(e){return(0,b.forwardRef)(({fields:t,widgets:n,templates:r,...i},a)=>{let o={...e?.fields,...t},s={...e?.widgets,...n},c={...e?.templates,...r,ButtonTemplates:{...e?.templates?.ButtonTemplates,...r?.ButtonTemplates}};return(0,H.jsx)(ive,{...e,...i,fields:o,widgets:s,templates:c,ref:a})})}function D5(...e){return jr(nn(e))}var pye=Ni(`inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive`,{variants:{variant:{default:`bg-primary text-primary-foreground shadow-xs hover:bg-primary/90`,destructive:`bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60`,outline:`border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50`,secondary:`bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80`,ghost:`hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-9 px-4 py-2 has-[>svg]:px-3`,sm:`h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5`,lg:`h-10 rounded-md px-6 has-[>svg]:px-4`,xs:`h-6 rounded-md gap-1 px-2 has-[>svg]:px-2`,icon:`size-9`}},defaultVariants:{variant:`default`,size:`default`}});function O5({className:e,variant:t,size:n,asChild:r=!1,...i}){return(0,H.jsx)(r?LP:`button`,{"data-slot":`button`,className:D5(pye({variant:t,size:n,className:e})),...i})}function mye({uiSchema:e,registry:t,className:n,...r}){let{translateString:i}=t;return(0,H.jsx)(`div`,{className:`p-0 m-0`,children:(0,H.jsxs)(O5,{...r,className:D5(`w-fit gap-2`,n),variant:`outline`,type:`button`,children:[(0,H.jsx)(Zr,{size:16}),` `,i(V4.AddItemButton)]})})}function hye(e){let{children:t,buttonsProps:n,displayLabel:r,hasDescription:i,hasToolbar:a,uiSchema:o,registry:s}=e,c=o4(`ArrayFieldItemButtonsTemplate`,s,J1(o)),l=i?-6:22;return(0,H.jsx)(`div`,{children:(0,H.jsxs)(`div`,{className:`mb-2 flex flex-row flex-wrap items-center`,children:[(0,H.jsx)(`div`,{className:`grow shrink`,children:t}),(0,H.jsx)(`div`,{className:`flex items-end justify-end p-0.5`,children:a&&(0,H.jsx)(`div`,{className:`flex gap-2`,style:{marginLeft:`5px`,marginTop:r?`${l}px`:void 0},children:(0,H.jsx)(c,{...n})})})]})})}function gye(e){let{canAdd:t,disabled:n,fieldPathId:r,uiSchema:i,items:a,optionalDataControl:o,onAddClick:s,readonly:c,registry:l,required:u,schema:d,title:f}=e,p=J1(i),m=o4(`ArrayFieldDescriptionTemplate`,l,p),h=o4(`ArrayFieldTitleTemplate`,l,p),g=!c&&!n,{ButtonTemplates:{AddButton:_}}=l.templates;return(0,H.jsx)(`div`,{children:(0,H.jsx)(`div`,{className:`m-0 flex p-0`,children:(0,H.jsxs)(`div`,{className:`m-0 w-full p-0`,children:[(0,H.jsx)(h,{fieldPathId:r,title:p.title||f,schema:d,uiSchema:i,required:u,registry:l,optionalDataControl:g?o:void 0}),(0,H.jsx)(m,{fieldPathId:r,description:p.description||d.description,schema:d,uiSchema:i,registry:l}),(0,H.jsxs)(`div`,{className:`p-0 m-0 w-full mb-2`,children:[g?void 0:o,a,t&&(0,H.jsx)(`div`,{className:`mt-2 flex justify-end`,children:(0,H.jsx)(_,{id:S4(r,`add`),className:`rjsf-array-item-add`,onClick:s,disabled:n||c,uiSchema:i,registry:l})})]},`array-item-list-${r.$id}`)]})})})}function k5({className:e,type:t,...n}){return(0,H.jsx)(`input`,{type:t,"data-slot":`input`,className:D5(`file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm`,`focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]`,`aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive`,e),...n})}function _ye({id:e,htmlName:t,placeholder:n,required:r,readonly:i,disabled:a,type:o,value:s,onChange:c,onChangeOverride:l,onBlur:u,onFocus:d,autofocus:f,options:p,schema:m,rawErrors:h=[],children:g,extraProps:_,className:v,registry:y}){let{ClearButton:x}=y.templates.ButtonTemplates,S={..._,...n4(m,o,p)},C=({target:{value:e}})=>c(e===``?p.emptyValue:e),w=({target:t})=>u(e,t?.value),T=({target:t})=>d(e,t?.value),E=(0,b.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),c(p.emptyValue??``)},[c,p.emptyValue]);return(0,H.jsxs)(`div`,{className:`p-0.5`,children:[(0,H.jsx)(k5,{id:e,name:t||e,type:o,placeholder:n,autoFocus:f,required:r,disabled:a,readOnly:i,className:D5({"border-destructive focus-visible:ring-0":h.length>0},v),list:m.examples?_4(e):void 0,...S,value:s||s===0?s:``,onChange:l||C,onBlur:w,onFocus:T,"aria-describedby":b4(e,!!m.examples)}),p.allowClearTextInputs&&!i&&!a&&s&&(0,H.jsx)(x,{onClick:E,registry:y}),g,(0,H.jsx)(F8,{id:e,schema:m})]})}var vye=Ni(`relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current`,{variants:{variant:{default:`bg-card text-card-foreground`,destructive:`text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90`}},defaultVariants:{variant:`default`}});function A5({className:e,variant:t,...n}){return(0,H.jsx)(`div`,{"data-slot":`alert`,role:`alert`,className:D5(vye({variant:t}),e),...n})}function yye({className:e,...t}){return(0,H.jsx)(`div`,{"data-slot":`alert-title`,className:D5(`col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight`,e),...t})}function j5({className:e,...t}){return(0,H.jsx)(`div`,{"data-slot":`alert-description`,className:D5(`text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed`,e),...t})}function bye(e){let{name:t,fieldPathId:n,registry:r,onExpand:i}=e,{translateString:a}=r,o=`${n.$id}-button`;return(0,H.jsxs)(`div`,{className:`mt-4`,children:[(0,H.jsxs)(A5,{variant:`default`,className:`mb-2`,children:[(0,H.jsx)(Xr,{className:`h-4 w-4`}),(0,H.jsx)(j5,{children:a(V4.CycleDetected,[t])})]}),(0,H.jsx)(O5,{id:o,type:`button`,variant:`outline`,size:`sm`,className:D5(`my-1`),onClick:()=>i(n.$id),children:a(V4.ExpandButton)})]})}function xye({id:e,description:t,registry:n,uiSchema:r}){return t?(0,H.jsx)(`div`,{children:(0,H.jsx)(`div`,{id:e,className:`text-sm text-muted-foreground`,children:(0,H.jsx)(R8,{description:t,registry:n,uiSchema:r})})}):null}function Sye({errors:e,registry:t}){let{translateString:n}=t;return(0,H.jsxs)(A5,{variant:`destructive`,className:`mb-2`,children:[(0,H.jsx)(Xr,{className:`h-4 w-4`}),(0,H.jsx)(yye,{children:n(V4.ErrorsLabel)}),(0,H.jsx)(j5,{className:`flex flex-col gap-1`,children:e.map((e,t)=>(0,H.jsxs)(`span`,{children:[`• `,e.stack]},t))})]})}function Cye(e){let{errors:t=[],fieldPathId:n}=e;return t.length===0?null:(0,H.jsx)(`div`,{className:`flex flex-col gap-1`,id:g4(n),children:t.map((e,t)=>(0,H.jsx)(`span`,{className:`text-xs font-medium text-destructive mb-1`,children:e},t))})}function wye(e){let{fieldPathId:t,help:n,uiSchema:r,registry:i,hasErrors:a}=e;return n?(0,H.jsx)(`span`,{className:D5(`text-xs font-medium text-muted-foreground`,{"text-destructive":a}),id:v4(t),children:(0,H.jsx)(B8,{help:n,registry:i,uiSchema:r})}):null}function Tye({id:e,children:t,displayLabel:n,rawErrors:r=[],errors:i,help:a,description:o,rawDescription:s,classNames:c,style:l,disabled:u,label:d,hidden:f,onKeyRename:p,onKeyRenameBlur:m,onRemoveProperty:h,readonly:g,required:_,schema:v,uiSchema:y,registry:b}){let x=J1(y),S=o4(`WrapIfAdditionalTemplate`,b,x);if(f)return(0,H.jsx)(`div`,{className:`hidden`,children:t});let C=x.widget===`checkbox`;return(0,H.jsx)(S,{classNames:c,style:l,disabled:u,id:e,label:d,displayLabel:n,onKeyRename:p,onKeyRenameBlur:m,onRemoveProperty:h,rawDescription:s,readonly:g,required:_,schema:v,uiSchema:y,registry:b,children:(0,H.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[n&&!C&&(0,H.jsxs)(`label`,{className:D5(`text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70`,{" text-destructive":r.length>0}),htmlFor:e,children:[d,_?`*`:null]}),t,n&&s&&!C&&(0,H.jsx)(`span`,{className:D5(`text-xs font-medium text-muted-foreground`,{" text-destructive":r.length>0}),children:o}),i,a]})})}function Eye(e){let{children:t,column:n,className:r,...i}=e;return(0,H.jsx)(`div`,{className:D5(`grid gap-2`,r),...i,children:t})}function Dye(e){let{icon:t,iconType:n,className:r,uiSchema:i,registry:a,...o}=e;return(0,H.jsx)(O5,{size:`icon`,variant:`outline`,className:r,...o,type:`button`,children:t})}var M5=(0,b.memo)(Dye);function Oye(e){let{registry:{translateString:t}}=e;return(0,H.jsx)(M5,{title:t(V4.CopyButton),...e,icon:(0,H.jsx)(ti,{className:`h-4 w-4`})})}var kye=(0,b.memo)(Oye);function Aye(e){let{registry:{translateString:t}}=e;return(0,H.jsx)(M5,{title:t(V4.MoveDownButton),...e,icon:(0,H.jsx)(qr,{className:`h-4 w-4`})})}var jye=(0,b.memo)(Aye);function Mye(e){let{registry:{translateString:t}}=e;return(0,H.jsx)(M5,{title:t(V4.MoveUpButton),...e,icon:(0,H.jsx)(Yr,{className:`h-4 w-4`})})}var Nye=(0,b.memo)(Mye);function Pye(e){let{registry:{translateString:t}}=e;return(0,H.jsx)(M5,{title:t(V4.RemoveButton),...e,className:`border-destructive`,icon:(0,H.jsx)(Di,{className:`h-4 w-4 stroke-destructive`})})}var N5=(0,b.memo)(Pye);function Fye(e){let{registry:{translateString:t}}=e;return(0,H.jsx)(M5,{title:t(V4.ClearButton),...e,icon:(0,H.jsx)(Ai,{})})}var Iye=(0,b.memo)(Fye);function Lye({selector:e,optionSchemaField:t}){return(0,H.jsxs)(`div`,{className:D5(`p-4 border rounded-md bg-background shadow-sm`),children:[(0,H.jsx)(`div`,{className:D5(`mb-4`),children:e}),t]})}function Rye({description:e,title:t,properties:n,required:r,uiSchema:i,fieldPathId:a,schema:o,formData:s,optionalDataControl:c,onAddProperty:l,disabled:u,readonly:d,registry:f}){let p=J1(i),m=o4(`TitleFieldTemplate`,f,p),h=o4(`DescriptionFieldTemplate`,f,p),g=!d&&!u,{ButtonTemplates:{AddButton:_}}=f.templates;return(0,H.jsxs)(H.Fragment,{children:[t&&(0,H.jsx)(m,{id:y4(a),title:t,required:r,schema:o,uiSchema:i,registry:f,optionalDataControl:g?c:void 0}),e&&(0,H.jsx)(h,{id:h4(a),description:e,schema:o,uiSchema:i,registry:f}),(0,H.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[g?void 0:c,n.map(e=>(0,H.jsx)(`div`,{className:`${e.hidden?`hidden`:``} flex`,children:(0,H.jsx)(`div`,{className:`w-full`,children:e.content})},e.name)),Y1(o,i,s)?(0,H.jsx)(`div`,{className:`mt-2 flex justify-end`,children:(0,H.jsx)(_,{id:S4(a,`add`),onClick:l,disabled:u||d,className:`rjsf-object-property-expand`,uiSchema:i,registry:f})}):null]})]})}function zye(e){let{id:t,registry:n,label:r,onAddClick:i,onRemoveClick:a}=e;return i?(0,H.jsx)(M5,{id:t,registry:n,className:`rjsf-add-optional-data`,onClick:i,title:r,icon:(0,H.jsx)(Zr,{}),size:`xs`}):a?(0,H.jsx)(N5,{id:t,registry:n,className:`rjsf-remove-optional-data`,onClick:a,title:r,size:`xs`}):(0,H.jsx)(`em`,{id:t,children:r})}function Bye(e){let{submitText:t,norender:n,props:r}=a4(e.uiSchema);return n?null:(0,H.jsx)(`div`,{children:(0,H.jsx)(O5,{type:`submit`,...r,className:D5(`my-2`,r?.className),children:t})})}function P5({className:e,orientation:t=`horizontal`,decorative:n=!0,...r}){return(0,H.jsx)(nO,{"data-slot":`separator`,decorative:n,orientation:t,className:D5(`bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px`,e),...r})}function Vye({id:e,title:t,uiSchema:n,optionalDataControl:r}){let i=(0,H.jsx)(`h5`,{children:J1(n).title||t});return r&&(i=(0,H.jsxs)(`div`,{className:`flex flex-row`,children:[(0,H.jsx)(`div`,{className:`flex-grow`,children:i}),(0,H.jsx)(`div`,{className:`flex`,children:r})]})),(0,H.jsxs)(`div`,{id:e,className:`my-1 flex flex-col gap-0.5`,children:[i,(0,H.jsx)(P5,{dir:`horizontal`,style:{height:`1px`},className:`my-1`})]})}function Hye({classNames:e,style:t,children:n,disabled:r,id:i,label:a,displayLabel:o,onRemoveProperty:s,onKeyRenameBlur:c,rawDescription:l,readonly:u,required:d,schema:f,uiSchema:p,registry:m}){let{templates:h,translateString:g}=m,{RemoveButton:_}=h.ButtonTemplates,v=g(V4.KeyLabel,[a]);if(!(D1 in f))return(0,H.jsx)(`div`,{className:e,style:t,children:n});let y=o?22+(l?-28:0):0,b=`${i}-key`;return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(`div`,{className:`grid grid-cols-12 col-span-12 items-center gap-2 ${e}`,style:t,children:[(0,H.jsx)(`div`,{className:`grid gap-2 col-span-5`,children:(0,H.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[o&&(0,H.jsx)(`label`,{htmlFor:b,className:`text-sm font-medium text-muted-foreground leading-none`,children:v}),(0,H.jsx)(`div`,{className:`pl-0.5`,children:(0,H.jsx)(k5,{required:d,defaultValue:a,disabled:r||u,id:b,name:b,onBlur:u?void 0:c,type:`text`,className:`w-full border shadow-sm`},a)}),!!l&&(0,H.jsx)(`span`,{className:`text-xs font-medium text-muted-foreground`,children:(0,H.jsx)(`div`,{className:`text-sm text-muted-foreground`,children:`\xA0`})})]})}),(0,H.jsx)(`div`,{className:`grid gap-2 col-span-6 pr-0.5`,children:n}),(0,H.jsx)(`div`,{className:`grid gap-2 col-span-1`,style:{marginTop:`${y}px`},children:(0,H.jsx)(_,{id:S4(i,`remove`),iconType:`block`,className:`rjsf-object-property-remove w-full`,disabled:r||u,onClick:s,uiSchema:p,registry:m})})]}),(0,H.jsx)(P5,{dir:`horizontal`,className:`mt-2`})]})}function Uye(){return{ArrayFieldItemTemplate:hye,ArrayFieldTemplate:gye,BaseInputTemplate:_ye,CyclicSchemaExpandTemplate:bye,ButtonTemplates:{AddButton:mye,CopyButton:kye,MoveDownButton:jye,MoveUpButton:Nye,RemoveButton:N5,SubmitButton:Bye,ClearButton:Iye},DescriptionFieldTemplate:xye,ErrorListTemplate:Sye,FieldErrorTemplate:Cye,FieldHelpTemplate:wye,FieldTemplate:Tye,GridTemplate:Eye,MultiSchemaFieldTemplate:Lye,ObjectFieldTemplate:Rye,OptionalDataControlsTemplate:zye,TitleFieldTemplate:Vye,WrapIfAdditionalTemplate:Hye}}function F5(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,H.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,Wye(i,...t)]}function Wye(...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}typeof window<`u`&&window.document&&window.document.createElement;function I5(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}var Gye=b.useInsertionEffect||UO;function L5({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[i,a,o]=Kye({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=qye(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}function Kye({defaultProp:e,onChange:t}){let[n,r]=b.useState(e),i=b.useRef(n),a=b.useRef(t);return Gye(()=>{a.current=t},[t]),b.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}function qye(e){return typeof e==`function`}function Jye(e,t){return b.useReducer((e,n)=>t[e][n]??e,e)}var R5=e=>{let{present:t,children:n}=e,r=Yye(t),i=typeof n==`function`?n({present:r.isPresent}):b.Children.only(n),a=Xye(r.ref,Zye(i));return typeof n==`function`||r.isPresent?b.cloneElement(i,{ref:a}):null};R5.displayName=`Presence`;function Yye(e){let[t,n]=b.useState(),r=b.useRef(null),i=b.useRef(e),a=b.useRef(`none`),[o,s]=Jye(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return b.useEffect(()=>{let e=B5(r.current);a.current=o===`mounted`?e:`none`},[o]),UO(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,o=B5(t);e?s(`MOUNT`):o===`none`||t?.display===`none`?s(`UNMOUNT`):s(n&&r!==o?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,s]),UO(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=a=>{let o=B5(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=B5(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 z5(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function Xye(...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=z5(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():z5(n[e],null)}}},[])}function B5(e){return e?.animationName||`none`}function Zye(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 V5=`Checkbox`,[Qye,$ye]=F5(V5),[ebe,H5]=Qye(V5);function tbe(e){let{__scopeCheckbox:t,checked:n,children:r,defaultChecked:i,disabled:a,form:o,name:s,onCheckedChange:c,required:l,value:u=`on`,internal_do_not_use_render:d}=e,[f,p]=L5({prop:n,defaultProp:i??!1,onChange:c,caller:V5}),[m,h]=b.useState(null),[g,_]=b.useState(null),v=b.useRef(!1),y=!m||!!o||!!m.closest(`form`),x={checked:f,disabled:a,setChecked:p,control:m,setControl:h,name:s,form:o,value:u,hasConsumerStoppedPropagationRef:v,required:l,defaultChecked:!X5(i)&&i,isFormControl:y,bubbleInput:g,setBubbleInput:_};return(0,H.jsx)(ebe,{scope:t,...x,children:nbe(d)?d(x):r})}var U5=`CheckboxTrigger`,W5=b.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},i)=>{let{control:a,value:o,disabled:s,checked:c,required:l,setControl:u,setChecked:d,hasConsumerStoppedPropagationRef:f,isFormControl:p,bubbleInput:m}=H5(U5,e),h=Ii(i,u),g=b.useRef(c);return b.useEffect(()=>{let e=a?.form;if(e){let t=()=>d(g.current);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[a,d]),(0,H.jsx)(QD.button,{type:`button`,role:`checkbox`,"aria-checked":X5(c)?`mixed`:c,"aria-required":l,"data-state":Z5(c),"data-disabled":s?``:void 0,disabled:s,value:o,...r,ref:h,onKeyDown:I5(t,e=>{e.key===`Enter`&&e.preventDefault()}),onClick:I5(n,e=>{d(e=>X5(e)?!0:!e),m&&p&&(f.current=e.isPropagationStopped(),f.current||e.stopPropagation())})})});W5.displayName=U5;var G5=b.forwardRef((e,t)=>{let{__scopeCheckbox:n,name:r,checked:i,defaultChecked:a,required:o,disabled:s,value:c,onCheckedChange:l,form:u,...d}=e;return(0,H.jsx)(tbe,{__scopeCheckbox:n,checked:i,defaultChecked:a,disabled:s,required:o,onCheckedChange:l,name:r,form:u,value:c,internal_do_not_use_render:({isFormControl:e})=>(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(W5,{...d,ref:t,__scopeCheckbox:n}),e&&(0,H.jsx)(Y5,{__scopeCheckbox:n})]})})});G5.displayName=V5;var K5=`CheckboxIndicator`,q5=b.forwardRef((e,t)=>{let{__scopeCheckbox:n,forceMount:r,...i}=e,a=H5(K5,n);return(0,H.jsx)(R5,{present:r||X5(a.checked)||a.checked===!0,children:(0,H.jsx)(QD.span,{"data-state":Z5(a.checked),"data-disabled":a.disabled?``:void 0,...i,ref:t,style:{pointerEvents:`none`,...e.style}})})});q5.displayName=K5;var J5=`CheckboxBubbleInput`,Y5=b.forwardRef(({__scopeCheckbox:e,...t},n)=>{let{control:r,hasConsumerStoppedPropagationRef:i,checked:a,defaultChecked:o,required:s,disabled:c,name:l,value:u,form:d,bubbleInput:f,setBubbleInput:p}=H5(J5,e),m=Ii(n,p),h=JI(a),g=IA(r);b.useEffect(()=>{let e=f;if(!e)return;let t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,`checked`).set,r=!i.current;if(h!==a&&n){let t=new Event(`click`,{bubbles:r});e.indeterminate=X5(a),n.call(e,!X5(a)&&a),e.dispatchEvent(t)}},[f,h,a,i]);let _=b.useRef(!X5(a)&&a);return(0,H.jsx)(QD.input,{type:`checkbox`,"aria-hidden":!0,defaultChecked:o??_.current,required:s,disabled:c,name:l,value:u,form:d,...t,tabIndex:-1,ref:m,style:{...t.style,...g,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0,transform:`translateX(-100%)`}})});Y5.displayName=J5;function nbe(e){return typeof e==`function`}function X5(e){return e===`indeterminate`}function Z5(e){return X5(e)?`indeterminate`:e?`checked`:`unchecked`}function rbe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var ibe=[`color`],abe=(0,b.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=rbe(e,ibe);return(0,b.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},i,{ref:t}),(0,b.createElement)(`path`,{d:`M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z`,fill:r,fillRule:`evenodd`,clipRule:`evenodd`}))});function Q5({className:e,...t}){return(0,H.jsx)(G5,{"data-slot":`checkbox`,className:D5(`peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50`,e),...t,children:(0,H.jsx)(q5,{"data-slot":`checkbox-indicator`,className:`flex items-center justify-center text-current transition-none`,children:(0,H.jsx)(abe,{className:`size-3.5`})})})}function $5({className:e,...t}){return(0,H.jsx)(VI,{"data-slot":`label`,className:D5(`flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50`,e),...t})}function obe({id:e,htmlName:t,disabled:n,options:r,value:i,autofocus:a,readonly:o,required:s,onChange:c,onBlur:l,onFocus:u,className:d}){let{enumOptions:f,enumDisabled:p,inline:m,emptyValue:h}=r,g=r4(r),_=Array.isArray(i)?i:[i],v=({target:t})=>l(e,Z2(t?.value,f,g,h)),y=({target:t})=>u(e,Z2(t?.value,f,g,h));return(0,H.jsx)(`div`,{className:D5({"flex flex-col gap-2":!m,"flex flex-row gap-4 flex-wrap":m}),children:Array.isArray(f)&&f.map((r,i)=>{let l=K2(r.value,_),u=Array.isArray(p)&&p.includes(r.value),m=x4(e,i);return(0,H.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,H.jsx)(Q5,{id:m,name:t||e,required:s,disabled:n||u||o,onCheckedChange:e=>{c(e?Y2(i,_,f):G2(i,_,f))},className:d,checked:l,autoFocus:a&&i===0,onBlur:v,onFocus:y,"aria-describedby":b4(e)}),(0,H.jsx)($5,{className:`leading-tight`,htmlFor:x4(e,i),children:r.label})]},m)})})}function sbe(e){let{id:t,htmlName:n,value:r,disabled:i,readonly:a,label:o,hideLabel:s,schema:c,autofocus:l,options:u,onChange:d,onBlur:f,onFocus:p,registry:m,uiSchema:h,className:g}=e,_=k4(c),v=o4(`DescriptionFieldTemplate`,m,u),y=e=>d(e),b=()=>f(t,r),x=()=>p(t,r),S=u.description||c.description;return(0,H.jsxs)(`div`,{className:`relative ${i||a?`cursor-not-allowed opacity-50`:``}`,"aria-describedby":b4(t),children:[!s&&S&&(0,H.jsx)(v,{id:h4(t),description:S,schema:c,uiSchema:h,registry:m}),(0,H.jsxs)(`div`,{className:`flex items-center gap-2 my-2`,children:[(0,H.jsx)(Q5,{id:t,name:n||t,checked:r!==void 0&&!!r,required:_,disabled:i||a,autoFocus:l,onCheckedChange:y,onBlur:b,onFocus:x,className:g}),(0,H.jsx)($5,{className:`leading-tight`,htmlFor:t,children:T4(o,s||!o)})]})]})}function cbe(e){let t=e+`CollectionProvider`,[n,r]=F5(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,H.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})};o.displayName=t;let s=e+`CollectionSlot`,c=Li(s),l=b.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=Ii(t,a(s,n).collectionRef);return(0,H.jsx)(c,{ref:i,children:r})});l.displayName=s;let u=e+`CollectionItemSlot`,d=`data-radix-collection-item`,f=Li(u),p=b.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=b.useRef(null),s=Ii(t,o),c=a(u,n);return b.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,H.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 e7=`rovingFocusGroup.onEntryFocus`,lbe={bubbles:!1,cancelable:!0},t7=`RovingFocusGroup`,[n7,r7,ube]=cbe(t7),[dbe,i7]=F5(t7,[ube]),[fbe,pbe]=dbe(t7),a7=b.forwardRef((e,t)=>(0,H.jsx)(n7.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,H.jsx)(n7.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,H.jsx)(mbe,{...e,ref:t})})}));a7.displayName=t7;var mbe=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=Ii(t,f),m=qI(a),[h,g]=L5({prop:o,defaultProp:s??null,onChange:c,caller:t7}),[_,v]=b.useState(!1),y=fO(l),x=r7(n),S=b.useRef(!1),[C,w]=b.useState(0);return b.useEffect(()=>{let e=f.current;if(e)return e.addEventListener(e7,y),()=>e.removeEventListener(e7,y)},[y]),(0,H.jsx)(fbe,{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,H.jsx)(QD.div,{tabIndex:_||C===0?-1:0,"data-orientation":r,...d,ref:p,style:{outline:`none`,...e.style},onMouseDown:I5(e.onMouseDown,()=>{S.current=!0}),onFocus:I5(e.onFocus,e=>{let t=!S.current;if(e.target===e.currentTarget&&t&&!_){let t=new CustomEvent(e7,lbe);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=x().filter(e=>e.focusable);c7([e.find(e=>e.active),e.find(e=>e.id===h),...e].filter(Boolean).map(e=>e.ref.current),u)}}S.current=!1}),onBlur:I5(e.onBlur,()=>v(!1))})})}),o7=`RovingFocusGroupItem`,s7=b.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...s}=e,c=KO(),l=a||c,u=pbe(o7,n),d=u.currentTabStopId===l,f=r7(n),{onFocusableItemAdd:p,onFocusableItemRemove:m,currentTabStopId:h}=u;return b.useEffect(()=>{if(r)return p(),()=>m()},[r,p,m]),(0,H.jsx)(n7.ItemSlot,{scope:n,id:l,focusable:r,active:i,children:(0,H.jsx)(QD.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...s,ref:t,onMouseDown:I5(e.onMouseDown,e=>{r?u.onItemFocus(l):e.preventDefault()}),onFocus:I5(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:I5(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){u.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=_be(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?vbe(n,r+1):n.slice(r+1)}setTimeout(()=>c7(n))}}),children:typeof o==`function`?o({isCurrentTabStop:d,hasTabStop:h!=null}):o})})});s7.displayName=o7;var hbe={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function gbe(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}function _be(e,t,n){let r=gbe(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return hbe[r]}function c7(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function vbe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var ybe=a7,bbe=s7,l7=`Radio`,[xbe,u7]=F5(l7),[Sbe,d7]=xbe(l7);function f7(e){let{__scopeRadio:t,checked:n=!1,children:r,disabled:i,form:a,name:o,onCheck:s,required:c,value:l=`on`,internal_do_not_use_render:u}=e,[d,f]=b.useState(null),[p,m]=b.useState(null),h={checked:n,disabled:i,required:c,name:o,form:a,value:l,control:d,setControl:f,hasConsumerStoppedPropagationRef:b.useRef(!1),isFormControl:!d||!!a||!!d.closest(`form`),bubbleInput:p,setBubbleInput:m,onCheck:()=>s?.()};return(0,H.jsx)(Sbe,{scope:t,...h,children:wbe(u)?u(h):r})}var p7=`RadioTrigger`,m7=b.forwardRef(({__scopeRadio:e,onClick:t,...n},r)=>{let{checked:i,disabled:a,value:o,setControl:s,onCheck:c,hasConsumerStoppedPropagationRef:l,isFormControl:u,bubbleInput:d}=d7(p7,e),f=Ii(r,s);return(0,H.jsx)(QD.button,{type:`button`,role:`radio`,"aria-checked":i,"data-state":y7(i),"data-disabled":a?``:void 0,disabled:a,value:o,...n,ref:f,onClick:I5(t,e=>{i||c(),d&&u&&(l.current=e.isPropagationStopped(),l.current||e.stopPropagation())})})});m7.displayName=p7;var Cbe=b.forwardRef((e,t)=>{let{__scopeRadio:n,name:r,checked:i,required:a,disabled:o,value:s,onCheck:c,form:l,...u}=e;return(0,H.jsx)(f7,{__scopeRadio:n,checked:i,disabled:o,required:a,onCheck:c,name:r,form:l,value:s,internal_do_not_use_render:({isFormControl:e})=>(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(m7,{...u,ref:t,__scopeRadio:n}),e&&(0,H.jsx)(v7,{__scopeRadio:n})]})})});Cbe.displayName=l7;var h7=`RadioIndicator`,g7=b.forwardRef((e,t)=>{let{__scopeRadio:n,forceMount:r,...i}=e,a=d7(h7,n);return(0,H.jsx)(R5,{present:r||a.checked,children:(0,H.jsx)(QD.span,{"data-state":y7(a.checked),"data-disabled":a.disabled?``:void 0,...i,ref:t})})});g7.displayName=h7;var _7=`RadioBubbleInput`,v7=b.forwardRef(({__scopeRadio:e,...t},n)=>{let{control:r,checked:i,required:a,disabled:o,name:s,value:c,form:l,bubbleInput:u,setBubbleInput:d,hasConsumerStoppedPropagationRef:f}=d7(_7,e),p=Ii(n,d),m=JI(i),h=IA(r);b.useEffect(()=>{let e=u;if(!e)return;let t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,`checked`).set,r=!f.current;if(m!==i&&n){let t=new Event(`click`,{bubbles:r});n.call(e,i),e.dispatchEvent(t)}},[u,m,i,f]);let g=b.useRef(i);return(0,H.jsx)(QD.input,{type:`radio`,"aria-hidden":!0,defaultChecked:g.current,required:a,disabled:o,name:s,value:c,form:l,...t,tabIndex:-1,ref:p,style:{...t.style,...h,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0,transform:`translateX(-100%)`}})});v7.displayName=_7;function wbe(e){return typeof e==`function`}function y7(e){return e?`checked`:`unchecked`}var Tbe=[`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`],b7=`RadioGroup`,[Ebe,Dbe]=F5(b7,[i7,u7]),x7=i7(),S7=u7(),[Obe,kbe]=Ebe(b7),C7=b.forwardRef((e,t)=>{let{__scopeRadioGroup:n,name:r,defaultValue:i,value:a,required:o=!1,disabled:s=!1,orientation:c,dir:l,loop:u=!0,onValueChange:d,...f}=e,p=x7(n),m=qI(l),[h,g]=L5({prop:a,defaultProp:i??null,onChange:d,caller:b7});return(0,H.jsx)(Obe,{scope:n,name:r,required:o,disabled:s,value:h,onValueChange:g,children:(0,H.jsx)(ybe,{asChild:!0,...p,orientation:c,dir:m,loop:u,children:(0,H.jsx)(QD.div,{role:`radiogroup`,"aria-required":o,"aria-orientation":c,"data-disabled":s?``:void 0,dir:m,...f,ref:t})})})});C7.displayName=b7;var Abe=`RadioGroupItem`,jbe=`RadioGroupItemProvider`,w7=`RadioGroupItemTrigger`,Mbe=`RadioGroupItemBubbleInput`;function Nbe(e){let{__scopeRadioGroup:t,value:n,disabled:r,children:i,internal_do_not_use_render:a}=e,o=kbe(jbe,t),s=S7(t),c=o.disabled||r;return(0,H.jsx)(f7,{...s,checked:o.value===n,disabled:c,required:o.required,name:o.name,value:n,onCheck:()=>o.onValueChange(n),internal_do_not_use_render:a,children:i})}var T7=b.forwardRef((e,t)=>{let{__scopeRadioGroup:n,...r}=e,i=x7(n),a=S7(n),{checked:o,disabled:s}=d7(w7,a.__scopeRadio),c=b.useRef(null),l=Ii(t,c),u=b.useRef(!1);return b.useEffect(()=>{let e=e=>{Tbe.includes(e.key)&&(u.current=!0)},t=()=>u.current=!1;return document.addEventListener(`keydown`,e),document.addEventListener(`keyup`,t),()=>{document.removeEventListener(`keydown`,e),document.removeEventListener(`keyup`,t)}},[]),(0,H.jsx)(bbe,{asChild:!0,...i,focusable:!s,active:o,children:(0,H.jsx)(m7,{...a,...r,ref:l,onKeyDown:I5(r.onKeyDown,e=>{e.key===`Enter`&&e.preventDefault()}),onFocus:I5(r.onFocus,()=>{u.current&&c.current?.click()})})})});T7.displayName=w7;var E7=b.forwardRef((e,t)=>{let{__scopeRadioGroup:n,value:r,disabled:i,...a}=e;return(0,H.jsx)(Nbe,{__scopeRadioGroup:n,value:r,disabled:i,internal_do_not_use_render:({isFormControl:e})=>(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(T7,{...a,ref:t,__scopeRadioGroup:n}),e&&(0,H.jsx)(D7,{__scopeRadioGroup:n})]})})});E7.displayName=Abe;var D7=b.forwardRef((e,t)=>{let{__scopeRadioGroup:n,...r}=e;return(0,H.jsx)(v7,{...S7(n),...r,ref:t})});D7.displayName=Mbe;var Pbe=`RadioGroupIndicator`,O7=b.forwardRef((e,t)=>{let{__scopeRadioGroup:n,...r}=e;return(0,H.jsx)(g7,{...S7(n),...r,ref:t})});O7.displayName=Pbe;function Fbe({className:e,...t}){return(0,H.jsx)(C7,{"data-slot":`radio-group`,className:D5(`grid gap-3`,e),...t})}function Ibe({className:e,...t}){return(0,H.jsx)(E7,{"data-slot":`radio-group-item`,className:D5(`border-input text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50`,e),...t,children:(0,H.jsx)(O7,{"data-slot":`radio-group-indicator`,className:`relative flex items-center justify-center`,children:(0,H.jsx)(Qr,{className:`fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2`})})})}function Lbe({id:e,options:t,value:n,required:r,disabled:i,readonly:a,onChange:o,onBlur:s,onFocus:c,className:l}){let{enumOptions:u,enumDisabled:d,emptyValue:f}=t,p=r4(t),m=e=>o(Z2(e,u,p,f)),h=({target:t})=>s(e,Z2(t?.value,u,p,f)),g=({target:t})=>c(e,Z2(t?.value,u,p,f)),_=!!t?.inline;return(0,H.jsx)(`div`,{className:`mb-0`,children:(0,H.jsx)(Fbe,{defaultValue:n?.toString(),required:r,disabled:i||a,onValueChange:e=>{m(e)},onBlur:h,onFocus:g,"aria-describedby":b4(e),orientation:_?`horizontal`:`vertical`,className:D5(`flex flex-wrap`,{"flex-col":!_},l),children:Array.isArray(u)&&u.map((t,r)=>{let i=Array.isArray(d)&&d.includes(t.value);return(0,H.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,H.jsx)(Ibe,{checked:K2(t.value,n),value:Q2(t.value,r,p),id:x4(e,r),disabled:i}),(0,H.jsx)($5,{className:`leading-tight`,htmlFor:x4(e,r),children:t.label})]},x4(e,r))})})})}function k7(e,[t,n]){return Math.min(n,Math.max(t,e))}var Rbe=b.createContext(void 0);function zbe(e){let t=b.useContext(Rbe);return e||t||`ltr`}function Bbe(e){let t=b.useRef({value:e,previous:e});return b.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function Vbe(e){let[t,n]=b.useState(void 0);return BL(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else n(void 0)},[e]),t}function Hbe(e){let t=e+`CollectionProvider`,[n,r]=zL(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,H.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})};o.displayName=t;let s=e+`CollectionSlot`,c=UL(s),l=b.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=RL(t,a(s,n).collectionRef);return(0,H.jsx)(c,{ref:i,children:r})});l.displayName=s;let u=e+`CollectionItemSlot`,d=`data-radix-collection-item`,f=UL(u),p=b.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=b.useRef(null),s=RL(t,o),c=a(u,n);return b.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,H.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 A7=[`PageUp`,`PageDown`],j7=[`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`],M7={"from-left":[`Home`,`PageDown`,`ArrowDown`,`ArrowLeft`],"from-right":[`Home`,`PageDown`,`ArrowDown`,`ArrowRight`],"from-bottom":[`Home`,`PageDown`,`ArrowDown`,`ArrowLeft`],"from-top":[`Home`,`PageDown`,`ArrowUp`,`ArrowLeft`]},N7=`Slider`,[P7,Ube,Wbe]=Hbe(N7),[F7,Gbe]=zL(N7,[Wbe]),[Kbe,I7]=F7(N7),L7=b.forwardRef((e,t)=>{let{name:n,min:r=0,max:i=100,step:a=1,orientation:o=`horizontal`,disabled:s=!1,minStepsBetweenThumbs:c=0,defaultValue:l=[r],value:u,onValueChange:d=()=>{},onValueCommit:f=()=>{},inverted:p=!1,form:m,...h}=e,g=b.useRef(new Set),_=b.useRef(0),v=o===`horizontal`?qbe:Jbe,[y=[],x]=HL({prop:u,defaultProp:l,onChange:e=>{[...g.current][_.current]?.focus(),d(e)}}),S=b.useRef(y);function C(e){E(e,$be(y,e))}function w(e){E(e,_.current)}function T(){let e=S.current[_.current];y[_.current]!==e&&f(y)}function E(e,t,{commit:n}={commit:!1}){let o=rxe(a),s=k7(ixe(Math.round((e-r)/a)*a+r,o),[r,i]);x((e=[])=>{let r=Zbe(e,s,t);if(nxe(r,c*a)){_.current=r.indexOf(s);let t=String(r)!==String(e);return t&&n&&f(r),t?r:e}else return e})}return(0,H.jsx)(Kbe,{scope:e.__scopeSlider,name:n,disabled:s,min:r,max:i,valueIndexToChangeRef:_,thumbs:g.current,values:y,orientation:o,form:m,children:(0,H.jsx)(P7.Provider,{scope:e.__scopeSlider,children:(0,H.jsx)(P7.Slot,{scope:e.__scopeSlider,children:(0,H.jsx)(v,{"aria-disabled":s,"data-disabled":s?``:void 0,...h,ref:t,onPointerDown:FL(h.onPointerDown,()=>{s||(S.current=y)}),min:r,max:i,inverted:p,onSlideStart:s?void 0:C,onSlideMove:s?void 0:w,onSlideEnd:s?void 0:T,onHomeKeyDown:()=>!s&&E(r,0,{commit:!0}),onEndKeyDown:()=>!s&&E(i,y.length-1,{commit:!0}),onStepKeyDown:({event:e,direction:t})=>{if(!s){let n=A7.includes(e.key)||e.shiftKey&&j7.includes(e.key)?10:1,r=_.current,i=y[r];E(i+a*n*t,r,{commit:!0})}}})})})})});L7.displayName=N7;var[R7,z7]=F7(N7,{startEdge:`left`,endEdge:`right`,size:`width`,direction:1}),qbe=b.forwardRef((e,t)=>{let{min:n,max:r,dir:i,inverted:a,onSlideStart:o,onSlideMove:s,onSlideEnd:c,onStepKeyDown:l,...u}=e,[d,f]=b.useState(null),p=RL(t,e=>f(e)),m=b.useRef(void 0),h=zbe(i),g=h===`ltr`,_=g&&!a||!g&&a;function v(e){let t=m.current||d.getBoundingClientRect(),i=Y7([0,t.width],_?[n,r]:[r,n]);return m.current=t,i(e-t.left)}return(0,H.jsx)(R7,{scope:e.__scopeSlider,startEdge:_?`left`:`right`,endEdge:_?`right`:`left`,direction:_?1:-1,size:`width`,children:(0,H.jsx)(B7,{dir:h,"data-orientation":`horizontal`,...u,ref:p,style:{...u.style,"--radix-slider-thumb-transform":`translateX(-50%)`},onSlideStart:e=>{let t=v(e.clientX);o?.(t)},onSlideMove:e=>{let t=v(e.clientX);s?.(t)},onSlideEnd:()=>{m.current=void 0,c?.()},onStepKeyDown:e=>{let t=M7[_?`from-left`:`from-right`].includes(e.key);l?.({event:e,direction:t?-1:1})}})})}),Jbe=b.forwardRef((e,t)=>{let{min:n,max:r,inverted:i,onSlideStart:a,onSlideMove:o,onSlideEnd:s,onStepKeyDown:c,...l}=e,u=b.useRef(null),d=RL(t,u),f=b.useRef(void 0),p=!i;function m(e){let t=f.current||u.current.getBoundingClientRect(),i=Y7([0,t.height],p?[r,n]:[n,r]);return f.current=t,i(e-t.top)}return(0,H.jsx)(R7,{scope:e.__scopeSlider,startEdge:p?`bottom`:`top`,endEdge:p?`top`:`bottom`,size:`height`,direction:p?1:-1,children:(0,H.jsx)(B7,{"data-orientation":`vertical`,...l,ref:d,style:{...l.style,"--radix-slider-thumb-transform":`translateY(50%)`},onSlideStart:e=>{let t=m(e.clientY);a?.(t)},onSlideMove:e=>{let t=m(e.clientY);o?.(t)},onSlideEnd:()=>{f.current=void 0,s?.()},onStepKeyDown:e=>{let t=M7[p?`from-bottom`:`from-top`].includes(e.key);c?.({event:e,direction:t?-1:1})}})})}),B7=b.forwardRef((e,t)=>{let{__scopeSlider:n,onSlideStart:r,onSlideMove:i,onSlideEnd:a,onHomeKeyDown:o,onEndKeyDown:s,onStepKeyDown:c,...l}=e,u=I7(N7,n);return(0,H.jsx)(WL.span,{...l,ref:t,onKeyDown:FL(e.onKeyDown,e=>{e.key===`Home`?(o(e),e.preventDefault()):e.key===`End`?(s(e),e.preventDefault()):A7.concat(j7).includes(e.key)&&(c(e),e.preventDefault())}),onPointerDown:FL(e.onPointerDown,e=>{let t=e.target;t.setPointerCapture(e.pointerId),e.preventDefault(),u.thumbs.has(t)?t.focus():r(e)}),onPointerMove:FL(e.onPointerMove,e=>{e.target.hasPointerCapture(e.pointerId)&&i(e)}),onPointerUp:FL(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&(t.releasePointerCapture(e.pointerId),a(e))})})}),V7=`SliderTrack`,H7=b.forwardRef((e,t)=>{let{__scopeSlider:n,...r}=e,i=I7(V7,n);return(0,H.jsx)(WL.span,{"data-disabled":i.disabled?``:void 0,"data-orientation":i.orientation,...r,ref:t})});H7.displayName=V7;var U7=`SliderRange`,W7=b.forwardRef((e,t)=>{let{__scopeSlider:n,...r}=e,i=I7(U7,n),a=z7(U7,n),o=RL(t,b.useRef(null)),s=i.values.length,c=i.values.map(e=>J7(e,i.min,i.max)),l=s>1?Math.min(...c):0,u=100-Math.max(...c);return(0,H.jsx)(WL.span,{"data-orientation":i.orientation,"data-disabled":i.disabled?``:void 0,...r,ref:o,style:{...e.style,[a.startEdge]:l+`%`,[a.endEdge]:u+`%`}})});W7.displayName=U7;var G7=`SliderThumb`,K7=b.forwardRef((e,t)=>{let n=Ube(e.__scopeSlider),[r,i]=b.useState(null),a=RL(t,e=>i(e)),o=b.useMemo(()=>r?n().findIndex(e=>e.ref.current===r):-1,[n,r]);return(0,H.jsx)(Ybe,{...e,ref:a,index:o})}),Ybe=b.forwardRef((e,t)=>{let{__scopeSlider:n,index:r,name:i,...a}=e,o=I7(G7,n),s=z7(G7,n),[c,l]=b.useState(null),u=RL(t,e=>l(e)),d=!c||o.form||!!c.closest(`form`),f=Vbe(c),p=o.values[r],m=p===void 0?0:J7(p,o.min,o.max),h=Qbe(r,o.values.length),g=f?.[s.size],_=g?exe(g,m,s.direction):0;return b.useEffect(()=>{if(c)return o.thumbs.add(c),()=>{o.thumbs.delete(c)}},[c,o.thumbs]),(0,H.jsxs)(`span`,{style:{transform:`var(--radix-slider-thumb-transform)`,position:`absolute`,[s.startEdge]:`calc(${m}% + ${_}px)`},children:[(0,H.jsx)(P7.ItemSlot,{scope:e.__scopeSlider,children:(0,H.jsx)(WL.span,{role:`slider`,"aria-label":e[`aria-label`]||h,"aria-valuemin":o.min,"aria-valuenow":p,"aria-valuemax":o.max,"aria-orientation":o.orientation,"data-orientation":o.orientation,"data-disabled":o.disabled?``:void 0,tabIndex:o.disabled?void 0:0,...a,ref:u,style:p===void 0?{display:`none`}:e.style,onFocus:FL(e.onFocus,()=>{o.valueIndexToChangeRef.current=r})})}),d&&(0,H.jsx)(q7,{name:i??(o.name?o.name+(o.values.length>1?`[]`:``):void 0),form:o.form,value:p},r)]})});K7.displayName=G7;var Xbe=`RadioBubbleInput`,q7=b.forwardRef(({__scopeSlider:e,value:t,...n},r)=>{let i=b.useRef(null),a=RL(i,r),o=Bbe(t);return b.useEffect(()=>{let e=i.current;if(!e)return;let n=window.HTMLInputElement.prototype,r=Object.getOwnPropertyDescriptor(n,`value`).set;if(o!==t&&r){let n=new Event(`input`,{bubbles:!0});r.call(e,t),e.dispatchEvent(n)}},[o,t]),(0,H.jsx)(WL.input,{style:{display:`none`},...n,ref:a,defaultValue:t})});q7.displayName=Xbe;function Zbe(e=[],t,n){let r=[...e];return r[n]=t,r.sort((e,t)=>e-t)}function J7(e,t,n){return k7(100/(n-t)*(e-t),[0,100])}function Qbe(e,t){if(t>2)return`Value ${e+1} of ${t}`;if(t===2)return[`Minimum`,`Maximum`][e]}function $be(e,t){if(e.length===1)return 0;let n=e.map(e=>Math.abs(e-t)),r=Math.min(...n);return n.indexOf(r)}function exe(e,t,n){let r=e/2;return(r-Y7([0,50],[0,r])(t)*n)*n}function txe(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function nxe(e,t){if(t>0){let n=txe(e);return Math.min(...n)>=t}return!0}function Y7(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 rxe(e){return(String(e).split(`.`)[1]||``).length}function ixe(e,t){let n=10**t;return Math.round(e*n)/n}var axe=L7,oxe=H7,sxe=W7,cxe=K7;function lxe({className:e,defaultValue:t,value:n,min:r=0,max:i=100,...a}){let o=(0,b.useMemo)(()=>Array.isArray(n)?n:Array.isArray(t)?t:[r,i],[n,t,r,i]);return(0,H.jsxs)(axe,{"data-slot":`slider`,defaultValue:t,value:n,min:r,max:i,className:D5(`relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col`,e),...a,children:[(0,H.jsx)(oxe,{"data-slot":`slider-track`,className:D5(`bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5`),children:(0,H.jsx)(sxe,{"data-slot":`slider-range`,className:D5(`bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full`)})}),Array.from({length:o.length},(e,t)=>(0,H.jsx)(cxe,{"data-slot":`slider-thumb`,className:`border-primary bg-background ring-ring/50 block size-4 shrink-0 rounded-full border shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50`},t))]})}var uxe=[`name`,`min`,`max`,`step`,`orientation`,`disabled`,`defaultValue`,`value`,`onValueChange`,`className`,`dir`,`inverted`,`minStepsBetweenThumbs`];function dxe({value:e,readonly:t,disabled:n,options:r,schema:i,onChange:a,label:o,id:s}){let c=e=>a(e[0]),l={value:e,label:o,id:s,...t4(i)},u={id:s,...uD(r.props||{},uxe)};return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(lxe,{disabled:n||t,min:l.min,max:l.max,step:l.step,value:[e],onValueChange:c,...u,"aria-describedby":b4(s)}),e]})}var fxe=Ni(`inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden`,{variants:{variant:{default:`border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90`,secondary:`border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90`,destructive:`border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60`,outline:`text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground`}},defaultVariants:{variant:`default`}});function pxe({className:e,variant:t,asChild:n=!1,...r}){return(0,H.jsx)(n?LP:`span`,{"data-slot":`badge`,className:D5(fxe({variant:t}),e),...r})}var X7=(0,b.forwardRef)(({className:e,...t},n)=>(0,H.jsx)(KR,{ref:n,"data-slot":`command`,className:D5(`bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md`,e),...t})),mxe=(0,b.forwardRef)(({className:e,...t},n)=>(0,H.jsxs)(`div`,{className:`flex items-center border-b px-3`,"cmdk-input-wrapper":``,children:[(0,H.jsx)(Si,{className:`mr-2 h-4 w-4 shrink-0 opacity-50`}),(0,H.jsx)(KR.Input,{ref:n,className:D5(`flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50`,e),...t})]}));mxe.displayName=KR.Input.displayName;function Z7({className:e,...t}){return(0,H.jsx)(KR.List,{"data-slot":`command-list`,className:D5(`max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto`,e),...t})}function Q7({className:e,...t}){return(0,H.jsx)(KR.Group,{"data-slot":`command-group`,className:D5(`text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium`,e),...t})}function $7({className:e,...t}){return(0,H.jsx)(KR.Item,{"data-slot":`command-item`,className:D5(`data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),...t})}function hxe({multiple:e,items:t=[],selected:n,onValueChange:r,autoFocus:i=!1,disabled:a=!1,ariaDescribedby:o,ariaPlaceholder:s,onFocus:c,onBlur:l,className:u,id:d}){let f=(0,b.useRef)(null),[p,m]=(0,b.useState)(!1),[h,g]=(0,b.useState)(``),_=(0,b.useMemo)(()=>t.filter(e=>n.some(t=>nD(e.value,t))),[t,n]),v=(0,b.useMemo)(()=>t.filter(e=>!_.some(t=>nD(t.value,e.value))),[t,_]),y=(0,b.useCallback)(e=>{if(a)return;let t=_.filter(t=>!nD(t.value,e.value));r?.(t.map(e=>e.index))},[_,r,a]),x=(0,b.useCallback)(e=>{if(!(a||f.current?.value!==``))if(e.key===`Delete`||e.key===`Backspace`){let e=_.slice(0,-1);r?.(e.map(e=>e.index))}else e.key===`Escape`&&f.current.blur()},[_,r,a]),S=(0,b.useCallback)(t=>{if(a)return;g(``);let n=e?[..._,t]:[t];r?.(n.map(e=>e.index))},[e,_,r,a]),C=(0,b.useCallback)(e=>{a||m(!0),c?.(e)},[a,c]);return(0,H.jsxs)(X7,{onKeyDown:x,className:D5(`overflow-visible bg-transparent`,u),autoFocus:i,"aria-disabled":a,onBlur:l,onFocus:C,"aria-describedby":o,"aria-placeholder":s,children:[(0,H.jsx)(`div`,{className:D5(`group border border-input px-3 py-2 text-sm ring-offset-background rounded-md focus-within:ring-1 focus-within:ring-ring focus-within:ring-offset-1`,a&&`opacity-50 cursor-not-allowed`),children:(0,H.jsxs)(`div`,{className:`flex gap-1 flex-wrap`,children:[_.map(e=>(0,H.jsxs)(pxe,{variant:`secondary`,children:[e.label,(0,H.jsx)(`button`,{type:`button`,className:`rtl:mr-1 ltr:ml-1 ring-offset-background rounded-full outline-none focus:ring-1 focus:ring-ring focus:ring-offset-1`,onKeyDown:t=>t.key===`Enter`&&!a&&y(e),onMouseDown:e=>{e.preventDefault(),e.stopPropagation()},onClick:()=>y(e),disabled:a,children:(0,H.jsx)(Ai,{className:D5(`h-3 w-3 text-muted-foreground hover:text-foreground`,a&&`pointer-events-none`)})})]},e.value)),(0,H.jsx)(KR.Input,{ref:f,value:h,onValueChange:g,onBlur:()=>m(!1),onFocus:()=>!a&&m(!0),placeholder:`Select ...`,className:`rtl:mr-2 ltr:ml-2 bg-transparent outline-none placeholder:text-muted-foreground flex-1`,disabled:a,"aria-controls":`command-item-input-${d}`,"aria-labelledby":`command-item-input-${d}`,id:`command-item-input-${d}`})]})}),p&&!a&&v.length>0&&(0,H.jsx)(`div`,{className:`relative mt-2`,children:(0,H.jsx)(`div`,{className:`absolute w-full z-10 top-0 rounded-md border bg-popover text-popover-foreground shadow-md outline-none animate-in`,children:(0,H.jsx)(Q7,{className:`h-full overflow-auto`,children:(0,H.jsx)(Z7,{children:v.map(e=>(0,H.jsx)($7,{disabled:e.disabled,value:String(e.value),onMouseDown:e=>{e.preventDefault(),e.stopPropagation()},"aria-controls":`${e.value}-command-item`,"aria-labelledby":`${e.value}-command-item`,id:`${e.value}-command-item`,onSelect:()=>S(e),className:`cursor-pointer`,children:e.label},`${e.value}-command-item`))})})})})]})}function gxe({items:e,selected:t,onValueChange:n,autoFocus:r=!1,disabled:i=!1,required:a=!1,placeholder:o=`Select...`,ariaDescribedby:s,ariaPlaceholder:c,onFocus:l,onBlur:u,className:d}){let[f,p]=(0,b.useState)(!1),m=e?.find(e=>e.value===t),h=(0,b.useRef)(null),g=(0,b.useRef)(null);return(0,b.useEffect)(()=>{f&&h.current&&requestAnimationFrame(()=>{var e;(e=h.current)==null||e.scrollIntoView({block:`nearest`})})},[f]),(0,H.jsxs)(X7,{ref:g,className:D5(`overflow-visible bg-transparent`,d),autoFocus:r,"aria-disabled":i,onBlur:e=>{g.current&&!g.current.contains(e.relatedTarget)&&p(!1),u?.(e)},onFocus:l,"aria-describedby":s,"aria-placeholder":c,children:[(0,H.jsxs)(`button`,{type:`button`,disabled:i,"aria-expanded":f,"aria-haspopup":`listbox`,onClick:()=>!i&&p(!f),onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&!i&&(e.preventDefault(),e.stopPropagation(),p(!f))},className:D5(`flex h-9 w-full items-center justify-between gap-2 whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50`,!m&&a&&`border-red-500`,i&&`opacity-50 cursor-not-allowed`,d),children:[(0,H.jsx)(`span`,{className:D5(`flex-1 line-clamp-1`,!m&&`text-muted-foreground`),children:m?.label||o}),(0,H.jsx)(qr,{className:`h-4 w-4 opacity-50`})]}),(0,H.jsx)(`div`,{className:`relative`,children:f&&e&&e.length>0?(0,H.jsx)(`div`,{style:{top:`0.5rem`},className:`absolute w-full z-10 rounded-md border bg-popover text-popover-foreground shadow-md outline-none`,children:(0,H.jsx)(Q7,{className:`h-full overflow-auto`,children:(0,H.jsx)(Z7,{children:e.map(e=>(0,H.jsxs)($7,{ref:e.value===t?h:void 0,value:String(e.value),onMouseDown:e=>{e.preventDefault(),e.stopPropagation()},onSelect:()=>{e.disabled||(n?.(e.value),p(!1))},className:D5(`cursor-pointer relative flex items-center justify-between rounded-sm py-1.5 gap-2 rtl:flex-row-reverse`,e.value===t&&`font-semibold`,e.disabled&&`opacity-50 cursor-not-allowed`),children:[(0,H.jsx)(`span`,{children:e.label}),(0,H.jsx)(`span`,{className:`flex h-3.5 w-3.5 items-center justify-center`,children:e.value===t&&(0,H.jsx)(Kr,{className:`h-4 w-4`})})]},e.value))})})}):null})]})}function _xe({id:e,options:t,required:n,disabled:r,readonly:i,value:a,schema:o,multiple:s,autofocus:c,onChange:l,onBlur:u,onFocus:d,placeholder:f,rawErrors:p=[],className:m,registry:h,uiSchema:g}){let{enumOptions:_,enumDisabled:v,emptyValue:y}=t,b=r4(t);E4(e,o,_,s);let x=()=>{d(e,Z2(a,_,b,y))},S=()=>{u(e,Z2(a,_,b,y))},C=_?.map(({value:e,label:t},n)=>({value:s?e:Q2(e,n,b),label:t,index:n,disabled:Array.isArray(v)&&v.includes(e)})),w=D5({"border-destructive":p.length>0},m);return(0,H.jsxs)(`div`,{className:`p-0.5`,children:[s?(0,H.jsx)(hxe,{id:e,autoFocus:c,disabled:r||i,multiple:!0,className:w,items:C,selected:a,onValueChange:e=>{l(Z2(e.map(String),_,b,y))},onFocus:x,onBlur:S}):(0,H.jsx)(gxe,{items:C,selected:J2(a,_,!1,b,``),onValueChange:e=>{l(Z2(e,_,b,y))},autoFocus:c,disabled:r||i,required:n,placeholder:f,className:w,onFocus:x,onBlur:S,ariaDescribedby:b4(e)}),(0,H.jsx)(A4,{id:e,multiple:s,options:t,registry:h,uiSchema:g,value:a})]})}function vxe({className:e,...t}){return(0,H.jsx)(`textarea`,{"data-slot":`textarea`,className:D5(`border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm`,e),...t})}function e9({id:e,htmlName:t,placeholder:n,value:r,required:i,disabled:a,autofocus:o,readonly:s,onBlur:c,onFocus:l,onChange:u,options:d,className:f}){return(0,H.jsx)(`div`,{className:`flex p-0.5`,children:(0,H.jsx)(vxe,{id:e,name:t||e,placeholder:n,disabled:a,readOnly:s,value:r??``,required:i,autoFocus:o,rows:d.rows||5,onChange:({target:{value:e}})=>u(e===``?d.emptyValue:e),onBlur:({target:t})=>c(e,t?.value),onFocus:({target:t})=>l(e,t?.value),"aria-describedby":b4(e),className:f})})}function yxe(){return{CheckboxWidget:sbe,CheckboxesWidget:obe,RadioWidget:Lbe,RangeWidget:dxe,SelectWidget:_xe,TextareaWidget:e9}}function t9(){return{templates:Uye(),widgets:yxe()}}t9();function bxe(){return fye(t9())}var xxe=bxe();function Sxe({tool:e,enabled:t,execute:n}){let r=(0,b.useRef)(n);(0,b.useEffect)(()=>{r.current=n});let{name:i,description:a,inputSchema:o}=e;(0,b.useEffect)(()=>{let e=document.modelContext??navigator.modelContext;if(!t||!e)return;let n=new AbortController;return e.registerTool({name:i,description:a,inputSchema:o,execute:()=>r.current()},{signal:n.signal}),()=>{n.abort()}},[t,i,a,o])}var n9=[],r9=as()(ls(e=>({inputs:{},saveInput:(t,n,r,i)=>e(e=>{let a=e.inputs[t]??{},o=a[n]??[],s={key:r,input:i,createdAt:Date.now()};return{inputs:{...e.inputs,[t]:{...a,[n]:[...o,s]}}}}),updateInput:(t,n,r,i)=>e(e=>{let a=e.inputs[t],o=a?.[n];if(!o)return e;let s=o.findIndex(e=>e.key===r);if(s===-1)return e;let c=[...o];return c[s]={...c[s],input:i},{inputs:{...e.inputs,[t]:{...a,[n]:c}}}}),deleteInput:(t,n,r)=>e(e=>{let i=e.inputs[t],a=i?.[n];return a?{inputs:{...e.inputs,[t]:{...i,[n]:a.filter(e=>e.key!==r)}}}:e})}),{name:`skybridge-devtools-saved-inputs`,version:1,partialize:e=>({inputs:e.inputs})})),Cxe=(e,t)=>r9(n=>e?n.inputs[e]?.[t]??n9:n9);function wxe({className:e,children:t,action:n,...r}){return(0,H.jsxs)(_fe,{className:`flex w-full min-w-0 items-stretch data-[state=open]:sticky data-[state=open]:top-0 data-[state=open]:z-20 data-[state=open]:bg-background`,children:[(0,H.jsxs)(vfe,{"data-slot":`accordion-trigger`,className:lN(`flex min-h-0 min-w-0 flex-1 items-center gap-2 pl-4 pr-2 py-2.5 h-12`,`type-text-md font-semibold text-foreground text-left`,`outline-none focus-visible:outline-none rounded-sm`,`disabled:pointer-events-none disabled:opacity-50`,`data-[state=open]:cursor-default`,`[&[data-state=open]>svg]:rotate-90`,e),...r,children:[(0,H.jsx)(Jr,{className:`size-4 shrink-0 text-muted-foreground transition-transform duration-200`}),t]}),n==null?null:(0,H.jsx)(`div`,{className:`flex shrink-0 items-center pr-4`,children:n})]})}function i9({text:e,title:t,className:n}){let[r,i]=(0,b.useState)(!1),[a,o]=(0,b.useState)(null),s=(0,b.useRef)(null);return(0,b.useLayoutEffect)(()=>{let t=s.current,n=t?.parentElement;if(!t||!n)return;let r=()=>t.scrollHeight<=t.clientHeight+1,i=()=>{if(t.textContent=e,r()){o(null);return}let n=0,i=e.length,a=0;for(;n<=i;){let o=n+i>>1;t.textContent=`${e.slice(0,o).trimEnd()}... more`,r()?(a=o,n=o+1):i=o-1}o(e.slice(0,a).trimEnd())};i();let a=-1,c=new ResizeObserver(e=>{let t=Math.round(e[0].contentRect.width);t!==a&&(a=t,i())});return c.observe(n),()=>c.disconnect()},[e]),(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(`div`,{className:lN(`relative`,n),children:[(0,H.jsx)(`p`,{ref:s,"aria-hidden":`true`,className:`invisible absolute inset-x-0 top-0 line-clamp-2`}),(0,H.jsx)(`p`,{children:a===null?e:(0,H.jsxs)(H.Fragment,{children:[a,`...`,` `,(0,H.jsx)(`button`,{type:`button`,onClick:()=>i(!0),className:`cursor-pointer p-0 underline underline-offset-2`,children:`more`})]})})]}),(0,H.jsx)(rP,{open:r,onOpenChange:i,children:(0,H.jsx)(sP,{size:`lg`,children:(0,H.jsxs)(cP,{children:[(0,H.jsx)(dP,{className:t?`font-mono`:`sr-only`,children:t??`Description`}),(0,H.jsx)(fP,{className:`max-h-[60vh] overflow-y-auto whitespace-pre-wrap`,children:e})]})})})]})}var Txe=[`h-7 w-full rounded-md border border-border bg-background`,`px-2 font-mono text-xs text-foreground`,`placeholder:text-muted-foreground/50`,`outline-none transition-colors`,`focus-visible:border-ring focus-visible:border-2`,`aria-invalid:border-destructive`,`disabled:cursor-not-allowed disabled:opacity-50`].join(` `),Exe=[`block w-full min-h-20 resize-y rounded-md border border-border bg-background`,`px-2 py-1.5 font-mono text-xs leading-5 text-foreground`,`placeholder:text-muted-foreground/50`,`outline-none transition-colors`,`focus-visible:border-ring focus-visible:border-2`,`aria-invalid:border-destructive`,`disabled:cursor-not-allowed disabled:opacity-50`].join(` `),a9=[`flex h-7 min-h-7 w-full items-center justify-between gap-2 rounded-md border border-border bg-background shadow-none`,`px-2 font-mono text-xs text-foreground`,`outline-none transition-colors`,`focus-visible:border-ring focus-visible:border-2 focus-visible:ring-0 focus-visible:ring-offset-0`,`data-[state=open]:ring-0 data-[state=open]:ring-offset-0`,`aria-invalid:border-destructive`,`data-[placeholder]:text-muted-foreground/50`,`disabled:cursor-not-allowed disabled:opacity-50`,`[&>span]:line-clamp-1`,`[&_svg]:size-3.5`].join(` `),o9=`text-[10px] leading-snug text-muted-foreground/70`,s9=[`inline-flex h-6 cursor-pointer items-center gap-1 rounded-md px-1.5`,`font-mono text-xs text-muted-foreground`,`transition-colors`,`hover:bg-muted hover:text-foreground`,`focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring`,`disabled:pointer-events-none disabled:opacity-50`].join(` `);function Dxe(e){let{id:t,name:n,value:r,required:i,disabled:a,readonly:o,placeholder:s,schema:c,options:l,onChange:u,onChangeOverride:d,onBlur:f,onFocus:p,rawErrors:m,type:h}=e,g={...n4(c,h,l)},_=(m?.length??0)>0,v=g.type===`number`,y=e=>{if(e===``)return l.emptyValue;if(v){let t=Number(e);return Number.isFinite(t)?t:e}return e};return(0,H.jsx)(`input`,{id:t,name:n,toolparamdescription:c.description,className:Txe,value:r??``,required:i,disabled:a||o,placeholder:s,"aria-invalid":_||void 0,onChange:d??(e=>u(y(e.target.value))),onBlur:e=>f(t,y(e.target.value)),onFocus:e=>p(t,y(e.target.value)),...g})}function Oxe(e){let{id:t,classNames:n,style:r,label:i,required:a,rawDescription:o,rawErrors:s,children:c,errors:l,help:u,hidden:d,schema:f,uiSchema:p}=e;if(d)return(0,H.jsx)(`div`,{className:`hidden`,children:c});let m=f.type===`object`||f.type===`array`,h=!!p?.[`ui:widget`],g=m&&!h,_=!g&&!!i,v=(s?.length??0)>0;return(0,H.jsxs)(`div`,{className:lN(`flex flex-col gap-1`,n),style:r,children:[_&&(0,H.jsxs)(`label`,{htmlFor:t,className:lN(`font-mono text-xs text-muted-foreground`,v&&`text-destructive`),children:[i,a&&(0,H.jsx)(`span`,{className:`ml-1 text-destructive`,children:`*`})]}),!g&&o?(0,H.jsx)(i9,{text:o,title:i,className:o9}):null,c,l,u]})}function kxe(e){return!e.errors||e.errors.length===0?null:(0,H.jsx)(`div`,{className:`font-mono text-[11px] text-destructive`,children:e.errors.join(`, `)})}function Axe(e){return e.description?(0,H.jsx)(`p`,{id:e.id,className:o9,children:e.description}):null}function jxe(e){let{id:t,title:n,required:r}=e;return n?(0,H.jsxs)(`div`,{id:t,className:`font-mono text-xs text-muted-foreground`,children:[n,r&&(0,H.jsx)(`span`,{className:`ml-1 text-destructive`,children:`*`})]}):null}function Mxe(e){let{fieldPathId:t,properties:n,description:r,disabled:i,title:a,required:o}=e,s=t.$id===`root`;return(0,H.jsxs)(`div`,{className:lN(`flex flex-col`,s?`gap-6`:`gap-5 border-l border-border pl-2.5`),children:[!s&&a&&(0,H.jsxs)(`div`,{className:`font-mono text-xs text-muted-foreground`,children:[a,o&&(0,H.jsx)(`span`,{className:`ml-1 text-destructive`,children:`*`})]}),!s&&r&&(0,H.jsx)(`p`,{className:`text-[10px] leading-snug text-muted-foreground/70`,children:r}),n.filter(e=>!e.hidden).map(e=>(0,H.jsx)(`div`,{"aria-disabled":i||void 0,children:e.content},e.name))]})}function Nxe(e){let{items:t,canAdd:n,onAddClick:r,disabled:i,readonly:a,title:o,required:s,schema:c}=e,l=c.description;return(0,H.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[o&&(0,H.jsxs)(`div`,{className:`font-mono text-xs text-muted-foreground`,children:[o,s&&(0,H.jsx)(`span`,{className:`ml-1 text-destructive`,children:`*`})]}),l&&(0,H.jsx)(`p`,{className:`text-[10px] leading-snug text-muted-foreground/70`,children:l}),t,n&&(0,H.jsxs)(`button`,{type:`button`,className:lN(s9,`self-start`),onClick:r,disabled:i||a,children:[(0,H.jsx)(yi,{className:`size-3`}),`add`]})]})}function Pxe(e){let{children:t,index:n,buttonsProps:r,hasToolbar:i}=e,{hasRemove:a,onRemoveItem:o,disabled:s,readonly:c}=r;return(0,H.jsxs)(`div`,{className:`flex items-start gap-1.5`,children:[(0,H.jsxs)(`span`,{className:`mt-1 select-none font-mono text-[11px] text-muted-foreground/50`,children:[`[`,n,`]`]}),(0,H.jsx)(`div`,{className:`flex-1 min-w-0`,children:t}),i&&a&&(0,H.jsx)(`button`,{type:`button`,className:lN(s9,`mt-0.5 px-1`),onClick:o,disabled:s||c,"aria-label":`Remove item ${n}`,children:(0,H.jsx)(Ai,{className:`size-3`})})]})}function Fxe(e){let{icon:t,iconType:n,registry:r,uiSchema:i,...a}=e;return(0,H.jsxs)(`button`,{type:`button`,className:s9,...a,children:[(0,H.jsx)(yi,{className:`size-3`}),`add`]})}function Ixe(e){let{icon:t,iconType:n,registry:r,uiSchema:i,...a}=e;return(0,H.jsx)(`button`,{type:`button`,className:lN(s9,`px-1`),"aria-label":`Remove`,...a,children:(0,H.jsx)(Ai,{className:`size-3`})})}function c9(){return null}var Lxe={AddButton:Fxe,RemoveButton:Ixe,CopyButton:c9,MoveDownButton:c9,MoveUpButton:c9,ClearButton:c9},Rxe=`inline-flex items-center justify-center rounded-sm border border-border bg-background py-0.5 type-text-sm font-medium text-muted-foreground`;function zxe({className:e,icon:t,children:n,onDismiss:r,...i}){return(0,H.jsxs)(`span`,{className:Mr(Rxe,`gap-[3px]`,t?`px-1`:`pl-[9px] pr-1`,e),...i,children:[(0,H.jsxs)(`span`,{className:Mr(`inline-flex items-center`,t&&`gap-[5px]`),children:[t&&(0,H.jsx)(`span`,{className:`inline-flex shrink-0`,children:t}),(0,H.jsx)(`span`,{children:n})]}),(0,H.jsx)(`button`,{type:`button`,"aria-label":`Remove`,onClick:r,className:`inline-flex items-center justify-center rounded-[3px] p-0.5 hover:bg-accent`,children:(0,H.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,H.jsx)(`path`,{d:`M18 6 6 18`}),(0,H.jsx)(`path`,{d:`m6 6 12 12`})]})})]})}var l9=(0,b.createContext)(null);function u9(){let e=(0,b.useContext)(l9);if(!e)throw Error(`Combobox compound components must be used within <Combobox>`);return e}function Bxe(e){let{children:t,multiple:n=!1,open:r,defaultOpen:i=!1,onOpenChange:a,getOptionLabel:o}=e,[s,c]=(0,b.useState)(n?null:e.defaultValue??null),[l,u]=(0,b.useState)(n?e.defaultValue??[]:[]),[d,f]=(0,b.useState)(i),p=r!==void 0,m=p?r:d,h=(0,b.useCallback)(e=>{p||f(e),a?.(e)},[p,a]),g=n?null:(e.value===void 0?s:e.value)??null,_=n?e.value===void 0?l:e.value:[],v=(0,b.useCallback)(e=>n?_.includes(e):g===e,[n,g,_]),y=n?void 0:e.onValueChange,x=n?e.onValueChange:void 0,S=!n&&e.value!==void 0,C=n&&e.value!==void 0,w=(0,b.useCallback)(e=>{if(n){let t=_.includes(e)?_.filter(t=>t!==e):[..._,e];C||u(t),x?.(t)}else S||c(e),y?.(e),h(!1)},[n,C,S,x,y,_,h]),T=(0,b.useCallback)(e=>{if(!n)return;let t=_.filter(t=>t!==e);C||u(t),x?.(t)},[n,C,x,_]),E=(0,b.useMemo)(()=>({multiple:n,value:g,values:_,onSelect:w,onDeselect:T,isSelected:v,open:m,onOpenChange:h,getOptionLabel:o}),[n,g,_,w,T,v,m,h,o]);return(0,H.jsx)(l9.Provider,{value:E,children:(0,H.jsx)(tN,{open:m,onOpenChange:h,children:t})})}function Vxe({className:e,size:t,placeholder:n,children:r,...i}){let{multiple:a,value:o,values:s,open:c,onDeselect:l}=u9(),u=a?s.length===0:o==null;return(0,H.jsx)(nN,{asChild:!0,children:(0,H.jsxs)(`button`,{type:`button`,"data-slot":`combobox-trigger`,role:`combobox`,"aria-expanded":c,className:Mr(WI({size:t}),e),...i,children:[(0,H.jsx)(`span`,{className:Mr(`flex flex-1 items-center gap-1.5 text-left`,a&&`flex-wrap`,u&&`text-placeholder`),children:u?n:a?(0,H.jsx)(Hxe,{values:s,onDeselect:l}):r}),(0,H.jsx)(qr,{className:`size-5 shrink-0 text-muted-foreground`})]})})}function Hxe({values:e,onDeselect:t}){let{getOptionLabel:n}=u9();return(0,H.jsx)(H.Fragment,{children:e.map(e=>(0,H.jsx)(zxe,{onClick:e=>e.stopPropagation(),onDismiss:()=>t(e),children:n?n(e):e},e))})}function Uxe({className:e,children:t,filter:n,...r}){let{multiple:i}=u9();return(0,H.jsx)(iN,{className:Mr(`w-[var(--radix-popover-trigger-width)] p-0`,e),align:`start`,onOpenAutoFocus:i?e=>e.preventDefault():void 0,...r,children:(0,H.jsx)(KR,{"data-slot":`combobox-command`,filter:n,className:`flex h-full w-full flex-col overflow-hidden rounded-md bg-popover`,children:t})})}function Wxe({className:e,...t}){return(0,H.jsxs)(`div`,{"data-slot":`combobox-search`,className:`flex items-center gap-2 border-b border-border-secondary px-3 py-2.5`,children:[(0,H.jsx)(Si,{className:`size-5 shrink-0 text-muted-foreground`}),(0,H.jsx)(KR.Input,{"data-slot":`combobox-search-input`,className:Mr(`flex h-full w-full bg-transparent type-text-md font-medium text-foreground outline-hidden`,`placeholder:text-placeholder`,`disabled:cursor-not-allowed disabled:opacity-50`,e),...t})]})}function Gxe({className:e,...t}){return(0,H.jsx)(KR.List,{"data-slot":`combobox-list`,className:Mr(`max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto py-1`,e),...t})}function Kxe({className:e,...t}){return(0,H.jsx)(KR.Empty,{"data-slot":`combobox-empty`,className:Mr(`py-6 text-center type-text-sm text-muted-foreground`,e),...t})}function qxe({className:e,children:t,itemValue:n,...r}){let{onSelect:i,isSelected:a}=u9(),o=a(n);return(0,H.jsxs)(KR.Item,{"data-slot":`combobox-item`,"data-selected-item":o||void 0,onSelect:()=>i(n),className:Mr(`relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 outline-hidden select-none`,`type-text-md font-medium text-foreground mx-1.5 my-px`,`data-[selected=true]:bg-background-hover`,`data-[selected-item]:bg-accent`,`data-[disabled=true]:pointer-events-none data-[disabled=true]:text-disabled-foreground`,`[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-5`,e),...r,children:[(0,H.jsx)(`span`,{className:`flex flex-1 items-center gap-2 truncate`,children:t}),o&&(0,H.jsx)(Kr,{className:`size-5 shrink-0 text-primary`})]})}var Jxe=Object.defineProperty,d9=(e,t)=>Jxe(e,`name`,{value:t,configurable:!0}),f9=`Switch`,[Yxe,Xxe]=dO(f9),[Zxe,p9]=Yxe(f9);function m9(e){let{__scopeSwitch:t,checked:n,children:r,defaultChecked:i,disabled:a,form:o,name:s,onCheckedChange:c,required:l,value:u=`on`,internal_do_not_use_render:d}=e,[f,p]=oj({prop:n,defaultProp:i??!1,onChange:c,caller:f9}),[m,h]=b.useState(null),[g,_]=b.useState(null),v=b.useRef(!1),[y,x]=b.useReducer(e=>e+1,0),S={checked:f,setChecked:p,disabled:a,control:m,setControl:h,name:s,form:o,value:u,hasConsumerStoppedPropagationRef:v,userInteractionCount:y,onUserInteraction:x,required:l,defaultChecked:i,isFormControl:!m||!!o||!!m.closest(`form`),bubbleInput:g,setBubbleInput:_};return(0,H.jsx)(Zxe,{scope:t,...S,children:h9(d)?d(S):r})}d9(m9,`SwitchProvider`);var Qxe=`SwitchTrigger`,$xe=b.forwardRef(d9(function({__scopeSwitch:e,onClick:t,...n},r){let{control:i,form:a,value:o,disabled:s,checked:c,required:l,setControl:u,setChecked:d,hasConsumerStoppedPropagationRef:f,onUserInteraction:p,isFormControl:m,bubbleInput:h}=p9(Qxe,e),g=Ii(r,u),_=b.useRef(c);return b.useEffect(()=>{let e=a?i?.ownerDocument.getElementById(a):i?.form;if(e instanceof HTMLFormElement){let t=d9(()=>d(_.current),`reset`);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[i,a,d]),(0,H.jsx)(QD.button,{type:`button`,role:`switch`,"aria-checked":c,"aria-required":l,"data-state":g9(c),"data-disabled":s?``:void 0,disabled:s,value:o,...n,ref:g,onClick:sO(t,e=>{p(),d(e=>!e),h&&m&&(f.current=e.isPropagationStopped(),f.current||e.stopPropagation())})})},`SwitchTrigger`)),eSe=b.forwardRef(d9(function(e,t){let{__scopeSwitch:n,name:r,checked:i,defaultChecked:a,required:o,disabled:s,value:c,onCheckedChange:l,form:u,...d}=e;return(0,H.jsx)(m9,{__scopeSwitch:n,checked:i,defaultChecked:a,disabled:s,required:o,onCheckedChange:l,name:r,form:u,value:c,internal_do_not_use_render:({isFormControl:e})=>(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)($xe,{...d,ref:t,__scopeSwitch:n}),e&&(0,H.jsx)(iSe,{__scopeSwitch:n})]})})},`Switch`)),tSe=`SwitchThumb`,nSe=b.forwardRef(d9(function(e,t){let{__scopeSwitch:n,...r}=e,i=p9(tSe,n);return(0,H.jsx)(QD.span,{"data-state":g9(i.checked),"data-disabled":i.disabled?``:void 0,...r,ref:t})},`SwitchThumb`)),rSe=`SwitchBubbleInput`,iSe=b.forwardRef(d9(function({__scopeSwitch:e,onClick:t,...n},r){let{control:i,hasConsumerStoppedPropagationRef:a,userInteractionCount:o,checked:s,defaultChecked:c,required:l,disabled:u,name:d,value:f,form:p,bubbleInput:m,setBubbleInput:h}=p9(rSe,e),g=Ii(r,h),_=IA(i),v=b.useRef(!1),y=b.useRef(s),x=b.useRef(o);b.useEffect(()=>{let e=m;if(!e)return;let t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,`checked`).set,r=o!==x.current;x.current=o;let i=y.current!==s;y.current=s;let c=!(r&&a.current);if(i&&n){v.current=!r;let t=new Event(`click`,{bubbles:c});n.call(e,s),e.dispatchEvent(t),v.current=!1}},[m,s,a,o]);let S=b.useRef(s);return(0,H.jsx)(QD.input,{type:`checkbox`,"aria-hidden":!0,defaultChecked:c??S.current,required:l,disabled:u,name:d,value:f,form:p,...n,tabIndex:-1,ref:g,onClick:sO(t,e=>{v.current&&e.stopPropagation()}),style:{...n.style,..._,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0,transform:`translateX(-100%)`}})},`SwitchBubbleInput`));function h9(e){return typeof e==`function`}d9(h9,`isFunction`);function g9(e){return e?`checked`:`unchecked`}d9(g9,`getState`);function aSe({className:e,...t}){return(0,H.jsx)(eSe,{"data-slot":`switch`,className:Mr(`peer inline-flex h-5 w-9 shrink-0 items-center rounded-full p-0.5`,`bg-subtle data-[state=checked]:not-disabled:bg-primary`,`transition-colors`,`outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background`,`disabled:pointer-events-none disabled:opacity-50`,e),...t,children:(0,H.jsx)(nSe,{"data-slot":`switch-thumb`,className:Mr(`pointer-events-none block size-4 rounded-full bg-primary-foreground shadow-xs`,`transition-transform data-[state=unchecked]:translate-x-0 data-[state=checked]:translate-x-4`)})})}function oSe(e){let{id:t,name:n,value:r,required:i,disabled:a,readonly:o,placeholder:s,options:c,schema:l,onChange:u,onBlur:d,onFocus:f,rawErrors:p}=e,m=c.rows??3,h=(p?.length??0)>0;return(0,H.jsx)(`textarea`,{id:t,name:n,toolparamdescription:l.description,rows:m,className:Exe,value:r??``,required:i,disabled:a||o,placeholder:s,spellCheck:!1,"aria-invalid":h||void 0,onChange:e=>u(e.target.value===``?c.emptyValue:e.target.value),onBlur:e=>d(t,e.target.value),onFocus:e=>f(t,e.target.value)})}function sSe(e){let{id:t,value:n,required:r,disabled:i,readonly:a,placeholder:o,options:s,onChange:c,rawErrors:l}=e,u=s.enumOptions??[],d=(l?.length??0)>0;return(0,H.jsxs)(_L,{value:n==null?``:String(n),required:r,disabled:i||a,onValueChange:e=>{let t=u.find(t=>String(t.value)===e);c(t?t.value:e)},children:[(0,H.jsx)(yL,{id:t,className:lN(a9),"aria-invalid":d||void 0,children:(0,H.jsx)(vL,{placeholder:o??`Select…`})}),(0,H.jsx)(bL,{children:u.map(e=>(0,H.jsx)(xL,{value:String(e.value),className:`font-mono text-xs`,children:e.label},String(e.value)))})]})}function cSe(e){let{id:t,value:n,required:r,disabled:i,readonly:a,onChange:o}=e;return(0,H.jsx)(aSe,{id:t,checked:n===!0,required:r,disabled:i||a,onCheckedChange:e=>o(e===!0)})}function lSe(e){let{id:t,value:n,disabled:r,readonly:i,options:a,placeholder:o,rawErrors:s,schema:c}=e,l=uSe(a,c),u=(s?.length??0)>0;return(0,H.jsx)(dSe,{id:t,value:n,disabled:r||i,placeholder:o??`Select…`,enumOptions:l,hasError:u,onChange:e.onChange})}function uSe(e,t){let n=e.enumOptions??[];if(n.length>0)return n;let r=t.items,i=(r&&!Array.isArray(r)&&typeof r!=`boolean`?r:void 0)?.enum??t.enum;return Array.isArray(i)?i.map(e=>({value:e,label:String(e)})):[]}function dSe({id:e,value:t,disabled:n,placeholder:r,enumOptions:i,hasError:a,onChange:o}){let s=Array.isArray(t)?t.filter(e=>e!=null):[],c=i.filter(e=>!s.some(t=>String(t)===String(e.value))),[l,u]=(0,b.useState)(!1),d=(0,b.useRef)(!1);return(0,H.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,H.jsxs)(Bxe,{open:l,onOpenChange:e=>{if(!e&&d.current){d.current=!1;return}u(e)},value:null,onValueChange:e=>{if(e===null)return;let t=i.find(t=>String(t.value)===e);d.current=!0,o([...s,t?t.value:e])},children:[(0,H.jsx)(Vxe,{id:e,disabled:n||c.length===0,placeholder:r,className:lN(a9),"aria-invalid":a||void 0}),(0,H.jsxs)(Uxe,{children:[(0,H.jsx)(Wxe,{placeholder:`Search…`}),(0,H.jsxs)(Gxe,{className:`flex flex-col gap-1 py-1`,children:[(0,H.jsx)(Kxe,{children:`No results.`}),c.map(e=>(0,H.jsx)(qxe,{itemValue:String(e.value),className:`mx-1 my-0 px-2 py-1 font-mono text-xs`,children:e.label},String(e.value)))]})]})]}),s.length>0&&(0,H.jsx)(`ul`,{className:`flex flex-wrap gap-1`,children:s.map(e=>{let t=i.find(t=>String(t.value)===String(e))?.label??String(e);return(0,H.jsx)(`li`,{children:(0,H.jsxs)(`button`,{type:`button`,onClick:()=>o(s.filter(t=>String(t)!==String(e))),disabled:n,"aria-label":`Remove ${t}`,className:lN(`group inline-flex cursor-pointer items-center gap-1 rounded-md border border-border bg-background px-2 py-0.5`,`font-mono text-xs text-foreground transition-colors`,`hover:bg-muted hover:text-foreground`,`focus-visible:outline-none focus-visible:border-ring focus-visible:border-2`,`disabled:cursor-not-allowed disabled:opacity-50`),children:[(0,H.jsx)(`span`,{children:t}),(0,H.jsx)(Ai,{className:`size-3 text-muted-foreground group-hover:text-foreground`})]})},String(e))})})]})}var fSe={TextareaWidget:oSe,SelectWidget:sSe,CheckboxWidget:cSe,CheckboxesWidget:lSe},pSe={ArrayFieldItemTemplate:Pxe,ArrayFieldTemplate:Nxe,BaseInputTemplate:Dxe,DescriptionFieldTemplate:Axe,FieldErrorTemplate:kxe,FieldTemplate:Oxe,ObjectFieldTemplate:Mxe,TitleFieldTemplate:jxe,ButtonTemplates:Lxe},_9={"ui:submitButtonOptions":{norender:!0}};function mSe(e){if(e?.type!==`array`)return!1;let t=e.items;return!t||Array.isArray(t)||typeof t==`boolean`?!1:Array.isArray(t.enum)}function v9(e){if(!(!e||typeof e!=`object`)){if(mSe(e))return{"ui:widget":`checkboxes`};if(e.type===`object`&&e.properties){let t=[];for(let[n,r]of Object.entries(e.properties)){let e=v9(r);e&&t.push([n,e])}return t.length>0?Object.fromEntries(t):void 0}}}function hSe(e){let t=v9(e);return t?{..._9,...t}:_9}function gSe({name:e,description:t}){return(0,b.useMemo)(()=>n=>(0,H.jsx)(`form`,{toolname:e,tooldescription:t,toolautosubmit:``,...n}),[e,t])}var _Se=Object.defineProperty,y9=(e,t)=>_Se(e,`name`,{value:t,configurable:!0}),b9=[`Enter`,` `],vSe=[`ArrowDown`,`PageUp`,`Home`],x9=[`ArrowUp`,`PageDown`,`End`],ySe=[...vSe,...x9];[...b9],[...b9];var S9=`Menu`,[C9,bSe,xSe]=KI(S9),[w9,T9]=dO(S9,[xSe,BA,h1]),E9=BA(),D9=h1(),[SSe,O9]=w9(S9),[CSe,k9]=w9(S9),wSe=y9(e=>{let{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:a,modal:o=!0}=e,s=E9(t),[c,l]=b.useState(null),u=b.useRef(!1),d=fO(a),f=qI(i);return b.useEffect(()=>{let e=y9(()=>{u.current=!0,document.addEventListener(`pointerdown`,t,{capture:!0,once:!0}),document.addEventListener(`pointermove`,t,{capture:!0,once:!0})},`handleKeyDown`),t=y9(()=>u.current=!1,`handlePointer`);return document.addEventListener(`keydown`,e,{capture:!0}),()=>{document.removeEventListener(`keydown`,e,{capture:!0}),document.removeEventListener(`pointerdown`,t,{capture:!0}),document.removeEventListener(`pointermove`,t,{capture:!0})}},[]),b.useEffect(()=>{if(!n)return;let e=y9(()=>d(!1),`handleBlur`);return window.addEventListener(`blur`,e),()=>window.removeEventListener(`blur`,e)},[n,d]),(0,H.jsx)(GA,{...s,children:(0,H.jsx)(SSe,{scope:t,open:n,onOpenChange:d,content:c,onContentChange:l,children:(0,H.jsx)(CSe,{scope:t,onClose:b.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:u,dir:f,modal:o,children:r})})})},`Menu`),TSe=b.forwardRef(y9(function(e,t){let{__scopeMenu:n,...r}=e,i=E9(n);return(0,H.jsx)(KA,{...i,...r,ref:t})},`MenuAnchor`)),A9=`MenuPortal`,[ESe,DSe]=w9(A9,{forceMount:void 0}),OSe=y9(e=>{let{__scopeMenu:t,forceMount:n,children:r,container:i}=e,a=O9(A9,t);return(0,H.jsx)(ESe,{scope:t,forceMount:n,children:(0,H.jsx)(ZA,{present:n||a.open,children:(0,H.jsx)(JA,{asChild:!0,container:i,children:r})})})},`MenuPortal`),j9=`MenuContent`,[kSe,M9]=w9(j9),ASe=b.forwardRef(y9(function(e,t){let n=DSe(j9,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=O9(j9,e.__scopeMenu),o=k9(j9,e.__scopeMenu);return(0,H.jsx)(C9.Provider,{scope:e.__scopeMenu,children:(0,H.jsx)(ZA,{present:r||a.open,children:(0,H.jsx)(C9.Slot,{scope:e.__scopeMenu,children:o.modal?(0,H.jsx)(jSe,{...i,ref:t}):(0,H.jsx)(MSe,{...i,ref:t})})})})},`MenuContent`)),jSe=b.forwardRef(y9(function(e,t){let n=O9(j9,e.__scopeMenu),r=b.useRef(null),i=Ii(t,r);return b.useEffect(()=>{let e=r.current;if(e)return hj(e)},[]),(0,H.jsx)(N9,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:sO(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})},`MenuRootContentModal`)),MSe=b.forwardRef(y9(function(e,t){let n=O9(j9,e.__scopeMenu);return(0,H.jsx)(N9,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})},`MenuRootContentNonModal`)),NSe=Li(`MenuContent.ScrollLock`),N9=b.forwardRef(y9(function(e,t){let{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEntryFocus:c,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,disableOutsideScroll:m,...h}=e,g=O9(j9,n),_=k9(j9,n),v=E9(n),y=D9(n),x=bSe(n),[S,C]=b.useState(null),w=b.useRef(null),T=Ii(t,w,g.onContentChange),E=b.useRef(0),D=b.useRef(``),O=b.useRef(0),k=b.useRef(null),A=b.useRef(`right`),j=b.useRef(0),M=m?EM:b.Fragment,N=m?{as:NSe,allowPinchZoom:!0}:void 0,P=y9(e=>{let t=D.current+e,n=x().filter(e=>!e.disabled),r=document.activeElement,i=n.find(e=>e.ref.current===r)?.textValue,a=B9(n.map(e=>e.textValue),t,i),o=n.find(e=>e.textValue===a)?.ref.current;y9((function e(t){D.current=t,window.clearTimeout(E.current),t!==``&&(E.current=window.setTimeout(()=>e(``),1e3))}),`updateSearch`)(t),o&&setTimeout(()=>o.focus())},`handleTypeaheadSearch`);b.useEffect(()=>()=>window.clearTimeout(E.current),[]),TO();let F=b.useCallback(e=>A.current===k.current?.side&&H9(e,k.current?.area),[]);return(0,H.jsx)(kSe,{scope:n,searchRef:D,onItemEnter:b.useCallback(e=>{F(e)&&e.preventDefault()},[F]),onItemLeave:b.useCallback(e=>{F(e)||(w.current?.focus(),C(null))},[F]),onTriggerLeave:b.useCallback(e=>{F(e)&&e.preventDefault()},[F]),pointerGraceTimerRef:O,onPointerGraceIntentChange:b.useCallback(e=>{k.current=e},[]),children:(0,H.jsx)(M,{...N,children:(0,H.jsx)(jO,{asChild:!0,trapped:i,onMountAutoFocus:sO(a,e=>{e.preventDefault(),w.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:(0,H.jsx)(_O,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,children:(0,H.jsx)(zfe,{asChild:!0,...y,dir:_.dir,orientation:`vertical`,loop:r,currentTabStopId:S,onCurrentTabStopIdChange:C,onEntryFocus:sO(c,e=>{_.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,H.jsx)(qA,{role:`menu`,"aria-orientation":`vertical`,"data-state":I9(g.open),"data-radix-menu-content":``,dir:_.dir,...v,...h,ref:T,style:{outline:`none`,...h.style},onKeyDown:sO(h.onKeyDown,e=>{let t=e.target.closest(`[data-radix-menu-content]`)===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=e.key.length===1;t&&(e.key===`Tab`&&e.preventDefault(),!n&&r&&P(e.key));let i=w.current;if(e.target!==i||!ySe.includes(e.key))return;e.preventDefault();let a=x().filter(e=>!e.disabled).map(e=>e.ref.current);x9.includes(e.key)&&a.reverse(),R9(a)}),onBlur:sO(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(E.current),D.current=``)}),onPointerMove:sO(e.onPointerMove,U9(e=>{let t=e.target,n=j.current!==e.clientX;if(e.currentTarget.contains(t)&&n){let t=e.clientX>j.current?`right`:`left`;A.current=t,j.current=e.clientX}}))})})})})})})},`MenuContentImpl`)),P9=`MenuItem`,F9=`menu.itemSelect`,PSe=b.forwardRef(y9(function(e,t){let{disabled:n=!1,onSelect:r,...i}=e,a=b.useRef(null),o=k9(P9,e.__scopeMenu),s=M9(P9,e.__scopeMenu),c=Ii(t,a),l=b.useRef(!1),u=y9(()=>{let e=a.current;if(!n&&e){let t=new CustomEvent(F9,{bubbles:!0,cancelable:!0});e.addEventListener(F9,e=>r?.(e),{once:!0}),$D(e,t),t.defaultPrevented?l.current=!1:o.onClose()}},`handleSelect`);return(0,H.jsx)(FSe,{...i,ref:c,disabled:n,onClick:sO(e.onClick,u),onPointerDown:t=>{e.onPointerDown?.(t),l.current=!0},onPointerUp:sO(e.onPointerUp,e=>{l.current||e.currentTarget?.click()}),onKeyDown:sO(e.onKeyDown,e=>{n||e.target!==e.currentTarget||s.searchRef.current!==``&&e.key===` `||b9.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})},`MenuItem`)),FSe=b.forwardRef(y9(function(e,t){let{__scopeMenu:n,disabled:r=!1,textValue:i,...a}=e,o=M9(P9,n),s=D9(n),c=b.useRef(null),l=Ii(t,c),[u,d]=b.useState(!1),[f,p]=b.useState(``);return b.useEffect(()=>{let e=c.current;e&&p((e.textContent??``).trim())},[a.children]),(0,H.jsx)(C9.ItemSlot,{scope:n,disabled:r,textValue:i??f,children:(0,H.jsx)(Bfe,{asChild:!0,...s,focusable:!r,children:(0,H.jsx)(QD.div,{role:`menuitem`,"data-highlighted":u?``:void 0,"aria-disabled":r||void 0,"data-disabled":r?``:void 0,...a,ref:l,onPointerMove:sO(e.onPointerMove,U9(e=>{r?o.onItemLeave(e):(o.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:sO(e.onPointerLeave,U9(e=>o.onItemLeave(e))),onFocus:sO(e.onFocus,()=>d(!0)),onBlur:sO(e.onBlur,()=>d(!1))})})})},`MenuItemImpl`)),[ISe,LSe]=w9(`MenuRadioGroup`,{value:void 0,onValueChange:y9(()=>{},`onValueChange`)}),[RSe,zSe]=w9(`MenuItemIndicator`,{checked:!1}),[BSe,VSe]=w9(`MenuSub`);function I9(e){return e?`open`:`closed`}y9(I9,`getOpenState`);function L9(e){return e===`indeterminate`}y9(L9,`isIndeterminate`);function HSe(e){return L9(e)?`indeterminate`:e?`checked`:`unchecked`}y9(HSe,`getCheckedState`);function R9(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}y9(R9,`focusFirst`);function z9(e,t){return e.map((n,r)=>e[(t+r)%e.length])}y9(z9,`wrapArray`);function B9(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=z9(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}y9(B9,`getNextMatch`);function V9(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}y9(V9,`isPointInPolygon`);function H9(e,t){return t?V9({x:e.clientX,y:e.clientY},t):!1}y9(H9,`isPointerInGraceArea`);function U9(e){return t=>t.pointerType===`mouse`?e(t):void 0}y9(U9,`whenMouse`);var USe=wSe,WSe=TSe,GSe=OSe,KSe=ASe,qSe=PSe,JSe=Object.defineProperty,W9=(e,t)=>JSe(e,`name`,{value:t,configurable:!0}),G9=`DropdownMenu`,[YSe,XSe]=dO(G9,[T9]),K9=T9(),[ZSe,q9]=YSe(G9),QSe=W9(e=>{let{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:a,onOpenChange:o,modal:s=!0}=e,c=K9(t),l=b.useRef(null),[u,d]=oj({prop:i,defaultProp:a??!1,onChange:o,caller:G9});return(0,H.jsx)(ZSe,{scope:t,triggerId:KO(),triggerRef:l,contentId:KO(),open:u,onOpenChange:d,onOpenToggle:b.useCallback(()=>d(e=>!e),[d]),modal:s,children:(0,H.jsx)(USe,{...c,open:u,onOpenChange:d,dir:r,modal:s,children:n})})},`DropdownMenu`),$Se=`DropdownMenuTrigger`,eCe=b.forwardRef(W9(function(e,t){let{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,a=q9($Se,n),o=K9(n),s=Ii(t,a.triggerRef);return(0,H.jsx)(WSe,{asChild:!0,...o,children:(0,H.jsx)(QD.button,{type:`button`,id:a.triggerId,"aria-haspopup":`menu`,"aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?`open`:`closed`,"data-disabled":r?``:void 0,disabled:r,...i,ref:s,onPointerDown:sO(e.onPointerDown,e=>{!r&&e.button===0&&e.ctrlKey===!1&&(a.onOpenToggle(),a.open||e.preventDefault())}),onKeyDown:sO(e.onKeyDown,e=>{r||([`Enter`,` `].includes(e.key)&&a.onOpenToggle(),e.key===`ArrowDown`&&a.onOpenChange(!0),[`Enter`,` `,`ArrowDown`].includes(e.key)&&e.preventDefault())})})})},`DropdownMenuTrigger`)),tCe=W9(e=>{let{__scopeDropdownMenu:t,...n}=e,r=K9(t);return(0,H.jsx)(GSe,{...r,...n})},`DropdownMenuPortal`),nCe=`DropdownMenuContent`,rCe=b.forwardRef(W9(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=q9(nCe,n),a=K9(n),o=b.useRef(!1);return(0,H.jsx)(KSe,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...r,ref:t,onCloseAutoFocus:sO(e.onCloseAutoFocus,e=>{o.current||i.triggerRef.current?.focus(),o.current=!1,e.preventDefault()}),onInteractOutside:sO(e.onInteractOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;(!i.modal||r)&&(o.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})},`DropdownMenuContent`)),iCe=b.forwardRef(W9(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=K9(n);return(0,H.jsx)(qSe,{...i,...r,ref:t})},`DropdownMenuItem`)),aCe=QSe,oCe=eCe,sCe=tCe,cCe=rCe,lCe=iCe;function uCe({...e}){return(0,H.jsx)(aCe,{"data-slot":`dropdown-menu`,...e})}function dCe({...e}){return(0,H.jsx)(oCe,{"data-slot":`dropdown-menu-trigger`,...e})}function fCe({className:e,sideOffset:t=4,...n}){return(0,H.jsx)(sCe,{children:(0,H.jsx)(cCe,{"data-slot":`dropdown-menu-content`,sideOffset:t,className:Mr(`bg-popover text-popover-foreground`,`z-50 min-w-60 overflow-x-hidden overflow-y-auto rounded-md border border-border-secondary py-1 shadow-lg`,`max-h-(--radix-dropdown-menu-content-available-height)`,`origin-(--radix-dropdown-menu-content-transform-origin)`,`data-[state=open]:animate-in data-[state=closed]:animate-out`,`data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0`,`data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95`,`data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2`,`data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2`,e),...n})})}var pCe=Ni([`relative flex cursor-default items-center gap-2 rounded-sm px-2.5 py-2 outline-hidden select-none`,`type-text-sm font-semibold`,`mx-1.5 my-px`,`[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,`data-[disabled]:pointer-events-none data-[disabled]:opacity-50`].join(` `),{variants:{variant:{default:[`text-muted-foreground`,`[&_svg:not([class*='text-'])]:text-muted-foreground`,`[@media(hover:hover)]:hover:bg-background-hover [@media(hover:hover)]:hover:text-muted-foreground-hover`,`focus:bg-background-hover focus:text-muted-foreground-hover`].join(` `),destructive:[`text-destructive`,`[&_svg]:!text-destructive`,`[@media(hover:hover)]:hover:bg-destructive/10 dark:[@media(hover:hover)]:hover:bg-destructive/20`,`focus:bg-destructive/10 dark:focus:bg-destructive/20`].join(` `)}},defaultVariants:{variant:`default`}});function J9({className:e,inset:t,variant:n=`default`,...r}){return(0,H.jsx)(lCe,{"data-slot":`dropdown-menu-item`,"data-inset":t,className:Mr(pCe({variant:n}),t&&`pl-8`,e),...r})}function Y9({inputs:e,activeKey:t,onSelect:n,onClear:r,onDelete:i}){let a=t??`Input`;return(0,H.jsxs)(uCe,{children:[(0,H.jsx)(dCe,{asChild:!0,children:(0,H.jsxs)(`button`,{type:`button`,className:`inline-flex cursor-pointer items-center gap-1 rounded px-1 py-0.5 font-mono text-xs text-muted-foreground transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring aria-expanded:text-foreground`,children:[(0,H.jsx)(`span`,{children:a.length>12?`${a.slice(0,12)}…`:a}),(0,H.jsx)(qr,{className:`size-3 shrink-0`})]})}),(0,H.jsx)(fCe,{align:`start`,className:`min-w-48`,children:e.length===0?(0,H.jsx)(J9,{disabled:!0,className:`font-mono text-xs font-normal text-muted-foreground`,children:`No saved input yet`}):(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(J9,{onSelect:r,className:`cursor-pointer font-mono text-xs font-normal`,disabled:e.length<=0,children:[e.length>0&&(0,H.jsx)(Kr,{className:lN(`size-3.5 shrink-0`,t===null?`opacity-100`:`opacity-0`)}),(0,H.jsx)(`span`,{className:`text-muted-foreground italic`,children:e.length>0?`none`:`no saved input yet`})]}),e.map(e=>(0,H.jsxs)(`div`,{className:`group/item relative`,children:[(0,H.jsxs)(J9,{onSelect:()=>e.key===t?r():n(e),className:`cursor-pointer pr-8 font-mono text-xs font-normal`,children:[(0,H.jsx)(Kr,{className:lN(`size-3.5 shrink-0`,e.key===t?`opacity-100`:`opacity-0`)}),(0,H.jsx)(`span`,{className:`truncate`,children:e.key})]}),(0,H.jsx)(`button`,{type:`button`,"aria-label":`Delete saved input ${e.key}`,onClick:()=>i(e.key),className:`absolute top-1/2 right-2.5 inline-flex -translate-y-1/2 cursor-pointer rounded p-1 text-light-gray-foreground opacity-0 transition-opacity hover:text-destructive focus-visible:opacity-100 group-hover/item:opacity-100`,children:(0,H.jsx)(Di,{className:`size-3.5`})})]},e.key))]})})]})}function mCe({open:e,onOpenChange:t,defaultKey:n,existingKeys:r,onSave:i}){let a=(0,b.useId)(),[o,s]=(0,b.useState)(n),c=o.trim(),l=c.length>0&&r.includes(c);return(0,b.useEffect)(()=>{e&&s(n)},[e,n]),(0,H.jsx)(rP,{open:e,onOpenChange:t,children:(0,H.jsxs)(sP,{children:[(0,H.jsxs)(cP,{children:[(0,H.jsx)(dP,{children:`Save input`}),(0,H.jsx)(fP,{children:`Save the current values to reuse it later.`})]}),(0,H.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),c&&(i(c),t(!1))},className:`space-y-3`,children:[(0,H.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,H.jsx)(HI,{htmlFor:a,children:`Name`}),(0,H.jsx)(UI,{id:a,value:o,onChange:e=>s(e.target.value),placeholder:`e.g. happy path`,autoFocus:!0}),l&&(0,H.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`An input named "`,c,`" already exists: it will be overwritten.`]})]}),(0,H.jsxs)(uP,{children:[(0,H.jsx)($i,{type:`button`,variant:`secondary`,onClick:()=>t(!1),children:`Cancel`}),(0,H.jsx)($i,{type:`submit`,variant:`primary`,disabled:!c,children:l?`Overwrite`:`Save`})]})]})]})})}function hCe({tool:e}){let{mutateAsync:t,isPending:n}=XD(),[r,i]=ND(),a=r===e.name,o=os(e=>e.isSignedIn),s=os(e=>e.requiresAuth),c=(0,b.useRef)(null),l=xD(e.name),u=!!l?.response,{setToolData:d}=bD(),f=l?.input??{},p=t=>{d(e.name,{input:t??{}})},m=yCe(e,f),h=s&&VD(e)&&!o,[g,_]=(0,b.useState)(`form`),[v,y]=(0,b.useState)(!1),x=(0,b.useMemo)(()=>{let t=e.inputSchema;return!t?.properties||Object.keys(t.properties).length===0?!1:g===`json`&&v?!0:E5.validateFormData(f,t).errors.length>0},[e.inputSchema,g,v,f]),S=async()=>{if(h)return;let n=e.inputSchema,r=!n?.properties||Object.keys(n.properties).length===0;if(!(g===`json`&&v)){if(!r){let{errors:e}=E5.validateFormData(f,n);if(e.length>0){g===`form`?c.current?.validateForm():y(!0);return}}return i(e.name),await t({toolName:e.name,args:f})}},C=t=>{let n=t.target;return!n||n.closest(`[role=dialog]`)?!1:n.closest(`[data-tool-name]`)?.getAttribute(`data-tool-name`)===e.name};kB(`meta.enter`,e=>{C(e)&&S()}),kB(`enter`,e=>{C(e)&&e.target?.tagName!==`TEXTAREA`&&(e.preventDefault(),S())},{exactMatch:!0});let w=null;h?w=`Sign in to call this tool`:x&&(w=`Input is not valid`);let T=(0,H.jsx)($i,{disabled:n||h||x,variant:`primary`,className:`disabled:cursor-not-allowed disabled:pointer-events-auto disabled:opacity-100`,onClick:S,icon:n?(0,H.jsx)(si,{className:`size-3 animate-spin`}):(0,H.jsx)(_i,{className:`size-3`}),children:`Run`});return(0,H.jsxs)(Sfe,{value:e.name,"data-tool-name":e.name,className:lN(`border-b border-l-[5px] border-border transition-colors last:border-b-0 data-[state=closed]:hover:bg-muted/40`,a&&`border-l-cyan-400`),children:[(0,H.jsx)(wxe,{onClick:u?()=>i(e.name):void 0,className:lN(`font-mono text-xs font-normal text-foreground`,`no-underline`),action:(0,H.jsxs)(`div`,{className:lN(`flex items-center gap-1.5 transition-opacity hover:opacity-100`,a?`opacity-100`:`opacity-50`),children:[m.savedInputs.length>0&&(0,H.jsx)(Y9,{inputs:m.savedInputs,activeKey:m.activeKey,onSelect:m.loadInput,onClear:m.clearSelection,onDelete:m.removeInput}),w?(0,H.jsxs)(LI,{children:[(0,H.jsx)(RI,{asChild:!0,children:(0,H.jsx)(`span`,{className:`inline-flex`,children:T})}),(0,H.jsx)(zI,{children:w})]}):T]}),children:(0,H.jsx)(`div`,{className:`min-w-0 flex-1 truncate text-left text-sm font-medium`,children:e.name})}),e.description?(0,H.jsx)(`div`,{className:`px-4 pb-3 font-sans`,children:(0,H.jsx)(vCe,{name:e.name,description:e.description})}):null,(0,H.jsx)(Cfe,{className:`px-4 pt-0 pb-3 text-foreground`,style:{animation:`none`},children:(0,H.jsx)(bCe,{tool:e,formData:f,setFormData:p,formRef:c,tab:g,setTab:_,jsonError:v,setJsonError:y,saved:m,inputInvalid:x,onRun:S})})]})}var X9={model:{badgeClass:`border-blue-200 bg-blue-100 text-blue-700`,tooltip:`Visible to and callable by the agent.`},app:{badgeClass:`border-purple-200 bg-purple-100 text-purple-700`,tooltip:`Callable by the widget on this server only.`}};function gCe(e){let t=e._meta,n=t?.ui?.visibility,r=t?.[`openai/visibility`],i=n??r;if(!Array.isArray(i))return;let a=i.filter(e=>e===`model`||e===`app`);return a.length>0?a:void 0}function _Ce(e,t){let n=t.inputSchema?.properties??{};return Object.fromEntries(Object.entries(e).filter(([e])=>e in n))}function vCe({name:e,description:t}){return(0,H.jsx)(`div`,{className:`rounded-md border border-border bg-muted/40 px-2.5 py-2`,children:(0,H.jsx)(i9,{text:t,title:e,className:`text-xs text-muted-foreground/70`})})}function yCe(e,t){let n=YD()?.name,r=Cxe(n,e.name),i=r9(e=>e.saveInput),a=r9(e=>e.updateInput),o=r9(e=>e.deleteInput),s=bD(e=>e.setToolData),c=xD(e.name)?.activeSavedInputKey??null;return{serverName:n,savedInputs:r,activeKey:c&&r.find(e=>e.key===c)?c:null,loadInput:t=>{s(e.name,{input:_Ce(t.input,e),activeSavedInputKey:t.key})},clearSelection:()=>{s(e.name,{input:{},activeSavedInputKey:null})},saveFromModal:o=>{n&&(r.some(e=>e.key===o)?a(n,e.name,o,t):i(n,e.name,o,t),s(e.name,{activeSavedInputKey:o}))},removeInput:t=>{n&&(o(n,e.name,t),t===c&&s(e.name,{activeSavedInputKey:null}))}}}function bCe({tool:e,formData:t,setFormData:n,formRef:r,tab:i,setTab:a,jsonError:o,setJsonError:s,saved:c,inputInvalid:l,onRun:u}){let d=e.inputSchema&&Object.keys(e.inputSchema.properties??{}).length>0;Sxe({tool:e,enabled:!d,execute:async()=>await u()??{content:[{type:`text`,text:`The tool call was not executed.`}],isError:!0}});let f=gCe(e),[p,m]=(0,b.useState)(!1),{serverName:h,savedInputs:g,activeKey:_}=c,v=(0,H.jsx)(`button`,{type:`button`,onClick:()=>m(!0),disabled:l,title:l?void 0:`Save input`,"aria-label":`Save input`,className:lN(`shrink-0 cursor-pointer text-light-gray-foreground transition-colors hover:text-foreground`,`disabled:cursor-not-allowed disabled:pointer-events-auto disabled:hover:text-light-gray-foreground`),children:(0,H.jsx)(xi,{className:`size-3.5`})});return(0,H.jsxs)(`div`,{className:`space-y-3`,children:[f&&(0,H.jsx)(`div`,{"data-testid":`tool-visibility`,className:`flex flex-wrap gap-1`,children:f.map(e=>(0,H.jsxs)(LI,{children:[(0,H.jsx)(RI,{asChild:!0,children:(0,H.jsx)(PB,{size:`sm`,className:X9[e].badgeClass,children:e})}),(0,H.jsx)(TI,{children:(0,H.jsxs)(DI,{sideOffset:6,className:lN(`z-50 w-fit rounded-md border border-border bg-background px-3 py-2 text-xs text-foreground shadow-md`,`animate-in fade-in-0 zoom-in-95`,`data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95`,`data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2`),children:[X9[e].tooltip,(0,H.jsx)(kI,{width:11,height:5,className:`fill-background drop-shadow-[0_1px_0_var(--color-border)]`})]})})]},e))}),d&&(0,H.jsxs)(Zfe,{value:i,onValueChange:e=>a(e),children:[(0,H.jsxs)(`div`,{className:`flex items-end justify-between gap-2 border-b border-border`,children:[(0,H.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1 pb-1.5`,children:[h&&(l?(0,H.jsxs)(LI,{children:[(0,H.jsx)(RI,{asChild:!0,children:(0,H.jsx)(`span`,{className:`inline-flex`,children:v})}),(0,H.jsx)(zI,{children:`Input is not valid`})]}):v),h?(0,H.jsx)(Y9,{inputs:g,activeKey:_,onSelect:c.loadInput,onClear:c.clearSelection,onDelete:c.removeInput}):(0,H.jsx)(`span`,{className:`text-xs font-medium text-muted-foreground`,children:`Input`})]}),(0,H.jsx)(`div`,{className:`-mb-px flex`,children:[`form`,`json`].map((e,t)=>{let n=e===`form`?ei:Gr;return(0,H.jsxs)(`button`,{type:`button`,onClick:()=>a(e),className:lN(`relative inline-flex h-7 cursor-pointer items-center gap-1.5 border border-border px-2 text-xs font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-ring`,t===0?`rounded-tl-md`:`-ml-px rounded-tr-md`,i===e?`z-10 border-b-background bg-background text-foreground`:`bg-muted/40 text-light-gray-foreground hover:text-foreground`),children:[(0,H.jsx)(n,{className:`size-3.5`}),(0,H.jsx)(`span`,{children:e})]},e)})})]}),(0,H.jsx)(w1,{value:`form`,children:(0,H.jsx)(xCe,{tool:e,formData:t,setFormData:n,formRef:r,onRun:u})}),(0,H.jsx)(w1,{value:`json`,className:`-mt-4`,children:(0,H.jsx)(SCe,{formData:t,setFormData:n,error:o,setError:s})})]}),d&&h&&(0,H.jsx)(mCe,{open:p,onOpenChange:m,defaultKey:_??``,existingKeys:g.map(e=>e.key),onSave:c.saveFromModal})]})}function xCe({tool:e,formData:t,setFormData:n,formRef:r,onRun:i}){let a=e.inputSchema,o=(0,b.useRef)(null);return(0,b.useEffect)(()=>{let e=o.current;if(!e)return;let t=e.querySelector(`input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="hidden"]):not([type="file"]):not([type="button"]):not([type="submit"]), textarea`);t&&!t.value&&t.focus({preventScroll:!0})},[]),(0,H.jsx)(`div`,{ref:o,children:(0,H.jsx)(xxe,{ref:r,tagName:gSe(e),idPrefix:e.name,schema:a,validator:E5,uiSchema:hSe(a),formData:t,onChange:e=>n(e.formData),onSubmit:(e,t)=>{let n=t.nativeEvent,r=i();n instanceof SubmitEvent&&typeof n.respondWith==`function`&&n.respondWith(r)},showErrorList:!1,widgets:fSe,templates:pSe})})}function SCe({formData:e,setFormData:t,error:n,setError:r}){let[i,a]=(0,b.useState)(JSON.stringify(e,null,2)),o=(0,b.useRef)(!1);(0,b.useEffect)(()=>{if(o.current){o.current=!1;return}a(JSON.stringify(e,null,2))},[e]);let s=e=>{a(e);try{let n=JSON.parse(e);o.current=!0,t(n),r(!1)}catch{r(!0)}};return(0,H.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,H.jsxs)(`div`,{className:`relative`,children:[(0,H.jsx)(`textarea`,{className:lN(`max-h-80 min-h-20 w-full resize-none overflow-auto rounded-b-md border border-t-0 p-2 pr-9 font-mono text-xs field-sizing-content`,n?`border-destructive`:`border-border`),spellCheck:!1,value:i,onChange:e=>s(e.target.value)}),(0,H.jsx)(_N,{value:i,label:`Copy input`,className:`absolute top-2 right-2 z-10`})]}),n&&(0,H.jsx)(`div`,{className:`text-xs text-destructive`,children:`The provided JSON is invalid`})]})}function CCe(){let e=JD(),[t,n]=(0,b.useState)(e.length>0?[e[0].name]:[]),[r,i]=(0,b.useState)(!1),[a,o]=(0,b.useState)(void 0);return MB(()=>{i(!1),o(void 0)},a),(0,H.jsxs)(`div`,{className:`grid h-full min-h-0 grid-rows-[auto_1fr]`,children:[(0,H.jsxs)(`header`,{className:`flex h-9 items-center justify-between border-b border-border pl-4 pr-0`,children:[(0,H.jsx)(`span`,{className:`text-sm font-medium`,children:`Tools`}),(0,H.jsx)($i,{onClick:async()=>{o(void 0),i(!0);try{await PD.invalidateQueries({queryKey:[`list-tools`]})}finally{o(600)}},"aria-label":`Refresh tools`,variant:`tertiary`,size:`icon`,children:(0,H.jsx)(bi,{className:lN(`size-3.5`,r&&`animate-spin`)})})]}),(0,H.jsx)(xfe,{type:`multiple`,value:t,onValueChange:n,className:`min-h-0 overflow-y-auto`,children:e.map(e=>(0,H.jsx)(hCe,{tool:e},e.name))})]})}var Z9=`devtools-tools-split`,Q9=`tools-list`,$9=`tool-panel`;function wCe(){let{status:e,requiresAuth:t}=os(),n=ds(e=>e.previewClient),r=e===`authenticated`,{defaultLayout:i,onLayoutChanged:a}=Ko({id:Z9,panelIds:[Q9,$9],storage:localStorage});return(0,H.jsxs)(`div`,{className:`grid h-screen grid-rows-[auto_1fr] overflow-hidden bg-background text-foreground`,children:[(0,H.jsx)(Ice,{}),r&&n?(0,H.jsx)(b.Suspense,{fallback:null,children:(0,H.jsx)(iB,{})}):r?(0,H.jsx)(`div`,{id:`devtools-card-body`,className:`relative flex min-h-0 min-w-0 flex-1`,children:(0,H.jsxs)(Uo,{orientation:`horizontal`,id:Z9,className:`flex min-h-0 min-w-0 flex-1`,defaultLayout:i,onLayoutChanged:a,children:[(0,H.jsx)(Xo,{id:Q9,defaultSize:380,minSize:250,maxSize:510,className:`min-h-0 min-w-0`,children:(0,H.jsx)(`aside`,{className:`flex h-full min-h-0 min-w-0 flex-col overflow-hidden`,children:(0,H.jsx)(b.Suspense,{fallback:null,children:(0,H.jsx)(CCe,{})})})}),(0,H.jsx)($o,{className:`w-px shrink-0 bg-border transition-colors hover:bg-ring data-separator-active:bg-ring`}),(0,H.jsx)(Xo,{id:$9,minSize:320,className:`min-h-0 min-w-0`,children:(0,H.jsx)(`main`,{className:`flex h-full min-h-0 min-w-0 flex-col overflow-hidden`,children:(0,H.jsx)(b.Suspense,{fallback:null,children:(0,H.jsx)(Ude,{})})})})]})}):(0,H.jsx)(`div`,{className:`flex items-center justify-center`,children:(0,H.jsxs)(`div`,{className:`space-y-4 text-center`,children:[(0,H.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:e===`connecting`?`Connecting to server...`:t?`Authentication required to access this server.`:`Not connected to a server.`}),e!==`connecting`&&(0,H.jsxs)($i,{variant:`secondary`,onClick:UD,children:[(0,H.jsx)(vi,{className:`size-3.5`}),`Connect`]})]})})]})}var TCe=()=>{let e=YD();(0,b.useEffect)(()=>{e?.name&&(document.title=`${e.name} · Skybridge`)},[e?.name])};function ECe(){return kN(),TN(),TCe(),(0,H.jsx)(Ke,{client:PD,children:(0,H.jsx)(en,{children:(0,H.jsx)(wCe,{})})})}async function DCe(){let e=new URLSearchParams(window.location.search);if(e.get(`oauth_callback`)===`true`){let t=e.get(`code`),n=e.get(`iss`)??void 0,r=e.get(`state`)??void 0,i=e.get(`error`),a=e.get(`error_description`),o=new URL(window.location.href);for(let e of[`oauth_callback`,`code`,`state`,`iss`,`error`,`error_description`,`error_uri`])o.searchParams.delete(e);if(window.history.replaceState({},``,o.toString()),i)os.getState().setStatus(`error`),os.getState().setError(a?`${i}: ${a}`:i);else if(t)try{await GD(t,n,r)}catch(e){console.error(`OAuth callback failed:`,e),os.getState().setStatus(`error`),os.getState().setError(e instanceof Error?e.message:`OAuth callback failed`)}else os.getState().setStatus(`error`),os.getState().setError(`OAuth callback missing authorization code`)}else UD().catch(e=>{console.error(`Connection failed:`,e)})}DCe(),(0,x.createRoot)(document.getElementById(`root`)).render((0,H.jsx)(b.StrictMode,{children:(0,H.jsx)(ECe,{})}));