@skybridge/devtools 0.35.19 → 0.35.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/index-TgAZs-PG.js +222 -0
- package/dist/index.html +1 -1
- package/package.json +2 -2
- package/dist/assets/index-DMcBS4Ng.js +0 -230
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(e&&(t=e(e=0)),t),s=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),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.4`})),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.4`})),_=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,R={pending:!1,data:null,method:null,action:null},z=[],B=-1;function V(e){return{current:e}}function H(e){0>B||(e.current=z[B],z[B]=null,B--)}function U(e,t){B++,z[B]=e.current,e.current=t}var ee=V(null),W=V(null),te=V(null),ne=V(null);function re(e,t){switch(U(te,t),U(W,e),U(ee,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Ud(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Ud(t),e=Wd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}H(ee),U(ee,e)}function ie(){H(ee),H(W),H(te)}function ae(e){e.memoizedState!==null&&U(ne,e);var t=ee.current,n=Wd(t,e.type);t!==n&&(U(W,e),U(ee,n))}function oe(e){W.current===e&&(H(ee),H(W)),ne.current===e&&(H(ne),ep._currentValue=R)}var se,ce;function le(e){if(se===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);se=t&&t[1]||``,ce=-1<e.stack.indexOf(`
|
|
2
|
+
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
|
3
|
+
`+se+e+ce}var ue=!1;function de(e,t){if(!e||ue)return``;ue=!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{ue=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?le(n):``}function fe(e,t){switch(e.tag){case 26:case 27:case 5:return le(e.type);case 16:return le(`Lazy`);case 13:return e.child!==t&&t!==null?le(`Suspense Fallback`):le(`Suspense`);case 19:return le(`SuspenseList`);case 0:case 15:return de(e.type,!1);case 11:return de(e.type.render,!1);case 1:return de(e.type,!0);case 31:return le(`Activity`);default:return``}}function pe(e){try{var t=``,n=null;do t+=fe(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
|
|
7
|
+
Error generating stack: `+e.message+`
|
|
8
|
+
`+e.stack}}var me=Object.prototype.hasOwnProperty,he=t.unstable_scheduleCallback,ge=t.unstable_cancelCallback,_e=t.unstable_shouldYield,ve=t.unstable_requestPaint,ye=t.unstable_now,be=t.unstable_getCurrentPriorityLevel,xe=t.unstable_ImmediatePriority,Se=t.unstable_UserBlockingPriority,Ce=t.unstable_NormalPriority,we=t.unstable_LowPriority,Te=t.unstable_IdlePriority,Ee=t.log,De=t.unstable_setDisableYieldValue,Oe=null,ke=null;function Ae(e){if(typeof Ee==`function`&&De(e),ke&&typeof ke.setStrictMode==`function`)try{ke.setStrictMode(Oe,e)}catch{}}var je=Math.clz32?Math.clz32:Pe,Me=Math.log,Ne=Math.LN2;function Pe(e){return e>>>=0,e===0?32:31-(Me(e)/Ne|0)|0}var Fe=256,Ie=262144,Le=4194304;function Re(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 ze(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=Re(n))):i=Re(o):i=Re(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Re(n))):i=Re(o)):i=Re(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 Be(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function G(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 Ve(){var e=Le;return Le<<=1,!(Le&62914560)&&(Le=4194304),e}function He(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ue(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function We(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-je(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&Ge(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function Ge(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-je(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function Ke(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-je(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function qe(e,t){var n=t&-t;return n=n&42?1:Je(n),(n&(e.suspendedLanes|t))===0?n:0}function Je(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 Ye(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function Xe(){var e=L.p;return e===0?(e=window.event,e===void 0?32:gp(e.type)):e}function Ze(e,t){var n=L.p;try{return L.p=e,t()}finally{L.p=n}}var Qe=Math.random().toString(36).slice(2),$e=`__reactFiber$`+Qe,et=`__reactProps$`+Qe,tt=`__reactContainer$`+Qe,nt=`__reactEvents$`+Qe,rt=`__reactListeners$`+Qe,it=`__reactHandles$`+Qe,at=`__reactResources$`+Qe,ot=`__reactMarker$`+Qe;function st(e){delete e[$e],delete e[et],delete e[nt],delete e[rt],delete e[it]}function ct(e){var t=e[$e];if(t)return t;for(var n=e.parentNode;n;){if(t=n[tt]||n[$e]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=pf(e);e!==null;){if(n=e[$e])return n;e=pf(e)}return t}e=n,n=e.parentNode}return null}function lt(e){if(e=e[$e]||e[tt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function ut(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function dt(e){var t=e[at];return t||=e[at]={hoistableStyles:new Map,hoistableScripts:new Map},t}function ft(e){e[ot]=!0}var pt=new Set,mt={};function ht(e,t){gt(e,t),gt(e+`Capture`,t)}function gt(e,t){for(mt[e]=t,e=0;e<t.length;e++)pt.add(t[e])}var _t=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]*$`),vt={},yt={};function bt(e){return me.call(yt,e)?!0:me.call(vt,e)?!1:_t.test(e)?yt[e]=!0:(vt[e]=!0,!1)}function xt(e,t,n){if(bt(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 St(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 Ct(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function wt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Tt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Et(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 Dt(e){if(!e._valueTracker){var t=Tt(e)?`checked`:`value`;e._valueTracker=Et(e,t,``+e[t])}}function Ot(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Tt(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function kt(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 At=/[\n"\\]/g;function jt(e){return e.replace(At,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Mt(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+wt(t)):e.value!==``+wt(t)&&(e.value=``+wt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Pt(e,o,wt(n)):Pt(e,o,wt(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+wt(s):e.removeAttribute(`name`)}function Nt(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)){Dt(e);return}n=n==null?``:``+wt(n),t=t==null?n:``+wt(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),Dt(e)}function Pt(e,t,n){t===`number`&&kt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Ft(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+wt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function It(e,t,n){if(t!=null&&(t=``+wt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+wt(n)}function Lt(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=wt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Dt(e)}function Rt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var zt=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 Bt(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||zt.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function Vt(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&&Bt(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&Bt(e,o,t[o])}function Ht(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 Ut=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`]]),Wt=/^[\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 Gt(e){return Wt.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function Kt(){}var qt=null;function Jt(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Yt=null,Xt=null;function Zt(e){var t=lt(e);if(t&&(e=t.stateNode)){var n=e[et]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Mt(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="`+jt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[et]||null;if(!a)throw Error(i(90));Mt(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&&Ot(r)}break a;case`textarea`:It(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Ft(e,!!n.multiple,t,!1)}}}var Qt=!1;function $t(e,t,n){if(Qt)return e(t,n);Qt=!0;try{return e(t)}finally{if(Qt=!1,(Yt!==null||Xt!==null)&&(Su(),Yt&&(t=Yt,e=Xt,Xt=Yt=null,Zt(t),e)))for(t=0;t<e.length;t++)Zt(e[t])}}function en(e,t){var n=e.stateNode;if(n===null)return null;var r=n[et]||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 tn=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),nn=!1;if(tn)try{var rn={};Object.defineProperty(rn,`passive`,{get:function(){nn=!0}}),window.addEventListener(`test`,rn,rn),window.removeEventListener(`test`,rn,rn)}catch{nn=!1}var an=null,on=null,K=null;function sn(){if(K)return K;var e,t=on,n=t.length,r,i=`value`in an?an.value:an.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 K=i.slice(e,1<r?1-r:void 0)}function cn(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 ln(){return!0}function un(){return!1}function dn(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)?ln:un,this.isPropagationStopped=un,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=ln)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=ln)},persist:function(){},isPersistent:ln}),t}var fn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},pn=dn(fn),mn=f({},fn,{view:0,detail:0}),hn=dn(mn),gn,_n,vn,yn=f({},mn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:An,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!==vn&&(vn&&e.type===`mousemove`?(gn=e.screenX-vn.screenX,_n=e.screenY-vn.screenY):_n=gn=0,vn=e),gn)},movementY:function(e){return`movementY`in e?e.movementY:_n}}),bn=dn(yn),xn=dn(f({},yn,{dataTransfer:0})),Sn=dn(f({},mn,{relatedTarget:0})),Cn=dn(f({},fn,{animationName:0,elapsedTime:0,pseudoElement:0})),wn=dn(f({},fn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Tn=dn(f({},fn,{data:0})),En={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Dn={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`},On={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function kn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=On[e])?!!t[e]:!1}function An(){return kn}var jn=dn(f({},mn,{key:function(e){if(e.key){var t=En[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=cn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Dn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:An,charCode:function(e){return e.type===`keypress`?cn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?cn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Mn=dn(f({},yn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Nn=dn(f({},mn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:An})),Pn=dn(f({},fn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Fn=dn(f({},yn,{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})),In=dn(f({},fn,{newState:0,oldState:0})),Ln=[9,13,27,32],Rn=tn&&`CompositionEvent`in window,zn=null;tn&&`documentMode`in document&&(zn=document.documentMode);var Bn=tn&&`TextEvent`in window&&!zn,Vn=tn&&(!Rn||zn&&8<zn&&11>=zn),Hn=` `,Un=!1;function Wn(e,t){switch(e){case`keyup`:return Ln.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function Gn(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var Kn=!1;function qn(e,t){switch(e){case`compositionend`:return Gn(t);case`keypress`:return t.which===32?(Un=!0,Hn):null;case`textInput`:return e=t.data,e===Hn&&Un?null:e;default:return null}}function Jn(e,t){if(Kn)return e===`compositionend`||!Rn&&Wn(e,t)?(e=sn(),K=on=an=null,Kn=!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 Vn&&t.locale!==`ko`?null:t.data;default:return null}}var Yn={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 Xn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!Yn[e.type]:t===`textarea`}function Zn(e,t,n,r){Yt?Xt?Xt.push(r):Xt=[r]:Yt=r,t=Dd(t,`onChange`),0<t.length&&(n=new pn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var Qn=null,$n=null;function er(e){yd(e,0)}function tr(e){if(Ot(ut(e)))return e}function nr(e,t){if(e===`change`)return t}var rr=!1;if(tn){var ir;if(tn){var ar=`oninput`in document;if(!ar){var or=document.createElement(`div`);or.setAttribute(`oninput`,`return;`),ar=typeof or.oninput==`function`}ir=ar}else ir=!1;rr=ir&&(!document.documentMode||9<document.documentMode)}function sr(){Qn&&(Qn.detachEvent(`onpropertychange`,cr),$n=Qn=null)}function cr(e){if(e.propertyName===`value`&&tr($n)){var t=[];Zn(t,$n,e,Jt(e)),$t(er,t)}}function lr(e,t,n){e===`focusin`?(sr(),Qn=t,$n=n,Qn.attachEvent(`onpropertychange`,cr)):e===`focusout`&&sr()}function ur(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return tr($n)}function dr(e,t){if(e===`click`)return tr(t)}function fr(e,t){if(e===`input`||e===`change`)return tr(t)}function pr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var mr=typeof Object.is==`function`?Object.is:pr;function hr(e,t){if(mr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!me.call(t,i)||!mr(e[i],t[i]))return!1}return!0}function gr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function _r(e,t){var n=gr(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=gr(n)}}function vr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?vr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function yr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=kt(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=kt(e.document)}return t}function br(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 xr=tn&&`documentMode`in document&&11>=document.documentMode,Sr=null,Cr=null,wr=null,Tr=!1;function Er(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Tr||Sr==null||Sr!==kt(r)||(r=Sr,`selectionStart`in r&&br(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}),wr&&hr(wr,r)||(wr=r,r=Dd(Cr,`onSelect`),0<r.length&&(t=new pn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Sr)))}function Dr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Or={animationend:Dr(`Animation`,`AnimationEnd`),animationiteration:Dr(`Animation`,`AnimationIteration`),animationstart:Dr(`Animation`,`AnimationStart`),transitionrun:Dr(`Transition`,`TransitionRun`),transitionstart:Dr(`Transition`,`TransitionStart`),transitioncancel:Dr(`Transition`,`TransitionCancel`),transitionend:Dr(`Transition`,`TransitionEnd`)},kr={},Ar={};tn&&(Ar=document.createElement(`div`).style,`AnimationEvent`in window||(delete Or.animationend.animation,delete Or.animationiteration.animation,delete Or.animationstart.animation),`TransitionEvent`in window||delete Or.transitionend.transition);function jr(e){if(kr[e])return kr[e];if(!Or[e])return e;var t=Or[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Ar)return kr[e]=t[n];return e}var Mr=jr(`animationend`),Nr=jr(`animationiteration`),Pr=jr(`animationstart`),Fr=jr(`transitionrun`),Ir=jr(`transitionstart`),Lr=jr(`transitioncancel`),Rr=jr(`transitionend`),zr=new Map,Br=`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(` `);Br.push(`scrollEnd`);function Vr(e,t){zr.set(e,t),ht(t,[e])}var Hr=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)},Ur=[],Wr=0,Gr=0;function Kr(){for(var e=Wr,t=Gr=Wr=0;t<e;){var n=Ur[t];Ur[t++]=null;var r=Ur[t];Ur[t++]=null;var i=Ur[t];Ur[t++]=null;var a=Ur[t];if(Ur[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&&Xr(n,i,a)}}function qr(e,t,n,r){Ur[Wr++]=e,Ur[Wr++]=t,Ur[Wr++]=n,Ur[Wr++]=r,Gr|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Jr(e,t,n,r){return qr(e,t,n,r),Zr(e)}function Yr(e,t){return qr(e,null,null,t),Zr(e)}function Xr(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-je(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function Zr(e){if(50<pu)throw pu=0,mu=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Qr={};function $r(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ei(e,t,n,r){return new $r(e,t,n,r)}function ti(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ni(e,t){var n=e.alternate;return n===null?(n=ei(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&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 ri(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 ii(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)ti(e)&&(s=1);else if(typeof e==`string`)s=Gf(e,n,ee.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case k:return e=ei(31,n,t,a),e.elementType=k,e.lanes=o,e;case y:return ai(n.children,a,o,t);case b:s=8,a|=24;break;case x:return e=ei(12,n,t,a|2),e.elementType=x,e.lanes=o,e;case T:return e=ei(13,n,t,a),e.elementType=T,e.lanes=o,e;case E:return e=ei(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=ei(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function ai(e,t,n,r){return e=ei(7,e,r,t),e.lanes=n,e}function oi(e,t,n){return e=ei(6,e,null,t),e.lanes=n,e}function si(e){var t=ei(18,null,null,0);return t.stateNode=e,t}function ci(e,t,n){return t=ei(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var li=new WeakMap;function ui(e,t){if(typeof e==`object`&&e){var n=li.get(e);return n===void 0?(t={value:e,source:t,stack:pe(t)},li.set(e,t),t):n}return{value:e,source:t,stack:pe(t)}}var di=[],fi=0,pi=null,mi=0,hi=[],gi=0,_i=null,vi=1,yi=``;function bi(e,t){di[fi++]=mi,di[fi++]=pi,pi=e,mi=t}function xi(e,t,n){hi[gi++]=vi,hi[gi++]=yi,hi[gi++]=_i,_i=e;var r=vi;e=yi;var i=32-je(r)-1;r&=~(1<<i),n+=1;var a=32-je(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,vi=1<<32-je(t)+i|n<<i|r,yi=a+e}else vi=1<<a|n<<i|r,yi=e}function Si(e){e.return!==null&&(bi(e,1),xi(e,1,0))}function Ci(e){for(;e===pi;)pi=di[--fi],di[fi]=null,mi=di[--fi],di[fi]=null;for(;e===_i;)_i=hi[--gi],hi[gi]=null,yi=hi[--gi],hi[gi]=null,vi=hi[--gi],hi[gi]=null}function wi(e,t){hi[gi++]=vi,hi[gi++]=yi,hi[gi++]=_i,vi=t.id,yi=t.overflow,_i=e}var Ti=null,Ei=null,Di=!1,q=null,Oi=!1,ki=Error(i(519));function Ai(e){throw Ii(ui(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),ki}function ji(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[$e]=e,t[et]=r,n){case`dialog`:bd(`cancel`,t),bd(`close`,t);break;case`iframe`:case`object`:case`embed`:bd(`load`,t);break;case`video`:case`audio`:for(n=0;n<_d.length;n++)bd(_d[n],t);break;case`source`:bd(`error`,t);break;case`img`:case`image`:case`link`:bd(`error`,t),bd(`load`,t);break;case`details`:bd(`toggle`,t);break;case`input`:bd(`invalid`,t),Nt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:bd(`invalid`,t);break;case`textarea`:bd(`invalid`,t),Lt(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||Nd(t.textContent,n)?(r.popover!=null&&(bd(`beforetoggle`,t),bd(`toggle`,t)),r.onScroll!=null&&bd(`scroll`,t),r.onScrollEnd!=null&&bd(`scrollend`,t),r.onClick!=null&&(t.onclick=Kt),t=!0):t=!1,t||Ai(e,!0)}function Mi(e){for(Ti=e.return;Ti;)switch(Ti.tag){case 5:case 31:case 13:Oi=!1;return;case 27:case 3:Oi=!0;return;default:Ti=Ti.return}}function Ni(e){if(e!==Ti)return!1;if(!Di)return Mi(e),Di=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||Gd(e.type,e.memoizedProps)),n=!n),n&&Ei&&Ai(e),Mi(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Ei=ff(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Ei=ff(e)}else t===27?(t=Ei,$d(e.type)?(e=df,df=null,Ei=e):Ei=t):Ei=Ti?uf(e.stateNode.nextSibling):null;return!0}function Pi(){Ei=Ti=null,Di=!1}function Fi(){var e=q;return e!==null&&(eu===null?eu=e:eu.push.apply(eu,e),q=null),e}function Ii(e){q===null?q=[e]:q.push(e)}var Li=V(null),Ri=null,zi=null;function Bi(e,t,n){U(Li,t._currentValue),t._currentValue=n}function Vi(e){e._currentValue=Li.current,H(Li)}function Hi(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 Ui(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),Hi(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),Hi(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 Wi(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;mr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===ne.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[ep]:e.push(ep))}a=a.return}e!==null&&Ui(t,e,n,r),t.flags|=262144}function Gi(e){for(e=e.firstContext;e!==null;){if(!mr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ki(e){Ri=e,zi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function qi(e){return Yi(Ri,e)}function Ji(e,t){return Ri===null&&Ki(e),Yi(e,t)}function Yi(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},zi===null){if(e===null)throw Error(i(308));zi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else zi=zi.next=t;return n}var Xi=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()})}},Zi=t.unstable_scheduleCallback,Qi=t.unstable_NormalPriority,$i={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ea(){return{controller:new Xi,data:new Map,refCount:0}}function ta(e){e.refCount--,e.refCount===0&&Zi(Qi,function(){e.controller.abort()})}var na=null,ra=0,ia=0,aa=null;function oa(e,t){if(na===null){var n=na=[];ra=0,ia=dd(),aa={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return ra++,t.then(sa,sa),t}function sa(){if(--ra===0&&na!==null){aa!==null&&(aa.status=`fulfilled`);var e=na;na=null,ia=0,aa=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function ca(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 la=I.S;I.S=function(e,t){ru=ye(),typeof t==`object`&&t&&typeof t.then==`function`&&oa(e,t),la!==null&&la(e,t)};var ua=V(null);function da(){var e=ua.current;return e===null?Rl.pooledCache:e}function fa(e,t){t===null?U(ua,ua.current):U(ua,t.pool)}function pa(){var e=da();return e===null?null:{parent:$i._currentValue,pool:e}}var ma=Error(i(460)),ha=Error(i(474)),ga=Error(i(542)),_a={then:function(){}};function va(e){return e=e.status,e===`fulfilled`||e===`rejected`}function ya(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Kt,Kt),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Ca(e),e;default:if(typeof t.status==`string`)t.then(Kt,Kt);else{if(e=Rl,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,Ca(e),e}throw xa=t,ma}}function ba(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(xa=e,ma):e}}var xa=null;function Sa(){if(xa===null)throw Error(i(459));var e=xa;return xa=null,e}function Ca(e){if(e===ma||e===ga)throw Error(i(483))}var wa=null,Ta=0;function Ea(e){var t=Ta;return Ta+=1,wa===null&&(wa=[]),ya(wa,e,t)}function Da(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Oa(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 ka(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=ni(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=oi(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&&ba(i)===t.type)?(t=a(t,n.props),Da(t,n),t.return=e,t):(t=ii(n.type,n.key,n.props,null,e.mode,r),Da(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=ci(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=ai(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=oi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case g:return n=ii(t.type,t.key,t.props,null,e.mode,n),Da(n,t),n.return=e,n;case v:return t=ci(t,e.mode,n),t.return=e,t;case O:return t=ba(t),f(e,t,n)}if(F(t)||M(t))return t=ai(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Ea(t),n);if(t.$$typeof===C)return f(e,Ji(e,t),n);Oa(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=ba(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,Ea(n),r);if(n.$$typeof===C)return p(e,t,Ji(e,n),r);Oa(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=ba(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,Ea(r),i);if(r.$$typeof===C)return m(e,t,n,Ji(t,r),i);Oa(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),Di&&bi(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 Di&&bi(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)}),Di&&bi(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),Di&&bi(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 Di&&bi(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)}),Di&&bi(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&&ba(l)===r.type){n(e,r.sibling),c=a(r,o.props),Da(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===y?(c=ai(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=ii(o.type,o.key,o.props,null,e.mode,c),Da(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=ci(o,e.mode,c),c.return=e,e=c}return s(e);case O:return o=ba(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,Ea(o),c);if(o.$$typeof===C)return b(e,r,Ji(e,o),c);Oa(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=oi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Ta=0;var i=b(e,t,n,r);return wa=null,i}catch(t){if(t===ma||t===ga)throw t;var a=ei(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Aa=ka(!0),ja=ka(!1),Ma=!1;function Na(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Pa(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 Fa(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ia(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Ll&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=Zr(e),Xr(e,null,n),t}return qr(e,r,t,n),Zr(e)}function La(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,Ke(e,n)}}function Ra(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 za=!1;function Ba(){if(za){var e=aa;if(e!==null)throw e}}function Va(e,t,n,r){za=!1;var i=e.updateQueue;Ma=!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?(Bl&p)===p:(r&p)===p){p!==0&&p===ia&&(za=!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:Ma=!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),Jl|=o,e.lanes=o,e.memoizedState=d}}function Ha(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Ua(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Ha(n[e],t)}var Wa=V(null),Ga=V(0);function Ka(e,t){e=Kl,U(Ga,e),U(Wa,t),Kl=e|t.baseLanes}function qa(){U(Ga,Kl),U(Wa,Wa.current)}function Ja(){Kl=Ga.current,H(Wa),H(Ga)}var Ya=V(null),Xa=null;function Za(e){var t=e.alternate;U(no,no.current&1),U(Ya,e),Xa===null&&(t===null||Wa.current!==null||t.memoizedState!==null)&&(Xa=e)}function Qa(e){U(no,no.current),U(Ya,e),Xa===null&&(Xa=e)}function $a(e){e.tag===22?(U(no,no.current),U(Ya,e),Xa===null&&(Xa=e)):eo(e)}function eo(){U(no,no.current),U(Ya,Ya.current)}function to(e){H(Ya),Xa===e&&(Xa=null),H(no)}var no=V(0);function ro(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||sf(n)||cf(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 io=0,ao=null,oo=null,so=null,co=!1,lo=!1,uo=!1,fo=0,po=0,mo=null,ho=0;function go(){throw Error(i(321))}function _o(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!mr(e[n],t[n]))return!1;return!0}function vo(e,t,n,r,i,a){return io=a,ao=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,I.H=e===null||e.memoizedState===null?Fs:Is,uo=!1,a=n(r,i),uo=!1,lo&&(a=bo(t,n,r,i)),yo(e),a}function yo(e){I.H=Ps;var t=oo!==null&&oo.next!==null;if(io=0,so=oo=ao=null,co=!1,po=0,mo=null,t)throw Error(i(300));e===null||$s||(e=e.dependencies,e!==null&&Gi(e)&&($s=!0))}function bo(e,t,n,r){ao=e;var a=0;do{if(lo&&(mo=null),po=0,lo=!1,25<=a)throw Error(i(301));if(a+=1,so=oo=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=Ls,o=t(n,r)}while(lo);return o}function xo(){var e=I.H,t=e.useState()[0];return t=typeof t.then==`function`?Oo(t):t,e=e.useState()[0],(oo===null?null:oo.memoizedState)!==e&&(ao.flags|=1024),t}function So(){var e=fo!==0;return fo=0,e}function Co(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function wo(e){if(co){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}co=!1}io=0,so=oo=ao=null,lo=!1,po=fo=0,mo=null}function To(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return so===null?ao.memoizedState=so=e:so=so.next=e,so}function Eo(){if(oo===null){var e=ao.alternate;e=e===null?null:e.memoizedState}else e=oo.next;var t=so===null?ao.memoizedState:so.next;if(t!==null)so=t,oo=e;else{if(e===null)throw ao.alternate===null?Error(i(467)):Error(i(310));oo=e,e={memoizedState:oo.memoizedState,baseState:oo.baseState,baseQueue:oo.baseQueue,queue:oo.queue,next:null},so===null?ao.memoizedState=so=e:so=so.next=e}return so}function Do(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Oo(e){var t=po;return po+=1,mo===null&&(mo=[]),e=ya(mo,e,t),t=ao,(so===null?t.memoizedState:so.next)===null&&(t=t.alternate,I.H=t===null||t.memoizedState===null?Fs:Is),e}function ko(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Oo(e);if(e.$$typeof===C)return qi(e)}throw Error(i(438,String(e)))}function Ao(e){var t=null,n=ao.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=ao.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=Do(),ao.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 jo(e,t){return typeof t==`function`?t(e):t}function Mo(e){return No(Eo(),oo,e)}function No(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?(io&f)===f:(Bl&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===ia&&(d=!0);else if((io&p)===p){u=u.next,p===ia&&(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,ao.lanes|=p,Jl|=p;f=u.action,uo&&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,ao.lanes|=f,Jl|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!mr(o,e.memoizedState)&&($s=!0,d&&(n=aa,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 Po(e){var t=Eo(),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);mr(o,t.memoizedState)||($s=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Fo(e,t,n){var r=ao,a=Eo(),o=Di;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!mr((oo||a).memoizedState,n);if(s&&(a.memoizedState=n,$s=!0),a=a.queue,os(Ro.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||so!==null&&so.memoizedState.tag&1){if(r.flags|=2048,ts(9,{destroy:void 0},Lo.bind(null,r,a,n,t),null),Rl===null)throw Error(i(349));o||io&127||Io(r,t,n)}return n}function Io(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=ao.updateQueue,t===null?(t=Do(),ao.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Lo(e,t,n,r){t.value=n,t.getSnapshot=r,zo(t)&&Bo(e)}function Ro(e,t,n){return n(function(){zo(t)&&Bo(e)})}function zo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!mr(e,n)}catch{return!0}}function Bo(e){var t=Yr(e,2);t!==null&&_u(t,e,2)}function Vo(e){var t=To();if(typeof e==`function`){var n=e;if(e=n(),uo){Ae(!0);try{n()}finally{Ae(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:jo,lastRenderedState:e},t}function Ho(e,t,n,r){return e.baseState=n,No(e,oo,typeof r==`function`?r:jo)}function Uo(e,t,n,r,a){if(js(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,Wo(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Wo(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),Go(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),Go(e,t,a)}catch(n){qo(e,t,n)}}function Go(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Ko(e,t,n)},function(n){return qo(e,t,n)}):Ko(e,t,n)}function Ko(e,t,n){t.status=`fulfilled`,t.value=n,Jo(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Wo(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,Jo(t),t=t.next;while(t!==r)}e.action=null}function Jo(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Yo(e,t){return t}function Xo(e,t){if(Di){var n=Rl.formState;if(n!==null){a:{var r=ao;if(Di){if(Ei){b:{for(var i=Ei,a=Oi;i.nodeType!==8;){if(!a){i=null;break b}if(i=uf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){Ei=uf(i.nextSibling),r=i.data===`F!`;break a}}Ai(r)}r=!1}r&&(t=n[0])}}return n=To(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Yo,lastRenderedState:t},n.queue=r,n=Os.bind(null,ao,r),r.dispatch=n,r=Vo(!1),a=As.bind(null,ao,!1,r.queue),r=To(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Uo.bind(null,ao,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function Zo(e){return Qo(Eo(),oo,e)}function Qo(e,t,n){if(t=No(e,t,Yo)[0],e=Mo(jo)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Oo(t)}catch(e){throw e===ma?ga:e}else r=t;t=Eo();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(ao.flags|=2048,ts(9,{destroy:void 0},$o.bind(null,i,n),null)),[r,a,e]}function $o(e,t){e.action=t}function es(e){var t=Eo(),n=oo;if(n!==null)return Qo(t,n,e);Eo(),t=t.memoizedState,n=Eo();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function ts(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=ao.updateQueue,t===null&&(t=Do(),ao.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function ns(){return Eo().memoizedState}function rs(e,t,n,r){var i=To();ao.flags|=e,i.memoizedState=ts(1|t,{destroy:void 0},n,r===void 0?null:r)}function is(e,t,n,r){var i=Eo();r=r===void 0?null:r;var a=i.memoizedState.inst;oo!==null&&r!==null&&_o(r,oo.memoizedState.deps)?i.memoizedState=ts(t,a,n,r):(ao.flags|=e,i.memoizedState=ts(1|t,a,n,r))}function as(e,t){rs(8390656,8,e,t)}function os(e,t){is(2048,8,e,t)}function ss(e){ao.flags|=4;var t=ao.updateQueue;if(t===null)t=Do(),ao.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function cs(e){var t=Eo().memoizedState;return ss({ref:t,nextImpl:e}),function(){if(Ll&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function ls(e,t){return is(4,2,e,t)}function us(e,t){return is(4,4,e,t)}function ds(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 fs(e,t,n){n=n==null?null:n.concat([e]),is(4,4,ds.bind(null,t,e),n)}function ps(){}function ms(e,t){var n=Eo();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&_o(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function hs(e,t){var n=Eo();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&_o(t,r[1]))return r[0];if(r=e(),uo){Ae(!0);try{e()}finally{Ae(!1)}}return n.memoizedState=[r,t],r}function gs(e,t,n){return n===void 0||io&1073741824&&!(Bl&261930)?e.memoizedState=t:(e.memoizedState=n,e=gu(),ao.lanes|=e,Jl|=e,n)}function _s(e,t,n,r){return mr(n,t)?n:Wa.current===null?!(io&42)||io&1073741824&&!(Bl&261930)?($s=!0,e.memoizedState=n):(e=gu(),ao.lanes|=e,Jl|=e,t):(e=gs(e,n,r),mr(e,t)||($s=!0),e)}function vs(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,As(e,!1,t,n);try{var c=i(),l=I.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?ks(e,t,ca(c,r),hu(e)):ks(e,t,r,hu(e))}catch(n){ks(e,t,{then:function(){},status:`rejected`,reason:n},hu())}finally{L.p=a,o!==null&&s.types!==null&&(o.types=s.types),I.T=o}}function ys(){}function bs(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=xs(e).queue;vs(e,a,t,R,n===null?ys:function(){return Ss(e),n(r)})}function xs(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:R,baseState:R,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:jo,lastRenderedState:R},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:jo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ss(e){var t=xs(e);t.next===null&&(t=e.alternate.memoizedState),ks(e,t.next.queue,{},hu())}function Cs(){return qi(ep)}function ws(){return Eo().memoizedState}function Ts(){return Eo().memoizedState}function Es(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=hu();e=Fa(n);var r=Ia(t,e,n);r!==null&&(_u(r,t,n),La(r,t,n)),t={cache:ea()},e.payload=t;return}t=t.return}}function Ds(e,t,n){var r=hu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},js(e)?Ms(t,n):(n=Jr(e,t,n,r),n!==null&&(_u(n,e,r),Ns(n,t,r)))}function Os(e,t,n){ks(e,t,n,hu())}function ks(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(js(e))Ms(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,mr(s,o))return qr(e,t,i,0),Rl===null&&Kr(),!1}catch{}if(n=Jr(e,t,i,r),n!==null)return _u(n,e,r),Ns(n,t,r),!0}return!1}function As(e,t,n,r){if(r={lane:2,revertLane:dd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},js(e)){if(t)throw Error(i(479))}else t=Jr(e,n,r,2),t!==null&&_u(t,e,2)}function js(e){var t=e.alternate;return e===ao||t!==null&&t===ao}function Ms(e,t){lo=co=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ns(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ke(e,n)}}var Ps={readContext:qi,use:ko,useCallback:go,useContext:go,useEffect:go,useImperativeHandle:go,useLayoutEffect:go,useInsertionEffect:go,useMemo:go,useReducer:go,useRef:go,useState:go,useDebugValue:go,useDeferredValue:go,useTransition:go,useSyncExternalStore:go,useId:go,useHostTransitionStatus:go,useFormState:go,useActionState:go,useOptimistic:go,useMemoCache:go,useCacheRefresh:go};Ps.useEffectEvent=go;var Fs={readContext:qi,use:ko,useCallback:function(e,t){return To().memoizedState=[e,t===void 0?null:t],e},useContext:qi,useEffect:as,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),rs(4194308,4,ds.bind(null,t,e),n)},useLayoutEffect:function(e,t){return rs(4194308,4,e,t)},useInsertionEffect:function(e,t){rs(4,2,e,t)},useMemo:function(e,t){var n=To();t=t===void 0?null:t;var r=e();if(uo){Ae(!0);try{e()}finally{Ae(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=To();if(n!==void 0){var i=n(t);if(uo){Ae(!0);try{n(t)}finally{Ae(!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=Ds.bind(null,ao,e),[r.memoizedState,e]},useRef:function(e){var t=To();return e={current:e},t.memoizedState=e},useState:function(e){e=Vo(e);var t=e.queue,n=Os.bind(null,ao,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:ps,useDeferredValue:function(e,t){return gs(To(),e,t)},useTransition:function(){var e=Vo(!1);return e=vs.bind(null,ao,e.queue,!0,!1),To().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=ao,a=To();if(Di){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Rl===null)throw Error(i(349));Bl&127||Io(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,as(Ro.bind(null,r,o,e),[e]),r.flags|=2048,ts(9,{destroy:void 0},Lo.bind(null,r,o,n,t),null),n},useId:function(){var e=To(),t=Rl.identifierPrefix;if(Di){var n=yi,r=vi;n=(r&~(1<<32-je(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=fo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=ho++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:Cs,useFormState:Xo,useActionState:Xo,useOptimistic:function(e){var t=To();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=As.bind(null,ao,!0,n),n.dispatch=t,[e,t]},useMemoCache:Ao,useCacheRefresh:function(){return To().memoizedState=Es.bind(null,ao)},useEffectEvent:function(e){var t=To(),n={impl:e};return t.memoizedState=n,function(){if(Ll&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Is={readContext:qi,use:ko,useCallback:ms,useContext:qi,useEffect:os,useImperativeHandle:fs,useInsertionEffect:ls,useLayoutEffect:us,useMemo:hs,useReducer:Mo,useRef:ns,useState:function(){return Mo(jo)},useDebugValue:ps,useDeferredValue:function(e,t){return _s(Eo(),oo.memoizedState,e,t)},useTransition:function(){var e=Mo(jo)[0],t=Eo().memoizedState;return[typeof e==`boolean`?e:Oo(e),t]},useSyncExternalStore:Fo,useId:ws,useHostTransitionStatus:Cs,useFormState:Zo,useActionState:Zo,useOptimistic:function(e,t){return Ho(Eo(),oo,e,t)},useMemoCache:Ao,useCacheRefresh:Ts};Is.useEffectEvent=cs;var Ls={readContext:qi,use:ko,useCallback:ms,useContext:qi,useEffect:os,useImperativeHandle:fs,useInsertionEffect:ls,useLayoutEffect:us,useMemo:hs,useReducer:Po,useRef:ns,useState:function(){return Po(jo)},useDebugValue:ps,useDeferredValue:function(e,t){var n=Eo();return oo===null?gs(n,e,t):_s(n,oo.memoizedState,e,t)},useTransition:function(){var e=Po(jo)[0],t=Eo().memoizedState;return[typeof e==`boolean`?e:Oo(e),t]},useSyncExternalStore:Fo,useId:ws,useHostTransitionStatus:Cs,useFormState:es,useActionState:es,useOptimistic:function(e,t){var n=Eo();return oo===null?(n.baseState=e,[e,n.queue.dispatch]):Ho(n,oo,e,t)},useMemoCache:Ao,useCacheRefresh:Ts};Ls.useEffectEvent=cs;function Rs(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 zs={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=hu(),i=Fa(r);i.payload=t,n!=null&&(i.callback=n),t=Ia(e,i,r),t!==null&&(_u(t,e,r),La(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=hu(),i=Fa(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Ia(e,i,r),t!==null&&(_u(t,e,r),La(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=hu(),r=Fa(n);r.tag=2,t!=null&&(r.callback=t),t=Ia(e,r,n),t!==null&&(_u(t,e,n),La(t,e,n))}};function Bs(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?!hr(n,r)||!hr(i,a):!0}function Vs(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&&zs.enqueueReplaceState(t,t.state,null)}function Hs(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 Us(e){Hr(e)}function Ws(e){console.error(e)}function Gs(e){Hr(e)}function Ks(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function qs(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 Js(e,t,n){return n=Fa(n),n.tag=3,n.payload={element:null},n.callback=function(){Ks(e,t)},n}function Ys(e){return e=Fa(e),e.tag=3,e}function Xs(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(){qs(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){qs(t,n,r),typeof i!=`function`&&(J===null?J=new Set([this]):J.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function Zs(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&Wi(t,n,a,!0),n=Ya.current,n!==null){switch(n.tag){case 31:case 13:return Xa===null?ku():n.alternate===null&&ql===0&&(ql=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===_a?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Ku(e,r,a)),!1;case 22:return n.flags|=65536,r===_a?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)),Ku(e,r,a)),!1}throw Error(i(435,n.tag))}return Ku(e,r,a),ku(),!1}if(Di)return t=Ya.current,t===null?(r!==ki&&(t=Error(i(423),{cause:r}),Ii(ui(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=ui(r,n),a=Js(e.stateNode,r,a),Ra(e,a),ql!==4&&(ql=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==ki&&(e=Error(i(422),{cause:r}),Ii(ui(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=ui(o,n),$l===null?$l=[o]:$l.push(o),ql!==4&&(ql=2),t===null)return!0;r=ui(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Js(n.stateNode,r,e),Ra(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`&&(J===null||!J.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=Ys(a),Xs(a,e,n,r),Ra(n,a),!1}n=n.return}while(n!==null);return!1}var Qs=Error(i(461)),$s=!1;function ec(e,t,n,r){t.child=e===null?ja(t,null,n,r):Aa(t,e.child,n,r)}function tc(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 Ki(t),r=vo(e,t,n,o,a,i),s=So(),e!==null&&!$s?(Co(e,t,i),Tc(e,t,i)):(Di&&s&&Si(t),t.flags|=1,ec(e,t,r,i),t.child)}function nc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!ti(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,rc(e,t,a,r,i)):(e=ii(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Ec(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?hr:n,n(o,r)&&e.ref===t.ref)return Tc(e,t,i)}return t.flags|=1,e=ni(a,r),e.ref=t.ref,e.return=t,t.child=e}function rc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(hr(a,r)&&e.ref===t.ref)if($s=!1,t.pendingProps=r=a,Ec(e,i))e.flags&131072&&($s=!0);else return t.lanes=e.lanes,Tc(e,t,i)}return dc(e,t,n,r,i)}function ic(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 oc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&fa(t,a===null?null:a.cachePool),a===null?qa():Ka(t,a),$a(t);else return r=t.lanes=536870912,oc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&fa(t,null),qa(),eo(t)):(fa(t,a.cachePool),Ka(t,a),eo(t),t.memoizedState=null);return ec(e,t,i,n),t.child}function ac(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function oc(e,t,n,r,i){var a=da();return a=a===null?null:{parent:$i._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&fa(t,null),qa(),$a(t),e!==null&&Wi(e,t,r,!0),t.childLanes=i,null}function sc(e,t){return t=bc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function cc(e,t,n){return Aa(t,e.child,null,n),e=sc(t,t.pendingProps),e.flags|=2,to(t),t.memoizedState=null,e}function lc(e,t,n){var r=t.pendingProps,a=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(Di){if(r.mode===`hidden`)return e=sc(t,r),t.lanes=536870912,ac(null,e);if(Qa(t),(e=Ei)?(e=of(e,Oi),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:_i===null?null:{id:vi,overflow:yi},retryLane:536870912,hydrationErrors:null},n=si(e),n.return=t,t.child=n,Ti=t,Ei=null)):e=null,e===null)throw Ai(t);return t.lanes=536870912,null}return sc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(Qa(t),a)if(t.flags&256)t.flags&=-257,t=cc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if($s||Wi(e,t,n,!1),a=(n&e.childLanes)!==0,$s||a){if(r=Rl,r!==null&&(s=qe(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,Yr(e,s),_u(r,e,s),Qs;ku(),t=cc(e,t,n)}else e=o.treeContext,Ei=uf(s.nextSibling),Ti=t,Di=!0,q=null,Oi=!1,e!==null&&wi(t,e),t=sc(t,r),t.flags|=4096;return t}return e=ni(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function uc(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 dc(e,t,n,r,i){return Ki(t),n=vo(e,t,n,r,void 0,i),r=So(),e!==null&&!$s?(Co(e,t,i),Tc(e,t,i)):(Di&&r&&Si(t),t.flags|=1,ec(e,t,n,i),t.child)}function fc(e,t,n,r,i,a){return Ki(t),t.updateQueue=null,n=bo(t,r,n,i),yo(e),r=So(),e!==null&&!$s?(Co(e,t,a),Tc(e,t,a)):(Di&&r&&Si(t),t.flags|=1,ec(e,t,n,a),t.child)}function pc(e,t,n,r,i){if(Ki(t),t.stateNode===null){var a=Qr,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=zs,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Na(t),o=n.contextType,a.context=typeof o==`object`&&o?qi(o):Qr,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Rs(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&&zs.enqueueReplaceState(a,a.state,null),Va(t,r,a,i),Ba(),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=Hs(n,s);a.props=c;var l=a.context,u=n.contextType;o=Qr,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)&&Vs(t,a,r,o),Ma=!1;var f=t.memoizedState;a.state=f,Va(t,r,a,i),Ba(),l=t.memoizedState,s||f!==l||Ma?(typeof d==`function`&&(Rs(t,n,d,r),l=t.memoizedState),(c=Ma||Bs(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,Pa(e,t),o=t.memoizedProps,u=Hs(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=Qr,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)&&Vs(t,a,r,c),Ma=!1,f=t.memoizedState,a.state=f,Va(t,r,a,i),Ba();var p=t.memoizedState;o!==d||f!==p||Ma||e!==null&&e.dependencies!==null&&Gi(e.dependencies)?(typeof s==`function`&&(Rs(t,n,s,r),p=t.memoizedState),(u=Ma||Bs(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&Gi(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,uc(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=Aa(t,e.child,null,i),t.child=Aa(t,null,n,i)):ec(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Tc(e,t,i),e}function mc(e,t,n,r){return Pi(),t.flags|=256,ec(e,t,n,r),t.child}var hc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function gc(e){return{baseLanes:e,cachePool:pa()}}function _c(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=Zl),e}function vc(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:(no.current&2)!=0),s&&(a=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(Di){if(a?Za(t):eo(t),(e=Ei)?(e=of(e,Oi),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:_i===null?null:{id:vi,overflow:yi},retryLane:536870912,hydrationErrors:null},n=si(e),n.return=t,t.child=n,Ti=t,Ei=null)):e=null,e===null)throw Ai(t);return cf(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(eo(t),a=t.mode,c=bc({mode:`hidden`,children:c},a),r=ai(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=gc(n),r.childLanes=_c(e,s,n),t.memoizedState=hc,ac(null,r)):(Za(t),yc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(Za(t),t.flags&=-257,t=xc(e,t,n)):t.memoizedState===null?(eo(t),c=r.fallback,a=t.mode,r=bc({mode:`visible`,children:r.children},a),c=ai(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Aa(t,e.child,null,n),r=t.child,r.memoizedState=gc(n),r.childLanes=_c(e,s,n),t.memoizedState=hc,t=ac(null,r)):(eo(t),t.child=e.child,t.flags|=128,t=null);else if(Za(t),cf(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,Ii({value:r,source:null,stack:null}),t=xc(e,t,n)}else if($s||Wi(e,t,n,!1),s=(n&e.childLanes)!==0,$s||s){if(s=Rl,s!==null&&(r=qe(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,Yr(e,r),_u(s,e,r),Qs;sf(c)||ku(),t=xc(e,t,n)}else sf(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,Ei=uf(c.nextSibling),Ti=t,Di=!0,q=null,Oi=!1,e!==null&&wi(t,e),t=yc(t,r.children),t.flags|=4096);return t}return a?(eo(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=ni(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=ai(c,a,n,null),c.flags|=2):c=ni(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,ac(null,r),r=t.child,c=e.child.memoizedState,c===null?c=gc(n):(a=c.cachePool,a===null?a=pa():(l=$i._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=_c(e,s,n),t.memoizedState=hc,ac(e.child,r)):(Za(t),n=e.child,e=n.sibling,n=ni(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 yc(e,t){return t=bc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function bc(e,t){return e=ei(22,e,null,t),e.lanes=0,e}function xc(e,t,n){return Aa(t,e.child,null,n),e=yc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Sc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Hi(e.return,t,n)}function Cc(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 wc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=no.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,U(no,o),ec(e,t,r,n),r=Di?mi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Sc(e,n,t);else if(e.tag===19)Sc(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&&ro(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Cc(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&&ro(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Cc(t,!0,n,null,a,r);break;case`together`:Cc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Tc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Jl|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Wi(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=ni(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ni(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Ec(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&Gi(e))):!0}function Dc(e,t,n){switch(t.tag){case 3:re(t,t.stateNode.containerInfo),Bi(t,$i,e.memoizedState.cache),Pi();break;case 27:case 5:ae(t);break;case 4:re(t,t.stateNode.containerInfo);break;case 10:Bi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Qa(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(Za(t),e=Tc(e,t,n),e===null?null:e.sibling):vc(e,t,n):(Za(t),t.flags|=128,null);Za(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(Wi(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return wc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),U(no,no.current),r)break;return null;case 22:return t.lanes=0,ic(e,t,n,t.pendingProps);case 24:Bi(t,$i,e.memoizedState.cache)}return Tc(e,t,n)}function Oc(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)$s=!0;else{if(!Ec(e,n)&&!(t.flags&128))return $s=!1,Dc(e,t,n);$s=!!(e.flags&131072)}else $s=!1,Di&&t.flags&1048576&&xi(t,mi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=ba(t.elementType),t.type=e,typeof e==`function`)ti(e)?(r=Hs(e,r),t.tag=1,t=pc(null,t,e,r,n)):(t.tag=0,t=dc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===w){t.tag=11,t=tc(null,t,e,r,n);break a}else if(a===D){t.tag=14,t=nc(null,t,e,r,n);break a}}throw t=P(e)||e,Error(i(306,t,``))}}return t;case 0:return dc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Hs(r,t.pendingProps),pc(e,t,r,a,n);case 3:a:{if(re(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,Pa(e,t),Va(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Bi(t,$i,r),r!==o.cache&&Ui(t,[$i],n,!0),Ba(),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=mc(e,t,r,n);break a}else if(r!==a){a=ui(Error(i(424)),t),Ii(a),t=mc(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(Ei=uf(e.firstChild),Ti=t,Di=!0,q=null,Oi=!0,n=ja(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Pi(),r===a){t=Tc(e,t,n);break a}ec(e,t,r,n)}t=t.child}return t;case 26:return uc(e,t),e===null?(n=jf(t.type,null,t.pendingProps,null))?t.memoizedState=n:Di||(n=t.type,e=t.pendingProps,r=Hd(te.current).createElement(n),r[$e]=t,r[et]=e,Id(r,n,e),ft(r),t.stateNode=r):t.memoizedState=jf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ae(t),e===null&&Di&&(r=t.stateNode=mf(t.type,t.pendingProps,te.current),Ti=t,Oi=!0,a=Ei,$d(t.type)?(df=a,Ei=uf(r.firstChild)):Ei=a),ec(e,t,t.pendingProps.children,n),uc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Di&&((a=r=Ei)&&(r=rf(r,t.type,t.pendingProps,Oi),r===null?a=!1:(t.stateNode=r,Ti=t,Ei=uf(r.firstChild),Oi=!1,a=!0)),a||Ai(t)),ae(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Gd(a,o)?r=null:s!==null&&Gd(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=vo(e,t,xo,null,null,n),ep._currentValue=a),uc(e,t),ec(e,t,r,n),t.child;case 6:return e===null&&Di&&((e=n=Ei)&&(n=af(n,t.pendingProps,Oi),n===null?e=!1:(t.stateNode=n,Ti=t,Ei=null,e=!0)),e||Ai(t)),null;case 13:return vc(e,t,n);case 4:return re(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Aa(t,null,r,n):ec(e,t,r,n),t.child;case 11:return tc(e,t,t.type,t.pendingProps,n);case 7:return ec(e,t,t.pendingProps,n),t.child;case 8:return ec(e,t,t.pendingProps.children,n),t.child;case 12:return ec(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Bi(t,t.type,r.value),ec(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,Ki(t),a=qi(a),r=r(a),t.flags|=1,ec(e,t,r,n),t.child;case 14:return nc(e,t,t.type,t.pendingProps,n);case 15:return rc(e,t,t.type,t.pendingProps,n);case 19:return wc(e,t,n);case 31:return lc(e,t,n);case 22:return ic(e,t,n,t.pendingProps);case 24:return Ki(t),r=qi($i),e===null?(a=da(),a===null&&(a=Rl,o=ea(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},Na(t),Bi(t,$i,a)):((e.lanes&n)!==0&&(Pa(e,t),Va(t,null,null,n),Ba()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,Bi(t,$i,r),r!==a.cache&&Ui(t,[$i],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Bi(t,$i,r))),ec(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function kc(e){e.flags|=4}function Ac(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(Eu())e.flags|=8192;else throw xa=_a,ha}else e.flags&=-16777217}function jc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Kf(t))if(Eu())e.flags|=8192;else throw xa=_a,ha}function Mc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:Ve(),e.lanes|=t,Ql|=t)}function Nc(e,t){if(!Di)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 Pc(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 Fc(e,t,n){var r=t.pendingProps;switch(Ci(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Pc(t),null;case 1:return Pc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Vi($i),ie(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Ni(t)?kc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Fi())),Pc(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(kc(t),o===null?(Pc(t),Ac(t,a,null,r,n)):(Pc(t),jc(t,o))):o?o===e.memoizedState?(Pc(t),t.flags&=-16777217):(kc(t),Pc(t),jc(t,o)):(e=e.memoizedProps,e!==r&&kc(t),Pc(t),Ac(t,a,e,r,n)),null;case 27:if(oe(t),n=te.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&kc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Pc(t),null}e=ee.current,Ni(t)?ji(t,e):(e=mf(a,r,n),t.stateNode=e,kc(t))}return Pc(t),null;case 5:if(oe(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&kc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Pc(t),null}if(o=ee.current,Ni(t))ji(t,o);else{var s=Hd(te.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[$e]=t,o[et]=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(Id(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&&kc(t)}}return Pc(t),Ac(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&kc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=te.current,Ni(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Ti,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[$e]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Nd(e.nodeValue,n)),e||Ai(t,!0)}else e=Hd(e).createTextNode(r),e[$e]=t,t.stateNode=e}return Pc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Ni(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[$e]=t}else Pi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Pc(t),e=!1}else n=Fi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(to(t),t):(to(t),null);if(t.flags&128)throw Error(i(558))}return Pc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Ni(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[$e]=t}else Pi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Pc(t),a=!1}else a=Fi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(to(t),t):(to(t),null)}return to(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),Mc(t,t.updateQueue),Pc(t),null);case 4:return ie(),e===null&&Cd(t.stateNode.containerInfo),Pc(t),null;case 10:return Vi(t.type),Pc(t),null;case 19:if(H(no),r=t.memoizedState,r===null)return Pc(t),null;if(a=(t.flags&128)!=0,o=r.rendering,o===null)if(a)Nc(r,!1);else{if(ql!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=ro(e),o!==null){for(t.flags|=128,Nc(r,!1),e=o.updateQueue,t.updateQueue=e,Mc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)ri(n,e),n=n.sibling;return U(no,no.current&1|2),Di&&bi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&ye()>iu&&(t.flags|=128,a=!0,Nc(r,!1),t.lanes=4194304)}else{if(!a)if(e=ro(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Mc(t,e),Nc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!Di)return Pc(t),null}else 2*ye()-r.renderingStartTime>iu&&n!==536870912&&(t.flags|=128,a=!0,Nc(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?(Pc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=ye(),e.sibling=null,n=no.current,U(no,a?n&1|2:n&1),Di&&bi(t,r.treeForkCount),e);case 22:case 23:return to(t),Ja(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Pc(t),t.subtreeFlags&6&&(t.flags|=8192)):Pc(t),n=t.updateQueue,n!==null&&Mc(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&&H(ua),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Vi($i),Pc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Ic(e,t){switch(Ci(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Vi($i),ie(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return oe(t),null;case 31:if(t.memoizedState!==null){if(to(t),t.alternate===null)throw Error(i(340));Pi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(to(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Pi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return H(no),null;case 4:return ie(),null;case 10:return Vi(t.type),null;case 22:case 23:return to(t),Ja(),e!==null&&H(ua),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Vi($i),null;case 25:return null;default:return null}}function Lc(e,t){switch(Ci(t),t.tag){case 3:Vi($i),ie();break;case 26:case 27:case 5:oe(t);break;case 4:ie();break;case 31:t.memoizedState!==null&&to(t);break;case 13:to(t);break;case 19:H(no);break;case 10:Vi(t.type);break;case 22:case 23:to(t),Ja(),e!==null&&H(ua);break;case 24:Vi($i)}}function Rc(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){Gu(t,t.return,e)}}function zc(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){Gu(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Gu(t,t.return,e)}}function Bc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Ua(t,n)}catch(t){Gu(e,e.return,t)}}}function Vc(e,t,n){n.props=Hs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Gu(e,t,n)}}function Hc(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){Gu(e,t,n)}}function Uc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){Gu(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){Gu(e,t,n)}else n.current=null}function Wc(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){Gu(e,e.return,t)}}function Gc(e,t,n){try{var r=e.stateNode;Ld(r,e.type,n,t),r[et]=t}catch(t){Gu(e,e.return,t)}}function Kc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&$d(e.type)||e.tag===4}function qc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Kc(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&&$d(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 Jc(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=Kt));else if(r!==4&&(r===27&&$d(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Jc(e,t,n),e=e.sibling;e!==null;)Jc(e,t,n),e=e.sibling}function Yc(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&&$d(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Yc(e,t,n),e=e.sibling;e!==null;)Yc(e,t,n),e=e.sibling}function Xc(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Id(t,r,n),t[$e]=e,t[et]=n}catch(t){Gu(e,e.return,t)}}var Zc=!1,Qc=!1,$c=!1,el=typeof WeakSet==`function`?WeakSet:Set,tl=null;function nl(e,t){if(e=e.containerInfo,Bd=lp,e=yr(e),br(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(Vd={focusedElem:e,selectionRange:n},lp=!1,tl=t;tl!==null;)if(t=tl,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,tl=e;else for(;tl!==null;){switch(t=tl,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=Hs(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){Gu(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)nf(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:nf(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,tl=e;break}tl=t.return}}function rl(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:vl(e,n),r&4&&Rc(5,n);break;case 1:if(vl(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Gu(n,n.return,e)}else{var i=Hs(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Gu(n,n.return,e)}}r&64&&Bc(n),r&512&&Hc(n,n.return);break;case 3:if(vl(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{Ua(e,t)}catch(e){Gu(n,n.return,e)}}break;case 27:t===null&&r&4&&Xc(n);case 26:case 5:vl(e,n),t===null&&r&4&&Wc(n),r&512&&Hc(n,n.return);break;case 12:vl(e,n);break;case 31:vl(e,n),r&4&&ll(e,n);break;case 13:vl(e,n),r&4&&ul(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Yu.bind(null,n),lf(e,n))));break;case 22:if(r=n.memoizedState!==null||Zc,!r){t=t!==null&&t.memoizedState!==null||Qc,i=Zc;var a=Qc;Zc=r,(Qc=t)&&!a?bl(e,n,(n.subtreeFlags&8772)!=0):vl(e,n),Zc=i,Qc=a}break;case 30:break;default:vl(e,n)}}function il(e){var t=e.alternate;t!==null&&(e.alternate=null,il(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&st(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 al=null,ol=!1;function sl(e,t,n){for(n=n.child;n!==null;)cl(e,t,n),n=n.sibling}function cl(e,t,n){if(ke&&typeof ke.onCommitFiberUnmount==`function`)try{ke.onCommitFiberUnmount(Oe,n)}catch{}switch(n.tag){case 26:Qc||Uc(n,t),sl(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Qc||Uc(n,t);var r=al,i=ol;$d(n.type)&&(al=n.stateNode,ol=!1),sl(e,t,n),hf(n.stateNode),al=r,ol=i;break;case 5:Qc||Uc(n,t);case 6:if(r=al,i=ol,al=null,sl(e,t,n),al=r,ol=i,al!==null)if(ol)try{(al.nodeType===9?al.body:al.nodeName===`HTML`?al.ownerDocument.body:al).removeChild(n.stateNode)}catch(e){Gu(n,t,e)}else try{al.removeChild(n.stateNode)}catch(e){Gu(n,t,e)}break;case 18:al!==null&&(ol?(e=al,ef(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Fp(e)):ef(al,n.stateNode));break;case 4:r=al,i=ol,al=n.stateNode.containerInfo,ol=!0,sl(e,t,n),al=r,ol=i;break;case 0:case 11:case 14:case 15:zc(2,n,t),Qc||zc(4,n,t),sl(e,t,n);break;case 1:Qc||(Uc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Vc(n,t,r)),sl(e,t,n);break;case 21:sl(e,t,n);break;case 22:Qc=(r=Qc)||n.memoizedState!==null,sl(e,t,n),Qc=r;break;default:sl(e,t,n)}}function ll(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Fp(e)}catch(e){Gu(t,t.return,e)}}}function ul(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Fp(e)}catch(e){Gu(t,t.return,e)}}function dl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new el),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new el),t;default:throw Error(i(435,e.tag))}}function fl(e,t){var n=dl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Xu.bind(null,e,t);t.then(r,r)}})}function pl(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($d(c.type)){al=c.stateNode,ol=!1;break a}break;case 5:al=c.stateNode,ol=!1;break a;case 3:case 4:al=c.stateNode.containerInfo,ol=!0;break a}c=c.return}if(al===null)throw Error(i(160));cl(o,s,a),al=null,ol=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)hl(t,e),t=t.sibling}var ml=null;function hl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:pl(t,e),gl(e),r&4&&(zc(3,e,e.return),Rc(3,e),zc(5,e,e.return));break;case 1:pl(t,e),gl(e),r&512&&(Qc||n===null||Uc(n,n.return)),r&64&&Zc&&(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=ml;if(pl(t,e),gl(e),r&512&&(Qc||n===null||Uc(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[ot]||o[$e]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head > title`))),Id(o,r,n),o[$e]=e,ft(o),r=o;break a;case`link`:var s=Uf(`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),Id(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=Uf(`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),Id(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[$e]=e,ft(o),r=o}e.stateNode=r}else Wf(a,e.type,e.stateNode);else e.stateNode=Rf(a,r,e.memoizedProps);else o===r?r===null&&e.stateNode!==null&&Gc(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?Wf(a,e.type,e.stateNode):Rf(a,r,e.memoizedProps))}break;case 27:pl(t,e),gl(e),r&512&&(Qc||n===null||Uc(n,n.return)),n!==null&&r&4&&Gc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(pl(t,e),gl(e),r&512&&(Qc||n===null||Uc(n,n.return)),e.flags&32){a=e.stateNode;try{Rt(a,``)}catch(t){Gu(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,Gc(e,a,n===null?a:n.memoizedProps)),r&1024&&($c=!0);break;case 6:if(pl(t,e),gl(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){Gu(e,e.return,t)}}break;case 3:if(Hf=null,a=ml,ml=vf(t.containerInfo),pl(t,e),ml=a,gl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Fp(t.containerInfo)}catch(t){Gu(e,e.return,t)}$c&&($c=!1,_l(e));break;case 4:r=ml,ml=vf(e.stateNode.containerInfo),pl(t,e),gl(e),ml=r;break;case 12:pl(t,e),gl(e);break;case 31:pl(t,e),gl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,fl(e,r)));break;case 13:pl(t,e),gl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(nu=ye()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,fl(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=Zc,d=Qc;if(Zc=u||a,Qc=d||l,pl(t,e),Qc=d,Zc=u,gl(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||Zc||Qc||yl(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){Gu(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){Gu(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?tf(m,!0):tf(l.stateNode,!1)}catch(e){Gu(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,fl(e,n))));break;case 19:pl(t,e),gl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,fl(e,r)));break;case 30:break;case 21:break;default:pl(t,e),gl(e)}}function gl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Kc(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;Yc(e,qc(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(Rt(o,``),n.flags&=-33),Yc(e,qc(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;Jc(e,qc(e),s);break;default:throw Error(i(161))}}catch(t){Gu(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function _l(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;_l(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function vl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)rl(e,t.alternate,t),t=t.sibling}function yl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:zc(4,t,t.return),yl(t);break;case 1:Uc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Vc(t,t.return,n),yl(t);break;case 27:hf(t.stateNode);case 26:case 5:Uc(t,t.return),yl(t);break;case 22:t.memoizedState===null&&yl(t);break;case 30:yl(t);break;default:yl(t)}e=e.sibling}}function bl(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:bl(i,a,n),Rc(4,a);break;case 1:if(bl(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Gu(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++)Ha(c[i],s)}catch(e){Gu(r,r.return,e)}}n&&o&64&&Bc(a),Hc(a,a.return);break;case 27:Xc(a);case 26:case 5:bl(i,a,n),n&&r===null&&o&4&&Wc(a),Hc(a,a.return);break;case 12:bl(i,a,n);break;case 31:bl(i,a,n),n&&o&4&&ll(i,a);break;case 13:bl(i,a,n),n&&o&4&&ul(i,a);break;case 22:a.memoizedState===null&&bl(i,a,n),Hc(a,a.return);break;case 30:break;default:bl(i,a,n)}t=t.sibling}}function xl(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&&ta(n))}function Sl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ta(e))}function Cl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)wl(e,t,n,r),t=t.sibling}function wl(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Cl(e,t,n,r),i&2048&&Rc(9,t);break;case 1:Cl(e,t,n,r);break;case 3:Cl(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&&ta(e)));break;case 12:if(i&2048){Cl(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){Gu(t,t.return,e)}}else Cl(e,t,n,r);break;case 31:Cl(e,t,n,r);break;case 13:Cl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?Cl(e,t,n,r):(a._visibility|=2,Tl(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?Cl(e,t,n,r):El(e,t),i&2048&&xl(o,t);break;case 24:Cl(e,t,n,r),i&2048&&Sl(t.alternate,t);break;default:Cl(e,t,n,r)}}function Tl(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:Tl(a,o,s,c,i),Rc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Tl(a,o,s,c,i)):u._visibility&2?Tl(a,o,s,c,i):El(a,o),i&&l&2048&&xl(o.alternate,o);break;case 24:Tl(a,o,s,c,i),i&&l&2048&&Sl(o.alternate,o);break;default:Tl(a,o,s,c,i)}t=t.sibling}}function El(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:El(n,r),i&2048&&xl(r.alternate,r);break;case 24:El(n,r),i&2048&&Sl(r.alternate,r);break;default:El(n,r)}t=t.sibling}}var Dl=8192;function Ol(e,t,n){if(e.subtreeFlags&Dl)for(e=e.child;e!==null;)kl(e,t,n),e=e.sibling}function kl(e,t,n){switch(e.tag){case 26:Ol(e,t,n),e.flags&Dl&&e.memoizedState!==null&&qf(n,ml,e.memoizedState,e.memoizedProps);break;case 5:Ol(e,t,n);break;case 3:case 4:var r=ml;ml=vf(e.stateNode.containerInfo),Ol(e,t,n),ml=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Dl,Dl=16777216,Ol(e,t,n),Dl=r):Ol(e,t,n));break;default:Ol(e,t,n)}}function Al(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 jl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];tl=r,Pl(r,e)}Al(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Ml(e),e=e.sibling}function Ml(e){switch(e.tag){case 0:case 11:case 15:jl(e),e.flags&2048&&zc(9,e,e.return);break;case 3:jl(e);break;case 12:jl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Nl(e)):jl(e);break;default:jl(e)}}function Nl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];tl=r,Pl(r,e)}Al(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:zc(8,t,t.return),Nl(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Nl(t));break;default:Nl(t)}e=e.sibling}}function Pl(e,t){for(;tl!==null;){var n=tl;switch(n.tag){case 0:case 11:case 15:zc(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:ta(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,tl=r;else a:for(n=e;tl!==null;){r=tl;var i=r.sibling,a=r.return;if(il(r),r===n){tl=null;break a}if(i!==null){i.return=a,tl=i;break a}tl=a}}}var Fl={getCacheForType:function(e){var t=qi($i),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return qi($i).controller.signal}},Il=typeof WeakMap==`function`?WeakMap:Map,Ll=0,Rl=null,zl=null,Bl=0,Vl=0,Hl=null,Ul=!1,Wl=!1,Gl=!1,Kl=0,ql=0,Jl=0,Yl=0,Xl=0,Zl=0,Ql=0,$l=null,eu=null,tu=!1,nu=0,ru=0,iu=1/0,au=null,J=null,ou=0,su=null,cu=null,lu=0,uu=0,du=null,fu=null,pu=0,mu=null;function hu(){return Ll&2&&Bl!==0?Bl&-Bl:I.T===null?Xe():dd()}function gu(){if(Zl===0)if(!(Bl&536870912)||Di){var e=Ie;Ie<<=1,!(Ie&3932160)&&(Ie=262144),Zl=e}else Zl=536870912;return e=Ya.current,e!==null&&(e.flags|=32),Zl}function _u(e,t,n){(e===Rl&&(Vl===2||Vl===9)||e.cancelPendingCommit!==null)&&(wu(e,0),xu(e,Bl,Zl,!1)),Ue(e,n),(!(Ll&2)||e!==Rl)&&(e===Rl&&(!(Ll&2)&&(Yl|=n),ql===4&&xu(e,Bl,Zl,!1)),rd(e))}function vu(e,t,n){if(Ll&6)throw Error(i(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||Be(e,t),a=r?Mu(e,t):Au(e,t,!0),o=r;do{if(a===0){Wl&&!r&&xu(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!bu(n)){a=Au(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=$l;var l=c.current.memoizedState.isDehydrated;if(l&&(wu(c,s).flags|=256),s=Au(c,s,!1),s!==2){if(Gl&&!l){c.errorRecoveryDisabledLanes|=o,Yl|=o,a=4;break a}o=eu,eu=a,o!==null&&(eu===null?eu=o:eu.push.apply(eu,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){wu(e,0),xu(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:xu(r,t,Zl,!Ul);break a;case 2:eu=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=nu+300-ye(),10<a)){if(xu(r,t,Zl,!Ul),ze(r,0,!0)!==0)break a;lu=t,r.timeoutHandle=Jd(yu.bind(null,r,n,eu,au,tu,t,Zl,Yl,Ql,Ul,o,`Throttled`,-0,0),a);break a}yu(r,n,eu,au,tu,t,Zl,Yl,Ql,Ul,o,null,-0,0)}}break}while(1);rd(e)}function yu(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:Kt},kl(t,a,d);var m=(a&62914560)===a?nu-ye():(a&4194048)===a?ru-ye():0;if(m=Yf(d,m),m!==null){lu=a,e.cancelPendingCommit=m(zu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),xu(e,a,o,!l);return}}zu(e,t,a,n,r,i,o,s,c)}function bu(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(!mr(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 xu(e,t,n,r){t&=~Xl,t&=~Yl,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-je(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&Ge(e,n,t)}function Su(){return Ll&6?!0:(id(0,!1),!1)}function Cu(){if(zl!==null){if(Vl===0)var e=zl.return;else e=zl,zi=Ri=null,wo(e),wa=null,Ta=0,e=zl;for(;e!==null;)Lc(e.alternate,e),e=e.return;zl=null}}function wu(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,Yd(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),lu=0,Cu(),Rl=e,zl=n=ni(e.current,null),Bl=t,Vl=0,Hl=null,Ul=!1,Wl=Be(e,t),Gl=!1,Ql=Zl=Xl=Yl=Jl=ql=0,eu=$l=null,tu=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-je(r),a=1<<i;t|=e[i],r&=~a}return Kl=t,Kr(),n}function Tu(e,t){ao=null,I.H=Ps,t===ma||t===ga?(t=Sa(),Vl=3):t===ha?(t=Sa(),Vl=4):Vl=t===Qs?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Hl=t,zl===null&&(ql=1,Ks(e,ui(t,e.current)))}function Eu(){var e=Ya.current;return e===null?!0:(Bl&4194048)===Bl?Xa===null:(Bl&62914560)===Bl||Bl&536870912?e===Xa:!1}function Du(){var e=I.H;return I.H=Ps,e===null?Ps:e}function Ou(){var e=I.A;return I.A=Fl,e}function ku(){ql=4,Ul||(Bl&4194048)!==Bl&&Ya.current!==null||(Wl=!0),!(Jl&134217727)&&!(Yl&134217727)||Rl===null||xu(Rl,Bl,Zl,!1)}function Au(e,t,n){var r=Ll;Ll|=2;var i=Du(),a=Ou();(Rl!==e||Bl!==t)&&(au=null,wu(e,t)),t=!1;var o=ql;a:do try{if(Vl!==0&&zl!==null){var s=zl,c=Hl;switch(Vl){case 8:Cu(),o=6;break a;case 3:case 2:case 9:case 6:Ya.current===null&&(t=!0);var l=Vl;if(Vl=0,Hl=null,Iu(e,s,c,l),n&&Wl){o=0;break a}break;default:l=Vl,Vl=0,Hl=null,Iu(e,s,c,l)}}ju(),o=ql;break}catch(t){Tu(e,t)}while(1);return t&&e.shellSuspendCounter++,zi=Ri=null,Ll=r,I.H=i,I.A=a,zl===null&&(Rl=null,Bl=0,Kr()),o}function ju(){for(;zl!==null;)Pu(zl)}function Mu(e,t){var n=Ll;Ll|=2;var r=Du(),a=Ou();Rl!==e||Bl!==t?(au=null,iu=ye()+500,wu(e,t)):Wl=Be(e,t);a:do try{if(Vl!==0&&zl!==null){t=zl;var o=Hl;b:switch(Vl){case 1:Vl=0,Hl=null,Iu(e,t,o,1);break;case 2:case 9:if(va(o)){Vl=0,Hl=null,Fu(t);break}t=function(){Vl!==2&&Vl!==9||Rl!==e||(Vl=7),rd(e)},o.then(t,t);break a;case 3:Vl=7;break a;case 4:Vl=5;break a;case 7:va(o)?(Vl=0,Hl=null,Fu(t)):(Vl=0,Hl=null,Iu(e,t,o,7));break;case 5:var s=null;switch(zl.tag){case 26:s=zl.memoizedState;case 5:case 27:var c=zl;if(s?Kf(s):c.stateNode.complete){Vl=0,Hl=null;var l=c.sibling;if(l!==null)zl=l;else{var u=c.return;u===null?zl=null:(zl=u,Lu(u))}break b}}Vl=0,Hl=null,Iu(e,t,o,5);break;case 6:Vl=0,Hl=null,Iu(e,t,o,6);break;case 8:Cu(),ql=6;break a;default:throw Error(i(462))}}Nu();break}catch(t){Tu(e,t)}while(1);return zi=Ri=null,I.H=r,I.A=a,Ll=n,zl===null?(Rl=null,Bl=0,Kr(),ql):0}function Nu(){for(;zl!==null&&!_e();)Pu(zl)}function Pu(e){var t=Oc(e.alternate,e,Kl);e.memoizedProps=e.pendingProps,t===null?Lu(e):zl=t}function Fu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=fc(n,t,t.pendingProps,t.type,void 0,Bl);break;case 11:t=fc(n,t,t.pendingProps,t.type.render,t.ref,Bl);break;case 5:wo(t);default:Lc(n,t),t=zl=ri(t,Kl),t=Oc(n,t,Kl)}e.memoizedProps=e.pendingProps,t===null?Lu(e):zl=t}function Iu(e,t,n,r){zi=Ri=null,wo(t),wa=null,Ta=0;var i=t.return;try{if(Zs(e,i,t,n,Bl)){ql=1,Ks(e,ui(n,e.current)),zl=null;return}}catch(t){if(i!==null)throw zl=i,t;ql=1,Ks(e,ui(n,e.current)),zl=null;return}t.flags&32768?(Di||r===1?e=!0:Wl||Bl&536870912?e=!1:(Ul=e=!0,(r===2||r===9||r===3||r===6)&&(r=Ya.current,r!==null&&r.tag===13&&(r.flags|=16384))),Ru(t,e)):Lu(t)}function Lu(e){var t=e;do{if(t.flags&32768){Ru(t,Ul);return}e=t.return;var n=Fc(t.alternate,t,Kl);if(n!==null){zl=n;return}if(t=t.sibling,t!==null){zl=t;return}zl=t=e}while(t!==null);ql===0&&(ql=5)}function Ru(e,t){do{var n=Ic(e.alternate,e);if(n!==null){n.flags&=32767,zl=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){zl=e;return}zl=e=n}while(e!==null);ql=6,zl=null}function zu(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do Y();while(ou!==0);if(Ll&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=Gr,We(e,n,o,s,c,l),e===Rl&&(zl=Rl=null,Bl=0),cu=t,su=e,lu=n,uu=o,du=a,fu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,Zu(Ce,function(){return Wu(),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=Ll,Ll|=4;try{nl(e,t,n)}finally{Ll=s,L.p=a,I.T=r}}ou=1,Bu(),Vu(),Hu()}}function Bu(){if(ou===1){ou=0;var e=su,t=cu,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=Ll;Ll|=4;try{hl(t,e);var a=Vd,o=yr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&vr(s.ownerDocument.documentElement,s)){if(c!==null&&br(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 _=_r(s,h),v=_r(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}}lp=!!Bd,Vd=Bd=null}finally{Ll=i,L.p=r,I.T=n}}e.current=t,ou=2}}function Vu(){if(ou===2){ou=0;var e=su,t=cu,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=Ll;Ll|=4;try{rl(e,t.alternate,t)}finally{Ll=i,L.p=r,I.T=n}}ou=3}}function Hu(){if(ou===4||ou===3){ou=0,ve();var e=su,t=cu,n=lu,r=fu;t.subtreeFlags&10256||t.flags&10256?ou=5:(ou=0,cu=su=null,Uu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(J=null),Ye(n),t=t.stateNode,ke&&typeof ke.onCommitFiberRoot==`function`)try{ke.onCommitFiberRoot(Oe,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}}lu&3&&Y(),rd(e),i=e.pendingLanes,n&261930&&i&42?e===mu?pu++:(pu=0,mu=e):pu=0,id(0,!1)}}function Uu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ta(t)))}function Y(){return Bu(),Vu(),Hu(),Wu()}function Wu(){if(ou!==5)return!1;var e=su,t=uu;uu=0;var n=Ye(lu),r=I.T,a=L.p;try{L.p=32>n?32:n,I.T=null,n=du,du=null;var o=su,s=lu;if(ou=0,cu=su=null,lu=0,Ll&6)throw Error(i(331));var c=Ll;if(Ll|=4,Ml(o.current),wl(o,o.current,s,n),Ll=c,id(0,!1),ke&&typeof ke.onPostCommitFiberRoot==`function`)try{ke.onPostCommitFiberRoot(Oe,o)}catch{}return!0}finally{L.p=a,I.T=r,Uu(e,t)}}function X(e,t,n){t=ui(n,t),t=Js(e.stateNode,t,2),e=Ia(e,t,2),e!==null&&(Ue(e,2),rd(e))}function Gu(e,t,n){if(e.tag===3)X(e,e,n);else for(;t!==null;){if(t.tag===3){X(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(J===null||!J.has(r))){e=ui(n,e),n=Ys(2),r=Ia(t,n,2),r!==null&&(Xs(n,r,t,e),Ue(r,2),rd(r));break}}t=t.return}}function Ku(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Il;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)||(Gl=!0,i.add(n),e=qu.bind(null,e,t,n),t.then(e,e))}function qu(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Rl===e&&(Bl&n)===n&&(ql===4||ql===3&&(Bl&62914560)===Bl&&300>ye()-nu?!(Ll&2)&&wu(e,0):Xl|=n,Ql===Bl&&(Ql=0)),rd(e)}function Ju(e,t){t===0&&(t=Ve()),e=Yr(e,t),e!==null&&(Ue(e,t),rd(e))}function Yu(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Ju(e,n)}function Xu(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),Ju(e,n)}function Zu(e,t){return he(e,t)}var Qu=null,$u=null,ed=!1,td=!1,nd=!1,Z=0;function rd(e){e!==$u&&e.next===null&&($u===null?Qu=$u=e:$u=$u.next=e),td=!0,ed||(ed=!0,ud())}function id(e,t){if(!nd&&td){nd=!0;do for(var n=!1,r=Qu;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-je(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,ld(r,a))}else a=Bl,a=ze(r,r===Rl?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Be(r,a)||(n=!0,ld(r,a));r=r.next}while(n);nd=!1}}function ad(){od()}function od(){td=ed=!1;var e=0;Z!==0&&qd()&&(e=Z);for(var t=ye(),n=null,r=Qu;r!==null;){var i=r.next,a=sd(r,t);a===0?(r.next=null,n===null?Qu=i:n.next=i,i===null&&($u=n)):(n=r,(e!==0||a&3)&&(td=!0)),r=i}ou!==0&&ou!==5||id(e,!1),Z!==0&&(Z=0)}function sd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-je(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=G(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Rl,n=Bl,n=ze(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Vl===2||Vl===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&ge(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||Be(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&ge(r),Ye(n)){case 2:case 8:n=Se;break;case 32:n=Ce;break;case 268435456:n=Te;break;default:n=Ce}return r=cd.bind(null,e),n=he(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&ge(r),e.callbackPriority=2,e.callbackNode=null,2}function cd(e,t){if(ou!==0&&ou!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Y()&&e.callbackNode!==n)return null;var r=Bl;return r=ze(e,e===Rl?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(vu(e,r,t),sd(e,ye()),e.callbackNode!=null&&e.callbackNode===n?cd.bind(null,e):null)}function ld(e,t){if(Y())return null;vu(e,t,!0)}function ud(){Zd(function(){Ll&6?he(xe,ad):od()})}function dd(){if(Z===0){var e=ia;e===0&&(e=Fe,Fe<<=1,!(Fe&261888)&&(Fe=256)),Z=e}return Z}function fd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:Gt(``+e)}function pd(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 md(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=fd((i[et]||null).action),o=r.submitter;o&&(t=(t=o[et]||null)?fd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new pn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(Z!==0){var e=o?pd(i,o):new FormData(i);bs(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?pd(i,o):new FormData(i),bs(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var hd=0;hd<Br.length;hd++){var gd=Br[hd];Vr(gd.toLowerCase(),`on`+(gd[0].toUpperCase()+gd.slice(1)))}Vr(Mr,`onAnimationEnd`),Vr(Nr,`onAnimationIteration`),Vr(Pr,`onAnimationStart`),Vr(`dblclick`,`onDoubleClick`),Vr(`focusin`,`onFocus`),Vr(`focusout`,`onBlur`),Vr(Fr,`onTransitionRun`),Vr(Ir,`onTransitionStart`),Vr(Lr,`onTransitionCancel`),Vr(Rr,`onTransitionEnd`),gt(`onMouseEnter`,[`mouseout`,`mouseover`]),gt(`onMouseLeave`,[`mouseout`,`mouseover`]),gt(`onPointerEnter`,[`pointerout`,`pointerover`]),gt(`onPointerLeave`,[`pointerout`,`pointerover`]),ht(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),ht(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),ht(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),ht(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),ht(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),ht(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var _d=`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(` `),vd=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(_d));function yd(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){Hr(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){Hr(e)}i.currentTarget=null,a=c}}}}function bd(e,t){var n=t[nt];n===void 0&&(n=t[nt]=new Set);var r=e+`__bubble`;n.has(r)||(wd(t,e,2,!1),n.add(r))}function xd(e,t,n){var r=0;t&&(r|=4),wd(n,e,r,t)}var Sd=`_reactListening`+Math.random().toString(36).slice(2);function Cd(e){if(!e[Sd]){e[Sd]=!0,pt.forEach(function(t){t!==`selectionchange`&&(vd.has(t)||xd(t,!1,e),xd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Sd]||(t[Sd]=!0,xd(`selectionchange`,!1,t))}}function wd(e,t,n,r){switch(gp(t)){case 2:var i=up;break;case 8:i=dp;break;default:i=fp}n=i.bind(null,t,n,e),i=void 0,!nn||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 Td(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=ct(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}$t(function(){var r=a,i=Jt(n),s=[];a:{var c=zr.get(e);if(c!==void 0){var l=pn,u=e;switch(e){case`keypress`:if(cn(n)===0)break a;case`keydown`:case`keyup`:l=jn;break;case`focusin`:u=`focus`,l=Sn;break;case`focusout`:u=`blur`,l=Sn;break;case`beforeblur`:case`afterblur`:l=Sn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=bn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=xn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Nn;break;case Mr:case Nr:case Pr:l=Cn;break;case Rr:l=Pn;break;case`scroll`:case`scrollend`:l=hn;break;case`wheel`:l=Fn;break;case`copy`:case`cut`:case`paste`:l=wn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Mn;break;case`toggle`:case`beforetoggle`:l=In}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=en(m,p),g!=null&&d.push(Ed(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!==qt&&(u=n.relatedTarget||n.fromElement)&&(ct(u)||u[tt]))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?ct(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=bn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Mn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:ut(l),h=u==null?c:ut(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,ct(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=Od,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&&kd(s,c,l,d,!1),u!==null&&f!==null&&kd(s,f,u,d,!0)}}a:{if(c=r?ut(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=nr;else if(Xn(c))if(rr)v=fr;else{v=ur;var y=lr}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&Ht(r.elementType)&&(v=nr):v=dr;if(v&&=v(e,r)){Zn(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Pt(c,`number`,c.value)}switch(y=r?ut(r):window,e){case`focusin`:(Xn(y)||y.contentEditable===`true`)&&(Sr=y,Cr=r,wr=null);break;case`focusout`:wr=Cr=Sr=null;break;case`mousedown`:Tr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Tr=!1,Er(s,n,i);break;case`selectionchange`:if(xr)break;case`keydown`:case`keyup`:Er(s,n,i)}var b;if(Rn)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 Kn?Wn(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(Vn&&n.locale!==`ko`&&(Kn||x!==`onCompositionStart`?x===`onCompositionEnd`&&Kn&&(b=sn()):(an=i,on=`value`in an?an.value:an.textContent,Kn=!0)),y=Dd(r,x),0<y.length&&(x=new Tn(x,e,null,n,i),s.push({event:x,listeners:y}),b?x.data=b:(b=Gn(n),b!==null&&(x.data=b)))),(b=Bn?qn(e,n):Jn(e,n))&&(x=Dd(r,`onBeforeInput`),0<x.length&&(y=new Tn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:y,listeners:x}),y.data=b)),md(s,e,r,n,i)}yd(s,t)})}function Ed(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Dd(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=en(e,n),i!=null&&r.unshift(Ed(e,i,a)),i=en(e,t),i!=null&&r.push(Ed(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Od(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function kd(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=en(n,a),l!=null&&o.unshift(Ed(n,l,c))):i||(l=en(n,a),l!=null&&o.push(Ed(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Ad=/\r\n?/g,jd=/\u0000|\uFFFD/g;function Md(e){return(typeof e==`string`?e:``+e).replace(Ad,`
|
|
9
|
+
`).replace(jd,``)}function Nd(e,t){return t=Md(t),Md(e)===t}function Pd(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Rt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Rt(e,``+r);break;case`className`:St(e,`class`,r);break;case`tabIndex`:St(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:St(e,n,r);break;case`style`:Vt(e,r,o);break;case`data`:if(t!==`object`){St(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=Gt(``+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`&&Pd(e,t,`name`,a.name,a,null),Pd(e,t,`formEncType`,a.formEncType,a,null),Pd(e,t,`formMethod`,a.formMethod,a,null),Pd(e,t,`formTarget`,a.formTarget,a,null)):(Pd(e,t,`encType`,a.encType,a,null),Pd(e,t,`method`,a.method,a,null),Pd(e,t,`target`,a.target,a,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Gt(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=Kt);break;case`onScroll`:r!=null&&bd(`scroll`,e);break;case`onScrollEnd`:r!=null&&bd(`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=Gt(``+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`:bd(`beforetoggle`,e),bd(`toggle`,e),xt(e,`popover`,r);break;case`xlinkActuate`:Ct(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Ct(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Ct(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Ct(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Ct(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Ct(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Ct(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Ct(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Ct(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:xt(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=Ut.get(n)||n,xt(e,n,r))}}function Fd(e,t,n,r,a,o){switch(n){case`style`:Vt(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`?Rt(e,r):(typeof r==`number`||typeof r==`bigint`)&&Rt(e,``+r);break;case`onScroll`:r!=null&&bd(`scroll`,e);break;case`onScrollEnd`:r!=null&&bd(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=Kt);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!mt.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[et]||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,``):xt(e,n,r)}}}function Id(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:bd(`error`,e),bd(`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:Pd(e,t,o,s,n,null)}}a&&Pd(e,t,`srcSet`,n.srcSet,n,null),r&&Pd(e,t,`src`,n.src,n,null);return;case`input`:bd(`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:Pd(e,t,r,d,n,null)}}Nt(e,o,c,l,u,s,a,!1);return;case`select`:for(a in bd(`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:Pd(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Ft(e,!!r,n,!0):Ft(e,!!r,t,!1);return;case`textarea`:for(s in bd(`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:Pd(e,t,s,c,n,null)}Lt(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:Pd(e,t,l,r,n,null)}return;case`dialog`:bd(`beforetoggle`,e),bd(`toggle`,e),bd(`cancel`,e),bd(`close`,e);break;case`iframe`:case`object`:bd(`load`,e);break;case`video`:case`audio`:for(r=0;r<_d.length;r++)bd(_d[r],e);break;case`image`:bd(`error`,e),bd(`load`,e);break;case`details`:bd(`toggle`,e);break;case`embed`:case`source`:case`link`:bd(`error`,e),bd(`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:Pd(e,t,u,r,n,null)}return;default:if(Ht(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Fd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Pd(e,t,c,r,n,null))}function Ld(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)||Pd(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&&Pd(e,t,p,m,r,f)}}Mt(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)||Pd(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&&Pd(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Ft(e,!!n,n?[]:``,!1):Ft(e,!!n,t,!0)):Ft(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:Pd(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&&Pd(e,t,s,a,r,o)}It(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:Pd(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:Pd(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)&&Pd(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:Pd(e,t,u,p,r,m)}return;default:if(Ht(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Fd(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||Fd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Pd(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||Pd(e,t,f,p,r,m)}function Rd(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function zd(){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&&Rd(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&&Rd(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 Bd=null,Vd=null;function Hd(e){return e.nodeType===9?e:e.ownerDocument}function Ud(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 Wd(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 Gd(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 Kd=null;function qd(){var e=window.event;return e&&e.type===`popstate`?e===Kd?!1:(Kd=e,!0):(Kd=null,!1)}var Jd=typeof setTimeout==`function`?setTimeout:void 0,Yd=typeof clearTimeout==`function`?clearTimeout:void 0,Xd=typeof Promise==`function`?Promise:void 0,Zd=typeof queueMicrotask==`function`?queueMicrotask:Xd===void 0?Jd:function(e){return Xd.resolve(null).then(e).catch(Qd)};function Qd(e){setTimeout(function(){throw e})}function $d(e){return e===`head`}function ef(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),Fp(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)hf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,hf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[ot]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&hf(e.ownerDocument.body);n=i}while(n);Fp(t)}function tf(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 nf(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`:nf(n),st(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function rf(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[ot])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=uf(e.nextSibling),e===null)break}return null}function af(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=uf(e.nextSibling),e===null))return null;return e}function of(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=uf(e.nextSibling),e===null))return null;return e}function sf(e){return e.data===`$?`||e.data===`$~`}function cf(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function lf(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 uf(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 df=null;function ff(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return uf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function pf(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 mf(e,t,n){switch(t=Hd(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 hf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);st(e)}var gf=new Map,_f=new Set;function vf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var yf=L.d;L.d={f:bf,r:xf,D:wf,C:Tf,L:Ef,m:Df,X:kf,S:Of,M:Af};function bf(){var e=yf.f(),t=Su();return e||t}function xf(e){var t=lt(e);t!==null&&t.tag===5&&t.type===`form`?Ss(t):yf.r(e)}var Sf=typeof document>`u`?null:document;function Cf(e,t,n){var r=Sf;if(r&&typeof t==`string`&&t){var i=jt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),_f.has(i)||(_f.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Id(t,`link`,e),ft(t),r.head.appendChild(t)))}}function wf(e){yf.D(e),Cf(`dns-prefetch`,e,null)}function Tf(e,t){yf.C(e,t),Cf(`preconnect`,e,t)}function Ef(e,t,n){yf.L(e,t,n);var r=Sf;if(r&&e&&t){var i=`link[rel="preload"][as="`+jt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+jt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+jt(n.imageSizes)+`"]`)):i+=`[href="`+jt(e)+`"]`;var a=i;switch(t){case`style`:a=Mf(e);break;case`script`:a=If(e)}gf.has(a)||(e=f({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),gf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Nf(a))||t===`script`&&r.querySelector(Lf(a))||(t=r.createElement(`link`),Id(t,`link`,e),ft(t),r.head.appendChild(t)))}}function Df(e,t){yf.m(e,t);var n=Sf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+jt(r)+`"][href="`+jt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=If(e)}if(!gf.has(a)&&(e=f({rel:`modulepreload`,href:e},t),gf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Lf(a)))return}r=n.createElement(`link`),Id(r,`link`,e),ft(r),n.head.appendChild(r)}}}function Of(e,t,n){yf.S(e,t,n);var r=Sf;if(r&&e){var i=dt(r).hoistableStyles,a=Mf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Nf(a)))s.loading=5;else{e=f({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=gf.get(a))&&Bf(e,n);var c=o=r.createElement(`link`);ft(c),Id(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,zf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function kf(e,t){yf.X(e,t);var n=Sf;if(n&&e){var r=dt(n).hoistableScripts,i=If(e),a=r.get(i);a||(a=n.querySelector(Lf(i)),a||(e=f({src:e,async:!0},t),(t=gf.get(i))&&Vf(e,t),a=n.createElement(`script`),ft(a),Id(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Af(e,t){yf.M(e,t);var n=Sf;if(n&&e){var r=dt(n).hoistableScripts,i=If(e),a=r.get(i);a||(a=n.querySelector(Lf(i)),a||(e=f({src:e,async:!0,type:`module`},t),(t=gf.get(i))&&Vf(e,t),a=n.createElement(`script`),ft(a),Id(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function jf(e,t,n,r){var a=(a=te.current)?vf(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=Mf(n.href),n=dt(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=Mf(n.href);var o=dt(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(Nf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),gf.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},gf.set(e,n),o||Ff(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=If(n),n=dt(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 Mf(e){return`href="`+jt(e)+`"`}function Nf(e){return`link[rel="stylesheet"][`+e+`]`}function Pf(e){return f({},e,{"data-precedence":e.precedence,precedence:null})}function Ff(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}),Id(t,`link`,n),ft(t),e.head.appendChild(t))}function If(e){return`[src="`+jt(e)+`"]`}function Lf(e){return`script[async]`+e}function Rf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+jt(n.href)+`"]`);if(r)return t.instance=r,ft(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`),ft(r),Id(r,`style`,a),zf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Mf(n.href);var o=e.querySelector(Nf(a));if(o)return t.state.loading|=4,t.instance=o,ft(o),o;r=Pf(n),(a=gf.get(a))&&Bf(r,a),o=(e.ownerDocument||e).createElement(`link`),ft(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Id(o,`link`,r),t.state.loading|=4,zf(o,n.precedence,e),t.instance=o;case`script`:return o=If(n.src),(a=e.querySelector(Lf(o)))?(t.instance=a,ft(a),a):(r=n,(a=gf.get(o))&&(r=f({},n),Vf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),ft(a),Id(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,zf(r,n.precedence,e));return t.instance}function zf(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 Bf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Vf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Hf=null;function Uf(e,t,n){if(Hf===null){var r=new Map,i=Hf=new Map;i.set(n,r)}else i=Hf,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[ot]||a[$e]||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 Wf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Gf(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 Kf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function qf(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=Mf(r.href),a=t.querySelector(Nf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Xf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,ft(a);return}a=t.ownerDocument||t,r=Pf(r),(i=gf.get(i))&&Bf(r,i),a=a.createElement(`link`),ft(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Id(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=Xf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Jf=0;function Yf(e,t){return e.stylesheets&&e.count===0&&Qf(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&Qf(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&Jf===0&&(Jf=62500*zd());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Qf(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>Jf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Xf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Qf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Zf=null;function Qf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Zf=new Map,t.forEach($f,e),Zf=null,Xf.call(e))}function $f(e,t){if(!(t.state.loading&4)){var n=Zf.get(e);if(n)var r=n.get(null);else{n=new Map,Zf.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=Xf.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 ep={$$typeof:C,Provider:null,Consumer:null,_currentValue:R,_currentValue2:R,_threadCount:0};function tp(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=He(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=He(0),this.hiddenUpdates=He(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 np(e,t,n,r,i,a,o,s,c,l,u,d){return e=new tp(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=ei(3,null,null,t),e.current=a,a.stateNode=e,t=ea(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Na(a),e}function rp(e){return e?(e=Qr,e):Qr}function ip(e,t,n,r,i,a){i=rp(i),r.context===null?r.context=i:r.pendingContext=i,r=Fa(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Ia(e,r,t),n!==null&&(_u(n,e,t),La(n,e,t))}function ap(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function op(e,t){ap(e,t),(e=e.alternate)&&ap(e,t)}function sp(e){if(e.tag===13||e.tag===31){var t=Yr(e,67108864);t!==null&&_u(t,e,67108864),op(e,67108864)}}function cp(e){if(e.tag===13||e.tag===31){var t=hu();t=Je(t);var n=Yr(e,t);n!==null&&_u(n,e,t),op(e,t)}}var lp=!0;function up(e,t,n,r){var i=I.T;I.T=null;var a=L.p;try{L.p=2,fp(e,t,n,r)}finally{L.p=a,I.T=i}}function dp(e,t,n,r){var i=I.T;I.T=null;var a=L.p;try{L.p=8,fp(e,t,n,r)}finally{L.p=a,I.T=i}}function fp(e,t,n,r){if(lp){var i=pp(r);if(i===null)Td(e,t,r,mp,n),Tp(e,r);else if(Dp(i,e,t,n,r))r.stopPropagation();else if(Tp(e,r),t&4&&-1<wp.indexOf(e)){for(;i!==null;){var a=lt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Re(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-je(o);s.entanglements[1]|=c,o&=~c}rd(a),!(Ll&6)&&(iu=ye()+500,id(0,!1))}}break;case 31:case 13:s=Yr(a,2),s!==null&&_u(s,a,2),Su(),op(a,2)}if(a=pp(r),a===null&&Td(e,t,r,mp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Td(e,t,r,null,n)}}function pp(e){return e=Jt(e),hp(e)}var mp=null;function hp(e){if(mp=null,e=ct(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 mp=e,null}function gp(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(be()){case xe:return 2;case Se:return 8;case Ce:case we:return 32;case Te:return 268435456;default:return 32}default:return 32}}var _p=!1,vp=null,yp=null,bp=null,xp=new Map,Sp=new Map,Cp=[],wp=`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 Tp(e,t){switch(e){case`focusin`:case`focusout`:vp=null;break;case`dragenter`:case`dragleave`:yp=null;break;case`mouseover`:case`mouseout`:bp=null;break;case`pointerover`:case`pointerout`:xp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:Sp.delete(t.pointerId)}}function Ep(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=lt(t),t!==null&&sp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Dp(e,t,n,r,i){switch(t){case`focusin`:return vp=Ep(vp,e,t,n,r,i),!0;case`dragenter`:return yp=Ep(yp,e,t,n,r,i),!0;case`mouseover`:return bp=Ep(bp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return xp.set(a,Ep(xp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,Sp.set(a,Ep(Sp.get(a)||null,e,t,n,r,i)),!0}return!1}function Op(e){var t=ct(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,Ze(e.priority,function(){cp(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,Ze(e.priority,function(){cp(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 kp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=pp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);qt=r,n.target.dispatchEvent(r),qt=null}else return t=lt(n),t!==null&&sp(t),e.blockedOn=n,!1;t.shift()}return!0}function Ap(e,t,n){kp(e)&&n.delete(t)}function jp(){_p=!1,vp!==null&&kp(vp)&&(vp=null),yp!==null&&kp(yp)&&(yp=null),bp!==null&&kp(bp)&&(bp=null),xp.forEach(Ap),Sp.forEach(Ap)}function Mp(e,n){e.blockedOn===n&&(e.blockedOn=null,_p||(_p=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,jp)))}var Np=null;function Pp(e){Np!==e&&(Np=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Np===e&&(Np=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(hp(r||n)===null)continue;break}var a=lt(n);a!==null&&(e.splice(t,3),t-=3,bs(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Fp(e){function t(t){return Mp(t,e)}vp!==null&&Mp(vp,e),yp!==null&&Mp(yp,e),bp!==null&&Mp(bp,e),xp.forEach(t),Sp.forEach(t);for(var n=0;n<Cp.length;n++){var r=Cp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Cp.length&&(n=Cp[0],n.blockedOn===null);)Op(n),n.blockedOn===null&&Cp.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[et]||null;if(typeof a==`function`)o||Pp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[et]||null)s=o.formAction;else if(hp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Pp(n)}}}function Ip(){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 Lp(e){this._internalRoot=e}Rp.prototype.render=Lp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;ip(n,hu(),e,t,null,null)},Rp.prototype.unmount=Lp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;ip(e.current,2,null,e,null,null),Su(),t[tt]=null}};function Rp(e){this._internalRoot=e}Rp.prototype.unstable_scheduleHydration=function(e){if(e){var t=Xe();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Cp.length&&t!==0&&t<Cp[n].priority;n++);Cp.splice(n,0,e),n===0&&Op(e)}};var zp=n.version;if(zp!==`19.2.4`)throw Error(i(527,zp,`19.2.4`));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 Bp={bundleType:0,version:`19.2.4`,rendererPackageName:`react-dom`,currentDispatcherRef:I,reconcilerVersion:`19.2.4`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Vp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Vp.isDisabled&&Vp.supportsFiber)try{Oe=Vp.inject(Bp),ke=Vp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Us,s=Ws,c=Gs;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=np(e,1,!1,null,null,n,r,null,o,s,c,Ip),e[tt]=t.current,Cd(e),new Lp(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(!R(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(!R(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)=>U(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function R(e,t){return e===t?!0:typeof e==typeof t&&e&&t&&typeof e==`object`&&typeof t==`object`?Object.keys(t).every(n=>R(e[n],t[n])):!1}var z=Object.prototype.hasOwnProperty;function B(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=H(e)&&H(t);if(!r&&!(U(e)&&U(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:z.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=B(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function V(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 H(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function U(e){if(!ee(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!ee(n)||!n.hasOwnProperty(`isPrototypeOf`)||Object.getPrototypeOf(e)!==Object.prototype)}function ee(e){return Object.prototype.toString.call(e)===`[object Object]`}function W(e){return new Promise(t=>{T.setTimeout(t,e)})}function te(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:B(e,t)}function ne(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function re(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var ie=Symbol();function ae(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===ie?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function oe(e,t){return typeof e==`function`?e(...t):!!e}function se(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 ce=(()=>{let e=()=>D;return{isServer(){return e()},setIsServer(t){e=t}}})();function le(){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 ue=E;function de(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=ue,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 fe=de(),pe=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 me(e){return Math.min(1e3*2**e,3e4)}function he(e){return(e??`online`)===`online`?pe.isOnline():!0}var ge=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function _e(e){let t=!1,n=0,r,i=le(),a=()=>i.status!==`pending`,o=t=>{if(!a()){let n=new ge(t);f(n),e.onCancel?.(n)}},s=()=>{t=!0},c=()=>{t=!1},l=()=>C.isFocused()&&(e.networkMode===`always`||pe.isOnline())&&e.canRun(),u=()=>he(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??(ce.isServer()?0:3),o=e.retryDelay??me,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),W(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 ve=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??(ce.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e&&=(T.clearTimeout(this.#e),void 0)}},ye=class extends ve{#e;#t;#n;#r;#i;#a;#o;constructor(e){super(),this.#o=!1,this.#a=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#r=e.client,this.#n=this.#r.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=Se(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#i?.promise}setOptions(e){if(this.options={...this.#a,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=Se(this.options);e.data!==void 0&&(this.setState(xe(e.data,e.dataUpdatedAt)),this.#e=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#n.remove(this)}setData(e,t){let n=te(this.state.data,e,this.options);return this.#c({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#c({type:`setState`,state:e,setStateOptions:t})}cancel(e){let t=this.#i?.promise;return this.#i?.cancel(e),t?t.then(O).catch(O):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#e}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===ie||!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`):!1}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.#i?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#i?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.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.#i&&(this.#o||this.#s()?this.#i.cancel({revert:!0}):this.#i.cancelRetry()),this.scheduleGc()),this.#n.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}#s(){return this.state.fetchStatus===`paused`&&this.state.status===`pending`}invalidate(){this.state.isInvalidated||this.#c({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#i?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#i)return this.#i.continueRetry(),this.#i.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.#o=!0,n.signal)})},i=()=>{let e=ae(this.options,t),n=(()=>{let e={client:this.#r,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#o=!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.#r,state:this.state,fetchFn:i};return r(e),e})();this.options.behavior?.onFetch(a,this),this.#t=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#c({type:`fetch`,meta:a.fetchOptions?.meta}),this.#i=_e({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof ge&&e.revert&&this.setState({...this.#t,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#c({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#c({type:`pause`})},onContinue:()=>{this.#c({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await this.#i.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#n.config.onSuccess?.(e,this),this.#n.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof ge){if(e.silent)return this.#i.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#c({type:`error`,error:e}),this.#n.config.onError?.(e,this),this.#n.config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}#c(e){this.state=(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,...be(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...xe(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#t=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),fe.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#n.notify({query:this,type:`updated`,action:e})})}};function be(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:he(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function xe(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function Se(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 Ce=class extends S{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#o=le(),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),Te(this.#t,this.options)?this.#h():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Ee(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Ee(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&&!V(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&De(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 ke(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(ce.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,!(ce.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&&=(T.clearTimeout(this.#d),void 0)}#x(){this.#f&&=(T.clearInterval(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&&Te(e,t),o=i&&De(e,n,t,r);(a||o)&&(l={...l,...be(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=te(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=te(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:Oe(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=()=>{i(this.#o=x.promise=le())},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),!V(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){fe.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}};function we(e,t){return N(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status===`error`&&t.retryOnMount===!1)}function Te(e,t){return we(e,t)||e.state.data!==void 0&&Ee(e,t,t.refetchOnMount)}function Ee(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&&Oe(e,t)}return!1}function De(e,t,n,r){return(e!==t||N(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&Oe(e,n)}function Oe(e,t){return N(t.enabled,e)!==!1&&e.isStaleByTime(M(t.staleTime,e))}function ke(e,t){return!V(e.getCurrentResult(),t)}function Ae(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=>{se(e,()=>t.signal,()=>n=!0)},u=ae(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject();if(r==null&&e.pages.length)return Promise.resolve(e);let a=await u((()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})()),{maxPages:o}=t.options,s=i?re:ne;return{pages:s(e.pages,a,o),pageParams:s(e.pageParams,r,o)}};if(i&&a.length){let e=i===`backward`,t=e?Me:je,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:je(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 je(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 Me(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var Ne=class extends ve{#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||Pe(),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=_e({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){this.state=(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),fe.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function Pe(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var Fe=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 Ne({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=Ie(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=Ie(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=Ie(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=Ie(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){fe.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){fe.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return fe.batch(()=>Promise.all(e.map(e=>e.continue().catch(O))))}};function Ie(e){return e.options.scope?.id}var Le=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),V(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??Pe();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){fe.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)})})}},Re=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 ye({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(){fe.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){fe.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){fe.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){fe.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},ze=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new Re,this.#t=e.mutationCache||new Fe,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=pe.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 fe.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;fe.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return fe.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,...e},t)))}cancelQueries(e,t={}){let n={revert:!0,...t},r=fe.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(O).catch(O)}invalidateQueries(e,t={}){return fe.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=fe.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.behavior=Ae(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(O).catch(O)}ensureInfiniteQueryData(e){return e.behavior=Ae(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return pe.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=>{R(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=>{R(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===ie&&(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()}},Be=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})),G=s(((e,t)=>{t.exports=Be()}))(),Ve=b.createContext(void 0),He=e=>{let t=b.useContext(Ve);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},Ue=({client:e,children:t})=>(b.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,G.jsx)(Ve.Provider,{value:e,children:t})),We=b.createContext(!1),Ge=()=>b.useContext(We);We.Provider;function Ke(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var qe=b.createContext(Ke()),Je=()=>b.useContext(qe),Ye=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?oe(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},Xe=e=>{b.useEffect(()=>{e.clearReset()},[e])},Ze=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||oe(n,[e.error,r])),Qe=(e,t)=>t.state.data===void 0,$e=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))}},et=(e,t)=>e.isLoading&&e.isFetching&&!t,tt=(e,t)=>e?.suspense&&t.isPending,nt=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function rt(e,t,n){let r=Ge(),i=Je(),a=He(n),o=a.defaultQueryOptions(e);a.getDefaultOptions().queries?._experimental_beforeQuery?.(o);let s=a.getQueryCache().get(o.queryHash);o._optimisticResults=r?`isRestoring`:`optimistic`,$e(o),Ye(o,i,s),Xe(i);let c=!a.getQueryCache().get(o.queryHash),[l]=b.useState(()=>new t(a,o)),u=l.getOptimisticResult(o),d=!r&&e.subscribed!==!1;if(b.useSyncExternalStore(b.useCallback(e=>{let t=d?l.subscribe(fe.batchCalls(e)):O;return l.updateResult(),t},[l,d]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),b.useEffect(()=>{l.setOptions(o)},[o,l]),tt(o,u))throw nt(o,l,i);if(Ze({result:u,errorResetBoundary:i,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw u.error;return a.getDefaultOptions().queries?._experimental_afterQuery?.(o,u),o.experimental_prefetchInRender&&!ce.isServer()&&et(u,r)&&(c?nt(o,l,i):s?.promise)?.catch(O).finally(()=>{l.updateResult()}),o.notifyOnChangeProps?u:l.trackResult(u)}function it(e,t){return rt({...e,enabled:!0,suspense:!0,throwOnError:Qe,placeholderData:void 0},Ce,t)}function at(e,t){let n=He(t),[r]=b.useState(()=>new Le(n,e));b.useEffect(()=>{r.setOptions(e)},[r,e]);let i=b.useSyncExternalStore(b.useCallback(e=>r.subscribe(fe.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=b.useCallback((e,t)=>{r.mutate(e,t).catch(O)},[r]);if(i.error&&oe(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}var ot=ut();function st(e,...t){if(!ot)return;let n=lt(e,...t);performance.mark(n);try{console.log(e,...t)}catch{console.log(n)}}function ct(e,...t){ot&&console.warn(e,...t)}function lt(e,...t){return e.replace(/%[sfdO]/g,e=>{let n=t.shift();return e===`%O`&&n?JSON.stringify(n).replace(/"([^"]+)":/g,`$1:`):String(n)})}function ut(){if(typeof window>`u`)return({}.DEBUG||``).includes(`nuqs`);try{let e=`nuqs-localStorage-test`;if(typeof localStorage>`u`)return!1;localStorage.setItem(e,e);let t=localStorage.getItem(e)===e;return localStorage.removeItem(e),t&&(localStorage.getItem(`debug`)||``).includes(`nuqs`)}catch{return!1}}var dt={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.`,422:"Invalid options combination: `limitUrlUpdates: debounce` should be used in SSR scenarios, with `shallow: false`",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 ft(e){return`[nuqs] ${dt[e]}
|
|
10
|
+
See https://nuqs.dev/NUQS-${e}`}function pt(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}=${mt(r)}`)}return`?`+t.join(`&`)}function mt(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 ht=(0,b.createContext)({useAdapter(){throw Error(ft(404))}});ht.displayName=`NuqsAdapterContext`,ot&&typeof window<`u`&&(window.__NuqsAdapterContext&&window.__NuqsAdapterContext!==ht&&console.error(ft(303)),window.__NuqsAdapterContext=ht);function gt(e){return({children:t,defaultOptions:n,processUrlSearchParams:r,...i})=>(0,b.createElement)(ht.Provider,{...i,value:{useAdapter:e,defaultOptions:n,processUrlSearchParams:r}},t)}function _t(e){let t=(0,b.useContext)(ht);if(!(`useAdapter`in t))throw Error(ft(404));return t.useAdapter(e)}var vt=()=>(0,b.useContext)(ht).defaultOptions,yt=()=>(0,b.useContext)(ht).processUrlSearchParams;function bt(){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 xt(e){return{method:`throttle`,timeMs:e}}var St=xt(bt());function Ct(e){return e===null||Array.isArray(e)&&e.length===0}function wt(e,t,n){if(typeof e==`string`)n.set(t,e);else{n.delete(t);for(let r of e)n.append(t,r);n.has(t)||n.set(t,``)}return n}function Tt(){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 Et(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 Dt(){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 Ot(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 kt(){return new URLSearchParams(location.search)}var At=class{updateMap=new Map;options={history:`replace`,scroll:!1,shallow:!0};timeMs=St.timeMs;transitions=new Set;resolvers=null;controller=null;lastFlushedAt=0;resetQueueOnNextPush=!1;push({key:e,query:t,options:n},r=St.timeMs){this.resetQueueOnNextPush&&=(this.reset(),!1),st(`[nuqs gtq] Enqueueing %s=%s %O`,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=kt}){return this.resolvers?.promise??Promise.resolve(e())}flush({getSearchParamsSnapshot:e=kt,rateLimitFactor:t=1,...n},r){if(this.controller??=new AbortController,!Number.isFinite(this.timeMs))return st(`[nuqs gtq] Skipping flush due to throttleMs=Infinity`),Promise.resolve(e());if(this.resolvers)return this.resolvers.promise;this.resolvers=Dt();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 Et(()=>{let e=performance.now()-this.lastFlushedAt,n=this.timeMs,r=t*Math.max(0,n-e);st(`[nuqs gtq] Scheduling flush in %f ms. Throttled at %f ms (x%f)`,r,n,t),r===0?i():Et(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 st(`[nuqs gtq] Resetting queue %s`,JSON.stringify(Object.fromEntries(this.updateMap))),this.updateMap.clear(),this.transitions.clear(),this.options={history:`replace`,scroll:!1,shallow:!0},this.timeMs=St.timeMs,e}applyPendingUpdates(e,t){let{updateUrl:n,getSearchParamsSnapshot:r}=e,i=r();if(st(`[nuqs gtq] Applying %d pending update(s) on top of %s`,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(),st(`[nuqs gtq] Flushing queue %O with options %O`,a,o);for(let[e,t]of a)t===null?i.delete(e):i=wt(t,e,i);t&&(i=t(i));try{return Ot(s,()=>{n(i,o)}),[i,null]}catch(e){return console.error(ft(429),a.map(([e])=>e).join(),e),[i,e]}}},jt=new At;function Mt(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 Nt=class{callback;resolvers=Dt();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,Et(()=>{let t=this.resolvers;try{st(`[nuqs dq] Flushing debounce queue`,e);let n=this.callback(e);st(`[nuqs dq] Reset debounce queue %O`,this.queuedValue),this.queuedValue=void 0,this.resolvers=Dt(),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}},Pt=new class{throttleQueue;queues=new Map;queuedQuerySync=Tt();constructor(e=new At){this.throttleQueue=e}useQueuedQueries(e){return Mt(e,(e,t)=>this.queuedQuerySync.on(e,t),e=>this.getQueuedQuery(e))}push(e,t,n,r){if(!Number.isFinite(t)){let e=n.getSearchParamsSnapshot??kt;return Promise.resolve(e())}let i=e.key;if(!this.queues.has(i)){st("[nuqs dqc] Creating debounce queue for `%s`",i);let e=new Nt(e=>(this.throttleQueue.push(e),this.throttleQueue.flush(n,r).finally(()=>{this.queues.get(e.key)?.queuedValue===void 0&&(st("[nuqs dqc] Cleaning up empty queue for `%s`",e.key),this.queues.delete(e.key)),this.queuedQuerySync.emit(e.key)})));this.queues.set(i,e)}st(`[nuqs dqc] Enqueueing debounce update %O`,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?(st(`[nuqs dqc] Aborting debounce queue %s=%s`,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())st(`[nuqs dqc] Aborting debounce queue %s=%s`,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}}(jt);function Ft(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 It(e,t,n){return r=>{if(!(t.length===0||t.some(t=>!Ft(r.getAll(t),e.getAll(t)))))return st("[nuqs `%s`] no change, returning previous",t.join(`,`),r),r;let i=Lt(e,t,n);return st(`[nuqs \`%s\`] subbed search params change
|
|
11
|
+
from %O
|
|
12
|
+
to %O`,t.join(`,`),r,i),i}}function Lt(e,t,n){if(t.length===0)return e;let r=n?new URLSearchParams(e):e;for(let n of e.keys())t.includes(n)||r.delete(n);return r}var Rt=`__nuqs__`,zt=Tt();function Bt(e){return function(t,n){let r=new URL(location.href);r.search=pt(t),st(`[nuqs react] Updating url: %s`,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,Rt,r),zt.emit(`update`,t),n.scroll===!0&&window.scrollTo({top:0})}}var Vt=(0,b.createContext)({fullPageNavigationOnShallowFalseUpdates:!1});function Ht(e){let{fullPageNavigationOnShallowFalseUpdates:t}=(0,b.useContext)(Vt),[n,r]=(0,b.useState)(()=>typeof location>`u`?new URLSearchParams:Lt(new URLSearchParams(location.search),e,!1));return(0,b.useEffect)(()=>{let t=()=>{r(It(new URLSearchParams(location.search),e,!1))},n=t=>{r(It(t,e,!0))};return zt.on(`update`,n),window.addEventListener(`popstate`,t),()=>{zt.off(`update`,n),window.removeEventListener(`popstate`,t)}},[e.join(`&`)]),{searchParams:n,updateUrl:(0,b.useMemo)(()=>Bt(t),[t])}}var Ut=gt(Ht);function Wt({children:e,fullPageNavigationOnShallowFalseUpdates:t=!1,...n}){return(0,b.createElement)(Vt.Provider,{value:{fullPageNavigationOnShallowFalseUpdates:t}},(0,b.createElement)(Ut,{...n,children:e}))}var Gt=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),Kt=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),qt=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),Jt=e=>{let t=qt(e);return t.charAt(0).toUpperCase()+t.slice(1)},Yt={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`},Xt=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},Zt=(0,b.createContext)({}),Qt=()=>(0,b.useContext)(Zt),$t=(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=``}=Qt()??{},m=r??d?Number(n??u)*24/Number(t??l):n??u;return(0,b.createElement)(`svg`,{ref:c,...Yt,width:t??l??Yt.width,height:t??l??Yt.height,stroke:e??f,strokeWidth:m,className:Gt(`lucide`,p,i),...!a&&!Xt(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,b.createElement)(e,t)),...Array.isArray(a)?a:[a]])}),en=(e,t)=>{let n=(0,b.forwardRef)(({className:n,...r},i)=>(0,b.createElement)($t,{ref:i,iconNode:t,className:Gt(`lucide-${Kt(Jt(e))}`,`lucide-${e}`,n),...r}));return n.displayName=Jt(e),n},tn=en(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),nn=en(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),rn=en(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),an=en(`chevrons-up-down`,[[`path`,{d:`m7 15 5 5 5-5`,key:`1hf1tw`}],[`path`,{d:`m7 9 5-5 5 5`,key:`sgt6xg`}]]),on=en(`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`}]]),K=en(`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`}]]),sn=en(`info`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]),cn=en(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),ln=en(`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`}]]),un=en(`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`}]]),dn=en(`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`}]]),fn=en(`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`}]]),pn=en(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),mn=en(`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`}]]),hn=en(`trash`,[[`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`}]]),gn=en(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]);function _n(e,t){let n=getComputedStyle(e);return t*parseFloat(n.fontSize)}function vn(e,t){let n=getComputedStyle(e.ownerDocument.body);return t*parseFloat(n.fontSize)}function yn(e){return e/100*window.innerHeight}function bn(e){return e/100*window.innerWidth}function xn(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 Sn({groupSize:e,panelElement:t,styleProp:n}){let r,[i,a]=xn(n);switch(a){case`%`:r=i/100*e;break;case`px`:r=i;break;case`rem`:r=vn(t,i);break;case`em`:r=_n(t,i);break;case`vh`:r=yn(i);break;case`vw`:r=bn(i);break}return r}function Cn(e){return parseFloat(e.toFixed(3))}function wn({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 Tn(e){let{panels:t}=e,n=wn({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=Cn(Sn({groupSize:n,panelElement:t,styleProp:r.collapsedSize})/n*100));let a;r.defaultSize!==void 0&&(a=Cn(Sn({groupSize:n,panelElement:t,styleProp:r.defaultSize})/n*100));let o=0;r.minSize!==void 0&&(o=Cn(Sn({groupSize:n,panelElement:t,styleProp:r.minSize})/n*100));let s=100;return r.maxSize!==void 0&&(s=Cn(Sn({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 En(e,t=`Assertion error`){if(!e)throw Error(t)}function Dn(e,t){return Array.from(t).sort(e===`horizontal`?On:kn)}function On(e,t){let n=e.element.offsetLeft-t.element.offsetLeft;return n===0?e.element.offsetWidth-t.element.offsetWidth:n}function kn(e,t){let n=e.element.offsetTop-t.element.offsetTop;return n===0?e.element.offsetHeight-t.element.offsetHeight:n}function An(e){return typeof e==`object`&&!!e&&`nodeType`in e&&e.nodeType===Node.ELEMENT_NODE}function jn(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 Mn({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}=jn(r,n),s=e===`horizontal`?t:o;s<a&&(a=s,i=n)}return En(i,`No rect found`),i}var Nn;function Pn(){return Nn===void 0&&(Nn=typeof matchMedia==`function`?!!matchMedia(`(pointer:coarse)`).matches:!1),Nn}function Fn(e){let{element:t,orientation:n,panels:r,separators:i}=e,a=Dn(n,Array.from(t.children).filter(An).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,Mn({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=Pn()?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:wn({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 In=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)}}},Ln=new Map,Rn=new In;function zn(e){Ln=new Map(Ln),Ln.delete(e)}function Bn(e,t){for(let[t]of Ln)if(t.id===e)return t}function Vn(e,t){for(let[t,n]of Ln)if(t.id===e)return n;if(t)throw Error(`Could not find data for Group with id ${e}`)}function Hn(){return Ln}function Un(e,t){return Rn.addListener(`groupChange`,n=>{n.group.id===e&&t(n)})}function Wn(e,t){let n=Ln.get(e);Ln=new Map(Ln),Ln.set(e,t),Rn.emit(`groupChange`,{group:e,prev:n,next:t})}function Gn(e,t,n){let r,i={x:1/0,y:1/0};for(let a of t){let t=jn(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 Kn(e){return typeof e==`object`&&!!e&&`nodeType`in e&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE}function qn(e,t){if(e===t)throw Error(`Cannot compare node with itself`);let n={a:$n(e),b:$n(t)},r;for(;n.a.at(-1)===n.b.at(-1);)r=n.a.pop(),n.b.pop();En(r,`Stacking order can only be calculated for elements with a common ancestor`);let i={a:Qn(Zn(n.a)),b:Qn(Zn(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 Jn=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function Yn(e){let t=getComputedStyle(er(e)??e).display;return t===`flex`||t===`inline-flex`}function Xn(e){let t=getComputedStyle(e);return!!(t.position===`fixed`||t.zIndex!==`auto`&&(t.position!==`static`||Yn(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`||Jn.test(t.willChange)||t.webkitOverflowScrolling===`touch`)}function Zn(e){let t=e.length;for(;t--;){let n=e[t];if(En(n,`Missing node`),Xn(n))return n}return null}function Qn(e){return e&&Number(getComputedStyle(e).zIndex)||0}function $n(e){let t=[];for(;e;)t.push(e),e=er(e);return t}function er(e){let{parentNode:t}=e;return Kn(t)?t.host:t}function tr(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 nr({groupElement:e,hitRegion:t,pointerEventTarget:n}){if(!An(n)||n.contains(e)||e.contains(n))return!0;if(qn(n,e)>0){let r=n;for(;r;){if(r.contains(e))return!0;if(tr(r.getBoundingClientRect(),t))return!1;r=r.parentElement}}return!0}function rr(e,t){let n=[];return t.forEach((t,r)=>{if(r.disabled)return;let i=Fn(r),a=Gn(r.orientation,i,{x:e.clientX,y:e.clientY});a&&a.distance.x<=0&&a.distance.y<=0&&nr({groupElement:r.element,hitRegion:a.hitRegion.rect,pointerEventTarget:e.target})&&n.push(a.hitRegion)}),n}function ir(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 ar(e,t,n=0){return Math.abs(Cn(e)-Cn(t))<=n}function or(e,t){return ar(e,t)?0:e>t?1:-1}function sr({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(or(r,c)<0)if(a){let e=(i+c)/2;r=or(r,e)<0?i:c}else r=c;return r=Math.min(s,r),r=Cn(r),r}function cr({delta:e,initialLayout:t,panelConstraints:n,pivotIndices:r,prevLayout:i,trigger:a}){if(ar(e,0))return t;let o=a===`imperative-api`,s=Object.values(t),c=Object.values(i),l=[...s],[u,d]=r;En(u!=null,`Invalid first pivot index`),En(d!=null,`Invalid second pivot index`);let f=0;switch(a){case`keyboard`:{let t=e<0?d:u,r=n[t];En(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(En(n!=null,`Previous layout not found for panel index ${t}`),ar(n,i)){let t=o-n;or(t,Math.abs(e))>0&&(e=e<0?0-t:t)}}}{let t=e<0?u:d,r=n[t];En(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(En(n!=null,`Previous layout not found for panel index ${t}`),ar(n,o)){let t=n-i;or(t,Math.abs(e))>0&&(e=e<0?0-t:t)}}}break;default:{let t=e<0?d:u,r=n[t];En(r,`Panel constraints not found for index ${t}`);let i=s[t],{collapsible:a,collapsedSize:o,minSize:c}=r;if(a&&or(i,c)<0)if(e>0){let t=c-o,n=t/2;or(i+e,c)<0&&(e=or(e,n)<=0?0:t)}else{let t=c-o,n=100-t/2;or(i-e,c)<0&&(e=or(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];En(e!=null,`Previous layout not found for panel index ${r}`);let a=sr({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];En(i!=null,`Previous layout not found for panel index ${t}`);let a=i-r,c=sr({overrideDisabledPanels:o,panelConstraints:n[t],prevSize:i,size:a});if(!ar(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(ir(c,l))return i;{let t=e<0?d:u,r=s[t];En(r!=null,`Previous layout not found for panel index ${t}`);let i=r+f,a=sr({overrideDisabledPanels:o,panelConstraints:n[t],prevSize:r,size:i});if(l[t]=a,!ar(a,i)){let t=i-a,r=e<0?d:u;for(;r>=0&&r<n.length;){let i=l[r];En(i!=null,`Previous layout not found for panel index ${r}`);let a=i+t,s=sr({overrideDisabledPanels:o,panelConstraints:n[r],prevSize:i,size:a});if(ar(i,s)||(t-=s-i,l[r]=s),ar(t,0))break;e>0?r--:r++}}}if(!ar(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 lr(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(t[n]===void 0||or(e[n],t[n])!==0)return!1;return!0}function ur({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(!ar(i,100)&&r.length>0)for(let e=0;e<t.length;e++){let t=r[e];En(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];En(i!=null,`No layout data found for index ${e}`);let o=r[e];En(o!=null,`No layout data found for index ${e}`);let s=sr({overrideDisabledPanels:!0,panelConstraints:t[e],prevSize:i,size:o});o!=s&&(a+=o-s,r[e]=s)}if(!ar(a,0))for(let e=0;e<t.length;e++){let n=r[e];En(n!=null,`No layout data found for index ${e}`);let i=n+a,o=sr({overrideDisabledPanels:!0,panelConstraints:t[e],prevSize:n,size:i});if(n!==o&&(a-=o-n,r[e]=o,ar(a,0)))break}let o=Object.keys(e);return r.reduce((e,t,n)=>(e[o[n]]=t,e),{})}function dr({groupId:e,panelId:t}){let n=()=>{let t=Hn();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=e=>{let r=a();if(e===r)return;let{defaultLayoutDeferred:i,derivedPanelConstraints:o,group:s,groupSize:c,layout:l,separatorToPanels:u}=n(),d=s.panels.findIndex(e=>e.id===t),f=d===s.panels.length-1,p=ur({layout:cr({delta:f?r-e:e-r,initialLayout:l,panelConstraints:o,pivotIndices:f?[d-1,d]:[d,d+1],prevLayout:l,trigger:`imperative-api`}),panelConstraints:o});lr(l,p)||Wn(s,{defaultLayoutDeferred:i,derivedPanelConstraints:o,groupSize:c,layout:p,separatorToPanels:u})};return{collapse:()=>{let{collapsible:e,collapsedSize:t}=r(),{mutableValues:n}=i(),s=a();e&&s!==t&&(n.expandToSize=s,o(t))},expand:()=>{let{collapsible:e,collapsedSize:t,minSize:n}=r(),{mutableValues:s}=i(),c=a();if(e&&c===t){let e=s.expandToSize??n;e===0&&(e=1),o(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&&ar(t,n)},resize:e=>{let{group:t}=n(),{element:r}=i(),a=wn({group:t});o(Cn(Sn({groupSize:a,panelElement:r,styleProp:e})/a*100))}}}function fr(e){e.defaultPrevented||rr(e,Hn()).forEach(t=>{if(t.separator){let n=t.panels.find(e=>e.panelConstraints.defaultSize!==void 0);if(n){let r=n.panelConstraints.defaultSize,i=dr({groupId:t.group.id,panelId:n.id});i&&r!==void 0&&(i.resize(r),e.preventDefault())}}})}function pr(e){let t=Hn();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 mr({groupId:e}){let t=()=>{let t=Hn();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=ur({layout:e,panelConstraints:r});return n?o:(lr(o,c)||Wn(i,{defaultLayoutDeferred:n,derivedPanelConstraints:r,groupSize:a,layout:c,separatorToPanels:s}),c)}}}function hr(e,t){let n=pr(e),r=Vn(n.id,!0),i=n.separators.find(t=>t.element===e);En(i,`Matching separator not found`);let a=r.separatorToPanels.get(i);En(a,`Matching panels not found`);let o=a.map(e=>n.panels.indexOf(e)),s=mr({groupId:n.id}).getLayout(),c=ur({layout:cr({delta:t,initialLayout:s,panelConstraints:r.derivedPanelConstraints,pivotIndices:o,prevLayout:s,trigger:`keyboard`}),panelConstraints:r.derivedPanelConstraints});lr(s,c)||Wn(n,{defaultLayoutDeferred:r.defaultLayoutDeferred,derivedPanelConstraints:r.derivedPanelConstraints,groupSize:r.groupSize,layout:c,separatorToPanels:r.separatorToPanels})}function gr(e){if(e.defaultPrevented)return;let t=e.currentTarget,n=pr(t);if(!n.disabled)switch(e.key){case`ArrowDown`:e.preventDefault(),n.orientation===`vertical`&&hr(t,5);break;case`ArrowLeft`:e.preventDefault(),n.orientation===`horizontal`&&hr(t,-5);break;case`ArrowRight`:e.preventDefault(),n.orientation===`horizontal`&&hr(t,5);break;case`ArrowUp`:e.preventDefault(),n.orientation===`vertical`&&hr(t,-5);break;case`End`:e.preventDefault(),hr(t,100);break;case`Enter`:{e.preventDefault();let n=pr(t),{derivedPanelConstraints:r,layout:i,separatorToPanels:a}=Vn(n.id,!0),o=n.separators.find(e=>e.element===t);En(o,`Matching separator not found`);let s=a.get(o);En(s,`Matching panels not found`);let c=s[0],l=r.find(e=>e.panelId===c.id);if(En(l,`Panel metadata not found`),l.collapsible){let e=i[c.id];hr(t,(l.collapsedSize===e?n.mutableState.expandedPanelSizes[c.id]??l.minSize:l.collapsedSize)-e)}break}case`F6`:{e.preventDefault();let n=pr(t).separators.map(e=>e.element),r=Array.from(n).findIndex(t=>t===e.currentTarget);En(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(),hr(t,-100);break}}var _r={cursorFlags:0,state:`inactive`},vr=new In;function yr(){return _r}function br(e){return vr.addListener(`change`,e)}function xr(e){let t=_r,n={..._r};n.cursorFlags=e,_r=n,vr.emit(`change`,{prev:t,next:n})}function Sr(e){let t=_r;_r=e,vr.emit(`change`,{prev:t,next:e})}function Cr(e){if(e.defaultPrevented||e.pointerType===`mouse`&&e.button>0)return;let t=Hn(),n=rr(e,t),r=new Map,i=!1;n.forEach(e=>{e.separator&&(i||(i=!0,e.separator.element.focus({preventScroll:!0})));let n=t.get(e.group);n&&r.set(e.group,n.layout)}),Sr({cursorFlags:0,hitRegions:n,initialLayoutMap:r,pointerDownAtPoint:{x:e.clientX,y:e.clientY},state:`active`}),n.length&&e.preventDefault()}var wr=e=>e,Tr=()=>{},Er=1,Dr=2,Or=4,kr=8,Ar=3,jr=12,Mr;function Nr(){return Mr===void 0&&(Mr=!1,typeof window<`u`&&(window.navigator.userAgent.includes(`Chrome`)||window.navigator.userAgent.includes(`Firefox`))&&(Mr=!0)),Mr}function Pr({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&&Nr()){let t=(e&Er)!==0,n=(e&Dr)!==0,r=(e&Or)!==0,i=(e&kr)!==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 Nr()?r>0&&i>0?`move`:r>0?`ew-resize`:`ns-resize`:r>0&&i>0?`grab`:r>0?`col-resize`:`row-resize`}}var Fr=new WeakMap;function Ir(e){if(e.defaultView===null||e.defaultView===void 0)return;let{prevStyle:t,styleSheet:n}=Fr.get(e)??{};n===void 0&&(n=new e.defaultView.CSSStyleSheet,e.adoptedStyleSheets&&e.adoptedStyleSheets.push(n));let r=yr();switch(r.state){case`active`:case`hover`:{let e=Pr({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}Fr.set(e,{prevStyle:t,styleSheet:n})}function Lr({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=cr({delta:d,initialLayout:f,panelConstraints:h,pivotIndices:e.panels.map(e=>l.indexOf(e)),prevLayout:_,trigger:`mouse-or-touch`});if(lr(t,_)){if(d!==0&&!u)switch(c){case`horizontal`:s|=d<0?Er:Dr;break;case`vertical`:s|=d<0?Or:kr;break}}else Wn(e.group,{defaultLayoutDeferred:m,derivedPanelConstraints:h,groupSize:g,layout:t,separatorToPanels:v})}});let c=0;t.movementX===0?c|=o&Ar:c|=s&Ar,t.movementY===0?c|=o&jr:c|=s&jr,xr(c),Ir(e)}function Rr(e){let t=Hn(),n=yr();switch(n.state){case`active`:Lr({document:e.currentTarget,event:e,hitRegions:n.hitRegions,initialLayoutMap:n.initialLayoutMap,mountedGroups:t,prevCursorFlags:n.cursorFlags})}}function zr(e){if(e.defaultPrevented)return;let t=yr(),n=Hn();switch(t.state){case`active`:if(e.buttons===0){Sr({cursorFlags:0,state:`inactive`}),t.hitRegions.forEach(e=>{let t=Vn(e.group.id,!0);Wn(e.group,t)});return}for(let n of t.hitRegions)if(n.separator){let{element:t}=n.separator;t.hasPointerCapture?.(e.pointerId)||t.setPointerCapture?.(e.pointerId)}Lr({document:e.currentTarget,event:e,hitRegions:t.hitRegions,initialLayoutMap:t.initialLayoutMap,mountedGroups:n,pointerDownAtPoint:t.pointerDownAtPoint,prevCursorFlags:t.cursorFlags});break;default:{let r=rr(e,n);r.length===0?t.state!==`inactive`&&Sr({cursorFlags:0,state:`inactive`}):Sr({cursorFlags:0,hitRegions:r,state:`hover`}),Ir(e.currentTarget);break}}}function Br(e){if(e.relatedTarget instanceof HTMLIFrameElement)switch(yr().state){case`hover`:Sr({cursorFlags:0,state:`inactive`})}}function Vr(e){if(e.defaultPrevented||e.pointerType===`mouse`&&e.button>0)return;let t=yr();switch(t.state){case`active`:Sr({cursorFlags:0,state:`inactive`}),t.hitRegions.length>0&&(Ir(e.currentTarget),t.hitRegions.forEach(e=>{let t=Vn(e.group.id,!0);Wn(e.group,t)}),e.preventDefault())}}function Hr(e){let t=0,n=0,r={};for(let i of e)if(i.defaultSize!==void 0){t++;let e=Cn(i.defaultSize);n+=e,r[i.panelId]=e}else r[i.panelId]=void 0;let i=e.length-t;if(i!==0){let t=Cn((100-n)/i);for(let n of e)n.defaultSize===void 0&&(r[n.panelId]=t)}return r}function Ur(e,t,n){if(!n[0])return;let r=e.panels.find(e=>e.element===t);if(!r||!r.onResize)return;let i=wn({group:e}),a=e.orientation===`horizontal`?r.element.offsetWidth:r.element.offsetHeight,o=r.mutableValues.prevSize,s={asPercentage:Cn(a/i*100),inPixels:a};r.mutableValues.prevSize=s,r.onResize(s,r.id,o)}function Wr(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 Gr({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=Cn(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]=Cn((r[e]??0)/a*l);else{let e=Cn(l/c.length);for(let t of c)u[t]=e}return u}function Kr(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 qr=new Map;function Jr(e){let t=!0;En(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=wn({group:e});if(t===0)return;let n=Vn(e.id);if(!n)return;let r=Tn(e),i=n.defaultLayoutDeferred?Hr(r):n.layout,a=ur({layout:Gr({group:e,nextGroupSize:t,prevGroupSize:n.groupSize,prevLayout:i}),panelConstraints:r});if(!n.defaultLayoutDeferred&&lr(n.layout,a)&&Wr(n.derivedPanelConstraints,r)&&n.groupSize===t)return;Wn(e,{defaultLayoutDeferred:!1,derivedPanelConstraints:r,groupSize:t,layout:a,separatorToPanels:n.separatorToPanels})}}else Ur(e,i,n)}});a.observe(e.element),e.panels.forEach(e=>{En(!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=wn({group:e}),s=Tn(e),c=e.panels.map(({id:e})=>e).join(`,`),l=e.mutableState.defaultLayout;l&&(Kr(e.panels,l)||(l=void 0));let u=ur({layout:e.mutableState.layouts[c]??l??Hr(s),panelConstraints:s}),d=e.element.ownerDocument;qr.set(d,(qr.get(d)??0)+1);let f=new Map;return Fn(e).forEach(e=>{e.separator&&f.set(e.separator,e.panels)}),Wn(e,{defaultLayoutDeferred:o===0,derivedPanelConstraints:s,groupSize:o,layout:u,separatorToPanels:f}),e.separators.forEach(e=>{En(!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`,gr)}),qr.get(d)===1&&(d.addEventListener(`dblclick`,fr,!0),d.addEventListener(`pointerdown`,Cr,!0),d.addEventListener(`pointerleave`,Rr),d.addEventListener(`pointermove`,zr),d.addEventListener(`pointerout`,Br),d.addEventListener(`pointerup`,Vr,!0)),function(){t=!1,qr.set(d,Math.max(0,(qr.get(d)??0)-1)),zn(e),e.separators.forEach(e=>{e.element.removeEventListener(`keydown`,gr)}),qr.get(d)||(d.removeEventListener(`dblclick`,fr,!0),d.removeEventListener(`pointerdown`,Cr,!0),d.removeEventListener(`pointerleave`,Rr),d.removeEventListener(`pointermove`,zr),d.removeEventListener(`pointerout`,Br),d.removeEventListener(`pointerup`,Vr,!0)),a.disconnect()}}function Yr(){let[e,t]=(0,b.useState)({});return[e,(0,b.useCallback)(()=>t({}),[])]}function Xr(e){let t=(0,b.useId)();return`${e??t}`}var Zr=typeof window<`u`?b.useLayoutEffect:b.useEffect;function Qr(e){let t=(0,b.useRef)(e);return Zr(()=>{t.current=e},[e]),(0,b.useCallback)((...e)=>t.current?.(...e),[t])}function $r(...e){return Qr(t=>{e.forEach(e=>{if(e)switch(typeof e){case`function`:e(t);break;case`object`:e.current=t;break}})})}function ei(e){let t=(0,b.useRef)({...e});return Zr(()=>{for(let n in e)t.current[n]=e[n]},[e]),t.current}var ti=(0,b.createContext)(null);function ni(e,t){let n=(0,b.useRef)({getLayout:()=>({}),setLayout:wr});(0,b.useImperativeHandle)(t,()=>n.current,[]),Zr(()=>{Object.assign(n.current,mr({groupId:e}))})}function ri({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=Qr(e=>{lr(m.current.onLayoutChange,e)||(m.current.onLayoutChange=e,c?.(e))}),g=Qr(e=>{lr(m.current.onLayoutChanged,e)||(m.current.onLayoutChanged=e,l?.(e))}),_=Xr(s),v=(0,b.useRef)(null),[y,x]=Yr(),S=(0,b.useRef)({lastExpandedPanelSizes:{},layouts:{},panels:[],resizeTargetMinimumSize:d,separators:[]}),C=$r(v,a);ni(_,o);let w=Qr((e,t)=>{let r=yr(),i=Bn(e),a=Vn(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=ei({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=Dn(u,[...t.panels,e]),x(),()=>{t.panels=t.panels.filter(t=>t!==e),x()}},registerSeparator:e=>{let t=S.current;return t.separators=Dn(u,[...t.separators,e]),x(),()=>{t.separators=t.separators.filter(t=>t!==e),x()}},togglePanelDisabled:(e,t)=>{let n=S.current.panels.find(t=>t.id===e);n&&(n.panelConstraints.disabled=t);let r=Bn(_),i=Vn(_);r&&i&&Wn(r,{...i,derivedPanelConstraints:Tn(r)})},toggleSeparatorDisabled:(e,t)=>{let n=S.current.separators.find(t=>t.id===e);n&&(n.disabled=t)}}),[w,_,x,u,T]),D=(0,b.useRef)(null);return Zr(()=>{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=Jr(r),{defaultLayoutDeferred:o,derivedPanelConstraints:s,layout:c}=Vn(r.id,!0);!o&&s.length>0&&(h(c),g(c));let l=Un(_,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=ar(t.collapsedSize,i[t.panelId]),a=ar(t.collapsedSize,n[t.panelId]);e&&!a&&(r.mutableState.expandedPanelSizes[t.panelId]=n[t.panelId])}}});let o=yr().state!==`active`;h(i),o&&g(i)});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,G.jsx)(ti.Provider,{value:E,children:(0,G.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})})}ri.displayName=`Group`;function ii(e,t){return`react-resizable-panels:${[e,...t].join(`:`)}`}function ai({id:e,panelIds:t,storage:n}){let r=ii(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 oi({debounceSaveMs:e=100,panelIds:t,storage:n=localStorage,...r}){let i=t!==void 0,a=`id`in r?r.id:r.groupId,o=ii(a,t??[]),s=(0,b.useSyncExternalStore)(si,()=>n.getItem(o),()=>n.getItem(o)),c=(0,b.useMemo)(()=>{if(s){let e=JSON.parse(s),t=Object.values(e);if(Array.from(t).every(e=>typeof e==`number`))return e}},[s]),l=(0,b.useMemo)(()=>{if(!c)return ai({id:a,panelIds:t,storage:n})},[c,a,t,n]),u=c??l,d=(0,b.useRef)(null),f=(0,b.useCallback)(()=>{let e=d.current;e&&(d.current=null,clearTimeout(e))},[]);(0,b.useLayoutEffect)(()=>()=>{f()},[f]);let p=(0,b.useCallback)(e=>{f();let t;t=i?ii(a,Object.keys(e)):ii(a,[]);try{n.setItem(t,JSON.stringify(e))}catch(e){console.error(e)}},[f,i,a,n]);return{defaultLayout:u,onLayoutChange:(0,b.useCallback)(t=>{f(),e===0?p(t):d.current=setTimeout(()=>{p(t)},e)},[f,e,p]),onLayoutChanged:p}}function si(){return function(){}}function ci(){let e=(0,b.useContext)(ti);return En(e,`Group Context not found; did you render a Panel or Separator outside of a Group?`),e}function li(e,t){let{id:n}=ci(),r=(0,b.useRef)({collapse:Tr,expand:Tr,getSize:()=>({asPercentage:0,inPixels:0}),isCollapsed:()=>!1,resize:Tr});(0,b.useImperativeHandle)(t,()=>r.current,[]),Zr(()=>{Object.assign(r.current,dr({groupId:n,panelId:e}))})}function ui({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=Xr(c),_=ei({disabled:a}),v=(0,b.useRef)(null),y=$r(v,o),{getPanelStyles:x,id:S,orientation:C,registerPanel:w,togglePanelDisabled:T}=ci(),E=d!==null,D=Qr((e,t,n)=>{d?.(e,c,n)});Zr(()=>{let e=v.current;if(e!==null)return w({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}})},[s,n,r,i,E,g,h,l,u,D,w,_]),(0,b.useEffect)(()=>{T(g,!!a)},[a,g,T]),li(g,f);let O=()=>{let e=x(S,g);if(e)return JSON.stringify(e)},k=(0,b.useSyncExternalStore)(e=>Un(S,e),O,O),A;return A=k?JSON.parse(k):i?{flexGrow:void 0,flexShrink:void 0,flexBasis:i}:{flexGrow:1},(0,G.jsx)(`div`,{...m,"data-disabled":a||void 0,"data-panel":!0,"data-testid":g,id:g,ref:y,style:{...di,display:`flex`,flexBasis:0,flexShrink:1,overflow:`visible`,...A},children:(0,G.jsx)(`div`,{className:t,style:{maxHeight:`100%`,maxWidth:`100%`,flexGrow:1,overflow:`auto`,...p,touchAction:C===`horizontal`?`pan-y`:`pan-x`},children:e})})}ui.displayName=`Panel`;var di={minHeight:0,maxHeight:`100%`,height:`auto`,minWidth:0,maxWidth:`100%`,width:`auto`,border:`none`,borderWidth:0,padding:0,margin:0};function fi({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=ur({layout:cr({delta:l-o,initialLayout:e,panelConstraints:t,pivotIndices:u,prevLayout:e}),panelConstraints:t})[n],i=ur({layout:cr({delta:c-o,initialLayout:e,panelConstraints:t,pivotIndices:u,prevLayout:e}),panelConstraints:t})[n]}return{valueControls:n,valueMax:i,valueMin:a,valueNow:o}}function pi({children:e,className:t,disabled:n,elementRef:r,id:i,style:a,...o}){let s=Xr(i),c=ei({disabled:n}),[l,u]=(0,b.useState)({}),[d,f]=(0,b.useState)(`inactive`),p=(0,b.useRef)(null),m=$r(p,r),{disableCursor:h,id:g,orientation:_,registerSeparator:v,toggleSeparatorDisabled:y}=ci(),x=_===`horizontal`?`vertical`:`horizontal`;Zr(()=>{let e=p.current;if(e!==null){let t={disabled:c.disabled,element:e,id:s},n=v(t),r=br(e=>{f(e.next.state!==`inactive`&&e.next.hitRegions.some(e=>e.separator===t)?e.next.state:`inactive`)}),i=Un(g,e=>{let{derivedPanelConstraints:n,layout:r,separatorToPanels:i}=e.next,a=i.get(t);if(a){let e=a[0],t=a.indexOf(e);u(fi({layout:r,panelConstraints:n,panelId:e.id,panelIndex:t}))}});return()=>{r(),i(),n()}}},[g,s,v,c]),(0,b.useEffect)(()=>{y(s,!!n)},[n,s,y]);let S;return n&&!h&&(S=`not-allowed`),(0,G.jsx)(`div`,{...o,"aria-controls":l.valueControls,"aria-disabled":n||void 0,"aria-orientation":x,"aria-valuemax":l.valueMax,"aria-valuemin":l.valueMin,"aria-valuenow":l.valueNow,children:e,className:t,"data-separator":n?`disabled`:d,"data-testid":s,id:s,ref:m,role:`separator`,style:{flexBasis:`auto`,cursor:S,...a,flexGrow:0,flexShrink:0,touchAction:`none`},tabIndex:n?void 0:0})}pi.displayName=`Separator`;var mi=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},hi=(e=>e?mi(e):mi),gi=e=>e;function _i(e,t=gi){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 vi=e=>{let t=hi(e),n=e=>_i(t,e);return Object.assign(n,t),n},yi=(e=>e?vi(e):vi),bi=yi()(e=>({status:`idle`,requiresAuth:!1,error:null,setStatus:t=>e({status:t}),setRequiresAuth:t=>e({requiresAuth:t}),setError:t=>e({error:t}),reset:()=>e({status:`idle`,requiresAuth:!1,error:null})})),xi=globalThis.crypto;async function Si(e){return(await xi).getRandomValues(new Uint8Array(e))}async function Ci(e){let t=``;for(;t.length<e;){let n=await Si(e-t.length);for(let e of n)e<198&&(t+=`abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~`[e%66])}return t}async function wi(e){return await Ci(e)}async function Ti(e){let t=await(await xi).subtle.digest(`SHA-256`,new TextEncoder().encode(e));return btoa(String.fromCharCode(...new Uint8Array(t))).replace(/\//g,`_`).replace(/\+/g,`-`).replace(/=/g,``)}async function Ei(e){if(e||=43,e<43||e>128)throw`Expected a length between 43 and 128. Received ${e}.`;let t=await wi(e);return{code_verifier:t,code_challenge:await Ti(t)}}var Di=Object.freeze({status:`aborted`});function q(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 Oi=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},ki=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}},Ai={};function ji(e){return e&&Object.assign(Ai,e),Ai}function Mi(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 Ni(e,t){return typeof t==`bigint`?t.toString():t}function Pi(e){return{get value(){{let t=e();return Object.defineProperty(this,`value`,{value:t}),t}throw Error(`cached value already set`)}}}function Fi(e){return e==null}function Ii(e){let t=e.startsWith(`^`)?1:0,n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function Li(e,t){let n=(e.toString().split(`.`)[1]||``).length,r=t.toString(),i=(r.split(`.`)[1]||``).length;if(i===0&&/\d?e-\d?/.test(r)){let e=r.match(/\d?e-(\d?)/);e?.[1]&&(i=Number.parseInt(e[1]))}let a=n>i?n:i;return Number.parseInt(e.toFixed(a).replace(`.`,``))%Number.parseInt(t.toFixed(a).replace(`.`,``))/10**a}var Ri=Symbol(`evaluating`);function zi(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==Ri)return r===void 0&&(r=Ri,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function Bi(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Vi(...e){let t={};for(let n of e)Object.assign(t,Object.getOwnPropertyDescriptors(n));return Object.defineProperties({},t)}function Hi(e){return JSON.stringify(e)}function Ui(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var Wi=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function Gi(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var Ki=Pi(()=>{if(typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function qi(e){if(Gi(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return!(Gi(n)===!1||Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)===!1)}function Ji(e){return qi(e)?{...e}:Array.isArray(e)?[...e]:e}var Yi=new Set([`string`,`number`,`symbol`]);function Xi(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function Zi(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function Qi(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 $i(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}var ea={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function ta(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 Zi(e,Vi(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 Bi(this,`shape`,e),e},checks:[]}))}function na(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 Zi(e,Vi(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 Bi(this,`shape`,r),r},checks:[]}))}function ra(e,t){if(!qi(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 Zi(e,Vi(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return Bi(this,`shape`,n),n}}))}function ia(e,t){if(!qi(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return Zi(e,Vi(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return Bi(this,`shape`,n),n}}))}function aa(e,t){return Zi(e,Vi(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return Bi(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:[]}))}function oa(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 Zi(t,Vi(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 Bi(this,`shape`,i),i},checks:[]}))}function sa(e,t,n){return Zi(t,Vi(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 Bi(this,`shape`,i),i}}))}function ca(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 la(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function ua(e){return typeof e==`string`?e:e?.message}function da(e,t,n){let r={...e,path:e.path??[]};return e.message||(r.message=ua(e.inst?._zod.def?.error?.(e))??ua(t?.error?.(e))??ua(n.customError?.(e))??ua(n.localeError?.(e))??`Invalid input`),delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function fa(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function pa(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}var ma=(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,Ni,2),Object.defineProperty(e,`toString`,{value:()=>e.message,enumerable:!1})},ha=q(`$ZodError`,ma),ga=q(`$ZodError`,ma,{Parent:Error});function _a(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 va(e,t=e=>e.message){let n={_errors:[]},r=e=>{for(let i of e.issues)if(i.code===`invalid_union`&&i.errors.length)i.errors.map(e=>r({issues:e}));else if(i.code===`invalid_key`)r({issues:i.issues});else if(i.code===`invalid_element`)r({issues:i.issues});else if(i.path.length===0)n._errors.push(t(i));else{let e=n,r=0;for(;r<i.path.length;){let n=i.path[r];r===i.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(i))):e[n]=e[n]||{_errors:[]},e=e[n],r++}}};return r(e),n}var ya=e=>(t,n,r,i)=>{let a=r?Object.assign(r,{async:!1}):{async:!1},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise)throw new Oi;if(o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>da(e,a,ji())));throw Wi(t,i?.callee),t}return o.value},ba=e=>async(t,n,r,i)=>{let a=r?Object.assign(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=>da(e,a,ji())));throw Wi(t,i?.callee),t}return o.value},xa=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 Oi;return a.issues.length?{success:!1,error:new(e??ha)(a.issues.map(e=>da(e,i,ji())))}:{success:!0,data:a.value}},Sa=xa(ga),Ca=e=>async(t,n,r)=>{let i=r?Object.assign(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=>da(e,i,ji())))}:{success:!0,data:a.value}},wa=Ca(ga),Ta=e=>(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return ya(e)(t,n,i)},Ea=e=>(t,n,r)=>ya(e)(t,n,r),Da=e=>async(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return ba(e)(t,n,i)},Oa=e=>async(t,n,r)=>ba(e)(t,n,r),ka=e=>(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return xa(e)(t,n,i)},Aa=e=>(t,n,r)=>xa(e)(t,n,r),ja=e=>async(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return Ca(e)(t,n,i)},Ma=e=>async(t,n,r)=>Ca(e)(t,n,r),Na=/^[cC][^\s-]{8,}$/,Pa=/^[0-9a-z]+$/,Fa=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Ia=/^[0-9a-vA-V]{20}$/,La=/^[A-Za-z0-9]{27}$/,Ra=/^[a-zA-Z0-9_-]{21}$/,za=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Ba=/^([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})$/,Va=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)$/,Ha=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Ua=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;function Wa(){return new RegExp(Ua,`u`)}var Ga=/^(?:(?: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])$/,Ka=/^(([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}|:))$/,qa=/^((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])$/,Ja=/^(([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])$/,Ya=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Xa=/^[A-Za-z0-9_-]*$/,Za=/^\+[1-9]\d{6,14}$/,Qa=`(?:(?:\\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])))`,$a=RegExp(`^${Qa}$`);function eo(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 to(e){return RegExp(`^${eo(e)}$`)}function no(e){let t=eo({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(`^${Qa}T(?:${r})$`)}var ro=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},io=/^-?\d+$/,ao=/^-?\d+(?:\.\d+)?$/,oo=/^(?:true|false)$/i,so=/^null$/i,co=/^undefined$/i,lo=/^[^A-Z]*$/,uo=/^[^a-z]*$/,fo=q(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),po={number:`number`,bigint:`bigint`,object:`date`},mo=q(`$ZodCheckLessThan`,(e,t)=>{fo.init(e,t);let n=po[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})}}),ho=q(`$ZodCheckGreaterThan`,(e,t)=>{fo.init(e,t);let n=po[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})}}),go=q(`$ZodCheckMultipleOf`,(e,t)=>{fo.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):Li(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})}}),_o=q(`$ZodCheckNumberFormat`,(e,t)=>{fo.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=ea[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=io)}),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})}}),vo=q(`$ZodCheckMaxLength`,(e,t)=>{var n;fo.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!Fi(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=fa(r);n.issues.push({origin:i,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),yo=q(`$ZodCheckMinLength`,(e,t)=>{var n;fo.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!Fi(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=fa(r);n.issues.push({origin:i,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),bo=q(`$ZodCheckLengthEquals`,(e,t)=>{var n;fo.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!Fi(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=fa(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})}}),xo=q(`$ZodCheckStringFormat`,(e,t)=>{var n,r;fo.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=()=>{})}),So=q(`$ZodCheckRegex`,(e,t)=>{xo.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})}}),Co=q(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=lo,xo.init(e,t)}),wo=q(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=uo,xo.init(e,t)}),To=q(`$ZodCheckIncludes`,(e,t)=>{fo.init(e,t);let n=Xi(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})}}),Eo=q(`$ZodCheckStartsWith`,(e,t)=>{fo.init(e,t);let n=RegExp(`^${Xi(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})}}),Do=q(`$ZodCheckEndsWith`,(e,t)=>{fo.init(e,t);let n=RegExp(`.*${Xi(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})}}),Oo=q(`$ZodCheckOverwrite`,(e,t)=>{fo.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),ko=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(`
|
|
13
|
+
`).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(`
|
|
14
|
+
`))}},Ao={major:4,minor:3,patch:6},jo=q(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Ao;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=ca(e),i;for(let a of t){if(a._zod.def.when){if(!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 Oi;if(i||o instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await o,e.issues.length!==t&&(r||=ca(e,t))});else{if(e.issues.length===t)continue;r||=ca(e,t)}}return i?i.then(()=>e):e},n=(n,i,a)=>{if(ca(n))return n.aborted=!0,n;let o=t(i,r,a);if(o instanceof Promise){if(a.async===!1)throw new Oi;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 Oi;return o.then(e=>t(e,r,a))}return t(o,r,a)}}zi(e,`~standard`,()=>({validate:t=>{try{let n=Sa(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch{return wa(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:`zod`,version:1}))}),Mo=q(`$ZodString`,(e,t)=>{jo.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??ro(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}}),No=q(`$ZodStringFormat`,(e,t)=>{xo.init(e,t),Mo.init(e,t)}),Po=q(`$ZodGUID`,(e,t)=>{t.pattern??=Ba,No.init(e,t)}),Fo=q(`$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??=Va(e)}else t.pattern??=Va();No.init(e,t)}),Io=q(`$ZodEmail`,(e,t)=>{t.pattern??=Ha,No.init(e,t)}),Lo=q(`$ZodURL`,(e,t)=>{No.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),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})}}}),Ro=q(`$ZodEmoji`,(e,t)=>{t.pattern??=Wa(),No.init(e,t)}),zo=q(`$ZodNanoID`,(e,t)=>{t.pattern??=Ra,No.init(e,t)}),Bo=q(`$ZodCUID`,(e,t)=>{t.pattern??=Na,No.init(e,t)}),Vo=q(`$ZodCUID2`,(e,t)=>{t.pattern??=Pa,No.init(e,t)}),Ho=q(`$ZodULID`,(e,t)=>{t.pattern??=Fa,No.init(e,t)}),Uo=q(`$ZodXID`,(e,t)=>{t.pattern??=Ia,No.init(e,t)}),Wo=q(`$ZodKSUID`,(e,t)=>{t.pattern??=La,No.init(e,t)}),Go=q(`$ZodISODateTime`,(e,t)=>{t.pattern??=no(t),No.init(e,t)}),Ko=q(`$ZodISODate`,(e,t)=>{t.pattern??=$a,No.init(e,t)}),qo=q(`$ZodISOTime`,(e,t)=>{t.pattern??=to(t),No.init(e,t)}),Jo=q(`$ZodISODuration`,(e,t)=>{t.pattern??=za,No.init(e,t)}),Yo=q(`$ZodIPv4`,(e,t)=>{t.pattern??=Ga,No.init(e,t),e._zod.bag.format=`ipv4`}),Xo=q(`$ZodIPv6`,(e,t)=>{t.pattern??=Ka,No.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})}}}),Zo=q(`$ZodCIDRv4`,(e,t)=>{t.pattern??=qa,No.init(e,t)}),Qo=q(`$ZodCIDRv6`,(e,t)=>{t.pattern??=Ja,No.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 $o(e){if(e===``)return!0;if(e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var es=q(`$ZodBase64`,(e,t)=>{t.pattern??=Ya,No.init(e,t),e._zod.bag.contentEncoding=`base64`,e._zod.check=n=>{$o(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}});function ts(e){if(!Xa.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return $o(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var ns=q(`$ZodBase64URL`,(e,t)=>{t.pattern??=Xa,No.init(e,t),e._zod.bag.contentEncoding=`base64url`,e._zod.check=n=>{ts(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),rs=q(`$ZodE164`,(e,t)=>{t.pattern??=Za,No.init(e,t)});function is(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 as=q(`$ZodJWT`,(e,t)=>{No.init(e,t),e._zod.check=n=>{is(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),os=q(`$ZodNumber`,(e,t)=>{jo.init(e,t),e._zod.pattern=e._zod.bag.pattern??ao,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}}),ss=q(`$ZodNumberFormat`,(e,t)=>{_o.init(e,t),os.init(e,t)}),cs=q(`$ZodBoolean`,(e,t)=>{jo.init(e,t),e._zod.pattern=oo,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}}),ls=q(`$ZodUndefined`,(e,t)=>{jo.init(e,t),e._zod.pattern=co,e._zod.values=new Set([void 0]),e._zod.optin=`optional`,e._zod.optout=`optional`,e._zod.parse=(t,n)=>{let r=t.value;return r===void 0||t.issues.push({expected:`undefined`,code:`invalid_type`,input:r,inst:e}),t}}),us=q(`$ZodNull`,(e,t)=>{jo.init(e,t),e._zod.pattern=so,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}}),ds=q(`$ZodAny`,(e,t)=>{jo.init(e,t),e._zod.parse=e=>e}),fs=q(`$ZodUnknown`,(e,t)=>{jo.init(e,t),e._zod.parse=e=>e}),ps=q(`$ZodNever`,(e,t)=>{jo.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function ms(e,t,n){e.issues.length&&t.issues.push(...la(n,e.issues)),t.value[n]=e.value}var hs=q(`$ZodArray`,(e,t)=>{jo.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=>ms(t,n,e))):ms(s,n,e)}return a.length?Promise.all(a).then(()=>n):n}});function gs(e,t,n,r,i){if(e.issues.length){if(i&&!(n in r))return;t.issues.push(...la(n,e.issues))}e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function _s(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=$i(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function vs(e,t,n,r,i,a){let o=[],s=i.keySet,c=i.catchall._zod,l=c.def.type,u=c.optout===`optional`;for(let i in t){if(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=>gs(e,n,i,t,u))):gs(a,n,i,t,u)}return o.length&&n.issues.push({code:`unrecognized_keys`,keys:o,input:t,inst:a}),e.length?Promise.all(e).then(()=>n):n}var ys=q(`$ZodObject`,(e,t)=>{if(jo.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=Pi(()=>_s(t));zi(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=Gi,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.optout===`optional`,i=n._zod.run({value:s[e],issues:[]},o);i instanceof Promise?c.push(i.then(n=>gs(n,t,e,s,r))):gs(i,t,e,s,r)}return i?vs(c,s,t,o,n.value,e):c.length?Promise.all(c).then(()=>t):t}}),bs=q(`$ZodObjectJIT`,(e,t)=>{ys.init(e,t);let n=e._zod.parse,r=Pi(()=>_s(t)),i=e=>{let t=new ko([`shape`,`payload`,`ctx`]),n=r.value,i=e=>{let t=Hi(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=Hi(r),s=e[r]?._zod?.optout===`optional`;t.write(`const ${n} = ${i(r)};`),s?t.write(`
|
|
15
|
+
if (${n}.issues.length) {
|
|
16
|
+
if (${o} in input) {
|
|
17
|
+
payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
|
|
18
|
+
...iss,
|
|
19
|
+
path: iss.path ? [${o}, ...iss.path] : [${o}]
|
|
20
|
+
})));
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
if (${n}.value === undefined) {
|
|
25
|
+
if (${o} in input) {
|
|
26
|
+
newResult[${o}] = undefined;
|
|
27
|
+
}
|
|
28
|
+
} else {
|
|
29
|
+
newResult[${o}] = ${n}.value;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
`):t.write(`
|
|
33
|
+
if (${n}.issues.length) {
|
|
34
|
+
payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
|
|
35
|
+
...iss,
|
|
36
|
+
path: iss.path ? [${o}, ...iss.path] : [${o}]
|
|
37
|
+
})));
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
if (${n}.value === undefined) {
|
|
41
|
+
if (${o} in input) {
|
|
42
|
+
newResult[${o}] = undefined;
|
|
43
|
+
}
|
|
44
|
+
} else {
|
|
45
|
+
newResult[${o}] = ${n}.value;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
`)}t.write(`payload.value = newResult;`),t.write(`return payload;`);let s=t.compile();return(t,n)=>s(e,t,n)},a,o=Gi,s=!Ai.jitless,c=s&&Ki.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?vs([],p,d,f,u,e):d):n(d,f):(d.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),d)}});function xs(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=>!ca(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=>da(e,r,ji())))}),t)}var Ss=q(`$ZodUnion`,(e,t)=>{jo.init(e,t),zi(e._zod,`optin`,()=>t.options.some(e=>e._zod.optin===`optional`)?`optional`:void 0),zi(e._zod,`optout`,()=>t.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),zi(e._zod,`values`,()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),zi(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=>Ii(e.source)).join(`|`)})$`)}});let n=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=(i,a)=>{if(n)return r(i,a);let o=!1,s=[];for(let e of t.options){let t=e._zod.run({value:i.value,issues:[]},a);if(t instanceof Promise)s.push(t),o=!0;else{if(t.issues.length===0)return t;s.push(t)}}return o?Promise.all(s).then(t=>xs(t,i,e,a)):xs(s,i,e,a)}}),Cs=q(`$ZodDiscriminatedUnion`,(e,t)=>{t.inclusive=!1,Ss.init(e,t);let n=e._zod.parse;zi(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=Pi(()=>{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(!Gi(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?n(i,a):(i.issues.push({code:`invalid_union`,errors:[],note:`No matching discriminator`,discriminator:t.discriminator,input:o,path:[t.discriminator],inst:e}),i)}}),ws=q(`$ZodIntersection`,(e,t)=>{jo.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])=>Es(e,t,n)):Es(e,i,a)}});function Ts(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(qi(e)&&qi(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=Ts(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=Ts(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 Es(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}),ca(e))return e;let o=Ts(t.value,n.value);if(!o.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}var Ds=q(`$ZodRecord`,(e,t)=>{jo.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!qi(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 e of o)if(typeof e==`string`||typeof e==`number`||typeof e==`symbol`){s.add(typeof e==`number`?e.toString():e);let o=t.valueType._zod.run({value:i[e],issues:[]},r);o instanceof Promise?a.push(o.then(t=>{t.issues.length&&n.issues.push(...la(e,t.issues)),n.value[e]=t.value})):(o.issues.length&&n.issues.push(...la(e,o.issues)),n.value[e]=o.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__`)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`&&ao.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=>da(e,r,ji())),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(...la(o,e.issues)),n.value[s.value]=e.value})):(c.issues.length&&n.issues.push(...la(o,c.issues)),n.value[s.value]=c.value)}}return a.length?Promise.all(a).then(()=>n):n}}),Os=q(`$ZodEnum`,(e,t)=>{jo.init(e,t);let n=Mi(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=RegExp(`^(${n.filter(e=>Yi.has(typeof e)).map(e=>typeof e==`string`?Xi(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}}),ks=q(`$ZodLiteral`,(e,t)=>{if(jo.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`?Xi(e):e?Xi(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}}),As=q(`$ZodTransform`,(e,t)=>{jo.init(e,t),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new ki(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));if(i instanceof Promise)throw new Oi;return n.value=i,n}});function js(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}var Ms=q(`$ZodOptional`,(e,t)=>{jo.init(e,t),e._zod.optin=`optional`,e._zod.optout=`optional`,zi(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),zi(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${Ii(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(t.innerType._zod.optin===`optional`){let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(t=>js(t,e.value)):js(r,e.value)}return e.value===void 0?e:t.innerType._zod.run(e,n)}}),Ns=q(`$ZodExactOptional`,(e,t)=>{Ms.init(e,t),zi(e._zod,`values`,()=>t.innerType._zod.values),zi(e._zod,`pattern`,()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),Ps=q(`$ZodNullable`,(e,t)=>{jo.init(e,t),zi(e._zod,`optin`,()=>t.innerType._zod.optin),zi(e._zod,`optout`,()=>t.innerType._zod.optout),zi(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${Ii(e.source)}|null)$`):void 0}),zi(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)}),Fs=q(`$ZodDefault`,(e,t)=>{jo.init(e,t),e._zod.optin=`optional`,zi(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=>Is(e,t)):Is(r,t)}});function Is(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var Ls=q(`$ZodPrefault`,(e,t)=>{jo.init(e,t),e._zod.optin=`optional`,zi(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))}),Rs=q(`$ZodNonOptional`,(e,t)=>{jo.init(e,t),zi(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=>zs(t,e)):zs(i,e)}});function zs(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 Bs=q(`$ZodCatch`,(e,t)=>{jo.init(e,t),zi(e._zod,`optin`,()=>t.innerType._zod.optin),zi(e._zod,`optout`,()=>t.innerType._zod.optout),zi(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=>da(e,n,ji()))},input:e.value}),e.issues=[]),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>da(e,n,ji()))},input:e.value}),e.issues=[]),e)}}),Vs=q(`$ZodPipe`,(e,t)=>{jo.init(e,t),zi(e._zod,`values`,()=>t.in._zod.values),zi(e._zod,`optin`,()=>t.in._zod.optin),zi(e._zod,`optout`,()=>t.out._zod.optout),zi(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=>Hs(e,t.in,n)):Hs(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>Hs(e,t.out,n)):Hs(r,t.out,n)}});function Hs(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}var Us=q(`$ZodReadonly`,(e,t)=>{jo.init(e,t),zi(e._zod,`propValues`,()=>t.innerType._zod.propValues),zi(e._zod,`values`,()=>t.innerType._zod.values),zi(e._zod,`optin`,()=>t.innerType?._zod?.optin),zi(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(Ws):Ws(r)}});function Ws(e){return e.value=Object.freeze(e.value),e}var Gs=q(`$ZodCustom`,(e,t)=>{fo.init(e,t),jo.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=>Ks(t,n,r,e));Ks(i,n,r,e)}});function Ks(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(pa(e))}}var qs,Js=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 Ys(){return new Js}(qs=globalThis).__zod_globalRegistry??(qs.__zod_globalRegistry=Ys());var Xs=globalThis.__zod_globalRegistry;function Zs(e,t){return new e({type:`string`,...Qi(t)})}function Qs(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...Qi(t)})}function $s(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...Qi(t)})}function ec(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...Qi(t)})}function tc(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...Qi(t)})}function nc(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...Qi(t)})}function rc(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...Qi(t)})}function ic(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...Qi(t)})}function ac(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...Qi(t)})}function oc(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...Qi(t)})}function sc(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...Qi(t)})}function cc(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...Qi(t)})}function lc(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...Qi(t)})}function uc(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...Qi(t)})}function dc(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...Qi(t)})}function fc(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...Qi(t)})}function pc(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...Qi(t)})}function mc(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...Qi(t)})}function hc(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...Qi(t)})}function gc(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...Qi(t)})}function _c(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...Qi(t)})}function vc(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...Qi(t)})}function yc(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...Qi(t)})}function bc(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...Qi(t)})}function xc(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...Qi(t)})}function Sc(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...Qi(t)})}function Cc(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...Qi(t)})}function wc(e,t){return new e({type:`number`,checks:[],...Qi(t)})}function Tc(e,t){return new e({type:`number`,coerce:!0,checks:[],...Qi(t)})}function Ec(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...Qi(t)})}function Dc(e,t){return new e({type:`boolean`,...Qi(t)})}function Oc(e,t){return new e({type:`undefined`,...Qi(t)})}function kc(e,t){return new e({type:`null`,...Qi(t)})}function Ac(e){return new e({type:`any`})}function jc(e){return new e({type:`unknown`})}function Mc(e,t){return new e({type:`never`,...Qi(t)})}function Nc(e,t){return new mo({check:`less_than`,...Qi(t),value:e,inclusive:!1})}function Pc(e,t){return new mo({check:`less_than`,...Qi(t),value:e,inclusive:!0})}function Fc(e,t){return new ho({check:`greater_than`,...Qi(t),value:e,inclusive:!1})}function Ic(e,t){return new ho({check:`greater_than`,...Qi(t),value:e,inclusive:!0})}function Lc(e,t){return new go({check:`multiple_of`,...Qi(t),value:e})}function Rc(e,t){return new vo({check:`max_length`,...Qi(t),maximum:e})}function zc(e,t){return new yo({check:`min_length`,...Qi(t),minimum:e})}function Bc(e,t){return new bo({check:`length_equals`,...Qi(t),length:e})}function Vc(e,t){return new So({check:`string_format`,format:`regex`,...Qi(t),pattern:e})}function Hc(e){return new Co({check:`string_format`,format:`lowercase`,...Qi(e)})}function Uc(e){return new wo({check:`string_format`,format:`uppercase`,...Qi(e)})}function Wc(e,t){return new To({check:`string_format`,format:`includes`,...Qi(t),includes:e})}function Gc(e,t){return new Eo({check:`string_format`,format:`starts_with`,...Qi(t),prefix:e})}function Kc(e,t){return new Do({check:`string_format`,format:`ends_with`,...Qi(t),suffix:e})}function qc(e){return new Oo({check:`overwrite`,tx:e})}function Jc(e){return qc(t=>t.normalize(e))}function Yc(){return qc(e=>e.trim())}function Xc(){return qc(e=>e.toLowerCase())}function Zc(){return qc(e=>e.toUpperCase())}function Qc(){return qc(e=>Ui(e))}function $c(e,t,n){return new e({type:`array`,element:t,...Qi(n)})}function el(e,t,n){let r=Qi(n);return r.abort??=!0,new e({type:`custom`,check:`custom`,fn:t,...r})}function tl(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...Qi(n)})}function nl(e){let t=rl(n=>(n.addIssue=e=>{if(typeof e==`string`)n.issues.push(pa(e,n.value,t._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,r.input??=n.value,r.inst??=t,r.continue??=!t._zod.def.abort,n.issues.push(pa(r))}},e(n.value,n)));return t}function rl(e,t){let n=new fo({check:`custom`,...Qi(t)});return n._zod.check=e,n}function il(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??Xs,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 al(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,al(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`&&cl(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&o.schema._prefault&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function ol(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>
|
|
49
|
+
|
|
50
|
+
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 sl(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.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(a[e.defId]=e.def)}e.external||Object.keys(a).length>0&&(e.target===`draft-2020-12`?i.$defs=a:i.definitions=a);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,`~standard`,{value:{...t[`~standard`],jsonSchema:{input:ul(t,`input`,e.processors),output:ul(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function cl(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 cl(r.element,n);if(r.type===`set`)return cl(r.valueType,n);if(r.type===`lazy`)return cl(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 cl(r.innerType,n);if(r.type===`intersection`)return cl(r.left,n)||cl(r.right,n);if(r.type===`record`||r.type===`map`)return cl(r.keyType,n)||cl(r.valueType,n);if(r.type===`pipe`)return cl(r.in,n)||cl(r.out,n);if(r.type===`object`){for(let e in r.shape)if(cl(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(cl(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(cl(e,n))return!0;return!!(r.rest&&cl(r.rest,n))}return!1}var ll=(e,t={})=>n=>{let r=il({...n,processors:t});return al(e,r),ol(r,e),sl(r,e)},ul=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=il({...i??{},target:a,io:t,processors:n});return al(e,o),ol(o,e),sl(o,e)},dl={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},fl=(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=dl[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}))])}},pl=(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`,typeof u==`number`&&(t.target===`draft-04`||t.target===`openapi-3.0`?(i.minimum=u,i.exclusiveMinimum=!0):i.exclusiveMinimum=u),typeof a==`number`&&(i.minimum=a,typeof u==`number`&&t.target!==`draft-04`&&(u>=a?delete i.minimum:delete i.exclusiveMinimum)),typeof l==`number`&&(t.target===`draft-04`||t.target===`openapi-3.0`?(i.maximum=l,i.exclusiveMaximum=!0):i.exclusiveMaximum=l),typeof o==`number`&&(i.maximum=o,typeof l==`number`&&t.target!==`draft-04`&&(l<=o?delete i.maximum:delete i.exclusiveMaximum)),typeof c==`number`&&(i.multipleOf=c)},ml=(e,t,n,r)=>{n.type=`boolean`},hl=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},gl=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Undefined cannot be represented in JSON Schema`)},_l=(e,t,n,r)=>{n.not={}},vl=(e,t,n,r)=>{let i=e._zod.def,a=Mi(i.entries);a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},yl=(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},bl=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)},xl=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`)},Sl=(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=al(a.element,t,{...r,path:[...r.path,`items`]})},Cl=(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]=al(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=al(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},wl=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>al(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},Tl=(e,t,n,r)=>{let i=e._zod.def,a=al(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=al(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]]},El=(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=al(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=al(a.keyType,t,{...r,path:[...r.path,`propertyNames`]})),i.additionalProperties=al(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)}},Dl=(e,t,n,r)=>{let i=e._zod.def,a=al(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`}]},Ol=(e,t,n,r)=>{let i=e._zod.def;al(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},kl=(e,t,n,r)=>{let i=e._zod.def;al(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},Al=(e,t,n,r)=>{let i=e._zod.def;al(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)))},jl=(e,t,n,r)=>{let i=e._zod.def;al(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},Ml=(e,t,n,r)=>{let i=e._zod.def,a=t.io===`input`?i.in._zod.def.type===`transform`?i.out:i.in:i.out;al(a,t,r);let o=t.seen.get(e);o.ref=a},Nl=(e,t,n,r)=>{let i=e._zod.def;al(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},Pl=(e,t,n,r)=>{let i=e._zod.def;al(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Fl=q(`ZodISODateTime`,(e,t)=>{Go.init(e,t),ou.init(e,t)});function Il(e){return bc(Fl,e)}var Ll=q(`ZodISODate`,(e,t)=>{Ko.init(e,t),ou.init(e,t)});function Rl(e){return xc(Ll,e)}var zl=q(`ZodISOTime`,(e,t)=>{qo.init(e,t),ou.init(e,t)});function Bl(e){return Sc(zl,e)}var Vl=q(`ZodISODuration`,(e,t)=>{Jo.init(e,t),ou.init(e,t)});function Hl(e){return Cc(Vl,e)}var Ul=(e,t)=>{ha.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>va(e,t)},flatten:{value:t=>_a(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,Ni,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,Ni,2)}},isEmpty:{get(){return e.issues.length===0}}})};q(`ZodError`,Ul);var Wl=q(`ZodError`,Ul,{Parent:Error}),Gl=ya(Wl),Kl=ba(Wl),ql=xa(Wl),Jl=Ca(Wl),Yl=Ta(Wl),Xl=Ea(Wl),Zl=Da(Wl),Ql=Oa(Wl),$l=ka(Wl),eu=Aa(Wl),tu=ja(Wl),nu=Ma(Wl),ru=q(`ZodType`,(e,t)=>(jo.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:ul(e,`input`),output:ul(e,`output`)}}),e.toJSONSchema=ll(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,`_def`,{value:t}),e.check=(...n)=>e.clone(Vi(t,{checks:[...t.checks??[],...n.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0}),e.with=e.check,e.clone=(t,n)=>Zi(e,t,n),e.brand=()=>e,e.register=((t,n)=>(t.add(e,n),e)),e.parse=(t,n)=>Gl(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>ql(e,t,n),e.parseAsync=async(t,n)=>Kl(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>Jl(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>Yl(e,t,n),e.decode=(t,n)=>Xl(e,t,n),e.encodeAsync=async(t,n)=>Zl(e,t,n),e.decodeAsync=async(t,n)=>Ql(e,t,n),e.safeEncode=(t,n)=>$l(e,t,n),e.safeDecode=(t,n)=>eu(e,t,n),e.safeEncodeAsync=async(t,n)=>tu(e,t,n),e.safeDecodeAsync=async(t,n)=>nu(e,t,n),e.refine=(t,n)=>e.check(Td(t,n)),e.superRefine=t=>e.check(Ed(t)),e.overwrite=t=>e.check(qc(t)),e.optional=()=>od(e),e.exactOptional=()=>cd(e),e.nullable=()=>ud(e),e.nullish=()=>od(ud(e)),e.nonoptional=t=>gd(e,t),e.array=()=>Y(e),e.or=t=>qu([e,t]),e.and=t=>Zu(e,t),e.transform=t=>bd(e,id(t)),e.default=t=>fd(e,t),e.prefault=t=>md(e,t),e.catch=t=>vd(e,t),e.pipe=t=>bd(e,t),e.readonly=()=>Sd(e),e.describe=t=>{let n=e.clone();return Xs.add(n,{description:t}),n},Object.defineProperty(e,`description`,{get(){return Xs.get(e)?.description},configurable:!0}),e.meta=(...t)=>{if(t.length===0)return Xs.get(e);let n=e.clone();return Xs.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=t=>t(e),e)),iu=q(`_ZodString`,(e,t)=>{Mo.init(e,t),ru.init(e,t),e._zod.processJSONSchema=(t,n,r)=>fl(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...t)=>e.check(Vc(...t)),e.includes=(...t)=>e.check(Wc(...t)),e.startsWith=(...t)=>e.check(Gc(...t)),e.endsWith=(...t)=>e.check(Kc(...t)),e.min=(...t)=>e.check(zc(...t)),e.max=(...t)=>e.check(Rc(...t)),e.length=(...t)=>e.check(Bc(...t)),e.nonempty=(...t)=>e.check(zc(1,...t)),e.lowercase=t=>e.check(Hc(t)),e.uppercase=t=>e.check(Uc(t)),e.trim=()=>e.check(Yc()),e.normalize=(...t)=>e.check(Jc(...t)),e.toLowerCase=()=>e.check(Xc()),e.toUpperCase=()=>e.check(Zc()),e.slugify=()=>e.check(Qc())}),au=q(`ZodString`,(e,t)=>{Mo.init(e,t),iu.init(e,t),e.email=t=>e.check(Qs(su,t)),e.url=t=>e.check(ic(uu,t)),e.jwt=t=>e.check(yc(Eu,t)),e.emoji=t=>e.check(ac(fu,t)),e.guid=t=>e.check($s(cu,t)),e.uuid=t=>e.check(ec(lu,t)),e.uuidv4=t=>e.check(tc(lu,t)),e.uuidv6=t=>e.check(nc(lu,t)),e.uuidv7=t=>e.check(rc(lu,t)),e.nanoid=t=>e.check(oc(pu,t)),e.guid=t=>e.check($s(cu,t)),e.cuid=t=>e.check(sc(mu,t)),e.cuid2=t=>e.check(cc(hu,t)),e.ulid=t=>e.check(lc(gu,t)),e.base64=t=>e.check(gc(Cu,t)),e.base64url=t=>e.check(_c(wu,t)),e.xid=t=>e.check(uc(_u,t)),e.ksuid=t=>e.check(dc(vu,t)),e.ipv4=t=>e.check(fc(yu,t)),e.ipv6=t=>e.check(pc(bu,t)),e.cidrv4=t=>e.check(mc(xu,t)),e.cidrv6=t=>e.check(hc(Su,t)),e.e164=t=>e.check(vc(Tu,t)),e.datetime=t=>e.check(Il(t)),e.date=t=>e.check(Rl(t)),e.time=t=>e.check(Bl(t)),e.duration=t=>e.check(Hl(t))});function J(e){return Zs(au,e)}var ou=q(`ZodStringFormat`,(e,t)=>{No.init(e,t),iu.init(e,t)}),su=q(`ZodEmail`,(e,t)=>{Io.init(e,t),ou.init(e,t)}),cu=q(`ZodGUID`,(e,t)=>{Po.init(e,t),ou.init(e,t)}),lu=q(`ZodUUID`,(e,t)=>{Fo.init(e,t),ou.init(e,t)}),uu=q(`ZodURL`,(e,t)=>{Lo.init(e,t),ou.init(e,t)});function du(e){return ic(uu,e)}var fu=q(`ZodEmoji`,(e,t)=>{Ro.init(e,t),ou.init(e,t)}),pu=q(`ZodNanoID`,(e,t)=>{zo.init(e,t),ou.init(e,t)}),mu=q(`ZodCUID`,(e,t)=>{Bo.init(e,t),ou.init(e,t)}),hu=q(`ZodCUID2`,(e,t)=>{Vo.init(e,t),ou.init(e,t)}),gu=q(`ZodULID`,(e,t)=>{Ho.init(e,t),ou.init(e,t)}),_u=q(`ZodXID`,(e,t)=>{Uo.init(e,t),ou.init(e,t)}),vu=q(`ZodKSUID`,(e,t)=>{Wo.init(e,t),ou.init(e,t)}),yu=q(`ZodIPv4`,(e,t)=>{Yo.init(e,t),ou.init(e,t)}),bu=q(`ZodIPv6`,(e,t)=>{Xo.init(e,t),ou.init(e,t)}),xu=q(`ZodCIDRv4`,(e,t)=>{Zo.init(e,t),ou.init(e,t)}),Su=q(`ZodCIDRv6`,(e,t)=>{Qo.init(e,t),ou.init(e,t)}),Cu=q(`ZodBase64`,(e,t)=>{es.init(e,t),ou.init(e,t)}),wu=q(`ZodBase64URL`,(e,t)=>{ns.init(e,t),ou.init(e,t)}),Tu=q(`ZodE164`,(e,t)=>{rs.init(e,t),ou.init(e,t)}),Eu=q(`ZodJWT`,(e,t)=>{as.init(e,t),ou.init(e,t)}),Du=q(`ZodNumber`,(e,t)=>{os.init(e,t),ru.init(e,t),e._zod.processJSONSchema=(t,n,r)=>pl(e,t,n,r),e.gt=(t,n)=>e.check(Fc(t,n)),e.gte=(t,n)=>e.check(Ic(t,n)),e.min=(t,n)=>e.check(Ic(t,n)),e.lt=(t,n)=>e.check(Nc(t,n)),e.lte=(t,n)=>e.check(Pc(t,n)),e.max=(t,n)=>e.check(Pc(t,n)),e.int=t=>e.check(Au(t)),e.safe=t=>e.check(Au(t)),e.positive=t=>e.check(Fc(0,t)),e.nonnegative=t=>e.check(Ic(0,t)),e.negative=t=>e.check(Nc(0,t)),e.nonpositive=t=>e.check(Pc(0,t)),e.multipleOf=(t,n)=>e.check(Lc(t,n)),e.step=(t,n)=>e.check(Lc(t,n)),e.finite=()=>e;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 Ou(e){return wc(Du,e)}var ku=q(`ZodNumberFormat`,(e,t)=>{ss.init(e,t),Du.init(e,t)});function Au(e){return Ec(ku,e)}var ju=q(`ZodBoolean`,(e,t)=>{cs.init(e,t),ru.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ml(e,t,n,r)});function Mu(e){return Dc(ju,e)}var Nu=q(`ZodUndefined`,(e,t)=>{ls.init(e,t),ru.init(e,t),e._zod.processJSONSchema=(t,n,r)=>gl(e,t,n,r)});function Pu(e){return Oc(Nu,e)}var Fu=q(`ZodNull`,(e,t)=>{us.init(e,t),ru.init(e,t),e._zod.processJSONSchema=(t,n,r)=>hl(e,t,n,r)});function Iu(e){return kc(Fu,e)}var Lu=q(`ZodAny`,(e,t)=>{ds.init(e,t),ru.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function Ru(){return Ac(Lu)}var zu=q(`ZodUnknown`,(e,t)=>{fs.init(e,t),ru.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function Bu(){return jc(zu)}var Vu=q(`ZodNever`,(e,t)=>{ps.init(e,t),ru.init(e,t),e._zod.processJSONSchema=(t,n,r)=>_l(e,t,n,r)});function Hu(e){return Mc(Vu,e)}var Uu=q(`ZodArray`,(e,t)=>{hs.init(e,t),ru.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Sl(e,t,n,r),e.element=t.element,e.min=(t,n)=>e.check(zc(t,n)),e.nonempty=t=>e.check(zc(1,t)),e.max=(t,n)=>e.check(Rc(t,n)),e.length=(t,n)=>e.check(Bc(t,n)),e.unwrap=()=>e.element});function Y(e,t){return $c(Uu,e,t)}var Wu=q(`ZodObject`,(e,t)=>{bs.init(e,t),ru.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Cl(e,t,n,r),zi(e,`shape`,()=>t.shape),e.keyof=()=>td(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Bu()}),e.loose=()=>e.clone({...e._zod.def,catchall:Bu()}),e.strict=()=>e.clone({...e._zod.def,catchall:Hu()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>ra(e,t),e.safeExtend=t=>ia(e,t),e.merge=t=>aa(e,t),e.pick=t=>ta(e,t),e.omit=t=>na(e,t),e.partial=(...t)=>oa(ad,e,t[0]),e.required=(...t)=>sa(hd,e,t[0])});function X(e,t){return new Wu({type:`object`,shape:e??{},...Qi(t)})}function Gu(e,t){return new Wu({type:`object`,shape:e,catchall:Bu(),...Qi(t)})}var Ku=q(`ZodUnion`,(e,t)=>{Ss.init(e,t),ru.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wl(e,t,n,r),e.options=t.options});function qu(e,t){return new Ku({type:`union`,options:e,...Qi(t)})}var Ju=q(`ZodDiscriminatedUnion`,(e,t)=>{Ku.init(e,t),Cs.init(e,t)});function Yu(e,t,n){return new Ju({type:`union`,options:t,discriminator:e,...Qi(n)})}var Xu=q(`ZodIntersection`,(e,t)=>{ws.init(e,t),ru.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Tl(e,t,n,r)});function Zu(e,t){return new Xu({type:`intersection`,left:e,right:t})}var Qu=q(`ZodRecord`,(e,t)=>{Ds.init(e,t),ru.init(e,t),e._zod.processJSONSchema=(t,n,r)=>El(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function $u(e,t,n){return new Qu({type:`record`,keyType:e,valueType:t,...Qi(n)})}var ed=q(`ZodEnum`,(e,t)=>{Os.init(e,t),ru.init(e,t),e._zod.processJSONSchema=(t,n,r)=>vl(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 ed({...t,checks:[],...Qi(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 ed({...t,checks:[],...Qi(r),entries:i})}});function td(e,t){return new ed({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...Qi(t)})}var nd=q(`ZodLiteral`,(e,t)=>{ks.init(e,t),ru.init(e,t),e._zod.processJSONSchema=(t,n,r)=>yl(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 Z(e,t){return new nd({type:`literal`,values:Array.isArray(e)?e:[e],...Qi(t)})}var rd=q(`ZodTransform`,(e,t)=>{As.init(e,t),ru.init(e,t),e._zod.processJSONSchema=(t,n,r)=>xl(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new ki(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(pa(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(pa(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function id(e){return new rd({type:`transform`,transform:e})}var ad=q(`ZodOptional`,(e,t)=>{Ms.init(e,t),ru.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Pl(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function od(e){return new ad({type:`optional`,innerType:e})}var sd=q(`ZodExactOptional`,(e,t)=>{Ns.init(e,t),ru.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Pl(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function cd(e){return new sd({type:`optional`,innerType:e})}var ld=q(`ZodNullable`,(e,t)=>{Ps.init(e,t),ru.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Dl(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function ud(e){return new ld({type:`nullable`,innerType:e})}var dd=q(`ZodDefault`,(e,t)=>{Fs.init(e,t),ru.init(e,t),e._zod.processJSONSchema=(t,n,r)=>kl(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function fd(e,t){return new dd({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():Ji(t)}})}var pd=q(`ZodPrefault`,(e,t)=>{Ls.init(e,t),ru.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Al(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function md(e,t){return new pd({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():Ji(t)}})}var hd=q(`ZodNonOptional`,(e,t)=>{Rs.init(e,t),ru.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ol(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function gd(e,t){return new hd({type:`nonoptional`,innerType:e,...Qi(t)})}var _d=q(`ZodCatch`,(e,t)=>{Bs.init(e,t),ru.init(e,t),e._zod.processJSONSchema=(t,n,r)=>jl(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function vd(e,t){return new _d({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}var yd=q(`ZodPipe`,(e,t)=>{Vs.init(e,t),ru.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ml(e,t,n,r),e.in=t.in,e.out=t.out});function bd(e,t){return new yd({type:`pipe`,in:e,out:t})}var xd=q(`ZodReadonly`,(e,t)=>{Us.init(e,t),ru.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Nl(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Sd(e){return new xd({type:`readonly`,innerType:e})}var Cd=q(`ZodCustom`,(e,t)=>{Gs.init(e,t),ru.init(e,t),e._zod.processJSONSchema=(t,n,r)=>bl(e,t,n,r)});function wd(e,t){return el(Cd,e??(()=>!0),t)}function Td(e,t={}){return tl(Cd,e,t)}function Ed(e){return nl(e)}function Dd(e,t){return bd(id(e),t)}var Od={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`},kd;(function(e){})(kd||={});function Ad(e){return Tc(Du,e)}var jd=`2025-11-25`,Md=[jd,`2025-06-18`,`2025-03-26`,`2024-11-05`,`2024-10-07`],Nd=`io.modelcontextprotocol/related-task`,Pd=wd(e=>e!==null&&(typeof e==`object`||typeof e==`function`)),Fd=qu([J(),Ou().int()]),Id=J();Gu({ttl:Ou().optional(),pollInterval:Ou().optional()});var Ld=X({ttl:Ou().optional()}),Rd=X({taskId:J()}),zd=Gu({progressToken:Fd.optional(),[Nd]:Rd.optional()}),Bd=X({_meta:zd.optional()}),Vd=Bd.extend({task:Ld.optional()}),Hd=e=>Vd.safeParse(e).success,Ud=X({method:J(),params:Bd.loose().optional()}),Wd=X({_meta:zd.optional()}),Gd=X({method:J(),params:Wd.loose().optional()}),Kd=Gu({_meta:zd.optional()}),qd=qu([J(),Ou().int()]),Jd=X({jsonrpc:Z(`2.0`),id:qd,...Ud.shape}).strict(),Yd=e=>Jd.safeParse(e).success,Xd=X({jsonrpc:Z(`2.0`),...Gd.shape}).strict(),Zd=e=>Xd.safeParse(e).success,Qd=X({jsonrpc:Z(`2.0`),id:qd,result:Kd}).strict(),$d=e=>Qd.safeParse(e).success,ef;(function(e){e[e.ConnectionClosed=-32e3]=`ConnectionClosed`,e[e.RequestTimeout=-32001]=`RequestTimeout`,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.UrlElicitationRequired=-32042]=`UrlElicitationRequired`})(ef||={});var tf=X({jsonrpc:Z(`2.0`),id:qd.optional(),error:X({code:Ou().int(),message:J(),data:Bu().optional()})}).strict(),nf=e=>tf.safeParse(e).success,rf=qu([Jd,Xd,Qd,tf]);qu([Qd,tf]);var af=Kd.strict(),of=Wd.extend({requestId:qd.optional(),reason:J().optional()}),sf=Gd.extend({method:Z(`notifications/cancelled`),params:of}),cf=X({icons:Y(X({src:J(),mimeType:J().optional(),sizes:Y(J()).optional(),theme:td([`light`,`dark`]).optional()})).optional()}),lf=X({name:J(),title:J().optional()}),uf=lf.extend({...lf.shape,...cf.shape,version:J(),websiteUrl:J().optional(),description:J().optional()}),df=Dd(e=>e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,Zu(X({form:Zu(X({applyDefaults:Mu().optional()}),$u(J(),Bu())).optional(),url:Pd.optional()}),$u(J(),Bu()).optional())),ff=Gu({list:Pd.optional(),cancel:Pd.optional(),requests:Gu({sampling:Gu({createMessage:Pd.optional()}).optional(),elicitation:Gu({create:Pd.optional()}).optional()}).optional()}),pf=Gu({list:Pd.optional(),cancel:Pd.optional(),requests:Gu({tools:Gu({call:Pd.optional()}).optional()}).optional()}),mf=X({experimental:$u(J(),Pd).optional(),sampling:X({context:Pd.optional(),tools:Pd.optional()}).optional(),elicitation:df.optional(),roots:X({listChanged:Mu().optional()}).optional(),tasks:ff.optional(),extensions:$u(J(),Pd).optional()}),hf=Bd.extend({protocolVersion:J(),capabilities:mf,clientInfo:uf}),gf=Ud.extend({method:Z(`initialize`),params:hf}),_f=X({experimental:$u(J(),Pd).optional(),logging:Pd.optional(),completions:Pd.optional(),prompts:X({listChanged:Mu().optional()}).optional(),resources:X({subscribe:Mu().optional(),listChanged:Mu().optional()}).optional(),tools:X({listChanged:Mu().optional()}).optional(),tasks:pf.optional(),extensions:$u(J(),Pd).optional()}),vf=Kd.extend({protocolVersion:J(),capabilities:_f,serverInfo:uf,instructions:J().optional()}),yf=Gd.extend({method:Z(`notifications/initialized`),params:Wd.optional()}),bf=e=>yf.safeParse(e).success,xf=Ud.extend({method:Z(`ping`),params:Bd.optional()}),Sf=X({progress:Ou(),total:od(Ou()),message:od(J())}),Cf=X({...Wd.shape,...Sf.shape,progressToken:Fd}),wf=Gd.extend({method:Z(`notifications/progress`),params:Cf}),Tf=Bd.extend({cursor:Id.optional()}),Ef=Ud.extend({params:Tf.optional()}),Df=Kd.extend({nextCursor:Id.optional()}),Of=td([`working`,`input_required`,`completed`,`failed`,`cancelled`]),kf=X({taskId:J(),status:Of,ttl:qu([Ou(),Iu()]),createdAt:J(),lastUpdatedAt:J(),pollInterval:od(Ou()),statusMessage:od(J())}),Af=Kd.extend({task:kf}),jf=Wd.merge(kf),Mf=Gd.extend({method:Z(`notifications/tasks/status`),params:jf}),Nf=Ud.extend({method:Z(`tasks/get`),params:Bd.extend({taskId:J()})}),Pf=Kd.merge(kf),Ff=Ud.extend({method:Z(`tasks/result`),params:Bd.extend({taskId:J()})});Kd.loose();var If=Ef.extend({method:Z(`tasks/list`)}),Lf=Df.extend({tasks:Y(kf)}),Rf=Ud.extend({method:Z(`tasks/cancel`),params:Bd.extend({taskId:J()})}),zf=Kd.merge(kf),Bf=X({uri:J(),mimeType:od(J()),_meta:$u(J(),Bu()).optional()}),Vf=Bf.extend({text:J()}),Hf=J().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:`Invalid Base64 string`}),Uf=Bf.extend({blob:Hf}),Wf=td([`user`,`assistant`]),Gf=X({audience:Y(Wf).optional(),priority:Ou().min(0).max(1).optional(),lastModified:Il({offset:!0}).optional()}),Kf=X({...lf.shape,...cf.shape,uri:J(),description:od(J()),mimeType:od(J()),size:od(Ou()),annotations:Gf.optional(),_meta:od(Gu({}))}),qf=X({...lf.shape,...cf.shape,uriTemplate:J(),description:od(J()),mimeType:od(J()),annotations:Gf.optional(),_meta:od(Gu({}))}),Jf=Ef.extend({method:Z(`resources/list`)}),Yf=Df.extend({resources:Y(Kf)}),Xf=Ef.extend({method:Z(`resources/templates/list`)}),Zf=Df.extend({resourceTemplates:Y(qf)}),Qf=Bd.extend({uri:J()}),$f=Qf,ep=Ud.extend({method:Z(`resources/read`),params:$f}),tp=Kd.extend({contents:Y(qu([Vf,Uf]))}),np=Gd.extend({method:Z(`notifications/resources/list_changed`),params:Wd.optional()}),rp=Qf,ip=Ud.extend({method:Z(`resources/subscribe`),params:rp}),ap=Qf,op=Ud.extend({method:Z(`resources/unsubscribe`),params:ap}),sp=Wd.extend({uri:J()}),cp=Gd.extend({method:Z(`notifications/resources/updated`),params:sp}),lp=X({name:J(),description:od(J()),required:od(Mu())}),up=X({...lf.shape,...cf.shape,description:od(J()),arguments:od(Y(lp)),_meta:od(Gu({}))}),dp=Ef.extend({method:Z(`prompts/list`)}),fp=Df.extend({prompts:Y(up)}),pp=Bd.extend({name:J(),arguments:$u(J(),J()).optional()}),mp=Ud.extend({method:Z(`prompts/get`),params:pp}),hp=X({type:Z(`text`),text:J(),annotations:Gf.optional(),_meta:$u(J(),Bu()).optional()}),gp=X({type:Z(`image`),data:Hf,mimeType:J(),annotations:Gf.optional(),_meta:$u(J(),Bu()).optional()}),_p=X({type:Z(`audio`),data:Hf,mimeType:J(),annotations:Gf.optional(),_meta:$u(J(),Bu()).optional()}),vp=X({type:Z(`tool_use`),name:J(),id:J(),input:$u(J(),Bu()),_meta:$u(J(),Bu()).optional()}),yp=X({type:Z(`resource`),resource:qu([Vf,Uf]),annotations:Gf.optional(),_meta:$u(J(),Bu()).optional()}),bp=Kf.extend({type:Z(`resource_link`)}),xp=qu([hp,gp,_p,bp,yp]),Sp=X({role:Wf,content:xp}),Cp=Kd.extend({description:J().optional(),messages:Y(Sp)}),wp=Gd.extend({method:Z(`notifications/prompts/list_changed`),params:Wd.optional()}),Tp=X({title:J().optional(),readOnlyHint:Mu().optional(),destructiveHint:Mu().optional(),idempotentHint:Mu().optional(),openWorldHint:Mu().optional()}),Ep=X({taskSupport:td([`required`,`optional`,`forbidden`]).optional()}),Dp=X({...lf.shape,...cf.shape,description:J().optional(),inputSchema:X({type:Z(`object`),properties:$u(J(),Pd).optional(),required:Y(J()).optional()}).catchall(Bu()),outputSchema:X({type:Z(`object`),properties:$u(J(),Pd).optional(),required:Y(J()).optional()}).catchall(Bu()).optional(),annotations:Tp.optional(),execution:Ep.optional(),_meta:$u(J(),Bu()).optional()}),Op=Ef.extend({method:Z(`tools/list`)}),kp=Df.extend({tools:Y(Dp)}),Ap=Kd.extend({content:Y(xp).default([]),structuredContent:$u(J(),Bu()).optional(),isError:Mu().optional()});Ap.or(Kd.extend({toolResult:Bu()}));var jp=Vd.extend({name:J(),arguments:$u(J(),Bu()).optional()}),Mp=Ud.extend({method:Z(`tools/call`),params:jp}),Np=Gd.extend({method:Z(`notifications/tools/list_changed`),params:Wd.optional()}),Pp=X({autoRefresh:Mu().default(!0),debounceMs:Ou().int().nonnegative().default(300)}),Fp=td([`debug`,`info`,`notice`,`warning`,`error`,`critical`,`alert`,`emergency`]),Ip=Bd.extend({level:Fp}),Lp=Ud.extend({method:Z(`logging/setLevel`),params:Ip}),Rp=Wd.extend({level:Fp,logger:J().optional(),data:Bu()}),zp=Gd.extend({method:Z(`notifications/message`),params:Rp}),Bp=X({hints:Y(X({name:J().optional()})).optional(),costPriority:Ou().min(0).max(1).optional(),speedPriority:Ou().min(0).max(1).optional(),intelligencePriority:Ou().min(0).max(1).optional()}),Vp=X({mode:td([`auto`,`required`,`none`]).optional()}),Hp=X({type:Z(`tool_result`),toolUseId:J().describe(`The unique identifier for the corresponding tool call.`),content:Y(xp).default([]),structuredContent:X({}).loose().optional(),isError:Mu().optional(),_meta:$u(J(),Bu()).optional()}),Up=Yu(`type`,[hp,gp,_p]),Wp=Yu(`type`,[hp,gp,_p,vp,Hp]),Gp=X({role:Wf,content:qu([Wp,Y(Wp)]),_meta:$u(J(),Bu()).optional()}),eee=Vd.extend({messages:Y(Gp),modelPreferences:Bp.optional(),systemPrompt:J().optional(),includeContext:td([`none`,`thisServer`,`allServers`]).optional(),temperature:Ou().optional(),maxTokens:Ou().int(),stopSequences:Y(J()).optional(),metadata:Pd.optional(),tools:Y(Dp).optional(),toolChoice:Vp.optional()}),Kp=Ud.extend({method:Z(`sampling/createMessage`),params:eee}),qp=Kd.extend({model:J(),stopReason:od(td([`endTurn`,`stopSequence`,`maxTokens`]).or(J())),role:Wf,content:Up}),Jp=Kd.extend({model:J(),stopReason:od(td([`endTurn`,`stopSequence`,`maxTokens`,`toolUse`]).or(J())),role:Wf,content:qu([Wp,Y(Wp)])}),tee=X({type:Z(`boolean`),title:J().optional(),description:J().optional(),default:Mu().optional()}),nee=X({type:Z(`string`),title:J().optional(),description:J().optional(),minLength:Ou().optional(),maxLength:Ou().optional(),format:td([`email`,`uri`,`date`,`date-time`]).optional(),default:J().optional()}),ree=X({type:td([`number`,`integer`]),title:J().optional(),description:J().optional(),minimum:Ou().optional(),maximum:Ou().optional(),default:Ou().optional()}),iee=X({type:Z(`string`),title:J().optional(),description:J().optional(),enum:Y(J()),default:J().optional()}),aee=X({type:Z(`string`),title:J().optional(),description:J().optional(),oneOf:Y(X({const:J(),title:J()})),default:J().optional()}),Yp=qu([qu([X({type:Z(`string`),title:J().optional(),description:J().optional(),enum:Y(J()),enumNames:Y(J()).optional(),default:J().optional()}),qu([iee,aee]),qu([X({type:Z(`array`),title:J().optional(),description:J().optional(),minItems:Ou().optional(),maxItems:Ou().optional(),items:X({type:Z(`string`),enum:Y(J())}),default:Y(J()).optional()}),X({type:Z(`array`),title:J().optional(),description:J().optional(),minItems:Ou().optional(),maxItems:Ou().optional(),items:X({anyOf:Y(X({const:J(),title:J()}))}),default:Y(J()).optional()})])]),tee,nee,ree]),Xp=qu([Vd.extend({mode:Z(`form`).optional(),message:J(),requestedSchema:X({type:Z(`object`),properties:$u(J(),Yp),required:Y(J()).optional()})}),Vd.extend({mode:Z(`url`),message:J(),elicitationId:J(),url:J().url()})]),Zp=Ud.extend({method:Z(`elicitation/create`),params:Xp}),Qp=Wd.extend({elicitationId:J()}),$p=Gd.extend({method:Z(`notifications/elicitation/complete`),params:Qp}),em=Kd.extend({action:td([`accept`,`decline`,`cancel`]),content:Dd(e=>e===null?void 0:e,$u(J(),qu([J(),Ou(),Mu(),Y(J())])).optional())}),tm=X({type:Z(`ref/resource`),uri:J()}),nm=X({type:Z(`ref/prompt`),name:J()}),oee=Bd.extend({ref:qu([nm,tm]),argument:X({name:J(),value:J()}),context:X({arguments:$u(J(),J()).optional()}).optional()}),see=Ud.extend({method:Z(`completion/complete`),params:oee}),rm=Kd.extend({completion:Gu({values:Y(J()).max(100),total:od(Ou().int()),hasMore:od(Mu())})}),im=X({uri:J().startsWith(`file://`),name:J().optional(),_meta:$u(J(),Bu()).optional()}),am=Ud.extend({method:Z(`roots/list`),params:Bd.optional()}),om=Kd.extend({roots:Y(im)}),sm=Gd.extend({method:Z(`notifications/roots/list_changed`),params:Wd.optional()});qu([xf,gf,see,Lp,mp,dp,Jf,Xf,ep,ip,op,Mp,Op,Nf,Ff,If,Rf]),qu([sf,wf,yf,sm,Mf]),qu([af,qp,Jp,em,om,Pf,Lf,Af]),qu([xf,Kp,Zp,am,Nf,Ff,If,Rf]),qu([sf,wf,zp,cp,np,Np,wp,Mf,$p]),qu([af,vf,rm,Cp,fp,Yf,Zf,tp,Ap,kp,Pf,Lf,Af]);var cm=class e extends Error{constructor(e,t,n){super(`MCP error ${e}: ${t}`),this.code=e,this.data=n,this.name=`McpError`}static fromError(t,n,r){if(t===ef.UrlElicitationRequired&&r){let e=r;if(e.elicitations)return new lm(e.elicitations,n)}return new e(t,n,r)}},lm=class extends cm{constructor(e,t=`URL elicitation${e.length>1?`s`:``} required`){super(ef.UrlElicitationRequired,t,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}},um=du().superRefine((e,t)=>{if(!URL.canParse(e))return t.addIssue({code:Od.custom,message:`URL must be parseable`,fatal:!0}),Di}).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`}),dm=Gu({resource:J().url(),authorization_servers:Y(um).optional(),jwks_uri:J().url().optional(),scopes_supported:Y(J()).optional(),bearer_methods_supported:Y(J()).optional(),resource_signing_alg_values_supported:Y(J()).optional(),resource_name:J().optional(),resource_documentation:J().optional(),resource_policy_uri:J().url().optional(),resource_tos_uri:J().url().optional(),tls_client_certificate_bound_access_tokens:Mu().optional(),authorization_details_types_supported:Y(J()).optional(),dpop_signing_alg_values_supported:Y(J()).optional(),dpop_bound_access_tokens_required:Mu().optional()}),fm=Gu({issuer:J(),authorization_endpoint:um,token_endpoint:um,registration_endpoint:um.optional(),scopes_supported:Y(J()).optional(),response_types_supported:Y(J()),response_modes_supported:Y(J()).optional(),grant_types_supported:Y(J()).optional(),token_endpoint_auth_methods_supported:Y(J()).optional(),token_endpoint_auth_signing_alg_values_supported:Y(J()).optional(),service_documentation:um.optional(),revocation_endpoint:um.optional(),revocation_endpoint_auth_methods_supported:Y(J()).optional(),revocation_endpoint_auth_signing_alg_values_supported:Y(J()).optional(),introspection_endpoint:J().optional(),introspection_endpoint_auth_methods_supported:Y(J()).optional(),introspection_endpoint_auth_signing_alg_values_supported:Y(J()).optional(),code_challenge_methods_supported:Y(J()).optional(),client_id_metadata_document_supported:Mu().optional()}),cee=X({...Gu({issuer:J(),authorization_endpoint:um,token_endpoint:um,userinfo_endpoint:um.optional(),jwks_uri:um,registration_endpoint:um.optional(),scopes_supported:Y(J()).optional(),response_types_supported:Y(J()),response_modes_supported:Y(J()).optional(),grant_types_supported:Y(J()).optional(),acr_values_supported:Y(J()).optional(),subject_types_supported:Y(J()),id_token_signing_alg_values_supported:Y(J()),id_token_encryption_alg_values_supported:Y(J()).optional(),id_token_encryption_enc_values_supported:Y(J()).optional(),userinfo_signing_alg_values_supported:Y(J()).optional(),userinfo_encryption_alg_values_supported:Y(J()).optional(),userinfo_encryption_enc_values_supported:Y(J()).optional(),request_object_signing_alg_values_supported:Y(J()).optional(),request_object_encryption_alg_values_supported:Y(J()).optional(),request_object_encryption_enc_values_supported:Y(J()).optional(),token_endpoint_auth_methods_supported:Y(J()).optional(),token_endpoint_auth_signing_alg_values_supported:Y(J()).optional(),display_values_supported:Y(J()).optional(),claim_types_supported:Y(J()).optional(),claims_supported:Y(J()).optional(),service_documentation:J().optional(),claims_locales_supported:Y(J()).optional(),ui_locales_supported:Y(J()).optional(),claims_parameter_supported:Mu().optional(),request_parameter_supported:Mu().optional(),request_uri_parameter_supported:Mu().optional(),require_request_uri_registration:Mu().optional(),op_policy_uri:um.optional(),op_tos_uri:um.optional(),client_id_metadata_document_supported:Mu().optional()}).shape,...fm.pick({code_challenge_methods_supported:!0}).shape}),lee=X({access_token:J(),id_token:J().optional(),token_type:J(),expires_in:Ad().optional(),scope:J().optional(),refresh_token:J().optional()}).strip(),uee=X({error:J(),error_description:J().optional(),error_uri:J().optional()}),pm=um.optional().or(Z(``).transform(()=>void 0)),mm=X({redirect_uris:Y(um),token_endpoint_auth_method:J().optional(),grant_types:Y(J()).optional(),response_types:Y(J()).optional(),client_name:J().optional(),client_uri:um.optional(),logo_uri:pm,scope:J().optional(),contacts:Y(J()).optional(),tos_uri:pm,policy_uri:J().optional(),jwks_uri:um.optional(),jwks:Ru().optional(),software_id:J().optional(),software_version:J().optional(),software_statement:J().optional()}).strip(),hm=X({client_id:J(),client_secret:J().optional(),client_id_issued_at:Ou().optional(),client_secret_expires_at:Ou().optional()}).strip(),gm=mm.merge(hm);X({error:J(),error_description:J().optional()}).strip(),X({token:J(),token_type_hint:J().optional()}).strip();function _m(e){let t=typeof e==`string`?new URL(e):new URL(e.href);return t.hash=``,t}function vm({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 ym=class extends Error{constructor(e,t){super(e),this.errorUri=t,this.name=this.constructor.name}toResponseObject(){let e={error:this.errorCode,error_description:this.message};return this.errorUri&&(e.error_uri=this.errorUri),e}get errorCode(){return this.constructor.errorCode}},bm=class extends ym{};bm.errorCode=`invalid_request`;var xm=class extends ym{};xm.errorCode=`invalid_client`;var Sm=class extends ym{};Sm.errorCode=`invalid_grant`;var Cm=class extends ym{};Cm.errorCode=`unauthorized_client`;var wm=class extends ym{};wm.errorCode=`unsupported_grant_type`;var Tm=class extends ym{};Tm.errorCode=`invalid_scope`;var Em=class extends ym{};Em.errorCode=`access_denied`;var Dm=class extends ym{};Dm.errorCode=`server_error`;var Om=class extends ym{};Om.errorCode=`temporarily_unavailable`;var km=class extends ym{};km.errorCode=`unsupported_response_type`;var Am=class extends ym{};Am.errorCode=`unsupported_token_type`;var jm=class extends ym{};jm.errorCode=`invalid_token`;var Mm=class extends ym{};Mm.errorCode=`method_not_allowed`;var Nm=class extends ym{};Nm.errorCode=`too_many_requests`;var Pm=class extends ym{};Pm.errorCode=`invalid_client_metadata`;var Fm=class extends ym{};Fm.errorCode=`insufficient_scope`;var Im=class extends ym{};Im.errorCode=`invalid_target`;var dee={[bm.errorCode]:bm,[xm.errorCode]:xm,[Sm.errorCode]:Sm,[Cm.errorCode]:Cm,[wm.errorCode]:wm,[Tm.errorCode]:Tm,[Em.errorCode]:Em,[Dm.errorCode]:Dm,[Om.errorCode]:Om,[km.errorCode]:km,[Am.errorCode]:Am,[jm.errorCode]:jm,[Mm.errorCode]:Mm,[Nm.errorCode]:Nm,[Pm.errorCode]:Pm,[Fm.errorCode]:Fm,[Im.errorCode]:Im},Lm=class extends Error{constructor(e){super(e??`Unauthorized`)}};function fee(e){return[`client_secret_basic`,`client_secret_post`,`none`].includes(e)}var Rm=`code`,zm=`S256`;function Bm(e,t){let n=e.client_secret!==void 0;return`token_endpoint_auth_method`in e&&e.token_endpoint_auth_method&&fee(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 Vm(e,t,n,r){let{client_id:i,client_secret:a}=t;switch(e){case`client_secret_basic`:Hm(i,a,n);return;case`client_secret_post`:Um(i,a,r);return;case`none`:Wm(i,r);return;default:throw Error(`Unsupported client authentication method: ${e}`)}}function Hm(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 Um(e,t,n){n.set(`client_id`,e),t&&n.set(`client_secret`,t)}function Wm(e,t){t.set(`client_id`,e)}async function Gm(e){let t=e instanceof Response?e.status:void 0,n=e instanceof Response?await e.text():e;try{let{error:e,error_description:t,error_uri:r}=uee.parse(JSON.parse(n));return new(dee[e]||Dm)(t||``,r)}catch(e){return new Dm(`${t?`HTTP ${t}: `:``}Invalid OAuth error response: ${e}. Raw body: ${n}`)}}async function Km(e,t){try{return await qm(e,t)}catch(n){if(n instanceof xm||n instanceof Cm)return await e.invalidateCredentials?.(`all`),await qm(e,t);if(n instanceof Sm)return await e.invalidateCredentials?.(`tokens`),await qm(e,t);throw n}}async function qm(e,{serverUrl:t,authorizationCode:n,scope:r,resourceMetadataUrl:i,fetchFn:a}){let o=await e.discoveryState?.(),s,c,l,u=i;if(!u&&o?.resourceMetadataUrl&&(u=new URL(o.resourceMetadataUrl)),o?.authorizationServerUrl){if(c=o.authorizationServerUrl,s=o.resourceMetadata,l=o.authorizationServerMetadata??await ah(c,{fetchFn:a}),!s)try{s=await Qm(t,{resourceMetadataUrl:u},a)}catch{}(l!==o.authorizationServerMetadata||s!==o.resourceMetadata)&&await e.saveDiscoveryState?.({authorizationServerUrl:String(c),resourceMetadataUrl:u?.toString(),resourceMetadata:s,authorizationServerMetadata:l})}else{let n=await oh(t,{resourceMetadataUrl:u,fetchFn:a});c=n.authorizationServerUrl,l=n.authorizationServerMetadata,s=n.resourceMetadata,await e.saveDiscoveryState?.({authorizationServerUrl:String(c),resourceMetadataUrl:u?.toString(),resourceMetadata:s,authorizationServerMetadata:l})}let d=await Ym(t,e,s),f=r||s?.scopes_supported?.join(` `)||e.clientMetadata.scope,p=await Promise.resolve(e.clientInformation());if(!p){if(n!==void 0)throw Error(`Existing OAuth client information is required when exchanging an authorization code`);let t=l?.client_id_metadata_document_supported===!0,r=e.clientMetadataUrl;if(r&&!Jm(r))throw new Pm(`clientMetadataUrl must be a valid HTTPS URL with a non-root pathname, got: ${r}`);if(t&&r)p={client_id:r},await e.saveClientInformation?.(p);else{if(!e.saveClientInformation)throw Error(`OAuth client information must be saveable for dynamic registration`);let t=await fh(c,{metadata:l,clientMetadata:e.clientMetadata,scope:f,fetchFn:a});await e.saveClientInformation(t),p=t}}let m=!e.redirectUrl;if(n!==void 0||m){let t=await dh(e,c,{metadata:l,resource:d,authorizationCode:n,fetchFn:a});return await e.saveTokens(t),`AUTHORIZED`}let h=await e.tokens();if(h?.refresh_token)try{let t=await uh(c,{metadata:l,clientInformation:p,refreshToken:h.refresh_token,resource:d,addClientAuthentication:e.addClientAuthentication,fetchFn:a});return await e.saveTokens(t),`AUTHORIZED`}catch(e){if(!(!(e instanceof ym)||e instanceof Dm))throw e}let g=e.state?await e.state():void 0,{authorizationUrl:_,codeVerifier:v}=await sh(c,{metadata:l,clientInformation:p,state:g,redirectUrl:e.redirectUrl,scope:f,resource:d});return await e.saveCodeVerifier(v),await e.redirectToAuthorization(_),`REDIRECT`}function Jm(e){if(!e)return!1;try{let t=new URL(e);return t.protocol===`https:`&&t.pathname!==`/`}catch{return!1}}async function Ym(e,t,n){let r=_m(e);if(t.validateResourceURL)return await t.validateResourceURL(r,n?.resource);if(n){if(!vm({requestedResource:r,configuredResource:n.resource}))throw Error(`Protected resource ${n.resource} does not match expected ${r} (or origin)`);return new URL(n.resource)}}function Xm(e){let t=e.headers.get(`WWW-Authenticate`);if(!t)return{};let[n,r]=t.split(` `);if(n.toLowerCase()!==`bearer`||!r)return{};let i=Zm(e,`resource_metadata`)||void 0,a;if(i)try{a=new URL(i)}catch{}let o=Zm(e,`scope`)||void 0,s=Zm(e,`error`)||void 0;return{resourceMetadataUrl:a,scope:o,error:s}}function Zm(e,t){let n=e.headers.get(`WWW-Authenticate`);if(!n)return null;let r=RegExp(`${t}=(?:"([^"]+)"|([^\\s,]+))`),i=n.match(r);return i?i[1]||i[2]:null}async function Qm(e,t,n=fetch){let r=await rh(e,`oauth-protected-resource`,n,{protocolVersion:t?.protocolVersion,metadataUrl:t?.resourceMetadataUrl});if(!r||r.status===404)throw await r?.body?.cancel(),Error(`Resource server does not implement OAuth 2.0 Protected Resource Metadata.`);if(!r.ok)throw await r.body?.cancel(),Error(`HTTP ${r.status} trying to load well-known OAuth protected resource metadata.`);return dm.parse(await r.json())}async function $m(e,t,n=fetch){try{return await n(e,{headers:t})}catch(r){if(r instanceof TypeError)return t?$m(e,void 0,n):void 0;throw r}}function eh(e,t=``,n={}){return t.endsWith(`/`)&&(t=t.slice(0,-1)),n.prependPathname?`${t}/.well-known/${e}`:`/.well-known/${e}${t}`}async function th(e,t,n=fetch){return await $m(e,{"MCP-Protocol-Version":t},n)}function nh(e,t){return!e||e.status>=400&&e.status<500&&t!==`/`}async function rh(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=eh(t,i.pathname);o=new URL(e,r?.metadataServerUrl??i),o.search=i.search}let s=await th(o,a,n);return!r?.metadataUrl&&nh(s,i.pathname)&&(s=await th(new URL(`/.well-known/${t}`,i),a,n)),s}function ih(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`}),r.push({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`}),r.push({url:new URL(`/.well-known/openid-configuration${i}`,t.origin),type:`oidc`}),r.push({url:new URL(`${i}/.well-known/openid-configuration`,t.origin),type:`oidc`}),r}async function ah(e,{fetchFn:t=fetch,protocolVersion:n=jd}={}){let r={"MCP-Protocol-Version":n,Accept:`application/json`},i=ih(e);for(let{url:e,type:n}of i){let i=await $m(e,r,t);if(i){if(!i.ok){if(await i.body?.cancel(),i.status>=400&&i.status<500)continue;throw Error(`HTTP ${i.status} trying to load ${n===`oauth`?`OAuth`:`OpenID provider`} metadata from ${e}`)}return n===`oauth`?fm.parse(await i.json()):cee.parse(await i.json())}}}async function oh(e,t){let n,r;try{n=await Qm(e,{resourceMetadataUrl:t?.resourceMetadataUrl},t?.fetchFn),n.authorization_servers&&n.authorization_servers.length>0&&(r=n.authorization_servers[0])}catch{}r||=String(new URL(`/`,e));let i=await ah(r,{fetchFn:t?.fetchFn});return{authorizationServerUrl:r,authorizationServerMetadata:i,resourceMetadata:n}}async function sh(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(Rm))throw Error(`Incompatible auth server: does not support response type ${Rm}`);if(t.code_challenge_methods_supported&&!t.code_challenge_methods_supported.includes(zm))throw Error(`Incompatible auth server: does not support code challenge method ${zm}`)}else s=new URL(`/authorize`,e);let c=await Ei(),l=c.code_verifier,u=c.code_challenge;return s.searchParams.set(`response_type`,Rm),s.searchParams.set(`client_id`,n.client_id),s.searchParams.set(`code_challenge`,u),s.searchParams.set(`code_challenge_method`,zm),s.searchParams.set(`redirect_uri`,String(r)),a&&s.searchParams.set(`state`,a),i&&s.searchParams.set(`scope`,i),i?.includes(`offline_access`)&&s.searchParams.append(`prompt`,`consent`),o&&s.searchParams.set(`resource`,o.href),{authorizationUrl:s,codeVerifier:l}}function ch(e,t,n){return new URLSearchParams({grant_type:`authorization_code`,code:e,code_verifier:t,redirect_uri:String(n)})}async function lh(e,{metadata:t,tokenRequestParams:n,clientInformation:r,addClientAuthentication:i,resource:a,fetchFn:o}){let s=t?.token_endpoint?new URL(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&&Vm(Bm(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 Gm(l);return lee.parse(await l.json())}async function uh(e,{metadata:t,clientInformation:n,refreshToken:r,resource:i,addClientAuthentication:a,fetchFn:o}){return{refresh_token:r,...await lh(e,{metadata:t,tokenRequestParams:new URLSearchParams({grant_type:`refresh_token`,refresh_token:r}),clientInformation:n,addClientAuthentication:a,resource:i,fetchFn:o})}}async function dh(e,t,{metadata:n,resource:r,authorizationCode:i,fetchFn:a}={}){let o=e.clientMetadata.scope,s;if(e.prepareTokenRequest&&(s=await e.prepareTokenRequest(o)),!s){if(!i)throw Error(`Either provider.prepareTokenRequest() or authorizationCode is required`);if(!e.redirectUrl)throw Error(`redirectUrl is required for authorization_code flow`);s=ch(i,await e.codeVerifier(),e.redirectUrl)}let c=await e.clientInformation();return lh(t,{metadata:n,tokenRequestParams:s,clientInformation:c??void 0,addClientAuthentication:e.addClientAuthentication,resource:r,fetchFn:a})}async function fh(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=await(i??fetch)(a,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({...n,...r===void 0?{}:{scope:r}})});if(!o.ok)throw await Gm(o);return gm.parse(await o.json())}var ph=typeof global==`object`&&global&&global.Object===Object&&global,mh=typeof self==`object`&&self&&self.Object===Object&&self,hh=ph||mh||Function(`return this`)(),gh=hh.Symbol,_h=Object.prototype,vh=_h.hasOwnProperty,yh=_h.toString,bh=gh?gh.toStringTag:void 0;function xh(e){var t=vh.call(e,bh),n=e[bh];try{e[bh]=void 0;var r=!0}catch{}var i=yh.call(e);return r&&(t?e[bh]=n:delete e[bh]),i}var Sh=Object.prototype.toString;function Ch(e){return Sh.call(e)}var wh=`[object Null]`,Th=`[object Undefined]`,Eh=gh?gh.toStringTag:void 0;function Dh(e){return e==null?e===void 0?Th:wh:Eh&&Eh in Object(e)?xh(e):Ch(e)}function Oh(e){return typeof e==`object`&&!!e}var kh=`[object Symbol]`;function Ah(e){return typeof e==`symbol`||Oh(e)&&Dh(e)==kh}function jh(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 Mh=Array.isArray,Nh=1/0,Ph=gh?gh.prototype:void 0,Fh=Ph?Ph.toString:void 0;function Ih(e){if(typeof e==`string`)return e;if(Mh(e))return jh(e,Ih)+``;if(Ah(e))return Fh?Fh.call(e):``;var t=e+``;return t==`0`&&1/e==-Nh?`-0`:t}var Lh=/\s/;function Rh(e){for(var t=e.length;t--&&Lh.test(e.charAt(t)););return t}var zh=/^\s+/;function Bh(e){return e&&e.slice(0,Rh(e)+1).replace(zh,``)}function Vh(e){var t=typeof e;return e!=null&&(t==`object`||t==`function`)}var Hh=NaN,Uh=/^[-+]0x[0-9a-f]+$/i,Wh=/^0b[01]+$/i,Gh=/^0o[0-7]+$/i,Kh=parseInt;function qh(e){if(typeof e==`number`)return e;if(Ah(e))return Hh;if(Vh(e)){var t=typeof e.valueOf==`function`?e.valueOf():e;e=Vh(t)?t+``:t}if(typeof e!=`string`)return e===0?e:+e;e=Bh(e);var n=Wh.test(e);return n||Gh.test(e)?Kh(e.slice(2),n?2:8):Uh.test(e)?Hh:+e}var Jh=1/0,pee=17976931348623157e292;function mee(e){return e?(e=qh(e),e===Jh||e===-Jh?(e<0?-1:1)*pee:e===e?e:0):e===0?e:0}function Yh(e){var t=mee(e),n=t%1;return t===t?n?t-n:t:0}function Xh(e){return e}var hee=`[object AsyncFunction]`,gee=`[object Function]`,_ee=`[object GeneratorFunction]`,vee=`[object Proxy]`;function Zh(e){if(!Vh(e))return!1;var t=Dh(e);return t==gee||t==_ee||t==hee||t==vee}var Qh=hh[`__core-js_shared__`],$h=function(){var e=/[^.]+$/.exec(Qh&&Qh.keys&&Qh.keys.IE_PROTO||``);return e?`Symbol(src)_1.`+e:``}();function yee(e){return!!$h&&$h in e}var bee=Function.prototype.toString;function eg(e){if(e!=null){try{return bee.call(e)}catch{}try{return e+``}catch{}}return``}var xee=/[\\^$.*+?()[\]{}|]/g,See=/^\[object .+?Constructor\]$/,Cee=Function.prototype,wee=Object.prototype,Tee=Cee.toString,Eee=wee.hasOwnProperty,Dee=RegExp(`^`+Tee.call(Eee).replace(xee,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`);function Oee(e){return!Vh(e)||yee(e)?!1:(Zh(e)?Dee:See).test(eg(e))}function kee(e,t){return e?.[t]}function tg(e,t){var n=kee(e,t);return Oee(n)?n:void 0}var ng=tg(hh,`WeakMap`),rg=Object.create,ig=function(){function e(){}return function(t){if(!Vh(t))return{};if(rg)return rg(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function Aee(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 ag(){}function og(e,t){var n=-1,r=e.length;for(t||=Array(r);++n<r;)t[n]=e[n];return t}var jee=800,Mee=16,Nee=Date.now;function Pee(e){var t=0,n=0;return function(){var r=Nee(),i=Mee-(r-n);if(n=r,i>0){if(++t>=jee)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function Fee(e){return function(){return e}}var sg=function(){try{var e=tg(Object,`defineProperty`);return e({},``,{}),e}catch{}}(),cg=Pee(sg?function(e,t){return sg(e,`toString`,{configurable:!0,enumerable:!1,value:Fee(t),writable:!0})}:Xh);function lg(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}function ug(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 dg(e){return e!==e}function fg(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}function pg(e,t,n){return t===t?fg(e,t,n):ug(e,dg,n)}function mg(e,t){return!!(e!=null&&e.length)&&pg(e,t,0)>-1}var hg=9007199254740991,gg=/^(?:0|[1-9]\d*)$/;function _g(e,t){var n=typeof e;return t??=hg,!!t&&(n==`number`||n!=`symbol`&&gg.test(e))&&e>-1&&e%1==0&&e<t}function vg(e,t,n){t==`__proto__`&&sg?sg(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function yg(e,t){return e===t||e!==e&&t!==t}var bg=Object.prototype.hasOwnProperty;function xg(e,t,n){var r=e[t];(!(bg.call(e,t)&&yg(r,n))||n===void 0&&!(t in e))&&vg(e,t,n)}function Sg(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?vg(n,s,c):xg(n,s,c)}return n}var Cg=Math.max;function wg(e,t,n){return t=Cg(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,a=Cg(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),Aee(e,this,s)}}function Tg(e,t){return cg(wg(e,t,Xh),e+``)}var Iee=9007199254740991;function Eg(e){return typeof e==`number`&&e>-1&&e%1==0&&e<=Iee}function Dg(e){return e!=null&&Eg(e.length)&&!Zh(e)}function Lee(e,t,n){if(!Vh(n))return!1;var r=typeof t;return(r==`number`?Dg(n)&&_g(t,n.length):r==`string`&&t in n)?yg(n[t],e):!1}function Og(e){return Tg(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&&Lee(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 kg=Object.prototype;function Ag(e){var t=e&&e.constructor;return e===(typeof t==`function`&&t.prototype||kg)}function jg(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var Mg=`[object Arguments]`;function Ng(e){return Oh(e)&&Dh(e)==Mg}var Pg=Object.prototype,Fg=Pg.hasOwnProperty,Ig=Pg.propertyIsEnumerable,Lg=Ng(function(){return arguments}())?Ng:function(e){return Oh(e)&&Fg.call(e,`callee`)&&!Ig.call(e,`callee`)};function Rg(){return!1}var zg=typeof exports==`object`&&exports&&!exports.nodeType&&exports,Bg=zg&&typeof module==`object`&&module&&!module.nodeType&&module,Vg=Bg&&Bg.exports===zg?hh.Buffer:void 0,Hg=(Vg?Vg.isBuffer:void 0)||Rg,Ug=`[object Arguments]`,Wg=`[object Array]`,Gg=`[object Boolean]`,Kg=`[object Date]`,qg=`[object Error]`,Jg=`[object Function]`,Yg=`[object Map]`,Xg=`[object Number]`,Zg=`[object Object]`,Qg=`[object RegExp]`,$g=`[object Set]`,e_=`[object String]`,t_=`[object WeakMap]`,n_=`[object ArrayBuffer]`,r_=`[object DataView]`,i_=`[object Float32Array]`,a_=`[object Float64Array]`,o_=`[object Int8Array]`,s_=`[object Int16Array]`,c_=`[object Int32Array]`,l_=`[object Uint8Array]`,Ree=`[object Uint8ClampedArray]`,u_=`[object Uint16Array]`,d_=`[object Uint32Array]`,f_={};f_[i_]=f_[a_]=f_[o_]=f_[s_]=f_[c_]=f_[l_]=f_[Ree]=f_[u_]=f_[d_]=!0,f_[Ug]=f_[Wg]=f_[n_]=f_[Gg]=f_[r_]=f_[Kg]=f_[qg]=f_[Jg]=f_[Yg]=f_[Xg]=f_[Zg]=f_[Qg]=f_[$g]=f_[e_]=f_[t_]=!1;function p_(e){return Oh(e)&&Eg(e.length)&&!!f_[Dh(e)]}function m_(e){return function(t){return e(t)}}var h_=typeof exports==`object`&&exports&&!exports.nodeType&&exports,g_=h_&&typeof module==`object`&&module&&!module.nodeType&&module,__=g_&&g_.exports===h_&&ph.process,v_=function(){try{return g_&&g_.require&&g_.require(`util`).types||__&&__.binding&&__.binding(`util`)}catch{}}(),y_=v_&&v_.isTypedArray,b_=y_?m_(y_):p_,x_=Object.prototype.hasOwnProperty;function S_(e,t){var n=Mh(e),r=!n&&Lg(e),i=!n&&!r&&Hg(e),a=!n&&!r&&!i&&b_(e),o=n||r||i||a,s=o?jg(e.length,String):[],c=s.length;for(var l in e)(t||x_.call(e,l))&&!(o&&(l==`length`||i&&(l==`offset`||l==`parent`)||a&&(l==`buffer`||l==`byteLength`||l==`byteOffset`)||_g(l,c)))&&s.push(l);return s}function C_(e,t){return function(n){return e(t(n))}}var w_=C_(Object.keys,Object),T_=Object.prototype.hasOwnProperty;function E_(e){if(!Ag(e))return w_(e);var t=[];for(var n in Object(e))T_.call(e,n)&&n!=`constructor`&&t.push(n);return t}function D_(e){return Dg(e)?S_(e):E_(e)}var zee=Object.prototype.hasOwnProperty,Bee=Og(function(e,t){if(Ag(t)||Dg(t)){Sg(t,D_(t),e);return}for(var n in t)zee.call(t,n)&&xg(e,n,t[n])});function Vee(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var Hee=Object.prototype.hasOwnProperty;function Uee(e){if(!Vh(e))return Vee(e);var t=Ag(e),n=[];for(var r in e)r==`constructor`&&(t||!Hee.call(e,r))||n.push(r);return n}function O_(e){return Dg(e)?S_(e,!0):Uee(e)}var Wee=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Gee=/^\w*$/;function k_(e,t){if(Mh(e))return!1;var n=typeof e;return n==`number`||n==`symbol`||n==`boolean`||e==null||Ah(e)?!0:Gee.test(e)||!Wee.test(e)||t!=null&&e in Object(t)}var A_=tg(Object,`create`);function Kee(){this.__data__=A_?A_(null):{},this.size=0}function j_(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var M_=`__lodash_hash_undefined__`,N_=Object.prototype.hasOwnProperty;function P_(e){var t=this.__data__;if(A_){var n=t[e];return n===M_?void 0:n}return N_.call(t,e)?t[e]:void 0}var F_=Object.prototype.hasOwnProperty;function I_(e){var t=this.__data__;return A_?t[e]!==void 0:F_.call(t,e)}var L_=`__lodash_hash_undefined__`;function R_(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=A_&&t===void 0?L_:t,this}function z_(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])}}z_.prototype.clear=Kee,z_.prototype.delete=j_,z_.prototype.get=P_,z_.prototype.has=I_,z_.prototype.set=R_;function B_(){this.__data__=[],this.size=0}function V_(e,t){for(var n=e.length;n--;)if(yg(e[n][0],t))return n;return-1}var H_=Array.prototype.splice;function U_(e){var t=this.__data__,n=V_(t,e);return n<0?!1:(n==t.length-1?t.pop():H_.call(t,n,1),--this.size,!0)}function W_(e){var t=this.__data__,n=V_(t,e);return n<0?void 0:t[n][1]}function G_(e){return V_(this.__data__,e)>-1}function K_(e,t){var n=this.__data__,r=V_(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function q_(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])}}q_.prototype.clear=B_,q_.prototype.delete=U_,q_.prototype.get=W_,q_.prototype.has=G_,q_.prototype.set=K_;var J_=tg(hh,`Map`);function Y_(){this.size=0,this.__data__={hash:new z_,map:new(J_||q_),string:new z_}}function X_(e){var t=typeof e;return t==`string`||t==`number`||t==`symbol`||t==`boolean`?e!==`__proto__`:e===null}function Z_(e,t){var n=e.__data__;return X_(t)?n[typeof t==`string`?`string`:`hash`]:n.map}function Q_(e){var t=Z_(this,e).delete(e);return this.size-=t?1:0,t}function $_(e){return Z_(this,e).get(e)}function ev(e){return Z_(this,e).has(e)}function tv(e,t){var n=Z_(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function nv(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])}}nv.prototype.clear=Y_,nv.prototype.delete=Q_,nv.prototype.get=$_,nv.prototype.has=ev,nv.prototype.set=tv;var rv=`Expected a function`;function iv(e,t){if(typeof e!=`function`||t!=null&&typeof t!=`function`)throw TypeError(rv);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(iv.Cache||nv),n}iv.Cache=nv;var av=500;function ov(e){var t=iv(e,function(e){return n.size===av&&n.clear(),e}),n=t.cache;return t}var sv=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,cv=/\\(\\)?/g,lv=ov(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(``),e.replace(sv,function(e,n,r,i){t.push(r?i.replace(cv,`$1`):n||e)}),t});function uv(e){return e==null?``:Ih(e)}function dv(e,t){return Mh(e)?e:k_(e,t)?[e]:lv(uv(e))}var fv=1/0;function pv(e){if(typeof e==`string`||Ah(e))return e;var t=e+``;return t==`0`&&1/e==-fv?`-0`:t}function mv(e,t){t=dv(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[pv(t[n++])];return n&&n==r?e:void 0}function Q(e,t,n){var r=e==null?void 0:mv(e,t);return r===void 0?n:r}function hv(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var gv=gh?gh.isConcatSpreadable:void 0;function _v(e){return Mh(e)||Lg(e)||!!(gv&&e&&e[gv])}function vv(e,t,n,r,i){var a=-1,o=e.length;for(n||=_v,i||=[];++a<o;){var s=e[a];t>0&&n(s)?t>1?vv(s,t-1,n,r,i):hv(i,s):r||(i[i.length]=s)}return i}function yv(e){return e!=null&&e.length?vv(e,1):[]}function bv(e){return cg(wg(e,void 0,yv),e+``)}var xv=C_(Object.getPrototypeOf,Object),Sv=`[object Object]`,Cv=Function.prototype,wv=Object.prototype,Tv=Cv.toString,Ev=wv.hasOwnProperty,Dv=Tv.call(Object);function Ov(e){if(!Oh(e)||Dh(e)!=Sv)return!1;var t=xv(e);if(t===null)return!0;var n=Ev.call(t,`constructor`)&&t.constructor;return typeof n==`function`&&n instanceof n&&Tv.call(n)==Dv}function kv(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 Av(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 jv(){this.__data__=new q_,this.size=0}function Mv(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function Nv(e){return this.__data__.get(e)}function Pv(e){return this.__data__.has(e)}var Fv=200;function Iv(e,t){var n=this.__data__;if(n instanceof q_){var r=n.__data__;if(!J_||r.length<Fv-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new nv(r)}return n.set(e,t),this.size=n.size,this}function Lv(e){this.size=(this.__data__=new q_(e)).size}Lv.prototype.clear=jv,Lv.prototype.delete=Mv,Lv.prototype.get=Nv,Lv.prototype.has=Pv,Lv.prototype.set=Iv;function Rv(e,t){return e&&Sg(t,D_(t),e)}function zv(e,t){return e&&Sg(t,O_(t),e)}var Bv=typeof exports==`object`&&exports&&!exports.nodeType&&exports,Vv=Bv&&typeof module==`object`&&module&&!module.nodeType&&module,Hv=Vv&&Vv.exports===Bv?hh.Buffer:void 0,Uv=Hv?Hv.allocUnsafe:void 0;function Wv(e,t){if(t)return e.slice();var n=e.length,r=Uv?Uv(n):new e.constructor(n);return e.copy(r),r}function Gv(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 Kv(){return[]}var qv=Object.prototype.propertyIsEnumerable,Jv=Object.getOwnPropertySymbols,Yv=Jv?function(e){return e==null?[]:(e=Object(e),Gv(Jv(e),function(t){return qv.call(e,t)}))}:Kv;function Xv(e,t){return Sg(e,Yv(e),t)}var Zv=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)hv(t,Yv(e)),e=xv(e);return t}:Kv;function Qv(e,t){return Sg(e,Zv(e),t)}function $v(e,t,n){var r=t(e);return Mh(e)?r:hv(r,n(e))}function ey(e){return $v(e,D_,Yv)}function ty(e){return $v(e,O_,Zv)}var ny=tg(hh,`DataView`),ry=tg(hh,`Promise`),iy=tg(hh,`Set`),ay=`[object Map]`,qee=`[object Object]`,oy=`[object Promise]`,sy=`[object Set]`,cy=`[object WeakMap]`,ly=`[object DataView]`,Jee=eg(ny),Yee=eg(J_),Xee=eg(ry),Zee=eg(iy),Qee=eg(ng),uy=Dh;(ny&&uy(new ny(new ArrayBuffer(1)))!=ly||J_&&uy(new J_)!=ay||ry&&uy(ry.resolve())!=oy||iy&&uy(new iy)!=sy||ng&&uy(new ng)!=cy)&&(uy=function(e){var t=Dh(e),n=t==qee?e.constructor:void 0,r=n?eg(n):``;if(r)switch(r){case Jee:return ly;case Yee:return ay;case Xee:return oy;case Zee:return sy;case Qee:return cy}return t});var dy=uy,$ee=Object.prototype.hasOwnProperty;function ete(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]==`string`&&$ee.call(e,`index`)&&(n.index=e.index,n.input=e.input),n}var fy=hh.Uint8Array;function py(e){var t=new e.constructor(e.byteLength);return new fy(t).set(new fy(e)),t}function tte(e,t){var n=t?py(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var nte=/\w*$/;function rte(e){var t=new e.constructor(e.source,nte.exec(e));return t.lastIndex=e.lastIndex,t}var my=gh?gh.prototype:void 0,hy=my?my.valueOf:void 0;function ite(e){return hy?Object(hy.call(e)):{}}function gy(e,t){var n=t?py(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var ate=`[object Boolean]`,_y=`[object Date]`,vy=`[object Map]`,yy=`[object Number]`,by=`[object RegExp]`,xy=`[object Set]`,Sy=`[object String]`,Cy=`[object Symbol]`,wy=`[object ArrayBuffer]`,Ty=`[object DataView]`,Ey=`[object Float32Array]`,Dy=`[object Float64Array]`,Oy=`[object Int8Array]`,ky=`[object Int16Array]`,Ay=`[object Int32Array]`,jy=`[object Uint8Array]`,My=`[object Uint8ClampedArray]`,Ny=`[object Uint16Array]`,Py=`[object Uint32Array]`;function Fy(e,t,n){var r=e.constructor;switch(t){case wy:return py(e);case ate:case _y:return new r(+e);case Ty:return tte(e,n);case Ey:case Dy:case Oy:case ky:case Ay:case jy:case My:case Ny:case Py:return gy(e,n);case vy:return new r;case yy:case Sy:return new r(e);case by:return rte(e);case xy:return new r;case Cy:return ite(e)}}function Iy(e){return typeof e.constructor==`function`&&!Ag(e)?ig(xv(e)):{}}var Ly=`[object Map]`;function Ry(e){return Oh(e)&&dy(e)==Ly}var zy=v_&&v_.isMap,By=zy?m_(zy):Ry,Vy=`[object Set]`;function Hy(e){return Oh(e)&&dy(e)==Vy}var Uy=v_&&v_.isSet,Wy=Uy?m_(Uy):Hy,Gy=1,Ky=2,qy=4,Jy=`[object Arguments]`,Yy=`[object Array]`,Xy=`[object Boolean]`,Zy=`[object Date]`,Qy=`[object Error]`,$y=`[object Function]`,eb=`[object GeneratorFunction]`,tb=`[object Map]`,nb=`[object Number]`,rb=`[object Object]`,ib=`[object RegExp]`,ab=`[object Set]`,ob=`[object String]`,sb=`[object Symbol]`,cb=`[object WeakMap]`,lb=`[object ArrayBuffer]`,ub=`[object DataView]`,db=`[object Float32Array]`,fb=`[object Float64Array]`,pb=`[object Int8Array]`,mb=`[object Int16Array]`,hb=`[object Int32Array]`,gb=`[object Uint8Array]`,_b=`[object Uint8ClampedArray]`,vb=`[object Uint16Array]`,yb=`[object Uint32Array]`,bb={};bb[Jy]=bb[Yy]=bb[lb]=bb[ub]=bb[Xy]=bb[Zy]=bb[db]=bb[fb]=bb[pb]=bb[mb]=bb[hb]=bb[tb]=bb[nb]=bb[rb]=bb[ib]=bb[ab]=bb[ob]=bb[sb]=bb[gb]=bb[_b]=bb[vb]=bb[yb]=!0,bb[Qy]=bb[$y]=bb[cb]=!1;function xb(e,t,n,r,i,a){var o,s=t&Gy,c=t&Ky,l=t&qy;if(n&&(o=i?n(e,r,i,a):n(e)),o!==void 0)return o;if(!Vh(e))return e;var u=Mh(e);if(u){if(o=ete(e),!s)return og(e,o)}else{var d=dy(e),f=d==$y||d==eb;if(Hg(e))return Wv(e,s);if(d==rb||d==Jy||f&&!i){if(o=c||f?{}:Iy(e),!s)return c?Qv(e,zv(o,e)):Xv(e,Rv(o,e))}else{if(!bb[d])return i?e:{};o=Fy(e,d,s)}}a||=new Lv;var p=a.get(e);if(p)return p;a.set(e,o),Wy(e)?e.forEach(function(r){o.add(xb(r,t,n,r,e,a))}):By(e)&&e.forEach(function(r,i){o.set(i,xb(r,t,n,i,e,a))});var m=u?void 0:(l?c?ty:ey:c?O_:D_)(e);return lg(m||e,function(r,i){m&&(i=r,r=e[i]),xg(o,i,xb(r,t,n,i,e,a))}),o}var Sb=1,Cb=4;function wb(e){return xb(e,Sb|Cb)}var Tb=`__lodash_hash_undefined__`;function Eb(e){return this.__data__.set(e,Tb),this}function Db(e){return this.__data__.has(e)}function Ob(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new nv;++t<n;)this.add(e[t])}Ob.prototype.add=Ob.prototype.push=Eb,Ob.prototype.has=Db;function kb(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 Ab(e,t){return e.has(t)}var jb=1,Mb=2;function Nb(e,t,n,r,i,a){var o=n&jb,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&Mb?new Ob: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(!kb(t,function(e,t){if(!Ab(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 Pb(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function Fb(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}var Ib=1,Lb=2,Rb=`[object Boolean]`,zb=`[object Date]`,Bb=`[object Error]`,Vb=`[object Map]`,Hb=`[object Number]`,Ub=`[object RegExp]`,Wb=`[object Set]`,Gb=`[object String]`,Kb=`[object Symbol]`,qb=`[object ArrayBuffer]`,Jb=`[object DataView]`,Yb=gh?gh.prototype:void 0,Xb=Yb?Yb.valueOf:void 0;function Zb(e,t,n,r,i,a,o){switch(n){case Jb:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case qb:return!(e.byteLength!=t.byteLength||!a(new fy(e),new fy(t)));case Rb:case zb:case Hb:return yg(+e,+t);case Bb:return e.name==t.name&&e.message==t.message;case Ub:case Gb:return e==t+``;case Vb:var s=Pb;case Wb:var c=r&Ib;if(s||=Fb,e.size!=t.size&&!c)return!1;var l=o.get(e);if(l)return l==t;r|=Lb,o.set(e,t);var u=Nb(s(e),s(t),r,i,a,o);return o.delete(e),u;case Kb:if(Xb)return Xb.call(e)==Xb.call(t)}return!1}var Qb=1,$b=Object.prototype.hasOwnProperty;function ex(e,t,n,r,i,a){var o=n&Qb,s=ey(e),c=s.length;if(c!=ey(t).length&&!o)return!1;for(var l=c;l--;){var u=s[l];if(!(o?u in t:$b.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 tx=1,nx=`[object Arguments]`,rx=`[object Array]`,ix=`[object Object]`,ax=Object.prototype.hasOwnProperty;function ox(e,t,n,r,i,a){var o=Mh(e),s=Mh(t),c=o?rx:dy(e),l=s?rx:dy(t);c=c==nx?ix:c,l=l==nx?ix:l;var u=c==ix,d=l==ix,f=c==l;if(f&&Hg(e)){if(!Hg(t))return!1;o=!0,u=!1}if(f&&!u)return a||=new Lv,o||b_(e)?Nb(e,t,n,r,i,a):Zb(e,t,c,n,r,i,a);if(!(n&tx)){var p=u&&ax.call(e,`__wrapped__`),m=d&&ax.call(t,`__wrapped__`);if(p||m){var h=p?e.value():e,g=m?t.value():t;return a||=new Lv,i(h,g,n,r,a)}}return f?(a||=new Lv,ex(e,t,n,r,i,a)):!1}function sx(e,t,n,r,i){return e===t?!0:e==null||t==null||!Oh(e)&&!Oh(t)?e!==e&&t!==t:ox(e,t,n,r,sx,i)}var cx=1,lx=2;function ux(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 Lv;if(r)var f=r(l,u,c,e,t,d);if(!(f===void 0?sx(u,l,cx|lx,r,d):f))return!1}}return!0}function dx(e){return e===e&&!Vh(e)}function fx(e){for(var t=D_(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,dx(i)]}return t}function px(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function mx(e){var t=fx(e);return t.length==1&&t[0][2]?px(t[0][0],t[0][1]):function(n){return n===e||ux(n,e,t)}}function hx(e,t){return e!=null&&t in Object(e)}function gx(e,t,n){t=dv(t,e);for(var r=-1,i=t.length,a=!1;++r<i;){var o=pv(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&&Eg(i)&&_g(o,i)&&(Mh(e)||Lg(e)))}function _x(e,t){return e!=null&&gx(e,t,hx)}var vx=1,yx=2;function bx(e,t){return k_(e)&&dx(t)?px(pv(e),t):function(n){var r=Q(n,e);return r===void 0&&r===t?_x(n,e):sx(t,r,vx|yx)}}function xx(e){return function(t){return t?.[e]}}function Sx(e){return function(t){return mv(t,e)}}function Cx(e){return k_(e)?xx(pv(e)):Sx(e)}function wx(e){return typeof e==`function`?e:e==null?Xh:typeof e==`object`?Mh(e)?bx(e[0],e[1]):mx(e):Cx(e)}function Tx(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 Ex=Tx();function Dx(e,t){return e&&Ex(e,t,D_)}function Ox(e,t){return function(n,r){if(n==null)return n;if(!Dg(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 kx=Ox(Dx);function Ax(e,t,n){(n!==void 0&&!yg(e[t],n)||n===void 0&&!(t in e))&&vg(e,t,n)}function jx(e){return Oh(e)&&Dg(e)}function Mx(e,t){if(!(t===`constructor`&&typeof e[t]==`function`)&&t!=`__proto__`)return e[t]}function Nx(e){return Sg(e,O_(e))}function Px(e,t,n,r,i,a,o){var s=Mx(e,n),c=Mx(t,n),l=o.get(c);if(l){Ax(e,n,l);return}var u=a?a(s,c,n+``,e,t,o):void 0,d=u===void 0;if(d){var f=Mh(c),p=!f&&Hg(c),m=!f&&!p&&b_(c);u=c,f||p||m?Mh(s)?u=s:jx(s)?u=og(s):p?(d=!1,u=Wv(c,!0)):m?(d=!1,u=gy(c,!0)):u=[]:Ov(c)||Lg(c)?(u=s,Lg(s)?u=Nx(s):(!Vh(s)||Zh(s))&&(u=Iy(c))):d=!1}d&&(o.set(c,u),i(u,c,r,a,o),o.delete(c)),Ax(e,n,u)}function Fx(e,t,n,r,i){e!==t&&Ex(t,function(a,o){if(i||=new Lv,Vh(a))Px(e,t,o,n,Fx,r,i);else{var s=r?r(Mx(e,o),a,o+``,e,t,i):void 0;s===void 0&&(s=a),Ax(e,o,s)}},O_)}function Ix(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 Lx=200;function Rx(e,t,n,r){var i=-1,a=mg,o=!0,s=e.length,c=[],l=t.length;if(!s)return c;n&&(t=jh(t,m_(n))),r?(a=Ix,o=!1):t.length>=Lx&&(a=Ab,o=!1,t=new Ob(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 zx=Tg(function(e,t){return jx(e)?Rx(e,vv(t,1,jx,!0)):[]});function Bx(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}function Vx(e){return typeof e==`function`?e:Xh}function Hx(e,t){return(Mh(e)?lg:kx)(e,Vx(t))}var Ux=1/0;function Wx(e){return e!=null&&e.length?vv(e,Ux):[]}var Gx=Object.prototype.hasOwnProperty;function Kx(e,t){return e!=null&&Gx.call(e,t)}function qx(e,t){return e!=null&&gx(e,t,Kx)}var Jx=`[object String]`;function Yx(e){return typeof e==`string`||!Mh(e)&&Oh(e)&&Dh(e)==Jx}function Xx(e,t){return jh(t,function(t){return e[t]})}function Zx(e){return e==null?[]:Xx(e,D_(e))}var Qx=Math.max;function $x(e,t,n,r){e=Dg(e)?e:Zx(e),n=n&&!r?Yh(n):0;var i=e.length;return n<0&&(n=Qx(i+n,0)),Yx(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&pg(e,t,n)>-1}var eS=Math.min;function tS(e,t,n){for(var r=n?Ix:mg,i=e[0].length,a=e.length,o=a,s=Array(a),c=1/0,l=[];o--;){var u=e[o];o&&t&&(u=jh(u,m_(t))),c=eS(u.length,c),s[o]=!n&&(t||i>=120&&u.length>=120)?new Ob(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?Ab(f,m):r(l,m,n))){for(o=a;--o;){var h=s[o];if(!(h?Ab(h,m):r(e[o],m,n)))continue outer}f&&f.push(m),l.push(p)}}return l}function nS(e){return jx(e)?e:[]}var rS=Tg(function(e){var t=jh(e,nS);return t.length&&t[0]===e[0]?tS(t):[]});function iS(e,t){return t.length<2?e:mv(e,kv(t,0,-1))}var aS=`[object Map]`,oS=`[object Set]`,sS=Object.prototype.hasOwnProperty;function cS(e){if(e==null)return!0;if(Dg(e)&&(Mh(e)||typeof e==`string`||typeof e.splice==`function`||Hg(e)||b_(e)||Lg(e)))return!e.length;var t=dy(e);if(t==aS||t==oS)return!e.size;if(Ag(e))return!E_(e).length;for(var n in e)if(sS.call(e,n))return!1;return!0}function lS(e,t){return sx(e,t)}function uS(e,t,n){n=typeof n==`function`?n:void 0;var r=n?n(e,t):void 0;return r===void 0?sx(e,t,void 0,n):!!r}var dS=`[object Number]`;function fS(e){return typeof e==`number`||Oh(e)&&Dh(e)==dS}function pS(e){return e==null}function mS(e){return e===void 0}var hS=Og(function(e,t,n){Fx(e,t,n)}),gS=Object.prototype.hasOwnProperty;function _S(e,t){t=dv(t,e);var n=-1,r=t.length;if(!r)return!0;for(;++n<r;){var i=pv(t[n]);if(i===`__proto__`&&!gS.call(e,`__proto__`)||(i===`constructor`||i===`prototype`)&&n<r-1)return!1}var a=iS(e,t);return a==null||delete a[pv(Bx(t))]}function vS(e){return Ov(e)?void 0:e}var yS=1,bS=2,xS=4,SS=bv(function(e,t){var n={};if(e==null)return n;var r=!1;t=jh(t,function(t){return t=dv(t,e),r||=t.length>1,t}),Sg(e,ty(e),n),r&&(n=xb(n,yS|bS|xS,vS));for(var i=t.length;i--;)_S(n,t[i]);return n});function CS(e,t,n,r){if(!Vh(e))return e;t=dv(t,e);for(var i=-1,a=t.length,o=a-1,s=e;s!=null&&++i<a;){var c=pv(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=Vh(u)?u:_g(t[i+1])?[]:{})}xg(s,c,l),s=s[c]}return e}function wS(e,t,n){for(var r=-1,i=t.length,a={};++r<i;){var o=t[r],s=mv(e,o);n(s,o)&&CS(a,dv(o,e),s)}return a}function TS(e,t){if(e==null)return{};var n=jh(ty(e),function(e){return[e]});return t=wx(t),wS(e,n,function(e,n){return t(e,n[0])})}function ES(e,t){return wS(e,t,function(t,n){return _x(e,n)})}var DS=bv(function(e,t){return e==null?{}:ES(e,t)});function OS(e,t,n,r,i){return i(e,function(e,i,a){n=r?(r=!1,e):t(n,e,i,a)}),n}function kS(e,t,n){var r=Mh(e)?Av:OS,i=arguments.length<3;return r(e,wx(t,4),n,i,kx)}function AS(e,t,n){return e==null?e:CS(e,t,n)}function jS(e,t,n,r){return r=typeof r==`function`?r:void 0,e==null?e:CS(e,t,n,r)}var MS=9007199254740991,NS=4294967295,PS=Math.min;function FS(e,t){if(e=Yh(e),e<1||e>MS)return[];var n=NS,r=PS(e,NS);t=Vx(t),e-=NS;for(var i=jg(r,t);++n<e;)t(n);return i}function IS(e){return Mh(e)?jh(e,pv):Ah(e)?[e]:og(lv(uv(e)))}function LS(e,t,n){var r=Mh(e),i=r||Hg(e)||b_(e);if(t=wx(t,4),n==null){var a=e&&e.constructor;n=i?r?new a:[]:Vh(e)&&Zh(a)?ig(xv(e)):{}}return(i?lg:Dx)(e,function(e,r,i){return t(n,e,r,i)}),n}var RS=iy&&1/Fb(new iy([,-0]))[1]==1/0?function(e){return new iy(e)}:ag,zS=200;function BS(e,t,n){var r=-1,i=mg,a=e.length,o=!0,s=[],c=s;if(n)o=!1,i=Ix;else if(a>=zS){var l=t?null:RS(e);if(l)return Fb(l);o=!1,i=Ab,c=new Ob}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 VS=Tg(function(e){return BS(vv(e,1,jx,!0))});function HS(e){return e&&e.length?BS(e):[]}var US=0;function WS(e){var t=++US;return uv(e)+t}function GS(e,t){return e==null?!0:_S(e,t)}var KS=yi()(e=>({tools:{},setToolData:(t,n)=>e(e=>JS(e,`tools.${t}`,{...e.tools[t],...n})),updateOpenaiObject:(t,n,r)=>e(e=>e.tools[t]?.openaiObject?JS(e,`tools.${t}.openaiObject.${n}`,r):e),pushOpenAiLog:(t,n)=>e(e=>{let r=e.tools[t]?.openaiLogs||[];return JS(e,`tools.${t}.openaiLogs`,[...r,{...n,id:crypto.randomUUID()}])}),setOpenInAppUrl:(t,n)=>e(e=>JS(e,`tools.${t}.openInAppUrl`,n))})),qS=e=>{let{tools:t}=KS();return t[e]},JS=(e,t,n)=>{let r=wb(e);return AS(r,t,n),r};function YS(e,t,n){try{return e(t)}catch(e){return ct("[nuqs] Error while parsing value `%s`: %O"+(n?" (for key `%s`)":``),t,e,n),null}}function XS(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),YS(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 ZS=XS({parse:e=>e,serialize:String});XS({parse:e=>{let t=parseInt(e);return t==t?t:null},serialize:e=>``+Math.round(e)}),XS({parse:e=>{let t=parseInt(e);return t==t?t-1:null},serialize:e=>``+Math.round(e+1)}),XS({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}}),XS({parse:e=>{let t=parseFloat(e);return t==t?t:null},serialize:String}),XS({parse:e=>e.toLowerCase()===`true`,serialize:String});function QS(e,t){return e.valueOf()===t.valueOf()}XS({parse:e=>{let t=parseInt(e);return t==t?new Date(t):null},serialize:e=>``+e.valueOf(),eq:QS}),XS({parse:e=>{let t=new Date(e);return t.valueOf()==t.valueOf()?t:null},serialize:e=>e.toISOString(),eq:QS}),XS({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:QS});var $S=Tt(),eC={};function tC(e,t={}){let n=(0,b.useId)(),r=vt(),i=yt(),{history:a=`replace`,scroll:o=r?.scroll??!1,shallow:s=r?.shallow??!0,throttleMs:c=St.timeMs,limitUrlUpdates:l=r?.limitUrlUpdates,clearOnDefault:u=r?.clearOnDefault??!0,startTransition:d,urlKeys:f=eC}=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=_t(Object.values(m)),g=h.searchParams,_=(0,b.useRef)({}),v=(0,b.useMemo)(()=>Object.fromEntries(Object.keys(e).map(t=>[t,e[t].defaultValue??null])),[Object.values(e).map(({defaultValue:e})=>e).join(`,`)]),y=Pt.useQueuedQueries(Object.values(m)),[x,S]=(0,b.useState)(()=>nC(e,f,g??new URLSearchParams,y).state),C=(0,b.useRef)(x);if(st("[nuq+ %s `%s`] render - state: %O, iSP: %s",n,p,x,g),Object.keys(_.current).join(`&`)!==Object.values(m).join(`&`)){let{state:t,hasChanged:r}=nC(e,f,g,y,_.current,C.current);r&&(st("[nuq+ %s `%s`] State changed: %O",n,p,{state:t,initialSearchParams:g,queuedQueries:y,queryRef:_.current,stateRef:C.current}),C.current=t,S(t)),_.current=Object.fromEntries(Object.entries(m).map(([t,n])=>[n,e[t]?.type===`multi`?g?.getAll(n):g?.get(n)??null]))}(0,b.useEffect)(()=>{let{state:t,hasChanged:r}=nC(e,f,g,y,_.current,C.current);r&&(st("[nuq+ %s `%s`] State changed: %O",n,p,{state:t,initialSearchParams:g,queuedQueries:y,queryRef:_.current,stateRef:C.current}),C.current=t,S(t))},[Object.values(m).map(e=>`${e}=${g?.getAll(e)}`).join(`&`),JSON.stringify(y)]),(0,b.useEffect)(()=>{let t=Object.keys(e).reduce((t,r)=>(t[r]=({state:t,query:i})=>{S(a=>{let{defaultValue:o}=e[r],s=m[r],c=t??o??null,l=a[r]??o??null;return Object.is(l,c)?(st("[nuq+ %s `%s`] Cross-hook key sync %s: %O (default: %O). no change, skipping, resolved: %O",n,p,s,t,o,C.current),a):(C.current={...C.current,[r]:c},_.current[s]=i,st("[nuq+ %s `%s`] Cross-hook key sync %s: %O (default: %O). updateInternalState, resolved: %O",n,p,s,t,o,C.current),C.current)})},t),{});for(let r of Object.keys(e)){let e=m[r];st("[nuq+ %s `%s`] Subscribing to sync for `%s`",n,e,p),$S.on(e,t[r])}return()=>{for(let r of Object.keys(e)){let e=m[r];st("[nuq+ %s `%s`] Unsubscribing to sync for `%s`",n,e,p),$S.off(e,t[r])}}},[p,m]);let w=(0,b.useCallback)((t,r={})=>{let f=Object.fromEntries(Object.keys(e).map(e=>[e,null])),g=typeof t==`function`?t(rC(C.current,v))??f:t??f;st("[nuq+ %s `%s`] setState: %O",n,p,g);let _,y=0,b=!1,x=[];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);$S.emit(p,{state:n,query:g});let v={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}};if(r?.limitUrlUpdates?.method===`debounce`||l?.method===`debounce`||f.limitUrlUpdates?.method===`debounce`){v.options.shallow===!0&&console.warn(ft(422));let e=r?.limitUrlUpdates?.timeMs??l?.timeMs??f.limitUrlUpdates?.timeMs??St.timeMs,t=Pt.push(v,e,h,i);y<e&&(_=t,y=e)}else{let e=r?.limitUrlUpdates?.timeMs??f?.limitUrlUpdates?.timeMs??l?.timeMs??r.throttleMs??f.throttleMs??c;x.push(Pt.abort(p)),jt.push(v,e),b=!0}}let S=x.reduce((e,t)=>t(e),b?jt.flush(h,i):jt.getPendingPromise(h));return _??S},[p,a,s,o,c,l?.method,l?.timeMs,d,m,h.updateUrl,h.getSearchParamsSnapshot,h.rateLimitFactor,i,v]);return[(0,b.useMemo)(()=>rC(x,v),[x,v]),w]}function nC(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&&Ft(i[l]??d,f)?(e[s]=a[s]??null,e):(o=!0,e[s]=(Ct(f)?null:YS(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 rC(e,t){return Object.fromEntries(Object.keys(e).map(n=>[n,e[n]??t[n]??null]))}function iC(e,t={}){let{parse:n,type:r,serialize:i,eq:a,defaultValue:o,...s}=t,[{[e]:c},l]=tC({[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 aC(){return iC(`tool`,ZS)}var oC=new ze,sC=`skybridge-devtools-oauth`,cC={clientInfo:`${sC}:client-info`,tokens:`${sC}:tokens`,codeVerifier:`${sC}:code-verifier`,state:`${sC}:state`},lC=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(cC.clientInfo);return e?JSON.parse(e):void 0}saveClientInformation(e){localStorage.setItem(cC.clientInfo,JSON.stringify(e))}tokens(){let e=localStorage.getItem(cC.tokens);return e?JSON.parse(e):void 0}saveTokens(e){localStorage.setItem(cC.tokens,JSON.stringify(e))}state(){let e=localStorage.getItem(cC.state);if(e)return e;let t=crypto.randomUUID();return localStorage.setItem(cC.state,t),t}redirectToAuthorization(e){window.location.href=e.toString()}saveCodeVerifier(e){localStorage.setItem(cC.codeVerifier,e)}codeVerifier(){return localStorage.getItem(cC.codeVerifier)??``}invalidateCredentials(e){(e===`all`||e===`tokens`)&&localStorage.removeItem(cC.tokens),(e===`all`||e===`client`)&&localStorage.removeItem(cC.clientInfo),(e===`all`||e===`verifier`)&&(localStorage.removeItem(cC.codeVerifier),localStorage.removeItem(cC.state))}};function uC(e){return!!e._zod}function dC(e,t){return uC(e)?Sa(e,t):e.safeParse(t)}function fC(e){if(!e)return;let t;if(t=uC(e)?e._zod?.def?.shape:e.shape,t){if(typeof t==`function`)try{return t()}catch{return}return t}}function pC(e){if(uC(e)){let t=e._zod?.def;if(t){if(t.value!==void 0)return t.value;if(Array.isArray(t.values)&&t.values.length>0)return t.values[0]}}let t=e._def;if(t){if(t.value!==void 0)return t.value;if(Array.isArray(t.values)&&t.values.length>0)return t.values[0]}let n=e.value;if(n!==void 0)return n}function mC(e){return e===`completed`||e===`failed`||e===`cancelled`}function hC(e){let t=fC(e)?.method;if(!t)throw Error(`Schema is missing a method literal`);let n=pC(t);if(typeof n!=`string`)throw Error(`Schema method literal must be a string`);return n}function gC(e,t){let n=dC(e,t);if(!n.success)throw n.error;return n.data}var _C=class{constructor(e){this._options=e,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this._pendingDebouncedNotifications=new Set,this._taskProgressTokens=new Map,this._requestResolvers=new Map,this.setNotificationHandler(sf,e=>{this._oncancel(e)}),this.setNotificationHandler(wf,e=>{this._onprogress(e)}),this.setRequestHandler(xf,e=>({})),this._taskStore=e?.taskStore,this._taskMessageQueue=e?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(Nf,async(e,t)=>{let n=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!n)throw new cm(ef.InvalidParams,`Failed to retrieve task: Task not found`);return{...n}}),this.setRequestHandler(Ff,async(e,t)=>{let n=async()=>{let r=e.params.taskId;if(this._taskMessageQueue){let e;for(;e=await this._taskMessageQueue.dequeue(r,t.sessionId);){if(e.type===`response`||e.type===`error`){let t=e.message,n=t.id,r=this._requestResolvers.get(n);if(r)if(this._requestResolvers.delete(n),e.type===`response`)r(t);else{let e=t;r(new cm(e.error.code,e.error.message,e.error.data))}else{let t=e.type===`response`?`Response`:`Error`;this._onerror(Error(`${t} handler missing for request ${n}`))}continue}await this._transport?.send(e.message,{relatedRequestId:t.requestId})}}let i=await this._taskStore.getTask(r,t.sessionId);if(!i)throw new cm(ef.InvalidParams,`Task not found: ${r}`);if(!mC(i.status))return await this._waitForTaskUpdate(r,t.signal),await n();if(mC(i.status)){let e=await this._taskStore.getTaskResult(r,t.sessionId);return this._clearTaskQueue(r),{...e,_meta:{...e._meta,[Nd]:{taskId:r}}}}return await n()};return await n()}),this.setRequestHandler(If,async(e,t)=>{try{let{tasks:n,nextCursor:r}=await this._taskStore.listTasks(e.params?.cursor,t.sessionId);return{tasks:n,nextCursor:r,_meta:{}}}catch(e){throw new cm(ef.InvalidParams,`Failed to list tasks: ${e instanceof Error?e.message:String(e)}`)}}),this.setRequestHandler(Rf,async(e,t)=>{try{let n=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!n)throw new cm(ef.InvalidParams,`Task not found: ${e.params.taskId}`);if(mC(n.status))throw new cm(ef.InvalidParams,`Cannot cancel task in terminal status: ${n.status}`);await this._taskStore.updateTaskStatus(e.params.taskId,`cancelled`,`Client cancelled task execution.`,t.sessionId),this._clearTaskQueue(e.params.taskId);let r=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!r)throw new cm(ef.InvalidParams,`Task not found after cancellation: ${e.params.taskId}`);return{_meta:{},...r}}catch(e){throw e instanceof cm?e:new cm(ef.InvalidRequest,`Failed to cancel task: ${e instanceof Error?e.message:String(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),cm.fromError(ef.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){if(this._transport)throw Error(`Already connected to a transport. Call close() before connecting to a new transport, or use a separate Protocol instance per connection.`);this._transport=e;let t=this.transport?.onclose;this._transport.onclose=()=>{t?.(),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),$d(e)||nf(e)?this._onresponse(e):Yd(e)?this._onrequest(e,t):Zd(e)?this._onnotification(e):this._onerror(Error(`Unknown message type: ${JSON.stringify(e)}`))},await this._transport.start()}_onclose(){let e=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications.clear();for(let e of this._timeoutInfo.values())clearTimeout(e.timeoutId);this._timeoutInfo.clear();for(let e of this._requestHandlerAbortControllers.values())e.abort();this._requestHandlerAbortControllers.clear();let t=cm.fromError(ef.ConnectionClosed,`Connection closed`);this._transport=void 0,this.onclose?.();for(let n of e.values())n(t)}_onerror(e){this.onerror?.(e)}_onnotification(e){let t=this._notificationHandlers.get(e.method)??this.fallbackNotificationHandler;t!==void 0&&Promise.resolve().then(()=>t(e)).catch(e=>this._onerror(Error(`Uncaught error in notification handler: ${e}`)))}_onrequest(e,t){let n=this._requestHandlers.get(e.method)??this.fallbackRequestHandler,r=this._transport,i=e.params?._meta?.[Nd]?.taskId;if(n===void 0){let t={jsonrpc:`2.0`,id:e.id,error:{code:ef.MethodNotFound,message:`Method not found`}};i&&this._taskMessageQueue?this._enqueueTaskMessage(i,{type:`error`,message:t,timestamp:Date.now()},r?.sessionId).catch(e=>this._onerror(Error(`Failed to enqueue error response: ${e}`))):r?.send(t).catch(e=>this._onerror(Error(`Failed to send an error response: ${e}`)));return}let a=new AbortController;this._requestHandlerAbortControllers.set(e.id,a);let o=Hd(e.params)?e.params.task:void 0,s=this._taskStore?this.requestTaskStore(e,r?.sessionId):void 0,c={signal:a.signal,sessionId:r?.sessionId,_meta:e.params?._meta,sendNotification:async t=>{if(a.signal.aborted)return;let n={relatedRequestId:e.id};i&&(n.relatedTask={taskId:i}),await this.notification(t,n)},sendRequest:async(t,n,r)=>{if(a.signal.aborted)throw new cm(ef.ConnectionClosed,`Request was cancelled`);let o={...r,relatedRequestId:e.id};i&&!o.relatedTask&&(o.relatedTask={taskId:i});let c=o.relatedTask?.taskId??i;return c&&s&&await s.updateTaskStatus(c,`input_required`),await this.request(t,n,o)},authInfo:t?.authInfo,requestId:e.id,requestInfo:t?.requestInfo,taskId:i,taskStore:s,taskRequestedTtl:o?.ttl,closeSSEStream:t?.closeSSEStream,closeStandaloneSSEStream:t?.closeStandaloneSSEStream};Promise.resolve().then(()=>{o&&this.assertTaskHandlerCapability(e.method)}).then(()=>n(e,c)).then(async t=>{if(a.signal.aborted)return;let n={result:t,jsonrpc:`2.0`,id:e.id};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:`response`,message:n,timestamp:Date.now()},r?.sessionId):await r?.send(n)},async t=>{if(a.signal.aborted)return;let n={jsonrpc:`2.0`,id:e.id,error:{code:Number.isSafeInteger(t.code)?t.code:ef.InternalError,message:t.message??`Internal error`,...t.data!==void 0&&{data:t.data}}};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:`error`,message:n,timestamp:Date.now()},r?.sessionId):await r?.send(n)}).catch(e=>this._onerror(Error(`Failed to send response: ${e}`))).finally(()=>{this._requestHandlerAbortControllers.get(e.id)===a&&this._requestHandlerAbortControllers.delete(e.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._requestResolvers.get(t);if(n){this._requestResolvers.delete(t),$d(e)?n(e):n(new cm(e.error.code,e.error.message,e.error.data));return}let r=this._responseHandlers.get(t);if(r===void 0){this._onerror(Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`));return}this._responseHandlers.delete(t),this._cleanupTimeout(t);let i=!1;if($d(e)&&e.result&&typeof e.result==`object`){let n=e.result;if(n.task&&typeof n.task==`object`){let e=n.task;typeof e.taskId==`string`&&(i=!0,this._taskProgressTokens.set(e.taskId,t))}}i||this._progressHandlers.delete(t),$d(e)?r(e):r(cm.fromError(e.error.code,e.error.message,e.error.data))}get transport(){return this._transport}async close(){await this._transport?.close()}async*requestStream(e,t,n){let{task:r}=n??{};if(!r){try{yield{type:`result`,result:await this.request(e,t,n)}}catch(e){yield{type:`error`,error:e instanceof cm?e:new cm(ef.InternalError,String(e))}}return}let i;try{let r=await this.request(e,Af,n);if(r.task)i=r.task.taskId,yield{type:`taskCreated`,task:r.task};else throw new cm(ef.InternalError,`Task creation did not return a task`);for(;;){let e=await this.getTask({taskId:i},n);if(yield{type:`taskStatus`,task:e},mC(e.status)){e.status===`completed`?yield{type:`result`,result:await this.getTaskResult({taskId:i},t,n)}:e.status===`failed`?yield{type:`error`,error:new cm(ef.InternalError,`Task ${i} failed`)}:e.status===`cancelled`&&(yield{type:`error`,error:new cm(ef.InternalError,`Task ${i} was cancelled`)});return}if(e.status===`input_required`){yield{type:`result`,result:await this.getTaskResult({taskId:i},t,n)};return}let r=e.pollInterval??this._options?.defaultTaskPollInterval??1e3;await new Promise(e=>setTimeout(e,r)),n?.signal?.throwIfAborted()}}catch(e){yield{type:`error`,error:e instanceof cm?e:new cm(ef.InternalError,String(e))}}}request(e,t,n){let{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a,task:o,relatedTask:s}=n??{};return new Promise((c,l)=>{let u=e=>{l(e)};if(!this._transport){u(Error(`Not connected`));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(e.method),o&&this.assertTaskCapability(e.method)}catch(e){u(e);return}n?.signal?.throwIfAborted();let d=this._requestMessageId++,f={...e,jsonrpc:`2.0`,id:d};n?.onprogress&&(this._progressHandlers.set(d,n.onprogress),f.params={...e.params,_meta:{...e.params?._meta||{},progressToken:d}}),o&&(f.params={...f.params,task:o}),s&&(f.params={...f.params,_meta:{...f.params?._meta||{},[Nd]:s}});let p=e=>{this._responseHandlers.delete(d),this._progressHandlers.delete(d),this._cleanupTimeout(d),this._transport?.send({jsonrpc:`2.0`,method:`notifications/cancelled`,params:{requestId:d,reason:String(e)}},{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a}).catch(e=>this._onerror(Error(`Failed to send cancellation: ${e}`))),l(e instanceof cm?e:new cm(ef.RequestTimeout,String(e)))};this._responseHandlers.set(d,e=>{if(!n?.signal?.aborted){if(e instanceof Error)return l(e);try{let n=dC(t,e.result);n.success?c(n.data):l(n.error)}catch(e){l(e)}}}),n?.signal?.addEventListener(`abort`,()=>{p(n?.signal?.reason)});let m=n?.timeout??6e4;this._setupTimeout(d,m,n?.maxTotalTimeout,()=>p(cm.fromError(ef.RequestTimeout,`Request timed out`,{timeout:m})),n?.resetTimeoutOnProgress??!1);let h=s?.taskId;h?(this._requestResolvers.set(d,e=>{let t=this._responseHandlers.get(d);t?t(e):this._onerror(Error(`Response handler missing for side-channeled request ${d}`))}),this._enqueueTaskMessage(h,{type:`request`,message:f,timestamp:Date.now()}).catch(e=>{this._cleanupTimeout(d),l(e)})):this._transport.send(f,{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a}).catch(e=>{this._cleanupTimeout(d),l(e)})})}async getTask(e,t){return this.request({method:`tasks/get`,params:e},Pf,t)}async getTaskResult(e,t,n){return this.request({method:`tasks/result`,params:e},t,n)}async listTasks(e,t){return this.request({method:`tasks/list`,params:e},Lf,t)}async cancelTask(e,t){return this.request({method:`tasks/cancel`,params:e},zf,t)}async notification(e,t){if(!this._transport)throw Error(`Not connected`);this.assertNotificationCapability(e.method);let n=t?.relatedTask?.taskId;if(n){let r={...e,jsonrpc:`2.0`,params:{...e.params,_meta:{...e.params?._meta||{},[Nd]:t.relatedTask}}};await this._enqueueTaskMessage(n,{type:`notification`,message:r,timestamp:Date.now()});return}if((this._options?.debouncedNotificationMethods??[]).includes(e.method)&&!e.params&&!t?.relatedRequestId&&!t?.relatedTask){if(this._pendingDebouncedNotifications.has(e.method))return;this._pendingDebouncedNotifications.add(e.method),Promise.resolve().then(()=>{if(this._pendingDebouncedNotifications.delete(e.method),!this._transport)return;let n={...e,jsonrpc:`2.0`};t?.relatedTask&&(n={...n,params:{...n.params,_meta:{...n.params?._meta||{},[Nd]:t.relatedTask}}}),this._transport?.send(n,t).catch(e=>this._onerror(e))});return}let r={...e,jsonrpc:`2.0`};t?.relatedTask&&(r={...r,params:{...r.params,_meta:{...r.params?._meta||{},[Nd]:t.relatedTask}}}),await this._transport.send(r,t)}setRequestHandler(e,t){let n=hC(e);this.assertRequestHandlerCapability(n),this._requestHandlers.set(n,(n,r)=>{let i=gC(e,n);return Promise.resolve(t(i,r))})}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){let n=hC(e);this._notificationHandlers.set(n,n=>{let r=gC(e,n);return Promise.resolve(t(r))})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}_cleanupTaskProgressHandler(e){let t=this._taskProgressTokens.get(e);t!==void 0&&(this._progressHandlers.delete(t),this._taskProgressTokens.delete(e))}async _enqueueTaskMessage(e,t,n){if(!this._taskStore||!this._taskMessageQueue)throw Error(`Cannot enqueue task message: taskStore and taskMessageQueue are not configured`);let r=this._options?.maxTaskQueueSize;await this._taskMessageQueue.enqueue(e,t,n,r)}async _clearTaskQueue(e,t){if(this._taskMessageQueue){let n=await this._taskMessageQueue.dequeueAll(e,t);for(let t of n)if(t.type===`request`&&Yd(t.message)){let n=t.message.id,r=this._requestResolvers.get(n);r?(r(new cm(ef.InternalError,`Task cancelled or completed`)),this._requestResolvers.delete(n)):this._onerror(Error(`Resolver missing for request ${n} during task ${e} cleanup`))}}}async _waitForTaskUpdate(e,t){let n=this._options?.defaultTaskPollInterval??1e3;try{let t=await this._taskStore?.getTask(e);t?.pollInterval&&(n=t.pollInterval)}catch{}return new Promise((e,r)=>{if(t.aborted){r(new cm(ef.InvalidRequest,`Request cancelled`));return}let i=setTimeout(e,n);t.addEventListener(`abort`,()=>{clearTimeout(i),r(new cm(ef.InvalidRequest,`Request cancelled`))},{once:!0})})}requestTaskStore(e,t){let n=this._taskStore;if(!n)throw Error(`No task store configured`);return{createTask:async r=>{if(!e)throw Error(`No request provided`);return await n.createTask(r,e.id,{method:e.method,params:e.params},t)},getTask:async e=>{let r=await n.getTask(e,t);if(!r)throw new cm(ef.InvalidParams,`Failed to retrieve task: Task not found`);return r},storeTaskResult:async(e,r,i)=>{await n.storeTaskResult(e,r,i,t);let a=await n.getTask(e,t);if(a){let t=Mf.parse({method:`notifications/tasks/status`,params:a});await this.notification(t),mC(a.status)&&this._cleanupTaskProgressHandler(e)}},getTaskResult:e=>n.getTaskResult(e,t),updateTaskStatus:async(e,r,i)=>{let a=await n.getTask(e,t);if(!a)throw new cm(ef.InvalidParams,`Task "${e}" not found - it may have been cleaned up`);if(mC(a.status))throw new cm(ef.InvalidParams,`Cannot update task "${e}" from terminal status "${a.status}" to "${r}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await n.updateTaskStatus(e,r,i,t);let o=await n.getTask(e,t);if(o){let t=Mf.parse({method:`notifications/tasks/status`,params:o});await this.notification(t),mC(o.status)&&this._cleanupTaskProgressHandler(e)}},listTasks:e=>n.listTasks(e,t)}}};function vC(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function yC(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];vC(a)&&vC(i)?n[r]={...a,...i}:n[r]=i}return n}var bC=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})),xC=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;var t=bC(),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}}})),SC=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=bC(),n=xC(),r=bC();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=xC();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?`
|
|
51
|
+
`:``},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})`}})),CC=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=SC(),n=bC();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?!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:(0,t._)`${r} > ${n} ? ${r} : ${n}`)),mergeValues:(e,t)=>e===!0?!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})),wC=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=SC();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`)}})),TC=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=SC(),n=CC(),r=wC();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])}})),EC=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.boolOrEmptySchema=e.topBoolOrEmptySchema=void 0;var t=TC(),n=SC(),r=wC(),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)}})),DC=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})),OC=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})),kC=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=DC(),n=OC(),r=TC(),i=SC(),a=CC(),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
|
|
52
|
+
|| (${s} == "string" && ${a} && ${a} == +${a})`).assign(c,(0,i._)`+${a}`);return;case`integer`:r.elseIf((0,i._)`${s} === "boolean" || ${a} === null
|
|
53
|
+
|| (${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"
|
|
54
|
+
|| ${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}}})),AC=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.assignDefaults=void 0;var t=SC(),n=CC();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)}`)}})),jC=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=SC(),n=CC(),r=wC(),i=CC();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})),MC=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.validateKeywordUsage=e.validSchemaType=e.funcKeywordCode=e.macroKeywordCode=void 0;var t=SC(),n=wC(),r=jC(),i=TC();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})),NC=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.extendSubschemaMode=e.extendSubschemaData=e.getSubschema=void 0;var t=SC(),n=CC();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})),PC=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}})),FC=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`)}})),IC=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.getSchemaRefs=e.resolveUrl=e.normalizeId=e._getFullPath=e.getFullPath=e.inlineRef=void 0;var t=CC(),n=PC(),r=FC(),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})),LC=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.getData=e.KeywordCxt=e.validateFunctionCode=void 0;var t=EC(),n=kC(),r=OC(),i=kC(),a=AC(),o=MC(),s=NC(),c=SC(),l=wC(),u=IC(),d=CC(),f=TC();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(()=>ee(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)&&ee(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),R(e,e.dataTypes))}function I(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(t=>{B(e.dataTypes,t)||H(e,`type "${t}" not allowed by context "${e.dataTypes.join(`,`)}"`)}),V(e,t)}}function L(e,t){t.length>1&&!(t.length===2&&t.includes(`null`))&&H(e,`use allowUnionTypes to allow union type keyword`)}function R(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=>z(t,e))&&H(e,`missing type "${n.join(`,`)}" for keyword "${i}"`)}}}function z(e,t){return e.includes(t)||t===`number`&&e.includes(`integer`)}function B(e,t){return e.includes(t)||t===`integer`&&e.includes(`number`)}function V(e,t){let n=[];for(let r of e.dataTypes)B(t,r)?n.push(r):t.includes(`integer`)&&r===`number`&&n.push(`integer`);e.dataTypes=n}function H(e,t){let n=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${n}" (strictTypes)`,(0,d.checkStrictMode)(e,t,e.opts.strictTypes)}var U=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`,ne(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=U;function ee(e,t,n,r){let i=new U(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 W=/^\/(?:[^~]|~0|~1)*$/,te=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function ne(e,{dataLevel:t,dataNames:n,dataPathArr:r}){let i,a;if(e===``)return l.default.rootData;if(e[0]===`/`){if(!W.test(e))throw Error(`Invalid JSON-pointer: ${e}`);i=e,a=l.default.rootData}else{let o=te.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=ne})),RC=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}}})),zC=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=IC();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))}}})),BC=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.resolveSchema=e.getCompilingSchema=e.resolveRef=e.compileSchema=e.SchemaEnv=void 0;var t=SC(),n=RC(),r=wC(),i=IC(),a=CC(),o=LC(),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}})),VC=c({$id:()=>HC,additionalProperties:()=>!1,default:()=>qC,description:()=>UC,properties:()=>KC,required:()=>GC,type:()=>WC}),HC,UC,WC,GC,KC,qC,JC=o((()=>{HC=`https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#`,UC=`Meta-schema for $data reference (JSON AnySchema extension proposal)`,WC=`object`,GC=[`$data`],KC={$data:{type:`string`,anyOf:[{format:`relative-json-pointer`},{format:`json-pointer`}]}},qC={$id:HC,description:UC,type:WC,required:GC,properties:KC,additionalProperties:!1}})),YC=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);function i(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 a=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function o(e){return e.length=0,!0}function s(e,t,n){if(e.length){let r=i(e);if(r!==``)t.push(r);else return n.error=!0,!1;e.length=0}return!0}function c(e){let t=0,n={error:!1,address:``,zone:``},r=[],a=[],c=!1,l=!1,u=s;for(let i=0;i<e.length;i++){let s=e[i];if(!(s===`[`||s===`]`))if(s===`:`){if(c===!0&&(l=!0),!u(a,r,n))break;if(++t>7){n.error=!0;break}i>0&&e[i-1]===`:`&&(c=!0),r.push(`:`);continue}else if(s===`%`){if(!u(a,r,n))break;u=o}else{a.push(s);continue}}return a.length&&(u===o?n.zone=a.join(``):l?r.push(a.join(``)):r.push(i(a))),n.address=r.join(``),n}function l(e){if(u(e,`:`)<2)return{host:e,isIPV6:!1};let t=c(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 u(e,t){let n=0;for(let r=0;r<e.length;r++)e[r]===t&&n++;return n}function d(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(``)}function f(e,t){let n=t===!0?unescape:escape;return e.scheme!==void 0&&(e.scheme=n(e.scheme)),e.userinfo!==void 0&&(e.userinfo=n(e.userinfo)),e.host!==void 0&&(e.host=n(e.host)),e.path!==void 0&&(e.path=n(e.path)),e.query!==void 0&&(e.query=n(e.query)),e.fragment!==void 0&&(e.fragment=n(e.fragment)),e}function p(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 t=l(n);n=t.isIPV6===!0?`[${t.escapedHost}]`:e.host}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:a,recomposeAuthority:p,normalizeComponentEncoding:f,removeDotSegments:d,isIPv4:r,isUUID:n,normalizeIPv6:l,stringArrayToHexStripped:i}})),XC=s(((e,t)=>{var{isUUID:n}=YC(),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=S(`${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=S(`${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={scheme:`wss`,domainHost:_.domainHost,parse:_.parse,serialize:_.serialize},y={scheme:`urn`,parse:d,serialize:f,skipNormalize:!0},b={scheme:`urn:uuid`,parse:p,serialize:m,skipNormalize:!0},x={http:h,https:g,ws:_,wss:v,urn:y,"urn:uuid":b};Object.setPrototypeOf(x,null);function S(e){return e&&(x[e]||x[e.toLowerCase()])||void 0}t.exports={wsIsSecure:o,SCHEMES:x,isValidSchemeName:a,getSchemeHandler:S}})),ZC=s(((e,t)=>{var{normalizeIPv6:n,removeDotSegments:r,recomposeAuthority:i,normalizeComponentEncoding:a,isIPv4:o,nonSimpleDomain:s}=YC(),{SCHEMES:c,getSchemeHandler:l}=XC();function u(e,t){return typeof e==`string`?e=m(g(e,t),t):typeof e==`object`&&(e=g(m(e,t),t)),e}function d(e,t,n){let r=n?Object.assign({scheme:`null`},n):{scheme:`null`},i=f(g(e,r),g(t,r),r,!0);return r.skipEscape=!0,m(i,r)}function f(e,t,n,i){let a={};return i||(e=g(m(e,n),n),t=g(m(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 p(e,t,n){return typeof e==`string`?(e=unescape(e),e=m(a(g(e,n),!0),{...n,skipEscape:!0})):typeof e==`object`&&(e=m(a(e,!0),{...n,skipEscape:!0})),typeof t==`string`?(t=unescape(t),t=m(a(g(t,n),!0),{...n,skipEscape:!0})):typeof t==`object`&&(t=m(a(t,!0),{...n,skipEscape:!0})),e.toLowerCase()===t.toLowerCase()}function m(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:``},a=Object.assign({},t),o=[],s=l(a.scheme||n.scheme);s&&s.serialize&&s.serialize(n,a),n.path!==void 0&&(a.skipEscape?n.path=unescape(n.path):(n.path=escape(n.path),n.scheme!==void 0&&(n.path=n.path.split(`%3A`).join(`:`)))),a.reference!==`suffix`&&n.scheme&&o.push(n.scheme,`:`);let c=i(n);if(c!==void 0&&(a.reference!==`suffix`&&o.push(`//`),o.push(c),n.path&&n.path[0]!==`/`&&o.push(`/`)),n.path!==void 0){let e=n.path;!a.absolutePath&&(!s||!s.absolutePath)&&(e=r(e)),c===void 0&&e[0]===`/`&&e[1]===`/`&&(e=`/%2F`+e.slice(2)),o.push(e)}return n.query!==void 0&&o.push(`?`,n.query),n.fragment!==void 0&&o.push(`#`,n.fragment),o.join(``)}var h=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function g(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;r.reference===`suffix`&&(e=r.scheme?r.scheme+`:`+e:`//`+e);let c=e.match(h);if(c){if(i.scheme=c[1],i.userinfo=c[3],i.host=c[4],i.port=parseInt(c[5],10),i.path=c[6]||``,i.query=c[7],i.fragment=c[8],isNaN(i.port)&&(i.port=c[5]),i.host)if(o(i.host)===!1){let e=n(i.host);i.host=e.host.toLowerCase(),a=e.isIPV6}else a=!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 t=l(r.scheme||i.scheme);if(!r.unicodeSupport&&(!t||!t.unicodeSupport)&&i.host&&(r.domainHost||t&&t.domainHost)&&a===!1&&s(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}(!t||t&&!t.skipNormalize)&&(e.indexOf(`%`)!==-1&&(i.scheme!==void 0&&(i.scheme=unescape(i.scheme)),i.host!==void 0&&(i.host=unescape(i.host))),i.path&&=escape(unescape(i.path)),i.fragment&&=encodeURI(decodeURIComponent(i.fragment))),t&&t.parse&&t.parse(i,r)}else i.error=i.error||`URI can not be parsed.`;return i}var _={SCHEMES:c,normalize:u,resolve:d,resolveComponent:f,equal:p,serialize:m,parse:g};t.exports=_,t.exports.default=_,t.exports.fastUri=_})),QC=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=ZC();t.code=`require("ajv/dist/runtime/uri").default`,e.default=t})),$C=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=LC();Object.defineProperty(e,`KeywordCxt`,{enumerable:!0,get:function(){return t.KeywordCxt}});var n=SC();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=RC(),i=zC(),a=DC(),o=BC(),s=SC(),c=IC(),l=kC(),u=CC(),f=(JC(),d(VC).default),p=QC(),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={},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]}}})),ew=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={keyword:`id`,code(){throw Error(`NOT SUPPORTED: keyword "id", use "$id" for schema ID`)}}})),tw=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.callRef=e.getValidate=void 0;var t=zC(),n=jC(),r=SC(),i=wC(),a=BC(),o=CC(),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})),nw=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=ew(),n=tw();e.default=[`$schema`,`$id`,`$defs`,`$vocabulary`,{keyword:`$comment`},`definitions`,t.default,n.default]})),rw=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=SC(),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})`)}}})),iw=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=SC();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}))`)}}})),aw=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`})),ow=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=SC(),n=CC(),r=aw();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}`)}}})),sw=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=jC(),n=CC(),r=SC();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})`)}}}})),cw=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=SC();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}`)}}})),lw=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=jC(),n=SC(),r=CC();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)}}}})),uw=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=SC();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}`)}}})),dw=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=PC();t.code=`require("ajv/dist/runtime/equal").default`,e.default=t})),fw=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=kC(),n=SC(),r=CC(),i=dw();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)})))}}}})),pw=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=SC(),n=CC(),r=dw();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}`)}}})),mw=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=SC(),n=CC(),r=dw();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}`}}}})),hw=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=rw(),n=iw(),r=ow(),i=sw(),a=cw(),o=lw(),s=uw(),c=fw(),l=pw(),u=mw();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]})),gw=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.validateAdditionalItems=void 0;var t=SC(),n=CC(),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})),_w=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.validateTuple=void 0;var t=SC(),n=CC(),r=jC(),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})),vw=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=_w();e.default={keyword:`prefixItems`,type:`array`,schemaType:[`array`],before:`uniqueItems`,code:e=>(0,t.validateTuple)(e,`items`)}})),yw=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=SC(),n=CC(),r=jC(),i=gw();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)))}}})),bw=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=SC(),n=CC();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)))}}}})),xw=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;var t=SC(),n=CC(),r=jC();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},
|
|
55
|
+
missingProperty: ${i},
|
|
56
|
+
depsCount: ${n},
|
|
57
|
+
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})),Sw=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=SC(),n=CC();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)}}})),Cw=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=jC(),n=SC(),r=wC(),i=CC();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)}}}})),ww=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=LC(),n=jC(),r=CC(),i=Cw();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)}}}})),Tw=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=jC(),n=SC(),r=CC(),i=CC();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())})})}}}})),Ew=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=CC();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`}}})),Dw=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={keyword:`anyOf`,schemaType:`array`,trackErrors:!0,code:jC().validateUnion,error:{message:`must match a schema in anyOf`}}})),Ow=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=SC(),n=CC();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)})})}}}})),kw=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=CC();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)})}}})),Aw=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=SC(),n=CC(),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})),jw=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=CC();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`)}}})),Mw=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=gw(),n=vw(),r=_w(),i=yw(),a=bw(),o=xw(),s=Sw(),c=Cw(),l=ww(),u=Tw(),d=Ew(),f=Dw(),p=Ow(),m=kw(),h=Aw(),g=jw();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=_})),Nw=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=SC();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})`}}}}})),Pw=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=[Nw().default]})),Fw=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`]})),Iw=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=nw(),n=hw(),r=Mw(),i=Pw(),a=Fw();e.default=[t.default,n.default,(0,r.default)(),i.default,a.metadataVocabulary,a.contentVocabulary]})),Lw=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={}))})),Rw=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=SC(),n=Lw(),r=BC(),i=zC(),a=CC();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}}}}})),zw=c({$id:()=>Vw,$schema:()=>Bw,default:()=>Kw,definitions:()=>Uw,properties:()=>Gw,title:()=>Hw,type:()=>Ww}),Bw,Vw,Hw,Uw,Ww,Gw,Kw,qw=o((()=>{Bw=`http://json-schema.org/draft-07/schema#`,Vw=`http://json-schema.org/draft-07/schema#`,Hw=`Core schema meta-schema`,Uw={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:[]}},Ww=[`object`,`boolean`],Gw={$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:`#`}},Kw={$schema:Bw,$id:Vw,title:Hw,definitions:Uw,type:Ww,properties:Gw,default:!0}})),Jw=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=$C(),r=Iw(),i=Rw(),a=(qw(),d(zw).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=LC();Object.defineProperty(e,`KeywordCxt`,{enumerable:!0,get:function(){return l.KeywordCxt}});var u=SC();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=RC();Object.defineProperty(e,`ValidationError`,{enumerable:!0,get:function(){return f.default}});var p=zC();Object.defineProperty(e,`MissingRefError`,{enumerable:!0,get:function(){return p.default}})})),Yw=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(!0),l),"date-time":t(f(!0),p),"iso-time":t(c(),u),"iso-date-time":t(f(),m),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:_,"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|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\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:E,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:y,int32:{type:`number`,validate:S},int64:{type:`number`,validate:C},float:{type:`number`,validate:w},double:{type:`number`,validate:w},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]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,p),"iso-time":t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,u),"iso-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,m),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){return function(t){let n=s.exec(t);if(!n)return!1;let r=+n[1],i=+n[2],a=+n[3],o=n[4],c=n[5]===`-`?-1:1,l=+(n[6]||0),u=+(n[7]||0);if(l>23||u>59||e&&!o)return!1;if(r<=23&&i<=59&&a<60)return!0;let d=i-u*c,f=r-l*c-(d<0?1:0);return(f===23||f===-1)&&(d===59||d===-1)&&a<61}}function l(e,t){if(!(e&&t))return;let n=new Date(`2020-01-01T`+e).valueOf(),r=new Date(`2020-01-01T`+t).valueOf();if(n&&r)return n-r}function u(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],t=r[1]+r[2]+r[3],e>t?1:e<t?-1:0}var d=/t|\s/i;function f(e){let t=c(e);return function(e){let n=e.split(d);return n.length===2&&a(n[0])&&t(n[1])}}function p(e,t){if(!(e&&t))return;let n=new Date(e).valueOf(),r=new Date(t).valueOf();if(n&&r)return n-r}function m(e,t){if(!(e&&t))return;let[n,r]=e.split(d),[i,a]=t.split(d),s=o(n,i);if(s!==void 0)return s||l(r,a)}var h=/\/|:/,g=/^(?:[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 _(e){return h.test(e)&&g.test(e)}var v=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function y(e){return v.lastIndex=0,v.test(e)}var b=-(2**31),x=2**31-1;function S(e){return Number.isInteger(e)&&e<=x&&e>=b}function C(e){return Number.isInteger(e)}function w(){return!0}var T=/[^\\]\\Z/;function E(e){if(T.test(e))return!1;try{return new RegExp(e),!0}catch{return!1}}})),Xw=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.formatLimitDefinition=void 0;var t=Jw(),n=SC(),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})=>(0,n.str)`should be ${i[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,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`,(0,n._)`${t}[${d.schemaCode}]`);e.fail$data((0,n.or)((0,n._)`typeof ${i} != "object"`,(0,n._)`${i} instanceof RegExp`,(0,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?(0,n._)`${l.code.formats}${(0,n.getProperty)(t)}`:void 0});e.fail$data(m(a))}function m(e){return(0,n._)`${e}.compare(${a}, ${o}) ${i[s].fail} 0`}},dependencies:[`format`]},e.default=t=>(t.addKeyword(e.formatLimitDefinition),t)})),Zw=s(((e,t)=>{Object.defineProperty(e,`__esModule`,{value:!0});var n=Yw(),r=Xw(),i=SC(),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&&(0,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=(0,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})),Qw=u(Jw(),1),$w=u(Zw(),1);function eT(){let e=new Qw.default({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0});return(0,$w.default)(e),e}var tT=class{constructor(e){this._ajv=e??eT()}getValidator(e){let t=`$id`in e&&typeof e.$id==`string`?this._ajv.getSchema(e.$id)??this._ajv.compile(e):this._ajv.compile(e);return e=>t(e)?{valid:!0,data:e,errorMessage:void 0}:{valid:!1,data:void 0,errorMessage:this._ajv.errorsText(t.errors)}}},nT=class{constructor(e){this._client=e}async*callToolStream(e,t=Ap,n){let r=this._client,i={...n,task:n?.task??(r.isToolTask(e.name)?{}:void 0)},a=r.requestStream({method:`tools/call`,params:e},t,i),o=r.getToolOutputValidator(e.name);for await(let t of a){if(t.type===`result`&&o){let n=t.result;if(!n.structuredContent&&!n.isError){yield{type:`error`,error:new cm(ef.InvalidRequest,`Tool ${e.name} has an output schema but did not return structured content`)};return}if(n.structuredContent)try{let e=o(n.structuredContent);if(!e.valid){yield{type:`error`,error:new cm(ef.InvalidParams,`Structured content does not match the tool's output schema: ${e.errorMessage}`)};return}}catch(e){if(e instanceof cm){yield{type:`error`,error:e};return}yield{type:`error`,error:new cm(ef.InvalidParams,`Failed to validate structured content: ${e instanceof Error?e.message:String(e)}`)};return}}yield t}}async getTask(e,t){return this._client.getTask({taskId:e},t)}async getTaskResult(e,t,n){return this._client.getTaskResult({taskId:e},t,n)}async listTasks(e,t){return this._client.listTasks(e?{cursor:e}:void 0,t)}async cancelTask(e,t){return this._client.cancelTask({taskId:e},t)}requestStream(e,t,n){return this._client.requestStream(e,t,n)}};function rT(e,t,n){if(!e)throw Error(`${n} does not support task creation (required for ${t})`);switch(t){case`tools/call`:if(!e.tools?.call)throw Error(`${n} does not support task creation for tools/call (required for ${t})`);break;default:break}}function ote(e,t,n){if(!e)throw Error(`${n} does not support task creation (required for ${t})`);switch(t){case`sampling/createMessage`:if(!e.sampling?.createMessage)throw Error(`${n} does not support task creation for sampling/createMessage (required for ${t})`);break;case`elicitation/create`:if(!e.elicitation?.create)throw Error(`${n} does not support task creation for elicitation/create (required for ${t})`);break;default:break}}function iT(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&&iT(t,n[e])}}if(Array.isArray(e.anyOf))for(let n of e.anyOf)typeof n!=`boolean`&&iT(n,t);if(Array.isArray(e.oneOf))for(let n of e.oneOf)typeof n!=`boolean`&&iT(n,t)}}function ste(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}}var cte=class extends _C{constructor(e,t){super(t),this._clientInfo=e,this._cachedToolOutputValidators=new Map,this._cachedKnownTaskTools=new Set,this._cachedRequiredTaskTools=new Set,this._listChangedDebounceTimers=new Map,this._capabilities=t?.capabilities??{},this._jsonSchemaValidator=t?.jsonSchemaValidator??new tT,t?.listChanged&&(this._pendingListChangedConfig=t.listChanged)}_setupListChangedHandlers(e){e.tools&&this._serverCapabilities?.tools?.listChanged&&this._setupListChangedHandler(`tools`,Np,e.tools,async()=>(await this.listTools()).tools),e.prompts&&this._serverCapabilities?.prompts?.listChanged&&this._setupListChangedHandler(`prompts`,wp,e.prompts,async()=>(await this.listPrompts()).prompts),e.resources&&this._serverCapabilities?.resources?.listChanged&&this._setupListChangedHandler(`resources`,np,e.resources,async()=>(await this.listResources()).resources)}get experimental(){return this._experimental||={tasks:new nT(this)},this._experimental}registerCapabilities(e){if(this.transport)throw Error(`Cannot register capabilities after connecting to transport`);this._capabilities=yC(this._capabilities,e)}setRequestHandler(e,t){let n=fC(e)?.method;if(!n)throw Error(`Schema is missing a method literal`);let r;if(uC(n)){let e=n;r=e._zod?.def?.value??e.value}else{let e=n;r=e._def?.value??e.value}if(typeof r!=`string`)throw Error(`Schema method literal must be a string`);let i=r;return i===`elicitation/create`?super.setRequestHandler(e,async(e,n)=>{let r=dC(Zp,e);if(!r.success){let e=r.error instanceof Error?r.error.message:String(r.error);throw new cm(ef.InvalidParams,`Invalid elicitation request: ${e}`)}let{params:i}=r.data;i.mode=i.mode??`form`;let{supportsFormMode:a,supportsUrlMode:o}=ste(this._capabilities.elicitation);if(i.mode===`form`&&!a)throw new cm(ef.InvalidParams,`Client does not support form-mode elicitation requests`);if(i.mode===`url`&&!o)throw new cm(ef.InvalidParams,`Client does not support URL-mode elicitation requests`);let s=await Promise.resolve(t(e,n));if(i.task){let e=dC(Af,s);if(!e.success){let t=e.error instanceof Error?e.error.message:String(e.error);throw new cm(ef.InvalidParams,`Invalid task creation result: ${t}`)}return e.data}let c=dC(em,s);if(!c.success){let e=c.error instanceof Error?c.error.message:String(c.error);throw new cm(ef.InvalidParams,`Invalid elicitation result: ${e}`)}let l=c.data,u=i.mode===`form`?i.requestedSchema:void 0;if(i.mode===`form`&&l.action===`accept`&&l.content&&u&&this._capabilities.elicitation?.form?.applyDefaults)try{iT(u,l.content)}catch{}return l}):i===`sampling/createMessage`?super.setRequestHandler(e,async(e,n)=>{let r=dC(Kp,e);if(!r.success){let e=r.error instanceof Error?r.error.message:String(r.error);throw new cm(ef.InvalidParams,`Invalid sampling request: ${e}`)}let{params:i}=r.data,a=await Promise.resolve(t(e,n));if(i.task){let e=dC(Af,a);if(!e.success){let t=e.error instanceof Error?e.error.message:String(e.error);throw new cm(ef.InvalidParams,`Invalid task creation result: ${t}`)}return e.data}let o=dC(i.tools||i.toolChoice?Jp:qp,a);if(!o.success){let e=o.error instanceof Error?o.error.message:String(o.error);throw new cm(ef.InvalidParams,`Invalid sampling result: ${e}`)}return o.data}):super.setRequestHandler(e,t)}assertCapability(e,t){if(!this._serverCapabilities?.[e])throw Error(`Server does not support ${e} (required for ${t})`)}async connect(e,t){if(await super.connect(e),e.sessionId===void 0)try{let n=await this.request({method:`initialize`,params:{protocolVersion:jd,capabilities:this._capabilities,clientInfo:this._clientInfo}},vf,t);if(n===void 0)throw Error(`Server sent invalid initialize result: ${n}`);if(!Md.includes(n.protocolVersion))throw Error(`Server's protocol version is not supported: ${n.protocolVersion}`);this._serverCapabilities=n.capabilities,this._serverVersion=n.serverInfo,e.setProtocolVersion&&e.setProtocolVersion(n.protocolVersion),this._instructions=n.instructions,await this.notification({method:`notifications/initialized`}),this._pendingListChangedConfig&&=(this._setupListChangedHandlers(this._pendingListChangedConfig),void 0)}catch(e){throw this.close(),e}}getServerCapabilities(){return this._serverCapabilities}getServerVersion(){return this._serverVersion}getInstructions(){return this._instructions}assertCapabilityForMethod(e){switch(e){case`logging/setLevel`:if(!this._serverCapabilities?.logging)throw Error(`Server does not support logging (required for ${e})`);break;case`prompts/get`:case`prompts/list`:if(!this._serverCapabilities?.prompts)throw Error(`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 Error(`Server does not support resources (required for ${e})`);if(e===`resources/subscribe`&&!this._serverCapabilities.resources.subscribe)throw Error(`Server does not support resource subscriptions (required for ${e})`);break;case`tools/call`:case`tools/list`:if(!this._serverCapabilities?.tools)throw Error(`Server does not support tools (required for ${e})`);break;case`completion/complete`:if(!this._serverCapabilities?.completions)throw Error(`Server does not support completions (required for ${e})`);break;case`initialize`:break;case`ping`:break}}assertNotificationCapability(e){switch(e){case`notifications/roots/list_changed`:if(!this._capabilities.roots?.listChanged)throw Error(`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){if(this._capabilities)switch(e){case`sampling/createMessage`:if(!this._capabilities.sampling)throw Error(`Client does not support sampling capability (required for ${e})`);break;case`elicitation/create`:if(!this._capabilities.elicitation)throw Error(`Client does not support elicitation capability (required for ${e})`);break;case`roots/list`:if(!this._capabilities.roots)throw Error(`Client does not support roots capability (required for ${e})`);break;case`tasks/get`:case`tasks/list`:case`tasks/result`:case`tasks/cancel`:if(!this._capabilities.tasks)throw Error(`Client does not support tasks capability (required for ${e})`);break;case`ping`:break}}assertTaskCapability(e){rT(this._serverCapabilities?.tasks?.requests,e,`Server`)}assertTaskHandlerCapability(e){this._capabilities&&ote(this._capabilities.tasks?.requests,e,`Client`)}async ping(e){return this.request({method:`ping`},af,e)}async complete(e,t){return this.request({method:`completion/complete`,params:e},rm,t)}async setLoggingLevel(e,t){return this.request({method:`logging/setLevel`,params:{level:e}},af,t)}async getPrompt(e,t){return this.request({method:`prompts/get`,params:e},Cp,t)}async listPrompts(e,t){return this.request({method:`prompts/list`,params:e},fp,t)}async listResources(e,t){return this.request({method:`resources/list`,params:e},Yf,t)}async listResourceTemplates(e,t){return this.request({method:`resources/templates/list`,params:e},Zf,t)}async readResource(e,t){return this.request({method:`resources/read`,params:e},tp,t)}async subscribeResource(e,t){return this.request({method:`resources/subscribe`,params:e},af,t)}async unsubscribeResource(e,t){return this.request({method:`resources/unsubscribe`,params:e},af,t)}async callTool(e,t=Ap,n){if(this.isToolTaskRequired(e.name))throw new cm(ef.InvalidRequest,`Tool "${e.name}" requires task-based execution. Use client.experimental.tasks.callToolStream() instead.`);let r=await this.request({method:`tools/call`,params:e},t,n),i=this.getToolOutputValidator(e.name);if(i){if(!r.structuredContent&&!r.isError)throw new cm(ef.InvalidRequest,`Tool ${e.name} has an output schema but did not return structured content`);if(r.structuredContent)try{let e=i(r.structuredContent);if(!e.valid)throw new cm(ef.InvalidParams,`Structured content does not match the tool's output schema: ${e.errorMessage}`)}catch(e){throw e instanceof cm?e:new cm(ef.InvalidParams,`Failed to validate structured content: ${e instanceof Error?e.message:String(e)}`)}}return r}isToolTask(e){return this._serverCapabilities?.tasks?.requests?.tools?.call?this._cachedKnownTaskTools.has(e):!1}isToolTaskRequired(e){return this._cachedRequiredTaskTools.has(e)}cacheToolMetadata(e){this._cachedToolOutputValidators.clear(),this._cachedKnownTaskTools.clear(),this._cachedRequiredTaskTools.clear();for(let t of e){if(t.outputSchema){let e=this._jsonSchemaValidator.getValidator(t.outputSchema);this._cachedToolOutputValidators.set(t.name,e)}let e=t.execution?.taskSupport;(e===`required`||e===`optional`)&&this._cachedKnownTaskTools.add(t.name),e===`required`&&this._cachedRequiredTaskTools.add(t.name)}}getToolOutputValidator(e){return this._cachedToolOutputValidators.get(e)}async listTools(e,t){let n=await this.request({method:`tools/list`,params:e},kp,t);return this.cacheToolMetadata(n.tools),n}_setupListChangedHandler(e,t,n,r){let i=Pp.safeParse(n);if(!i.success)throw Error(`Invalid ${e} listChanged options: ${i.error.message}`);if(typeof n.onChanged!=`function`)throw Error(`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`})}};function aT(e){return e?e instanceof Headers?Object.fromEntries(e.entries()):Array.isArray(e)?Object.fromEntries(e):{...e}:{}}function lte(e=fetch,t){return t?async(n,r)=>e(n,{...t,...r,headers:r?.headers?{...aT(t.headers),...aT(r.headers)}:t.headers}):e}var oT=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 sT(e){}function ute(e){if(typeof e==`function`)throw TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");let{onEvent:t=sT,onError:n=sT,onRetry:r=sT,onComment:i}=e,a=``,o=!0,s,c=``,l=``;function u(e){let t=o?e.replace(/^\xEF\xBB\xBF/,``):e,[n,r]=dte(`${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}
|
|
58
|
+
`;break;case`id`:s=t.includes(`\0`)?void 0:t;break;case`retry`:/^\d+$/.test(t)?r(parseInt(t,10)):n(new oT(`Invalid \`retry\` value: "${t}"`,{type:`invalid-retry`,value:t,line:i}));break;default:n(new oT(`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(`
|
|
59
|
+
`)?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 dte(e){let t=[],n=``,r=0;for(;r<e.length;){let i=e.indexOf(`\r`,r),a=e.indexOf(`
|
|
60
|
+
`,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]===`
|
|
61
|
+
`&&r++}}return[t,n]}var fte=class extends TransformStream{constructor({onError:e,onRetry:t,onComment:n}={}){let r;super({start(i){r=ute({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)}})}},pte={initialReconnectionDelay:1e3,maxReconnectionDelay:3e4,reconnectionDelayGrowFactor:1.5,maxRetries:2},cT=class extends Error{constructor(e,t){super(`Streamable HTTP error: ${t}`),this.code=e}},mte=class{constructor(e,t){this._hasCompletedAuthFlow=!1,this._url=e,this._resourceMetadataUrl=void 0,this._scope=void 0,this._requestInit=t?.requestInit,this._authProvider=t?.authProvider,this._fetch=t?.fetch,this._fetchWithInit=lte(t?.fetch,t?.requestInit),this._sessionId=t?.sessionId,this._reconnectionOptions=t?.reconnectionOptions??pte}async _authThenStart(){if(!this._authProvider)throw new Lm(`No auth provider`);let e;try{e=await Km(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})}catch(e){throw this.onerror?.(e),e}if(e!==`AUTHORIZED`)throw new Lm;return await this._startOrAuthSse({resumptionToken:void 0})}async _commonHeaders(){let e={};if(this._authProvider){let t=await this._authProvider.tokens();t&&(e.Authorization=`Bearer ${t.access_token}`)}this._sessionId&&(e[`mcp-session-id`]=this._sessionId),this._protocolVersion&&(e[`mcp-protocol-version`]=this._protocolVersion);let t=aT(this._requestInit?.headers);return new Headers({...e,...t})}async _startOrAuthSse(e){let{resumptionToken:t}=e;try{let n=await this._commonHeaders();n.set(`Accept`,`text/event-stream`),t&&n.set(`last-event-id`,t);let r=await(this._fetch??fetch)(this._url,{method:`GET`,headers:n,signal:this._abortController?.signal});if(!r.ok){if(await r.body?.cancel(),r.status===401&&this._authProvider)return await this._authThenStart();if(r.status===405)return;throw new cT(r.status,`Failed to open SSE stream: ${r.statusText}`)}this._handleSseStream(r.body,e,!0)}catch(e){throw 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.`));return}let r=this._getNextReconnectionDelay(t);this._reconnectionTimeout=setTimeout(()=>{this._startOrAuthSse(e).catch(n=>{this.onerror?.(Error(`Failed to reconnect SSE stream: ${n instanceof Error?n.message:String(n)}`)),this._scheduleReconnection(e,t+1)})},r)}_handleSseStream(e,t,n){if(!e)return;let{onresumptiontoken:r,replayMessageId:i}=t,a,o=!1,s=!1;(async()=>{try{let t=e.pipeThrough(new TextDecoderStream).pipeThrough(new fte({onRetry:e=>{this._serverRetryMs=e}})).getReader();for(;;){let{value:e,done:n}=await t.read();if(n)break;if(e.id&&(a=e.id,o=!0,r?.(e.id)),e.data&&(!e.event||e.event===`message`))try{let t=rf.parse(JSON.parse(e.data));$d(t)&&(s=!0,i!==void 0&&(t.id=i)),this.onmessage?.(t)}catch(e){this.onerror?.(e)}}(n||o)&&!s&&this._abortController&&!this._abortController.signal.aborted&&this._scheduleReconnection({resumptionToken:a,onresumptiontoken:r,replayMessageId:i},0)}catch(e){if(this.onerror?.(Error(`SSE stream disconnected: ${e}`)),(n||o)&&!s&&this._abortController&&!this._abortController.signal.aborted)try{this._scheduleReconnection({resumptionToken:a,onresumptiontoken:r,replayMessageId:i},0)}catch(e){this.onerror?.(Error(`Failed to reconnect: ${e instanceof Error?e.message:String(e)}`))}}})()}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){if(!this._authProvider)throw new Lm(`No auth provider`);if(await Km(this._authProvider,{serverUrl:this._url,authorizationCode:e,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!==`AUTHORIZED`)throw new Lm(`Failed to authorize`)}async close(){this._reconnectionTimeout&&=(clearTimeout(this._reconnectionTimeout),void 0),this._abortController?.abort(),this.onclose?.()}async send(e,t){try{let{resumptionToken:n,onresumptiontoken:r}=t||{};if(n){this._startOrAuthSse({resumptionToken:n,replayMessageId:Yd(e)?e.id:void 0}).catch(e=>this.onerror?.(e));return}let i=await this._commonHeaders();i.set(`content-type`,`application/json`),i.set(`accept`,`application/json, text/event-stream`);let a={...this._requestInit,method:`POST`,headers:i,body:JSON.stringify(e),signal:this._abortController?.signal},o=await(this._fetch??fetch)(this._url,a),s=o.headers.get(`mcp-session-id`);if(s&&(this._sessionId=s),!o.ok){let t=await o.text().catch(()=>null);if(o.status===401&&this._authProvider){if(this._hasCompletedAuthFlow)throw new cT(401,`Server returned 401 after successful authentication`);let{resourceMetadataUrl:t,scope:n}=Xm(o);if(this._resourceMetadataUrl=t,this._scope=n,await Km(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!==`AUTHORIZED`)throw new Lm;return this._hasCompletedAuthFlow=!0,this.send(e)}if(o.status===403&&this._authProvider){let{resourceMetadataUrl:t,scope:n,error:r}=Xm(o);if(r===`insufficient_scope`){let r=o.headers.get(`WWW-Authenticate`);if(this._lastUpscopingHeader===r)throw new cT(403,`Server returned 403 after trying upscoping`);if(n&&(this._scope=n),t&&(this._resourceMetadataUrl=t),this._lastUpscopingHeader=r??void 0,await Km(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetch})!==`AUTHORIZED`)throw new Lm;return this.send(e)}}throw new cT(o.status,`Error POSTing to endpoint: ${t}`)}if(this._hasCompletedAuthFlow=!1,this._lastUpscopingHeader=void 0,o.status===202){await o.body?.cancel(),bf(e)&&this._startOrAuthSse({resumptionToken:void 0}).catch(e=>this.onerror?.(e));return}let c=(Array.isArray(e)?e:[e]).filter(e=>`method`in e&&`id`in e&&e.id!==void 0).length>0,l=o.headers.get(`content-type`);if(c)if(l?.includes(`text/event-stream`))this._handleSseStream(o.body,{onresumptiontoken:r},!1);else if(l?.includes(`application/json`)){let e=await o.json(),t=Array.isArray(e)?e.map(e=>rf.parse(e)):[rf.parse(e)];for(let e of t)this.onmessage?.(e)}else throw await o.body?.cancel(),new cT(-1,`Unexpected content type: ${l}`);else await o.body?.cancel()}catch(e){throw 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.body?.cancel(),!n.ok&&n.status!==405)throw new cT(n.status,`Failed to terminate session: ${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})}},lT=new class{client=null;transport=null;async connect(e,t){this.transport=new mte(typeof e==`string`?new URL(e):e,{authProvider:t}),this.client=new cte({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 Error&&e.message.includes(`MCP error -32601: Method not found`))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._serverVersion}async finishAuth(e){if(!this.transport)throw Error(`Transport not available. Call connect() first.`);await this.transport.finishAuth(e)}async close(){this.client&&=(await this.client.close(),null),this.transport&&=null}},uT=null,dT=()=>`${window.location.origin}/mcp`;async function fT(){let e=dT(),{setStatus:t,setRequiresAuth:n,setError:r}=bi.getState();t(`connecting`),r(null),await lT.close();let i=!1;try{(await Qm(e))?.authorization_servers?.length&&(i=!0)}catch{}n(i);try{i?(uT=new lC,await lT.connect(e,uT)):(uT=null,await lT.connect(e)),t(`authenticated`),oC.invalidateQueries({queryKey:[`list-tools`]})}catch(e){if(e instanceof Lm){t(`unauthenticated`);return}t(`error`),r(e instanceof Error?e.message:`Connection failed`)}}async function hte(e){let t=dT();await Km(new lC,{serverUrl:t,authorizationCode:e}),await fT()}async function gte(){uT?.invalidateCredentials(`all`),uT=null,await lT.close(),bi.getState().reset(),oC.invalidateQueries({queryKey:[`list-tools`]})}var _te={theme:`light`,userAgent:{device:{type:`desktop`},capabilities:{hover:!0,touch:!1}},locale:`en-US`,maxHeight:void 0,displayMode:`inline`,safeArea:{insets:{top:0,bottom:0,left:0,right:0}},toolInput:{},toolOutput:null,toolResponseMetadata:null,view:{mode:`inline`},widgetState:null},pT=()=>{let{data:e}=it({queryKey:[`list-tools`],queryFn:()=>lT.listTools()});return e},vte=()=>{if(bi(e=>e.status)===`authenticated`)return lT.getServerInfo()},yte=()=>{let{setToolData:e}=KS();return at({mutationFn:async({toolName:t,args:n})=>{e(t,{input:n??{},response:void 0,openaiRef:null,openaiLogs:[],openaiObject:null,openInAppUrl:null});let r=await lT.callTool(t,n);return e(t,{input:n??{},response:r,openaiRef:null,openaiLogs:[],openaiObject:{..._te,toolInput:n??{},toolOutput:r.structuredContent,toolResponseMetadata:r.meta??null,widgetState:null},openInAppUrl:null}),r}})},mT=()=>{let[e]=aC();return pT().find(t=>t.name===e)??null},hT=()=>{let e=mT();if(!e)throw Error(`No tool is currently selected`);return e},gT=e=>it({queryKey:[`resource`,e],queryFn:async()=>{if(!e)throw Error(`Resource URI is required`);return await lT.readResource(e)}});function _T(){return typeof window<`u`}function vT(e){return xT(e)?(e.nodeName||``).toLowerCase():`#document`}function yT(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function bT(e){return((xT(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function xT(e){return _T()?e instanceof Node||e instanceof yT(e).Node:!1}function ST(e){return _T()?e instanceof Element||e instanceof yT(e).Element:!1}function CT(e){return _T()?e instanceof HTMLElement||e instanceof yT(e).HTMLElement:!1}function wT(e){return!_T()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof yT(e).ShadowRoot}function TT(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=MT(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function bte(e){return/^(table|td|th)$/.test(vT(e))}function ET(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var xte=/transform|translate|scale|rotate|perspective|filter/,Ste=/paint|layout|strict|content/,DT=e=>!!e&&e!==`none`,OT;function kT(e){let t=ST(e)?MT(e):e;return DT(t.transform)||DT(t.translate)||DT(t.scale)||DT(t.rotate)||DT(t.perspective)||!AT()&&(DT(t.backdropFilter)||DT(t.filter))||xte.test(t.willChange||``)||Ste.test(t.contain||``)}function Cte(e){let t=PT(e);for(;CT(t)&&!jT(t);){if(kT(t))return t;if(ET(t))return null;t=PT(t)}return null}function AT(){return OT??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),OT}function jT(e){return/^(html|body|#document)$/.test(vT(e))}function MT(e){return yT(e).getComputedStyle(e)}function NT(e){return ST(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function PT(e){if(vT(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||wT(e)&&e.host||bT(e);return wT(t)?t.host:t}function FT(e){let t=PT(e);return jT(t)?e.ownerDocument?e.ownerDocument.body:e.body:CT(t)&&TT(t)?t:FT(t)}function IT(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=FT(e),i=r===e.ownerDocument?.body,a=yT(r);if(i){let e=LT(a);return t.concat(a,a.visualViewport||[],TT(r)?r:[],e&&n?IT(e):[])}else return t.concat(r,IT(r,[],n))}function LT(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var RT={};function zT(e,t){let n=b.useRef(RT);return n.current===RT&&(n.current=e(t)),n}var BT=b[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],wte=BT&&BT!==b.useLayoutEffect?BT:e=>e();function VT(e){let t=zT(Tte).current;return t.next=e,wte(t.effect),t.trampoline}function Tte(){let e={next:void 0,callback:Ete,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function Ete(){}var Dte={...b},$=typeof document<`u`?b.useLayoutEffect:()=>{};function HT(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}var UT={};function WT(e,t,n,r,i){let a={...qT(e,UT)};return t&&(a=GT(a,t)),n&&(a=GT(a,n)),r&&(a=GT(a,r)),i&&(a=GT(a,i)),a}function Ote(e){if(e.length===0)return UT;if(e.length===1)return qT(e[0],UT);let t={...qT(e[0],UT)};for(let n=1;n<e.length;n+=1)t=GT(t,e[n]);return t}function GT(e,t){return KT(t)?t(e):kte(e,t)}function kte(e,t){if(!t)return e;for(let n in t){let r=t[n];switch(n){case`style`:e[n]=HT(e.style,r);break;case`className`:e[n]=YT(e.className,r);break;default:Ate(n,r)?e[n]=jte(e[n],r):e[n]=r}}return e}function Ate(e,t){let n=e.charCodeAt(0),r=e.charCodeAt(1),i=e.charCodeAt(2);return n===111&&r===110&&i>=65&&i<=90&&(typeof t==`function`||t===void 0)}function KT(e){return typeof e==`function`}function qT(e,t){return KT(e)?e(t):e??UT}function jte(e,t){return t?e?n=>{if(Mte(n)){let r=n;JT(r);let i=t(r);return r.baseUIHandlerPrevented||e?.(r),i}let r=t(n);return e?.(n),r}:t:e}function JT(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function YT(e,t){return t?e?t+` `+e:t:e}function Mte(e){return typeof e==`object`&&!!e&&`nativeEvent`in e}function XT(e,t){return function(n,...r){let i=new URL(e);return i.searchParams.set(`code`,n.toString()),r.forEach(e=>i.searchParams.append(`args[]`,e)),`${t} error #${n}; visit ${i} for the full message.`}}var ZT=XT(`https://base-ui.com/production-error`,`Base UI`),QT=b.createContext(void 0);function $T(e=!1){let t=b.useContext(QT);if(t===void 0&&!e)throw Error(ZT(16));return t}function eE(e){let{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:i=0,isNativeButton:a}=e,o=r&&t!==!1,s=r&&t===!1;return{props:b.useMemo(()=>{let e={onKeyDown(e){n&&t&&e.key!==`Tab`&&e.preventDefault()}};return r||(e.tabIndex=i,!a&&n&&(e.tabIndex=t?i:-1)),(a&&(t||o)||!a&&n)&&(e[`aria-disabled`]=n),a&&(!t||s)&&(e.disabled=n),e},[r,n,t,o,s,a,i])}}function tE(e={}){let{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:i=!0,composite:a}=e,o=b.useRef(null),s=$T(!0),c=a??s!==void 0,{props:l}=eE({focusableWhenDisabled:n,disabled:t,composite:c,tabIndex:r,isNativeButton:i}),u=b.useCallback(()=>{let e=o.current;nE(e)&&c&&t&&l.disabled===void 0&&e.disabled&&(e.disabled=!1)},[t,l.disabled,c]);return $(u,[u]),{getButtonProps:b.useCallback((e={})=>{let{onClick:n,onMouseDown:r,onKeyUp:a,onKeyDown:o,onPointerDown:s,...u}=e;return WT({type:i?`button`:void 0,onClick(e){if(t){e.preventDefault();return}n?.(e)},onMouseDown(e){t||r?.(e)},onKeyDown(e){if(t||(JT(e),o?.(e),e.baseUIHandlerPrevented))return;let r=e.target===e.currentTarget,a=e.currentTarget,s=nE(a),l=!i&&rE(a),u=r&&(i?s:!l),d=e.key===`Enter`,f=e.key===` `,p=a.getAttribute(`role`),m=p?.startsWith(`menuitem`)||p===`option`||p===`gridcell`;if(r&&c&&f){if(e.defaultPrevented&&m)return;e.preventDefault(),l||i&&s?(a.click(),e.preventBaseUIHandler()):u&&(n?.(e),e.preventBaseUIHandler());return}u&&(!i&&(f||d)&&e.preventDefault(),!i&&d&&n?.(e))},onKeyUp(e){if(!t){if(JT(e),a?.(e),e.target===e.currentTarget&&i&&c&&nE(e.currentTarget)&&e.key===` `){e.preventDefault();return}e.baseUIHandlerPrevented||e.target===e.currentTarget&&!i&&!c&&e.key===` `&&n?.(e)}},onPointerDown(e){if(t){e.preventDefault();return}s?.(e)}},i?void 0:{role:`button`},l,u)},[t,l,c,i]),buttonRef:VT(e=>{o.current=e,u()})}}function nE(e){return CT(e)&&e.tagName===`BUTTON`}function rE(e){return!!(e?.tagName===`A`&&e?.href)}function iE(e,t,n,r){let i=zT(oE).current;return sE(i,e,t,n,r)&&lE(i,[e,t,n,r]),i.callback}function aE(e){let t=zT(oE).current;return cE(t,e)&&lE(t,e),t.callback}function oE(){return{callback:null,cleanup:null,refs:[]}}function sE(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function cE(e,t){return e.refs.length!==t.length||e.refs.some((e,n)=>e!==t[n])}function lE(e,t){if(e.refs=t,t.every(e=>e==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&=(e.cleanup(),null),n!=null){let r=Array(t.length).fill(null);for(let e=0;e<t.length;e+=1){let i=t[e];if(i!=null)switch(typeof i){case`function`:{let t=i(n);typeof t==`function`&&(r[e]=t);break}case`object`:i.current=n;break;default:}}e.cleanup=()=>{for(let e=0;e<t.length;e+=1){let n=t[e];if(n!=null)switch(typeof n){case`function`:{let t=r[e];typeof t==`function`?t():n(null);break}case`object`:n.current=null;break;default:}}}}}}var uE=19;function dE(e){return uE>=e}function fE(e){if(!b.isValidElement(e))return null;let t=e,n=t.props;return(dE(19)?n?.ref:t.ref)??null}function pE(e,t){let n={};for(let r in e){let i=e[r];if(t?.hasOwnProperty(r)){let e=t[r](i);e!=null&&Object.assign(n,e);continue}i===!0?n[`data-${r.toLowerCase()}`]=``:i&&(n[`data-${r.toLowerCase()}`]=i.toString())}return n}function mE(e,t){return typeof e==`function`?e(t):e}function hE(e,t){return typeof e==`function`?e(t):e}function gE(){}var _E=Object.freeze([]),vE=Object.freeze({}),yE={style:{transition:`none`}},Nte=`data-base-ui-click-trigger`,bE={fallbackAxisSide:`none`},xE={fallbackAxisSide:`end`},SE={clipPath:`inset(50%)`,position:`fixed`,top:0,left:0};function CE(e,t,n={}){let r=t.render,i=wE(t,n);return n.enabled===!1?null:EE(e,r,i,n.state??vE)}function wE(e,t={}){let{className:n,style:r,render:i}=e,{state:a=vE,ref:o,props:s,stateAttributesMapping:c,enabled:l=!0}=t,u=l?mE(n,a):void 0,d=l?hE(r,a):void 0,f=l?pE(a,c):vE,p=l?HT(f,Array.isArray(s)?Ote(s):s)??vE:vE;return typeof document<`u`&&(l?Array.isArray(o)?p.ref=aE([p.ref,fE(i),...o]):p.ref=iE(p.ref,fE(i),o):iE(null,null)),l?(u!==void 0&&(p.className=YT(p.className,u)),d!==void 0&&(p.style=HT(p.style,d)),p):vE}var TE=Symbol.for(`react.lazy`);function EE(e,t,n,r){if(t){if(typeof t==`function`)return t(n,r);let e=WT(n,t.props);e.ref=n.ref;let i=t;return i?.$$typeof===TE&&(i=b.Children.toArray(t)[0]),b.cloneElement(i,e)}if(e&&typeof e==`string`)return DE(e,n);throw Error(ZT(8))}function DE(e,t){return e===`button`?(0,b.createElement)(`button`,{type:`button`,...t,key:t.key}):e===`img`?(0,b.createElement)(`img`,{alt:``,...t,key:t.key}):b.createElement(e,t)}var OE=b.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,focusableWhenDisabled:a=!1,nativeButton:o=!0,...s}=e,{getButtonProps:c,buttonRef:l}=tE({disabled:i,focusableWhenDisabled:a,native:o});return CE(`button`,e,{state:{disabled:i},ref:[t,l],props:[s,c]})});function kE(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=kE(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function AE(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=kE(e))&&(r&&(r+=` `),r+=t);return r}var jE=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,ME=AE,NE=(e,t)=>n=>{if(t?.variants==null)return ME(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=jE(t)||jE(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 ME(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)},PE=(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},FE=(e,t)=>({classGroupId:e,validator:t}),IE=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),LE=`-`,RE=[],zE=`arbitrary..`,BE=e=>{let t=UE(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return HE(e);let n=e.split(LE);return VE(n,n[0]===``&&n.length>1?1:0,t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?PE(i,t):t:i||RE}return n[e]||RE}}},VE=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=VE(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(LE):e.slice(t).join(LE),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},HE=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?zE+r:void 0})(),UE=e=>{let{theme:t,classGroups:n}=e;return WE(n,t)},WE=(e,t)=>{let n=IE();for(let r in e){let i=e[r];GE(i,n,r,t)}return n},GE=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];KE(i,t,n,r)}},KE=(e,t,n,r)=>{if(typeof e==`string`){qE(e,t,n);return}if(typeof e==`function`){JE(e,t,n,r);return}YE(e,t,n,r)},qE=(e,t,n)=>{let r=e===``?t:XE(t,e);r.classGroupId=n},JE=(e,t,n,r)=>{if(ZE(e)){GE(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(FE(n,e))},YE=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];GE(o,XE(t,a),n,r)}},XE=(e,t)=>{let n=e,r=t.split(LE),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=IE(),n.nextPart.set(t,i)),n=i}return n},ZE=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,QE=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)}}},$E=`!`,eD=`:`,tD=[],nD=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),rD=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===eD){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($E)?(c=s.slice(0,-1),l=!0):s.startsWith($E)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return nD(t,l,c,u)};if(t){let e=t+eD,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):nD(tD,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},iD=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}},aD=e=>({cache:QE(e.cacheSize),parseClassName:rD(e),sortModifiers:iD(e),...BE(e)}),oD=/\s+/,sD=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a}=t,o=[],s=e.trim().split(oD),c=``;for(let e=s.length-1;e>=0;--e){let t=s[e],{isExternal:l,modifiers:u,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:p}=n(t);if(l){c=t+(c.length>0?` `+c:c);continue}let m=!!p,h=r(m?f.substring(0,p):f);if(!h){if(!m){c=t+(c.length>0?` `+c:c);continue}if(h=r(f),!h){c=t+(c.length>0?` `+c:c);continue}m=!1}let g=u.length===0?``:u.length===1?u[0]:a(u).join(`:`),_=d?g+$E:g,v=_+h;if(o.indexOf(v)>-1)continue;o.push(v);let y=i(h,m);for(let e=0;e<y.length;++e){let t=y[e];o.push(_+t)}c=t+(c.length>0?` `+c:c)}return c},cD=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=lD(n))&&(i&&(i+=` `),i+=r);return i},lD=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=lD(e[r]))&&(n&&(n+=` `),n+=t);return n},uD=(e,...t)=>{let n,r,i,a,o=o=>(n=aD(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=sD(e,n);return i(e,a),a};return a=o,(...e)=>a(cD(...e))},dD=[],fD=e=>{let t=t=>t[e]||dD;return t.isThemeGetter=!0,t},pD=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,mD=/^\((?:(\w[\w-]*):)?(.+)\)$/i,hD=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,gD=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,_D=/\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$/,vD=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,yD=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,bD=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,xD=e=>hD.test(e),SD=e=>!!e&&!Number.isNaN(Number(e)),CD=e=>!!e&&Number.isInteger(Number(e)),wD=e=>e.endsWith(`%`)&&SD(e.slice(0,-1)),TD=e=>gD.test(e),ED=()=>!0,Pte=e=>_D.test(e)&&!vD.test(e),DD=()=>!1,Fte=e=>yD.test(e),OD=e=>bD.test(e),kD=e=>!jD(e)&&!zD(e),AD=e=>qD(e,ZD,DD),jD=e=>pD.test(e),MD=e=>qD(e,QD,Pte),ND=e=>qD(e,$D,SD),PD=e=>qD(e,tO,ED),FD=e=>qD(e,eO,DD),ID=e=>qD(e,YD,DD),LD=e=>qD(e,XD,OD),RD=e=>qD(e,nO,Fte),zD=e=>mD.test(e),BD=e=>JD(e,QD),VD=e=>JD(e,eO),HD=e=>JD(e,YD),UD=e=>JD(e,ZD),WD=e=>JD(e,XD),GD=e=>JD(e,nO,!0),KD=e=>JD(e,tO,!0),qD=(e,t,n)=>{let r=pD.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},JD=(e,t,n=!1)=>{let r=mD.exec(e);return r?r[1]?t(r[1]):n:!1},YD=e=>e===`position`||e===`percentage`,XD=e=>e===`image`||e===`url`,ZD=e=>e===`length`||e===`size`||e===`bg-size`,QD=e=>e===`length`,$D=e=>e===`number`,eO=e=>e===`family-name`,tO=e=>e===`number`||e===`weight`,nO=e=>e===`shadow`,rO=uD(()=>{let e=fD(`color`),t=fD(`font`),n=fD(`text`),r=fD(`font-weight`),i=fD(`tracking`),a=fD(`leading`),o=fD(`breakpoint`),s=fD(`container`),c=fD(`spacing`),l=fD(`radius`),u=fD(`shadow`),d=fD(`inset-shadow`),f=fD(`text-shadow`),p=fD(`drop-shadow`),m=fD(`blur`),h=fD(`perspective`),g=fD(`aspect`),_=fD(`ease`),v=fD(`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(),zD,jD],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[zD,jD,c],T=()=>[xD,`full`,`auto`,...w()],E=()=>[CD,`none`,`subgrid`,zD,jD],D=()=>[`auto`,{span:[`full`,CD,zD,jD]},CD,zD,jD],O=()=>[CD,`auto`,zD,jD],k=()=>[`auto`,`min`,`max`,`fr`,zD,jD],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=()=>[xD,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],P=()=>[xD,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],F=()=>[xD,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],I=()=>[e,zD,jD],L=()=>[...b(),HD,ID,{position:[zD,jD]}],R=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],z=()=>[`auto`,`cover`,`contain`,UD,AD,{size:[zD,jD]}],B=()=>[wD,BD,MD],V=()=>[``,`none`,`full`,l,zD,jD],H=()=>[``,SD,BD,MD],U=()=>[`solid`,`dashed`,`dotted`,`double`],ee=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],W=()=>[SD,wD,HD,ID],te=()=>[``,`none`,m,zD,jD],ne=()=>[`none`,SD,zD,jD],re=()=>[`none`,SD,zD,jD],ie=()=>[SD,zD,jD],ae=()=>[xD,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[TD],breakpoint:[TD],color:[ED],container:[TD],"drop-shadow":[TD],ease:[`in`,`out`,`in-out`],font:[kD],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[TD],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[TD],shadow:[TD],spacing:[`px`,SD],text:[TD],"text-shadow":[TD],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,xD,jD,zD,g]}],container:[`container`],columns:[{columns:[SD,jD,zD,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:[CD,`auto`,zD,jD]}],basis:[{basis:[xD,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[SD,xD,`auto`,`initial`,`none`,jD]}],grow:[{grow:[``,SD,zD,jD]}],shrink:[{shrink:[``,SD,zD,jD]}],order:[{order:[CD,`first`,`last`,`none`,zD,jD]}],"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,BD,MD]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,KD,PD]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,wD,jD]}],"font-family":[{font:[VD,FD,t]}],"font-features":[{"font-features":[jD]}],"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,zD,jD]}],"line-clamp":[{"line-clamp":[SD,`none`,zD,ND]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,zD,jD]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,zD,jD]}],"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:[...U(),`wavy`]}],"text-decoration-thickness":[{decoration:[SD,`from-font`,`auto`,zD,MD]}],"text-decoration-color":[{decoration:I()}],"underline-offset":[{"underline-offset":[SD,`auto`,zD,jD]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,zD,jD]}],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`,zD,jD]}],"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:R()}],"bg-size":[{bg:z()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},CD,zD,jD],radial:[``,zD,jD],conic:[CD,zD,jD]},WD,LD]}],"bg-color":[{bg:I()}],"gradient-from-pos":[{from:B()}],"gradient-via-pos":[{via:B()}],"gradient-to-pos":[{to:B()}],"gradient-from":[{from:I()}],"gradient-via":[{via:I()}],"gradient-to":[{to:I()}],rounded:[{rounded:V()}],"rounded-s":[{"rounded-s":V()}],"rounded-e":[{"rounded-e":V()}],"rounded-t":[{"rounded-t":V()}],"rounded-r":[{"rounded-r":V()}],"rounded-b":[{"rounded-b":V()}],"rounded-l":[{"rounded-l":V()}],"rounded-ss":[{"rounded-ss":V()}],"rounded-se":[{"rounded-se":V()}],"rounded-ee":[{"rounded-ee":V()}],"rounded-es":[{"rounded-es":V()}],"rounded-tl":[{"rounded-tl":V()}],"rounded-tr":[{"rounded-tr":V()}],"rounded-br":[{"rounded-br":V()}],"rounded-bl":[{"rounded-bl":V()}],"border-w":[{border:H()}],"border-w-x":[{"border-x":H()}],"border-w-y":[{"border-y":H()}],"border-w-s":[{"border-s":H()}],"border-w-e":[{"border-e":H()}],"border-w-bs":[{"border-bs":H()}],"border-w-be":[{"border-be":H()}],"border-w-t":[{"border-t":H()}],"border-w-r":[{"border-r":H()}],"border-w-b":[{"border-b":H()}],"border-w-l":[{"border-l":H()}],"divide-x":[{"divide-x":H()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":H()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...U(),`hidden`,`none`]}],"divide-style":[{divide:[...U(),`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:[...U(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[SD,zD,jD]}],"outline-w":[{outline:[``,SD,BD,MD]}],"outline-color":[{outline:I()}],shadow:[{shadow:[``,`none`,u,GD,RD]}],"shadow-color":[{shadow:I()}],"inset-shadow":[{"inset-shadow":[`none`,d,GD,RD]}],"inset-shadow-color":[{"inset-shadow":I()}],"ring-w":[{ring:H()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:I()}],"ring-offset-w":[{"ring-offset":[SD,MD]}],"ring-offset-color":[{"ring-offset":I()}],"inset-ring-w":[{"inset-ring":H()}],"inset-ring-color":[{"inset-ring":I()}],"text-shadow":[{"text-shadow":[`none`,f,GD,RD]}],"text-shadow-color":[{"text-shadow":I()}],opacity:[{opacity:[SD,zD,jD]}],"mix-blend":[{"mix-blend":[...ee(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":ee()}],"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":[SD]}],"mask-image-linear-from-pos":[{"mask-linear-from":W()}],"mask-image-linear-to-pos":[{"mask-linear-to":W()}],"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":W()}],"mask-image-t-to-pos":[{"mask-t-to":W()}],"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":W()}],"mask-image-r-to-pos":[{"mask-r-to":W()}],"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":W()}],"mask-image-b-to-pos":[{"mask-b-to":W()}],"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":W()}],"mask-image-l-to-pos":[{"mask-l-to":W()}],"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":W()}],"mask-image-x-to-pos":[{"mask-x-to":W()}],"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":W()}],"mask-image-y-to-pos":[{"mask-y-to":W()}],"mask-image-y-from-color":[{"mask-y-from":I()}],"mask-image-y-to-color":[{"mask-y-to":I()}],"mask-image-radial":[{"mask-radial":[zD,jD]}],"mask-image-radial-from-pos":[{"mask-radial-from":W()}],"mask-image-radial-to-pos":[{"mask-radial-to":W()}],"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":[SD]}],"mask-image-conic-from-pos":[{"mask-conic-from":W()}],"mask-image-conic-to-pos":[{"mask-conic-to":W()}],"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:R()}],"mask-size":[{mask:z()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,zD,jD]}],filter:[{filter:[``,`none`,zD,jD]}],blur:[{blur:te()}],brightness:[{brightness:[SD,zD,jD]}],contrast:[{contrast:[SD,zD,jD]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,GD,RD]}],"drop-shadow-color":[{"drop-shadow":I()}],grayscale:[{grayscale:[``,SD,zD,jD]}],"hue-rotate":[{"hue-rotate":[SD,zD,jD]}],invert:[{invert:[``,SD,zD,jD]}],saturate:[{saturate:[SD,zD,jD]}],sepia:[{sepia:[``,SD,zD,jD]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,zD,jD]}],"backdrop-blur":[{"backdrop-blur":te()}],"backdrop-brightness":[{"backdrop-brightness":[SD,zD,jD]}],"backdrop-contrast":[{"backdrop-contrast":[SD,zD,jD]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,SD,zD,jD]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[SD,zD,jD]}],"backdrop-invert":[{"backdrop-invert":[``,SD,zD,jD]}],"backdrop-opacity":[{"backdrop-opacity":[SD,zD,jD]}],"backdrop-saturate":[{"backdrop-saturate":[SD,zD,jD]}],"backdrop-sepia":[{"backdrop-sepia":[``,SD,zD,jD]}],"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`,zD,jD]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[SD,`initial`,zD,jD]}],ease:[{ease:[`linear`,`initial`,_,zD,jD]}],delay:[{delay:[SD,zD,jD]}],animate:[{animate:[`none`,v,zD,jD]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,zD,jD]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:ne()}],"rotate-x":[{"rotate-x":ne()}],"rotate-y":[{"rotate-y":ne()}],"rotate-z":[{"rotate-z":ne()}],scale:[{scale:re()}],"scale-x":[{"scale-x":re()}],"scale-y":[{"scale-y":re()}],"scale-z":[{"scale-z":re()}],"scale-3d":[`scale-3d`],skew:[{skew:ie()}],"skew-x":[{"skew-x":ie()}],"skew-y":[{"skew-y":ie()}],transform:[{transform:[zD,jD,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:ae()}],"translate-x":[{"translate-x":ae()}],"translate-y":[{"translate-y":ae()}],"translate-z":[{"translate-z":ae()}],"translate-none":[`translate-none`],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`,zD,jD]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"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`,zD,jD]}],fill:[{fill:[`none`,...I()]}],"stroke-w":[{stroke:[SD,BD,MD,ND]}],stroke:[{stroke:[`none`,...I()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{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`]},orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}});function iO(...e){return rO(AE(e))}var aO=NE(`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:aria-invalid:border-destructive/50 rounded-none border border-transparent bg-clip-padding text-xs font-medium focus-visible:ring-1 aria-invalid:ring-1 [&_svg:not([class*='size-'])]:size-4 inline-flex items-center justify-center whitespace-nowrap transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none shrink-0 [&_svg]:shrink-0 outline-none group/button select-none`,{variants:{variant:{default:`bg-primary text-primary-foreground [a]:hover:bg-primary/80`,outline:`border-border bg-background hover:bg-muted hover:text-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 aria-expanded:bg-muted aria-expanded:text-foreground`,secondary:`bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground`,ghost:`hover:bg-muted hover:text-foreground dark:hover:bg-muted/50 aria-expanded:bg-muted aria-expanded:text-foreground`,destructive:`bg-destructive/10 hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/20 text-destructive focus-visible:border-destructive/40 dark:hover:bg-destructive/30`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,xs:`h-6 gap-1 rounded-none px-2 text-xs has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3`,sm:`h-7 gap-1 rounded-none px-2.5 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5`,lg:`h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3`,icon:`size-8`,"icon-xs":`size-6 rounded-none [&_svg:not([class*='size-'])]:size-3`,"icon-sm":`size-7 rounded-none`,"icon-lg":`size-9`}},defaultVariants:{variant:`default`,size:`default`}});function oO({className:e,variant:t=`default`,size:n=`default`,...r}){return(0,G.jsx)(OE,{"data-slot":`button`,className:iO(aO({variant:t,size:n,className:e})),...r})}var sO={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 cO({status:e}){let t=sO[e];return(0,G.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,G.jsx)(`span`,{className:`h-2 w-2 rounded-full ${t.dot} mr-1 inline-block`}),t.label]})}var lO=()=>{let e=vte(),t=e?.name,n=e?.version,[,r]=aC(),{status:i,requiresAuth:a,error:o}=bi();return(0,G.jsx)(`div`,{className:`flex flex-col border-b border-border bg-background`,children:(0,G.jsxs)(`div`,{className:`flex h-14 items-center justify-between px-4`,children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-4`,children:[(0,G.jsx)(`button`,{type:`button`,className:`font-semibold cursor-pointer`,onClick:()=>{r(null)},children:`Skybridge`}),(0,G.jsx)(`span`,{className:`h-4 w-px bg-border`,"aria-hidden":`true`}),t&&(0,G.jsxs)(`div`,{className:`flex items-center gap-4 rounded-md border border-border bg-muted px-2 py-1`,children:[(0,G.jsx)(`span`,{className:`text-xs font-medium text-muted-foreground`,children:t}),n&&(0,G.jsxs)(`span`,{className:`text-xs text-muted-foreground`,children:[`v`,n]})]}),o&&(0,G.jsx)(`span`,{className:`text-xs text-red-600 max-w-48 truncate`,children:o})]}),(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[a&&(0,G.jsx)(cO,{status:i}),a&&(i===`authenticated`?(0,G.jsxs)(oO,{variant:`outline`,size:`sm`,onClick:()=>{gte()},children:[(0,G.jsx)(ln,{className:`h-3.5 w-3.5`}),`Sign out`]}):(0,G.jsxs)(oO,{variant:`outline`,size:`sm`,onClick:fT,children:[(0,G.jsx)(fn,{className:`h-3.5 w-3.5`}),`Connect`]})),(0,G.jsx)(oO,{variant:`ghost`,size:`sm`,className:`h-8 gap-2`,children:(0,G.jsxs)(`a`,{href:`https://docs.skybridge.tech/`,target:`_blank`,rel:`noopener noreferrer`,className:`flex items-center gap-2`,children:[`Learn more about Skybridge`,(0,G.jsx)(K,{className:`h-3.5 w-3.5`})]})})]})]})})},uO=(0,b.createContext)({});function dO(e){let t=(0,b.useRef)(null);return t.current===null&&(t.current=e()),t.current}var fO=typeof window<`u`?b.useLayoutEffect:b.useEffect,pO=(0,b.createContext)(null);function mO(e,t){e.indexOf(t)===-1&&e.push(t)}function hO(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}var gO=(e,t,n)=>n>t?t:n<e?e:n,_O={},vO=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function yO(e){return typeof e==`object`&&!!e}var bO=e=>/^0[^.\s]+$/u.test(e);function xO(e){let t;return()=>(t===void 0&&(t=e()),t)}var SO=e=>e,CO=(e,t)=>n=>t(e(n)),wO=(...e)=>e.reduce(CO),TO=(e,t,n)=>{let r=t-e;return r===0?1:(n-e)/r},EO=class{constructor(){this.subscriptions=[]}add(e){return mO(this.subscriptions,e),()=>hO(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}},DO=e=>e*1e3,OO=e=>e/1e3;function kO(e,t){return t?1e3/t*e:0}var AO=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,jO=1e-7,MO=12;function NO(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=AO(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>jO&&++s<MO);return o}function PO(e,t,n,r){if(e===t&&n===r)return SO;let i=t=>NO(t,0,1,e,n);return e=>e===0||e===1?e:AO(i(e),t,r)}var FO=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,IO=e=>t=>1-e(1-t),LO=PO(.33,1.53,.69,.99),RO=IO(LO),zO=FO(RO),BO=e=>e>=1?1:(e*=2)<1?.5*RO(e):.5*(2-2**(-10*(e-1))),VO=e=>1-Math.sin(Math.acos(e)),HO=IO(VO),UO=FO(VO),WO=PO(.42,0,1,1),GO=PO(0,0,.58,1),KO=PO(.42,0,.58,1),qO=e=>Array.isArray(e)&&typeof e[0]!=`number`,JO=e=>Array.isArray(e)&&typeof e[0]==`number`,YO={linear:SO,easeIn:WO,easeInOut:KO,easeOut:GO,circIn:VO,circInOut:UO,circOut:HO,backIn:RO,backInOut:zO,backOut:LO,anticipate:BO},XO=e=>typeof e==`string`,ZO=e=>{if(JO(e)){e.length;let[t,n,r,i]=e;return PO(t,n,r,i)}else if(XO(e))return YO[e],`${e}`,YO[e];return e},QO=[`setup`,`read`,`resolveKeyframes`,`preUpdate`,`update`,`preRender`,`render`,`postRender`],$O={value:null,addProjectionMetrics:null};function ek(e,t){let n=new Set,r=new Set,i=!1,a=!1,o=new WeakSet,s={delta:0,timestamp:0,isProcessing:!1},c=0;function l(t){o.has(t)&&(u.schedule(t),e()),c++,t(s)}let u={schedule:(e,t=!1,a=!1)=>{let s=a&&i?n:r;return t&&o.add(e),s.add(e),e},cancel:e=>{r.delete(e),o.delete(e)},process:e=>{if(s=e,i){a=!0;return}i=!0;let o=n;n=r,r=o,n.forEach(l),t&&$O.value&&$O.value.frameloop[t].push(c),c=0,n.clear(),i=!1,a&&(a=!1,u.process(e))}};return u}var tk=40;function nk(e,t){let n=!1,r=!0,i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=QO.reduce((e,n)=>(e[n]=ek(a,t?n:void 0),e),{}),{setup:s,read:c,resolveKeyframes:l,preUpdate:u,update:d,preRender:f,render:p,postRender:m}=o,h=()=>{let a=_O.useManualTiming,o=a?i.timestamp:performance.now();n=!1,a||(i.delta=r?1e3/60:Math.max(Math.min(o-i.timestamp,tk),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:QO.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<QO.length;t++)o[QO[t]].cancel(e)},state:i,steps:o}}var{schedule:rk,cancel:ik,state:ak,steps:ok}=nk(typeof requestAnimationFrame<`u`?requestAnimationFrame:SO,!0),sk;function ck(){sk=void 0}var lk={now:()=>(sk===void 0&&lk.set(ak.isProcessing||_O.useManualTiming?ak.timestamp:performance.now()),sk),set:e=>{sk=e,queueMicrotask(ck)}},uk={layout:0,mainThread:0,waapi:0},dk=e=>t=>typeof t==`string`&&t.startsWith(e),fk=dk(`--`),pk=dk(`var(--`),mk=e=>pk(e)?hk.test(e.split(`/*`)[0].trim()):!1,hk=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function gk(e){return typeof e==`string`?e.split(`/*`)[0].includes(`var(--`):!1}var _k={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},vk={..._k,transform:e=>gO(0,1,e)},yk={..._k,default:1},bk=e=>Math.round(e*1e5)/1e5,xk=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Sk(e){return e==null}var Ck=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,wk=(e,t)=>n=>!!(typeof n==`string`&&Ck.test(n)&&n.startsWith(e)||t&&!Sk(n)&&Object.prototype.hasOwnProperty.call(n,t)),Tk=(e,t,n)=>r=>{if(typeof r!=`string`)return r;let[i,a,o,s]=r.match(xk);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},Ek=e=>gO(0,255,e),Dk={..._k,transform:e=>Math.round(Ek(e))},Ok={test:wk(`rgb`,`red`),parse:Tk(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+Dk.transform(e)+`, `+Dk.transform(t)+`, `+Dk.transform(n)+`, `+bk(vk.transform(r))+`)`};function kk(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 Ak={test:wk(`#`),parse:kk,transform:Ok.transform},jk=e=>({test:t=>typeof t==`string`&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Mk=jk(`deg`),Nk=jk(`%`),Pk=jk(`px`),Fk=jk(`vh`),Ik=jk(`vw`),Lk={...Nk,parse:e=>Nk.parse(e)/100,transform:e=>Nk.transform(e*100)},Rk={test:wk(`hsl`,`hue`),parse:Tk(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+Nk.transform(bk(t))+`, `+Nk.transform(bk(n))+`, `+bk(vk.transform(r))+`)`},zk={test:e=>Ok.test(e)||Ak.test(e)||Rk.test(e),parse:e=>Ok.test(e)?Ok.parse(e):Rk.test(e)?Rk.parse(e):Ak.parse(e),transform:e=>typeof e==`string`?e:e.hasOwnProperty(`red`)?Ok.transform(e):Rk.transform(e),getAnimatableNone:e=>{let t=zk.parse(e);return t.alpha=0,zk.transform(t)}},Bk=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Vk(e){return isNaN(e)&&typeof e==`string`&&(e.match(xk)?.length||0)+(e.match(Bk)?.length||0)>0}var Hk=`number`,Uk=`color`,Wk=`var`,Gk=`var(`,Kk="${}",qk=/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 Jk(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],a=0;return{values:n,split:t.replace(qk,e=>(zk.test(e)?(r.color.push(a),i.push(Uk),n.push(zk.parse(e))):e.startsWith(Gk)?(r.var.push(a),i.push(Wk),n.push(e)):(r.number.push(a),i.push(Hk),n.push(parseFloat(e))),++a,Kk)).split(Kk),indexes:r,types:i}}function Yk(e){return Jk(e).values}function Xk({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===Hk?i+=bk(r[a]):e===Uk?i+=zk.transform(r[a]):i+=r[a]}return i}}function Zk(e){return Xk(Jk(e))}var Qk=e=>typeof e==`number`?0:zk.test(e)?zk.getAnimatableNone(e):e,$k=(e,t)=>typeof e==`number`?t?.trim().endsWith(`/`)?e:0:Qk(e);function eA(e){let t=Jk(e);return Xk(t)(t.values.map((e,n)=>$k(e,t.split[n])))}var tA={test:Vk,parse:Yk,createTransformer:Zk,getAnimatableNone:eA};function nA(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 rA({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=nA(s,r,e+1/3),a=nA(s,r,e),o=nA(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function iA(e,t){return n=>n>0?t:e}var aA=(e,t,n)=>e+(t-e)*n,oA=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},sA=[Ak,Ok,Rk],cA=e=>sA.find(t=>t.test(e));function lA(e){let t=cA(e);if(`${e}`,!t)return!1;let n=t.parse(e);return t===Rk&&(n=rA(n)),n}var uA=(e,t)=>{let n=lA(e),r=lA(t);if(!n||!r)return iA(e,t);let i={...n};return e=>(i.red=oA(n.red,r.red,e),i.green=oA(n.green,r.green,e),i.blue=oA(n.blue,r.blue,e),i.alpha=aA(n.alpha,r.alpha,e),Ok.transform(i))},dA=new Set([`none`,`hidden`]);function Ite(e,t){return dA.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Lte(e,t){return n=>aA(e,t,n)}function fA(e){return typeof e==`number`?Lte:typeof e==`string`?mk(e)?iA:zk.test(e)?uA:Bte:Array.isArray(e)?pA:typeof e==`object`?zk.test(e)?uA:Rte:iA}function pA(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>fA(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function Rte(e,t){let n={...e,...t},r={};for(let i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=fA(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}function zte(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 Bte=(e,t)=>{let n=tA.createTransformer(t),r=Jk(e),i=Jk(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?dA.has(e)&&!i.values.length||dA.has(t)&&!r.values.length?Ite(e,t):wO(pA(zte(r,i),i.values),n):(`${e}${t}`,iA(e,t))};function mA(e,t,n){return typeof e==`number`&&typeof t==`number`&&typeof n==`number`?aA(e,t,n):fA(e)(e,t)}var Vte=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>rk.update(t,e),stop:()=>ik(t),now:()=>ak.isProcessing?ak.timestamp:lk.now()}},hA=(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)})`},gA=2e4;function _A(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 Hte(e,t=100,n){let r=n({...e,keyframes:[0,t]}),i=Math.min(_A(r),gA);return{type:`keyframes`,ease:e=>r.next(i*e).value/t,duration:OO(i)}}var vA={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 yA(e,t){return e*Math.sqrt(1-t*t)}var Ute=12;function Wte(e,t,n){let r=n;for(let n=1;n<Ute;n++)r-=e(r)/t(r);return r}var bA=.001;function Gte({duration:e=vA.duration,bounce:t=vA.bounce,velocity:n=vA.velocity,mass:r=vA.mass}){let i,a;vA.maxDuration;let o=1-t;o=gO(vA.minDamping,vA.maxDamping,o),e=gO(vA.minDuration,vA.maxDuration,OO(e)),o<1?(i=t=>{let r=t*o,i=r*e,a=r-n,s=yA(t,o),c=Math.exp(-i);return bA-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=yA(t**2,o);return(-i(t)+bA>0?-1:1)*((a-s)*c)/l}):(i=t=>{let r=Math.exp(-t*e),i=(t-n)*e+1;return-bA+r*i},a=t=>Math.exp(-t*e)*((n-t)*(e*e)));let s=5/e,c=Wte(i,a,s);if(e=DO(e),isNaN(c))return{stiffness:vA.stiffness,damping:vA.damping,duration:e};{let t=c**2*r;return{stiffness:t,damping:o*2*Math.sqrt(r*t),duration:e}}}var Kte=[`duration`,`bounce`],qte=[`stiffness`,`damping`,`mass`];function xA(e,t){return t.some(t=>e[t]!==void 0)}function Jte(e){let t={velocity:vA.velocity,stiffness:vA.stiffness,damping:vA.damping,mass:vA.mass,isResolvedFromDuration:!1,...e};if(!xA(e,qte)&&xA(e,Kte))if(t.velocity=0,e.visualDuration){let n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,a=2*gO(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:vA.mass,stiffness:i,damping:a}}else{let n=Gte({...e,velocity:0});t={...t,...n,mass:vA.mass},t.isResolvedFromDuration=!0}return t}function SA(e=vA.visualDuration,t=vA.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}=Jte({...n,velocity:-OO(n.velocity||0)}),m=f||0,h=l/(2*Math.sqrt(c*u)),g=o-a,_=OO(Math.sqrt(c/u)),v=Math.abs(g)<5;r||=v?vA.restSpeed.granular:vA.restSpeed.default,i||=v?vA.restDelta.granular:vA.restDelta.default;let y,b,x,S,C,w;if(h<1)x=yA(_,h),S=(m+h*_*g)/x,y=e=>o-Math.exp(-h*_*e)*(S*Math.sin(x*e)+g*Math.cos(x*e)),C=h*_*S+g*x,w=h*_*g-S*x,b=e=>Math.exp(-h*_*e)*(C*Math.sin(x*e)+w*Math.cos(x*e));else if(h===1){y=e=>o-Math.exp(-_*e)*(g+(m+_*g)*e);let e=m+_*g;b=t=>Math.exp(-_*t)*(_*e*t-m)}else{let e=_*Math.sqrt(h*h-1);y=t=>{let n=Math.exp(-h*_*t),r=Math.min(e*t,300);return o-n*((m+h*_*g)*Math.sinh(r)+e*g*Math.cosh(r))/e};let t=(m+h*_*g)/e,n=h*_*t-g*e,r=h*_*g-t*e;b=t=>{let i=Math.exp(-h*_*t),a=Math.min(e*t,300);return i*(n*Math.sinh(a)+r*Math.cosh(a))}}let T={calculatedDuration:p&&d||null,velocity:e=>DO(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=DO(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=DO(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(_A(T),gA),t=hA(t=>T.next(e*t).value,e,30);return e+`ms `+t},toTransition:()=>{}};return T}SA.applyToOptions=e=>{let t=Hte(e,100,SA);return e.ease=t.ease,e.duration=DO(t.duration),e.type=`keyframes`,e};var Yte=5;function CA(e,t,n){let r=Math.max(t-Yte,0);return kO(n-e(r),t-r)}function wA({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=SA({keyframes:[f.value,m(f.value)],velocity:CA(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 Xte(e,t,n){let r=[],i=n||_O.mix||mA,a=e.length-1;for(let n=0;n<a;n++){let a=i(e[n],e[n+1]);t&&(a=wO(Array.isArray(t)?t[n]||SO:t,a)),r.push(a)}return r}function Zte(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=Xte(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=TO(e[r],e[r+1],n);return s[r](i)};return n?t=>l(gO(e[0],e[a-1],t)):l}function Qte(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=TO(0,t,r);e.push(aA(n,1,i))}}function $te(e){let t=[0];return Qte(t,e.length-1),t}function ene(e,t){return e.map(e=>e*t)}function tne(e,t){return e.map(()=>t||KO).splice(0,e.length-1)}function TA({duration:e=300,keyframes:t,times:n,ease:r=`easeInOut`}){let i=qO(r)?r.map(ZO):ZO(r),a={done:!1,value:t[0]},o=Zte(ene(n&&n.length===t.length?n:$te(t),e),t,{ease:Array.isArray(i)?i:tne(t,i)});return{calculatedDuration:e,next:t=>(a.value=o(t),a.done=t>=e,a)}}var nne=e=>e!==null;function EA(e,{repeat:t,repeatType:n=`loop`},r,i=1){let a=e.filter(nne),o=i<0||t&&n!==`loop`&&t%2==1?0:a.length-1;return!o||r===void 0?a[o]:r}var rne={decay:wA,inertia:wA,tween:TA,keyframes:TA,spring:SA};function DA(e){typeof e.type==`string`&&(e.type=rne[e.type])}var OA=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)}},kA=e=>e/100,AA=class extends OA{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!==lk.now()&&this.tick(lk.now()),this.isStopped=!0,this.state!==`idle`&&(this.teardown(),this.options.onStop?.())},uk.mainThread++,this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){let{options:e}=this;DA(e);let{type:t=TA,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=e,{keyframes:o}=e,s=t||TA;s!==TA&&typeof o[0]!=`number`&&(this.mixKeyframes=wO(kA,mA(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=_A(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=gO(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!==wA&&(b.value=EA(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 OO(this.calculatedDuration)}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+OO(e)}get time(){return OO(this.currentTime)}set time(e){e=DO(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 CA(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(lk.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=OO(this.currentTime))}play(){if(this.isStopped)return;let{driver:e=Vte,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(lk.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,uk.mainThread--}stopDriver(){this.driver&&=(this.driver.stop(),void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type=`keyframes`,this.options.ease=`linear`,this.initAnimation()),this.driver?.stop(),e.observe(this)}};function jA(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var MA=e=>e*180/Math.PI,NA=e=>FA(MA(Math.atan2(e[1],e[0]))),PA={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:NA,rotateZ:NA,skewX:e=>MA(Math.atan(e[1])),skewY:e=>MA(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},FA=e=>(e%=360,e<0&&(e+=360),e),IA=NA,LA=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),RA=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),zA={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:LA,scaleY:RA,scale:e=>(LA(e)+RA(e))/2,rotateX:e=>FA(MA(Math.atan2(e[6],e[5]))),rotateY:e=>FA(MA(Math.atan2(-e[2],e[0]))),rotateZ:IA,rotate:IA,skewX:e=>MA(Math.atan(e[4])),skewY:e=>MA(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function BA(e){return e.includes(`scale`)?1:0}function VA(e,t){if(!e||e===`none`)return BA(t);let n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),r,i;if(n)r=zA,i=n;else{let t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=PA,i=t}if(!i)return BA(t);let a=r[t],o=i[1].split(`,`).map(UA);return typeof a==`function`?a(o):o[a]}var HA=(e,t)=>{let{transform:n=`none`}=getComputedStyle(e);return VA(n,t)};function UA(e){return parseFloat(e.trim())}var WA=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`],GA=new Set(WA),KA=e=>e===_k||e===Pk,qA=new Set([`x`,`y`,`z`]),JA=WA.filter(e=>!qA.has(e));function YA(e){let t=[];return JA.forEach(n=>{let r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith(`scale`)?1:0))}),t}var XA={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})=>VA(t,`x`),y:(e,{transform:t})=>VA(t,`y`)};XA.translateX=XA.x,XA.translateY=XA.y;var ZA=new Set,QA=!1,$A=!1,ej=!1;function tj(){if($A){let e=Array.from(ZA).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{let t=YA(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)})}$A=!1,QA=!1,ZA.forEach(e=>e.complete(ej)),ZA.clear()}function nj(){ZA.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&($A=!0)})}function rj(){ej=!0,nj(),tj(),ej=!1}var ij=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?(ZA.add(this),QA||(QA=!0,rk.read(nj),rk.resolveKeyframes(tj))):(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])}jA(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state=`complete`,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),ZA.delete(this)}cancel(){this.state===`scheduled`&&(ZA.delete(this),this.state=`pending`)}resume(){this.state===`pending`&&this.scheduleResolve()}},aj=e=>e.startsWith(`--`);function oj(e,t,n){aj(t)?e.style.setProperty(t,n):e.style[t]=n}var sj={};function cj(e,t){let n=xO(e);return()=>sj[t]??n()}var lj=cj(()=>window.ScrollTimeline!==void 0,`scrollTimeline`),uj=cj(()=>{try{document.createElement(`div`).animate({opacity:0},{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),dj=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,fj={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:dj([0,.65,.55,1]),circOut:dj([.55,0,1,.45]),backIn:dj([.31,.01,.66,-.59]),backOut:dj([.33,1.53,.69,.99])};function pj(e,t){if(e)return typeof e==`function`?uj()?hA(e,t):`ease-out`:JO(e)?dj(e):Array.isArray(e)?e.map(e=>pj(e,t)||fj.easeOut):fj[e]}function mj(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=pj(s,i);Array.isArray(d)&&(u.easing=d),$O.value&&uk.waapi++;let f={delay:r,duration:i,easing:Array.isArray(d)?`linear`:d,fill:`both`,iterations:a+1,direction:o===`reverse`?`alternate`:`normal`};l&&(f.pseudoElement=l);let p=e.animate(u,f);return $O.value&&p.finished.finally(()=>{uk.waapi--}),p}function hj(e){return typeof e==`function`&&`applyToOptions`in e}function gj({type:e,...t}){return hj(e)&&uj()?e.applyToOptions(t):(t.duration??=300,t.ease??=`easeOut`,t)}var _j=class extends OA{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=gj(e);this.animation=mj(t,n,r,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){let e=EA(r,this.options,o,this.speed);this.updateMotionValue&&this.updateMotionValue(e),oj(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 OO(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+OO(e)}get time(){return OO(Number(this.animation.currentTime)||0)}set time(e){let t=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=DO(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&&lj()?(this.animation.timeline=e,t&&(this.animation.rangeStart=t),n&&(this.animation.rangeEnd=n),SO):r(this)}},vj={anticipate:BO,backInOut:zO,circInOut:UO};function yj(e){return e in vj}function bj(e){typeof e.ease==`string`&&yj(e.ease)&&(e.ease=vj[e.ease])}var xj=10,Sj=class extends _j{constructor(e){bj(e),DA(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 AA({...a,autoplay:!1}),s=Math.max(xj,lk.now()-this.startTime),c=gO(0,xj,s-xj),l=o.sample(s).value,{name:u}=this.options;i&&u&&oj(i,u,l),t.setWithVelocity(o.sample(Math.max(0,s-c)).value,l,c),o.stop()}},Cj=(e,t)=>t===`zIndex`?!1:!!(typeof e==`number`||Array.isArray(e)||typeof e==`string`&&(tA.test(e)||e===`0`)&&!e.startsWith(`url(`));function wj(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 Tj(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=Cj(i,t),s=Cj(a,t);return`${t}${i}${a}${o?a:i}`,!o||!s?!1:wj(e)||(n===`spring`||hj(n))&&r}function Ej(e){e.duration=0,e.type=`keyframes`}var Dj=new Set([`opacity`,`clipPath`,`filter`,`transform`]),Oj=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function kj(e){for(let t=0;t<e.length;t++)if(typeof e[t]==`string`&&Oj.test(e[t]))return!0;return!1}var Aj=new Set([`color`,`backgroundColor`,`outlineColor`,`fill`,`stroke`,`borderColor`,`borderTopColor`,`borderRightColor`,`borderBottomColor`,`borderLeftColor`]),jj=xO(()=>Object.hasOwnProperty.call(Element.prototype,`animate`));function Mj(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 jj()&&n&&(Dj.has(n)||Aj.has(n)&&kj(s))&&(n!==`transform`||!l)&&!c&&!r&&i!==`mirror`&&a!==0&&o!==`inertia`}var Nj=40,Pj=class extends OA{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=lk.now();let d={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:i,repeatType:a,name:s,motionValue:c,element:l,...u};this.keyframeResolver=new(l?.KeyframeResolver||ij)(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=lk.now();let u=!0;Tj(e,i,a,o)||(u=!1,(_O.instantAnimations||!s)&&l?.(EA(e,n,t)),e[0]=e[e.length-1],Ej(n),n.repeat=0);let d={startTime:r?this.resolvedAt&&this.resolvedAt-this.createdAt>Nj?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},f=u&&!c&&Mj(d),p=d.motionValue?.owner?.current,m;if(f)try{m=new Sj({...d,element:p})}catch{m=new AA(d)}else m=new AA(d);m.finished.then(()=>{this.notifyFinished()}).catch(SO),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(),rj()),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 Fj(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 Ij=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Lj(e){let t=Ij.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}function Rj(e,t,n=1){`${e}`;let[r,i]=Lj(e);if(!r)return;let a=window.getComputedStyle(t).getPropertyValue(r);if(a){let e=a.trim();return vO(e)?parseFloat(e):e}return mk(i)?Rj(i,t,n+1):i}var zj={type:`spring`,stiffness:500,damping:25,restSpeed:10},Bj=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Vj={type:`keyframes`,duration:.8},Hj={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},Uj=(e,{keyframes:t})=>t.length>2?Vj:GA.has(e)?e.startsWith(`scale`)?Bj(t[1]):zj:Hj;function Wj(e,t){if(e?.inherit&&t){let{inherit:n,...r}=e;return{...t,...r}}return e}function Gj(e,t){let n=e?.[t]??e?.default??e;return n===e?n:Wj(n,e)}var Kj=new Set([`when`,`delay`,`delayChildren`,`staggerChildren`,`staggerDirection`,`repeat`,`repeatType`,`repeatDelay`,`from`,`elapsed`]);function qj(e){for(let t in e)if(!Kj.has(t))return!0;return!1}var Jj=(e,t,n,r={},i,a)=>o=>{let s=Gj(r,e)||{},c=s.delay||r.delay||0,{elapsed:l=0}=r;l-=DO(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};qj(s)||Object.assign(u,Uj(e,u)),u.duration&&=DO(u.duration),u.repeatDelay&&=DO(u.repeatDelay),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(Ej(u),u.delay===0&&(d=!0)),(_O.instantAnimations||_O.skipAnimations||i?.shouldSkipAnimations)&&(d=!0,Ej(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let e=EA(u.keyframes,s);if(e!==void 0){rk.update(()=>{u.onUpdate(e),u.onComplete()});return}}return s.isSync?new AA(u):new Pj(u)};function Yj(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function Xj(e,t,n,r){if(typeof t==`function`){let[i,a]=Yj(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]=Yj(r);t=t(n===void 0?e.custom:n,i,a)}return t}function Zj(e,t,n){let r=e.getProps();return Xj(r,t,n===void 0?r.custom:n,e)}var Qj=new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,...WA]),$j=30,eM=e=>!isNaN(parseFloat(e)),tM={current:void 0},nM=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=lk.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=lk.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=eM(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 EO);let n=this.events[e].add(t);return e===`change`?()=>{n(),rk.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 tM.current&&tM.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=lk.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>$j)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,$j);return kO(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 rM(e,t){return new nM(e,t)}var iM=e=>Array.isArray(e);function aM(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,rM(n))}function oM(e){return iM(e)?e[e.length-1]||0:e}function sM(e,t){let{transitionEnd:n={},transition:r={},...i}=Zj(e,t)||{};i={...i,...n};for(let t in i)aM(e,t,oM(i[t]))}var cM=e=>!!(e&&e.getVelocity);function lM(e){return!!(cM(e)&&e.add)}function uM(e,t){let n=e.getValue(`willChange`);if(lM(n))return n.add(t);if(!n&&_O.WillChange){let n=new _O.WillChange(`auto`);e.addValue(`willChange`,n),n.add(t)}}function dM(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}var fM=`data-`+dM(`framerAppearId`);function pM(e){return e.props[fM]}function mM({protectedKeys:e,needsAnimating:t},n){let r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function hM(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a,transitionEnd:o,...s}=t,c=e.getDefaultTransition();a=a?Wj(a,c):c;let l=a?.reduceMotion;r&&(a=r);let u=[],d=i&&e.animationState&&e.animationState.getState()[i];for(let t in s){let r=e.getValue(t,e.latestValues[t]??null),i=s[t];if(i===void 0||d&&mM(d,t))continue;let o={delay:n,...Gj(a||{},t)},c=r.get();if(c!==void 0&&!r.isAnimating()&&!Array.isArray(i)&&i===c&&!o.velocity){rk.update(()=>r.set(i));continue}let f=!1;if(window.MotionHandoffAnimation){let n=pM(e);if(n){let e=window.MotionHandoffAnimation(n,t,rk);e!==null&&(o.startTime=e,f=!0)}}uM(e,t);let p=l??e.shouldReduceMotion;r.start(Jj(t,r,i,p&&Qj.has(t)?{type:!1}:o,e,f));let m=r.animation;m&&u.push(m)}if(o){let t=()=>rk.update(()=>{o&&sM(e,o)});u.length?Promise.all(u).then(t):t()}return u}function gM(e,t,n={}){let r=Zj(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(hM(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(r=0)=>{let{delayChildren:a=0,staggerChildren:o,staggerDirection:s}=i;return _M(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 _M(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(gM(c,t,{...o,delay:n+(typeof r==`function`?0:r)+Fj(e.variantChildren,c,r,i,a)}).then(()=>c.notify(`AnimationComplete`,t)));return Promise.all(s)}function vM(e,t,n={}){e.notify(`AnimationStart`,t);let r;if(Array.isArray(t)){let i=t.map(t=>gM(e,t,n));r=Promise.all(i)}else if(typeof t==`string`)r=gM(e,t,n);else{let i=typeof t==`function`?Zj(e,t,n.custom):t;r=Promise.all(hM(e,i,n))}return r.then(()=>{e.notify(`AnimationComplete`,t)})}var yM={test:e=>e===`auto`,parse:e=>e},bM=e=>t=>t.test(e),xM=[_k,Pk,Nk,Mk,Ik,Fk,yM],SM=e=>xM.find(bM(e));function CM(e){return typeof e==`number`?e===0:e===null?!0:e===`none`||e===`0`||bO(e)}var wM=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function TM(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(xk)||[];if(!r)return e;let i=n.replace(r,``),a=wM.has(t)?1:0;return r!==n&&(a*=100),t+`(`+a+i+`)`}var EM=/\b([a-z-]*)\(.*?\)/gu,DM={...tA,getAnimatableNone:e=>{let t=e.match(EM);return t?t.map(TM).join(` `):e}},OM={...tA,getAnimatableNone:e=>{let t=tA.parse(e);return tA.createTransformer(e)(t.map(e=>typeof e==`number`?0:typeof e==`object`?{...e,alpha:1}:e))}},kM={..._k,transform:Math.round},AM={borderWidth:Pk,borderTopWidth:Pk,borderRightWidth:Pk,borderBottomWidth:Pk,borderLeftWidth:Pk,borderRadius:Pk,borderTopLeftRadius:Pk,borderTopRightRadius:Pk,borderBottomRightRadius:Pk,borderBottomLeftRadius:Pk,width:Pk,maxWidth:Pk,height:Pk,maxHeight:Pk,top:Pk,right:Pk,bottom:Pk,left:Pk,inset:Pk,insetBlock:Pk,insetBlockStart:Pk,insetBlockEnd:Pk,insetInline:Pk,insetInlineStart:Pk,insetInlineEnd:Pk,padding:Pk,paddingTop:Pk,paddingRight:Pk,paddingBottom:Pk,paddingLeft:Pk,paddingBlock:Pk,paddingBlockStart:Pk,paddingBlockEnd:Pk,paddingInline:Pk,paddingInlineStart:Pk,paddingInlineEnd:Pk,margin:Pk,marginTop:Pk,marginRight:Pk,marginBottom:Pk,marginLeft:Pk,marginBlock:Pk,marginBlockStart:Pk,marginBlockEnd:Pk,marginInline:Pk,marginInlineStart:Pk,marginInlineEnd:Pk,fontSize:Pk,backgroundPositionX:Pk,backgroundPositionY:Pk,rotate:Mk,rotateX:Mk,rotateY:Mk,rotateZ:Mk,scale:yk,scaleX:yk,scaleY:yk,scaleZ:yk,skew:Mk,skewX:Mk,skewY:Mk,distance:Pk,translateX:Pk,translateY:Pk,translateZ:Pk,x:Pk,y:Pk,z:Pk,perspective:Pk,transformPerspective:Pk,opacity:vk,originX:Lk,originY:Lk,originZ:Pk,zIndex:kM,fillOpacity:vk,strokeOpacity:vk,numOctaves:kM},jM={...AM,color:zk,backgroundColor:zk,outlineColor:zk,fill:zk,stroke:zk,borderColor:zk,borderTopColor:zk,borderRightColor:zk,borderBottomColor:zk,borderLeftColor:zk,filter:DM,WebkitFilter:DM,mask:OM,WebkitMask:OM},MM=e=>jM[e],NM=new Set([DM,OM]);function PM(e,t){let n=MM(e);return NM.has(n)||(n=tA),n.getAnimatableNone?n.getAnimatableNone(t):void 0}var FM=new Set([`auto`,`none`,`0`]);function IM(e,t,n){let r=0,i;for(;r<e.length&&!i;){let t=e[r];typeof t==`string`&&!FM.has(t)&&Jk(t).values.length&&(i=e[r]),r++}if(i&&n)for(let r of t)e[r]=PM(n,i)}var LM=class extends ij{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(),mk(r))){let i=Rj(r,t.current);i!==void 0&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!Qj.has(n)||e.length!==2)return;let[r,i]=e,a=SM(r),o=SM(i);if(gk(r)!==gk(i)&&XA[n]){this.needsMeasurement=!0;return}if(a!==o)if(KA(a)&&KA(o))for(let t=0;t<e.length;t++){let n=e[t];typeof n==`string`&&(e[t]=parseFloat(n))}else XA[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(e[t]===null||CM(e[t]))&&n.push(t);n.length&&IM(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=XA[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]=XA[t](e.measureViewportBox(),window.getComputedStyle(e.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}};function RM(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 zM=(e,t)=>t&&typeof e==`number`?t.transform(e):e;function BM(e){return yO(e)&&`offsetHeight`in e&&!(`ownerSVGElement`in e)}var{schedule:VM,cancel:ine}=nk(queueMicrotask,!1),HM={x:!1,y:!1};function UM(){return HM.x||HM.y}function WM(e){return e===`x`||e===`y`?HM[e]?null:(HM[e]=!0,()=>{HM[e]=!1}):HM.x||HM.y?null:(HM.x=HM.y=!0,()=>{HM.x=HM.y=!1})}function GM(e,t){let n=RM(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function KM(e){return!(e.pointerType===`touch`||UM())}function qM(e,t,n={}){let[r,i,a]=GM(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(!KM(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 JM=(e,t)=>t?e===t?!0:JM(e,t.parentElement):!1,YM=e=>e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1,XM=new Set([`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`A`]);function ZM(e){return XM.has(e.tagName)||e.isContentEditable===!0}var QM=new Set([`INPUT`,`SELECT`,`TEXTAREA`]);function $M(e){return QM.has(e.tagName)||e.isContentEditable===!0}var eN=new WeakSet;function tN(e){return t=>{t.key===`Enter`&&e(t)}}function nN(e,t){e.dispatchEvent(new PointerEvent(`pointer`+t,{isPrimary:!0,bubbles:!0}))}var rN=(e,t)=>{let n=e.currentTarget;if(!n)return;let r=tN(()=>{if(eN.has(n))return;nN(n,`down`);let e=tN(()=>{nN(n,`up`)});n.addEventListener(`keyup`,e,t),n.addEventListener(`blur`,()=>nN(n,`cancel`),t)});n.addEventListener(`keydown`,r,t),n.addEventListener(`blur`,()=>n.removeEventListener(`keydown`,r),t)};function iN(e){return YM(e)&&!UM()}var aN=new WeakSet;function oN(e,t,n={}){let[r,i,a]=GM(e,n),o=e=>{let r=e.currentTarget;if(!iN(e)||aN.has(e))return;eN.add(r),n.stopPropagation&&aN.add(e);let a=t(r,e),o=(e,t)=>{window.removeEventListener(`pointerup`,s),window.removeEventListener(`pointercancel`,c),eN.has(r)&&eN.delete(r),iN(e)&&typeof a==`function`&&a(e,{success:t})},s=e=>{o(e,r===window||r===document||n.useGlobalTarget||JM(r,e.target))},c=e=>{o(e,!1)};window.addEventListener(`pointerup`,s,i),window.addEventListener(`pointercancel`,c,i)};return r.forEach(e=>{(n.useGlobalTarget?window:e).addEventListener(`pointerdown`,o,i),BM(e)&&(e.addEventListener(`focus`,e=>rN(e,i)),!ZM(e)&&!e.hasAttribute(`tabindex`)&&(e.tabIndex=0))}),a}function sN(e){return yO(e)&&`ownerSVGElement`in e}var cN=new WeakMap,lN,uN=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+`Size`]:sN(r)&&`getBBox`in r?r.getBBox()[t]:r[n],dN=uN(`inline`,`width`,`offsetWidth`),fN=uN(`block`,`height`,`offsetHeight`);function pN({target:e,borderBoxSize:t}){cN.get(e)?.forEach(n=>{n(e,{get width(){return dN(e,t)},get height(){return fN(e,t)}})})}function mN(e){e.forEach(pN)}function hN(){typeof ResizeObserver>`u`||(lN=new ResizeObserver(mN))}function gN(e,t){lN||hN();let n=RM(e);return n.forEach(e=>{let n=cN.get(e);n||(n=new Set,cN.set(e,n)),n.add(t),lN?.observe(e)}),()=>{n.forEach(e=>{let n=cN.get(e);n?.delete(t),n?.size||lN?.unobserve(e)})}}var _N=new Set,vN;function yN(){vN=()=>{let e={get width(){return window.innerWidth},get height(){return window.innerHeight}};_N.forEach(t=>t(e))},window.addEventListener(`resize`,vN)}function bN(e){return _N.add(e),vN||yN(),()=>{_N.delete(e),!_N.size&&typeof vN==`function`&&(window.removeEventListener(`resize`,vN),vN=void 0)}}function xN(e,t){return typeof e==`function`?bN(e):gN(e,t)}function SN(e){return sN(e)&&e.tagName===`svg`}var CN=[...xM,zk,tA],wN=e=>CN.find(bM(e)),TN=()=>({translate:0,scale:1,origin:0,originPoint:0}),EN=()=>({x:TN(),y:TN()}),DN=()=>({min:0,max:0}),ON=()=>({x:DN(),y:DN()}),kN=new WeakMap;function AN(e){return typeof e==`object`&&!!e&&typeof e.start==`function`}function jN(e){return typeof e==`string`||Array.isArray(e)}var MN=[`animate`,`whileInView`,`whileFocus`,`whileHover`,`whileTap`,`whileDrag`,`exit`],NN=[`initial`,...MN];function PN(e){return AN(e.animate)||NN.some(t=>jN(e[t]))}function FN(e){return!!(PN(e)||e.variants)}function IN(e,t,n){for(let r in t){let i=t[r],a=n[r];if(cM(i))e.addValue(r,i);else if(cM(a))e.addValue(r,rM(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,rM(t===void 0?i:t,{owner:e}))}}for(let r in n)t[r]===void 0&&e.removeValue(r);return t}var LN={current:null},RN={current:!1},zN=typeof window<`u`;function BN(){if(RN.current=!0,zN)if(window.matchMedia){let e=window.matchMedia(`(prefers-reduced-motion)`),t=()=>LN.current=e.matches;e.addEventListener(`change`,t),t()}else LN.current=!1}var VN=[`AnimationStart`,`AnimationComplete`,`Update`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`],HN={};function UN(e){HN=e}function WN(){return HN}var GN=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=ij,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=lk.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,rk.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=PN(t),this.isVariantNode=FN(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&&cM(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,kN.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:(RN.current||BN(),this.shouldReduceMotion=LN.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(),ik(this.notifyUpdate),ik(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&&Dj.has(e)&&this.current instanceof HTMLElement){let{factory:n,keyframes:r,times:i,ease:a,duration:o}=t.accelerate,s=new _j({element:this.current,name:e,keyframes:r,times:i,ease:a,duration:DO(o)}),c=n(s);this.valueSubscriptions.set(e,()=>{c(),s.cancel()});return}let n=GA.has(e);n&&this.onBindTransform&&this.onBindTransform();let r=t.on(`change`,t=>{this.latestValues[e]=t,this.props.onUpdate&&rk.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(),t.owner&&t.stop()})}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 HN){let t=HN[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):ON()}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<VN.length;t++){let n=VN[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=IN(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=rM(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`&&(vO(n)||bO(n))?n=parseFloat(n):!wN(n)&&tA.test(t)&&(n=PM(e,t)),this.setBaseTarget(e,cM(n)?n.get():n)),cM(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=Xj(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&&!cM(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 EO),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){VM.render(this.render)}},KN=class extends GN{constructor(){super(...arguments),this.KeyframeResolver=LM}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;cM(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}},qN=class{constructor(e){this.isMounted=!1,this.node=e}update(){}};function JN({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function YN({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function XN(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 ZN(e){return e===void 0||e===1}function QN({scale:e,scaleX:t,scaleY:n}){return!ZN(e)||!ZN(t)||!ZN(n)}function $N(e){return QN(e)||eP(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function eP(e){return tP(e.x)||tP(e.y)}function tP(e){return e&&e!==`0%`}function nP(e,t,n){return n+t*(e-n)}function rP(e,t,n,r,i){return i!==void 0&&(e=nP(e,i,r)),nP(e,n,r)+t}function iP(e,t=0,n=1,r,i){e.min=rP(e.min,t,n,r,i),e.max=rP(e.max,t,n,r,i)}function aP(e,{x:t,y:n}){iP(e.x,t.translate,t.scale,t.originPoint),iP(e.y,n.translate,n.scale,n.originPoint)}var oP=.999999999999,sP=1.0000000000001;function cP(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&&(lP(e.x,-a.scroll.offset.x),lP(e.y,-a.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,aP(e,o)),r&&$N(a.latestValues)&&fP(e,a.latestValues,a.layout?.layoutBox))}t.x<sP&&t.x>oP&&(t.x=1),t.y<sP&&t.y>oP&&(t.y=1)}function lP(e,t){e.min+=t,e.max+=t}function uP(e,t,n,r,i=.5){iP(e,t,n,aA(e.min,e.max,i),r)}function dP(e,t){return typeof e==`string`?parseFloat(e)/100*(t.max-t.min):e}function fP(e,t,n){let r=n??e;uP(e.x,dP(t.x,r.x),t.scaleX,t.scale,t.originX),uP(e.y,dP(t.y,r.y),t.scaleY,t.scale,t.originY)}function pP(e,t){return JN(XN(e.getBoundingClientRect(),t))}function mP(e,t,n){let r=pP(e,n),{scroll:i}=t;return i&&(lP(r.x,i.offset.x),lP(r.y,i.offset.y)),r}var hP={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},gP=WA.length;function _P(e,t,n){let r=``,i=!0;for(let a=0;a<gP;a++){let o=WA[a],s=e[o];if(s===void 0)continue;let c=!0;if(typeof s==`number`)c=s===(o.startsWith(`scale`)?1:0);else{let e=parseFloat(s);c=o.startsWith(`scale`)?e===1:e===0}if(!c||n){let e=zM(s,AM[o]);if(!c){i=!1;let t=hP[o]||o;r+=`${t}(${e}) `}n&&(t[o]=e)}}return r=r.trim(),n?r=n(t,i?``:r):i&&(r=`none`),r}function vP(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(GA.has(e)){o=!0;continue}else if(fk(e)){i[e]=n;continue}else{let t=zM(n,AM[e]);e.startsWith(`origin`)?(s=!0,a[e]=t):r[e]=t}}if(t.transform||(o||n?r.transform=_P(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 yP(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 bP(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var xP={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`)if(Pk.test(e))e=parseFloat(e);else return e;return`${bP(e,t.target.x)}% ${bP(e,t.target.y)}%`}},SP={correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=tA.parse(e);if(i.length>5)return r;let a=tA.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=aA(s,c,.5);return typeof i[2+o]==`number`&&(i[2+o]/=l),typeof i[3+o]==`number`&&(i[3+o]/=l),a(i)}},CP={borderRadius:{...xP,applyTo:[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomLeftRadius`,`borderBottomRightRadius`]},borderTopLeftRadius:xP,borderTopRightRadius:xP,borderBottomLeftRadius:xP,borderBottomRightRadius:xP,boxShadow:SP};function wP(e,{layout:t,layoutId:n}){return GA.has(e)||e.startsWith(`origin`)||(t||n!==void 0)&&(!!CP[e]||e===`opacity`)}function TP(e,t,n){let r=e.style,i=t?.style,a={};if(!r)return a;for(let t in r)(cM(r[t])||i&&cM(i[t])||wP(t,e)||n?.getValue(t)?.liveStyle!==void 0)&&(a[t]=r[t]);return a}function EP(e){return window.getComputedStyle(e)}var DP=class extends KN{constructor(){super(...arguments),this.type=`html`,this.renderInstance=yP}readValueFromInstance(e,t){if(GA.has(t))return this.projection?.isProjecting?BA(t):HA(e,t);{let n=EP(e),r=(fk(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return pP(e,t)}build(e,t,n){vP(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return TP(e,t,n)}},OP={offset:`stroke-dashoffset`,array:`stroke-dasharray`},kP={offset:`strokeDashoffset`,array:`strokeDasharray`};function AP(e,t,n=1,r=0,i=!0){e.pathLength=1;let a=i?OP:kP;e[a.offset]=`${-r}`,e[a.array]=`${t} ${n}`}var jP=[`offsetDistance`,`offsetPath`,`offsetRotate`,`offsetAnchor`];function MP(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...s},c,l,u){if(vP(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 jP)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&&AP(d,i,a,o,!1)}var NP=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`]),PP=e=>typeof e==`string`&&e.toLowerCase()===`svg`;function FP(e,t,n,r){yP(e,t,void 0,r);for(let n in t.attrs)e.setAttribute(NP.has(n)?n:dM(n),t.attrs[n])}function IP(e,t,n){let r=TP(e,t,n);for(let n in e)if(cM(e[n])||cM(t[n])){let t=WA.indexOf(n)===-1?n:`attr`+n.charAt(0).toUpperCase()+n.substring(1);r[t]=e[n]}return r}var LP=class extends KN{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=ON}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(GA.has(t)){let e=MM(t);return e&&e.default||0}return t=NP.has(t)?t:dM(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return IP(e,t,n)}build(e,t,n){MP(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){FP(e,t,n,r)}mount(e){this.isSVGTag=PP(e.tagName),super.mount(e)}},RP=NN.length;function zP(e){if(!e)return;if(!e.isControllingVariants){let t=e.parent&&zP(e.parent)||{};return e.props.initial!==void 0&&(t.initial=e.props.initial),t}let t={};for(let n=0;n<RP;n++){let r=NN[n],i=e.props[r];(jN(i)||i===!1)&&(t[r]=i)}return t}function BP(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 VP=[...MN].reverse(),HP=MN.length;function UP(e){return t=>Promise.all(t.map(({animation:t,options:n})=>vM(e,t,n)))}function WP(e){let t=UP(e),n=qP(),r=!0,i=!1,a=t=>(n,r)=>{let i=Zj(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=zP(e.parent)||{},l=[],u=new Set,d={},f=1/0;for(let t=0;t<HP;t++){let p=VP[t],m=n[p],h=s[p]===void 0?c[p]:s[p],g=jN(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||AN(h)||typeof h==`boolean`)continue;if(p===`exit`&&m.isActive&&_!==!0){m.prevResolvedValues&&(d={...d,...m.prevResolvedValues});continue}let y=GP(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=iM(t)&&iM(n)?!BP(t,n):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=Zj(r,t);if(r.enteringChildren&&i){let{delayChildren:t}=i.transition||{};n.delay=Fj(r.enteringChildren,e,t)}}return{animation:t,options:n}}))}if(u.size){let t={};if(typeof s.initial!=`boolean`){let n=Zj(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=qP(),i=!0}}}function GP(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!BP(t,e):!1}function KP(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function qP(){return{animate:KP(!0),whileInView:KP(),whileHover:KP(),whileTap:KP(),whileDrag:KP(),whileFocus:KP(),exit:KP()}}function JP(e,t){e.min=t.min,e.max=t.max}function YP(e,t){JP(e.x,t.x),JP(e.y,t.y)}function XP(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}var ZP=1e-4,QP=1-ZP,$P=1+ZP,eF=.01,tF=0-eF,nF=0+eF;function rF(e){return e.max-e.min}function iF(e,t,n){return Math.abs(e-t)<=n}function aF(e,t,n,r=.5){e.origin=r,e.originPoint=aA(t.min,t.max,e.origin),e.scale=rF(n)/rF(t),e.translate=aA(n.min,n.max,e.origin)-e.originPoint,(e.scale>=QP&&e.scale<=$P||isNaN(e.scale))&&(e.scale=1),(e.translate>=tF&&e.translate<=nF||isNaN(e.translate))&&(e.translate=0)}function oF(e,t,n,r){aF(e.x,t.x,n.x,r?r.originX:void 0),aF(e.y,t.y,n.y,r?r.originY:void 0)}function sF(e,t,n,r=0){e.min=(r?aA(n.min,n.max,r):n.min)+t.min,e.max=e.min+rF(t)}function cF(e,t,n,r){sF(e.x,t.x,n.x,r?.x),sF(e.y,t.y,n.y,r?.y)}function lF(e,t,n,r=0){let i=r?aA(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+rF(t)}function uF(e,t,n,r){lF(e.x,t.x,n.x,r?.x),lF(e.y,t.y,n.y,r?.y)}function dF(e,t,n,r,i){return e-=t,e=nP(e,1/n,r),i!==void 0&&(e=nP(e,1/i,r)),e}function fF(e,t=0,n=1,r=.5,i,a=e,o=e){if(Nk.test(t)&&(t=parseFloat(t),t=aA(o.min,o.max,t/100)-o.min),typeof t!=`number`)return;let s=aA(a.min,a.max,r);e===a&&(s-=t),e.min=dF(e.min,t,n,s,i),e.max=dF(e.max,t,n,s,i)}function pF(e,t,[n,r,i],a,o){fF(e,t[n],t[r],t[i],t.scale,a,o)}var mF=[`x`,`scaleX`,`originX`],hF=[`y`,`scaleY`,`originY`];function gF(e,t,n,r){pF(e.x,t,mF,n?n.x:void 0,r?r.x:void 0),pF(e.y,t,hF,n?n.y:void 0,r?r.y:void 0)}function _F(e){return e.translate===0&&e.scale===1}function vF(e){return _F(e.x)&&_F(e.y)}function yF(e,t){return e.min===t.min&&e.max===t.max}function bF(e,t){return yF(e.x,t.x)&&yF(e.y,t.y)}function xF(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function SF(e,t){return xF(e.x,t.x)&&xF(e.y,t.y)}function CF(e){return rF(e.x)/rF(e.y)}function wF(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function TF(e){return[e(`x`),e(`y`)]}function EF(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,rotateX:i,rotateY:a,skewX:o,skewY:s}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),i&&(r+=`rotateX(${i}deg) `),a&&(r+=`rotateY(${a}deg) `),o&&(r+=`skewX(${o}deg) `),s&&(r+=`skewY(${s}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 DF=[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomLeftRadius`,`borderBottomRightRadius`],OF=DF.length,kF=e=>typeof e==`string`?parseFloat(e):e,AF=e=>typeof e==`number`||Pk.test(e);function jF(e,t,n,r,i,a){i?(e.opacity=aA(0,n.opacity??1,NF(r)),e.opacityExit=aA(t.opacity??1,0,PF(r))):a&&(e.opacity=aA(t.opacity??1,n.opacity??1,r));for(let i=0;i<OF;i++){let a=DF[i],o=MF(t,a),s=MF(n,a);o===void 0&&s===void 0||(o||=0,s||=0,o===0||s===0||AF(o)===AF(s)?(e[a]=Math.max(aA(kF(o),kF(s),r),0),(Nk.test(s)||Nk.test(o))&&(e[a]+=`%`)):e[a]=s)}(t.rotate||n.rotate)&&(e.rotate=aA(t.rotate||0,n.rotate||0,r))}function MF(e,t){return e[t]===void 0?e.borderRadius:e[t]}var NF=FF(0,.5,HO),PF=FF(.5,.95,SO);function FF(e,t,n){return r=>r<e?0:r>t?1:n(TO(e,t,r))}function IF(e,t,n){let r=cM(e)?e:rM(e);return r.start(Jj(``,r,t,n)),r.animation}function LF(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}var RF=(e,t)=>e.depth-t.depth,zF=class{constructor(){this.children=[],this.isDirty=!1}add(e){mO(this.children,e),this.isDirty=!0}remove(e){hO(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(RF),this.isDirty=!1,this.children.forEach(e)}};function BF(e,t){let n=lk.now(),r=({timestamp:i})=>{let a=i-n;a>=t&&(ik(r),e(a-t))};return rk.setup(r,!0),()=>ik(r)}function VF(e){return cM(e)?e.get():e}var HF=class{constructor(){this.members=[]}add(e){mO(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&&(hO(this.members,n),n.unmount())}e.scheduleRender()}remove(e){if(hO(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)}},UF={hasAnimatedSinceResize:!0,hasEverUpdated:!1},WF={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},GF=[``,`X`,`Y`,`Z`],KF=1e3,qF=0;function JF(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function YF(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let n=pM(t);if(window.MotionHasOptimisedAnimation(n,`transform`)){let{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,`transform`,rk,!(t||r))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&YF(r)}function XF({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=t?.()){this.id=qF++,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,$O.value&&(WF.nodes=WF.calculatedTargetDeltas=WF.calculatedProjections=0),this.nodes.forEach($F),this.nodes.forEach(cI),this.nodes.forEach(lI),this.nodes.forEach(eI),$O.addProjectionMetrics&&$O.addProjectionMetrics(WF)},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 zF)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new EO),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=sN(t)&&!SN(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;rk.read(()=>{r=window.innerWidth}),e(t,()=>{let e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n&&n(),n=BF(i,250),UF.hasAnimatedSinceResize&&(UF.hasAnimatedSinceResize=!1,this.nodes.forEach(sI)))})}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()||gI,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=i.getProps(),c=!this.targetLayout||!SF(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={...Gj(a,`layout`),onPlay:o,onComplete:s};(i.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,l)}else t||sI(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(),ik(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(uI),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&&YF(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(rI),this.nodes.forEach(nI);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(iI);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(aI),this.nodes.forEach(oI),this.nodes.forEach(ZF),this.nodes.forEach(QF)):this.nodes.forEach(iI),this.clearAllSnapshots();let e=lk.now();ak.delta=gO(0,1e3/60,e-ak.timestamp),ak.timestamp=e,ak.isProcessing=!0,ok.update.process(ak),ok.preRender.process(ak),ok.render.process(ak),ak.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,VM.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(tI),this.sharedNodes.forEach(dI)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,rk.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){rk.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!rF(this.snapshot.measuredBox.x)&&!rF(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||=ON(),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&&!vF(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,``):void 0,a=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||$N(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)),bI(n),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return ON();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(SI))){let{scroll:e}=this.root;e&&(lP(t.x,e.offset.x),lP(t.y,e.offset.y))}return t}removeElementScroll(e){let t=ON();if(YP(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&&YP(t,e),lP(t.x,i.offset.x),lP(t.y,i.offset.y))}return t}applyTransform(e,t=!1,n){let r=n||ON();YP(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&&(lP(r.x,-n.scroll.offset.x),lP(r.y,-n.scroll.offset.y)),$N(n.latestValues)&&fP(r,n.latestValues,n.layout?.layoutBox)}return $N(this.latestValues)&&fP(r,this.latestValues,this.layout?.layoutBox),r}removeTransform(e){let t=ON();YP(t,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!$N(n.latestValues))continue;let r;n.instance&&(QN(n.latestValues)&&n.updateSnapshot(),r=ON(),YP(r,n.measurePageBox())),gF(t,n.latestValues,n.snapshot?.layoutBox,r)}return $N(this.latestValues)&&gF(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:e.crossfade===void 0?!0:e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==ak.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=ak.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=ON(),this.targetWithTransforms=ON()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),cF(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):YP(this.target,this.layout.layoutBox),aP(this.target,this.targetDelta)):YP(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),$O.value&&WF.calculatedTargetDeltas++)}getClosestProjectingParent(){if(!(!this.parent||QN(this.parent.latestValues)||eP(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=ON(),this.relativeTargetOrigin=ON(),uF(this.relativeTargetOrigin,t,n,this.options.layoutAnchor||void 0),YP(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===ak.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;YP(this.layoutCorrected,this.layout.layoutBox);let a=this.treeScale.x,o=this.treeScale.y;cP(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=ON());let{target:s}=e;if(!s){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(XP(this.prevProjectionDelta.x,this.projectionDelta.x),XP(this.prevProjectionDelta.y,this.projectionDelta.y)),oF(this.projectionDelta,this.layoutCorrected,s,this.latestValues),(this.treeScale.x!==a||this.treeScale.y!==o||!wF(this.projectionDelta.x,this.prevProjectionDelta.x)||!wF(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners(`projectionUpdate`,s)),$O.value&&WF.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=EN(),this.projectionDelta=EN(),this.projectionDeltaWithTransform=EN()}setAnimationOrigin(e,t=!1){let n=this.snapshot,r=n?n.latestValues:{},i={...this.latestValues},a=EN();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let o=ON(),s=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),c=this.getStack(),l=!c||c.members.length<=1,u=!!(s&&!l&&this.options.crossfade===!0&&!this.path.some(hI));this.animationProgress=0;let d;this.mixTargetDelta=t=>{let n=t/1e3;fI(a.x,e.x,n),fI(a.y,e.y,n),this.setTargetDelta(a),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(uF(o,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),mI(this.relativeTarget,this.relativeTargetOrigin,o,n),d&&bF(this.relativeTarget,d)&&(this.isProjectionDirty=!1),d||=ON(),YP(d,this.relativeTarget)),s&&(this.animationValues=i,jF(i,r,this.latestValues,n,u,l)),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&&=(ik(this.pendingAnimation),void 0),this.pendingAnimation=rk.update(()=>{UF.hasAnimatedSinceResize=!0,uk.layout++,this.motionValue||=rM(0),this.motionValue.jump(0,!1),this.currentAnimation=IF(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onStop:()=>{uk.layout--},onComplete:()=>{uk.layout--,e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners(`animationComplete`)}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(KF),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&&xI(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||ON();let t=rF(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;let r=rF(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}YP(t,n),fP(t,i),oF(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new HF),this.sharedNodes.get(e).add(t);let n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return e?e.lead===this:!0}getLead(){let{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){let r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){let e=this.getStack();return e?e.relegate(this):!1}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let t=!1,{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;let r={};n.z&&JF(`z`,e,r,this.animationValues);for(let t=0;t<GF.length;t++)JF(`rotate${GF[t]}`,e,r,this.animationValues),JF(`skew${GF[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=VF(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=VF(t?.pointerEvents)||``),this.hasProjected&&!$N(this.latestValues)&&(e.transform=n?n({},``):`none`,this.hasProjected=!1);return}e.visibility=``;let i=r.animationValues||r.latestValues;this.applyTransformsToTarget();let a=EF(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 CP){if(i[t]===void 0)continue;let{correct:n,applyTo:o,isCSSVariable:s}=CP[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?VF(t?.pointerEvents)||``:`none`)}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(nI),this.root.sharedNodes.clear()}}}function ZF(e){e.updateLayout()}function QF(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`)TF(e=>{let r=a?t.measuredBox[e]:t.layoutBox[e],i=rF(r);r.min=n[e].min,r.max=r.min+i});else if(i===`x`||i===`y`){let e=i===`x`?`y`:`x`;JP(a?t.measuredBox[e]:t.layoutBox[e],n[e])}else xI(i,t.layoutBox,n)&&TF(r=>{let i=a?t.measuredBox[r]:t.layoutBox[r],o=rF(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=EN();oF(o,n,t.layoutBox);let s=EN();a?oF(s,e.applyTransform(r,!0),t.measuredBox):oF(s,n,t.layoutBox);let c=!vF(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=ON();uF(s,t.layoutBox,i.layoutBox,o);let c=ON();uF(c,n,a.layoutBox,o),SF(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 $F(e){$O.value&&WF.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 eI(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function tI(e){e.clearSnapshot()}function nI(e){e.clearMeasurements()}function rI(e){e.isLayoutDirty=!0,e.updateLayout()}function iI(e){e.isLayoutDirty=!1}function aI(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function oI(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify(`BeforeLayoutMeasure`),e.resetTransform()}function sI(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function cI(e){e.resolveTargetDelta()}function lI(e){e.calcProjection()}function uI(e){e.resetSkewAndRotation()}function dI(e){e.removeLeadSnapshot()}function fI(e,t,n){e.translate=aA(t.translate,0,n),e.scale=aA(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function pI(e,t,n,r){e.min=aA(t.min,n.min,r),e.max=aA(t.max,n.max,r)}function mI(e,t,n,r){pI(e.x,t.x,n.x,r),pI(e.y,t.y,n.y,r)}function hI(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var gI={duration:.45,ease:[.4,0,.1,1]},_I=e=>typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),vI=_I(`applewebkit/`)&&!_I(`chrome/`)?Math.round:SO;function yI(e){e.min=vI(e.min),e.max=vI(e.max)}function bI(e){yI(e.x),yI(e.y)}function xI(e,t,n){return e===`position`||e===`preserve-aspect`&&!iF(CF(t),CF(n),.2)}function SI(e){return e!==e.root&&e.scroll?.wasRoot}var CI=XF({attachResizeListener:(e,t)=>LF(e,`resize`,t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),wI={current:void 0},TI=XF({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!wI.current){let e=new CI({});e.mount(window),e.setOptions({layoutScroll:!0}),wI.current=e}return wI.current},resetTransform:(e,t)=>{e.style.transform=t===void 0?`none`:t},checkIsScrollRoot:e=>window.getComputedStyle(e).position===`fixed`}),EI=(0,b.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:`never`});function DI(e=!0){let t=(0,b.useContext)(pO);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 OI=(0,b.createContext)({strict:!1}),kI={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`]},AI=!1;function jI(){if(AI)return;let e={};for(let t in kI)e[t]={isEnabled:e=>kI[t].some(t=>!!e[t])};UN(e),AI=!0}function MI(){return jI(),WN()}function NI(e){let t=MI();for(let n in e)t[n]={...t[n],...e[n]};UN(t)}var PI=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 FI(e){return e.startsWith(`while`)||e.startsWith(`drag`)&&e!==`draggable`||e.startsWith(`layout`)||e.startsWith(`onTap`)||e.startsWith(`onPan`)||e.startsWith(`onLayout`)||PI.has(e)}var II=c({default:()=>LI}),LI,RI=o((()=>{throw LI={},Error(`Could not resolve "@emotion/is-prop-valid" imported by "framer-motion". Is it installed?`)})),zI=e=>!FI(e);function BI(e){typeof e==`function`&&(zI=t=>t.startsWith(`on`)?!FI(t):e(t))}try{BI((RI(),d(II)).default)}catch{}function VI(e,t,n){let r={};for(let i in e)i===`values`&&typeof e.values==`object`||cM(e[i])||(zI(i)||n===!0&&FI(i)||!t&&!FI(i)||e.draggable&&i.startsWith(`onDrag`))&&(r[i]=e[i]);return r}var HI=(0,b.createContext)({});function UI(e,t){if(PN(e)){let{initial:t,animate:n}=e;return{initial:t===!1||jN(t)?t:void 0,animate:jN(n)?n:void 0}}return e.inherit===!1?{}:t}function WI(e){let{initial:t,animate:n}=UI(e,(0,b.useContext)(HI));return(0,b.useMemo)(()=>({initial:t,animate:n}),[GI(t),GI(n)])}function GI(e){return Array.isArray(e)?e.join(` `):e}var KI=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function qI(e,t,n){for(let r in t)!cM(t[r])&&!wP(r,n)&&(e[r]=t[r])}function JI({transformTemplate:e},t){return(0,b.useMemo)(()=>{let n=KI();return vP(n,t,e),Object.assign({},n.vars,n.style)},[t])}function YI(e,t){let n=e.style||{},r={};return qI(r,n,e),Object.assign(r,JI(e,t)),r}function XI(e,t){let n={},r=YI(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 ZI=()=>({...KI(),attrs:{}});function QI(e,t,n,r){let i=(0,b.useMemo)(()=>{let n=ZI();return MP(n,t,PP(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};qI(t,e.style,e),i.style={...t,...i.style}}return i}var $I=[`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 eL(e){return typeof e!=`string`||e.includes(`-`)?!1:!!($I.indexOf(e)>-1||/[A-Z]/u.test(e))}function tL(e,t,n,{latestValues:r},i,a=!1,o){let s=(o??eL(e)?QI:XI)(t,r,i,e),c=VI(t,typeof e==`string`,a),l=e===b.Fragment?{}:{...c,...s,ref:n},{children:u}=t,d=(0,b.useMemo)(()=>cM(u)?u.get():u,[u]);return(0,b.createElement)(e,{...l,children:d})}function nL({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:rL(n,r,i,e),renderState:t()}}function rL(e,t,n,r){let i={},a=r(e,{});for(let e in a)i[e]=VF(a[e]);let{initial:o,animate:s}=e,c=PN(e),l=FN(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`&&!AN(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){let r=Xj(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 iL=e=>(t,n)=>{let r=(0,b.useContext)(HI),i=(0,b.useContext)(pO),a=()=>nL(e,t,r,i);return n?a():dO(a)},aL=iL({scrapeMotionValuesFromProps:TP,createRenderState:KI}),oL=iL({scrapeMotionValuesFromProps:IP,createRenderState:ZI}),sL=Symbol.for(`motionComponentSymbol`);function cL(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);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&&(n?t.mount(n):t.unmount())},[t])}var lL=(0,b.createContext)({});function uL(e){return e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function dL(e,t,n,r,i,a){let{visualElement:o}=(0,b.useContext)(HI),s=(0,b.useContext)(OI),c=(0,b.useContext)(pO),l=(0,b.useContext)(EI),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)(lL);m&&!m.projection&&i&&(m.type===`html`||m.type===`svg`)&&fL(f.current,n,i,h);let g=(0,b.useRef)(!1);(0,b.useInsertionEffect)(()=>{m&&g.current&&m.update(n,c)});let _=n[fM],v=(0,b.useRef)(!!_&&typeof window<`u`&&!window.MotionHandoffIsComplete?.(_)&&window.MotionHasOptimisedAnimation?.(_));return fO(()=>{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 fL(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:pL(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&uL(s),visualElement:e,animationType:typeof a==`string`?a:`both`,initialPromotionConfig:r,crossfade:d,layoutScroll:c,layoutRoot:l,layoutAnchor:u})}function pL(e){if(e)return e.options.allowProjection===!1?pL(e.parent):e.projection}function mL(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&NI(r);let a=n?n===`svg`:eL(e),o=a?oL:aL;function s(n,s){let c,l={...(0,b.useContext)(EI),...n,layoutId:hL(n)},{isStatic:u}=l,d=WI(n),f=o(n,u);if(!u&&typeof window<`u`){gL(l,r);let t=_L(l);c=t.MeasureLayout,d.visualElement=dL(e,f,l,i,t.ProjectionNode,a)}return(0,G.jsxs)(HI.Provider,{value:d,children:[c&&d.visualElement?(0,G.jsx)(c,{visualElement:d.visualElement,...l}):null,tL(e,n,cL(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[sL]=e,c}function hL({layoutId:e}){let t=(0,b.useContext)(uO).id;return t&&e!==void 0?t+`-`+e:e}function gL(e,t){(0,b.useContext)(OI).strict}function _L(e){let{drag:t,layout:n}=MI();if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function vL(e,t){if(typeof Proxy>`u`)return mL;let n=new Map,r=(n,r)=>mL(n,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(i,a)=>a===`create`?r:(n.has(a)||n.set(a,mL(a,void 0,e,t)),n.get(a))})}var yL=(e,t)=>t.isSVG??eL(e)?new LP(t):new DP(t,{allowProjection:e!==b.Fragment}),bL=class extends qN{constructor(e){super(e),e.animationState||=WP(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();AN(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?.()}},ane=0,one={animation:{Feature:bL},exit:{Feature:class extends qN{constructor(){super(...arguments),this.id=ane++,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`){let n=Zj(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 xL(e){return{point:{x:e.pageX,y:e.pageY}}}var sne=e=>t=>YM(t)&&e(t,xL(t));function SL(e,t,n,r){return LF(e,t,sne(n),r)}var CL=({current:e})=>e?e.ownerDocument.defaultView:null,wL=(e,t)=>Math.abs(e-t);function cne(e,t){let n=wL(e.x,t.x),r=wL(e.y,t.y);return Math.sqrt(n**2+r**2)}var TL=new Set([`auto`,`scroll`]),EL=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=DL(this.lastRawMoveEventInfo,this.transformPagePoint));let e=kL(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=cne(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;let{point:r}=e,{timestamp:i}=ak;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=DL(t,this.transformPagePoint),rk.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=kL(e.type===`pointercancel`?this.lastMoveEventInfo:DL(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,a),r&&r(e,a)},!YM(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=a,this.contextWindow=r||window;let s=DL(xL(e),this.transformPagePoint),{point:c}=s,{timestamp:l}=ak;this.history=[{...c,timestamp:l}];let{onSessionStart:u}=t;u&&u(e,kL(s,this.history)),this.removeListeners=wO(SL(this.contextWindow,`pointermove`,this.handlePointerMove),SL(this.contextWindow,`pointerup`,this.handlePointerUp),SL(this.contextWindow,`pointercancel`,this.handlePointerUp)),o&&this.startScrollTracking(o)}startScrollTracking(e){let t=e.parentElement;for(;t;){let e=getComputedStyle(t);(TL.has(e.overflowX)||TL.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),rk.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),ik(this.updatePoint)}};function DL(e,t){return t?{point:t(e.point)}:e}function OL(e,t){return{x:e.x-t.x,y:e.y-t.y}}function kL({point:e},t){return{point:e,delta:OL(e,AL(t)),offset:OL(e,lne(t)),velocity:une(t,.1)}}function lne(e){return e[0]}function AL(e){return e[e.length-1]}function une(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=AL(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>DO(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>DO(t)*2&&(r=e[1]);let a=OO(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 dne(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?aA(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?aA(n,e,r.max):Math.min(e,n)),e}function jL(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 fne(e,{top:t,left:n,bottom:r,right:i}){return{x:jL(e.x,n,i),y:jL(e.y,t,r)}}function ML(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 pne(e,t){return{x:ML(e.x,t.x),y:ML(e.y,t.y)}}function mne(e,t){let n=.5,r=rF(e),i=rF(t);return i>r?n=TO(t.min,t.max-r,e.min):r>i&&(n=TO(e.min,e.max-i,t.min)),gO(0,1,n)}function hne(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 NL=.35;function gne(e=NL){return e===!1?e=0:e===!0&&(e=NL),{x:PL(e,`left`,`right`),y:PL(e,`top`,`bottom`)}}function PL(e,t,n){return{min:FL(e,t),max:FL(e,n)}}function FL(e,t){return typeof e==`number`?e:e[t]||0}var _ne=new WeakMap,vne=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=ON(),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(xL(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=WM(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),TF(e=>{let t=this.getAxisMotionValue(e).get()||0;if(Nk.test(t)){let{projection:n}=this.visualElement;if(n&&n.layout){let r=n.layout.layoutBox[e];r&&(t=rF(r)*(parseFloat(t)/100))}}this.originPoint[e]=t}),i&&rk.update(()=>i(e,t),!1,!0),uM(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=bne(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&&rk.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 EL(e,{onSessionStart:i,onStart:a,onMove:o,onSessionEnd:s,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,distanceThreshold:n,contextWindow:CL(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&&rk.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||!LL(e,r,this.currentDirection))return;let i=this.getAxisMotionValue(e),a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=dne(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&&uL(e)?this.constraints||=this.resolveRefConstraints():e&&n?this.constraints=fne(n.layoutBox,e):this.constraints=!1,this.elastic=gne(t),r!==this.constraints&&!uL(e)&&n&&this.constraints&&!this.hasMutatedConstraints&&TF(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=hne(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!uL(e))return!1;let n=e.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;let i=mP(n,r.root,this.visualElement.getTransformPagePoint()),a=pne(r.layout.layoutBox,i);if(t){let e=t(YN(a));this.hasMutatedConstraints=!!e,e&&(a=JN(e))}return a}startAnimation(e){let{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),s=this.constraints||{},c=TF(o=>{if(!LL(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 uM(this.visualElement,e),n.start(Jj(e,n,0,t,this.visualElement,!1))}stopAnimation(){TF(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps();return n[t]||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){TF(t=>{let{drag:n}=this.getProps();if(!LL(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]-aA(n,a,.5)+o)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!uL(t)||!n||!this.constraints)return;this.stopAnimation();let r={x:0,y:0};TF(e=>{let t=this.getAxisMotionValue(e);if(t&&this.constraints!==!1){let n=t.get();r[e]=mne({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(),TF(t=>{if(!LL(t,e,null))return;let n=this.getAxisMotionValue(t),{min:i,max:a}=this.constraints[t];n.set(aA(i,a,r[t]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;_ne.set(this.visualElement,this);let e=this.visualElement.current,t=SL(e,`pointerdown`,t=>{let{drag:n,dragListener:r=!0}=this.getProps(),i=t.target,a=i!==e&&$M(i);n&&r&&!a&&this.start(t)}),n,r=()=>{let{dragConstraints:t}=this.getProps();uL(t)&&t.current&&(this.constraints=this.resolveRefConstraints(),n||=yne(e,t.current,()=>this.scalePositionWithinConstraints()))},{projection:i}=this.visualElement,a=i.addEventListener(`measure`,r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),rk.read(r);let o=LF(window,`resize`,()=>this.scalePositionWithinConstraints()),s=i.addEventListener(`didUpdate`,(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(TF(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=NL,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:a,dragMomentum:o}}};function IL(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function yne(e,t,n){let r=xN(e,IL(n)),i=xN(t,IL(n));return()=>{r(),i()}}function LL(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function bne(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}var xne=class extends qN{constructor(e){super(e),this.removeGroupControls=SO,this.removeListeners=SO,this.controls=new vne(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||SO}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()}},RL=e=>(t,n)=>{e&&rk.update(()=>e(t,n),!1,!0)},Sne=class extends qN{constructor(){super(...arguments),this.removePointerDownListener=SO}onPointerDown(e){this.session=new EL(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:CL(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:RL(e),onStart:RL(t),onMove:RL(n),onEnd:(e,t)=>{delete this.session,r&&rk.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=SL(this.node.current,`pointerdown`,e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}},zL=!1,Cne=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),zL&&i.root.didUpdate(),i.addEventListener(`animationComplete`,()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),UF.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}),zL=!0,r||e.layoutDependency!==t||t===void 0||e.isPresent!==i?a.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?a.promote():a.relegate()||rk.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(),VM.postRender(()=>{!n.currentAnimation&&n.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;zL=!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 BL(e){let[t,n]=DI(),r=(0,b.useContext)(uO);return(0,G.jsx)(Cne,{...e,layoutGroup:r,switchLayoutGroup:(0,b.useContext)(lL),isPresent:t,safeToRemove:n})}var wne={pan:{Feature:Sne},drag:{Feature:xne,ProjectionNode:TI,MeasureLayout:BL}};function VL(e,t,n){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive(`whileHover`,n===`Start`);let i=r[`onHover`+n];i&&rk.postRender(()=>i(t,xL(t)))}var Tne=class extends qN{mount(){let{current:e}=this.node;e&&(this.unmount=qM(e,(e,t)=>(VL(this.node,t,`Start`),e=>VL(this.node,e,`End`))))}unmount(){}},Ene=class extends qN{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=wO(LF(this.node.current,`focus`,()=>this.onFocus()),LF(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}};function HL(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&&rk.postRender(()=>i(t,xL(t)))}var Dne=class extends qN{mount(){let{current:e}=this.node;if(!e)return;let{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=oN(e,(e,t)=>(HL(this.node,t,`Start`),(e,{success:t})=>HL(this.node,e,t?`End`:`Cancel`)),{useGlobalTarget:t,stopPropagation:n?.tap===!1})}unmount(){}},UL=new WeakMap,WL=new WeakMap,One=e=>{let t=UL.get(e.target);t&&t(e)},kne=e=>{e.forEach(One)};function Ane({root:e,...t}){let n=e||document;WL.has(n)||WL.set(n,{});let r=WL.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(kne,{root:e,...t})),r[i]}function jne(e,t,n){let r=Ane(t);return UL.set(e,n),r.observe(e),()=>{UL.delete(e),r.unobserve(e)}}var Mne={some:0,all:1},Nne=class extends qN{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:Mne[r]};this.stopObserver=jne(this.node.current,a,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)})}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>`u`)return;let{props:e,prevProps:t}=this.node;[`amount`,`margin`,`root`].some(Pne(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}};function Pne({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}var Fne={inView:{Feature:Nne},tap:{Feature:Dne},focus:{Feature:Ene},hover:{Feature:Tne}},Ine={layout:{ProjectionNode:TI,MeasureLayout:BL}},GL=vL({...one,...Fne,...wne,...Ine},yL),KL=b.memo(({className:e})=>{let t=`M-380 -189C-380 -189 -312 216 152 343C616 470 684 875 684 875.M-373 -197C-373 -197 -305 208 159 335C623 462 691 867 691 867.M-366 -205C-366 -205 -298 200 166 327C630 454 698 859 698 859.M-359 -213C-359 -213 -291 192 173 319C637 446 705 851 705 851.M-352 -221C-352 -221 -284 184 180 311C644 438 712 843 712 843.M-345 -229C-345 -229 -277 176 187 303C651 430 719 835 719 835.M-338 -237C-338 -237 -270 168 194 295C658 422 726 827 726 827.M-331 -245C-331 -245 -263 160 201 287C665 414 733 819 733 819.M-324 -253C-324 -253 -256 152 208 279C672 406 740 811 740 811.M-317 -261C-317 -261 -249 144 215 271C679 398 747 803 747 803.M-310 -269C-310 -269 -242 136 222 263C686 390 754 795 754 795.M-303 -277C-303 -277 -235 128 229 255C693 382 761 787 761 787.M-296 -285C-296 -285 -228 120 236 247C700 374 768 779 768 779.M-289 -293C-289 -293 -221 112 243 239C707 366 775 771 775 771.M-282 -301C-282 -301 -214 104 250 231C714 358 782 763 782 763.M-275 -309C-275 -309 -207 96 257 223C721 350 789 755 789 755.M-268 -317C-268 -317 -200 88 264 215C728 342 796 747 796 747.M-261 -325C-261 -325 -193 80 271 207C735 334 803 739 803 739.M-254 -333C-254 -333 -186 72 278 199C742 326 810 731 810 731.M-247 -341C-247 -341 -179 64 285 191C749 318 817 723 817 723.M-240 -349C-240 -349 -172 56 292 183C756 310 824 715 824 715.M-233 -357C-233 -357 -165 48 299 175C763 302 831 707 831 707.M-226 -365C-226 -365 -158 40 306 167C770 294 838 699 838 699.M-219 -373C-219 -373 -151 32 313 159C777 286 845 691 845 691.M-212 -381C-212 -381 -144 24 320 151C784 278 852 683 852 683.M-205 -389C-205 -389 -137 16 327 143C791 270 859 675 859 675.M-198 -397C-198 -397 -130 8 334 135C798 262 866 667 866 667.M-191 -405C-191 -405 -123 0 341 127C805 254 873 659 873 659.M-184 -413C-184 -413 -116 -8 348 119C812 246 880 651 880 651.M-177 -421C-177 -421 -109 -16 355 111C819 238 887 643 887 643.M-170 -429C-170 -429 -102 -24 362 103C826 230 894 635 894 635.M-163 -437C-163 -437 -95 -32 369 95C833 222 901 627 901 627.M-156 -445C-156 -445 -88 -40 376 87C840 214 908 619 908 619.M-149 -453C-149 -453 -81 -48 383 79C847 206 915 611 915 611.M-142 -461C-142 -461 -74 -56 390 71C854 198 922 603 922 603.M-135 -469C-135 -469 -67 -64 397 63C861 190 929 595 929 595.M-128 -477C-128 -477 -60 -72 404 55C868 182 936 587 936 587.M-121 -485C-121 -485 -53 -80 411 47C875 174 943 579 943 579.M-114 -493C-114 -493 -46 -88 418 39C882 166 950 571 950 571.M-107 -501C-107 -501 -39 -96 425 31C889 158 957 563 957 563.M-100 -509C-100 -509 -32 -104 432 23C896 150 964 555 964 555.M-93 -517C-93 -517 -25 -112 439 15C903 142 971 547 971 547.M-86 -525C-86 -525 -18 -120 446 7C910 134 978 539 978 539.M-79 -533C-79 -533 -11 -128 453 -1C917 126 985 531 985 531.M-72 -541C-72 -541 -4 -136 460 -9C924 118 992 523 992 523.M-65 -549C-65 -549 3 -144 467 -17C931 110 999 515 999 515.M-58 -557C-58 -557 10 -152 474 -25C938 102 1006 507 1006 507.M-51 -565C-51 -565 17 -160 481 -33C945 94 1013 499 1013 499.M-44 -573C-44 -573 24 -168 488 -41C952 86 1020 491 1020 491.M-37 -581C-37 -581 31 -176 495 -49C959 78 1027 483 1027 483`.split(`.`);return(0,G.jsx)(`div`,{className:iO(`absolute h-full w-full inset-0 mask-size-[40px] mask-repeat-[no-repeat] flex items-center justify-center`,e),children:(0,G.jsxs)(`svg`,{className:`z-0 h-full w-full pointer-events-none absolute`,width:`100%`,height:`100%`,viewBox:`0 0 696 316`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:[(0,G.jsx)(`title`,{children:`Background Beams`}),(0,G.jsx)(`path`,{d:`M-380 -189C-380 -189 -312 216 152 343C616 470 684 875 684 875M-373 -197C-373 -197 -305 208 159 335C623 462 691 867 691 867M-366 -205C-366 -205 -298 200 166 327C630 454 698 859 698 859M-359 -213C-359 -213 -291 192 173 319C637 446 705 851 705 851M-352 -221C-352 -221 -284 184 180 311C644 438 712 843 712 843M-345 -229C-345 -229 -277 176 187 303C651 430 719 835 719 835M-338 -237C-338 -237 -270 168 194 295C658 422 726 827 726 827M-331 -245C-331 -245 -263 160 201 287C665 414 733 819 733 819M-324 -253C-324 -253 -256 152 208 279C672 406 740 811 740 811M-317 -261C-317 -261 -249 144 215 271C679 398 747 803 747 803M-310 -269C-310 -269 -242 136 222 263C686 390 754 795 754 795M-303 -277C-303 -277 -235 128 229 255C693 382 761 787 761 787M-296 -285C-296 -285 -228 120 236 247C700 374 768 779 768 779M-289 -293C-289 -293 -221 112 243 239C707 366 775 771 775 771M-282 -301C-282 -301 -214 104 250 231C714 358 782 763 782 763M-275 -309C-275 -309 -207 96 257 223C721 350 789 755 789 755M-268 -317C-268 -317 -200 88 264 215C728 342 796 747 796 747M-261 -325C-261 -325 -193 80 271 207C735 334 803 739 803 739M-254 -333C-254 -333 -186 72 278 199C742 326 810 731 810 731M-247 -341C-247 -341 -179 64 285 191C749 318 817 723 817 723M-240 -349C-240 -349 -172 56 292 183C756 310 824 715 824 715M-233 -357C-233 -357 -165 48 299 175C763 302 831 707 831 707M-226 -365C-226 -365 -158 40 306 167C770 294 838 699 838 699M-219 -373C-219 -373 -151 32 313 159C777 286 845 691 845 691M-212 -381C-212 -381 -144 24 320 151C784 278 852 683 852 683M-205 -389C-205 -389 -137 16 327 143C791 270 859 675 859 675M-198 -397C-198 -397 -130 8 334 135C798 262 866 667 866 667M-191 -405C-191 -405 -123 0 341 127C805 254 873 659 873 659M-184 -413C-184 -413 -116 -8 348 119C812 246 880 651 880 651M-177 -421C-177 -421 -109 -16 355 111C819 238 887 643 887 643M-170 -429C-170 -429 -102 -24 362 103C826 230 894 635 894 635M-163 -437C-163 -437 -95 -32 369 95C833 222 901 627 901 627M-156 -445C-156 -445 -88 -40 376 87C840 214 908 619 908 619M-149 -453C-149 -453 -81 -48 383 79C847 206 915 611 915 611M-142 -461C-142 -461 -74 -56 390 71C854 198 922 603 922 603M-135 -469C-135 -469 -67 -64 397 63C861 190 929 595 929 595M-128 -477C-128 -477 -60 -72 404 55C868 182 936 587 936 587M-121 -485C-121 -485 -53 -80 411 47C875 174 943 579 943 579M-114 -493C-114 -493 -46 -88 418 39C882 166 950 571 950 571M-107 -501C-107 -501 -39 -96 425 31C889 158 957 563 957 563M-100 -509C-100 -509 -32 -104 432 23C896 150 964 555 964 555M-93 -517C-93 -517 -25 -112 439 15C903 142 971 547 971 547M-86 -525C-86 -525 -18 -120 446 7C910 134 978 539 978 539M-79 -533C-79 -533 -11 -128 453 -1C917 126 985 531 985 531M-72 -541C-72 -541 -4 -136 460 -9C924 118 992 523 992 523M-65 -549C-65 -549 3 -144 467 -17C931 110 999 515 999 515M-58 -557C-58 -557 10 -152 474 -25C938 102 1006 507 1006 507M-51 -565C-51 -565 17 -160 481 -33C945 94 1013 499 1013 499M-44 -573C-44 -573 24 -168 488 -41C952 86 1020 491 1020 491M-37 -581C-37 -581 31 -176 495 -49C959 78 1027 483 1027 483M-30 -589C-30 -589 38 -184 502 -57C966 70 1034 475 1034 475M-23 -597C-23 -597 45 -192 509 -65C973 62 1041 467 1041 467M-16 -605C-16 -605 52 -200 516 -73C980 54 1048 459 1048 459M-9 -613C-9 -613 59 -208 523 -81C987 46 1055 451 1055 451M-2 -621C-2 -621 66 -216 530 -89C994 38 1062 443 1062 443M5 -629C5 -629 73 -224 537 -97C1001 30 1069 435 1069 435M12 -637C12 -637 80 -232 544 -105C1008 22 1076 427 1076 427M19 -645C19 -645 87 -240 551 -113C1015 14 1083 419 1083 419`,stroke:`url(#paint0_radial_242_278)`,strokeOpacity:`0.05`,strokeWidth:`0.5`}),t.map((e,t)=>(0,G.jsx)(GL.path,{d:e,stroke:`url(#linearGradient-${t})`,strokeOpacity:`0.4`,strokeWidth:`0.5`},`path-${t}`)),(0,G.jsxs)(`defs`,{children:[t.map((e,t)=>(0,G.jsxs)(GL.linearGradient,{id:`linearGradient-${t}`,initial:{x1:`0%`,x2:`0%`,y1:`0%`,y2:`0%`},animate:{x1:[`0%`,`100%`],x2:[`0%`,`95%`],y1:[`0%`,`100%`],y2:[`0%`,`${93+Math.random()*8}%`]},transition:{duration:Math.random()*10+10,ease:`easeInOut`,repeat:1/0,delay:0},children:[(0,G.jsx)(`stop`,{stopColor:`#000000`,stopOpacity:`0`}),(0,G.jsx)(`stop`,{stopColor:`#111111`}),(0,G.jsx)(`stop`,{offset:`32.5%`,stopColor:`#666666`}),(0,G.jsx)(`stop`,{offset:`100%`,stopColor:`#FFFFFF`,stopOpacity:`0`})]},`gradient-${t}`)),(0,G.jsxs)(`radialGradient`,{id:`paint0_radial_242_278`,cx:`0`,cy:`0`,r:`1`,gradientUnits:`userSpaceOnUse`,gradientTransform:`translate(352 34) rotate(90) scale(555 1560.62)`,children:[(0,G.jsx)(`stop`,{offset:`0.0666667`,stopColor:`var(--neutral-300)`}),(0,G.jsx)(`stop`,{offset:`0.243243`,stopColor:`var(--neutral-300)`}),(0,G.jsx)(`stop`,{offset:`0.43594`,stopColor:`white`,stopOpacity:`0`})]})]})]})})});KL.displayName=`BackgroundBeams`;var Lne=()=>(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(KL,{className:`absolute inset-0`}),(0,G.jsx)(`div`,{className:`relative z-10 flex-1 flex items-center justify-center`,children:(0,G.jsxs)(`div`,{className:`text-center`,children:[(0,G.jsx)(`h1`,{className:`text-2xl font-semibold text-foreground mb-2`,children:`Welcome to Skybridge`}),(0,G.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Choose a tool from the sidebar to begin`})]})})]});function qL(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 Rne(e){return e.additionalItems===!0&&console.warn(`additionalItems=true is currently not supported`),qL(e.additionalItems)}function JL(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 YL=`__additional_property`,XL=`additionalProperties`,ZL=`allOf`,QL=`anyOf`,$L=`const`,eR=`default`,tR=`__errors`,nR=`items`,zne=`_$junk_option_schema_id$_`,rR=`$name`,iR=`oneOf`,aR=`properties`,oR=`readonly`,Bne=`required`,sR=`submitButtonOptions`,cR=`$ref`,lR=`__rjsf_ref`,uR=`root`,Vne=[`discriminator`,`propertyName`],Hne=`formContext`,Une=`layoutGridLookupMap`,dR=`__rjsf_additionalProperties`,fR=`__rjsf_rootSchema`,pR=`ui:options`,mR=`ui:globalOptions`;function hR(e={},t={}){return e?Object.keys(e).filter(e=>e.indexOf(`ui:`)===0).reduce((t,n)=>{let r=e[n];return n===`ui:widget`&&qL(r)?(console.error(`Setting options via ui:widget object is no longer supported, use ui:options instead`),t):n===`ui:options`&&qL(r)?{...t,...r}:{...t,[n.substring(3)]:r}},{...t}):{...t}}function gR(e,t={},n){if(!(e.additionalProperties||e.patternProperties))return!1;let{expandable:r=!0}=hR(t);return r===!1?r:e.maxProperties!==void 0&&n?Object.keys(n).length<e.maxProperties:!0}function _R(e){let t={[tR]:[],addError(e){this[tR].push(e)}};if(Array.isArray(e))return e.reduce((e,t,n)=>({...e,[n]:_R(t)}),t);if(Ov(e)){let n=e;return Object.keys(n).reduce((e,t)=>({...e,[t]:_R(n[t])}),t)}return t}function vR(e,t){return uS(e,t,(e,t)=>{if(typeof e==`function`&&typeof t==`function`)return!0})}var Wne=Object.prototype;function yR(e){for(let t in e)if(Wne.hasOwnProperty.call(e,t))return!1;return!0}var bR=[`$defs`,`definitions`,`properties`,`patternProperties`,`dependencies`];new Set(bR);var xR=[`items`,`allOf`,`oneOf`,`anyOf`];new Set(xR);var SR=[`items`,`additionalItems`,`additionalProperties`,`propertyNames`,`contains`,`if`,`then`,`else`,`not`];new Set(SR),[...bR,...xR,...SR];function CR(e){return typeof e==`object`}function wR(e){return CR(e)?yR(e):e===!0}function TR(e,t){return e<t?-1:e>t?1:0}function ER(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 DR(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 OR(e){return e.length===0}function kR(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 AR(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 jR(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 MR(e,t){return n=>{if(e.has(n))return e.get(n);let r=t(n);return e.set(n,r),r}}var NR=MR,PR=()=>0,FR=e=>e===void 0,IR=e=>typeof e!=`object`,LR={boolean:0,number:1,string:2};function RR(e,t){let n=typeof e,r=typeof t;return n===r?TR(e,t):LR[n]-LR[r]}function zR(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 BR(e,t,n=PR){return(r,i)=>e(r)?e(i)?n(r,i):-1:e(i)?1:t(r,i)}function VR(e){return BR(FR,e)}function HR(e,t){return BR(t=>t===void 0||e(t),t)}function UR(e,t){return BR(Array.isArray,e,t)}var WR=VR(TR),GR=HR(e=>e===0,(e,t)=>e-t);function KR({deduplicationCache:e=new WeakMap,sortedKeysCache:t=new WeakMap}={}){let n=NR(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=TR(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=kR(t),r=NR(e,AR(t,{threshold:0}));return(e,t)=>n(r(e),r(t))}let a=i(TR);function o(e,t){if(CR(e)){if(CR(t)){let n=zR(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&&yR(e)?0:1}return CR(t)?e===!0&&yR(t)?0:-1:TR(e,t)}let s=VR(l),c=BR(IR,UR(r(s),kR(l)),RR);function l(e,t){return e===null?-1:t===null?1:c(e,t)}let u=VR(o),d=HR(yR,r(u)),f=VR(i(o)),p=HR(wR,o),m={$id:WR,$comment:WR,$defs:d,$ref:WR,$schema:WR,const:s,contains:u,contentEncoding:WR,contentMediaType:WR,default:s,definitions:d,description:WR,else:u,examples:s,exclusiveMaximum:WR,exclusiveMinimum:WR,format:WR,if:u,maximum:WR,maxItems:WR,maxLength:WR,maxProperties:WR,minimum:WR,multipleOf:WR,not:u,pattern:WR,propertyNames:u,readOnly:WR,then:u,title:WR,writeOnly:WR,uniqueItems:HR(e=>e===!1,PR),minLength:GR,minItems:GR,minProperties:GR,required:HR(OR,a),enum:HR(OR,i(l)),type:VR((e,t)=>{let n=Array.isArray(e),r=Array.isArray(t);return!n&&!r?TR(e,t):a(n?e:[e],r?t:[t])}),items:HR(e=>!Array.isArray(e)&&wR(e),UR(o,kR(o))),anyOf:f,allOf:f,oneOf:f,properties:d,patternProperties:d,additionalProperties:p,additionalItems:p,dependencies:HR(yR,r(VR(UR(o,a))))};return{compareSchemaValues:l,compareSchemaDefinitions:o}}function qR(e){return e}var JR=(e,t)=>e?JR(t%e,e):t,YR=(e,t)=>Math.abs(e*t)/JR(e,t);function XR(e,t){return e===t?e:`^(?=.*(?:${e}))(?=.*(?:${t})).*$`}function*ZR(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++)yield n(r,t[e])}}function QR(e,t){return e||t}function $R(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 ez(e){let t=new Map;for(let n of e)for(let e of n[0])t.set(e,n[1]);return t}function tz(e,t,n){n===void 0||wR(n)?delete e[t]:e[t]=n}var nz=[`properties`,`patternProperties`,`additionalProperties`];function rz(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 iz=[[],[]];function az(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 oz=[`items`,`additionalItems`],sz=[`if`,`then`,`else`];function cz(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 lz(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 uz(e,t,n){return[e,t,n]}function dz(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 fz=[uz(`minimum`,`maximum`,e=>e.maximum>=e.minimum),uz(`exclusiveMinimum`,`maximum`,e=>e.maximum>e.exclusiveMinimum),uz(`minimum`,`exclusiveMaximum`,e=>e.exclusiveMaximum>e.minimum),uz(`exclusiveMinimum`,`exclusiveMaximum`,e=>e.exclusiveMaximum>e.exclusiveMinimum),uz(`minLength`,`maxLength`,e=>e.maxLength>=e.minLength),uz(`minItems`,`maxItems`,e=>e.maxItems>=e.minItems),uz(`minProperties`,`maxProperties`,e=>e.maxProperties>=e.minProperties)];function pz({mergePatterns:e=XR,isSubRegExp:t=Object.is,intersectJson:n=DR,deduplicateJsonSchemaDef:r=qR,defaultMerger:i=qR,assigners:a=[],checks:o=fz,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;wR(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(az(e,t,a))return!1;let s=e.length<2;if(o===!1){if(s)return;if(az(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=wR(a),f=wR(c);if(d&&f)return tz(n,`properties`,v(r,o)),tz(n,`patternProperties`,i&&s?v(i,s):i??s),delete n.additionalProperties,n;tz(n,`additionalProperties`,_(a,c));let p={},m=Object.keys(r),h=m.length,[g,y]=i?rz(i):iz,[b,x]=s?rz(s):iz,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)}tz(n,`properties`,p);let O={},k=new Set;if(y.length>0&&x.length>0){let n=ZR(y,x,(n,r)=>{t(n,r)&&k.add(n),t(r,n)&&k.add(r),O[e(n,r)]=_(i[n],s[r])});for(;!n.next().done;);}return O=u(O,i,y,k,c,f),O=u(O,s,x,k,a,d),tz(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||wR(o);for(;l<c.length;l++)s.push(t?c[l]:_(c[l],o));tz(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];tz(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)=>{cz(e,t);let r=cz({},n);return e.allOf===void 0?e.allOf=[r]:e.allOf=e.allOf.concat(r),e};function m(e,t){return r(Array.from(ZR(e,t,_)))}let h=ez([[nz,d],[oz,f],[sz,p],...a]),g=dz(o);function _(e,t){if(e===!1||t===!1)return!1;if(wR(e))return wR(t)?!0:t;if(wR(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=$R(_),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=lz(e,t);if(n!==void 0)return n}else if(n||r){let i=new Set;if(n&&r)for(let n of ZR(e,t,lz))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=lz(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:QR,writeOnly:QR,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:$R((e,t)=>Array.isArray(e)?Array.isArray(t)?ER(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 ER(e,t)},multipleOf:(e,t)=>{let n=1;for(;!Number.isInteger(e)||!Number.isInteger(t);)n*=10,e*=10,t*=10;return YR(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:QR,required:ER,...s};return{mergeSchemaDefinitions:_,mergeArrayOfSchemaDefinitions:c}}function mz(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 hz(e){return t=>e(mz(t))}var gz=u(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}))(),1),_z=u(ZC(),1);function vz(e,t){if(`$id`in e&&_z.default.equal(e.$id,t))return e;for(let n of Object.values(e))if(Array.isArray(n)){for(let e of n)if(Vh(e)){let n=vz(e,t);if(n!==void 0)return n}}else if(Vh(n)){let e=vz(n,t);if(e!==void 0)return e}}function yz(e,t){let n=Q(e,`$id`,t);`$ref`in e&&(e={...e,[cR]:_z.default.resolve(n,e[cR])});for(let[t,r]of Object.entries(e))Array.isArray(r)?e={...e,[t]:r.map(e=>Vh(e)?yz(e,n):e)}:Vh(r)&&(e={...e,[t]:yz(r,n)});return e}function bz(e,t){let n=t[e];return[SS(t,[e]),n]}function xz(e,t={},n=[],r=Q(t,[`$id`])){let i=e||``,a;if(i.startsWith(`#`)){let e=decodeURIComponent(i.substring(1));r===void 0||`$id`in t&&t.$id===r?a=gz.get(t,e):t.$schema===`https://json-schema.org/draft/2020-12/schema`&&(a=vz(t,r.replace(/\/$/,``)),a!==void 0&&(a=gz.get(a,e)))}else if(t.$schema===`https://json-schema.org/draft/2020-12/schema`){let[e,...n]=(r?_z.default.resolve(r,i):i).replace(/#\/?$/,``).split(`#`);a=vz(t,e.replace(/\/$/,``)),a!==void 0&&(r=a.$id,cS(n)||(a=gz.get(a,decodeURIComponent(n.join(`#`)))))}if(a===void 0)throw Error(`Could not find a definition for ${e}.`);let o=a[cR];if(o){if(n.includes(o)){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[s,c]=bz(cR,a),l=xz(c,t,[...n,i],r);return Object.keys(s).length>0?t.$schema===`https://json-schema.org/draft/2019-09/schema`||t.$schema===`https://json-schema.org/draft/2020-12/schema`?{[ZL]:[s,l]}:{...s,...l}:l}return a}function Sz(e,t={},n=Q(t,[`$id`])){return xz(e,t,[],n)}function Cz(e){let t,n=Q(e,Vne);return Yx(n)?t=n:n!==void 0&&console.warn(`Expecting discriminator to be a string, got "${typeof n}" instead`),t}function wz(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:e==null?`null`:typeof e==`boolean`?`boolean`:isNaN(e)?typeof e==`object`?`object`:`string`:`number`}function Tz(e){let{type:t}=e;return!t&&e.const?wz(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 Ez(e,t){let n=Object.assign({},e);return Object.keys(t).reduce((n,r)=>{let i=e?e[r]:{},a=t[r];return e&&r in e&&qL(a)?n[r]=Ez(i,a):e&&t&&(Tz(e)===`object`||Tz(t)===`object`)&&r===`required`&&Array.isArray(i)&&Array.isArray(a)?n[r]=VS(i,a):n[r]=a,n},n)}function Dz(e,t,n){if(e&&n){let r=Q(e,n);if(r===void 0)return;for(let e=0;e<t.length;e++){let i=t[e],a=Q(i,[aR,n],{});if(!(a.type===`object`||a.type===`array`)&&(a.const===r||a.enum?.includes(r)))return e}}}function Oz(e,t,n,r,i){if(t===void 0)return 0;let a=Dz(t,n,i);if(fS(a))return a;for(let a=0;a<n.length;a++){let o=n[a];if(i&&qx(o,[`properties`,i])){let n=Q(t,i),s=Q(o,[aR,i],{});if(e.isValid(s,n,r))return a}else if(o.properties){let n={anyOf:Object.keys(o[aR]).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=Object.assign({},o,n);if(delete i.required,e.isValid(i,t,r))return a}else if(e.isValid(o,t,r))return a}return 0}function kz(e,t,n={},r,i,a=!1){return Hz(e,t,n,r,void 0,void 0,i,a)[0]}function Az(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)c&&typeof c!=`boolean`&&(p=p.concat(Hz(e,c,n,a,r,i,o))),l&&typeof l!=`boolean`&&(p=p.concat(Hz(e,l,n,a,r,i,o)));else{let t=d?c:l;t&&typeof t!=`boolean`&&(p=p.concat(Hz(e,t,n,a,r,i,o)))}return p.length&&(f=p.map(e=>Ez(u,e))),f.flatMap(t=>Hz(e,t,n,a,r,i,o))}function jz(e){return e.reduce((e,t)=>t.length>1?t.flatMap(t=>FS(e.length,n=>[...e[n]].concat(t))):(e.forEach(e=>e.push(t[0])),e),[[]])}function Mz(e,t){return Object.keys(e.patternProperties).filter(e=>RegExp(e).test(t)).reduce((t,n)=>(AS(t,[n],e.patternProperties[n]),t),{})}function Nz(e,t,n,r,i,a,o,s){let c=Pz(e,t,n,r,i,a,o,s);return c.length>1||c[0]!==t?c:`dependencies`in t?Wz(e,t,n,r,i,a,o).flatMap(t=>Hz(e,t,n,a,r,i,o)):`allOf`in t&&Array.isArray(t.allOf)?jz(t.allOf.map(t=>Hz(e,t,n,a,r,i,o))).map(e=>({...t,allOf:e})):[t]}function Pz(e,t,n,r,i,a,o,s){let c=Fz(t,n,i,void 0,s);return c===t?[t]:Hz(e,c,n,a,r,i,o,s)}function Fz(e,t,n,r,i){if(!qL(e))return e;let a=e;if(`$ref`in a){let{$ref:e,...i}=a;if(n.includes(e))return a;n.push(e),a={...Sz(e,t,r),...i,[lR]:e},`$id`in a&&(r=a.$id)}if(`properties`in a){let e=[],o=LS(a[aR],(a,o,s)=>{let c=[...n];a[s]=Fz(o,t,c,r,i),e.push(c)},{});hS(n,HS(Wx(e))),a={...a,[aR]:o}}if(`items`in a&&!Array.isArray(a.items)&&typeof a.items!=`boolean`&&(a={...a,items:Fz(a.items,t,n,r,i)}),i){let o,s;`anyOf`in e&&Array.isArray(e.anyOf)?(o=QL,s=a[QL]):`oneOf`in e&&Array.isArray(e.oneOf)&&(o=iR,s=a[iR]),o&&s&&(a={...a,[o]:s.map(e=>Fz(e,t,n,r,i))})}return vR(e,a)?e:a}function Iz(e,t,n,r,i){let a={...t,properties:{...t.properties}},o=r&&qL(r)?r:{};return Object.keys(o).forEach(t=>{if(!(t in a.properties)){if(`patternProperties`in a){let r=Mz(a,t);if(!cS(r)){a.properties[t]=kz(e,{[ZL]:Object.values(r)},n,Q(o,[t]),i),AS(a.properties,[t,YL],!0);return}}if(`additionalProperties`in a&&a.additionalProperties!==!1){let r;r=typeof a.additionalProperties==`boolean`?{type:wz(Q(o,[t]))}:`$ref`in a.additionalProperties?kz(e,{[cR]:Q(a.additionalProperties,[cR])},n,o,i):`type`in a.additionalProperties?{...a.additionalProperties}:`anyOf`in a.additionalProperties||`oneOf`in a.additionalProperties?{type:`object`,...a.additionalProperties}:{type:wz(Q(o,[t]))},a.properties[t]=r,AS(a.properties,[t,YL],!0)}else a.properties[t]={type:`null`},AS(a.properties,[t,YL],!0)}}),a}var{compareSchemaDefinitions:Lz,compareSchemaValues:Rz}=KR(),{mergeArrayOfSchemaDefinitions:zz}=pz({intersectJson:jR(Rz),deduplicateJsonSchemaDef:AR(Lz)}),Bz=hz(zz);function Vz(e){return Bz(e)}function Hz(e,t,n,r,i=!1,a=[],o,s){return qL(t)?Nz(e,t,n,i,a,r,o,s).flatMap(t=>{var s;let c=t;if(`if`in c)return Az(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=[];(s=c.allOf)==null||s.forEach(n=>{typeof n==`object`&&n.contains?e.push(n):t.push(n)}),e.length&&(c={...c,allOf:t}),c=o?o(c):Vz(c),e.length&&(c.allOf=e)}catch(e){console.warn(`could not merge subschemas in allOf:
|
|
62
|
+
`,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=Mz(t,i);return cS(a)||(t.properties[i]=kz(e,{allOf:[t.properties[i],...Object.values(a)]},n,Q(r,[i]),o)),t},{...c,properties:{...c.properties}})),`patternProperties`in c||`additionalProperties`in c&&c.additionalProperties!==!1?Iz(e,c,n,r,o):c}):[{}]}function Uz(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=Cz(t);a=a.map(e=>Fz(e,n,[]));let l=Oz(e,o,a,n,s);if(r)return a.map(e=>Ez(c,e));t=Ez(c,a[l])}return[t]}function Wz(e,t,n,r,i,a,o){let{dependencies:s,...c}=t;return Uz(e,c,n,r,a).flatMap(t=>Gz(e,s,t,n,r,i,a,o))}function Gz(e,t,n,r,i,a,o,s){let c=[n];for(let l in t){if(!i&&Q(o,[l])===void 0||n.properties&&!(l in n.properties))continue;let[u,d]=bz(l,t);return Array.isArray(d)?c[0]=Kz(n,d):qL(d)&&(c=qz(e,n,r,l,d,i,a,o,s)),c.flatMap(t=>Gz(e,u,t,r,i,a,o,s))}return c}function Kz(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 qz(e,t,n,r,i,a,o,s,c){return Hz(e,i,n,s,a,o,c).flatMap(i=>{let{oneOf:l,...u}=i;return t=Ez(t,u),l===void 0?t:jz(l.map(t=>typeof t==`boolean`||!(`$ref`in t)?[t]:Pz(e,t,n,a,o,s))).flatMap(i=>Jz(e,t,n,r,i,a,o,s,c))})}function Jz(e,t,n,r,i,a,o,s,c){let l=i.filter(t=>{if(typeof t==`boolean`||!t||!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]=bz(r,l.properties);return Hz(e,{...l,properties:u},n,s,a,o,c).map(e=>Ez(t,e))})}function Yz(e,t,n,r,i,a={},o){if(Array.isArray(n[i])){let s=Cz(n)||r,c=n[i].map(n=>kz(e,n,t,a,o)),l=Q(a,s);if(l!==void 0)return c.find(e=>lS(Q(e,[aR,s,eR],Q(e,[aR,s,$L])),l))}}function Xz(e,t,n,r,i){let a=n;if(qx(n,`$ref`)&&(a=kz(e,n,t,void 0,i)),cS(r))return a;let[o,...s]=Array.isArray(r)?r:r.split(`.`);if(o&&qx(a,o))return a=Q(a,o),Xz(e,t,a,s,i)}function Zz(e,t,n,r,i,a){let o=Xz(e,t,n,r,a);return o===void 0?i:o}var Qz={title:`!@#$_UNKNOWN_$#@!`};function $z(e,t,n,r,i={},a){let o=Array.isArray(r)?[...r]:r.split(`.`),s=n,c=o.pop();o.length&&o.forEach(n=>{s=Zz(e,t,s,[aR,n],{},a),qx(s,`oneOf`)?s=Yz(e,t,s,c,iR,Q(i,n),a):qx(s,`anyOf`)&&(s=Yz(e,t,s,c,QL,Q(i,n),a))}),qx(s,`oneOf`)?s=Yz(e,t,s,c,iR,i,a):qx(s,`anyOf`)&&(s=Yz(e,t,s,c,QL,i,a));let l=Zz(e,t,s,[aR,c],Qz,a);l===Qz&&(l=void 0);let u=Zz(e,t,s,Bne,[],a),d;return l&&Array.isArray(u)&&(d=u.includes(c)),{field:l,isRequired:d}}var eB={type:`object`,$id:zne,properties:{__not_really_there__:{type:`number`}}};function tB(e,t,n,r,i){let a=0;return n&&(Vh(n.properties)?a+=kS(n.properties,(n,a,o)=>{let s=Q(r,o);if(typeof a==`boolean`)return n;if(qx(a,`$ref`)){let r=kz(e,a,t,s,i);return n+tB(e,t,r,s||{},i)}if((qx(a,`oneOf`)||qx(a,`anyOf`))&&s){let r=qx(a,`oneOf`)?iR:QL,o=Cz(a);return n+nB(e,t,s,Q(a,r),-1,o,i)}if(a.type===`object`)return Vh(s)&&(n+=1),n+tB(e,t,a,s,i);if(a.type===wz(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):Yx(n.type)&&n.type===wz(r)&&(a+=1)),a}function nB(e,t,n,r,i=-1,a,o){let s=r.map(e=>Fz(e,t,[])),c=Dz(n,r,a);if(fS(c))return c;let l=s.reduce((r,i,o)=>(Oz(e,n,[eB,i],t,a)===1&&r.push(o),r),[]);if(l.length===1)return l[0];l.length||FS(s.length,e=>l.push(e));let u=new Set,{bestIndex:d}=l.reduce((r,i)=>{let{bestScore:a}=r,c=s[i],l=tB(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 rB(e){return Array.isArray(e.items)&&e.items.length>0&&e.items.every(e=>qL(e))}function iB(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:iB(a[o],t[o],n,r,i));return(n||i)&&c.length<s.length&&c.push(...s.slice(c.length)),c}if(qL(t)){let a=Object.assign({},e);return Object.keys(t).reduce((a,o)=>{let s=Q(t,o),c=qL(e)&&o in e,l=o in t,u=Q(e,o)??{},d=c&&Object.entries(u).some(([,e])=>qL(e)),f=c&&qL(Q(e,o)),p=l&&qL(s);return f&&p&&!d?(a[o]={...Q(e,o),...s},a):(a[o]=iB(Q(e,o),s,n,r,i&&(c||!l)),a)},a)}return r&&(e!==void 0&&pS(t)||typeof t==`number`&&isNaN(t))||i&&!pS(t)?e:t}function aB(e,t,n=!1){return Object.keys(t).reduce((r,i)=>{let a=e?e[i]:{},o=t[i];if(e&&i in e&&qL(o))r[i]=aB(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},Object.assign({},e))}function oB(e){return Array.isArray(e.enum)&&e.enum.length===1||`const`in e}function sB(e,t,n={},r){let i=kz(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`&&oB(e)):!1}function cB(e,t,n,r){return!t.uniqueItems||!t.items||typeof t.items==`boolean`?!1:sB(e,t.items,n,r)}function lB(e){let t=e[$L],n=Tz(e);return qL(t)&&Yx(t?.$data)&&n!==`object`&&n!==`array`}function uB(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 dB(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 fB(e,t){if(e.enum){let n,r;if(t){let{enumNames:e,enumOrder:i}=hR(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=dB(i,r)),i}let n,r;e.anyOf?(n=e.anyOf,r=t?.anyOf):e.oneOf&&(n=e.oneOf,r=t?.oneOf);let i=Cz(e);if(t){let{optionsSchemaSelector:e=i}=hR(t);i=e}return n&&n.map((e,t)=>{let{title:n}=hR(r?.[t]),a=e,o,s=n;if(i){let e=Q(a,[`properties`,i],{});o=Q(e,`default`,Q(e,`const`)),s=s||e?.title||a.title||String(o)}else o=uB(a),s=s||a.title||String(o);return{schema:a,label:s,value:o}})}var pB=[`string`,`number`,`integer`,`boolean`,`null`],mB;(function(e){e[e.Ignore=0]=`Ignore`,e[e.Invert=1]=`Invert`,e[e.Fallback=2]=`Fallback`})(mB||={});function hB(e,t=mB.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!==mB.Ignore&&qL(e.additionalItems)?e.additionalItems:{}}function gB(e,t){let{default:n,type:r}=e;return Array.isArray(r)&&r.includes(`null`)&&cS(t)&&n===null?null:t}function _B(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||!qL(n)||!cS(n))&&(e[t]=n);else if(l!==`skipDefaults`){let r=i===void 0?a.includes(t):i;qL(n)?l===`skipEmptyDefaults`?cS(n)||(e[t]=n):(!cS(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 vB(e,t,n={}){let{parentDefaults:r,rawFormData:i,rootSchema:a={},includeUndefinedValues:o=!1,_recurseList:s=[],experimental_defaultFormStateBehavior:c=void 0,experimental_customMergeAllOf:l=void 0,required:u,shouldMergeDefaultsIntoFormData:d=!1,initialDefaultsGenerated:f}=n,p=qL(i)?i:{},m=qL(t)?t:{},h=r,g=null,_=c,v=s;if(m.const!==void 0&&c?.constAsDefaults!==`never`&&!lB(m))h=m[$L];else if(qL(h)&&qL(m.default)&&!m.anyOf&&!m.oneOf&&!m.$ref)h=aB(h,m.default);else if(`default`in m&&!m.anyOf&&!m.oneOf&&!m.$ref)h=m.default;else if(`$ref`in m){let e=m[cR];s.includes(e)||(v=s.concat(e),g=Sz(e,a));let t=i===void 0||qL(i)&&cS(i);g&&!h&&t&&(h=m.default),d&&g&&!qL(i)&&(p=i)}else if(`dependencies`in m)g=Wz(e,m,a,!1,[],{...SB(e,m,n,h),...p},l)[0];else if(rB(m))h=m.items.map((t,n)=>vB(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=Cz(m),{type:o=`null`}=n;!Array.isArray(o)&&pB.includes(o)&&_?.constAsDefaults===`skipOneOf`&&(_={..._,constAsDefaults:`never`}),g=t[nB(e,a,i??m.default,t,0,r,l)],g=Ez(n,g)}else if(`anyOf`in m){let{anyOf:t,...n}=m;if(t.length===0)return;let r=Cz(m);g=t[nB(e,a,i??m.default,t,0,r,l)],g=Ez(n,g)}if(g)return vB(e,g,{rootSchema:a,includeUndefinedValues:o,_recurseList:v,experimental_defaultFormStateBehavior:_,experimental_customMergeAllOf:l,parentDefaults:h,rawFormData:i??p,required:u,shouldMergeDefaultsIntoFormData:d,initialDefaultsGenerated:f});h===void 0&&(h=m.default);let y=SB(e,m,n,h)??h;if(d){let{arrayMinItems:t={}}=c||{},{mergeExtraDefaults:n}=t,r=yB(e,m,a,i,c,l);(!qL(i)||`allOf`in m)&&(y=iB(y,r,n,!0))}return y}function yB(e,t,n,r,i,a){let o=!oB(t)&&sB(e,t,n,a),s=r;return o&&(s=fB(t)?.some(e=>vR(e.value,r))?r:void 0),t.const&&i?.constAsDefaults===`always`&&(s=t.const),s}function bB(e,t,{rawFormData:n,rootSchema:r={},includeUndefinedValues:i=!1,_recurseList:a=[],experimental_defaultFormStateBehavior:o=void 0,experimental_customMergeAllOf:s=void 0,required:c,shouldMergeDefaultsIntoFormData:l,initialDefaultsGenerated:u}={},d){{let f=qL(n)?n:{},p=t,m=o?.allOf===`populateDefaults`&&`allOf`in p||o?.emptyObjectFields!==`skipEmptyDefaults`&&`if`in p?kz(e,p,r,f,s):p,h=m[$L],g=Object.keys(m.properties||{}).reduce((t,n)=>{let p=Q(m,[aR,n],{}),g=qL(h)&&h[n]!==void 0,_=(qL(p)&&`const`in p||g)&&o?.constAsDefaults!==`never`&&!lB(p);return _B(t,n,vB(e,p,{rootSchema:r,_recurseList:a,experimental_defaultFormStateBehavior:o,experimental_customMergeAllOf:s,includeUndefinedValues:i===!0,parentDefaults:Q(d,[n]),rawFormData:Q(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=qL(m.additionalProperties)?m.additionalProperties:{},n=new Set;qL(d)&&Object.keys(d).filter(e=>!m.properties||!m.properties[e]).forEach(e=>n.add(e));let p=[];Object.keys(f).filter(e=>!m.properties||!m.properties[e]).forEach(e=>{n.add(e),p.push(e)}),n.forEach(n=>{_B(g,n,vB(e,t,{rootSchema:r,_recurseList:a,experimental_defaultFormStateBehavior:o,experimental_customMergeAllOf:s,includeUndefinedValues:i===!0,parentDefaults:Q(d,[n]),rawFormData:Q(f,[n]),required:m.required?.includes(n),shouldMergeDefaultsIntoFormData:l,initialDefaultsGenerated:u}),i,c,p)})}return gB(t,g)}}function xB(e,t,{rawFormData:n,rootSchema:r={},_recurseList:i=[],experimental_defaultFormStateBehavior:a=void 0,experimental_customMergeAllOf:o=void 0,required:s,requiredAsRoot:c=!1,shouldMergeDefaultsIntoFormData:l,initialDefaultsGenerated:u}={},d){let f=t,p=a?.arrayMinItems??{},{populate:m,mergeExtraDefaults:h}=p,g=m===`never`,_=m===`requiredOnly`,v=m===`all`||!g&&!_,y=p?.computeSkipPopulate??(()=>!1),b=a?.emptyObjectFields===`skipEmptyDefaults`?void 0:[];if(Array.isArray(d)&&(d=d.map((t,c)=>vB(e,hB(f,mB.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=hB(f);if(g)d=n;else{let c=n.map((n,c)=>vB(e,t,{rootSchema:r,_recurseList:i,experimental_defaultFormStateBehavior:a,experimental_customMergeAllOf:o,rawFormData:n,parentDefaults:Q(d,[c]),required:s,shouldMergeDefaultsIntoFormData:l,initialDefaultsGenerated:u}));d=iB(d,c,(_&&s||v)&&h)}}if((qL(f)&&`const`in f&&a?.constAsDefaults!==`never`)===!1){if(g)return d??b;if(_&&!s)return d||void 0}let x,S=Array.isArray(d)?d.length:0;if(!f.minItems||cB(e,f,r,o)||y(e,f,r)||f.minItems<=S)x=d||!s&&!c?d:b;else{let t=d||[],n=hB(f,mB.Invert),c=n.default,u=Array.from({length:f.minItems-S},()=>vB(e,n,{parentDefaults:c,rootSchema:r,_recurseList:i,experimental_defaultFormStateBehavior:a,experimental_customMergeAllOf:o,required:s,shouldMergeDefaultsIntoFormData:l}));x=t.concat(u)}return gB(t,x)}function SB(e,t,n={},r){switch(Tz(t)){case`object`:return bB(e,t,n,r);case`array`:return xB(e,t,n,r)}}function CB(e,t,n,r,i=!1,a,o,s){if(!qL(t))throw Error(`Invalid schema: `+t);let c=kz(e,t,r,n,o),l=vB(e,c,{rootSchema:r,includeUndefinedValues:i,experimental_defaultFormStateBehavior:a,experimental_customMergeAllOf:o,rawFormData:n,shouldMergeDefaultsIntoFormData:!0,initialDefaultsGenerated:s,requiredAsRoot:!0});if(c.type!==`object`&&qL(c.default))return{...l,...n};if(qL(n)||Array.isArray(n)){let{mergeDefaultsIntoFormData:e}=a||{};return iB(l,n,!0,e===`useDefaultIfFormDataUndefined`,!0)}return l}function wB(e={}){return`widget`in hR(e)&&hR(e).widget!==`hidden`}function TB(e,t,n={},r,i){if(n[`ui:widget`]===`files`)return!0;if(t.items){let n=kz(e,t.items,r,void 0,i);return n.type===`string`&&n.format===`data-url`}return!1}function EB(e,t,n={},r,i,a){let{label:o=!0}=hR(n,i),s=!!o;if(s){let i=Tz(t),o=Q(t,YL,!1);i===`array`&&(s=o||cB(e,t,r,a)||TB(e,t,n,r,a)||wB(n)),i===`object`&&(s=o),i===`boolean`&&n&&!n[`ui:widget`]&&(s=!1),n&&n[`ui:field`]&&(s=!1)}return s}function DB(e,t,n,r,i,a=[],o){if(`$ref`in t||`dependencies`in t||`allOf`in t||`if`in t){let s=kz(e,t,r,i,o);if(a.findIndex(e=>vR(e,s))===-1)return DB(e,s,n,r,i,a.concat(s),o)}let s={[rR]:n.replace(/^\./,``)};if(`oneOf`in t||`anyOf`in t){let c=`oneOf`in t?t.oneOf:t.anyOf,l=c[nB(e,r,i,c,0,Cz(t),o)];s={...s,...DB(e,l,n,r,i,a,o)}}if(`additionalProperties`in t&&t.additionalProperties!==!1){AS(s,dR,!0);let c=Vh(t.additionalProperties)?t[XL]:{},l=Q(t,aR,{});for(let t of Object.keys(i??{}))t in l||(s[t]=DB(e,c,`${n}.${t}`,r,Q(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]=DB(e,c[i],`${n}.${i}`,r,t,a,o):l?s[i]=DB(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]=DB(e,c,`${n}.${i}`,r,t,a,o)})}else if(`properties`in t)for(let c in t.properties){let l=Q(t,[aR,c],{});s[c]=DB(e,l,`${n}.${c}`,r,Q(i,[c]),a,o)}return s}function OB(e,t,n=``,r,i,a){return DB(e,t,n,r,i,void 0,a)}function kB(e,t){if(t.length===0&&typeof e!=`object`)return e;let n=DS(e,t);return Array.isArray(e)?Object.keys(n).map(e=>n[e]):n}function AB(e,t){let n=(e,t)=>typeof e!=`object`||cS(e)||t&&!cS(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.__rjsf_additionalProperties&&c.$name!==``?i.push(c[rR]):r(c,i,e)}else s===`$name`&&c!==``&&a.forEach(e=>{let r=Q(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 jB(e,t,n={},r){return kB(r,AB(OB(e,kz(e,t,n,r),``,n,r),r).map(e=>Array.isArray(e)?e.join(`.`):e))}var MB=Symbol(`no Value`);function NB(e,t,n,r,i={},a){let o;if(qx(n,`properties`)){let s={};if(qx(r,`properties`)){let e=Q(r,aR,{});Object.keys(e).forEach(e=>{qx(i,e)&&(s[e]=void 0)})}let c=Object.keys(Q(n,aR,{})),l={};c.forEach(o=>{let c=Q(i,o),u=Q(r,[aR,o],{}),d=Q(n,[aR,o],{});qx(u,`$ref`)&&(u=kz(e,u,t,c,a)),qx(d,`$ref`)&&(d=kz(e,d,t,c,a));let f=Q(u,`type`),p=Q(d,`type`);if(!f||f===p)if(qx(s,o)&&delete s[o],p===`object`||p===`array`&&Array.isArray(c)){let n=NB(e,t,d,u,c,a);(n!==void 0||p===`array`)&&(l[o]=n)}else{let e=Q(d,`default`,MB),t=Q(u,`default`,MB);e!==MB&&e!==c&&(t===c?s[o]=e:Q(d,`readOnly`)===!0&&(s[o]=void 0));let n=Q(d,`const`,MB),r=Q(u,`const`,MB);n!==MB&&n!==c&&(s[o]=r===c?n:void 0)}}),o={...typeof i==`string`||Array.isArray(i)?void 0:i,...s,...l}}else if(Q(r,`type`)===`array`&&Q(n,`type`)===`array`&&Array.isArray(i)){let s=Q(r,`items`),c=Q(n,`items`);if(typeof s==`object`&&typeof c==`object`&&!Array.isArray(s)&&!Array.isArray(c)){qx(s,`$ref`)&&(s=kz(e,s,t,i,a)),qx(c,`$ref`)&&(c=kz(e,c,t,i,a));let r=Q(s,`type`),l=Q(c,`type`);if(!r||r===l){let r=Q(n,`maxItems`,-1);o=l===`object`?i.reduce((n,i)=>{let o=NB(e,t,c,s,i,a);return o!==void 0&&(r<0||n.length<r)&&n.push(o),n},[]):r>0&&i.length>r?i.slice(0,r):i}}else typeof s==`boolean`&&typeof c==`boolean`&&s===c&&(o=i)}return o}var PB=class{constructor(e,t,n,r){t&&t.$schema===`https://json-schema.org/draft/2020-12/schema`?this.rootSchema=yz(t,Q(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||!vR(this.rootSchema,t)||!vR(this.experimental_defaultFormStateBehavior,n)||this.experimental_customMergeAllOf!==r}findFieldInSchema(e,t,n){return $z(this.validator,this.rootSchema,e,t,n,this.experimental_customMergeAllOf)}findSelectedOptionInXxxOf(e,t,n,r){return Yz(this.validator,this.rootSchema,e,t,n,r,this.experimental_customMergeAllOf)}getDefaultFormState(e,t,n=!1,r){return CB(this.validator,e,t,this.rootSchema,n,this.experimental_defaultFormStateBehavior,this.experimental_customMergeAllOf,r)}getDisplayLabel(e,t,n){return EB(this.validator,e,t,this.rootSchema,n,this.experimental_customMergeAllOf)}getClosestMatchingOption(e,t,n,r){return nB(this.validator,this.rootSchema,e,t,n,r,this.experimental_customMergeAllOf)}getFirstMatchingOption(e,t,n){return Oz(this.validator,e,t,this.rootSchema,n)}getFromSchema(e,t,n){return Zz(this.validator,this.rootSchema,e,t,n,this.experimental_customMergeAllOf)}isFilesArray(e,t){return TB(this.validator,e,t,this.rootSchema,this.experimental_customMergeAllOf)}isMultiSelect(e){return cB(this.validator,e,this.rootSchema,this.experimental_customMergeAllOf)}isSelect(e){return sB(this.validator,e,this.rootSchema,this.experimental_customMergeAllOf)}omitExtraData(e,t){return jB(this.validator,e,this.rootSchema,t)}retrieveSchema(e,t,n){return kz(this.validator,e,this.rootSchema,t,this.experimental_customMergeAllOf,n)}sanitizeDataForNewSchema(e,t,n){return NB(this.validator,this.rootSchema,e,t,n,this.experimental_customMergeAllOf)}toPathSchema(e,t,n){return OB(this.validator,e,t,this.rootSchema,n,this.experimental_customMergeAllOf)}};function FB(e,t,n={},r){return new PB(e,t,n,r)}function IB(e){if(e.indexOf(`data:`)===-1)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++)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 LB(e,t){let n=String(e);for(;n.length<t;)n=`0`+n;return n}function RB(e,t){if(e<=0&&t<=0)e=new Date().getFullYear()+e,t=new Date().getFullYear()+t;else if(e<0||t<0)throw Error(`Both start (${e}) and stop (${t}) must both be <= 0 or > 0, got one of each`);if(e>t)return RB(t,e).reverse();let n=[];for(let r=e;r<=t;r++)n.push({value:r,label:LB(r,2)});return n}function zB(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++){let i=n[r];if(!Object.prototype.hasOwnProperty.call(t,i)||!Object.is(e[i],t[i]))return!1}return!0}function BB(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 VB(e,t){return BB(e,t)}function HB(e,t=[],n){if(Array.isArray(e))return e.map(e=>HB(e,t)).filter(e=>e!==n);let r=t[e===``||e===null?-1:Number(e)];return r?r.value:n}function UB(e,t,n=[]){let r=HB(e,n);return Array.isArray(t)?t.filter(e=>!vR(e,r)):vR(r,t)?void 0:t}function WB(e,t){return Array.isArray(t)?t.some(t=>vR(t,e)):vR(t,e)}function GB(e,t=[],n=!1){let r=t.map((t,n)=>WB(t.value,e)?String(n):void 0).filter(e=>e!==void 0);return n?r:r[0]}function KB(e,t,n=[]){let r=HB(e,n);if(!pS(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}var qB=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`?Q(this.errorSchema,e):this.errorSchema;return!t&&e&&(t={},jS(this.errorSchema,e,t,Object)),t}resetAllErrors(e){return this.errorSchema=e?wb(e):{},this}addErrors(e,t){let n=this.getOrCreateErrorBlock(t),r=Q(n,tR);return Array.isArray(r)||(r=[],n[tR]=r),Array.isArray(e)?AS(n,tR,[...new Set([...r,...e])]):AS(n,tR,[...new Set([...r,e])]),this}setErrors(e,t){return AS(this.getOrCreateErrorBlock(t),tR,Array.isArray(e)?[...new Set([...e])]:[e]),this}clearErrors(e){return AS(this.getOrCreateErrorBlock(e),tR,[]),this}};function JB(e,t){let n=Ov(e),r=Ov(t);if(e===t||!n&&!r)return[];if(n&&!r)return D_(e);if(!n&&r)return D_(t);{let n=D_(TS(e,(e,n)=>!vR(e,Q(t,n)))),r=zx(D_(t),D_(e));return[...n,...r]}}function YB(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 XB(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 ZB(e,t,n={},r=!0){let i={type:t||`text`,...XB(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))),n.autocomplete&&(i.autoComplete=n.autocomplete),n.accept&&(i.accept=n.accept),i}var QB={props:{disabled:!1},submitText:`Submit`,norender:!1};function $B(e={}){let t=hR(e);if(t&&t.submitButtonOptions){let e=t[sR];return{...QB,...e}}return QB}function eV(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 tV(){if(typeof process>`u`||Q(process,`env.NODE_ENV`)!==`test`)return{};let e=new Map;return new Proxy({},{get(t,n){return e.has(n)||e.set(n,WS(`test-id-`)),e.get(n)}})}var nV=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}})),rV=u(s(((e,t)=>{t.exports=nV()}))(),1),iV={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 aV(e){let t=Q(e,`MergedWidget`);if(!t){let n=e.defaultProps&&e.defaultProps.options||{};t=({options:t,...r})=>(0,G.jsx)(e,{options:{...n,...t},...r}),AS(e,`MergedWidget`,t)}return t}function oV(e,t,n={}){let r=Tz(e);if(typeof t==`function`||t&&rV.isForwardRef((0,b.createElement)(t))||rV.isMemo(t))return aV(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 oV(e,r,n)}if(typeof r==`string`){if(!(r in iV))throw Error(`No widget for type '${r}' in schema: ${JSON.stringify(e)}`);if(t in iV[r]){let i=n[iV[r][t]];return oV(e,i,n)}}throw Error(`No widget '${t}' for type '${r}' in schema: ${JSON.stringify(e)}`)}function sV(e){let t=0;for(let n=0;n<e.length;n+=1){let r=e.charCodeAt(n);t=(t<<5)-t+r,t&=t}return t.toString(16)}function cV(e){let t=new Set;return JSON.stringify(e,(e,n)=>(t.add(e),n)),JSON.stringify(e,Array.from(t).sort())}function lV(e){return sV(cV(e))}function uV(e){return lV(e)}function dV(e,t,n={}){try{return oV(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 fV(e,t){return`${Yx(e)?e:e.$id}__${t}`}function pV(e){return fV(e,`description`)}function mV(e){return fV(e,`error`)}function hV(e){return fV(e,`examples`)}function gV(e){return fV(e,`help`)}function _V(e){return fV(e,`title`)}function vV(e,t=!1){let n=t?` ${hV(e)}`:``;return`${mV(e)} ${pV(e)} ${gV(e)}${n}`}function yV(e,t){return`${e}-${t}`}function bV(e,t){return fV(e,t)}function xV(e,t){return fV(e,`optional${t}`)}function SV(e){return!pS(e)&&(!Vh(e)||Array.isArray(e)||!cS(e))}function CV(e,t){let{rootSchema:n,schemaUtils:r}=e;return lS(t,n)?!0:`$ref`in n?lS(t,SS(r.retrieveSchema(n),lR)):!1}function wV(e,t,n){return t?n:e}function TV(e){return e?new Date(e).toJSON():void 0}function EV(e,t,n){let r=[Une];return qx(e,`formContext`)&&r.unshift(Hne),Q(e,[...r,t],n)}function DV(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 OV(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}}var kV=[nR,XL],AV=[iR,QL,ZL];function jV(e,t,n,r=new Set){let{rootSchema:i,uiSchemaDefinitions:a}=n,o={...t},s=e,c=e[cR],l=c&&r.has(c);if(c){if(r.add(c),a&&c in a&&(o=aB(a[c],o)),l)return o;try{s=Sz(c,i)}catch{s=e}}let u=s[aR];if(u&&qL(u))for(let[e,t]of Object.entries(u)){let i=jV(t,o[e]||{},n,new Set(r));Object.keys(i).length>0&&(o[e]=i)}for(let e of kV){let t=s[e];if(t&&qL(t)&&!Array.isArray(t)){let i=o[e];if(typeof i!=`function`){let a=jV(t,i||{},n,new Set(r));Object.keys(a).length>0&&(o[e]=a)}}}for(let e of AV){let t=s[e];if(Array.isArray(t)&&t.length>0){let i=o[e],a=Array.isArray(i)?[...i]:[],s=!1;for(let e=0;e<t.length;e++){let i=t[e],o=jV(i,a[e]||{},n,new Set(r));Object.keys(o).length>0&&(a[e]=o,s=!0)}s&&(o[e]=a)}}return o}function MV(e,t,n){let r=e.__rjsf_ref??e[cR],i=r?n.uiSchemaDefinitions?.[r]:void 0;return i?!t||Object.keys(t).length===0?{...i}:aB(i,t):t||{}}function NV(e){return e.const||e.enum&&e.enum.length===1&&e.enum[0]===!0?!0:e.anyOf&&e.anyOf.length===1?NV(e.anyOf[0]):e.oneOf&&e.oneOf.length===1?NV(e.oneOf[0]):e.allOf?e.allOf.some(e=>NV(e)):!1}function PV(e,t,n,r=`customDeep`){if(r===`always`)return!0;if(r===`shallow`){let{props:r,state:i}=e;return!zB(r,t)||!zB(i,n)}let{props:i,state:a}=e;return!vR(i,t)||!vR(a,n)}function FV(e){let t=HS(e.map(e=>Vh(e)?Tz(e):void 0).flat().filter(e=>e!==void 0));return t.length===1?t[0]:t}function IV(e,t,n,r){let{enableOptionalDataFieldForType:i=[]}=hR(r,e.globalUiOptions),a;return a=`anyOf`in t&&Array.isArray(t.anyOf)?FV(t[QL]):`oneOf`in t&&Array.isArray(t.oneOf)?FV(t[iR]):Tz(t),!CV(e,t)&&!n&&!!a&&!Array.isArray(a)&&!!i.find(e=>e===a)}function LV(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 RV(e,t=[]){if(!e)return[];let n=[];return`__errors`in e&&(n=n.concat(e[tR].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];Ov(i)&&(n=n.concat(RV(i,[...t,r])))}return n},n)}function zV(e){let t=new qB;return e.length&&e.forEach(e=>{let{property:n,message:r}=e,i=n===`.`?[]:IS(n);i.length>0&&i[0]===``&&i.splice(0,1),r&&t.addErrors(r,i)}),t.ErrorSchema}function BV(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 VV(e){return Object.keys(e).reduce((t,n)=>{if(n===`addError`)return t;{let r=e[n];return Ov(r)?{...t,[n]:VV(r)}:{...t,[n]:r}}},{})}function HV(e){return Object.values(e).every(e=>e!==-1)}function UV(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,G.jsx)(h,{schema:{type:`integer`},id:m,name:s,className:t,options:{enumOptions:RB(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":vV(o)})}function WV(e){let{time:t=!1,disabled:n=!1,readonly:r=!1,options:i,onChange:a,value:o}=e,[s,c]=(0,b.useState)(OV(o,t));(0,b.useEffect)(()=>{c(OV(o,t))},[t,o]);let l=(0,b.useCallback)((e,n)=>{let r={...s,[e]:n===void 0?-1:n};HV(r)?a(LV(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=>{e.preventDefault(),!(n||r)&&a(LV(OV(new Date().toJSON(),t),t))},[n,r,t,a]);return{elements:(0,b.useMemo)(()=>YB(s,t,i.yearsRange,i.format),[s,t,i.yearsRange,i.format]),handleChange:l,handleClear:u,handleSetNow:d}}function GV(e){let t=(0,b.useRef)(e);return lS(e,t.current)||(t.current=e),t.current}function KV(e,t){return e.replace(`;base64`,`;name=${encodeURIComponent(t)};base64`)}function qV(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:KV(e.target.result,t),name:t,size:n,type:r}):i({dataURL:null,name:t,size:n,type:r})},o.readAsDataURL(e)})}function JV(e){return Promise.all(Array.from(e).map(qV))}function YV(e){return e.reduce((e,t)=>{if(!t)return e;try{let{blob:n,name:r}=IB(t);return[...e,{dataURL:t,name:r,size:n.size,type:n.type}]}catch{return e}},[])}function XV(e,t,n=!1){let r=(0,b.useMemo)(()=>n&&e?Array.isArray(e)?e:[e]:[],[e,n]);return{filesInfo:(0,b.useMemo)(()=>YV(Array.isArray(e)?e:[e||``]),[e]),handleChange:(0,b.useCallback)(e=>{JV(e).then(e=>{let i=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 ZV(e){if(!e)return``;let t=new Date(e);return`${LB(t.getFullYear(),4)}-${LB(t.getMonth()+1,2)}-${LB(t.getDate(),2)}T${LB(t.getHours(),2)}:${LB(t.getMinutes(),2)}:${LB(t.getSeconds(),2)}.${LB(t.getMilliseconds(),3)}`}function QV(e,t,n=!1){if(!t)return e;let{errors:r,errorSchema:i}=e,a=RV(t),o=t;return cS(i)||(o=aB(i,t,n?`preventDuplicates`:!0),a=[...r].concat(a)),{errorSchema:o,errors:a}}function $V(e){for(let t in e){let n=e,r=n[t];t===`$ref`&&typeof r==`string`&&r.startsWith(`#`)?n[t]=fR+r:n[t]=tH(r)}return e}function eH(e){for(let t=0;t<e.length;t++)e[t]=tH(e[t]);return e}function tH(e){return Array.isArray(e)?eH([...e]):Vh(e)?$V({...e}):e}var nH;(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.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.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)`})(nH||={});function rH(){return WS(`rjsf-array-item-`)}function iH(e){return Array.isArray(e)?e.map(e=>({key:rH(),item:e})):[]}function aH(e){return Array.isArray(e)?e.map(e=>e.item):[]}function oH(e){return Array.isArray(e.type)?!e.type.includes(`null`):e.type!==`null`}function sH(e,t,n,r){let{addable:i}=hR(r,e.globalUiOptions);return i!==!1&&(i=t.maxItems===void 0?!0:n.length<t.maxItems),i}function cH(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 lH(e,t){let{schemaUtils:n,globalFormOptions:r}=e,i=t.items;return r.useFallbackUiForUnsupportedType&&!i?i={}:rB(t)&&Rne(t)&&(i=t.additionalItems),n.getDefaultFormState(i)}function uH(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=fB(_.retrieveSchema(t.items,i),r?.items??r),{widget:x=`select`,title:S,...C}=hR(r,y),w=oV(t,x,g),T=S??t.title??m,E=_.getDisplayLabel(t,r,y),D=GV(BV(``,v,n,!0));return(0,G.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 dH(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}=hR(r,b),w=oV(t,x,_),T=S??t.title??h,E=v.getDisplayLabel(t,r,b),D=GV(BV(``,y,n,!0));return(0,G.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 fH(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}=hR(n,v),S=oV(t,y,h),C=b??t.title??i,w=g.getDisplayLabel(t,n,v),T=GV(BV(``,_,r,!0));return(0,G.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 pH(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,itemSchema:m,itemData:h,itemUiSchema:g,itemFieldPathId:_,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}=s,F=GV(_),I=M||N,L=eV(`ArrayFieldItemTemplate`,s,c),R=j.getDisplayLabel(m,g,P),{description:z}=hR(g),B=!!z||!!m.description,{orderable:V=!0,removable:H=!0,copyable:U=!1}=c,ee={moveUp:V&&f,moveDown:V&&p,copy:U&&u,remove:H&&d,toolbar:!1};ee.toolbar=Object.keys(ee).some(e=>ee[e]);let W=(0,b.useCallback)(e=>{D(e,n+1)},[D,n]),te=(0,b.useCallback)(e=>{O(e,n)},[O,n]),ne=(0,b.useCallback)(e=>{k(e,n)},[k,n]),re=(0,b.useCallback)(e=>{A(e,n,n-1)},[A,n]),ie=(0,b.useCallback)(e=>{A(e,n,n+1)},[A,n]);return(0,G.jsx)(L,{children:(0,G.jsx)(I,{name:r,title:E,index:n,schema:m,uiSchema:g,formData:h,errorSchema:v,fieldPathId:F,required:oH(m),onChange:C,onBlur:x,onFocus:S,registry:s,disabled:i,readonly:o,hideError:a,autofocus:y,rawErrors:w}),buttonsProps:{fieldPathId:F,disabled:i,readonly:o,canAdd:u,hasCopy:ee.copy,hasMoveUp:ee.moveUp,hasMoveDown:ee.moveDown,hasRemove:ee.remove,index:n,totalItems:T,onAddItem:W,onCopyItem:te,onRemoveItem:ne,onMoveUpItem:re,onMoveDownItem:ie,registry:s,schema:m,uiSchema:g},itemKey:t,className:`rjsf-array-item`,disabled:i,hasToolbar:ee.toolbar,index:n,totalItems:T,readonly:o,registry:s,schema:m,uiSchema:g,parentUiSchema:l,displayLabel:R,hasDescription:B})}function mH(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:b,handleRemoveItem:x,handleReorderItems:S}=e,C=t.title||s||o,{schemaUtils:w,fields:T,formContext:E,globalFormOptions:D,globalUiOptions:O}=p,{OptionalDataControlsField:k}=T,A=hR(n,O),j=Vh(t.items)?t.items:{},M=w.retrieveSchema(j),N=aH(v),P=IV(p,t,d,n),F=SV(a),I=sH(p,t,N,n)&&(!P||F),L=F?v:[],R=P?` rjsf-optional-array-field`:``,z=e.childFieldPathId??i,B=P?(0,G.jsx)(k,{...e,fieldPathId:z}):void 0,V={canAdd:I,items:L.map((e,t)=>{let{key:i,item:a}=e,s=a,T=w.retrieveSchema(j,s),O=r?r[t]:void 0,k=BV(t,D,z),M=cH(n,a,t,E);return(0,G.jsx)(pH,{itemKey:i,index:t,name:o&&`${o}-${t}`,registry:p,uiOptions:A,parentUiSchema:n,hideError:f,readonly:l,disabled:c,required:d,title:C?`${C}-${t+1}`:void 0,canAdd:I,canMoveUp:t>0,canMoveDown:t<N.length-1,itemSchema:T,itemFieldPathId:k,itemErrorSchema:O,itemData:s,itemUiSchema:M,autofocus:u&&t===0,onBlur:m,onFocus:h,rawErrors:g,totalItems:v.length,handleAddItem:y,handleCopyItem:b,handleRemoveItem:x,handleReorderItems:S,onChange:_},i)}),className:`rjsf-field rjsf-field-array rjsf-field-array-of-${M.type}${R}`,disabled:c,fieldPathId:i,uiSchema:n,onAddClick:y,readonly:l,required:d,schema:t,title:C,formData:N,rawErrors:g,registry:p,optionalDataControl:B};return(0,G.jsx)(eV(`ArrayFieldTemplate`,p,A),{...V})}function hH(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:b,handleRemoveItem:x,handleReorderItems:S}=e,{formData:C=[]}=e,w=t.title||s||o,{schemaUtils:T,fields:E,formContext:D,globalFormOptions:O,globalUiOptions:k}=p,A=hR(n,k),{OptionalDataControlsField:j}=E,M=IV(p,t,d,n),N=SV(r),P=(Vh(t.items)?t.items:[]).map((e,t)=>T.retrieveSchema(e,C[t])),F=Vh(t.additionalItems)?T.retrieveSchema(t.additionalItems,r):null,I=e.childFieldPathId??a;C.length<P.length&&(C=C.concat(Array(P.length-C.length)));let L=N?_:[],R=M?` rjsf-optional-array-field`:``,z=M?(0,G.jsx)(j,{...e,fieldPathId:I}):void 0,B=sH(p,t,C,n)&&!!F&&(!M||N),V={canAdd:B,className:`rjsf-field rjsf-field-array rjsf-field-array-fixed-items${R}`,disabled:c,fieldPathId:a,formData:r,items:L.map((e,r)=>{let{key:a,item:s}=e,E=s,k=r>=P.length,j=(k&&Vh(t.additionalItems)?T.retrieveSchema(t.additionalItems,E):P[r])||{},M=BV(r,O,I),N;N=k?n.additionalItems:Array.isArray(n.items)?n.items[r]:cH(n,s,r,D);let F=i?i[r]:void 0;return(0,G.jsx)(pH,{index:r,itemKey:a,name:o&&`${o}-${r}`,registry:p,uiOptions:A,parentUiSchema:n,hideError:f,readonly:l,disabled:c,required:d,title:w?`${w}-${r+1}`:void 0,canAdd:B,canRemove:k,canMoveUp:r>=P.length+1,canMoveDown:k&&r<C.length-1,itemSchema:j,itemData:E,itemUiSchema:N,itemFieldPathId:M,itemErrorSchema:F,autofocus:u&&r===0,onBlur:m,onFocus:h,rawErrors:g,totalItems:_.length,onChange:v,handleAddItem:y,handleCopyItem:b,handleRemoveItem:x,handleReorderItems:S},a)}),onAddClick:y,readonly:l,required:d,registry:p,schema:t,uiSchema:n,title:w,errorSchema:i,rawErrors:g,optionalDataControl:z};return(0,G.jsx)(eV(`ArrayFieldTemplate`,p,A),{...V})}function gH(e=[]){let t=(0,b.useMemo)(()=>lV(e),[e]),[n,r]=(0,b.useState)(()=>({formDataHash:t,keyedFormData:iH(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]})):iH(n),a=t,r({formDataHash:a,keyedFormData:i})}let o=(0,b.useCallback)(e=>{let t=aH(e);return r({formDataHash:lV(t),keyedFormData:e}),t},[]);return{keyedFormData:i,updateKeyedFormData:o}}function _H(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}=gH(o),p=e.childFieldPathId??i,m=(0,b.useCallback)((e,n)=>{e&&e.preventDefault();let i;if(r){i={};for(let e in r){let t=parseInt(e);n===void 0||t<n?AS(i,[t],r[e]):t>=n&&AS(i,[t+1],r[e])}}let o={key:rH(),item:lH(a,t)},c=[...d];n===void 0?c.push(o):c.splice(n,0,o),s(f(c),p.path,i)},[d,a,t,s,f,r,p]),h=(0,b.useCallback)((e,t)=>{e&&e.preventDefault();let n;if(r){n={};for(let e in r){let i=parseInt(e);i<=t?AS(n,[i],r[e]):i>t&&AS(n,[i+1],r[e])}}let i={key:rH(),item:wb(d[t].item)},a=[...d];t===void 0?a.push(i):a.splice(t+1,0,i),s(f(a),p.path,n)},[d,s,f,r,p]),g=(0,b.useCallback)((e,t)=>{e&&e.preventDefault();let n;if(r){n={};for(let e in r){let i=parseInt(e);i<t?AS(n,[i],r[e]):i>t&&AS(n,[i-1],r[e])}}s(f(d.filter((e,n)=>n!==t)),p.path,n)},[d,s,f,r,p]),_=(0,b.useCallback)((e,t,n)=>{e&&(e.preventDefault(),e.currentTarget.blur());let i;if(r){i={};for(let e in r){let a=parseInt(e);a==t?AS(i,[n],r[t]):a==n?AS(i,[t],r[n]):AS(i,[e],r[a])}}function a(){let e=d.slice();return e.splice(t,1),e.splice(n,0,d[t]),e}s(f(a()),p.path,i)},[d,s,f,r,p]),v=(0,b.useCallback)((e,t,n,r)=>{s(e===void 0?null:e,t,n,r)},[s]),y=(0,b.useCallback)(e=>{s(e,p.path,void 0,p?.$id)},[s,p]),x={...e,formData:o,fieldPathId:p,onSelectChange:y},S={...e,handleAddItem:m,handleCopyItem:h,handleRemoveItem:g,handleReorderItems:_,keyedFormData:d,onChange:v};if(!(`items`in t)){if(!c.useFallbackUiForUnsupportedType)return(0,G.jsx)(eV(`UnsupportedFieldTemplate`,a,hR(n)),{schema:t,fieldPathId:i,reason:u(nH.MissingItems),registry:a});let e={...t,[nR]:{type:void 0}};x.schema=e,S.schema=e}return l.isMultiSelect(x.schema)?(0,G.jsx)(uH,{...x}):wB(n)?(0,G.jsx)(dH,{...x}):rB(x.schema)?(0,G.jsx)(hH,{...S}):l.isFilesArray(x.schema,n)?(0,G.jsx)(fH,{...x}):(0,G.jsx)(mH,{...S})}function vH(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}=hR(r,x),D=oV(t,S,v),O=y(nH.YesLabel),k=y(nH.NoLabel),A,j=C??_??f??n;if(Array.isArray(t.oneOf))A=fB({oneOf:t.oneOf.map(e=>{if(Vh(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}]:fB({enum:e},r)}let M=(0,b.useCallback)((e,t,n)=>p(e,i.path,t,n),[p,i]);return(0,G.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 yH(e){return{type:`string`,enum:[`string`,`number`,`boolean`,`object`,`array`],default:`string`,title:e}}function bH(e){let t=typeof e;return t===`string`||t===`number`||t===`boolean`?t:t===`object`?Array.isArray(e)?`array`:`object`:`string`}function xH(e,t){switch(t){case`string`:return String(e);case`number`:{let t=Number(e);return isNaN(t)?0:t}case`boolean`:return!!e;default:return e}}function SH(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)(bH(n)),S=hR(o),C=GV(BV(`__internal_type_selector`,v,p)),w=g(nH.Type),T=(0,b.useMemo)(()=>yH(w),[w]),E=e=>{e!=null&&(x(e),m(xH(n,e),p.path,h,t))};if(!v.useFallbackUiForUnsupportedType){let{reason:t=g(nH.UnknownFieldType,[String(i.type)])}=e;return(0,G.jsx)(eV(`UnsupportedFieldTemplate`,f,S),{schema:i,fieldPathId:p,reason:t,registry:f})}let D=eV(`FallbackFieldTemplate`,f,S),{SchemaField:O}=_;return(0,G.jsx)(D,{schema:i,registry:f,typeSelector:(0,G.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?lV(n):`__empty__`),schemaField:(0,G.jsx)(O,{...e,schema:{type:y,title:g(nH.Value),...y===`object`&&{additionalProperties:!0}}})})}var CH;(function(e){e.ROW=`ui:row`,e.COLUMN=`ui:col`,e.COLUMNS=`ui:columns`,e.CONDITION=`ui:condition`})(CH||={});var wH;(function(e){e.ALL=`all`,e.SOME=`some`,e.NONE=`none`})(wH||={});var TH=/^\$lookup=(.+)/,EH=`layoutGrid`;`${EH}`;function DH(e,t){return e??t}function OH(e){return/^\d+?$/.test(e)}var kH=tV();function AH(e,t,n,r,i){let a=Q(n,[mR],{}),o=Q(n,e),s={...Q(o,[pR],{}),...t,...a},c={...o};cS(s)||AS(c,[pR],s),cS(a)||AS(c,[mR],a);let{readonly:l}=hR(c);return(i===!0||mS(l)&&r===!0)&&(l=!0,qx(s,`readonly`)?AS(c,[pR,oR],!0):AS(c,`ui:${oR}`,!0)),{fieldUiSchema:c,uiReadonly:l}}function jH(e,t,n=`$0m3tH1nG Un3xP3cT3d`){let r=yv([t]).sort(),i=yv([n]).sort();switch(e){case wH.ALL:return lS(r,i);case wH.SOME:return rS(r,i).length>0;case wH.NONE:return rS(r,i).length===0;default:return!1}}function MH(e,t,n){let r={},i=e[t];if(Ov(i)){let{children:e,className:t,...a}=i;if(i=e,t){let e=t.split(` `).map(e=>EV(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 NH(e,t,n){let r;if(OH(n)&&e&&e?.type===`array`&&qx(e,`items`)){let i=Number(n),a=e[nR];r=Array.isArray(a)?i>a.length?Bx(a):a[i]:a,t={$id:t.$id,path:[...t.path.slice(0,t.path.length-1),i]}}return{rawSchema:r,fieldPathId:t}}function PH(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=BV(e,o,c),qx(d,`properties`))s=Q(d,[aR,e],{});else if(d&&(qx(d,`oneOf`)||qx(d,`anyOf`))){let t=qx(d,`oneOf`)?iR:QL;s=Q(a.findSelectedOptionInXxxOf(d,e,t,f),[aR,e],{})}else{let t=NH(d,c,e);s=t.rawSchema??{},c=t.fieldPathId}f=Q(f,e,{}),d=a.retrieveSchema(s,f),p=DH(d.readOnly,p)});let m,h=!1;if(cS(d)&&(d=void 0),d&&u){if(d&&(qx(d,`oneOf`)||qx(d,`anyOf`))){let e=qx(d,`oneOf`)?iR:QL;d=a.findSelectedOptionInXxxOf(d,u,e,f)}c=BV(u,o,c),h=d!==void 0&&Array.isArray(d.required)&&$x(d.required,u);let e=NH(d,c,u);if(e.rawSchema?(d=e.rawSchema,c=e.fieldPathId):(d=Q(d,[aR,u]),d&&=a.retrieveSchema(d)),p=DH(d?.readOnly,p),d&&(qx(d,`oneOf`)||qx(d,`anyOf`))){let e=qx(d,`oneOf`)?iR:QL,t=Cz(d);m={options:d[e],hasDiscriminator:!!t}}}return{schema:d,isRequired:h,isReadonly:p,optionsInfo:m,fieldPathId:c}}function FH(e,t){let n=e;return Yx(n)&&(n=EV(t,n)),Zh(n)?n:null}function IH(e,t){let n,r=null,i={},a;if(Yx(t)||mS(t))n=t??``;else{let{name:o=``,render:s,...c}=t;n=o,i=c,cS(i)||Hx(i,(t,n)=>{if(Yx(t)){let r=TH.exec(t);if(Array.isArray(r)&&r.length>1){let t=r[1];i[n]=EV(e,t,t)}}}),r=FH(s,e),!o&&r&&(a=(0,G.jsx)(r,{...c,"data-testid":kH.uiComponent}))}return{name:n,UIComponent:r,uiProps:i,rendered:a}}function LH(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)(UH,{...n,key:`layoutGrid-${lV(e)}`,schema:s,layoutGridSchema:e}))}function RH(e){let{layoutGridSchema:t,...n}=e,{formData:r,registry:i}=n,{children:a,gridProps:o}=MH(t,CH.CONDITION,i),{operator:s,field:c=``,value:l}=o;return jH(s,Q(r,c,null),l)?(0,G.jsx)(LH,{...n,childrenLayoutGridSchemaId:a}):null}function zH(e){let{layoutGridSchema:t,...n}=e,{registry:r,uiSchema:i}=n,{children:a,gridProps:o}=MH(t,CH.COLUMN,r);return(0,G.jsx)(eV(`GridTemplate`,r,hR(i)),{column:!0,"data-testid":kH.col,...o,children:(0,G.jsx)(LH,{...n,childrenLayoutGridSchemaId:a})})}function BH(e){let{layoutGridSchema:t,...n}=e,{registry:r,uiSchema:i}=n,{children:a,gridProps:o}=MH(t,CH.COLUMNS,r),s=eV(`GridTemplate`,r,hR(i));return a.map(e=>(0,G.jsx)(s,{column:!0,"data-testid":kH.col,...o,children:(0,G.jsx)(LH,{...n,childrenLayoutGridSchemaId:[e]})},`column-${lV(e)}`))}function VH(e){let{layoutGridSchema:t,...n}=e,{registry:r,uiSchema:i}=n,{children:a,gridProps:o}=MH(t,CH.ROW,r);return(0,G.jsx)(eV(`GridTemplate`,r,hR(i)),{...o,"data-testid":kH.row,children:(0,G.jsx)(LH,{...n,childrenLayoutGridSchemaId:a})})}function HH(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,_=IH(u,t),{name:v,UIComponent:y,uiProps:b}=_,{schema:x,isRequired:S,isReadonly:C,optionsInfo:w,fieldPathId:T}=PH(u,v,n,c,a),E=GV(T);if(_.rendered)return _.rendered;if(x){let e=w?.hasDiscriminator?g:h,{fieldUiSchema:t,uiReadonly:n}=AH(v,b,r,C,l);return(0,G.jsx)(e,{"data-testid":w?.hasDiscriminator?kH.layoutMultiSchemaField:kH.field,...f,name:v,required:S,readonly:n,schema:x,uiSchema:t,errorSchema:Q(i,v),fieldPathId:E,formData:Q(c,v),onChange:p,onBlur:o,onFocus:s,options:w?.options,registry:u})}return y?(0,G.jsx)(y,{"data-testid":kH.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 UH(e){let{uiSchema:t}=e,{layoutGridSchema:n}=e,r=hR(t);if(!n&&`layoutGrid`in r&&Vh(r.layoutGrid)&&(n=r[EH]),Vh(n)){if(CH.ROW in n)return(0,G.jsx)(VH,{...e,layoutGridSchema:n});if(CH.COLUMN in n)return(0,G.jsx)(zH,{...e,layoutGridSchema:n});if(CH.COLUMNS in n)return(0,G.jsx)(BH,{...e,layoutGridSchema:n});if(CH.CONDITION in n)return(0,G.jsx)(RH,{...e,layoutGridSchema:n})}return(0,G.jsx)(HH,{...e,gridSchema:n})}UH.TEST_IDS=kH;function WH(e){let{fieldPathId:t,title:n,schema:r,uiSchema:i,required:a,registry:o,name:s}=e,c=hR(i,o.globalUiOptions),{title:l}=c,{title:u}=r,d=l||n||u||s;return d?(0,G.jsx)(eV(`TitleFieldTemplate`,o,c),{id:_V(t),title:d,required:a,schema:r,uiSchema:i,registry:o}):null}function GH(e,t,n){return e.map(({schema:e})=>e).find(e=>{let r=Q(e,[aR,t]);return Q(r,eR,Q(r,$L,`!@#!@$@#$!@$#`))===n})}function KH(e,t,n,r,i){let a=t.map(e=>n.retrieveSchema(e,i)),o=e;qx(e,`oneOf`)?o={...e,[iR]:a}:qx(e,`anyOf`)&&(o={...e,[QL]:a});let s=fB(o,r);if(!s)throw Error(`No enumOptions were computed from the schema ${JSON.stringify(o)}`);return s}function qH(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)(KH(f,c,y,d,i)),w=Q(a,`$id`),T=Cz(f),E=eV(`FieldErrorTemplate`,u,c),D=eV(`FieldTemplate`,u,c);(0,b.useEffect)(()=>{C(KH(f,c,y,d,i))},[lV(f),lV(c),y,d?lV(d):``,i?lV(i):``]);let{widget:O=T?`radio`:`select`,title:k=``,placeholder:A=``,optionsSchemaSelector:j=T,hideError:M,...N}=hR(d);if(!j)throw Error(`No selector field provided for the LayoutMultiSchemaField`);let P=Q(i,j),F=Q(S[0]?.schema,[aR,j],{}),I=GH(S,j,P);F=F?.type?F:{...F,type:I?.type||n};let L=oV(F,O,v),R=M===void 0?_:!!M,z=Q(g,[tR],[]),B=SS(g,[tR]),V=y.getDisplayLabel(f,d,x),H=e=>{let t=GH(S,j,e),n=GH(S,j,P),r=y.sanitizeDataForNewSchema(t,n,i);r&&t&&(r=y.getDefaultFormState(t,r,`excludeObjectChildren`)),r&&AS(r,j,e),s(r,a.path,void 0,w)},U={enumOptions:S,...N},ee=!R&&z.length>0?(0,G.jsx)(E,{fieldPathId:a,schema:f,errors:z,registry:u}):void 0;return(0,G.jsx)(D,{fieldPathId:a,id:w,schema:f,label:(k||f.title)??``,disabled:r||Array.isArray(S)&&cS(S),uiSchema:d,required:h,readonly:!!m,registry:u,displayLabel:V,errors:ee,onChange:s,onKeyRename:ag,onKeyRenameBlur:ag,onRemoveProperty:ag,children:(0,G.jsx)(L,{id:w,name:t,schema:f,label:(k||f.title)??``,disabled:r||Array.isArray(S)&&cS(S),uiSchema:d,autofocus:p,readonly:m,required:h,registry:u,multiple:!1,rawErrors:z,hideError:R,hideLabel:!V,errorSchema:B,placeholder:A,onChange:H,onBlur:o,onFocus:l,value:P,options:U,htmlName:a.name})})}var JH=class extends b.Component{constructor(e){super(e);let{formData:t,options:n,registry:{schemaUtils:r}}=this.props,i=n.map(e=>r.retrieveSchema(e,t));this.state={retrievedOptions:i,selectedOption:this.getMatchingOption(0,t,i)}}componentDidUpdate(e,t){let{formData:n,options:r,fieldPathId:i}=this.props,{selectedOption:a}=this.state,o=this.state;if(!vR(e.options,r)){let{registry:{schemaUtils:e}}=this.props;o={selectedOption:a,retrievedOptions:r.map(t=>e.retrieveSchema(t,n))}}if(!vR(n,e.formData)&&i.$id===e.fieldPathId.$id){let{retrievedOptions:e}=o,r=this.getMatchingOption(a,n,e);t&&r!==a&&(o={selectedOption:r,retrievedOptions:e})}o!==this.state&&this.setState(o)}getMatchingOption(e,t,n){let{schema:r,registry:{schemaUtils:i}}=this.props,a=Cz(r);return i.getClosestMatchingOption(t,n,e,a)}onOptionChange=e=>{let{selectedOption:t,retrievedOptions:n}=this.state,{formData:r,onChange:i,registry:a,fieldPathId:o}=this.props,{schemaUtils:s}=a,c=e===void 0?-1:parseInt(e,10);if(c===t)return;let l=c>=0?n[c]:void 0,u=t>=0?n[t]:void 0,d=s.sanitizeDataForNewSchema(l,u,r);l&&(d=s.getDefaultFormState(l,d,`excludeObjectChildren`)),this.setState({selectedOption:c},()=>{i(d,o.path,void 0,this.getFieldId())})};getFieldId(){let{fieldPathId:e,schema:t}=this.props;return`${e.$id}${t.oneOf?`__oneof_select`:`__anyof_select`}`}render(){let{name:e,disabled:t=!1,errorSchema:n={},formData:r,onBlur:i,onFocus:a,readonly:o,required:s=!1,registry:c,schema:l,uiSchema:u}=this.props,{widgets:d,fields:f,translateString:p,globalUiOptions:m,schemaUtils:h}=c,{SchemaField:g}=f,_=eV(`MultiSchemaFieldTemplate`,c,m),v=IV(c,l,s,u),y=SV(r),{selectedOption:b,retrievedOptions:x}=this.state,{widget:S=`select`,placeholder:C,autofocus:w,autocomplete:T,title:E=l.title,...D}=hR(u,m),O=oV({type:`number`},S,d),k=Q(n,tR,[]),A=SS(n,[tR]),j=h.getDisplayLabel(l,u,m),M=b>=0&&x[b]||null,N;if(M){let{required:e}=l;N=e?Ez({required:e},M):M}let P=[];`oneOf`in l&&u&&`oneOf`in u?Array.isArray(u.oneOf)?P=u[iR]:console.warn(`uiSchema.oneOf is not an array for "${E||e}"`):`anyOf`in l&&u&&`anyOf`in u&&(Array.isArray(u.anyOf)?P=u[QL]:console.warn(`uiSchema.anyOf is not an array for "${E||e}"`));let F=u;b>=0&&P.length>b&&(F=P[b]);let I=E?nH.TitleOptionPrefix:nH.OptionPrefix,L=E?[E]:[],R=x.map((e,t)=>{let{title:n=e.title}=hR(P[t]);return{label:n||p(I,L.concat(String(t+1))),value:t}});return(0,G.jsx)(_,{schema:l,registry:c,uiSchema:u,selector:!v||y?(0,G.jsx)(O,{id:this.getFieldId(),name:`${e}${l.oneOf?`__oneof_select`:`__anyof_select`}`,schema:{type:`number`,default:0},onChange:this.onOptionChange,onBlur:i,onFocus:a,disabled:t||cS(R),multiple:!1,rawErrors:k,errorSchema:A,value:b>=0?b:void 0,options:{enumOptions:R,...D},registry:c,placeholder:C,autocomplete:T,autofocus:w,label:E??e,hideLabel:!j,readonly:o}):void 0,optionSchemaField:N&&N.type!==`null`&&(0,G.jsx)(g,{...this.props,schema:N,uiSchema:F})||null})}},YH=/\.([0-9]*0)*$/,XH=/[0.]0*$/;function ZH(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),`${e}`.charAt(0)===`.`&&(e=`0${e}`),n(typeof e==`string`&&e.match(YH)?JL(e.replace(XH,``)):JL(e),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,G.jsx)(s,{...e,formData:c,onChange:l})}function QH(){return QH=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},QH.apply(null,arguments)}var $H=[`strong`,`em`,`del`,`mark`],eU=[[`**`,$H[0]],[`__`,$H[0]],[`~~`,$H[2]],[`==`,$H[3]],[`*`,`em`],[`_`,`em`]];function tU(e,t){for(var n=1,r=t+1;r<e.length&&n>0;)e[r]===`\\`?r+=2:(e[r]===`[`&&n++,e[r]===`]`&&n--,r++);if(n===0&&r<e.length&&(e[r]===`(`||e[r]===`[`)){var i=e[r]===`(`?`)`:`]`,a=1;for(r++;r<e.length&&a>0;)e[r]===`\\`?r+=2:(e[r]===`(`&&i===`)`&&a++,e[r]===i&&a--,r++);if(a===0)return r}return-1}function nU(e,t){if(!t||!t.inline&&!t.simple)return null;var n=e[0];if(n!==`*`&&n!==`_`&&n!==`~`&&n!==`=`)return null;for(var r=``,i=0,a=``,o=0;o<6;o++){var s=eU[o][0];if(e.startsWith(s)&&e.length>=2*s.length){r=s,i=s.length,a=eU[o][1];break}}if(!r)return null;for(var c=i,l=!1,u=!1,d=``,f=0,p=``,m=!1,h=``;c<e.length;){var g=e[c];if(m)p+=g,m=!1,h=g,c++;else if(g!==`\\`)if(g!=="`"||f!==0){if(g===`[`&&!l&&f===0){var _=tU(e,c);if(_!==-1){p+=e.slice(c,_),c=_,h=e[_-1];continue}}if(u)p+=g,d?g===d&&(d=``):g===`"`||g===`'`?d=g:g===`>`&&(u=!1),h=g,c++;else if(g!==`<`||l){if(g===`
|
|
63
|
+
`&&h===`
|
|
64
|
+
`&&!l&&f===0)return null;if(!l&&f===0){for(var v=0;c+v<e.length&&e[c+v]===r[0];)v++;if(v>=i&&(i!==1||r!==`*`&&r!==`_`||e[c-1]!==r&&e[c+1]!==r)){var y=[e.slice(0,c+v),a,p+e.slice(c+i,c+v)];return y.index=0,y.input=e,y}}p+=g,h=g,c++}else{var b=e[c+1],x=e.indexOf(`>`,c);if(x!==-1){var S=e.slice(c,x+1).endsWith(`/>`);b===`/`?f=Math.max(0,f-1):S||f++}u=!0,p+=g,h=g,c++}}else l=!l,p+=g,h=g,c++;else p+=g,m=!0,h=g,c++}return null}var rU=[`children`,`options`],iU=`allowFullScreen.allowTransparency.autoComplete.autoFocus.autoPlay.cellPadding.cellSpacing.charSet.classId.colSpan.contentEditable.contextMenu.crossOrigin.encType.formAction.formEncType.formMethod.formNoValidate.formTarget.frameBorder.hrefLang.inputMode.keyParams.keyType.marginHeight.marginWidth.maxLength.mediaGroup.minLength.noValidate.radioGroup.readOnly.rowSpan.spellCheck.srcDoc.srcLang.srcSet.tabIndex.useMap`.split(`.`).reduce((e,t)=>(e[t.toLowerCase()]=t,e),{class:`className`,for:`htmlFor`}),aU={amp:`&`,apos:`'`,gt:`>`,lt:`<`,nbsp:`\xA0`,quot:`“`},oU=[`style`,`script`,`pre`],sU=[`src`,`href`,`data`,`formAction`,`srcDoc`,`action`],cU=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,lU=/\n{2,}$/,uU=/^(\s*>[\s\S]*?)(?=\n\n|$)/,dU=/^ *> ?/gm,fU=/^(?:\[!([^\]]*)\]\n)?([\s\S]*)/,pU=/^ {2,}\n/,mU=/^(?:([-*_])( *\1){2,}) *(?:\n *)+\n/,hU=/^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n([\s\S]*?)(?:\1\n?|$)/,gU=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,_U=/^(`+)((?:\\`|(?!\1)`|[^`])+)\1/,vU=/^(?:\n *)*\n/,yU=/\r\n?/g,bU=/^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/,xU=/^\[\^([^\]]+)]/,SU=/\f/g,CU=/^---[ \t]*\n(.|\n)*\n---[ \t]*\n/,wU=/^\[(x|\s)\]/,TU=/^(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,EU=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,DU=/^([^\n]+)\n *(=|-)\2{2,} *\n/,OU=/^<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>/i;function kU(e){let t=OU.exec(e);if(!t)return null;let n=t[1],r=n.toLowerCase(),i=r.length+1,a=t[0].length;e[a]===`
|
|
65
|
+
`&&a++;let o=a,s=a,c=1,l=e.length;for(;c>0;){let t=e.indexOf(`<`,a);if(t===-1)return null;let o=-1,u=-1;if(e[t+1]===`/`)u=t;else if(e[t+1]===r[0]||e[t+1]===n[0]){let a=!0;for(let i=0;i<r.length;i++){let o=e[t+1+i];if(o!==r[i]&&o!==n[i]){a=!1;break}}!a||e[t+i]!==` `&&e[t+i]!==`>`||(o=t)}if(o!==-1||u!==-1)if(o!==-1&&(u===-1||o<u))a=o+i+1,c++;else{let t=u+2;for(;t<l;){let n=e[t];if(n!==` `&&n!==` `&&n!==`
|
|
66
|
+
`&&n!==`\r`)break;t++}if(t+r.length>l)return null;let i=!0;for(let a=0;a<r.length;a++){let o=e[t+a];if(o!==r[a]&&o!==n[a]){i=!1;break}}if(!i){a=t;continue}for(t+=r.length;t<l;){let n=e[t];if(n!==` `&&n!==` `&&n!==`
|
|
67
|
+
`&&n!==`\r`)break;t++}if(t>=l||e[t]!==`>`){a=t;continue}s=u,a=t+1,c--}else a=t+1}let u=0;for(;a+u<l&&e[a+u]===`
|
|
68
|
+
`;)u++;return[e.slice(0,a+u),n,t[2],e.slice(o,s)]}var AU=/&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi,jU=/^<!--[\s\S]*?(?:-->)/,MU=/^(data|aria|x)-[a-z_][a-z\d_.-]*$/,NU=/^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i,PU=/^\{.*\}$/,FU=/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,IU=/^<([^ >]+[:@\/][^ >]+)>/,LU=/-([a-z])?/gi,RU=/^(\|.*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*))?\n?/,zU=/^[^\n]+(?: \n|\n{2,})/,BU=/^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/,VU=/^!\[([^\]]*)\] ?\[([^\]]*)\]/,HU=/^\[([^\]]*)\] ?\[([^\]]*)\]/,UU=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/,WU=/\t/g,GU=/(^ *\||\| *$)/g,KU=/^ *:-+: *$/,qU=/^ *:-+ *$/,JU=/^ *-+: *$/,YU=/^(:[a-zA-Z0-9-_]+:)/,XU=/^\\([^0-9A-Za-z\s])/,ZU=/\\([^0-9A-Za-z\s])/g,QU=/^[\s\S](?:(?! \n|[0-9]\.|http)[^=*_~\-\n:<`\\\[!])*/,$U=/^\n+/,eW=/^([ \t]*)/,tW=/(?:^|\n)( *)$/,nW=`(?:\\d+\\.)`,rW=`(?:[*+-])`;function iW(e){return`( *)(`+(e===1?nW:rW)+`) +`}var aW=iW(1),oW=iW(2);function sW(e){return RegExp(`^`+(e===1?aW:oW))}var cW=sW(1),lW=sW(2);function uW(e){return RegExp(`^`+(e===1?aW:oW)+`[^\\n]*(?:\\n(?!\\1`+(e===1?nW:rW)+` )[^\\n]*)*(\\n|$)`,`gm`)}var dW=uW(1),fW=uW(2);function pW(e){let t=e===1?nW:rW;return RegExp(`^( *)(`+t+`) [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1`+t+` (?!`+t+` ))\\n*|\\s*\\n*$)`)}var mW=pW(1),hW=pW(2);function gW(e,t){let n=t===1,r=n?mW:hW,i=n?dW:fW,a=n?cW:lW;return{t:e=>a.test(e),o:kW(function(e,t){let n=tW.exec(t.prevCapture);return n&&(t.list||!t.inline&&!t.simple)?r.exec(e=n[1]+e):null}),u:1,i(e,t,r){let o=n?+e[2]:void 0,s=e[0].replace(lU,`
|
|
69
|
+
`).match(i),c=a.exec(s[0]),l=RegExp(`^ {1,`+(c?c[0].length:0)+`}`,`gm`),u=!1;return{items:s.map(function(e,n){let i=e.replace(l,``).replace(a,``),o=n===s.length-1,c=SW(i,`
|
|
70
|
+
|
|
71
|
+
`)||o&&u;u=c;let d=r.inline,f=r.list,p;r.list=!0,c?(r.inline=!1,p=bW(i)+`
|
|
72
|
+
|
|
73
|
+
`):(r.inline=!0,p=bW(i));let m=t(p,r);return r.inline=d,r.list=f,m}),ordered:n,start:o}}}}var _W=RegExp(`^\\[((?:\\[[^\\[\\]]*(?:\\[[^\\[\\]]*\\][^\\[\\]]*)*\\]|[^\\[\\]])*)\\]\\(\\s*<?((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['"]([\\s\\S]*?)['"])?\\s*\\)`),vW=/^!\[(.*?)\]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/;function yW(e){return typeof e==`string`}function bW(e){let t=e.length;for(;t>0&&e[t-1]<=` `;)t--;return e.slice(0,t)}function xW(e,t){return e.startsWith(t)}function SW(e,t){return e.indexOf(t)!==-1}function CW(e,t,n){if(Array.isArray(n)){for(let t=0;t<n.length;t++)if(xW(e,n[t]))return!0;return!1}return n(e,t)}function wW(e){return e.replace(/[ÀÁÂÃÄÅàáâãä忯]/g,`a`).replace(/[çÇ]/g,`c`).replace(/[ðÐ]/g,`d`).replace(/[ÈÉÊËéèêë]/g,`e`).replace(/[ÏïÎîÍíÌì]/g,`i`).replace(/[Ññ]/g,`n`).replace(/[øØœŒÕõÔôÓóÒò]/g,`o`).replace(/[ÜüÛûÚúÙù]/g,`u`).replace(/[ŸÿÝý]/g,`y`).replace(/[^a-z0-9- ]/gi,``).replace(/ /gi,`-`).toLowerCase()}function TW(e){return JU.test(e)?`right`:KU.test(e)?`center`:qU.test(e)?`left`:null}function EW(e,t,n,r){let i=n.inTable;n.inTable=!0;let a=[[]],o=``;function s(){if(!o)return;let e=a[a.length-1];e.push.apply(e,t(o,n)),o=``}return e.trim().split(/(`[^`]*`|\\\||\|)/).filter(Boolean).forEach((e,t,n)=>{e.trim()===`|`&&(s(),r)?t!==0&&t!==n.length-1&&a.push([]):o+=e}),s(),n.inTable=i,a}function DW(e,t,n){n.inline=!0;let r=e[2]?e[2].replace(GU,``).split(`|`).map(TW):[],i=e[3]?function(e,t,n){return e.trim().split(`
|
|
74
|
+
`).map(function(e){return EW(e,t,n,!0)})}(e[3],t,n):[],a=EW(e[1],t,n,!!i.length);return n.inline=!1,i.length?{align:r,cells:i,header:a,type:`25`}:{children:a,type:`21`}}function OW(e,t){return e.align[t]==null?{}:{textAlign:e.align[t]}}function kW(e){return e.inline=1,e}function AW(e){return kW(function(t,n){return n.inline?e.exec(t):null})}function jW(e){return kW(function(t,n){return n.inline||n.simple?e.exec(t):null})}function MW(e){return function(t,n){return n.inline||n.simple?null:e.exec(t)}}function NW(e){return kW(function(t){return e.exec(t)})}var PW=/(javascript|vbscript|data(?!:image)):/i;function FW(e){try{let t=decodeURIComponent(e).replace(/[^A-Za-z0-9/:]/g,``);if(PW.test(t))return null}catch{return null}return e}function IW(e){return e&&e.replace(ZU,`$1`)}function LW(e,t,n){let r=n.inline||!1,i=n.simple||!1;n.inline=!0,n.simple=!0;let a=e(t,n);return n.inline=r,n.simple=i,a}function RW(e,t,n){let r=n.inline||!1,i=n.simple||!1;n.inline=!1,n.simple=!0;let a=e(t,n);return n.inline=r,n.simple=i,a}function zW(e,t,n){let r=n.inline||!1;n.inline=!1;let i=e(t,n);return n.inline=r,i}var BW=(e,t,n)=>({children:LW(t,e[2],n)});function VW(){return{}}function HW(...e){return e.filter(Boolean).join(` `)}function UW(e,t,n){let r=e,i=t.split(`.`);for(;i.length&&(r=r[i[0]],r!==void 0);)i.shift();return r||n}function WW(e,t,n,r){if(!t||!t.trim())return null;let i=t.match(cU);return i?i.reduce(function(t,i){let a=i.indexOf(`=`);if(a!==-1){let o=function(e){return e.indexOf(`-`)!==-1&&e.match(MU)===null&&(e=e.replace(LU,function(e,t){return t.toUpperCase()})),e}(i.slice(0,a)).trim(),s=iU[o]||o;if(s===`ref`)return t;let c=t[s]=function(e,t,n,r){return t===`style`?function(e){let t=[];if(!e)return t;let n=``,r=0,i=``;for(let a=0;a<e.length;a++){let o=e[a];if(o===`"`||o===`'`)i?o===i&&(i=``,r--):(i=o,r++);else if(o===`(`&&n.endsWith(`url`))r++;else if(o===`)`&&r>0)r--;else if(o===`;`&&r===0){let e=n.indexOf(`:`);e>0&&t.push([n.slice(0,e).trim(),n.slice(e+1).trim()]),n=``;continue}n+=o}let a=n.indexOf(`:`);return a>0&&t.push([n.slice(0,a).trim(),n.slice(a+1).trim()]),t}(n).reduce(function(t,[n,i]){return t[n.replace(/(-[a-z])/g,e=>e[1].toUpperCase())]=r(i,e,n),t},{}):sU.indexOf(t)===-1?(n.match(PU)&&(n=IW(n.slice(1,n.length-1))),n===`true`||n!==`false`&&n):r(IW(n),e,t)}(e,o,function(e){let t=e[0];return(t===`"`||t===`'`)&&e.length>=2&&e[e.length-1]===t?e.slice(1,-1):e}(i.slice(a+1).trim()),n);typeof c==`string`&&(OU.test(c)||NU.test(c))&&(t[s]=r(c.trim()))}else i!==`style`&&(t[iU[i]||i]=!0);return t},{}):null}function GW(e,t){for(let n=0;n<e.length;n++)if(e[n].test(t))return!0;return!1}function KW(e=``,t={}){t.overrides=t.overrides||{},t.namedCodesToUnicode=t.namedCodesToUnicode?QH({},aU,t.namedCodesToUnicode):aU;let n=t.slugify||wW,r=t.sanitizer||FW,i=t.createElement||b.createElement,a=[uU,hU,gU,t.enforceAtxHeadings?EU:TU,DU,RU,mW,hW],o=[...a,zU,OU,jU,NU];function s(e,n,...r){let a=UW(t.overrides,e+`.props`,{});return i(function(e,t){let n=UW(t,e);return n?typeof n==`function`||typeof n==`object`&&`render`in n?n:UW(t,e+`.component`,e):e}(e,t.overrides),QH({},n,a,{className:HW(n?.className,a.className)||void 0}),...r)}function c(e){e=e.replace(CU,``);let r=!1;t.forceInline?r=!0:t.forceBlock||(r=!1===UU.test(e));let a=f(r?e:bW(e).replace($U,``)+`
|
|
75
|
+
|
|
76
|
+
`,{inline:r});if(t.ast)return a;let o=p(a);for(;yW(o[o.length-1])&&!o[o.length-1].trim();)o.pop();if(l.length&&o.push(s(`footer`,{key:`footer`},l.map(function(e){return s(`div`,{id:n(e.identifier,wW),key:e.identifier},e.identifier,p(f(e.footnote,{inline:!0})))}))),t.wrapper===null)return o;let c=t.wrapper||(r?`span`:`div`),u;if(o.length>1||t.forceWrapper)u=o;else{if(o.length===1)return u=o[0],typeof u==`string`?s(`span`,{key:`outer`},u):u;u=null}return i(c,QH({key:`outer`},t.wrapperProps),u)}let l=[],u={},d={0:{t:[`>`],o:MW(uU),u:1,i(e,t,n){let[,r,i]=e[0].replace(dU,``).match(fU);return{alert:r,children:t(i,n)}}},1:{t:[` `],o:AW(pU),u:1,i:VW},2:{t:function(e,t){if(t.inline||t.simple)return!1;var n=e[0];return n===`-`||n===`*`||n===`_`},o:MW(mU),u:1,i:VW},3:{t:[` `],o:MW(gU),u:0,i:e=>({lang:void 0,text:IW(bW(e[0].replace(/^ {4}/gm,``)))})},4:{t:["```",`~~~`],o:MW(hU),u:0,i:e=>({attrs:WW(`code`,e[3]||``,r,c),lang:e[2]||void 0,text:e[4],type:`3`})},5:{t:["`"],o:jW(_U),u:3,i:e=>({text:IW(e[2])})},6:{t:[`[^`],o:MW(bU),u:0,i:e=>(l.push({footnote:e[2],identifier:e[1]}),{})},7:{t:[`[^`],o:AW(xU),u:1,i:e=>({target:`#`+n(e[1],wW),text:e[1]})},8:{t:[`[ ]`,`[x]`],o:AW(wU),u:1,i:e=>({completed:e[1].toLowerCase()===`x`})},9:{t:[`#`],o:MW(t.enforceAtxHeadings?EU:TU),u:1,i:(e,t,r)=>({children:LW(t,e[2],r),id:n(e[2],wW),level:e[1].length})},10:{t:e=>{let t=e.indexOf(`
|
|
77
|
+
`);return t>0&&t<e.length-1&&(e[t+1]===`=`||e[t+1]===`-`)},o:MW(DU),u:1,i:(e,t,n)=>({children:LW(t,e[1],n),level:e[2]===`=`?1:2,type:`9`})},11:{t:[`<`],o:kW(kU),u:1,i(e,t,n){let[,i]=e[3].match(eW),a=RegExp(`^`+i,`gm`),s=e[3].replace(a,``),l=GW(o,s)?zW:LW,u=e[1].toLowerCase(),d=oU.indexOf(u)!==-1,f=(d?u:e[1]).trim(),p={attrs:WW(f,e[2],r,c),noInnerParse:d,tag:f};if(n.inAnchor=n.inAnchor||u===`a`,d)p.text=e[3];else{let e=n.inHTML;n.inHTML=!0,p.children=l(t,s,n),n.inHTML=e}return n.inAnchor=!1,p}},13:{t:[`<`],o:NW(NU),u:1,i(e){let t=e[1].trim();return{attrs:WW(t,e[2]||``,r,c),tag:t}}},12:{t:[`<!--`],o:NW(jU),u:1,i:()=>({})},14:{t:[`![`],o:jW(vW),u:1,i:e=>({alt:IW(e[1]),target:IW(e[2]),title:IW(e[3])})},15:{t:[`[`],o:AW(_W),u:3,i:(e,t,n)=>({children:RW(t,e[1],n),target:IW(e[2]),title:IW(e[3])})},16:{t:function(e,t){return!(!t.inline||t.inAnchor)&&e[0]===`<`&&(SW(e,`:`)||SW(e,`@`)||SW(e,`/`))},o:AW(IU),u:0,i(e){let t=e[1],n=!1;return SW(t,`@`)&&!SW(t,`//`)&&(n=!0,t=t.replace(`mailto:`,``)),{children:[{text:t,type:`27`}],target:n?`mailto:`+t:t,type:`15`}}},17:{t:(e,n)=>!n.inAnchor&&!t.disableAutoLink&&xW(e,`http`),o:AW(FU),u:0,i:e=>({children:[{text:e[1],type:`27`}],target:e[1],title:void 0,type:`15`})},20:gW(0,1),30:gW(0,2),19:{t:[`
|
|
78
|
+
`],o:MW(vU),u:3,i:VW},21:{t:function(e,t){return!t.inline&&!t.simple},o:kW(function(e,t){if(t.inline||t.simple||t.inHTML&&!SW(e,`
|
|
79
|
+
|
|
80
|
+
`)&&!SW(t.prevCapture,`
|
|
81
|
+
|
|
82
|
+
`))return null;let n=``,r=0;for(;;){let t=e.indexOf(`
|
|
83
|
+
`,r),i=e.slice(r,t===-1?void 0:t+1),o=e[r];if((o===`>`||o===`#`||o===`|`||o==="`"||o===`~`||o===`*`||o===`-`||o===`_`||o===` `)&&GW(a,i)||(n+=i,t===-1||!i.trim()))break;r=t+1}let i=bW(n);return i===``?null:[n,,i]}),u:3,i:BW},22:{t:[`[`],o:AW(BU),u:0,i:e=>(u[e[1]]={target:e[2],title:e[4]},{})},23:{t:[`![`],o:jW(VU),u:0,i:e=>({alt:e[1]?IW(e[1]):void 0,ref:e[2]})},24:{t:e=>e[0]===`[`&&!SW(e,`](`),o:AW(HU),u:0,i:(e,t,n)=>({children:t(e[1],n),fallbackChildren:e[0],ref:e[2]})},25:{t:[`|`],o:MW(RU),u:1,i:DW},27:{o:kW(function(e,t){let n;return xW(e,`:`)&&(n=YU.exec(e)),n||QU.exec(e)}),u:4,i(e){let n=e[0];return{text:SW(n,`&`)?n.replace(AU,(e,n)=>t.namedCodesToUnicode[n]||e):n}}},34:{t:[`*`,`_`,`~`,`=`],o:kW(nU),u:2,i:(e,t,n)=>({children:t(e[2],n),tag:e[1]})},28:{t:[`\\`],o:jW(XU),u:1,i:e=>({text:e[1],type:`27`})}};!0===t.disableParsingRawHTML&&(delete d[11],delete d[13]);let f=function(e){var t=Object.keys(e);function n(r,i){var a=[];if(i.prevCapture=i.prevCapture||``,r.trim())for(;r;)for(var o=0;o<t.length;){var s=t[o],c=e[s];if(!c.t||CW(r,i,c.t)){var l=c.o(r,i);if(l&&l[0]){r=r.substring(l[0].length);var u=c.i(l,n,i);i.prevCapture+=l[0],u.type||=s,a.push(u);break}o++}else o++}return i.prevCapture=``,a}return t.sort(function(t,n){return e[t].u-e[n].u||(t<n?-1:1)}),function(e,t){return n(function(e){return e.replace(yU,`
|
|
84
|
+
`).replace(SU,``).replace(WU,` `)}(e),t)}}(d),p=function(e,t,n,r,i){function a(e){return Array.isArray(e)?e.map(e=>`text`in e?e.text:``):`text`in e?e.text:``}return function o(s,c={}){let l=(c.renderDepth||0)+1;if(l>2500)return a(s);c.renderDepth=l;try{if(Array.isArray(s)){let e=c.key,t=[],n=!1;for(let e=0;e<s.length;e++){c.key=e;let r=o(s[e],c),i=yW(r);i&&n?t[t.length-1]+=r:r!==null&&t.push(r),n=i}return c.key=e,c.renderDepth=l-1,t}let a=function(a,o,s){let c=()=>function(e,t,n,r,i,a,o){switch(e.type){case`0`:{let i={key:n.key};return e.alert&&(i.className=`markdown-alert-`+a(e.alert.toLowerCase(),wW),e.children.unshift({attrs:{},children:[{type:`27`,text:e.alert}],noInnerParse:!0,type:`11`,tag:`header`})),r(`blockquote`,i,t(e.children,n))}case`1`:return r(`br`,{key:n.key});case`2`:return r(`hr`,{key:n.key});case`3`:return r(`pre`,{key:n.key},r(`code`,QH({},e.attrs,{className:e.lang?`lang-`+e.lang:``}),e.text));case`5`:return r(`code`,{key:n.key},e.text);case`7`:return r(`a`,{key:n.key,href:i(e.target,`a`,`href`)},r(`sup`,{key:n.key},e.text));case`8`:return r(`input`,{checked:e.completed,key:n.key,readOnly:!0,type:`checkbox`});case`9`:return r(`h`+e.level,{id:e.id,key:n.key},t(e.children,n));case`11`:return r(e.tag,QH({key:n.key},e.attrs),e.text||(e.children?t(e.children,n):``));case`13`:return r(e.tag,QH({},e.attrs,{key:n.key}));case`14`:return r(`img`,{key:n.key,alt:e.alt||void 0,title:e.title||void 0,src:i(e.target,`img`,`src`)});case`15`:return r(`a`,{key:n.key,href:i(e.target,`a`,`href`),title:e.title},t(e.children,n));case`23`:return o[e.ref]?r(`img`,{key:n.key,alt:e.alt,src:i(o[e.ref].target,`img`,`src`),title:o[e.ref].title}):null;case`24`:return o[e.ref]?r(`a`,{key:n.key,href:i(o[e.ref].target,`a`,`href`),title:o[e.ref].title},t(e.children,n)):r(`span`,{key:n.key},e.fallbackChildren);case`25`:{let i=e;return r(`table`,{key:n.key},r(`thead`,null,r(`tr`,null,i.header.map(function(e,a){return r(`th`,{key:a,style:OW(i,a)},t(e,n))}))),r(`tbody`,null,i.cells.map(function(e,a){return r(`tr`,{key:a},e.map(function(e,a){return r(`td`,{key:a,style:OW(i,a)},t(e,n))}))})))}case`27`:return e.text;case`34`:return r(e.tag,{key:n.key},t(e.children,n));case`20`:case`30`:return r(e.ordered?`ol`:`ul`,{key:n.key,start:e.type===`20`?e.start:void 0},e.items.map(function(e,i){return r(`li`,{key:i},t(e,n))}));case`19`:return`
|
|
85
|
+
`;case`21`:return r(`p`,{key:n.key},t(e.children,n));default:return null}}(a,o,s,t,n,r,i);return e?e(c,a,o,s):c()}(s,o,c);return c.renderDepth=l-1,a}catch(e){if(e instanceof RangeError&&e.message.includes(`Maximum call stack`))return a(s);throw e}}}(t.renderRule,s,r,n,u);return c(e)}var qW=e=>{let{children:t,options:n}=e,r=function(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}(e,rU);return KW(t??``,QH({},n,{wrapperProps:QH({},n?.wrapperProps,r)}))},JW=Symbol(`remove-this-key`),YW=Symbol(`reset`);function XW(e,t){return Array.isArray(e.required)&&e.required.indexOf(t)!==-1}function ZW(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(nH.NewStringDefault)}}function QW(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=GV(BV(m,x,t.path)),T=(0,b.useCallback)((e,t,n,r)=>{e===void 0&&_&&(e=``),s(e,t,n,r)},[s,_]),E=(0,b.useCallback)(e=>{m!==e&&y(!0),h(m,e)},[m,h]);return(0,G.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})}function $W(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=_.retrieveSchema(t,r,!0),C=hR(n,y),{properties:w={}}=S,T=e.childFieldPathId??a,E=C.title??S.title??h??o,D=C.description??S.description,O=IV(m,S,s,n),k=SV(r),A=[],j=(0,b.useCallback)((e,t)=>{let{duplicateKeySuffixSeparator:r=`-`}=hR(n,y),i=0,a=e;for(;qx(t,a);)a=`${e}${r}${++i}`;return a},[n,y]),M=(0,b.useCallback)(()=>{if(!(S.additionalProperties||S.patternProperties))return;let{translateString:e}=m,t={...r},n=j(`newKey`,t);if(S.patternProperties)AS(t,n,null);else{let i,a,o;if(Vh(S.additionalProperties)){i=S.additionalProperties.type,a=S.additionalProperties.const,o=S.additionalProperties.default;let e=S.additionalProperties;if(`$ref`in e){let{schemaUtils:t}=m;e=t.retrieveSchema({[cR]:e[cR]},r),i=e.type,a=e.const,o=e.default}!i&&(`anyOf`in e||`oneOf`in e)&&(i=`object`)}AS(t,n,a??o??ZW(e,i))}p(t,T.path)},[r,p,m,T,j,S]),N=(0,b.useCallback)((e,t)=>{if(e!==t){let n=j(t,r),i={...r},a={[e]:n},o=Object.keys(i).map(e=>({[a[e]||e]:i[e]}));p(Object.assign({},...o),T.path)}},[r,p,T,j]),P=(0,b.useCallback)(e=>{p(JW,[...T.path,e])},[p,T]);if(!O||k)try{A=DV(Object.keys(w),C.order)}catch(e){return(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`p`,{className:`rjsf-config-error`,style:{color:`red`},children:(0,G.jsx)(qW,{options:{disableParsingRawHTML:!0},children:v(nH.InvalidObjectField,[o||`root`,e.message])})}),(0,G.jsx)(`pre`,{children:JSON.stringify(S)})]})}let F=eV(`ObjectFieldTemplate`,m,C),I=O?(0,G.jsx)(x,{...e,fieldPathId:T,schema:S}):void 0;return(0,G.jsx)(F,{title:C.label===!1?``:E,description:C.label===!1?void 0:D,properties:A.map(e=>{let t=qx(S,[aR,e,YL]),a=t?n.additionalProperties:n[e],o=hR(a).widget===`hidden`;return{content:(0,G.jsx)(QW,{propertyName:e,required:XW(S,e),schema:Q(S,[aR,e],{}),uiSchema:a,errorSchema:Q(i,[e]),fieldPathId:T,formData:Q(r,[e]),handleKeyRename:N,handleRemoveProperty:P,addedByAdditionalProperties:t,onChange:p,onBlur:d,onFocus:f,registry:m,disabled:c,readonly:l,hideError:u},e),name:e,readonly:l,disabled:c,required:s,hidden:o}}),readonly:l,disabled:c,required:s,fieldPathId:a,uiSchema:n,errorSchema:i,schema:S,formData:r,registry:m,optionalDataControl:I,className:O?`rjsf-optional-object-field`:void 0,onAddProperty:M})}function eG(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=eV(`OptionalDataControlsTemplate`,l,hR(n,u)),m=SV(r),h,g,_,v;return i||a?(h=xV(c,`Msg`),g=m?void 0:f(nH.OptionalObjectEmptyMsg)):(g=f(m?nH.OptionalObjectRemove:nH.OptionalObjectAdd),m?(h=xV(c,`Remove`),v=()=>o(void 0,c.path,s)):(h=xV(c,`Add`),_=()=>{let e=d.getDefaultFormState(t,r,`excludeObjectChildren`);e===void 0&&(e=Tz(t)===`array`?[]:{}),o(e,c.path,s)})),g&&(0,G.jsx)(p,{id:h,registry:l,schema:t,uiSchema:n,label:g,onAddClick:_,onRemoveClick:v})}var tG={array:`ArrayField`,boolean:`BooleanField`,integer:`NumberField`,number:`NumberField`,object:`ObjectField`,string:`StringField`,null:`NullField`};function nG(e,t,n){let r=t.field,{fields:i}=n;if(typeof r==`function`)return r;if(typeof r==`string`&&r in i)return i[r];let a=Tz(e),o=Array.isArray(a)?a[0]:a||``,s=e.$id,c=tG[o];return s&&s in i&&(c=s),!c&&(e.anyOf||e.oneOf)?()=>null:c in i?i[c]:i.FallbackField}function rG(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}=_,x=MV(t,r,f),S=hR(x,g),C=eV(`FieldTemplate`,f,S),w=eV(`DescriptionFieldTemplate`,f,S),T=eV(`FieldHelpTemplate`,f,S),E=eV(`FieldErrorTemplate`,f,S),D=m.retrieveSchema(t,i),O=n.$id,k=(0,b.useCallback)((e,t,n,r)=>s(e,t,n,r||O),[O,s]),A=nG(D,S,f),j=!!(S.disabled??e.disabled),M=!!(S.readonly??(e.readonly||e.schema.readOnly||D.readOnly)),N=S.hideError,P=N===void 0?e.hideError:!!N,F=!!(S.autofocus??e.autofocus);if(Object.keys(D).length===0)return null;let I=m.getDisplayLabel(D,x,g),L=S.field&&S.fieldReplacesAnyOrOneOf===!0,R,z,B={fieldPathId:n};if((`anyOf`in D||`oneOf`in D)&&!L&&!m.isSelect(D)){D.anyOf?(R=v,z=D[QL].map(e=>m.retrieveSchema(Vh(e)?e:{},i))):D.oneOf&&(R=y,z=D[iR].map(e=>m.retrieveSchema(Vh(e)?e:{},i)));let e=IV(f,D,d,x),t=SV(i);I&&=!e||t,B={childFieldPathId:n,fieldPathId:BV(`XxxOf`,h,n)}}let{__errors:V,...H}=a||{},U=SS(x,[`ui:classNames`,`classNames`,`ui:style`]);`ui:options`in U&&(U[pR]=SS(U[pR],[`classNames`,`style`]));let ee=(0,G.jsx)(A,{...e,onChange:k,...B,schema:D,uiSchema:U,disabled:j,readonly:M,hideError:P,autofocus:F,errorSchema:H,rawErrors:V}),W=n.$id,te;te=p||`__additional_property`in D?o:S.title||e.schema.title||D.title||e.title||o;let ne=S.description||e.schema.description||D.description||``,re=S.help,ie=S.widget===`hidden`,ae=[`rjsf-field`,`rjsf-field-${Tz(D)}`];!P&&V&&V.length>0&&ae.push(`rjsf-field-error`),S.classNames&&ae.push(S.classNames);let oe=(0,G.jsx)(T,{help:re,fieldPathId:n,schema:D,uiSchema:x,hasErrors:!P&&V&&V.length>0,registry:f}),se=P||R&&!m.isSelect(D)?void 0:(0,G.jsx)(E,{errors:V,errorSchema:a,fieldPathId:n,schema:D,uiSchema:x,registry:f});return(0,G.jsx)(C,{description:(0,G.jsx)(w,{id:pV(W),description:ne,schema:D,uiSchema:x,registry:f}),rawDescription:ne,help:oe,rawHelp:typeof re==`string`?re:void 0,errors:se,rawErrors:P?void 0:V,fieldPathId:n,id:W,label:te,hidden:ie,onChange:s,onKeyRename:c,onKeyRenameBlur:l,onRemoveProperty:u,required:d,disabled:j,readonly:M,hideError:P,displayLabel:I,classNames:ae.join(` `).trim(),style:S.style,formData:i,schema:D,uiSchema:x,registry:f,children:(0,G.jsxs)(G.Fragment,{children:[ee,R&&(0,G.jsx)(R,{name:o,disabled:j,readonly:M,hideError:P,errorSchema:a,formData:i,fieldPathId:n,onBlur:e.onBlur,onChange:e.onChange,onFocus:e.onFocus,options:z,registry:f,required:d,schema:D,uiSchema:x})]})})}var iG=class extends b.Component{shouldComponentUpdate(e){let{registry:{globalFormOptions:t}}=this.props,{experimental_componentUpdateStrategy:n=`customDeep`}=t;return PV(this,e,this.state,n)}render(){return(0,G.jsx)(rG,{...this.props})}};function aG(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)?fB(t,r):void 0,w=C?`select`:`text`;v&&dV(t,v,y)&&(w=v);let{widget:T=w,placeholder:E=``,title:D,...O}=hR(r),k=x.getDisplayLabel(t,r,S),A=D??g??_??n,j=oV(t,T,y),M=(0,b.useCallback)((e,t,n)=>u(e,i.path,t,n),[u,i]);return(0,G.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 oG(e){let{formData:t,onChange:n,fieldPathId:r}=e;return(0,b.useEffect)(()=>{t===void 0&&n(null,r.path)},[r,t,n]),null}function sG(){return{AnyOfField:JH,ArrayField:_H,BooleanField:vH,FallbackField:SH,LayoutGridField:UH,LayoutHeaderField:WH,LayoutMultiSchemaField:qH,NumberField:ZH,ObjectField:$W,OneOfField:JH,OptionalDataControlsField:eG,SchemaField:iG,StringField:aG,NullField:oG}}function cG(e){let{fieldPathId:t,description:n,registry:r,schema:i,uiSchema:a}=e,o=hR(a,r.globalUiOptions),{label:s=!0}=o;return!n||!s?null:(0,G.jsx)(eV(`DescriptionFieldTemplate`,r,o),{id:pV(t),description:n,schema:i,uiSchema:a,registry:r})}function lG(e){let{children:t,className:n,buttonsProps:r,displayLabel:i,hasDescription:a,hasToolbar:o,registry:s,uiSchema:c}=e,l=eV(`ArrayFieldItemButtonsTemplate`,s,hR(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,G.jsxs)(`div`,{className:n,style:f,children:[(0,G.jsx)(`div`,{className:o?`col-xs-9 col-md-10 col-xl-11`:`col-xs-12`,children:t}),o&&(0,G.jsx)(`div`,{className:`col-xs-3 col-md-2 col-xl-1 array-item-toolbox`,children:(0,G.jsx)(`div`,{className:`btn-group`,style:p,children:(0,G.jsx)(l,{...r,style:u})})})]})}function uG(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,G.jsxs)(G.Fragment,{children:[(i||r)&&(0,G.jsx)(g,{id:bV(o,`moveUp`),className:`rjsf-array-item-move-up`,disabled:t||d||!i,onClick:u,uiSchema:p,registry:f}),(i||r)&&(0,G.jsx)(h,{id:bV(o,`moveDown`),className:`rjsf-array-item-move-down`,disabled:t||d||!r,onClick:l,uiSchema:p,registry:f}),n&&(0,G.jsx)(m,{id:bV(o,`copy`),className:`rjsf-array-item-copy`,disabled:t||d,onClick:s,uiSchema:p,registry:f}),a&&(0,G.jsx)(_,{id:bV(o,`remove`),className:`rjsf-array-item-remove`,disabled:t||d,onClick:c,uiSchema:p,registry:f})]})}function dG(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=hR(a),h=eV(`ArrayFieldDescriptionTemplate`,u,m),g=eV(`ArrayFieldTitleTemplate`,u,m),_=!l&&!r,{ButtonTemplates:{AddButton:v}}=u.templates;return(0,G.jsxs)(`fieldset`,{className:n,id:i.$id,children:[(0,G.jsx)(g,{fieldPathId:i,title:m.title||p,required:d,schema:f,uiSchema:a,registry:u,optionalDataControl:_?s:void 0}),(0,G.jsx)(h,{fieldPathId:i,description:m.description||f.description,schema:f,uiSchema:a,registry:u}),_?void 0:s,(0,G.jsx)(`div`,{className:`row array-item-list`,children:o}),t&&(0,G.jsx)(v,{id:bV(i,`add`),className:`rjsf-array-item-add`,onClick:c,disabled:r||l,uiSchema:a,registry:u})]})}function fG(e){let{fieldPathId:t,title:n,schema:r,uiSchema:i,required:a,registry:o,optionalDataControl:s}=e,c=hR(i,o.globalUiOptions),{label:l=!0}=c;return!n||!l?null:(0,G.jsx)(eV(`TitleFieldTemplate`,o,c),{id:_V(t),title:n,required:a,schema:r,uiSchema:i,registry:o,optionalDataControl:s})}function pG(e){let{id:t,schema:n}=e,{examples:r,default:i}=n;return Array.isArray(r)?(0,G.jsx)(`datalist`,{id:hV(t),children:r.concat(i!==void 0&&!r.map(String).includes(String(i))?[i]:[]).map(e=>(0,G.jsx)(`option`,{value:e},String(e)))},`datalist_${t}`):null}function mG(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,...ZB(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&&e.value),[c,t]),D=(0,b.useCallback)(({target:e})=>l(t,e&&e.value),[l,t]),O=(0,b.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),u(f.emptyValue??``)},[u,f.emptyValue]);return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`input`,{id:t,name:r||t,className:`form-control`,readOnly:a,disabled:o,autoFocus:s,value:w,...C,list:p.examples?hV(t):void 0,onChange:d||T,onBlur:E,onFocus:D,"aria-describedby":vV(t,!!p.examples)}),f.allowClearTextInputs&&!a&&!o&&w&&(0,G.jsx)(S,{registry:h,onClick:O}),(0,G.jsx)(pG,{id:t,schema:p})]})}function hG({uiSchema:e}){let{submitText:t,norender:n,props:r={}}=$B(e);return n?null:(0,G.jsx)(`div`,{children:(0,G.jsx)(`button`,{type:`submit`,...r,className:`btn btn-info ${r.className||``}`,children:t})})}function gG(e){let{iconType:t=`default`,icon:n,className:r,uiSchema:i,registry:a,...o}=e;return(0,G.jsx)(`button`,{type:`button`,className:`btn btn-${t} ${r}`,...o,children:(0,G.jsx)(`i`,{className:`glyphicon glyphicon-${n}`})})}function _G(e){let{registry:{translateString:t}}=e;return(0,G.jsx)(gG,{title:t(nH.CopyButton),...e,icon:`copy`})}function vG(e){let{registry:{translateString:t}}=e;return(0,G.jsx)(gG,{title:t(nH.MoveDownButton),...e,icon:`arrow-down`})}function yG(e){let{registry:{translateString:t}}=e;return(0,G.jsx)(gG,{title:t(nH.MoveUpButton),...e,icon:`arrow-up`})}function bG(e){let{registry:{translateString:t}}=e;return(0,G.jsx)(gG,{title:t(nH.RemoveButton),...e,iconType:`danger`,icon:`remove`})}function xG({id:e,className:t,onClick:n,disabled:r,registry:i,...a}){let{translateString:o}=i;return(0,G.jsx)(gG,{id:e,iconType:`default`,icon:`remove`,className:`btn-clear col-xs-12`,title:o(nH.ClearButton),onClick:n,disabled:r,registry:i,...a})}function SG({id:e,className:t,onClick:n,disabled:r,registry:i}){let{translateString:a}=i;return(0,G.jsx)(`div`,{className:`row`,children:(0,G.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,G.jsx)(gG,{id:e,iconType:`info`,icon:`plus`,className:`btn-add col-xs-12`,title:a(nH.AddButton),onClick:n,disabled:r,registry:i})})})}function CG(){return{SubmitButton:hG,AddButton:SG,CopyButton:_G,MoveDownButton:vG,MoveUpButton:yG,RemoveButton:bG,ClearButton:xG}}var wG=tV();function TG({description:e,registry:t,uiSchema:n={}}){let{globalUiOptions:r}=t;return hR(n,r).enableMarkdownInDescription&&typeof e==`string`?(0,G.jsx)(qW,{options:{disableParsingRawHTML:!0},"data-testid":wG.markdown,children:e}):e}TG.TEST_IDS=wG;function EG(e){let{id:t,description:n,registry:r,uiSchema:i}=e;return n?(0,G.jsx)(`div`,{id:t,className:`field-description`,children:(0,G.jsx)(TG,{description:n,registry:r,uiSchema:i})}):null}function DG({errors:e,registry:t}){let{translateString:n}=t;return(0,G.jsxs)(`div`,{className:`panel panel-danger errors`,children:[(0,G.jsx)(`div`,{className:`panel-heading`,children:(0,G.jsx)(`h3`,{className:`panel-title`,children:n(nH.ErrorsLabel)})}),(0,G.jsx)(`ul`,{className:`list-group`,children:e.map((e,t)=>(0,G.jsx)(`li`,{className:`list-group-item text-danger`,children:e.stack},t))})]})}function OG(e){let{schema:t,registry:n,typeSelector:r,schemaField:i}=e;return(0,G.jsx)(eV(`MultiSchemaFieldTemplate`,n),{selector:r,optionSchemaField:i,schema:t,registry:n})}var kG=`*`;function AG(e){let{label:t,required:n,id:r}=e;return t?(0,G.jsxs)(`label`,{className:`control-label`,htmlFor:r,children:[t,n&&(0,G.jsx)(`span`,{className:`required`,children:kG})]}):null}function jG(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=hR(d),p=eV(`WrapIfAdditionalTemplate`,u,f);if(s)return(0,G.jsx)(`div`,{className:`hidden`,children:r});let m=f.widget===`checkbox`;return(0,G.jsxs)(p,{...e,children:[l&&!m&&(0,G.jsx)(AG,{label:n,required:c,id:t}),l&&o?o:null,r,i,a]})}var MG=jG;function NG(e){let{errors:t=[],fieldPathId:n}=e;return t.length===0?null:(0,G.jsx)(`div`,{children:(0,G.jsx)(`ul`,{id:mV(n),className:`error-detail bs-callout bs-callout-info`,children:t.filter(e=>!!e).map((e,t)=>(0,G.jsx)(`li`,{className:`text-danger`,children:e},t))})})}var PG=tV();function FG({help:e,registry:t,uiSchema:n={}}){let{globalUiOptions:r}=t;return hR(n,r).enableMarkdownInHelp&&typeof e==`string`?(0,G.jsx)(qW,{options:{disableParsingRawHTML:!0},"data-testid":PG.markdown,children:e}):e}FG.TEST_IDS=PG;function IG(e){let{fieldPathId:t,help:n,uiSchema:r,registry:i}=e;return n?(0,G.jsx)(`div`,{id:gV(t),className:`help-block`,children:(0,G.jsx)(FG,{help:n,registry:i,uiSchema:r})}):null}function LG(e){let{children:t,column:n,className:r,...i}=e;return(0,G.jsx)(`div`,{className:r,...i,children:t})}function RG(e){let{selector:t,optionSchemaField:n}=e;return(0,G.jsxs)(`div`,{className:`panel panel-default panel-body`,children:[(0,G.jsx)(`div`,{className:`form-group`,children:t}),n]})}function zG(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=hR(m),g=eV(`TitleFieldTemplate`,u,h),_=eV(`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,G.jsxs)(`fieldset`,{className:t,id:a.$id,children:[p&&(0,G.jsx)(g,{id:_V(a),title:p,required:d,schema:f,uiSchema:m,registry:u,optionalDataControl:v?s:void 0}),n&&(0,G.jsx)(_,{id:pV(a),description:n,schema:f,uiSchema:m,registry:u}),v?void 0:s,c.map(e=>e.content),gR(f,m,i)&&(0,G.jsx)(y,{id:bV(a,`add`),className:`rjsf-object-property-expand`,onClick:o,disabled:r||l,uiSchema:m,registry:u})]})}function BG(e){let{id:t,registry:n,label:r,onAddClick:i,onRemoveClick:a}=e;return i?(0,G.jsx)(gG,{id:t,registry:n,icon:`plus`,className:`rjsf-add-optional-data btn-sm`,onClick:i,title:r}):a?(0,G.jsx)(gG,{id:t,registry:n,icon:`remove`,className:`rjsf-remove-optional-data btn-sm`,onClick:a,title:r}):(0,G.jsx)(`em`,{id:t,children:r})}var VG=`*`;function HG(e){let{id:t,title:n,required:r,optionalDataControl:i}=e;return(0,G.jsxs)(`legend`,{id:t,children:[n,r&&(0,G.jsx)(`span`,{className:`required`,children:VG}),i&&(0,G.jsx)(`span`,{className:`pull-right`,style:{marginBottom:`2px`},children:i})]})}function UG(e){let{schema:t,fieldPathId:n,reason:r,registry:i}=e,{translateString:a}=i,o=nH.UnsupportedField,s=[];return n&&n.$id&&(o=nH.UnsupportedFieldWithId,s.push(n.$id)),r&&(o=o===nH.UnsupportedField?nH.UnsupportedFieldWithReason:nH.UnsupportedFieldWithIdAndReason,s.push(r)),(0,G.jsxs)(`div`,{className:`unsupported-field`,children:[(0,G.jsx)(`p`,{children:(0,G.jsx)(qW,{options:{disableParsingRawHTML:!0},children:a(o,s)})}),t&&(0,G.jsx)(`pre`,{children:JSON.stringify(t,null,2)})]})}function WG(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(nH.KeyLabel,[o]),S=YL 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,G.jsx)(`div`,{className:T,style:r,children:h});let E=C?46:26;return(0,G.jsx)(`div`,{className:T,style:r,children:(0,G.jsxs)(`div`,{className:`row`,children:[(0,G.jsx)(`div`,{className:`col-xs-5 form-additional`,children:(0,G.jsxs)(`div`,{className:`form-group`,children:[a&&(0,G.jsx)(AG,{label:x,required:d,id:`${t}-key`}),a&&l&&(0,G.jsx)(`div`,{children:`\xA0`}),(0,G.jsx)(`input`,{className:`form-control`,type:`text`,id:`${t}-key`,onBlur:s,defaultValue:o})]})}),(0,G.jsx)(`div`,{className:`form-additional form-group col-xs-5`,children:h}),(0,G.jsx)(`div`,{className:`col-xs-2`,style:{marginTop:a?`${E}px`:void 0},children:(0,G.jsx)(b,{id:bV(t,`remove`),className:`rjsf-object-property-remove btn-block`,style:{border:`0`},disabled:i||u,onClick:c,uiSchema:g,registry:_})})]})})}function GG(){return{ArrayFieldDescriptionTemplate:cG,ArrayFieldItemTemplate:lG,ArrayFieldItemButtonsTemplate:uG,ArrayFieldTemplate:dG,ArrayFieldTitleTemplate:fG,ButtonTemplates:CG(),BaseInputTemplate:mG,DescriptionFieldTemplate:EG,ErrorListTemplate:DG,FallbackFieldTemplate:OG,FieldTemplate:MG,FieldErrorTemplate:NG,FieldHelpTemplate:IG,GridTemplate:LG,MultiSchemaFieldTemplate:RG,ObjectFieldTemplate:zG,OptionalDataControlsTemplate:BG,TitleFieldTemplate:HG,UnsupportedFieldTemplate:UG,WrapIfAdditionalTemplate:WG}}function KG(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}=WV(e);return(0,G.jsxs)(`ul`,{className:`list-inline`,children:[d.map((e,i)=>(0,G.jsx)(`li`,{className:`list-inline-item`,children:(0,G.jsx)(UV,{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`?!0:!i.hideNowButton)&&(0,G.jsx)(`li`,{className:`list-inline-item`,children:(0,G.jsx)(`a`,{href:`#`,className:`btn btn-info btn-now`,onClick:m,children:u(nH.NowLabel)})}),(i.hideClearButton===`undefined`?!0:!i.hideClearButton)&&(0,G.jsx)(`li`,{className:`list-inline-item`,children:(0,G.jsx)(`a`,{href:`#`,className:`btn btn-warning btn-clear`,onClick:p,children:u(nH.ClearLabel)})})]})}function qG({time:e=!0,...t}){let{AltDateWidget:n}=t.registry.widgets;return(0,G.jsx)(n,{time:e,...t})}function JG({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=eV(`DescriptionFieldTemplate`,p,n),g=NV(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=hR(t).widget===`checkbox`?void 0:n.description??e.description;return(0,G.jsxs)(`div`,{className:`checkbox ${a||o?`disabled`:``}`,children:[!c&&x&&(0,G.jsx)(h,{id:pV(r),description:x,schema:e,uiSchema:t,registry:p}),(0,G.jsxs)(`label`,{children:[(0,G.jsx)(`input`,{type:`checkbox`,id:r,name:m||r,checked:i===void 0?!1:i,required:g,disabled:a||o,autoFocus:l,onChange:_,onBlur:v,onFocus:y,"aria-describedby":vV(r)}),wV((0,G.jsx)(`span`,{children:s}),c)]})]})}function YG({id:e,disabled:t,options:{inline:n=!1,enumOptions:r,enumDisabled:i,emptyValue:a},value:o,autofocus:s=!1,readonly:c,onChange:l,onBlur:u,onFocus:d,htmlName:f}){let p=Array.isArray(o)?o:[o],m=(0,b.useCallback)(({target:t})=>u(e,HB(t&&t.value,r,a)),[u,e,r,a]),h=(0,b.useCallback)(({target:t})=>d(e,HB(t&&t.value,r,a)),[d,e,r,a]);return(0,G.jsx)(`div`,{className:`checkboxes`,id:e,children:Array.isArray(r)&&r.map((a,o)=>{let u=WB(a.value,p),d=Array.isArray(i)&&i.indexOf(a.value)!==-1,g=t||d||c?`disabled`:``,_=(0,G.jsxs)(`span`,{children:[(0,G.jsx)(`input`,{type:`checkbox`,id:yV(e,o),name:f||e,checked:u,value:String(o),disabled:t||d||c,autoFocus:s&&o===0,onChange:e=>{e.target.checked?l(KB(o,p,r)):l(UB(o,p,r))},onBlur:m,onFocus:h,"aria-describedby":vV(e)}),(0,G.jsx)(`span`,{children:a.label})]});return n?(0,G.jsx)(`label`,{className:`checkbox-inline ${g}`,children:_},o):(0,G.jsx)(`div`,{className:`checkbox ${g}`,children:(0,G.jsx)(`label`,{children:_})},o)})})}function XG(e){let{disabled:t,readonly:n,options:r,registry:i}=e;return(0,G.jsx)(eV(`BaseInputTemplate`,i,r),{type:`color`,...e,disabled:t||n})}function ZG(e){let{onChange:t,options:n,registry:r}=e,i=eV(`BaseInputTemplate`,r,n),a=(0,b.useCallback)(e=>t(e||void 0),[t]);return(0,G.jsx)(i,{type:`date`,...e,onChange:a})}function QG(e){let{onChange:t,value:n,options:r,registry:i}=e;return(0,G.jsx)(eV(`BaseInputTemplate`,i,r),{type:`datetime-local`,...e,value:ZV(n),onChange:e=>t(TV(e))})}function $G(e){let{options:t,registry:n}=e;return(0,G.jsx)(eV(`BaseInputTemplate`,n,t),{type:`email`,...e})}function eK({fileInfo:e,registry:t}){let{translateString:n}=t,{dataURL:r,type:i,name:a}=e;return r?[`image/jpeg`,`image/png`].includes(i)?(0,G.jsx)(`img`,{src:r,style:{maxWidth:`100%`},className:`file-preview`}):(0,G.jsxs)(G.Fragment,{children:[` `,(0,G.jsx)(`a`,{download:`preview-${a}`,href:r,className:`file-download`,children:n(nH.PreviewLabel)})]}):null}function tK({filesInfo:e,registry:t,preview:n,onRemove:r,options:i}){if(e.length===0)return null;let{translateString:a}=t,{RemoveButton:o}=eV(`ButtonTemplates`,t,i);return(0,G.jsx)(`ul`,{className:`file-info`,children:e.map((e,i)=>{let{name:s,size:c,type:l}=e;return(0,G.jsxs)(`li`,{children:[(0,G.jsx)(qW,{children:a(nH.FilesInfo,[s,l,String(c)])}),n&&(0,G.jsx)(eK,{fileInfo:e,registry:t}),(0,G.jsx)(o,{onClick:()=>r(i),registry:t})]},i)})})}function nK(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}=XV(o,a,i),f=eV(`BaseInputTemplate`,c,s),p=e=>{e.target.files&&u(e.target.files)};return(0,G.jsxs)(`div`,{children:[(0,G.jsx)(f,{...e,disabled:t||n,type:`file`,required:o?!1:r,onChangeOverride:p,value:``,accept:s.accept?String(s.accept):void 0}),(0,G.jsx)(tK,{filesInfo:l,onRemove:d,registry:c,preview:s.filePreview,options:s})]})}function rK({id:e,value:t,htmlName:n}){return(0,G.jsx)(`input`,{type:`hidden`,id:e,name:n||e,value:t===void 0?``:t})}function iK(e){let{options:t,registry:n}=e;return(0,G.jsx)(eV(`BaseInputTemplate`,n,t),{type:`password`,...e})}function aK({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=(0,b.useCallback)(({target:e})=>o(l,HB(e&&e.value,d,m)),[o,d,m,l]),g=(0,b.useCallback)(({target:e})=>s(l,HB(e&&e.value,d,m)),[s,d,m,l]);return(0,G.jsx)(`div`,{className:`field-radio-group`,id:l,role:`radiogroup`,children:Array.isArray(d)&&d.map((e,o)=>{let s=WB(e.value,t),d=Array.isArray(f)&&f.indexOf(e.value)!==-1,m=r||d||i?`disabled`:``,_=(0,G.jsxs)(`span`,{children:[(0,G.jsx)(`input`,{type:`radio`,id:yV(l,o),checked:s,name:u||l,required:n,value:String(o),disabled:r||d||i,autoFocus:a&&o===0,onChange:()=>c(e.value),onBlur:h,onFocus:g,"aria-describedby":vV(l)}),(0,G.jsx)(`span`,{children:e.label})]});return p?(0,G.jsx)(`label`,{className:`radio-inline ${m}`,children:_},o):(0,G.jsx)(`div`,{className:`radio ${m}`,children:(0,G.jsx)(`label`,{children:_})},o)})})}function oK(e){let{value:t,registry:{templates:{BaseInputTemplate:n}}}=e;return(0,G.jsxs)(`div`,{className:`field-range-wrapper`,children:[(0,G.jsx)(n,{type:`range`,...e}),(0,G.jsx)(`span`,{className:`range-view`,children:t})]})}function sK({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,G.jsx)(G.Fragment,{children:(0,G.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,G.jsx)(`span`,{onClick:()=>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,G.jsx)(`input`,{type:`hidden`,id:e,name:d||e,value:t||``,required:n,disabled:r||i,"aria-hidden":`true`})]})})}function cK(e,t){return t?Array.from(e.target.options).slice().filter(e=>e.selected).map(e=>e.value):e.target.value}function lK({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}){let{enumOptions:m,enumDisabled:h,emptyValue:g}=n,_=s?[]:``,v=(0,b.useCallback)(e=>d(t,HB(cK(e,s),m,g)),[d,t,s,m,g]),y=(0,b.useCallback)(e=>u(t,HB(cK(e,s),m,g)),[u,t,s,m,g]),x=(0,b.useCallback)(e=>l(HB(cK(e,s),m,g)),[l,s,m,g]),S=GB(r,m,s),C=!s&&e.default===void 0;return(0,G.jsxs)(`select`,{id:t,name:p||t,multiple:s,role:`combobox`,className:`form-control`,value:S===void 0?_:S,required:i,disabled:a||o,autoFocus:c,onBlur:y,onFocus:v,onChange:x,"aria-describedby":vV(t),children:[C&&(0,G.jsx)(`option`,{value:``,children:f}),Array.isArray(m)&&m.map(({value:e,label:t},n)=>{let r=h&&h.indexOf(e)!==-1;return(0,G.jsx)(`option`,{value:String(n),disabled:r,children:t},n)})]})}function uK({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&&t.value),[l,e]),m=(0,b.useCallback)(({target:t})=>u(e,t&&t.value),[e,u]);return(0,G.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":vV(e)})}function dK(e){let{options:t,registry:n}=e;return(0,G.jsx)(eV(`BaseInputTemplate`,n,t),{...e})}function fK(e){let{onChange:t,options:n,registry:r}=e,i=eV(`BaseInputTemplate`,r,n),a=(0,b.useCallback)(e=>t(e?`${e}:00`:void 0),[t]);return(0,G.jsx)(i,{type:`time`,...e,onChange:a})}function pK(e){let{options:t,registry:n}=e;return(0,G.jsx)(eV(`BaseInputTemplate`,n,t),{type:`url`,...e})}function mK(e){let{options:t,registry:n}=e;return(0,G.jsx)(eV(`BaseInputTemplate`,n,t),{type:`number`,...e})}function hK(){return{AltDateWidget:KG,AltDateTimeWidget:qG,CheckboxWidget:JG,CheckboxesWidget:YG,ColorWidget:XG,DateWidget:ZG,DateTimeWidget:QG,EmailWidget:$G,FileWidget:nK,HiddenWidget:rK,PasswordWidget:iK,RadioWidget:aK,RangeWidget:oK,RatingWidget:sK,SelectWidget:lK,TextWidget:dK,TextareaWidget:uK,TimeWidget:fK,UpDownWidget:mK,URLWidget:pK}}function gK(){return{fields:sG(),templates:GG(),widgets:hK(),rootSchema:{},formContext:{},translateString:VB,globalFormOptions:{idPrefix:uR,idSeparator:`_`,useFallbackUiForUnsupportedType:!1}}}function _K(e,t){return{...DS(e,[`schema`,`uiSchema`,`fieldPathId`,`schemaUtils`,`formData`,`edit`,`errors`,`errorSchema`]),...t!==void 0&&{status:t}}}var vK=class 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}=QV(n,e.extraErrors)),t.customErrors&&({errors:r,errorSchema:i}=QV({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&&!vR(this.state.formData,i)&&r(_K(this.state)),this.formElement=(0,b.createRef)()}getSnapshotBeforeUpdate(e,t){if(!vR(this.props,e)){let n=JB(this.props.formData,e.formData),r=JB(this.props.formData,this.state.formData),i=!vR(e.schema,this.props.schema),a=n.length>0||!vR(e.formData,this.props.formData),o=r.length>0||!vR(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:!vR(s,t)}}return{shouldUpdate:!1}}componentDidUpdate(e,t,n){if(n.shouldUpdate){let{nextState:e}=n,r=!vR(e.formData,this.props.formData),i=this._isProcessingUserChange;if(this._isProcessingUserChange=!1,i&&r)return;r&&!vR(e.formData,t.formData)&&this.props.onChange&&this.props.onChange(_K(e)),this.setState(e)}}getStateFromProps(e,t,n,r=!1,i=[],a=!1){let o=this.state||{},s=`schema`in e?e.schema:this.props.schema,c=`validator`in e?e.validator:this.props.validator,l=(`uiSchema`in e?e.uiSchema:this.props.uiSchema)||{},u=e.formData===void 0&&this.props.formData===void 0,d=t!==void 0,f=`liveValidate`in e?e.liveValidate:this.props.liveValidate,p=d&&!e.noValidate&&f,m=`experimental_defaultFormStateBehavior`in e?e.experimental_defaultFormStateBehavior:this.props.experimental_defaultFormStateBehavior,h=`experimental_customMergeAllOf`in e?e.experimental_customMergeAllOf:this.props.experimental_customMergeAllOf,g=o.schemaUtils;(!g||g.doesSchemaUtilsDiffer(c,s,m,h))&&(g=FB(c,s,m,h));let _=g.getRootSchema(),v=t;t===YW?v=void 0:t===void 0&&u&&(v=o.formData);let y=g.getDefaultFormState(_,v,!1,o.initialDefaultsGenerated),b=this.updateRetrievedSchema(n??g.retrieveSchema(_,y)),x=()=>e.noValidate||r?{errors:[],errorSchema:{}}:e.liveValidate?{errors:o.errors||[],errorSchema:o.errorSchema||{}}:{errors:o.schemaValidationErrors||[],errorSchema:o.schemaValidationErrorSchema||{}},S,C,w=o.schemaValidationErrors,T=o.schemaValidationErrorSchema;if(p&&!a){let e=this.liveValidate(_,g,o.errorSchema,y,void 0,o.customErrors,n,n!==void 0);S=e.errors,C=e.errorSchema,w=e.schemaValidationErrors,T=e.schemaValidationErrorSchema}else{let t=x();if(S=t.errors,C=t.errorSchema,i.length>0&&!p){let e=i.reduce((e,t)=>(e[t]=void 0,e),{});C=T=aB(t.errorSchema,e,`preventDuplicates`)}let n=this.mergeErrors({errorSchema:C,errors:S},e.extraErrors,o.customErrors);S=n.errors,C=n.errorSchema}let E=this.getRegistry(e,_,g),D=vR(o.registry,E)?o.registry:E,O=D.uiSchemaDefinitions?jV(_,l,D):l,k=o.fieldPathId&&o.fieldPathId?.$id===D.globalFormOptions.idPrefix?o.fieldPathId:BV(``,D.globalFormOptions);return{schemaUtils:g,schema:_,uiSchema:O,fieldPathId:k,formData:y,edit:d,errors:S,errorSchema:C,schemaValidationErrors:w,schemaValidationErrorSchema:T,retrievedSchema:b,initialDefaultsGenerated:!0,registry:D}}shouldComponentUpdate(e,t){let{experimental_componentUpdateStrategy:n=`customDeep`}=this.props;return PV(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??i.retrieveSchema(t,e);return i.getValidator().validateFormData(e,c,a,o,s)}renderErrors(e){let{errors:t,errorSchema:n,schema:r,uiSchema:i}=this.state,a=eV(`ErrorListTemplate`,e,hR(i));return t&&t.length?(0,G.jsx)(a,{errors:t,errorSchema:n||{},schema:r,uiSchema:i,registry:e}):null}mergeErrors(e,t,n){let r=e.errorSchema,i=e.errors;if(t){let n=QV(e,t);r=n.errorSchema,i=n.errors}if(n){let e=QV({errors:i,errorSchema:r},n.ErrorSchema,!0);r=e.errorSchema,i=e.errors}return{errors:i,errorSchema:r}}liveValidate(e,t,n,r,i,a,o,s=!1){let c=this.validate(r,e,t,o),l=c.errors,u=c.errorSchema;s&&(u=aB(n,c.errorSchema,`preventDuplicates`));let d=l,f=u;return{...this.mergeErrors({errorSchema:u,errors:l},i,a),schemaValidationErrors:d,schemaValidationErrorSchema:f}}getUsedFormData=(e,t)=>kB(e,t);getFieldNames=(e,t)=>AB(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=BV(``,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:e,path:t,id:n}=this.pendingChanges[0],{newErrorSchema:r}=this.pendingChanges[0],{extraErrors:i,omitExtraData:a,liveOmit:o,noValidate:s,liveValidate:c,onChange:l}=this.props,{formData:u,schemaUtils:d,schema:f,fieldPathId:p,schemaValidationErrorSchema:m,errors:h}=this.state,{customErrors:g,errorSchema:_}=this.state,v=p.path[0]||``,y=!t||t.length===0||t.length===1&&t[0]===v,b=this.state.retrievedSchema,x=y?e:wb(u),S=qL(x)&&Object.keys(x).length>0&&Object.values(x).every(e=>e===void 0)&&u==null?void 0:x;if(qL(x)||Array.isArray(x)){e===JW?GS(x,t):y||AS(x,t,e);let n=this.getStateFromProps(this.props,S,void 0,void 0,void 0,!0);x=n.formData,b=n.retrievedSchema}let C=!s&&(c===!0||c===`onChange`),w={formData:x,schema:f},T=x;if(a===!0&&(o===!0||o===`onChange`)&&(T=this.omitExtraData(x),w={formData:T}),r)if(!cS(y?m:Q(m,t)))y?_=r:AS(_,t,r);else if(g||=new qB,y){let e=Q(r,tR);e&&g.setErrors(e)}else AS(g.ErrorSchema,t,r);else g&&Q(g.ErrorSchema,[...t,`__errors`])&&g.clearErrors(t);if(C&&this.pendingChanges.length===1){let e=this.liveValidate(f,d,_,T,i,g,b);w={formData:T,...e,customErrors:g}}else if(!s&&r){let e=this.mergeErrors({errorSchema:_,errors:h},i,g);w={formData:T,...e,customErrors:g}}this.setState(w,()=>{l&&l(_K({...this.state,...w}),n),this.pendingChanges.shift(),this.processPendingChange()})}updateRetrievedSchema(e){return vR(e,this.state?.retrievedSchema)?this.state.retrievedSchema:e}reset=()=>{let{formData:e,initialFormData:t=YW,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&&n(_K({...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=>!vR(Q(this.state,e),Q(c,e)));this.setState(c,()=>{t&&l&&t(_K({...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?RV(n):[];this.setState({formData:a,errors:r,errorSchema:t,schemaValidationErrors:[],schemaValidationErrorSchema:{}},()=>{i&&i(_K({...this.state,formData:a},`submitted`),e)})}};getGlobalFormOptions(e){let{uiSchema:t={},experimental_componentUpdateStrategy:n,idSeparator:r=`_`,idPrefix:i=uR,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}}}getRegistry(e,t,n){let{translateString:r,uiSchema:i={}}=e,{fields:a,templates:o,widgets:s,formContext:c,translateString:l}=gK();return{fields:{...a,...e.fields},templates:{...o,...e.templates,ButtonTemplates:{...o.ButtonTemplates,...e.templates?.ButtonTemplates}},widgets:{...s,...e.widgets},rootSchema:t,formContext:e.formContext||c,schemaUtils:n,translateString:r||l,globalUiOptions:i[mR],globalFormOptions:this.getGlobalFormOptions(e),uiSchemaDefinitions:i[`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=IS(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}"`),o&&o.length&&(o=o[0]),o&&o.focus()}validateFormWithFormData=e=>{let{extraErrors:t,extraErrorsBlockSubmit:n,focusOnFirstError:r,onError:i}=this.props,{errors:a}=this.state,o=this.validate(e),{errors:s,errorSchema:c}=t?this.mergeErrors(o,t):o,l=o.errors.length>0||t&&n;return l?(r&&(typeof r==`function`?r(s[0]):this.focusOnError(s[0])),this.setState({errors:s,errorSchema:c,schemaValidationErrors:o.errors,schemaValidationErrorSchema:o.errorSchema},()=>{i?i(s):console.error(`Form validation failed`,s)})):s.length>0?this.setState({errors:s,errorSchema:c,schemaValidationErrors:[],schemaValidationErrorSchema:{}}):a.length>0&&this.setState({errors:[],errorSchema:{},schemaValidationErrors:[],schemaValidationErrorSchema:{}}),!l};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`,{[sR]:E={}}=hR(_);f&&(E={...E,props:{...E.props,disabled:!0}});let D={[pR]:{[sR]:E}};return(0,G.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,G.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,G.jsx)(C,{uiSchema:D,registry:x}),m===`bottom`&&this.renderErrors(x)]})}};function yK(e){return(0,b.forwardRef)(({fields:t,widgets:n,templates:r,...i},a)=>(t={...e?.fields,...t},n={...e?.widgets,...n},r={...e?.templates,...r,ButtonTemplates:{...e?.templates?.ButtonTemplates,...r?.ButtonTemplates}},(0,G.jsx)(vK,{...e,...i,fields:t,widgets:n,templates:r,ref:a})))}var bK=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}}})),xK=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.formatLimitDefinition=void 0;var t=Jw(),n=SC(),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)})),SK=u(s(((e,t)=>{Object.defineProperty(e,`__esModule`,{value:!0});var n=bK(),r=xK(),i=SC(),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}))(),1),CK={allErrors:!0,multipleOfPrecision:8,strict:!1,verbose:!0,discriminator:!1},wK=/^(#?([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*\)))$/,TK=/^data:([a-z]+\/[a-z0-9-+.]+)?;(?:name=(.*);)?base64,(.*)$/;function EK(e,t,n={},r,i=Qw.default,a){let o=new i({...CK,...n});return r?(0,SK.default)(o,r):r!==!1&&(0,SK.default)(o),o.addFormat(`data-url`,TK),o.addFormat(`color`,wK),o.addKeyword(YL),o.addKeyword(dR),Array.isArray(e)&&o.addMetaSchema(e),Vh(t)&&Object.keys(t).forEach(e=>{o.addFormat(e,t[e])}),a&&(o=a(o)),o}function DK(e=[],t){return e.map(e=>{let{instancePath:n,keyword:r,params:i,schemaPath:a,parentSchema:o,...s}=e,{message:c=``}=s,l=n.replace(/\//g,`.`),u=`${l} ${c}`.trim(),d=``,f=[...i.deps?.split(`, `)||[],i.missingProperty,i.property].filter(e=>e);if(f.length>0)f.forEach(e=>{let n=hR(Q(t,`${(l?`${l}.${e}`:e).replace(/^\./,``)}`)).title;if(n===void 0&&(n=hR(Q(t,a.replace(/\/properties\//g,`/`).split(`/`).slice(1,-1).concat([e]))).title),n)c=c.replace(`'${e}'`,`'${n}'`),d=n;else{let t=Q(o,[aR,e,`title`]);t&&(c=c.replace(`'${e}'`,`'${t}'`),d=t)}}),u=c;else{let e=hR(Q(t,`${l.replace(/^\./,``)}`)).title;if(e)u=`'${e}' ${c}`.trim(),d=e;else{let e=o?.title;e&&(u=`'${e}' ${c}`.trim(),d=e)}}return`missingProperty`in i&&(l=l?`${l}.${i.missingProperty}`:i.missingProperty),{name:r,property:l,message:c,params:i,stack:u,schemaPath:a,title:d}}).reduce((e,t)=>{let{message:n,schemaPath:r}=t,i=r?.indexOf(`/${QL}/`),a=r?.indexOf(`/${iR}/`),o;return i&&i>=0?o=r?.substring(0,i):a&&a>=0&&(o=r?.substring(0,a)),o&&e.find(e=>e.message===n&&e.schemaPath?.startsWith(o))||e.push(t),e},[])}function OK(e,t,n,r,i,a,o){let{validationError:s}=t,c=DK(t.errors,o);s&&(c=[...c,{stack:s.message}]),typeof a==`function`&&(c=a(c,o));let l=zV(c);if(s&&(l={...l,$schema:{__errors:[s.message]}}),typeof i!=`function`)return{errors:c,errorSchema:l};let u=CB(e,r,n,r,!0),d=VV(i(u,_R(u),o,l));return QV({errors:c,errorSchema:l},d)}var kK=class{constructor(e,t){let{additionalMetaSchemas:n,customFormats:r,ajvOptionsOverrides:i,ajvFormatOptions:a,AjvClass:o,extenderFn:s}=e;this.ajv=EK(n,r,i,a,o,s),this.localizer=t}reset(){this.ajv.removeSchema()}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 OK(this,a,e,t,n,r,i)}handleSchemaUpdate(e){let t=e.$id??fR;this.ajv.getSchema(t)===void 0?this.ajv.addSchema(e,t):vR(e,this.ajv.getSchema(t)?.schema)||(this.ajv.removeSchema(t),this.ajv.addSchema(e,t))}isValid(e,t,n){try{this.handleSchemaUpdate(n);let r=tH(e),i=r.$id??uV(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 AK(e={},t){return new kK(e,t)}var jK=AK(),MK=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),NK=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),PK=e=>{let t=NK(e);return t.charAt(0).toUpperCase()+t.slice(1)},FK=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),IK=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0},LK={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`},RK=(0,b.forwardRef)(({color:e=`currentColor`,size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>(0,b.createElement)(`svg`,{ref:c,...LK,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:FK(`lucide`,i),...!a&&!IK(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,b.createElement)(e,t)),...Array.isArray(a)?a:[a]])),zK=(e,t)=>{let n=(0,b.forwardRef)(({className:n,...r},i)=>(0,b.createElement)(RK,{ref:i,iconNode:t,className:FK(`lucide-${MK(PK(e))}`,`lucide-${e}`,n),...r}));return n.displayName=PK(e),n},BK=zK(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),VK=zK(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),HK=zK(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),UK=zK(`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`}]]),WK=zK(`circle-plus`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M8 12h8`,key:`1wcyev`}],[`path`,{d:`M12 8v8`,key:`napkw2`}]]),GK=zK(`circle`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]),KK=zK(`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`}]]),qK=zK(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),JK=zK(`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`}]]),YK=zK(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]);function XK(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function ZK(...e){return t=>{let n=!1,r=e.map(e=>{let r=XK(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():XK(e[t],null)}}}}function QK(...e){return b.useCallback(ZK(...e),e)}var $K=Symbol.for(`react.lazy`),eq=b.use;function tq(e){return typeof e==`object`&&!!e&&`then`in e}function nq(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===$K&&`_payload`in e&&tq(e._payload)}function rq(e){let t=aq(e),n=b.forwardRef((e,n)=>{let{children:r,...i}=e;nq(r)&&typeof eq==`function`&&(r=eq(r._payload));let a=b.Children.toArray(r),o=a.find(sq);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,G.jsx)(t,{...i,ref:n,children:b.isValidElement(e)?b.cloneElement(e,void 0,r):null})}return(0,G.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}var iq=rq(`Slot`);function aq(e){let t=b.forwardRef((e,t)=>{let{children:n,...r}=e;if(nq(n)&&typeof eq==`function`&&(n=eq(n._payload)),b.isValidElement(n)){let e=lq(n),i=cq(r,n.props);return n.type!==b.Fragment&&(i.ref=t?ZK(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 oq=Symbol(`radix.slottable`);function sq(e){return b.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===oq}function cq(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 lq(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 uq(...e){return rO(AE(e))}var dq=NE(`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 fq({className:e,variant:t,size:n,asChild:r=!1,...i}){return(0,G.jsx)(r?iq:`button`,{"data-slot":`button`,className:uq(dq({variant:t,size:n,className:e})),...i})}function pq({uiSchema:e,registry:t,className:n,...r}){let{translateString:i}=t;return(0,G.jsx)(`div`,{className:`p-0 m-0`,children:(0,G.jsxs)(fq,{...r,className:uq(`w-fit gap-2`,n),variant:`outline`,type:`button`,children:[(0,G.jsx)(WK,{size:16}),` `,i(nH.AddItemButton)]})})}function mq(e){let{children:t,buttonsProps:n,displayLabel:r,hasDescription:i,hasToolbar:a,uiSchema:o,registry:s}=e,c=eV(`ArrayFieldItemButtonsTemplate`,s,hR(o)),l=i?-6:22;return(0,G.jsx)(`div`,{children:(0,G.jsxs)(`div`,{className:`mb-2 flex flex-row flex-wrap items-center`,children:[(0,G.jsx)(`div`,{className:`grow shrink`,children:t}),(0,G.jsx)(`div`,{className:`flex items-end justify-end p-0.5`,children:a&&(0,G.jsx)(`div`,{className:`flex gap-2`,style:{marginLeft:`5px`,marginTop:r?`${l}px`:void 0},children:(0,G.jsx)(c,{...n})})})]})})}function hq(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=hR(i),m=eV(`ArrayFieldDescriptionTemplate`,l,p),h=eV(`ArrayFieldTitleTemplate`,l,p),g=!c&&!n,{ButtonTemplates:{AddButton:_}}=l.templates;return(0,G.jsx)(`div`,{children:(0,G.jsx)(`div`,{className:`m-0 flex p-0`,children:(0,G.jsxs)(`div`,{className:`m-0 w-full p-0`,children:[(0,G.jsx)(h,{fieldPathId:r,title:p.title||f,schema:d,uiSchema:i,required:u,registry:l,optionalDataControl:g?o:void 0}),(0,G.jsx)(m,{fieldPathId:r,description:p.description||d.description,schema:d,uiSchema:i,registry:l}),(0,G.jsxs)(`div`,{className:`p-0 m-0 w-full mb-2`,children:[g?void 0:o,a,t&&(0,G.jsx)(`div`,{className:`mt-2 flex justify-end`,children:(0,G.jsx)(_,{id:bV(r,`add`),className:`rjsf-array-item-add`,onClick:s,disabled:n||c,uiSchema:i,registry:l})})]},`array-item-list-${r.$id}`)]})})})}function gq({className:e,type:t,...n}){return(0,G.jsx)(`input`,{type:t,"data-slot":`input`,className:uq(`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 _q({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={..._,...ZB(m,o,p)},C=({target:{value:e}})=>c(e===``?p.emptyValue:e),w=({target:t})=>u(e,t&&t.value),T=({target:t})=>d(e,t&&t.value),E=(0,b.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),c(p.emptyValue??``)},[c,p.emptyValue]);return(0,G.jsxs)(`div`,{className:`p-0.5`,children:[(0,G.jsx)(gq,{id:e,name:t||e,type:o,placeholder:n,autoFocus:f,required:r,disabled:a,readOnly:i,className:uq({"border-destructive focus-visible:ring-0":h.length>0},v),list:m.examples?hV(e):void 0,...S,value:s||s===0?s:``,onChange:l||C,onBlur:w,onFocus:T,"aria-describedby":vV(e,!!m.examples)}),p.allowClearTextInputs&&!i&&!a&&s&&(0,G.jsx)(x,{onClick:E,registry:y}),g,(0,G.jsx)(pG,{id:e,schema:m})]})}function vq({id:e,description:t,registry:n,uiSchema:r}){return t?(0,G.jsx)(`div`,{children:(0,G.jsx)(`div`,{id:e,className:`text-sm text-muted-foreground`,children:(0,G.jsx)(TG,{description:t,registry:n,uiSchema:r})})}):null}var yq=NE(`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 bq({className:e,variant:t,...n}){return(0,G.jsx)(`div`,{"data-slot":`alert`,role:`alert`,className:uq(yq({variant:t}),e),...n})}function xq({className:e,...t}){return(0,G.jsx)(`div`,{"data-slot":`alert-title`,className:uq(`col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight`,e),...t})}function Sq({className:e,...t}){return(0,G.jsx)(`div`,{"data-slot":`alert-description`,className:uq(`text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed`,e),...t})}function Cq({errors:e,registry:t}){let{translateString:n}=t;return(0,G.jsxs)(bq,{variant:`destructive`,className:`mb-2`,children:[(0,G.jsx)(UK,{className:`h-4 w-4`}),(0,G.jsx)(xq,{children:n(nH.ErrorsLabel)}),(0,G.jsx)(Sq,{className:`flex flex-col gap-1`,children:e.map((e,t)=>(0,G.jsxs)(`span`,{children:[`• `,e.stack]},t))})]})}function wq(e){let{errors:t=[],fieldPathId:n}=e;return t.length===0?null:(0,G.jsx)(`div`,{className:`flex flex-col gap-1`,id:mV(n),children:t.map((e,t)=>(0,G.jsx)(`span`,{className:`text-xs font-medium text-destructive mb-1`,children:e},t))})}function Tq(e){let{fieldPathId:t,help:n,uiSchema:r,registry:i,hasErrors:a}=e;return n?(0,G.jsx)(`span`,{className:uq(`text-xs font-medium text-muted-foreground`,{"text-destructive":a}),id:gV(t),children:(0,G.jsx)(FG,{help:n,registry:i,uiSchema:r})}):null}function Eq({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=hR(y),S=eV(`WrapIfAdditionalTemplate`,b,x);if(f)return(0,G.jsx)(`div`,{className:`hidden`,children:t});let C=x.widget===`checkbox`;return(0,G.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,G.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[n&&!C&&(0,G.jsxs)(`label`,{className:uq(`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,G.jsx)(`span`,{className:uq(`text-xs font-medium text-muted-foreground`,{" text-destructive":r.length>0}),children:o}),i,a]})})}function Dq(e){let{children:t,column:n,className:r,...i}=e;return(0,G.jsx)(`div`,{className:uq(`grid gap-2`,r),...i,children:t})}function Oq(e){let{icon:t,iconType:n,className:r,uiSchema:i,registry:a,...o}=e;return(0,G.jsx)(fq,{size:`icon`,variant:`outline`,className:r,...o,type:`button`,children:t})}function kq(e){let{registry:{translateString:t}}=e;return(0,G.jsx)(Oq,{title:t(nH.CopyButton),...e,icon:(0,G.jsx)(KK,{className:`h-4 w-4`})})}function Aq(e){let{registry:{translateString:t}}=e;return(0,G.jsx)(Oq,{title:t(nH.MoveDownButton),...e,icon:(0,G.jsx)(VK,{className:`h-4 w-4`})})}function jq(e){let{registry:{translateString:t}}=e;return(0,G.jsx)(Oq,{title:t(nH.MoveUpButton),...e,icon:(0,G.jsx)(HK,{className:`h-4 w-4`})})}function Mq(e){let{registry:{translateString:t}}=e;return(0,G.jsx)(Oq,{title:t(nH.RemoveButton),...e,className:`border-destructive`,icon:(0,G.jsx)(JK,{className:`h-4 w-4 stroke-destructive`})})}function Nq(e){let{registry:{translateString:t}}=e;return(0,G.jsx)(Oq,{title:t(nH.ClearButton),...e,icon:(0,G.jsx)(YK,{})})}function Pq({selector:e,optionSchemaField:t}){return(0,G.jsxs)(`div`,{className:uq(`p-4 border rounded-md bg-background shadow-sm`),children:[(0,G.jsx)(`div`,{className:uq(`mb-4`),children:e}),t]})}function Fq({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=hR(i),m=eV(`TitleFieldTemplate`,f,p),h=eV(`DescriptionFieldTemplate`,f,p),g=!d&&!u,{ButtonTemplates:{AddButton:_}}=f.templates;return(0,G.jsxs)(G.Fragment,{children:[t&&(0,G.jsx)(m,{id:_V(a),title:t,required:r,schema:o,uiSchema:i,registry:f,optionalDataControl:g?c:void 0}),e&&(0,G.jsx)(h,{id:pV(a),description:e,schema:o,uiSchema:i,registry:f}),(0,G.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[g?void 0:c,n.map((e,t)=>(0,G.jsx)(`div`,{className:`${e.hidden?`hidden`:``} flex`,children:(0,G.jsx)(`div`,{className:`w-full`,children:e.content})},t)),gR(o,i,s)?(0,G.jsx)(`div`,{className:`mt-2 flex justify-end`,children:(0,G.jsx)(_,{id:bV(a,`add`),onClick:l,disabled:u||d,className:`rjsf-object-property-expand`,uiSchema:i,registry:f})}):null]})]})}function Iq(e){let{id:t,registry:n,label:r,onAddClick:i,onRemoveClick:a}=e;return i?(0,G.jsx)(Oq,{id:t,registry:n,className:`rjsf-add-optional-data`,onClick:i,title:r,icon:(0,G.jsx)(WK,{}),size:`xs`}):a?(0,G.jsx)(Mq,{id:t,registry:n,className:`rjsf-remove-optional-data`,onClick:a,title:r,size:`xs`}):(0,G.jsx)(`em`,{id:t,children:r})}function Lq(e){let{submitText:t,norender:n,props:r}=$B(e.uiSchema);return n?null:(0,G.jsx)(`div`,{children:(0,G.jsx)(fq,{type:`submit`,...r,className:uq(`my-2`,r?.className),children:t})})}var Rq=u(_(),1),zq=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=rq(`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,G.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),Bq=`Separator`,Vq=`horizontal`,Hq=[`horizontal`,`vertical`],Uq=b.forwardRef((e,t)=>{let{decorative:n,orientation:r=Vq,...i}=e,a=Wq(r)?r:Vq,o=a===`vertical`?a:void 0,s=n?{role:`none`}:{"aria-orientation":o,role:`separator`};return(0,G.jsx)(zq.div,{"data-orientation":a,...s,...i,ref:t})});Uq.displayName=Bq;function Wq(e){return Hq.includes(e)}var Gq=Uq;function Kq({className:e,orientation:t=`horizontal`,decorative:n=!0,...r}){return(0,G.jsx)(Gq,{"data-slot":`separator`,decorative:n,orientation:t,className:uq(`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 qq({id:e,title:t,uiSchema:n,optionalDataControl:r}){let i=(0,G.jsx)(`h5`,{children:hR(n).title||t});return r&&(i=(0,G.jsxs)(`div`,{className:`flex flex-row`,children:[(0,G.jsx)(`div`,{className:`flex-grow`,children:i}),(0,G.jsx)(`div`,{className:`flex`,children:r})]})),(0,G.jsxs)(`div`,{id:e,className:`my-1 flex flex-col gap-0.5`,children:[i,(0,G.jsx)(Kq,{dir:`horizontal`,style:{height:`1px`},className:`my-1`})]})}function Jq({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(nH.KeyLabel,[a]);if(!(`__additional_property`in f))return(0,G.jsx)(`div`,{className:e,style:t,children:n});let y=o?22+(l?-28:0):0,b=`${i}-key`;return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(`div`,{className:`grid grid-cols-12 col-span-12 items-center gap-2 ${e}`,style:t,children:[(0,G.jsx)(`div`,{className:`grid gap-2 col-span-5`,children:(0,G.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[o&&(0,G.jsx)(`label`,{htmlFor:b,className:`text-sm font-medium text-muted-foreground leading-none`,children:v}),(0,G.jsx)(`div`,{className:`pl-0.5`,children:(0,G.jsx)(gq,{required:d,defaultValue:a,disabled:r||u,id:b,name:b,onBlur:u?void 0:c,type:`text`,className:`w-full border shadow-sm`})}),!!l&&(0,G.jsx)(`span`,{className:`text-xs font-medium text-muted-foreground`,children:(0,G.jsx)(`div`,{className:`text-sm text-muted-foreground`,children:`\xA0`})})]})}),(0,G.jsx)(`div`,{className:`grid gap-2 col-span-6 pr-0.5`,children:n}),(0,G.jsx)(`div`,{className:`grid gap-2 col-span-1`,style:{marginTop:`${y}px`},children:(0,G.jsx)(_,{id:bV(i,`remove`),iconType:`block`,className:`rjsf-object-property-remove w-full`,disabled:r||u,onClick:s,uiSchema:p,registry:m})})]}),(0,G.jsx)(Kq,{dir:`horizontal`,className:`mt-2`})]})}function Yq(){return{ArrayFieldItemTemplate:mq,ArrayFieldTemplate:hq,BaseInputTemplate:_q,ButtonTemplates:{AddButton:pq,CopyButton:kq,MoveDownButton:Aq,MoveUpButton:jq,RemoveButton:Mq,SubmitButton:Lq,ClearButton:Nq},DescriptionFieldTemplate:vq,ErrorListTemplate:Cq,FieldErrorTemplate:wq,FieldHelpTemplate:Tq,FieldTemplate:Eq,GridTemplate:Dq,MultiSchemaFieldTemplate:Pq,ObjectFieldTemplate:Fq,OptionalDataControlsTemplate:Iq,TitleFieldTemplate:qq,WrapIfAdditionalTemplate:Jq}}function Xq(e,t){let n=b.createContext(t),r=e=>{let{children:t,...r}=e,i=b.useMemo(()=>r,Object.values(r));return(0,G.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 Zq(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,G.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,Qq(i,...t)]}function Qq(...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 $q(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}var eJ=globalThis?.document?b.useLayoutEffect:()=>{},tJ=b.useInsertionEffect||eJ;function nJ({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[i,a,o]=rJ({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=iJ(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}function rJ({defaultProp:e,onChange:t}){let[n,r]=b.useState(e),i=b.useRef(n),a=b.useRef(t);return tJ(()=>{a.current=t},[t]),b.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}function iJ(e){return typeof e==`function`}function aJ(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 oJ(e){let[t,n]=b.useState(void 0);return eJ(()=>{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 sJ(e,t){return b.useReducer((e,n)=>t[e][n]??e,e)}var cJ=e=>{let{present:t,children:n}=e,r=lJ(t),i=typeof n==`function`?n({present:r.isPresent}):b.Children.only(n),a=QK(r.ref,dJ(i));return typeof n==`function`||r.isPresent?b.cloneElement(i,{ref:a}):null};cJ.displayName=`Presence`;function lJ(e){let[t,n]=b.useState(),r=b.useRef(null),i=b.useRef(e),a=b.useRef(`none`),[o,s]=sJ(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return b.useEffect(()=>{let e=uJ(r.current);a.current=o===`mounted`?e:`none`},[o]),eJ(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,o=uJ(t);e?s(`MOUNT`):o===`none`||t?.display===`none`?s(`UNMOUNT`):s(n&&r!==o?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,s]),eJ(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=a=>{let o=uJ(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=uJ(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 uJ(e){return e?.animationName||`none`}function dJ(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 fJ(e){let t=pJ(e),n=b.forwardRef((e,n)=>{let{children:r,...i}=e,a=b.Children.toArray(r),o=a.find(hJ);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,G.jsx)(t,{...i,ref:n,children:b.isValidElement(e)?b.cloneElement(e,void 0,r):null})}return(0,G.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function pJ(e){let t=b.forwardRef((e,t)=>{let{children:n,...r}=e;if(b.isValidElement(n)){let e=_J(n),i=gJ(r,n.props);return n.type!==b.Fragment&&(i.ref=t?ZK(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 mJ=Symbol(`radix.slottable`);function hJ(e){return b.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===mJ}function gJ(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 _J(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 vJ=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=fJ(`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,G.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function yJ(e,t){e&&Rq.flushSync(()=>e.dispatchEvent(t))}var bJ=`Checkbox`,[xJ,Gne]=Zq(bJ),[SJ,CJ]=xJ(bJ);function wJ(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]=nJ({prop:n,defaultProp:i??!1,onChange:c,caller:bJ}),[m,h]=b.useState(null),[g,_]=b.useState(null),v=b.useRef(!1),y=m?!!o||!!m.closest(`form`):!0,x={checked:f,disabled:a,setChecked:p,control:m,setControl:h,name:s,form:o,value:u,hasConsumerStoppedPropagationRef:v,required:l,defaultChecked:NJ(i)?!1:i,isFormControl:y,bubbleInput:g,setBubbleInput:_};return(0,G.jsx)(SJ,{scope:t,...x,children:MJ(d)?d(x):r})}var TJ=`CheckboxTrigger`,EJ=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}=CJ(TJ,e),h=QK(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,G.jsx)(vJ.button,{type:`button`,role:`checkbox`,"aria-checked":NJ(c)?`mixed`:c,"aria-required":l,"data-state":PJ(c),"data-disabled":s?``:void 0,disabled:s,value:o,...r,ref:h,onKeyDown:$q(t,e=>{e.key===`Enter`&&e.preventDefault()}),onClick:$q(n,e=>{d(e=>NJ(e)?!0:!e),m&&p&&(f.current=e.isPropagationStopped(),f.current||e.stopPropagation())})})});EJ.displayName=TJ;var DJ=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,G.jsx)(wJ,{__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,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(EJ,{...d,ref:t,__scopeCheckbox:n}),e&&(0,G.jsx)(jJ,{__scopeCheckbox:n})]})})});DJ.displayName=bJ;var OJ=`CheckboxIndicator`,kJ=b.forwardRef((e,t)=>{let{__scopeCheckbox:n,forceMount:r,...i}=e,a=CJ(OJ,n);return(0,G.jsx)(cJ,{present:r||NJ(a.checked)||a.checked===!0,children:(0,G.jsx)(vJ.span,{"data-state":PJ(a.checked),"data-disabled":a.disabled?``:void 0,...i,ref:t,style:{pointerEvents:`none`,...e.style}})})});kJ.displayName=OJ;var AJ=`CheckboxBubbleInput`,jJ=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}=CJ(AJ,e),m=QK(n,p),h=aJ(a),g=oJ(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=NJ(a),n.call(e,NJ(a)?!1:a),e.dispatchEvent(t)}},[f,h,a,i]);let _=b.useRef(NJ(a)?!1:a);return(0,G.jsx)(vJ.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%)`}})});jJ.displayName=AJ;function MJ(e){return typeof e==`function`}function NJ(e){return e===`indeterminate`}function PJ(e){return NJ(e)?`indeterminate`:e?`checked`:`unchecked`}function FJ(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 IJ=[`color`],LJ=(0,b.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=FJ(e,IJ);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 RJ({className:e,...t}){return(0,G.jsx)(DJ,{"data-slot":`checkbox`,className:uq(`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,G.jsx)(kJ,{"data-slot":`checkbox-indicator`,className:`flex items-center justify-center text-current transition-none`,children:(0,G.jsx)(LJ,{className:`size-3.5`})})})}var zJ=`Label`,BJ=b.forwardRef((e,t)=>(0,G.jsx)(zq.label,{...e,ref:t,onMouseDown:t=>{t.target.closest(`button, input, select, textarea`)||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));BJ.displayName=zJ;var VJ=BJ;function HJ({className:e,...t}){return(0,G.jsx)(VJ,{"data-slot":`label`,className:uq(`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 UJ(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,_=NV(c),v=eV(`DescriptionFieldTemplate`,m,u),y=e=>d(e),b=()=>f(t,r),x=()=>p(t,r),S=u.description||c.description;return(0,G.jsxs)(`div`,{className:`relative ${i||a?`cursor-not-allowed opacity-50`:``}`,"aria-describedby":vV(t),children:[!s&&S&&(0,G.jsx)(v,{id:pV(t),description:S,schema:c,uiSchema:h,registry:m}),(0,G.jsxs)(`div`,{className:`flex items-center gap-2 my-2`,children:[(0,G.jsx)(RJ,{id:t,name:n||t,checked:r===void 0?!1:!!r,required:_,disabled:i||a,autoFocus:l,onCheckedChange:y,onBlur:b,onFocus:x,className:g}),(0,G.jsx)(HJ,{className:`leading-tight`,htmlFor:t,children:wV(o,s||!o)})]})]})}function WJ({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=Array.isArray(i)?i:[i],_=({target:t})=>l(e,HB(t&&t.value,f,h)),v=({target:t})=>u(e,HB(t&&t.value,f,h));return(0,G.jsx)(`div`,{className:uq({"flex flex-col gap-2":!m,"flex flex-row gap-4 flex-wrap":m}),children:Array.isArray(f)&&f.map((r,i)=>{let l=WB(r.value,g),u=Array.isArray(p)&&p.indexOf(r.value)!==-1,m=yV(e,i);return(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,G.jsx)(RJ,{id:m,name:t||e,required:s,disabled:n||u||o,onCheckedChange:e=>{c(e?KB(i,g,f):UB(i,g,f))},className:d,checked:l,autoFocus:a&&i===0,onBlur:_,onFocus:v,"aria-describedby":vV(e)}),(0,G.jsx)(HJ,{className:`leading-tight`,htmlFor:yV(e,i),children:r.label})]},m)})})}function GJ(e){let t=e+`CollectionProvider`,[n,r]=Zq(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,G.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})};o.displayName=t;let s=e+`CollectionSlot`,c=fJ(s),l=b.forwardRef((e,t)=>{let{scope:n,children:r}=e;return(0,G.jsx)(c,{ref:QK(t,a(s,n).collectionRef),children:r})});l.displayName=s;let u=e+`CollectionItemSlot`,d=`data-radix-collection-item`,f=fJ(u),p=b.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=b.useRef(null),s=QK(t,o),c=a(u,n);return b.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,G.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 KJ=b.useId||(()=>void 0),qJ=0;function JJ(e){let[t,n]=b.useState(KJ());return eJ(()=>{e||n(e=>e??String(qJ++))},[e]),e||(t?`radix-${t}`:``)}function YJ(e){let t=b.useRef(e);return b.useEffect(()=>{t.current=e}),b.useMemo(()=>(...e)=>t.current?.(...e),[])}var XJ=b.createContext(void 0);function ZJ(e){let t=b.useContext(XJ);return e||t||`ltr`}var QJ=`rovingFocusGroup.onEntryFocus`,$J={bubbles:!1,cancelable:!0},eY=`RovingFocusGroup`,[tY,nY,rY]=GJ(eY),[iY,aY]=Zq(eY,[rY]),[oY,sY]=iY(eY),cY=b.forwardRef((e,t)=>(0,G.jsx)(tY.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,G.jsx)(tY.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,G.jsx)(lY,{...e,ref:t})})}));cY.displayName=eY;var lY=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=QK(t,f),m=ZJ(a),[h,g]=nJ({prop:o,defaultProp:s??null,onChange:c,caller:eY}),[_,v]=b.useState(!1),y=YJ(l),x=nY(n),S=b.useRef(!1),[C,w]=b.useState(0);return b.useEffect(()=>{let e=f.current;if(e)return e.addEventListener(QJ,y),()=>e.removeEventListener(QJ,y)},[y]),(0,G.jsx)(oY,{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,G.jsx)(vJ.div,{tabIndex:_||C===0?-1:0,"data-orientation":r,...d,ref:p,style:{outline:`none`,...e.style},onMouseDown:$q(e.onMouseDown,()=>{S.current=!0}),onFocus:$q(e.onFocus,e=>{let t=!S.current;if(e.target===e.currentTarget&&t&&!_){let t=new CustomEvent(QJ,$J);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=x().filter(e=>e.focusable);hY([e.find(e=>e.active),e.find(e=>e.id===h),...e].filter(Boolean).map(e=>e.ref.current),u)}}S.current=!1}),onBlur:$q(e.onBlur,()=>v(!1))})})}),uY=`RovingFocusGroupItem`,dY=b.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...s}=e,c=JJ(),l=a||c,u=sY(uY,n),d=u.currentTabStopId===l,f=nY(n),{onFocusableItemAdd:p,onFocusableItemRemove:m,currentTabStopId:h}=u;return b.useEffect(()=>{if(r)return p(),()=>m()},[r,p,m]),(0,G.jsx)(tY.ItemSlot,{scope:n,id:l,focusable:r,active:i,children:(0,G.jsx)(vJ.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...s,ref:t,onMouseDown:$q(e.onMouseDown,e=>{r?u.onItemFocus(l):e.preventDefault()}),onFocus:$q(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:$q(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){u.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=mY(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?gY(n,r+1):n.slice(r+1)}setTimeout(()=>hY(n))}}),children:typeof o==`function`?o({isCurrentTabStop:d,hasTabStop:h!=null}):o})})});dY.displayName=uY;var fY={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function pY(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}function mY(e,t,n){let r=pY(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return fY[r]}function hY(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function gY(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var _Y=cY,vY=dY,yY=`Radio`,[bY,xY]=Zq(yY),[SY,CY]=bY(yY),wY=b.forwardRef((e,t)=>{let{__scopeRadio:n,name:r,checked:i=!1,required:a,disabled:o,value:s=`on`,onCheck:c,form:l,...u}=e,[d,f]=b.useState(null),p=QK(t,e=>f(e)),m=b.useRef(!1),h=d?l||!!d.closest(`form`):!0;return(0,G.jsxs)(SY,{scope:n,checked:i,disabled:o,children:[(0,G.jsx)(vJ.button,{type:`button`,role:`radio`,"aria-checked":i,"data-state":kY(i),"data-disabled":o?``:void 0,disabled:o,value:s,...u,ref:p,onClick:$q(e.onClick,e=>{i||c?.(),h&&(m.current=e.isPropagationStopped(),m.current||e.stopPropagation())})}),h&&(0,G.jsx)(OY,{control:d,bubbles:!m.current,name:r,value:s,checked:i,required:a,disabled:o,form:l,style:{transform:`translateX(-100%)`}})]})});wY.displayName=yY;var TY=`RadioIndicator`,EY=b.forwardRef((e,t)=>{let{__scopeRadio:n,forceMount:r,...i}=e,a=CY(TY,n);return(0,G.jsx)(cJ,{present:r||a.checked,children:(0,G.jsx)(vJ.span,{"data-state":kY(a.checked),"data-disabled":a.disabled?``:void 0,...i,ref:t})})});EY.displayName=TY;var DY=`RadioBubbleInput`,OY=b.forwardRef(({__scopeRadio:e,control:t,checked:n,bubbles:r=!0,...i},a)=>{let o=b.useRef(null),s=QK(o,a),c=aJ(n),l=oJ(t);return b.useEffect(()=>{let e=o.current;if(!e)return;let t=window.HTMLInputElement.prototype,i=Object.getOwnPropertyDescriptor(t,`checked`).set;if(c!==n&&i){let t=new Event(`click`,{bubbles:r});i.call(e,n),e.dispatchEvent(t)}},[c,n,r]),(0,G.jsx)(vJ.input,{type:`radio`,"aria-hidden":!0,defaultChecked:n,...i,tabIndex:-1,ref:s,style:{...i.style,...l,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0}})});OY.displayName=DY;function kY(e){return e?`checked`:`unchecked`}var AY=[`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`],jY=`RadioGroup`,[MY,Kne]=Zq(jY,[aY,xY]),NY=aY(),PY=xY(),[FY,IY]=MY(jY),LY=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=NY(n),m=ZJ(l),[h,g]=nJ({prop:a,defaultProp:i??null,onChange:d,caller:jY});return(0,G.jsx)(FY,{scope:n,name:r,required:o,disabled:s,value:h,onValueChange:g,children:(0,G.jsx)(_Y,{asChild:!0,...p,orientation:c,dir:m,loop:u,children:(0,G.jsx)(vJ.div,{role:`radiogroup`,"aria-required":o,"aria-orientation":c,"data-disabled":s?``:void 0,dir:m,...f,ref:t})})})});LY.displayName=jY;var RY=`RadioGroupItem`,zY=b.forwardRef((e,t)=>{let{__scopeRadioGroup:n,disabled:r,...i}=e,a=IY(RY,n),o=a.disabled||r,s=NY(n),c=PY(n),l=b.useRef(null),u=QK(t,l),d=a.value===i.value,f=b.useRef(!1);return b.useEffect(()=>{let e=e=>{AY.includes(e.key)&&(f.current=!0)},t=()=>f.current=!1;return document.addEventListener(`keydown`,e),document.addEventListener(`keyup`,t),()=>{document.removeEventListener(`keydown`,e),document.removeEventListener(`keyup`,t)}},[]),(0,G.jsx)(vY,{asChild:!0,...s,focusable:!o,active:d,children:(0,G.jsx)(wY,{disabled:o,required:a.required,checked:d,...c,...i,name:a.name,ref:u,onCheck:()=>a.onValueChange(i.value),onKeyDown:$q(e=>{e.key===`Enter`&&e.preventDefault()}),onFocus:$q(i.onFocus,()=>{f.current&&l.current?.click()})})})});zY.displayName=RY;var BY=`RadioGroupIndicator`,VY=b.forwardRef((e,t)=>{let{__scopeRadioGroup:n,...r}=e;return(0,G.jsx)(EY,{...PY(n),...r,ref:t})});VY.displayName=BY;var HY=LY,UY=zY,WY=VY;function GY({className:e,...t}){return(0,G.jsx)(HY,{"data-slot":`radio-group`,className:uq(`grid gap-3`,e),...t})}function KY({className:e,...t}){return(0,G.jsx)(UY,{"data-slot":`radio-group-item`,className:uq(`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,G.jsx)(WY,{"data-slot":`radio-group-indicator`,className:`relative flex items-center justify-center`,children:(0,G.jsx)(GK,{className:`fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2`})})})}function qY({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=e=>o(HB(e,u,f)),m=({target:t})=>s(e,HB(t&&t.value,u,f)),h=({target:t})=>c(e,HB(t&&t.value,u,f)),g=!!(t&&t.inline);return(0,G.jsx)(`div`,{className:`mb-0`,children:(0,G.jsx)(GY,{defaultValue:n?.toString(),required:r,disabled:i||a,onValueChange:e=>{p(e)},onBlur:m,onFocus:h,"aria-describedby":vV(e),orientation:g?`horizontal`:`vertical`,className:uq(`flex flex-wrap`,{"flex-col":!g},l),children:Array.isArray(u)&&u.map((t,r)=>{let i=Array.isArray(d)&&d.indexOf(t.value)!==-1;return(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,G.jsx)(KY,{checked:WB(t.value,n),value:r.toString(),id:yV(e,r),disabled:i}),(0,G.jsx)(HJ,{className:`leading-tight`,htmlFor:yV(e,r),children:t.label})]},yV(e,r))})})})}function JY(e,[t,n]){return Math.min(n,Math.max(t,e))}var YY=[`PageUp`,`PageDown`],XY=[`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`],ZY={"from-left":[`Home`,`PageDown`,`ArrowDown`,`ArrowLeft`],"from-right":[`Home`,`PageDown`,`ArrowDown`,`ArrowRight`],"from-bottom":[`Home`,`PageDown`,`ArrowDown`,`ArrowLeft`],"from-top":[`Home`,`PageDown`,`ArrowUp`,`ArrowLeft`]},QY=`Slider`,[$Y,eX,tX]=GJ(QY),[nX,qne]=Zq(QY,[tX]),[rX,iX]=nX(QY),aX=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`?cX:lX,[y=[],x]=nJ({prop:u,defaultProp:l,onChange:e=>{[...g.current][_.current]?.focus(),d(e)}}),S=b.useRef(y);function C(e){E(e,CX(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=OX(a),s=JY(kX(Math.round((e-r)/a)*a+r,o),[r,i]);x((e=[])=>{let r=bX(e,s,t);if(EX(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,G.jsx)(rX,{scope:e.__scopeSlider,name:n,disabled:s,min:r,max:i,valueIndexToChangeRef:_,thumbs:g.current,values:y,orientation:o,form:m,children:(0,G.jsx)($Y.Provider,{scope:e.__scopeSlider,children:(0,G.jsx)($Y.Slot,{scope:e.__scopeSlider,children:(0,G.jsx)(v,{"aria-disabled":s,"data-disabled":s?``:void 0,...h,ref:t,onPointerDown:$q(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=YY.includes(e.key)||e.shiftKey&&XY.includes(e.key)?10:1,r=_.current,i=y[r];E(i+a*n*t,r,{commit:!0})}}})})})})});aX.displayName=QY;var[oX,sX]=nX(QY,{startEdge:`left`,endEdge:`right`,size:`width`,direction:1}),cX=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=QK(t,e=>f(e)),m=b.useRef(void 0),h=ZJ(i),g=h===`ltr`,_=g&&!a||!g&&a;function v(e){let t=m.current||d.getBoundingClientRect(),i=DX([0,t.width],_?[n,r]:[r,n]);return m.current=t,i(e-t.left)}return(0,G.jsx)(oX,{scope:e.__scopeSlider,startEdge:_?`left`:`right`,endEdge:_?`right`:`left`,direction:_?1:-1,size:`width`,children:(0,G.jsx)(uX,{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=ZY[_?`from-left`:`from-right`].includes(e.key);l?.({event:e,direction:t?-1:1})}})})}),lX=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=QK(t,u),f=b.useRef(void 0),p=!i;function m(e){let t=f.current||u.current.getBoundingClientRect(),i=DX([0,t.height],p?[r,n]:[n,r]);return f.current=t,i(e-t.top)}return(0,G.jsx)(oX,{scope:e.__scopeSlider,startEdge:p?`bottom`:`top`,endEdge:p?`top`:`bottom`,size:`height`,direction:p?1:-1,children:(0,G.jsx)(uX,{"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=ZY[p?`from-bottom`:`from-top`].includes(e.key);c?.({event:e,direction:t?-1:1})}})})}),uX=b.forwardRef((e,t)=>{let{__scopeSlider:n,onSlideStart:r,onSlideMove:i,onSlideEnd:a,onHomeKeyDown:o,onEndKeyDown:s,onStepKeyDown:c,...l}=e,u=iX(QY,n);return(0,G.jsx)(vJ.span,{...l,ref:t,onKeyDown:$q(e.onKeyDown,e=>{e.key===`Home`?(o(e),e.preventDefault()):e.key===`End`?(s(e),e.preventDefault()):YY.concat(XY).includes(e.key)&&(c(e),e.preventDefault())}),onPointerDown:$q(e.onPointerDown,e=>{let t=e.target;t.setPointerCapture(e.pointerId),e.preventDefault(),u.thumbs.has(t)?t.focus():r(e)}),onPointerMove:$q(e.onPointerMove,e=>{e.target.hasPointerCapture(e.pointerId)&&i(e)}),onPointerUp:$q(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&(t.releasePointerCapture(e.pointerId),a(e))})})}),dX=`SliderTrack`,fX=b.forwardRef((e,t)=>{let{__scopeSlider:n,...r}=e,i=iX(dX,n);return(0,G.jsx)(vJ.span,{"data-disabled":i.disabled?``:void 0,"data-orientation":i.orientation,...r,ref:t})});fX.displayName=dX;var pX=`SliderRange`,mX=b.forwardRef((e,t)=>{let{__scopeSlider:n,...r}=e,i=iX(pX,n),a=sX(pX,n),o=QK(t,b.useRef(null)),s=i.values.length,c=i.values.map(e=>xX(e,i.min,i.max)),l=s>1?Math.min(...c):0,u=100-Math.max(...c);return(0,G.jsx)(vJ.span,{"data-orientation":i.orientation,"data-disabled":i.disabled?``:void 0,...r,ref:o,style:{...e.style,[a.startEdge]:l+`%`,[a.endEdge]:u+`%`}})});mX.displayName=pX;var hX=`SliderThumb`,gX=b.forwardRef((e,t)=>{let n=eX(e.__scopeSlider),[r,i]=b.useState(null),a=QK(t,e=>i(e)),o=b.useMemo(()=>r?n().findIndex(e=>e.ref.current===r):-1,[n,r]);return(0,G.jsx)(_X,{...e,ref:a,index:o})}),_X=b.forwardRef((e,t)=>{let{__scopeSlider:n,index:r,name:i,...a}=e,o=iX(hX,n),s=sX(hX,n),[c,l]=b.useState(null),u=QK(t,e=>l(e)),d=c?o.form||!!c.closest(`form`):!0,f=oJ(c),p=o.values[r],m=p===void 0?0:xX(p,o.min,o.max),h=SX(r,o.values.length),g=f?.[s.size],_=g?wX(g,m,s.direction):0;return b.useEffect(()=>{if(c)return o.thumbs.add(c),()=>{o.thumbs.delete(c)}},[c,o.thumbs]),(0,G.jsxs)(`span`,{style:{transform:`var(--radix-slider-thumb-transform)`,position:`absolute`,[s.startEdge]:`calc(${m}% + ${_}px)`},children:[(0,G.jsx)($Y.ItemSlot,{scope:e.__scopeSlider,children:(0,G.jsx)(vJ.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:$q(e.onFocus,()=>{o.valueIndexToChangeRef.current=r})})}),d&&(0,G.jsx)(yX,{name:i??(o.name?o.name+(o.values.length>1?`[]`:``):void 0),form:o.form,value:p},r)]})});gX.displayName=hX;var vX=`RadioBubbleInput`,yX=b.forwardRef(({__scopeSlider:e,value:t,...n},r)=>{let i=b.useRef(null),a=QK(i,r),o=aJ(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,G.jsx)(vJ.input,{style:{display:`none`},...n,ref:a,defaultValue:t})});yX.displayName=vX;function bX(e=[],t,n){let r=[...e];return r[n]=t,r.sort((e,t)=>e-t)}function xX(e,t,n){return JY(100/(n-t)*(e-t),[0,100])}function SX(e,t){if(t>2)return`Value ${e+1} of ${t}`;if(t===2)return[`Minimum`,`Maximum`][e]}function CX(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 wX(e,t,n){let r=e/2;return(r-DX([0,50],[0,r])(t)*n)*n}function TX(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function EX(e,t){if(t>0){let n=TX(e);return Math.min(...n)>=t}return!0}function DX(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 OX(e){return(String(e).split(`.`)[1]||``).length}function kX(e,t){let n=10**t;return Math.round(e*n)/n}var AX=aX,jX=fX,MX=mX,NX=gX;function PX({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,G.jsxs)(AX,{"data-slot":`slider`,defaultValue:t,value:n,min:r,max:i,className:uq(`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,G.jsx)(jX,{"data-slot":`slider-track`,className:uq(`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,G.jsx)(MX,{"data-slot":`slider-range`,className:uq(`bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full`)})}),Array.from({length:o.length},(e,t)=>(0,G.jsx)(NX,{"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 FX=[`name`,`min`,`max`,`step`,`orientation`,`disabled`,`defaultValue`,`value`,`onValueChange`,`className`,`dir`,`inverted`,`minStepsBetweenThumbs`];function IX({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,...XB(i)},u={id:s,...DS(r.props||{},FX)};return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(PX,{disabled:n||t,min:l.min,max:l.max,step:l.step,value:[e],onValueChange:c,...u,"aria-describedby":vV(s)}),e]})}var LX=1,RX=.9,zX=.8,BX=.17,VX=.1,HX=.999,UX=.9999,WX=.99,GX=/[\\\/_+.#"@\[\(\{&]/,KX=/[\\\/_+.#"@\[\(\{&]/g,qX=/[\s-]/,JX=/[\s-]/g;function YX(e,t,n,r,i,a,o){if(a===t.length)return i===e.length?LX:WX;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=YX(e,t,n,r,l+1,a+1,o),d>u&&(l===i?d*=LX:GX.test(e.charAt(l-1))?(d*=zX,p=e.slice(i,l-1).match(KX),p&&i>0&&(d*=HX**+p.length)):qX.test(e.charAt(l-1))?(d*=RX,m=e.slice(i,l-1).match(JX),m&&i>0&&(d*=HX**+m.length)):(d*=BX,i>0&&(d*=HX**+(l-i))),e.charAt(l)!==t.charAt(a)&&(d*=UX)),(d<VX&&n.charAt(l-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(l-1)!==r.charAt(a))&&(f=YX(e,t,n,r,l+1,a+2,o),f*VX>d&&(d=f*VX)),d>u&&(u=d),l=n.indexOf(c,l+1);return o[s]=u,u}function XX(e){return e.toLowerCase().replace(JX,` `)}function ZX(e,t,n){return e=n&&n.length>0?`${e+` `+n.join(` `)}`:e,YX(e,t,XX(e),XX(t),0,0,{})}function QX(e,t=globalThis?.document){let n=YJ(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 $X=`DismissableLayer`,eZ=`dismissableLayer.update`,tZ=`dismissableLayer.pointerDownOutside`,nZ=`dismissableLayer.focusOutside`,rZ,iZ=b.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),aZ=b.forwardRef((e,t)=>{let{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:s,...c}=e,l=b.useContext(iZ),[u,d]=b.useState(null),f=u?.ownerDocument??globalThis?.document,[,p]=b.useState({}),m=QK(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=cZ(e=>{let t=e.target,n=[...l.branches].some(e=>e.contains(t));!x||n||(i?.(e),o?.(e),e.defaultPrevented||s?.())},f),C=lZ(e=>{let t=e.target;[...l.branches].some(e=>e.contains(t))||(a?.(e),o?.(e),e.defaultPrevented||s?.())},f);return QX(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&&(rZ=f.body.style.pointerEvents,f.body.style.pointerEvents=`none`),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),uZ(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=rZ)}},[u,f,n,l]),b.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),uZ())},[u,l]),b.useEffect(()=>{let e=()=>p({});return document.addEventListener(eZ,e),()=>document.removeEventListener(eZ,e)},[]),(0,G.jsx)(vJ.div,{...c,ref:m,style:{pointerEvents:y?x?`auto`:`none`:void 0,...e.style},onFocusCapture:$q(e.onFocusCapture,C.onFocusCapture),onBlurCapture:$q(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:$q(e.onPointerDownCapture,S.onPointerDownCapture)})});aZ.displayName=$X;var oZ=`DismissableLayerBranch`,sZ=b.forwardRef((e,t)=>{let n=b.useContext(iZ),r=b.useRef(null),i=QK(t,r);return b.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,G.jsx)(vJ.div,{...e,ref:i})});sZ.displayName=oZ;function cZ(e,t=globalThis?.document){let n=YJ(e),r=b.useRef(!1),i=b.useRef(()=>{});return b.useEffect(()=>{let e=e=>{if(e.target&&!r.current){let r=function(){dZ(tZ,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 lZ(e,t=globalThis?.document){let n=YJ(e),r=b.useRef(!1);return b.useEffect(()=>{let e=e=>{e.target&&!r.current&&dZ(nZ,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 uZ(){let e=new CustomEvent(eZ);document.dispatchEvent(e)}function dZ(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?yJ(i,a):i.dispatchEvent(a)}var fZ=`focusScope.autoFocusOnMount`,pZ=`focusScope.autoFocusOnUnmount`,mZ={bubbles:!1,cancelable:!0},hZ=`FocusScope`,gZ=b.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=b.useState(null),l=YJ(i),u=YJ(a),d=b.useRef(null),f=QK(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:CZ(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||CZ(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&CZ(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){wZ.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(fZ,mZ);s.addEventListener(fZ,l),s.dispatchEvent(t),t.defaultPrevented||(_Z(DZ(yZ(s)),{select:!0}),document.activeElement===e&&CZ(s))}return()=>{s.removeEventListener(fZ,l),setTimeout(()=>{let t=new CustomEvent(pZ,mZ);s.addEventListener(pZ,u),s.dispatchEvent(t),t.defaultPrevented||CZ(e??document.body,{select:!0}),s.removeEventListener(pZ,u),wZ.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]=vZ(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&CZ(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&CZ(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return(0,G.jsx)(vJ.div,{tabIndex:-1,...o,ref:f,onKeyDown:m})});gZ.displayName=hZ;function _Z(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(CZ(r,{select:t}),document.activeElement!==n)return}function vZ(e){let t=yZ(e);return[bZ(t,e),bZ(t.reverse(),e)]}function yZ(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 bZ(e,t){for(let n of e)if(!xZ(n,{upTo:t}))return n}function xZ(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 SZ(e){return e instanceof HTMLInputElement&&`select`in e}function CZ(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&SZ(e)&&t&&e.select()}}var wZ=TZ();function TZ(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=EZ(e,t),e.unshift(t)},remove(t){e=EZ(e,t),e[0]?.resume()}}}function EZ(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function DZ(e){return e.filter(e=>e.tagName!==`A`)}var OZ=`Portal`,kZ=b.forwardRef((e,t)=>{let{container:n,...r}=e,[i,a]=b.useState(!1);eJ(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?Rq.createPortal((0,G.jsx)(vJ.div,{...r,ref:t}),o):null});kZ.displayName=OZ;var AZ=0;function jZ(){b.useEffect(()=>{let e=document.querySelectorAll(`[data-radix-focus-guard]`);return document.body.insertAdjacentElement(`afterbegin`,e[0]??MZ()),document.body.insertAdjacentElement(`beforeend`,e[1]??MZ()),AZ++,()=>{AZ===1&&document.querySelectorAll(`[data-radix-focus-guard]`).forEach(e=>e.remove()),AZ--}},[])}function MZ(){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 NZ=function(){return NZ=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},NZ.apply(this,arguments)};function PZ(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 FZ(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 IZ(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 LZ=`right-scroll-bar-position`,RZ=`width-before-scroll-bar`,zZ=`with-scroll-bars-hidden`,BZ=`--removed-body-scroll-bar-size`;function VZ(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function HZ(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 UZ=typeof window<`u`?b.useLayoutEffect:b.useEffect,WZ=new WeakMap;function GZ(e,t){var n=HZ(t||null,function(t){return e.forEach(function(e){return VZ(e,t)})});return UZ(function(){var t=WZ.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||VZ(e,null)}),i.forEach(function(e){r.has(e)||VZ(e,a)})}WZ.set(n,e)},[e]),n}function KZ(e){return e}function qZ(e,t){t===void 0&&(t=KZ);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 JZ(e){e===void 0&&(e={});var t=qZ(null);return t.options=NZ({async:!0,ssr:!1},e),t}var YZ=function(e){var t=e.sideCar,n=PZ(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,NZ({},n))};YZ.isSideCarExport=!0;function XZ(e,t){return e.useMedium(t),YZ}var ZZ=JZ(),QZ=function(){},$Z=b.forwardRef(function(e,t){var n=b.useRef(null),r=b.useState({onScrollCapture:QZ,onWheelCapture:QZ,onTouchMoveCapture:QZ}),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=PZ(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),S=f,C=GZ([n,t]),w=NZ(NZ({},x),i);return b.createElement(b.Fragment,null,u&&b.createElement(S,{sideCar:ZZ,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),NZ(NZ({},w),{ref:C})):b.createElement(v,NZ({},w,{className:c,ref:C}),s))});$Z.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},$Z.classNames={fullWidth:RZ,zeroRight:LZ};var eQ,tQ=function(){if(eQ)return eQ;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function nQ(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=tQ();return t&&e.setAttribute(`nonce`,t),e}function rQ(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function iQ(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var aQ=function(){var e=0,t=null;return{add:function(n){e==0&&(t=nQ())&&(rQ(t,n),iQ(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},oQ=function(){var e=aQ();return function(t,n){b.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},sQ=function(){var e=oQ();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},cQ={left:0,top:0,right:0,gap:0},lQ=function(e){return parseInt(e||``,10)||0},uQ=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[lQ(n),lQ(r),lQ(i)]},dQ=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return cQ;var t=uQ(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])}},fQ=sQ(),pQ=`data-scroll-locked`,mQ=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
|
|
86
|
+
.${zZ} {
|
|
87
|
+
overflow: hidden ${r};
|
|
88
|
+
padding-right: ${s}px ${r};
|
|
89
|
+
}
|
|
90
|
+
body[${pQ}] {
|
|
91
|
+
overflow: hidden ${r};
|
|
92
|
+
overscroll-behavior: contain;
|
|
93
|
+
${[t&&`position: relative ${r};`,n===`margin`&&`
|
|
94
|
+
padding-left: ${i}px;
|
|
95
|
+
padding-top: ${a}px;
|
|
96
|
+
padding-right: ${o}px;
|
|
97
|
+
margin-left:0;
|
|
98
|
+
margin-top:0;
|
|
99
|
+
margin-right: ${s}px ${r};
|
|
100
|
+
`,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.${LZ} {
|
|
104
|
+
right: ${s}px ${r};
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.${RZ} {
|
|
108
|
+
margin-right: ${s}px ${r};
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.${LZ} .${LZ} {
|
|
112
|
+
right: 0 ${r};
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.${RZ} .${RZ} {
|
|
116
|
+
margin-right: 0 ${r};
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
body[${pQ}] {
|
|
120
|
+
${BZ}: ${s}px;
|
|
121
|
+
}
|
|
122
|
+
`},hQ=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},gQ=function(){b.useEffect(function(){return document.body.setAttribute(pQ,(hQ()+1).toString()),function(){var e=hQ()-1;e<=0?document.body.removeAttribute(pQ):document.body.setAttribute(pQ,e.toString())}},[])},_Q=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;gQ();var a=b.useMemo(function(){return dQ(i)},[i]);return b.createElement(fQ,{styles:mQ(a,!t,i,n?``:`!important`)})},vQ=!1;if(typeof window<`u`)try{var yQ=Object.defineProperty({},`passive`,{get:function(){return vQ=!0,!0}});window.addEventListener(`test`,yQ,yQ),window.removeEventListener(`test`,yQ,yQ)}catch{vQ=!1}var bQ=vQ?{passive:!1}:!1,xQ=function(e){return e.tagName===`TEXTAREA`},SQ=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!xQ(e)&&n[t]===`visible`)},CQ=function(e){return SQ(e,`overflowY`)},wQ=function(e){return SQ(e,`overflowX`)},TQ=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),OQ(e,r)){var i=kQ(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},EQ=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},DQ=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},OQ=function(e,t){return e===`v`?CQ(t):wQ(t)},kQ=function(e,t){return e===`v`?EQ(t):DQ(t)},AQ=function(e,t){return e===`h`&&t===`rtl`?-1:1},jQ=function(e,t,n,r,i){var a=AQ(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=kQ(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&OQ(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},MQ=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},NQ=function(e){return[e.deltaX,e.deltaY]},PQ=function(e){return e&&`current`in e?e.current:e},FQ=function(e,t){return e[0]===t[0]&&e[1]===t[1]},IQ=function(e){return`
|
|
123
|
+
.block-interactivity-${e} {pointer-events: none;}
|
|
124
|
+
.allow-interactivity-${e} {pointer-events: all;}
|
|
125
|
+
`},LQ=0,RQ=[];function zQ(e){var t=b.useRef([]),n=b.useRef([0,0]),r=b.useRef(),i=b.useState(LQ++)[0],a=b.useState(sQ)[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=IZ([e.lockRef.current],(e.shards||[]).map(PQ),!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=MQ(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=TQ(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=TQ(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 jQ(h,t,e,h===`h`?s:c,!0)},[]),c=b.useCallback(function(e){var n=e;if(!(!RQ.length||RQ[RQ.length-1]!==a)){var r=`deltaY`in n?NQ(n):MQ(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&FQ(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(PQ).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:BQ(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=MQ(e),r.current=void 0},[]),d=b.useCallback(function(t){l(t.type,NQ(t),t.target,s(t,e.lockRef.current))},[]),f=b.useCallback(function(t){l(t.type,MQ(t),t.target,s(t,e.lockRef.current))},[]);b.useEffect(function(){return RQ.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,bQ),document.addEventListener(`touchmove`,c,bQ),document.addEventListener(`touchstart`,u,bQ),function(){RQ=RQ.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,bQ),document.removeEventListener(`touchmove`,c,bQ),document.removeEventListener(`touchstart`,u,bQ)}},[]);var p=e.removeScrollBar,m=e.inert;return b.createElement(b.Fragment,null,m?b.createElement(a,{styles:IQ(i)}):null,p?b.createElement(_Q,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function BQ(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var VQ=XZ(ZZ,zQ),HQ=b.forwardRef(function(e,t){return b.createElement($Z,NZ({},e,{ref:t,sideCar:VQ}))});HQ.classNames=$Z.classNames;var UQ=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},WQ=new WeakMap,GQ=new WeakMap,KQ={},qQ=0,JQ=function(e){return e&&(e.host||JQ(e.parentNode))},YQ=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=JQ(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})},XQ=function(e,t,n,r){var i=YQ(t,Array.isArray(e)?e:[e]);KQ[n]||(KQ[n]=new WeakMap);var a=KQ[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=(WQ.get(e)||0)+1,l=(a.get(e)||0)+1;WQ.set(e,c),a.set(e,l),o.push(e),c===1&&i&&GQ.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(),qQ++,function(){o.forEach(function(e){var t=WQ.get(e)-1,i=a.get(e)-1;WQ.set(e,t),a.set(e,i),t||(GQ.has(e)||e.removeAttribute(r),GQ.delete(e)),i||e.removeAttribute(n)}),qQ--,qQ||(WQ=new WeakMap,WQ=new WeakMap,GQ=new WeakMap,KQ={})}},ZQ=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||UQ(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),XQ(r,i,n,`aria-hidden`)):function(){return null}},QQ=`Dialog`,[$Q,Jne]=Zq(QQ),[e$,t$]=$Q(QQ),n$=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]=nJ({prop:r,defaultProp:i??!1,onChange:a,caller:QQ});return(0,G.jsx)(e$,{scope:t,triggerRef:s,contentRef:c,contentId:JJ(),titleId:JJ(),descriptionId:JJ(),open:l,onOpenChange:u,onOpenToggle:b.useCallback(()=>u(e=>!e),[u]),modal:o,children:n})};n$.displayName=QQ;var r$=`DialogTrigger`,i$=b.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=t$(r$,n),a=QK(t,i.triggerRef);return(0,G.jsx)(vJ.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.contentId,"data-state":w$(i.open),...r,ref:a,onClick:$q(e.onClick,i.onOpenToggle)})});i$.displayName=r$;var a$=`DialogPortal`,[o$,s$]=$Q(a$,{forceMount:void 0}),c$=e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=t$(a$,t);return(0,G.jsx)(o$,{scope:t,forceMount:n,children:b.Children.map(r,e=>(0,G.jsx)(cJ,{present:n||a.open,children:(0,G.jsx)(kZ,{asChild:!0,container:i,children:e})}))})};c$.displayName=a$;var l$=`DialogOverlay`,u$=b.forwardRef((e,t)=>{let n=s$(l$,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=t$(l$,e.__scopeDialog);return a.modal?(0,G.jsx)(cJ,{present:r||a.open,children:(0,G.jsx)(f$,{...i,ref:t})}):null});u$.displayName=l$;var d$=fJ(`DialogOverlay.RemoveScroll`),f$=b.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=t$(l$,n);return(0,G.jsx)(HQ,{as:d$,allowPinchZoom:!0,shards:[i.contentRef],children:(0,G.jsx)(vJ.div,{"data-state":w$(i.open),...r,ref:t,style:{pointerEvents:`auto`,...r.style}})})}),p$=`DialogContent`,m$=b.forwardRef((e,t)=>{let n=s$(p$,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=t$(p$,e.__scopeDialog);return(0,G.jsx)(cJ,{present:r||a.open,children:a.modal?(0,G.jsx)(h$,{...i,ref:t}):(0,G.jsx)(g$,{...i,ref:t})})});m$.displayName=p$;var h$=b.forwardRef((e,t)=>{let n=t$(p$,e.__scopeDialog),r=b.useRef(null),i=QK(t,n.contentRef,r);return b.useEffect(()=>{let e=r.current;if(e)return ZQ(e)},[]),(0,G.jsx)(_$,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:$q(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:$q(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:$q(e.onFocusOutside,e=>e.preventDefault())})}),g$=b.forwardRef((e,t)=>{let n=t$(p$,e.__scopeDialog),r=b.useRef(!1),i=b.useRef(!1);return(0,G.jsx)(_$,{...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()}})}),_$=b.forwardRef((e,t)=>{let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=t$(p$,n),c=b.useRef(null),l=QK(t,c);return jZ(),(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(gZ,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,G.jsx)(aZ,{role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":w$(s.open),...o,ref:l,onDismiss:()=>s.onOpenChange(!1)})}),(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(D$,{titleId:s.titleId}),(0,G.jsx)(k$,{contentRef:c,descriptionId:s.descriptionId})]})]})}),v$=`DialogTitle`,y$=b.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=t$(v$,n);return(0,G.jsx)(vJ.h2,{id:i.titleId,...r,ref:t})});y$.displayName=v$;var b$=`DialogDescription`,x$=b.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=t$(b$,n);return(0,G.jsx)(vJ.p,{id:i.descriptionId,...r,ref:t})});x$.displayName=b$;var S$=`DialogClose`,C$=b.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=t$(S$,n);return(0,G.jsx)(vJ.button,{type:`button`,...r,ref:t,onClick:$q(e.onClick,()=>i.onOpenChange(!1))})});C$.displayName=S$;function w$(e){return e?`open`:`closed`}var T$=`DialogTitleWarning`,[Yne,E$]=Xq(T$,{contentName:p$,titleName:v$,docsSlug:`dialog`}),D$=({titleId:e})=>{let t=E$(T$),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
126
|
+
|
|
127
|
+
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
128
|
+
|
|
129
|
+
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},O$=`DialogDescriptionWarning`,k$=({contentRef:e,descriptionId:t})=>{let n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${E$(O$).contentName}}.`;return b.useEffect(()=>{let r=e.current?.getAttribute(`aria-describedby`);t&&r&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},A$=n$,j$=c$,M$=u$,N$=m$,P$=`[cmdk-group=""]`,F$=`[cmdk-group-items=""]`,I$=`[cmdk-group-heading=""]`,L$=`[cmdk-item=""]`,R$=`${L$}:not([aria-disabled="true"])`,z$=`cmdk-item-select`,B$=`data-value`,V$=(e,t,n)=>ZX(e,t,n),H$=b.createContext(void 0),U$=()=>b.useContext(H$),W$=b.createContext(void 0),G$=()=>b.useContext(W$),K$=b.createContext(void 0),q$=b.forwardRef((e,t)=>{let n=s1(()=>({search:``,value:e.value??e.defaultValue??``,selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}})),r=s1(()=>new Set),i=s1(()=>new Map),a=s1(()=>new Map),o=s1(()=>new Set),s=a1(e),{label:c,children:l,value:u,onValueChange:d,filter:f,shouldFilter:p,loop:m,disablePointerSelection:h=!1,vimBindings:g=!0,..._}=e,v=JJ(),y=JJ(),x=JJ(),S=b.useRef(null),C=u1();o1(()=>{if(u!==void 0){let e=u.trim();n.current.value=e,w.emit()}},[u]),o1(()=>{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??V$;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(F$);t?t.appendChild(e.parentElement===t?e:e.closest(`${F$} > *`)):r.appendChild(e.parentElement===r?e:e.closest(`${F$} > *`))}),t.sort((e,t)=>t[1]-e[1]).forEach(e=>{let t=S.current?.querySelector(`${P$}[${B$}="${encodeURIComponent(e[0])}"]`);t?.parentElement.appendChild(t)})}function O(){let e=M().find(e=>e.getAttribute(`aria-disabled`)!==`true`)?.getAttribute(B$);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(P$)?.querySelector(I$))==null||e.scrollIntoView({block:`nearest`})),t.scrollIntoView({block:`nearest`}))}function j(){return S.current?.querySelector(`${L$}[aria-selected="true"]`)}function M(){return Array.from(S.current?.querySelectorAll(R$)||[])}function N(e){let t=M()[e];t&&w.setState(`value`,t.getAttribute(B$))}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(B$))}function F(e){let t=j()?.closest(P$),n;for(;t&&!n;)t=e>0?r1(t,P$):i1(t,P$),n=t?.querySelector(R$);n?w.setState(`value`,n.getAttribute(B$)):P(e)}let I=()=>N(M().length-1),L=e=>{e.preventDefault(),e.metaKey?I():e.altKey?F(1):P(1)},R=e=>{e.preventDefault(),e.metaKey?N(0):e.altKey?F(-1):P(-1)};return b.createElement(zq.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&&R(e);break;case`ArrowUp`:R(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(z$);t.dispatchEvent(e)}}}}},b.createElement(`label`,{"cmdk-label":``,htmlFor:T.inputId,id:T.labelId,style:p1},c),f1(e,e=>b.createElement(W$.Provider,{value:w},b.createElement(H$.Provider,{value:T},e))))}),J$=b.forwardRef((e,t)=>{let n=JJ(),r=b.useRef(null),i=b.useContext(K$),a=U$(),o=a1(e),s=o.current?.forceMount??i?.forceMount;o1(()=>{if(!s)return a.item(n,i?.id)},[s]);let c=l1(n,r,[e.value,e.children,r],e.keywords),l=G$(),u=c1(e=>e.value&&e.value===c.current),d=c1(e=>s||a.filter()===!1?!0:e.search?e.filtered.items.get(n)>0:!0);b.useEffect(()=>{let t=r.current;if(!(!t||e.disabled))return t.addEventListener(z$,f),()=>t.removeEventListener(z$,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(zq.div,{ref:ZK(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)}),Y$=b.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:i,...a}=e,o=JJ(),s=b.useRef(null),c=b.useRef(null),l=JJ(),u=U$(),d=c1(e=>i||u.filter()===!1?!0:e.search?e.filtered.groups.has(o):!0);o1(()=>u.group(o),[]),l1(o,s,[e.value,e.heading,c]);let f=b.useMemo(()=>({id:o,forceMount:i}),[i]);return b.createElement(zq.div,{ref:ZK(s,t),...a,"cmdk-group":``,role:`presentation`,hidden:d?void 0:!0},n&&b.createElement(`div`,{ref:c,"cmdk-group-heading":``,"aria-hidden":!0,id:l},n),f1(e,e=>b.createElement(`div`,{"cmdk-group-items":``,role:`group`,"aria-labelledby":n?l:void 0},b.createElement(K$.Provider,{value:f},e))))}),X$=b.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,i=b.useRef(null),a=c1(e=>!e.search);return!n&&!a?null:b.createElement(zq.div,{ref:ZK(i,t),...r,"cmdk-separator":``,role:`separator`})}),Z$=b.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,i=e.value!=null,a=G$(),o=c1(e=>e.search),s=c1(e=>e.selectedItemId),c=U$();return b.useEffect(()=>{e.value!=null&&a.setState(`search`,e.value)},[e.value]),b.createElement(zq.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)}})}),Q$=b.forwardRef((e,t)=>{let{children:n,label:r=`Suggestions`,...i}=e,a=b.useRef(null),o=b.useRef(null),s=c1(e=>e.selectedItemId),c=U$();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(zq.div,{ref:ZK(a,t),...i,"cmdk-list":``,role:`listbox`,tabIndex:-1,"aria-activedescendant":s,"aria-label":r,id:c.listId},f1(e,e=>b.createElement(`div`,{ref:ZK(o,c.listInnerRef),"cmdk-list-sizer":``},e)))}),$$=b.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:i,contentClassName:a,container:o,...s}=e;return b.createElement(A$,{open:n,onOpenChange:r},b.createElement(j$,{container:o},b.createElement(M$,{"cmdk-overlay":``,className:i}),b.createElement(N$,{"aria-label":e.label,"cmdk-dialog":``,className:a},b.createElement(q$,{ref:t,...s}))))}),e1=b.forwardRef((e,t)=>c1(e=>e.filtered.count===0)?b.createElement(zq.div,{ref:t,...e,"cmdk-empty":``,role:`presentation`}):null),t1=b.forwardRef((e,t)=>{let{progress:n,children:r,label:i=`Loading...`,...a}=e;return b.createElement(zq.div,{ref:t,...a,"cmdk-loading":``,role:`progressbar`,"aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},f1(e,e=>b.createElement(`div`,{"aria-hidden":!0},e)))}),n1=Object.assign(q$,{List:Q$,Item:J$,Input:Z$,Group:Y$,Separator:X$,Dialog:$$,Empty:e1,Loading:t1});function r1(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function i1(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function a1(e){let t=b.useRef(e);return o1(()=>{t.current=e}),t}var o1=typeof window>`u`?b.useEffect:b.useLayoutEffect;function s1(e){let t=b.useRef();return t.current===void 0&&(t.current=e()),t}function c1(e){let t=G$(),n=()=>e(t.snapshot());return b.useSyncExternalStore(t.subscribe,n,n)}function l1(e,t,n,r=[]){let i=b.useRef(),a=U$();return o1(()=>{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(B$,s),i.current=s}),i}var u1=()=>{let[e,t]=b.useState(),n=s1(()=>new Map);return o1(()=>{n.current.forEach(e=>e()),n.current=new Map},[e]),(e,r)=>{n.current.set(e,r),t({})}};function d1(e){let t=e.type;return typeof t==`function`?t(e.props):`render`in t?t.render(e.props):e}function f1({asChild:e,children:t},n){return e&&b.isValidElement(t)?b.cloneElement(d1(t),{ref:t.ref},n(t.props.children)):n(t)}var p1={position:`absolute`,width:`1px`,height:`1px`,padding:`0`,margin:`-1px`,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,borderWidth:`0`},m1=NE(`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 h1({className:e,variant:t,asChild:n=!1,...r}){return(0,G.jsx)(n?iq:`span`,{"data-slot":`badge`,className:uq(m1({variant:t}),e),...r})}var g1=(0,b.forwardRef)(({className:e,...t},n)=>(0,G.jsx)(n1,{ref:n,"data-slot":`command`,className:uq(`bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md`,e),...t})),_1=(0,b.forwardRef)(({className:e,...t},n)=>(0,G.jsxs)(`div`,{className:`flex items-center border-b px-3`,"cmdk-input-wrapper":``,children:[(0,G.jsx)(qK,{className:`mr-2 h-4 w-4 shrink-0 opacity-50`}),(0,G.jsx)(n1.Input,{ref:n,className:uq(`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})]}));_1.displayName=n1.Input.displayName;function v1({className:e,...t}){return(0,G.jsx)(n1.List,{"data-slot":`command-list`,className:uq(`max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto`,e),...t})}function y1({className:e,...t}){return(0,G.jsx)(n1.Group,{"data-slot":`command-group`,className:uq(`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 b1({className:e,...t}){return(0,G.jsx)(n1.Item,{"data-slot":`command-item`,className:uq(`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 x1({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=>lS(e.value,t))),[t,n]),v=(0,b.useMemo)(()=>t.filter(e=>!_.some(t=>lS(t.value,e.value))),[t,_]),y=(0,b.useCallback)(e=>{if(a)return;let t=_.filter(t=>!lS(t.value,e.value));r?.(t.map(e=>e.index))},[_,r,a]),x=(0,b.useCallback)(e=>{if(!(a||!f.current||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,G.jsxs)(g1,{onKeyDown:x,className:uq(`overflow-visible bg-transparent`,u),autoFocus:i,"aria-disabled":a,onBlur:l,onFocus:C,"aria-describedby":o,"aria-placeholder":s,children:[(0,G.jsx)(`div`,{className:uq(`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,G.jsxs)(`div`,{className:`flex gap-1 flex-wrap`,children:[_.map(e=>(0,G.jsxs)(h1,{variant:`secondary`,children:[e.label,(0,G.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,G.jsx)(YK,{className:uq(`h-3 w-3 text-muted-foreground hover:text-foreground`,a&&`pointer-events-none`)})})]},e.value)),(0,G.jsx)(n1.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,G.jsx)(`div`,{className:`relative mt-2`,children:(0,G.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,G.jsx)(y1,{className:`h-full overflow-auto`,children:(0,G.jsx)(v1,{children:v.map(e=>(0,G.jsx)(b1,{disabled:e.disabled,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 S1({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);(0,b.useEffect)(()=>{f&&h.current&&requestAnimationFrame(()=>{var e;(e=h.current)==null||e.scrollIntoView({block:`nearest`})})},[f]);let _=e=>{g.current&&!g.current.contains(e.relatedTarget)&&p(!1),u?.(e)};return(0,G.jsxs)(g1,{ref:g,className:uq(`overflow-visible bg-transparent`,d),autoFocus:r,"aria-disabled":i,onBlur:_,onFocus:l,"aria-describedby":s,"aria-placeholder":c,children:[(0,G.jsxs)(`div`,{onClick:()=>!i&&p(!f),className:uq(`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,G.jsx)(`span`,{className:uq(`flex-1 line-clamp-1`,!m&&`text-muted-foreground`),children:m?.label||o}),(0,G.jsx)(VK,{className:`h-4 w-4 opacity-50`})]}),(0,G.jsx)(`div`,{className:`relative`,children:f&&e&&e.length>0?(0,G.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,G.jsx)(y1,{className:`h-full overflow-auto`,children:(0,G.jsx)(v1,{children:e.map(e=>(0,G.jsxs)(b1,{ref:e.value===t?h:void 0,onMouseDown:e=>{e.preventDefault(),e.stopPropagation()},onSelect:()=>{e.disabled||(n?.(e.value),p(!1))},className:uq(`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,G.jsx)(`span`,{children:e.label}),(0,G.jsx)(`span`,{className:`flex h-3.5 w-3.5 items-center justify-center`,children:e.value===t&&(0,G.jsx)(BK,{className:`h-4 w-4`})})]},e.value))})})}):null})]})}function C1({id:e,options:t,required:n,disabled:r,readonly:i,value:a,multiple:o,autofocus:s,onChange:c,onBlur:l,onFocus:u,defaultValue:d,placeholder:f,rawErrors:p=[],className:m}){let{enumOptions:h,enumDisabled:g,emptyValue:_}=t,v=()=>{u(e,HB(a,h,_))},y=()=>{l(e,HB(a,h,_))},b=h?.map(({value:e,label:t},n)=>({value:o?e:n.toString(),label:t,index:n,disabled:Array.isArray(g)&&g.includes(e)})),x=uq({"border-destructive":p.length>0},m);return(0,G.jsx)(`div`,{className:`p-0.5`,children:o?(0,G.jsx)(x1,{id:e,autoFocus:s,disabled:r||i,multiple:!0,className:x,items:b,selected:a,onValueChange:e=>{c(HB(e,h,_))},onFocus:v,onBlur:y}):(0,G.jsx)(S1,{items:b,selected:GB(a??d,h,!1),onValueChange:e=>{c(HB(e,h,_))},autoFocus:s,disabled:r||i,required:n,placeholder:f,className:x,onFocus:v,onBlur:y,ariaDescribedby:vV(e)})})}function w1({className:e,...t}){return(0,G.jsx)(`textarea`,{"data-slot":`textarea`,className:uq(`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 T1({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,G.jsx)(`div`,{className:`flex p-0.5`,children:(0,G.jsx)(w1,{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&&t.value),onFocus:({target:t})=>l(e,t&&t.value),"aria-describedby":vV(e),className:f})})}function E1(){return{CheckboxWidget:UJ,CheckboxesWidget:WJ,RadioWidget:qY,RangeWidget:IX,SelectWidget:C1,TextareaWidget:T1}}function D1(){return{templates:Yq(),widgets:E1()}}D1();function O1(){return yK(D1())}var k1=O1();function A1({controlled:e,default:t,name:n,state:r=`value`}){let{current:i}=b.useRef(e!==void 0),[a,o]=b.useState(t);return[i?e:a,b.useCallback(e=>{i||o(e)},[])]}var j1=b.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});function M1(){return b.useContext(j1)}function N1(e){let{children:t,elementsRef:n,labelsRef:r,onMapChange:i}=e,a=VT(i),o=b.useRef(0),s=zT(F1).current,c=zT(P1).current,[l,u]=b.useState(0),d=b.useRef(l),f=VT((e,t)=>{c.set(e,t??null),d.current+=1,u(d.current)}),p=VT(e=>{c.delete(e),d.current+=1,u(d.current)}),m=b.useMemo(()=>{let e=new Map;return Array.from(c.keys()).filter(e=>e.isConnected).sort(I1).forEach((t,n)=>{let r=c.get(t)??{};e.set(t,{...r,index:n})}),e},[c,l]);$(()=>{if(typeof MutationObserver!=`function`||m.size===0)return;let e=new MutationObserver(e=>{let t=new Set,n=e=>t.has(e)?t.delete(e):t.add(e);e.forEach(e=>{e.removedNodes.forEach(n),e.addedNodes.forEach(n)}),t.size===0&&(d.current+=1,u(d.current))});return m.forEach((t,n)=>{n.parentElement&&e.observe(n.parentElement,{childList:!0})}),()=>{e.disconnect()}},[m]),$(()=>{d.current===l&&(n.current.length!==m.size&&(n.current.length=m.size),r&&r.current.length!==m.size&&(r.current.length=m.size),o.current=m.size),a(m)},[a,m,n,r,l]),$(()=>()=>{n.current=[]},[n]),$(()=>()=>{r&&(r.current=[])},[r]);let h=VT(e=>(s.add(e),()=>{s.delete(e)}));$(()=>{s.forEach(e=>e(m))},[s,m]);let g=b.useMemo(()=>({register:f,unregister:p,subscribeMapChange:h,elementsRef:n,labelsRef:r,nextIndexRef:o}),[f,p,h,n,r,o]);return(0,G.jsx)(j1.Provider,{value:g,children:t})}function P1(){return new Map}function F1(){return new Set}function I1(e,t){let n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}var L1=b.createContext(void 0);function R1(){return b.useContext(L1)?.direction??`ltr`}var z1=b.createContext(void 0);function B1(){let e=b.useContext(z1);if(e===void 0)throw Error(ZT(64));return e}var V1=function(e){return e.activationDirection=`data-activation-direction`,e.orientation=`data-orientation`,e}({}),H1={tabActivationDirection:e=>({[V1.activationDirection]:e})},U1=b.forwardRef(function(e,t){let{className:n,defaultValue:r=0,onValueChange:i,orientation:a=`horizontal`,render:o,value:s,...c}=e,l=R1(),u=Object.hasOwn(e,`defaultValue`),d=b.useRef([]),[f,p]=b.useState(()=>new Map),[m,h]=A1({controlled:s,default:r,name:`Tabs`,state:`value`}),g=s!==void 0,[_,v]=b.useState(()=>new Map),[y,x]=b.useState(`none`),S=VT((e,t)=>{i?.(e,t),!t.isCanceled&&(h(e),x(t.activationDirection))}),C=VT((e,t)=>{p(n=>{if(n.get(e)===t)return n;let r=new Map(n);return r.set(e,t),r})}),w=VT((e,t)=>{p(n=>{if(!n.has(e)||n.get(e)!==t)return n;let r=new Map(n);return r.delete(e),r})}),T=b.useCallback(e=>f.get(e),[f]),E=b.useCallback(e=>{for(let t of _.values())if(e===t?.value)return t?.id},[_]),D=b.useCallback(e=>{if(e===void 0)return null;for(let[t,n]of _.entries())if(n!=null&&e===(n.value??n.index))return t;return null},[_]),O=b.useMemo(()=>({direction:l,getTabElementBySelectedValue:D,getTabIdByPanelValue:E,getTabPanelIdByValue:T,onValueChange:S,orientation:a,registerMountedTabPanel:C,setTabMap:v,unregisterMountedTabPanel:w,tabActivationDirection:y,value:m}),[l,D,E,T,S,a,C,v,w,y,m]),k=b.useMemo(()=>{for(let e of _.values())if(e!=null&&e.value===m)return e},[_,m]),A=b.useMemo(()=>{for(let e of _.values())if(e!=null&&!e.disabled)return e.value},[_]);$(()=>{if(g||_.size===0)return;let e=k?.disabled;if(u&&e&&m===r||!e&&!(k==null&&m!==null))return;let t=A??null;m!==t&&(h(t),x(`none`))},[r,A,u,g,k,x,h,_,m]);let j=CE(`div`,e,{state:{orientation:a,tabActivationDirection:y},ref:t,props:c,stateAttributesMapping:H1});return(0,G.jsx)(z1.Provider,{value:O,children:(0,G.jsx)(N1,{elementsRef:d,children:j})})});function W1(e){return e?.ownerDocument||document}var G1=0;function K1(e,t=`mui`){let[n,r]=b.useState(e),i=e||n;return b.useEffect(()=>{n??(G1+=1,r(`${t}-${G1}`))},[n,t]),i}var q1=Dte.useId;function J1(e,t){if(q1!==void 0){let n=q1();return e??(t?`${t}-${n}`:n)}return K1(e,t)}function Y1(e){return J1(e,`base-ui`)}var X1=`data-composite-item-active`,Z1=function(e){return e[e.None=0]=`None`,e[e.GuessFromOrder=1]=`GuessFromOrder`,e}({});function Q1(e={}){let{label:t,metadata:n,textRef:r,indexGuessBehavior:i,index:a}=e,{register:o,unregister:s,subscribeMapChange:c,elementsRef:l,labelsRef:u,nextIndexRef:d}=M1(),f=b.useRef(-1),[p,m]=b.useState(a??(i===Z1.GuessFromOrder?()=>{if(f.current===-1){let e=d.current;d.current+=1,f.current=e}return f.current}:-1)),h=b.useRef(null),g=b.useCallback(e=>{if(h.current=e,p!==-1&&e!==null&&(l.current[p]=e,u)){let n=t!==void 0;u.current[p]=n?t:r?.current?.textContent??e.textContent}},[p,l,u,t,r]);return $(()=>{if(a!=null)return;let e=h.current;if(e)return o(e,n),()=>{s(e)}},[a,o,s,n]),$(()=>{if(a==null)return c(e=>{let t=h.current?e.get(h.current)?.index:null;t!=null&&m(t)})},[a,c,m]),b.useMemo(()=>({ref:g,index:p}),[p,g])}function $1(e={}){let{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:r}=$T(),{ref:i,index:a}=Q1(e),o=n===a,s=b.useRef(null),c=iE(i,s);return{compositeProps:b.useMemo(()=>({tabIndex:o?0:-1,onFocus(){r(a)},onMouseMove(){let e=s.current;if(!t||!e)return;let n=e.hasAttribute(`disabled`)||e.ariaDisabled===`true`;!o&&!n&&e.focus()}}),[o,r,a,t]),compositeRef:c,index:a}}var e0=b.createContext(void 0);function t0(){let e=b.useContext(e0);if(e===void 0)throw Error(ZT(65));return e}var n0=`none`,r0=`trigger-press`,i0=`trigger-hover`,a0=`outside-press`,o0=`item-press`,s0=`close-press`,c0=`focus-out`,l0=`escape-key`,u0=`list-navigation`,d0=`cancel-open`,f0=`imperative-action`,p0=`window-resize`;function m0(e,t,n,r){let i=!1,a=!1,o=r??vE;return{reason:e,event:t??new Event(`base-ui`),cancel(){i=!0},allowPropagation(){a=!0},get isCanceled(){return i},get isPropagationAllowed(){return a},trigger:n,...o}}var h0=typeof navigator<`u`,g0=w0(),_0=E0(),v0=T0(),y0=typeof CSS>`u`||!CSS.supports?!1:CSS.supports(`-webkit-backdrop-filter:none`),b0=g0.platform===`MacIntel`&&g0.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(g0.platform);h0&&/firefox/i.test(v0);var x0=h0&&/apple/i.test(navigator.vendor);h0&&/Edg/i.test(v0);var S0=h0&&/android/i.test(_0)||/android/i.test(v0);h0&&_0.toLowerCase().startsWith(`mac`)&&navigator.maxTouchPoints;var C0=v0.includes(`jsdom/`);function w0(){if(!h0)return{platform:``,maxTouchPoints:-1};let e=navigator.userAgentData;return e?.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??``,maxTouchPoints:navigator.maxTouchPoints??-1}}function T0(){if(!h0)return``;let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:e,version:t})=>`${e}/${t}`).join(` `):navigator.userAgent}function E0(){if(!h0)return``;let e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??``}var D0=`data-base-ui-focusable`,O0=`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`,k0=`ArrowLeft`,A0=`ArrowRight`,j0=`ArrowUp`,M0=`ArrowDown`;function N0(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function P0(e,t){if(!e||!t)return!1;let n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&wT(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function F0(e,t){if(!ST(e))return!1;let n=e;if(t.hasElement(n))return!n.hasAttribute(`data-trigger-disabled`);for(let[,e]of t.entries())if(P0(e,n))return!e.hasAttribute(`data-trigger-disabled`);return!1}function I0(e){return`composedPath`in e?e.composedPath()[0]:e.target}function L0(e,t){if(t==null)return!1;if(`composedPath`in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function R0(e){return e.matches(`html,body`)}function z0(e){return CT(e)&&e.matches(`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`)}function B0(e){return e?e.getAttribute(`role`)===`combobox`&&z0(e):!1}function V0(e){return e?e.hasAttribute(`data-base-ui-focusable`)?e:e.querySelector(`[data-base-ui-focusable]`)||e:null}function H0(e,t,n=!0){return e.filter(e=>e.parentId===t&&(!n||e.context?.open)).flatMap(t=>[t,...H0(e,t.id,n)])}function U0(e,t){let n=[],r=e.find(e=>e.id===t)?.parentId;for(;r;){let t=e.find(e=>e.id===r);r=t?.parentId,t&&(n=n.concat(t))}return n}function W0(e){e.preventDefault(),e.stopPropagation()}function G0(e){return`nativeEvent`in e}function K0(e){return e.pointerType===``&&e.isTrusted?!0:S0&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}function q0(e){return C0?!1:!S0&&e.width===0&&e.height===0||S0&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType===`mouse`||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType===`touch`}function J0(e,t){let n=[`mouse`,`pen`];return t||n.push(``,void 0),n.includes(e)}function Y0(e){let t=e.type;return t===`click`||t===`mousedown`||t===`keydown`||t===`keyup`}var X0=[`top`,`right`,`bottom`,`left`],Z0=Math.min,Q0=Math.max,$0=Math.round,e2=Math.floor,t2=e=>({x:e,y:e}),n2={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function r2(e,t,n){return Q0(e,Z0(t,n))}function i2(e,t){return typeof e==`function`?e(t):e}function a2(e){return e.split(`-`)[0]}function o2(e){return e.split(`-`)[1]}function s2(e){return e===`x`?`y`:`x`}function c2(e){return e===`y`?`height`:`width`}function l2(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function u2(e){return s2(l2(e))}function d2(e,t,n){n===void 0&&(n=!1);let r=o2(e),i=u2(e),a=c2(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=b2(o)),[o,b2(o)]}function f2(e){let t=b2(e);return[p2(e),t,p2(t)]}function p2(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var m2=[`left`,`right`],h2=[`right`,`left`],g2=[`top`,`bottom`],_2=[`bottom`,`top`];function v2(e,t,n){switch(e){case`top`:case`bottom`:return n?t?h2:m2:t?m2:h2;case`left`:case`right`:return t?g2:_2;default:return[]}}function y2(e,t,n,r){let i=o2(e),a=v2(a2(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(p2)))),a}function b2(e){let t=a2(e);return n2[t]+e.slice(t.length)}function x2(e){return{top:0,right:0,bottom:0,left:0,...e}}function S2(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:x2(e)}function C2(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 w2(e,t,n){return Math.floor(e/t)!==n}function T2(e,t){return t<0||t>=e.current.length}function E2(e,t){return O2(e,{disabledIndices:t})}function D2(e,t){return O2(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function O2(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:i=1}={}){let a=t;do a+=n?-i:i;while(a>=0&&a<=e.current.length-1&&N2(e,a,r));return a}function k2(e,{event:t,orientation:n,loopFocus:r,rtl:i,cols:a,disabledIndices:o,minIndex:s,maxIndex:c,prevIndex:l,stopEvent:u=!1}){let d=l,f;if(t.key===`ArrowUp`?f=`up`:t.key===`ArrowDown`&&(f=`down`),f){let n=[],i=[],p=!1,m=0;{let t=null,r=-1;e.current.forEach((e,a)=>{if(e==null)return;m+=1;let o=e.closest(`[role="row"]`);o&&(p=!0),(o!==t||r===-1)&&(t=o,r+=1,n[r]=[]),n[r].push(a),i[a]=r})}let h=!1,g=0;if(p)for(let e of n){let t=e.length;t>g&&(g=t),t!==a&&(h=!0)}let _=h&&m<e.current.length,v=g||a,y=t=>{if(!h||l===-1)return;let a=i[l];if(a==null)return;let s=n[a].indexOf(l),c=t===`up`?-1:1;for(let t=a+c,i=0;i<n.length;i+=1,t+=c){if(t<0||t>=n.length){if(!r||_)return;t=t<0?n.length-1:0}let i=n[t];for(let t=Math.min(s,i.length-1);t>=0;--t){let n=i[t];if(!N2(e,n,o))return n}}},b=t=>{if(!_||l===-1)return;let n=l%v,i=t===`up`?-v:v,a=c-c%v,s=e2(c/v)+1;for(let t=l-n+i,u=0;u<s;u+=1,t+=i){if(t<0||t>c){if(!r)return;t=t<0?a:0}let i=Math.min(t+v-1,c);for(let r=Math.min(t+n,i);r>=t;--r)if(!N2(e,r,o))return r}};u&&W0(t);let x=y(f)??b(f);if(x!==void 0)d=x;else if(l===-1)d=f===`up`?c:s;else if(d=O2(e,{startingIndex:l,amount:v,decrement:f===`up`,disabledIndices:o}),r){if(f===`up`&&(l-v<s||d<0)){let e=l%v,t=c%v,n=c-(t-e);d=t===e?c:t>e?n:n-v}f===`down`&&l+v>c&&(d=O2(e,{startingIndex:l%v-v,amount:v,disabledIndices:o}))}T2(e,d)&&(d=l)}if(n===`both`){let n=e2(l/a);t.key===(i?`ArrowLeft`:`ArrowRight`)&&(u&&W0(t),l%a===a-1?r&&(d=O2(e,{startingIndex:l-l%a-1,disabledIndices:o})):(d=O2(e,{startingIndex:l,disabledIndices:o}),r&&w2(d,a,n)&&(d=O2(e,{startingIndex:l-l%a-1,disabledIndices:o}))),w2(d,a,n)&&(d=l)),t.key===(i?`ArrowRight`:`ArrowLeft`)&&(u&&W0(t),l%a===0?r&&(d=O2(e,{startingIndex:l+(a-l%a),decrement:!0,disabledIndices:o})):(d=O2(e,{startingIndex:l,decrement:!0,disabledIndices:o}),r&&w2(d,a,n)&&(d=O2(e,{startingIndex:l+(a-l%a),decrement:!0,disabledIndices:o}))),w2(d,a,n)&&(d=l));let s=e2(c/a)===n;T2(e,d)&&(d=r&&s?t.key===(i?`ArrowRight`:`ArrowLeft`)?c:O2(e,{startingIndex:l-l%a-1,disabledIndices:o}):l)}return d}function A2(e,t,n){let r=[],i=0;return e.forEach(({width:e,height:a},o)=>{let s=!1;for(n&&(i=0);!s;){let n=[];for(let r=0;r<e;r+=1)for(let e=0;e<a;e+=1)n.push(i+r+e*t);i%t+e<=t&&n.every(e=>r[e]==null)?(n.forEach(e=>{r[e]=o}),s=!0):i+=1}}),[...r]}function j2(e,t,n,r,i){if(e===-1)return-1;let a=n.indexOf(e),o=t[e];switch(i){case`tl`:return a;case`tr`:return o?a+o.width-1:a;case`bl`:return o?a+(o.height-1)*r:a;case`br`:return n.lastIndexOf(e);default:return-1}}function M2(e,t){return t.flatMap((t,n)=>e.includes(t)?[n]:[])}function N2(e,t,n){if(typeof n==`function`?n(t):n?.includes(t)??!1)return!0;let r=e.current[t];return r?P2(r)?!n&&(r.hasAttribute(`disabled`)||r.getAttribute(`aria-disabled`)===`true`):!0:!1}function P2(e){return MT(e).display!==`none`}var F2=[`input:not([inert]):not([inert] *)`,`select:not([inert]):not([inert] *)`,`textarea:not([inert]):not([inert] *)`,`a[href]:not([inert]):not([inert] *)`,`button:not([inert]):not([inert] *)`,`[tabindex]:not(slot):not([inert]):not([inert] *)`,`audio[controls]:not([inert]):not([inert] *)`,`video[controls]:not([inert]):not([inert] *)`,`[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)`,`details>summary:first-of-type:not([inert]):not([inert] *)`,`details:not([inert]):not([inert] *)`].join(`,`),I2=typeof Element>`u`,L2=I2?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,R2=!I2&&Element.prototype.getRootNode?function(e){return e?.getRootNode?.call(e)}:function(e){return e?.ownerDocument},z2=function(e,t){t===void 0&&(t=!0);var n=e?.getAttribute?.call(e,`inert`);return n===``||n===`true`||t&&e&&(typeof e.closest==`function`?e.closest(`[inert]`):z2(e.parentNode))},B2=function(e){var t=e?.getAttribute?.call(e,`contenteditable`);return t===``||t===`true`},V2=function(e,t,n){if(z2(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(F2));return t&&L2.call(e,F2)&&r.unshift(e),r=r.filter(n),r},H2=function(e,t,n){for(var r=[],i=Array.from(e);i.length;){var a=i.shift();if(!z2(a,!1))if(a.tagName===`SLOT`){var o=a.assignedElements(),s=H2(o.length?o:a.children,!0,n);n.flatten?r.push.apply(r,s):r.push({scopeParent:a,candidates:s})}else{L2.call(a,F2)&&n.filter(a)&&(t||!e.includes(a))&&r.push(a);var c=a.shadowRoot||typeof n.getShadowRoot==`function`&&n.getShadowRoot(a),l=!z2(c,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(a));if(c&&l){var u=H2(c===!0?a.children:c.children,!0,n);n.flatten?r.push.apply(r,u):r.push({scopeParent:a,candidates:u})}else i.unshift.apply(i,a.children)}}return r},U2=function(e){return!isNaN(parseInt(e.getAttribute(`tabindex`),10))},W2=function(e){if(!e)throw Error(`No node provided`);return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||B2(e))&&!U2(e)?0:e.tabIndex},G2=function(e,t){var n=W2(e);return n<0&&t&&!U2(e)?0:n},K2=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},q2=function(e){return e.tagName===`INPUT`},J2=function(e){return q2(e)&&e.type===`hidden`},Y2=function(e){return e.tagName===`DETAILS`&&Array.prototype.slice.apply(e.children).some(function(e){return e.tagName===`SUMMARY`})},X2=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]},Z2=function(e){if(!e.name)return!0;var t=e.form||R2(e),n=function(e){return t.querySelectorAll(`input[type="radio"][name="`+e+`"]`)},r;if(typeof window<`u`&&window.CSS!==void 0&&typeof window.CSS.escape==`function`)r=n(window.CSS.escape(e.name));else try{r=n(e.name)}catch(e){return console.error(`Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s`,e.message),!1}var i=X2(r,e.form);return!i||i===e},Q2=function(e){return q2(e)&&e.type===`radio`},$2=function(e){return Q2(e)&&!Z2(e)},e4=function(e){var t=e&&R2(e),n=t?.host,r=!1;if(t&&t!==e){var i,a,o;for(r=!!((i=n)!=null&&(a=i.ownerDocument)!=null&&a.contains(n)||e!=null&&(o=e.ownerDocument)!=null&&o.contains(e));!r&&n;){var s,c;t=R2(n),n=t?.host,r=!!((s=n)!=null&&(c=s.ownerDocument)!=null&&c.contains(n))}}return r},t4=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return n===0&&r===0},n4=function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if(n===`full-native`&&`checkVisibility`in e)return!e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});if(getComputedStyle(e).visibility===`hidden`)return!0;var i=L2.call(e,`details>summary:first-of-type`)?e.parentElement:e;if(L2.call(i,`details:not([open]) *`))return!0;if(!n||n===`full`||n===`full-native`||n===`legacy-full`){if(typeof r==`function`){for(var a=e;e;){var o=e.parentElement,s=R2(e);if(o&&!o.shadowRoot&&r(o)===!0)return t4(e);e=e.assignedSlot?e.assignedSlot:!o&&s!==e.ownerDocument?s.host:o}e=a}if(e4(e))return!e.getClientRects().length;if(n!==`legacy-full`)return!0}else if(n===`non-zero-area`)return t4(e);return!1},r4=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName===`FIELDSET`&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if(r.tagName===`LEGEND`)return L2.call(t,`fieldset[disabled] *`)?!0:!r.contains(e)}return!0}t=t.parentElement}return!1},i4=function(e,t){return!(t.disabled||J2(t)||n4(t,e)||Y2(t)||r4(t))},a4=function(e,t){return!($2(t)||W2(t)<0||!i4(e,t))},o4=function(e){var t=parseInt(e.getAttribute(`tabindex`),10);return!!(isNaN(t)||t>=0)},s4=function(e){var t=[],n=[];return e.forEach(function(e,r){var i=!!e.scopeParent,a=i?e.scopeParent:e,o=G2(a,i),s=i?s4(e.candidates):a;o===0?i?t.push.apply(t,s):t.push(a):n.push({documentOrder:r,tabIndex:o,item:e,isScope:i,content:s})}),n.sort(K2).reduce(function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e},[]).concat(t)},c4=function(e,t){return t||={},s4(t.getShadowRoot?H2([e],t.includeContainer,{filter:a4.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:o4}):V2(e,t.includeContainer,a4.bind(null,t)))},l4=function(e,t){return t||={},t.getShadowRoot?H2([e],t.includeContainer,{filter:i4.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):V2(e,t.includeContainer,i4.bind(null,t))},u4=function(e,t){if(t||={},!e)throw Error(`No node provided`);return L2.call(e,F2)===!1?!1:a4(t,e)},d4=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver==`function`&&ResizeObserver.toString().includes(`[native code]`)?`full`:`none`});function f4(e,t){let n=c4(e,d4()),r=n.length;if(r===0)return;let i=N0(W1(e)),a=n.indexOf(i);return n[a===-1?t===1?0:r-1:a+t]}function p4(e){return f4(W1(e).body,1)||e}function m4(e){return f4(W1(e).body,-1)||e}function h4(e,t){if(!e)return null;let n=c4(W1(e).body,d4()),r=n.length;if(r===0)return null;let i=n.indexOf(e);return i===-1?null:n[(i+t+r)%r]}function g4(e){return h4(e,1)}function _4(e){return h4(e,-1)}function v4(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!P0(n,r)}function y4(e){c4(e,d4()).forEach(e=>{e.dataset.tabindex=e.getAttribute(`tabindex`)||``,e.setAttribute(`tabindex`,`-1`)})}function b4(e){e.querySelectorAll(`[data-tabindex]`).forEach(e=>{let t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute(`tabindex`,t):e.removeAttribute(`tabindex`)})}var x4=b.forwardRef(function(e,t){let{className:n,disabled:r=!1,render:i,value:a,id:o,nativeButton:s=!0,...c}=e,{value:l,getTabPanelIdByValue:u,orientation:d}=B1(),{activateOnFocus:f,highlightedTabIndex:p,onTabActivation:m,registerTabResizeObserverElement:h,setHighlightedTabIndex:g,tabsListElement:_}=t0(),v=Y1(o),{compositeProps:y,compositeRef:x,index:S}=$1({metadata:b.useMemo(()=>({disabled:r,id:v,value:a}),[r,v,a])}),C=a===l,w=b.useRef(!1),T=b.useRef(null);b.useEffect(()=>{let e=T.current;if(e)return h(e)},[h]),$(()=>{if(w.current){w.current=!1;return}if(!(C&&S>-1&&p!==S))return;let e=_;if(e!=null){let t=N0(W1(e));if(t&&P0(e,t))return}r||g(S)},[C,S,p,g,r,_]);let{getButtonProps:E,buttonRef:D}=tE({disabled:r,native:s,focusableWhenDisabled:!0}),O=u(a),k=b.useRef(!1),A=b.useRef(!1);function j(e){C||r||m(a,m0(n0,e.nativeEvent,void 0,{activationDirection:`none`}))}function M(e){C||(S>-1&&!r&&g(S),!r&&f&&(!k.current||k.current&&A.current)&&m(a,m0(n0,e.nativeEvent,void 0,{activationDirection:`none`})))}function N(e){if(C||r)return;k.current=!0;function t(){k.current=!1,A.current=!1}(!e.button||e.button===0)&&(A.current=!0,W1(e.currentTarget).addEventListener(`pointerup`,t,{once:!0}))}return CE(`button`,e,{state:{disabled:r,active:C,orientation:d},ref:[t,D,x,T],props:[y,{role:`tab`,"aria-controls":O,"aria-selected":C,id:v,onClick:j,onFocus:M,onPointerDown:N,[X1]:C?``:void 0,onKeyDownCapture(){w.current=!0}},c,E]})}),S4=[];function C4(e){b.useEffect(e,S4)}var w4=b.createContext(void 0),T4={disableStyleElements:!1};function E4(){return b.useContext(w4)??T4}function D4(e){return dE(19)?e:e?`true`:void 0}var O4=function(e){return e.startingStyle=`data-starting-style`,e.endingStyle=`data-ending-style`,e}({}),k4={[O4.startingStyle]:``},A4={[O4.endingStyle]:``},j4={transitionStatus(e){return e===`starting`?k4:e===`ending`?A4:null}},M4=null;globalThis.requestAnimationFrame;var N4=new class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=e=>{this.isScheduled=!1;let t=this.callbacks,n=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,n>0)for(let n=0;n<t.length;n+=1)t[n]?.(e)};request(e){let t=this.nextId;return this.nextId+=1,this.callbacks.push(e),this.callbacksCount+=1,this.isScheduled||=(requestAnimationFrame(this.tick),!0),t}cancel(e){let t=e-this.startId;t<0||t>=this.callbacks.length||(this.callbacks[t]=null,--this.callbacksCount)}},P4=class e{static create(){return new e}static request(e){return N4.request(e)}static cancel(e){return N4.cancel(e)}currentId=M4;request(e){this.cancel(),this.currentId=N4.request(()=>{this.currentId=M4,e()})}cancel=()=>{this.currentId!==M4&&(N4.cancel(this.currentId),this.currentId=M4)};disposeEffect=()=>this.cancel};function F4(){let e=zT(P4.create).current;return C4(e.disposeEffect),e}function I4(e){return e==null?e:`current`in e?e.current:e}function L4(e,t=!1,n=!0){let r=F4();return VT((i,a=null)=>{r.cancel();function o(){Rq.flushSync(i)}let s=I4(e);if(s==null)return;let c=s;if(typeof c.getAnimations!=`function`||globalThis.BASE_UI_ANIMATIONS_DISABLED)i();else{function e(){let e=O4.startingStyle;if(!c.hasAttribute(e)){r.request(i);return}let t=new MutationObserver(()=>{c.hasAttribute(e)||(t.disconnect(),i())});t.observe(c,{attributes:!0,attributeFilter:[e]}),a?.addEventListener(`abort`,()=>t.disconnect(),{once:!0})}function i(){Promise.all(c.getAnimations().map(e=>e.finished)).then(()=>{a?.aborted||o()}).catch(()=>{let e=c.getAnimations();if(n){if(a?.aborted)return;o()}else e.length>0&&e.some(e=>e.pending||e.playState!==`finished`)&&i()})}if(t){e();return}r.request(i)}})}function R4(e){let{enabled:t=!0,open:n,ref:r,onComplete:i}=e,a=VT(i),o=L4(r,n,!1);b.useEffect(()=>{if(!t)return;let e=new AbortController;return o(a,e.signal),()=>{e.abort()}},[t,n,a,o])}function z4(e,t=!1,n=!1){let[r,i]=b.useState(e&&t?`idle`:void 0),[a,o]=b.useState(e);return e&&!a&&(o(!0),i(`starting`)),!e&&a&&r!==`ending`&&!n&&i(`ending`),!e&&!a&&r===`ending`&&i(void 0),$(()=>{if(!e&&a&&r!==`ending`&&n){let e=P4.request(()=>{i(`ending`)});return()=>{P4.cancel(e)}}},[e,a,r,n]),$(()=>{if(!e||t)return;let n=P4.request(()=>{i(void 0)});return()=>{P4.cancel(n)}},[t,e]),$(()=>{if(!e||!t)return;e&&a&&r!==`idle`&&i(`starting`);let n=P4.request(()=>{i(`idle`)});return()=>{P4.cancel(n)}},[t,e,a,i,r]),b.useMemo(()=>({mounted:a,setMounted:o,transitionStatus:r}),[a,r])}var B4=function(e){return e.index=`data-index`,e.activationDirection=`data-activation-direction`,e.orientation=`data-orientation`,e.hidden=`data-hidden`,e[e.startingStyle=O4.startingStyle]=`startingStyle`,e[e.endingStyle=O4.endingStyle]=`endingStyle`,e}({}),V4={...H1,...j4},H4=b.forwardRef(function(e,t){let{className:n,value:r,render:i,keepMounted:a=!1,...o}=e,{value:s,getTabIdByPanelValue:c,orientation:l,tabActivationDirection:u,registerMountedTabPanel:d,unregisterMountedTabPanel:f}=B1(),p=Y1(),{ref:m,index:h}=Q1({metadata:b.useMemo(()=>({id:p,value:r}),[p,r])}),g=r===s,{mounted:_,transitionStatus:v,setMounted:y}=z4(g),x=!_,S=c(r),C={hidden:x,orientation:l,tabActivationDirection:u,transitionStatus:v},w=b.useRef(null),T=CE(`div`,e,{state:C,ref:[t,m,w],props:[{"aria-labelledby":S,hidden:x,id:p,role:`tabpanel`,tabIndex:g?0:-1,inert:D4(!g),[B4.index]:h},o],stateAttributesMapping:V4});return R4({open:g,ref:w,onComplete(){g||y(!1)}}),$(()=>{if(!(x&&!a)&&p!=null)return d(r,p),()=>{f(r,p)}},[x,a,r,p,d,f]),a||_?T:null});function U4(e){return e==null||e.hasAttribute(`disabled`)||e.getAttribute(`aria-disabled`)===`true`}var W4=`ArrowUp`,G4=`ArrowDown`,K4=`ArrowLeft`,q4=`ArrowRight`,J4=`Home`,Y4=new Set([K4,q4]),X4=new Set([K4,q4,J4,`End`]),Z4=new Set([W4,G4]),Q4=new Set([W4,G4,J4,`End`]),$4=new Set([...Y4,...Z4]),e3=new Set([...$4,J4,`End`]),t3=new Set([W4,G4,K4,q4,J4,`End`]),n3=new Set([`Shift`,`Control`,`Alt`,`Meta`]);function r3(e){return CT(e)&&e.tagName===`INPUT`}function i3(e){return!!(r3(e)&&e.selectionStart!=null||CT(e)&&e.tagName===`TEXTAREA`)}function a3(e,t,n,r){if(!e||!t||!t.scrollTo)return;let i=e.scrollLeft,a=e.scrollTop,o=e.clientWidth<e.scrollWidth,s=e.clientHeight<e.scrollHeight;if(o&&r!==`vertical`){let r=o3(e,t,`left`),a=s3(e),o=s3(t);n===`ltr`&&(r+t.offsetWidth+o.scrollMarginRight>e.scrollLeft+e.clientWidth-a.scrollPaddingRight?i=r+t.offsetWidth+o.scrollMarginRight-e.clientWidth+a.scrollPaddingRight:r-o.scrollMarginLeft<e.scrollLeft+a.scrollPaddingLeft&&(i=r-o.scrollMarginLeft-a.scrollPaddingLeft)),n===`rtl`&&(r-o.scrollMarginRight<e.scrollLeft+a.scrollPaddingLeft?i=r-o.scrollMarginLeft-a.scrollPaddingLeft:r+t.offsetWidth+o.scrollMarginRight>e.scrollLeft+e.clientWidth-a.scrollPaddingRight&&(i=r+t.offsetWidth+o.scrollMarginRight-e.clientWidth+a.scrollPaddingRight))}if(s&&r!==`horizontal`){let n=o3(e,t,`top`),r=s3(e),i=s3(t);n-i.scrollMarginTop<e.scrollTop+r.scrollPaddingTop?a=n-i.scrollMarginTop-r.scrollPaddingTop:n+t.offsetHeight+i.scrollMarginBottom>e.scrollTop+e.clientHeight-r.scrollPaddingBottom&&(a=n+t.offsetHeight+i.scrollMarginBottom-e.clientHeight+r.scrollPaddingBottom)}e.scrollTo({left:i,top:a,behavior:`auto`})}function o3(e,t,n){let r=n===`left`?`offsetLeft`:`offsetTop`,i=0;for(;t.offsetParent&&(i+=t[r],t.offsetParent!==e);)t=t.offsetParent;return i}function s3(e){let t=getComputedStyle(e);return{scrollMarginTop:parseFloat(t.scrollMarginTop)||0,scrollMarginRight:parseFloat(t.scrollMarginRight)||0,scrollMarginBottom:parseFloat(t.scrollMarginBottom)||0,scrollMarginLeft:parseFloat(t.scrollMarginLeft)||0,scrollPaddingTop:parseFloat(t.scrollPaddingTop)||0,scrollPaddingRight:parseFloat(t.scrollPaddingRight)||0,scrollPaddingBottom:parseFloat(t.scrollPaddingBottom)||0,scrollPaddingLeft:parseFloat(t.scrollPaddingLeft)||0}}var c3=[];function l3(e){let{itemSizes:t,cols:n=1,loopFocus:r=!0,dense:i=!1,orientation:a=`both`,direction:o,highlightedIndex:s,onHighlightedIndexChange:c,rootRef:l,enableHomeAndEndKeys:u=!1,stopEventPropagation:d=!1,disabledIndices:f,modifierKeys:p=c3}=e,[m,h]=b.useState(0),g=n>1,_=b.useRef(null),v=iE(_,l),y=b.useRef([]),x=b.useRef(!1),S=s??m,C=VT((e,t=!1)=>{if((c??h)(e),t){let t=y.current[e];a3(_.current,t,o,a)}}),w=VT(e=>{if(e.size===0||x.current)return;x.current=!0;let t=Array.from(e.keys()),n=t.find(e=>e?.hasAttribute(`data-composite-item-active`))??null,r=n?t.indexOf(n):-1;r!==-1&&C(r),a3(_.current,n,o,a)}),T=b.useMemo(()=>({"aria-orientation":a===`both`?void 0:a,ref:v,onFocus(e){!_.current||!i3(e.target)||e.target.setSelectionRange(0,e.target.value.length??0)},onKeyDown(e){let s=u?e3:$4;if(!s.has(e.key)||u3(e,p)||!_.current)return;let c=o===`rtl`,l=c?K4:q4,m={horizontal:l,vertical:G4,both:l}[a],h=c?q4:K4,v={horizontal:h,vertical:W4,both:h}[a];if(i3(e.target)&&!U4(e.target)){let t=e.target.selectionStart,n=e.target.selectionEnd,r=e.target.value??``;if(t==null||e.shiftKey||t!==n||e.key!==v&&t<r.length||e.key!==m&&t>0)return}let b=S,x=E2(y,f),w=D2(y,f);if(g){let o=t||Array.from({length:y.current.length},()=>({width:1,height:1})),s=A2(o,n,i),l=s.findIndex(e=>e!=null&&!N2(y,e,f)),u=s.reduce((e,t,n)=>t!=null&&!N2(y,t,f)?n:e,-1);b=s[k2({current:s.map(e=>e?y.current[e]:null)},{event:e,orientation:a,loopFocus:r,cols:n,disabledIndices:M2([...f||y.current.map((e,t)=>N2(y,t)?t:void 0),void 0],s),minIndex:l,maxIndex:u,prevIndex:j2(S>w?x:S,o,s,n,e.key===`ArrowDown`?`bl`:e.key===`ArrowRight`?`tr`:`tl`),rtl:c})]}let T={horizontal:[l],vertical:[G4],both:[l,G4]}[a],E={horizontal:[h],vertical:[W4],both:[h,W4]}[a],D=g?s:{horizontal:u?X4:Y4,vertical:u?Q4:Z4,both:s}[a];u&&(e.key===`Home`?b=x:e.key===`End`&&(b=w)),b===S&&(T.includes(e.key)||E.includes(e.key))&&(b=r&&b===w&&T.includes(e.key)?x:r&&b===x&&E.includes(e.key)?w:O2(y,{startingIndex:b,decrement:E.includes(e.key),disabledIndices:f})),b!==S&&!T2(y,b)&&(d&&e.stopPropagation(),D.has(e.key)&&e.preventDefault(),C(b,!0),queueMicrotask(()=>{y.current[b]?.focus()}))}}),[n,i,o,f,y,u,S,g,t,r,v,p,C,a,d]);return b.useMemo(()=>({props:T,highlightedIndex:S,onHighlightedIndexChange:C,elementsRef:y,disabledIndices:f,onMapChange:w,relayKeyboardEvent:T.onKeyDown}),[T,S,C,y,f,w])}function u3(e,t){for(let n of n3.values())if(!t.includes(n)&&e.getModifierState(n))return!0;return!1}function d3(e){let{render:t,className:n,refs:r=_E,props:i=_E,state:a=vE,stateAttributesMapping:o,highlightedIndex:s,onHighlightedIndexChange:c,orientation:l,dense:u,itemSizes:d,loopFocus:f,cols:p,enableHomeAndEndKeys:m,onMapChange:h,stopEventPropagation:g=!0,rootRef:_,disabledIndices:v,modifierKeys:y,highlightItemOnHover:x=!1,tag:S=`div`,...C}=e,{props:w,highlightedIndex:T,onHighlightedIndexChange:E,elementsRef:D,onMapChange:O,relayKeyboardEvent:k}=l3({itemSizes:d,cols:p,loopFocus:f,dense:u,orientation:l,highlightedIndex:s,onHighlightedIndexChange:c,rootRef:_,stopEventPropagation:g,enableHomeAndEndKeys:m,direction:R1(),disabledIndices:v,modifierKeys:y}),A=CE(S,e,{state:a,ref:r,props:[w,...i,C],stateAttributesMapping:o}),j=b.useMemo(()=>({highlightedIndex:T,onHighlightedIndexChange:E,highlightItemOnHover:x,relayKeyboardEvent:k}),[T,E,x,k]);return(0,G.jsx)(QT.Provider,{value:j,children:(0,G.jsx)(N1,{elementsRef:D,onMapChange:e=>{h?.(e),O(e)},children:A})})}var f3=b.forwardRef(function(e,t){let{activateOnFocus:n=!1,className:r,loopFocus:i=!0,render:a,...o}=e,{getTabElementBySelectedValue:s,onValueChange:c,orientation:l,value:u,setTabMap:d,tabActivationDirection:f}=B1(),[p,m]=b.useState(0),[h,g]=b.useState(null),_=b.useRef(new Set),v=b.useRef(new Set),y=b.useRef(null),x=VT(()=>{_.current.forEach(e=>{e()})});b.useEffect(()=>{if(typeof ResizeObserver>`u`)return;let e=new ResizeObserver(()=>{_.current.size&&x()});return y.current=e,h&&e.observe(h),v.current.forEach(t=>{e.observe(t)}),()=>{e.disconnect(),y.current=null}},[h,x]);let S=VT(e=>(_.current.add(e),()=>{_.current.delete(e)})),C=VT(e=>(v.current.add(e),y.current?.observe(e),()=>{v.current.delete(e),y.current?.unobserve(e)})),w=m3(u,l,h,s),T=VT((e,t)=>{e!==u&&(t.activationDirection=w(e),c(e,t))}),E={orientation:l,tabActivationDirection:f},D={"aria-orientation":l===`vertical`?`vertical`:void 0,role:`tablist`},O=b.useMemo(()=>({activateOnFocus:n,highlightedTabIndex:p,registerIndicatorUpdateListener:S,registerTabResizeObserverElement:C,onTabActivation:T,setHighlightedTabIndex:m,tabsListElement:h}),[n,p,S,C,T,m,h]);return(0,G.jsx)(e0.Provider,{value:O,children:(0,G.jsx)(d3,{render:a,className:r,state:E,refs:[t,g],props:[D,o],stateAttributesMapping:H1,highlightedIndex:p,enableHomeAndEndKeys:!0,loopFocus:i,orientation:l,onHighlightedIndexChange:m,onMapChange:d,disabledIndices:_E})})});function p3(e,t){let{left:n,top:r}=e.getBoundingClientRect(),{left:i,top:a}=t.getBoundingClientRect();return{left:n-i,top:r-a}}function m3(e,t,n,r){let[i,a]=b.useState(null);return $(()=>{if(e==null||n==null){a(null);return}let i=r(e);if(i==null){a(null);return}let{left:o,top:s}=p3(i,n);a(t===`horizontal`?o:s)},[t,r,n,e]),b.useCallback(o=>{if(o===e)return`none`;if(o==null)return a(null),`none`;if(o!=null&&n!=null){let e=r(o);if(e!=null){let{left:r,top:o}=p3(e,n);if(i==null)return a(t===`horizontal`?r:o),`none`;if(t===`horizontal`){if(r<i)return a(r),`left`;if(r>i)return a(r),`right`}else if(o<i)return a(o),`up`;else if(o>i)return a(o),`down`}}return`none`},[r,t,i,n,e])}function h3({className:e,orientation:t=`horizontal`,...n}){return(0,G.jsx)(U1,{"data-slot":`tabs`,"data-orientation":t,className:iO(`gap-2 group/tabs flex data-[orientation=horizontal]:flex-col`,e),...n})}var g3=NE(`rounded-none p-[3px] group-data-horizontal/tabs:h-8 data-[variant=line]:rounded-none group/tabs-list text-muted-foreground inline-flex w-fit items-center justify-center group-data-[orientation=vertical]/tabs:h-fit group-data-[orientation=vertical]/tabs:flex-col`,{variants:{variant:{default:`bg-muted`,line:`gap-1 bg-transparent`}},defaultVariants:{variant:`default`}});function _3({className:e,variant:t=`default`,...n}){return(0,G.jsx)(f3,{"data-slot":`tabs-list`,"data-variant":t,className:iO(g3({variant:t}),e),...n})}function v3({className:e,...t}){return(0,G.jsx)(x4,{"data-slot":`tabs-trigger`,className:iO(`gap-1.5 rounded-none border border-transparent px-1.5 py-0.5 text-xs font-medium group-data-vertical/tabs:py-[calc(--spacing(1.25))] [&_svg:not([class*='size-'])]:size-4 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring text-foreground/60 hover:text-foreground dark:text-muted-foreground dark:hover:text-foreground relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center whitespace-nowrap transition-all group-data-[orientation=vertical]/tabs:w-full group-data-[orientation=vertical]/tabs:justify-start focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0`,`group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent`,`data-active:bg-background dark:data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 data-active:text-foreground`,`after:bg-foreground after:absolute after:opacity-0 after:transition-opacity group-data-[orientation=horizontal]/tabs:after:inset-x-0 group-data-[orientation=horizontal]/tabs:after:bottom-[-5px] group-data-[orientation=horizontal]/tabs:after:h-0.5 group-data-[orientation=vertical]/tabs:after:inset-y-0 group-data-[orientation=vertical]/tabs:after:-right-1 group-data-[orientation=vertical]/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100`,e),...t})}function y3({className:e,...t}){return(0,G.jsx)(H4,{"data-slot":`tabs-content`,className:iO(`text-xs/relaxed flex-1 outline-none`,e),...t})}function b3({className:e,size:t=`default`,...n}){return(0,G.jsx)(`div`,{"data-slot":`card`,"data-size":t,className:iO(`ring-foreground/10 bg-card text-card-foreground gap-4 overflow-hidden rounded-none py-4 text-xs/relaxed ring-1 has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-2 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-none *:[img:last-child]:rounded-none group/card flex flex-col`,e),...n})}function x3({className:e,...t}){return(0,G.jsx)(`div`,{"data-slot":`card-content`,className:iO(`px-4 group-data-[size=sm]/card:px-3`,e),...t})}var S3=function(e){return typeof e==`function`},C3=function(e){return typeof e==`string`},w3=function(e){return typeof e==`number`};function T3(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 E3(e){var t=(0,b.useRef)(e);return t.current=e,t}var D3=function(e){var t=E3(e);(0,b.useEffect)(function(){return function(){t.current()}},[])},O3=!!(typeof window<`u`&&window.document&&window.document.createElement);function k3(e,t){if(O3)return e?S3(e)?e():`current`in e?e.current:e:t}var A3=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 k3(e)});if(!i.current){i.current=!0,a.current=c,o.current=n,s.current=t();return}(c.length!==a.current.length||!T3(a.current,c)||!T3(o.current,n))&&((e=s.current)==null||e.call(s),a.current=c,o.current=n,s.current=t())}),D3(function(){var e;(e=s.current)==null||e.call(s),i.current=!1})}}(b.useEffect),j3=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}}}))()),M3=function(e,t){return e===void 0&&(e=[]),t===void 0&&(t=[]),(0,j3.default)(e,t)},N3=function(e,t,n){var r=(0,b.useRef)(void 0),i=(0,b.useRef)(0);M3(t,r.current)||(i.current+=1),r.current=t,A3(e,[i.current],n)},P3=/(mac|iphone|ipod|ipad)/i.test(typeof navigator<`u`?navigator==null?void 0:navigator.platform:``),F3={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:P3?[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},I3={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`?F3.meta.includes(e.keyCode):e.metaKey}};function L3(e){return C3(e)||w3(e)}function R3(e){var t=Object.keys(I3).reduce(function(t,n){return I3[n](e)?t+1:t},0);return[16,17,18,91,92].includes(e.keyCode)?t:t+1}function z3(e,t,n){var r,i;if(!e.key)return!1;if(w3(t))return e.keyCode===t?t:!1;var a=t.split(`.`),o=0;try{for(var s=FZ(a),c=s.next();!c.done;c=s.next()){var l=c.value,u=I3[l],d=F3[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&&R3(e)===a.length?t:!1:o===a.length?t:!1}function B3(e,t){return S3(e)?e:L3(e)?function(n){return z3(n,e,t)}:Array.isArray(e)?function(n){return e.find(function(e){return z3(n,e,t)})}:function(){return!!e}}var V3=[`keydown`];function H3(e,t,n){var r=n||{},i=r.events,a=i===void 0?V3:i,o=r.target,s=r.exactMatch,c=s===void 0?!1:s,l=r.useCapture,u=l===void 0?!1:l,d=E3(t),f=E3(e);N3(function(){var e,t,n,r=k3(o,window);if(r){var i=function(e){var t=e,n=B3(f.current,c)(t),r=L3(n)?n:t.key;if(n)return d.current?.call(d,t,r)};try{for(var s=FZ(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=FZ(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 U3=({validateForm:e,formData:t})=>{let n=hT(),{mutateAsync:r,isPending:i}=yte(),a=async()=>{e&&!await e()||t&&await r({toolName:n.name,args:t})};return H3(`Enter`,a),(0,G.jsx)(`div`,{className:`flex flex-col items-end gap-1`,children:(0,G.jsxs)(oO,{onClick:a,variant:`default`,disabled:i,children:[i?(0,G.jsx)(cn,{className:`h-4 w-4 animate-spin`}):(0,G.jsx)(dn,{className:`h-4 w-4`}),`Call Tool`]})})},W3=u(s(((e,t)=>{(function(n,r){typeof e==`object`&&typeof t==`object`?t.exports=r(p()):typeof define==`function`&&define.amd?define([`react`],r):typeof e==`object`?e.reactJsonView=r(p()):n.reactJsonView=r(n.React)})(e,e=>(()=>{var t={165(e,t,n){let r=n(877),i={};for(let e of Object.keys(r))i[r[e]]=e;let a={rgb:{channels:3,labels:`rgb`},hsl:{channels:3,labels:`hsl`},hsv:{channels:3,labels:`hsv`},hwb:{channels:3,labels:`hwb`},cmyk:{channels:4,labels:`cmyk`},xyz:{channels:3,labels:`xyz`},lab:{channels:3,labels:`lab`},lch:{channels:3,labels:`lch`},hex:{channels:1,labels:[`hex`]},keyword:{channels:1,labels:[`keyword`]},ansi16:{channels:1,labels:[`ansi16`]},ansi256:{channels:1,labels:[`ansi256`]},hcg:{channels:3,labels:[`h`,`c`,`g`]},apple:{channels:3,labels:[`r16`,`g16`,`b16`]},gray:{channels:1,labels:[`gray`]}};e.exports=a;for(let e of Object.keys(a)){if(!(`channels`in a[e]))throw Error(`missing channels property: `+e);if(!(`labels`in a[e]))throw Error(`missing channel labels property: `+e);if(a[e].labels.length!==a[e].channels)throw Error(`channel and label counts mismatch: `+e);let{channels:t,labels:n}=a[e];delete a[e].channels,delete a[e].labels,Object.defineProperty(a[e],`channels`,{value:t}),Object.defineProperty(a[e],`labels`,{value:n})}function o(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}a.rgb.hsl=function(e){let t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=a-i,s,c;a===i?s=0:t===a?s=(n-r)/o:n===a?s=2+(r-t)/o:r===a&&(s=4+(t-n)/o),s=Math.min(60*s,360),s<0&&(s+=360);let l=(i+a)/2;return c=a===i?0:l<=.5?o/(a+i):o/(2-a-i),[s,100*c,100*l]},a.rgb.hsv=function(e){let t,n,r,i,a,o=e[0]/255,s=e[1]/255,c=e[2]/255,l=Math.max(o,s,c),u=l-Math.min(o,s,c),d=function(e){return(l-e)/6/u+.5};return u===0?(i=0,a=0):(a=u/l,t=d(o),n=d(s),r=d(c),o===l?i=r-n:s===l?i=1/3+t-r:c===l&&(i=2/3+n-t),i<0?i+=1:i>1&&--i),[360*i,100*a,100*l]},a.rgb.hwb=function(e){let t=e[0],n=e[1],r=e[2],i=a.rgb.hsl(e)[0],o=1/255*Math.min(t,Math.min(n,r));return r=1-1/255*Math.max(t,Math.max(n,r)),[i,100*o,100*r]},a.rgb.cmyk=function(e){let t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(1-t,1-n,1-r);return[100*((1-t-i)/(1-i)||0),100*((1-n-i)/(1-i)||0),100*((1-r-i)/(1-i)||0),100*i]},a.rgb.keyword=function(e){let t=i[e];if(t)return t;let n,a=1/0;for(let t of Object.keys(r)){let i=o(e,r[t]);i<a&&(a=i,n=t)}return n},a.keyword.rgb=function(e){return r[e]},a.rgb.xyz=function(e){let t=e[0]/255,n=e[1]/255,r=e[2]/255;return t=t>.04045?((t+.055)/1.055)**2.4:t/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92,[100*(.4124*t+.3576*n+.1805*r),100*(.2126*t+.7152*n+.0722*r),100*(.0193*t+.1192*n+.9505*r)]},a.rgb.lab=function(e){let t=a.rgb.xyz(e),n=t[0],r=t[1],i=t[2];return n/=95.047,r/=100,i/=108.883,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,i=i>.008856?i**(1/3):7.787*i+16/116,[116*r-16,500*(n-r),200*(r-i)]},a.hsl.rgb=function(e){let t=e[0]/360,n=e[1]/100,r=e[2]/100,i,a,o;if(n===0)return o=255*r,[o,o,o];i=r<.5?r*(1+n):r+n-r*n;let s=2*r-i,c=[0,0,0];for(let e=0;e<3;e++)a=t+1/3*-(e-1),a<0&&a++,a>1&&a--,o=6*a<1?s+6*(i-s)*a:2*a<1?i:3*a<2?s+(i-s)*(2/3-a)*6:s,c[e]=255*o;return c},a.hsl.hsv=function(e){let t=e[0],n=e[1]/100,r=e[2]/100,i=n,a=Math.max(r,.01);return r*=2,n*=r<=1?r:2-r,i*=a<=1?a:2-a,[t,100*(r===0?2*i/(a+i):2*n/(r+n)),100*((r+n)/2)]},a.hsv.rgb=function(e){let t=e[0]/60,n=e[1]/100,r=e[2]/100,i=Math.floor(t)%6,a=t-Math.floor(t),o=255*r*(1-n),s=255*r*(1-n*a),c=255*r*(1-n*(1-a));switch(r*=255,i){case 0:return[r,c,o];case 1:return[s,r,o];case 2:return[o,r,c];case 3:return[o,s,r];case 4:return[c,o,r];case 5:return[r,o,s]}},a.hsv.hsl=function(e){let t=e[0],n=e[1]/100,r=e[2]/100,i=Math.max(r,.01),a,o;o=(2-n)*r;let s=(2-n)*i;return a=n*i,a/=s<=1?s:2-s,a||=0,o/=2,[t,100*a,100*o]},a.hwb.rgb=function(e){let t=e[0]/360,n=e[1]/100,r=e[2]/100,i=n+r,a;i>1&&(n/=i,r/=i);let o=Math.floor(6*t),s=1-r;a=6*t-o,1&o&&(a=1-a);let c=n+a*(s-n),l,u,d;switch(o){default:case 6:case 0:l=s,u=c,d=n;break;case 1:l=c,u=s,d=n;break;case 2:l=n,u=s,d=c;break;case 3:l=n,u=c,d=s;break;case 4:l=c,u=n,d=s;break;case 5:l=s,u=n,d=c}return[255*l,255*u,255*d]},a.cmyk.rgb=function(e){let t=e[0]/100,n=e[1]/100,r=e[2]/100,i=e[3]/100;return[255*(1-Math.min(1,t*(1-i)+i)),255*(1-Math.min(1,n*(1-i)+i)),255*(1-Math.min(1,r*(1-i)+i))]},a.xyz.rgb=function(e){let t=e[0]/100,n=e[1]/100,r=e[2]/100,i,a,o;return i=3.2406*t+-1.5372*n+-.4986*r,a=-.9689*t+1.8758*n+.0415*r,o=.0557*t+-.204*n+1.057*r,i=i>.0031308?1.055*i**(1/2.4)-.055:12.92*i,a=a>.0031308?1.055*a**(1/2.4)-.055:12.92*a,o=o>.0031308?1.055*o**(1/2.4)-.055:12.92*o,i=Math.min(Math.max(0,i),1),a=Math.min(Math.max(0,a),1),o=Math.min(Math.max(0,o),1),[255*i,255*a,255*o]},a.xyz.lab=function(e){let t=e[0],n=e[1],r=e[2];return t/=95.047,n/=100,r/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,[116*n-16,500*(t-n),200*(n-r)]},a.lab.xyz=function(e){let t,n,r;n=(e[0]+16)/116,t=e[1]/500+n,r=n-e[2]/200;let i=n**3,a=t**3,o=r**3;return n=i>.008856?i:(n-16/116)/7.787,t=a>.008856?a:(t-16/116)/7.787,r=o>.008856?o:(r-16/116)/7.787,t*=95.047,n*=100,r*=108.883,[t,n,r]},a.lab.lch=function(e){let t=e[0],n=e[1],r=e[2],i;return i=360*Math.atan2(r,n)/2/Math.PI,i<0&&(i+=360),[t,Math.sqrt(n*n+r*r),i]},a.lch.lab=function(e){let t=e[0],n=e[1],r=e[2]/360*2*Math.PI;return[t,n*Math.cos(r),n*Math.sin(r)]},a.rgb.ansi16=function(e,t=null){let[n,r,i]=e,o=t===null?a.rgb.hsv(e)[2]:t;if(o=Math.round(o/50),o===0)return 30;let s=30+(Math.round(i/255)<<2|Math.round(r/255)<<1|Math.round(n/255));return o===2&&(s+=60),s},a.hsv.ansi16=function(e){return a.rgb.ansi16(a.hsv.rgb(e),e[2])},a.rgb.ansi256=function(e){let t=e[0],n=e[1],r=e[2];return t===n&&n===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)},a.ansi16.rgb=function(e){let t=e%10;if(t===0||t===7)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];let n=.5*(1+~~(e>50));return[(1&t)*n*255,(t>>1&1)*n*255,(t>>2&1)*n*255]},a.ansi256.rgb=function(e){if(e>=232){let t=10*(e-232)+8;return[t,t,t]}let t;return e-=16,[Math.floor(e/36)/5*255,Math.floor((t=e%36)/6)/5*255,t%6/5*255]},a.rgb.hex=function(e){let t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return`000000`.substring(t.length)+t},a.hex.rgb=function(e){let t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let n=t[0];t[0].length===3&&(n=n.split(``).map(e=>e+e).join(``));let r=parseInt(n,16);return[r>>16&255,r>>8&255,255&r]},a.rgb.hcg=function(e){let t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.max(Math.max(t,n),r),a=Math.min(Math.min(t,n),r),o=i-a,s,c;return s=o<1?a/(1-o):0,c=o<=0?0:i===t?(n-r)/o%6:i===n?2+(r-t)/o:4+(t-n)/o,c/=6,c%=1,[360*c,100*o,100*s]},a.hsl.hcg=function(e){let t=e[1]/100,n=e[2]/100,r=n<.5?2*t*n:2*t*(1-n),i=0;return r<1&&(i=(n-.5*r)/(1-r)),[e[0],100*r,100*i]},a.hsv.hcg=function(e){let t=e[1]/100,n=e[2]/100,r=t*n,i=0;return r<1&&(i=(n-r)/(1-r)),[e[0],100*r,100*i]},a.hcg.rgb=function(e){let t=e[0]/360,n=e[1]/100,r=e[2]/100;if(n===0)return[255*r,255*r,255*r];let i=[0,0,0],a=t%1*6,o=a%1,s=1-o,c=0;switch(Math.floor(a)){case 0:i[0]=1,i[1]=o,i[2]=0;break;case 1:i[0]=s,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=o;break;case 3:i[0]=0,i[1]=s,i[2]=1;break;case 4:i[0]=o,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=s}return c=(1-n)*r,[255*(n*i[0]+c),255*(n*i[1]+c),255*(n*i[2]+c)]},a.hcg.hsv=function(e){let t=e[1]/100,n=t+e[2]/100*(1-t),r=0;return n>0&&(r=t/n),[e[0],100*r,100*n]},a.hcg.hsl=function(e){let t=e[1]/100,n=e[2]/100*(1-t)+.5*t,r=0;return n>0&&n<.5?r=t/(2*n):n>=.5&&n<1&&(r=t/(2*(1-n))),[e[0],100*r,100*n]},a.hcg.hwb=function(e){let t=e[1]/100,n=t+e[2]/100*(1-t);return[e[0],100*(n-t),100*(1-n)]},a.hwb.hcg=function(e){let t=e[1]/100,n=1-e[2]/100,r=n-t,i=0;return r<1&&(i=(n-r)/(1-r)),[e[0],100*r,100*i]},a.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},a.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},a.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},a.gray.hsl=function(e){return[0,0,e[0]]},a.gray.hsv=a.gray.hsl,a.gray.hwb=function(e){return[0,100,e[0]]},a.gray.cmyk=function(e){return[0,0,0,e[0]]},a.gray.lab=function(e){return[e[0],0,0]},a.gray.hex=function(e){let t=255&Math.round(e[0]/100*255),n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return`000000`.substring(n.length)+n},a.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]}},880(e,t,n){let r=n(165),i=n(985),a={};Object.keys(r).forEach(e=>{a[e]={},Object.defineProperty(a[e],`channels`,{value:r[e].channels}),Object.defineProperty(a[e],`labels`,{value:r[e].labels});let t=i(e);Object.keys(t).forEach(n=>{let r=t[n];a[e][n]=function(e){let t=function(...t){let n=t[0];if(n==null)return n;n.length>1&&(t=n);let r=e(t);if(typeof r==`object`)for(let e=r.length,t=0;t<e;t++)r[t]=Math.round(r[t]);return r};return`conversion`in e&&(t.conversion=e.conversion),t}(r),a[e][n].raw=function(e){let t=function(...t){let n=t[0];return n==null?n:(n.length>1&&(t=n),e(t))};return`conversion`in e&&(t.conversion=e.conversion),t}(r)})}),e.exports=a},985(e,t,n){let r=n(165);function i(e){let t=function(){let e={},t=Object.keys(r);for(let n=t.length,r=0;r<n;r++)e[t[r]]={distance:-1,parent:null};return e}(),n=[e];for(t[e].distance=0;n.length;){let e=n.pop(),i=Object.keys(r[e]);for(let r=i.length,a=0;a<r;a++){let r=i[a],o=t[r];o.distance===-1&&(o.distance=t[e].distance+1,o.parent=e,n.unshift(r))}}return t}function a(e,t){return function(n){return t(e(n))}}function o(e,t){let n=[t[e].parent,e],i=r[t[e].parent][e],o=t[e].parent;for(;t[o].parent;)n.unshift(t[o].parent),i=a(r[t[o].parent][o],i),o=t[o].parent;return i.conversion=n,i}e.exports=function(e){let t=i(e),n={},r=Object.keys(t);for(let e=r.length,i=0;i<e;i++){let e=r[i];t[e].parent!==null&&(n[e]=o(e,t))}return n}},877(e){e.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},138(e,t,n){var r=n(877),i=n(403),a=Object.hasOwnProperty,o=Object.create(null);for(var s in r)a.call(r,s)&&(o[r[s]]=s);var c=e.exports={to:{},get:{}};function l(e,t,n){return Math.min(Math.max(t,e),n)}function u(e){var t=Math.round(e).toString(16).toUpperCase();return t.length<2?`0`+t:t}c.get=function(e){var t,n;switch(e.substring(0,3).toLowerCase()){case`hsl`:t=c.get.hsl(e),n=`hsl`;break;case`hwb`:t=c.get.hwb(e),n=`hwb`;break;default:t=c.get.rgb(e),n=`rgb`}return t?{model:n,value:t}:null},c.get.rgb=function(e){if(!e)return null;var t,n,i,o=[0,0,0,1];if(t=e.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(i=t[2],t=t[1],n=0;n<3;n++){var s=2*n;o[n]=parseInt(t.slice(s,s+2),16)}i&&(o[3]=parseInt(i,16)/255)}else if(t=e.match(/^#([a-f0-9]{3,4})$/i)){for(i=(t=t[1])[3],n=0;n<3;n++)o[n]=parseInt(t[n]+t[n],16);i&&(o[3]=parseInt(i+i,16)/255)}else if(t=e.match(/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)){for(n=0;n<3;n++)o[n]=parseInt(t[n+1],0);t[4]&&(t[5]?o[3]=.01*parseFloat(t[4]):o[3]=parseFloat(t[4]))}else{if(!(t=e.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)))return(t=e.match(/^(\w+)$/))?t[1]===`transparent`?[0,0,0,0]:a.call(r,t[1])?((o=r[t[1]])[3]=1,o):null:null;for(n=0;n<3;n++)o[n]=Math.round(2.55*parseFloat(t[n+1]));t[4]&&(t[5]?o[3]=.01*parseFloat(t[4]):o[3]=parseFloat(t[4]))}for(n=0;n<3;n++)o[n]=l(o[n],0,255);return o[3]=l(o[3],0,1),o},c.get.hsl=function(e){if(!e)return null;var t=e.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(t){var n=parseFloat(t[4]);return[(parseFloat(t[1])%360+360)%360,l(parseFloat(t[2]),0,100),l(parseFloat(t[3]),0,100),l(isNaN(n)?1:n,0,1)]}return null},c.get.hwb=function(e){if(!e)return null;var t=e.match(/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(t){var n=parseFloat(t[4]);return[(parseFloat(t[1])%360+360)%360,l(parseFloat(t[2]),0,100),l(parseFloat(t[3]),0,100),l(isNaN(n)?1:n,0,1)]}return null},c.to.hex=function(){var e=i(arguments);return`#`+u(e[0])+u(e[1])+u(e[2])+(e[3]<1?u(Math.round(255*e[3])):``)},c.to.rgb=function(){var e=i(arguments);return e.length<4||e[3]===1?`rgb(`+Math.round(e[0])+`, `+Math.round(e[1])+`, `+Math.round(e[2])+`)`:`rgba(`+Math.round(e[0])+`, `+Math.round(e[1])+`, `+Math.round(e[2])+`, `+e[3]+`)`},c.to.rgb.percent=function(){var e=i(arguments),t=Math.round(e[0]/255*100),n=Math.round(e[1]/255*100),r=Math.round(e[2]/255*100);return e.length<4||e[3]===1?`rgb(`+t+`%, `+n+`%, `+r+`%)`:`rgba(`+t+`%, `+n+`%, `+r+`%, `+e[3]+`)`},c.to.hsl=function(){var e=i(arguments);return e.length<4||e[3]===1?`hsl(`+e[0]+`, `+e[1]+`%, `+e[2]+`%)`:`hsla(`+e[0]+`, `+e[1]+`%, `+e[2]+`%, `+e[3]+`)`},c.to.hwb=function(){var e=i(arguments),t=``;return e.length>=4&&e[3]!==1&&(t=`, `+e[3]),`hwb(`+e[0]+`, `+e[1]+`%, `+e[2]+`%`+t+`)`},c.to.keyword=function(e){return o[e.slice(0,3)]}},742(e,t,n){let r=n(138),i=n(880),a=[`keyword`,`gray`,`hex`],o={};for(let e of Object.keys(i))o[[...i[e].labels].sort().join(``)]=e;let s={};function c(e,t){if(!(this instanceof c))return new c(e,t);if(t&&t in a&&(t=null),t&&!(t in i))throw Error(`Unknown model: `+t);let n,l;if(e==null)this.model=`rgb`,this.color=[0,0,0],this.valpha=1;else if(e instanceof c)this.model=e.model,this.color=[...e.color],this.valpha=e.valpha;else if(typeof e==`string`){let t=r.get(e);if(t===null)throw Error(`Unable to parse color from string: `+e);this.model=t.model,l=i[this.model].channels,this.color=t.value.slice(0,l),this.valpha=typeof t.value[l]==`number`?t.value[l]:1}else if(e.length>0)this.model=t||`rgb`,l=i[this.model].channels,this.color=f(Array.prototype.slice.call(e,0,l),l),this.valpha=typeof e[l]==`number`?e[l]:1;else if(typeof e==`number`)this.model=`rgb`,this.color=[e>>16&255,e>>8&255,255&e],this.valpha=1;else{this.valpha=1;let t=Object.keys(e);`alpha`in e&&(t.splice(t.indexOf(`alpha`),1),this.valpha=typeof e.alpha==`number`?e.alpha:0);let r=t.sort().join(``);if(!(r in o))throw Error(`Unable to parse color from object: `+JSON.stringify(e));this.model=o[r];let{labels:a}=i[this.model],s=[];for(n=0;n<a.length;n++)s.push(e[a[n]]);this.color=f(s)}if(s[this.model])for(l=i[this.model].channels,n=0;n<l;n++){let e=s[this.model][n];e&&(this.color[n]=e(this.color[n]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}c.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(e){let t=this.model in r.to?this:this.rgb();t=t.round(typeof e==`number`?e:1);let n=t.valpha===1?t.color:[...t.color,this.valpha];return r.to[t.model](n)},percentString(e){let t=this.rgb().round(typeof e==`number`?e:1),n=t.valpha===1?t.color:[...t.color,this.valpha];return r.to.rgb.percent(n)},array(){return this.valpha===1?[...this.color]:[...this.color,this.valpha]},object(){let e={},{channels:t}=i[this.model],{labels:n}=i[this.model];for(let r=0;r<t;r++)e[n[r]]=this.color[r];return this.valpha!==1&&(e.alpha=this.valpha),e},unitArray(){let e=this.rgb().color;return e[0]/=255,e[1]/=255,e[2]/=255,this.valpha!==1&&e.push(this.valpha),e},unitObject(){let e=this.rgb().object();return e.r/=255,e.g/=255,e.b/=255,this.valpha!==1&&(e.alpha=this.valpha),e},round(e){return e=Math.max(e||0,0),new c([...this.color.map(l(e)),this.valpha],this.model)},alpha(e){return e===void 0?this.valpha:new c([...this.color,Math.max(0,Math.min(1,e))],this.model)},red:u(`rgb`,0,d(255)),green:u(`rgb`,1,d(255)),blue:u(`rgb`,2,d(255)),hue:u([`hsl`,`hsv`,`hsl`,`hwb`,`hcg`],0,e=>(e%360+360)%360),saturationl:u(`hsl`,1,d(100)),lightness:u(`hsl`,2,d(100)),saturationv:u(`hsv`,1,d(100)),value:u(`hsv`,2,d(100)),chroma:u(`hcg`,1,d(100)),gray:u(`hcg`,2,d(100)),white:u(`hwb`,1,d(100)),wblack:u(`hwb`,2,d(100)),cyan:u(`cmyk`,0,d(100)),magenta:u(`cmyk`,1,d(100)),yellow:u(`cmyk`,2,d(100)),black:u(`cmyk`,3,d(100)),x:u(`xyz`,0,d(95.047)),y:u(`xyz`,1,d(100)),z:u(`xyz`,2,d(108.833)),l:u(`lab`,0,d(100)),a:u(`lab`,1),b:u(`lab`,2),keyword(e){return e===void 0?i[this.model].keyword(this.color):new c(e)},hex(e){return e===void 0?r.to.hex(this.rgb().round().color):new c(e)},hexa(e){if(e!==void 0)return new c(e);let t=this.rgb().round().color,n=Math.round(255*this.valpha).toString(16).toUpperCase();return n.length===1&&(n=`0`+n),r.to.hex(t)+n},rgbNumber(){let e=this.rgb().color;return(255&e[0])<<16|(255&e[1])<<8|255&e[2]},luminosity(){let e=this.rgb().color,t=[];for(let[n,r]of e.entries()){let e=r/255;t[n]=e<=.04045?e/12.92:((e+.055)/1.055)**2.4}return .2126*t[0]+.7152*t[1]+.0722*t[2]},contrast(e){let t=this.luminosity(),n=e.luminosity();return t>n?(t+.05)/(n+.05):(n+.05)/(t+.05)},level(e){let t=this.contrast(e);return t>=7?`AAA`:t>=4.5?`AA`:``},isDark(){let e=this.rgb().color;return(2126*e[0]+7152*e[1]+722*e[2])/1e4<128},isLight(){return!this.isDark()},negate(){let e=this.rgb();for(let t=0;t<3;t++)e.color[t]=255-e.color[t];return e},lighten(e){let t=this.hsl();return t.color[2]+=t.color[2]*e,t},darken(e){let t=this.hsl();return t.color[2]-=t.color[2]*e,t},saturate(e){let t=this.hsl();return t.color[1]+=t.color[1]*e,t},desaturate(e){let t=this.hsl();return t.color[1]-=t.color[1]*e,t},whiten(e){let t=this.hwb();return t.color[1]+=t.color[1]*e,t},blacken(e){let t=this.hwb();return t.color[2]+=t.color[2]*e,t},grayscale(){let e=this.rgb().color,t=.3*e[0]+.59*e[1]+.11*e[2];return c.rgb(t,t,t)},fade(e){return this.alpha(this.valpha-this.valpha*e)},opaquer(e){return this.alpha(this.valpha+this.valpha*e)},rotate(e){let t=this.hsl(),n=t.color[0];return n=(n+e)%360,n=n<0?360+n:n,t.color[0]=n,t},mix(e,t){if(!e||!e.rgb)throw Error(`Argument to "mix" was not a Color instance, but rather an instance of `+typeof e);let n=e.rgb(),r=this.rgb(),i=t===void 0?.5:t,a=2*i-1,o=n.alpha()-r.alpha(),s=((a*o===-1?a:(a+o)/(1+a*o))+1)/2,l=1-s;return c.rgb(s*n.red()+l*r.red(),s*n.green()+l*r.green(),s*n.blue()+l*r.blue(),n.alpha()*i+r.alpha()*(1-i))}};for(let e of Object.keys(i)){if(a.includes(e))continue;let{channels:t}=i[e];c.prototype[e]=function(...t){return this.model===e?new c(this):t.length>0?new c(t,e):new c([...(n=i[this.model][e].raw(this.color),Array.isArray(n)?n:[n]),this.valpha],e);var n},c[e]=function(...n){let r=n[0];return typeof r==`number`&&(r=f(n,t)),new c(r,e)}}function l(e){return function(t){return function(e,t){return Number(e.toFixed(t))}(t,e)}}function u(e,t,n){e=Array.isArray(e)?e:[e];for(let r of e)(s[r]||(s[r]=[]))[t]=n;return e=e[0],function(r){let i;return r===void 0?(i=this[e]().color[t],n&&(i=n(i)),i):(n&&(r=n(r)),i=this[e](),i.color[t]=r,i)}}function d(e){return function(t){return Math.max(0,Math.min(e,t))}}function f(e,t){for(let n=0;n<t;n++)typeof e[n]!=`number`&&(e[n]=0);return e}e.exports=c},784(e){var t,n=typeof Reflect==`object`?Reflect:null,r=n&&typeof n.apply==`function`?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};t=n&&typeof n.ownKeys==`function`?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function a(){a.init.call(this)}e.exports=a,e.exports.once=function(e,t){return new Promise(function(n,r){function i(n){e.removeListener(t,a),r(n)}function a(){typeof e.removeListener==`function`&&e.removeListener(`error`,i),n([].slice.call(arguments))}h(e,t,a,{once:!0}),t!==`error`&&function(e,t,n){typeof e.on==`function`&&h(e,`error`,t,n)}(e,i,{once:!0})})},a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var o=10;function s(e){if(typeof e!=`function`)throw TypeError(`The "listener" argument must be of type Function. Received type `+typeof e)}function c(e){return e._maxListeners===void 0?a.defaultMaxListeners:e._maxListeners}function l(e,t,n,r){var i,a,o,l;if(s(n),(a=e._events)===void 0?(a=e._events=Object.create(null),e._eventsCount=0):(a.newListener!==void 0&&(e.emit(`newListener`,t,n.listener?n.listener:n),a=e._events),o=a[t]),o===void 0)o=a[t]=n,++e._eventsCount;else if(typeof o==`function`?o=a[t]=r?[n,o]:[o,n]:r?o.unshift(n):o.push(n),(i=c(e))>0&&o.length>i&&!o.warned){o.warned=!0;var u=Error(`Possible EventEmitter memory leak detected. `+o.length+` `+String(t)+` listeners added. Use emitter.setMaxListeners() to increase limit`);u.name=`MaxListenersExceededWarning`,u.emitter=e,u.type=t,u.count=o.length,l=u,console&&console.warn&&console.warn(l)}return e}function u(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=u.bind(r);return i.listener=n,r.wrapFn=i,i}function f(e,t,n){var r=e._events;if(r===void 0)return[];var i=r[t];return i===void 0?[]:typeof i==`function`?n?[i.listener||i]:[i]:n?function(e){for(var t=Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):m(i,i.length)}function p(e){var t=this._events;if(t!==void 0){var n=t[e];if(typeof n==`function`)return 1;if(n!==void 0)return n.length}return 0}function m(e,t){for(var n=Array(t),r=0;r<t;++r)n[r]=e[r];return n}function h(e,t,n,r){if(typeof e.on==`function`)r.once?e.once(t,n):e.on(t,n);else{if(typeof e.addEventListener!=`function`)throw TypeError(`The "emitter" argument must be of type EventEmitter. Received type `+typeof e);e.addEventListener(t,function i(a){r.once&&e.removeEventListener(t,i),n(a)})}}Object.defineProperty(a,`defaultMaxListeners`,{enumerable:!0,get:function(){return o},set:function(e){if(typeof e!=`number`||e<0||i(e))throw RangeError(`The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received `+e+`.`);o=e}}),a.init=function(){this._events!==void 0&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},a.prototype.setMaxListeners=function(e){if(typeof e!=`number`||e<0||i(e))throw RangeError(`The value of "n" is out of range. It must be a non-negative number. Received `+e+`.`);return this._maxListeners=e,this},a.prototype.getMaxListeners=function(){return c(this)},a.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var i=e===`error`,a=this._events;if(a!==void 0)i&&=a.error===void 0;else if(!i)return!1;if(i){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var s=Error(`Unhandled error.`+(o?` (`+o.message+`)`:``));throw s.context=o,s}var c=a[e];if(c===void 0)return!1;if(typeof c==`function`)r(c,this,t);else{var l=c.length,u=m(c,l);for(n=0;n<l;++n)r(u[n],this,t)}return!0},a.prototype.addListener=function(e,t){return l(this,e,t,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(e,t){return l(this,e,t,!0)},a.prototype.once=function(e,t){return s(t),this.on(e,d(this,e,t)),this},a.prototype.prependOnceListener=function(e,t){return s(t),this.prependListener(e,d(this,e,t)),this},a.prototype.removeListener=function(e,t){var n,r,i,a,o;if(s(t),(r=this._events)===void 0||(n=r[e])===void 0)return this;if(n===t||n.listener===t)--this._eventsCount===0?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit(`removeListener`,e,n.listener||t));else if(typeof n!=`function`){for(i=-1,a=n.length-1;a>=0;a--)if(n[a]===t||n[a].listener===t){o=n[a].listener,i=a;break}if(i<0)return this;i===0?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,i),n.length===1&&(r[e]=n[0]),r.removeListener!==void 0&&this.emit(`removeListener`,e,o||t)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(e){var t,n,r;if((n=this._events)===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[e]),this;if(arguments.length===0){var i,a=Object.keys(n);for(r=0;r<a.length;++r)(i=a[r])!==`removeListener`&&this.removeAllListeners(i);return this.removeAllListeners(`removeListener`),this._events=Object.create(null),this._eventsCount=0,this}if(typeof(t=n[e])==`function`)this.removeListener(e,t);else if(t!==void 0)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},a.prototype.listeners=function(e){return f(this,e,!0)},a.prototype.rawListeners=function(e){return f(this,e,!1)},a.listenerCount=function(e,t){return typeof e.listenerCount==`function`?e.listenerCount(t):p.call(e,t)},a.prototype.listenerCount=p,a.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},94(e){e.exports=function(e){return!(!e||typeof e==`string`)&&(e instanceof Array||Array.isArray(e)||e.length>=0&&(e.splice instanceof Function||Object.getOwnPropertyDescriptor(e,e.length-1)&&e.constructor.name!==`String`))}},403(e,t,n){var r=n(94),i=Array.prototype.concat,a=Array.prototype.slice,o=e.exports=function(e){for(var t=[],n=0,o=e.length;n<o;n++){var s=e[n];r(s)?t=i.call(t,a.call(s)):t.push(s)}return t};o.wrap=function(e){return function(){return e(o(arguments))}}},119(t){t.exports=e}},n={};function r(e){var i=n[e];if(i!==void 0)return i.exports;var a=n[e]={exports:{}};return t[e](a,a.exports,r),a.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{typeof Symbol<`u`&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:`Module`}),Object.defineProperty(e,`__esModule`,{value:!0})};var i={};return(()=>{function e(t){return e=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},e(t)}function t(t){var n=function(t,n){if(e(t)!=`object`||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,n||`default`);if(e(i)!=`object`)return i;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(n===`string`?String:Number)(t)}(t,`string`);return e(n)==`symbol`?n:n+``}function n(e,n,r){return(n=t(n))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function a(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 o(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]==null?{}:arguments[t];t%2?a(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function s(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function c(e,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,`value`in i&&(i.writable=!0),Object.defineProperty(e,t(i.key),i)}}function l(e,t,n){return t&&c(e.prototype,t),n&&c(e,n),Object.defineProperty(e,`prototype`,{writable:!1}),e}function u(e){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},u(e)}function d(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(d=function(){return!!e})()}function f(t,n){if(n&&(e(n)==`object`||typeof n==`function`))return n;if(n!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return function(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}(t)}function p(e,t,n){return t=u(t),f(e,d()?Reflect.construct(t,n||[],u(e).constructor):t.apply(e,n))}function m(e,t){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},m(e,t)}function h(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,`prototype`,{writable:!1}),t&&m(e,t)}r.r(i),r.d(i,{default:()=>kr});var g=r(119),_=r.n(g);function v(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);e!=null&&this.setState(e)}function y(e){this.setState(function(t){return this.constructor.getDerivedStateFromProps(e,t)??null}.bind(this))}function b(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}function x(e){var t=e.prototype;if(!t||!t.isReactComponent)throw Error(`Can only polyfill class components`);if(typeof e.getDerivedStateFromProps!=`function`&&typeof t.getSnapshotBeforeUpdate!=`function`)return e;var n=null,r=null,i=null;if(typeof t.componentWillMount==`function`?n=`componentWillMount`:typeof t.UNSAFE_componentWillMount==`function`&&(n=`UNSAFE_componentWillMount`),typeof t.componentWillReceiveProps==`function`?r=`componentWillReceiveProps`:typeof t.UNSAFE_componentWillReceiveProps==`function`&&(r=`UNSAFE_componentWillReceiveProps`),typeof t.componentWillUpdate==`function`?i=`componentWillUpdate`:typeof t.UNSAFE_componentWillUpdate==`function`&&(i=`UNSAFE_componentWillUpdate`),n!==null||r!==null||i!==null){var a=e.displayName||e.name,o=typeof e.getDerivedStateFromProps==`function`?`getDerivedStateFromProps()`:`getSnapshotBeforeUpdate()`;throw Error(`Unsafe legacy lifecycles will not be called for components using new component APIs.
|
|
130
|
+
|
|
131
|
+
`+a+` uses `+o+` but also contains the following legacy lifecycles:`+(n===null?``:`
|
|
132
|
+
`+n)+(r===null?``:`
|
|
133
|
+
`+r)+(i===null?``:`
|
|
134
|
+
`+i)+`
|
|
135
|
+
|
|
136
|
+
The above lifecycles should be removed. Learn more about this warning here:
|
|
137
|
+
https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof e.getDerivedStateFromProps==`function`&&(t.componentWillMount=v,t.componentWillReceiveProps=y),typeof t.getSnapshotBeforeUpdate==`function`){if(typeof t.componentDidUpdate!=`function`)throw Error(`Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype`);t.componentWillUpdate=b;var s=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var r=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;s.call(this,e,t,r)}}return e}function S(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 C(e,t){if(e==null)return{};var n,r,i=S(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 w(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 T(e,t){if(e){if(typeof e==`string`)return w(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)?w(e,t):void 0}}function E(e){return function(e){if(Array.isArray(e))return w(e)}(e)||function(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}(e)||T(e)||function(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
138
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function D(e,t){if(t&&e?.constructor===t)return`bigNumber`;var n=function(e){return{}.toString.call(e).match(/\s([a-zA-Z]+)/)[1].toLowerCase()}(e);return n===`number`&&(n=isNaN(e)?`nan`:(0|e)===e?`integer`:`float`),n}function O(e){return e.replace(/\\/g,`\\\\`).replace(/\n/g,`\\n`).replace(/\t/g,`\\t`).replace(/\r/g,`\\r`).replace(/\f/g,`\\f`)}v.__suppressDeprecationWarning=!0,y.__suppressDeprecationWarning=!0,b.__suppressDeprecationWarning=!0;var k=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=(e.parent_type,e.namespace),n=e.quotesOnKeys,r=e.indentWidth,i=e.theme,a=e.singleIndent,o=e.showComma,s=e.isLast,c=e.jsvRoot,l=e.name?e.name:``;return _().createElement(`div`,{className:`variable-row`},_().createElement(`span`,Object.assign({},K(i,`object-name`),{key:t},K(i,`objectKeyVal`,{paddingLeft:r*a})),_().createElement(`span`,{className:`object-key`},n&&_().createElement(`span`,{style:{verticalAlign:`top`}},`"`),_().createElement(`span`,null,l),n&&_().createElement(`span`,{style:{verticalAlign:`top`}},`"`)),_().createElement(`span`,K(i,`colon`),`:`)),_().createElement(`span`,K(i,`circularReference`),`[CIRCULAR REFERENCE]`),o&&!s&&!c&&_().createElement(`span`,K(i,`comma`),`,`))}}])}(_().PureComponent),A={scheme:`rjv-default`,author:`mac gainor`,base00:`rgba(0, 0, 0, 0)`,base01:`rgb(245, 245, 245)`,base02:`rgb(235, 235, 235)`,base03:`#93a1a1`,base04:`rgba(0, 0, 0, 0.3)`,base05:`#586e75`,base06:`#073642`,base07:`#002b36`,base08:`#d33682`,base09:`#cb4b16`,base0A:`#dc322f`,base0B:`#859900`,base0C:`#6c71c4`,base0D:`#586e75`,base0E:`#2aa198`,base0F:`#268bd2`},j={scheme:`rjv-grey`,author:`mac gainor`,base00:`rgba(1, 1, 1, 0)`,base01:`rgba(1, 1, 1, 0.1)`,base02:`rgba(0, 0, 0, 0.2)`,base03:`rgba(1, 1, 1, 0.3)`,base04:`rgba(0, 0, 0, 0.4)`,base05:`rgba(1, 1, 1, 0.5)`,base06:`rgba(1, 1, 1, 0.6)`,base07:`rgba(1, 1, 1, 0.7)`,base08:`rgba(1, 1, 1, 0.8)`,base09:`rgba(1, 1, 1, 0.8)`,base0A:`rgba(1, 1, 1, 0.8)`,base0B:`rgba(1, 1, 1, 0.8)`,base0C:`rgba(1, 1, 1, 0.8)`,base0D:`rgba(1, 1, 1, 0.8)`,base0E:`rgba(1, 1, 1, 0.8)`,base0F:`rgba(1, 1, 1, 0.8)`};let M={white:`#fff`,black:`#000`,transparent:`rgba(1, 1, 1, 0)`,globalFontFamily:`monospace`,globalCursor:`default`,indentBlockWidth:`5px`,braceFontWeight:`bold`,braceCursor:`pointer`,ellipsisFontSize:`18px`,ellipsisLineHeight:`10px`,ellipsisCursor:`pointer`,keyMargin:`0px 5px`,keyLetterSpacing:`0.5px`,keyFontStyle:`none`,keyBorderRadius:`3px`,keyColonWeight:`bold`,keyVerticalAlign:`top`,keyOpacity:`0.85`,keyOpacityHover:`1`,keyValPaddingTop:`3px`,keyValPaddingBottom:`3px`,keyValPaddingRight:`5px`,keyValBorderLeft:`1px solid`,keyValBorderHover:`2px solid`,keyValPaddingHover:`3px 5px 3px 4px`,pushedContentMarginLeft:`6px`,variableValuePaddingRight:`6px`,nullFontSize:`11px`,nullFontWeight:`bold`,nullPadding:`1px 2px`,nullBorderRadius:`3px`,nanFontSize:`11px`,nanFontWeight:`bold`,nanPadding:`1px 2px`,nanBorderRadius:`3px`,undefinedFontSize:`11px`,undefinedFontWeight:`bold`,undefinedPadding:`1px 2px`,undefinedBorderRadius:`3px`,dataTypeFontSize:`11px`,dataTypeMarginRight:`4px`,datatypeOpacity:`0.8`,objectSizeBorderRadius:`3px`,objectSizeFontStyle:`italic`,objectSizeMargin:`0px 6px 0px 0px`,clipboardCursor:`pointer`,clipboardCheckMarginLeft:`-12px`,metaDataPadding:`0px 0px 0px 10px`,arrayGroupMetaPadding:`0px 0px 0px 4px`,iconContainerWidth:`17px`,tooltipPadding:`4px`,editInputMinWidth:`130px`,editInputBorderRadius:`2px`,editInputPadding:`5px`,editInputMarginRight:`4px`,editInputFontFamily:`monospace`,iconCursor:`pointer`,iconFontSize:`15px`,iconPaddingRight:`1px`,dateValueMarginLeft:`2px`,iconMarginRight:`3px`,detectedRowPaddingTop:`3px`,addKeyCoverBackground:`rgba(255, 255, 255, 0.3)`,addKeyCoverPosition:`absolute`,addKeyCoverPositionPx:`0px`,addKeyModalWidth:`200px`,addKeyModalMargin:`auto`,addKeyModalPadding:`10px`,addKeyModalRadius:`3px`,commaColor:`#666`,commaFontSize:`12px`,commaMarginRight:`4px`};var N=r(742);let P=function(e){return e},F=typeof global==`object`&&global&&global.Object===Object&&global;var I=typeof self==`object`&&self&&self.Object===Object&&self;let L=F||I||Function(`return this`)(),R=L.Symbol;var z=Object.prototype,B=z.hasOwnProperty,V=z.toString,H=R?R.toStringTag:void 0;let U=function(e){var t=B.call(e,H),n=e[H];try{e[H]=void 0;var r=!0}catch{}var i=V.call(e);return r&&(t?e[H]=n:delete e[H]),i};var ee=Object.prototype.toString;let W=function(e){return ee.call(e)};var te=R?R.toStringTag:void 0;let ne=function(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:te&&te in Object(e)?U(e):W(e)},re=function(e){var t=typeof e;return e!=null&&(t==`object`||t==`function`)},ie=function(e){if(!re(e))return!1;var t=ne(e);return t==`[object Function]`||t==`[object GeneratorFunction]`||t==`[object AsyncFunction]`||t==`[object Proxy]`},ae=L[`__core-js_shared__`];var oe,se=(oe=/[^.]+$/.exec(ae&&ae.keys&&ae.keys.IE_PROTO||``))?`Symbol(src)_1.`+oe:``;let ce=function(e){return!!se&&se in e};var le=Function.prototype.toString;let ue=function(e){if(e!=null){try{return le.call(e)}catch{}try{return e+``}catch{}}return``};var de=/^\[object .+?Constructor\]$/,fe=Function.prototype,pe=Object.prototype,me=fe.toString,he=pe.hasOwnProperty,ge=RegExp(`^`+me.call(he).replace(/[\\^$.*+?()[\]{}|]/g,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`);let _e=function(e){return!(!re(e)||ce(e))&&(ie(e)?ge:de).test(ue(e))},ve=function(e,t){return e?.[t]},ye=function(e,t){var n=ve(e,t);return _e(n)?n:void 0};var be=ye(L,`WeakMap`);let xe=be&&new be,Se=xe?function(e,t){return xe.set(e,t),e}:P;var Ce=Object.create;let we=function(){function e(){}return function(t){if(!re(t))return{};if(Ce)return Ce(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),Te=function(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=we(e.prototype),r=e.apply(n,t);return re(r)?r:n}},Ee=function(e,t,n){var r=1&t,i=Te(e);return function t(){return(this&&this!==L&&this instanceof t?i:e).apply(r?n:this,arguments)}},De=function(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)};var Oe=Math.max;let ke=function(e,t,n,r){for(var i=-1,a=e.length,o=n.length,s=-1,c=t.length,l=Oe(a-o,0),u=Array(c+l),d=!r;++s<c;)u[s]=t[s];for(;++i<o;)(d||i<a)&&(u[n[i]]=e[i]);for(;l--;)u[s++]=e[i++];return u};var Ae=Math.max;let je=function(e,t,n,r){for(var i=-1,a=e.length,o=-1,s=n.length,c=-1,l=t.length,u=Ae(a-s,0),d=Array(u+l),f=!r;++i<u;)d[i]=e[i];for(var p=i;++c<l;)d[p+c]=t[c];for(;++o<s;)(f||i<a)&&(d[p+n[o]]=e[i++]);return d},Me=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r},Ne=function(){};function Pe(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}Pe.prototype=we(Ne.prototype),Pe.prototype.constructor=Pe;let Fe=Pe,Ie=xe?function(e){return xe.get(e)}:function(){},Le={};var Re=Object.prototype.hasOwnProperty;let ze=function(e){for(var t=e.name+``,n=Le[t],r=Re.call(Le,t)?n.length:0;r--;){var i=n[r],a=i.func;if(a==null||a==e)return i.name}return t};function Be(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}Be.prototype=we(Ne.prototype),Be.prototype.constructor=Be;let G=Be,Ve=Array.isArray,He=function(e){return typeof e==`object`&&!!e},Ue=function(e,t){var n=-1,r=e.length;for(t||=Array(r);++n<r;)t[n]=e[n];return t},We=function(e){if(e instanceof Fe)return e.clone();var t=new G(e.__wrapped__,e.__chain__);return t.__actions__=Ue(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t};var Ge=Object.prototype.hasOwnProperty;function Ke(e){if(He(e)&&!Ve(e)&&!(e instanceof Fe)){if(e instanceof G)return e;if(Ge.call(e,`__wrapped__`))return We(e)}return new G(e)}Ke.prototype=Ne.prototype,Ke.prototype.constructor=Ke;let qe=Ke,Je=function(e){var t=ze(e),n=qe[t];if(typeof n!=`function`||!(t in Fe.prototype))return!1;if(e===n)return!0;var r=Ie(n);return!!r&&e===r[0]};var Ye=Date.now;let Xe=function(e){var t=0,n=0;return function(){var r=Ye(),i=16-(r-n);if(n=r,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}},Ze=Xe(Se);var Qe=/\{\n\/\* \[wrapped with (.+)\] \*/,$e=/,? & /;let et=function(e){var t=e.match(Qe);return t?t[1].split($e):[]};var tt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;let nt=function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?`& `:``)+t[r],t=t.join(n>2?`, `:` `),e.replace(tt,`{
|
|
139
|
+
/* [wrapped with `+t+`] */
|
|
140
|
+
`)},rt=function(e){return function(){return e}},it=function(){try{var e=ye(Object,`defineProperty`);return e({},``,{}),e}catch{}}(),at=Xe(it?function(e,t){return it(e,`toString`,{configurable:!0,enumerable:!1,value:rt(t),writable:!0})}:P),ot=function(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&!1!==t(e[n],n,e););return e},st=function(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},ct=function(e){return e!=e},lt=function(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1},ut=function(e,t,n){return t==t?lt(e,t,n):st(e,ct,n)},dt=function(e,t){return!!(e!=null&&e.length)&&ut(e,t,0)>-1};var ft=[[`ary`,128],[`bind`,1],[`bindKey`,2],[`curry`,8],[`curryRight`,16],[`flip`,512],[`partial`,32],[`partialRight`,64],[`rearg`,256]];let pt=function(e,t){return ot(ft,function(n){var r=`_.`+n[0];t&n[1]&&!dt(e,r)&&e.push(r)}),e.sort()},mt=function(e,t,n){var r=t+``;return at(e,nt(r,pt(et(r),n)))},ht=function(e,t,n,r,i,a,o,s,c,l){var u=8&t;t|=u?32:64,4&(t&=~(u?64:32))||(t&=-4);var d=[e,t,i,u?a:void 0,u?o:void 0,u?void 0:a,u?void 0:o,s,c,l],f=n.apply(void 0,d);return Je(e)&&Ze(f,d),f.placeholder=r,mt(f,e,t)},gt=function(e){return e.placeholder};var _t=/^(?:0|[1-9]\d*)$/;let vt=function(e,t){var n=typeof e;return!!(t??=9007199254740991)&&(n==`number`||n!=`symbol`&&_t.test(e))&&e>-1&&e%1==0&&e<t};var yt=Math.min;let bt=function(e,t){for(var n=e.length,r=yt(t.length,n),i=Ue(e);r--;){var a=t[r];e[r]=vt(a,n)?i[a]:void 0}return e};var xt=`__lodash_placeholder__`;let St=function(e,t){for(var n=-1,r=e.length,i=0,a=[];++n<r;){var o=e[n];o!==t&&o!==xt||(e[n]=xt,a[i++]=n)}return a},Ct=function e(t,n,r,i,a,o,s,c,l,u){var d=128&n,f=1&n,p=2&n,m=24&n,h=512&n,g=p?void 0:Te(t);return function _(){for(var v=arguments.length,y=Array(v),b=v;b--;)y[b]=arguments[b];if(m)var x=gt(_),S=Me(y,x);if(i&&(y=ke(y,i,a,m)),o&&(y=je(y,o,s,m)),v-=S,m&&v<u){var C=St(y,x);return ht(t,n,e,_.placeholder,r,y,C,c,l,u-v)}var w=f?r:this,T=p?w[t]:t;return v=y.length,c?y=bt(y,c):h&&v>1&&y.reverse(),d&&l<v&&(y.length=l),this&&this!==L&&this instanceof _&&(T=g||Te(T)),T.apply(w,y)}},wt=function(e,t,n){var r=Te(e);return function i(){for(var a=arguments.length,o=Array(a),s=a,c=gt(i);s--;)o[s]=arguments[s];var l=a<3&&o[0]!==c&&o[a-1]!==c?[]:St(o,c);return(a-=l.length)<n?ht(e,t,Ct,i.placeholder,void 0,o,l,void 0,void 0,n-a):De(this&&this!==L&&this instanceof i?r:e,this,o)}},Tt=function(e,t,n,r){var i=1&t,a=Te(e);return function t(){for(var o=-1,s=arguments.length,c=-1,l=r.length,u=Array(l+s),d=this&&this!==L&&this instanceof t?a:e;++c<l;)u[c]=r[c];for(;s--;)u[c++]=arguments[++o];return De(d,i?n:this,u)}};var Et=`__lodash_placeholder__`,Dt=128,Ot=Math.min;let kt=function(e,t){var n=e[1],r=t[1],i=n|r,a=i<131,o=r==Dt&&n==8||r==Dt&&n==256&&e[7].length<=t[8]||r==384&&t[7].length<=t[8]&&n==8;if(!a&&!o)return e;1&r&&(e[2]=t[2],i|=1&n?0:4);var s=t[3];if(s){var c=e[3];e[3]=c?ke(c,s,t[4]):s,e[4]=c?St(e[3],Et):t[4]}return(s=t[5])&&(c=e[5],e[5]=c?je(c,s,t[6]):s,e[6]=c?St(e[5],Et):t[6]),(s=t[7])&&(e[7]=s),r&Dt&&(e[8]=e[8]==null?t[8]:Ot(e[8],t[8])),e[9]??=t[9],e[0]=t[0],e[1]=i,e};var At=/\s/;let jt=function(e){for(var t=e.length;t--&&At.test(e.charAt(t)););return t};var Mt=/^\s+/;let Nt=function(e){return e&&e.slice(0,jt(e)+1).replace(Mt,``)},Pt=function(e){return typeof e==`symbol`||He(e)&&ne(e)==`[object Symbol]`};var Ft=/^[-+]0x[0-9a-f]+$/i,It=/^0b[01]+$/i,Lt=/^0o[0-7]+$/i,Rt=parseInt;let zt=function(e){if(typeof e==`number`)return e;if(Pt(e))return NaN;if(re(e)){var t=typeof e.valueOf==`function`?e.valueOf():e;e=re(t)?t+``:t}if(typeof e!=`string`)return e===0?e:+e;e=Nt(e);var n=It.test(e);return n||Lt.test(e)?Rt(e.slice(2),n?2:8):Ft.test(e)?NaN:+e};var Bt=1/0;let Vt=function(e){return e?(e=zt(e))===Bt||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:e===0?e:0},Ht=function(e){var t=Vt(e),n=t%1;return t==t?n?t-n:t:0};var Ut=Math.max;let Wt=function(e,t,n,r,i,a,o,s){var c=2&t;if(!c&&typeof e!=`function`)throw TypeError(`Expected a function`);var l=r?r.length:0;if(l||(t&=-97,r=i=void 0),o=o===void 0?o:Ut(Ht(o),0),s=s===void 0?s:Ht(s),l-=i?i.length:0,64&t){var u=r,d=i;r=i=void 0}var f=c?void 0:Ie(e),p=[e,t,n,r,i,u,d,a,o,s];if(f&&kt(p,f),e=p[0],t=p[1],n=p[2],r=p[3],i=p[4],!(s=p[9]=p[9]===void 0?c?0:e.length:Ut(p[9]-l,0))&&24&t&&(t&=-25),t&&t!=1)m=t==8||t==16?wt(e,t,s):t!=32&&t!=33||i.length?Ct.apply(void 0,p):Tt(e,t,n,r);else var m=Ee(e,t,n);return mt((f?Se:Ze)(m,p),e,t)};function Gt(e,t,n){var r=Wt(e,8,void 0,void 0,void 0,void 0,void 0,t=n?void 0:t);return r.placeholder=Gt.placeholder,r}Gt.placeholder={};let Kt=Gt,qt={threezerotwofour:{scheme:`threezerotwofour`,author:`jan t. sott (http://github.com/idleberg)`,base00:`#090300`,base01:`#3a3432`,base02:`#4a4543`,base03:`#5c5855`,base04:`#807d7c`,base05:`#a5a2a2`,base06:`#d6d5d4`,base07:`#f7f7f7`,base08:`#db2d20`,base09:`#e8bbd0`,base0A:`#fded02`,base0B:`#01a252`,base0C:`#b5e4f4`,base0D:`#01a0e4`,base0E:`#a16a94`,base0F:`#cdab53`},apathy:{scheme:`apathy`,author:`jannik siebert (https://github.com/janniks)`,base00:`#031A16`,base01:`#0B342D`,base02:`#184E45`,base03:`#2B685E`,base04:`#5F9C92`,base05:`#81B5AC`,base06:`#A7CEC8`,base07:`#D2E7E4`,base08:`#3E9688`,base09:`#3E7996`,base0A:`#3E4C96`,base0B:`#883E96`,base0C:`#963E4C`,base0D:`#96883E`,base0E:`#4C963E`,base0F:`#3E965B`},ashes:{scheme:`ashes`,author:`jannik siebert (https://github.com/janniks)`,base00:`#1C2023`,base01:`#393F45`,base02:`#565E65`,base03:`#747C84`,base04:`#ADB3BA`,base05:`#C7CCD1`,base06:`#DFE2E5`,base07:`#F3F4F5`,base08:`#C7AE95`,base09:`#C7C795`,base0A:`#AEC795`,base0B:`#95C7AE`,base0C:`#95AEC7`,base0D:`#AE95C7`,base0E:`#C795AE`,base0F:`#C79595`},atelierDune:{scheme:`atelier dune`,author:`bram de haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/dune)`,base00:`#20201d`,base01:`#292824`,base02:`#6e6b5e`,base03:`#7d7a68`,base04:`#999580`,base05:`#a6a28c`,base06:`#e8e4cf`,base07:`#fefbec`,base08:`#d73737`,base09:`#b65611`,base0A:`#cfb017`,base0B:`#60ac39`,base0C:`#1fad83`,base0D:`#6684e1`,base0E:`#b854d4`,base0F:`#d43552`},atelierForest:{scheme:`atelier forest`,author:`bram de haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/forest)`,base00:`#1b1918`,base01:`#2c2421`,base02:`#68615e`,base03:`#766e6b`,base04:`#9c9491`,base05:`#a8a19f`,base06:`#e6e2e0`,base07:`#f1efee`,base08:`#f22c40`,base09:`#df5320`,base0A:`#d5911a`,base0B:`#5ab738`,base0C:`#00ad9c`,base0D:`#407ee7`,base0E:`#6666ea`,base0F:`#c33ff3`},atelierHeath:{scheme:`atelier heath`,author:`bram de haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/heath)`,base00:`#1b181b`,base01:`#292329`,base02:`#695d69`,base03:`#776977`,base04:`#9e8f9e`,base05:`#ab9bab`,base06:`#d8cad8`,base07:`#f7f3f7`,base08:`#ca402b`,base09:`#a65926`,base0A:`#bb8a35`,base0B:`#379a37`,base0C:`#159393`,base0D:`#516aec`,base0E:`#7b59c0`,base0F:`#cc33cc`},atelierLakeside:{scheme:`atelier lakeside`,author:`bram de haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/lakeside/)`,base00:`#161b1d`,base01:`#1f292e`,base02:`#516d7b`,base03:`#5a7b8c`,base04:`#7195a8`,base05:`#7ea2b4`,base06:`#c1e4f6`,base07:`#ebf8ff`,base08:`#d22d72`,base09:`#935c25`,base0A:`#8a8a0f`,base0B:`#568c3b`,base0C:`#2d8f6f`,base0D:`#257fad`,base0E:`#5d5db1`,base0F:`#b72dd2`},atelierSeaside:{scheme:`atelier seaside`,author:`bram de haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/seaside/)`,base00:`#131513`,base01:`#242924`,base02:`#5e6e5e`,base03:`#687d68`,base04:`#809980`,base05:`#8ca68c`,base06:`#cfe8cf`,base07:`#f0fff0`,base08:`#e6193c`,base09:`#87711d`,base0A:`#c3c322`,base0B:`#29a329`,base0C:`#1999b3`,base0D:`#3d62f5`,base0E:`#ad2bee`,base0F:`#e619c3`},bespin:{scheme:`bespin`,author:`jan t. sott`,base00:`#28211c`,base01:`#36312e`,base02:`#5e5d5c`,base03:`#666666`,base04:`#797977`,base05:`#8a8986`,base06:`#9d9b97`,base07:`#baae9e`,base08:`#cf6a4c`,base09:`#cf7d34`,base0A:`#f9ee98`,base0B:`#54be0d`,base0C:`#afc4db`,base0D:`#5ea6ea`,base0E:`#9b859d`,base0F:`#937121`},brewer:{scheme:`brewer`,author:`timothée poisot (http://github.com/tpoisot)`,base00:`#0c0d0e`,base01:`#2e2f30`,base02:`#515253`,base03:`#737475`,base04:`#959697`,base05:`#b7b8b9`,base06:`#dadbdc`,base07:`#fcfdfe`,base08:`#e31a1c`,base09:`#e6550d`,base0A:`#dca060`,base0B:`#31a354`,base0C:`#80b1d3`,base0D:`#3182bd`,base0E:`#756bb1`,base0F:`#b15928`},bright:{scheme:`bright`,author:`chris kempson (http://chriskempson.com)`,base00:`#000000`,base01:`#303030`,base02:`#505050`,base03:`#b0b0b0`,base04:`#d0d0d0`,base05:`#e0e0e0`,base06:`#f5f5f5`,base07:`#ffffff`,base08:`#fb0120`,base09:`#fc6d24`,base0A:`#fda331`,base0B:`#a1c659`,base0C:`#76c7b7`,base0D:`#6fb3d2`,base0E:`#d381c3`,base0F:`#be643c`},chalk:{scheme:`chalk`,author:`chris kempson (http://chriskempson.com)`,base00:`#151515`,base01:`#202020`,base02:`#303030`,base03:`#505050`,base04:`#b0b0b0`,base05:`#d0d0d0`,base06:`#e0e0e0`,base07:`#f5f5f5`,base08:`#fb9fb1`,base09:`#eda987`,base0A:`#ddb26f`,base0B:`#acc267`,base0C:`#12cfc0`,base0D:`#6fc2ef`,base0E:`#e1a3ee`,base0F:`#deaf8f`},codeschool:{scheme:`codeschool`,author:`brettof86`,base00:`#232c31`,base01:`#1c3657`,base02:`#2a343a`,base03:`#3f4944`,base04:`#84898c`,base05:`#9ea7a6`,base06:`#a7cfa3`,base07:`#b5d8f6`,base08:`#2a5491`,base09:`#43820d`,base0A:`#a03b1e`,base0B:`#237986`,base0C:`#b02f30`,base0D:`#484d79`,base0E:`#c59820`,base0F:`#c98344`},colors:{scheme:`colors`,author:`mrmrs (http://clrs.cc)`,base00:`#111111`,base01:`#333333`,base02:`#555555`,base03:`#777777`,base04:`#999999`,base05:`#bbbbbb`,base06:`#dddddd`,base07:`#ffffff`,base08:`#ff4136`,base09:`#ff851b`,base0A:`#ffdc00`,base0B:`#2ecc40`,base0C:`#7fdbff`,base0D:`#0074d9`,base0E:`#b10dc9`,base0F:`#85144b`},default:{scheme:`default`,author:`chris kempson (http://chriskempson.com)`,base00:`#181818`,base01:`#282828`,base02:`#383838`,base03:`#585858`,base04:`#b8b8b8`,base05:`#d8d8d8`,base06:`#e8e8e8`,base07:`#f8f8f8`,base08:`#ab4642`,base09:`#dc9656`,base0A:`#f7ca88`,base0B:`#a1b56c`,base0C:`#86c1b9`,base0D:`#7cafc2`,base0E:`#ba8baf`,base0F:`#a16946`},eighties:{scheme:`eighties`,author:`chris kempson (http://chriskempson.com)`,base00:`#2d2d2d`,base01:`#393939`,base02:`#515151`,base03:`#747369`,base04:`#a09f93`,base05:`#d3d0c8`,base06:`#e8e6df`,base07:`#f2f0ec`,base08:`#f2777a`,base09:`#f99157`,base0A:`#ffcc66`,base0B:`#99cc99`,base0C:`#66cccc`,base0D:`#6699cc`,base0E:`#cc99cc`,base0F:`#d27b53`},embers:{scheme:`embers`,author:`jannik siebert (https://github.com/janniks)`,base00:`#16130F`,base01:`#2C2620`,base02:`#433B32`,base03:`#5A5047`,base04:`#8A8075`,base05:`#A39A90`,base06:`#BEB6AE`,base07:`#DBD6D1`,base08:`#826D57`,base09:`#828257`,base0A:`#6D8257`,base0B:`#57826D`,base0C:`#576D82`,base0D:`#6D5782`,base0E:`#82576D`,base0F:`#825757`},flat:{scheme:`flat`,author:`chris kempson (http://chriskempson.com)`,base00:`#2C3E50`,base01:`#34495E`,base02:`#7F8C8D`,base03:`#95A5A6`,base04:`#BDC3C7`,base05:`#e0e0e0`,base06:`#f5f5f5`,base07:`#ECF0F1`,base08:`#E74C3C`,base09:`#E67E22`,base0A:`#F1C40F`,base0B:`#2ECC71`,base0C:`#1ABC9C`,base0D:`#3498DB`,base0E:`#9B59B6`,base0F:`#be643c`},google:{scheme:`google`,author:`seth wright (http://sethawright.com)`,base00:`#1d1f21`,base01:`#282a2e`,base02:`#373b41`,base03:`#969896`,base04:`#b4b7b4`,base05:`#c5c8c6`,base06:`#e0e0e0`,base07:`#ffffff`,base08:`#CC342B`,base09:`#F96A38`,base0A:`#FBA922`,base0B:`#198844`,base0C:`#3971ED`,base0D:`#3971ED`,base0E:`#A36AC7`,base0F:`#3971ED`},grayscale:{scheme:`grayscale`,author:`alexandre gavioli (https://github.com/alexx2/)`,base00:`#101010`,base01:`#252525`,base02:`#464646`,base03:`#525252`,base04:`#ababab`,base05:`#b9b9b9`,base06:`#e3e3e3`,base07:`#f7f7f7`,base08:`#7c7c7c`,base09:`#999999`,base0A:`#a0a0a0`,base0B:`#8e8e8e`,base0C:`#868686`,base0D:`#686868`,base0E:`#747474`,base0F:`#5e5e5e`},greenscreen:{scheme:`green screen`,author:`chris kempson (http://chriskempson.com)`,base00:`#001100`,base01:`#003300`,base02:`#005500`,base03:`#007700`,base04:`#009900`,base05:`#00bb00`,base06:`#00dd00`,base07:`#00ff00`,base08:`#007700`,base09:`#009900`,base0A:`#007700`,base0B:`#00bb00`,base0C:`#005500`,base0D:`#009900`,base0E:`#00bb00`,base0F:`#005500`},harmonic:{scheme:`harmonic16`,author:`jannik siebert (https://github.com/janniks)`,base00:`#0b1c2c`,base01:`#223b54`,base02:`#405c79`,base03:`#627e99`,base04:`#aabcce`,base05:`#cbd6e2`,base06:`#e5ebf1`,base07:`#f7f9fb`,base08:`#bf8b56`,base09:`#bfbf56`,base0A:`#8bbf56`,base0B:`#56bf8b`,base0C:`#568bbf`,base0D:`#8b56bf`,base0E:`#bf568b`,base0F:`#bf5656`},hopscotch:{scheme:`hopscotch`,author:`jan t. sott`,base00:`#322931`,base01:`#433b42`,base02:`#5c545b`,base03:`#797379`,base04:`#989498`,base05:`#b9b5b8`,base06:`#d5d3d5`,base07:`#ffffff`,base08:`#dd464c`,base09:`#fd8b19`,base0A:`#fdcc59`,base0B:`#8fc13e`,base0C:`#149b93`,base0D:`#1290bf`,base0E:`#c85e7c`,base0F:`#b33508`},isotope:{scheme:`isotope`,author:`jan t. sott`,base00:`#000000`,base01:`#404040`,base02:`#606060`,base03:`#808080`,base04:`#c0c0c0`,base05:`#d0d0d0`,base06:`#e0e0e0`,base07:`#ffffff`,base08:`#ff0000`,base09:`#ff9900`,base0A:`#ff0099`,base0B:`#33ff00`,base0C:`#00ffff`,base0D:`#0066ff`,base0E:`#cc00ff`,base0F:`#3300ff`},marrakesh:{scheme:`marrakesh`,author:`alexandre gavioli (http://github.com/alexx2/)`,base00:`#201602`,base01:`#302e00`,base02:`#5f5b17`,base03:`#6c6823`,base04:`#86813b`,base05:`#948e48`,base06:`#ccc37a`,base07:`#faf0a5`,base08:`#c35359`,base09:`#b36144`,base0A:`#a88339`,base0B:`#18974e`,base0C:`#75a738`,base0D:`#477ca1`,base0E:`#8868b3`,base0F:`#b3588e`},mocha:{scheme:`mocha`,author:`chris kempson (http://chriskempson.com)`,base00:`#3B3228`,base01:`#534636`,base02:`#645240`,base03:`#7e705a`,base04:`#b8afad`,base05:`#d0c8c6`,base06:`#e9e1dd`,base07:`#f5eeeb`,base08:`#cb6077`,base09:`#d28b71`,base0A:`#f4bc87`,base0B:`#beb55b`,base0C:`#7bbda4`,base0D:`#8ab3b5`,base0E:`#a89bb9`,base0F:`#bb9584`},monokai:{scheme:`monokai`,author:`wimer hazenberg (http://www.monokai.nl)`,base00:`#272822`,base01:`#383830`,base02:`#49483e`,base03:`#75715e`,base04:`#a59f85`,base05:`#f8f8f2`,base06:`#f5f4f1`,base07:`#f9f8f5`,base08:`#f92672`,base09:`#fd971f`,base0A:`#f4bf75`,base0B:`#a6e22e`,base0C:`#a1efe4`,base0D:`#66d9ef`,base0E:`#ae81ff`,base0F:`#cc6633`},nicinabox:{scheme:`nicinabox`,author:`nicinabox (http://github.com/nicinabox)`,base00:`#2A2F3A`,base01:`#3C444F`,base02:`#4F5A65`,base03:`#BEBEBE`,base04:`#b0b0b0`,base05:`#d0d0d0`,base06:`#FFFFFF`,base07:`#f5f5f5`,base08:`#fb9fb1`,base09:`#FC6D24`,base0A:`#ddb26f`,base0B:`#A1C659`,base0C:`#12cfc0`,base0D:`#6FB3D2`,base0E:`#D381C3`,base0F:`#deaf8f`},ocean:{scheme:`ocean`,author:`chris kempson (http://chriskempson.com)`,base00:`#2b303b`,base01:`#343d46`,base02:`#4f5b66`,base03:`#65737e`,base04:`#a7adba`,base05:`#c0c5ce`,base06:`#dfe1e8`,base07:`#eff1f5`,base08:`#bf616a`,base09:`#d08770`,base0A:`#ebcb8b`,base0B:`#a3be8c`,base0C:`#96b5b4`,base0D:`#8fa1b3`,base0E:`#b48ead`,base0F:`#ab7967`},paraiso:{scheme:`paraiso`,author:`jan t. sott`,base00:`#2f1e2e`,base01:`#41323f`,base02:`#4f424c`,base03:`#776e71`,base04:`#8d8687`,base05:`#a39e9b`,base06:`#b9b6b0`,base07:`#e7e9db`,base08:`#ef6155`,base09:`#f99b15`,base0A:`#fec418`,base0B:`#48b685`,base0C:`#5bc4bf`,base0D:`#06b6ef`,base0E:`#815ba4`,base0F:`#e96ba8`},pop:{scheme:`pop`,author:`chris kempson (http://chriskempson.com)`,base00:`#000000`,base01:`#202020`,base02:`#303030`,base03:`#505050`,base04:`#b0b0b0`,base05:`#d0d0d0`,base06:`#e0e0e0`,base07:`#ffffff`,base08:`#eb008a`,base09:`#f29333`,base0A:`#f8ca12`,base0B:`#37b349`,base0C:`#00aabb`,base0D:`#0e5a94`,base0E:`#b31e8d`,base0F:`#7a2d00`},railscasts:{scheme:`railscasts`,author:`ryan bates (http://railscasts.com)`,base00:`#2b2b2b`,base01:`#272935`,base02:`#3a4055`,base03:`#5a647e`,base04:`#d4cfc9`,base05:`#e6e1dc`,base06:`#f4f1ed`,base07:`#f9f7f3`,base08:`#da4939`,base09:`#cc7833`,base0A:`#ffc66d`,base0B:`#a5c261`,base0C:`#519f50`,base0D:`#6d9cbe`,base0E:`#b6b3eb`,base0F:`#bc9458`},shapeshifter:{scheme:`shapeshifter`,author:`tyler benziger (http://tybenz.com)`,base00:`#000000`,base01:`#040404`,base02:`#102015`,base03:`#343434`,base04:`#555555`,base05:`#ababab`,base06:`#e0e0e0`,base07:`#f9f9f9`,base08:`#e92f2f`,base09:`#e09448`,base0A:`#dddd13`,base0B:`#0ed839`,base0C:`#23edda`,base0D:`#3b48e3`,base0E:`#f996e2`,base0F:`#69542d`},solarized:{scheme:`solarized`,author:`ethan schoonover (http://ethanschoonover.com/solarized)`,base00:`#002b36`,base01:`#073642`,base02:`#586e75`,base03:`#657b83`,base04:`#839496`,base05:`#93a1a1`,base06:`#eee8d5`,base07:`#fdf6e3`,base08:`#dc322f`,base09:`#cb4b16`,base0A:`#b58900`,base0B:`#859900`,base0C:`#2aa198`,base0D:`#268bd2`,base0E:`#6c71c4`,base0F:`#d33682`},summerfruit:{scheme:`summerfruit`,author:`christopher corley (http://cscorley.github.io/)`,base00:`#151515`,base01:`#202020`,base02:`#303030`,base03:`#505050`,base04:`#B0B0B0`,base05:`#D0D0D0`,base06:`#E0E0E0`,base07:`#FFFFFF`,base08:`#FF0086`,base09:`#FD8900`,base0A:`#ABA800`,base0B:`#00C918`,base0C:`#1faaaa`,base0D:`#3777E6`,base0E:`#AD00A1`,base0F:`#cc6633`},tomorrow:{scheme:`tomorrow`,author:`chris kempson (http://chriskempson.com)`,base00:`#1d1f21`,base01:`#282a2e`,base02:`#373b41`,base03:`#969896`,base04:`#b4b7b4`,base05:`#c5c8c6`,base06:`#e0e0e0`,base07:`#ffffff`,base08:`#cc6666`,base09:`#de935f`,base0A:`#f0c674`,base0B:`#b5bd68`,base0C:`#8abeb7`,base0D:`#81a2be`,base0E:`#b294bb`,base0F:`#a3685a`},tube:{scheme:`london tube`,author:`jan t. sott`,base00:`#231f20`,base01:`#1c3f95`,base02:`#5a5758`,base03:`#737171`,base04:`#959ca1`,base05:`#d9d8d8`,base06:`#e7e7e8`,base07:`#ffffff`,base08:`#ee2e24`,base09:`#f386a1`,base0A:`#ffd204`,base0B:`#00853e`,base0C:`#85cebc`,base0D:`#009ddc`,base0E:`#98005d`,base0F:`#b06110`},twilight:{scheme:`twilight`,author:`david hart (http://hart-dev.com)`,base00:`#1e1e1e`,base01:`#323537`,base02:`#464b50`,base03:`#5f5a60`,base04:`#838184`,base05:`#a7a7a7`,base06:`#c3c3c3`,base07:`#ffffff`,base08:`#cf6a4c`,base09:`#cda869`,base0A:`#f9ee98`,base0B:`#8f9d6a`,base0C:`#afc4db`,base0D:`#7587a6`,base0E:`#9b859d`,base0F:`#9b703f`}},Jt=qt.default,Yt=Object.keys(Jt),Xt=e=>{let[t,n,r]=function(e){let t=e[0]/255,n=e[1]/255,r=e[2]/255;return[.299*t+.587*n+.114*r,-.14713*t+-.28886*n+.436*r,.615*t+-.51499*n+-.10001*r]}(N(e).array());var i;let a=function(e){let t=e[0],n=e[1],r=e[2],i,a,o;return i=1*t+0*n+1.13983*r,a=1*t+-.39465*n+-.5806*r,o=1*t+2.02311*n+0*r,i=Math.min(Math.max(0,i),1),a=Math.min(Math.max(0,a),1),o=Math.min(Math.max(0,o),1),[255*i,255*a,255*o]}([(i=t,i<.25?1:i<.5?.9-i:1.1-i),n,r]);return N.rgb(a).hex()},Zt=e=>t=>({className:[t.className,e.className].filter(Boolean).join(` `),style:{...t.style||{},...e.style||{}}}),Qt=(e,t)=>{let n=Object.keys(t);for(let t in e)n.indexOf(t)===-1&&n.push(t);return n.reduce((n,r)=>(n[r]=((e,t)=>{if(e===void 0)return t;if(t===void 0)return e;let n=typeof t;switch(typeof e){case`string`:switch(n){case`string`:return[t,e].filter(Boolean).join(` `);case`object`:return Zt({className:e,style:t});case`function`:return(n,...r)=>Zt({className:e})(t(n,...r))}break;case`object`:switch(n){case`string`:return Zt({className:t,style:e});case`object`:return{...t,...e};case`function`:return(n,...r)=>Zt({style:e})(t(n,...r))}break;case`function`:switch(n){case`string`:return(n,...r)=>e(Zt(n)({className:t}),...r);case`object`:return(n,...r)=>e(Zt(n)({style:t}),...r);case`function`:return(n,...r)=>e(t(n,...r),...r)}}})(e[r],t[r]),n),{})},$t=(e,t,...n)=>{if(t===null)return e;Array.isArray(t)||(t=[t]);let r=t.map(t=>e[t]).filter(Boolean).reduce((e,t)=>(typeof t==`string`?e.className=[e.className,t].filter(Boolean).join(` `):typeof t==`object`?e.style={...e.style,...t}:typeof t==`function`&&(e={...e,...t(e,...n)}),e),{className:``,style:{}});return r.className||delete r.className,Object.keys(r.style).length===0&&delete r.style,r},en=e=>Object.keys(e).reduce((t,n)=>(t[n]=/^base/.test(n)?Xt(e[n]):n===`scheme`?e[n]+`:inverted`:e[n],t),{}),tn=Kt((e,t={},n={},...r)=>{let{defaultBase16:i=Jt,base16Themes:a=null}=t,o=rn(n,a);o&&(n={...o,...n});let s=Yt.reduce((e,t)=>(e[t]=n[t]||i[t],e),{}),c=Qt(Object.keys(n).reduce((e,t)=>(Yt.indexOf(t)===-1&&(e[t]=n[t]),e),{}),e(s));return Kt($t,2)(c,...r)},3),nn=e=>!!e.extend,rn=(e,t)=>{if(e&&nn(e)&&e.extend&&(e=e.extend),typeof e==`string`){let[n,r]=e.split(`:`);e=t?t[n]:qt[n],r===`inverted`&&(e=en(e))}return e&&Object.prototype.hasOwnProperty.call(e,`base00`)?e:void 0};var an=function(e){var t=function(e){return{backgroundColor:e.base00,ellipsisColor:e.base09,braceColor:e.base07,expandedIcon:e.base0D,collapsedIcon:e.base0E,keyColor:e.base07,arrayKeyColor:e.base0C,objectSize:e.base04,copyToClipboard:e.base0F,copyToClipboardCheck:e.base0D,objectBorder:e.base02,dataTypes:{boolean:e.base0E,date:e.base0D,float:e.base0B,function:e.base0D,integer:e.base0F,string:e.base09,nan:e.base08,null:e.base0A,undefined:e.base05,regexp:e.base0A,background:e.base02,bigNumber:e.base09},editVariable:{editIcon:e.base0E,cancelIcon:e.base09,removeIcon:e.base09,addIcon:e.base0E,checkIcon:e.base0E,background:e.base01,color:e.base0A,border:e.base07},addKeyModal:{background:e.base05,border:e.base04,color:e.base0A,labelColor:e.base01},validationFailure:{background:e.base09,iconColor:e.base01,fontColor:e.base01}}}(e);return{"app-container":{fontFamily:M.globalFontFamily,cursor:M.globalCursor,backgroundColor:t.backgroundColor,position:`relative`},ellipsis:{display:`inline-block`,color:t.ellipsisColor,fontSize:M.ellipsisFontSize,lineHeight:M.ellipsisLineHeight,cursor:M.ellipsisCursor},"brace-row":{display:`inline-block`,cursor:`pointer`},brace:{display:`inline-block`,cursor:M.braceCursor,fontWeight:M.braceFontWeight,color:t.braceColor},"expanded-icon":{color:t.expandedIcon},"collapsed-icon":{color:t.collapsedIcon},colon:{display:`inline-block`,margin:M.keyMargin,color:t.keyColor,verticalAlign:`top`},objectKeyVal:function(e,n){return{style:o({paddingTop:M.keyValPaddingTop,paddingRight:M.keyValPaddingRight,paddingBottom:M.keyValPaddingBottom,borderLeft:M.keyValBorderLeft+` `+t.objectBorder,":hover":{paddingLeft:n.paddingLeft-1+`px`,borderLeft:M.keyValBorderHover+` `+t.objectBorder}},n)}},"object-key-val-no-border":{padding:M.keyValPadding},"pushed-content":{marginLeft:M.pushedContentMarginLeft},variableValue:function(e,t){return{style:o({display:`inline-block`,paddingRight:M.variableValuePaddingRight,position:`relative`},t)}},"object-name":{display:`inline-block`,color:t.keyColor,letterSpacing:M.keyLetterSpacing,fontStyle:M.keyFontStyle,verticalAlign:M.keyVerticalAlign,opacity:M.keyOpacity,":hover":{opacity:M.keyOpacityHover}},"array-key":{display:`inline-block`,color:t.arrayKeyColor,letterSpacing:M.keyLetterSpacing,fontStyle:M.keyFontStyle,verticalAlign:M.keyVerticalAlign,opacity:M.keyOpacity,":hover":{opacity:M.keyOpacityHover}},"object-size":{color:t.objectSize,borderRadius:M.objectSizeBorderRadius,fontStyle:M.objectSizeFontStyle,margin:M.objectSizeMargin,cursor:`default`},"data-type-label":{fontSize:M.dataTypeFontSize,marginRight:M.dataTypeMarginRight,opacity:M.datatypeOpacity},boolean:{display:`inline-block`,color:t.dataTypes.boolean},date:{display:`inline-block`,color:t.dataTypes.date},"date-value":{marginLeft:M.dateValueMarginLeft},float:{display:`inline-block`,color:t.dataTypes.float},function:{display:`inline-block`,color:t.dataTypes.function,cursor:`pointer`,whiteSpace:`pre-line`},"function-value":{fontStyle:`italic`},integer:{display:`inline-block`,color:t.dataTypes.integer},bigNumber:{display:`inline-block`,color:t.dataTypes.bigNumber},string:{display:`inline-block`,color:t.dataTypes.string},nan:{display:`inline-block`,color:t.dataTypes.nan,fontSize:M.nanFontSize,fontWeight:M.nanFontWeight,backgroundColor:t.dataTypes.background,padding:M.nanPadding,borderRadius:M.nanBorderRadius},null:{display:`inline-block`,color:t.dataTypes.null,fontSize:M.nullFontSize,fontWeight:M.nullFontWeight,backgroundColor:t.dataTypes.background,padding:M.nullPadding,borderRadius:M.nullBorderRadius},undefined:{display:`inline-block`,color:t.dataTypes.undefined,fontSize:M.undefinedFontSize,padding:M.undefinedPadding,borderRadius:M.undefinedBorderRadius,backgroundColor:t.dataTypes.background},circularReference:{display:`inline-block`,color:t.dataTypes.null,fontSize:M.nullFontSize,fontWeight:M.nullFontWeight,backgroundColor:t.dataTypes.background,padding:M.nullPadding,borderRadius:M.nullBorderRadius},regexp:{display:`inline-block`,color:t.dataTypes.regexp},"copy-to-clipboard":{cursor:M.clipboardCursor},"copy-icon":{color:t.copyToClipboard,fontSize:M.iconFontSize,marginRight:M.iconMarginRight,verticalAlign:`top`},"copy-icon-copied":{color:t.copyToClipboardCheck,marginLeft:M.clipboardCheckMarginLeft},"array-group-meta-data":{display:`inline-block`,padding:M.arrayGroupMetaPadding},"object-meta-data":{display:`inline-block`,padding:M.metaDataPadding},"icon-container":{display:`inline-block`,width:M.iconContainerWidth},tooltip:{padding:M.tooltipPadding},removeVarIcon:{verticalAlign:`top`,display:`inline-block`,color:t.editVariable.removeIcon,cursor:M.iconCursor,fontSize:M.iconFontSize,marginRight:M.iconMarginRight},addVarIcon:{verticalAlign:`top`,display:`inline-block`,color:t.editVariable.addIcon,cursor:M.iconCursor,fontSize:M.iconFontSize,marginRight:M.iconMarginRight},editVarIcon:{verticalAlign:`top`,display:`inline-block`,color:t.editVariable.editIcon,cursor:M.iconCursor,fontSize:M.iconFontSize,marginRight:M.iconMarginRight},"edit-icon-container":{display:`inline-block`,verticalAlign:`top`},"check-icon":{display:`inline-block`,cursor:M.iconCursor,color:t.editVariable.checkIcon,fontSize:M.iconFontSize,paddingRight:M.iconPaddingRight},"cancel-icon":{display:`inline-block`,cursor:M.iconCursor,color:t.editVariable.cancelIcon,fontSize:M.iconFontSize,paddingRight:M.iconPaddingRight},"edit-input":{display:`inline-block`,minWidth:M.editInputMinWidth,borderRadius:M.editInputBorderRadius,backgroundColor:t.editVariable.background,color:t.editVariable.color,padding:M.editInputPadding,marginRight:M.editInputMarginRight,fontFamily:M.editInputFontFamily},"detected-row":{paddingTop:M.detectedRowPaddingTop},"key-modal-request":{position:M.addKeyCoverPosition,top:M.addKeyCoverPositionPx,left:M.addKeyCoverPositionPx,right:M.addKeyCoverPositionPx,bottom:M.addKeyCoverPositionPx,backgroundColor:M.addKeyCoverBackground},"key-modal":{width:M.addKeyModalWidth,backgroundColor:t.addKeyModal.background,marginLeft:M.addKeyModalMargin,marginRight:M.addKeyModalMargin,padding:M.addKeyModalPadding,borderRadius:M.addKeyModalRadius,marginTop:`15px`,position:`relative`},"key-modal-label":{color:t.addKeyModal.labelColor,marginLeft:`2px`,marginBottom:`5px`,fontSize:`11px`},"key-modal-input-container":{overflow:`hidden`},"key-modal-input":{width:`100%`,padding:`3px 6px`,fontFamily:`monospace`,color:t.addKeyModal.color,border:`none`,boxSizing:`border-box`,borderRadius:`2px`},"key-modal-cancel":{backgroundColor:t.editVariable.removeIcon,position:`absolute`,top:`0px`,right:`0px`,borderRadius:`0px 3px 0px 3px`,cursor:`pointer`},"key-modal-cancel-icon":{color:t.addKeyModal.labelColor,fontSize:M.iconFontSize,transform:`rotate(45deg)`},"key-modal-submit":{color:t.editVariable.addIcon,fontSize:M.iconFontSize,position:`absolute`,right:`2px`,top:`3px`,cursor:`pointer`},"function-ellipsis":{display:`inline-block`,color:t.ellipsisColor,fontSize:M.ellipsisFontSize,lineHeight:M.ellipsisLineHeight,cursor:M.ellipsisCursor},"validation-failure":{float:`right`,padding:`3px 6px`,borderRadius:`2px`,cursor:`pointer`,color:t.validationFailure.fontColor,backgroundColor:t.validationFailure.background},"validation-failure-label":{marginRight:`6px`},"validation-failure-clear":{position:`relative`,verticalAlign:`top`,cursor:`pointer`,color:t.validationFailure.iconColor,fontSize:M.iconFontSize,transform:`rotate(45deg)`},comma:{display:`inline-block`,color:M.commaColor,fontSize:M.commaFontSize,marginRight:M.commaMarginRight,cursor:`default`}}},on=function(e){var t=A;return!1!==e&&e!==`none`||(t=j),tn(an,{defaultBase16:t})(e)};function K(e,t,n){return e||console.error(`theme has not been set`),on(e)(t,n)}var sn=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=e.typeName,n=e.displayDataTypes,r=e.theme;return n?_().createElement(`span`,Object.assign({className:`data-type-label`},K(r,`data-type-label`)),t):null}}])}(_().PureComponent),cn=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props;return _().createElement(`div`,K(e.theme,`boolean`),_().createElement(sn,Object.assign({typeName:`bool`},e)),e.value?`true`:`false`)}}])}(_().PureComponent),ln=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props;return _().createElement(`div`,K(e.theme,`date`),_().createElement(sn,Object.assign({typeName:`date`},e)),_().createElement(`span`,Object.assign({className:`date-value`},K(e.theme,`date-value`)),e.value.toLocaleTimeString(`en-us`,{weekday:`short`,year:`numeric`,month:`short`,day:`numeric`,hour:`2-digit`,minute:`2-digit`})))}}])}(_().PureComponent),un=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props;return _().createElement(`div`,K(e.theme,`float`),_().createElement(sn,Object.assign({typeName:`float`},e)),this.props.value)}}])}(_().PureComponent),dn=r(784),fn=function(){return l(function e(){s(this,e),this.handler=function(){}},[{key:`register`,value:function(e){this.handler=e}},{key:`dispatch`,value:function(e){var t;(t=this.handler)==null||t.call(this,e)}}])}();globalThis.__globalDispatcherInstance||(globalThis.__globalDispatcherInstance=new fn);let pn=globalThis.__globalDispatcherInstance;var mn=`updated_src`,hn=new(function(e){function t(){var e;s(this,t);var n=[...arguments];return(e=p(this,t,[].concat(n))).objects={},e.set=function(t,n,r,i){e.objects[t]===void 0&&(e.objects[t]={}),e.objects[t][n]===void 0&&(e.objects[t][n]={}),e.objects[t][n][r]=i},e.get=function(t,n,r,i){return e.objects[t]===void 0||e.objects[t][n]===void 0||e.objects[t][n][r]===void 0?i:e.objects[t][n][r]},e.handleAction=function(t){var n=t.rjvId,r=t.data;switch(t.name){case`RESET`:e.emit(`reset-`+n);break;case`VARIABLE_UPDATED`:t.data[mn]=e.updateSrc(n,r),e.set(n,`action`,`variable-update`,o(o({},r),{},{type:`variable-edited`})),e.emit(`variable-update-`+n);break;case`VARIABLE_REMOVED`:t.data[mn]=e.updateSrc(n,r),e.set(n,`action`,`variable-update`,o(o({},r),{},{type:`variable-removed`})),e.emit(`variable-update-`+n);break;case`VARIABLE_ADDED`:t.data[mn]=e.updateSrc(n,r),e.set(n,`action`,`variable-update`,o(o({},r),{},{type:`variable-added`})),e.emit(`variable-update-`+n);break;case`ADD_VARIABLE_KEY_REQUEST`:e.set(n,`action`,`new-key-request`,r),e.emit(`add-key-request-`+n)}},e.updateSrc=function(t,n){var r=n.name,i=n.namespace,a=n.new_value,o=n.variable_removed;i.shift();var s,c=e.get(t,`global`,`src`),l=e.deepCopy(c,E(i)),u=l,d=function(e,t){var n=typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(!n){if(Array.isArray(e)||(n=T(e))||t&&e&&typeof e.length==`number`){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
141
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||n.return==null||n.return()}finally{if(s)throw a}}}}(i);try{for(d.s();!(s=d.n()).done;)u=u[s.value]}catch(e){d.e(e)}finally{d.f()}return o?D(u)===`array`?u.splice(r,1):delete u[r]:r===null?l=a:u[r]=a,e.set(t,`global`,`src`,l),l},e.deepCopy=function(t,n){var r,i=D(t),a=n.shift();return i===`array`?r=E(t):i===`object`&&(r=o({},t)),a!==void 0&&(r[a]=e.deepCopy(t[a],n)),r},e}return h(t,e),l(t)}(dn.EventEmitter));pn.register(hn.handleAction.bind(hn));let gn=hn;var _n=function(e){function t(e){var n;return s(this,t),(n=p(this,t,[e])).handleToggleCollapsed=function(){n.setState({collapsed:!n.state.collapsed},function(){gn.set(n.props.rjvId,n.props.namespace,`collapsed`,n.state.collapsed)})},n.getFunctionDisplay=function(e){var t=n.props;return e?_().createElement(`span`,null,n.props.value.toString().slice(9,-1).replace(/\{[\s\S]+/,``),_().createElement(`span`,{className:`function-collapsed`,style:{fontWeight:`bold`}},_().createElement(`span`,null,`{`),_().createElement(`span`,K(t.theme,`ellipsis`),`...`),_().createElement(`span`,null,`}`))):n.props.value.toString().slice(9,-1)},n.state={collapsed:gn.get(e.rjvId,e.namespace,`collapsed`,!0)},n}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=this.state.collapsed;return _().createElement(`div`,K(e.theme,`function`),_().createElement(sn,Object.assign({typeName:`function`},e)),_().createElement(`span`,Object.assign({},K(e.theme,`function-value`),{className:`rjv-function-container`,onClick:this.handleToggleCollapsed}),this.getFunctionDisplay(t)))}}])}(_().PureComponent),vn=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){return _().createElement(`div`,K(this.props.theme,`nan`),`NaN`)}}])}(_().PureComponent),yn=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){return _().createElement(`div`,K(this.props.theme,`null`),`NULL`)}}])}(_().PureComponent),bn=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props;return _().createElement(`div`,K(e.theme,`integer`),_().createElement(sn,Object.assign({typeName:`int`},e)),this.props.value)}}])}(_().PureComponent),xn=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props;return _().createElement(`div`,K(e.theme,`regexp`),_().createElement(sn,Object.assign({typeName:`regexp`},e)),this.props.value.toString())}}])}(_().PureComponent),Sn=function(e){function t(e){var n;return s(this,t),(n=p(this,t,[e])).handleToggleCollapsed=function(){n.setState({collapsed:!n.state.collapsed},function(){gn.set(n.props.rjvId,n.props.namespace,`collapsed`,n.state.collapsed)})},n.state={collapsed:gn.get(e.rjvId,e.namespace,`collapsed`,!0)},n}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.state.collapsed,t=this.props,n=t.collapseStringsAfterLength,r=t.theme,i=t.escapeStrings,a=t.value,o=D(n)===`integer`,s={style:{cursor:`default`,wordBreak:`break-all`}};return i&&(a=O(a)),o&&a.length>n&&(s.style.cursor=`pointer`,e&&(a=_().createElement(`span`,null,a.substring(0,n),_().createElement(`span`,K(r,`ellipsis`),` ...`)))),_().createElement(`div`,K(r,`string`),_().createElement(sn,Object.assign({typeName:`string`},t)),_().createElement(`span`,Object.assign({className:`string-value`},s,{onClick:this.handleToggleCollapsed}),`"`,a,`"`))}}])}(_().PureComponent),Cn=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){return _().createElement(`div`,K(this.props.theme,`undefined`),`undefined`)}}])}(_().PureComponent),wn=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props;return _().createElement(`div`,K(e.theme,`bigNumber`),_().createElement(sn,Object.assign({typeName:`bigNumber`},e)),this.props.value.toString())}}])}(_().PureComponent);function Tn(){return Tn=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},Tn.apply(null,arguments)}var En=g.useLayoutEffect,Dn=function(e,t){typeof e==`function`?e(t):e.current=t},On={"min-height":`0`,"max-height":`none`,height:`0`,visibility:`hidden`,overflow:`hidden`,position:`absolute`,"z-index":`-1000`,top:`0`,right:`0`,display:`block`},kn=function(e){Object.keys(On).forEach(function(t){e.style.setProperty(t,On[t],`important`)})},An=null,jn=function(e,t){var n=e.scrollHeight;return t.sizingStyle.boxSizing===`border-box`?n+t.borderSize:n-t.paddingSize},Mn=function(){},Nn=[`borderBottomWidth`,`borderLeftWidth`,`borderRightWidth`,`borderTopWidth`,`boxSizing`,`fontFamily`,`fontSize`,`fontStyle`,`fontWeight`,`letterSpacing`,`lineHeight`,`paddingBottom`,`paddingLeft`,`paddingRight`,`paddingTop`,`tabSize`,`textIndent`,`textRendering`,`textTransform`,`width`,`wordBreak`,`wordSpacing`,`scrollbarGutter`],Pn=!!document.documentElement.currentStyle,Fn=function(e){var t=window.getComputedStyle(e);if(t===null)return null;var n,r=(n=t,Nn.reduce(function(e,t){return e[t]=n[t],e},{})),i=r.boxSizing;return i===``?null:(Pn&&i===`border-box`&&(r.width=parseFloat(r.width)+parseFloat(r.borderRightWidth)+parseFloat(r.borderLeftWidth)+parseFloat(r.paddingRight)+parseFloat(r.paddingLeft)+`px`),{sizingStyle:r,paddingSize:parseFloat(r.paddingBottom)+parseFloat(r.paddingTop),borderSize:parseFloat(r.borderBottomWidth)+parseFloat(r.borderTopWidth)})};function In(e,t,n){var r,i,a=(r=n,i=_().useRef(r),En(function(){i.current=r}),i);g.useLayoutEffect(function(){var n=function(e){return a.current(e)};if(e)return e.addEventListener(t,n),function(){return e.removeEventListener(t,n)}},[])}var Ln=[`cacheMeasurements`,`maxRows`,`minRows`,`onChange`,`onHeightChange`],Rn=g.forwardRef(function(e,t){var n=e.cacheMeasurements,r=e.maxRows,i=e.minRows,a=e.onChange,o=a===void 0?Mn:a,s=e.onHeightChange,c=s===void 0?Mn:s,l=S(e,Ln),u=l.value!==void 0,d=g.useRef(null),f=function(e,t){var n=_().useRef();return _().useCallback(function(r){e.current=r,n.current&&Dn(n.current,null),n.current=t,t&&Dn(t,r)},[t])}(d,t),p=g.useRef(0),m=g.useRef(),h=function(){var e=d.current,t=n&&m.current?m.current:Fn(e);if(t){m.current=t;var a=function(e,t,n,r){n===void 0&&(n=1),r===void 0&&(r=1/0),An||((An=document.createElement(`textarea`)).setAttribute(`tabindex`,`-1`),An.setAttribute(`aria-hidden`,`true`),kn(An)),An.parentNode===null&&document.body.appendChild(An);var i=e.paddingSize,a=e.borderSize,o=e.sizingStyle,s=o.boxSizing;Object.keys(o).forEach(function(e){var t=e;An.style[t]=o[t]}),kn(An),An.value=t;var c=jn(An,e);An.value=t,c=jn(An,e),An.value=`x`;var l=An.scrollHeight-i,u=l*n;s===`border-box`&&(u=u+i+a),c=Math.max(u,c);var d=l*r;return s===`border-box`&&(d=d+i+a),[c=Math.min(d,c),l]}(t,e.value||e.placeholder||`x`,i,r),o=a[0],s=a[1];p.current!==o&&(p.current=o,e.style.setProperty(`height`,o+`px`,`important`),c(o,{rowHeight:s}))}};return g.useLayoutEffect(h),function(e,t){In(document.body,`reset`,function(n){e.current.form===n.target&&t(n)})}(d,function(){if(!u){var e=d.current.value;requestAnimationFrame(function(){var t=d.current;t&&e!==t.value&&h()})}}),In(window,`resize`,h),function(e){In(document.fonts,`loadingdone`,e)}(h),g.createElement(`textarea`,Tn({},l,{onChange:function(e){u||h(),o(e)},ref:f}))});function zn(e,t){e=e.trim();try{if((e=structuredClone(e))[0]===`[`)return Bn(`array`,JSON.parse(e));if(e[0]===`{`)return Bn(`object`,JSON.parse(e));if(e.match(/-?\d+\.\d+/)&&e.match(/-?\d+\.\d+/)[0]===e)return t&&parseFloat(e).toString()!==e?Bn(`bigNumber`,e):Bn(`float`,parseFloat(e));if(e.match(/-?\d+e-\d+/)&&e.match(/-?\d+e-\d+/)[0]===e)return Bn(`float`,Number(e));if(e.match(/-?\d+/)&&e.match(/-?\d+/)[0]===e)return t&&parseInt(e).toString()!==e?Bn(`bigNumber`,e):Bn(`integer`,parseInt(e));if(e.match(/-?\d+e\+\d+/)&&e.match(/-?\d+e\+\d+/)[0]===e)return Bn(`integer`,Number(e))}catch{}switch(e=e.toLowerCase()){case`undefined`:return Bn(`undefined`,void 0);case`nan`:return Bn(`nan`,NaN);case`null`:return Bn(`null`,null);case`true`:return Bn(`boolean`,!0);case`false`:return Bn(`boolean`,!1);default:if(e=Date.parse(e))return Bn(`date`,new Date(e))}return Bn(!1,null)}function Bn(e,t){return{type:e,value:t}}var Vn=[`style`],Hn=[`style`],Un=[`style`],Wn=[`style`],Gn=[`style`],Kn=[`style`],qn=[`style`],Jn=[`style`],Yn=[`style`],Xn=[`style`],Zn=[`style`],Qn=[`style`],$n=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=e.style,n=C(e,Vn);return _().createElement(`span`,n,_().createElement(`svg`,Object.assign({},dr(t),{viewBox:`0 0 24 24`,fill:`currentColor`,preserveAspectRatio:`xMidYMid meet`}),_().createElement(`path`,{d:`M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M7,13H17V11H7`})))}}])}(_().PureComponent),er=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=e.style,n=C(e,Hn);return _().createElement(`span`,n,_().createElement(`svg`,Object.assign({},dr(t),{viewBox:`0 0 24 24`,fill:`currentColor`,preserveAspectRatio:`xMidYMid meet`}),_().createElement(`path`,{d:`M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M13,7H11V11H7V13H11V17H13V13H17V11H13V7Z`})))}}])}(_().PureComponent),tr=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=e.style,n=C(e,Un),r=dr(t).style;return _().createElement(`span`,n,_().createElement(`svg`,{fill:r.color,width:r.height,height:r.width,style:r,viewBox:`0 0 1792 1792`},_().createElement(`path`,{d:`M1344 800v64q0 14-9 23t-23 9h-832q-14 0-23-9t-9-23v-64q0-14 9-23t23-9h832q14 0 23 9t9 23zm128 448v-832q0-66-47-113t-113-47h-832q-66 0-113 47t-47 113v832q0 66 47 113t113 47h832q66 0 113-47t47-113zm128-832v832q0 119-84.5 203.5t-203.5 84.5h-832q-119 0-203.5-84.5t-84.5-203.5v-832q0-119 84.5-203.5t203.5-84.5h832q119 0 203.5 84.5t84.5 203.5z`})))}}])}(_().PureComponent),nr=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=e.style,n=C(e,Wn),r=dr(t).style;return _().createElement(`span`,n,_().createElement(`svg`,{fill:r.color,width:r.height,height:r.width,style:r,viewBox:`0 0 1792 1792`},_().createElement(`path`,{d:`M1344 800v64q0 14-9 23t-23 9h-352v352q0 14-9 23t-23 9h-64q-14 0-23-9t-9-23v-352h-352q-14 0-23-9t-9-23v-64q0-14 9-23t23-9h352v-352q0-14 9-23t23-9h64q14 0 23 9t9 23v352h352q14 0 23 9t9 23zm128 448v-832q0-66-47-113t-113-47h-832q-66 0-113 47t-47 113v832q0 66 47 113t113 47h832q66 0 113-47t47-113zm128-832v832q0 119-84.5 203.5t-203.5 84.5h-832q-119 0-203.5-84.5t-84.5-203.5v-832q0-119 84.5-203.5t203.5-84.5h832q119 0 203.5 84.5t84.5 203.5z`})))}}])}(_().PureComponent),rr=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=e.style,n=C(e,Gn);return _().createElement(`span`,n,_().createElement(`svg`,{style:o(o({},dr(t).style),{},{paddingLeft:`2px`,verticalAlign:`top`}),viewBox:`0 0 15 15`,fill:`currentColor`},_().createElement(`path`,{d:`M0 14l6-6-6-6z`})))}}])}(_().PureComponent),ir=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=e.style,n=C(e,Kn);return _().createElement(`span`,n,_().createElement(`svg`,{style:o(o({},dr(t).style),{},{paddingLeft:`2px`,verticalAlign:`top`}),viewBox:`0 0 15 15`,fill:`currentColor`},_().createElement(`path`,{d:`M0 5l6 6 6-6z`})))}}])}(_().PureComponent),ar=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=e.style,n=C(e,qn);return _().createElement(`span`,n,_().createElement(`svg`,Object.assign({},dr(t),{viewBox:`0 0 40 40`,fill:`currentColor`,preserveAspectRatio:`xMidYMid meet`}),_().createElement(`g`,null,_().createElement(`path`,{d:`m30 35h-25v-22.5h25v7.5h2.5v-12.5c0-1.4-1.1-2.5-2.5-2.5h-7.5c0-2.8-2.2-5-5-5s-5 2.2-5 5h-7.5c-1.4 0-2.5 1.1-2.5 2.5v27.5c0 1.4 1.1 2.5 2.5 2.5h25c1.4 0 2.5-1.1 2.5-2.5v-5h-2.5v5z m-20-27.5h2.5s2.5-1.1 2.5-2.5 1.1-2.5 2.5-2.5 2.5 1.1 2.5 2.5 1.3 2.5 2.5 2.5h2.5s2.5 1.1 2.5 2.5h-20c0-1.5 1.1-2.5 2.5-2.5z m-2.5 20h5v-2.5h-5v2.5z m17.5-5v-5l-10 7.5 10 7.5v-5h12.5v-5h-12.5z m-17.5 10h7.5v-2.5h-7.5v2.5z m12.5-17.5h-12.5v2.5h12.5v-2.5z m-7.5 5h-5v2.5h5v-2.5z`}))))}}])}(_().PureComponent),or=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=e.style,n=C(e,Jn);return _().createElement(`span`,n,_().createElement(`svg`,Object.assign({},dr(t),{viewBox:`0 0 40 40`,fill:`currentColor`,preserveAspectRatio:`xMidYMid meet`}),_().createElement(`g`,null,_().createElement(`path`,{d:`m28.6 25q0-0.5-0.4-1l-4-4 4-4q0.4-0.5 0.4-1 0-0.6-0.4-1.1l-2-2q-0.4-0.4-1-0.4-0.6 0-1 0.4l-4.1 4.1-4-4.1q-0.4-0.4-1-0.4-0.6 0-1 0.4l-2 2q-0.5 0.5-0.5 1.1 0 0.5 0.5 1l4 4-4 4q-0.5 0.5-0.5 1 0 0.7 0.5 1.1l2 2q0.4 0.4 1 0.4 0.6 0 1-0.4l4-4.1 4.1 4.1q0.4 0.4 1 0.4 0.6 0 1-0.4l2-2q0.4-0.4 0.4-1z m8.7-5q0 4.7-2.3 8.6t-6.3 6.2-8.6 2.3-8.6-2.3-6.2-6.2-2.3-8.6 2.3-8.6 6.2-6.2 8.6-2.3 8.6 2.3 6.3 6.2 2.3 8.6z`}))))}}])}(_().PureComponent),sr=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=e.style,n=C(e,Yn);return _().createElement(`span`,n,_().createElement(`svg`,Object.assign({},dr(t),{viewBox:`0 0 40 40`,fill:`currentColor`,preserveAspectRatio:`xMidYMid meet`}),_().createElement(`g`,null,_().createElement(`path`,{d:`m30.1 21.4v-2.8q0-0.6-0.4-1t-1-0.5h-5.7v-5.7q0-0.6-0.4-1t-1-0.4h-2.9q-0.6 0-1 0.4t-0.4 1v5.7h-5.7q-0.6 0-1 0.5t-0.5 1v2.8q0 0.6 0.5 1t1 0.5h5.7v5.7q0 0.5 0.4 1t1 0.4h2.9q0.6 0 1-0.4t0.4-1v-5.7h5.7q0.6 0 1-0.5t0.4-1z m7.2-1.4q0 4.7-2.3 8.6t-6.3 6.2-8.6 2.3-8.6-2.3-6.2-6.2-2.3-8.6 2.3-8.6 6.2-6.2 8.6-2.3 8.6 2.3 6.3 6.2 2.3 8.6z`}))))}}])}(_().PureComponent),cr=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=e.style,n=C(e,Xn);return _().createElement(`span`,n,_().createElement(`svg`,Object.assign({},dr(t),{viewBox:`0 0 40 40`,fill:`currentColor`,preserveAspectRatio:`xMidYMid meet`}),_().createElement(`g`,null,_().createElement(`path`,{d:`m31.6 21.6h-10v10h-3.2v-10h-10v-3.2h10v-10h3.2v10h10v3.2z`}))))}}])}(_().PureComponent),lr=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=e.style,n=C(e,Zn);return _().createElement(`span`,n,_().createElement(`svg`,Object.assign({},dr(t),{viewBox:`0 0 40 40`,fill:`currentColor`,preserveAspectRatio:`xMidYMid meet`}),_().createElement(`g`,null,_().createElement(`path`,{d:`m19.8 26.4l2.6-2.6-3.4-3.4-2.6 2.6v1.3h2.2v2.1h1.2z m9.8-16q-0.3-0.4-0.7 0l-7.8 7.8q-0.4 0.4 0 0.7t0.7 0l7.8-7.8q0.4-0.4 0-0.7z m1.8 13.2v4.3q0 2.6-1.9 4.5t-4.5 1.9h-18.6q-2.6 0-4.5-1.9t-1.9-4.5v-18.6q0-2.7 1.9-4.6t4.5-1.8h18.6q1.4 0 2.6 0.5 0.3 0.2 0.4 0.5 0.1 0.4-0.2 0.7l-1.1 1.1q-0.3 0.3-0.7 0.1-0.5-0.1-1-0.1h-18.6q-1.4 0-2.5 1.1t-1 2.5v18.6q0 1.4 1 2.5t2.5 1h18.6q1.5 0 2.5-1t1.1-2.5v-2.9q0-0.2 0.2-0.4l1.4-1.5q0.3-0.3 0.8-0.1t0.4 0.6z m-2.1-16.5l6.4 6.5-15 15h-6.4v-6.5z m9.9 3l-2.1 2-6.4-6.4 2.1-2q0.6-0.7 1.5-0.7t1.5 0.7l3.4 3.4q0.6 0.6 0.6 1.5t-0.6 1.5z`}))))}}])}(_().PureComponent),ur=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=e.style,n=C(e,Qn);return _().createElement(`span`,n,_().createElement(`svg`,Object.assign({},dr(t),{viewBox:`0 0 40 40`,fill:`currentColor`,preserveAspectRatio:`xMidYMid meet`}),_().createElement(`g`,null,_().createElement(`path`,{d:`m31.7 16.4q0-0.6-0.4-1l-2.1-2.1q-0.4-0.4-1-0.4t-1 0.4l-9.1 9.1-5-5q-0.5-0.4-1-0.4t-1 0.4l-2.1 2q-0.4 0.4-0.4 1 0 0.6 0.4 1l8.1 8.1q0.4 0.4 1 0.4 0.6 0 1-0.4l12.2-12.1q0.4-0.4 0.4-1z m5.6 3.6q0 4.7-2.3 8.6t-6.3 6.2-8.6 2.3-8.6-2.3-6.2-6.2-2.3-8.6 2.3-8.6 6.2-6.2 8.6-2.3 8.6 2.3 6.3 6.2 2.3 8.6z`}))))}}])}(_().PureComponent);function dr(e){return e||={},{style:o(o({verticalAlign:`middle`},e),{},{color:e.color?e.color:`#000000`,height:`1em`,width:`1em`})}}var fr=function(e){function t(e){var n;return s(this,t),(n=p(this,t,[e])).copiedTimer=null,n.copyToClipboardFallback=function(e){var t=document.createElement(`textarea`);t.value=e,document.body.appendChild(t),t.select(),document.execCommand(`copy`),document.body.removeChild(t)},n.handleCopy=function(){var e=n.props,t=e.clickCallback,r=e.src,i=e.namespace,a=JSON.stringify(n.clipboardValue(r),null,` `);navigator.clipboard?navigator.clipboard.writeText(a).catch(function(){n.copyToClipboardFallback(a)}):n.copyToClipboardFallback(a),n.copiedTimer=setTimeout(function(){n.setState({copied:!1})},5500),n.setState({copied:!0},function(){typeof t==`function`&&t({src:r,namespace:i,name:i[i.length-1]})})},n.getClippyIcon=function(){var e=n.props.theme;return n.state.copied?_().createElement(`span`,null,_().createElement(ar,Object.assign({className:`copy-icon`},K(e,`copy-icon`))),_().createElement(`span`,K(e,`copy-icon-copied`),`✔`)):_().createElement(ar,Object.assign({className:`copy-icon`},K(e,`copy-icon`)))},n.clipboardValue=function(e){switch(D(e)){case`function`:case`regexp`:return e.toString();default:return e}},n.state={copied:!1},n}return h(t,e),l(t,[{key:`componentWillUnmount`,value:function(){this.copiedTimer&&=(clearTimeout(this.copiedTimer),null)}},{key:`render`,value:function(){var e=this.props,t=e.theme,n=e.hidden,r=e.rowHovered,i=K(t,`copy-to-clipboard`).style,a=`inline`;return n&&(a=`none`),_().createElement(`span`,{className:`copy-to-clipboard-container`,title:`Copy to clipboard`,style:{verticalAlign:`top`,display:r?`inline-block`:`none`}},_().createElement(`span`,{style:o(o({},i),{},{display:a}),onClick:this.handleCopy},this.getClippyIcon()))}}])}(_().PureComponent);let pr=function(e){function t(e){var n;return s(this,t),(n=p(this,t,[e])).handleSelect=function(e){var t=n.props,r=t.variable,i=t.namespace,a=t.onEdit,s=t.onSelect,c=t.keyModifier,l=E(i);c(e,`edit`)&&!1!==a?n.prepopInput(r):!1!==s&&(l.shift(),s(o(o({},r),{},{namespace:l})))},n.getEditIcon=function(){var e=n.props,t=e.variable,r=e.theme;return _().createElement(`div`,{className:`click-to-edit`,style:{verticalAlign:`top`,display:n.state.hovered?`inline-block`:`none`}},_().createElement(lr,Object.assign({className:`click-to-edit-icon`},K(r,`editVarIcon`),{onClick:function(){n.prepopInput(t)}})))},n.prepopInput=function(e){if(!1!==n.props.onEdit){var t=function(e,t){var n;switch(D(e,t)){case`undefined`:n=`undefined`;break;case`nan`:n=`NaN`;break;case`string`:n=e;break;case`bigNumber`:case`date`:case`function`:case`regexp`:n=e.toString();break;default:try{n=JSON.stringify(e,null,` `)}catch{n=``}}return n}(e.value,n.props.bigNumber),r=zn(t,n.props.bigNumber);n.setState({editMode:!0,editValue:t,parsedInput:{type:r.type,value:r.value}})}},n.getRemoveIcon=function(){var e=n.props,t=e.variable,r=e.namespace,i=e.theme,a=e.rjvId;return _().createElement(`div`,{className:`click-to-remove`,style:{verticalAlign:`top`,display:n.state.hovered?`inline-block`:`none`}},_().createElement(or,Object.assign({className:`click-to-remove-icon`},K(i,`removeVarIcon`),{onClick:function(){pn.dispatch({name:`VARIABLE_REMOVED`,rjvId:a,data:{name:t.name,namespace:r,existing_value:t.value,variable_removed:!0}})}})))},n.getValue=function(e,t){var r=!t&&e.type,i=n.props;switch(r){case!1:return n.getEditInput();case`string`:return _().createElement(Sn,Object.assign({value:e.value},i));case`integer`:return _().createElement(bn,Object.assign({value:e.value},i));case`float`:return _().createElement(un,Object.assign({value:e.value},i));case`boolean`:return _().createElement(cn,Object.assign({value:e.value},i));case`function`:return _().createElement(_n,Object.assign({value:e.value},i));case`null`:return _().createElement(yn,i);case`nan`:return _().createElement(vn,i);case`undefined`:return _().createElement(Cn,i);case`date`:return _().createElement(ln,Object.assign({value:e.value},i));case`regexp`:return _().createElement(xn,Object.assign({value:e.value},i));case`bigNumber`:return _().createElement(wn,Object.assign({value:e.value},i));case`circularReference`:return _().createElement(JsonCircularReference,Object.assign({value:e.value},i));default:var a=``;try{a=JSON.stringify(e.value)}catch{a=``}return _().createElement(`div`,{className:`object-value`},a)}},n.getEditInput=function(){var e=n.props,t=e.keyModifier,r=e.selectOnFocus,i=e.theme,a=n.state.editValue;return _().createElement(`div`,null,_().createElement(Rn,Object.assign({type:`text`,ref:function(e){e&&e[r?`select`:`focus`]()},value:a,className:`variable-editor`,onChange:function(e){var t=e.target.value,r=zn(t,n.props.bigNumber);n.setState({editValue:t,parsedInput:{type:r.type,value:r.value}})},onKeyDown:function(e){switch(e.key){case`Escape`:n.setState({editMode:!1,editValue:``});break;case`Enter`:t(e,`submit`)&&n.submitEdit(!0)}e.stopPropagation()},placeholder:`update this value`,minRows:2},K(i,`edit-input`))),_().createElement(`div`,K(i,`edit-icon-container`),_().createElement(or,Object.assign({className:`edit-cancel`},K(i,`cancel-icon`),{onClick:function(e){e&&e.stopPropagation(),n.setState({editMode:!1,editValue:``})}})),_().createElement(ur,Object.assign({className:`edit-check string-value`},K(i,`check-icon`),{onClick:function(e){e&&e.stopPropagation(),n.submitEdit()}})),_().createElement(`div`,null,n.showDetected())))},n.submitEdit=function(e){var t=n.props,r=t.variable,i=t.namespace,a=t.rjvId,o=t.bigNumber,s=n.state,c=s.editValue,l=s.parsedInput,u=c;e&&l.type&&(u=l.value,o&&l.type===`bigNumber`&&(u=new o(u))),n.setState({editMode:!1}),pn.dispatch({name:`VARIABLE_UPDATED`,rjvId:a,data:{name:r.name,namespace:i,existing_value:r.value,new_value:u,variable_removed:!1}})},n.showDetected=function(){var e=n.props.theme,t=n.getDetectedInput();if(t)return _().createElement(`div`,null,_().createElement(`div`,K(e,`detected-row`),t,_().createElement(ur,{className:`edit-check detected`,style:o({verticalAlign:`top`,paddingLeft:`3px`},K(e,`check-icon`).style),onClick:function(e){e&&e.stopPropagation(),n.submitEdit(!0)}})))},n.getDetectedInput=function(){var e=n.state.parsedInput,t=e.type,r=e.value,i=n.props,a=i.theme;if(!1!==t)switch(t.toLowerCase()){case`object`:return _().createElement(`span`,null,_().createElement(`span`,{style:o(o({},K(a,`brace`).style),{},{cursor:`default`})},`{`),_().createElement(`span`,{style:o(o({},K(a,`ellipsis`).style),{},{cursor:`default`})},`...`),_().createElement(`span`,{style:o(o({},K(a,`brace`).style),{},{cursor:`default`})},`}`));case`array`:return _().createElement(`span`,null,_().createElement(`span`,{style:o(o({},K(a,`brace`).style),{},{cursor:`default`})},`[`),_().createElement(`span`,{style:o(o({},K(a,`ellipsis`).style),{},{cursor:`default`})},`...`),_().createElement(`span`,{style:o(o({},K(a,`brace`).style),{},{cursor:`default`})},`]`));case`string`:return _().createElement(Sn,Object.assign({value:r},i));case`integer`:return _().createElement(bn,Object.assign({value:r},i));case`float`:return _().createElement(un,Object.assign({value:r},i));case`boolean`:return _().createElement(cn,Object.assign({value:r},i));case`function`:return _().createElement(_n,Object.assign({value:r},i));case`null`:return _().createElement(yn,i);case`nan`:return _().createElement(vn,i);case`undefined`:return _().createElement(Cn,i);case`date`:return _().createElement(ln,Object.assign({value:new Date(r)},i));case`bignumber`:return _().createElement(wn,Object.assign({value:r},i));case`circularreference`:return _().createElement(JsonCircularReference,Object.assign({value:variable.value},i))}},n.state={editMode:!1,editValue:``,hovered:!1,renameKey:!1,parsedInput:{type:!1,value:null}},n}return h(t,e),l(t,[{key:`render`,value:function(){var e=this,t=this.props,n=t.variable,r=t.singleIndent,i=t.type,a=t.theme,s=t.namespace,c=t.indentWidth,l=t.enableClipboard,u=t.onEdit,d=t.onDelete,f=t.onSelect,p=t.displayArrayKey,m=t.quotesOnKeys,h=t.showComma,g=t.isLast,v=this.state.editMode,y=!1!==f||!1!==u;return _().createElement(`div`,Object.assign({},K(a,`objectKeyVal`,{paddingLeft:c*r}),{onMouseEnter:function(){return e.setState(o(o({},e.state),{},{hovered:!0}))},onMouseLeave:function(){return e.setState(o(o({},e.state),{},{hovered:!1}))},className:`variable-row`,key:n.name}),i===`array`?p?_().createElement(`span`,Object.assign({},K(a,`array-key`),{key:n.name+`_`+s}),n.name,_().createElement(`div`,K(a,`colon`),`:`)):null:_().createElement(`span`,null,_().createElement(`span`,Object.assign({},K(a,`object-name`),{className:`object-key`,key:n.name+`_`+s,onClick:y?this.handleSelect:null}),!!m&&_().createElement(`span`,{style:{verticalAlign:`top`}},`"`),_().createElement(`span`,{style:{display:`inline-block`}},O(n.name)),!!m&&_().createElement(`span`,{style:{verticalAlign:`top`}},`"`)),_().createElement(`span`,K(a,`colon`),`:`)),_().createElement(`div`,Object.assign({className:`variable-value`,onClick:y?this.handleSelect:null},K(a,`variableValue`,{cursor:!1===f?`default`:`pointer`})),this.getValue(n,v)),h&&!g&&_().createElement(`span`,K(a,`comma`),`,`),l?_().createElement(fr,{rowHovered:this.state.hovered,hidden:v,src:n.value,clickCallback:l,theme:a,namespace:[].concat(E(s),[n.name])}):null,!1!==u&&!1===v?this.getEditIcon():null,!1!==d&&!1===v?this.getRemoveIcon():null)}}])}(_().PureComponent);var mr=function(e){function t(){var e;s(this,t);var n=[...arguments];return(e=p(this,t,[].concat(n))).getObjectSize=function(){var t=e.props,n=t.size,r=t.theme;if(t.displayObjectSize)return _().createElement(`span`,Object.assign({className:`object-size`},K(r,`object-size`)),n,` item`,n===1?``:`s`)},e.getAddAttribute=function(t){var n=e.props,r=n.theme,i=n.namespace,a=n.name,s=n.src,c=n.rjvId,l=n.depth;return _().createElement(`span`,{className:`click-to-add`,style:{verticalAlign:`top`,display:t?`inline-block`:`none`}},_().createElement(sr,Object.assign({className:`click-to-add-icon`},K(r,`addVarIcon`),{onClick:function(){var e={name:l>0?a:null,namespace:i.splice(0,i.length-1),existing_value:s,variable_removed:!1,key_name:null};D(s)===`object`?pn.dispatch({name:`ADD_VARIABLE_KEY_REQUEST`,rjvId:c,data:e}):pn.dispatch({name:`VARIABLE_ADDED`,rjvId:c,data:o(o({},e),{},{new_value:[].concat(E(s),[null])})})}})))},e.getRemoveObject=function(t){var n=e.props,r=n.theme,i=n.namespace,a=n.name,o=n.src,s=n.rjvId;if(i.length!==1)return _().createElement(`span`,{className:`click-to-remove`,style:{display:t?`inline-block`:`none`}},_().createElement(or,Object.assign({className:`click-to-remove-icon`},K(r,`removeVarIcon`),{onClick:function(){pn.dispatch({name:`VARIABLE_REMOVED`,rjvId:s,data:{name:a,namespace:i.splice(0,i.length-1),existing_value:o,variable_removed:!0}})}})))},e.render=function(){var t=e.props,n=t.theme,r=t.onDelete,i=t.onAdd,a=t.enableClipboard,o=t.src,s=t.namespace,c=t.rowHovered;return _().createElement(`div`,Object.assign({},K(n,`object-meta-data`),{className:`object-meta-data`,onClick:function(e){e.stopPropagation()}}),e.getObjectSize(),a?_().createElement(fr,{rowHovered:c,clickCallback:a,src:o,theme:n,namespace:s}):null,!1===i?null:e.getAddAttribute(c),!1===r?null:e.getRemoveObject(c))},e}return h(t,e),l(t)}(_().PureComponent);function hr(e){var t=e.parent_type,n=e.namespace,r=e.quotesOnKeys,i=e.theme,a=e.jsvRoot,o=e.name,s=e.displayArrayKey,c=e.onKeyClick,l=e.name?e.name:``,u=typeof c==`function`?c:null;return!a||!1!==o&&o!==null?t===`array`?s?_().createElement(`span`,Object.assign({},K(i,`array-key`),{key:n,onClick:u}),_().createElement(`span`,{className:`array-key`},l),_().createElement(`span`,K(i,`colon`),`:`)):_().createElement(`span`,null):_().createElement(`span`,Object.assign({},K(i,`object-name`),{key:n,onClick:u}),_().createElement(`span`,{className:`object-key`},r&&_().createElement(`span`,{style:{verticalAlign:`top`}},`"`),_().createElement(`span`,null,l),r&&_().createElement(`span`,{style:{verticalAlign:`top`}},`"`)),_().createElement(`span`,K(i,`colon`),`:`)):_().createElement(`span`,null)}function gr(e){var t=e.theme;switch(e.iconStyle){case`triangle`:return _().createElement(ir,Object.assign({},K(t,`expanded-icon`),{className:`expanded-icon`}));case`square`:return _().createElement(tr,Object.assign({},K(t,`expanded-icon`),{className:`expanded-icon`}));default:return _().createElement($n,Object.assign({},K(t,`expanded-icon`),{className:`expanded-icon`}))}}function _r(e){var t=e.theme;switch(e.iconStyle){case`triangle`:return _().createElement(rr,Object.assign({},K(t,`collapsed-icon`),{className:`collapsed-icon`}));case`square`:return _().createElement(nr,Object.assign({},K(t,`collapsed-icon`),{className:`collapsed-icon`}));default:return _().createElement(er,Object.assign({},K(t,`collapsed-icon`),{className:`collapsed-icon`}))}}var vr=[`src`,`groupArraysAfterLength`,`depth`,`name`,`theme`,`jsvRoot`,`namespace`],yr=function(e){function t(e){var n;return s(this,t),(n=p(this,t,[e])).toggleCollapsed=function(e){for(var t=n.state.expanded,r=[],i=Math.max(t.length||0,e+1),a=0;a<i;a++)r[a]=!0===t[a];r[e]=!r[e],n.setState({expanded:r})},n.handleKeySelect=function(){var e=n.props,t=e.name,r=e.namespace,i=e.onSelect,a=e.src;if(typeof i==`function`){var o=E(r);o.shift(),o.length>0&&o.pop(),i({name:t,value:a,type:`array`,namespace:o})}},n.state={expanded:[]},n}return h(t,e),l(t,[{key:`getExpandedIcon`,value:function(e){var t=this.props,n=t.theme,r=t.iconStyle;return this.state.expanded[e]?_().createElement(gr,{theme:n,iconStyle:r}):_().createElement(_r,{theme:n,iconStyle:r})}},{key:`render`,value:function(){var e=this,t=this.props,n=t.src,r=t.groupArraysAfterLength,i=(t.depth,t.name),a=t.theme,o=t.jsvRoot,s=t.namespace,c=C(t,vr),l=0,u=5*this.props.indentWidth;o||(l=5*this.props.indentWidth);var d=r,f=Math.ceil(n.length/d);return _().createElement(`div`,Object.assign({className:`object-key-val`},K(a,o?`jsv-root`:`objectKeyVal`,{paddingLeft:l})),_().createElement(hr,Object.assign({},this.props,{onKeyClick:this.handleKeySelect})),_().createElement(`span`,null,_().createElement(mr,Object.assign({size:n.length},this.props))),E(Array(f)).map(function(t,r){return _().createElement(`div`,Object.assign({key:r,className:`object-key-val array-group`},K(a,`objectKeyVal`,{marginLeft:6,paddingLeft:u})),_().createElement(`span`,K(a,`brace-row`),_().createElement(`div`,Object.assign({className:`icon-container`},K(a,`icon-container`),{onClick:function(t){e.toggleCollapsed(r)}}),e.getExpandedIcon(r)),e.state.expanded[r]?_().createElement(Cr,Object.assign({key:i+r,depth:0,name:!1,collapsed:!1,groupArraysAfterLength:d,index_offset:r*d,src:n.slice(r*d,r*d+d),namespace:s,type:`array`,parent_type:`array_group`,theme:a,showComma:e.props.showComma,isLast:r===f-1},c)):_().createElement(`span`,Object.assign({},K(a,`brace`),{onClick:function(t){e.toggleCollapsed(r)},className:`array-group-brace`}),`[`,_().createElement(`div`,Object.assign({},K(a,`array-group-meta-data`),{className:`array-group-meta-data`}),_().createElement(`span`,Object.assign({className:`object-size`},K(a,`object-size`)),r*d,` - `,r*d+d-1>n.length?n.length-1:r*d+d-1)),`]`)))}))}}])}(_().PureComponent),br=[`depth`,`src`,`namespace`,`name`,`type`,`parent_type`,`theme`,`jsvRoot`,`iconStyle`,`showComma`,`isLast`],xr=function(e){function t(e){var n;s(this,t),(n=p(this,t,[e])).handleToggleCollapsed=function(){n.setState({expanded:!n.state.expanded},function(){gn.set(n.props.rjvId,n.props.namespace,`expanded`,n.state.expanded)})},n.handleKeySelect=function(){var e=n.props,t=e.name,r=e.namespace,i=e.onSelect,a=e.src,o=n.state.object_type;if(typeof i==`function`){var s=E(r);s.shift(),s.length>0&&s.pop(),i({name:t,value:a,type:o,namespace:s})}},n.getObjectContent=function(e,t,r){return _().createElement(`div`,{className:`pushed-content object-container`},_().createElement(`div`,Object.assign({className:`object-content`},K(n.props.theme,`pushed-content`)),n.renderObjectContents(t,r)))},n.getEllipsis=function(){return n.state.size===0?null:_().createElement(`div`,Object.assign({},K(n.props.theme,`ellipsis`),{className:`node-ellipsis`,onClick:n.handleToggleCollapsed}),`...`)},n.getObjectMetaData=function(e){var t=n.state,r=t.size,i=t.hovered;return _().createElement(mr,Object.assign({rowHovered:i,size:r},n.props))},n.renderObjectContents=function(e,t){var r,i=n.props,a=i.depth,o=i.parent_type,s=i.index_offset,c=i.groupArraysAfterLength,l=i.namespace,u=i.showComma,d=n.state.object_type,f=[],p=Object.keys(e||{});return n.props.sortKeys&&d!==`array`&&(p=p.sort()),p.forEach(function(i,m){r=new Sr(i,e[i],t.bigNumber);var h=m===p.length-1;if(o===`array_group`&&s&&(r.name=parseInt(r.name,10)+s),Object.prototype.hasOwnProperty.call(e,i)&&r.type.toLowerCase()!==`window`)if(n.isCircularReference(r))f.push(_().createElement(k,Object.assign({key:r.name,depth:a+1,name:r.name,src:r.value,namespace:l.concat(r.name),type:`array`,parent_type:d,isLast:h,showComma:u,singleIndent:5,indentWidth:n.props.indentWidth},t)));else if(r.type===`object`)f.push(_().createElement(Cr,Object.assign({key:r.name,depth:a+1,name:r.name,src:r.value,namespace:l.concat(r.name),parent_type:d,isLast:h,showComma:u,listOfAncestors:n.listOfAncestors.concat([n.props.src])},t)));else if(r.type===`array`){var g=Cr;c&&r.value.length>c&&(g=yr),f.push(_().createElement(g,Object.assign({key:r.name,depth:a+1,name:r.name,src:r.value,namespace:l.concat(r.name),type:`array`,parent_type:d,isLast:h,showComma:u,listOfAncestors:n.listOfAncestors.concat([n.props.src])},t)))}else f.push(_().createElement(pr,Object.assign({key:r.name+`_`+l,variable:r,singleIndent:5,namespace:l,type:n.props.type,isLast:h,showComma:u},t)))}),f};var r=t.getState(e);return n.state=o(o({},r),{},{prevProps:{}}),n.listOfAncestors=Array.from(n.props.listOfAncestors||[]),n.listOfAncestors.push(e.src),n}return h(t,e),l(t,[{key:`getBraceStart`,value:function(e,t){var n=this.props,r=n.theme,i=n.iconStyle;if(n.parent_type===`array_group`)return _().createElement(`span`,null,_().createElement(`span`,K(r,`brace`),e===`array`?`[`:`{`));var a=t?gr:_r;return _().createElement(`span`,null,_().createElement(`span`,Object.assign({onClick:this.handleToggleCollapsed},K(r,`brace-row`)),_().createElement(`div`,Object.assign({className:`icon-container`},K(r,`icon-container`)),_().createElement(a,{theme:r,iconStyle:i})),_().createElement(hr,Object.assign({},this.props,{onKeyClick:this.handleKeySelect})),_().createElement(`span`,K(r,`brace`),e===`array`?`[`:`{`)))}},{key:`isCircularReference`,value:function(e){return this.listOfAncestors.indexOf(e.value)>-1||e.value===this.props.src}},{key:`render`,value:function(){var e=this,t=this.props,n=t.depth,r=t.src,i=(t.namespace,t.name,t.type,t.parent_type),a=t.theme,s=t.jsvRoot,c=t.iconStyle,l=t.showComma,u=t.isLast,d=C(t,br),f=this.state,p=f.object_type,m=f.expanded,h={};return s||i===`array_group`?i===`array_group`&&(h.borderLeft=0,h.display=`inline`):h.paddingLeft=5*this.props.indentWidth,_().createElement(`div`,Object.assign({className:`object-key-val`,onMouseEnter:function(){return e.setState(o(o({},e.state),{},{hovered:!0}))},onMouseLeave:function(){return e.setState(o(o({},e.state),{},{hovered:!1}))}},K(a,s?`jsv-root`:`objectKeyVal`,h)),this.getBraceStart(p,m),m?this.getObjectContent(n,r,o({theme:a,iconStyle:c},d)):this.getEllipsis(),_().createElement(`span`,{className:`brace-row`},_().createElement(`span`,{style:o(o({},K(a,`brace`).style),{},{paddingLeft:m?`3px`:`0px`})},p===`array`?`]`:`}`)),l&&!u&&!s&&_().createElement(`span`,K(a,`comma`),`,`),this.getObjectMetaData(r))}}],[{key:`getDerivedStateFromProps`,value:function(e,n){var r=n.prevProps;return e.src!==r.src||e.collapsed!==r.collapsed||e.name!==r.name||e.namespace!==r.namespace||e.rjvId!==r.rjvId?o(o({},t.getState(e)),{},{prevProps:e}):null}}])}(_().PureComponent);xr.getState=function(e){var t=Object.keys(e.src).length,n=(!1===e.collapsed||!0!==e.collapsed&&e.collapsed>e.depth)&&(!e.shouldCollapse||!1===e.shouldCollapse({name:e.name,src:e.src,type:D(e.src),namespace:e.namespace}))&&t!==0;return{expanded:gn.get(e.rjvId,e.namespace,`expanded`,n),object_type:e.type===`array`?`array`:`object`,parent_type:e.type===`array`?`array`:`object`,size:t,hovered:!1}};var Sr=l(function e(t,n,r){s(this,e),this.name=t,this.value=n,this.type=D(n,r)});x(xr);let Cr=xr;var wr=function(e){function t(){var e;s(this,t);var n=[...arguments];return(e=p(this,t,[].concat(n))).render=function(){var t,n,r=e.props,i=[r.name],a=Cr;return typeof r.name!=`object`||Array.isArray(r.name)||(i=[r.name?.displayName||r.name?.name||((t=r.name)==null||(n=t.type)==null?void 0:n.name)||`Anonymous`]),Array.isArray(r.src)&&r.groupArraysAfterLength&&r.src.length>r.groupArraysAfterLength&&(a=yr),_().createElement(`div`,{className:`pretty-json-container object-container`},_().createElement(`div`,{className:`object-content`},_().createElement(a,Object.assign({namespace:i,depth:0,jsvRoot:!0},r))))},e}return h(t,e),l(t)}(_().PureComponent),Tr=function(e){function t(e){var n;return s(this,t),(n=p(this,t,[e])).handleCloseModal=function(){pn.dispatch({rjvId:n.props.rjvId,name:`RESET`})},n.handleSubmit=function(){n.props.submit(n.state.input)},n.state={input:e.input?e.input:``},n}return h(t,e),l(t,[{key:`render`,value:function(){var e=this,t=this.props,n=t.theme,r=t.rjvId,i=t.isValid,a=this.state.input,o=i(a);return _().createElement(`div`,Object.assign({className:`key-modal-request`},K(n,`key-modal-request`),{onClick:this.handleCloseModal}),_().createElement(`div`,Object.assign({},K(n,`key-modal`),{onClick:function(e){e.stopPropagation()}}),_().createElement(`div`,K(n,`key-modal-label`),`Key Name:`),_().createElement(`div`,{style:{position:`relative`}},_().createElement(`input`,Object.assign({},K(n,`key-modal-input`),{className:`key-modal-input`,ref:function(e){return e&&e.focus()},spellCheck:!1,value:a,placeholder:`...`,onChange:function(t){e.setState({input:t.target.value})},onKeyPress:function(t){o&&t.key===`Enter`?e.handleSubmit():t.key===`Escape`&&e.handleCloseModal()}})),o?_().createElement(ur,Object.assign({},K(n,`key-modal-submit`),{className:`key-modal-submit`,onClick:this.handleSubmit})):null),_().createElement(`span`,K(n,`key-modal-cancel`),_().createElement(cr,Object.assign({},K(n,`key-modal-cancel-icon`),{className:`key-modal-cancel`,onClick:function(){pn.dispatch({rjvId:r,name:`RESET`})}})))))}}])}(_().PureComponent),Er=function(e){function t(){var e;s(this,t);var n=[...arguments];return(e=p(this,t,[].concat(n))).isValid=function(t){var n=e.props.rjvId,r=gn.get(n,`action`,`new-key-request`);return t!==``&&Object.keys(r.existing_value).indexOf(t)===-1},e.submit=function(t){var n=e.props.rjvId,r=gn.get(n,`action`,`new-key-request`);r.new_value=o({},r.existing_value),r.new_value[t]=e.props.defaultValue,pn.dispatch({name:`VARIABLE_ADDED`,rjvId:n,data:r})},e}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=e.active,n=e.theme,r=e.rjvId;return t?_().createElement(Tr,{rjvId:r,theme:n,isValid:this.isValid,submit:this.submit}):null}}])}(_().PureComponent),Dr=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=e.message,n=e.active,r=e.theme,i=e.rjvId;return n?_().createElement(`div`,Object.assign({className:`validation-failure`},K(r,`validation-failure`),{onClick:function(){pn.dispatch({rjvId:i,name:`RESET`})}}),_().createElement(`span`,K(r,`validation-failure-label`),t),_().createElement(cr,K(r,`validation-failure-clear`))):null}}])}(_().PureComponent),Or=function(e){function t(e){var n;return s(this,t),(n=p(this,t,[e])).rjvId=Date.now().toString()+Math.random().toString(36).slice(2),n.getListeners=function(){return{reset:n.resetState,"variable-update":n.updateSrc,"add-key-request":n.addKeyRequest}},n.updateSrc=function(){var e,t=gn.get(n.rjvId,`action`,`variable-update`),r=t.name,i=t.namespace,a=t.new_value,o=t.existing_value,s=t.updated_src,c=t.type,l=n.props,u=l.onEdit,d=l.onDelete,f=l.onAdd,p={existing_src:n.state.src,new_value:a,updated_src:s,name:r,namespace:i,existing_value:o};switch(c){case`variable-added`:e=f(p);break;case`variable-edited`:e=u(p);break;case`variable-removed`:e=d(p)}!1===e?n.setState({validationFailure:!0}):(gn.set(n.rjvId,`global`,`src`,s),n.setState({src:s}))},n.addKeyRequest=function(){n.setState({addKeyRequest:!0})},n.resetState=function(){n.setState({validationFailure:!1,addKeyRequest:!1})},n.state={addKeyRequest:!1,editKeyRequest:!1,validationFailure:!1,src:t.defaultProps.src,name:t.defaultProps.name,theme:t.defaultProps.theme,validationMessage:t.defaultProps.validationMessage,prevSrc:t.defaultProps.src,prevName:t.defaultProps.name,prevTheme:t.defaultProps.theme},n}return h(t,e),l(t,[{key:`componentDidMount`,value:function(){gn.set(this.rjvId,`global`,`src`,this.state.src);var e=this.getListeners();for(var t in e)gn.on(t+`-`+this.rjvId,e[t]);this.setState({addKeyRequest:!1,editKeyRequest:!1})}},{key:`componentDidUpdate`,value:function(e,t){!1!==t.addKeyRequest&&this.setState({addKeyRequest:!1}),!1!==t.editKeyRequest&&this.setState({editKeyRequest:!1}),e.src!==this.state.src&&gn.set(this.rjvId,`global`,`src`,this.state.src)}},{key:`componentWillUnmount`,value:function(){var e=this.getListeners();for(var t in e)gn.removeListener(t+`-`+this.rjvId,e[t])}},{key:`render`,value:function(){var e=this.state,t=e.validationFailure,n=e.validationMessage,r=e.addKeyRequest,i=e.theme,a=e.src,s=e.name,c=this.props,l=c.style,u=c.defaultValue;return _().createElement(`div`,{className:`react-json-view`,style:o(o({},K(i,`app-container`).style),l)},_().createElement(Dr,{message:n,active:t,theme:i,rjvId:this.rjvId}),_().createElement(wr,Object.assign({},this.props,{src:a,name:s,theme:i,type:D(a),rjvId:this.rjvId})),_().createElement(Er,{active:r,theme:i,rjvId:this.rjvId,defaultValue:u}))}}],[{key:`getDerivedStateFromProps`,value:function(e,n){if(e.src!==n.prevSrc||e.name!==n.prevName||e.theme!==n.prevTheme){var r={src:e.src,name:e.name,theme:e.theme,validationMessage:e.validationMessage,prevSrc:e.src,prevName:e.name,prevTheme:e.theme};return t.validateState(r)}return null}}])}(_().PureComponent);Or.defaultProps={src:{},name:`root`,theme:`rjv-default`,collapsed:!1,collapseStringsAfterLength:!1,shouldCollapse:!1,sortKeys:!1,quotesOnKeys:!0,groupArraysAfterLength:100,indentWidth:4,enableClipboard:!0,escapeStrings:!0,displayObjectSize:!0,displayDataTypes:!0,onEdit:!1,onDelete:!1,onAdd:!1,onSelect:!1,iconStyle:`triangle`,style:{},validationMessage:`Validation Error`,defaultValue:null,displayArrayKey:!0,selectOnFocus:!1,keyModifier:function(e){return e.metaKey||e.ctrlKey},bigNumber:null,showComma:!0},Or.validateState=function(e){var t={};return D(e.theme)!==`object`||function(e){var t=[`base00`,`base01`,`base02`,`base03`,`base04`,`base05`,`base06`,`base07`,`base08`,`base09`,`base0A`,`base0B`,`base0C`,`base0D`,`base0E`,`base0F`];if(D(e)===`object`){for(var n=0;n<t.length;n++)if(!(t[n]in e))return!1;return!0}return!1}(e.theme)||(console.error(`react-json-view error:`,`theme prop must be a theme name or valid base-16 theme object.`,`defaulting to "rjv-default" theme`),t.theme=`rjv-default`),D(e.src)!==`object`&&D(e.src)!==`array`&&(console.error(`react-json-view error:`,`src property must be a valid json object`),t.name=`ERROR`,t.src={message:`src property must be a valid json object`}),o(o({},e),t)},x(Or);let kr=Or})(),i})())}))(),1),G3=W3.default.default||W3.default,K3=b.createContext(void 0);function q3(e){let t=b.useContext(K3);if(e===!1&&t===void 0)throw Error(ZT(27));return t}var J3=function(e){return e.open=`data-open`,e.closed=`data-closed`,e[e.startingStyle=O4.startingStyle]=`startingStyle`,e[e.endingStyle=O4.endingStyle]=`endingStyle`,e.anchorHidden=`data-anchor-hidden`,e.side=`data-side`,e.align=`data-align`,e}({}),Y3=function(e){return e.popupOpen=`data-popup-open`,e.pressed=`data-pressed`,e}({}),X3={[Y3.popupOpen]:``},Z3={[Y3.popupOpen]:``,[Y3.pressed]:``},Q3={[J3.open]:``},$3={[J3.closed]:``},e6={[J3.anchorHidden]:``},t6={open(e){return e?X3:null}},n6={open(e){return e?Z3:null}},r6={open(e){return e?Q3:$3},anchorHidden(e){return e?e6:null}},i6={...r6,...j4},a6=b.forwardRef(function(e,t){let{render:n,className:r,forceRender:i=!1,...a}=e,{store:o}=q3(),s=o.useState(`open`),c=o.useState(`nested`),l=o.useState(`mounted`);return CE(`div`,e,{state:{open:s,transitionStatus:o.useState(`transitionStatus`)},ref:[o.context.backdropRef,t],stateAttributesMapping:i6,props:[{role:`presentation`,hidden:!l,style:{userSelect:`none`,WebkitUserSelect:`none`}},a],enabled:i||!c})}),o6=b.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,nativeButton:a=!0,...o}=e,{store:s}=q3(),c=s.useState(`open`);function l(e){c&&s.setOpen(!1,m0(s0,e.nativeEvent))}let{getButtonProps:u,buttonRef:d}=tE({disabled:i,native:a});return CE(`button`,e,{state:{disabled:i},ref:[t,d],props:[{onClick:l},o,u]})}),s6=0,c6=class e{static create(){return new e}currentId=s6;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=s6,t()},e)}isStarted(){return this.currentId!==s6}clear=()=>{this.currentId!==s6&&(clearTimeout(this.currentId),this.currentId=s6)};disposeEffect=()=>this.clear};function l6(){let e=zT(c6.create).current;return C4(e.disposeEffect),e}function u6(e,t){return t!=null&&!J0(t)?0:typeof e==`function`?e():e}function d6(e,t,n){let r=u6(e,n);return typeof r==`number`?r:r?.[t]}function f6(e){return typeof e==`function`?e():e}function p6(e,t){return t||e===`click`||e===`mousedown`}function m6(e){let t=zT(h6,e).current;return t.next=e,$(t.effect),t}function h6(e){let t={current:e,next:e,effect:()=>{t.current=t.next}};return t}var g6={clipPath:`inset(50%)`,overflow:`hidden`,whiteSpace:`nowrap`,border:0,padding:0,width:1,height:1,margin:-1},_6={...g6,position:`fixed`,top:0,left:0},v6={...g6,position:`absolute`},y6=b.forwardRef(function(e,t){let[n,r]=b.useState();$(()=>{x0&&r(`button`)},[]);let i={tabIndex:0,role:n};return(0,G.jsx)(`span`,{...e,ref:t,style:_6,"aria-hidden":n?void 0:!0,...i,"data-base-ui-focus-guard":``})});function b6(e){return`data-base-ui-${e}`}var x6=0;function S6(e,t={}){let{preventScroll:n=!1,cancelPrevious:r=!0,sync:i=!1}=t;r&&cancelAnimationFrame(x6);let a=()=>e?.focus({preventScroll:n});i?a():x6=requestAnimationFrame(a)}var C6={inert:new WeakMap,"aria-hidden":new WeakMap},w6=`data-base-ui-inert`,T6={inert:new WeakSet,"aria-hidden":new WeakSet},E6=new WeakMap,D6=0;function O6(e){return T6[e]}function k6(e){return e?wT(e)?e.host:k6(e.parentNode):null}var A6=(e,t)=>t.map(t=>{if(e.contains(t))return t;let n=k6(t);return e.contains(n)?n:null}).filter(e=>e!=null),j6=e=>{let t=new Set;return e.forEach(e=>{let n=e;for(;n&&!t.has(n);)t.add(n),n=n.parentNode}),t},M6=(e,t,n)=>{let r=[],i=e=>{!e||n.has(e)||Array.from(e.children).forEach(e=>{vT(e)!==`script`&&(t.has(e)?i(e):r.push(e))})};return i(e),r};function N6(e,t,n,r,{mark:i=!0,markerIgnoreElements:a=[]}){let o=r?`inert`:n?`aria-hidden`:null,s=null,c=null,l=A6(t,e),u=i?A6(t,a):[],d=new Set(u),f=i?M6(t,j6(l),new Set(l)).filter(e=>!d.has(e)):[],p=[],m=[];if(o){let e=C6[o],n=O6(o);c=n,s=e;let r=A6(t,Array.from(t.querySelectorAll(`[aria-live]`))),i=l.concat(r);M6(t,j6(i),new Set(i)).forEach(t=>{let r=t.getAttribute(o),i=r!==null&&r!==`false`,a=(e.get(t)||0)+1;e.set(t,a),p.push(t),a===1&&i&&n.add(t),i||t.setAttribute(o,o===`inert`?``:`true`)})}return i&&f.forEach(e=>{let t=(E6.get(e)||0)+1;E6.set(e,t),m.push(e),t===1&&e.setAttribute(w6,``)}),D6+=1,()=>{s&&p.forEach(e=>{let t=(s.get(e)||0)-1;s.set(e,t),t||(!c?.has(e)&&o&&e.removeAttribute(o),c?.delete(e))}),i&&m.forEach(e=>{let t=(E6.get(e)||0)-1;E6.set(e,t),t||e.removeAttribute(w6)}),--D6,D6||(C6.inert=new WeakMap,C6[`aria-hidden`]=new WeakMap,T6.inert=new WeakSet,T6[`aria-hidden`]=new WeakSet,E6=new WeakMap)}}function P6(e,t={}){let{ariaHidden:n=!1,inert:r=!1,mark:i=!0,markerIgnoreElements:a=[]}=t,o=W1(e[0]).body;return N6(e,o,n,r,{mark:i,markerIgnoreElements:a})}var F6=b.createContext(null),I6=()=>b.useContext(F6),L6=b6(`portal`);function R6(e={}){let{ref:t,container:n,componentProps:r=vE,elementProps:i}=e,a=J1(),o=I6()?.portalNode,[s,c]=b.useState(null),[l,u]=b.useState(null),d=VT(e=>{e!==null&&u(e)}),f=b.useRef(null);$(()=>{if(n===null){f.current&&(f.current=null,u(null),c(null));return}if(a==null)return;let e=(n&&(xT(n)?n:n.current))??o??document.body;if(e==null){f.current&&(f.current=null,u(null),c(null));return}f.current!==e&&(f.current=e,u(null),c(e))},[n,o,a]);let p=CE(`div`,r,{ref:[t,d],props:[{id:a,[L6]:``},i]});return{portalNode:l,portalSubtree:s&&p?Rq.createPortal(p,s):null}}var z6=b.forwardRef(function(e,t){let{children:n,container:r,className:i,render:a,renderGuards:o,...s}=e,{portalNode:c,portalSubtree:l}=R6({container:r,ref:t,componentProps:e,elementProps:s}),u=b.useRef(null),d=b.useRef(null),f=b.useRef(null),p=b.useRef(null),[m,h]=b.useState(null),g=m?.modal,_=m?.open,v=typeof o==`boolean`?o:!!m&&!m.modal&&m.open&&!!c;b.useEffect(()=>{if(!c||g)return;function e(e){c&&e.relatedTarget&&v4(e)&&(e.type===`focusin`?b4:y4)(c)}return c.addEventListener(`focusin`,e,!0),c.addEventListener(`focusout`,e,!0),()=>{c.removeEventListener(`focusin`,e,!0),c.removeEventListener(`focusout`,e,!0)}},[c,g]),b.useEffect(()=>{!c||_||b4(c)},[_,c]);let y=b.useMemo(()=>({beforeOutsideRef:u,afterOutsideRef:d,beforeInsideRef:f,afterInsideRef:p,portalNode:c,setFocusManagerState:h}),[c]);return(0,G.jsxs)(b.Fragment,{children:[l,(0,G.jsxs)(F6.Provider,{value:y,children:[v&&c&&(0,G.jsx)(y6,{"data-type":`outside`,ref:u,onFocus:e=>{v4(e,c)?f.current?.focus():m4(m?m.domReference:null)?.focus()}}),v&&c&&(0,G.jsx)(`span`,{"aria-owns":c.id,style:SE}),c&&Rq.createPortal(n,c),v&&c&&(0,G.jsx)(y6,{"data-type":`outside`,ref:d,onFocus:e=>{v4(e,c)?p.current?.focus():(p4(m?m.domReference:null)?.focus(),m?.closeOnFocusOut&&m?.onOpenChange(!1,m0(`focus-out`,e.nativeEvent)))}})]})]})});function B6(){let e=new Map;return{emit(t,n){e.get(t)?.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}var V6=class{nodesRef={current:[]};events=B6();addNode(e){this.nodesRef.current.push(e)}removeNode(e){let t=this.nodesRef.current.findIndex(t=>t===e);t!==-1&&this.nodesRef.current.splice(t,1)}},H6=b.createContext(null),U6=b.createContext(null),W6=()=>b.useContext(H6)?.id||null,G6=e=>{let t=b.useContext(U6);return e??t};function K6(e){let t=J1(),n=G6(e),r=W6();return $(()=>{if(!t)return;let e={id:t,parentId:r};return n?.addNode(e),()=>{n?.removeNode(e)}},[n,t,r]),t}function q6(e){let{children:t,id:n}=e,r=W6();return(0,G.jsx)(H6.Provider,{value:b.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function J6(e){let{children:t,externalTree:n}=e,r=zT(()=>n??new V6).current;return(0,G.jsx)(U6.Provider,{value:r,children:t})}function Y6(e,t){let n=yT(e.target);return e instanceof n.KeyboardEvent?`keyboard`:e instanceof n.FocusEvent?t||`keyboard`:`pointerType`in e?e.pointerType||`keyboard`:`touches`in e?`touch`:e instanceof n.MouseEvent?t||(e.detail===0?`keyboard`:`mouse`):``}var X6=20,Z6=[];function Q6(){Z6=Z6.filter(e=>e.deref()?.isConnected)}function $6(e){Q6(),e&&vT(e)!==`body`&&(Z6.push(new WeakRef(e)),Z6.length>X6&&(Z6=Z6.slice(-X6)))}function e8(){return Q6(),Z6[Z6.length-1]?.deref()}function t8(e){if(!e)return null;let t=d4();return u4(e,t)?e:c4(e,t)[0]||e}function n8(e){return!e||!e.isConnected?!1:typeof e.checkVisibility==`function`?e.checkVisibility():P2(e)}function r8(e,t){if(!t.current.includes(`floating`)&&!e.getAttribute(`role`)?.includes(`dialog`))return;let n=d4(),r=l4(e,n).filter(e=>{let t=e.getAttribute(`data-tabindex`)||``;return u4(e,n)||e.hasAttribute(`data-tabindex`)&&!t.startsWith(`-`)}),i=e.getAttribute(`tabindex`);t.current.includes(`floating`)||r.length===0?i!==`0`&&e.setAttribute(`tabindex`,`0`):(i!==`-1`||e.hasAttribute(`data-tabindex`)&&e.getAttribute(`data-tabindex`)!==`-1`)&&(e.setAttribute(`tabindex`,`-1`),e.setAttribute(`data-tabindex`,`-1`))}function i8(e){let{context:t,children:n,disabled:r=!1,initialFocus:i=!0,returnFocus:a=!0,restoreFocus:o=!1,modal:s=!0,closeOnFocusOut:c=!0,openInteractionType:l=``,nextFocusableElement:u,previousFocusableElement:d,beforeContentFocusGuardRef:f,externalTree:p,getInsideElements:m}=e,h=`rootStore`in t?t.rootStore:t,g=h.useState(`open`),_=h.useState(`domReferenceElement`),v=h.useState(`floatingElement`),{events:y,dataRef:x}=h.context,S=VT(()=>x.current.floatingContext?.nodeId),C=i===!1,w=B0(_)&&C,T=b.useRef([`content`]),E=m6(i),D=m6(a),O=m6(l),k=G6(p),A=I6(),j=b.useRef(!1),M=b.useRef(!1),N=b.useRef(!1),P=b.useRef(-1),F=b.useRef(``),I=b.useRef(``),L=b.useRef(null),R=b.useRef(null),z=iE(L,f,A?.beforeInsideRef),B=iE(R,A?.afterInsideRef),V=l6(),H=l6(),U=F4(),ee=A!=null,W=V0(v),te=VT((e=W)=>e?c4(e,d4()):[]),ne=VT(()=>m?.().filter(e=>e!=null)??[]),re=VT(e=>{let t=te(e);return T.current.map(()=>t).filter(Boolean).flat()});b.useEffect(()=>{if(r||!s)return;function e(e){e.key===`Tab`&&P0(W,N0(W1(W)))&&te().length===0&&!w&&W0(e)}let t=W1(W);return t.addEventListener(`keydown`,e),()=>{t.removeEventListener(`keydown`,e)}},[r,_,W,s,T,w,te,re]),b.useEffect(()=>{if(r||!g)return;let e=W1(W);function t(){N.current=!1}function n(e){let t=I0(e),n=ne();N.current=!(P0(v,t)||P0(_,t)||P0(A?.portalNode,t)||n.some(e=>e===t||P0(e,t))),I.current=e.pointerType||`keyboard`,t?.closest(`[data-base-ui-click-trigger]`)&&(M.current=!0)}function i(){I.current=`keyboard`}return e.addEventListener(`pointerdown`,n,!0),e.addEventListener(`pointerup`,t,!0),e.addEventListener(`pointercancel`,t,!0),e.addEventListener(`keydown`,i,!0),()=>{e.removeEventListener(`pointerdown`,n,!0),e.removeEventListener(`pointerup`,t,!0),e.removeEventListener(`pointercancel`,t,!0),e.removeEventListener(`keydown`,i,!0)}},[r,v,_,W,g,A,ne]),b.useEffect(()=>{if(r||!c)return;let e=W1(W);function t(){M.current=!0,H.start(0,()=>{M.current=!1})}function n(e){let t=I0(e),n=te().indexOf(t);n!==-1&&(P.current=n)}function i(t){let n=t.relatedTarget,r=t.currentTarget,i=I0(t);queueMicrotask(()=>{let a=S(),c=h.context.triggerElements,l=ne(),f=n?.hasAttribute(b6(`focus-guard`))&&[L.current,R.current,A?.beforeInsideRef.current,A?.afterInsideRef.current,A?.beforeOutsideRef.current,A?.afterOutsideRef.current,I4(d),I4(u)].includes(n),p=!(P0(_,n)||P0(v,n)||P0(n,v)||P0(A?.portalNode,n)||l.some(e=>e===n||P0(e,n))||n!=null&&c.hasElement(n)||c.hasMatchingElement(e=>P0(e,n))||f||k&&(H0(k.nodesRef.current,a).find(e=>P0(e.context?.elements.floating,n)||P0(e.context?.elements.domReference,n))||U0(k.nodesRef.current,a).find(e=>[e.context?.elements.floating,V0(e.context?.elements.floating)].includes(n)||e.context?.elements.domReference===n)));if(r===_&&W&&r8(W,T),o&&r!==_&&!n8(i)&&N0(e)===e.body){if(CT(W)&&(W.focus(),o===`popup`)){U.request(()=>{W.focus()});return}let e=P.current,t=te(),n=t[e]||t[t.length-1]||W;CT(n)&&n.focus()}if(x.current.insideReactTree){x.current.insideReactTree=!1;return}(w||!s)&&n&&p&&!M.current&&(w||n!==e8())&&(j.current=!0,h.setOpen(!1,m0(c0,t)))})}function a(){N.current||(x.current.insideReactTree=!0,V.start(0,()=>{x.current.insideReactTree=!1}))}let l=CT(_)?_:null,f=[];if(!(!v&&!l))return l&&(l.addEventListener(`focusout`,i),l.addEventListener(`pointerdown`,t),f.push(()=>{l.removeEventListener(`focusout`,i),l.removeEventListener(`pointerdown`,t)})),v&&(v.addEventListener(`focusin`,n),v.addEventListener(`focusout`,i),A&&(v.addEventListener(`focusout`,a,!0),f.push(()=>{v.removeEventListener(`focusout`,a,!0)})),f.push(()=>{v.removeEventListener(`focusin`,n),v.removeEventListener(`focusout`,i)})),()=>{f.forEach(e=>{e()})}},[r,_,v,W,s,k,A,h,c,o,te,w,S,T,x,V,H,U,u,d,ne]),b.useEffect(()=>{if(r||!v||!g)return;let e=Array.from(A?.portalNode?.querySelectorAll(`[${b6(`portal`)}]`)||[]),t=(k?U0(k.nodesRef.current,S()):[]).find(e=>B0(e.context?.elements.domReference||null))?.context?.elements.domReference,n=P6([...[v,...e,L.current,R.current,A?.beforeOutsideRef.current,A?.afterOutsideRef.current,...ne()],t,I4(d),I4(u),w?_:null].filter(e=>e!=null),{ariaHidden:s||w,mark:!1}),i=P6([v,...e].filter(e=>e!=null));return()=>{i(),n()}},[g,r,_,v,s,T,A,w,k,S,u,d,ne]),$(()=>{if(!g||r||!CT(W))return;let e=N0(W1(W));queueMicrotask(()=>{let t=re(W),n=E.current,r=typeof n==`function`?n(O.current||``):n;if(r===void 0||r===!1)return;let i;i=r===!0||r===null?t[0]||W:I4(r),i=i||t[0]||W,!P0(W,e)&&S6(i,{preventScroll:i===W})})},[r,g,W,C,re,E,O]),$(()=>{if(r||!W)return;let e=W1(W);$6(N0(e));function t(e){if(e.open||(F.current=Y6(e.nativeEvent,I.current)),e.reason===`trigger-hover`&&e.nativeEvent.type===`mouseleave`&&(j.current=!0),e.reason===`outside-press`)if(e.nested)j.current=!1;else if(K0(e.nativeEvent)||q0(e.nativeEvent))j.current=!1;else{let e=!1;document.createElement(`div`).focus({get preventScroll(){return e=!0,!1}}),e?j.current=!1:j.current=!0}}y.on(`openchange`,t);function n(){let e=D.current,t=typeof e==`function`?e(F.current):e;if(t===void 0||t===!1)return null;if(t===null&&(t=!0),typeof t==`boolean`){let e=_||e8();return e&&e.isConnected?e:null}let n=_||e8();return I4(t)||n||null}return()=>{y.off(`openchange`,t);let r=N0(e),i=ne(),a=P0(v,r)||i.some(e=>e===r||P0(e,r))||k&&H0(k.nodesRef.current,S(),!1).some(e=>P0(e.context?.elements.floating,r)),o=n();queueMicrotask(()=>{let t=t8(o),n=typeof D.current!=`boolean`;D.current&&!j.current&&CT(t)&&(!(!n&&t!==r&&r!==e.body)||a)&&t.focus({preventScroll:!0}),j.current=!1})}},[r,v,W,D,x,y,k,_,S,ne]),$(()=>{if(!y0||g||!v)return;let e=N0(W1(v));!CT(e)||!z0(e)||P0(v,e)&&e.blur()},[g,v]),$(()=>{if(!(r||!A))return A.setFocusManagerState({modal:s,closeOnFocusOut:c,open:g,onOpenChange:h.setOpen,domReference:_}),()=>{A.setFocusManagerState(null)}},[r,A,s,g,h,c,_]),$(()=>{if(!(r||!W))return r8(W,T),()=>{queueMicrotask(Q6)}},[r,W,T]);let ie=!r&&(s?!w:!0)&&(ee||s);return(0,G.jsxs)(b.Fragment,{children:[ie&&(0,G.jsx)(y6,{"data-type":`inside`,ref:z,onFocus:e=>{if(s){let e=re();S6(e[e.length-1])}else A?.portalNode&&(j.current=!1,v4(e,A.portalNode)?p4(_)?.focus():I4(d??A.beforeOutsideRef)?.focus())}}),n,ie&&(0,G.jsx)(y6,{"data-type":`inside`,ref:B,onFocus:e=>{s?S6(re()[0]):A?.portalNode&&(c&&(j.current=!0),v4(e,A.portalNode)?m4(_)?.focus():I4(u??A.afterOutsideRef)?.focus())}})]})}function a8(e,t={}){let n=`rootStore`in e?e.rootStore:e,r=n.context.dataRef,{enabled:i=!0,event:a=`click`,toggle:o=!0,ignoreMouse:s=!1,stickIfOpen:c=!0,touchOpenDelay:l=0,reason:u=r0}=t,d=b.useRef(void 0),f=F4(),p=l6(),m=b.useMemo(()=>({onPointerDown(e){d.current=e.pointerType},onMouseDown(e){let t=d.current,i=e.nativeEvent,m=n.select(`open`);if(e.button!==0||a===`click`||J0(t,!0)&&s)return;let h=r.current.openEvent,g=h?.type,_=n.select(`domReferenceElement`)!==e.currentTarget,v=m&&_||!(m&&o&&(!(h&&c)||g===`click`||g===`mousedown`));if(z0(i.target)){let e=m0(u,i,i.target);v&&t===`touch`&&l>0?p.start(l,()=>{n.setOpen(!0,e)}):n.setOpen(v,e);return}let y=e.currentTarget;f.request(()=>{let e=m0(u,i,y);v&&t===`touch`&&l>0?p.start(l,()=>{n.setOpen(!0,e)}):n.setOpen(v,e)})},onClick(e){if(a===`mousedown-only`)return;let t=d.current;if(a===`mousedown`&&t){d.current=void 0;return}if(J0(t,!0)&&s)return;let i=n.select(`open`),f=r.current.openEvent,m=n.select(`domReferenceElement`)!==e.currentTarget,h=i&&m||!(i&&o&&(!(f&&c)||Y0(f))),g=m0(u,e.nativeEvent,e.currentTarget);h&&t===`touch`&&l>0?p.start(l,()=>{n.setOpen(!0,g)}):n.setOpen(h,g)},onKeyDown(){d.current=void 0}}),[r,a,s,n,c,o,f,p,l,u]);return b.useMemo(()=>i?{reference:m}:vE,[i,m])}var o8={intentional:`onClick`,sloppy:`onPointerDown`};function s8(){return!1}function c8(e){return{escapeKey:typeof e==`boolean`?e:e?.escapeKey??!1,outsidePress:typeof e==`boolean`?e:e?.outsidePress??!0}}function l8(e,t={}){let n=`rootStore`in e?e.rootStore:e,r=n.useState(`open`),i=n.useState(`floatingElement`),{dataRef:a}=n.context,{enabled:o=!0,escapeKey:s=!0,outsidePress:c=!0,outsidePressEvent:l=`sloppy`,referencePress:u=s8,referencePressEvent:d=`sloppy`,bubbles:f,externalTree:p}=t,m=G6(p),h=VT(typeof c==`function`?c:()=>!1),g=typeof c==`function`?h:c,_=g!==!1,v=VT(()=>l),y=b.useRef(!1),x=b.useRef(!1),S=b.useRef(!1),{escapeKey:C,outsidePress:w}=c8(f),T=b.useRef(null),E=l6(),D=l6(),O=VT(()=>{D.clear(),a.current.insideReactTree=!1}),k=b.useRef(!1),A=b.useRef(``),j=VT(u),M=VT(e=>{if(!r||!o||!s||e.key!==`Escape`||k.current)return;let t=a.current.floatingContext?.nodeId,i=m?H0(m.nodesRef.current,t):[];if(!C&&i.length>0){let e=!0;if(i.forEach(t=>{t.context?.open&&!t.context.dataRef.current.__escapeKeyBubbles&&(e=!1)}),!e)return}let c=m0(l0,G0(e)?e.nativeEvent:e);n.setOpen(!1,c),!C&&!c.isPropagationAllowed&&e.stopPropagation()}),N=VT(()=>{a.current.insideReactTree=!0,D.start(0,O)});b.useEffect(()=>{if(!r||!o)return;a.current.__escapeKeyBubbles=C,a.current.__outsidePressBubbles=w;let e=new c6,t=new c6;function c(){e.clear(),k.current=!0}function l(){e.start(AT()?5:0,()=>{k.current=!1})}function u(){S.current=!0,t.start(0,()=>{S.current=!1})}function d(){y.current=!1,x.current=!1}function f(){let e=A.current,t=e===`pen`||!e?`mouse`:e,n=v(),r=typeof n==`function`?n():n;return typeof r==`string`?r:r[t]}function p(e){let t=f();return t===`intentional`&&e.type!==`click`||t===`sloppy`&&e.type===`click`}function h(e){let t=a.current.floatingContext?.nodeId,r=m&&H0(m.nodesRef.current,t).some(t=>L0(e,t.context?.elements.floating));return L0(e,n.select(`floatingElement`))||L0(e,n.select(`domReferenceElement`))||r}function b(e){if(p(e)){O();return}if(a.current.insideReactTree){O();return}let r=I0(e),i=`[${b6(`inert`)}]`,o=Array.from(W1(n.select(`floatingElement`)).querySelectorAll(i)),s=ST(r)?r.getRootNode():null;wT(s)&&(o=o.concat(Array.from(s.querySelectorAll(i))));let c=n.context.triggerElements;if(r&&(c.hasElement(r)||c.hasMatchingElement(e=>P0(e,r))))return;let l=ST(r)?r:null;for(;l&&!jT(l);){let e=PT(l);if(jT(e)||!ST(e))break;l=e}if(o.length&&ST(r)&&!R0(r)&&!P0(r,n.select(`floatingElement`))&&o.every(e=>!P0(l,e)))return;if(CT(r)&&!(`touches`in e)){let t=jT(r),n=MT(r),i=/auto|scroll/,a=t||i.test(n.overflowX),o=t||i.test(n.overflowY),s=a&&r.clientWidth>0&&r.scrollWidth>r.clientWidth,c=o&&r.clientHeight>0&&r.scrollHeight>r.clientHeight,l=n.direction===`rtl`,u=c&&(l?e.offsetX<=r.offsetWidth-r.clientWidth:e.offsetX>r.clientWidth),d=s&&e.offsetY>r.clientHeight;if(u||d)return}if(h(e))return;if(f()===`intentional`&&S.current){t.clear(),S.current=!1;return}if(typeof g==`function`&&!g(e))return;let u=a.current.floatingContext?.nodeId,d=m?H0(m.nodesRef.current,u):[];if(d.length>0){let e=!0;if(d.forEach(t=>{t.context?.open&&!t.context.dataRef.current.__outsidePressBubbles&&(e=!1)}),!e)return}n.setOpen(!1,m0(a0,e)),O()}function D(e){f()!==`sloppy`||e.pointerType===`touch`||!n.select(`open`)||!o||L0(e,n.select(`floatingElement`))||L0(e,n.select(`domReferenceElement`))||b(e)}function j(e){if(f()!==`sloppy`||!n.select(`open`)||!o||L0(e,n.select(`floatingElement`))||L0(e,n.select(`domReferenceElement`)))return;let t=e.touches[0];t&&(T.current={startTime:Date.now(),startX:t.clientX,startY:t.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},E.start(1e3,()=>{T.current&&(T.current.dismissOnTouchEnd=!1,T.current.dismissOnMouseDown=!1)}))}function N(e){A.current=`touch`;let t=I0(e);function n(){j(e),t?.removeEventListener(e.type,n)}t?.addEventListener(e.type,n)}function P(e){if(E.clear(),e.type===`pointerdown`&&(A.current=e.pointerType),e.type===`mousedown`&&T.current&&!T.current.dismissOnMouseDown)return;let t=I0(e);function n(){e.type===`pointerdown`?D(e):b(e),t?.removeEventListener(e.type,n)}t?.addEventListener(e.type,n)}function F(e){if(!y.current)return;let n=x.current;if(d(),f()===`intentional`){if(e.type===`pointercancel`){n&&u();return}if(!h(e)){if(n){u();return}typeof g==`function`&&!g(e)||(t.clear(),S.current=!0,O())}}}function I(e){if(f()!==`sloppy`||!T.current||L0(e,n.select(`floatingElement`))||L0(e,n.select(`domReferenceElement`)))return;let t=e.touches[0];if(!t)return;let r=Math.abs(t.clientX-T.current.startX),i=Math.abs(t.clientY-T.current.startY),a=Math.sqrt(r*r+i*i);a>5&&(T.current.dismissOnTouchEnd=!0),a>10&&(b(e),E.clear(),T.current=null)}function L(e){let t=I0(e);function n(){I(e),t?.removeEventListener(e.type,n)}t?.addEventListener(e.type,n)}function R(e){f()!==`sloppy`||!T.current||L0(e,n.select(`floatingElement`))||L0(e,n.select(`domReferenceElement`))||(T.current.dismissOnTouchEnd&&b(e),E.clear(),T.current=null)}function z(e){let t=I0(e);function n(){R(e),t?.removeEventListener(e.type,n)}t?.addEventListener(e.type,n)}let B=W1(i);return s&&(B.addEventListener(`keydown`,M),B.addEventListener(`compositionstart`,c),B.addEventListener(`compositionend`,l)),_&&(B.addEventListener(`click`,P,!0),B.addEventListener(`pointerdown`,P,!0),B.addEventListener(`pointerup`,F,!0),B.addEventListener(`pointercancel`,F,!0),B.addEventListener(`mousedown`,P,!0),B.addEventListener(`mouseup`,F,!0),B.addEventListener(`touchstart`,N,!0),B.addEventListener(`touchmove`,L,!0),B.addEventListener(`touchend`,z,!0)),()=>{s&&(B.removeEventListener(`keydown`,M),B.removeEventListener(`compositionstart`,c),B.removeEventListener(`compositionend`,l)),_&&(B.removeEventListener(`click`,P,!0),B.removeEventListener(`pointerdown`,P,!0),B.removeEventListener(`pointerup`,F,!0),B.removeEventListener(`pointercancel`,F,!0),B.removeEventListener(`mousedown`,P,!0),B.removeEventListener(`mouseup`,F,!0),B.removeEventListener(`touchstart`,N,!0),B.removeEventListener(`touchmove`,L,!0),B.removeEventListener(`touchend`,z,!0)),e.clear(),t.clear(),d(),S.current=!1}},[a,i,s,_,g,r,o,C,w,M,O,v,m,n,E]),b.useEffect(O,[g,O]);let P=b.useMemo(()=>({onKeyDown:M,[o8[d]]:e=>{j()&&n.setOpen(!1,m0(r0,e.nativeEvent))},...d!==`intentional`&&{onClick(e){j()&&n.setOpen(!1,m0(`trigger-press`,e.nativeEvent))}}}),[M,n,d,j]),F=VT(e=>{if(!r||!o||e.button!==0)return;let t=I0(e.nativeEvent);P0(n.select(`floatingElement`),t)&&(y.current||(y.current=!0,x.current=!1))}),I=VT(e=>{!r||!o||(e.defaultPrevented||e.nativeEvent.defaultPrevented)&&y.current&&(x.current=!0)}),L=b.useMemo(()=>({onKeyDown:M,onPointerDown:I,onMouseDown:I,onClickCapture:N,onMouseDownCapture(e){N(),F(e)},onPointerDownCapture(e){N(),F(e)},onMouseUpCapture:N,onTouchEndCapture:N,onTouchMoveCapture:N}),[M,N,F,I]);return b.useMemo(()=>o?{reference:P,floating:L,trigger:P}:{},[o,P,L])}function u8(e,t,n){let{reference:r,floating:i}=e,a=l2(t),o=u2(t),s=c2(o),c=a2(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(o2(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 d8(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}=i2(t,e),p=S2(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=C2(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=C2(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 f8=50,p8=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:d8},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=u8(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<f8&&(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}=u8(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},m8=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}=i2(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=a2(r),_=l2(o),v=a2(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[b2(o)]:f2(o)),x=p!==`none`;!d&&x&&b.push(...y2(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=d2(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`&&_!==l2(t))||T.every(e=>l2(e.placement)===_?e.overflows[0]>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=l2(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 h8(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function g8(e){return X0.some(t=>e[t]>=0)}var _8=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=i2(e,t);switch(i){case`referenceHidden`:{let e=h8(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:g8(e)}}}case`escaped`:{let e=h8(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:g8(e)}}}default:return{}}}}},v8=new Set([`left`,`top`]);async function y8(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=a2(n),s=o2(n),c=l2(n)===`y`,l=v8.has(o)?-1:1,u=a&&c?-1:1,d=i2(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 b8=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 y8(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}}}}},x8=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}=i2(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=l2(a2(i)),p=s2(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=r2(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=r2(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}}}}}},S8=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}=i2(e,t),u={x:n,y:r},d=l2(i),f=s2(d),p=u[f],m=u[d],h=i2(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=v8.has(a2(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}}}},C8=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}=i2(e,t),u=await o.detectOverflow(t,l),d=a2(i),f=o2(i),p=l2(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=Z0(h-u[g],v),x=Z0(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=Q0(u.left,0),t=Q0(u.right,0),n=Q0(u.top,0),r=Q0(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:Q0(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:Q0(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 w8(e){let t=MT(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=CT(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=$0(n)!==a||$0(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function T8(e){return ST(e)?e:e.contextElement}function E8(e){let t=T8(e);if(!CT(t))return t2(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=w8(t),o=(a?$0(n.width):n.width)/r,s=(a?$0(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var D8=t2(0);function O8(e){let t=yT(e);return!AT()||!t.visualViewport?D8:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function k8(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==yT(e)?!1:t}function A8(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=T8(e),o=t2(1);t&&(r?ST(r)&&(o=E8(r)):o=E8(e));let s=k8(a,n,r)?O8(a):t2(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=yT(a),t=r&&ST(r)?yT(r):r,n=e,i=LT(n);for(;i&&r&&t!==n;){let e=E8(i),t=i.getBoundingClientRect(),r=MT(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=yT(i),i=LT(n)}}return C2({width:u,height:d,x:c,y:l})}function j8(e,t){let n=NT(e).scrollLeft;return t?t.left+n:A8(bT(e)).left+n}function M8(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-j8(e,n),y:n.top+t.scrollTop}}function N8(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=bT(r),s=t?ET(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=t2(1),u=t2(0),d=CT(r);if((d||!d&&!a)&&((vT(r)!==`body`||TT(o))&&(c=NT(r)),d)){let e=A8(r);l=E8(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?M8(o,c):t2(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 P8(e){return Array.from(e.getClientRects())}function F8(e){let t=bT(e),n=NT(e),r=e.ownerDocument.body,i=Q0(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Q0(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+j8(e),s=-n.scrollTop;return MT(r).direction===`rtl`&&(o+=Q0(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var I8=25;function L8(e,t){let n=yT(e),r=bT(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=AT();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=j8(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<=I8&&(a-=o)}else l<=I8&&(a+=l);return{width:a,height:o,x:s,y:c}}function R8(e,t){let n=A8(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=CT(e)?E8(e):t2(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function z8(e,t,n){let r;if(t===`viewport`)r=L8(e,n);else if(t===`document`)r=F8(bT(e));else if(ST(t))r=R8(t,n);else{let n=O8(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return C2(r)}function B8(e,t){let n=PT(e);return n===t||!ST(n)||jT(n)?!1:MT(n).position===`fixed`||B8(n,t)}function V8(e,t){let n=t.get(e);if(n)return n;let r=IT(e,[],!1).filter(e=>ST(e)&&vT(e)!==`body`),i=null,a=MT(e).position===`fixed`,o=a?PT(e):e;for(;ST(o)&&!jT(o);){let t=MT(o),n=kT(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||TT(o)&&!n&&B8(e,o))?r=r.filter(e=>e!==o):i=t,o=PT(o)}return t.set(e,r),r}function H8(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?ET(t)?[]:V8(t,this._c):[].concat(n),r],o=z8(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=z8(t,a[e],i);s=Q0(n.top,s),c=Z0(n.right,c),l=Z0(n.bottom,l),u=Q0(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function U8(e){let{width:t,height:n}=w8(e);return{width:t,height:n}}function W8(e,t,n){let r=CT(t),i=bT(t),a=n===`fixed`,o=A8(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=t2(0);function l(){c.x=j8(i)}if(r||!r&&!a)if((vT(t)!==`body`||TT(i))&&(s=NT(t)),r){let e=A8(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?M8(i,s):t2(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 G8(e){return MT(e).position===`static`}function K8(e,t){if(!CT(e)||MT(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return bT(e)===n&&(n=n.ownerDocument.body),n}function q8(e,t){let n=yT(e);if(ET(e))return n;if(!CT(e)){let t=PT(e);for(;t&&!jT(t);){if(ST(t)&&!G8(t))return t;t=PT(t)}return n}let r=K8(e,t);for(;r&&bte(r)&&G8(r);)r=K8(r,t);return r&&jT(r)&&G8(r)&&!kT(r)?n:r||Cte(e)||n}var J8=async function(e){let t=this.getOffsetParent||q8,n=this.getDimensions,r=await n(e.floating);return{reference:W8(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Y8(e){return MT(e).direction===`rtl`}var X8={convertOffsetParentRelativeRectToViewportRelativeRect:N8,getDocumentElement:bT,getClippingRect:H8,getOffsetParent:q8,getElementRects:J8,getClientRects:P8,getDimensions:U8,getScale:E8,isElement:ST,isRTL:Y8};function Z8(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Q8(e,t){let n=null,r,i=bT(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=e2(d),h=e2(i.clientWidth-(u+f)),g=e2(i.clientHeight-(d+p)),_=e2(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:Q0(0,Z0(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&&!Z8(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 $8(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=T8(e),u=i||a?[...l?IT(l):[],...t?IT(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?Q8(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?A8(e):null;c&&g();function g(){let t=A8(e);h&&!Z8(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 e5=b8,t5=x8,n5=m8,r5=C8,i5=_8,a5=S8,o5=(e,t,n)=>{let r=new Map,i={platform:X8,...n},a={...i.platform,_c:r};return p8(e,t,{...i,platform:a})},s5=typeof document<`u`?b.useLayoutEffect:function(){};function c5(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(!c5(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)&&!c5(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function l5(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function u5(e,t){let n=l5(e);return Math.round(t*n)/n}function d5(e){let t=b.useRef(e);return s5(()=>{t.current=e}),t}function Xne(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);c5(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=d5(c),O=d5(i),k=d5(l),A=b.useCallback(()=>{if(!C.current||!w.current)return;let e={placement:t,strategy:n,middleware:f};O.current&&(e.platform=O.current),o5(C.current,w.current,e).then(e=>{let t={...e,isPositioned:k.current!==!1};j.current&&!c5(T.current,t)&&(T.current=t,Rq.flushSync(()=>{d(t)}))})},[f,t,n,O,k]);s5(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let j=b.useRef(!1);s5(()=>(j.current=!0,()=>{j.current=!1}),[]),s5(()=>{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=u5(N.floating,u.x),r=u5(N.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...l5(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 Zne=(e,t)=>{let n=e5(e);return{name:n.name,fn:n.fn,options:[e,t]}},Qne=(e,t)=>{let n=t5(e);return{name:n.name,fn:n.fn,options:[e,t]}},$ne=(e,t)=>({fn:a5(e).fn,options:[e,t]}),ere=(e,t)=>{let n=n5(e);return{name:n.name,fn:n.fn,options:[e,t]}},tre=(e,t)=>{let n=r5(e);return{name:n.name,fn:n.fn,options:[e,t]}},nre=(e,t)=>{let n=i5(e);return{name:n.name,fn:n.fn,options:[e,t]}},f5=Symbol(`NOT_FOUND`);function rre(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!=`function`)throw TypeError(t)}function ire(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!=`object`)throw TypeError(t)}function are(e,t=`expected all items to be functions, instead received the following types: `){if(!e.every(e=>typeof e==`function`)){let n=e.map(e=>typeof e==`function`?`function ${e.name||`unnamed`}()`:typeof e).join(`, `);throw TypeError(`${t}[${n}]`)}}var p5=e=>Array.isArray(e)?e:[e];function ore(e){let t=Array.isArray(e[0])?e[0]:e;return are(t,`createSelector expects all input-selectors to be functions, but received the following types: `),t}function sre(e,t){let n=[],{length:r}=e;for(let i=0;i<r;i++)n.push(e[i].apply(null,t));return n}function cre(e){let t;return{get(n){return t&&e(t.key,n)?t.value:f5},put(e,n){t={key:e,value:n}},getEntries(){return t?[t]:[]},clear(){t=void 0}}}function lre(e,t){let n=[];function r(e){let r=n.findIndex(n=>t(e,n.key));if(r>-1){let e=n[r];return r>0&&(n.splice(r,1),n.unshift(e)),e.value}return f5}function i(t,i){r(t)===f5&&(n.unshift({key:t,value:i}),n.length>e&&n.pop())}function a(){return n}function o(){n=[]}return{get:r,put:i,getEntries:a,clear:o}}var ure=(e,t)=>e===t;function dre(e){return function(t,n){if(t===null||n===null||t.length!==n.length)return!1;let{length:r}=t;for(let i=0;i<r;i++)if(!e(t[i],n[i]))return!1;return!0}}function fre(e,t){let{equalityCheck:n=ure,maxSize:r=1,resultEqualityCheck:i}=typeof t==`object`?t:{equalityCheck:t},a=dre(n),o=0,s=r<=1?cre(a):lre(r,a);function c(){let t=s.get(arguments);if(t===f5){if(t=e.apply(null,arguments),o++,i){let e=s.getEntries().find(e=>i(e.value,t));e&&(t=e.value,o!==0&&o--)}s.put(arguments,t)}return t}return c.clearCache=()=>{s.clear(),c.resetResultsCount()},c.resultsCount=()=>o,c.resetResultsCount=()=>{o=0},c}var pre=class{constructor(e){this.value=e}deref(){return this.value}},mre=typeof WeakRef<`u`?WeakRef:pre,hre=0,m5=1;function h5(){return{s:hre,v:void 0,o:null,p:null}}function g5(e,t={}){let n=h5(),{resultEqualityCheck:r}=t,i,a=0;function o(){let t=n,{length:o}=arguments;for(let e=0,n=o;e<n;e++){let n=arguments[e];if(typeof n==`function`||typeof n==`object`&&n){let e=t.o;e===null&&(t.o=e=new WeakMap);let r=e.get(n);r===void 0?(t=h5(),e.set(n,t)):t=r}else{let e=t.p;e===null&&(t.p=e=new Map);let r=e.get(n);r===void 0?(t=h5(),e.set(n,t)):t=r}}let s=t,c;if(t.s===m5)c=t.v;else if(c=e.apply(null,arguments),a++,r){let e=i?.deref?.()??i;e!=null&&r(e,c)&&(c=e,a!==0&&a--),i=typeof c==`object`&&c||typeof c==`function`?new mre(c):c}return s.s=m5,s.v=c,c}return o.clearCache=()=>{n=h5(),o.resetResultsCount()},o.resultsCount=()=>a,o.resetResultsCount=()=>{a=0},o}function _5(e,...t){let n=typeof e==`function`?{memoize:e,memoizeOptions:t}:e,r=(...e)=>{let t=0,r=0,i,a={},o=e.pop();typeof o==`object`&&(a=o,o=e.pop()),rre(o,`createSelector expects an output function after the inputs, but received: [${typeof o}]`);let{memoize:s,memoizeOptions:c=[],argsMemoize:l=g5,argsMemoizeOptions:u=[],devModeChecks:d={}}={...n,...a},f=p5(c),p=p5(u),m=ore(e),h=s(function(){return t++,o.apply(null,arguments)},...f),g=l(function(){r++;let e=sre(m,arguments);return i=h.apply(null,e),i},...p);return Object.assign(g,{resultFunc:o,memoizedResultFunc:h,dependencies:m,dependencyRecomputations:()=>r,resetDependencyRecomputations:()=>{r=0},lastResult:()=>i,recomputations:()=>t,resetRecomputations:()=>{t=0},memoize:s,argsMemoize:l})};return Object.assign(r,{withTypes:()=>r}),r}var gre=_5(g5),_re=Object.assign((e,t=gre)=>{ire(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);let n=Object.keys(e);return t(n.map(t=>e[t]),(...e)=>e.reduce((e,t,r)=>(e[n[r]]=t,e),{}))},{withTypes:()=>_re});_5({memoize:fre,memoizeOptions:{maxSize:1,equalityCheck:Object.is}});var v5=(e,t,n,r,i,a,...o)=>{if(o.length>0)throw Error(ZT(1));let s;if(e&&t&&n&&r&&i&&a)s=(o,s,c,l)=>a(e(o,s,c,l),t(o,s,c,l),n(o,s,c,l),r(o,s,c,l),i(o,s,c,l),s,c,l);else if(e&&t&&n&&r&&i)s=(a,o,s,c)=>i(e(a,o,s,c),t(a,o,s,c),n(a,o,s,c),r(a,o,s,c),o,s,c);else if(e&&t&&n&&r)s=(i,a,o,s)=>r(e(i,a,o,s),t(i,a,o,s),n(i,a,o,s),a,o,s);else if(e&&t&&n)s=(r,i,a,o)=>n(e(r,i,a,o),t(r,i,a,o),i,a,o);else if(e&&t)s=(n,r,i,a)=>t(e(n,r,i,a),r,i,a);else if(e)s=e;else throw Error(`Missing arguments`);return s},vre=s((e=>{var t=p();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function u(e,t){return t()}var d=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?u:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?d:t.useSyncExternalStore})),y5=s(((e,t)=>{t.exports=vre()})),yre=s((e=>{var t=p(),n=y5();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useSyncExternalStore,o=t.useRef,s=t.useEffect,c=t.useMemo,l=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=o(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=c(function(){function e(e){if(!a){if(a=!0,o=e,e=r(e),u!==void 0&&f.hasValue){var t=f.value;if(u(t,e))return s=t}return s=e}if(t=s,i(o,e))return t;var n=r(e);return u!==void 0&&u(t,n)?(o=e,t):(o=e,s=n)}var a=!1,o,s,c=n===void 0?null:n;return[function(){return e(t())},c===null?void 0:function(){return e(c())}]},[t,n,r,u]);var p=a(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),l(p),p}})),bre=s(((e,t)=>{t.exports=yre()})),xre=[],Sre=void 0;function Cre(){return Sre}function wre(e){xre.push(e)}var b5=y5(),Tre=bre(),Ere=dE(19)?Ore:kre;function x5(e,t,n,r,i){return Ere(e,t,n,r,i)}function Dre(e,t,n,r,i){let a=b.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return(0,b5.useSyncExternalStore)(e.subscribe,a,a)}wre({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n<e.syncHooks.length;n+=1){let r=e.syncHooks[n],i=r.selector(r.store.state,r.a1,r.a2,r.a3);(r.didChange||!Object.is(r.value,i))&&(t=!0,r.value=i,r.didChange=!1)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{let n=new Set;for(let t of e.syncHooks)n.add(t.store);let r=[];for(let e of n)r.push(e.subscribe(t));return()=>{for(let e of r)e()}}),(0,b5.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}});function Ore(e,t,n,r,i){let a=Cre();if(!a)return Dre(e,t,n,r,i);let o=a.syncIndex;a.syncIndex+=1;let s;return a.didInitialize?(s=a.syncHooks[o],(s.store!==e||s.selector!==t||!Object.is(s.a1,n)||!Object.is(s.a2,r)||!Object.is(s.a3,i))&&(s.store!==e&&(a.didChangeStore=!0),s.store=e,s.selector=t,s.a1=n,s.a2=r,s.a3=i,s.didChange=!0)):(s={store:e,selector:t,a1:n,a2:r,a3:i,value:t(e.getSnapshot(),n,r,i),didChange:!1},a.syncHooks.push(s)),s.value}function kre(e,t,n,r,i){return(0,Tre.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,e=>t(e,n,r,i))}var S5=class{constructor(e){this.state=e,this.listeners=new Set,this.updateTick=0}subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.state;setState(e){if(this.state===e)return;this.state=e,this.updateTick+=1;let t=this.updateTick;for(let n of this.listeners){if(t!==this.updateTick)return;n(e)}}update(e){for(let t in e)if(!Object.is(this.state[t],e[t])){this.setState({...this.state,...e});return}}set(e,t){Object.is(this.state[e],t)||this.setState({...this.state,[e]:t})}notifyAll(){let e={...this.state};this.setState(e)}use(e,t,n,r){return x5(this,e,t,n,r)}},C5=class extends S5{constructor(e,t={},n){super(e),this.context=t,this.selectors=n}useSyncedValue(e,t){b.useDebugValue(e),$(()=>{this.state[e]!==t&&this.set(e,t)},[e,t])}useSyncedValueWithCleanup(e,t){let n=this;$(()=>(n.state[e]!==t&&n.set(e,t),()=>{n.set(e,void 0)}),[n,e,t])}useSyncedValues(e){let t=this;$(()=>{t.update(e)},[t,...Object.values(e)])}useControlledProp(e,t){b.useDebugValue(e);let n=t!==void 0;$(()=>{n&&!Object.is(this.state[e],t)&&super.setState({...this.state,[e]:t})},[e,t,n])}select(e,t,n,r){let i=this.selectors[e];return i(this.state,t,n,r)}useState(e,t,n,r){return b.useDebugValue(e),x5(this,this.selectors[e],t,n,r)}useContextCallback(e,t){b.useDebugValue(e);let n=VT(t??gE);this.context[e]=n}useStateSetter(e){let t=b.useRef(void 0);return t.current===void 0&&(t.current=t=>{this.set(e,t)}),t.current}observe(e,t){let n;n=typeof e==`function`?e:this.selectors[e];let r=n(this.state);return t(r,r,this),this.subscribe(e=>{let i=n(e);if(!Object.is(r,i)){let e=r;r=i,t(i,e,this)}})}},Are={open:v5(e=>e.open),domReferenceElement:v5(e=>e.domReferenceElement),referenceElement:v5(e=>e.positionReference??e.referenceElement),floatingElement:v5(e=>e.floatingElement),floatingId:v5(e=>e.floatingId)},w5=class extends C5{constructor(e){let{nested:t,noEmit:n,onOpenChange:r,triggerElements:i,...a}=e;super({...a,positionReference:a.referenceElement,domReferenceElement:a.referenceElement},{onOpenChange:r,dataRef:{current:{}},events:B6(),nested:t,noEmit:n,triggerElements:i},Are)}setOpen=(e,t)=>{if((!e||!this.state.open||Y0(t.event))&&(this.context.dataRef.current.openEvent=e?t.event:void 0),!this.context.noEmit){let n={open:e,reason:t.reason,nativeEvent:t.event,nested:this.context.nested,triggerElement:t.trigger};this.context.events.emit(`openchange`,n)}this.context.onOpenChange?.(e,t)}};function jre(e,t){let n=b.useRef(null),r=b.useRef(null);return b.useCallback(i=>{if(e!==void 0){if(n.current!==null){let e=n.current,i=r.current,a=t.context.triggerElements.getById(e);i&&a===i&&t.context.triggerElements.delete(e),n.current=null,r.current=null}i!==null&&(n.current=e,r.current=i,t.context.triggerElements.add(e,i))}},[t,e])}function Mre(e,t,n,r){let i=n.useState(`isMountedByTrigger`,e),a=jre(e,n),o=VT(t=>{if(a(t),!t||!n.select(`open`))return;let i=n.select(`activeTriggerId`);if(i===e){n.update({activeTriggerElement:t,...r});return}i??n.update({activeTriggerId:e,activeTriggerElement:t,...r})});return $(()=>{i&&n.update({activeTriggerElement:t.current,...r})},[i,n,t,...Object.values(r)]),{registerTrigger:o,isMountedByThisTrigger:i}}function T5(e){let t=e.useState(`open`);$(()=>{if(t&&!e.select(`activeTriggerId`)&&e.context.triggerElements.size===1){let t=e.context.triggerElements.entries().next();if(!t.done){let[n,r]=t.value;e.update({activeTriggerId:n,activeTriggerElement:r})}}},[t,e])}function E5(e,t,n){let{mounted:r,setMounted:i,transitionStatus:a}=z4(e);t.useSyncedValues({mounted:r,transitionStatus:a});let o=VT(()=>{i(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)});return R4({enabled:!t.useState(`preventUnmountingOnClose`),open:e,ref:t.context.popupRef,onComplete(){e||o()}}),{forceUnmount:o,transitionStatus:a}}var D5=class{constructor(){this.elementsSet=new Set,this.idMap=new Map}add(e,t){let n=this.idMap.get(e);n!==t&&(n!==void 0&&this.elementsSet.delete(n),this.elementsSet.add(t),this.idMap.set(e,t))}delete(e){let t=this.idMap.get(e);t&&(this.elementsSet.delete(t),this.idMap.delete(e))}hasElement(e){return this.elementsSet.has(e)}hasMatchingElement(e){for(let t of this.elementsSet)if(e(t))return!0;return!1}getById(e){return this.idMap.get(e)}entries(){return this.idMap.entries()}elements(){return this.elementsSet.values()}get size(){return this.idMap.size}};function Nre(){return new w5({open:!1,floatingElement:null,referenceElement:null,triggerElements:new D5,floatingId:``,nested:!1,noEmit:!1,onOpenChange:void 0})}function O5(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:`idle`,floatingRootContext:Nre(),preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:vE,inactiveTriggerProps:vE,popupProps:vE}}var k5=v5(e=>e.triggerIdProp??e.activeTriggerId),A5={open:v5(e=>e.openProp??e.open),mounted:v5(e=>e.mounted),transitionStatus:v5(e=>e.transitionStatus),floatingRootContext:v5(e=>e.floatingRootContext),preventUnmountingOnClose:v5(e=>e.preventUnmountingOnClose),payload:v5(e=>e.payload),activeTriggerId:k5,activeTriggerElement:v5(e=>e.mounted?e.activeTriggerElement:null),isTriggerActive:v5((e,t)=>t!==void 0&&k5(e)===t),isOpenedByTrigger:v5((e,t)=>t!==void 0&&k5(e)===t&&e.open),isMountedByTrigger:v5((e,t)=>t!==void 0&&k5(e)===t&&e.mounted),triggerProps:v5((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),popupProps:v5(e=>e.popupProps),popupElement:v5(e=>e.popupElement),positionerElement:v5(e=>e.positionerElement)};function j5(e){let{open:t=!1,onOpenChange:n,elements:r={}}=e,i=J1(),a=W6()!=null,o=zT(()=>new w5({open:t,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new D5,floatingId:i,nested:a,noEmit:!1})).current;return $(()=>{let e={open:t,floatingId:i};r.reference!==void 0&&(e.referenceElement=r.reference,e.domReferenceElement=ST(r.reference)?r.reference:null),r.floating!==void 0&&(e.floatingElement=r.floating),o.update(e)},[t,i,r.reference,r.floating,o]),o.context.onOpenChange=n,o.context.nested=a,o.context.noEmit=!1,o}function Pre(e={}){let{nodeId:t,externalTree:n}=e,r=j5(e),i=e.rootContext||r,a={reference:i.useState(`referenceElement`),floating:i.useState(`floatingElement`),domReference:i.useState(`domReferenceElement`)},[o,s]=b.useState(null),c=b.useRef(null),l=G6(n);$(()=>{a.domReference&&(c.current=a.domReference)},[a.domReference]);let u=Xne({...e,elements:{...a,...o&&{reference:o}}}),d=b.useCallback(e=>{let t=ST(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;s(t),u.refs.setReference(t)},[u.refs]),[f,p]=b.useState(null),[m,h]=b.useState(null);i.useSyncedValue(`referenceElement`,f),i.useSyncedValue(`domReferenceElement`,ST(f)?f:null),i.useSyncedValue(`floatingElement`,m);let g=b.useCallback(e=>{(ST(e)||e===null)&&(c.current=e,p(e)),(ST(u.refs.reference.current)||u.refs.reference.current===null||e!==null&&!ST(e))&&u.refs.setReference(e)},[u.refs,p]),_=b.useCallback(e=>{h(e),u.refs.setFloating(e)},[u.refs]),v=b.useMemo(()=>({...u.refs,setReference:g,setFloating:_,setPositionReference:d,domReference:c}),[u.refs,g,_,d]),y=b.useMemo(()=>({...u.elements,domReference:a.domReference}),[u.elements,a.domReference]),x=i.useState(`open`),S=i.useState(`floatingId`),C=b.useMemo(()=>({...u,dataRef:i.context.dataRef,open:x,onOpenChange:i.setOpen,events:i.context.events,floatingId:S,refs:v,elements:y,nodeId:t,rootStore:i}),[u,v,y,t,i,x,S]);return $(()=>{i.context.dataRef.current.floatingContext=C;let e=l?.nodesRef.current.find(e=>e.id===t);e&&(e.context=C)}),b.useMemo(()=>({...u,context:C,refs:v,elements:y,rootStore:i}),[u,v,y,C,i])}function M5(e){let{popupStore:t,noEmit:n=!1,treatPopupAsFloatingElement:r=!1,onOpenChange:i}=e,a=J1(),o=W6()!=null,s=t.useState(`open`),c=t.useState(`activeTriggerElement`),l=t.useState(r?`popupElement`:`positionerElement`),u=t.context.triggerElements,d=zT(()=>new w5({open:s,referenceElement:c,floatingElement:l,triggerElements:u,onOpenChange:i,floatingId:a,nested:o,noEmit:n})).current;return $(()=>{let e={open:s,floatingId:a,referenceElement:c,floatingElement:l};ST(c)&&(e.domReferenceElement=c),d.state.positionReference===d.state.referenceElement&&(e.positionReference=c),d.update(e)},[s,a,c,l,d]),d.context.onOpenChange=i,d.context.nested=o,d.context.noEmit=n,d}var Fre=`button,a,[role="button"],select,[tabindex]:not([tabindex="-1"]),${O0}`;function Ire(e){return e?!!e.closest(Fre):!1}var Lre=class e{constructor(){this.pointerType=void 0,this.interactedInside=!1,this.handler=void 0,this.blockMouseMove=!0,this.performedPointerEventsMutation=!1,this.pointerEventsScopeElement=null,this.pointerEventsReferenceElement=null,this.pointerEventsFloatingElement=null,this.restTimeoutPending=!1,this.openChangeTimeout=new c6,this.restTimeout=new c6,this.handleCloseOptions=void 0}static create(){return new e}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose};function N5(e){e.performedPointerEventsMutation&&(e.pointerEventsScopeElement?.style.removeProperty(`pointer-events`),e.pointerEventsReferenceElement?.style.removeProperty(`pointer-events`),e.pointerEventsFloatingElement?.style.removeProperty(`pointer-events`),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null)}function Rre(e,t){let{scopeElement:n,referenceElement:r,floatingElement:i}=t;N5(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=n,e.pointerEventsReferenceElement=r,e.pointerEventsFloatingElement=i,n.style.pointerEvents=`none`,r.style.pointerEvents=`auto`,i.style.pointerEvents=`auto`}function P5(e){let t=zT(Lre.create).current,n=e.context.dataRef.current;return n.hoverInteractionState||=t,C4(n.hoverInteractionState.disposeEffect),n.hoverInteractionState}function zre(e,t={}){let n=`rootStore`in e?e.rootStore:e,r=n.useState(`open`),i=n.useState(`floatingElement`),a=n.useState(`domReferenceElement`),{dataRef:o}=n.context,{enabled:s=!0,closeDelay:c=0}=t,l=P5(n),u=G6(),d=W6(),f=VT(()=>p6(o.current.openEvent?.type,l.interactedInside)),p=VT(()=>{let e=o.current.openEvent?.type;return e?.includes(`mouse`)&&e!==`mousedown`}),m=VT(e=>F0(e,n.context.triggerElements)),h=b.useCallback(e=>{let t=d6(c,`close`,l.pointerType),r=()=>{n.setOpen(!1,m0(i0,e)),u?.events.emit(`floating.closed`,e)};t?l.openChangeTimeout.start(t,r):(l.openChangeTimeout.clear(),r())},[c,n,l,u]),g=VT(()=>{N5(l)}),_=VT(e=>{let t=I0(e);if(!Ire(t)){l.interactedInside=!1;return}l.interactedInside=t?.closest(`[aria-haspopup]`)!=null});$(()=>{r||(l.pointerType=void 0,l.restTimeoutPending=!1,l.interactedInside=!1,g())},[r,l,g]),b.useEffect(()=>g,[g]),$(()=>{if(s&&r&&l.handleCloseOptions?.blockPointerEvents&&p()&&ST(a)&&i){let e=a,t=i,n=W1(i),r=u?.nodesRef.current.find(e=>e.id===d)?.context?.elements.floating;return r&&(r.style.pointerEvents=``),Rre(l,{scopeElement:l.handleCloseOptions?.getScope?.()??l.pointerEventsScopeElement??r??e.closest(`[data-rootownerid]`)??n.body,referenceElement:e,floatingElement:t}),()=>{g()}}},[s,r,a,i,l,p,u,d,g]);let v=l6();b.useEffect(()=>{if(!s)return;function e(){l.openChangeTimeout.clear(),v.clear(),u?.events.off(`floating.closed`,r),g()}function t(e){if(u&&d&&H0(u.nodesRef.current,d).length>0){u.events.on(`floating.closed`,r);return}if(!m(e.relatedTarget)){if(l.handler){l.handler(e);return}g(),f()||h(e)}}function r(e){!u||!d||H0(u.nodesRef.current,d).length>0||v.start(0,()=>{u.events.off(`floating.closed`,r),n.setOpen(!1,m0(i0,e)),u.events.emit(`floating.closed`,e)})}let a=i;return a&&(a.addEventListener(`mouseenter`,e),a.addEventListener(`mouseleave`,t),a.addEventListener(`pointerdown`,_,!0)),()=>{a&&(a.removeEventListener(`mouseenter`,e),a.removeEventListener(`mouseleave`,t),a.removeEventListener(`pointerdown`,_,!0)),u?.events.off(`floating.closed`,r)}},[s,i,n,o,f,m,h,g,_,l,u,d,v])}var Bre={current:null};function Vre(e,t={}){let n=`rootStore`in e?e.rootStore:e,{dataRef:r,events:i}=n.context,{enabled:a=!0,delay:o=0,handleClose:s=null,mouseOnly:c=!1,restMs:l=0,move:u=!0,triggerElementRef:d=Bre,externalTree:f,isActiveTrigger:p=!0,getHandleCloseContext:m}=t,h=G6(f),g=P5(n),_=m6(s),v=m6(o),y=m6(l),x=m6(a);p&&(g.handleCloseOptions=_.current?.__options);let S=VT(()=>p6(r.current.openEvent?.type,g.interactedInside)),C=VT(e=>F0(e,n.context.triggerElements)),w=VT((e,t,r)=>{let i=n.context.triggerElements;if(i.hasElement(t))return!e||!P0(e,t);if(!ST(r))return!1;let a=r;return i.hasMatchingElement(e=>P0(e,a))&&(!e||!P0(e,a))}),T=b.useCallback((e,t=!0)=>{let r=d6(v.current,`close`,g.pointerType);r?g.openChangeTimeout.start(r,()=>{n.setOpen(!1,m0(i0,e)),h?.events.emit(`floating.closed`,e)}):t&&(g.openChangeTimeout.clear(),n.setOpen(!1,m0(i0,e)),h?.events.emit(`floating.closed`,e))},[v,n,g,h]),E=VT(()=>{g.handler&&=(W1(n.select(`domReferenceElement`)).removeEventListener(`mousemove`,g.handler),void 0)});b.useEffect(()=>E,[E]);let D=VT(()=>{N5(g)});return b.useEffect(()=>{if(!a)return;function e(e){e.open||(E(),g.openChangeTimeout.clear(),g.restTimeout.clear(),g.blockMouseMove=!0,g.restTimeoutPending=!1)}return i.on(`openchange`,e),()=>{i.off(`openchange`,e)}},[a,i,g,E]),b.useEffect(()=>{if(!a)return;let e=d.current??(p?n.select(`domReferenceElement`):null);if(!ST(e))return;function t(e){if(g.openChangeTimeout.clear(),g.blockMouseMove=!1,c&&!J0(g.pointerType)||f6(y.current)>0&&!d6(v.current,`open`))return;let t=d6(v.current,`open`,g.pointerType),r=e.currentTarget??null,i=n.select(`domReferenceElement`),a=r==null?!1:w(i,r,e.target),o=n.select(`open`),s=!o||a;a&&o?n.setOpen(!0,m0(i0,e,r)):t?g.openChangeTimeout.start(t,()=>{s&&n.setOpen(!0,m0(i0,e,r))}):s&&n.setOpen(!0,m0(i0,e,r))}function i(e){if(S()){D();return}E();let t=W1(n.select(`domReferenceElement`));g.restTimeout.clear(),g.restTimeoutPending=!1;let i=r.current.floatingContext??m?.();if(!C(e.relatedTarget)){if(_.current&&i){n.select(`open`)||g.openChangeTimeout.clear();let r=d.current;g.handler=_.current({...i,tree:h,x:e.clientX,y:e.clientY,onClose(){D(),E(),x.current&&!S()&&r===n.select(`domReferenceElement`)&&T(e,!0)}}),t.addEventListener(`mousemove`,g.handler),g.handler(e);return}(g.pointerType!==`touch`||!P0(n.select(`floatingElement`),e.relatedTarget))&&T(e)}}return u&&e.addEventListener(`mousemove`,t,{once:!0}),e.addEventListener(`mouseenter`,t),e.addEventListener(`mouseleave`,i),()=>{u&&e.removeEventListener(`mousemove`,t),e.removeEventListener(`mouseenter`,t),e.removeEventListener(`mouseleave`,i)}},[E,D,r,v,T,n,a,_,g,p,w,S,C,c,u,y,d,h,x,m]),b.useMemo(()=>{if(!a)return;function e(e){g.pointerType=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){let{nativeEvent:t}=e,r=e.currentTarget,i=n.select(`domReferenceElement`),a=n.select(`open`),o=w(i,r,e.target);if(c&&!J0(g.pointerType))return;let s=f6(y.current);if(a&&!o||s===0||!o&&g.restTimeoutPending&&e.movementX**2+e.movementY**2<2)return;g.restTimeout.clear();function l(){if(g.restTimeoutPending=!1,S())return;let e=n.select(`open`);!g.blockMouseMove&&(!e||o)&&n.setOpen(!0,m0(i0,t,r))}g.pointerType===`touch`?Rq.flushSync(()=>{l()}):o&&a?l():(g.restTimeoutPending=!0,g.restTimeout.start(s,l))}}},[a,g,S,w,c,n,y])}function F5(e=[]){let t=e.map(e=>e?.reference),n=e.map(e=>e?.floating),r=e.map(e=>e?.item),i=e.map(e=>e?.trigger),a=b.useCallback(t=>I5(t,e,`reference`),t),o=b.useCallback(t=>I5(t,e,`floating`),n),s=b.useCallback(t=>I5(t,e,`item`),r),c=b.useCallback(t=>I5(t,e,`trigger`),i);return b.useMemo(()=>({getReferenceProps:a,getFloatingProps:o,getItemProps:s,getTriggerProps:c}),[a,o,s,c])}function I5(e,t,n){let r=new Map,i=n===`item`,a={};n===`floating`&&(a.tabIndex=-1,a[D0]=``);for(let t in e)i&&e&&(t===`active`||t===`selected`)||(a[t]=e[t]);for(let o=0;o<t.length;o+=1){let s,c=t[o]?.[n];s=typeof c==`function`?e?c(e):null:c,s&&L5(a,s,i,r)}return L5(a,e,i,r),a}function L5(e,t,n,r){for(let i in t){let a=t[i];n&&(i===`active`||i===`selected`)||(i.startsWith(`on`)?(r.has(i)||r.set(i,[]),typeof a==`function`&&(r.get(i)?.push(a),e[i]=(...e)=>r.get(i)?.map(t=>t(...e)).find(e=>e!==void 0))):e[i]=a)}}var Hre=`Escape`;function R5(e,t,n){switch(e){case`vertical`:return t;case`horizontal`:return n;default:return t||n}}function z5(e,t){return R5(t,e===`ArrowUp`||e===`ArrowDown`,e===`ArrowLeft`||e===`ArrowRight`)}function B5(e,t,n){return R5(t,e===`ArrowDown`,n?e===`ArrowLeft`:e===`ArrowRight`)||e===`Enter`||e===` `||e===``}function Ure(e,t,n){return R5(t,n?e===k0:e===A0,e===M0)}function Wre(e,t,n,r){return t===`both`||t===`horizontal`&&r&&r>1?e===Hre:R5(t,n?e===A0:e===k0,e===j0)}function Gre(e,t){let n=`rootStore`in e?e.rootStore:e,r=n.useState(`open`),i=n.useState(`floatingElement`),a=n.useState(`domReferenceElement`),o=n.context.dataRef,{listRef:s,activeIndex:c,onNavigate:l=()=>{},enabled:u=!0,selectedIndex:d=null,allowEscape:f=!1,loopFocus:p=!1,nested:m=!1,rtl:h=!1,virtual:g=!1,focusItemOnOpen:_=`auto`,focusItemOnHover:v=!0,openOnArrowKeyDown:y=!0,disabledIndices:x=void 0,orientation:S=`vertical`,parentOrientation:C,cols:w=1,id:T,resetOnPointerLeave:E=!0,externalTree:D}=t,O=m6(V0(i)),k=W6(),A=G6(D);$(()=>{o.current.orientation=S},[o,S]);let j=B0(a),M=b.useRef(_),N=b.useRef(d??-1),P=b.useRef(null),F=b.useRef(!0),I=VT(e=>{l(N.current===-1?null:N.current,e)}),L=b.useRef(I),R=b.useRef(!!i),z=b.useRef(r),B=b.useRef(!1),V=b.useRef(!1),H=m6(x),U=m6(r),ee=m6(d),W=m6(E),te=VT(()=>{function e(e){g?A?.events.emit(`virtualfocus`,e):S6(e,{sync:B.current,preventScroll:!0})}let t=s.current[N.current],n=V.current;t&&e(t),(B.current?e=>e():requestAnimationFrame)(()=>{let r=s.current[N.current]||t;r&&(t||e(r),re&&(n||!F.current)&&r.scrollIntoView?.({block:`nearest`,inline:`nearest`}))})});$(()=>{u&&(r&&i?(N.current=d??-1,M.current&&d!=null&&(V.current=!0,I())):R.current&&(N.current=-1,L.current()))},[u,r,i,d,I]),$(()=>{if(u){if(!r){B.current=!1;return}if(i)if(c==null){if(B.current=!1,ee.current!=null)return;if(R.current&&(N.current=-1,te()),(!z.current||!R.current)&&M.current&&(P.current!=null||M.current===!0&&P.current==null)){let e=0,t=()=>{s.current[0]==null?(e<2&&(e?requestAnimationFrame:queueMicrotask)(t),e+=1):(N.current=P.current==null||B5(P.current,S,h)||m?E2(s):D2(s),P.current=null,I())};t()}}else T2(s,c)||(N.current=c,te(),V.current=!1)}},[u,r,i,c,ee,m,s,S,h,I,te,H]),$(()=>{if(!u||i||!A||g||!R.current)return;let e=A.nodesRef.current,t=e.find(e=>e.id===k)?.context?.elements.floating,n=N0(W1(i)),r=e.some(e=>e.context&&P0(e.context.elements.floating,n));t&&!r&&F.current&&t.focus({preventScroll:!0})},[u,i,A,k,g]),$(()=>{L.current=I,z.current=r,R.current=!!i}),$(()=>{r||(P.current=null,M.current=_)},[r,_]);let ne=c!=null,re=b.useMemo(()=>{function e(e){if(!U.current)return;let t=s.current.indexOf(e.currentTarget);t!==-1&&N.current!==t&&(N.current=t,I(e))}return{onFocus(t){B.current=!0,e(t)},onClick:({currentTarget:e})=>e.focus({preventScroll:!0}),onMouseMove(t){B.current=!0,V.current=!1,v&&e(t)},onPointerLeave(e){if(!U.current||!F.current||e.pointerType===`touch`)return;B.current=!0;let t=e.relatedTarget;if(!(!v||s.current.includes(t))&&W.current&&(S6(null,{sync:!0}),N.current=-1,I(e),!g)){let e=O.current,t=N0(W1(e));e&&P0(e,t)&&e.focus({preventScroll:!0})}}}},[U,O,v,s,I,W,g]),ie=b.useCallback(()=>C??A?.nodesRef.current.find(e=>e.id===k)?.context?.dataRef?.current.orientation,[k,A,C]),ae=VT(e=>{if(F.current=!1,B.current=!0,e.which===229||!U.current&&e.currentTarget===O.current)return;if(m&&Wre(e.key,S,h,w)){z5(e.key,ie())||W0(e),n.setOpen(!1,m0(u0,e.nativeEvent)),CT(a)&&(g?A?.events.emit(`virtualfocus`,a):a.focus());return}let t=N.current,i=E2(s,x),o=D2(s,x);if(j||(e.key===`Home`&&(W0(e),N.current=i,I(e)),e.key===`End`&&(W0(e),N.current=o,I(e))),w>1){let t=Array.from({length:s.current.length},()=>({width:1,height:1})),n=A2(t,w,!1),r=n.findIndex(e=>e!=null&&!N2(s,e,x)),a=n.reduce((e,t,n)=>t!=null&&!N2(s,t,x)?n:e,-1),c=n[k2({current:n.map(e=>e==null?null:s.current[e])},{event:e,orientation:S,loopFocus:p,rtl:h,cols:w,disabledIndices:M2([...(typeof x==`function`?null:x)||s.current.map((e,t)=>N2(s,t,x)?t:void 0),void 0],n),minIndex:r,maxIndex:a,prevIndex:j2(N.current>o?i:N.current,t,n,w,e.key===`ArrowDown`?`bl`:e.key===(h?`ArrowLeft`:`ArrowRight`)?`tr`:`tl`),stopEvent:!0})];if(c!=null&&(N.current=c,I(e)),S===`both`)return}if(z5(e.key,S)){if(W0(e),r&&!g&&N0(e.currentTarget.ownerDocument)===e.currentTarget){N.current=B5(e.key,S,h)?i:o,I(e);return}B5(e.key,S,h)?p?t>=o?f&&t!==s.current.length?N.current=-1:(B.current=!1,N.current=i):N.current=O2(s,{startingIndex:t,disabledIndices:x}):N.current=Math.min(o,O2(s,{startingIndex:t,disabledIndices:x})):p?t<=i?f&&t!==-1?N.current=s.current.length:(B.current=!1,N.current=o):N.current=O2(s,{startingIndex:t,decrement:!0,disabledIndices:x}):N.current=Math.max(i,O2(s,{startingIndex:t,decrement:!0,disabledIndices:x})),T2(s,N.current)&&(N.current=-1),I(e)}}),oe=b.useMemo(()=>g&&r&&ne&&{"aria-activedescendant":`${T}-${c}`},[g,r,ne,T,c]),se=b.useMemo(()=>({"aria-orientation":S===`both`?void 0:S,...j?{}:oe,onKeyDown(e){if(e.key===`Tab`&&e.shiftKey&&r&&!g){let t=I0(e.nativeEvent);if(t&&!P0(O.current,t))return;W0(e),n.setOpen(!1,m0(c0,e.nativeEvent)),CT(a)&&a.focus();return}ae(e)},onPointerMove(){F.current=!0}}),[oe,ae,O,S,j,n,r,g,a]),ce=b.useMemo(()=>{function e(e){_===`auto`&&K0(e.nativeEvent)&&(M.current=!g)}function t(e){M.current=_,_===`auto`&&q0(e.nativeEvent)&&(M.current=!0)}return{onKeyDown(e){let t=n.select(`open`);F.current=!1;let r=e.key.startsWith(`Arrow`),i=Ure(e.key,ie(),h),a=z5(e.key,S),o=(m?i:a)||e.key===`Enter`||e.key.trim()===``;if(g&&t)return ae(e);if(!(!t&&!y&&r)){if(o){let t=z5(e.key,ie());P.current=m&&t?null:e.key}if(m){i&&(W0(e),t?(N.current=E2(s,H.current),I(e)):n.setOpen(!0,m0(u0,e.nativeEvent,e.currentTarget)));return}a&&(ee.current!=null&&(N.current=ee.current),W0(e),!t&&y?n.setOpen(!0,m0(u0,e.nativeEvent,e.currentTarget)):ae(e),t&&I(e))}},onFocus(e){n.select(`open`)&&!g&&(N.current=-1,I(e))},onPointerDown:t,onPointerEnter:t,onMouseDown:e,onClick:e}},[ae,H,_,s,m,I,n,y,S,ie,h,ee,g]),le=b.useMemo(()=>({...oe,...ce}),[oe,ce]);return b.useMemo(()=>u?{reference:le,floating:se,item:re,trigger:ce}:{},[u,le,se,ce,re])}var Kre=new Map([[`select`,`listbox`],[`combobox`,`listbox`],[`label`,!1]]);function V5(e,t={}){let n=`rootStore`in e?e.rootStore:e,r=n.useState(`open`),i=n.useState(`floatingId`),a=n.useState(`domReferenceElement`),o=n.useState(`floatingElement`),{role:s=`dialog`}=t,c=J1(),l=a?.id||c,u=b.useMemo(()=>V0(o)?.id||i,[o,i]),d=Kre.get(s)??s,f=W6()!=null,p=b.useMemo(()=>d===`tooltip`||s===`label`?vE:{"aria-haspopup":d===`alertdialog`?`dialog`:d,"aria-expanded":`false`,...d===`listbox`&&{role:`combobox`},...d===`menu`&&f&&{role:`menuitem`},...s===`select`&&{"aria-autocomplete":`none`},...s===`combobox`&&{"aria-autocomplete":`list`}},[d,f,s]),m=b.useMemo(()=>d===`tooltip`||s===`label`?{[`aria-${s===`label`?`labelledby`:`describedby`}`]:r?u:void 0}:{...p,"aria-expanded":r?`true`:`false`,"aria-controls":r?u:void 0,...d===`menu`&&{id:l}},[d,u,r,l,s,p]),h=b.useMemo(()=>{let e={id:u,...d&&{role:d}};return d===`tooltip`||s===`label`?e:{...e,...d===`menu`&&{"aria-labelledby":l}}},[d,u,l,s]),g=b.useCallback(({active:e,selected:t})=>{let n={role:`option`,...e&&{id:`${u}-fui-option`}};switch(s){case`select`:case`combobox`:return{...n,"aria-selected":t};default:}return{}},[u,s]);return b.useMemo(()=>({reference:m,floating:h,item:g,trigger:p}),[m,h,p,g])}function qre(e,t){let n=`rootStore`in e?e.rootStore:e,r=n.context.dataRef,i=n.useState(`open`),{listRef:a,elementsRef:o,activeIndex:s,onMatch:c,onTypingChange:l,enabled:u=!0,resetMs:d=750,selectedIndex:f=null}=t,p=l6(),m=b.useRef(``),h=b.useRef(f??s??-1),g=b.useRef(null);$(()=>{!i&&f!==null||(p.clear(),g.current=null,m.current!==``&&(m.current=``))},[i,f,p]),$(()=>{i&&m.current===``&&(h.current=f??s??-1)},[i,f,s]);let _=VT(e=>{e?r.current.typing||(r.current.typing=e,l?.(e)):r.current.typing&&(r.current.typing=e,l?.(e))}),v=VT(e=>{function t(e){let t=o?.current[e];return!t||P2(t)}function n(e,n,r=0){if(e.length===0)return-1;let i=(r%e.length+e.length)%e.length,a=n.toLocaleLowerCase();for(let n=0;n<e.length;n+=1){let r=(i+n)%e.length;if(!(!e[r]?.toLocaleLowerCase().startsWith(a)||!t(r)))return r}return-1}let r=a.current;if(m.current.length>0&&e.key===` `&&(W0(e),_(!0)),m.current.length>0&&m.current[0]!==` `&&n(r,m.current)===-1&&e.key!==` `&&_(!1),r==null||e.key.length!==1||e.ctrlKey||e.metaKey||e.altKey)return;i&&e.key!==` `&&(W0(e),_(!0));let l=m.current===``;l&&(h.current=f??s??-1),r.every(e=>e?e[0]?.toLocaleLowerCase()!==e[1]?.toLocaleLowerCase():!0)&&m.current===e.key&&(m.current=``,h.current=g.current),m.current+=e.key,p.start(d,()=>{m.current=``,h.current=g.current,_(!1)});let u=((l?f??s??-1:h.current)??0)+1,v=n(r,m.current,u);v===-1?e.key!==` `&&(m.current=``,_(!1)):(c?.(v),g.current=v)}),y=VT(e=>{let t=e.relatedTarget,r=n.select(`domReferenceElement`),i=n.select(`floatingElement`),a=P0(r,t),o=P0(i,t);a||o||(p.clear(),m.current=``,h.current=g.current,_(!1))}),x=b.useMemo(()=>({onKeyDown:v,onBlur:y}),[v,y]),S=b.useMemo(()=>({onKeyDown:v,onBlur:y}),[v,y]);return b.useMemo(()=>u?{reference:x,floating:S}:{},[u,x,S])}var H5=.1,Jre=H5*H5,U5=.5;function W5(e,t,n,r,i,a){return r>=t!=a>=t&&e<=(i-n)*(t-r)/(a-r)+n}function G5(e,t,n,r,i,a,o,s,c,l){let u=!1;return W5(e,t,n,r,i,a)&&(u=!u),W5(e,t,i,a,o,s)&&(u=!u),W5(e,t,o,s,c,l)&&(u=!u),W5(e,t,c,l,n,r)&&(u=!u),u}function Yre(e,t,n){return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height}function K5(e,t,n,r,i,a){return e>=Math.min(n,i)&&e<=Math.max(n,i)&&t>=Math.min(r,a)&&t<=Math.max(r,a)}function Xre(e={}){let{blockPointerEvents:t=!1}=e,n=new c6,r=({x:e,y:t,placement:r,elements:i,onClose:a,nodeId:o,tree:s})=>{let c=r?.split(`-`)[0],l=!1,u=null,d=null,f=typeof performance<`u`?performance.now():0;function p(e,t){let n=performance.now(),r=n-f;if(u===null||d===null||r===0)return u=e,d=t,f=n,!1;let i=e-u,a=t-d,o=i*i+a*a,s=r*r*Jre;return u=e,d=t,f=n,o<s}function m(){n.clear(),a()}return function(r){n.clear();let a=i.domReference,u=i.floating;if(!a||!u||c==null||e==null||t==null)return;let{clientX:d,clientY:f}=r,h=I0(r),g=r.type===`mouseleave`,_=P0(u,h),v=P0(a,h);if(_&&(l=!0,!g))return;if(v&&(l=!1,!g)){l=!0;return}if(g&&ST(r.relatedTarget)&&P0(u,r.relatedTarget))return;function y(){return!!(s&&H0(s.nodesRef.current,o).length>0)}function b(){y()||m()}if(y())return;let x=a.getBoundingClientRect(),S=u.getBoundingClientRect(),C=e>S.right-S.width/2,w=t>S.bottom-S.height/2,T=S.width>x.width,E=S.height>x.height,D=(T?x:S).left,O=(T?x:S).right,k=(E?x:S).top,A=(E?x:S).bottom;if(c===`top`&&t>=x.bottom-1||c===`bottom`&&t<=x.top+1||c===`left`&&e>=x.right-1||c===`right`&&e<=x.left+1){b();return}let j=!1;switch(c){case`top`:j=K5(d,f,D,x.top+1,O,S.bottom-1);break;case`bottom`:j=K5(d,f,D,S.top+1,O,x.bottom-1);break;case`left`:j=K5(d,f,S.right-1,A,x.left+1,k);break;case`right`:j=K5(d,f,x.right-1,A,S.left+1,k);break;default:}if(j)return;if(l&&!Yre(d,f,x)){b();return}if(!g&&p(d,f)){b();return}let M=!1;switch(c){case`top`:{let n=T?U5/2:U5*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t+U5+1,o=C||T?S.bottom-U5:S.top,s=C?T?S.bottom-U5:S.top:S.bottom-U5;M=G5(d,f,r,a,i,a,S.left,o,S.right,s);break}case`bottom`:{let n=T?U5/2:U5*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t-U5,o=C||T?S.top+U5:S.bottom,s=C?T?S.top+U5:S.bottom:S.top+U5;M=G5(d,f,r,a,i,a,S.left,o,S.right,s);break}case`left`:{let n=E?U5/2:U5*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e+U5+1,o=w||E?S.right-U5:S.left,s=w?E?S.right-U5:S.left:S.right-U5;M=G5(d,f,o,S.top,s,S.bottom,a,r,a,i);break}case`right`:{let n=E?U5/2:U5*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e-U5,o=w||E?S.left+U5:S.right,s=w?E?S.left+U5:S.right:S.left+U5;M=G5(d,f,a,r,a,i,o,S.top,s,S.bottom);break}default:}M?l||n.start(40,b):b()}};return r.__options={blockPointerEvents:t},r}var Zre=function(e){return e.nestedDialogs=`--nested-dialogs`,e}({}),Qre=function(e){return e[e.open=J3.open]=`open`,e[e.closed=J3.closed]=`closed`,e[e.startingStyle=J3.startingStyle]=`startingStyle`,e[e.endingStyle=J3.endingStyle]=`endingStyle`,e.nested=`data-nested`,e.nestedDialogOpen=`data-nested-dialog-open`,e}({}),q5=b.createContext(void 0);function $re(){let e=b.useContext(q5);if(e===void 0)throw Error(ZT(26));return e}var eie={...r6,...j4,nestedDialogOpen(e){return e?{[Qre.nestedDialogOpen]:``}:null}},tie=b.forwardRef(function(e,t){let{className:n,finalFocus:r,initialFocus:i,render:a,...o}=e,{store:s}=q3(),c=s.useState(`descriptionElementId`),l=s.useState(`disablePointerDismissal`),u=s.useState(`floatingRootContext`),d=s.useState(`popupProps`),f=s.useState(`modal`),p=s.useState(`mounted`),m=s.useState(`nested`),h=s.useState(`nestedOpenDialogCount`),g=s.useState(`open`),_=s.useState(`openMethod`),v=s.useState(`titleElementId`),y=s.useState(`transitionStatus`),b=s.useState(`role`);$re(),R4({open:g,ref:s.context.popupRef,onComplete(){g&&s.context.onOpenChangeComplete?.(!0)}});function x(e){return e===`touch`?s.context.popupRef.current:!0}let S=i===void 0?x:i,C=CE(`div`,e,{state:{open:g,nested:m,transitionStatus:y,nestedDialogOpen:h>0},props:[d,{"aria-labelledby":v??void 0,"aria-describedby":c??void 0,role:b,tabIndex:-1,hidden:!p,onKeyDown(e){t3.has(e.key)&&e.stopPropagation()},style:{[Zre.nestedDialogs]:h}},o],ref:[t,s.context.popupRef,s.useStateSetter(`popupElement`)],stateAttributesMapping:eie});return(0,G.jsx)(i8,{context:u,openInteractionType:_,disabled:!p,closeOnFocusOut:!l,initialFocus:S,returnFocus:r,modal:f!==!1,restoreFocus:`popup`,children:C})}),J5=b.forwardRef(function(e,t){let{cutout:n,...r}=e,i;if(n){let e=n?.getBoundingClientRect();i=`polygon(
|
|
142
|
+
0% 0%,
|
|
143
|
+
100% 0%,
|
|
144
|
+
100% 100%,
|
|
145
|
+
0% 100%,
|
|
146
|
+
0% 0%,
|
|
147
|
+
${e.left}px ${e.top}px,
|
|
148
|
+
${e.left}px ${e.bottom}px,
|
|
149
|
+
${e.right}px ${e.bottom}px,
|
|
150
|
+
${e.right}px ${e.top}px,
|
|
151
|
+
${e.left}px ${e.top}px
|
|
152
|
+
)`}return(0,G.jsx)(`div`,{ref:t,role:`presentation`,"data-base-ui-inert":``,...r,style:{position:`fixed`,inset:0,userSelect:`none`,WebkitUserSelect:`none`,clipPath:i}})}),nie=b.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,{store:i}=q3(),a=i.useState(`mounted`),o=i.useState(`modal`),s=i.useState(`open`);return a||n?(0,G.jsx)(q5.Provider,{value:n,children:(0,G.jsxs)(z6,{ref:t,...r,children:[a&&o===!0&&(0,G.jsx)(J5,{ref:i.context.internalBackdropRef,inert:D4(!s)}),e.children]})}):null});function Y5(e){let t=b.useRef(!0);t.current&&(t.current=!1,e())}var X5={},Z5={},Q5=``;function rie(e){if(typeof document>`u`)return!1;let t=W1(e);return yT(t).innerWidth-t.documentElement.clientWidth>0}function iie(e){if(!(typeof CSS<`u`&&CSS.supports&&CSS.supports(`scrollbar-gutter`,`stable`))||typeof document>`u`)return!1;let t=W1(e),n=t.documentElement,r=t.body,i=TT(n)?n:r,a=i.style.overflowY,o=n.style.scrollbarGutter;n.style.scrollbarGutter=`stable`,i.style.overflowY=`scroll`;let s=i.offsetWidth;i.style.overflowY=`hidden`;let c=i.offsetWidth;return i.style.overflowY=a,n.style.scrollbarGutter=o,s===c}function aie(e){let t=W1(e),n=t.documentElement,r=t.body,i=TT(n)?n:r,a={overflowY:i.style.overflowY,overflowX:i.style.overflowX};return Object.assign(i.style,{overflowY:`hidden`,overflowX:`hidden`}),()=>{Object.assign(i.style,a)}}function oie(e){let t=W1(e),n=t.documentElement,r=t.body,i=yT(n),a=0,o=0,s=!1,c=P4.create();if(y0&&(i.visualViewport?.scale??1)!==1)return()=>{};function l(){let t=i.getComputedStyle(n),c=i.getComputedStyle(r),l=(t.scrollbarGutter||``).includes(`both-edges`)?`stable both-edges`:`stable`;a=n.scrollTop,o=n.scrollLeft,X5={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},Q5=n.style.scrollBehavior,Z5={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};let u=n.scrollHeight>n.clientHeight,d=n.scrollWidth>n.clientWidth,f=t.overflowY===`scroll`||c.overflowY===`scroll`,p=t.overflowX===`scroll`||c.overflowX===`scroll`,m=Math.max(0,i.innerWidth-r.clientWidth),h=Math.max(0,i.innerHeight-r.clientHeight),g=parseFloat(c.marginTop)+parseFloat(c.marginBottom),_=parseFloat(c.marginLeft)+parseFloat(c.marginRight),v=TT(n)?n:r;if(s=iie(e),s){n.style.scrollbarGutter=l,v.style.overflowY=`hidden`,v.style.overflowX=`hidden`;return}Object.assign(n.style,{scrollbarGutter:l,overflowY:`hidden`,overflowX:`hidden`}),(u||f)&&(n.style.overflowY=`scroll`),(d||p)&&(n.style.overflowX=`scroll`),Object.assign(r.style,{position:`relative`,height:g||h?`calc(100dvh - ${g+h}px)`:`100dvh`,width:_||m?`calc(100vw - ${_+m}px)`:`100vw`,boxSizing:`border-box`,overflow:`hidden`,scrollBehavior:`unset`}),r.scrollTop=a,r.scrollLeft=o,n.setAttribute(`data-base-ui-scroll-locked`,``),n.style.scrollBehavior=`unset`}function u(){Object.assign(n.style,X5),Object.assign(r.style,Z5),s||(n.scrollTop=a,n.scrollLeft=o,n.removeAttribute(`data-base-ui-scroll-locked`),n.style.scrollBehavior=Q5)}function d(){u(),c.request(l)}return l(),i.addEventListener(`resize`,d),()=>{c.cancel(),u(),typeof i.removeEventListener==`function`&&i.removeEventListener(`resize`,d)}}var sie=new class{lockCount=0;restore=null;timeoutLock=c6.create();timeoutUnlock=c6.create();acquire(e){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(e)),this.release}release=()=>{--this.lockCount,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(e){if(this.lockCount===0||this.restore!==null)return;let t=W1(e).documentElement,n=yT(t).getComputedStyle(t).overflowY;if(n===`hidden`||n===`clip`){this.restore=gE;return}this.restore=b0||!rie(e)?aie(e):oie(e)}};function $5(e=!0,t=null){$(()=>{if(e)return sie.acquire(t)},[e,t])}function cie(e){let t=b.useRef(``),n=b.useCallback(n=>{n.defaultPrevented||(t.current=n.pointerType,e(n,n.pointerType))},[e]);return{onClick:b.useCallback(n=>{if(n.detail===0){e(n,`keyboard`);return}`pointerType`in n?e(n,n.pointerType):e(n,t.current),t.current=``},[e]),onPointerDown:n}}function e7(e,t){let n=b.useRef(e),r=VT(t);$(()=>{n.current!==e&&r(n.current)},[e,r]),$(()=>{n.current=e},[e])}function t7(e){let[t,n]=b.useState(null),r=VT((t,r)=>{e||n(r||(b0?`touch`:``))});e7(e,t=>{t&&!e&&n(null)});let{onClick:i,onPointerDown:a}=cie(r);return b.useMemo(()=>({openMethod:t,triggerProps:{onClick:i,onPointerDown:a}}),[t,i,a])}function lie(e){let{store:t,parentContext:n,actionsRef:r}=e,i=t.useState(`open`),a=t.useState(`disablePointerDismissal`),o=t.useState(`modal`),s=t.useState(`popupElement`),{openMethod:c,triggerProps:l}=t7(i);T5(t);let{forceUnmount:u}=E5(i,t),d=VT(e=>{let n=m0(e);return n.preventUnmountOnClose=()=>{t.set(`preventUnmountingOnClose`,!0)},n}),f=b.useCallback(()=>{t.setOpen(!1,d(f0))},[t,d]);b.useImperativeHandle(r,()=>({unmount:u,close:f}),[u,f]);let p=M5({popupStore:t,onOpenChange:t.setOpen,treatPopupAsFloatingElement:!0,noEmit:!0}),[m,h]=b.useState(0),g=m===0,_=V5(p),v=l8(p,{outsidePressEvent(){return t.context.internalBackdropRef.current||t.context.backdropRef.current?`intentional`:{mouse:o===`trap-focus`?`sloppy`:`intentional`,touch:`sloppy`}},outsidePress(e){if(!t.context.outsidePressEnabledRef.current||`button`in e&&e.button!==0||`touches`in e&&e.touches.length!==1)return!1;let n=I0(e);if(g&&!a){let e=n;return o&&(t.context.internalBackdropRef.current||t.context.backdropRef.current)?t.context.internalBackdropRef.current===e||t.context.backdropRef.current===e||P0(e,s)&&!e?.hasAttribute(`data-base-ui-portal`):!0}return!1},escapeKey:g});$5(i&&o===!0,s);let{getReferenceProps:y,getFloatingProps:x,getTriggerProps:S}=F5([_,v]);t.useContextCallback(`onNestedDialogOpen`,e=>{h(e+1)}),t.useContextCallback(`onNestedDialogClose`,()=>{h(0)}),b.useEffect(()=>(n?.onNestedDialogOpen&&i&&n.onNestedDialogOpen(m),n?.onNestedDialogClose&&!i&&n.onNestedDialogClose(),()=>{n?.onNestedDialogClose&&i&&n.onNestedDialogClose()}),[i,n,m]);let C=b.useMemo(()=>y(l),[y,l]),w=b.useMemo(()=>S(l),[S,l]),T=b.useMemo(()=>x(),[x]);t.useSyncedValues({openMethod:c,activeTriggerProps:C,inactiveTriggerProps:w,popupProps:T,floatingRootContext:p,nestedOpenDialogCount:m})}var uie={...A5,modal:v5(e=>e.modal),nested:v5(e=>e.nested),nestedOpenDialogCount:v5(e=>e.nestedOpenDialogCount),disablePointerDismissal:v5(e=>e.disablePointerDismissal),openMethod:v5(e=>e.openMethod),descriptionElementId:v5(e=>e.descriptionElementId),titleElementId:v5(e=>e.titleElementId),viewportElement:v5(e=>e.viewportElement),role:v5(e=>e.role)},die=class extends C5{constructor(e){super(fie(e),{popupRef:b.createRef(),backdropRef:b.createRef(),internalBackdropRef:b.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:new D5,onOpenChange:void 0,onOpenChangeComplete:void 0},uie)}setOpen=(e,t)=>{if(t.preventUnmountOnClose=()=>{this.set(`preventUnmountingOnClose`,!0)},!e&&t.trigger==null&&this.state.activeTriggerId!=null&&(t.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(e,t),t.isCanceled)return;let n={open:e,nativeEvent:t.event,reason:t.reason,nested:this.state.nested};this.state.floatingRootContext.context.events?.emit(`openchange`,n);let r={open:e},i=t.trigger?.id??null;(i||e)&&(r.activeTriggerId=i,r.activeTriggerElement=t.trigger??null),this.update(r)}};function fie(e={}){return{...O5(),modal:!0,disablePointerDismissal:!1,popupElement:null,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,role:`dialog`,...e}}function pie(e){let{children:t,open:n,defaultOpen:r=!1,onOpenChange:i,onOpenChangeComplete:a,disablePointerDismissal:o=!1,modal:s=!0,actionsRef:c,handle:l,triggerId:u,defaultTriggerId:d=null}=e,f=q3(!0),p=!!f,m=zT(()=>l?.store??new die({open:r,openProp:n,activeTriggerId:d,triggerIdProp:u,modal:s,disablePointerDismissal:o,nested:p})).current;Y5(()=>{n===void 0&&m.state.open===!1&&r===!0&&m.update({open:!0,activeTriggerId:d})}),m.useControlledProp(`openProp`,n),m.useControlledProp(`triggerIdProp`,u),m.useSyncedValues({disablePointerDismissal:o,nested:p,modal:s}),m.useContextCallback(`onOpenChange`,i),m.useContextCallback(`onOpenChangeComplete`,a);let h=m.useState(`payload`);lie({store:m,actionsRef:c,parentContext:f?.store.context,onOpenChange:i,triggerIdProp:u});let g=b.useMemo(()=>({store:m}),[m]);return(0,G.jsx)(K3.Provider,{value:g,children:typeof t==`function`?t({payload:h}):t})}var mie=b.forwardRef(function(e,t){let{render:n,className:r,id:i,...a}=e,{store:o}=q3(),s=Y1(i);return o.useSyncedValueWithCleanup(`titleElementId`,s),CE(`h2`,e,{ref:t,props:[{id:s},a]})});function hie({...e}){return(0,G.jsx)(pie,{"data-slot":`dialog`,...e})}function gie({...e}){return(0,G.jsx)(nie,{"data-slot":`dialog-portal`,...e})}function _ie({className:e,...t}){return(0,G.jsx)(a6,{"data-slot":`dialog-overlay`,className:iO(`data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs fixed inset-0 isolate z-50`,e),...t})}function vie({className:e,children:t,showCloseButton:n=!0,...r}){return(0,G.jsxs)(gie,{children:[(0,G.jsx)(_ie,{}),(0,G.jsxs)(tie,{"data-slot":`dialog-content`,className:iO(`bg-background data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 ring-foreground/10 grid max-w-[calc(100%-2rem)] gap-4 rounded-none p-4 text-xs/relaxed ring-1 duration-100 sm:max-w-sm fixed top-1/2 left-1/2 z-50 w-full -translate-x-1/2 -translate-y-1/2 outline-none`,e),...r,children:[t,n&&(0,G.jsxs)(o6,{"data-slot":`dialog-close`,render:(0,G.jsx)(oO,{variant:`ghost`,className:`absolute top-2 right-2`,size:`icon-sm`}),children:[(0,G.jsx)(gn,{}),(0,G.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function yie({className:e,...t}){return(0,G.jsx)(mie,{"data-slot":`dialog-title`,className:iO(`text-sm font-medium`,e),...t})}var bie=()=>{let e=hT(),[t,n]=(0,b.useState)(!1);return e._meta&&Object.keys(e._meta).length>0?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(oO,{variant:`ghost`,size:`default`,onClick:()=>n(!0),"aria-label":`View tool metadata`,title:`View tool metadata`,children:[(0,G.jsx)(sn,{className:`h-4 w-4`}),`Metadata`]}),(0,G.jsx)(hie,{open:t,onOpenChange:n,children:(0,G.jsxs)(vie,{className:`sm:max-w-2xl`,children:[(0,G.jsx)(yie,{children:`Tool Metadata`}),(0,G.jsx)(`div`,{className:`text-xs`,children:(0,G.jsx)(G3,{src:e._meta,name:null,quotesOnKeys:!1,displayDataTypes:!1,displayObjectSize:!1,enableClipboard:!1,theme:`rjv-default`,style:{fontSize:`0.75rem`},collapsed:2,collapseStringsAfterLength:80})})]})})]}):null},xie={"ui:submitButtonOptions":{norender:!0}},Sie=({schema:e,formData:t,setFormData:n,ref:r})=>!e?.properties||Object.keys(e.properties).length===0?(0,G.jsx)(`div`,{className:`flex items-center justify-center h-full`,children:(0,G.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`This tool requires no input`})}):(0,G.jsx)(b3,{children:(0,G.jsx)(x3,{children:(0,G.jsx)(k1,{ref:r,schema:e??{},validator:jK,uiSchema:xie,formData:t,onChange:e=>n(e.formData),showErrorList:!1,templates:{FieldTemplate:e=>{let{id:t,classNames:n,style:r,label:i,required:a,errors:o,children:s}=e;return(0,G.jsxs)(`div`,{className:iO(`flex flex-col gap-2`,n),style:r,children:[(0,G.jsxs)(`label`,{htmlFor:t,className:`text-sm text-foreground`,children:[i,a&&(0,G.jsx)(`span`,{className:`text-destructive ml-1`,children:`*`})]}),(0,G.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[s,o]})]})},FieldErrorTemplate:e=>e.errors&&e.errors.length>0?(0,G.jsx)(`div`,{className:`text-sm text-destructive mt-1 flex items-center gap-1`,children:(0,G.jsx)(`span`,{children:e.errors.join(`, `)})}):null}})})}),Cie=({formData:e,setFormData:t})=>{let[n,r]=(0,b.useState)(JSON.stringify(e,null,2));(0,b.useEffect)(()=>{r(JSON.stringify(e,null,2))},[e]);let i=e=>{r(e);try{t(JSON.parse(e))}catch{}};return(0,G.jsx)(`div`,{className:`flex flex-col gap-2`,children:(0,G.jsx)(`textarea`,{className:`w-full h-full p-2 rounded-md border border-border`,rows:12,value:n,onChange:e=>i(e.target.value)})})},wie=()=>{let e=(0,b.useRef)(null),t=hT(),{setToolData:n}=KS(),r=qS(t.name)?.input??{},i=e=>{n(t.name,{input:e??{}})};return(0,G.jsxs)(`div`,{className:iO(`flex flex-col h-full overflow-hidden border-r border-border`),children:[(0,G.jsxs)(`div`,{className:`shrink-0 border-b border-border px-6 py-4 flex items-center justify-between h-[72px]`,children:[(0,G.jsx)(`h2`,{className:`font-semibold text-foreground`,children:t.name}),(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,G.jsx)(bie,{}),(0,G.jsx)(U3,{validateForm:async()=>e.current===null?!0:await e.current.validateForm(),formData:r})]})]}),(0,G.jsx)(`div`,{className:`flex-1 overflow-auto px-6 py-6 bg-muted/50`,children:(0,G.jsxs)(h3,{defaultValue:`form`,children:[(0,G.jsxs)(_3,{children:[(0,G.jsx)(v3,{value:`form`,children:`Form`}),(0,G.jsx)(v3,{value:`json`,children:`JSON`})]}),(0,G.jsx)(y3,{value:`form`,children:(0,G.jsx)(Sie,{schema:t.inputSchema,formData:r,setFormData:i,ref:e},t.name)}),(0,G.jsx)(y3,{value:`json`,children:(0,G.jsx)(Cie,{formData:r,setFormData:i},t.name)})]})})]})},Tie=NE(`rounded-none has-[>[data-slot=button-group]]:gap-2 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-none flex w-fit items-stretch [&>*]:focus-visible:z-10 [&>*]:focus-visible:relative [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1`,{variants:{orientation:{horizontal:`[&>[data-slot]~[data-slot]]:rounded-l-none [&>[data-slot]~[data-slot]]:border-l-0 [&>[data-slot]]:rounded-r-none`,vertical:`flex-col [&>[data-slot]~[data-slot]]:rounded-t-none [&>[data-slot]~[data-slot]]:border-t-0 [&>[data-slot]]:rounded-b-none`}},defaultVariants:{orientation:`horizontal`}});function Eie({className:e,orientation:t,...n}){return(0,G.jsx)(`div`,{role:`group`,"data-slot":`button-group`,"data-orientation":t,className:iO(Tie({orientation:t}),e),...n})}function Die({className:e,...t}){return(0,G.jsx)(`label`,{"data-slot":`label`,className:iO(`gap-2 text-xs leading-none group-data-[disabled=true]:opacity-50 peer-disabled:opacity-50 flex items-center select-none group-data-[disabled=true]:pointer-events-none peer-disabled:cursor-not-allowed`,e),...t})}function Oie({className:e,...t}){return(0,G.jsx)(`fieldset`,{"data-slot":`field-set`,className:iO(`gap-4 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3 flex flex-col`,e),...t})}var kie=NE(`data-[invalid=true]:text-destructive gap-2 group/field flex w-full`,{variants:{orientation:{vertical:`flex-col [&>*]:w-full [&>.sr-only]:w-auto`,horizontal:`flex-row items-center [&>[data-slot=field-label]]:flex-auto has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px`,responsive:`flex-col [&>*]:w-full [&>.sr-only]:w-auto @md/field-group:flex-row @md/field-group:items-center @md/field-group:[&>*]:w-auto @md/field-group:[&>[data-slot=field-label]]:flex-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px`}},defaultVariants:{orientation:`vertical`}});function n7({className:e,orientation:t=`vertical`,...n}){return(0,G.jsx)(`div`,{role:`group`,"data-slot":`field`,"data-orientation":t,className:iO(kie({orientation:t}),e),...n})}function r7({className:e,...t}){return(0,G.jsx)(Die,{"data-slot":`field-label`,className:iO(`has-data-checked:bg-primary/5 has-data-checked:border-primary dark:has-data-checked:bg-primary/10 gap-2 group-data-[disabled=true]/field:opacity-50 has-[>[data-slot=field]]:rounded-none has-[>[data-slot=field]]:border [&>*]:data-[slot=field]:p-2 group/field-label peer/field-label flex w-fit leading-snug`,`has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col`,e),...t})}var i7=function(e){return e.disabled=`data-disabled`,e.valid=`data-valid`,e.invalid=`data-invalid`,e.touched=`data-touched`,e.dirty=`data-dirty`,e.filled=`data-filled`,e.focused=`data-focused`,e}({}),Aie={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},a7={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},jie={disabled:!1,...a7},o7={valid(e){return e===null?null:e?{[i7.valid]:``}:{[i7.invalid]:``}}},Mie=b.createContext({invalid:void 0,name:void 0,validityData:{state:Aie,errors:[],error:``,value:``,initialValue:null},setValidityData:gE,disabled:void 0,touched:a7.touched,setTouched:gE,dirty:a7.dirty,setDirty:gE,filled:a7.filled,setFilled:gE,focused:a7.focused,setFocused:gE,validate:()=>null,validationMode:`onSubmit`,validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:jie,markedDirtyRef:{current:!1},validation:{getValidationProps:(e=vE)=>e,getInputValidationProps:(e=vE)=>e,inputRef:{current:null},commit:async()=>{}}});function s7(e=!0){let t=b.useContext(Mie);if(t.setValidityData===gE&&!e)throw Error(ZT(28));return t}var Nie=b.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:gE,validationMode:`onSubmit`,submitAttemptedRef:{current:!1}});function c7(){return b.useContext(Nie)}var Pie=b.createContext({controlId:void 0,registerControlId:gE,labelId:void 0,setLabelId:gE,messageIds:[],setMessageIds:gE,getDescriptionProps:e=>e});function l7(){return b.useContext(Pie)}function Fie(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}function u7(e={}){let{id:t,implicit:n=!1,controlRef:r}=e,{controlId:i,registerControlId:a}=l7(),o=Y1(t),s=n?i:void 0,c=zT(()=>Symbol(`labelable-control`)),l=b.useRef(!1),u=b.useRef(t!=null),d=VT(()=>{!l.current||a===gE||(l.current=!1,a(c.current,void 0))});return $(()=>{if(a===gE)return;let e;if(n){let n=r?.current;e=ST(n)&&n.closest(`label`)!=null?t??null:s??o}else if(t!=null)u.current=!0,e=t;else if(u.current)e=o;else{d();return}if(e===void 0){d();return}l.current=!0,a(c.current,e)},[t,r,s,a,n,o,c,d]),b.useEffect(()=>d,[d]),i??o}function d7(e){let{enabled:t=!0,value:n,id:r,name:i,controlRef:a,commit:o}=e,{formRef:s}=c7(),{invalid:c,markedDirtyRef:l,validityData:u,setValidityData:d}=s7(),f=VT(e.getValue);$(()=>{if(!t)return;let e=n;e===void 0&&(e=f()),u.initialValue===null&&e!==null&&d(t=>({...t,initialValue:e}))},[t,d,n,u.initialValue,f]),$(()=>{!t||!r||s.current.fields.set(r,{getValue:f,name:i,controlRef:a,validityData:Fie(u,c),validate(e=!0){let t=n;t===void 0&&(t=f()),l.current=!0,e?Rq.flushSync(()=>o(t)):o(t)}})},[o,a,t,s,f,r,c,l,i,u,n]),$(()=>{let e=s.current.fields;return()=>{r&&e.delete(r)}},[s,r])}var Iie=b.forwardRef(function(e,t){let{render:n,className:r,id:i,name:a,value:o,disabled:s=!1,onValueChange:c,defaultValue:l,autoFocus:u=!1,...d}=e,{state:f,name:p,disabled:m,setTouched:h,setDirty:g,validityData:_,setFocused:v,setFilled:y,validationMode:x,validation:S}=s7(),C=m||s,w=p??a,T={...f,disabled:C},{labelId:E}=l7(),D=u7({id:i});$(()=>{let e=o!=null;S.inputRef.current?.value||e&&o!==``?y(!0):e&&o===``&&y(!1)},[S.inputRef,y,o]);let O=b.useRef(null);$(()=>{u&&O.current===N0(W1(O.current))&&v(!0)},[u,v]);let[k]=A1({controlled:o,default:l,name:`FieldControl`,state:`value`}),A=o!==void 0,j=A?k:void 0;return d7({id:D,name:w,commit:S.commit,value:j,getValue:()=>S.inputRef.current?.value,controlRef:S.inputRef}),CE(`input`,e,{ref:[t,O],state:T,props:[{id:D,disabled:C,name:w,ref:S.inputRef,"aria-labelledby":E,autoFocus:u,...A?{value:j}:{defaultValue:l},onChange(e){let t=e.currentTarget.value;c?.(t,m0(n0,e.nativeEvent)),g(t!==_.initialValue),y(t!==``)},onFocus(){v(!0)},onBlur(e){h(!0),v(!1),x===`onBlur`&&S.commit(e.currentTarget.value)},onKeyDown(e){e.currentTarget.tagName===`INPUT`&&e.key===`Enter`&&(h(!0),S.commit(e.currentTarget.value))}},S.getInputValidationProps(),d],stateAttributesMapping:o7})}),Lie=b.forwardRef(function(e,t){return(0,G.jsx)(Iie,{ref:t,...e})});function f7({className:e,type:t,...n}){return(0,G.jsx)(Lie,{type:t,"data-slot":`input`,className:iO(`dark:bg-input/30 border-input 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:aria-invalid:border-destructive/50 disabled:bg-input/50 dark:disabled:bg-input/80 h-8 rounded-none border bg-transparent px-2.5 py-1 text-xs transition-colors file:h-6 file:text-xs file:font-medium focus-visible:ring-1 aria-invalid:ring-1 md:text-xs file:text-foreground placeholder:text-muted-foreground w-full min-w-0 outline-none file:inline-flex file:border-0 file:bg-transparent disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50`,e),...n})}var p7=b.createContext(null),m7=b.createContext(null);function h7(){let e=b.useContext(p7);if(e===null)throw Error(ZT(60));return e}function g7(){let e=b.useContext(m7);if(e===null)throw Error(ZT(61));return e}var Rie=(e,t)=>Object.is(e,t);function _7(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function zie(e,t,n){return!e||e.length===0?!1:e.some(e=>e===void 0?!1:_7(t,e,n))}function v7(e,t,n){return!e||e.length===0?-1:e.findIndex(e=>e===void 0?!1:_7(e,t,n))}function Bie(e,t,n){return e.filter(e=>!_7(t,e,n))}function y7(e){if(e==null)return``;if(typeof e==`string`)return e;try{return JSON.stringify(e)}catch{return String(e)}}function b7(e){return e!=null&&e.length>0&&typeof e[0]==`object`&&e[0]!=null&&`items`in e[0]}function Vie(e){if(!Array.isArray(e))return e!=null&&`null`in e;let t=e;if(b7(t)){for(let e of t)for(let t of e.items)if(t&&t.value==null&&t.label!=null)return!0;return!1}for(let e of t)if(e&&e.value==null&&e.label!=null)return!0;return!1}function Hie(e,t){if(t&&e!=null)return t(e)??``;if(e&&typeof e==`object`){if(`label`in e&&e.label!=null)return String(e.label);if(`value`in e)return String(e.value)}return y7(e)}function x7(e,t){return t&&e!=null?t(e)??``:e&&typeof e==`object`&&`value`in e&&`label`in e?y7(e.value):y7(e)}function S7(e,t,n){function r(){return Hie(e,n)}if(n&&e!=null)return n(e);if(e&&typeof e==`object`&&`label`in e&&e.label!=null)return e.label;if(t&&!Array.isArray(t))return t[e]??r();if(Array.isArray(t)){let n=t,i=b7(n)?n.flatMap(e=>e.items):n;if(typeof e!=`object`||!e){let t=i.find(t=>t.value===e);return t&&t.label!=null?t.label:r()}if(`value`in e){let t=i.find(t=>t&&t.value===e.value);if(t&&t.label!=null)return t.label}}return r()}function Uie(e,t,n){return e.reduce((e,r,i)=>(i>0&&e.push(`, `),e.push((0,G.jsx)(b.Fragment,{children:S7(r,t,n)},i)),e),[])}var C7={id:v5(e=>e.id),labelId:v5(e=>e.labelId),modal:v5(e=>e.modal),multiple:v5(e=>e.multiple),items:v5(e=>e.items),itemToStringLabel:v5(e=>e.itemToStringLabel),itemToStringValue:v5(e=>e.itemToStringValue),isItemEqualToValue:v5(e=>e.isItemEqualToValue),value:v5(e=>e.value),hasSelectedValue:v5(e=>{let{value:t,multiple:n,itemToStringValue:r}=e;return t==null?!1:n&&Array.isArray(t)?t.length>0:x7(t,r)!==``}),hasNullItemLabel:v5((e,t)=>t?Vie(e.items):!1),open:v5(e=>e.open),mounted:v5(e=>e.mounted),forceMount:v5(e=>e.forceMount),transitionStatus:v5(e=>e.transitionStatus),openMethod:v5(e=>e.openMethod),activeIndex:v5(e=>e.activeIndex),selectedIndex:v5(e=>e.selectedIndex),isActive:v5((e,t)=>e.activeIndex===t),isSelected:v5((e,t,n)=>{let r=e.isItemEqualToValue,i=e.value;return e.multiple?Array.isArray(i)&&i.some(e=>_7(n,e,r)):e.selectedIndex===t&&e.selectedIndex!==null?!0:_7(n,i,r)}),isSelectedByFocus:v5((e,t)=>e.selectedIndex===t),popupProps:v5(e=>e.popupProps),triggerProps:v5(e=>e.triggerProps),triggerElement:v5(e=>e.triggerElement),positionerElement:v5(e=>e.positionerElement),listElement:v5(e=>e.listElement),scrollUpArrowVisible:v5(e=>e.scrollUpArrowVisible),scrollDownArrowVisible:v5(e=>e.scrollDownArrowVisible),hasScrollArrows:v5(e=>e.hasScrollArrows)};function Wie(e){let{id:t,value:n,defaultValue:r=null,onValueChange:i,open:a,defaultOpen:o=!1,onOpenChange:s,name:c,autoComplete:l,disabled:u=!1,readOnly:d=!1,required:f=!1,modal:p=!0,actionsRef:m,inputRef:h,onOpenChangeComplete:g,items:_,multiple:v=!1,itemToStringLabel:y,itemToStringValue:x,isItemEqualToValue:S=Rie,highlightItemOnHover:C=!0,children:w}=e,{clearErrors:T}=c7(),{setDirty:E,setTouched:D,setFocused:O,shouldValidateOnChange:k,validityData:A,setFilled:j,name:M,disabled:N,validation:P,validationMode:F}=s7(),I=u7({id:t}),L=N||u,R=M??c,[z,B]=A1({controlled:n,default:v?r??_E:r,name:`Select`,state:`value`}),[V,H]=A1({controlled:a,default:o,name:`Select`,state:`open`}),U=b.useRef([]),ee=b.useRef([]),W=b.useRef(null),te=b.useRef(null),ne=b.useRef(0),re=b.useRef(null),ie=b.useRef([]),ae=b.useRef(!1),oe=b.useRef(!1),se=b.useRef(null),ce=b.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}),le=b.useRef(!1),{mounted:ue,setMounted:de,transitionStatus:fe}=z4(V),{openMethod:pe,triggerProps:me}=t7(V),he=zT(()=>new S5({id:I,labelId:void 0,modal:p,multiple:v,itemToStringLabel:y,itemToStringValue:x,isItemEqualToValue:S,value:z,open:V,mounted:ue,transitionStatus:fe,items:_,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:{},triggerProps:{},triggerElement:null,positionerElement:null,listElement:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1})).current,ge=x5(he,C7.activeIndex),_e=x5(he,C7.selectedIndex),ve=x5(he,C7.triggerElement),ye=x5(he,C7.positionerElement),be=b.useMemo(()=>v&&Array.isArray(z)&&z.length===0?``:x7(z,x),[v,z,x]),xe=b.useMemo(()=>v&&Array.isArray(z)?z.map(e=>x7(e,x)):x7(z,x),[v,z,x]),Se=m6(he.state.triggerElement);d7({id:I,commit:P.commit,value:z,controlRef:Se,name:R,getValue:()=>xe});let Ce=b.useRef(z);$(()=>{z!==Ce.current&&he.set(`forceMount`,!0)},[he,z]),$(()=>{j(v?Array.isArray(z)&&z.length>0:z!=null)},[v,z,j]),$(function(){if(V)return;let e=ie.current;if(v){let t=Array.isArray(z)?z:[];if(t.length===0){he.set(`selectedIndex`,null);return}let n=t[t.length-1],r=v7(e,n,S);he.set(`selectedIndex`,r===-1?null:r);return}let t=v7(e,z,S);he.set(`selectedIndex`,t===-1?null:t)},[v,V,z,ie,S,he]),e7(z,()=>{T(R),E(z!==A.initialValue),k()?P.commit(z):P.commit(z,!0)});let we=VT((e,t)=>{if(s?.(e,t),!t.isCanceled&&(H(e),!e&&(t.reason===`focus-out`||t.reason===`outside-press`)&&(D(!0),O(!1),F===`onBlur`&&P.commit(z)),!e&&he.state.activeIndex!==null)){let e=U.current[he.state.activeIndex];queueMicrotask(()=>{e?.setAttribute(`tabindex`,`-1`)})}}),Te=VT(()=>{de(!1),he.set(`activeIndex`,null),g?.(!1)});R4({enabled:!m,open:V,ref:W,onComplete(){V||Te()}}),b.useImperativeHandle(m,()=>({unmount:Te}),[Te]);let Ee=VT((e,t)=>{i?.(e,t),!t.isCanceled&&B(e)}),De=VT(()=>{let e=he.state.listElement||W.current;if(!e)return;let t=e.scrollTop,n=e.scrollTop+e.clientHeight,r=t>1,i=n<e.scrollHeight-1;he.state.scrollUpArrowVisible!==r&&he.set(`scrollUpArrowVisible`,r),he.state.scrollDownArrowVisible!==i&&he.set(`scrollDownArrowVisible`,i)}),Oe=j5({open:V,onOpenChange:we,elements:{reference:ve,floating:ye}}),{getReferenceProps:ke,getFloatingProps:Ae,getItemProps:je}=F5([a8(Oe,{enabled:!d&&!L,event:`mousedown`}),l8(Oe,{bubbles:!1}),Gre(Oe,{enabled:!d&&!L,listRef:U,activeIndex:ge,selectedIndex:_e,disabledIndices:_E,onNavigate(e){e===null&&!V||he.set(`activeIndex`,e)},focusItemOnHover:!1}),qre(Oe,{enabled:!d&&!L&&(V||!v),listRef:ee,activeIndex:ge,selectedIndex:_e,onMatch(e){V?he.set(`activeIndex`,e):Ee(ie.current[e],m0(`none`))},onTypingChange(e){ae.current=e}})]),Me=b.useMemo(()=>WT(ke(),me,I?{id:I}:vE),[ke,me,I]);Y5(()=>{he.update({popupProps:Ae(),triggerProps:Me})}),$(()=>{he.update({id:I,modal:p,multiple:v,value:z,open:V,mounted:ue,transitionStatus:fe,popupProps:Ae(),triggerProps:Me,items:_,itemToStringLabel:y,itemToStringValue:x,isItemEqualToValue:S,openMethod:pe})},[he,I,p,v,z,V,ue,fe,Ae,Me,_,y,x,S,pe]);let Ne=b.useMemo(()=>({store:he,name:R,required:f,disabled:L,readOnly:d,multiple:v,itemToStringLabel:y,itemToStringValue:x,highlightItemOnHover:C,setValue:Ee,setOpen:we,listRef:U,popupRef:W,scrollHandlerRef:te,handleScrollArrowVisibility:De,scrollArrowsMountedCountRef:ne,getItemProps:je,events:Oe.context.events,valueRef:re,valuesRef:ie,labelsRef:ee,typingRef:ae,selectionRef:ce,selectedItemTextRef:se,validation:P,onOpenChangeComplete:g,keyboardActiveRef:oe,alignItemWithTriggerActiveRef:le,initialValueRef:Ce}),[he,R,f,L,d,v,y,x,C,Ee,we,je,Oe.context.events,P,g,De]),Pe=iE(h,P.inputRef),Fe=v&&Array.isArray(z)&&z.length>0,Ie=v?void 0:R,Le=b.useMemo(()=>!v||!Array.isArray(z)||!R?null:z.map(e=>{let t=x7(e,x);return(0,G.jsx)(`input`,{type:`hidden`,name:R,value:t},t)}),[v,z,R,x]);return(0,G.jsx)(p7.Provider,{value:Ne,children:(0,G.jsxs)(m7.Provider,{value:Oe,children:[w,(0,G.jsx)(`input`,{...P.getInputValidationProps({onFocus(){he.state.triggerElement?.focus({focusVisible:!0})},onChange(e){if(e.nativeEvent.defaultPrevented)return;let t=e.target.value,n=m0(n0,e.nativeEvent);function r(){if(v)return;let e=ie.current.find(e=>x7(e,x).toLowerCase()===t.toLowerCase());e!=null&&(E(e!==A.initialValue),Ee(e,n),k()&&P.commit(e))}he.set(`forceMount`,!0),queueMicrotask(r)}}),id:I&&Ie==null?`${I}-hidden-input`:void 0,name:Ie,autoComplete:l,value:be,disabled:L,required:f&&!Fe,readOnly:d,ref:Pe,style:R?v6:_6,tabIndex:-1,"aria-hidden":!0}),Le]})})}function Gie(e,t){return e??t}function Kie(e){let t=e.getBoundingClientRect(),n=window.getComputedStyle(e,`::before`),r=window.getComputedStyle(e,`::after`);if(!(n.content!==`none`||r.content!==`none`))return t;let i=parseFloat(n.width)||0,a=parseFloat(n.height)||0,o=parseFloat(r.width)||0,s=parseFloat(r.height)||0,c=Math.max(t.width,i,o),l=Math.max(t.height,a,s),u=c-t.width,d=l-t.height;return{left:t.left-u/2,right:t.right+u/2,top:t.top-d/2,bottom:t.bottom+d/2}}var w7=2,qie=400,T7=200,Jie={...n6,...o7,value:()=>null},Yie=b.forwardRef(function(e,t){let{render:n,className:r,id:i,disabled:a=!1,nativeButton:o=!0,...s}=e,{setTouched:c,setFocused:l,validationMode:u,state:d,disabled:f}=s7(),{labelId:p}=l7(),{store:m,setOpen:h,selectionRef:g,validation:_,readOnly:v,required:y,alignItemWithTriggerActiveRef:x,disabled:S,keyboardActiveRef:C}=h7(),w=f||S||a,T=x5(m,C7.open),E=x5(m,C7.value),D=x5(m,C7.triggerProps),O=x5(m,C7.positionerElement),k=x5(m,C7.listElement),A=x5(m,C7.id),j=x5(m,C7.labelId),M=x5(m,C7.hasSelectedValue),N=!M&&T,P=x5(m,C7.hasNullItemLabel,N),F=i??A,I=Gie(p,j);u7({id:F});let L=m6(O),R=b.useRef(null),{getButtonProps:z,buttonRef:B}=tE({disabled:w,native:o}),V=iE(t,R,B,VT(e=>{m.set(`triggerElement`,e)})),H=l6(),U=l6(),ee=l6(),W=l6();b.useEffect(()=>{if(T)return M||P?W.start(T7,()=>{g.current.allowUnselectedMouseUp=!0,ee.start(T7,()=>{g.current.allowSelectedMouseUp=!0})}):ee.start(qie,()=>{g.current.allowUnselectedMouseUp=!0,g.current.allowSelectedMouseUp=!0}),()=>{ee.clear(),W.clear()};g.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1},U.clear()},[T,M,P,g,U,ee,W]);let te=b.useMemo(()=>k?.id??V0(O)?.id,[k,O]),ne=WT(D,{id:F,role:`combobox`,"aria-expanded":T?`true`:`false`,"aria-haspopup":`listbox`,"aria-controls":T?te:void 0,"aria-labelledby":I,"aria-readonly":v||void 0,"aria-required":y||void 0,tabIndex:w?-1:0,ref:V,onFocus(e){l(!0),T&&x.current&&h(!1,m0(n0,e.nativeEvent)),H.start(0,()=>{m.set(`forceMount`,!0)})},onBlur(e){P0(O,e.relatedTarget)||(c(!0),l(!1),u===`onBlur`&&_.commit(E))},onPointerMove(){C.current=!1},onKeyDown(){C.current=!0},onMouseDown(e){if(T)return;let t=W1(e.currentTarget);function n(e){if(!R.current)return;let t=e.target;if(P0(R.current,t)||P0(L.current,t)||t===R.current)return;let n=Kie(R.current);e.clientX>=n.left-w7&&e.clientX<=n.right+w7&&e.clientY>=n.top-w7&&e.clientY<=n.bottom+w7||h(!1,m0(d0,e))}U.start(0,()=>{t.addEventListener(`mouseup`,n,{once:!0})})}},_.getValidationProps,s,z);ne.role=`combobox`;let re={...d,open:T,disabled:w,value:E,readOnly:v,placeholder:!M};return CE(`button`,e,{ref:[t,R],state:re,stateAttributesMapping:Jie,props:ne})}),Xie={value:()=>null},Zie=b.forwardRef(function(e,t){let{className:n,render:r,children:i,placeholder:a,...o}=e,{store:s,valueRef:c}=h7(),l=x5(s,C7.value),u=x5(s,C7.items),d=x5(s,C7.itemToStringLabel),f=x5(s,C7.hasSelectedValue),p=!f&&a!=null&&i==null,m=x5(s,C7.hasNullItemLabel,p),h={value:l,placeholder:!f},g=null;return g=typeof i==`function`?i(l):i??(!f&&a!=null&&!m?a:Array.isArray(l)?Uie(l,u,d):S7(l,u,d)),CE(`span`,e,{state:h,ref:[t,c],props:[{children:g},o],stateAttributesMapping:Xie})}),Qie=b.forwardRef(function(e,t){let{className:n,render:r,...i}=e,{store:a}=h7();return CE(`span`,e,{state:{open:x5(a,C7.open)},ref:t,props:[{"aria-hidden":!0,children:`▼`},i],stateAttributesMapping:t6})}),$ie=b.createContext(void 0),eae=b.forwardRef(function(e,t){let{store:n}=h7(),r=x5(n,C7.mounted),i=x5(n,C7.forceMount);return r||i?(0,G.jsx)($ie.Provider,{value:!0,children:(0,G.jsx)(z6,{ref:t,...e})}):null}),tae=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,offsetParent:d=`real`}=i2(e,t)||{};if(l==null)return{};let f=S2(u),p={x:n,y:r},m=u2(i),h=c2(m),g=await o.getDimensions(l),_=m===`y`,v=_?`top`:`left`,y=_?`bottom`:`right`,b=_?`clientHeight`:`clientWidth`,x=a.reference[h]+a.reference[m]-p[m]-a.floating[h],S=p[m]-a.reference[m],C=d===`real`?await o.getOffsetParent?.(l):s.floating,w=s.floating[b]||a.floating[h];(!w||!await o.isElement?.(C))&&(w=s.floating[b]||a.floating[h]);let T=x/2-S/2,E=w/2-g[h]/2-1,D=Math.min(f[v],E),O=Math.min(f[y],E),k=D,A=w-g[h]-O,j=w/2-g[h]/2+T,M=r2(k,j,A),N=!c.arrow&&o2(i)!=null&&j!==M&&a.reference[h]/2-(j<k?D:O)-g[h]/2<0,P=N?j<k?j-k:j-A:0;return{[m]:p[m]+P,data:{[m]:M,centerOffset:j-M-P,...N&&{alignmentOffset:P}},reset:N}}}),nae=(e,t)=>({...tae(e),options:[e,t]}),rae={name:`hide`,async fn(e){let{width:t,height:n,x:r,y:i}=e.rects.reference,a=t===0&&n===0&&r===0&&i===0;return{data:{referenceHidden:(await nre().fn(e)).data?.referenceHidden||a}}}},E7={sideX:`left`,sideY:`top`},iae={name:`adaptiveOrigin`,async fn(e){let{x:t,y:n,rects:{floating:r},elements:{floating:i},platform:a,strategy:o,placement:s}=e,c=yT(i),l=c.getComputedStyle(i);if(!(l.transitionDuration!==`0s`&&l.transitionDuration!==``))return{x:t,y:n,data:E7};let u=await a.getOffsetParent?.(i),d={width:0,height:0};if(o===`fixed`&&c?.visualViewport)d={width:c.visualViewport.width,height:c.visualViewport.height};else if(u===c){let e=W1(i);d={width:e.documentElement.clientWidth,height:e.documentElement.clientHeight}}else await a.isElement?.(u)&&(d=await a.getDimensions(u));let f=a2(s),p=t,m=n;f===`left`&&(p=d.width-(t+r.width)),f===`top`&&(m=d.height-(n+r.height));let h=f===`left`?`right`:E7.sideX,g=f===`top`?`bottom`:E7.sideY;return{x:p,y:m,data:{sideX:h,sideY:g}}}};function D7(e,t,n){let r=e===`inline-start`||e===`inline-end`;return{top:`top`,right:r?n?`inline-start`:`inline-end`:`right`,bottom:`bottom`,left:r?n?`inline-end`:`inline-start`:`left`}[t]}function O7(e,t,n){let{rects:r,placement:i}=e;return{side:D7(t,a2(i),n),align:o2(i)||`center`,anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function k7(e){let{anchor:t,positionMethod:n=`absolute`,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,collisionBoundary:s,collisionPadding:c=5,sticky:l=!1,arrowPadding:u=5,disableAnchorTracking:d=!1,keepMounted:f=!1,floatingRootContext:p,mounted:m,collisionAvoidance:h,shiftCrossAxis:g=!1,nodeId:_,adaptiveOrigin:v,lazyFlip:y=!1,externalTree:x}=e,[S,C]=b.useState(null);!m&&S!==null&&C(null);let w=h.side||`flip`,T=h.align||`flip`,E=h.fallbackAxisSide||`end`,D=typeof t==`function`?t:void 0,O=VT(D),k=D?O:t,A=m6(t),j=R1()===`rtl`,M=S||{top:`top`,right:`right`,bottom:`bottom`,left:`left`,"inline-end":j?`left`:`right`,"inline-start":j?`right`:`left`}[r],N=a===`center`?M:`${M}-${a}`,P=c,F=r===`bottom`?1:0,I=r===`top`?1:0,L=r===`right`?1:0,R=r===`left`?1:0;typeof P==`number`?P={top:P+F,right:P+R,bottom:P+I,left:P+L}:P&&={top:(P.top||0)+F,right:(P.right||0)+R,bottom:(P.bottom||0)+I,left:(P.left||0)+L};let z={boundary:s===`clipping-ancestors`?`clippingAncestors`:s,padding:P},B=b.useRef(null),V=m6(i),H=m6(o),U=[Zne(e=>{let t=O7(e,r,j),n=typeof V.current==`function`?V.current(t):V.current,i=typeof H.current==`function`?H.current(t):H.current;return{mainAxis:n,crossAxis:i,alignmentAxis:i}},[typeof i==`function`?0:i,typeof o==`function`?0:o,j,r])],ee=T===`none`&&w!==`shift`,W=!ee&&(l||g||w===`shift`),te=w===`none`?null:ere({...z,padding:{top:P.top+1,right:P.right+1,bottom:P.bottom+1,left:P.left+1},mainAxis:!g&&w===`flip`,crossAxis:T===`flip`?`alignment`:!1,fallbackAxisSideDirection:E}),ne=ee?null:Qne(e=>{let t=W1(e.elements.floating).documentElement;return{...z,rootBoundary:g?{x:0,y:0,width:t.clientWidth,height:t.clientHeight}:void 0,mainAxis:T!==`none`,crossAxis:W,limiter:l||g?void 0:$ne(e=>{if(!B.current)return{};let{width:t,height:n}=B.current.getBoundingClientRect(),r=l2(a2(e.placement)),i=r===`y`?t:n,a=r===`y`?P.left+P.right:P.top+P.bottom;return{offset:i/2+a/2}})}},[z,l,g,P,T]);w===`shift`||T===`shift`||a===`center`?U.push(ne,te):U.push(te,ne),U.push(tre({...z,apply({elements:{floating:e},availableWidth:t,availableHeight:n,rects:r}){let i=e.style;i.setProperty(`--available-width`,`${t}px`),i.setProperty(`--available-height`,`${n}px`);let a=window.devicePixelRatio||1,{x:o,y:s,width:c,height:l}=r.reference,u=(Math.round((o+c)*a)-Math.round(o*a))/a,d=(Math.round((s+l)*a)-Math.round(s*a))/a;i.setProperty(`--anchor-width`,`${u}px`),i.setProperty(`--anchor-height`,`${d}px`)}}),nae(()=>({element:B.current||document.createElement(`div`),padding:u,offsetParent:`floating`}),[u]),{name:`transformOrigin`,fn(e){let{elements:t,middlewareData:n,placement:a,rects:o,y:s}=e,c=a2(a),l=l2(c),u=B.current,d=n.arrow?.x||0,f=n.arrow?.y||0,p=u?.clientWidth||0,m=u?.clientHeight||0,h=d+p/2,g=f+m/2,_=Math.abs(n.shift?.y||0),v=o.reference.height/2,y=typeof i==`function`?i(O7(e,r,j)):i,b=_>y,x={top:`${h}px calc(100% + ${y}px)`,bottom:`${h}px ${-y}px`,left:`calc(100% + ${y}px) ${g}px`,right:`${-y}px ${g}px`}[c],S=`${h}px ${o.reference.y+v-s}px`;return t.floating.style.setProperty(`--transform-origin`,W&&l===`y`&&b?S:x),{}}},rae,v),$(()=>{!m&&p&&p.update({referenceElement:null,floatingElement:null,domReferenceElement:null})},[m,p]);let re=b.useMemo(()=>({elementResize:!d&&typeof ResizeObserver<`u`,layoutShift:!d&&typeof IntersectionObserver<`u`}),[d]),{refs:ie,elements:ae,x:oe,y:se,middlewareData:ce,update:le,placement:ue,context:de,isPositioned:fe,floatingStyles:pe}=Pre({rootContext:p,placement:N,middleware:U,strategy:n,whileElementsMounted:f?void 0:(...e)=>$8(...e,re),nodeId:_,externalTree:x}),{sideX:me,sideY:he}=ce.adaptiveOrigin||E7,ge=fe?n:`fixed`,_e=b.useMemo(()=>{let e=v?{position:ge,[me]:oe,[he]:se}:{position:ge,...pe};return fe||(e.opacity=0),e},[v,ge,me,oe,he,se,pe,fe]),ve=b.useRef(null);$(()=>{if(!m)return;let e=A.current,t=typeof e==`function`?e():e,n=(A7(t)?t.current:t)||null;n!==ve.current&&(ie.setPositionReference(n),ve.current=n)},[m,ie,k,A]),b.useEffect(()=>{if(!m)return;let e=A.current;typeof e!=`function`&&A7(e)&&e.current!==ve.current&&(ie.setPositionReference(e.current),ve.current=e.current)},[m,ie,k,A]),b.useEffect(()=>{if(f&&m&&ae.domReference&&ae.floating)return $8(ae.domReference,ae.floating,le,re)},[f,m,ae,le,re]);let ye=a2(ue),be=D7(r,ye,j),xe=o2(ue)||`center`,Se=!!ce.hide?.referenceHidden;$(()=>{y&&m&&fe&&C(ye)},[y,m,fe,ye]);let Ce=b.useMemo(()=>({position:`absolute`,top:ce.arrow?.y,left:ce.arrow?.x}),[ce.arrow]),we=ce.arrow?.centerOffset!==0;return b.useMemo(()=>({positionerStyles:_e,arrowStyles:Ce,arrowRef:B,arrowUncentered:we,side:be,align:xe,physicalSide:ye,anchorHidden:Se,refs:ie,context:de,isPositioned:fe,update:le}),[_e,Ce,B,we,be,xe,ye,Se,ie,de,fe,le])}function A7(e){return e!=null&&`current`in e}var j7=b.createContext(void 0);function M7(){let e=b.useContext(j7);if(!e)throw Error(ZT(59));return e}function N7(e){return e===`starting`?yE:vE}function P7(e,t){e&&Object.assign(e.style,t)}var F7={position:`relative`,maxHeight:`100%`,overflowX:`hidden`,overflowY:`auto`},aae={position:`fixed`},oae=b.forwardRef(function(e,t){let{anchor:n,positionMethod:r=`absolute`,className:i,render:a,side:o=`bottom`,align:s=`center`,sideOffset:c=0,alignOffset:l=0,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d,arrowPadding:f=5,sticky:p=!1,disableAnchorTracking:m,alignItemWithTrigger:h=!0,collisionAvoidance:g=bE,..._}=e,{store:v,listRef:y,labelsRef:x,alignItemWithTriggerActiveRef:S,selectedItemTextRef:C,valuesRef:w,initialValueRef:T,popupRef:E,setValue:D}=h7(),O=g7(),k=x5(v,C7.open),A=x5(v,C7.mounted),j=x5(v,C7.modal),M=x5(v,C7.value),N=x5(v,C7.openMethod),P=x5(v,C7.positionerElement),F=x5(v,C7.triggerElement),I=x5(v,C7.isItemEqualToValue),L=x5(v,C7.transitionStatus),R=b.useRef(null),z=b.useRef(null),[B,V]=b.useState(h),H=A&&B&&N!==`touch`;!A&&B!==h&&V(h),$(()=>{A||(C7.scrollUpArrowVisible(v.state)&&v.set(`scrollUpArrowVisible`,!1),C7.scrollDownArrowVisible(v.state)&&v.set(`scrollDownArrowVisible`,!1))},[v,A]),b.useImperativeHandle(S,()=>H),$5((H||j)&&k&&N!==`touch`,F);let U=k7({anchor:n,floatingRootContext:O,positionMethod:r,mounted:A,side:o,sideOffset:c,align:s,alignOffset:l,arrowPadding:f,collisionBoundary:u,collisionPadding:d,sticky:p,disableAnchorTracking:m??H,collisionAvoidance:g,keepMounted:!0}),ee=H?`none`:U.side,W=H?aae:U.positionerStyles,te=b.useMemo(()=>{let e={};return k||(e.pointerEvents=`none`),{role:`presentation`,hidden:!A,style:{...W,...e}}},[k,A,W]),ne={open:k,side:ee,align:U.align,anchorHidden:U.anchorHidden},re=CE(`div`,e,{ref:[t,VT(e=>{v.set(`positionerElement`,e)})],state:ne,stateAttributesMapping:r6,props:[te,N7(L),_]}),ie=b.useRef(0),ae=VT(e=>{if(e.size===0&&ie.current===0||w.current.length===0)return;let t=ie.current;if(ie.current=e.size,e.size===t)return;let n=m0(n0);if(t!==0&&!v.state.multiple&&M!==null&&v7(w.current,M,I)===-1){let e=T.current,t=e!=null&&v7(w.current,e,I)!==-1?e:null;D(t,n),t===null&&(v.set(`selectedIndex`,null),C.current=null)}if(t!==0&&v.state.multiple&&Array.isArray(M)){let e=e=>v7(w.current,e,I)!==-1,t=M.filter(t=>e(t));(t.length!==M.length||t.some(e=>!zie(M,e,I)))&&(D(t,n),t.length===0&&(v.set(`selectedIndex`,null),C.current=null))}if(k&&H){v.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});let e={height:``};P7(P,e),P7(E.current,e)}}),oe=b.useMemo(()=>({...U,side:ee,alignItemWithTriggerActive:H,setControlledAlignItemWithTrigger:V,scrollUpArrowRef:R,scrollDownArrowRef:z}),[U,ee,H,V]);return(0,G.jsx)(N1,{elementsRef:y,labelsRef:x,onMapChange:ae,children:(0,G.jsxs)(j7.Provider,{value:oe,children:[A&&j&&(0,G.jsx)(J5,{inert:D4(!k),cutout:F}),re]})})});function I7(e){let t=e.currentTarget.getBoundingClientRect();return t.top+1<=e.clientY&&e.clientY<=t.bottom-1&&t.left+1<=e.clientX&&e.clientX<=t.right-1}var L7=`base-ui-disable-scrollbar`,R7={className:L7,getElement(e){return(0,G.jsx)(`style`,{nonce:e,href:L7,precedence:`base-ui:low`,children:`.${L7}{scrollbar-width:none}.${L7}::-webkit-scrollbar{display:none}`})}},sae=b.createContext(void 0);function z7(e){let t=b.useContext(sae);if(t===void 0&&!e)throw Error(ZT(69));return t}function B7(e,t=-(2**53-1),n=2**53-1){return Math.max(t,Math.min(e,n))}var V7=1,cae={...r6,...j4},lae=b.forwardRef(function(e,t){let{render:n,className:r,finalFocus:i,...a}=e,{store:o,popupRef:s,onOpenChangeComplete:c,setOpen:l,valueRef:u,selectedItemTextRef:d,keyboardActiveRef:f,multiple:p,handleScrollArrowVisibility:m,scrollHandlerRef:h,highlightItemOnHover:g}=h7(),{side:_,align:v,alignItemWithTriggerActive:y,setControlledAlignItemWithTrigger:x,scrollDownArrowRef:S,scrollUpArrowRef:C}=M7(),w=z7(!0)!=null,T=g7(),{nonce:E,disableStyleElements:D}=E4(),O=l6(),k=x5(o,C7.id),A=x5(o,C7.open),j=x5(o,C7.mounted),M=x5(o,C7.popupProps),N=x5(o,C7.transitionStatus),P=x5(o,C7.triggerElement),F=x5(o,C7.positionerElement),I=x5(o,C7.listElement),L=b.useRef(0),R=b.useRef(!1),z=b.useRef(0),B=b.useRef(!1),V=b.useRef({}),H=F4(),U=VT(e=>{if(!F||!s.current||!B.current)return;if(R.current||!y){m();return}let t=F.style.top===`0px`,n=F.style.bottom===`0px`,r=F.getBoundingClientRect().height,i=W1(F),a=getComputedStyle(F),o=parseFloat(a.marginTop),c=parseFloat(a.marginBottom),l=H7(getComputedStyle(s.current)),u=Math.min(i.documentElement.clientHeight-o-c,l),d=e.scrollTop,f=U7(e),p=0,h=null,g=!1,_=!1,v=e=>{F.style.height=`${e}px`},b=(t,n)=>{let i=B7(t,0,u-r);i>0&&v(r+i),e.scrollTop=n,u-(r+i)<=V7&&(R.current=!0),m()};if(t){let e=f-d,t=r+e,n=Math.min(t,u);if(p=n,e<=V7){b(e,f);return}u-n>V7?_=!0:g=!0}else if(n){let e=d,t=r+e,n=Math.min(t,u),i=t-u;if(p=n,e<=V7){b(e,0);return}u-n>V7?h=0:(g=!0,d<f&&(h=d-(e-i)))}if(p=Math.ceil(p),p!==0&&v(p),_||h!=null){let t=U7(e),n=_?t:B7(h,0,t);Math.abs(e.scrollTop-n)>V7&&(e.scrollTop=n)}(g||p>=u-V7)&&(R.current=!0),m()});b.useImperativeHandle(h,()=>U,[U]),R4({open:A,ref:s,onComplete(){A&&c?.(!0)}});let ee={open:A,transitionStatus:N,side:_,align:v};$(()=>{!F||!s.current||Object.keys(V.current).length||(V.current={top:F.style.top||`0`,left:F.style.left||`0`,right:F.style.right,height:F.style.height,bottom:F.style.bottom,minHeight:F.style.minHeight,maxHeight:F.style.maxHeight,marginTop:F.style.marginTop,marginBottom:F.style.marginBottom})},[s,F]),$(()=>{A||y||(B.current=!1,R.current=!1,L.current=0,z.current=0,P7(F,V.current))},[A,y,F,s]),$(()=>{let e=s.current;if(!(!A||!P||!F||!e||o.state.transitionStatus===`ending`)){if(!y){B.current=!0,H.request(m),e.style.removeProperty(`--transform-origin`);return}queueMicrotask(()=>{let t=dae(e);e.style.removeProperty(`--transform-origin`);try{let t=getComputedStyle(F),n=getComputedStyle(e),r=W1(P),i=yT(F),a=uae(P),o=W7(P.getBoundingClientRect(),a),s=W7(F.getBoundingClientRect(),a),c=o.left,l=o.height,f=I||e,p=f.scrollHeight,h=parseFloat(n.borderBottomWidth),g=parseFloat(t.marginTop)||10,_=parseFloat(t.marginBottom)||10,v=parseFloat(t.minHeight)||100,y=H7(n),b=r.documentElement.clientHeight-g-_,S=r.documentElement.clientWidth,C=b-o.bottom+l,w=d.current,T=u.current,E,D=0,O=0;if(w&&T){let e=W7(T.getBoundingClientRect(),a);E=W7(w.getBoundingClientRect(),a);let t=e.left-c,n=E.left-s.left,r=e.top-o.top+e.height/2,i=E.top-s.top+E.height/2;D=t-n,O=i-r}let k=C+O+_+h,A=Math.min(b,k),j=b-g-_,M=k-A,N=Math.max(5,c+D),z=S-5,H=Math.max(0,N+s.width-z);F.style.left=`${N-H}px`,F.style.height=`${A}px`,F.style.maxHeight=`auto`,F.style.marginTop=`${g}px`,F.style.marginBottom=`${_}px`,e.style.height=`100%`;let U=U7(f),ee=M>=U-V7;ee&&(A=Math.min(b,s.height)-(M-U));let W=o.top<20||o.bottom>b-20||Math.ceil(A)+V7<Math.min(p,v),te=(i.visualViewport?.scale??1)!==1&&y0;if(W||te){B.current=!0,P7(F,V.current),Rq.flushSync(()=>x(!1));return}if(ee){let e=Math.max(0,b-k);F.style.top=s.height>=j?`0`:`${e}px`,F.style.height=`${A}px`,f.scrollTop=U7(f),L.current=Math.max(v,A)}else F.style.bottom=`0`,L.current=Math.max(v,A),f.scrollTop=M;if(E){let t=s.top,n=s.height,r=E.top+E.height/2,i=B7(n>0?(r-t)/n*100:50,0,100);e.style.setProperty(`--transform-origin`,`50% ${i}%`)}(L.current===b||A>=y)&&(R.current=!0),m(),setTimeout(()=>{B.current=!0})}finally{t()}})}},[o,A,F,P,u,d,s,m,y,x,H,S,C,I]),b.useEffect(()=>{if(!y||!F||!A)return;let e=yT(F);function t(e){l(!1,m0(p0,e))}return e.addEventListener(`resize`,t),()=>{e.removeEventListener(`resize`,t)}},[l,y,F,A]);let W={...I?{role:`presentation`,"aria-orientation":void 0}:{role:`listbox`,"aria-multiselectable":p||void 0,id:`${k}-list`},onKeyDown(e){f.current=!0,w&&t3.has(e.key)&&e.stopPropagation()},onMouseMove(){f.current=!1},onPointerLeave(e){if(!g||I7(e)||e.pointerType===`touch`)return;let t=e.currentTarget;O.start(0,()=>{o.set(`activeIndex`,null),t.focus({preventScroll:!0})})},onScroll(e){I||U(e.currentTarget)},...y&&{style:I?{height:`100%`}:F7}},te=CE(`div`,e,{ref:[t,s],state:ee,stateAttributesMapping:cae,props:[M,W,N7(N),{className:!I&&y?R7.className:void 0},a]});return(0,G.jsxs)(b.Fragment,{children:[!D&&R7.getElement(E),(0,G.jsx)(i8,{context:T,modal:!1,disabled:!j,returnFocus:i,restoreFocus:!0,children:te})]})});function H7(e){let t=e.maxHeight||``;return t.endsWith(`px`)&&parseFloat(t)||1/0}function U7(e){return Math.max(0,e.scrollHeight-e.clientHeight)}function uae(e){return X8.getScale(e)}function W7(e,t){return C2({x:e.x/t.x,y:e.y/t.y,width:e.width/t.x,height:e.height/t.y})}var G7=[[`transform`,`none`],[`scale`,`1`],[`translate`,`0 0`]];function dae(e){let{style:t}=e,n={};for(let[e,r]of G7)n[e]=t.getPropertyValue(e),t.setProperty(e,r,`important`);return()=>{for(let[e]of G7){let r=n[e];r?t.setProperty(e,r):t.removeProperty(e)}}}var fae=b.forwardRef(function(e,t){let{className:n,render:r,...i}=e,{store:a,scrollHandlerRef:o}=h7(),{alignItemWithTriggerActive:s}=M7(),c=x5(a,C7.hasScrollArrows),l=x5(a,C7.openMethod),u=x5(a,C7.multiple),d={id:`${x5(a,C7.id)}-list`,role:`listbox`,"aria-multiselectable":u||void 0,onScroll(e){o.current?.(e.currentTarget)},...s&&{style:F7},className:c&&l!==`touch`?R7.className:void 0};return CE(`div`,e,{ref:[t,VT(e=>{a.set(`listElement`,e)})],props:[d,i]})}),K7=b.createContext(void 0);function q7(){let e=b.useContext(K7);if(!e)throw Error(ZT(57));return e}var pae=b.memo(b.forwardRef(function(e,t){let{render:n,className:r,value:i=null,label:a,disabled:o=!1,nativeButton:s=!1,...c}=e,l=b.useRef(null),u=Q1({label:a,textRef:l,indexGuessBehavior:Z1.GuessFromOrder}),{store:d,getItemProps:f,setOpen:p,setValue:m,selectionRef:h,typingRef:g,valuesRef:_,keyboardActiveRef:v,multiple:y,highlightItemOnHover:x}=h7(),S=l6(),C=x5(d,C7.isActive,u.index),w=x5(d,C7.isSelected,u.index,i),T=x5(d,C7.isSelectedByFocus,u.index),E=x5(d,C7.isItemEqualToValue),D=u.index,O=D!==-1,k=b.useRef(null),A=m6(D);$(()=>{if(!O)return;let e=_.current;return e[D]=i,()=>{delete e[D]}},[O,D,i,_]),$(()=>{if(!O)return;let e=d.state.value,t=e;y&&Array.isArray(e)&&e.length>0&&(t=e[e.length-1]),t!==void 0&&_7(i,t,E)&&d.set(`selectedIndex`,D)},[O,D,y,E,d,i]);let j={disabled:o,selected:w,highlighted:C},M=f({active:C,selected:w});M.onFocus=void 0,M.id=void 0;let N=b.useRef(null),P=b.useRef(`mouse`),F=b.useRef(!1),{getButtonProps:I,buttonRef:L}=tE({disabled:o,focusableWhenDisabled:!0,native:s,composite:!0});function R(e){let t=d.state.value;if(y){let n=Array.isArray(t)?t:[];m(w?Bie(n,i,E):[...n,i],m0(o0,e))}else m(i,m0(o0,e)),p(!1,m0(o0,e))}let z={role:`option`,"aria-selected":w,tabIndex:C?0:-1,onFocus(){d.set(`activeIndex`,D)},onMouseEnter(){!v.current&&d.state.selectedIndex===null&&x&&d.set(`activeIndex`,D)},onMouseMove(){x&&d.set(`activeIndex`,D)},onMouseLeave(e){!x||v.current||I7(e)||S.start(0,()=>{d.state.activeIndex===D&&d.set(`activeIndex`,null)})},onTouchStart(){h.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}},onKeyDown(e){N.current=e.key,d.set(`activeIndex`,D),e.key===` `&&g.current&&e.preventDefault()},onClick(e){F.current=!1,!(e.type===`keydown`&&N.current===null)&&(o||e.type===`keydown`&&N.current===` `&&g.current||P.current!==`touch`&&!C||(N.current=null,R(e.nativeEvent)))},onPointerEnter(e){P.current=e.pointerType},onPointerDown(e){P.current=e.pointerType,F.current=!0},onMouseUp(){if(o)return;if(F.current){F.current=!1;return}let e=!h.current.allowSelectedMouseUp&&w,t=!h.current.allowUnselectedMouseUp&&!w;e||t||P.current!==`touch`&&!C||k.current?.click()}},B=CE(`div`,e,{ref:[L,t,u.ref,k],state:j,props:[M,z,c,I]}),V=b.useMemo(()=>({selected:w,indexRef:A,textRef:l,selectedByFocus:T,hasRegistered:O}),[w,A,l,T,O]);return(0,G.jsx)(K7.Provider,{value:V,children:B})})),mae=b.forwardRef(function(e,t){let n=e.keepMounted??!1,{selected:r}=q7();return n||r?(0,G.jsx)(hae,{...e,ref:t}):null}),hae=b.memo(b.forwardRef((e,t)=>{let{render:n,className:r,keepMounted:i,...a}=e,{selected:o}=q7(),s=b.useRef(null),{transitionStatus:c,setMounted:l}=z4(o),u=CE(`span`,e,{ref:[t,s],state:{selected:o,transitionStatus:c},props:[{"aria-hidden":!0,children:`✔️`},a],stateAttributesMapping:j4});return R4({open:o,ref:s,onComplete(){o||l(!1)}}),u})),gae=b.memo(b.forwardRef(function(e,t){let{indexRef:n,textRef:r,selectedByFocus:i,hasRegistered:a}=q7(),{selectedItemTextRef:o}=h7(),{className:s,render:c,...l}=e;return CE(`div`,e,{ref:[b.useCallback(e=>{if(!e||!a)return;let t=o.current===null||!o.current.isConnected;(i||t&&n.current===0)&&(o.current=e)},[o,n,i,a]),t,r],props:l})})),J7=b.forwardRef(function(e,t){let{render:n,className:r,direction:i,keepMounted:a=!1,...o}=e,{store:s,popupRef:c,listRef:l,handleScrollArrowVisibility:u,scrollArrowsMountedCountRef:d}=h7(),{side:f,scrollDownArrowRef:p,scrollUpArrowRef:m}=M7(),h=x5(s,i===`up`?C7.scrollUpArrowVisible:C7.scrollDownArrowVisible),g=x5(s,C7.openMethod),_=h&&g!==`touch`,v=l6(),y=i===`up`?m:p,{transitionStatus:b,setMounted:x}=z4(_);$(()=>(d.current+=1,s.state.hasScrollArrows||s.set(`hasScrollArrows`,!0),()=>{d.current=Math.max(0,d.current-1),d.current===0&&s.state.hasScrollArrows&&s.set(`hasScrollArrows`,!1)}),[s,d]),R4({open:_,ref:y,onComplete(){_||x(!1)}});let S=CE(`div`,e,{ref:[t,y],state:{direction:i,visible:_,side:f,transitionStatus:b},props:[{"aria-hidden":!0,children:i===`up`?`▲`:`▼`,style:{position:`absolute`},onMouseMove(e){if(e.movementX===0&&e.movementY===0||v.isStarted())return;s.set(`activeIndex`,null);function t(){let e=s.state.listElement??c.current;if(!e)return;s.set(`activeIndex`,null),u();let n=e.scrollTop===0,r=Math.round(e.scrollTop+e.clientHeight)>=e.scrollHeight;if(l.current.length===0&&(i===`up`?s.set(`scrollUpArrowVisible`,!n):s.set(`scrollDownArrowVisible`,!r)),i===`up`&&n||i===`down`&&r){v.clear();return}if((s.state.listElement||c.current)&&l.current&&l.current.length>0){let t=l.current,n=y.current?.offsetHeight||0;if(i===`up`){let r=0,i=e.scrollTop+n;for(let e=0;e<t.length;e+=1){let n=t[e];if(n&&n.offsetTop>=i){r=e;break}}let a=Math.max(0,r-1);if(a<r){let r=t[a];r&&(e.scrollTop=Math.max(0,r.offsetTop-n))}else e.scrollTop=0}else{let r=t.length-1,i=e.scrollTop+e.clientHeight-n;for(let e=0;e<t.length;e+=1){let n=t[e];if(n&&n.offsetTop+n.offsetHeight>i){r=Math.max(0,e-1);break}}let a=Math.min(t.length-1,r+1);if(a>r){let r=t[a];r&&(e.scrollTop=r.offsetTop+r.offsetHeight-e.clientHeight+n)}else e.scrollTop=e.scrollHeight-e.clientHeight}}v.start(40,t)}v.start(40,t)},onMouseLeave(){v.clear()}},o]});return _||a?S:null}),_ae=b.forwardRef(function(e,t){return(0,G.jsx)(J7,{...e,ref:t,direction:`down`})}),vae=b.forwardRef(function(e,t){return(0,G.jsx)(J7,{...e,ref:t,direction:`up`})}),yae=b.createContext(void 0),bae=b.forwardRef(function(e,t){let{className:n,render:r,...i}=e,[a,o]=b.useState(),s=b.useMemo(()=>({labelId:a,setLabelId:o}),[a,o]),c=CE(`div`,e,{ref:t,props:[{role:`group`,"aria-labelledby":a},i]});return(0,G.jsx)(yae.Provider,{value:s,children:c})}),Y7=Wie;function X7({className:e,...t}){return(0,G.jsx)(bae,{"data-slot":`select-group`,className:iO(`scroll-my-1`,e),...t})}function Z7({className:e,...t}){return(0,G.jsx)(Zie,{"data-slot":`select-value`,className:iO(`flex flex-1 text-left`,e),...t})}function Q7({className:e,size:t=`default`,children:n,...r}){return(0,G.jsxs)(Yie,{"data-slot":`select-trigger`,"data-size":t,className:iO(`border-input data-[placeholder]:text-muted-foreground dark:bg-input/30 dark:hover:bg-input/50 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:aria-invalid:border-destructive/50 gap-1.5 rounded-none border bg-transparent py-2 pr-2 pl-2.5 text-xs transition-colors select-none focus-visible:ring-1 aria-invalid:ring-1 data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-none *:data-[slot=select-value]:flex *:data-[slot=select-value]:gap-1.5 [&_svg:not([class*='size-'])]:size-4 flex w-fit items-center justify-between whitespace-nowrap outline-none disabled:cursor-not-allowed disabled:opacity-50 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center [&_svg]:pointer-events-none [&_svg]:shrink-0`,e),...r,children:[n,(0,G.jsx)(Qie,{render:(0,G.jsx)(nn,{className:`text-muted-foreground size-4 pointer-events-none`})})]})}function $7({className:e,children:t,side:n=`bottom`,sideOffset:r=4,align:i=`center`,alignOffset:a=0,alignItemWithTrigger:o=!0,...s}){return(0,G.jsx)(eae,{children:(0,G.jsx)(oae,{side:n,sideOffset:r,align:i,alignOffset:a,alignItemWithTrigger:o,className:`isolate z-50`,children:(0,G.jsxs)(lae,{"data-slot":`select-content`,className:iO(`bg-popover text-popover-foreground data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-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 ring-foreground/10 min-w-36 rounded-none shadow-md ring-1 duration-100 relative isolate z-50 max-h-(--available-height) w-(--anchor-width) origin-(--transform-origin) overflow-x-hidden overflow-y-auto`,e),...s,children:[(0,G.jsx)(xae,{}),(0,G.jsx)(fae,{children:t}),(0,G.jsx)(Sae,{})]})})})}function e9({className:e,children:t,...n}){return(0,G.jsxs)(pae,{"data-slot":`select-item`,className:iO(`focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground gap-2 rounded-none py-2 pr-8 pl-2 text-xs [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2 relative flex w-full cursor-default items-center outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0`,e),...n,children:[(0,G.jsx)(gae,{className:`flex flex-1 gap-2 shrink-0 whitespace-nowrap`,children:t}),(0,G.jsx)(mae,{render:(0,G.jsx)(`span`,{className:`pointer-events-none absolute right-2 flex size-4 items-center justify-center`}),children:(0,G.jsx)(tn,{className:`pointer-events-none`})})]})}function xae({className:e,...t}){return(0,G.jsx)(vae,{"data-slot":`select-scroll-up-button`,className:iO(`bg-popover z-10 flex cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-4 top-0 w-full`,e),...t,children:(0,G.jsx)(rn,{})})}function Sae({className:e,...t}){return(0,G.jsx)(_ae,{"data-slot":`select-scroll-down-button`,className:iO(`bg-popover z-10 flex cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-4 bottom-0 w-full`,e),...t,children:(0,G.jsx)(nn,{})})}var t9=b.createContext(void 0);function Cae(){let e=b.useContext(t9);if(e===void 0)throw Error(ZT(63));return e}var n9=function(e){return e.checked=`data-checked`,e.unchecked=`data-unchecked`,e.disabled=`data-disabled`,e.readonly=`data-readonly`,e.required=`data-required`,e.valid=`data-valid`,e.invalid=`data-invalid`,e.touched=`data-touched`,e.dirty=`data-dirty`,e.filled=`data-filled`,e.focused=`data-focused`,e}({}),r9={...o7,checked(e){return e?{[n9.checked]:``}:{[n9.unchecked]:``}}};function wae(e,t,n,r=!0,i){let[a,o]=b.useState(),s=Y1(i?`${i}-label`:void 0),c=e??t??a;return $(()=>{let i=e||t||!r?void 0:Tae(n.current,s);a!==i&&o(i)}),c}function Tae(e,t){let n=Eae(e);if(n)return!n.id&&t&&(n.id=t),n.id||void 0}function Eae(e){if(!e)return;let t=e.parentElement;if(t&&t.tagName===`LABEL`)return t;let n=e.id;if(n){let t=e.nextElementSibling;if(t&&t.htmlFor===n)return t}let r=e.labels;return r&&r[0]}var Dae=b.forwardRef(function(e,t){let{checked:n,className:r,defaultChecked:i,"aria-labelledby":a,id:o,inputRef:s,name:c,nativeButton:l=!1,onCheckedChange:u,readOnly:d=!1,required:f=!1,disabled:p=!1,render:m,uncheckedValue:h,value:g,..._}=e,{clearErrors:v}=c7(),{state:y,setTouched:x,setDirty:S,validityData:C,setFilled:w,setFocused:T,shouldValidateOnChange:E,validationMode:D,disabled:O,name:k,validation:A}=s7(),{labelId:j}=l7(),M=O||p,N=k??c,P=VT(u),F=b.useRef(null),I=iE(F,s,A.inputRef),L=b.useRef(null),R=Y1(),z=u7({id:o,implicit:!1,controlRef:L}),B=l?void 0:z,[V,H]=A1({controlled:n,default:!!i,name:`Switch`,state:`checked`});d7({id:R,commit:A.commit,value:V,controlRef:L,name:N,getValue:()=>V}),$(()=>{F.current&&w(F.current.checked)},[F,w]),e7(V,()=>{v(N),S(V!==C.initialValue),w(V),E()?A.commit(V):A.commit(V,!0)});let{getButtonProps:U,buttonRef:ee}=tE({disabled:M,native:l}),W=wae(a,j,F,!l,B),te={id:l?z:R,role:`switch`,"aria-checked":V,"aria-readonly":d||void 0,"aria-required":f||void 0,"aria-labelledby":W,onFocus(){M||T(!0)},onBlur(){let e=F.current;!e||M||(x(!0),T(!1),D===`onBlur`&&A.commit(e.checked))},onClick(e){d||M||(e.preventDefault(),F.current?.dispatchEvent(new PointerEvent(`click`,{bubbles:!0,shiftKey:e.shiftKey,ctrlKey:e.ctrlKey,altKey:e.altKey,metaKey:e.metaKey})))}},ne=b.useMemo(()=>WT({checked:V,disabled:M,id:B,name:N,required:f,style:N?v6:_6,tabIndex:-1,type:`checkbox`,"aria-hidden":!0,ref:I,onChange(e){if(e.nativeEvent.defaultPrevented)return;let t=e.target.checked,n=m0(n0,e.nativeEvent);P?.(t,n),!n.isCanceled&&H(t)},onFocus(){L.current?.focus()}},A.getInputValidationProps,g===void 0?vE:{value:g}),[V,M,I,B,N,P,f,H,A,g]),re=b.useMemo(()=>({...y,checked:V,disabled:M,readOnly:d,required:f}),[y,V,M,d,f]),ie=CE(`span`,e,{state:re,ref:[t,L,ee],props:[te,A.getValidationProps,_,U],stateAttributesMapping:r9});return(0,G.jsxs)(t9.Provider,{value:re,children:[ie,!V&&N&&h!==void 0&&(0,G.jsx)(`input`,{type:`hidden`,name:N,value:h}),(0,G.jsx)(`input`,{...ne})]})}),Oae=b.forwardRef(function(e,t){let{render:n,className:r,...i}=e,{state:a}=s7(),o=Cae();return CE(`span`,e,{state:{...a,...o},ref:t,stateAttributesMapping:r9,props:i})});function i9({className:e,size:t=`default`,...n}){return(0,G.jsx)(Dae,{"data-slot":`switch`,"data-size":t,className:iO(`cursor-pointer data-checked:bg-primary data-unchecked:bg-input 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:aria-invalid:border-destructive/50 dark:data-unchecked:bg-input/80 shrink-0 rounded-full border border-transparent focus-visible:ring-1 aria-invalid:ring-1 data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] peer group/switch relative inline-flex items-center transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 data-disabled:cursor-not-allowed data-disabled:opacity-50`,e),...n,children:(0,G.jsx)(Oae,{"data-slot":`switch-thumb`,className:`bg-background dark:data-unchecked:bg-foreground dark:data-checked:bg-primary-foreground rounded-full group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0 pointer-events-none block ring-0 transition-transform`})})}function kae({className:e,...t}){return(0,G.jsx)(`div`,{"data-slot":`input-group`,role:`group`,className:iO(`border-input dark:bg-input/30 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[[data-slot][aria-invalid=true]]:border-destructive dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-disabled:bg-input/50 dark:has-disabled:bg-input/80 h-8 rounded-none border transition-colors has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:ring-1 has-[[data-slot][aria-invalid=true]]:ring-1 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5 [[data-slot=combobox-content]_&]:focus-within:border-inherit [[data-slot=combobox-content]_&]:focus-within:ring-0 group/input-group relative flex w-full min-w-0 items-center outline-none has-[>textarea]:h-auto`,e),...t})}var Aae=NE(`text-muted-foreground h-auto gap-2 py-1.5 text-xs font-medium group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-none [&>svg:not([class*='size-'])]:size-4 flex cursor-text items-center justify-center select-none`,{variants:{align:{"inline-start":`pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem] order-first`,"inline-end":`pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem] order-last`,"block-start":`px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2 order-first w-full justify-start`,"block-end":`px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2 order-last w-full justify-start`}},defaultVariants:{align:`inline-start`}});function jae({className:e,align:t=`inline-start`,...n}){return(0,G.jsx)(`div`,{role:`group`,"data-slot":`input-group-addon`,"data-align":t,className:iO(Aae({align:t}),e),onClick:e=>{e.target.closest(`button`)||e.currentTarget.parentElement?.querySelector(`input`)?.focus()},...n})}function Mae({className:e,...t}){return(0,G.jsx)(n1,{"data-slot":`command`,className:iO(`bg-popover text-popover-foreground rounded-none flex size-full flex-col overflow-hidden`,e),...t})}function Nae({className:e,...t}){return(0,G.jsx)(`div`,{"data-slot":`command-input-wrapper`,className:`border-b pb-0`,children:(0,G.jsxs)(kae,{className:`bg-input/30 border-input/30 h-8 border-none shadow-none! *:data-[slot=input-group-addon]:pl-2!`,children:[(0,G.jsx)(n1.Input,{"data-slot":`command-input`,className:iO(`w-full text-xs outline-hidden disabled:cursor-not-allowed disabled:opacity-50`,e),...t}),(0,G.jsx)(jae,{children:(0,G.jsx)(pn,{className:`size-4 shrink-0 opacity-50`})})]})})}function Pae({className:e,...t}){return(0,G.jsx)(n1.List,{"data-slot":`command-list`,className:iO(`no-scrollbar max-h-72 scroll-py-0 outline-none overflow-x-hidden overflow-y-auto`,e),...t})}function Fae({className:e,...t}){return(0,G.jsx)(n1.Empty,{"data-slot":`command-empty`,className:iO(`py-6 text-center text-xs`,e),...t})}function Iae({className:e,...t}){return(0,G.jsx)(n1.Group,{"data-slot":`command-group`,className:iO(`text-foreground **:[[cmdk-group-heading]]:text-muted-foreground overflow-hidden **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-xs`,e),...t})}function Lae({className:e,children:t,...n}){return(0,G.jsxs)(n1.Item,{"data-slot":`command-item`,className:iO(`data-selected:bg-muted data-selected:text-foreground data-selected:*:[svg]:text-foreground relative flex cursor-default items-center gap-2 rounded-none px-2 py-2 text-xs outline-hidden select-none [&_svg:not([class*='size-'])]:size-4 in-data-[slot=dialog-content]:rounded-none! group/command-item data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0`,e),...n,children:[t,(0,G.jsx)(tn,{className:`ml-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100`})]})}var a9=b.createContext(void 0);function o9(e){let t=b.useContext(a9);if(t===void 0&&!e)throw Error(ZT(47));return t}function Rae(){return{...O5(),disabled:!1,modal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,stickIfOpen:!0,nested:!1,openOnHover:!1,closeDelay:0,hasViewport:!1}}var zae={...A5,disabled:v5(e=>e.disabled),instantType:v5(e=>e.instantType),openMethod:v5(e=>e.openMethod),openChangeReason:v5(e=>e.openChangeReason),modal:v5(e=>e.modal),stickIfOpen:v5(e=>e.stickIfOpen),titleElementId:v5(e=>e.titleElementId),descriptionElementId:v5(e=>e.descriptionElementId),openOnHover:v5(e=>e.openOnHover),closeDelay:v5(e=>e.closeDelay),hasViewport:v5(e=>e.hasViewport)},Bae=class e extends C5{constructor(e){let t={...Rae(),...e};t.open&&e?.mounted===void 0&&(t.mounted=!0),super(t,{popupRef:b.createRef(),backdropRef:b.createRef(),internalBackdropRef:b.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:b.createRef(),beforeContentFocusGuardRef:b.createRef(),stickIfOpenTimeout:new c6,triggerElements:new D5},zae)}setOpen=(e,t)=>{let n=t.reason===i0,r=t.reason===`trigger-press`&&t.event.detail===0,i=!e&&(t.reason===`escape-key`||t.reason==null);if(t.preventUnmountOnClose=()=>{this.set(`preventUnmountingOnClose`,!0)},this.context.onOpenChange?.(e,t),t.isCanceled)return;let a={open:e,nativeEvent:t.event,reason:t.reason,nested:this.state.nested,triggerElement:t.trigger};this.state.floatingRootContext.context.events?.emit(`openchange`,a);let o=()=>{let n={open:e,openChangeReason:t.reason},r=t.trigger?.id??null;(r||e)&&(n.activeTriggerId=r,n.activeTriggerElement=t.trigger??null),this.update(n)};n?(this.set(`stickIfOpen`,!0),this.context.stickIfOpenTimeout.start(500,()=>{this.set(`stickIfOpen`,!1)}),Rq.flushSync(o)):o(),r||i?this.set(`instantType`,r?`click`:`dismiss`):t.reason===`focus-out`?this.set(`instantType`,`focus`):this.set(`instantType`,void 0)};static useStore(t,n){let r=zT(()=>new e(n)).current,i=t??r;return C4(r.disposeEffect),i}disposeEffect=()=>this.context.stickIfOpenTimeout.disposeEffect()};function s9({props:e}){let{children:t,open:n,defaultOpen:r=!1,onOpenChange:i,onOpenChangeComplete:a,modal:o=!1,handle:s,triggerId:c,defaultTriggerId:l=null}=e,u=Bae.useStore(s?.store,{modal:o,open:r,openProp:n,activeTriggerId:l,triggerIdProp:c});Y5(()=>{n===void 0&&u.state.open===!1&&r===!0&&u.update({open:!0,activeTriggerId:l})}),u.useControlledProp(`openProp`,n),u.useControlledProp(`triggerIdProp`,c);let d=u.useState(`open`),f=u.useState(`positionerElement`),p=u.useState(`payload`),m=u.useState(`openChangeReason`);u.useContextCallback(`onOpenChange`,i),u.useContextCallback(`onOpenChangeComplete`,a);let{openMethod:h,triggerProps:g}=t7(d);T5(u);let{forceUnmount:_}=E5(d,u,()=>{u.update({stickIfOpen:!0,openChangeReason:null})});$5(d&&o===!0&&m!==`trigger-hover`&&h!==`touch`,f),b.useEffect(()=>{d||u.context.stickIfOpenTimeout.clear()},[u,d]);let v=b.useCallback(e=>{let t=m0(e);return t.preventUnmountOnClose=()=>{u.set(`preventUnmountingOnClose`,!0)},t},[u]),y=b.useCallback(()=>{u.setOpen(!1,v(f0))},[u,v]);b.useImperativeHandle(e.actionsRef,()=>({unmount:_,close:y}),[_,y]);let x=M5({popupStore:u,onOpenChange:u.setOpen}),{getReferenceProps:S,getFloatingProps:C,getTriggerProps:w}=F5([l8(x,{outsidePressEvent:{mouse:o===`trap-focus`?`sloppy`:`intentional`,touch:`sloppy`}}),V5(x)]),T=b.useMemo(()=>S(g),[S,g]),E=b.useMemo(()=>w(g),[w,g]),D=b.useMemo(()=>C(),[C]);u.useSyncedValues({modal:o,openMethod:h,activeTriggerProps:T,inactiveTriggerProps:E,popupProps:D,floatingRootContext:x,nested:W6()!=null});let O=b.useMemo(()=>({store:u}),[u]);return(0,G.jsx)(a9.Provider,{value:O,children:typeof t==`function`?t({payload:p}):t})}function Vae(e){return o9(!0)?(0,G.jsx)(s9,{props:e}):(0,G.jsx)(J6,{children:(0,G.jsx)(s9,{props:e})})}var Hae=b.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,nativeButton:a=!0,handle:o,payload:s,openOnHover:c=!1,delay:l=300,closeDelay:u=0,id:d,...f}=e,p=o9(!0),m=o?.store??p?.store;if(!m)throw Error(ZT(74));let h=Y1(d),g=m.useState(`isTriggerActive`,h),_=m.useState(`floatingRootContext`),v=m.useState(`isOpenedByTrigger`,h),y=b.useRef(null),{registerTrigger:x,isMountedByThisTrigger:S}=Mre(h,y,m,{payload:s,disabled:i,openOnHover:c,closeDelay:u}),C=m.useState(`openChangeReason`),w=m.useState(`stickIfOpen`),T=m.useState(`openMethod`),E=Vre(_,{enabled:_!=null&&c&&(T!==`touch`||C!==`trigger-press`),mouseOnly:!0,move:!1,handleClose:Xre(),restMs:l,delay:{close:u},triggerElementRef:y,isActiveTrigger:g}),D=F5([a8(_,{enabled:_!=null,stickIfOpen:w})]),O=m.useState(`triggerProps`,S),k={disabled:i,open:v},{getButtonProps:A,buttonRef:j}=tE({disabled:i,native:a}),M=b.useMemo(()=>({open(e){return e&&C===`trigger-press`?n6.open(e):t6.open(e)}}),[C]),N=CE(`button`,e,{state:k,ref:[j,t,x,y],props:[D.getReferenceProps(),E,O,{[Nte]:``,id:h},f,A],stateAttributesMapping:M}),P=b.useRef(null),F=VT(e=>{Rq.flushSync(()=>{m.setOpen(!1,m0(c0,e.nativeEvent,e.currentTarget))}),_4(P.current)?.focus()}),I=VT(e=>{let t=m.select(`positionerElement`);if(t&&v4(e,t))m.context.beforeContentFocusGuardRef.current?.focus();else{Rq.flushSync(()=>{m.setOpen(!1,m0(c0,e.nativeEvent,e.currentTarget))});let n=g4(m.context.triggerFocusTargetRef.current||y.current);for(;n!==null&&P0(t,n);){let e=n;if(n=p4(n),n===e)break}n?.focus()}});return g?(0,G.jsxs)(b.Fragment,{children:[(0,G.jsx)(y6,{ref:P,onFocus:F}),(0,G.jsx)(b.Fragment,{children:N},h),(0,G.jsx)(y6,{ref:m.context.triggerFocusTargetRef,onFocus:I})]}):(0,G.jsx)(b.Fragment,{children:N},h)}),c9=b.createContext(void 0);function Uae(){let e=b.useContext(c9);if(e===void 0)throw Error(ZT(45));return e}var Wae=b.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,{store:i}=o9();return i.useState(`mounted`)||n?(0,G.jsx)(c9.Provider,{value:n,children:(0,G.jsx)(z6,{ref:t,...r})}):null}),l9=b.createContext(void 0);function Gae(){let e=b.useContext(l9);if(!e)throw Error(ZT(46));return e}var Kae=b.forwardRef(function(e,t){let{render:n,className:r,anchor:i,positionMethod:a=`absolute`,side:o=`bottom`,align:s=`center`,sideOffset:c=0,alignOffset:l=0,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d=5,arrowPadding:f=5,sticky:p=!1,disableAnchorTracking:m=!1,collisionAvoidance:h=xE,...g}=e,{store:_}=o9(),v=Uae(),y=K6(),x=_.useState(`floatingRootContext`),S=_.useState(`mounted`),C=_.useState(`open`),w=_.useState(`openChangeReason`),T=_.useState(`activeTriggerElement`),E=_.useState(`modal`),D=_.useState(`positionerElement`),O=_.useState(`instantType`),k=_.useState(`transitionStatus`),A=_.useState(`hasViewport`),j=b.useRef(null),M=L4(D,!1,!1),N=k7({anchor:i,floatingRootContext:x,positionMethod:a,mounted:S,side:o,sideOffset:c,align:s,alignOffset:l,arrowPadding:f,collisionBoundary:u,collisionPadding:d,sticky:p,disableAnchorTracking:m,keepMounted:v,nodeId:y,collisionAvoidance:h,adaptiveOrigin:A?iae:void 0}),P=b.useMemo(()=>{let e={};return C||(e.pointerEvents=`none`),{role:`presentation`,hidden:!S,style:{...N.positionerStyles,...e}}},[C,S,N.positionerStyles]),F=b.useMemo(()=>({props:P,...N}),[P,N]),I=x.useState(`domReferenceElement`);$(()=>{let e=I,t=j.current;if(e&&(j.current=e),t&&e&&e!==t){_.set(`instantType`,void 0);let e=new AbortController;return M(()=>{_.set(`instantType`,`trigger-change`)},e.signal),()=>{e.abort()}}},[I,M,_]);let L={open:C,side:F.side,align:F.align,anchorHidden:F.anchorHidden,instant:O},R=b.useCallback(e=>{_.set(`positionerElement`,e)},[_]),z=CE(`div`,e,{state:L,props:[F.props,N7(k),g],ref:[t,R],stateAttributesMapping:r6});return(0,G.jsxs)(l9.Provider,{value:F,children:[S&&E===!0&&w!==`trigger-hover`&&(0,G.jsx)(J5,{ref:_.context.internalBackdropRef,inert:D4(!C),cutout:T}),(0,G.jsx)(q6,{id:y,children:z})]})}),qae=b.createContext(void 0);function Jae(){let[e,t]=b.useState(0),n=VT(()=>(t(e=>e+1),()=>{t(e=>Math.max(0,e-1))}));return{context:b.useMemo(()=>({register:n}),[n]),hasClosePart:e>0}}function Yae(e){let{value:t,children:n}=e;return(0,G.jsx)(qae.Provider,{value:t,children:n})}var Xae={...r6,...j4},Zae=b.forwardRef(function(e,t){let{className:n,render:r,initialFocus:i,finalFocus:a,...o}=e,{store:s}=o9(),c=Gae(),l=z7(!0)!=null,{context:u,hasClosePart:d}=Jae(),f=s.useState(`open`),p=s.useState(`openMethod`),m=s.useState(`instantType`),h=s.useState(`transitionStatus`),g=s.useState(`popupProps`),_=s.useState(`titleElementId`),v=s.useState(`descriptionElementId`),y=s.useState(`modal`),x=s.useState(`mounted`),S=s.useState(`openChangeReason`),C=s.useState(`activeTriggerElement`),w=s.useState(`floatingRootContext`);R4({open:f,ref:s.context.popupRef,onComplete(){f&&s.context.onOpenChangeComplete?.(!0)}});let T=s.useState(`disabled`),E=s.useState(`openOnHover`),D=s.useState(`closeDelay`);zre(w,{enabled:E&&!T,closeDelay:D});function O(e){return e===`touch`?s.context.popupRef.current:!0}let k=i===void 0?O:i,A={open:f,side:c.side,align:c.align,instant:m,transitionStatus:h},j=y!==!1&&d,M=b.useCallback(e=>{s.set(`popupElement`,e)},[s]),N=CE(`div`,e,{state:A,ref:[t,s.context.popupRef,M],props:[g,{"aria-labelledby":_,"aria-describedby":v,onKeyDown(e){l&&t3.has(e.key)&&e.stopPropagation()}},N7(h),o],stateAttributesMapping:Xae});return(0,G.jsx)(i8,{context:w,openInteractionType:p,modal:j,disabled:!x||S===`trigger-hover`,initialFocus:k,returnFocus:a,restoreFocus:`popup`,previousFocusableElement:CT(C)?C:void 0,nextFocusableElement:s.context.triggerFocusTargetRef,beforeContentFocusGuardRef:s.context.beforeContentFocusGuardRef,children:(0,G.jsx)(Yae,{value:u,children:N})})});function Qae({...e}){return(0,G.jsx)(Vae,{"data-slot":`popover`,...e})}function $ae({...e}){return(0,G.jsx)(Hae,{"data-slot":`popover-trigger`,...e})}function eoe({className:e,align:t=`center`,alignOffset:n=0,side:r=`bottom`,sideOffset:i=4,...a}){return(0,G.jsx)(Wae,{children:(0,G.jsx)(Kae,{align:t,alignOffset:n,side:r,sideOffset:i,className:`isolate z-50`,children:(0,G.jsx)(Zae,{"data-slot":`popover-content`,className:iO(`bg-popover text-popover-foreground data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-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 ring-foreground/10 flex flex-col gap-2.5 rounded-none p-2.5 text-xs shadow-md ring-1 duration-100 z-50 w-72 origin-(--transform-origin) outline-hidden`,e),...a})})})}var u9=[{value:`en-US`,label:`English (US)`},{value:`es-ES`,label:`español (España)`},{value:`fr-FR`,label:`français (France)`},{value:`de-DE`,label:`Deutsch`},{value:`it-IT`,label:`italiano`},{value:`am-ET`,label:`አማርኛ`},{value:`ar`,label:`العربية`},{value:`bg-BG`,label:`български`},{value:`bn-BD`,label:`বাংলা`},{value:`bs-BA`,label:`bosanski`},{value:`ca-ES`,label:`català`},{value:`cs-CZ`,label:`čeština`},{value:`da-DK`,label:`dansk`},{value:`el-GR`,label:`Ελληνικά`},{value:`es-419`,label:`español (Latinoamérica)`},{value:`et-EE`,label:`eesti`},{value:`fi-FI`,label:`suomi`},{value:`fr-CA`,label:`français (Canada)`},{value:`gu-IN`,label:`ગુજરાતી`},{value:`hi-IN`,label:`हिन्दी`},{value:`hr-HR`,label:`hrvatski`},{value:`hu-HU`,label:`magyar`},{value:`hy-AM`,label:`հայերեն`},{value:`id-ID`,label:`Indonesia`},{value:`is-IS`,label:`íslenska`},{value:`ja-JP`,label:`日本語`},{value:`ka-GE`,label:`ქართული`},{value:`kk-KZ`,label:`қазақ тілі`},{value:`kn-IN`,label:`ಕನ್ನಡ`},{value:`ko-KR`,label:`한국어`},{value:`lt-LT`,label:`lietuvių`},{value:`lv-LV`,label:`latviešu`},{value:`mk-MK`,label:`македонски`},{value:`ml-IN`,label:`മലയാളം`},{value:`mn-MN`,label:`монгол`},{value:`mr-IN`,label:`मराठी`},{value:`ms-MY`,label:`Bahasa Melayu`},{value:`my-MM`,label:`မြန်မာ`},{value:`nb-NO`,label:`norsk bokmål`},{value:`nl-NL`,label:`Nederlands`},{value:`pa-IN`,label:`ਪੰਜਾਬੀ`},{value:`pl-PL`,label:`polski`},{value:`pt-BR`,label:`português (Brasil)`},{value:`pt-PT`,label:`português (Portugal)`},{value:`ro-RO`,label:`română`},{value:`ru-RU`,label:`русский`},{value:`sk-SK`,label:`slovenčina`},{value:`sl-SI`,label:`slovenščina`},{value:`so-SO`,label:`Soomaali`},{value:`sq-AL`,label:`shqip`},{value:`sr-RS`,label:`српски`},{value:`sv-SE`,label:`svenska`},{value:`sw-KE`,label:`Kiswahili`},{value:`ta-IN`,label:`தமிழ்`},{value:`te-IN`,label:`తెలుగు`},{value:`th-TH`,label:`ไทย`},{value:`tl-PH`,label:`Tagalog`},{value:`tr-TR`,label:`Türkçe`},{value:`uk-UA`,label:`українська`},{value:`ur-PK`,label:`اردو`},{value:`vi-VN`,label:`Tiếng Việt`},{value:`zh-Hans`,label:`简体中文`},{value:`zh-Hant-HK`,label:`繁體中文(香港)`},{value:`zh-Hant-TW`,label:`繁體中文(台灣)`}],toe=({value:e,onValueChange:t})=>{let[n,r]=(0,b.useState)(!1),i=u9.find(t=>t.value===e);return(0,G.jsxs)(Qae,{open:n,onOpenChange:r,children:[(0,G.jsx)($ae,{children:(0,G.jsxs)(oO,{variant:`outline`,role:`combobox`,"aria-expanded":n,className:`w-full justify-between`,children:[i?(0,G.jsxs)(`span`,{children:[i.value,(0,G.jsxs)(`span`,{className:`text-muted-foreground`,children:[` `,`- `,i.label]})]}):`Select locale...`,(0,G.jsx)(an,{className:`ml-2 h-4 w-4 shrink-0 opacity-50`})]})}),(0,G.jsx)(eoe,{className:`w-full p-0`,children:(0,G.jsxs)(Mae,{children:[(0,G.jsx)(Nae,{placeholder:`Search locale...`}),(0,G.jsxs)(Pae,{children:[(0,G.jsx)(Fae,{children:`No locale found.`}),(0,G.jsx)(Iae,{children:u9.map(n=>(0,G.jsxs)(Lae,{value:n.value,onSelect:n=>{t(n===e?``:n),r(!1)},children:[(0,G.jsxs)(`span`,{children:[n.label,` `,(0,G.jsxs)(`span`,{className:`text-muted-foreground`,children:[`(`,n.value,`)`]})]}),(0,G.jsx)(tn,{className:iO(`ml-auto h-4 w-4`,e===n.value?`opacity-100`:`opacity-0`)})]},n.value))})]})]})})]})};function noe({resourceUri:e}){let{data:t}=gT(e);return t?(0,G.jsx)(`div`,{className:`text-xs`,children:(0,G.jsx)(G3,{src:t.contents[0],name:null,quotesOnKeys:!1,displayDataTypes:!1,displayObjectSize:!1,enableClipboard:!1,theme:`rjv-default`,style:{fontSize:`0.75rem`},collapsed:4,collapseStringsAfterLength:80})}):null}var roe=()=>{let e=hT(),{openaiRef:t,openaiObject:n,openInAppUrl:r}=qS(e.name),{setToolData:i}=KS(),a=e._meta?.[`openai/outputTemplate`],o=(r,a)=>{let o=t?.current?.contentWindow?.openai;o&&n&&(o[r]=a,i(e.name,{openaiObject:{...n,[r]:a}}))};return n?(0,G.jsx)(`div`,{className:`overflow-auto max-h-full min-h-0`,children:(0,G.jsxs)(h3,{defaultValue:`widget-state`,className:`gap-0`,children:[(0,G.jsxs)(_3,{className:`border-b border-border w-full`,children:[(0,G.jsx)(v3,{value:`properties`,children:`Properties`}),(0,G.jsx)(v3,{value:`widget-state`,children:`Widget State`}),a&&(0,G.jsx)(v3,{value:`resource`,children:`Resource`})]}),(0,G.jsx)(y3,{value:`properties`,className:`p-4`,children:(0,G.jsxs)(Oie,{children:[(0,G.jsxs)(n7,{children:[(0,G.jsx)(r7,{children:`Display Mode`}),(0,G.jsxs)(Y7,{value:n.displayMode,onValueChange:e=>o(`displayMode`,e),"aria-label":`Select framework`,items:[{label:`Inline`,value:`inline`},{label:`Fullscreen`,value:`fullscreen`},{label:`Pip`,value:`pip`},{label:`Modal`,value:`modal`}],name:`displayMode`,required:!0,children:[(0,G.jsx)(Q7,{children:(0,G.jsx)(Z7,{})}),(0,G.jsx)($7,{children:(0,G.jsxs)(X7,{children:[(0,G.jsx)(e9,{value:`inline`,children:`Inline`}),(0,G.jsx)(e9,{value:`fullscreen`,children:`Fullscreen`}),(0,G.jsx)(e9,{value:`pip`,children:`Pip`}),(0,G.jsx)(e9,{value:`modal`,children:`Modal`})]})})]})]}),(0,G.jsxs)(n7,{children:[(0,G.jsx)(r7,{children:`Theme`}),(0,G.jsxs)(Eie,{children:[(0,G.jsx)(oO,{variant:n.theme===`light`?`default`:`outline`,onClick:()=>o(`theme`,`light`),children:(0,G.jsx)(mn,{})}),(0,G.jsx)(oO,{variant:n.theme===`dark`?`default`:`outline`,onClick:()=>o(`theme`,`dark`),children:(0,G.jsx)(un,{})})]})]}),(0,G.jsxs)(n7,{children:[(0,G.jsx)(r7,{children:`Locale`}),(0,G.jsx)(toe,{value:n.locale,onValueChange:e=>o(`locale`,e)})]}),(0,G.jsxs)(n7,{children:[(0,G.jsx)(r7,{children:`Max Height`}),(0,G.jsx)(f7,{type:`number`,value:n.maxHeight===void 0?``:String(n.maxHeight),onChange:e=>{let t=e.target.value.trim();o(`maxHeight`,t===``?void 0:Number(t))}})]}),(0,G.jsxs)(n7,{children:[(0,G.jsx)(r7,{children:`Safe Area Insets`}),(0,G.jsx)(`div`,{className:`grid grid-cols-2 gap-4`,children:[`top`,`bottom`,`left`,`right`].map(e=>{let t=e.charAt(0).toUpperCase()+e.slice(1);return(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`label`,{htmlFor:`safeArea-${e}`,className:`text-xs text-muted-foreground block mb-1`,children:t}),(0,G.jsx)(f7,{id:`safeArea-${e}`,type:`number`,value:n.safeArea?.insets?.[e]===void 0?`0`:String(n.safeArea.insets[e]),onChange:t=>{let r=t.target.value.trim();o(`safeArea`,{...n.safeArea,insets:{...n.safeArea?.insets,[e]:r===``?0:Number(r)}})}})]},e)})})]}),(0,G.jsxs)(n7,{children:[(0,G.jsx)(r7,{children:`Device Type`}),(0,G.jsxs)(Y7,{value:n.userAgent?.device?.type??`desktop`,onValueChange:e=>o(`userAgent`,{...n.userAgent,device:{...n.userAgent?.device,type:e}}),"aria-label":`Select device type`,items:[{label:`Mobile`,value:`mobile`},{label:`Desktop`,value:`desktop`}],name:`deviceType`,required:!0,children:[(0,G.jsx)(Q7,{children:(0,G.jsx)(Z7,{})}),(0,G.jsx)($7,{children:(0,G.jsxs)(X7,{children:[(0,G.jsx)(e9,{value:`mobile`,children:`Mobile`}),(0,G.jsx)(e9,{value:`desktop`,children:`Desktop`})]})})]})]}),(0,G.jsxs)(n7,{children:[(0,G.jsx)(r7,{children:`Capabilities`}),(0,G.jsxs)(`div`,{className:`flex gap-8`,children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,G.jsx)(`label`,{htmlFor:`hover`,className:`text-xs text-muted-foreground cursor-pointer`,children:`Hover`}),(0,G.jsx)(i9,{id:`hover`,checked:n.userAgent?.capabilities?.hover??!1,onCheckedChange:e=>o(`userAgent`,{...n.userAgent,capabilities:{...n.userAgent?.capabilities,hover:e}})})]}),(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,G.jsx)(`label`,{htmlFor:`touch`,className:`text-xs text-muted-foreground cursor-pointer`,children:`Touch`}),(0,G.jsx)(i9,{id:`touch`,checked:n.userAgent?.capabilities?.touch??!1,onCheckedChange:e=>o(`userAgent`,{...n.userAgent,capabilities:{...n.userAgent?.capabilities,touch:e}})})]})]})]}),(0,G.jsxs)(n7,{children:[(0,G.jsx)(r7,{children:`Open in App URL`}),(0,G.jsx)(f7,{type:`text`,value:r??``,readOnly:!0,placeholder:`Not set`,className:`font-mono text-xs`})]})]})}),(0,G.jsx)(y3,{value:`widget-state`,className:`p-4`,children:(0,G.jsx)(G3,{src:n.widgetState??{},name:null,quotesOnKeys:!1,displayDataTypes:!1,displayObjectSize:!1,enableClipboard:!1,theme:`rjv-default`,collapsed:3,collapseStringsAfterLength:80})}),a&&(0,G.jsx)(y3,{value:`resource`,className:`p-4`,children:(0,G.jsx)(b.Suspense,{fallback:(0,G.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:`Loading resource...`}),children:(0,G.jsx)(noe,{resourceUri:a})})})]})}):null};function d9(e){return new Date(e).toLocaleTimeString(`en-US`,{hour12:!1,hour:`2-digit`,minute:`2-digit`,second:`2-digit`,fractionalSecondDigits:3})}function ioe(e,t=60){let n=JSON.stringify(e);return n.length>t?`${n.slice(0,t)}…`:n}function aoe({log:e}){let[t,n]=(0,b.useState)(!1),r=Object.keys(e.args).length>0,i=r?ioe(e.args):null;return(0,G.jsxs)(G.Fragment,{children:[r?(0,G.jsxs)(`button`,{type:`button`,onClick:()=>n(!t),className:`flex items-center gap-2 py-1.5 px-2 text-xs font-mono border-b border-gray-200 dark:border-gray-800/50 cursor-pointer hover:bg-gray-100 dark:hover:bg-gray-800/30 w-full text-left`,children:[(0,G.jsx)(`span`,{className:`text-gray-600 dark:text-gray-500 shrink-0 min-w-[80px]`,children:d9(e.timestamp)}),(0,G.jsx)(`span`,{className:iO(`font-semibold shrink-0 min-w-[120px]`,e.type===`response`?`text-green-600 dark:text-green-400`:`text-blue-600 dark:text-blue-400`),children:e.command}),(0,G.jsx)(`span`,{className:`text-gray-500 dark:text-gray-600 mr-1`,children:t?`▼`:`▶`}),(0,G.jsx)(`span`,{className:`text-gray-600 dark:text-gray-400 truncate flex-1 min-w-0`,children:i})]}):(0,G.jsxs)(`div`,{className:`flex items-center gap-2 py-1.5 px-2 text-xs font-mono border-b border-gray-200 dark:border-gray-800/50`,children:[(0,G.jsx)(`span`,{className:`text-gray-600 dark:text-gray-500 shrink-0 min-w-[80px]`,children:d9(e.timestamp)}),(0,G.jsx)(`span`,{className:`text-blue-600 dark:text-blue-400 font-semibold shrink-0 min-w-[120px]`,children:e.command})]}),t&&r&&(0,G.jsx)(`div`,{className:`px-2 py-2 bg-gray-50 dark:bg-gray-900/30 border-b border-gray-200 dark:border-gray-800/50`,children:(0,G.jsx)(`pre`,{className:`text-xs font-mono text-gray-800 dark:text-gray-200 whitespace-pre-wrap overflow-x-auto`,children:JSON.stringify(e.args,null,2)})})]})}function ooe(){let e=hT(),{setToolData:t}=KS(),{openaiLogs:n}=qS(e.name),r=(0,b.useRef)(null);return(0,b.useEffect)(()=>{let e=r.current;e&&(e.scrollTop=e.scrollHeight)},[]),(0,G.jsxs)(`div`,{className:`flex flex-col h-full overflow-hidden min-h-0`,children:[(0,G.jsxs)(`div`,{className:`flex items-center justify-between mb-3 h-8 flex-none`,children:[(0,G.jsx)(`h3`,{className:`text-sm font-semibold text-gray-900 dark:text-gray-200`,children:`MCP client logs`}),(0,G.jsx)(`div`,{className:`flex items-center gap-2`,children:n.length>0&&(0,G.jsxs)(oO,{variant:`ghost`,size:`sm`,onClick:()=>{t(e.name,{openaiLogs:[]})},children:[(0,G.jsx)(hn,{className:`w-3 h-3`}),`Clear`]})})]}),(0,G.jsx)(`div`,{ref:r,className:`overflow-auto flex-1 bg-gray-50 rounded-lg border border-gray-200 min-h-0`,children:n.map(e=>(0,G.jsx)(aoe,{log:e},e.id))})]})}var soe=NE(`relative grid w-full items-start gap-x-2 gap-y-0.5 rounded-xl border px-3.5 py-3 text-card-foreground text-sm has-[>svg]:has-data-[slot=alert-action]:grid-cols-[calc(var(--spacing)*4)_1fr_auto] has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] has-data-[slot=alert-action]:grid-cols-[1fr_auto] has-[>svg]:gap-x-2 [&>svg]:h-[1lh] [&>svg]:w-4`,{defaultVariants:{variant:`default`},variants:{variant:{default:`bg-transparent dark:bg-input/32 [&>svg]:text-muted-foreground`,error:`border-destructive/32 bg-destructive/4 [&>svg]:text-destructive`,info:`border-info/32 bg-info/4 [&>svg]:text-info`,success:`border-success/32 bg-success/4 [&>svg]:text-success`,warning:`border-warning/32 bg-warning/4 [&>svg]:text-warning`}}});function coe({className:e,variant:t,...n}){return(0,G.jsx)(`div`,{className:iO(soe({variant:t}),e),"data-slot":`alert`,role:`alert`,...n})}function loe({className:e,...t}){return(0,G.jsx)(`div`,{className:iO(`font-medium [svg~&]:col-start-2`,e),"data-slot":`alert-title`,...t})}function uoe({className:e,...t}){return(0,G.jsx)(`div`,{className:iO(`flex flex-col gap-2.5 text-muted-foreground [svg~&]:col-start-2`,e),"data-slot":`alert-description`,...t})}var doe=()=>{let e=qS(hT().name);return e?(0,G.jsx)(`div`,{className:`flex flex-col h-full overflow-hidden bg-card`,children:(0,G.jsx)(`div`,{className:`p-4 overflow-auto`,children:e.response?e.response.isError?(0,G.jsxs)(coe,{variant:`error`,children:[(0,G.jsx)(on,{}),(0,G.jsx)(loe,{children:`Error`}),(0,G.jsx)(uoe,{children:(()=>{let t=[];return e.response.content.forEach(e=>{e.type===`text`&&t.push(e.text)}),t.join(`
|
|
153
|
+
`)})()})]}):(0,G.jsx)(`div`,{className:`text-xs`,children:(0,G.jsx)(G3,{src:e.response??{},name:null,quotesOnKeys:!1,displayDataTypes:!1,displayObjectSize:!1,enableClipboard:!1,theme:`rjv-default`,style:{fontSize:`0.75rem`},collapsed:3,collapseStringsAfterLength:80})}):null})}):null},f9=`openai:set_globals`,foe=class extends CustomEvent{type=f9},poe=qu([Z(`light`),Z(`dark`)]).describe(`Color theme preference for the host environment.`),p9=qu([Z(`inline`),Z(`fullscreen`),Z(`pip`)]).describe(`Display mode for UI presentation.`),moe=$u(qu([Z(`--color-background-primary`),Z(`--color-background-secondary`),Z(`--color-background-tertiary`),Z(`--color-background-inverse`),Z(`--color-background-ghost`),Z(`--color-background-info`),Z(`--color-background-danger`),Z(`--color-background-success`),Z(`--color-background-warning`),Z(`--color-background-disabled`),Z(`--color-text-primary`),Z(`--color-text-secondary`),Z(`--color-text-tertiary`),Z(`--color-text-inverse`),Z(`--color-text-ghost`),Z(`--color-text-info`),Z(`--color-text-danger`),Z(`--color-text-success`),Z(`--color-text-warning`),Z(`--color-text-disabled`),Z(`--color-border-primary`),Z(`--color-border-secondary`),Z(`--color-border-tertiary`),Z(`--color-border-inverse`),Z(`--color-border-ghost`),Z(`--color-border-info`),Z(`--color-border-danger`),Z(`--color-border-success`),Z(`--color-border-warning`),Z(`--color-border-disabled`),Z(`--color-ring-primary`),Z(`--color-ring-secondary`),Z(`--color-ring-inverse`),Z(`--color-ring-info`),Z(`--color-ring-danger`),Z(`--color-ring-success`),Z(`--color-ring-warning`),Z(`--font-sans`),Z(`--font-mono`),Z(`--font-weight-normal`),Z(`--font-weight-medium`),Z(`--font-weight-semibold`),Z(`--font-weight-bold`),Z(`--font-text-xs-size`),Z(`--font-text-sm-size`),Z(`--font-text-md-size`),Z(`--font-text-lg-size`),Z(`--font-heading-xs-size`),Z(`--font-heading-sm-size`),Z(`--font-heading-md-size`),Z(`--font-heading-lg-size`),Z(`--font-heading-xl-size`),Z(`--font-heading-2xl-size`),Z(`--font-heading-3xl-size`),Z(`--font-text-xs-line-height`),Z(`--font-text-sm-line-height`),Z(`--font-text-md-line-height`),Z(`--font-text-lg-line-height`),Z(`--font-heading-xs-line-height`),Z(`--font-heading-sm-line-height`),Z(`--font-heading-md-line-height`),Z(`--font-heading-lg-line-height`),Z(`--font-heading-xl-line-height`),Z(`--font-heading-2xl-line-height`),Z(`--font-heading-3xl-line-height`),Z(`--border-radius-xs`),Z(`--border-radius-sm`),Z(`--border-radius-md`),Z(`--border-radius-lg`),Z(`--border-radius-xl`),Z(`--border-radius-full`),Z(`--border-width-regular`),Z(`--shadow-hairline`),Z(`--shadow-sm`),Z(`--shadow-md`),Z(`--shadow-lg`)]).describe(`CSS variable keys available to MCP apps for theming.`).describe(`Style variables for theming MCP apps.
|
|
154
|
+
|
|
155
|
+
Individual style keys are optional - hosts may provide any subset of these values.
|
|
156
|
+
Values are strings containing CSS values (colors, sizes, font stacks, etc.).
|
|
157
|
+
|
|
158
|
+
Note: This type uses \`Record<K, string | undefined>\` rather than \`Partial<Record<K, string>>\`
|
|
159
|
+
for compatibility with Zod schema generation. Both are functionally equivalent for validation.`),qu([J(),Pu()]).describe(`Style variables for theming MCP apps.
|
|
160
|
+
|
|
161
|
+
Individual style keys are optional - hosts may provide any subset of these values.
|
|
162
|
+
Values are strings containing CSS values (colors, sizes, font stacks, etc.).
|
|
163
|
+
|
|
164
|
+
Note: This type uses \`Record<K, string | undefined>\` rather than \`Partial<Record<K, string>>\`
|
|
165
|
+
for compatibility with Zod schema generation. Both are functionally equivalent for validation.`)).describe(`Style variables for theming MCP apps.
|
|
166
|
+
|
|
167
|
+
Individual style keys are optional - hosts may provide any subset of these values.
|
|
168
|
+
Values are strings containing CSS values (colors, sizes, font stacks, etc.).
|
|
169
|
+
|
|
170
|
+
Note: This type uses \`Record<K, string | undefined>\` rather than \`Partial<Record<K, string>>\`
|
|
171
|
+
for compatibility with Zod schema generation. Both are functionally equivalent for validation.`);X({method:Z(`ui/open-link`),params:X({url:J().describe(`URL to open in the host's browser`)})}),X({isError:Mu().optional().describe(`True if the host failed to open the URL (e.g., due to security policy).`)}).passthrough(),X({isError:Mu().optional().describe(`True if the download failed (e.g., user cancelled or host denied).`)}).passthrough(),X({isError:Mu().optional().describe(`True if the host rejected or failed to deliver the message.`)}).passthrough(),X({method:Z(`ui/notifications/sandbox-proxy-ready`),params:X({})});var m9=X({connectDomains:Y(J()).optional().describe(`Origins for network requests (fetch/XHR/WebSocket).
|
|
172
|
+
|
|
173
|
+
- Maps to CSP \`connect-src\` directive
|
|
174
|
+
- Empty or omitted → no network connections (secure default)`),resourceDomains:Y(J()).optional().describe("Origins for static resources (images, scripts, stylesheets, fonts, media).\n\n- Maps to CSP `img-src`, `script-src`, `style-src`, `font-src`, `media-src` directives\n- Wildcard subdomains supported: `https://*.example.com`\n- Empty or omitted → no network resources (secure default)"),frameDomains:Y(J()).optional().describe("Origins for nested iframes.\n\n- Maps to CSP `frame-src` directive\n- Empty or omitted → no nested iframes allowed (`frame-src 'none'`)"),baseUriDomains:Y(J()).optional().describe("Allowed base URIs for the document.\n\n- Maps to CSP `base-uri` directive\n- Empty or omitted → only same origin allowed (`base-uri 'self'`)")}),h9=X({camera:X({}).optional().describe(`Request camera access.
|
|
175
|
+
|
|
176
|
+
Maps to Permission Policy \`camera\` feature.`),microphone:X({}).optional().describe(`Request microphone access.
|
|
177
|
+
|
|
178
|
+
Maps to Permission Policy \`microphone\` feature.`),geolocation:X({}).optional().describe(`Request geolocation access.
|
|
179
|
+
|
|
180
|
+
Maps to Permission Policy \`geolocation\` feature.`),clipboardWrite:X({}).optional().describe(`Request clipboard write access.
|
|
181
|
+
|
|
182
|
+
Maps to Permission Policy \`clipboard-write\` feature.`)});X({method:Z(`ui/notifications/size-changed`),params:X({width:Ou().optional().describe(`New width in pixels.`),height:Ou().optional().describe(`New height in pixels.`)})}),X({method:Z(`ui/notifications/tool-input`),params:X({arguments:$u(J(),Bu().describe(`Complete tool call arguments as key-value pairs.`)).optional().describe(`Complete tool call arguments as key-value pairs.`)})}),X({method:Z(`ui/notifications/tool-input-partial`),params:X({arguments:$u(J(),Bu().describe(`Partial tool call arguments (incomplete, may change).`)).optional().describe(`Partial tool call arguments (incomplete, may change).`)})}),X({method:Z(`ui/notifications/tool-cancelled`),params:X({reason:J().optional().describe(`Optional reason for the cancellation (e.g., "user action", "timeout").`)})});var hoe=X({fonts:J().optional()}),goe=X({variables:moe.optional().describe(`CSS variables for theming the app.`),css:hoe.optional().describe(`CSS blocks that apps can inject.`)});X({method:Z(`ui/resource-teardown`),params:X({})}),$u(J(),Bu());var g9=X({text:X({}).optional().describe(`Host supports text content blocks.`),image:X({}).optional().describe(`Host supports image content blocks.`),audio:X({}).optional().describe(`Host supports audio content blocks.`),resource:X({}).optional().describe(`Host supports resource content blocks.`),resourceLink:X({}).optional().describe(`Host supports resource link content blocks.`),structuredContent:X({}).optional().describe(`Host supports structured content.`)});X({method:Z(`ui/notifications/request-teardown`),params:X({}).optional()});var _oe=X({experimental:X({}).optional().describe(`Experimental features (structure TBD).`),openLinks:X({}).optional().describe(`Host supports opening external URLs.`),downloadFile:X({}).optional().describe(`Host supports file downloads via ui/download-file.`),serverTools:X({listChanged:Mu().optional().describe(`Host supports tools/list_changed notifications.`)}).optional().describe(`Host can proxy tool calls to the MCP server.`),serverResources:X({listChanged:Mu().optional().describe(`Host supports resources/list_changed notifications.`)}).optional().describe(`Host can proxy resource reads to the MCP server.`),logging:X({}).optional().describe(`Host accepts log messages.`),sandbox:X({permissions:h9.optional().describe(`Permissions granted by the host (camera, microphone, geolocation).`),csp:m9.optional().describe(`CSP domains approved by the host.`)}).optional().describe(`Sandbox configuration applied by the host.`),updateModelContext:g9.optional().describe(`Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns.`),message:g9.optional().describe(`Host supports receiving content messages (ui/message) from the view.`)}),voe=X({experimental:X({}).optional().describe(`Experimental features (structure TBD).`),tools:X({listChanged:Mu().optional().describe(`App supports tools/list_changed notifications.`)}).optional().describe(`App exposes MCP-style tools that the host can call.`),availableDisplayModes:Y(p9).optional().describe(`Display modes the app supports.`)});X({method:Z(`ui/notifications/initialized`),params:X({}).optional()}),X({csp:m9.optional().describe(`Content Security Policy configuration for UI resources.`),permissions:h9.optional().describe(`Sandbox permissions requested by the UI resource.`),domain:J().optional().describe(`Dedicated origin for view sandbox.
|
|
183
|
+
|
|
184
|
+
Useful when views need stable, dedicated origins for OAuth callbacks, CORS policies, or API key allowlists.
|
|
185
|
+
|
|
186
|
+
**Host-dependent:** The format and validation rules for this field are determined by each host. Servers MUST consult host-specific documentation for the expected domain format. Common patterns include:
|
|
187
|
+
- Hash-based subdomains (e.g., \`{hash}.claudemcpcontent.com\`)
|
|
188
|
+
- URL-derived subdomains (e.g., \`www-example-com.oaiusercontent.com\`)
|
|
189
|
+
|
|
190
|
+
If omitted, host uses default sandbox origin (typically per-conversation).`),prefersBorder:Mu().optional().describe(`Visual boundary preference - true if view prefers a visible border.
|
|
191
|
+
|
|
192
|
+
Boolean requesting whether a visible border and background is provided by the host. Specifying an explicit value for this is recommended because hosts' defaults may vary.
|
|
193
|
+
|
|
194
|
+
- \`true\`: request visible border + background
|
|
195
|
+
- \`false\`: request no visible border + background
|
|
196
|
+
- omitted: host decides border`)}),X({method:Z(`ui/request-display-mode`),params:X({mode:p9.describe(`The display mode being requested.`)})}),X({mode:p9.describe(`The display mode that was actually set. May differ from requested if not supported.`)}).passthrough();var yoe=qu([Z(`model`),Z(`app`)]).describe(`Tool visibility scope - who can access the tool.`);X({resourceUri:J().optional(),visibility:Y(yoe).optional().describe(`Who can access this tool. Default: ["model", "app"]
|
|
197
|
+
- "model": Tool visible to and callable by the agent
|
|
198
|
+
- "app": Tool callable by the app from this server only`)}),X({mimeTypes:Y(J()).optional().describe('Array of supported MIME types for UI resources.\nMust include `"text/html;profile=mcp-app"` for MCP Apps support.')}),X({method:Z(`ui/download-file`),params:X({contents:Y(qu([yp,bp])).describe(`Resource contents to download — embedded (inline data) or linked (host fetches). Uses standard MCP resource types.`)})}),X({method:Z(`ui/message`),params:X({role:Z(`user`).describe(`Message role, currently only "user" is supported.`),content:Y(xp).describe(`Message content blocks (text, image, etc.).`)})}),X({method:Z(`ui/notifications/sandbox-resource-ready`),params:X({html:J().describe(`HTML content to load into the inner iframe.`),sandbox:J().optional().describe(`Optional override for the inner iframe's sandbox attribute.`),csp:m9.optional().describe(`CSP configuration from resource metadata.`),permissions:h9.optional().describe(`Sandbox permissions from resource metadata.`)})}),X({method:Z(`ui/notifications/tool-result`),params:Ap.describe(`Standard MCP tool execution result.`)});var _9=X({toolInfo:X({id:qd.optional().describe(`JSON-RPC id of the tools/call request.`),tool:Dp.describe(`Tool definition including name, inputSchema, etc.`)}).optional().describe(`Metadata of the tool call that instantiated this App.`),theme:poe.optional().describe(`Current color theme preference.`),styles:goe.optional().describe(`Style configuration for theming the app.`),displayMode:p9.optional().describe(`How the UI is currently displayed.`),availableDisplayModes:Y(p9).optional().describe(`Display modes the host supports.`),containerDimensions:qu([X({height:Ou().describe(`Fixed container height in pixels.`)}),X({maxHeight:qu([Ou(),Pu()]).optional().describe(`Maximum container height in pixels.`)})]).and(qu([X({width:Ou().describe(`Fixed container width in pixels.`)}),X({maxWidth:qu([Ou(),Pu()]).optional().describe(`Maximum container width in pixels.`)})])).optional().describe(`Container dimensions. Represents the dimensions of the iframe or other
|
|
199
|
+
container holding the app. Specify either width or maxWidth, and either height or maxHeight.`),locale:J().optional().describe(`User's language and region preference in BCP 47 format.`),timeZone:J().optional().describe(`User's timezone in IANA format.`),userAgent:J().optional().describe(`Host application identifier.`),platform:qu([Z(`web`),Z(`desktop`),Z(`mobile`)]).optional().describe(`Platform type for responsive design decisions.`),deviceCapabilities:X({touch:Mu().optional().describe(`Whether the device supports touch input.`),hover:Mu().optional().describe(`Whether the device supports hover interactions.`)}).optional().describe(`Device input capabilities.`),safeAreaInsets:X({top:Ou().describe(`Top safe area inset in pixels.`),right:Ou().describe(`Right safe area inset in pixels.`),bottom:Ou().describe(`Bottom safe area inset in pixels.`),left:Ou().describe(`Left safe area inset in pixels.`)}).optional().describe(`Mobile safe area boundaries in pixels.`)}).passthrough();X({method:Z(`ui/notifications/host-context-changed`),params:_9.describe(`Partial context update containing only changed fields.`)}),X({method:Z(`ui/update-model-context`),params:X({content:Y(xp).optional().describe(`Context content blocks (text, image, etc.).`),structuredContent:$u(J(),Bu().describe(`Structured content for machine-readable context data.`)).optional().describe(`Structured content for machine-readable context data.`)})}),X({method:Z(`ui/initialize`),params:X({appInfo:uf.describe(`App identification (name and version).`),appCapabilities:voe.describe(`Features and capabilities this app provides.`),protocolVersion:J().describe(`Protocol version this app supports.`)})}),X({protocolVersion:J().describe(`Negotiated protocol version string (e.g., "2025-11-21").`),hostInfo:uf.describe(`Host application identification and version.`),hostCapabilities:_oe.describe(`Features and capabilities provided by the host.`),hostContext:_9.describe(`Rich context about the host environment.`)}).passthrough();var boe=class{constructor(){this.keyToValue=new Map,this.valueToKey=new Map}set(e,t){this.keyToValue.set(e,t),this.valueToKey.set(t,e)}getByKey(e){return this.keyToValue.get(e)}getByValue(e){return this.valueToKey.get(e)}clear(){this.keyToValue.clear(),this.valueToKey.clear()}},v9=class{constructor(e){this.generateIdentifier=e,this.kv=new boe}register(e,t){this.kv.getByValue(e)||(t||=this.generateIdentifier(e),this.kv.set(t,e))}clear(){this.kv.clear()}getIdentifier(e){return this.kv.getByValue(e)}getValue(e){return this.kv.getByKey(e)}},xoe=class extends v9{constructor(){super(e=>e.name),this.classToAllowedProps=new Map}register(e,t){typeof t==`object`?(t.allowProps&&this.classToAllowedProps.set(e,t.allowProps),super.register(e,t.identifier)):super.register(e,t)}getAllowedProps(e){return this.classToAllowedProps.get(e)}};function Soe(e){if(`values`in Object)return Object.values(e);let t=[];for(let n in e)e.hasOwnProperty(n)&&t.push(e[n]);return t}function Coe(e,t){let n=Soe(e);if(`find`in n)return n.find(t);let r=n;for(let e=0;e<r.length;e++){let n=r[e];if(t(n))return n}}function y9(e,t){Object.entries(e).forEach(([e,n])=>t(n,e))}function b9(e,t){return e.indexOf(t)!==-1}function x9(e,t){for(let n=0;n<e.length;n++){let r=e[n];if(t(r))return r}}var woe=class{constructor(){this.transfomers={}}register(e){this.transfomers[e.name]=e}findApplicable(e){return Coe(this.transfomers,t=>t.isApplicable(e))}findByName(e){return this.transfomers[e]}},Toe=e=>Object.prototype.toString.call(e).slice(8,-1),S9=e=>e===void 0,Eoe=e=>e===null,C9=e=>typeof e!=`object`||!e||e===Object.prototype?!1:Object.getPrototypeOf(e)===null?!0:Object.getPrototypeOf(e)===Object.prototype,w9=e=>C9(e)&&Object.keys(e).length===0,T9=e=>Array.isArray(e),Doe=e=>typeof e==`string`,Ooe=e=>typeof e==`number`&&!isNaN(e),koe=e=>typeof e==`boolean`,Aoe=e=>e instanceof RegExp,E9=e=>e instanceof Map,D9=e=>e instanceof Set,O9=e=>Toe(e)===`Symbol`,joe=e=>e instanceof Date&&!isNaN(e.valueOf()),k9=e=>e instanceof Error,A9=e=>typeof e==`number`&&isNaN(e),Moe=e=>koe(e)||Eoe(e)||S9(e)||Ooe(e)||Doe(e)||O9(e),Noe=e=>typeof e==`bigint`,Poe=e=>e===1/0||e===-1/0,Foe=e=>ArrayBuffer.isView(e)&&!(e instanceof DataView),Ioe=e=>e instanceof URL,j9=e=>e.replace(/\\/g,`\\\\`).replace(/\./g,`\\.`),M9=e=>e.map(String).map(j9).join(`.`),N9=(e,t)=>{let n=[],r=``;for(let i=0;i<e.length;i++){let a=e.charAt(i);if(!t&&a===`\\`){let t=e.charAt(i+1);if(t===`\\`){r+=`\\`,i++;continue}else if(t!==`.`)throw Error(`invalid path`)}if(a===`\\`&&e.charAt(i+1)===`.`){r+=`.`,i++;continue}if(a===`.`){n.push(r),r=``;continue}r+=a}let i=r;return n.push(i),n};function P9(e,t,n,r){return{isApplicable:e,annotation:t,transform:n,untransform:r}}var F9=[P9(S9,`undefined`,()=>null,()=>void 0),P9(Noe,`bigint`,e=>e.toString(),e=>typeof BigInt<`u`?BigInt(e):(console.error(`Please add a BigInt polyfill.`),e)),P9(joe,`Date`,e=>e.toISOString(),e=>new Date(e)),P9(k9,`Error`,(e,t)=>{let n={name:e.name,message:e.message};return`cause`in e&&(n.cause=e.cause),t.allowedErrorProps.forEach(t=>{n[t]=e[t]}),n},(e,t)=>{let n=Error(e.message,{cause:e.cause});return n.name=e.name,n.stack=e.stack,t.allowedErrorProps.forEach(t=>{n[t]=e[t]}),n}),P9(Aoe,`regexp`,e=>``+e,e=>{let t=e.slice(1,e.lastIndexOf(`/`)),n=e.slice(e.lastIndexOf(`/`)+1);return new RegExp(t,n)}),P9(D9,`set`,e=>[...e.values()],e=>new Set(e)),P9(E9,`map`,e=>[...e.entries()],e=>new Map(e)),P9(e=>A9(e)||Poe(e),`number`,e=>A9(e)?`NaN`:e>0?`Infinity`:`-Infinity`,Number),P9(e=>e===0&&1/e==-1/0,`number`,()=>`-0`,Number),P9(Ioe,`URL`,e=>e.toString(),e=>new URL(e))];function I9(e,t,n,r){return{isApplicable:e,annotation:t,transform:n,untransform:r}}var L9=I9((e,t)=>O9(e)?!!t.symbolRegistry.getIdentifier(e):!1,(e,t)=>[`symbol`,t.symbolRegistry.getIdentifier(e)],e=>e.description,(e,t,n)=>{let r=n.symbolRegistry.getValue(t[1]);if(!r)throw Error(`Trying to deserialize unknown symbol`);return r}),Loe=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,Uint8ClampedArray].reduce((e,t)=>(e[t.name]=t,e),{}),R9=I9(Foe,e=>[`typed-array`,e.constructor.name],e=>[...e],(e,t)=>{let n=Loe[t[1]];if(!n)throw Error(`Trying to deserialize unknown typed array`);return new n(e)});function z9(e,t){return e?.constructor?!!t.classRegistry.getIdentifier(e.constructor):!1}var B9=I9(z9,(e,t)=>[`class`,t.classRegistry.getIdentifier(e.constructor)],(e,t)=>{let n=t.classRegistry.getAllowedProps(e.constructor);if(!n)return{...e};let r={};return n.forEach(t=>{r[t]=e[t]}),r},(e,t,n)=>{let r=n.classRegistry.getValue(t[1]);if(!r)throw Error(`Trying to deserialize unknown class '${t[1]}' - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564`);return Object.assign(Object.create(r.prototype),e)}),V9=I9((e,t)=>!!t.customTransformerRegistry.findApplicable(e),(e,t)=>[`custom`,t.customTransformerRegistry.findApplicable(e).name],(e,t)=>t.customTransformerRegistry.findApplicable(e).serialize(e),(e,t,n)=>{let r=n.customTransformerRegistry.findByName(t[1]);if(!r)throw Error(`Trying to deserialize unknown custom value`);return r.deserialize(e)}),Roe=[B9,L9,V9,R9],H9=(e,t)=>{let n=x9(Roe,n=>n.isApplicable(e,t));if(n)return{value:n.transform(e,t),type:n.annotation(e,t)};let r=x9(F9,n=>n.isApplicable(e,t));if(r)return{value:r.transform(e,t),type:r.annotation}},U9={};F9.forEach(e=>{U9[e.annotation]=e});var zoe=(e,t,n)=>{if(T9(t))switch(t[0]){case`symbol`:return L9.untransform(e,t,n);case`class`:return B9.untransform(e,t,n);case`custom`:return V9.untransform(e,t,n);case`typed-array`:return R9.untransform(e,t,n);default:throw Error(`Unknown transformation: `+t)}else{let r=U9[t];if(!r)throw Error(`Unknown transformation: `+t);return r.untransform(e,n)}},W9=(e,t)=>{if(t>e.size)throw Error(`index out of bounds`);let n=e.keys();for(;t>0;)n.next(),t--;return n.next().value};function G9(e){if(b9(e,`__proto__`))throw Error(`__proto__ is not allowed as a property`);if(b9(e,`prototype`))throw Error(`prototype is not allowed as a property`);if(b9(e,`constructor`))throw Error(`constructor is not allowed as a property`)}var Boe=(e,t)=>{G9(t);for(let n=0;n<t.length;n++){let r=t[n];if(D9(e))e=W9(e,+r);else if(E9(e)){let i=+r,a=+t[++n]==0?`key`:`value`,o=W9(e,i);switch(a){case`key`:e=o;break;case`value`:e=e.get(o);break}}else e=e[r]}return e},K9=(e,t,n)=>{if(G9(t),t.length===0)return n(e);let r=e;for(let e=0;e<t.length-1;e++){let n=t[e];if(T9(r)){let e=+n;r=r[e]}else if(C9(r))r=r[n];else if(D9(r)){let e=+n;r=W9(r,e)}else if(E9(r)){if(e===t.length-2)break;let i=+n,a=+t[++e]==0?`key`:`value`,o=W9(r,i);switch(a){case`key`:r=o;break;case`value`:r=r.get(o);break}}}let i=t[t.length-1];if(T9(r)?r[+i]=n(r[+i]):C9(r)&&(r[i]=n(r[i])),D9(r)){let e=W9(r,+i),t=n(e);e!==t&&(r.delete(e),r.add(t))}if(E9(r)){let e=+t[t.length-2],a=W9(r,e);switch(+i==0?`key`:`value`){case`key`:{let e=n(a);r.set(e,r.get(a)),e!==a&&r.delete(a);break}case`value`:r.set(a,n(r.get(a)));break}}return e},q9=e=>e<1;function J9(e,t,n,r=[]){if(!e)return;let i=q9(n);if(!T9(e)){y9(e,(e,a)=>J9(e,t,n,[...r,...N9(a,i)]));return}let[a,o]=e;o&&y9(o,(e,a)=>{J9(e,t,n,[...r,...N9(a,i)])}),t(a,r)}function Voe(e,t,n,r){return J9(t,(t,n)=>{e=K9(e,n,e=>zoe(e,t,r))},n),e}function Hoe(e,t,n){let r=q9(n);function i(t,n){let i=Boe(e,N9(n,r));t.map(e=>N9(e,r)).forEach(t=>{e=K9(e,t,()=>i)})}if(T9(t)){let[n,a]=t;n.forEach(t=>{e=K9(e,N9(t,r),()=>e)}),a&&y9(a,i)}else y9(t,i);return e}var Uoe=(e,t)=>C9(e)||T9(e)||E9(e)||D9(e)||k9(e)||z9(e,t);function Woe(e,t,n){let r=n.get(e);r?r.push(t):n.set(e,[t])}function Goe(e,t){let n={},r;return e.forEach(e=>{if(e.length<=1)return;t||(e=e.map(e=>e.map(String)).sort((e,t)=>e.length-t.length));let[i,...a]=e;i.length===0?r=a.map(M9):n[M9(i)]=a.map(M9)}),r?w9(n)?[r]:[r,n]:w9(n)?void 0:n}var Y9=(e,t,n,r,i=[],a=[],o=new Map)=>{let s=Moe(e);if(!s){Woe(e,i,t);let n=o.get(e);if(n)return r?{transformedValue:null}:n}if(!Uoe(e,n)){let t=H9(e,n),r=t?{transformedValue:t.value,annotations:[t.type]}:{transformedValue:e};return s||o.set(e,r),r}if(b9(a,e))return{transformedValue:null};let c=H9(e,n),l=c?.value??e,u=T9(l)?[]:{},d={};y9(l,(s,c)=>{if(c===`__proto__`||c===`constructor`||c===`prototype`)throw Error(`Detected property ${c}. This is a prototype pollution risk, please remove it from your object.`);let l=Y9(s,t,n,r,[...i,c],[...a,e],o);u[c]=l.transformedValue,T9(l.annotations)?d[j9(c)]=l.annotations:C9(l.annotations)&&y9(l.annotations,(e,t)=>{d[j9(c)+`.`+t]=e})});let f=w9(d)?{transformedValue:u,annotations:c?[c.type]:void 0}:{transformedValue:u,annotations:c?[c.type,d]:d};return s||o.set(e,f),f};function X9(e){return Object.prototype.toString.call(e).slice(8,-1)}function Z9(e){return X9(e)===`Array`}function Koe(e){if(X9(e)!==`Object`)return!1;let t=Object.getPrototypeOf(e);return!!t&&t.constructor===Object&&t===Object.prototype}function qoe(e,t,n,r,i){let a={}.propertyIsEnumerable.call(r,t)?`enumerable`:`nonenumerable`;a===`enumerable`&&(e[t]=n),i&&a===`nonenumerable`&&Object.defineProperty(e,t,{value:n,enumerable:!1,writable:!0,configurable:!0})}function Q9(e,t={}){if(Z9(e))return e.map(e=>Q9(e,t));if(!Koe(e))return e;let n=Object.getOwnPropertyNames(e),r=Object.getOwnPropertySymbols(e);return[...n,...r].reduce((n,r)=>{if(r===`__proto__`||Z9(t.props)&&!t.props.includes(r))return n;let i=e[r];return qoe(n,r,Q9(i,t),e,t.nonenumerable),n},{})}var $9=class{constructor({dedupe:e=!1}={}){this.classRegistry=new xoe,this.symbolRegistry=new v9(e=>e.description??``),this.customTransformerRegistry=new woe,this.allowedErrorProps=[],this.dedupe=e}serialize(e){let t=new Map,n=Y9(e,t,this,this.dedupe),r={json:n.transformedValue};n.annotations&&(r.meta={...r.meta,values:n.annotations});let i=Goe(t,this.dedupe);return i&&(r.meta={...r.meta,referentialEqualities:i}),r.meta&&(r.meta.v=1),r}deserialize(e,t){let{json:n,meta:r}=e,i=t?.inPlace?n:Q9(n);return r?.values&&(i=Voe(i,r.values,r.v??0,this)),r?.referentialEqualities&&(i=Hoe(i,r.referentialEqualities,r.v??0)),i}stringify(e){return JSON.stringify(this.serialize(e))}parse(e){return this.deserialize(JSON.parse(e),{inPlace:!0})}registerClass(e,t){this.classRegistry.register(e,t)}registerSymbol(e,t){this.symbolRegistry.register(e,t)}registerCustom(e,t){this.customTransformerRegistry.register({name:t,...e})}allowErrorProps(...e){this.allowedErrorProps.push(...e)}};$9.defaultInstance=new $9,$9.serialize=$9.defaultInstance.serialize.bind($9.defaultInstance),$9.deserialize=$9.defaultInstance.deserialize.bind($9.defaultInstance),$9.stringify=$9.defaultInstance.stringify.bind($9.defaultInstance),$9.parse=$9.defaultInstance.parse.bind($9.defaultInstance),$9.registerClass=$9.defaultInstance.registerClass.bind($9.defaultInstance),$9.registerSymbol=$9.defaultInstance.registerSymbol.bind($9.defaultInstance),$9.registerCustom=$9.defaultInstance.registerCustom.bind($9.defaultInstance),$9.allowErrorProps=$9.defaultInstance.allowErrorProps.bind($9.defaultInstance),$9.serialize,$9.deserialize,$9.stringify,$9.parse,$9.registerClass,$9.registerCustom,$9.registerSymbol,$9.allowErrorProps,(0,b.createContext)(null);function Joe(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)},openExternal:e=>{t(`openExternal`,e)},requestDisplayMode:async r=>(t(`requestDisplayMode`,r),e.displayMode=r.mode,n(`displayMode`,r.mode),{mode:r.mode}),setWidgetState:async r=>{t(`setWidgetState`,r),e.widgetState=r,n(`widgetState`,r)},requestModal:async r=>{t(`requestModal`,r),e.displayMode=`modal`,e.view={mode:`modal`},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 Yoe(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 foe(f9,{detail:{globals:{[r]:i}}});t.dispatchEvent(e)}return o}})}function Xoe(e,t,n,r,i,a){let o=Yoe(wb(t),e);Bee(o,Joe(o,n,r,i,a)),e.openai=o}function Zoe(e){let t=new DOMParser().parseFromString(e,`text/html`),n=t.querySelector(`script[type="module"]#dev-widget-entry`);if(!n)throw Error(`dev-widget-entry script not found`);return n.textContent=`
|
|
200
|
+
|
|
201
|
+
const waitForOpenAI = () => new Promise((resolve, reject) => {
|
|
202
|
+
if (typeof window === "undefined") { reject(new Error("window is not available")); return; }
|
|
203
|
+
if ("openai" in window && window.openai != null) { resolve(); return; }
|
|
204
|
+
Object.defineProperty(window, "openai", {
|
|
205
|
+
configurable: true,
|
|
206
|
+
enumerable: true,
|
|
207
|
+
get() { return undefined; },
|
|
208
|
+
set(value) {
|
|
209
|
+
Object.defineProperty(window, "openai", {
|
|
210
|
+
configurable: true,
|
|
211
|
+
enumerable: true,
|
|
212
|
+
writable: true,
|
|
213
|
+
value,
|
|
214
|
+
});
|
|
215
|
+
resolve();
|
|
216
|
+
},
|
|
217
|
+
});
|
|
218
|
+
});
|
|
219
|
+
|
|
220
|
+
await waitForOpenAI();
|
|
221
|
+
${n.textContent}
|
|
222
|
+
`,t.head.innerHTML+t.body.innerHTML}var Qoe=()=>{let e=hT(),{openaiObject:t}=qS(e.name)??{},{data:n}=gT(e._meta?.[`openai/outputTemplate`]),{setToolData:r,pushOpenAiLog:i,updateOpenaiObject:a,setOpenInAppUrl:o}=KS(),s=(0,b.useRef)(null),c=(0,b.useRef)(null),l=(0,b.useRef)(!1),u=n.contents[0].text,d=(0,b.useCallback)(()=>{if(l.current)return;let c=s.current;if(!c?.contentWindow||!c.contentDocument)return;l.current=!0;let d=n.contents[0]._meta?.[`openai/widgetDomain`];d&&typeof d==`string`&&o(e.name,d),Xoe(c.contentWindow,t,(t,n,r=`default`)=>{i(e.name,{timestamp:Date.now(),command:t,args:n,type:r})},(t,n)=>{a(e.name,t,n)},(e,t)=>lT.callTool(e,t),t=>{o(e.name,t)}),c.contentDocument.open(),c.contentDocument.write(Zoe(u)),c.contentDocument.close(),r(e.name,{openaiRef:s})},[t,i,r,a,o,e.name,u,n]);return(0,b.useEffect)(()=>{d()},[d]),(0,G.jsx)(`div`,{ref:c,className:`relative overflow-auto`,style:{width:`100%`,height:`100%`},children:(0,G.jsx)(`iframe`,{ref:s,src:`about:blank`,onLoad:d,style:{width:`100%`,height:`100%`,border:`none`,display:`block`},sandbox:`allow-scripts allow-same-origin allow-forms`,title:`html-preview`})})},$oe=()=>{let e=hT(),t=qS(e.name),{defaultLayout:n,onLayoutChange:r}=oi({id:`skybridge-devtools-input-column`,storage:localStorage}),{defaultLayout:i,onLayoutChange:a}=oi({id:`skybridge-devtools-widget-section`,storage:localStorage}),{defaultLayout:o,onLayoutChange:s}=oi({id:`skybridge-devtools-inspector-section`,storage:localStorage}),{defaultLayout:c,onLayoutChange:l}=oi({id:`skybridge-devtools-main-section`,storage:localStorage}),u=!!(e._meta?.[`openai/outputTemplate`]&&t?.response&&!t.response.isError);return(0,G.jsx)(`div`,{className:`flex-1 flex flex-col overflow-hidden relative z-10`,children:(0,G.jsxs)(ri,{orientation:`vertical`,className:`flex-1 overflow-hidden`,defaultLayout:c,onLayoutChange:l,children:[(0,G.jsx)(ui,{id:`top-section`,minSize:`30`,children:(0,G.jsxs)(ri,{orientation:`horizontal`,className:`flex-1 overflow-hidden`,defaultLayout:n,onLayoutChange:r,children:[(0,G.jsx)(ui,{id:`input-column`,minSize:`20`,maxSize:`60`,children:(0,G.jsx)(`div`,{className:`flex flex-col overflow-hidden h-full`,children:(0,G.jsx)(wie,{})})}),(0,G.jsx)(pi,{className:`w-px bg-border`}),(0,G.jsx)(ui,{id:`output-column`,minSize:`30`,children:(0,G.jsx)(`div`,{className:`flex flex-col overflow-hidden h-full`,children:(0,G.jsx)(doe,{})})})]})}),u&&(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(pi,{className:`h-px bg-border`}),(0,G.jsx)(ui,{id:`widget-section`,minSize:`20`,children:(0,G.jsxs)(ri,{orientation:`horizontal`,className:`flex-1 overflow-hidden bg-card`,defaultLayout:o,onLayoutChange:s,children:[(0,G.jsx)(ui,{id:`widget-logs-panel`,minSize:`30`,children:(0,G.jsx)(`div`,{className:`flex flex-col h-full overflow-hidden`,children:(0,G.jsxs)(ri,{orientation:`vertical`,className:`flex-1 overflow-hidden`,defaultLayout:i,onLayoutChange:a,children:[(0,G.jsx)(ui,{id:`widget-panel`,minSize:`20`,maxSize:`80`,children:(0,G.jsx)(`div`,{className:`h-full overflow-hidden`,children:(0,G.jsx)(b.Suspense,{children:(0,G.jsx)(Qoe,{})})})}),(0,G.jsx)(pi,{className:`h-px bg-border`}),(0,G.jsx)(ui,{id:`logs-panel`,minSize:`20`,children:(0,G.jsx)(`div`,{className:`p-4 flex flex-col h-full min-h-0`,children:(0,G.jsx)(ooe,{})})})]})})}),(0,G.jsx)(pi,{className:`w-px bg-border`}),(0,G.jsx)(ui,{id:`inspector-panel`,minSize:`20`,maxSize:`50`,defaultSize:30,children:(0,G.jsx)(`div`,{className:`flex flex-col overflow-hidden h-full min-h-0`,children:(0,G.jsx)(`div`,{className:`overflow-auto`,children:(0,G.jsx)(roe,{})})})})]})})]})]})})};function ese(){let e=pT(),[,t]=aC(),n=mT();return(0,G.jsx)(`div`,{className:`h-full border-r border-border bg-card flex flex-col`,children:(0,G.jsxs)(`aside`,{className:`h-full flex flex-col`,children:[(0,G.jsxs)(`div`,{className:`p-4 border-b border-border h-[72px] flex flex-col justify-center`,children:[(0,G.jsx)(`h2`,{className:`text-sm font-semibold text-foreground mb-1`,children:`Tools`}),(0,G.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[e?.length,` `,e?.length===1?`tool`:`tools`]})]}),(0,G.jsx)(`div`,{className:`flex-1 overflow-y-auto`,children:(0,G.jsx)(`div`,{className:`p-2`,children:e?.length===0?(0,G.jsx)(`div`,{className:`p-4 text-center text-sm text-muted-foreground`,children:`No tools registered yet.`}):(0,G.jsx)(`div`,{className:`space-y-1`,children:e?.map(e=>{let r=e.name===n?.name;return(0,G.jsxs)(`button`,{type:`button`,onClick:()=>t(e.name),className:iO(`w-full text-left px-3 py-3 rounded-md transition-colors cursor-pointer relative`,`hover:bg-accent hover:text-accent-foreground`,`focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1`,r&&`bg-accent text-accent-foreground`),children:[(0,G.jsxs)(`div`,{className:`pr-6 flex flex-col gap-1`,children:[(0,G.jsx)(`div`,{className:iO(`font-semibold text-sm leading-tight truncate`,r&&`text-accent-foreground`),children:e.name}),e.description&&(0,G.jsx)(`div`,{className:iO(`text-xs leading-snug text-muted-foreground`,`line-clamp-2`,r&&`text-accent-foreground/80`),children:e.description})]}),r&&(0,G.jsx)(`div`,{className:`absolute top-3 right-3 w-1.5 h-1.5 rounded-full bg-primary`})]},e.name)})})})})]})})}function tse(){let e=mT(),{status:t,requiresAuth:n}=bi(),{defaultLayout:r,onLayoutChange:i}=oi({id:`skybridge-devtools-tools-list`,storage:localStorage});return(0,G.jsxs)(`div`,{className:`flex h-screen w-full flex-col overflow-hidden bg-background`,children:[(0,G.jsx)(lO,{}),t===`authenticated`?(0,G.jsxs)(ri,{orientation:`horizontal`,className:`flex-1 overflow-hidden`,defaultLayout:r,onLayoutChange:i,children:[(0,G.jsx)(ui,{id:`tools-list`,minSize:`15`,maxSize:`40`,children:(0,G.jsx)(ese,{})}),(0,G.jsx)(pi,{className:`w-px bg-border`}),(0,G.jsx)(ui,{id:`main-content`,minSize:`30`,children:(0,G.jsx)(`div`,{className:`flex flex-1 flex-col overflow-hidden relative h-full`,children:e?(0,G.jsx)($oe,{}):(0,G.jsx)(Lne,{})})})]}):(0,G.jsx)(`div`,{className:`flex-1 flex items-center justify-center`,children:(0,G.jsxs)(`div`,{className:`text-center space-y-4`,children:[(0,G.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:t===`connecting`?`Connecting to server...`:n?`Authentication required to access this server.`:`Not connected to a server.`}),t!==`connecting`&&(0,G.jsxs)(oO,{variant:`outline`,size:`sm`,onClick:fT,children:[(0,G.jsx)(fn,{className:`h-3.5 w-3.5`}),`Connect`]})]})})]})}function nse(){return(0,G.jsx)(Ue,{client:oC,children:(0,G.jsx)(Wt,{children:(0,G.jsx)(tse,{})})})}async function rse(){let e=new URLSearchParams(window.location.search);if(e.get(`oauth_callback`)===`true`){let t=e.get(`code`),n=new URL(window.location.href);if(n.searchParams.delete(`oauth_callback`),n.searchParams.delete(`code`),n.searchParams.delete(`state`),window.history.replaceState({},``,n.toString()),t)try{await hte(t)}catch(e){console.error(`OAuth callback failed:`,e),bi.getState().setStatus(`error`),bi.getState().setError(e instanceof Error?e.message:`OAuth callback failed`)}else bi.getState().setStatus(`error`),bi.getState().setError(`OAuth callback missing authorization code`)}else fT().catch(e=>{console.error(`Connection failed:`,e)})}rse(),(0,x.createRoot)(document.getElementById(`root`)).render((0,G.jsx)(b.StrictMode,{children:(0,G.jsx)(nse,{})}));
|