@nexushub/client 0.6.1 → 0.6.3
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.
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,o=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,i=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,n)=>{let r={};for(var o in e)t(r,o,{get:e[o],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:"Module"}),r},l=(e,o,i,s)=>{if(o&&"object"==typeof o||"function"==typeof o)for(var l,c=r(o),u=0,d=c.length;u<d;u++)l=c[u],a.call(e,l)||l===i||t(e,l,{get:(e=>o[e]).bind(null,l),enumerable:!(s=n(o,l))||s.enumerable});return e},c=(n,r,a)=>(a=null!=n?e(o(n)):{},l(!r&&n&&n.__esModule?a:t(a,"default",{value:n,enumerable:!0}),n));!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))t(e);new MutationObserver(e=>{for(const n of e)if("childList"===n.type)for(const e of n.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&t(e)}).observe(document,{childList:!0,subtree:!0})}function t(e){if(e.ep)return;e.ep=!0;const t=function(e){const t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?t.credentials="include":"anonymous"===e.crossOrigin?t.credentials="omit":t.credentials="same-origin",t}(e);fetch(e.href,t)}}();var u=i(e=>{var t=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),s=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),f=Symbol.for("react.activity"),h=Symbol.iterator;var p={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},m=Object.assign,g={};function y(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||p}function v(){}function b(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||p}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},v.prototype=y.prototype;var x=b.prototype=new v;x.constructor=b,m(x,y.prototype),x.isPureReactComponent=!0;var w=Array.isArray;function S(){}var k={H:null,A:null,T:null,S:null},E=Object.prototype.hasOwnProperty;function C(e,n,r){var o=r.ref;return{$$typeof:t,type:e,key:n,ref:void 0!==o?o:null,props:r}}function N(e){return"object"==typeof e&&null!==e&&e.$$typeof===t}var T=/\/+/g;function j(e,t){return"object"==typeof e&&null!==e&&null!=e.key?(n=""+e.key,r={"=":"=0",":":"=2"},"$"+n.replace(/[=:]/g,function(e){return r[e]})):t.toString(36);var n,r}function R(e,r,o,a,i){var s=typeof e;"undefined"!==s&&"boolean"!==s||(e=null);var l,c,u=!1;if(null===e)u=!0;else switch(s){case"bigint":case"string":case"number":u=!0;break;case"object":switch(e.$$typeof){case t:case n:u=!0;break;case d:return R((u=e._init)(e._payload),r,o,a,i)}}if(u)return i=i(e),u=""===a?"."+j(e,0):a,w(i)?(o="",null!=u&&(o=u.replace(T,"$&/")+"/"),R(i,r,o,"",function(e){return e})):null!=i&&(N(i)&&(l=i,c=o+(null==i.key||e&&e.key===i.key?"":(""+i.key).replace(T,"$&/")+"/")+u,i=C(l.type,c,l.props)),r.push(i)),1;u=0;var f,p=""===a?".":a+":";if(w(e))for(var m=0;m<e.length;m++)u+=R(a=e[m],r,o,s=p+j(a,m),i);else if("function"==typeof(m=null===(f=e)||"object"!=typeof f?null:"function"==typeof(f=h&&f[h]||f["@@iterator"])?f:null))for(e=m.call(e),m=0;!(a=e.next()).done;)u+=R(a=a.value,r,o,s=p+j(a,m++),i);else if("object"===s){if("function"==typeof e.then)return R(function(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch("string"==typeof e.status?e.then(S,S):(e.status="pending",e.then(function(t){"pending"===e.status&&(e.status="fulfilled",e.value=t)},function(t){"pending"===e.status&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}(e),r,o,a,i);throw r=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===r?"object with keys {"+Object.keys(e).join(", ")+"}":r)+"). If you meant to render a collection of children, use an array instead.")}return u}function P(e,t,n){if(null==e)return e;var r=[],o=0;return R(e,r,"","",function(e){return t.call(n,e,o++)}),r}function O(e){if(-1===e._status){var t=e._result;(t=t()).then(function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)},function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)}),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var _="function"==typeof reportError?reportError:function(e){if("object"==typeof window&&"function"==typeof window.ErrorEvent){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:"object"==typeof e&&null!==e&&"string"==typeof e.message?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if("object"==typeof process&&"function"==typeof process.emit)return void process.emit("uncaughtException",e)},A={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(!N(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};e.Activity=f,e.Children=A,e.Component=y,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=o,e.Suspense=c,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=k,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return k.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(null==e)throw Error("The argument must be a React element, but you passed "+e+".");var r=m({},e.props),o=e.key;if(null!=t)for(a in void 0!==t.key&&(o=""+t.key),t)!E.call(t,a)||"key"===a||"__self"===a||"__source"===a||"ref"===a&&void 0===t.ref||(r[a]=t[a]);var a=arguments.length-2;if(1===a)r.children=n;else if(1<a){for(var i=Array(a),s=0;s<a;s++)i[s]=arguments[s+2];r.children=i}return C(e.type,o,r)},e.createContext=function(e){return(e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider=e,e.Consumer={$$typeof:i,_context:e},e},e.createElement=function(e,t,n){var r,o={},a=null;if(null!=t)for(r in void 0!==t.key&&(a=""+t.key),t)E.call(t,r)&&"key"!==r&&"__self"!==r&&"__source"!==r&&(o[r]=t[r]);var i=arguments.length-2;if(1===i)o.children=n;else if(1<i){for(var s=Array(i),l=0;l<i;l++)s[l]=arguments[l+2];o.children=s}if(e&&e.defaultProps)for(r in i=e.defaultProps)void 0===o[r]&&(o[r]=i[r]);return C(e,a,o)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:l,render:e}},e.isValidElement=N,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:O}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:void 0===t?null:t}},e.startTransition=function(e){var t=k.T,n={};k.T=n;try{var r=e(),o=k.S;null!==o&&o(n,r),"object"==typeof r&&null!==r&&"function"==typeof r.then&&r.then(S,_)}catch(a){_(a)}finally{null!==t&&null!==n.types&&(t.types=n.types),k.T=t}},e.unstable_useCacheRefresh=function(){return k.H.useCacheRefresh()},e.use=function(e){return k.H.use(e)},e.useActionState=function(e,t,n){return k.H.useActionState(e,t,n)},e.useCallback=function(e,t){return k.H.useCallback(e,t)},e.useContext=function(e){return k.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return k.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return k.H.useEffect(e,t)},e.useEffectEvent=function(e){return k.H.useEffectEvent(e)},e.useId=function(){return k.H.useId()},e.useImperativeHandle=function(e,t,n){return k.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return k.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return k.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return k.H.useMemo(e,t)},e.useOptimistic=function(e,t){return k.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return k.H.useReducer(e,t,n)},e.useRef=function(e){return k.H.useRef(e)},e.useState=function(e){return k.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return k.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return k.H.useTransition()},e.version="19.2.7"}),d=i((e,t)=>{t.exports=u()}),f=i(e=>{function t(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,a=e[r];if(!(0<o(a,t)))break e;e[r]=t,e[n]=a,n=r}}function n(e){return 0===e.length?null:e[0]}function r(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,a=e.length,i=a>>>1;r<i;){var s=2*(r+1)-1,l=e[s],c=s+1,u=e[c];if(0>o(l,n))c<a&&0>o(u,l)?(e[r]=u,e[c]=n,r=c):(e[r]=l,e[s]=n,r=s);else{if(!(c<a&&0>o(u,n)))break e;e[r]=u,e[c]=n,r=c}}}return t}function o(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if(e.unstable_now=void 0,"object"==typeof performance&&"function"==typeof performance.now){var a=performance;e.unstable_now=function(){return a.now()}}else{var i=Date,s=i.now();e.unstable_now=function(){return i.now()-s}}var l=[],c=[],u=1,d=null,f=3,h=!1,p=!1,m=!1,g=!1,y="function"==typeof setTimeout?setTimeout:null,v="function"==typeof clearTimeout?clearTimeout:null,b="undefined"!=typeof setImmediate?setImmediate:null;function x(e){for(var o=n(c);null!==o;){if(null===o.callback)r(c);else{if(!(o.startTime<=e))break;r(c),o.sortIndex=o.expirationTime,t(l,o)}o=n(c)}}function w(e){if(m=!1,x(e),!p)if(null!==n(l))p=!0,k||(k=!0,S());else{var t=n(c);null!==t&&O(w,t.startTime-e)}}var S,k=!1,E=-1,C=5,N=-1;function T(){return!!g||!(e.unstable_now()-N<C)}function j(){if(g=!1,k){var t=e.unstable_now();N=t;var o=!0;try{e:{p=!1,m&&(m=!1,v(E),E=-1),h=!0;var a=f;try{t:{for(x(t),d=n(l);null!==d&&!(d.expirationTime>t&&T());){var i=d.callback;if("function"==typeof i){d.callback=null,f=d.priorityLevel;var s=i(d.expirationTime<=t);if(t=e.unstable_now(),"function"==typeof s){d.callback=s,x(t),o=!0;break t}d===n(l)&&r(l),x(t)}else r(l);d=n(l)}if(null!==d)o=!0;else{var u=n(c);null!==u&&O(w,u.startTime-t),o=!1}}break e}finally{d=null,f=a,h=!1}o=void 0}}finally{o?S():k=!1}}}if("function"==typeof b)S=function(){b(j)};else if("undefined"!=typeof MessageChannel){var R=new MessageChannel,P=R.port2;R.port1.onmessage=j,S=function(){P.postMessage(null)}}else S=function(){y(j,0)};function O(t,n){E=y(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||(C=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,o,a){var i=e.unstable_now();switch("object"==typeof a&&null!==a?a="number"==typeof(a=a.delay)&&0<a?i+a:i:a=i,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 r={id:u++,callback:o,priorityLevel:r,startTime:a,expirationTime:s=a+s,sortIndex:-1},a>i?(r.sortIndex=a,t(c,r),null===n(l)&&r===n(c)&&(m?(v(E),E=-1):m=!0,O(w,a-i))):(r.sortIndex=s,t(l,r),p||h||(p=!0,k||(k=!0,S()))),r},e.unstable_shouldYield=T,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=i((e,t)=>{t.exports=f()}),p=i(e=>{var t=d();function n(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var o={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");var i=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function s(e,t){return"font"===e?"":"string"==typeof t?"use-credentials"===t?t:"":void 0}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,e.createPortal=function(e,t){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!t||1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType)throw Error(n(299));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:a,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,r)},e.flushSync=function(e){var t=i.T,n=o.p;try{if(i.T=null,o.p=2,e)return e()}finally{i.T=t,o.p=n,o.d.f()}},e.preconnect=function(e,t){"string"==typeof e&&(t?t="string"==typeof(t=t.crossOrigin)?"use-credentials"===t?t:"":void 0:t=null,o.d.C(e,t))},e.prefetchDNS=function(e){"string"==typeof e&&o.d.D(e)},e.preinit=function(e,t){if("string"==typeof e&&t&&"string"==typeof t.as){var n=t.as,r=s(n,t.crossOrigin),a="string"==typeof t.integrity?t.integrity:void 0,i="string"==typeof t.fetchPriority?t.fetchPriority:void 0;"style"===n?o.d.S(e,"string"==typeof t.precedence?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:i}):"script"===n&&o.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:i,nonce:"string"==typeof t.nonce?t.nonce:void 0})}},e.preinitModule=function(e,t){if("string"==typeof e)if("object"==typeof t&&null!==t){if(null==t.as||"script"===t.as){var n=s(t.as,t.crossOrigin);o.d.M(e,{crossOrigin:n,integrity:"string"==typeof t.integrity?t.integrity:void 0,nonce:"string"==typeof t.nonce?t.nonce:void 0})}}else t??o.d.M(e)},e.preload=function(e,t){if("string"==typeof e&&"object"==typeof t&&null!==t&&"string"==typeof t.as){var n=t.as,r=s(n,t.crossOrigin);o.d.L(e,n,{crossOrigin:r,integrity:"string"==typeof t.integrity?t.integrity:void 0,nonce:"string"==typeof t.nonce?t.nonce:void 0,type:"string"==typeof t.type?t.type:void 0,fetchPriority:"string"==typeof t.fetchPriority?t.fetchPriority:void 0,referrerPolicy:"string"==typeof t.referrerPolicy?t.referrerPolicy:void 0,imageSrcSet:"string"==typeof t.imageSrcSet?t.imageSrcSet:void 0,imageSizes:"string"==typeof t.imageSizes?t.imageSizes:void 0,media:"string"==typeof t.media?t.media:void 0})}},e.preloadModule=function(e,t){if("string"==typeof e)if(t){var n=s(t.as,t.crossOrigin);o.d.m(e,{as:"string"==typeof t.as&&"script"!==t.as?t.as:void 0,crossOrigin:n,integrity:"string"==typeof t.integrity?t.integrity:void 0})}else o.d.m(e)},e.requestFormReset=function(e){o.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return i.H.useFormState(e,t,n)},e.useFormStatus=function(){return i.H.useHostTransitionStatus()},e.version="19.2.7"}),m=i((e,t)=>{!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(Fc){}}(),t.exports=p()}),g=i(e=>{var t=h(),n=d(),r=m();function o(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){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{!!(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function i(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function s(e){if(31===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function l(e){if(a(e)!==e)throw Error(o(188))}function c(e){var t=e.tag;if(5===t||26===t||27===t||6===t)return e;for(e=e.child;null!==e;){if(null!==(t=c(e)))return t;e=e.sibling}return null}var u=Object.assign,f=Symbol.for("react.element"),p=Symbol.for("react.transitional.element"),g=Symbol.for("react.portal"),y=Symbol.for("react.fragment"),v=Symbol.for("react.strict_mode"),b=Symbol.for("react.profiler"),x=Symbol.for("react.consumer"),w=Symbol.for("react.context"),S=Symbol.for("react.forward_ref"),k=Symbol.for("react.suspense"),E=Symbol.for("react.suspense_list"),C=Symbol.for("react.memo"),N=Symbol.for("react.lazy"),T=Symbol.for("react.activity"),j=Symbol.for("react.memo_cache_sentinel"),R=Symbol.iterator;function P(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=R&&e[R]||e["@@iterator"])?e:null}var O=Symbol.for("react.client.reference");function _(e){if(null==e)return null;if("function"==typeof e)return e.$$typeof===O?null:e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case y:return"Fragment";case b:return"Profiler";case v:return"StrictMode";case k:return"Suspense";case E:return"SuspenseList";case T:return"Activity"}if("object"==typeof e)switch(e.$$typeof){case g:return"Portal";case w:return e.displayName||"Context";case x:return(e._context.displayName||"Context")+".Consumer";case S:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case C:return null!==(t=e.displayName||null)?t:_(e.type)||"Memo";case N:t=e._payload,e=e._init;try{return _(e(t))}catch(n){}}return null}var A=Array.isArray,D=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,M=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,L={pending:!1,data:null,method:null,action:null},I=[],z=-1;function F(e){return{current:e}}function B(e){0>z||(e.current=I[z],I[z]=null,z--)}function U(e,t){z++,I[z]=e.current,e.current=t}var V,$,H=F(null),q=F(null),W=F(null),K=F(null);function G(e,t){switch(U(W,t),U(q,e),U(H,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?vd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)e=bd(t=vd(t),e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}B(H),U(H,e)}function Y(){B(H),B(q),B(W)}function Q(e){null!==e.memoizedState&&U(K,e);var t=H.current,n=bd(t,e.type);t!==n&&(U(q,e),U(H,n))}function X(e){q.current===e&&(B(H),B(q)),K.current===e&&(B(K),ff._currentValue=L)}function J(e){if(void 0===V)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);V=t&&t[1]||"",$=-1<n.stack.indexOf("\n at")?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return"\n"+V+e+$}var Z=!1;function ee(e,t){if(!e||Z)return"";Z=!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()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(n,[])}catch(o){var r=o}Reflect.construct(e,[],n)}else{try{n.call()}catch(a){r=a}e.call(n.prototype)}}else{try{throw Error()}catch(i){r=i}(n=e())&&"function"==typeof n.catch&&n.catch(function(){})}}catch(s){if(s&&r&&"string"==typeof s.stack)return[s.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var o=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,"name");o&&o.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var a=r.DetermineComponentFrameRoot(),i=a[0],s=a[1];if(i&&s){var l=i.split("\n"),c=s.split("\n");for(o=r=0;r<l.length&&!l[r].includes("DetermineComponentFrameRoot");)r++;for(;o<c.length&&!c[o].includes("DetermineComponentFrameRoot");)o++;if(r===l.length||o===c.length)for(r=l.length-1,o=c.length-1;1<=r&&0<=o&&l[r]!==c[o];)o--;for(;1<=r&&0<=o;r--,o--)if(l[r]!==c[o]){if(1!==r||1!==o)do{if(r--,0>--o||l[r]!==c[o]){var u="\n"+l[r].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}}while(1<=r&&0<=o);break}}}finally{Z=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?J(n):""}function te(e,t){switch(e.tag){case 26:case 27:case 5:return J(e.type);case 16:return J("Lazy");case 13:return e.child!==t&&null!==t?J("Suspense Fallback"):J("Suspense");case 19:return J("SuspenseList");case 0:case 15:return ee(e.type,!1);case 11:return ee(e.type.render,!1);case 1:return ee(e.type,!0);case 31:return J("Activity");default:return""}}function ne(e){try{var t="",n=null;do{t+=te(e,n),n=e,e=e.return}while(e);return t}catch(r){return"\nError generating stack: "+r.message+"\n"+r.stack}}var re=Object.prototype.hasOwnProperty,oe=t.unstable_scheduleCallback,ae=t.unstable_cancelCallback,ie=t.unstable_shouldYield,se=t.unstable_requestPaint,le=t.unstable_now,ce=t.unstable_getCurrentPriorityLevel,ue=t.unstable_ImmediatePriority,de=t.unstable_UserBlockingPriority,fe=t.unstable_NormalPriority,he=t.unstable_LowPriority,pe=t.unstable_IdlePriority,me=t.log,ge=t.unstable_setDisableYieldValue,ye=null,ve=null;function be(e){if("function"==typeof me&&ge(e),ve&&"function"==typeof ve.setStrictMode)try{ve.setStrictMode(ye,e)}catch(Fc){}}var xe=Math.clz32?Math.clz32:function(e){return 0===(e>>>=0)?32:31-(we(e)/Se|0)|0},we=Math.log,Se=Math.LN2;var ke=256,Ee=262144,Ce=4194304;function Ne(e){var t=42&e;if(0!==t)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 261888&e;case 262144:case 524288:case 1048576:case 2097152:return 3932160&e;case 4194304:case 8388608:case 16777216:case 33554432:return 62914560&e;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Te(e,t,n){var r=e.pendingLanes;if(0===r)return 0;var o=0,a=e.suspendedLanes,i=e.pingedLanes;e=e.warmLanes;var s=134217727&r;return 0!==s?0!==(r=s&~a)?o=Ne(r):0!==(i&=s)?o=Ne(i):n||0!==(n=s&~e)&&(o=Ne(n)):0!==(s=r&~a)?o=Ne(s):0!==i?o=Ne(i):n||0!==(n=r&~e)&&(o=Ne(n)),0===o?0:0!==t&&t!==o&&0===(t&a)&&((a=o&-o)>=(n=t&-t)||32===a&&4194048&n)?t:o}function je(e,t){return 0===(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)}function Re(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;default:return-1}}function Pe(){var e=Ce;return!(62914560&(Ce<<=1))&&(Ce=4194304),e}function Oe(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function _e(e,t){e.pendingLanes|=t,268435456!==t&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Ae(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-xe(t);e.entangledLanes|=t,e.entanglements[r]=1073741824|e.entanglements[r]|261930&n}function De(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-xe(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}function Me(e,t){var n=t&-t;return 0!==((n=42&n?1:Le(n))&(e.suspendedLanes|t))?0:n}function Le(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 Ie(e){return 2<(e&=-e)?8<e?134217727&e?32:268435456:8:2}function ze(){var e=M.p;return 0!==e?e:void 0===(e=window.event)?32:Nf(e.type)}function Fe(e,t){var n=M.p;try{return M.p=e,t()}finally{M.p=n}}var Be=Math.random().toString(36).slice(2),Ue="__reactFiber$"+Be,Ve="__reactProps$"+Be,$e="__reactContainer$"+Be,He="__reactEvents$"+Be,qe="__reactListeners$"+Be,We="__reactHandles$"+Be,Ke="__reactResources$"+Be,Ge="__reactMarker$"+Be;function Ye(e){delete e[Ue],delete e[Ve],delete e[He],delete e[qe],delete e[We]}function Qe(e){var t=e[Ue];if(t)return t;for(var n=e.parentNode;n;){if(t=n[$e]||n[Ue]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=Id(e);null!==e;){if(n=e[Ue])return n;e=Id(e)}return t}n=(e=n).parentNode}return null}function Xe(e){if(e=e[Ue]||e[$e]){var t=e.tag;if(5===t||6===t||13===t||31===t||26===t||27===t||3===t)return e}return null}function Je(e){var t=e.tag;if(5===t||26===t||27===t||6===t)return e.stateNode;throw Error(o(33))}function Ze(e){var t=e[Ke];return t||(t=e[Ke]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function et(e){e[Ge]=!0}var tt=new Set,nt={};function rt(e,t){ot(e,t),ot(e+"Capture",t)}function ot(e,t){for(nt[e]=t,e=0;e<t.length;e++)tt.add(t[e])}var at=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]*$"),it={},st={};function lt(e,t,n){if(o=t,re.call(st,o)||!re.call(it,o)&&(at.test(o)?st[o]=!0:(it[o]=!0,0)))if(null===n)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":return void e.removeAttribute(t);case"boolean":var r=t.toLowerCase().slice(0,5);if("data-"!==r&&"aria-"!==r)return void e.removeAttribute(t)}e.setAttribute(t,""+n)}var o}function ct(e,t,n){if(null===n)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":return void e.removeAttribute(t)}e.setAttribute(t,""+n)}}function ut(e,t,n,r){if(null===r)e.removeAttribute(n);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":return void e.removeAttribute(n)}e.setAttributeNS(t,n,""+r)}}function dt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function ft(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function ht(e){if(!e._valueTracker){var t=ft(e)?"checked":"value";e._valueTracker=function(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&void 0!==r&&"function"==typeof r.get&&"function"==typeof r.set){var o=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.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]}}}}(e,t,""+e[t])}}function pt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=ft(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function mt(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}var gt=/[\n"\\]/g;function yt(e){return e.replace(gt,function(e){return"\\"+e.charCodeAt(0).toString(16)+" "})}function vt(e,t,n,r,o,a,i,s){e.name="",null!=i&&"function"!=typeof i&&"symbol"!=typeof i&&"boolean"!=typeof i?e.type=i:e.removeAttribute("type"),null!=t?"number"===i?(0===t&&""===e.value||e.value!=t)&&(e.value=""+dt(t)):e.value!==""+dt(t)&&(e.value=""+dt(t)):"submit"!==i&&"reset"!==i||e.removeAttribute("value"),null!=t?xt(e,i,dt(t)):null!=n?xt(e,i,dt(n)):null!=r&&e.removeAttribute("value"),null==o&&null!=a&&(e.defaultChecked=!!a),null!=o&&(e.checked=o&&"function"!=typeof o&&"symbol"!=typeof o),null!=s&&"function"!=typeof s&&"symbol"!=typeof s&&"boolean"!=typeof s?e.name=""+dt(s):e.removeAttribute("name")}function bt(e,t,n,r,o,a,i,s){if(null!=a&&"function"!=typeof a&&"symbol"!=typeof a&&"boolean"!=typeof a&&(e.type=a),null!=t||null!=n){if(("submit"===a||"reset"===a)&&null==t)return void ht(e);n=null!=n?""+dt(n):"",t=null!=t?""+dt(t):n,s||t===e.value||(e.value=t),e.defaultValue=t}r="function"!=typeof(r=null!=r?r:o)&&"symbol"!=typeof r&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,null!=i&&"function"!=typeof i&&"symbol"!=typeof i&&"boolean"!=typeof i&&(e.name=i),ht(e)}function xt(e,t,n){"number"===t&&mt(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function wt(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+dt(n),t=null,o=0;o<e.length;o++){if(e[o].value===n)return e[o].selected=!0,void(r&&(e[o].defaultSelected=!0));null!==t||e[o].disabled||(t=e[o])}null!==t&&(t.selected=!0)}}function St(e,t,n){null==t||((t=""+dt(t))!==e.value&&(e.value=t),null!=n)?e.defaultValue=null!=n?""+dt(n):"":e.defaultValue!==t&&(e.defaultValue=t)}function kt(e,t,n,r){if(null==t){if(null!=r){if(null!=n)throw Error(o(92));if(A(r)){if(1<r.length)throw Error(o(93));r=r[0]}n=r}n??="",t=n}n=dt(t),e.defaultValue=n,(r=e.textContent)===n&&""!==r&&null!==r&&(e.value=r),ht(e)}function Et(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var Ct=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 Nt(e,t,n){var r=0===t.indexOf("--");null==n||"boolean"==typeof n||""===n?r?e.setProperty(t,""):"float"===t?e.cssFloat="":e[t]="":r?e.setProperty(t,n):"number"!=typeof n||0===n||Ct.has(t)?"float"===t?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function Tt(e,t,n){if(null!=t&&"object"!=typeof t)throw Error(o(62));if(e=e.style,null!=n){for(var r in n)!n.hasOwnProperty(r)||null!=t&&t.hasOwnProperty(r)||(0===r.indexOf("--")?e.setProperty(r,""):"float"===r?e.cssFloat="":e[r]="");for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&Nt(e,a,r)}else for(var i in t)t.hasOwnProperty(i)&&Nt(e,i,t[i])}function jt(e){if(-1===e.indexOf("-"))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 Rt=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"]]),Pt=/^[\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 Ot(e){return Pt.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function _t(){}var At=null;function Dt(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Mt=null,Lt=null;function It(e){var t=Xe(e);if(t&&(e=t.stateNode)){var n=e[Ve]||null;e:switch(e=t.stateNode,t.type){case"input":if(vt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+yt(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[Ve]||null;if(!a)throw Error(o(90));vt(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]).form===e.form&&pt(r)}break e;case"textarea":St(e,n.value,n.defaultValue);break e;case"select":null!=(t=n.value)&&wt(e,!!n.multiple,t,!1)}}}var zt=!1;function Ft(e,t,n){if(zt)return e(t,n);zt=!0;try{return e(t)}finally{if(zt=!1,(null!==Mt||null!==Lt)&&(eu(),Mt&&(t=Mt,e=Lt,Lt=Mt=null,It(t),e)))for(t=0;t<e.length;t++)It(e[t])}}function Bt(e,t){var n=e.stateNode;if(null===n)return null;var r=n[Ve]||null;if(null===r)return null;n=r[t];e: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)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(o(231,t,typeof n));return n}var Ut=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),Vt=!1;if(Ut)try{var $t={};Object.defineProperty($t,"passive",{get:function(){Vt=!0}}),window.addEventListener("test",$t,$t),window.removeEventListener("test",$t,$t)}catch(Xf){Vt=!1}var Ht=null,qt=null,Wt=null;function Kt(){if(Wt)return Wt;var e,t,n=qt,r=n.length,o="value"in Ht?Ht.value:Ht.textContent,a=o.length;for(e=0;e<r&&n[e]===o[e];e++);var i=r-e;for(t=1;t<=i&&n[r-t]===o[a-t];t++);return Wt=o.slice(e,1<t?1-t:void 0)}function Gt(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function Yt(){return!0}function Qt(){return!1}function Xt(e){function t(t,n,r,o,a){for(var i in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=o,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(i)&&(t=e[i],this[i]=t?t(o):o[i]);return this.isDefaultPrevented=(null!=o.defaultPrevented?o.defaultPrevented:!1===o.returnValue)?Yt:Qt,this.isPropagationStopped=Qt,this}return u(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=Yt)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=Yt)},persist:function(){},isPersistent:Yt}),t}var Jt,Zt,en,tn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},nn=Xt(tn),rn=u({},tn,{view:0,detail:0}),on=Xt(rn),an=u({},rn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:yn,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==en&&(en&&"mousemove"===e.type?(Jt=e.screenX-en.screenX,Zt=e.screenY-en.screenY):Zt=Jt=0,en=e),Jt)},movementY:function(e){return"movementY"in e?e.movementY:Zt}}),sn=Xt(an),ln=Xt(u({},an,{dataTransfer:0})),cn=Xt(u({},rn,{relatedTarget:0})),un=Xt(u({},tn,{animationName:0,elapsedTime:0,pseudoElement:0})),dn=Xt(u({},tn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}})),fn=Xt(u({},tn,{data:0})),hn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},pn={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},mn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function gn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=mn[e])&&!!t[e]}function yn(){return gn}var vn=Xt(u({},rn,{key:function(e){if(e.key){var t=hn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=Gt(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?pn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:yn,charCode:function(e){return"keypress"===e.type?Gt(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?Gt(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}})),bn=Xt(u({},an,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),xn=Xt(u({},rn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:yn})),wn=Xt(u({},tn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Sn=Xt(u({},an,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),kn=Xt(u({},tn,{newState:0,oldState:0})),En=[9,13,27,32],Cn=Ut&&"CompositionEvent"in window,Nn=null;Ut&&"documentMode"in document&&(Nn=document.documentMode);var Tn=Ut&&"TextEvent"in window&&!Nn,jn=Ut&&(!Cn||Nn&&8<Nn&&11>=Nn),Rn=String.fromCharCode(32),Pn=!1;function On(e,t){switch(e){case"keyup":return-1!==En.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function _n(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var An=!1;var Dn={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 Mn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Dn[e.type]:"textarea"===t}function Ln(e,t,n,r){Mt?Lt?Lt.push(r):Lt=[r]:Mt=r,0<(t=od(t,"onChange")).length&&(n=new nn("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var In=null,zn=null;function Fn(e){Qu(e,0)}function Bn(e){if(pt(Je(e)))return e}function Un(e,t){if("change"===e)return t}var Vn=!1;if(Ut){var $n;if(Ut){var Hn="oninput"in document;if(!Hn){var qn=document.createElement("div");qn.setAttribute("oninput","return;"),Hn="function"==typeof qn.oninput}$n=Hn}else $n=!1;Vn=$n&&(!document.documentMode||9<document.documentMode)}function Wn(){In&&(In.detachEvent("onpropertychange",Kn),zn=In=null)}function Kn(e){if("value"===e.propertyName&&Bn(zn)){var t=[];Ln(t,zn,e,Dt(e)),Ft(Fn,t)}}function Gn(e,t,n){"focusin"===e?(Wn(),zn=n,(In=t).attachEvent("onpropertychange",Kn)):"focusout"===e&&Wn()}function Yn(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Bn(zn)}function Qn(e,t){if("click"===e)return Bn(t)}function Xn(e,t){if("input"===e||"change"===e)return Bn(t)}var Jn="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function Zn(e,t){if(Jn(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===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 o=n[r];if(!re.call(t,o)||!Jn(e[o],t[o]))return!1}return!0}function er(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function tr(e,t){var n,r=er(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=er(r)}}function nr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?nr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function rr(e){for(var t=mt((e=null!=e&&null!=e.ownerDocument&&null!=e.ownerDocument.defaultView?e.ownerDocument.defaultView:window).document);t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(Fc){n=!1}if(!n)break;t=mt((e=t.contentWindow).document)}return t}function or(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var ar=Ut&&"documentMode"in document&&11>=document.documentMode,ir=null,sr=null,lr=null,cr=!1;function ur(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;cr||null==ir||ir!==mt(r)||("selectionStart"in(r=ir)&&or(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},lr&&Zn(lr,r)||(lr=r,0<(r=od(sr,"onSelect")).length&&(t=new nn("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=ir)))}function dr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var fr={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")},hr={},pr={};function mr(e){if(hr[e])return hr[e];if(!fr[e])return e;var t,n=fr[e];for(t in n)if(n.hasOwnProperty(t)&&t in pr)return hr[e]=n[t];return e}Ut&&(pr=document.createElement("div").style,"AnimationEvent"in window||(delete fr.animationend.animation,delete fr.animationiteration.animation,delete fr.animationstart.animation),"TransitionEvent"in window||delete fr.transitionend.transition);var gr=mr("animationend"),yr=mr("animationiteration"),vr=mr("animationstart"),br=mr("transitionrun"),xr=mr("transitionstart"),wr=mr("transitioncancel"),Sr=mr("transitionend"),kr=new Map,Er="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(" ");function Cr(e,t){kr.set(e,t),rt(t,[e])}Er.push("scrollEnd");var Nr="function"==typeof reportError?reportError:function(e){if("object"==typeof window&&"function"==typeof window.ErrorEvent){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:"object"==typeof e&&null!==e&&"string"==typeof e.message?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if("object"==typeof process&&"function"==typeof process.emit)return void process.emit("uncaughtException",e)},Tr=[],jr=0,Rr=0;function Pr(){for(var e=jr,t=Rr=jr=0;t<e;){var n=Tr[t];Tr[t++]=null;var r=Tr[t];Tr[t++]=null;var o=Tr[t];Tr[t++]=null;var a=Tr[t];if(Tr[t++]=null,null!==r&&null!==o){var i=r.pending;null===i?o.next=o:(o.next=i.next,i.next=o),r.pending=o}0!==a&&Dr(n,o,a)}}function Or(e,t,n,r){Tr[jr++]=e,Tr[jr++]=t,Tr[jr++]=n,Tr[jr++]=r,Rr|=r,e.lanes|=r,null!==(e=e.alternate)&&(e.lanes|=r)}function _r(e,t,n,r){return Or(e,t,n,r),Mr(e)}function Ar(e,t){return Or(e,null,null,t),Mr(e)}function Dr(e,t,n){e.lanes|=n;var r=e.alternate;null!==r&&(r.lanes|=n);for(var o=!1,a=e.return;null!==a;)a.childLanes|=n,null!==(r=a.alternate)&&(r.childLanes|=n),22===a.tag&&(null===(e=a.stateNode)||1&e._visibility||(o=!0)),e=a,a=a.return;return 3===e.tag?(a=e.stateNode,o&&null!==t&&(o=31-xe(n),null===(r=(e=a.hiddenUpdates)[o])?e[o]=[t]:r.push(t),t.lane=536870912|n),a):null}function Mr(e){if(50<qc)throw qc=0,Wc=null,Error(o(185));for(var t=e.return;null!==t;)t=(e=t).return;return 3===e.tag?e.stateNode:null}var Lr={};function Ir(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 zr(e,t,n,r){return new Ir(e,t,n,r)}function Fr(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Br(e,t){var n=e.alternate;return null===n?((n=zr(e.tag,t,e.key,e.mode)).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=65011712&e.flags,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=null===t?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 Ur(e,t){e.flags&=65011714;var n=e.alternate;return null===n?(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=null===t?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Vr(e,t,n,r,a,i){var s=0;if(r=e,"function"==typeof e)Fr(e)&&(s=1);else if("string"==typeof e)s=function(e,t,n){if(1===n||null!=t.itemProp)return!1;switch(e){case"meta":case"title":return!0;case"style":if("string"!=typeof t.precedence||"string"!=typeof t.href||""===t.href)break;return!0;case"link":if("string"!=typeof t.rel||"string"!=typeof t.href||""===t.href||t.onLoad||t.onError)break;return"stylesheet"!==t.rel||(e=t.disabled,"string"==typeof t.precedence&&null==e);case"script":if(t.async&&"function"!=typeof t.async&&"symbol"!=typeof t.async&&!t.onLoad&&!t.onError&&t.src&&"string"==typeof t.src)return!0}return!1}(e,n,H.current)?26:"html"===e||"head"===e||"body"===e?27:5;else e:switch(e){case T:return(e=zr(31,n,t,a)).elementType=T,e.lanes=i,e;case y:return $r(n.children,a,i,t);case v:s=8,a|=24;break;case b:return(e=zr(12,n,t,2|a)).elementType=b,e.lanes=i,e;case k:return(e=zr(13,n,t,a)).elementType=k,e.lanes=i,e;case E:return(e=zr(19,n,t,a)).elementType=E,e.lanes=i,e;default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case w:s=10;break e;case x:s=9;break e;case S:s=11;break e;case C:s=14;break e;case N:s=16,r=null;break e}s=29,n=Error(o(130,null===e?"null":typeof e,"")),r=null}return(t=zr(s,n,t,a)).elementType=e,t.type=r,t.lanes=i,t}function $r(e,t,n,r){return(e=zr(7,e,r,t)).lanes=n,e}function Hr(e,t,n){return(e=zr(6,e,null,t)).lanes=n,e}function qr(e){var t=zr(18,null,null,0);return t.stateNode=e,t}function Wr(e,t,n){return(t=zr(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Kr=new WeakMap;function Gr(e,t){if("object"==typeof e&&null!==e){var n=Kr.get(e);return void 0!==n?n:(t={value:e,source:t,stack:ne(t)},Kr.set(e,t),t)}return{value:e,source:t,stack:ne(t)}}var Yr=[],Qr=0,Xr=null,Jr=0,Zr=[],eo=0,to=null,no=1,ro="";function oo(e,t){Yr[Qr++]=Jr,Yr[Qr++]=Xr,Xr=e,Jr=t}function ao(e,t,n){Zr[eo++]=no,Zr[eo++]=ro,Zr[eo++]=to,to=e;var r=no;e=ro;var o=32-xe(r)-1;r&=~(1<<o),n+=1;var a=32-xe(t)+o;if(30<a){var i=o-o%5;a=(r&(1<<i)-1).toString(32),r>>=i,o-=i,no=1<<32-xe(t)+o|n<<o|r,ro=a+e}else no=1<<a|n<<o|r,ro=e}function io(e){null!==e.return&&(oo(e,1),ao(e,1,0))}function so(e){for(;e===Xr;)Xr=Yr[--Qr],Yr[Qr]=null,Jr=Yr[--Qr],Yr[Qr]=null;for(;e===to;)to=Zr[--eo],Zr[eo]=null,ro=Zr[--eo],Zr[eo]=null,no=Zr[--eo],Zr[eo]=null}function lo(e,t){Zr[eo++]=no,Zr[eo++]=ro,Zr[eo++]=to,no=t.id,ro=t.overflow,to=e}var co=null,uo=null,fo=!1,ho=null,po=!1,mo=Error(o(519));function go(e){throw So(Gr(Error(o(418,1<arguments.length&&void 0!==arguments[1]&&arguments[1]?"text":"HTML","")),e)),mo}function yo(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[Ue]=e,t[Ve]=r,n){case"dialog":Xu("cancel",t),Xu("close",t);break;case"iframe":case"object":case"embed":Xu("load",t);break;case"video":case"audio":for(n=0;n<Gu.length;n++)Xu(Gu[n],t);break;case"source":Xu("error",t);break;case"img":case"image":case"link":Xu("error",t),Xu("load",t);break;case"details":Xu("toggle",t);break;case"input":Xu("invalid",t),bt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case"select":Xu("invalid",t);break;case"textarea":Xu("invalid",t),kt(t,r.value,r.defaultValue,r.children)}"string"!=typeof(n=r.children)&&"number"!=typeof n&&"bigint"!=typeof n||t.textContent===""+n||!0===r.suppressHydrationWarning||ud(t.textContent,n)?(null!=r.popover&&(Xu("beforetoggle",t),Xu("toggle",t)),null!=r.onScroll&&Xu("scroll",t),null!=r.onScrollEnd&&Xu("scrollend",t),null!=r.onClick&&(t.onclick=_t),t=!0):t=!1,t||go(e,!0)}function vo(e){for(co=e.return;co;)switch(co.tag){case 5:case 31:case 13:return void(po=!1);case 27:case 3:return void(po=!0);default:co=co.return}}function bo(e){if(e!==co)return!1;if(!fo)return vo(e),fo=!0,!1;var t,n=e.tag;if((t=3!==n&&27!==n)&&((t=5===n)&&(t=!("form"!==(t=e.type)&&"button"!==t)||xd(e.type,e.memoizedProps)),t=!t),t&&uo&&go(e),vo(e),13===n){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(o(317));uo=Ld(e)}else if(31===n){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(o(317));uo=Ld(e)}else 27===n?(n=uo,Td(e.type)?(e=Md,Md=null,uo=e):uo=n):uo=co?Dd(e.stateNode.nextSibling):null;return!0}function xo(){uo=co=null,fo=!1}function wo(){var e=ho;return null!==e&&(null===Pc?Pc=e:Pc.push.apply(Pc,e),ho=null),e}function So(e){null===ho?ho=[e]:ho.push(e)}var ko=F(null),Eo=null,Co=null;function No(e,t,n){U(ko,t._currentValue),t._currentValue=n}function To(e){e._currentValue=ko.current,B(ko)}function jo(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Ro(e,t,n,r){var a=e.child;for(null!==a&&(a.return=e);null!==a;){var i=a.dependencies;if(null!==i){var s=a.child;i=i.firstContext;e:for(;null!==i;){var l=i;i=a;for(var c=0;c<t.length;c++)if(l.context===t[c]){i.lanes|=n,null!==(l=i.alternate)&&(l.lanes|=n),jo(i.return,n,e),r||(s=null);break e}i=l.next}}else if(18===a.tag){if(null===(s=a.return))throw Error(o(341));s.lanes|=n,null!==(i=s.alternate)&&(i.lanes|=n),jo(s,n,e),s=null}else s=a.child;if(null!==s)s.return=a;else for(s=a;null!==s;){if(s===e){s=null;break}if(null!==(a=s.sibling)){a.return=s.return,s=a;break}s=s.return}a=s}}function Po(e,t,n,r){e=null;for(var a=t,i=!1;null!==a;){if(!i)if(524288&a.flags)i=!0;else if(262144&a.flags)break;if(10===a.tag){var s=a.alternate;if(null===s)throw Error(o(387));if(null!==(s=s.memoizedProps)){var l=a.type;Jn(a.pendingProps.value,s.value)||(null!==e?e.push(l):e=[l])}}else if(a===K.current){if(null===(s=a.alternate))throw Error(o(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(null!==e?e.push(ff):e=[ff])}a=a.return}null!==e&&Ro(t,e,n,r),t.flags|=262144}function Oo(e){for(e=e.firstContext;null!==e;){if(!Jn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function _o(e){Eo=e,Co=null,null!==(e=e.dependencies)&&(e.firstContext=null)}function Ao(e){return Mo(Eo,e)}function Do(e,t){return null===Eo&&_o(e),Mo(e,t)}function Mo(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},null===Co){if(null===e)throw Error(o(308));Co=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Co=Co.next=t;return n}var Lo="undefined"!=typeof AbortController?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()})}},Io=t.unstable_scheduleCallback,zo=t.unstable_NormalPriority,Fo={$$typeof:w,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Bo(){return{controller:new Lo,data:new Map,refCount:0}}function Uo(e){e.refCount--,0===e.refCount&&Io(zo,function(){e.controller.abort()})}var Vo=null,$o=0,Ho=0,qo=null;function Wo(){if(0===--$o&&null!==Vo){null!==qo&&(qo.status="fulfilled");var e=Vo;Vo=null,Ho=0,qo=null;for(var t=0;t<e.length;t++)(0,e[t])()}}var Ko=D.S;D.S=function(e,t){Ac=le(),"object"==typeof t&&null!==t&&"function"==typeof t.then&&function(e,t){if(null===Vo){var n=Vo=[];$o=0,Ho=$u(),qo={status:"pending",value:void 0,then:function(e){n.push(e)}}}$o++,t.then(Wo,Wo)}(0,t),null!==Ko&&Ko(e,t)};var Go=F(null);function Yo(){var e=Go.current;return null!==e?e:pc.pooledCache}function Qo(e,t){U(Go,null===t?Go.current:t.pool)}function Xo(){var e=Yo();return null===e?null:{parent:Fo._currentValue,pool:e}}var Jo=Error(o(460)),Zo=Error(o(474)),ea=Error(o(542)),ta={then:function(){}};function na(e){return"fulfilled"===(e=e.status)||"rejected"===e}function ra(e,t,n){switch(void 0===(n=e[n])?e.push(t):n!==t&&(t.then(_t,_t),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw sa(e=t.reason),e;default:if("string"==typeof t.status)t.then(_t,_t);else{if(null!==(e=pc)&&100<e.shellSuspendCounter)throw Error(o(482));(e=t).status="pending",e.then(function(e){if("pending"===t.status){var n=t;n.status="fulfilled",n.value=e}},function(e){if("pending"===t.status){var n=t;n.status="rejected",n.reason=e}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw sa(e=t.reason),e}throw aa=t,Jo}}function oa(e){try{return(0,e._init)(e._payload)}catch(t){if(null!==t&&"object"==typeof t&&"function"==typeof t.then)throw aa=t,Jo;throw t}}var aa=null;function ia(){if(null===aa)throw Error(o(459));var e=aa;return aa=null,e}function sa(e){if(e===Jo||e===ea)throw Error(o(483))}var la=null,ca=0;function ua(e){var t=ca;return ca+=1,null===la&&(la=[]),ra(la,e,t)}function da(e,t){t=t.props.ref,e.ref=void 0!==t?t:null}function fa(e,t){if(t.$$typeof===f)throw Error(o(525));throw e=Object.prototype.toString.call(t),Error(o(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function ha(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;null!==e;)null!==e.key?t.set(e.key,e):t.set(e.index,e),e=e.sibling;return t}function a(e,t){return(e=Br(e,t)).index=0,e.sibling=null,e}function i(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=67108866,n):r:(t.flags|=67108866,n):(t.flags|=1048576,n)}function s(t){return e&&null===t.alternate&&(t.flags|=67108866),t}function l(e,t,n,r){return null===t||6!==t.tag?((t=Hr(n,e.mode,r)).return=e,t):((t=a(t,n)).return=e,t)}function c(e,t,n,r){var o=n.type;return o===y?d(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===o||"object"==typeof o&&null!==o&&o.$$typeof===N&&oa(o)===t.type)?(da(t=a(t,n.props),n),t.return=e,t):(da(t=Vr(n.type,n.key,n.props,null,e.mode,r),n),t.return=e,t)}function u(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Wr(n,e.mode,r)).return=e,t):((t=a(t,n.children||[])).return=e,t)}function d(e,t,n,r,o){return null===t||7!==t.tag?((t=$r(n,e.mode,r,o)).return=e,t):((t=a(t,n)).return=e,t)}function f(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t||"bigint"==typeof t)return(t=Hr(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case p:return da(n=Vr(t.type,t.key,t.props,null,e.mode,n),t),n.return=e,n;case g:return(t=Wr(t,e.mode,n)).return=e,t;case N:return f(e,t=oa(t),n)}if(A(t)||P(t))return(t=$r(t,e.mode,n,null)).return=e,t;if("function"==typeof t.then)return f(e,ua(t),n);if(t.$$typeof===w)return f(e,Do(e,t),n);fa(e,t)}return null}function h(e,t,n,r){var o=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n||"bigint"==typeof n)return null!==o?null:l(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case p:return n.key===o?c(e,t,n,r):null;case g:return n.key===o?u(e,t,n,r):null;case N:return h(e,t,n=oa(n),r)}if(A(n)||P(n))return null!==o?null:d(e,t,n,r,null);if("function"==typeof n.then)return h(e,t,ua(n),r);if(n.$$typeof===w)return h(e,t,Do(e,n),r);fa(e,n)}return null}function m(e,t,n,r,o){if("string"==typeof r&&""!==r||"number"==typeof r||"bigint"==typeof r)return l(t,e=e.get(n)||null,""+r,o);if("object"==typeof r&&null!==r){switch(r.$$typeof){case p:return c(t,e=e.get(null===r.key?n:r.key)||null,r,o);case g:return u(t,e=e.get(null===r.key?n:r.key)||null,r,o);case N:return m(e,t,n,r=oa(r),o)}if(A(r)||P(r))return d(t,e=e.get(n)||null,r,o,null);if("function"==typeof r.then)return m(e,t,n,ua(r),o);if(r.$$typeof===w)return m(e,t,n,Do(t,r),o);fa(t,r)}return null}function v(l,c,u,d){if("object"==typeof u&&null!==u&&u.type===y&&null===u.key&&(u=u.props.children),"object"==typeof u&&null!==u){switch(u.$$typeof){case p:e:{for(var b=u.key;null!==c;){if(c.key===b){if((b=u.type)===y){if(7===c.tag){n(l,c.sibling),(d=a(c,u.props.children)).return=l,l=d;break e}}else if(c.elementType===b||"object"==typeof b&&null!==b&&b.$$typeof===N&&oa(b)===c.type){n(l,c.sibling),da(d=a(c,u.props),u),d.return=l,l=d;break e}n(l,c);break}t(l,c),c=c.sibling}u.type===y?((d=$r(u.props.children,l.mode,d,u.key)).return=l,l=d):(da(d=Vr(u.type,u.key,u.props,null,l.mode,d),u),d.return=l,l=d)}return s(l);case g:e:{for(b=u.key;null!==c;){if(c.key===b){if(4===c.tag&&c.stateNode.containerInfo===u.containerInfo&&c.stateNode.implementation===u.implementation){n(l,c.sibling),(d=a(c,u.children||[])).return=l,l=d;break e}n(l,c);break}t(l,c),c=c.sibling}(d=Wr(u,l.mode,d)).return=l,l=d}return s(l);case N:return v(l,c,u=oa(u),d)}if(A(u))return function(o,a,s,l){for(var c=null,u=null,d=a,p=a=0,g=null;null!==d&&p<s.length;p++){d.index>p?(g=d,d=null):g=d.sibling;var y=h(o,d,s[p],l);if(null===y){null===d&&(d=g);break}e&&d&&null===y.alternate&&t(o,d),a=i(y,a,p),null===u?c=y:u.sibling=y,u=y,d=g}if(p===s.length)return n(o,d),fo&&oo(o,p),c;if(null===d){for(;p<s.length;p++)null!==(d=f(o,s[p],l))&&(a=i(d,a,p),null===u?c=d:u.sibling=d,u=d);return fo&&oo(o,p),c}for(d=r(d);p<s.length;p++)null!==(g=m(d,o,p,s[p],l))&&(e&&null!==g.alternate&&d.delete(null===g.key?p:g.key),a=i(g,a,p),null===u?c=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(o,e)}),fo&&oo(o,p),c}(l,c,u,d);if(P(u)){if("function"!=typeof(b=P(u)))throw Error(o(150));return function(a,s,l,c){if(null==l)throw Error(o(151));for(var u=null,d=null,p=s,g=s=0,y=null,v=l.next();null!==p&&!v.done;g++,v=l.next()){p.index>g?(y=p,p=null):y=p.sibling;var b=h(a,p,v.value,c);if(null===b){null===p&&(p=y);break}e&&p&&null===b.alternate&&t(a,p),s=i(b,s,g),null===d?u=b:d.sibling=b,d=b,p=y}if(v.done)return n(a,p),fo&&oo(a,g),u;if(null===p){for(;!v.done;g++,v=l.next())null!==(v=f(a,v.value,c))&&(s=i(v,s,g),null===d?u=v:d.sibling=v,d=v);return fo&&oo(a,g),u}for(p=r(p);!v.done;g++,v=l.next())null!==(v=m(p,a,g,v.value,c))&&(e&&null!==v.alternate&&p.delete(null===v.key?g:v.key),s=i(v,s,g),null===d?u=v:d.sibling=v,d=v);return e&&p.forEach(function(e){return t(a,e)}),fo&&oo(a,g),u}(l,c,u=b.call(u),d)}if("function"==typeof u.then)return v(l,c,ua(u),d);if(u.$$typeof===w)return v(l,c,Do(l,u),d);fa(l,u)}return"string"==typeof u&&""!==u||"number"==typeof u||"bigint"==typeof u?(u=""+u,null!==c&&6===c.tag?(n(l,c.sibling),(d=a(c,u)).return=l,l=d):(n(l,c),(d=Hr(u,l.mode,d)).return=l,l=d),s(l)):n(l,c)}return function(e,t,n,r){try{ca=0;var o=v(e,t,n,r);return la=null,o}catch(i){if(i===Jo||i===ea)throw i;var a=zr(29,i,null,e.mode);return a.lanes=r,a.return=e,a}}}var pa=ha(!0),ma=ha(!1),ga=!1;function ya(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function va(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function ba(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function xa(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,2&hc){var o=r.pending;return null===o?t.next=t:(t.next=o.next,o.next=t),r.pending=t,t=Mr(e),Dr(e,null,n),t}return Or(e,r,t,n),Mr(e)}function wa(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,4194048&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,De(e,n)}}function Sa(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var o=null,a=null;if(null!==(n=n.firstBaseUpdate)){do{var i={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};null===a?o=a=i:a=a.next=i,n=n.next}while(null!==n);null===a?o=a=t:a=a.next=t}else o=a=t;return n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var ka=!1;function Ea(){if(ka){if(null!==qo)throw qo}}function Ca(e,t,n,r){ka=!1;var o=e.updateQueue;ga=!1;var a=o.firstBaseUpdate,i=o.lastBaseUpdate,s=o.shared.pending;if(null!==s){o.shared.pending=null;var l=s,c=l.next;l.next=null,null===i?a=c:i.next=c,i=l;var d=e.alternate;null!==d&&((s=(d=d.updateQueue).lastBaseUpdate)!==i&&(null===s?d.firstBaseUpdate=c:s.next=c,d.lastBaseUpdate=l))}if(null!==a){var f=o.baseState;for(i=0,d=c=l=null,s=a;;){var h=-536870913&s.lane,p=h!==s.lane;if(p?(gc&h)===h:(r&h)===h){0!==h&&h===Ho&&(ka=!0),null!==d&&(d=d.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});e:{var m=e,g=s;h=t;var y=n;switch(g.tag){case 1:if("function"==typeof(m=g.payload)){f=m.call(y,f,h);break e}f=m;break e;case 3:m.flags=-65537&m.flags|128;case 0:if(null==(h="function"==typeof(m=g.payload)?m.call(y,f,h):m))break e;f=u({},f,h);break e;case 2:ga=!0}}null!==(h=s.callback)&&(e.flags|=64,p&&(e.flags|=8192),null===(p=o.callbacks)?o.callbacks=[h]:p.push(h))}else p={lane:h,tag:s.tag,payload:s.payload,callback:s.callback,next:null},null===d?(c=d=p,l=f):d=d.next=p,i|=h;if(null===(s=s.next)){if(null===(s=o.shared.pending))break;s=(p=s).next,p.next=null,o.lastBaseUpdate=p,o.shared.pending=null}}null===d&&(l=f),o.baseState=l,o.firstBaseUpdate=c,o.lastBaseUpdate=d,null===a&&(o.shared.lanes=0),Ec|=i,e.lanes=i,e.memoizedState=f}}function Na(e,t){if("function"!=typeof e)throw Error(o(191,e));e.call(t)}function Ta(e,t){var n=e.callbacks;if(null!==n)for(e.callbacks=null,e=0;e<n.length;e++)Na(n[e],t)}var ja=F(null),Ra=F(0);function Pa(e,t){U(Ra,e=Sc),U(ja,t),Sc=e|t.baseLanes}function Oa(){U(Ra,Sc),U(ja,ja.current)}function _a(){Sc=Ra.current,B(ja),B(Ra)}var Aa=F(null),Da=null;function Ma(e){var t=e.alternate;U(Ba,1&Ba.current),U(Aa,e),null===Da&&(null===t||null!==ja.current||null!==t.memoizedState)&&(Da=e)}function La(e){U(Ba,Ba.current),U(Aa,e),null===Da&&(Da=e)}function Ia(e){22===e.tag?(U(Ba,Ba.current),U(Aa,e),null===Da&&(Da=e)):za()}function za(){U(Ba,Ba.current),U(Aa,Aa.current)}function Fa(e){B(Aa),Da===e&&(Da=null),B(Ba)}var Ba=F(0);function Ua(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||_d(n)||Ad(n)))return t}else if(19!==t.tag||"forwards"!==t.memoizedProps.revealOrder&&"backwards"!==t.memoizedProps.revealOrder&&"unstable_legacy-backwards"!==t.memoizedProps.revealOrder&&"together"!==t.memoizedProps.revealOrder){if(null!==t.child){t.child.return=t,t=t.child;continue}}else if(128&t.flags)return t;if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Va=0,$a=null,Ha=null,qa=null,Wa=!1,Ka=!1,Ga=!1,Ya=0,Qa=0,Xa=null,Ja=0;function Za(){throw Error(o(321))}function ei(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Jn(e[n],t[n]))return!1;return!0}function ti(e,t,n,r,o,a){return Va=a,$a=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,D.H=null===e||null===e.memoizedState?gs:ys,Ga=!1,a=n(r,o),Ga=!1,Ka&&(a=ri(t,n,r,o)),ni(e),a}function ni(e){D.H=ms;var t=null!==Ha&&null!==Ha.next;if(Va=0,qa=Ha=$a=null,Wa=!1,Qa=0,Xa=null,t)throw Error(o(300));null===e||As||null!==(e=e.dependencies)&&Oo(e)&&(As=!0)}function ri(e,t,n,r){$a=e;var a=0;do{if(Ka&&(Xa=null),Qa=0,Ka=!1,25<=a)throw Error(o(301));if(a+=1,qa=Ha=null,null!=e.updateQueue){var i=e.updateQueue;i.lastEffect=null,i.events=null,i.stores=null,null!=i.memoCache&&(i.memoCache.index=0)}D.H=vs,i=t(n,r)}while(Ka);return i}function oi(){var e=D.H,t=e.useState()[0];return t="function"==typeof t.then?ui(t):t,e=e.useState()[0],(null!==Ha?Ha.memoizedState:null)!==e&&($a.flags|=1024),t}function ai(){var e=0!==Ya;return Ya=0,e}function ii(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function si(e){if(Wa){for(e=e.memoizedState;null!==e;){var t=e.queue;null!==t&&(t.pending=null),e=e.next}Wa=!1}Va=0,qa=Ha=$a=null,Ka=!1,Qa=Ya=0,Xa=null}function li(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===qa?$a.memoizedState=qa=e:qa=qa.next=e,qa}function ci(){if(null===Ha){var e=$a.alternate;e=null!==e?e.memoizedState:null}else e=Ha.next;var t=null===qa?$a.memoizedState:qa.next;if(null!==t)qa=t,Ha=e;else{if(null===e){if(null===$a.alternate)throw Error(o(467));throw Error(o(310))}e={memoizedState:(Ha=e).memoizedState,baseState:Ha.baseState,baseQueue:Ha.baseQueue,queue:Ha.queue,next:null},null===qa?$a.memoizedState=qa=e:qa=qa.next=e}return qa}function ui(e){var t=Qa;return Qa+=1,null===Xa&&(Xa=[]),e=ra(Xa,e,t),t=$a,null===(null===qa?t.memoizedState:qa.next)&&(t=t.alternate,D.H=null===t||null===t.memoizedState?gs:ys),e}function di(e){if(null!==e&&"object"==typeof e){if("function"==typeof e.then)return ui(e);if(e.$$typeof===w)return Ao(e)}throw Error(o(438,String(e)))}function fi(e){var t=null,n=$a.updateQueue;if(null!==n&&(t=n.memoCache),null==t){var r=$a.alternate;null!==r&&(null!==(r=r.updateQueue)&&(null!=(r=r.memoCache)&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},null===n&&(n={lastEffect:null,events:null,stores:null,memoCache:null},$a.updateQueue=n),n.memoCache=t,void 0===(n=t.data[t.index]))for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=j;return t.index++,n}function hi(e,t){return"function"==typeof t?t(e):t}function pi(e){return mi(ci(),Ha,e)}function mi(e,t,n){var r=e.queue;if(null===r)throw Error(o(311));r.lastRenderedReducer=n;var a=e.baseQueue,i=r.pending;if(null!==i){if(null!==a){var s=a.next;a.next=i.next,i.next=s}t.baseQueue=a=i,r.pending=null}if(i=e.baseState,null===a)e.memoizedState=i;else{var l=s=null,c=null,u=t=a.next,d=!1;do{var f=-536870913&u.lane;if(f!==u.lane?(gc&f)===f:(Va&f)===f){var h=u.revertLane;if(0===h)null!==c&&(c=c.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===Ho&&(d=!0);else{if((Va&h)===h){u=u.next,h===Ho&&(d=!0);continue}f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},null===c?(l=c=f,s=i):c=c.next=f,$a.lanes|=h,Ec|=h}f=u.action,Ga&&n(i,f),i=u.hasEagerState?u.eagerState:n(i,f)}else h={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},null===c?(l=c=h,s=i):c=c.next=h,$a.lanes|=f,Ec|=f;u=u.next}while(null!==u&&u!==t);if(null===c?s=i:c.next=l,!Jn(i,e.memoizedState)&&(As=!0,d&&null!==(n=qo)))throw n;e.memoizedState=i,e.baseState=s,e.baseQueue=c,r.lastRenderedState=i}return null===a&&(r.lanes=0),[e.memoizedState,r.dispatch]}function gi(e){var t=ci(),n=t.queue;if(null===n)throw Error(o(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,i=t.memoizedState;if(null!==a){n.pending=null;var s=a=a.next;do{i=e(i,s.action),s=s.next}while(s!==a);Jn(i,t.memoizedState)||(As=!0),t.memoizedState=i,null===t.baseQueue&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function yi(e,t,n){var r=$a,a=ci(),i=fo;if(i){if(void 0===n)throw Error(o(407));n=n()}else n=t();var s=!Jn((Ha||a).memoizedState,n);if(s&&(a.memoizedState=n,As=!0),a=a.queue,Vi(xi.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||null!==qa&&1&qa.memoizedState.tag){if(r.flags|=2048,Ii(9,{destroy:void 0},bi.bind(null,r,a,n,t),null),null===pc)throw Error(o(349));i||127&Va||vi(r,t,n)}return n}function vi(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=$a.updateQueue)?(t={lastEffect:null,events:null,stores:null,memoCache:null},$a.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function bi(e,t,n,r){t.value=n,t.getSnapshot=r,wi(t)&&Si(e)}function xi(e,t,n){return n(function(){wi(t)&&Si(e)})}function wi(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Jn(e,n)}catch(r){return!0}}function Si(e){var t=Ar(e,2);null!==t&&Yc(t,e,2)}function ki(e){var t=li();if("function"==typeof e){var n=e;if(e=n(),Ga){be(!0);try{n()}finally{be(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:hi,lastRenderedState:e},t}function Ei(e,t,n,r){return e.baseState=n,mi(e,Ha,"function"==typeof r?r:hi)}function Ci(e,t,n,r,a){if(fs(e))throw Error(o(485));if(null!==(e=t.action)){var i={payload:a,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(e){i.listeners.push(e)}};null!==D.T?n(!0):i.isTransition=!1,r(i),null===(n=t.pending)?(i.next=t.pending=i,Ni(t,i)):(i.next=n.next,t.pending=n.next=i)}}function Ni(e,t){var n=t.action,r=t.payload,o=e.state;if(t.isTransition){var a=D.T,i={};D.T=i;try{var s=n(o,r),l=D.S;null!==l&&l(i,s),Ti(e,t,s)}catch(c){Ri(e,t,c)}finally{null!==a&&null!==i.types&&(a.types=i.types),D.T=a}}else try{Ti(e,t,a=n(o,r))}catch(u){Ri(e,t,u)}}function Ti(e,t,n){null!==n&&"object"==typeof n&&"function"==typeof n.then?n.then(function(n){ji(e,t,n)},function(n){return Ri(e,t,n)}):ji(e,t,n)}function ji(e,t,n){t.status="fulfilled",t.value=n,Pi(t),e.state=n,null!==(t=e.pending)&&((n=t.next)===t?e.pending=null:(n=n.next,t.next=n,Ni(e,n)))}function Ri(e,t,n){var r=e.pending;if(e.pending=null,null!==r){r=r.next;do{t.status="rejected",t.reason=n,Pi(t),t=t.next}while(t!==r)}e.action=null}function Pi(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Oi(e,t){return t}function _i(e,t){if(fo){var n=pc.formState;if(null!==n){e:{var r=$a;if(fo){if(uo){t:{for(var o=uo,a=po;8!==o.nodeType;){if(!a){o=null;break t}if(null===(o=Dd(o.nextSibling))){o=null;break t}}o="F!"===(a=o.data)||"F"===a?o:null}if(o){uo=Dd(o.nextSibling),r="F!"===o.data;break e}}go(r)}r=!1}r&&(t=n[0])}}return(n=li()).memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Oi,lastRenderedState:t},n.queue=r,n=cs.bind(null,$a,r),r.dispatch=n,r=ki(!1),a=ds.bind(null,$a,!1,r.queue),o={state:t,dispatch:null,action:e,pending:null},(r=li()).queue=o,n=Ci.bind(null,$a,o,a,n),o.dispatch=n,r.memoizedState=e,[t,n,!1]}function Ai(e){return Di(ci(),Ha,e)}function Di(e,t,n){if(t=mi(e,t,Oi)[0],e=pi(hi)[0],"object"==typeof t&&null!==t&&"function"==typeof t.then)try{var r=ui(t)}catch(i){if(i===Jo)throw ea;throw i}else r=t;var o=(t=ci()).queue,a=o.dispatch;return n!==t.memoizedState&&($a.flags|=2048,Ii(9,{destroy:void 0},Mi.bind(null,o,n),null)),[r,a,e]}function Mi(e,t){e.action=t}function Li(e){var t=ci(),n=Ha;if(null!==n)return Di(t,n,e);ci(),t=t.memoizedState;var r=(n=ci()).queue.dispatch;return n.memoizedState=e,[t,r,!1]}function Ii(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},null===(t=$a.updateQueue)&&(t={lastEffect:null,events:null,stores:null,memoCache:null},$a.updateQueue=t),null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function zi(){return ci().memoizedState}function Fi(e,t,n,r){var o=li();$a.flags|=e,o.memoizedState=Ii(1|t,{destroy:void 0},n,void 0===r?null:r)}function Bi(e,t,n,r){var o=ci();r=void 0===r?null:r;var a=o.memoizedState.inst;null!==Ha&&null!==r&&ei(r,Ha.memoizedState.deps)?o.memoizedState=Ii(t,a,n,r):($a.flags|=e,o.memoizedState=Ii(1|t,a,n,r))}function Ui(e,t){Fi(8390656,8,e,t)}function Vi(e,t){Bi(2048,8,e,t)}function $i(e){var t=ci().memoizedState;return function(e){$a.flags|=4;var t=$a.updateQueue;if(null===t)t={lastEffect:null,events:null,stores:null,memoCache:null},$a.updateQueue=t,t.events=[e];else{var n=t.events;null===n?t.events=[e]:n.push(e)}}({ref:t,nextImpl:e}),function(){if(2&hc)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function Hi(e,t){return Bi(4,2,e,t)}function qi(e,t){return Bi(4,4,e,t)}function Wi(e,t){if("function"==typeof t){e=e();var n=t(e);return function(){"function"==typeof n?n():t(null)}}if(null!=t)return e=e(),t.current=e,function(){t.current=null}}function Ki(e,t,n){n=null!=n?n.concat([e]):null,Bi(4,4,Wi.bind(null,t,e),n)}function Gi(){}function Yi(e,t){var n=ci();t=void 0===t?null:t;var r=n.memoizedState;return null!==t&&ei(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Qi(e,t){var n=ci();t=void 0===t?null:t;var r=n.memoizedState;if(null!==t&&ei(t,r[1]))return r[0];if(r=e(),Ga){be(!0);try{e()}finally{be(!1)}}return n.memoizedState=[r,t],r}function Xi(e,t,n){return void 0===n||1073741824&Va&&!(261930&gc)?e.memoizedState=t:(e.memoizedState=n,e=Gc(),$a.lanes|=e,Ec|=e,n)}function Ji(e,t,n,r){return Jn(n,t)?n:null!==ja.current?(e=Xi(e,n,r),Jn(e,t)||(As=!0),e):42&Va&&(!(1073741824&Va)||261930&gc)?(e=Gc(),$a.lanes|=e,Ec|=e,t):(As=!0,e.memoizedState=n)}function Zi(e,t,n,r,o){var a=M.p;M.p=0!==a&&8>a?a:8;var i,s,l,c=D.T,u={};D.T=u,ds(e,!1,t,n);try{var d=o(),f=D.S;null!==f&&f(u,d),null!==d&&"object"==typeof d&&"function"==typeof d.then?us(e,t,(i=r,s=[],l={status:"pending",value:null,reason:null,then:function(e){s.push(e)}},d.then(function(){l.status="fulfilled",l.value=i;for(var e=0;e<s.length;e++)(0,s[e])(i)},function(e){for(l.status="rejected",l.reason=e,e=0;e<s.length;e++)(0,s[e])(void 0)}),l),Kc()):us(e,t,r,Kc())}catch(h){us(e,t,{then:function(){},status:"rejected",reason:h},Kc())}finally{M.p=a,null!==c&&null!==u.types&&(c.types=u.types),D.T=c}}function es(){}function ts(e,t,n,r){if(5!==e.tag)throw Error(o(476));var a=ns(e).queue;Zi(e,a,t,L,null===n?es:function(){return rs(e),n(r)})}function ns(e){var t=e.memoizedState;if(null!==t)return t;var n={};return(t={memoizedState:L,baseState:L,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:hi,lastRenderedState:L},next:null}).next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:hi,lastRenderedState:n},next:null},e.memoizedState=t,null!==(e=e.alternate)&&(e.memoizedState=t),t}function rs(e){var t=ns(e);null===t.next&&(t=e.alternate.memoizedState),us(e,t.next.queue,{},Kc())}function os(){return Ao(ff)}function as(){return ci().memoizedState}function is(){return ci().memoizedState}function ss(e){for(var t=e.return;null!==t;){switch(t.tag){case 24:case 3:var n=Kc(),r=xa(t,e=ba(n),n);return null!==r&&(Yc(r,t,n),wa(r,t,n)),t={cache:Bo()},void(e.payload=t)}t=t.return}}function ls(e,t,n){var r=Kc();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},fs(e)?hs(t,n):null!==(n=_r(e,t,n,r))&&(Yc(n,e,r),ps(n,t,r))}function cs(e,t,n){us(e,t,n,Kc())}function us(e,t,n,r){var o={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(fs(e))hs(t,o);else{var a=e.alternate;if(0===e.lanes&&(null===a||0===a.lanes)&&null!==(a=t.lastRenderedReducer))try{var i=t.lastRenderedState,s=a(i,n);if(o.hasEagerState=!0,o.eagerState=s,Jn(s,i))return Or(e,t,o,0),null===pc&&Pr(),!1}catch(l){}if(null!==(n=_r(e,t,o,r)))return Yc(n,e,r),ps(n,t,r),!0}return!1}function ds(e,t,n,r){if(r={lane:2,revertLane:$u(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},fs(e)){if(t)throw Error(o(479))}else null!==(t=_r(e,n,r,2))&&Yc(t,e,2)}function fs(e){var t=e.alternate;return e===$a||null!==t&&t===$a}function hs(e,t){Ka=Wa=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function ps(e,t,n){if(4194048&n){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,De(e,n)}}var ms={readContext:Ao,use:di,useCallback:Za,useContext:Za,useEffect:Za,useImperativeHandle:Za,useLayoutEffect:Za,useInsertionEffect:Za,useMemo:Za,useReducer:Za,useRef:Za,useState:Za,useDebugValue:Za,useDeferredValue:Za,useTransition:Za,useSyncExternalStore:Za,useId:Za,useHostTransitionStatus:Za,useFormState:Za,useActionState:Za,useOptimistic:Za,useMemoCache:Za,useCacheRefresh:Za};ms.useEffectEvent=Za;var gs={readContext:Ao,use:di,useCallback:function(e,t){return li().memoizedState=[e,void 0===t?null:t],e},useContext:Ao,useEffect:Ui,useImperativeHandle:function(e,t,n){n=null!=n?n.concat([e]):null,Fi(4194308,4,Wi.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Fi(4194308,4,e,t)},useInsertionEffect:function(e,t){Fi(4,2,e,t)},useMemo:function(e,t){var n=li();t=void 0===t?null:t;var r=e();if(Ga){be(!0);try{e()}finally{be(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=li();if(void 0!==n){var o=n(t);if(Ga){be(!0);try{n(t)}finally{be(!1)}}}else o=t;return r.memoizedState=r.baseState=o,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:o},r.queue=e,e=e.dispatch=ls.bind(null,$a,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},li().memoizedState=e},useState:function(e){var t=(e=ki(e)).queue,n=cs.bind(null,$a,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Gi,useDeferredValue:function(e,t){return Xi(li(),e,t)},useTransition:function(){var e=ki(!1);return e=Zi.bind(null,$a,e.queue,!0,!1),li().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=$a,a=li();if(fo){if(void 0===n)throw Error(o(407));n=n()}else{if(n=t(),null===pc)throw Error(o(349));127&gc||vi(r,t,n)}a.memoizedState=n;var i={value:n,getSnapshot:t};return a.queue=i,Ui(xi.bind(null,r,i,e),[e]),r.flags|=2048,Ii(9,{destroy:void 0},bi.bind(null,r,i,n,t),null),n},useId:function(){var e=li(),t=pc.identifierPrefix;if(fo){var n=ro;t="_"+t+"R_"+(n=(no&~(1<<32-xe(no)-1)).toString(32)+n),0<(n=Ya++)&&(t+="H"+n.toString(32)),t+="_"}else t="_"+t+"r_"+(n=Ja++).toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:os,useFormState:_i,useActionState:_i,useOptimistic:function(e){var t=li();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=ds.bind(null,$a,!0,n),n.dispatch=t,[e,t]},useMemoCache:fi,useCacheRefresh:function(){return li().memoizedState=ss.bind(null,$a)},useEffectEvent:function(e){var t=li(),n={impl:e};return t.memoizedState=n,function(){if(2&hc)throw Error(o(440));return n.impl.apply(void 0,arguments)}}},ys={readContext:Ao,use:di,useCallback:Yi,useContext:Ao,useEffect:Vi,useImperativeHandle:Ki,useInsertionEffect:Hi,useLayoutEffect:qi,useMemo:Qi,useReducer:pi,useRef:zi,useState:function(){return pi(hi)},useDebugValue:Gi,useDeferredValue:function(e,t){return Ji(ci(),Ha.memoizedState,e,t)},useTransition:function(){var e=pi(hi)[0],t=ci().memoizedState;return["boolean"==typeof e?e:ui(e),t]},useSyncExternalStore:yi,useId:as,useHostTransitionStatus:os,useFormState:Ai,useActionState:Ai,useOptimistic:function(e,t){return Ei(ci(),0,e,t)},useMemoCache:fi,useCacheRefresh:is};ys.useEffectEvent=$i;var vs={readContext:Ao,use:di,useCallback:Yi,useContext:Ao,useEffect:Vi,useImperativeHandle:Ki,useInsertionEffect:Hi,useLayoutEffect:qi,useMemo:Qi,useReducer:gi,useRef:zi,useState:function(){return gi(hi)},useDebugValue:Gi,useDeferredValue:function(e,t){var n=ci();return null===Ha?Xi(n,e,t):Ji(n,Ha.memoizedState,e,t)},useTransition:function(){var e=gi(hi)[0],t=ci().memoizedState;return["boolean"==typeof e?e:ui(e),t]},useSyncExternalStore:yi,useId:as,useHostTransitionStatus:os,useFormState:Li,useActionState:Li,useOptimistic:function(e,t){var n=ci();return null!==Ha?Ei(n,0,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:fi,useCacheRefresh:is};function bs(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:u({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}vs.useEffectEvent=$i;var xs={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Kc(),o=ba(r);o.payload=t,null!=n&&(o.callback=n),null!==(t=xa(e,o,r))&&(Yc(t,e,r),wa(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Kc(),o=ba(r);o.tag=1,o.payload=t,null!=n&&(o.callback=n),null!==(t=xa(e,o,r))&&(Yc(t,e,r),wa(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Kc(),r=ba(n);r.tag=2,null!=t&&(r.callback=t),null!==(t=xa(e,r,n))&&(Yc(t,e,n),wa(t,e,n))}};function ws(e,t,n,r,o,a,i){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,a,i):!t.prototype||!t.prototype.isPureReactComponent||(!Zn(n,r)||!Zn(o,a))}function Ss(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&xs.enqueueReplaceState(t,t.state,null)}function ks(e,t){var n=t;if("ref"in t)for(var r in n={},t)"ref"!==r&&(n[r]=t[r]);if(e=e.defaultProps)for(var o in n===t&&(n=u({},n)),e)void 0===n[o]&&(n[o]=e[o]);return n}function Es(e){Nr(e)}function Cs(e){}function Ns(e){Nr(e)}function Ts(e,t){try{(0,e.onUncaughtError)(t.value,{componentStack:t.stack})}catch(n){setTimeout(function(){throw n})}}function js(e,t,n){try{(0,e.onCaughtError)(n.value,{componentStack:n.stack,errorBoundary:1===t.tag?t.stateNode:null})}catch(r){setTimeout(function(){throw r})}}function Rs(e,t,n){return(n=ba(n)).tag=3,n.payload={element:null},n.callback=function(){Ts(e,t)},n}function Ps(e){return(e=ba(e)).tag=3,e}function Os(e,t,n,r){var o=n.type.getDerivedStateFromError;if("function"==typeof o){var a=r.value;e.payload=function(){return o(a)},e.callback=function(){js(t,n,r)}}var i=n.stateNode;null!==i&&"function"==typeof i.componentDidCatch&&(e.callback=function(){js(t,n,r),"function"!=typeof o&&(null===Lc?Lc=new Set([this]):Lc.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:null!==e?e:""})})}var _s=Error(o(461)),As=!1;function Ds(e,t,n,r){t.child=null===e?ma(t,null,n,r):pa(t,e.child,n,r)}function Ms(e,t,n,r,o){n=n.render;var a=t.ref;if("ref"in r){var i={};for(var s in r)"ref"!==s&&(i[s]=r[s])}else i=r;return _o(t),r=ti(e,t,n,i,a,o),s=ai(),null===e||As?(fo&&s&&io(t),t.flags|=1,Ds(e,t,r,o),t.child):(ii(e,t,o),ol(e,t,o))}function Ls(e,t,n,r,o){if(null===e){var a=n.type;return"function"!=typeof a||Fr(a)||void 0!==a.defaultProps||null!==n.compare?((e=Vr(n.type,null,r,t,t.mode,o)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,Is(e,t,a,r,o))}if(a=e.child,!al(e,o)){var i=a.memoizedProps;if((n=null!==(n=n.compare)?n:Zn)(i,r)&&e.ref===t.ref)return ol(e,t,o)}return t.flags|=1,(e=Br(a,r)).ref=t.ref,e.return=t,t.child=e}function Is(e,t,n,r,o){if(null!==e){var a=e.memoizedProps;if(Zn(a,r)&&e.ref===t.ref){if(As=!1,t.pendingProps=r=a,!al(e,o))return t.lanes=e.lanes,ol(e,t,o);131072&e.flags&&(As=!0)}}return Hs(e,t,n,r,o)}function zs(e,t,n,r){var o=r.children,a=null!==e?e.memoizedState:null;if(null===e&&null===t.stateNode&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),"hidden"===r.mode){if(128&t.flags){if(a=null!==a?a.baseLanes|n:n,null!==e){for(r=t.child=e.child,o=0;null!==r;)o=o|r.lanes|r.childLanes,r=r.sibling;r=o&~a}else r=0,t.child=null;return Bs(e,t,a,n,r)}if(!(536870912&n))return r=t.lanes=536870912,Bs(e,t,null!==a?a.baseLanes|n:n,n,r);t.memoizedState={baseLanes:0,cachePool:null},null!==e&&Qo(0,null!==a?a.cachePool:null),null!==a?Pa(t,a):Oa(),Ia(t)}else null!==a?(Qo(0,a.cachePool),Pa(t,a),za(),t.memoizedState=null):(null!==e&&Qo(0,null),Oa(),za());return Ds(e,t,o,n),t.child}function Fs(e,t){return null!==e&&22===e.tag||null!==t.stateNode||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Bs(e,t,n,r,o){var a=Yo();return a=null===a?null:{parent:Fo._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},null!==e&&Qo(0,null),Oa(),Ia(t),null!==e&&Po(e,t,r,!0),t.childLanes=o,null}function Us(e,t){return(t=Zs({mode:t.mode,children:t.children},e.mode)).ref=e.ref,e.child=t,t.return=e,t}function Vs(e,t,n){return pa(t,e.child,null,n),(e=Us(t,t.pendingProps)).flags|=2,Fa(t),t.memoizedState=null,e}function $s(e,t){var n=t.ref;if(null===n)null!==e&&null!==e.ref&&(t.flags|=4194816);else{if("function"!=typeof n&&"object"!=typeof n)throw Error(o(284));null!==e&&e.ref===n||(t.flags|=4194816)}}function Hs(e,t,n,r,o){return _o(t),n=ti(e,t,n,r,void 0,o),r=ai(),null===e||As?(fo&&r&&io(t),t.flags|=1,Ds(e,t,n,o),t.child):(ii(e,t,o),ol(e,t,o))}function qs(e,t,n,r,o,a){return _o(t),t.updateQueue=null,n=ri(t,r,n,o),ni(e),r=ai(),null===e||As?(fo&&r&&io(t),t.flags|=1,Ds(e,t,n,a),t.child):(ii(e,t,a),ol(e,t,a))}function Ws(e,t,n,r,o){if(_o(t),null===t.stateNode){var a=Lr,i=n.contextType;"object"==typeof i&&null!==i&&(a=Ao(i)),a=new n(r,a),t.memoizedState=null!==a.state&&void 0!==a.state?a.state:null,a.updater=xs,t.stateNode=a,a._reactInternals=t,(a=t.stateNode).props=r,a.state=t.memoizedState,a.refs={},ya(t),i=n.contextType,a.context="object"==typeof i&&null!==i?Ao(i):Lr,a.state=t.memoizedState,"function"==typeof(i=n.getDerivedStateFromProps)&&(bs(t,n,i,r),a.state=t.memoizedState),"function"==typeof n.getDerivedStateFromProps||"function"==typeof a.getSnapshotBeforeUpdate||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||(i=a.state,"function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount(),i!==a.state&&xs.enqueueReplaceState(a,a.state,null),Ca(t,r,a,o),Ea(),a.state=t.memoizedState),"function"==typeof a.componentDidMount&&(t.flags|=4194308),r=!0}else if(null===e){a=t.stateNode;var s=t.memoizedProps,l=ks(n,s);a.props=l;var c=a.context,u=n.contextType;i=Lr,"object"==typeof u&&null!==u&&(i=Ao(u));var d=n.getDerivedStateFromProps;u="function"==typeof d||"function"==typeof a.getSnapshotBeforeUpdate,s=t.pendingProps!==s,u||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s||c!==i)&&Ss(t,a,r,i),ga=!1;var f=t.memoizedState;a.state=f,Ca(t,r,a,o),Ea(),c=t.memoizedState,s||f!==c||ga?("function"==typeof d&&(bs(t,n,d,r),c=t.memoizedState),(l=ga||ws(t,n,l,r,f,c,i))?(u||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||("function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"==typeof a.componentDidMount&&(t.flags|=4194308)):("function"==typeof a.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),a.props=r,a.state=c,a.context=i,r=l):("function"==typeof a.componentDidMount&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,va(e,t),u=ks(n,i=t.memoizedProps),a.props=u,d=t.pendingProps,f=a.context,c=n.contextType,l=Lr,"object"==typeof c&&null!==c&&(l=Ao(c)),(c="function"==typeof(s=n.getDerivedStateFromProps)||"function"==typeof a.getSnapshotBeforeUpdate)||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(i!==d||f!==l)&&Ss(t,a,r,l),ga=!1,f=t.memoizedState,a.state=f,Ca(t,r,a,o),Ea();var h=t.memoizedState;i!==d||f!==h||ga||null!==e&&null!==e.dependencies&&Oo(e.dependencies)?("function"==typeof s&&(bs(t,n,s,r),h=t.memoizedState),(u=ga||ws(t,n,u,r,f,h,l)||null!==e&&null!==e.dependencies&&Oo(e.dependencies))?(c||"function"!=typeof a.UNSAFE_componentWillUpdate&&"function"!=typeof a.componentWillUpdate||("function"==typeof a.componentWillUpdate&&a.componentWillUpdate(r,h,l),"function"==typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,h,l)),"function"==typeof a.componentDidUpdate&&(t.flags|=4),"function"==typeof a.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof a.componentDidUpdate||i===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||i===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=h),a.props=r,a.state=h,a.context=l,r=u):("function"!=typeof a.componentDidUpdate||i===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||i===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,$s(e,t),r=!!(128&t.flags),a||r?(a=t.stateNode,n=r&&"function"!=typeof n.getDerivedStateFromError?null:a.render(),t.flags|=1,null!==e&&r?(t.child=pa(t,e.child,null,o),t.child=pa(t,null,n,o)):Ds(e,t,n,o),t.memoizedState=a.state,e=t.child):e=ol(e,t,o),e}function Ks(e,t,n,r){return xo(),t.flags|=256,Ds(e,t,n,r),t.child}var Gs={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ys(e){return{baseLanes:e,cachePool:Xo()}}function Qs(e,t,n){return e=null!==e?e.childLanes&~n:0,t&&(e|=Tc),e}function Xs(e,t,n){var r,a=t.pendingProps,i=!1,s=!!(128&t.flags);if((r=s)||(r=(null===e||null!==e.memoizedState)&&!!(2&Ba.current)),r&&(i=!0,t.flags&=-129),r=!!(32&t.flags),t.flags&=-33,null===e){if(fo){if(i?Ma(t):za(),(e=uo)?null!==(e=null!==(e=Od(e,po))&&"&"!==e.data?e:null)&&(t.memoizedState={dehydrated:e,treeContext:null!==to?{id:no,overflow:ro}:null,retryLane:536870912,hydrationErrors:null},(n=qr(e)).return=t,t.child=n,co=t,uo=null):e=null,null===e)throw go(t);return Ad(e)?t.lanes=32:t.lanes=536870912,null}var l=a.children;return a=a.fallback,i?(za(),l=Zs({mode:"hidden",children:l},i=t.mode),a=$r(a,i,n,null),l.return=t,a.return=t,l.sibling=a,t.child=l,(a=t.child).memoizedState=Ys(n),a.childLanes=Qs(e,r,n),t.memoizedState=Gs,Fs(null,a)):(Ma(t),Js(t,l))}var c=e.memoizedState;if(null!==c&&null!==(l=c.dehydrated)){if(s)256&t.flags?(Ma(t),t.flags&=-257,t=el(e,t,n)):null!==t.memoizedState?(za(),t.child=e.child,t.flags|=128,t=null):(za(),l=a.fallback,i=t.mode,a=Zs({mode:"visible",children:a.children},i),(l=$r(l,i,n,null)).flags|=2,a.return=t,l.return=t,a.sibling=l,t.child=a,pa(t,e.child,null,n),(a=t.child).memoizedState=Ys(n),a.childLanes=Qs(e,r,n),t.memoizedState=Gs,t=Fs(null,a));else if(Ma(t),Ad(l)){if(r=l.nextSibling&&l.nextSibling.dataset)var u=r.dgst;r=u,(a=Error(o(419))).stack="",a.digest=r,So({value:a,source:null,stack:null}),t=el(e,t,n)}else if(As||Po(e,t,n,!1),r=0!==(n&e.childLanes),As||r){if(null!==(r=pc)&&(0!==(a=Me(r,n))&&a!==c.retryLane))throw c.retryLane=a,Ar(e,a),Yc(r,e,a),_s;_d(l)||su(),t=el(e,t,n)}else _d(l)?(t.flags|=192,t.child=e.child,t=null):(e=c.treeContext,uo=Dd(l.nextSibling),co=t,fo=!0,ho=null,po=!1,null!==e&&lo(t,e),(t=Js(t,a.children)).flags|=4096);return t}return i?(za(),l=a.fallback,i=t.mode,u=(c=e.child).sibling,(a=Br(c,{mode:"hidden",children:a.children})).subtreeFlags=65011712&c.subtreeFlags,null!==u?l=Br(u,l):(l=$r(l,i,n,null)).flags|=2,l.return=t,a.return=t,a.sibling=l,t.child=a,Fs(null,a),a=t.child,null===(l=e.child.memoizedState)?l=Ys(n):(null!==(i=l.cachePool)?(c=Fo._currentValue,i=i.parent!==c?{parent:c,pool:c}:i):i=Xo(),l={baseLanes:l.baseLanes|n,cachePool:i}),a.memoizedState=l,a.childLanes=Qs(e,r,n),t.memoizedState=Gs,Fs(e.child,a)):(Ma(t),e=(n=e.child).sibling,(n=Br(n,{mode:"visible",children:a.children})).return=t,n.sibling=null,null!==e&&(null===(r=t.deletions)?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n)}function Js(e,t){return(t=Zs({mode:"visible",children:t},e.mode)).return=e,e.child=t}function Zs(e,t){return(e=zr(22,e,null,t)).lanes=0,e}function el(e,t,n){return pa(t,e.child,null,n),(e=Js(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function tl(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),jo(e.return,t,n)}function nl(e,t,n,r,o,a){var i=e.memoizedState;null===i?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o,treeForkCount:a}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=o,i.treeForkCount=a)}function rl(e,t,n){var r=t.pendingProps,o=r.revealOrder,a=r.tail;r=r.children;var i=Ba.current,s=!!(2&i);if(s?(i=1&i|2,t.flags|=128):i&=1,U(Ba,i),Ds(e,t,r,n),r=fo?Jr:0,!s&&null!==e&&128&e.flags)e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&tl(e,n,t);else if(19===e.tag)tl(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(o){case"forwards":for(n=t.child,o=null;null!==n;)null!==(e=n.alternate)&&null===Ua(e)&&(o=n),n=n.sibling;null===(n=o)?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),nl(t,!1,o,n,a,r);break;case"backwards":case"unstable_legacy-backwards":for(n=null,o=t.child,t.child=null;null!==o;){if(null!==(e=o.alternate)&&null===Ua(e)){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}nl(t,!0,n,null,a,r);break;case"together":nl(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function ol(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Ec|=t.lanes,0===(n&t.childLanes)){if(null===e)return null;if(Po(e,t,n,!1),0===(n&t.childLanes))return null}if(null!==e&&t.child!==e.child)throw Error(o(153));if(null!==t.child){for(n=Br(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Br(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function al(e,t){return 0!==(e.lanes&t)||!(null===(e=e.dependencies)||!Oo(e))}function il(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps)As=!0;else{if(!(al(e,n)||128&t.flags))return As=!1,function(e,t,n){switch(t.tag){case 3:G(t,t.stateNode.containerInfo),No(0,Fo,e.memoizedState.cache),xo();break;case 27:case 5:Q(t);break;case 4:G(t,t.stateNode.containerInfo);break;case 10:No(0,t.type,t.memoizedProps.value);break;case 31:if(null!==t.memoizedState)return t.flags|=128,La(t),null;break;case 13:var r=t.memoizedState;if(null!==r)return null!==r.dehydrated?(Ma(t),t.flags|=128,null):0!==(n&t.child.childLanes)?Xs(e,t,n):(Ma(t),null!==(e=ol(e,t,n))?e.sibling:null);Ma(t);break;case 19:var o=!!(128&e.flags);if((r=0!==(n&t.childLanes))||(Po(e,t,n,!1),r=0!==(n&t.childLanes)),o){if(r)return rl(e,t,n);t.flags|=128}if(null!==(o=t.memoizedState)&&(o.rendering=null,o.tail=null,o.lastEffect=null),U(Ba,Ba.current),r)break;return null;case 22:return t.lanes=0,zs(e,t,n,t.pendingProps);case 24:No(0,Fo,e.memoizedState.cache)}return ol(e,t,n)}(e,t,n);As=!!(131072&e.flags)}else As=!1,fo&&1048576&t.flags&&ao(t,Jr,t.index);switch(t.lanes=0,t.tag){case 16:e:{var r=t.pendingProps;if(e=oa(t.elementType),t.type=e,"function"!=typeof e){if(null!=e){var a=e.$$typeof;if(a===S){t.tag=11,t=Ms(null,t,e,r,n);break e}if(a===C){t.tag=14,t=Ls(null,t,e,r,n);break e}}throw t=_(e)||e,Error(o(306,t,""))}Fr(e)?(r=ks(e,r),t.tag=1,t=Ws(null,t,e,r,n)):(t.tag=0,t=Hs(null,t,e,r,n))}return t;case 0:return Hs(e,t,t.type,t.pendingProps,n);case 1:return Ws(e,t,r=t.type,a=ks(r,t.pendingProps),n);case 3:e:{if(G(t,t.stateNode.containerInfo),null===e)throw Error(o(387));r=t.pendingProps;var i=t.memoizedState;a=i.element,va(e,t),Ca(t,r,null,n);var s=t.memoizedState;if(r=s.cache,No(0,Fo,r),r!==i.cache&&Ro(t,[Fo],n,!0),Ea(),r=s.element,i.isDehydrated){if(i={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=i,t.memoizedState=i,256&t.flags){t=Ks(e,t,r,n);break e}if(r!==a){So(a=Gr(Error(o(424)),t)),t=Ks(e,t,r,n);break e}if(9===(e=t.stateNode.containerInfo).nodeType)e=e.body;else e="HTML"===e.nodeName?e.ownerDocument.body:e;for(uo=Dd(e.firstChild),co=t,fo=!0,ho=null,po=!0,n=ma(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(xo(),r===a){t=ol(e,t,n);break e}Ds(e,t,r,n)}t=t.child}return t;case 26:return $s(e,t),null===e?(n=Wd(t.type,null,t.pendingProps,null))?t.memoizedState=n:fo||(n=t.type,e=t.pendingProps,(r=yd(W.current).createElement(n))[Ue]=t,r[Ve]=e,hd(r,n,e),et(r),t.stateNode=r):t.memoizedState=Wd(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Q(t),null===e&&fo&&(r=t.stateNode=zd(t.type,t.pendingProps,W.current),co=t,po=!0,a=uo,Td(t.type)?(Md=a,uo=Dd(r.firstChild)):uo=a),Ds(e,t,t.pendingProps.children,n),$s(e,t),null===e&&(t.flags|=4194304),t.child;case 5:return null===e&&fo&&((a=r=uo)&&(null!==(r=function(e,t,n,r){for(;1===e.nodeType;){var o=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&("INPUT"!==e.nodeName||"hidden"!==e.type))break}else if(r){if(!e[Ge])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if("stylesheet"===(a=e.getAttribute("rel"))&&e.hasAttribute("data-precedence"))break;if(a!==o.rel||e.getAttribute("href")!==(null==o.href||""===o.href?null:o.href)||e.getAttribute("crossorigin")!==(null==o.crossOrigin?null:o.crossOrigin)||e.getAttribute("title")!==(null==o.title?null:o.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(((a=e.getAttribute("src"))!==(null==o.src?null:o.src)||e.getAttribute("type")!==(null==o.type?null:o.type)||e.getAttribute("crossorigin")!==(null==o.crossOrigin?null:o.crossOrigin))&&a&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else{if("input"!==t||"hidden"!==e.type)return e;var a=null==o.name?null:""+o.name;if("hidden"===o.type&&e.getAttribute("name")===a)return e}if(null===(e=Dd(e.nextSibling)))break}return null}(r,t.type,t.pendingProps,po))?(t.stateNode=r,co=t,uo=Dd(r.firstChild),po=!1,a=!0):a=!1),a||go(t)),Q(t),a=t.type,i=t.pendingProps,s=null!==e?e.memoizedProps:null,r=i.children,xd(a,i)?r=null:null!==s&&xd(a,s)&&(t.flags|=32),null!==t.memoizedState&&(a=ti(e,t,oi,null,null,n),ff._currentValue=a),$s(e,t),Ds(e,t,r,n),t.child;case 6:return null===e&&fo&&((e=n=uo)&&(null!==(n=function(e,t,n){if(""===t)return null;for(;3!==e.nodeType;){if((1!==e.nodeType||"INPUT"!==e.nodeName||"hidden"!==e.type)&&!n)return null;if(null===(e=Dd(e.nextSibling)))return null}return e}(n,t.pendingProps,po))?(t.stateNode=n,co=t,uo=null,e=!0):e=!1),e||go(t)),null;case 13:return Xs(e,t,n);case 4:return G(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=pa(t,null,r,n):Ds(e,t,r,n),t.child;case 11:return Ms(e,t,t.type,t.pendingProps,n);case 7:return Ds(e,t,t.pendingProps,n),t.child;case 8:case 12:return Ds(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,No(0,t.type,r.value),Ds(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,_o(t),r=r(a=Ao(a)),t.flags|=1,Ds(e,t,r,n),t.child;case 14:return Ls(e,t,t.type,t.pendingProps,n);case 15:return Is(e,t,t.type,t.pendingProps,n);case 19:return rl(e,t,n);case 31:return function(e,t,n){var r=t.pendingProps,a=!!(128&t.flags);if(t.flags&=-129,null===e){if(fo){if("hidden"===r.mode)return e=Us(t,r),t.lanes=536870912,Fs(null,e);if(La(t),(e=uo)?null!==(e=null!==(e=Od(e,po))&&"&"===e.data?e:null)&&(t.memoizedState={dehydrated:e,treeContext:null!==to?{id:no,overflow:ro}:null,retryLane:536870912,hydrationErrors:null},(n=qr(e)).return=t,t.child=n,co=t,uo=null):e=null,null===e)throw go(t);return t.lanes=536870912,null}return Us(t,r)}var i=e.memoizedState;if(null!==i){var s=i.dehydrated;if(La(t),a)if(256&t.flags)t.flags&=-257,t=Vs(e,t,n);else{if(null===t.memoizedState)throw Error(o(558));t.child=e.child,t.flags|=128,t=null}else if(As||Po(e,t,n,!1),a=0!==(n&e.childLanes),As||a){if(null!==(r=pc)&&0!==(s=Me(r,n))&&s!==i.retryLane)throw i.retryLane=s,Ar(e,s),Yc(r,e,s),_s;su(),t=Vs(e,t,n)}else e=i.treeContext,uo=Dd(s.nextSibling),co=t,fo=!0,ho=null,po=!1,null!==e&&lo(t,e),(t=Us(t,r)).flags|=4096;return t}return(e=Br(e.child,{mode:r.mode,children:r.children})).ref=t.ref,t.child=e,e.return=t,e}(e,t,n);case 22:return zs(e,t,n,t.pendingProps);case 24:return _o(t),r=Ao(Fo),null===e?(null===(a=Yo())&&(a=pc,i=Bo(),a.pooledCache=i,i.refCount++,null!==i&&(a.pooledCacheLanes|=n),a=i),t.memoizedState={parent:r,cache:a},ya(t),No(0,Fo,a)):(0!==(e.lanes&n)&&(va(e,t),Ca(t,null,null,n),Ea()),a=e.memoizedState,i=t.memoizedState,a.parent!==r?(a={parent:r,cache:r},t.memoizedState=a,0===t.lanes&&(t.memoizedState=t.updateQueue.baseState=a),No(0,Fo,r)):(r=i.cache,No(0,Fo,r),r!==a.cache&&Ro(t,[Fo],n,!0))),Ds(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function sl(e){e.flags|=4}function ll(e,t,n,r,o){if((t=!!(32&e.mode))&&(t=!1),t){if(e.flags|=16777216,(335544128&o)===o)if(e.stateNode.complete)e.flags|=8192;else{if(!ou())throw aa=ta,Zo;e.flags|=8192}}else e.flags&=-16777217}function cl(e,t){if("stylesheet"!==t.type||4&t.state.loading)e.flags&=-16777217;else if(e.flags|=16777216,!af(t)){if(!ou())throw aa=ta,Zo;e.flags|=8192}}function ul(e,t){null!==t&&(e.flags|=4),16384&e.flags&&(t=22!==e.tag?Pe():536870912,e.lanes|=t,jc|=t)}function dl(e,t){if(!fo)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function fl(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;null!==o;)n|=o.lanes|o.childLanes,r|=65011712&o.subtreeFlags,r|=65011712&o.flags,o.return=e,o=o.sibling;else for(o=e.child;null!==o;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function hl(e,t,n){var r=t.pendingProps;switch(so(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:case 1:return fl(t),null;case 3:return n=t.stateNode,r=null,null!==e&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),To(Fo),Y(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),null!==e&&null!==e.child||(bo(t)?sl(t):null===e||e.memoizedState.isDehydrated&&!(256&t.flags)||(t.flags|=1024,wo())),fl(t),null;case 26:var a=t.type,i=t.memoizedState;return null===e?(sl(t),null!==i?(fl(t),cl(t,i)):(fl(t),ll(t,a,0,0,n))):i?i!==e.memoizedState?(sl(t),fl(t),cl(t,i)):(fl(t),t.flags&=-16777217):((e=e.memoizedProps)!==r&&sl(t),fl(t),ll(t,a,0,0,n)),null;case 27:if(X(t),n=W.current,a=t.type,null!==e&&null!=t.stateNode)e.memoizedProps!==r&&sl(t);else{if(!r){if(null===t.stateNode)throw Error(o(166));return fl(t),null}e=H.current,bo(t)?yo(t):(e=zd(a,r,n),t.stateNode=e,sl(t))}return fl(t),null;case 5:if(X(t),a=t.type,null!==e&&null!=t.stateNode)e.memoizedProps!==r&&sl(t);else{if(!r){if(null===t.stateNode)throw Error(o(166));return fl(t),null}if(i=H.current,bo(t))yo(t);else{var s=yd(W.current);switch(i){case 1:i=s.createElementNS("http://www.w3.org/2000/svg",a);break;case 2:i=s.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;default:switch(a){case"svg":i=s.createElementNS("http://www.w3.org/2000/svg",a);break;case"math":i=s.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;case"script":(i=s.createElement("div")).innerHTML="<script><\/script>",i=i.removeChild(i.firstChild);break;case"select":i="string"==typeof r.is?s.createElement("select",{is:r.is}):s.createElement("select"),r.multiple?i.multiple=!0:r.size&&(i.size=r.size);break;default:i="string"==typeof r.is?s.createElement(a,{is:r.is}):s.createElement(a)}}i[Ue]=t,i[Ve]=r;e:for(s=t.child;null!==s;){if(5===s.tag||6===s.tag)i.appendChild(s.stateNode);else if(4!==s.tag&&27!==s.tag&&null!==s.child){s.child.return=s,s=s.child;continue}if(s===t)break e;for(;null===s.sibling;){if(null===s.return||s.return===t)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=i;e:switch(hd(i,a,r),a){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}r&&sl(t)}}return fl(t),ll(t,t.type,null===e||e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&null!=t.stateNode)e.memoizedProps!==r&&sl(t);else{if("string"!=typeof r&&null===t.stateNode)throw Error(o(166));if(e=W.current,bo(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,null!==(a=co))switch(a.tag){case 27:case 5:r=a.memoizedProps}e[Ue]=t,(e=!!(e.nodeValue===n||null!==r&&!0===r.suppressHydrationWarning||ud(e.nodeValue,n)))||go(t,!0)}else(e=yd(e).createTextNode(r))[Ue]=t,t.stateNode=e}return fl(t),null;case 31:if(n=t.memoizedState,null===e||null!==e.memoizedState){if(r=bo(t),null!==n){if(null===e){if(!r)throw Error(o(318));if(!(e=null!==(e=t.memoizedState)?e.dehydrated:null))throw Error(o(557));e[Ue]=t}else xo(),!(128&t.flags)&&(t.memoizedState=null),t.flags|=4;fl(t),e=!1}else n=wo(),null!==e&&null!==e.memoizedState&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return 256&t.flags?(Fa(t),t):(Fa(t),null);if(128&t.flags)throw Error(o(558))}return fl(t),null;case 13:if(r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(a=bo(t),null!==r&&null!==r.dehydrated){if(null===e){if(!a)throw Error(o(318));if(!(a=null!==(a=t.memoizedState)?a.dehydrated:null))throw Error(o(317));a[Ue]=t}else xo(),!(128&t.flags)&&(t.memoizedState=null),t.flags|=4;fl(t),a=!1}else a=wo(),null!==e&&null!==e.memoizedState&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return 256&t.flags?(Fa(t),t):(Fa(t),null)}return Fa(t),128&t.flags?(t.lanes=n,t):(n=null!==r,e=null!==e&&null!==e.memoizedState,n&&(a=null,null!==(r=t.child).alternate&&null!==r.alternate.memoizedState&&null!==r.alternate.memoizedState.cachePool&&(a=r.alternate.memoizedState.cachePool.pool),i=null,null!==r.memoizedState&&null!==r.memoizedState.cachePool&&(i=r.memoizedState.cachePool.pool),i!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),ul(t,t.updateQueue),fl(t),null);case 4:return Y(),null===e&&ed(t.stateNode.containerInfo),fl(t),null;case 10:return To(t.type),fl(t),null;case 19:if(B(Ba),null===(r=t.memoizedState))return fl(t),null;if(a=!!(128&t.flags),null===(i=r.rendering))if(a)dl(r,!1);else{if(0!==kc||null!==e&&128&e.flags)for(e=t.child;null!==e;){if(null!==(i=Ua(e))){for(t.flags|=128,dl(r,!1),e=i.updateQueue,t.updateQueue=e,ul(t,e),t.subtreeFlags=0,e=n,n=t.child;null!==n;)Ur(n,e),n=n.sibling;return U(Ba,1&Ba.current|2),fo&&oo(t,r.treeForkCount),t.child}e=e.sibling}null!==r.tail&&le()>Dc&&(t.flags|=128,a=!0,dl(r,!1),t.lanes=4194304)}else{if(!a)if(null!==(e=Ua(i))){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,ul(t,e),dl(r,!0),null===r.tail&&"hidden"===r.tailMode&&!i.alternate&&!fo)return fl(t),null}else 2*le()-r.renderingStartTime>Dc&&536870912!==n&&(t.flags|=128,a=!0,dl(r,!1),t.lanes=4194304);r.isBackwards?(i.sibling=t.child,t.child=i):(null!==(e=r.last)?e.sibling=i:t.child=i,r.last=i)}return null!==r.tail?(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=le(),e.sibling=null,n=Ba.current,U(Ba,a?1&n|2:1&n),fo&&oo(t,r.treeForkCount),e):(fl(t),null);case 22:case 23:return Fa(t),_a(),r=null!==t.memoizedState,null!==e?null!==e.memoizedState!==r&&(t.flags|=8192):r&&(t.flags|=8192),r?!!(536870912&n)&&!(128&t.flags)&&(fl(t),6&t.subtreeFlags&&(t.flags|=8192)):fl(t),null!==(n=t.updateQueue)&&ul(t,n.retryQueue),n=null,null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(n=e.memoizedState.cachePool.pool),r=null,null!==t.memoizedState&&null!==t.memoizedState.cachePool&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),null!==e&&B(Go),null;case 24:return n=null,null!==e&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),To(Fo),fl(t),null;case 25:case 30:return null}throw Error(o(156,t.tag))}function pl(e,t){switch(so(t),t.tag){case 1:return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return To(Fo),Y(),65536&(e=t.flags)&&!(128&e)?(t.flags=-65537&e|128,t):null;case 26:case 27:case 5:return X(t),null;case 31:if(null!==t.memoizedState){if(Fa(t),null===t.alternate)throw Error(o(340));xo()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 13:if(Fa(t),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(o(340));xo()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return B(Ba),null;case 4:return Y(),null;case 10:return To(t.type),null;case 22:case 23:return Fa(t),_a(),null!==e&&B(Go),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 24:return To(Fo),null;default:return null}}function ml(e,t){switch(so(t),t.tag){case 3:To(Fo),Y();break;case 26:case 27:case 5:X(t);break;case 4:Y();break;case 31:null!==t.memoizedState&&Fa(t);break;case 13:Fa(t);break;case 19:B(Ba);break;case 10:To(t.type);break;case 22:case 23:Fa(t),_a(),null!==e&&B(Go);break;case 24:To(Fo)}}function gl(e,t){try{var n=t.updateQueue,r=null!==n?n.lastEffect:null;if(null!==r){var o=r.next;n=o;do{if((n.tag&e)===e){r=void 0;var a=n.create,i=n.inst;r=a(),i.destroy=r}n=n.next}while(n!==o)}}catch(s){Eu(t,t.return,s)}}function yl(e,t,n){try{var r=t.updateQueue,o=null!==r?r.lastEffect:null;if(null!==o){var a=o.next;r=a;do{if((r.tag&e)===e){var i=r.inst,s=i.destroy;if(void 0!==s){i.destroy=void 0,o=t;var l=n,c=s;try{c()}catch(u){Eu(o,l,u)}}}r=r.next}while(r!==a)}}catch(u){Eu(t,t.return,u)}}function vl(e){var t=e.updateQueue;if(null!==t){var n=e.stateNode;try{Ta(t,n)}catch(r){Eu(e,e.return,r)}}}function bl(e,t,n){n.props=ks(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(r){Eu(e,t,r)}}function xl(e,t){try{var n=e.ref;if(null!==n){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;default:r=e.stateNode}"function"==typeof n?e.refCleanup=n(r):n.current=r}}catch(o){Eu(e,t,o)}}function wl(e,t){var n=e.ref,r=e.refCleanup;if(null!==n)if("function"==typeof r)try{r()}catch(o){Eu(e,t,o)}finally{e.refCleanup=null,null!=(e=e.alternate)&&(e.refCleanup=null)}else if("function"==typeof n)try{n(null)}catch(a){Eu(e,t,a)}else n.current=null}function Sl(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&r.focus();break e;case"img":n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(o){Eu(e,e.return,o)}}function kl(e,t,n){try{var r=e.stateNode;!function(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,i=null,s=null,l=null,c=null,u=null,d=null;for(p in n){var f=n[p];if(n.hasOwnProperty(p)&&null!=f)switch(p){case"checked":case"value":break;case"defaultValue":c=f;default:r.hasOwnProperty(p)||dd(e,t,p,null,r,f)}}for(var h in r){var p=r[h];if(f=n[h],r.hasOwnProperty(h)&&(null!=p||null!=f))switch(h){case"type":i=p;break;case"name":a=p;break;case"checked":u=p;break;case"defaultChecked":d=p;break;case"value":s=p;break;case"defaultValue":l=p;break;case"children":case"dangerouslySetInnerHTML":if(null!=p)throw Error(o(137,t));break;default:p!==f&&dd(e,t,h,p,r,f)}}return void vt(e,s,l,c,u,d,i,a);case"select":for(i in p=s=l=h=null,n)if(c=n[i],n.hasOwnProperty(i)&&null!=c)switch(i){case"value":break;case"multiple":p=c;default:r.hasOwnProperty(i)||dd(e,t,i,null,r,c)}for(a in r)if(i=r[a],c=n[a],r.hasOwnProperty(a)&&(null!=i||null!=c))switch(a){case"value":h=i;break;case"defaultValue":l=i;break;case"multiple":s=i;default:i!==c&&dd(e,t,a,i,r,c)}return t=l,n=s,r=p,void(null!=h?wt(e,!!n,h,!1):!!r!=!!n&&(null!=t?wt(e,!!n,t,!0):wt(e,!!n,n?[]:"",!1)));case"textarea":for(l in p=h=null,n)if(a=n[l],n.hasOwnProperty(l)&&null!=a&&!r.hasOwnProperty(l))switch(l){case"value":case"children":break;default:dd(e,t,l,null,r,a)}for(s in r)if(a=r[s],i=n[s],r.hasOwnProperty(s)&&(null!=a||null!=i))switch(s){case"value":h=a;break;case"defaultValue":p=a;break;case"children":break;case"dangerouslySetInnerHTML":if(null!=a)throw Error(o(91));break;default:a!==i&&dd(e,t,s,a,r,i)}return void St(e,h,p);case"option":for(var m in n)if(h=n[m],n.hasOwnProperty(m)&&null!=h&&!r.hasOwnProperty(m))if("selected"===m)e.selected=!1;else dd(e,t,m,null,r,h);for(c in r)if(h=r[c],p=n[c],r.hasOwnProperty(c)&&h!==p&&(null!=h||null!=p))if("selected"===c)e.selected=h&&"function"!=typeof h&&"symbol"!=typeof h;else dd(e,t,c,h,r,p);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)h=n[g],n.hasOwnProperty(g)&&null!=h&&!r.hasOwnProperty(g)&&dd(e,t,g,null,r,h);for(u in r)if(h=r[u],p=n[u],r.hasOwnProperty(u)&&h!==p&&(null!=h||null!=p))switch(u){case"children":case"dangerouslySetInnerHTML":if(null!=h)throw Error(o(137,t));break;default:dd(e,t,u,h,r,p)}return;default:if(jt(t)){for(var y in n)h=n[y],n.hasOwnProperty(y)&&void 0!==h&&!r.hasOwnProperty(y)&&fd(e,t,y,void 0,r,h);for(d in r)h=r[d],p=n[d],!r.hasOwnProperty(d)||h===p||void 0===h&&void 0===p||fd(e,t,d,h,r,p);return}}for(var v in n)h=n[v],n.hasOwnProperty(v)&&null!=h&&!r.hasOwnProperty(v)&&dd(e,t,v,null,r,h);for(f in r)h=r[f],p=n[f],!r.hasOwnProperty(f)||h===p||null==h&&null==p||dd(e,t,f,h,r,p)}(r,e.type,n,t),r[Ve]=t}catch(a){Eu(e,e.return,a)}}function El(e){return 5===e.tag||3===e.tag||26===e.tag||27===e.tag&&Td(e.type)||4===e.tag}function Cl(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||El(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(27===e.tag&&Td(e.type))continue e;if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function Nl(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?(9===n.nodeType?n.body:"HTML"===n.nodeName?n.ownerDocument.body:n).insertBefore(e,t):((t=9===n.nodeType?n.body:"HTML"===n.nodeName?n.ownerDocument.body:n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=_t));else if(4!==r&&(27===r&&Td(e.type)&&(n=e.stateNode,t=null),null!==(e=e.child)))for(Nl(e,t,n),e=e.sibling;null!==e;)Nl(e,t,n),e=e.sibling}function Tl(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&(27===r&&Td(e.type)&&(n=e.stateNode),null!==(e=e.child)))for(Tl(e,t,n),e=e.sibling;null!==e;)Tl(e,t,n),e=e.sibling}function jl(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,o=t.attributes;o.length;)t.removeAttributeNode(o[0]);hd(t,r,n),t[Ue]=e,t[Ve]=n}catch(a){Eu(e,e.return,a)}}var Rl=!1,Pl=!1,Ol=!1,_l="function"==typeof WeakSet?WeakSet:Set,Al=null;function Dl(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Gl(e,n),4&r&&gl(5,n);break;case 1:if(Gl(e,n),4&r)if(e=n.stateNode,null===t)try{e.componentDidMount()}catch(i){Eu(n,n.return,i)}else{var o=ks(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(o,t,e.__reactInternalSnapshotBeforeUpdate)}catch(s){Eu(n,n.return,s)}}64&r&&vl(n),512&r&&xl(n,n.return);break;case 3:if(Gl(e,n),64&r&&null!==(e=n.updateQueue)){if(t=null,null!==n.child)switch(n.child.tag){case 27:case 5:case 1:t=n.child.stateNode}try{Ta(e,t)}catch(i){Eu(n,n.return,i)}}break;case 27:null===t&&4&r&&jl(n);case 26:case 5:Gl(e,n),null===t&&4&r&&Sl(n),512&r&&xl(n,n.return);break;case 12:Gl(e,n);break;case 31:Gl(e,n),4&r&&Bl(e,n);break;case 13:Gl(e,n),4&r&&Ul(e,n),64&r&&(null!==(e=n.memoizedState)&&(null!==(e=e.dehydrated)&&function(e,t){var n=e.ownerDocument;if("$~"===e.data)e._reactRetry=t;else if("$?"!==e.data||"loading"!==n.readyState)t();else{var r=function(){t(),n.removeEventListener("DOMContentLoaded",r)};n.addEventListener("DOMContentLoaded",r),e._reactRetry=r}}(e,n=ju.bind(null,n))));break;case 22:if(!(r=null!==n.memoizedState||Rl)){t=null!==t&&null!==t.memoizedState||Pl,o=Rl;var a=Pl;Rl=r,(Pl=t)&&!a?Ql(e,n,!!(8772&n.subtreeFlags)):Gl(e,n),Rl=o,Pl=a}break;case 30:break;default:Gl(e,n)}}function Ml(e){var t=e.alternate;null!==t&&(e.alternate=null,Ml(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&Ye(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 Ll=null,Il=!1;function zl(e,t,n){for(n=n.child;null!==n;)Fl(e,t,n),n=n.sibling}function Fl(e,t,n){if(ve&&"function"==typeof ve.onCommitFiberUnmount)try{ve.onCommitFiberUnmount(ye,n)}catch(Fc){}switch(n.tag){case 26:Pl||wl(n,t),zl(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode).parentNode.removeChild(n);break;case 27:Pl||wl(n,t);var r=Ll,o=Il;Td(n.type)&&(Ll=n.stateNode,Il=!1),zl(e,t,n),Fd(n.stateNode),Ll=r,Il=o;break;case 5:Pl||wl(n,t);case 6:if(r=Ll,o=Il,Ll=null,zl(e,t,n),Il=o,null!==(Ll=r))if(Il)try{(9===Ll.nodeType?Ll.body:"HTML"===Ll.nodeName?Ll.ownerDocument.body:Ll).removeChild(n.stateNode)}catch(a){Eu(n,t,a)}else try{Ll.removeChild(n.stateNode)}catch(a){Eu(n,t,a)}break;case 18:null!==Ll&&(Il?(jd(9===(e=Ll).nodeType?e.body:"HTML"===e.nodeName?e.ownerDocument.body:e,n.stateNode),Hf(e)):jd(Ll,n.stateNode));break;case 4:r=Ll,o=Il,Ll=n.stateNode.containerInfo,Il=!0,zl(e,t,n),Ll=r,Il=o;break;case 0:case 11:case 14:case 15:yl(2,n,t),Pl||yl(4,n,t),zl(e,t,n);break;case 1:Pl||(wl(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount&&bl(n,t,r)),zl(e,t,n);break;case 21:zl(e,t,n);break;case 22:Pl=(r=Pl)||null!==n.memoizedState,zl(e,t,n),Pl=r;break;default:zl(e,t,n)}}function Bl(e,t){if(null===t.memoizedState&&(null!==(e=t.alternate)&&null!==(e=e.memoizedState))){e=e.dehydrated;try{Hf(e)}catch(n){Eu(t,t.return,n)}}}function Ul(e,t){if(null===t.memoizedState&&(null!==(e=t.alternate)&&(null!==(e=e.memoizedState)&&null!==(e=e.dehydrated))))try{Hf(e)}catch(n){Eu(t,t.return,n)}}function Vl(e,t){var n=function(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return null===t&&(t=e.stateNode=new _l),t;case 22:return null===(t=(e=e.stateNode)._retryCache)&&(t=e._retryCache=new _l),t;default:throw Error(o(435,e.tag))}}(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Ru.bind(null,e,t);t.then(r,r)}})}function $l(e,t){var n=t.deletions;if(null!==n)for(var r=0;r<n.length;r++){var a=n[r],i=e,s=t,l=s;e:for(;null!==l;){switch(l.tag){case 27:if(Td(l.type)){Ll=l.stateNode,Il=!1;break e}break;case 5:Ll=l.stateNode,Il=!1;break e;case 3:case 4:Ll=l.stateNode.containerInfo,Il=!0;break e}l=l.return}if(null===Ll)throw Error(o(160));Fl(i,s,a),Ll=null,Il=!1,null!==(i=a.alternate)&&(i.return=null),a.return=null}if(13886&t.subtreeFlags)for(t=t.child;null!==t;)ql(t,e),t=t.sibling}var Hl=null;function ql(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:$l(t,e),Wl(e),4&r&&(yl(3,e,e.return),gl(3,e),yl(5,e,e.return));break;case 1:$l(t,e),Wl(e),512&r&&(Pl||null===n||wl(n,n.return)),64&r&&Rl&&(null!==(e=e.updateQueue)&&(null!==(r=e.callbacks)&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=null===n?r:n.concat(r))));break;case 26:var a=Hl;if($l(t,e),Wl(e),512&r&&(Pl||null===n||wl(n,n.return)),4&r){var i=null!==n?n.memoizedState:null;if(r=e.memoizedState,null===n)if(null===r)if(null===e.stateNode){e:{r=e.type,n=e.memoizedProps,a=a.ownerDocument||a;t:switch(r){case"title":(!(i=a.getElementsByTagName("title")[0])||i[Ge]||i[Ue]||"http://www.w3.org/2000/svg"===i.namespaceURI||i.hasAttribute("itemprop"))&&(i=a.createElement(r),a.head.insertBefore(i,a.querySelector("head > title"))),hd(i,r,n),i[Ue]=e,et(i),r=i;break e;case"link":var s=rf("link","href",a).get(r+(n.href||""));if(s)for(var l=0;l<s.length;l++)if((i=s[l]).getAttribute("href")===(null==n.href||""===n.href?null:n.href)&&i.getAttribute("rel")===(null==n.rel?null:n.rel)&&i.getAttribute("title")===(null==n.title?null:n.title)&&i.getAttribute("crossorigin")===(null==n.crossOrigin?null:n.crossOrigin)){s.splice(l,1);break t}hd(i=a.createElement(r),r,n),a.head.appendChild(i);break;case"meta":if(s=rf("meta","content",a).get(r+(n.content||"")))for(l=0;l<s.length;l++)if((i=s[l]).getAttribute("content")===(null==n.content?null:""+n.content)&&i.getAttribute("name")===(null==n.name?null:n.name)&&i.getAttribute("property")===(null==n.property?null:n.property)&&i.getAttribute("http-equiv")===(null==n.httpEquiv?null:n.httpEquiv)&&i.getAttribute("charset")===(null==n.charSet?null:n.charSet)){s.splice(l,1);break t}hd(i=a.createElement(r),r,n),a.head.appendChild(i);break;default:throw Error(o(468,r))}i[Ue]=e,et(i),r=i}e.stateNode=r}else of(a,e.type,e.stateNode);else e.stateNode=Jd(a,r,e.memoizedProps);else i!==r?(null===i?null!==n.stateNode&&(n=n.stateNode).parentNode.removeChild(n):i.count--,null===r?of(a,e.type,e.stateNode):Jd(a,r,e.memoizedProps)):null===r&&null!==e.stateNode&&kl(e,e.memoizedProps,n.memoizedProps)}break;case 27:$l(t,e),Wl(e),512&r&&(Pl||null===n||wl(n,n.return)),null!==n&&4&r&&kl(e,e.memoizedProps,n.memoizedProps);break;case 5:if($l(t,e),Wl(e),512&r&&(Pl||null===n||wl(n,n.return)),32&e.flags){a=e.stateNode;try{Et(a,"")}catch(m){Eu(e,e.return,m)}}4&r&&null!=e.stateNode&&kl(e,a=e.memoizedProps,null!==n?n.memoizedProps:a),1024&r&&(Ol=!0);break;case 6:if($l(t,e),Wl(e),4&r){if(null===e.stateNode)throw Error(o(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(m){Eu(e,e.return,m)}}break;case 3:if(nf=null,a=Hl,Hl=Vd(t.containerInfo),$l(t,e),Hl=a,Wl(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{Hf(t.containerInfo)}catch(m){Eu(e,e.return,m)}Ol&&(Ol=!1,Kl(e));break;case 4:r=Hl,Hl=Vd(e.stateNode.containerInfo),$l(t,e),Wl(e),Hl=r;break;case 12:default:$l(t,e),Wl(e);break;case 31:case 19:$l(t,e),Wl(e),4&r&&(null!==(r=e.updateQueue)&&(e.updateQueue=null,Vl(e,r)));break;case 13:$l(t,e),Wl(e),8192&e.child.flags&&null!==e.memoizedState!=(null!==n&&null!==n.memoizedState)&&(_c=le()),4&r&&(null!==(r=e.updateQueue)&&(e.updateQueue=null,Vl(e,r)));break;case 22:a=null!==e.memoizedState;var c=null!==n&&null!==n.memoizedState,u=Rl,d=Pl;if(Rl=u||a,Pl=d||c,$l(t,e),Pl=d,Rl=u,Wl(e),8192&r)e:for(t=e.stateNode,t._visibility=a?-2&t._visibility:1|t._visibility,a&&(null===n||c||Rl||Pl||Yl(e)),n=null,t=e;;){if(5===t.tag||26===t.tag){if(null===n){c=n=t;try{if(i=c.stateNode,a)"function"==typeof(s=i.style).setProperty?s.setProperty("display","none","important"):s.display="none";else{l=c.stateNode;var f=c.memoizedProps.style,h=null!=f&&f.hasOwnProperty("display")?f.display:null;l.style.display=null==h||"boolean"==typeof h?"":(""+h).trim()}}catch(m){Eu(c,c.return,m)}}}else if(6===t.tag){if(null===n){c=t;try{c.stateNode.nodeValue=a?"":c.memoizedProps}catch(m){Eu(c,c.return,m)}}}else if(18===t.tag){if(null===n){c=t;try{var p=c.stateNode;a?Rd(p,!0):Rd(c.stateNode,!1)}catch(m){Eu(c,c.return,m)}}}else if((22!==t.tag&&23!==t.tag||null===t.memoizedState||t===e)&&null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;null===t.sibling;){if(null===t.return||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}4&r&&(null!==(r=e.updateQueue)&&(null!==(n=r.retryQueue)&&(r.retryQueue=null,Vl(e,n))));case 30:case 21:}}function Wl(e){var t=e.flags;if(2&t){try{for(var n,r=e.return;null!==r;){if(El(r)){n=r;break}r=r.return}if(null==n)throw Error(o(160));switch(n.tag){case 27:var a=n.stateNode;Tl(e,Cl(e),a);break;case 5:var i=n.stateNode;32&n.flags&&(Et(i,""),n.flags&=-33),Tl(e,Cl(e),i);break;case 3:case 4:var s=n.stateNode.containerInfo;Nl(e,Cl(e),s);break;default:throw Error(o(161))}}catch(l){Eu(e,e.return,l)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function Kl(e){if(1024&e.subtreeFlags)for(e=e.child;null!==e;){var t=e;Kl(t),5===t.tag&&1024&t.flags&&t.stateNode.reset(),e=e.sibling}}function Gl(e,t){if(8772&t.subtreeFlags)for(t=t.child;null!==t;)Dl(e,t.alternate,t),t=t.sibling}function Yl(e){for(e=e.child;null!==e;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:yl(4,t,t.return),Yl(t);break;case 1:wl(t,t.return);var n=t.stateNode;"function"==typeof n.componentWillUnmount&&bl(t,t.return,n),Yl(t);break;case 27:Fd(t.stateNode);case 26:case 5:wl(t,t.return),Yl(t);break;case 22:null===t.memoizedState&&Yl(t);break;default:Yl(t)}e=e.sibling}}function Ql(e,t,n){for(n=n&&!!(8772&t.subtreeFlags),t=t.child;null!==t;){var r=t.alternate,o=e,a=t,i=a.flags;switch(a.tag){case 0:case 11:case 15:Ql(o,a,n),gl(4,a);break;case 1:if(Ql(o,a,n),"function"==typeof(o=(r=a).stateNode).componentDidMount)try{o.componentDidMount()}catch(c){Eu(r,r.return,c)}if(null!==(o=(r=a).updateQueue)){var s=r.stateNode;try{var l=o.shared.hiddenCallbacks;if(null!==l)for(o.shared.hiddenCallbacks=null,o=0;o<l.length;o++)Na(l[o],s)}catch(c){Eu(r,r.return,c)}}n&&64&i&&vl(a),xl(a,a.return);break;case 27:jl(a);case 26:case 5:Ql(o,a,n),n&&null===r&&4&i&&Sl(a),xl(a,a.return);break;case 12:Ql(o,a,n);break;case 31:Ql(o,a,n),n&&4&i&&Bl(o,a);break;case 13:Ql(o,a,n),n&&4&i&&Ul(o,a);break;case 22:null===a.memoizedState&&Ql(o,a,n),xl(a,a.return);break;case 30:break;default:Ql(o,a,n)}t=t.sibling}}function Xl(e,t){var n=null;null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(n=e.memoizedState.cachePool.pool),e=null,null!==t.memoizedState&&null!==t.memoizedState.cachePool&&(e=t.memoizedState.cachePool.pool),e!==n&&(null!=e&&e.refCount++,null!=n&&Uo(n))}function Jl(e,t){e=null,null!==t.alternate&&(e=t.alternate.memoizedState.cache),(t=t.memoizedState.cache)!==e&&(t.refCount++,null!=e&&Uo(e))}function Zl(e,t,n,r){if(10256&t.subtreeFlags)for(t=t.child;null!==t;)ec(e,t,n,r),t=t.sibling}function ec(e,t,n,r){var o=t.flags;switch(t.tag){case 0:case 11:case 15:Zl(e,t,n,r),2048&o&&gl(9,t);break;case 1:case 31:case 13:default:Zl(e,t,n,r);break;case 3:Zl(e,t,n,r),2048&o&&(e=null,null!==t.alternate&&(e=t.alternate.memoizedState.cache),(t=t.memoizedState.cache)!==e&&(t.refCount++,null!=e&&Uo(e)));break;case 12:if(2048&o){Zl(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,i=a.id,s=a.onPostCommit;"function"==typeof s&&s(i,null===t.alternate?"mount":"update",e.passiveEffectDuration,-0)}catch(l){Eu(t,t.return,l)}}else Zl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,i=t.alternate,null!==t.memoizedState?2&a._visibility?Zl(e,t,n,r):nc(e,t):2&a._visibility?Zl(e,t,n,r):(a._visibility|=2,tc(e,t,n,r,!!(10256&t.subtreeFlags)||!1)),2048&o&&Xl(i,t);break;case 24:Zl(e,t,n,r),2048&o&&Jl(t.alternate,t)}}function tc(e,t,n,r,o){for(o=o&&(!!(10256&t.subtreeFlags)||!1),t=t.child;null!==t;){var a=e,i=t,s=n,l=r,c=i.flags;switch(i.tag){case 0:case 11:case 15:tc(a,i,s,l,o),gl(8,i);break;case 23:break;case 22:var u=i.stateNode;null!==i.memoizedState?2&u._visibility?tc(a,i,s,l,o):nc(a,i):(u._visibility|=2,tc(a,i,s,l,o)),o&&2048&c&&Xl(i.alternate,i);break;case 24:tc(a,i,s,l,o),o&&2048&c&&Jl(i.alternate,i);break;default:tc(a,i,s,l,o)}t=t.sibling}}function nc(e,t){if(10256&t.subtreeFlags)for(t=t.child;null!==t;){var n=e,r=t,o=r.flags;switch(r.tag){case 22:nc(n,r),2048&o&&Xl(r.alternate,r);break;case 24:nc(n,r),2048&o&&Jl(r.alternate,r);break;default:nc(n,r)}t=t.sibling}}var rc=8192;function oc(e,t,n){if(e.subtreeFlags&rc)for(e=e.child;null!==e;)ac(e,t,n),e=e.sibling}function ac(e,t,n){switch(e.tag){case 26:oc(e,t,n),e.flags&rc&&null!==e.memoizedState&&function(e,t,n,r){if(!("stylesheet"!==n.type||"string"==typeof r.media&&!1===matchMedia(r.media).matches||4&n.state.loading)){if(null===n.instance){var o=Kd(r.href),a=t.querySelector(Gd(o));if(a)return null!==(t=a._p)&&"object"==typeof t&&"function"==typeof t.then&&(e.count++,e=lf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,void et(a);a=t.ownerDocument||t,r=Yd(r),(o=Bd.get(o))&&ef(r,o),et(a=a.createElement("link"));var i=a;i._p=new Promise(function(e,t){i.onload=e,i.onerror=t}),hd(a,"link",r),n.instance=a}null===e.stylesheets&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(3&n.state.loading)&&(e.count++,n=lf.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}(n,Hl,e.memoizedState,e.memoizedProps);break;case 5:default:oc(e,t,n);break;case 3:case 4:var r=Hl;Hl=Vd(e.stateNode.containerInfo),oc(e,t,n),Hl=r;break;case 22:null===e.memoizedState&&(null!==(r=e.alternate)&&null!==r.memoizedState?(r=rc,rc=16777216,oc(e,t,n),rc=r):oc(e,t,n))}}function ic(e){var t=e.alternate;if(null!==t&&null!==(e=t.child)){t.child=null;do{t=e.sibling,e.sibling=null,e=t}while(null!==e)}}function sc(e){var t=e.deletions;if(16&e.flags){if(null!==t)for(var n=0;n<t.length;n++){var r=t[n];Al=r,uc(r,e)}ic(e)}if(10256&e.subtreeFlags)for(e=e.child;null!==e;)lc(e),e=e.sibling}function lc(e){switch(e.tag){case 0:case 11:case 15:sc(e),2048&e.flags&&yl(9,e,e.return);break;case 3:case 12:default:sc(e);break;case 22:var t=e.stateNode;null!==e.memoizedState&&2&t._visibility&&(null===e.return||13!==e.return.tag)?(t._visibility&=-3,cc(e)):sc(e)}}function cc(e){var t=e.deletions;if(16&e.flags){if(null!==t)for(var n=0;n<t.length;n++){var r=t[n];Al=r,uc(r,e)}ic(e)}for(e=e.child;null!==e;){switch((t=e).tag){case 0:case 11:case 15:yl(8,t,t.return),cc(t);break;case 22:2&(n=t.stateNode)._visibility&&(n._visibility&=-3,cc(t));break;default:cc(t)}e=e.sibling}}function uc(e,t){for(;null!==Al;){var n=Al;switch(n.tag){case 0:case 11:case 15:yl(8,n,t);break;case 23:case 22:if(null!==n.memoizedState&&null!==n.memoizedState.cachePool){var r=n.memoizedState.cachePool.pool;null!=r&&r.refCount++}break;case 24:Uo(n.memoizedState.cache)}if(null!==(r=n.child))r.return=n,Al=r;else e:for(n=e;null!==Al;){var o=(r=Al).sibling,a=r.return;if(Ml(r),r===n){Al=null;break e}if(null!==o){o.return=a,Al=o;break e}Al=a}}}var dc={getCacheForType:function(e){var t=Ao(Fo),n=t.data.get(e);return void 0===n&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Ao(Fo).controller.signal}},fc="function"==typeof WeakMap?WeakMap:Map,hc=0,pc=null,mc=null,gc=0,yc=0,vc=null,bc=!1,xc=!1,wc=!1,Sc=0,kc=0,Ec=0,Cc=0,Nc=0,Tc=0,jc=0,Rc=null,Pc=null,Oc=!1,_c=0,Ac=0,Dc=1/0,Mc=null,Lc=null,Ic=0,zc=null,Bc=null,Uc=0,Vc=0,$c=null,Hc=null,qc=0,Wc=null;function Kc(){return 2&hc&&0!==gc?gc&-gc:null!==D.T?$u():ze()}function Gc(){if(0===Tc)if(536870912&gc&&!fo)Tc=536870912;else{var e=Ee;!(3932160&(Ee<<=1))&&(Ee=262144),Tc=e}return null!==(e=Aa.current)&&(e.flags|=32),Tc}function Yc(e,t,n){(e!==pc||2!==yc&&9!==yc)&&null===e.cancelPendingCommit||(nu(e,0),Zc(e,gc,Tc,!1)),_e(e,n),2&hc&&e===pc||(e===pc&&(!(2&hc)&&(Cc|=n),4===kc&&Zc(e,gc,Tc,!1)),Lu(e))}function Qc(e,t,n){if(6&hc)throw Error(o(327));for(var r=!n&&!(127&t)&&0===(t&e.expiredLanes)||je(e,t),a=r?function(e,t){var n=hc;hc|=2;var r=au(),a=iu();pc!==e||gc!==t?(Mc=null,Dc=le()+500,nu(e,t)):xc=je(e,t);e:for(;;)try{if(0!==yc&&null!==mc){t=mc;var i=vc;t:switch(yc){case 1:yc=0,vc=null,hu(e,t,i,1);break;case 2:case 9:if(na(i)){yc=0,vc=null,fu(t);break}t=function(){2!==yc&&9!==yc||pc!==e||(yc=7),Lu(e)},i.then(t,t);break e;case 3:yc=7;break e;case 4:yc=5;break e;case 7:na(i)?(yc=0,vc=null,fu(t)):(yc=0,vc=null,hu(e,t,i,7));break;case 5:var s=null;switch(mc.tag){case 26:s=mc.memoizedState;case 5:case 27:var l=mc;if(s?af(s):l.stateNode.complete){yc=0,vc=null;var c=l.sibling;if(null!==c)mc=c;else{var u=l.return;null!==u?(mc=u,pu(u)):mc=null}break t}}yc=0,vc=null,hu(e,t,i,5);break;case 6:yc=0,vc=null,hu(e,t,i,6);break;case 8:tu(),kc=6;break e;default:throw Error(o(462))}}uu();break}catch(d){ru(e,d)}return Co=Eo=null,D.H=r,D.A=a,hc=n,null!==mc?0:(pc=null,gc=0,Pr(),kc)}(e,t):lu(e,t,!0),i=r;;){if(0===a){xc&&!r&&Zc(e,t,0,!1);break}if(n=e.current.alternate,!i||Jc(n)){if(2===a){if(i=t,e.errorRecoveryDisabledLanes&i)var s=0;else s=0!==(s=-536870913&e.pendingLanes)?s:536870912&s?536870912:0;if(0!==s){t=s;e:{var l=e;a=Rc;var c=l.current.memoizedState.isDehydrated;if(c&&(nu(l,s).flags|=256),2!==(s=lu(l,s,!1))){if(wc&&!c){l.errorRecoveryDisabledLanes|=i,Cc|=i,a=4;break e}i=Pc,Pc=a,null!==i&&(null===Pc?Pc=i:Pc.push.apply(Pc,i))}a=s}if(i=!1,2!==a)continue}}if(1===a){nu(e,0),Zc(e,t,0,!0);break}e:{switch(r=e,i=a){case 0:case 1:throw Error(o(345));case 4:if((4194048&t)!==t)break;case 6:Zc(r,t,Tc,!bc);break e;case 2:Pc=null;break;case 3:case 5:break;default:throw Error(o(329))}if((62914560&t)===t&&10<(a=_c+300-le())){if(Zc(r,t,Tc,!bc),0!==Te(r,0,!0))break e;Uc=t,r.timeoutHandle=Sd(Xc.bind(null,r,n,Pc,Mc,Oc,t,Tc,Cc,jc,bc,i,"Throttled",-0,0),a)}else Xc(r,n,Pc,Mc,Oc,t,Tc,Cc,jc,bc,i,null,-0,0)}break}a=lu(e,t,!1),i=!1}Lu(e)}function Xc(e,t,n,r,o,a,i,s,l,c,u,d,f,h){if(e.timeoutHandle=-1,8192&(d=t.subtreeFlags)||!(16785408&~d)){ac(t,a,d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:_t});var p=(62914560&a)===a?_c-le():(4194048&a)===a?Ac-le():0;if(p=function(e,t){return e.stylesheets&&0===e.count&&uf(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&uf(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&0===sf&&(sf=62500*function(){if("function"==typeof performance.getEntriesByType){for(var e=0,t=0,n=performance.getEntriesByType("resource"),r=0;r<n.length;r++){var o=n[r],a=o.transferSize,i=o.initiatorType,s=o.duration;if(a&&s&&pd(i)){for(i=0,s=o.responseEnd,r+=1;r<n.length;r++){var l=n[r],c=l.startTime;if(c>s)break;var u=l.transferSize,d=l.initiatorType;u&&pd(d)&&(i+=u*((l=l.responseEnd)<s?1:(s-c)/(l-c)))}if(--r,t+=8*(a+i)/(o.duration/1e3),10<++e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,"number"==typeof e)?e:5}());var o=setTimeout(function(){if(e.waitingForImages=!1,0===e.count&&(e.stylesheets&&uf(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>sf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(o)}}:null}(d,p),null!==p)return Uc=a,e.cancelPendingCommit=p(gu.bind(null,e,t,a,n,r,o,i,s,l,u,d,null,f,h)),void Zc(e,a,i,!c)}gu(e,t,a,n,r,o,i,s,l)}function Jc(e){for(var t=e;;){var n=t.tag;if((0===n||11===n||15===n)&&16384&t.flags&&(null!==(n=t.updateQueue)&&null!==(n=n.stores)))for(var r=0;r<n.length;r++){var o=n[r],a=o.getSnapshot;o=o.value;try{if(!Jn(a(),o))return!1}catch(i){return!1}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Zc(e,t,n,r){t&=~Nc,t&=~Cc,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var o=t;0<o;){var a=31-xe(o),i=1<<a;r[a]=-1,o&=~i}0!==n&&Ae(e,n,t)}function eu(){return!!(6&hc)||(Iu(0,!1),!1)}function tu(){if(null!==mc){if(0===yc)var e=mc.return;else Co=Eo=null,si(e=mc),la=null,ca=0,e=mc;for(;null!==e;)ml(e.alternate,e),e=e.return;mc=null}}function nu(e,t){var n=e.timeoutHandle;-1!==n&&(e.timeoutHandle=-1,kd(n)),null!==(n=e.cancelPendingCommit)&&(e.cancelPendingCommit=null,n()),Uc=0,tu(),pc=e,mc=n=Br(e.current,null),gc=t,yc=0,vc=null,bc=!1,xc=je(e,t),wc=!1,jc=Tc=Nc=Cc=Ec=kc=0,Pc=Rc=null,Oc=!1,8&t&&(t|=32&t);var r=e.entangledLanes;if(0!==r)for(e=e.entanglements,r&=t;0<r;){var o=31-xe(r),a=1<<o;t|=e[o],r&=~a}return Sc=t,Pr(),n}function ru(e,t){$a=null,D.H=ms,t===Jo||t===ea?(t=ia(),yc=3):t===Zo?(t=ia(),yc=4):yc=t===_s?8:null!==t&&"object"==typeof t&&"function"==typeof t.then?6:1,vc=t,null===mc&&(kc=1,Ts(e,Gr(t,e.current)))}function ou(){var e=Aa.current;return null===e||((4194048&gc)===gc?null===Da:!!((62914560&gc)===gc||536870912&gc)&&e===Da)}function au(){var e=D.H;return D.H=ms,null===e?ms:e}function iu(){var e=D.A;return D.A=dc,e}function su(){kc=4,bc||(4194048&gc)!==gc&&null!==Aa.current||(xc=!0),!(134217727&Ec)&&!(134217727&Cc)||null===pc||Zc(pc,gc,Tc,!1)}function lu(e,t,n){var r=hc;hc|=2;var o=au(),a=iu();pc===e&&gc===t||(Mc=null,nu(e,t)),t=!1;var i=kc;e:for(;;)try{if(0!==yc&&null!==mc){var s=mc,l=vc;switch(yc){case 8:tu(),i=6;break e;case 3:case 2:case 9:case 6:null===Aa.current&&(t=!0);var c=yc;if(yc=0,vc=null,hu(e,s,l,c),n&&xc){i=0;break e}break;default:c=yc,yc=0,vc=null,hu(e,s,l,c)}}cu(),i=kc;break}catch(u){ru(e,u)}return t&&e.shellSuspendCounter++,Co=Eo=null,hc=r,D.H=o,D.A=a,null===mc&&(pc=null,gc=0,Pr()),i}function cu(){for(;null!==mc;)du(mc)}function uu(){for(;null!==mc&&!ie();)du(mc)}function du(e){var t=il(e.alternate,e,Sc);e.memoizedProps=e.pendingProps,null===t?pu(e):mc=t}function fu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=qs(n,t,t.pendingProps,t.type,void 0,gc);break;case 11:t=qs(n,t,t.pendingProps,t.type.render,t.ref,gc);break;case 5:si(t);default:ml(n,t),t=il(n,t=mc=Ur(t,Sc),Sc)}e.memoizedProps=e.pendingProps,null===t?pu(e):mc=t}function hu(e,t,n,r){Co=Eo=null,si(t),la=null,ca=0;var a=t.return;try{if(function(e,t,n,r,a){if(n.flags|=32768,null!==r&&"object"==typeof r&&"function"==typeof r.then){if(null!==(t=n.alternate)&&Po(t,n,a,!0),null!==(n=Aa.current)){switch(n.tag){case 31:case 13:return null===Da?su():null===n.alternate&&0===kc&&(kc=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===ta?n.flags|=16384:(null===(t=n.updateQueue)?n.updateQueue=new Set([r]):t.add(r),Cu(e,r,a)),!1;case 22:return n.flags|=65536,r===ta?n.flags|=16384:(null===(t=n.updateQueue)?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):null===(n=t.retryQueue)?t.retryQueue=new Set([r]):n.add(r),Cu(e,r,a)),!1}throw Error(o(435,n.tag))}return Cu(e,r,a),su(),!1}if(fo)return null!==(t=Aa.current)?(!(65536&t.flags)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==mo&&So(Gr(e=Error(o(422),{cause:r}),n))):(r!==mo&&So(Gr(t=Error(o(423),{cause:r}),n)),(e=e.current.alternate).flags|=65536,a&=-a,e.lanes|=a,r=Gr(r,n),Sa(e,a=Rs(e.stateNode,r,a)),4!==kc&&(kc=2)),!1;var i=Error(o(520),{cause:r});if(i=Gr(i,n),null===Rc?Rc=[i]:Rc.push(i),4!==kc&&(kc=2),null===t)return!0;r=Gr(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,Sa(n,e=Rs(n.stateNode,r,e)),!1;case 1:if(t=n.type,i=n.stateNode,!(128&n.flags||"function"!=typeof t.getDerivedStateFromError&&(null===i||"function"!=typeof i.componentDidCatch||null!==Lc&&Lc.has(i))))return n.flags|=65536,a&=-a,n.lanes|=a,Os(a=Ps(a),e,n,r),Sa(n,a),!1}n=n.return}while(null!==n);return!1}(e,a,t,n,gc))return kc=1,Ts(e,Gr(n,e.current)),void(mc=null)}catch(i){if(null!==a)throw mc=a,i;return kc=1,Ts(e,Gr(n,e.current)),void(mc=null)}32768&t.flags?(fo||1===r?e=!0:xc||536870912&gc?e=!1:(bc=e=!0,(2===r||9===r||3===r||6===r)&&(null!==(r=Aa.current)&&13===r.tag&&(r.flags|=16384))),mu(t,e)):pu(t)}function pu(e){var t=e;do{if(32768&t.flags)return void mu(t,bc);e=t.return;var n=hl(t.alternate,t,Sc);if(null!==n)return void(mc=n);if(null!==(t=t.sibling))return void(mc=t);mc=t=e}while(null!==t);0===kc&&(kc=5)}function mu(e,t){do{var n=pl(e.alternate,e);if(null!==n)return n.flags&=32767,void(mc=n);if(null!==(n=e.return)&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&null!==(e=e.sibling))return void(mc=e);mc=e=n}while(null!==e);kc=6,mc=null}function gu(e,t,n,r,a,i,s,l,c){e.cancelPendingCommit=null;do{wu()}while(0!==Ic);if(6&hc)throw Error(o(327));if(null!==t){if(t===e.current)throw Error(o(177));if(i=t.lanes|t.childLanes,function(e,t,n,r,o,a){var i=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,l=e.expirationTimes,c=e.hiddenUpdates;for(n=i&~n;0<n;){var u=31-xe(n),d=1<<u;s[u]=0,l[u]=-1;var f=c[u];if(null!==f)for(c[u]=null,u=0;u<f.length;u++){var h=f[u];null!==h&&(h.lane&=-536870913)}n&=~d}0!==r&&Ae(e,r,0),0!==a&&0===o&&0!==e.tag&&(e.suspendedLanes|=a&~(i&~t))}(e,n,i|=Rr,s,l,c),e===pc&&(mc=pc=null,gc=0),Bc=t,zc=e,Uc=n,Vc=i,$c=a,Hc=r,10256&t.subtreeFlags||10256&t.flags?(e.callbackNode=null,e.callbackPriority=0,oe(fe,function(){return Su(),null})):(e.callbackNode=null,e.callbackPriority=0),r=!!(13878&t.flags),13878&t.subtreeFlags||r){r=D.T,D.T=null,a=M.p,M.p=2,s=hc,hc|=4;try{!function(e,t){if(e=e.containerInfo,md=bf,or(e=rr(e))){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var r=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(r&&0!==r.rangeCount){n=r.anchorNode;var a=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch(g){n=null;break e}var s=0,l=-1,c=-1,u=0,d=0,f=e,h=null;t:for(;;){for(var p;f!==n||0!==a&&3!==f.nodeType||(l=s+a),f!==i||0!==r&&3!==f.nodeType||(c=s+r),3===f.nodeType&&(s+=f.nodeValue.length),null!==(p=f.firstChild);)h=f,f=p;for(;;){if(f===e)break t;if(h===n&&++u===a&&(l=s),h===i&&++d===r&&(c=s),null!==(p=f.nextSibling))break;h=(f=h).parentNode}f=p}n=-1===l||-1===c?null:{start:l,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(gd={focusedElem:e,selectionRange:n},bf=!1,Al=t;null!==Al;)if(e=(t=Al).child,1028&t.subtreeFlags&&null!==e)e.return=t,Al=e;else for(;null!==Al;){switch(i=(t=Al).alternate,e=t.flags,t.tag){case 0:if(4&e&&null!==(e=null!==(e=t.updateQueue)?e.events:null))for(n=0;n<e.length;n++)(a=e[n]).ref.impl=a.nextImpl;break;case 11:case 15:case 5:case 26:case 27:case 6:case 4:case 17:break;case 1:if(1024&e&&null!==i){e=void 0,n=t,a=i.memoizedProps,i=i.memoizedState,r=n.stateNode;try{var m=ks(n.type,a);e=r.getSnapshotBeforeUpdate(m,i),r.__reactInternalSnapshotBeforeUpdate=e}catch(y){Eu(n,n.return,y)}}break;case 3:if(1024&e)if(9===(n=(e=t.stateNode.containerInfo).nodeType))Pd(e);else if(1===n)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Pd(e);break;default:e.textContent=""}break;default:if(1024&e)throw Error(o(163))}if(null!==(e=t.sibling)){e.return=t.return,Al=e;break}Al=t.return}}(e,t)}finally{hc=s,M.p=a,D.T=r}}Ic=1,yu(),vu(),bu()}}function yu(){if(1===Ic){Ic=0;var e=zc,t=Bc,n=!!(13878&t.flags);if(13878&t.subtreeFlags||n){n=D.T,D.T=null;var r=M.p;M.p=2;var o=hc;hc|=4;try{ql(t,e);var a=gd,i=rr(e.containerInfo),s=a.focusedElem,l=a.selectionRange;if(i!==s&&s&&s.ownerDocument&&nr(s.ownerDocument.documentElement,s)){if(null!==l&&or(s)){var c=l.start,u=l.end;if(void 0===u&&(u=c),"selectionStart"in s)s.selectionStart=c,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var h=f.getSelection(),p=s.textContent.length,m=Math.min(l.start,p),g=void 0===l.end?m:Math.min(l.end,p);!h.extend&&m>g&&(i=g,g=m,m=i);var y=tr(s,m),v=tr(s,g);if(y&&v&&(1!==h.rangeCount||h.anchorNode!==y.node||h.anchorOffset!==y.offset||h.focusNode!==v.node||h.focusOffset!==v.offset)){var b=d.createRange();b.setStart(y.node,y.offset),h.removeAllRanges(),m>g?(h.addRange(b),h.extend(v.node,v.offset)):(b.setEnd(v.node,v.offset),h.addRange(b))}}}}for(d=[],h=s;h=h.parentNode;)1===h.nodeType&&d.push({element:h,left:h.scrollLeft,top:h.scrollTop});for("function"==typeof s.focus&&s.focus(),s=0;s<d.length;s++){var x=d[s];x.element.scrollLeft=x.left,x.element.scrollTop=x.top}}bf=!!md,gd=md=null}finally{hc=o,M.p=r,D.T=n}}e.current=t,Ic=2}}function vu(){if(2===Ic){Ic=0;var e=zc,t=Bc,n=!!(8772&t.flags);if(8772&t.subtreeFlags||n){n=D.T,D.T=null;var r=M.p;M.p=2;var o=hc;hc|=4;try{Dl(e,t.alternate,t)}finally{hc=o,M.p=r,D.T=n}}Ic=3}}function bu(){if(4===Ic||3===Ic){Ic=0,se();var e=zc,t=Bc,n=Uc,r=Hc;10256&t.subtreeFlags||10256&t.flags?Ic=5:(Ic=0,Bc=zc=null,xu(e,e.pendingLanes));var o=e.pendingLanes;if(0===o&&(Lc=null),Ie(n),t=t.stateNode,ve&&"function"==typeof ve.onCommitFiberRoot)try{ve.onCommitFiberRoot(ye,t,void 0,!(128&~t.current.flags))}catch(Fc){}if(null!==r){t=D.T,o=M.p,M.p=2,D.T=null;try{for(var a=e.onRecoverableError,i=0;i<r.length;i++){var s=r[i];a(s.value,{componentStack:s.stack})}}finally{D.T=t,M.p=o}}3&Uc&&wu(),Lu(e),o=e.pendingLanes,261930&n&&42&o?e===Wc?qc++:(qc=0,Wc=e):qc=0,Iu(0,!1)}}function xu(e,t){0===(e.pooledCacheLanes&=t)&&(null!=(t=e.pooledCache)&&(e.pooledCache=null,Uo(t)))}function wu(){return yu(),vu(),bu(),Su()}function Su(){if(5!==Ic)return!1;var e=zc,t=Vc;Vc=0;var n=Ie(Uc),r=D.T,a=M.p;try{M.p=32>n?32:n,D.T=null,n=$c,$c=null;var i=zc,s=Uc;if(Ic=0,Bc=zc=null,Uc=0,6&hc)throw Error(o(331));var l=hc;if(hc|=4,lc(i.current),ec(i,i.current,s,n),hc=l,Iu(0,!1),ve&&"function"==typeof ve.onPostCommitFiberRoot)try{ve.onPostCommitFiberRoot(ye,i)}catch(Fc){}return!0}finally{M.p=a,D.T=r,xu(e,t)}}function ku(e,t,n){t=Gr(n,t),null!==(e=xa(e,t=Rs(e.stateNode,t,2),2))&&(_e(e,2),Lu(e))}function Eu(e,t,n){if(3===e.tag)ku(e,e,n);else for(;null!==t;){if(3===t.tag){ku(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===Lc||!Lc.has(r))){e=Gr(n,e),null!==(r=xa(t,n=Ps(2),2))&&(Os(n,r,t,e),_e(r,2),Lu(r));break}}t=t.return}}function Cu(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new fc;var o=new Set;r.set(t,o)}else void 0===(o=r.get(t))&&(o=new Set,r.set(t,o));o.has(n)||(wc=!0,o.add(n),e=Nu.bind(null,e,t,n),t.then(e,e))}function Nu(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,pc===e&&(gc&n)===n&&(4===kc||3===kc&&(62914560&gc)===gc&&300>le()-_c?!(2&hc)&&nu(e,0):Nc|=n,jc===gc&&(jc=0)),Lu(e)}function Tu(e,t){0===t&&(t=Pe()),null!==(e=Ar(e,t))&&(_e(e,t),Lu(e))}function ju(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Tu(e,n)}function Ru(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;null!==a&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(o(314))}null!==r&&r.delete(t),Tu(e,n)}var Pu=null,Ou=null,_u=!1,Au=!1,Du=!1,Mu=0;function Lu(e){e!==Ou&&null===e.next&&(null===Ou?Pu=Ou=e:Ou=Ou.next=e),Au=!0,_u||(_u=!0,Cd(function(){6&hc?oe(ue,zu):Fu()}))}function Iu(e,t){if(!Du&&Au){Du=!0;do{for(var n=!1,r=Pu;null!==r;){if(!t)if(0!==e){var o=r.pendingLanes;if(0===o)var a=0;else{var i=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-xe(42|e)+1)-1,a=201326741&(a&=o&~(i&~s))?201326741&a|1:a?2|a:0}0!==a&&(n=!0,Vu(r,a))}else a=gc,!(3&(a=Te(r,r===pc?a:0,null!==r.cancelPendingCommit||-1!==r.timeoutHandle)))||je(r,a)||(n=!0,Vu(r,a));r=r.next}}while(n);Du=!1}}function zu(){Fu()}function Fu(){Au=_u=!1;var e=0;0!==Mu&&function(){var e=window.event;if(e&&"popstate"===e.type)return e!==wd&&(wd=e,!0);return wd=null,!1}()&&(e=Mu);for(var t=le(),n=null,r=Pu;null!==r;){var o=r.next,a=Bu(r,t);0===a?(r.next=null,null===n?Pu=o:n.next=o,null===o&&(Ou=n)):(n=r,(0!==e||3&a)&&(Au=!0)),r=o}0!==Ic&&5!==Ic||Iu(e,!1),0!==Mu&&(Mu=0)}function Bu(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,a=-62914561&e.pendingLanes;0<a;){var i=31-xe(a),s=1<<i,l=o[i];-1===l?0!==(s&n)&&0===(s&r)||(o[i]=Re(s,t)):l<=t&&(e.expiredLanes|=s),a&=~s}if(n=gc,n=Te(e,e===(t=pc)?n:0,null!==e.cancelPendingCommit||-1!==e.timeoutHandle),r=e.callbackNode,0===n||e===t&&(2===yc||9===yc)||null!==e.cancelPendingCommit)return null!==r&&null!==r&&ae(r),e.callbackNode=null,e.callbackPriority=0;if(!(3&n)||je(e,n)){if((t=n&-n)===e.callbackPriority)return t;switch(null!==r&&ae(r),Ie(n)){case 2:case 8:n=de;break;case 32:default:n=fe;break;case 268435456:n=pe}return r=Uu.bind(null,e),n=oe(n,r),e.callbackPriority=t,e.callbackNode=n,t}return null!==r&&null!==r&&ae(r),e.callbackPriority=2,e.callbackNode=null,2}function Uu(e,t){if(0!==Ic&&5!==Ic)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(wu()&&e.callbackNode!==n)return null;var r=gc;return 0===(r=Te(e,e===pc?r:0,null!==e.cancelPendingCommit||-1!==e.timeoutHandle))?null:(Qc(e,r,t),Bu(e,le()),null!=e.callbackNode&&e.callbackNode===n?Uu.bind(null,e):null)}function Vu(e,t){if(wu())return null;Qc(e,t,!0)}function $u(){if(0===Mu){var e=Ho;0===e&&(e=ke,!(261888&(ke<<=1))&&(ke=256)),Mu=e}return Mu}function Hu(e){return null==e||"symbol"==typeof e||"boolean"==typeof e?null:"function"==typeof e?e:Ot(""+e)}function qu(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}for(var Wu=0;Wu<Er.length;Wu++){var Ku=Er[Wu];Cr(Ku.toLowerCase(),"on"+(Ku[0].toUpperCase()+Ku.slice(1)))}Cr(gr,"onAnimationEnd"),Cr(yr,"onAnimationIteration"),Cr(vr,"onAnimationStart"),Cr("dblclick","onDoubleClick"),Cr("focusin","onFocus"),Cr("focusout","onBlur"),Cr(br,"onTransitionRun"),Cr(xr,"onTransitionStart"),Cr(wr,"onTransitionCancel"),Cr(Sr,"onTransitionEnd"),ot("onMouseEnter",["mouseout","mouseover"]),ot("onMouseLeave",["mouseout","mouseover"]),ot("onPointerEnter",["pointerout","pointerover"]),ot("onPointerLeave",["pointerout","pointerover"]),rt("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),rt("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),rt("onBeforeInput",["compositionend","keypress","textInput","paste"]),rt("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),rt("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),rt("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Gu="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(" "),Yu=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Gu));function Qu(e,t){t=!!(4&t);for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var a=void 0;if(t)for(var i=r.length-1;0<=i;i--){var s=r[i],l=s.instance,c=s.currentTarget;if(s=s.listener,l!==a&&o.isPropagationStopped())break e;a=s,o.currentTarget=c;try{a(o)}catch(u){Nr(u)}o.currentTarget=null,a=l}else for(i=0;i<r.length;i++){if(l=(s=r[i]).instance,c=s.currentTarget,s=s.listener,l!==a&&o.isPropagationStopped())break e;a=s,o.currentTarget=c;try{a(o)}catch(u){Nr(u)}o.currentTarget=null,a=l}}}}function Xu(e,t){var n=t[He];void 0===n&&(n=t[He]=new Set);var r=e+"__bubble";n.has(r)||(td(t,e,2,!1),n.add(r))}function Ju(e,t,n){var r=0;t&&(r|=4),td(n,e,r,t)}var Zu="_reactListening"+Math.random().toString(36).slice(2);function ed(e){if(!e[Zu]){e[Zu]=!0,tt.forEach(function(t){"selectionchange"!==t&&(Yu.has(t)||Ju(t,!1,e),Ju(t,!0,e))});var t=9===e.nodeType?e:e.ownerDocument;null===t||t[Zu]||(t[Zu]=!0,Ju("selectionchange",!1,t))}}function td(e,t,n,r){switch(Nf(t)){case 2:var o=xf;break;case 8:o=wf;break;default:o=Sf}n=o.bind(null,t,n,e),o=void 0,!Vt||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(o=!0),r?void 0!==o?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):void 0!==o?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function nd(e,t,n,r,o){var i=r;if(!(1&t||2&t||null===r))e:for(;;){if(null===r)return;var s=r.tag;if(3===s||4===s){var l=r.stateNode.containerInfo;if(l===o)break;if(4===s)for(s=r.return;null!==s;){var c=s.tag;if((3===c||4===c)&&s.stateNode.containerInfo===o)return;s=s.return}for(;null!==l;){if(null===(s=Qe(l)))return;if(5===(c=s.tag)||6===c||26===c||27===c){r=i=s;continue e}l=l.parentNode}}r=r.return}Ft(function(){var r=i,o=Dt(n),s=[];e:{var l=kr.get(e);if(void 0!==l){var c=nn,u=e;switch(e){case"keypress":if(0===Gt(n))break e;case"keydown":case"keyup":c=vn;break;case"focusin":u="focus",c=cn;break;case"focusout":u="blur",c=cn;break;case"beforeblur":case"afterblur":c=cn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":c=sn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":c=ln;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":c=xn;break;case gr:case yr:case vr:c=un;break;case Sr:c=wn;break;case"scroll":case"scrollend":c=on;break;case"wheel":c=Sn;break;case"copy":case"cut":case"paste":c=dn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":c=bn;break;case"toggle":case"beforetoggle":c=kn}var d=!!(4&t),f=!d&&("scroll"===e||"scrollend"===e),h=d?null!==l?l+"Capture":null:l;d=[];for(var p,m=r;null!==m;){var g=m;if(p=g.stateNode,5!==(g=g.tag)&&26!==g&&27!==g||null===p||null===h||null!=(g=Bt(m,h))&&d.push(rd(m,g,p)),f)break;m=m.return}0<d.length&&(l=new c(l,u,null,n,o),s.push({event:l,listeners:d}))}}if(!(7&t)){if(c="mouseout"===e||"pointerout"===e,(!(l="mouseover"===e||"pointerover"===e)||n===At||!(u=n.relatedTarget||n.fromElement)||!Qe(u)&&!u[$e])&&(c||l)&&(l=o.window===o?o:(l=o.ownerDocument)?l.defaultView||l.parentWindow:window,c?(c=r,null!==(u=(u=n.relatedTarget||n.toElement)?Qe(u):null)&&(f=a(u),d=u.tag,u!==f||5!==d&&27!==d&&6!==d)&&(u=null)):(c=null,u=r),c!==u)){if(d=sn,g="onMouseLeave",h="onMouseEnter",m="mouse","pointerout"!==e&&"pointerover"!==e||(d=bn,g="onPointerLeave",h="onPointerEnter",m="pointer"),f=null==c?l:Je(c),p=null==u?l:Je(u),(l=new d(g,m+"leave",c,n,o)).target=f,l.relatedTarget=p,g=null,Qe(o)===r&&((d=new d(h,m+"enter",u,n,o)).target=p,d.relatedTarget=f,g=d),f=g,c&&u)e:{for(d=ad,m=u,p=0,g=h=c;g;g=d(g))p++;g=0;for(var y=m;y;y=d(y))g++;for(;0<p-g;)h=d(h),p--;for(;0<g-p;)m=d(m),g--;for(;p--;){if(h===m||null!==m&&h===m.alternate){d=h;break e}h=d(h),m=d(m)}d=null}else d=null;null!==c&&id(s,l,c,d,!1),null!==u&&null!==f&&id(s,f,u,d,!0)}if("select"===(c=(l=r?Je(r):window).nodeName&&l.nodeName.toLowerCase())||"input"===c&&"file"===l.type)var v=Un;else if(Mn(l))if(Vn)v=Xn;else{v=Yn;var b=Gn}else!(c=l.nodeName)||"input"!==c.toLowerCase()||"checkbox"!==l.type&&"radio"!==l.type?r&&jt(r.elementType)&&(v=Un):v=Qn;switch(v&&(v=v(e,r))?Ln(s,v,n,o):(b&&b(e,l,r),"focusout"===e&&r&&"number"===l.type&&null!=r.memoizedProps.value&&xt(l,"number",l.value)),b=r?Je(r):window,e){case"focusin":(Mn(b)||"true"===b.contentEditable)&&(ir=b,sr=r,lr=null);break;case"focusout":lr=sr=ir=null;break;case"mousedown":cr=!0;break;case"contextmenu":case"mouseup":case"dragend":cr=!1,ur(s,n,o);break;case"selectionchange":if(ar)break;case"keydown":case"keyup":ur(s,n,o)}var x;if(Cn)e:{switch(e){case"compositionstart":var w="onCompositionStart";break e;case"compositionend":w="onCompositionEnd";break e;case"compositionupdate":w="onCompositionUpdate";break e}w=void 0}else An?On(e,n)&&(w="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(w="onCompositionStart");w&&(jn&&"ko"!==n.locale&&(An||"onCompositionStart"!==w?"onCompositionEnd"===w&&An&&(x=Kt()):(qt="value"in(Ht=o)?Ht.value:Ht.textContent,An=!0)),0<(b=od(r,w)).length&&(w=new fn(w,e,null,n,o),s.push({event:w,listeners:b}),x?w.data=x:null!==(x=_n(n))&&(w.data=x))),(x=Tn?function(e,t){switch(e){case"compositionend":return _n(t);case"keypress":return 32!==t.which?null:(Pn=!0,Rn);case"textInput":return(e=t.data)===Rn&&Pn?null:e;default:return null}}(e,n):function(e,t){if(An)return"compositionend"===e||!Cn&&On(e,t)?(e=Kt(),Wt=qt=Ht=null,An=!1,e):null;switch(e){case"paste":default: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 jn&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(w=od(r,"onBeforeInput")).length&&(b=new fn("onBeforeInput","beforeinput",null,n,o),s.push({event:b,listeners:w}),b.data=x)),function(e,t,n,r,o){if("submit"===t&&n&&n.stateNode===o){var a=Hu((o[Ve]||null).action),i=r.submitter;i&&null!==(t=(t=i[Ve]||null)?Hu(t.formAction):i.getAttribute("formAction"))&&(a=t,i=null);var s=new nn("action","action",null,r,o);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(0!==Mu){var e=i?qu(o,i):new FormData(o);ts(n,{pending:!0,data:e,method:o.method,action:a},null,e)}}else"function"==typeof a&&(s.preventDefault(),e=i?qu(o,i):new FormData(o),ts(n,{pending:!0,data:e,method:o.method,action:a},a,e))},currentTarget:o}]})}}(s,e,r,n,o)}Qu(s,t)})}function rd(e,t,n){return{instance:e,listener:t,currentTarget:n}}function od(e,t){for(var n=t+"Capture",r=[];null!==e;){var o=e,a=o.stateNode;if(5!==(o=o.tag)&&26!==o&&27!==o||null===a||(null!=(o=Bt(e,n))&&r.unshift(rd(e,o,a)),null!=(o=Bt(e,t))&&r.push(rd(e,o,a))),3===e.tag)return r;e=e.return}return[]}function ad(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag&&27!==e.tag);return e||null}function id(e,t,n,r,o){for(var a=t._reactName,i=[];null!==n&&n!==r;){var s=n,l=s.alternate,c=s.stateNode;if(s=s.tag,null!==l&&l===r)break;5!==s&&26!==s&&27!==s||null===c||(l=c,o?null!=(c=Bt(n,a))&&i.unshift(rd(n,c,l)):o||null!=(c=Bt(n,a))&&i.push(rd(n,c,l))),n=n.return}0!==i.length&&e.push({event:t,listeners:i})}var sd=/\r\n?/g,ld=/\u0000|\uFFFD/g;function cd(e){return("string"==typeof e?e:""+e).replace(sd,"\n").replace(ld,"")}function ud(e,t){return t=cd(t),cd(e)===t}function dd(e,t,n,r,a,i){switch(n){case"children":"string"==typeof r?"body"===t||"textarea"===t&&""===r||Et(e,r):("number"==typeof r||"bigint"==typeof r)&&"body"!==t&&Et(e,""+r);break;case"className":ct(e,"class",r);break;case"tabIndex":ct(e,"tabindex",r);break;case"dir":case"role":case"viewBox":case"width":case"height":ct(e,n,r);break;case"style":Tt(e,r,i);break;case"data":if("object"!==t){ct(e,"data",r);break}case"src":case"href":if(""===r&&("a"!==t||"href"!==n)){e.removeAttribute(n);break}if(null==r||"function"==typeof r||"symbol"==typeof r||"boolean"==typeof r){e.removeAttribute(n);break}r=Ot(""+r),e.setAttribute(n,r);break;case"action":case"formAction":if("function"==typeof r){e.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}if("function"==typeof i&&("formAction"===n?("input"!==t&&dd(e,t,"name",a.name,a,null),dd(e,t,"formEncType",a.formEncType,a,null),dd(e,t,"formMethod",a.formMethod,a,null),dd(e,t,"formTarget",a.formTarget,a,null)):(dd(e,t,"encType",a.encType,a,null),dd(e,t,"method",a.method,a,null),dd(e,t,"target",a.target,a,null))),null==r||"symbol"==typeof r||"boolean"==typeof r){e.removeAttribute(n);break}r=Ot(""+r),e.setAttribute(n,r);break;case"onClick":null!=r&&(e.onclick=_t);break;case"onScroll":null!=r&&Xu("scroll",e);break;case"onScrollEnd":null!=r&&Xu("scrollend",e);break;case"dangerouslySetInnerHTML":if(null!=r){if("object"!=typeof r||!("__html"in r))throw Error(o(61));if(null!=(n=r.__html)){if(null!=a.children)throw Error(o(60));e.innerHTML=n}}break;case"multiple":e.multiple=r&&"function"!=typeof r&&"symbol"!=typeof r;break;case"muted":e.muted=r&&"function"!=typeof r&&"symbol"!=typeof r;break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":case"autoFocus":break;case"xlinkHref":if(null==r||"function"==typeof r||"boolean"==typeof r||"symbol"==typeof r){e.removeAttribute("xlink:href");break}n=Ot(""+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":null!=r&&"function"!=typeof r&&"symbol"!=typeof r?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&&"function"!=typeof r&&"symbol"!=typeof r?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":!0===r?e.setAttribute(n,""):!1!==r&&null!=r&&"function"!=typeof r&&"symbol"!=typeof r?e.setAttribute(n,r):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":null!=r&&"function"!=typeof r&&"symbol"!=typeof r&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case"rowSpan":case"start":null==r||"function"==typeof r||"symbol"==typeof r||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case"popover":Xu("beforetoggle",e),Xu("toggle",e),lt(e,"popover",r);break;case"xlinkActuate":ut(e,"http://www.w3.org/1999/xlink","xlink:actuate",r);break;case"xlinkArcrole":ut(e,"http://www.w3.org/1999/xlink","xlink:arcrole",r);break;case"xlinkRole":ut(e,"http://www.w3.org/1999/xlink","xlink:role",r);break;case"xlinkShow":ut(e,"http://www.w3.org/1999/xlink","xlink:show",r);break;case"xlinkTitle":ut(e,"http://www.w3.org/1999/xlink","xlink:title",r);break;case"xlinkType":ut(e,"http://www.w3.org/1999/xlink","xlink:type",r);break;case"xmlBase":ut(e,"http://www.w3.org/XML/1998/namespace","xml:base",r);break;case"xmlLang":ut(e,"http://www.w3.org/XML/1998/namespace","xml:lang",r);break;case"xmlSpace":ut(e,"http://www.w3.org/XML/1998/namespace","xml:space",r);break;case"is":lt(e,"is",r);break;case"innerText":case"textContent":break;default:(!(2<n.length)||"o"!==n[0]&&"O"!==n[0]||"n"!==n[1]&&"N"!==n[1])&<(e,n=Rt.get(n)||n,r)}}function fd(e,t,n,r,a,i){switch(n){case"style":Tt(e,r,i);break;case"dangerouslySetInnerHTML":if(null!=r){if("object"!=typeof r||!("__html"in r))throw Error(o(61));if(null!=(n=r.__html)){if(null!=a.children)throw Error(o(60));e.innerHTML=n}}break;case"children":"string"==typeof r?Et(e,r):("number"==typeof r||"bigint"==typeof r)&&Et(e,""+r);break;case"onScroll":null!=r&&Xu("scroll",e);break;case"onScrollEnd":null!=r&&Xu("scrollend",e);break;case"onClick":null!=r&&(e.onclick=_t);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":case"innerText":case"textContent":break;default:nt.hasOwnProperty(n)||("o"!==n[0]||"n"!==n[1]||(a=n.endsWith("Capture"),t=n.slice(2,a?n.length-7:void 0),"function"==typeof(i=null!=(i=e[Ve]||null)?i[n]:null)&&e.removeEventListener(t,i,a),"function"!=typeof r)?n in e?e[n]=r:!0===r?e.setAttribute(n,""):lt(e,n,r):("function"!=typeof i&&null!==i&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a)))}}function hd(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Xu("error",e),Xu("load",e);var r,a=!1,i=!1;for(r in n)if(n.hasOwnProperty(r)){var s=n[r];if(null!=s)switch(r){case"src":a=!0;break;case"srcSet":i=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:dd(e,t,r,s,n,null)}}return i&&dd(e,t,"srcSet",n.srcSet,n,null),void(a&&dd(e,t,"src",n.src,n,null));case"input":Xu("invalid",e);var l=r=s=i=null,c=null,u=null;for(a in n)if(n.hasOwnProperty(a)){var d=n[a];if(null!=d)switch(a){case"name":i=d;break;case"type":s=d;break;case"checked":c=d;break;case"defaultChecked":u=d;break;case"value":r=d;break;case"defaultValue":l=d;break;case"children":case"dangerouslySetInnerHTML":if(null!=d)throw Error(o(137,t));break;default:dd(e,t,a,d,n,null)}}return void bt(e,r,l,c,u,s,i,!1);case"select":for(i in Xu("invalid",e),a=s=r=null,n)if(n.hasOwnProperty(i)&&null!=(l=n[i]))switch(i){case"value":r=l;break;case"defaultValue":s=l;break;case"multiple":a=l;default:dd(e,t,i,l,n,null)}return t=r,n=s,e.multiple=!!a,void(null!=t?wt(e,!!a,t,!1):null!=n&&wt(e,!!a,n,!0));case"textarea":for(s in Xu("invalid",e),r=i=a=null,n)if(n.hasOwnProperty(s)&&null!=(l=n[s]))switch(s){case"value":a=l;break;case"defaultValue":i=l;break;case"children":r=l;break;case"dangerouslySetInnerHTML":if(null!=l)throw Error(o(91));break;default:dd(e,t,s,l,n,null)}return void kt(e,a,i,r);case"option":for(c in n)if(n.hasOwnProperty(c)&&null!=(a=n[c]))if("selected"===c)e.selected=a&&"function"!=typeof a&&"symbol"!=typeof a;else dd(e,t,c,a,n,null);return;case"dialog":Xu("beforetoggle",e),Xu("toggle",e),Xu("cancel",e),Xu("close",e);break;case"iframe":case"object":Xu("load",e);break;case"video":case"audio":for(a=0;a<Gu.length;a++)Xu(Gu[a],e);break;case"image":Xu("error",e),Xu("load",e);break;case"details":Xu("toggle",e);break;case"embed":case"source":case"link":Xu("error",e),Xu("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)&&null!=(a=n[u]))switch(u){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:dd(e,t,u,a,n,null)}return;default:if(jt(t)){for(d in n)n.hasOwnProperty(d)&&(void 0!==(a=n[d])&&fd(e,t,d,a,n,void 0));return}}for(l in n)n.hasOwnProperty(l)&&(null!=(a=n[l])&&dd(e,t,l,a,n,null))}function pd(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}var md=null,gd=null;function yd(e){return 9===e.nodeType?e:e.ownerDocument}function vd(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 bd(e,t){if(0===e)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return 1===e&&"foreignObject"===t?0:e}function xd(e,t){return"textarea"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"bigint"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var wd=null;var Sd="function"==typeof setTimeout?setTimeout:void 0,kd="function"==typeof clearTimeout?clearTimeout:void 0,Ed="function"==typeof Promise?Promise:void 0,Cd="function"==typeof queueMicrotask?queueMicrotask:void 0!==Ed?function(e){return Ed.resolve(null).then(e).catch(Nd)}:Sd;function Nd(e){setTimeout(function(){throw e})}function Td(e){return"head"===e}function jd(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&8===o.nodeType)if("/$"===(n=o.data)||"/&"===n){if(0===r)return e.removeChild(o),void Hf(t);r--}else if("$"===n||"$?"===n||"$~"===n||"$!"===n||"&"===n)r++;else if("html"===n)Fd(e.ownerDocument.documentElement);else if("head"===n){Fd(n=e.ownerDocument.head);for(var a=n.firstChild;a;){var i=a.nextSibling,s=a.nodeName;a[Ge]||"SCRIPT"===s||"STYLE"===s||"LINK"===s&&"stylesheet"===a.rel.toLowerCase()||n.removeChild(a),a=i}}else"body"===n&&Fd(e.ownerDocument.body);n=o}while(n);Hf(t)}function Rd(e,t){var n=e;e=0;do{var r=n.nextSibling;if(1===n.nodeType?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",""===n.getAttribute("style")&&n.removeAttribute("style")):3===n.nodeType&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),r&&8===r.nodeType)if("/$"===(n=r.data)){if(0===e)break;e--}else"$"!==n&&"$?"!==n&&"$~"!==n&&"$!"!==n||e++;n=r}while(n)}function Pd(e){var t=e.firstChild;for(t&&10===t.nodeType&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":Pd(n),Ye(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if("stylesheet"===n.rel.toLowerCase())continue}e.removeChild(n)}}function Od(e,t){for(;8!==e.nodeType;){if((1!==e.nodeType||"INPUT"!==e.nodeName||"hidden"!==e.type)&&!t)return null;if(null===(e=Dd(e.nextSibling)))return null}return e}function _d(e){return"$?"===e.data||"$~"===e.data}function Ad(e){return"$!"===e.data||"$?"===e.data&&"loading"!==e.ownerDocument.readyState}function Dd(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t||"$~"===t||"&"===t||"F!"===t||"F"===t)break;if("/$"===t||"/&"===t)return null}}return e}var Md=null;function Ld(e){e=e.nextSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n||"/&"===n){if(0===t)return Dd(e.nextSibling);t--}else"$"!==n&&"$!"!==n&&"$?"!==n&&"$~"!==n&&"&"!==n||t++}e=e.nextSibling}return null}function Id(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n||"$~"===n||"&"===n){if(0===t)return e;t--}else"/$"!==n&&"/&"!==n||t++}e=e.previousSibling}return null}function zd(e,t,n){switch(t=yd(n),e){case"html":if(!(e=t.documentElement))throw Error(o(452));return e;case"head":if(!(e=t.head))throw Error(o(453));return e;case"body":if(!(e=t.body))throw Error(o(454));return e;default:throw Error(o(451))}}function Fd(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Ye(e)}var Bd=new Map,Ud=new Set;function Vd(e){return"function"==typeof e.getRootNode?e.getRootNode():9===e.nodeType?e:e.ownerDocument}var $d=M.d;M.d={f:function(){var e=$d.f(),t=eu();return e||t},r:function(e){var t=Xe(e);null!==t&&5===t.tag&&"form"===t.type?rs(t):$d.r(e)},D:function(e){$d.D(e),qd("dns-prefetch",e,null)},C:function(e,t){$d.C(e,t),qd("preconnect",e,t)},L:function(e,t,n){$d.L(e,t,n);var r=Hd;if(r&&e&&t){var o='link[rel="preload"][as="'+yt(t)+'"]';"image"===t&&n&&n.imageSrcSet?(o+='[imagesrcset="'+yt(n.imageSrcSet)+'"]',"string"==typeof n.imageSizes&&(o+='[imagesizes="'+yt(n.imageSizes)+'"]')):o+='[href="'+yt(e)+'"]';var a=o;switch(t){case"style":a=Kd(e);break;case"script":a=Qd(e)}Bd.has(a)||(e=u({rel:"preload",href:"image"===t&&n&&n.imageSrcSet?void 0:e,as:t},n),Bd.set(a,e),null!==r.querySelector(o)||"style"===t&&r.querySelector(Gd(a))||"script"===t&&r.querySelector(Xd(a))||(hd(t=r.createElement("link"),"link",e),et(t),r.head.appendChild(t)))}},m:function(e,t){$d.m(e,t);var n=Hd;if(n&&e){var r=t&&"string"==typeof t.as?t.as:"script",o='link[rel="modulepreload"][as="'+yt(r)+'"][href="'+yt(e)+'"]',a=o;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":a=Qd(e)}if(!Bd.has(a)&&(e=u({rel:"modulepreload",href:e},t),Bd.set(a,e),null===n.querySelector(o))){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Xd(a)))return}hd(r=n.createElement("link"),"link",e),et(r),n.head.appendChild(r)}}},X:function(e,t){$d.X(e,t);var n=Hd;if(n&&e){var r=Ze(n).hoistableScripts,o=Qd(e),a=r.get(o);a||((a=n.querySelector(Xd(o)))||(e=u({src:e,async:!0},t),(t=Bd.get(o))&&tf(e,t),et(a=n.createElement("script")),hd(a,"link",e),n.head.appendChild(a)),a={type:"script",instance:a,count:1,state:null},r.set(o,a))}},S:function(e,t,n){$d.S(e,t,n);var r=Hd;if(r&&e){var o=Ze(r).hoistableStyles,a=Kd(e);t=t||"default";var i=o.get(a);if(!i){var s={loading:0,preload:null};if(i=r.querySelector(Gd(a)))s.loading=5;else{e=u({rel:"stylesheet",href:e,"data-precedence":t},n),(n=Bd.get(a))&&ef(e,n);var l=i=r.createElement("link");et(l),hd(l,"link",e),l._p=new Promise(function(e,t){l.onload=e,l.onerror=t}),l.addEventListener("load",function(){s.loading|=1}),l.addEventListener("error",function(){s.loading|=2}),s.loading|=4,Zd(i,t,r)}i={type:"stylesheet",instance:i,count:1,state:s},o.set(a,i)}}},M:function(e,t){$d.M(e,t);var n=Hd;if(n&&e){var r=Ze(n).hoistableScripts,o=Qd(e),a=r.get(o);a||((a=n.querySelector(Xd(o)))||(e=u({src:e,async:!0,type:"module"},t),(t=Bd.get(o))&&tf(e,t),et(a=n.createElement("script")),hd(a,"link",e),n.head.appendChild(a)),a={type:"script",instance:a,count:1,state:null},r.set(o,a))}}};var Hd="undefined"==typeof document?null:document;function qd(e,t,n){var r=Hd;if(r&&"string"==typeof t&&t){var o=yt(t);o='link[rel="'+e+'"][href="'+o+'"]',"string"==typeof n&&(o+='[crossorigin="'+n+'"]'),Ud.has(o)||(Ud.add(o),e={rel:e,crossOrigin:n,href:t},null===r.querySelector(o)&&(hd(t=r.createElement("link"),"link",e),et(t),r.head.appendChild(t)))}}function Wd(e,t,n,r){var a,i,s,l,c=(c=W.current)?Vd(c):null;if(!c)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return"string"==typeof n.precedence&&"string"==typeof n.href?(t=Kd(n.href),(r=(n=Ze(c).hoistableStyles).get(t))||(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("stylesheet"===n.rel&&"string"==typeof n.href&&"string"==typeof n.precedence){e=Kd(n.href);var u=Ze(c).hoistableStyles,d=u.get(e);if(d||(c=c.ownerDocument||c,d={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(e,d),(u=c.querySelector(Gd(e)))&&!u._p&&(d.instance=u,d.state.loading=5),Bd.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},Bd.set(e,n),u||(a=c,i=e,s=n,l=d.state,a.querySelector('link[rel="preload"][as="style"]['+i+"]")?l.loading=1:(i=a.createElement("link"),l.preload=i,i.addEventListener("load",function(){return l.loading|=1}),i.addEventListener("error",function(){return l.loading|=2}),hd(i,"link",s),et(i),a.head.appendChild(i))))),t&&null===r)throw Error(o(528,""));return d}if(t&&null!==r)throw Error(o(529,""));return null;case"script":return t=n.async,"string"==typeof(n=n.src)&&t&&"function"!=typeof t&&"symbol"!=typeof t?(t=Qd(n),(r=(n=Ze(c).hoistableScripts).get(t))||(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(o(444,e))}}function Kd(e){return'href="'+yt(e)+'"'}function Gd(e){return'link[rel="stylesheet"]['+e+"]"}function Yd(e){return u({},e,{"data-precedence":e.precedence,precedence:null})}function Qd(e){return'[src="'+yt(e)+'"]'}function Xd(e){return"script[async]"+e}function Jd(e,t,n){if(t.count++,null===t.instance)switch(t.type){case"style":var r=e.querySelector('style[data-href~="'+yt(n.href)+'"]');if(r)return t.instance=r,et(r),r;var a=u({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return et(r=(e.ownerDocument||e).createElement("style")),hd(r,"style",a),Zd(r,n.precedence,e),t.instance=r;case"stylesheet":a=Kd(n.href);var i=e.querySelector(Gd(a));if(i)return t.state.loading|=4,t.instance=i,et(i),i;r=Yd(n),(a=Bd.get(a))&&ef(r,a),et(i=(e.ownerDocument||e).createElement("link"));var s=i;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),hd(i,"link",r),t.state.loading|=4,Zd(i,n.precedence,e),t.instance=i;case"script":return i=Qd(n.src),(a=e.querySelector(Xd(i)))?(t.instance=a,et(a),a):(r=n,(a=Bd.get(i))&&tf(r=u({},n),a),et(a=(e=e.ownerDocument||e).createElement("script")),hd(a,"link",r),e.head.appendChild(a),t.instance=a);case"void":return null;default:throw Error(o(443,t.type))}else"stylesheet"===t.type&&!(4&t.state.loading)&&(r=t.instance,t.state.loading|=4,Zd(r,n.precedence,e));return t.instance}function Zd(e,t,n){for(var r=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),o=r.length?r[r.length-1]:null,a=o,i=0;i<r.length;i++){var s=r[i];if(s.dataset.precedence===t)a=s;else if(a!==o)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=9===n.nodeType?n.head:n).insertBefore(e,t.firstChild)}function ef(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function tf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var nf=null;function rf(e,t,n){if(null===nf){var r=new Map,o=nf=new Map;o.set(n,r)}else(r=(o=nf).get(n))||(r=new Map,o.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),o=0;o<n.length;o++){var a=n[o];if(!(a[Ge]||a[Ue]||"link"===e&&"stylesheet"===a.getAttribute("rel"))&&"http://www.w3.org/2000/svg"!==a.namespaceURI){var i=a.getAttribute(t)||"";i=e+i;var s=r.get(i);s?s.push(a):r.set(i,[a])}}return r}function of(e,t,n){(e=e.ownerDocument||e).head.insertBefore(n,"title"===t?e.querySelector("head > title"):null)}function af(e){return!!("stylesheet"!==e.type||3&e.state.loading)}var sf=0;function lf(){if(this.count--,0===this.count&&(0===this.imgCount||!this.waitingForImages))if(this.stylesheets)uf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}var cf=null;function uf(e,t){e.stylesheets=null,null!==e.unsuspend&&(e.count++,cf=new Map,t.forEach(df,e),cf=null,lf.call(e))}function df(e,t){if(!(4&t.state.loading)){var n=cf.get(e);if(n)var r=n.get(null);else{n=new Map,cf.set(e,n);for(var o=e.querySelectorAll("link[data-precedence],style[data-precedence]"),a=0;a<o.length;a++){var i=o[a];"LINK"!==i.nodeName&&"not all"===i.getAttribute("media")||(n.set(i.dataset.precedence,i),r=i)}r&&n.set(null,r)}i=(o=t.instance).getAttribute("data-precedence"),(a=n.get(i)||r)===r&&n.set(null,o),n.set(i,o),this.count++,r=lf.bind(this),o.addEventListener("load",r),o.addEventListener("error",r),a?a.parentNode.insertBefore(o,a.nextSibling):(e=9===e.nodeType?e.head:e).insertBefore(o,e.firstChild),t.state.loading|=4}}var ff={$$typeof:w,Provider:null,Consumer:null,_currentValue:L,_currentValue2:L,_threadCount:0};function hf(e,t,n,r,o,a,i,s,l){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=Oe(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Oe(0),this.hiddenUpdates=Oe(null),this.identifierPrefix=r,this.onUncaughtError=o,this.onCaughtError=a,this.onRecoverableError=i,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=l,this.incompleteTransitions=new Map}function pf(e,t,n,r,o,a){o=function(e){return e?e=Lr:Lr}(o),null===r.context?r.context=o:r.pendingContext=o,(r=ba(t)).payload={element:n},null!==(a=void 0===a?null:a)&&(r.callback=a),null!==(n=xa(e,r,t))&&(Yc(n,0,t),wa(n,e,t))}function mf(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function gf(e,t){mf(e,t),(e=e.alternate)&&mf(e,t)}function yf(e){if(13===e.tag||31===e.tag){var t=Ar(e,67108864);null!==t&&Yc(t,0,67108864),gf(e,67108864)}}function vf(e){if(13===e.tag||31===e.tag){var t=Kc(),n=Ar(e,t=Le(t));null!==n&&Yc(n,0,t),gf(e,t)}}var bf=!0;function xf(e,t,n,r){var o=D.T;D.T=null;var a=M.p;try{M.p=2,Sf(e,t,n,r)}finally{M.p=a,D.T=o}}function wf(e,t,n,r){var o=D.T;D.T=null;var a=M.p;try{M.p=8,Sf(e,t,n,r)}finally{M.p=a,D.T=o}}function Sf(e,t,n,r){if(bf){var o=kf(r);if(null===o)nd(e,t,r,Ef,n),Mf(e,r);else if(function(e,t,n,r,o){switch(t){case"focusin":return jf=Lf(jf,e,t,n,r,o),!0;case"dragenter":return Rf=Lf(Rf,e,t,n,r,o),!0;case"mouseover":return Pf=Lf(Pf,e,t,n,r,o),!0;case"pointerover":var a=o.pointerId;return Of.set(a,Lf(Of.get(a)||null,e,t,n,r,o)),!0;case"gotpointercapture":return a=o.pointerId,_f.set(a,Lf(_f.get(a)||null,e,t,n,r,o)),!0}return!1}(o,e,t,n,r))r.stopPropagation();else if(Mf(e,r),4&t&&-1<Df.indexOf(e)){for(;null!==o;){var a=Xe(o);if(null!==a)switch(a.tag){case 3:if((a=a.stateNode).current.memoizedState.isDehydrated){var i=Ne(a.pendingLanes);if(0!==i){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;i;){var l=1<<31-xe(i);s.entanglements[1]|=l,i&=~l}Lu(a),!(6&hc)&&(Dc=le()+500,Iu(0,!1))}}break;case 31:case 13:null!==(s=Ar(a,2))&&Yc(s,0,2),eu(),gf(a,2)}if(null===(a=kf(r))&&nd(e,t,r,Ef,n),a===o)break;o=a}null!==o&&r.stopPropagation()}else nd(e,t,r,null,n)}}function kf(e){return Cf(e=Dt(e))}var Ef=null;function Cf(e){if(Ef=null,null!==(e=Qe(e))){var t=a(e);if(null===t)e=null;else{var n=t.tag;if(13===n){if(null!==(e=i(t)))return e;e=null}else if(31===n){if(null!==(e=s(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Ef=e,null}function Nf(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(ce()){case ue:return 2;case de:return 8;case fe:case he:return 32;case pe:return 268435456;default:return 32}default:return 32}}var Tf=!1,jf=null,Rf=null,Pf=null,Of=new Map,_f=new Map,Af=[],Df="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 Mf(e,t){switch(e){case"focusin":case"focusout":jf=null;break;case"dragenter":case"dragleave":Rf=null;break;case"mouseover":case"mouseout":Pf=null;break;case"pointerover":case"pointerout":Of.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":_f.delete(t.pointerId)}}function Lf(e,t,n,r,o,a){return null===e||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[o]},null!==t&&(null!==(t=Xe(t))&&yf(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==o&&-1===t.indexOf(o)&&t.push(o),e)}function If(e){var t=Qe(e.target);if(null!==t){var n=a(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=i(n)))return e.blockedOn=t,void Fe(e.priority,function(){vf(n)})}else if(31===t){if(null!==(t=s(n)))return e.blockedOn=t,void Fe(e.priority,function(){vf(n)})}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function zf(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=kf(e.nativeEvent);if(null!==n)return null!==(t=Xe(n))&&yf(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);At=r,n.target.dispatchEvent(r),At=null,t.shift()}return!0}function Ff(e,t,n){zf(e)&&n.delete(t)}function Bf(){Tf=!1,null!==jf&&zf(jf)&&(jf=null),null!==Rf&&zf(Rf)&&(Rf=null),null!==Pf&&zf(Pf)&&(Pf=null),Of.forEach(Ff),_f.forEach(Ff)}function Uf(e,n){e.blockedOn===n&&(e.blockedOn=null,Tf||(Tf=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Bf)))}var Vf=null;function $f(e){Vf!==e&&(Vf=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Vf===e&&(Vf=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],o=e[t+2];if("function"!=typeof r){if(null===Cf(r||n))continue;break}var a=Xe(n);null!==a&&(e.splice(t,3),t-=3,ts(a,{pending:!0,data:o,method:n.method,action:r},r,o))}}))}function Hf(e){function t(t){return Uf(t,e)}null!==jf&&Uf(jf,e),null!==Rf&&Uf(Rf,e),null!==Pf&&Uf(Pf,e),Of.forEach(t),_f.forEach(t);for(var n=0;n<Af.length;n++){var r=Af[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Af.length&&null===(n=Af[0]).blockedOn;)If(n),null===n.blockedOn&&Af.shift();if(null!=(n=(e.ownerDocument||e).$$reactFormReplay))for(r=0;r<n.length;r+=3){var o=n[r],a=n[r+1],i=o[Ve]||null;if("function"==typeof a)i||$f(n);else if(i){var s=null;if(a&&a.hasAttribute("formAction")){if(o=a,i=a[Ve]||null)s=i.formAction;else if(null!==Cf(o))continue}else s=i.action;"function"==typeof s?n[r+1]=s:(n.splice(r,3),r-=3),$f(n)}}}function qf(){function e(e){e.canIntercept&&"react-transition"===e.info&&e.intercept({handler:function(){return new Promise(function(e){return o=e})},focusReset:"manual",scroll:"manual"})}function t(){null!==o&&(o(),o=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&null!=e.url&&navigation.navigate(e.url,{state:e.getState(),info:"react-transition",history:"replace"})}}if("object"==typeof navigation){var r=!1,o=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),null!==o&&(o(),o=null)}}}function Wf(e){this._internalRoot=e}function Kf(e){this._internalRoot=e}Kf.prototype.render=Wf.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(o(409));pf(t.current,Kc(),e,t,null,null)},Kf.prototype.unmount=Wf.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;pf(e.current,2,null,e,null,null),eu(),t[$e]=null}},Kf.prototype.unstable_scheduleHydration=function(e){if(e){var t=ze();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Af.length&&0!==t&&t<Af[n].priority;n++);Af.splice(n,0,e),0===n&&If(e)}};var Gf=n.version;if("19.2.7"!==Gf)throw Error(o(527,Gf,"19.2.7"));M.findDOMNode=function(e){var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(o(188));throw e=Object.keys(e).join(","),Error(o(268,e))}return e=function(e){var t=e.alternate;if(!t){if(null===(t=a(e)))throw Error(o(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(null===i)break;var s=i.alternate;if(null===s){if(null!==(r=i.return)){n=r;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===n)return l(i),e;if(s===r)return l(i),t;s=s.sibling}throw Error(o(188))}if(n.return!==r.return)n=i,r=s;else{for(var c=!1,u=i.child;u;){if(u===n){c=!0,n=i,r=s;break}if(u===r){c=!0,r=i,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=i;break}if(u===r){c=!0,r=s,n=i;break}u=u.sibling}if(!c)throw Error(o(189))}}if(n.alternate!==r)throw Error(o(190))}if(3!==n.tag)throw Error(o(188));return n.stateNode.current===n?e:t}(t),e=null===(e=null!==e?c(e):null)?null:e.stateNode};var Yf={bundleType:0,version:"19.2.7",rendererPackageName:"react-dom",currentDispatcherRef:D,reconcilerVersion:"19.2.7"};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var Qf=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Qf.isDisabled&&Qf.supportsFiber)try{ye=Qf.inject(Yf),ve=Qf}catch(Fc){}}e.createRoot=function(e,t){if(!(n=e)||1!==n.nodeType&&9!==n.nodeType&&11!==n.nodeType)throw Error(o(299));var n,r=!1,a="",i=Es,s=Cs,l=Ns;return null!=t&&(!0===t.unstable_strictMode&&(r=!0),void 0!==t.identifierPrefix&&(a=t.identifierPrefix),void 0!==t.onUncaughtError&&(i=t.onUncaughtError),void 0!==t.onCaughtError&&(s=t.onCaughtError),void 0!==t.onRecoverableError&&(l=t.onRecoverableError)),t=function(e,t,n,r,o,a,i,s,l,c,u,d){return e=new hf(e,t,n,i,l,c,u,d,s),t=1,!0===a&&(t|=24),a=zr(3,null,null,t),e.current=a,a.stateNode=e,(t=Bo()).refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},ya(a),e}(e,1,!1,null,0,r,a,null,i,s,l,qf),e[$e]=t.current,ed(e),new Wf(t)}}),y=i((e,t)=>{!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(Fc){}}(),t.exports=g()}),v=i(e=>{var t=d().__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;e.c=function(e){return t.H.useMemoCache(e)}}),b=i((e,t)=>{t.exports=v()}),x=c(m()),w=c(y(),1),S=b(),k=c(d());var E="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function C(e){const t=Object.prototype.toString.call(e);return"[object Window]"===t||"[object global]"===t}function N(e){return"nodeType"in e}function T(e){var t,n;return e?C(e)?e:N(e)&&null!=(t=null==(n=e.ownerDocument)?void 0:n.defaultView)?t:window:window}function j(e){const{Document:t}=T(e);return e instanceof t}function R(e){return!C(e)&&e instanceof T(e).HTMLElement}function P(e){return e instanceof T(e).SVGElement}function O(e){return e?C(e)?e.document:N(e)?j(e)?e:R(e)||P(e)?e.ownerDocument:document:document:document}var _=E?k.useLayoutEffect:k.useEffect;function A(e){const t=(0,k.useRef)(e);return _(()=>{t.current=e}),(0,k.useCallback)(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)},[])}function D(e,t){void 0===t&&(t=[e]);const n=(0,k.useRef)(e);return _(()=>{n.current!==e&&(n.current=e)},t),n}function M(e,t){const n=(0,k.useRef)();return(0,k.useMemo)(()=>{const t=e(n.current);return n.current=t,t},[...t])}function L(e){const t=A(e),n=(0,k.useRef)(null);return[n,(0,k.useCallback)(e=>{e!==n.current&&t?.(e,n.current),n.current=e},[])]}function I(e){const t=(0,k.useRef)();return(0,k.useEffect)(()=>{t.current=e},[e]),t.current}var z={};function F(e,t){return(0,k.useMemo)(()=>{if(t)return t;const n=null==z[e]?0:z[e]+1;return z[e]=n,e+"-"+n},[e,t])}function B(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce((t,n)=>{const r=Object.entries(n);for(const[o,a]of r){const n=t[o];null!=n&&(t[o]=n+e*a)}return t},{...t})}}var U=B(1),V=B(-1);function $(e){if(!e)return!1;const{KeyboardEvent:t}=T(e.target);return t&&e instanceof t}function H(e){if(function(e){if(!e)return!1;const{TouchEvent:t}=T(e.target);return t&&e instanceof t}(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return function(e){return"clientX"in e&&"clientY"in e}(e)?{x:e.clientX,y:e.clientY}:null}var q=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[q.Translate.toString(e),q.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),W="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function K(e){return e.matches(W)?e:e.querySelector(W)}var G={display:"none"};function Y(e){let{id:t,value:n}=e;return k.createElement("div",{id:t,style:G},n)}function Q(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;return k.createElement("div",{id:t,style:{position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"},role:"status","aria-live":r,"aria-atomic":!0},n)}var X=(0,k.createContext)(null);var J,Z={draggable:"\n To pick up a draggable item, press the space bar.\n While dragging, use the arrow keys to move the item.\n Press space again to drop the item in its new position, or press escape to cancel.\n "},ee={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function te(e){let{announcements:t=ee,container:n,hiddenTextDescribedById:r,screenReaderInstructions:o=Z}=e;const{announce:a,announcement:i}=function(){const[e,t]=(0,k.useState)("");return{announce:(0,k.useCallback)(e=>{null!=e&&t(e)},[]),announcement:e}}(),s=F("DndLiveRegion"),[l,c]=(0,k.useState)(!1);if((0,k.useEffect)(()=>{c(!0)},[]),function(e){const t=(0,k.useContext)(X);(0,k.useEffect)(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}((0,k.useMemo)(()=>({onDragStart(e){let{active:n}=e;a(t.onDragStart({active:n}))},onDragMove(e){let{active:n,over:r}=e;t.onDragMove&&a(t.onDragMove({active:n,over:r}))},onDragOver(e){let{active:n,over:r}=e;a(t.onDragOver({active:n,over:r}))},onDragEnd(e){let{active:n,over:r}=e;a(t.onDragEnd({active:n,over:r}))},onDragCancel(e){let{active:n,over:r}=e;a(t.onDragCancel({active:n,over:r}))}}),[a,t])),!l)return null;const u=k.createElement(k.Fragment,null,k.createElement(Y,{id:r,value:o.draggable}),k.createElement(Q,{id:s,announcement:i}));return n?(0,x.createPortal)(u,n):u}function ne(){}function re(e,t){return(0,k.useMemo)(()=>({sensor:e,options:null!=t?t:{}}),[e,t])}!function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"}(J||(J={}));var oe=Object.freeze({x:0,y:0});function ae(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function ie(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function se(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function le(e){let{left:t,top:n,height:r,width:o}=e;return[{x:t,y:n},{x:t+o,y:n},{x:t,y:n+r},{x:t+o,y:n+r}]}function ce(e,t){if(!e||0===e.length)return null;const[n]=e;return t?n[t]:n}function ue(e,t,n){return void 0===t&&(t=e.left),void 0===n&&(n=e.top),{x:t+.5*e.width,y:n+.5*e.height}}var de=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=ue(t,t.left,t.top),a=[];for(const i of r){const{id:e}=i,t=n.get(e);if(t){const n=ae(ue(t),o);a.push({id:e,data:{droppableContainer:i,value:n}})}}return a.sort(ie)};function fe(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),o=Math.min(t.left+t.width,e.left+e.width),a=Math.min(t.top+t.height,e.top+e.height),i=o-r,s=a-n;if(r<o&&n<a){const n=t.width*t.height,r=e.width*e.height,o=i*s;return Number((o/(n+r-o)).toFixed(4))}return 0}var he=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=[];for(const a of r){const{id:e}=a,r=n.get(e);if(r){const n=fe(r,t);n>0&&o.push({id:e,data:{droppableContainer:a,value:n}})}}return o.sort(se)};function pe(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:oe}function me(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce((t,n)=>({...t,top:t.top+e*n.y,bottom:t.bottom+e*n.y,left:t.left+e*n.x,right:t.right+e*n.x}),{...t})}}var ge=me(1);var ye,ve={ignoreTransform:!1};function be(e,t){void 0===t&&(t=ve);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:t,transformOrigin:r}=T(e).getComputedStyle(e);t&&(n=function(e,t,n){const r=function(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}(t);if(!r)return e;const{scaleX:o,scaleY:a,x:i,y:s}=r,l=e.left-i-(1-o)*parseFloat(n),c=e.top-s-(1-a)*parseFloat(n.slice(n.indexOf(" ")+1)),u=o?e.width/o:e.width,d=a?e.height/a:e.height;return{width:u,height:d,top:c,right:l+u,bottom:c+d,left:l}}(n,t,r))}const{top:r,left:o,width:a,height:i,bottom:s,right:l}=n;return{top:r,left:o,width:a,height:i,bottom:s,right:l}}function xe(e){return be(e,{ignoreTransform:!0})}function we(e,t){const n=[];return e?function r(o){if(null!=t&&n.length>=t)return n;if(!o)return n;if(j(o)&&null!=o.scrollingElement&&!n.includes(o.scrollingElement))return n.push(o.scrollingElement),n;if(!R(o)||P(o))return n;if(n.includes(o))return n;const a=T(e).getComputedStyle(o);return o!==e&&function(e,t){void 0===t&&(t=T(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(e=>{const r=t[e];return"string"==typeof r&&n.test(r)})}(o,a)&&n.push(o),function(e,t){return void 0===t&&(t=T(e).getComputedStyle(e)),"fixed"===t.position}(o,a)?n:r(o.parentNode)}(e):n}function Se(e){const[t]=we(e,1);return null!=t?t:null}function ke(e){return E&&e?C(e)?e:N(e)?j(e)||e===O(e).scrollingElement?window:R(e)?e:null:null:null}function Ee(e){return C(e)?e.scrollX:e.scrollLeft}function Ce(e){return C(e)?e.scrollY:e.scrollTop}function Ne(e){return{x:Ee(e),y:Ce(e)}}function Te(e){return!(!E||!e)&&e===document.scrollingElement}function je(e){const t={x:0,y:0},n=Te(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=r.y,isRight:e.scrollLeft>=r.x,maxScroll:r,minScroll:t}}!function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"}(ye||(ye={}));var Re={x:.2,y:.2};function Pe(e,t,n,r,o){let{top:a,left:i,right:s,bottom:l}=n;void 0===r&&(r=10),void 0===o&&(o=Re);const{isTop:c,isBottom:u,isLeft:d,isRight:f}=je(e),h={x:0,y:0},p={x:0,y:0},m=t.height*o.y,g=t.width*o.x;return!c&&a<=t.top+m?(h.y=ye.Backward,p.y=r*Math.abs((t.top+m-a)/m)):!u&&l>=t.bottom-m&&(h.y=ye.Forward,p.y=r*Math.abs((t.bottom-m-l)/m)),!f&&s>=t.right-g?(h.x=ye.Forward,p.x=r*Math.abs((t.right-g-s)/g)):!d&&i<=t.left+g&&(h.x=ye.Backward,p.x=r*Math.abs((t.left+g-i)/g)),{direction:h,speed:p}}function Oe(e){if(e===document.scrollingElement){const{innerWidth:e,innerHeight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}const{top:t,left:n,right:r,bottom:o}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:o,width:e.clientWidth,height:e.clientHeight}}function _e(e){return e.reduce((e,t)=>U(e,Ne(t)),oe)}var Ae,De,Me=[["x",["left","right"],function(e){return e.reduce((e,t)=>e+Ee(t),0)}],["y",["top","bottom"],function(e){return e.reduce((e,t)=>e+Ce(t),0)}]],Le=class{constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const n=we(t),r=_e(n);this.rect={...e},this.width=e.width,this.height=e.height;for(const[o,a,i]of Me)for(const e of a)Object.defineProperty(this,e,{get:()=>{const t=i(n),a=r[o]-t;return this.rect[e]+a},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}},Ie=class{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(e=>{var t;return null==(t=this.target)?void 0:t.removeEventListener(...e)})},this.target=e}add(e,t,n){var r;null==(r=this.target)||r.addEventListener(e,t,n),this.listeners.push([e,t,n])}};function ze(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return"number"==typeof t?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t&&r>t.y}function Fe(e){e.preventDefault()}function Be(e){e.stopPropagation()}!function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"}(Ae||(Ae={})),function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"}(De||(De={}));var Ue={start:[De.Space,De.Enter],cancel:[De.Esc],end:[De.Space,De.Enter,De.Tab]},Ve=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case De.Right:return{...n,x:n.x+25};case De.Left:return{...n,x:n.x-25};case De.Down:return{...n,y:n.y+25};case De.Up:return{...n,y:n.y-25}}},$e=class{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;const{event:{target:t}}=e;this.props=e,this.listeners=new Ie(O(t)),this.windowListeners=new Ie(T(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Ae.Resize,this.handleCancel),this.windowListeners.add(Ae.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Ae.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&function(e,t){if(void 0===t&&(t=be),!e)return;const{top:n,left:r,bottom:o,right:a}=t(e);Se(e)&&(o<=0||a<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}(n),t(oe)}handleKeyDown(e){if($(e)){const{active:t,context:n,options:r}=this.props,{keyboardCodes:o=Ue,coordinateGetter:a=Ve,scrollBehavior:i="smooth"}=r,{code:s}=e;if(o.end.includes(s))return void this.handleEnd(e);if(o.cancel.includes(s))return void this.handleCancel(e);const{collisionRect:l}=n.current,c=l?{x:l.left,y:l.top}:oe;this.referenceCoordinates||(this.referenceCoordinates=c);const u=a(e,{active:t,context:n.current,currentCoordinates:c});if(u){const t=V(u,c),r={x:0,y:0},{scrollableAncestors:o}=n.current;for(const n of o){const o=e.code,{isTop:a,isRight:s,isLeft:l,isBottom:c,maxScroll:d,minScroll:f}=je(n),h=Oe(n),p={x:Math.min(o===De.Right?h.right-h.width/2:h.right,Math.max(o===De.Right?h.left:h.left+h.width/2,u.x)),y:Math.min(o===De.Down?h.bottom-h.height/2:h.bottom,Math.max(o===De.Down?h.top:h.top+h.height/2,u.y))},m=o===De.Right&&!s||o===De.Left&&!l,g=o===De.Down&&!c||o===De.Up&&!a;if(m&&p.x!==u.x){const e=n.scrollLeft+t.x,a=o===De.Right&&e<=d.x||o===De.Left&&e>=f.x;if(a&&!t.y)return void n.scrollTo({left:e,behavior:i});r.x=a?n.scrollLeft-e:o===De.Right?n.scrollLeft-d.x:n.scrollLeft-f.x,r.x&&n.scrollBy({left:-r.x,behavior:i});break}if(g&&p.y!==u.y){const e=n.scrollTop+t.y,a=o===De.Down&&e<=d.y||o===De.Up&&e>=f.y;if(a&&!t.x)return void n.scrollTo({top:e,behavior:i});r.y=a?n.scrollTop-e:o===De.Down?n.scrollTop-d.y:n.scrollTop-f.y,r.y&&n.scrollBy({top:-r.y,behavior:i});break}}this.handleMove(e,U(V(u,this.referenceCoordinates),r))}}}handleMove(e,t){const{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){const{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){const{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}};function He(e){return Boolean(e&&"distance"in e)}function qe(e){return Boolean(e&&"delay"in e)}$e.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=Ue,onActivation:o}=t,{active:a}=n;const{code:i}=e.nativeEvent;if(r.start.includes(i)){const t=a.activatorNode.current;return(!t||e.target===t)&&(e.preventDefault(),o?.({event:e.nativeEvent}),!0)}return!1}}];var We=class{constructor(e,t,n){var r;void 0===n&&(n=function(e){const{EventTarget:t}=T(e);return e instanceof t?e:O(e)}(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;const{event:o}=e,{target:a}=o;this.props=e,this.events=t,this.document=O(a),this.documentListeners=new Ie(this.document),this.listeners=new Ie(n),this.windowListeners=new Ie(T(a)),this.initialCoordinates=null!=(r=H(o))?r:oe,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:e,props:{options:{activationConstraint:t,bypassActivationConstraint:n}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(Ae.Resize,this.handleCancel),this.windowListeners.add(Ae.DragStart,Fe),this.windowListeners.add(Ae.VisibilityChange,this.handleCancel),this.windowListeners.add(Ae.ContextMenu,Fe),this.documentListeners.add(Ae.Keydown,this.handleKeydown),t){if(null!=n&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(qe(t))return this.timeoutId=setTimeout(this.handleStart,t.delay),void this.handlePending(t);if(He(t))return void this.handlePending(t)}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),null!==this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,t){const{active:n,onPending:r}=this.props;r(n,e,this.initialCoordinates,t)}handleStart(){const{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(Ae.Click,Be,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Ae.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){var t;const{activated:n,initialCoordinates:r,props:o}=this,{onMove:a,options:{activationConstraint:i}}=o;if(!r)return;const s=null!=(t=H(e))?t:oe,l=V(r,s);if(!n&&i){if(He(i)){if(null!=i.tolerance&&ze(l,i.tolerance))return this.handleCancel();if(ze(l,i.distance))return this.handleStart()}return qe(i)&&ze(l,i.tolerance)?this.handleCancel():void this.handlePending(i,l)}e.cancelable&&e.preventDefault(),a(s)}handleEnd(){const{onAbort:e,onEnd:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleCancel(){const{onAbort:e,onCancel:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleKeydown(e){e.code===De.Esc&&this.handleCancel()}removeTextSelection(){var e;null==(e=this.document.getSelection())||e.removeAllRanges()}},Ke={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}},Ge=class extends We{constructor(e){const{event:t}=e,n=O(t.target);super(e,Ke,n)}};Ge.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!(!n.isPrimary||0!==n.button)&&(r?.({event:n}),!0)}}];var Ye,Qe={move:{name:"mousemove"},end:{name:"mouseup"}};!function(e){e[e.RightClick=2]="RightClick"}(Ye||(Ye={}));(class extends We{constructor(e){super(e,Qe,O(e.event.target))}}).activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button!==Ye.RightClick&&(r?.({event:n}),!0)}}];var Xe,Je,Ze={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};function et(e){let{acceleration:t,activator:n=Xe.Pointer,canScroll:r,draggingRect:o,enabled:a,interval:i=5,order:s=Je.TreeOrder,pointerCoordinates:l,scrollableAncestors:c,scrollableAncestorRects:u,delta:d,threshold:f}=e;const h=function(e){let{delta:t,disabled:n}=e;const r=I(t);return M(e=>{if(n||!r||!e)return rt;const o={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[ye.Backward]:e.x[ye.Backward]||-1===o.x,[ye.Forward]:e.x[ye.Forward]||1===o.x},y:{[ye.Backward]:e.y[ye.Backward]||-1===o.y,[ye.Forward]:e.y[ye.Forward]||1===o.y}}},[n,t,r])}({delta:d,disabled:!a}),[p,m]=function(){const e=(0,k.useRef)(null);return[(0,k.useCallback)((t,n)=>{e.current=setInterval(t,n)},[]),(0,k.useCallback)(()=>{null!==e.current&&(clearInterval(e.current),e.current=null)},[])]}(),g=(0,k.useRef)({x:0,y:0}),y=(0,k.useRef)({x:0,y:0}),v=(0,k.useMemo)(()=>{switch(n){case Xe.Pointer:return l?{top:l.y,bottom:l.y,left:l.x,right:l.x}:null;case Xe.DraggableRect:return o}},[n,o,l]),b=(0,k.useRef)(null),x=(0,k.useCallback)(()=>{const e=b.current;if(!e)return;const t=g.current.x*y.current.x,n=g.current.y*y.current.y;e.scrollBy(t,n)},[]),w=(0,k.useMemo)(()=>s===Je.TreeOrder?[...c].reverse():c,[s,c]);(0,k.useEffect)(()=>{if(a&&c.length&&v){for(const e of w){if(!1===(null==r?void 0:r(e)))continue;const n=u[c.indexOf(e)];if(!n)continue;const{direction:o,speed:a}=Pe(e,n,v,t,f);for(const e of["x","y"])h[e][o[e]]||(a[e]=0,o[e]=0);if(a.x>0||a.y>0)return m(),b.current=e,p(x,i),g.current=a,void(y.current=o)}g.current={x:0,y:0},y.current={x:0,y:0},m()}else m()},[t,x,r,m,a,i,JSON.stringify(v),JSON.stringify(h),p,c,w,u,JSON.stringify(f)])}(class extends We{constructor(e){super(e,Ze)}static setup(){return window.addEventListener(Ze.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(Ze.move.name,e)};function e(){}}}).activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:o}=n;return!(o.length>1)&&(r?.({event:n}),!0)}}],function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"}(Xe||(Xe={})),function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"}(Je||(Je={}));var tt,nt,rt={x:{[ye.Backward]:!1,[ye.Forward]:!1},y:{[ye.Backward]:!1,[ye.Forward]:!1}};!function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"}(tt||(tt={})),function(e){e.Optimized="optimized"}(nt||(nt={}));var ot=new Map;function at(e,t){return M(n=>e?n||("function"==typeof t?t(e):e):null,[t,e])}function it(e){let{callback:t,disabled:n}=e;const r=A(t),o=(0,k.useMemo)(()=>{if(n||"undefined"==typeof window||void 0===window.ResizeObserver)return;const{ResizeObserver:e}=window;return new e(r)},[n]);return(0,k.useEffect)(()=>()=>null==o?void 0:o.disconnect(),[o]),o}function st(e){return new Le(be(e),e)}function lt(e,t,n){void 0===t&&(t=st);const[r,o]=(0,k.useState)(null);function a(){o(r=>{if(!e)return null;var o;if(!1===e.isConnected)return null!=(o=null!=r?r:n)?o:null;const a=t(e);return JSON.stringify(r)===JSON.stringify(a)?r:a})}const i=function(e){let{callback:t,disabled:n}=e;const r=A(t),o=(0,k.useMemo)(()=>{if(n||"undefined"==typeof window||void 0===window.MutationObserver)return;const{MutationObserver:e}=window;return new e(r)},[r,n]);return(0,k.useEffect)(()=>()=>null==o?void 0:o.disconnect(),[o]),o}({callback(t){if(e)for(const n of t){const{type:t,target:r}=n;if("childList"===t&&r instanceof HTMLElement&&r.contains(e)){a();break}}}}),s=it({callback:a});return _(()=>{a(),e?(s?.observe(e),i?.observe(document.body,{childList:!0,subtree:!0})):(s?.disconnect(),i?.disconnect())},[e]),r}var ct=[];function ut(e,t){void 0===t&&(t=[]);const n=(0,k.useRef)(null);return(0,k.useEffect)(()=>{n.current=null},t),(0,k.useEffect)(()=>{const t=e!==oe;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)},[e]),n.current?V(e,n.current):oe}function dt(e){return(0,k.useMemo)(()=>e?function(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}(e):null,[e])}var ft=[];function ht(e){let{measure:t}=e;const[n,r]=(0,k.useState)(null),o=it({callback:(0,k.useCallback)(e=>{for(const{target:n}of e)if(R(n)){r(e=>{const r=t(n);return e?{...e,width:r.width,height:r.height}:r});break}},[t])}),[a,i]=L((0,k.useCallback)(e=>{const n=function(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return R(t)?t:e}(e);o?.disconnect(),n&&o?.observe(n),r(n?t(n):null)},[t,o]));return(0,k.useMemo)(()=>({nodeRef:a,rect:n,setRef:i}),[n,a,i])}var pt=[{sensor:Ge,options:{}},{sensor:$e,options:{}}],mt={current:{}},gt={draggable:{measure:xe},droppable:{measure:xe,strategy:tt.WhileDragging,frequency:nt.Optimized},dragOverlay:{measure:be}},yt=class extends Map{get(e){var t;return null!=e&&null!=(t=super.get(e))?t:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:t}=e;return!t})}getNodeFor(e){var t,n;return null!=(t=null==(n=this.get(e))?void 0:n.node.current)?t:void 0}},vt={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new yt,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:ne},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:gt,measureDroppableContainers:ne,windowRect:null,measuringScheduled:!1},bt={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:ne,draggableNodes:new Map,over:null,measureDroppableContainers:ne},xt=(0,k.createContext)(bt),wt=(0,k.createContext)(vt);function St(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new yt}}}function kt(e,t){switch(t.type){case J.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case J.DragMove:return null==e.draggable.active?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case J.DragEnd:case J.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case J.RegisterDroppable:{const{element:n}=t,{id:r}=n,o=new yt(e.droppable.containers);return o.set(r,n),{...e,droppable:{...e.droppable,containers:o}}}case J.SetDroppableDisabled:{const{id:n,key:r,disabled:o}=t,a=e.droppable.containers.get(n);if(!a||r!==a.key)return e;const i=new yt(e.droppable.containers);return i.set(n,{...a,disabled:o}),{...e,droppable:{...e.droppable,containers:i}}}case J.UnregisterDroppable:{const{id:n,key:r}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const a=new yt(e.droppable.containers);return a.delete(n),{...e,droppable:{...e.droppable,containers:a}}}default:return e}}function Et(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:o}=(0,k.useContext)(xt),a=I(r),i=I(null==n?void 0:n.id);return(0,k.useEffect)(()=>{if(!t&&!r&&a&&null!=i){if(!$(a))return;if(document.activeElement===a.target)return;const e=o.get(i);if(!e)return;const{activatorNode:t,node:n}=e;if(!t.current&&!n.current)return;requestAnimationFrame(()=>{for(const e of[t.current,n.current]){if(!e)continue;const t=K(e);if(t){t.focus();break}}})}},[r,t,o,i,a]),null}var Ct,Nt=(0,k.createContext)({...oe,scaleX:1,scaleY:1});!function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"}(Ct||(Ct={}));var Tt=(0,k.memo)(function(e){var t,n,r,o;let{id:a,accessibility:i,autoScroll:s=!0,children:l,sensors:c=pt,collisionDetection:u=he,measuring:d,modifiers:f,...h}=e;const[p,m]=(0,k.useReducer)(kt,void 0,St),[g,y]=function(){const[e]=(0,k.useState)(()=>new Set),t=(0,k.useCallback)(t=>(e.add(t),()=>e.delete(t)),[e]);return[(0,k.useCallback)(t=>{let{type:n,event:r}=t;e.forEach(e=>{var t;return null==(t=e[n])?void 0:t.call(e,r)})},[e]),t]}(),[v,b]=(0,k.useState)(Ct.Uninitialized),w=v===Ct.Initialized,{draggable:{active:S,nodes:C,translate:N},droppable:{containers:j}}=p,R=null!=S?C.get(S):null,P=(0,k.useRef)({initial:null,translated:null}),O=(0,k.useMemo)(()=>{var e;return null!=S?{id:S,data:null!=(e=null==R?void 0:R.data)?e:mt,rect:P}:null},[S,R]),A=(0,k.useRef)(null),[L,I]=(0,k.useState)(null),[z,B]=(0,k.useState)(null),V=D(h,Object.values(h)),$=F("DndDescribedBy",a),q=(0,k.useMemo)(()=>j.getEnabled(),[j]),W=(K=d,(0,k.useMemo)(()=>({draggable:{...gt.draggable,...null==K?void 0:K.draggable},droppable:{...gt.droppable,...null==K?void 0:K.droppable},dragOverlay:{...gt.dragOverlay,...null==K?void 0:K.dragOverlay}}),[null==K?void 0:K.draggable,null==K?void 0:K.droppable,null==K?void 0:K.dragOverlay]));var K;const{droppableRects:G,measureDroppableContainers:Y,measuringScheduled:Q}=function(e,t){let{dragging:n,dependencies:r,config:o}=t;const[a,i]=(0,k.useState)(null),{frequency:s,measure:l,strategy:c}=o,u=(0,k.useRef)(e),d=function(){switch(c){case tt.Always:return!1;case tt.BeforeDragging:return n;default:return!n}}(),f=D(d),h=(0,k.useCallback)(function(e){void 0===e&&(e=[]),f.current||i(t=>null===t?e:t.concat(e.filter(e=>!t.includes(e))))},[f]),p=(0,k.useRef)(null),m=M(t=>{if(d&&!n)return ot;if(!t||t===ot||u.current!==e||null!=a){const t=new Map;for(let n of e){if(!n)continue;if(a&&a.length>0&&!a.includes(n.id)&&n.rect.current){t.set(n.id,n.rect.current);continue}const e=n.node.current,r=e?new Le(l(e),e):null;n.rect.current=r,r&&t.set(n.id,r)}return t}return t},[e,a,n,d,l]);return(0,k.useEffect)(()=>{u.current=e},[e]),(0,k.useEffect)(()=>{d||h()},[n,d]),(0,k.useEffect)(()=>{a&&a.length>0&&i(null)},[JSON.stringify(a)]),(0,k.useEffect)(()=>{d||"number"!=typeof s||null!==p.current||(p.current=setTimeout(()=>{h(),p.current=null},s))},[s,d,h,...r]),{droppableRects:m,measureDroppableContainers:h,measuringScheduled:null!=a}}(q,{dragging:w,dependencies:[N.x,N.y],config:W.droppable}),Z=function(e,t){const n=null!=t?e.get(t):void 0,r=n?n.node.current:null;return M(e=>{var n;return null==t?null:null!=(n=null!=r?r:e)?n:null},[r,t])}(C,S),ee=(0,k.useMemo)(()=>z?H(z):null,[z]),ne=function(){const e=!1===(null==L?void 0:L.autoScrollEnabled),t="object"==typeof s?!1===s.enabled:!1===s,n=w&&!e&&!t;return"object"==typeof s?{...s,enabled:n}:{enabled:n}}(),re=function(e,t){return at(e,t)}(Z,W.draggable.measure);!function(e){let{activeNode:t,measure:n,initialRect:r,config:o=!0}=e;const a=(0,k.useRef)(!1),{x:i,y:s}="boolean"==typeof o?{x:o,y:o}:o;_(()=>{if(!i&&!s||!t)return void(a.current=!1);if(a.current||!r)return;const e=null==t?void 0:t.node.current;if(!e||!1===e.isConnected)return;const o=pe(n(e),r);if(i||(o.x=0),s||(o.y=0),a.current=!0,Math.abs(o.x)>0||Math.abs(o.y)>0){const t=Se(e);t&&t.scrollBy({top:o.y,left:o.x})}},[t,i,s,r,n])}({activeNode:null!=S?C.get(S):null,config:ne.layoutShiftCompensation,initialRect:re,measure:W.draggable.measure});const ae=lt(Z,W.draggable.measure,re),ie=lt(Z?Z.parentElement:null),se=(0,k.useRef)({activatorEvent:null,active:null,activeNode:Z,collisionRect:null,collisions:null,droppableRects:G,draggableNodes:C,draggingNode:null,draggingNodeRect:null,droppableContainers:j,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),le=j.getNodeFor(null==(t=se.current.over)?void 0:t.id),ue=ht({measure:W.dragOverlay.measure}),de=null!=(n=ue.nodeRef.current)?n:Z,fe=w?null!=(r=ue.rect)?r:ae:null,me=Boolean(ue.nodeRef.current&&ue.rect),ye=pe(ve=me?null:ae,at(ve));var ve;const xe=dt(de?T(de):null),Ee=function(e){const t=(0,k.useRef)(e),n=M(n=>e?n&&n!==ct&&e&&t.current&&e.parentNode===t.current.parentNode?n:we(e):ct,[e]);return(0,k.useEffect)(()=>{t.current=e},[e]),n}(w?null!=le?le:Z:null),Ce=function(e,t){void 0===t&&(t=be);const[n]=e,r=dt(n?T(n):null),[o,a]=(0,k.useState)(ft);function i(){a(()=>e.length?e.map(e=>Te(e)?r:new Le(t(e),e)):ft)}const s=it({callback:i});return _(()=>{s?.disconnect(),i(),e.forEach(e=>null==s?void 0:s.observe(e))},[e]),o}(Ee),je=function(e,t){let{transform:n,...r}=t;return null!=e&&e.length?e.reduce((e,t)=>t({transform:e,...r}),n):n}(f,{transform:{x:N.x-ye.x,y:N.y-ye.y,scaleX:1,scaleY:1},activatorEvent:z,active:O,activeNodeRect:ae,containerNodeRect:ie,draggingNodeRect:fe,over:se.current.over,overlayNodeRect:ue.rect,scrollableAncestors:Ee,scrollableAncestorRects:Ce,windowRect:xe}),Re=ee?U(ee,N):null,Pe=function(e){const[t,n]=(0,k.useState)(null),r=(0,k.useRef)(e),o=(0,k.useCallback)(e=>{const t=ke(e.target);t&&n(e=>e?(e.set(t,Ne(t)),new Map(e)):null)},[]);return(0,k.useEffect)(()=>{const t=r.current;if(e!==t){a(t);const i=e.map(e=>{const t=ke(e);return t?(t.addEventListener("scroll",o,{passive:!0}),[t,Ne(t)]):null}).filter(e=>null!=e);n(i.length?new Map(i):null),r.current=e}return()=>{a(e),a(t)};function a(e){e.forEach(e=>{ke(e)?.removeEventListener("scroll",o)})}},[o,e]),(0,k.useMemo)(()=>e.length?t?Array.from(t.values()).reduce((e,t)=>U(e,t),oe):_e(e):oe,[e,t])}(Ee),Oe=ut(Pe),Ae=ut(Pe,[ae]),De=U(je,Oe),Me=fe?ge(fe,je):null,Ie=O&&Me?u({active:O,collisionRect:Me,droppableRects:G,droppableContainers:q,pointerCoordinates:Re}):null,ze=ce(Ie,"id"),[Fe,Be]=(0,k.useState)(null),Ue=function(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}(me?je:U(je,Ae),null!=(o=null==Fe?void 0:Fe.rect)?o:null,ae),Ve=(0,k.useRef)(null),$e=(0,k.useCallback)((e,t)=>{let{sensor:n,options:r}=t;if(null==A.current)return;const o=C.get(A.current);if(!o)return;const a=e.nativeEvent;function i(e){return async function(){const{active:t,collisions:n,over:r,scrollAdjustedTranslate:o}=se.current;let i=null;if(t&&o){const{cancelDrop:s}=V.current;i={activatorEvent:a,active:t,collisions:n,delta:o,over:r},e===J.DragEnd&&"function"==typeof s&&await Promise.resolve(s(i))&&(e=J.DragCancel)}A.current=null,(0,x.unstable_batchedUpdates)(()=>{m({type:e}),b(Ct.Uninitialized),Be(null),I(null),B(null),Ve.current=null;const t=e===J.DragEnd?"onDragEnd":"onDragCancel";if(i){const e=V.current[t];e?.(i),g({type:t,event:i})}})}}Ve.current=new n({active:A.current,activeNode:o,event:a,options:r,context:se,onAbort(e){if(!C.get(e))return;const{onDragAbort:t}=V.current,n={id:e};t?.(n),g({type:"onDragAbort",event:n})},onPending(e,t,n,r){if(!C.get(e))return;const{onDragPending:o}=V.current,a={id:e,constraint:t,initialCoordinates:n,offset:r};o?.(a),g({type:"onDragPending",event:a})},onStart(e){const t=A.current;if(null==t)return;const n=C.get(t);if(!n)return;const{onDragStart:r}=V.current,o={activatorEvent:a,active:{id:t,data:n.data,rect:P}};(0,x.unstable_batchedUpdates)(()=>{r?.(o),b(Ct.Initializing),m({type:J.DragStart,initialCoordinates:e,active:t}),g({type:"onDragStart",event:o}),I(Ve.current),B(a)})},onMove(e){m({type:J.DragMove,coordinates:e})},onEnd:i(J.DragEnd),onCancel:i(J.DragCancel)})},[C]),He=function(e,t){return(0,k.useMemo)(()=>e.reduce((e,n)=>{const{sensor:r}=n;return[...e,...r.activators.map(e=>({eventName:e.eventName,handler:t(e.handler,n)}))]},[]),[e,t])}(c,(0,k.useCallback)((e,t)=>(n,r)=>{const o=n.nativeEvent,a=C.get(r);if(null!==A.current||!a||o.dndKit||o.defaultPrevented)return;const i={active:a};!0===e(n,t.options,i)&&(o.dndKit={capturedBy:t.sensor},A.current=r,$e(n,t))},[C,$e]));!function(e){(0,k.useEffect)(()=>{if(!E)return;const t=e.map(e=>{let{sensor:t}=e;return null==t.setup?void 0:t.setup()});return()=>{for(const e of t)e?.()}},e.map(e=>{let{sensor:t}=e;return t}))}(c),_(()=>{ae&&v===Ct.Initializing&&b(Ct.Initialized)},[ae,v]),(0,k.useEffect)(()=>{const{onDragMove:e}=V.current,{active:t,activatorEvent:n,collisions:r,over:o}=se.current;if(!t||!n)return;const a={active:t,activatorEvent:n,collisions:r,delta:{x:De.x,y:De.y},over:o};(0,x.unstable_batchedUpdates)(()=>{e?.(a),g({type:"onDragMove",event:a})})},[De.x,De.y]),(0,k.useEffect)(()=>{const{active:e,activatorEvent:t,collisions:n,droppableContainers:r,scrollAdjustedTranslate:o}=se.current;if(!e||null==A.current||!t||!o)return;const{onDragOver:a}=V.current,i=r.get(ze),s=i&&i.rect.current?{id:i.id,rect:i.rect.current,data:i.data,disabled:i.disabled}:null,l={active:e,activatorEvent:t,collisions:n,delta:{x:o.x,y:o.y},over:s};(0,x.unstable_batchedUpdates)(()=>{Be(s),a?.(l),g({type:"onDragOver",event:l})})},[ze]),_(()=>{se.current={activatorEvent:z,active:O,activeNode:Z,collisionRect:Me,collisions:Ie,droppableRects:G,draggableNodes:C,draggingNode:de,draggingNodeRect:fe,droppableContainers:j,over:Fe,scrollableAncestors:Ee,scrollAdjustedTranslate:De},P.current={initial:fe,translated:Me}},[O,Z,Ie,Me,C,de,fe,G,j,Fe,Ee,De]),et({...ne,delta:N,draggingRect:Me,pointerCoordinates:Re,scrollableAncestors:Ee,scrollableAncestorRects:Ce});const qe=(0,k.useMemo)(()=>({active:O,activeNode:Z,activeNodeRect:ae,activatorEvent:z,collisions:Ie,containerNodeRect:ie,dragOverlay:ue,draggableNodes:C,droppableContainers:j,droppableRects:G,over:Fe,measureDroppableContainers:Y,scrollableAncestors:Ee,scrollableAncestorRects:Ce,measuringConfiguration:W,measuringScheduled:Q,windowRect:xe}),[O,Z,ae,z,Ie,ie,ue,C,j,G,Fe,Y,Ee,Ce,W,Q,xe]),We=(0,k.useMemo)(()=>({activatorEvent:z,activators:He,active:O,activeNodeRect:ae,ariaDescribedById:{draggable:$},dispatch:m,draggableNodes:C,over:Fe,measureDroppableContainers:Y}),[z,He,O,ae,m,$,C,Fe,Y]);return k.createElement(X.Provider,{value:y},k.createElement(xt.Provider,{value:We},k.createElement(wt.Provider,{value:qe},k.createElement(Nt.Provider,{value:Ue},l)),k.createElement(Et,{disabled:!1===(null==i?void 0:i.restoreFocus)})),k.createElement(te,{...i,hiddenTextDescribedById:$}))}),jt=(0,k.createContext)(null),Rt="button";function Pt(e){let{id:t,data:n,disabled:r=!1,attributes:o}=e;const a=F("Draggable"),{activators:i,activatorEvent:s,active:l,activeNodeRect:c,ariaDescribedById:u,draggableNodes:d,over:f}=(0,k.useContext)(xt),{role:h=Rt,roleDescription:p="draggable",tabIndex:m=0}=null!=o?o:{},g=(null==l?void 0:l.id)===t,y=(0,k.useContext)(g?Nt:jt),[v,b]=L(),[x,w]=L(),S=function(e,t){return(0,k.useMemo)(()=>e.reduce((e,n)=>{let{eventName:r,handler:o}=n;return e[r]=e=>{o(e,t)},e},{}),[e,t])}(i,t),E=D(n);return _(()=>(d.set(t,{id:t,key:a,node:v,activatorNode:x,data:E}),()=>{const e=d.get(t);e&&e.key===a&&d.delete(t)}),[d,t]),{active:l,activatorEvent:s,activeNodeRect:c,attributes:(0,k.useMemo)(()=>({role:h,tabIndex:m,"aria-disabled":r,"aria-pressed":!(!g||h!==Rt)||void 0,"aria-roledescription":p,"aria-describedby":u.draggable}),[r,h,m,g,p,u.draggable]),isDragging:g,listeners:r?void 0:S,node:v,over:f,setNodeRef:b,setActivatorNodeRef:w,transform:y}}var Ot={timeout:25};function _t(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function At(e,t){return e.reduce((e,n,r)=>{const o=t.get(n);return o&&(e[r]=o),e},Array(e.length))}function Dt(e){return null!==e&&e>=0}var Mt=e=>{let{rects:t,activeIndex:n,overIndex:r,index:o}=e;const a=_t(t,r,n),i=t[o],s=a[o];return s&&i?{x:s.left-i.left,y:s.top-i.top,scaleX:s.width/i.width,scaleY:s.height/i.height}:null},Lt={scaleX:1,scaleY:1},It=e=>{var t;let{activeIndex:n,activeNodeRect:r,index:o,rects:a,overIndex:i}=e;const s=null!=(t=a[n])?t:r;if(!s)return null;if(o===n){const e=a[i];return e?{x:0,y:n<i?e.top+e.height-(s.top+s.height):e.top-s.top,...Lt}:null}const l=function(e,t,n){const r=e[t],o=e[t-1],a=e[t+1];return r?n<t?o?r.top-(o.top+o.height):a?a.top-(r.top+r.height):0:a?a.top-(r.top+r.height):o?r.top-(o.top+o.height):0:0}(a,o,n);return o>n&&o<=i?{x:0,y:-s.height-l,...Lt}:o<n&&o>=i?{x:0,y:s.height+l,...Lt}:{x:0,y:0,...Lt}};var zt="Sortable",Ft=k.createContext({activeIndex:-1,containerId:zt,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Mt,disabled:{draggable:!1,droppable:!1}});function Bt(e){let{children:t,id:n,items:r,strategy:o=Mt,disabled:a=!1}=e;const{active:i,dragOverlay:s,droppableRects:l,over:c,measureDroppableContainers:u}=(0,k.useContext)(wt),d=F(zt,n),f=Boolean(null!==s.rect),h=(0,k.useMemo)(()=>r.map(e=>"object"==typeof e&&"id"in e?e.id:e),[r]),p=null!=i,m=i?h.indexOf(i.id):-1,g=c?h.indexOf(c.id):-1,y=(0,k.useRef)(h),v=!function(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(h,y.current),b=-1!==g&&-1===m||v,x=function(e){return"boolean"==typeof e?{draggable:e,droppable:e}:e}(a);_(()=>{v&&p&&u(h)},[v,h,p,u]),(0,k.useEffect)(()=>{y.current=h},[h]);const w=(0,k.useMemo)(()=>({activeIndex:m,containerId:d,disabled:x,disableTransforms:b,items:h,overIndex:g,useDragOverlay:f,sortedRects:At(h,l),strategy:o}),[m,d,x.draggable,x.droppable,b,h,g,l,f,o]);return k.createElement(Ft.Provider,{value:w},t)}var Ut=e=>{let{id:t,items:n,activeIndex:r,overIndex:o}=e;return _t(n,r,o).indexOf(t)},Vt=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:o,items:a,newIndex:i,previousItems:s,previousContainerId:l,transition:c}=e;return!(!c||!r)&&((s===a||o!==i)&&(!!n||i!==o&&t===l))},$t={duration:200,easing:"ease"},Ht="transform",qt=q.Transition.toString({property:Ht,duration:0,easing:"linear"}),Wt={roleDescription:"sortable"};function Kt(e){let{animateLayoutChanges:t=Vt,attributes:n,disabled:r,data:o,getNewIndex:a=Ut,id:i,strategy:s,resizeObserverConfig:l,transition:c=$t}=e;const{items:u,containerId:d,activeIndex:f,disabled:h,disableTransforms:p,sortedRects:m,overIndex:g,useDragOverlay:y,strategy:v}=(0,k.useContext)(Ft),b=function(e,t){var n,r;return"boolean"==typeof e?{draggable:e,droppable:!1}:{draggable:null!=(n=null==e?void 0:e.draggable)?n:t.draggable,droppable:null!=(r=null==e?void 0:e.droppable)?r:t.droppable}}(r,h),x=u.indexOf(i),w=(0,k.useMemo)(()=>({sortable:{containerId:d,index:x,items:u},...o}),[d,o,x,u]),S=(0,k.useMemo)(()=>u.slice(u.indexOf(i)),[u,i]),{rect:E,node:C,isOver:N,setNodeRef:T}=function(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:o}=e;const a=F("Droppable"),{active:i,dispatch:s,over:l,measureDroppableContainers:c}=(0,k.useContext)(xt),u=(0,k.useRef)({disabled:n}),d=(0,k.useRef)(!1),f=(0,k.useRef)(null),h=(0,k.useRef)(null),{disabled:p,updateMeasurementsFor:m,timeout:g}={...Ot,...o},y=D(null!=m?m:r),v=it({callback:(0,k.useCallback)(()=>{d.current?(null!=h.current&&clearTimeout(h.current),h.current=setTimeout(()=>{c(Array.isArray(y.current)?y.current:[y.current]),h.current=null},g)):d.current=!0},[g]),disabled:p||!i}),[b,x]=L((0,k.useCallback)((e,t)=>{v&&(t&&(v.unobserve(t),d.current=!1),e&&v.observe(e))},[v])),w=D(t);return(0,k.useEffect)(()=>{v&&b.current&&(v.disconnect(),d.current=!1,v.observe(b.current))},[b,v]),(0,k.useEffect)(()=>(s({type:J.RegisterDroppable,element:{id:r,key:a,disabled:n,node:b,rect:f,data:w}}),()=>s({type:J.UnregisterDroppable,key:a,id:r})),[r]),(0,k.useEffect)(()=>{n!==u.current.disabled&&(s({type:J.SetDroppableDisabled,id:r,key:a,disabled:n}),u.current.disabled=n)},[r,a,n,s]),{active:i,rect:f,isOver:(null==l?void 0:l.id)===r,node:b,over:l,setNodeRef:x}}({id:i,data:w,disabled:b.droppable,resizeObserverConfig:{updateMeasurementsFor:S,...l}}),{active:j,activatorEvent:R,activeNodeRect:P,attributes:O,setNodeRef:A,listeners:M,isDragging:I,over:z,setActivatorNodeRef:B,transform:U}=Pt({id:i,data:w,attributes:{...Wt,...n},disabled:b.draggable}),V=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,k.useMemo)(()=>e=>{t.forEach(t=>t(e))},t)}(T,A),H=Boolean(j),W=H&&!p&&Dt(f)&&Dt(g),K=!y&&I,G=K&&W?U:null,Y=W?null!=G?G:(null!=s?s:v)({rects:m,activeNodeRect:P,activeIndex:f,overIndex:g,index:x}):null,Q=Dt(f)&&Dt(g)?a({id:i,items:u,activeIndex:f,overIndex:g}):x,X=null==j?void 0:j.id,Z=(0,k.useRef)({activeId:X,items:u,newIndex:Q,containerId:d}),ee=u!==Z.current.items,te=t({active:j,containerId:d,isDragging:I,isSorting:H,id:i,index:x,items:u,newIndex:Z.current.newIndex,previousItems:Z.current.items,previousContainerId:Z.current.containerId,transition:c,wasDragging:null!=Z.current.activeId}),ne=function(e){let{disabled:t,index:n,node:r,rect:o}=e;const[a,i]=(0,k.useState)(null),s=(0,k.useRef)(n);return _(()=>{if(!t&&n!==s.current&&r.current){const e=o.current;if(e){const t=be(r.current,{ignoreTransform:!0}),n={x:e.left-t.left,y:e.top-t.top,scaleX:e.width/t.width,scaleY:e.height/t.height};(n.x||n.y)&&i(n)}}n!==s.current&&(s.current=n)},[t,n,r,o]),(0,k.useEffect)(()=>{a&&i(null)},[a]),a}({disabled:!te,index:x,node:C,rect:E});return(0,k.useEffect)(()=>{H&&Z.current.newIndex!==Q&&(Z.current.newIndex=Q),d!==Z.current.containerId&&(Z.current.containerId=d),u!==Z.current.items&&(Z.current.items=u)},[H,Q,d,u]),(0,k.useEffect)(()=>{if(X===Z.current.activeId)return;if(null!=X&&null==Z.current.activeId)return void(Z.current.activeId=X);const e=setTimeout(()=>{Z.current.activeId=X},50);return()=>clearTimeout(e)},[X]),{active:j,activeIndex:f,attributes:O,data:w,rect:E,index:x,newIndex:Q,items:u,isOver:N,isSorting:H,isDragging:I,listeners:M,node:C,overIndex:g,over:z,setNodeRef:V,setActivatorNodeRef:B,setDroppableNodeRef:T,setDraggableNodeRef:A,transform:null!=ne?ne:Y,transition:function(){if(ne||ee&&Z.current.newIndex===x)return qt;if(K&&!$(R)||!c)return;if(H||te)return q.Transition.toString({...c,property:Ht})}()}}function Gt(e){if(!e)return!1;const t=e.data.current;return!!(t&&"sortable"in t&&"object"==typeof t.sortable&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}var Yt=[De.Down,De.Right,De.Up,De.Left],Qt=(e,t)=>{let{context:{active:n,collisionRect:r,droppableRects:o,droppableContainers:a,over:i,scrollableAncestors:s}}=t;if(Yt.includes(e.code)){if(e.preventDefault(),!n||!r)return;const t=[];a.getEnabled().forEach(n=>{if(!n||null!=n&&n.disabled)return;const a=o.get(n.id);if(a)switch(e.code){case De.Down:r.top<a.top&&t.push(n);break;case De.Up:r.top>a.top&&t.push(n);break;case De.Left:r.left>a.left&&t.push(n);break;case De.Right:r.left<a.left&&t.push(n)}});const u=(e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=le(t),a=[];for(const i of r){const{id:e}=i,t=n.get(e);if(t){const n=le(t),r=o.reduce((e,t,r)=>e+ae(n[r],t),0),s=Number((r/4).toFixed(4));a.push({id:e,data:{droppableContainer:i,value:s}})}}return a.sort(ie)})({active:n,collisionRect:r,droppableRects:o,droppableContainers:t,pointerCoordinates:null});let d=ce(u,"id");if(d===(null==i?void 0:i.id)&&u.length>1&&(d=u[1].id),null!=d){const e=a.get(n.id),t=a.get(d),i=t?o.get(t.id):null,u=null==t?void 0:t.node.current;if(u&&i&&e&&t){const n=we(u).some((e,t)=>s[t]!==e),o=Xt(e,t),a=(c=t,!(!Gt(l=e)||!Gt(c))&&!!Xt(l,c)&&l.data.current.sortable.index<c.data.current.sortable.index),d=n||!o?{x:0,y:0}:{x:a?r.width-i.width:0,y:a?r.height-i.height:0},f={x:i.left,y:i.top};return d.x&&d.y?f:V(f,d)}}}var l,c};function Xt(e,t){return!(!Gt(e)||!Gt(t))&&e.data.current.sortable.containerId===t.data.current.sortable.containerId}var Jt=i(e=>{var t=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function r(e,n,r){var o=null;if(void 0!==r&&(o=""+r),void 0!==n.key&&(o=""+n.key),"key"in n)for(var a in r={},n)"key"!==a&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:o,ref:void 0!==n?n:null,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r}),Zt=i((e,t)=>{t.exports=Jt()}),en=(0,k.createContext)({});function tn(e){const t=(0,k.useRef)(null);return null===t.current&&(t.current=e()),t.current}var nn="undefined"!=typeof window?k.useLayoutEffect:k.useEffect,rn=(0,k.createContext)(null);function on(e,t){-1===e.indexOf(t)&&e.push(t)}function an(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}var sn=(e,t,n)=>n>t?t:n<e?e:n,ln={},cn=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),un=e=>"object"==typeof e&&null!==e,dn=e=>/^0[^.\s]+$/u.test(e);function fn(e){let t;return()=>(void 0===t&&(t=e()),t)}var hn=e=>e,pn=(...e)=>e.reduce((e,t)=>n=>t(e(n))),mn=(e,t,n)=>{const r=t-e;return r?(n-e)/r:1},gn=class{constructor(){this.subscriptions=[]}add(e){return on(this.subscriptions,e),()=>an(this.subscriptions,e)}notify(e,t,n){const r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](e,t,n);else for(let o=0;o<r;o++){const r=this.subscriptions[o];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}},yn=e=>1e3*e,vn=e=>e/1e3,bn=(e,t)=>t?e*(1e3/t):0,xn=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e;function wn(e,t,n,r){if(e===t&&n===r)return hn;const o=t=>function(e,t,n,r,o){let a,i,s=0;do{i=t+(n-t)/2,a=xn(i,r,o)-e,a>0?n=i:t=i}while(Math.abs(a)>1e-7&&++s<12);return i}(t,0,1,e,n);return e=>0===e||1===e?e:xn(o(e),t,r)}var Sn=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,kn=e=>t=>1-e(1-t),En=wn(.33,1.53,.69,.99),Cn=kn(En),Nn=Sn(Cn),Tn=e=>e>=1?1:(e*=2)<1?.5*Cn(e):.5*(2-Math.pow(2,-10*(e-1))),jn=e=>1-Math.sin(Math.acos(e)),Rn=kn(jn),Pn=Sn(jn),On=wn(.42,0,1,1),_n=wn(0,0,.58,1),An=wn(.42,0,.58,1),Dn=e=>Array.isArray(e)&&"number"==typeof e[0],Mn={linear:hn,easeIn:On,easeInOut:An,easeOut:_n,circIn:jn,circInOut:Pn,circOut:Rn,backIn:Cn,backInOut:Nn,backOut:En,anticipate:Tn},Ln=e=>{if(Dn(e)){e.length;const[t,n,r,o]=e;return wn(t,n,r,o)}return"string"==typeof e?Mn[e]:e},In=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],zn={value:null,addProjectionMetrics:null};function Fn(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,i=In.reduce((e,n)=>(e[n]=function(e,t){let n=new Set,r=new Set,o=!1,a=!1;const i=new WeakSet;let s={delta:0,timestamp:0,isProcessing:!1},l=0;function c(t){i.has(t)&&(u.schedule(t),e()),l++,t(s)}const u={schedule:(e,t=!1,a=!1)=>{const s=a&&o?n:r;return t&&i.add(e),s.add(e),e},cancel:e=>{r.delete(e),i.delete(e)},process:e=>{if(s=e,o)return void(a=!0);o=!0;const i=n;n=r,r=i,n.forEach(c),t&&zn.value&&zn.value.frameloop[t].push(l),l=0,n.clear(),o=!1,a&&(a=!1,u.process(e))}};return u}(a,t?n:void 0),e),{}),{setup:s,read:l,resolveKeyframes:c,preUpdate:u,update:d,preRender:f,render:h,postRender:p}=i,m=()=>{const a=ln.useManualTiming,i=a?o.timestamp:performance.now();n=!1,a||(o.delta=r?1e3/60:Math.max(Math.min(i-o.timestamp,40),1)),o.timestamp=i,o.isProcessing=!0,s.process(o),l.process(o),c.process(o),u.process(o),d.process(o),f.process(o),h.process(o),p.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(m))};return{schedule:In.reduce((t,a)=>{const s=i[a];return t[a]=(t,a=!1,i=!1)=>(n||(n=!0,r=!0,o.isProcessing||e(m)),s.schedule(t,a,i)),t},{}),cancel:e=>{for(let t=0;t<In.length;t++)i[In[t]].cancel(e)},state:o,steps:i}}var Bn,{schedule:Un,cancel:Vn,state:$n,steps:Hn}=Fn("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:hn,!0);function qn(){Bn=void 0}var Wn={now:()=>(void 0===Bn&&Wn.set($n.isProcessing||ln.useManualTiming?$n.timestamp:performance.now()),Bn),set:e=>{Bn=e,queueMicrotask(qn)}},Kn={layout:0,mainThread:0,waapi:0},Gn=e=>t=>"string"==typeof t&&t.startsWith(e),Yn=Gn("--"),Qn=Gn("var(--"),Xn=e=>!!Qn(e)&&Jn.test(e.split("/*")[0].trim()),Jn=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Zn(e){return"string"==typeof e&&e.split("/*")[0].includes("var(--")}var er={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},tr={...er,transform:e=>sn(0,1,e)},nr={...er,default:1},rr=e=>Math.round(1e5*e)/1e5,or=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;var ar=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,ir=(e,t)=>n=>Boolean("string"==typeof n&&ar.test(n)&&n.startsWith(e)||t&&!function(e){return null==e}(n)&&Object.prototype.hasOwnProperty.call(n,t)),sr=(e,t,n)=>r=>{if("string"!=typeof r)return r;const[o,a,i,s]=r.match(or);return{[e]:parseFloat(o),[t]:parseFloat(a),[n]:parseFloat(i),alpha:void 0!==s?parseFloat(s):1}},lr={...er,transform:e=>Math.round((e=>sn(0,255,e))(e))},cr={test:ir("rgb","red"),parse:sr("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+lr.transform(e)+", "+lr.transform(t)+", "+lr.transform(n)+", "+rr(tr.transform(r))+")"};var ur={test:ir("#"),parse:function(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}},transform:cr.transform},dr=e=>({test:t=>"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),fr=dr("deg"),hr=dr("%"),pr=dr("px"),mr=dr("vh"),gr=dr("vw"),yr=(()=>({...hr,parse:e=>hr.parse(e)/100,transform:e=>hr.transform(100*e)}))(),vr={test:ir("hsl","hue"),parse:sr("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+hr.transform(rr(t))+", "+hr.transform(rr(n))+", "+rr(tr.transform(r))+")"},br={test:e=>cr.test(e)||ur.test(e)||vr.test(e),parse:e=>cr.test(e)?cr.parse(e):vr.test(e)?vr.parse(e):ur.parse(e),transform:e=>"string"==typeof e?e:e.hasOwnProperty("red")?cr.transform(e):vr.transform(e),getAnimatableNone:e=>{const t=br.parse(e);return t.alpha=0,br.transform(t)}},xr=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;var wr="number",Sr="color",kr=/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 Er(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let a=0;return{values:n,split:t.replace(kr,e=>(br.test(e)?(r.color.push(a),o.push(Sr),n.push(br.parse(e))):e.startsWith("var(")?(r.var.push(a),o.push("var"),n.push(e)):(r.number.push(a),o.push(wr),n.push(parseFloat(e))),++a,"${}")).split("${}"),indexes:r,types:o}}function Cr({split:e,types:t}){const n=e.length;return r=>{let o="";for(let a=0;a<n;a++)if(o+=e[a],void 0!==r[a]){const e=t[a];o+=e===wr?rr(r[a]):e===Sr?br.transform(r[a]):r[a]}return o}}var Nr=(e,t)=>{return"number"==typeof e?t?.trim().endsWith("/")?e:0:"number"==typeof(n=e)?0:br.test(n)?br.getAnimatableNone(n):n;var n};var Tr={test:function(e){return isNaN(e)&&"string"==typeof e&&(e.match(or)?.length||0)+(e.match(xr)?.length||0)>0},parse:function(e){return Er(e).values},createTransformer:function(e){return Cr(Er(e))},getAnimatableNone:function(e){const t=Er(e);return Cr(t)(t.values.map((e,n)=>Nr(e,t.split[n])))}};function jr(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Rr(e,t){return n=>n>0?t:e}var Pr=(e,t,n)=>e+(t-e)*n,Or=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},_r=[ur,cr,vr];function Ar(e){const t=(n=e,_r.find(e=>e.test(n)));var n;if(Boolean(t),!Boolean(t))return!1;let r=t.parse(e);return t===vr&&(r=function({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,n/=100;let o=0,a=0,i=0;if(t/=100){const r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;o=jr(s,r,e+1/3),a=jr(s,r,e),i=jr(s,r,e-1/3)}else o=a=i=n;return{red:Math.round(255*o),green:Math.round(255*a),blue:Math.round(255*i),alpha:r}}(r)),r}var Dr=(e,t)=>{const n=Ar(e),r=Ar(t);if(!n||!r)return Rr(e,t);const o={...n};return e=>(o.red=Or(n.red,r.red,e),o.green=Or(n.green,r.green,e),o.blue=Or(n.blue,r.blue,e),o.alpha=Pr(n.alpha,r.alpha,e),cr.transform(o))},Mr=new Set(["none","hidden"]);function Lr(e,t){return n=>Pr(e,t,n)}function Ir(e){return"number"==typeof e?Lr:"string"==typeof e?Xn(e)?Rr:br.test(e)?Dr:Br:Array.isArray(e)?zr:"object"==typeof e?br.test(e)?Dr:Fr:Rr}function zr(e,t){const n=[...e],r=n.length,o=e.map((e,n)=>Ir(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=o[t](e);return n}}function Fr(e,t){const n={...e,...t},r={};for(const o in n)void 0!==e[o]&&void 0!==t[o]&&(r[o]=Ir(e[o])(e[o],t[o]));return e=>{for(const t in r)n[t]=r[t](e);return n}}var Br=(e,t)=>{const n=Tr.createTransformer(t),r=Er(e),o=Er(t);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?Mr.has(e)&&!o.values.length||Mr.has(t)&&!r.values.length?function(e,t){return Mr.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}(e,t):pn(zr(function(e,t){const n=[],r={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const a=t.types[o],i=e.indexes[a][r[a]];n[o]=e.values[i]??0,r[a]++}return n}(r,o),o.values),n):Rr(e,t)};function Ur(e,t,n){return"number"==typeof e&&"number"==typeof t&&"number"==typeof n?Pr(e,t,n):Ir(e)(e,t)}var Vr=e=>{const t=({timestamp:t})=>e(t);return{start:(e=!0)=>Un.update(t,e),stop:()=>Vn(t),now:()=>$n.isProcessing?$n.timestamp:Wn.now()}},$r=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let a=0;a<o;a++)r+=Math.round(1e4*e(a/(o-1)))/1e4+", ";return`linear(${r.substring(0,r.length-2)})`};function Hr(e){let t=0;let n=e.next(t);for(;!n.done&&t<2e4;)t+=50,n=e.next(t);return t>=2e4?1/0:t}var qr=100,Wr=10,Kr=1,Gr=0,Yr=800,Qr=.3,Xr=.3,Jr={granular:.01,default:2},Zr={granular:.005,default:.5},eo=.01,to=10,no=.05,ro=1;function oo(e,t){return e*Math.sqrt(1-t*t)}var ao=["duration","bounce"],io=["stiffness","damping","mass"];function so(e,t){return t.some(t=>void 0!==e[t])}function lo(e){let t={velocity:Gr,stiffness:qr,damping:Wr,mass:Kr,isResolvedFromDuration:!1,...e};if(!so(e,io)&&so(e,ao))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(1.2*n),o=r*r,a=2*sn(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:Kr,stiffness:o,damping:a}}else{const n=function({duration:e=Yr,bounce:t=Qr,velocity:n=Gr,mass:r=Kr}){let o,a;yn(to);let i=1-t;i=sn(no,ro,i),e=sn(eo,to,vn(e)),i<1?(o=t=>{const r=t*i,o=r*e;return.001-(r-n)/oo(t,i)*Math.exp(-o)},a=t=>{const r=t*i*e,a=r*n+n,s=Math.pow(i,2)*Math.pow(t,2)*e,l=Math.exp(-r),c=oo(Math.pow(t,2),i);return(.001-o(t)>0?-1:1)*((a-s)*l)/c}):(o=t=>Math.exp(-t*e)*((t-n)*e+1)-.001,a=t=>Math.exp(-t*e)*(e*e*(n-t)));const s=function(e,t,n){let r=n;for(let o=1;o<12;o++)r-=e(r)/t(r);return r}(o,a,5/e);if(e=yn(e),isNaN(s))return{stiffness:qr,damping:Wr,duration:e};{const t=Math.pow(s,2)*r;return{stiffness:t,damping:2*i*Math.sqrt(r*t),duration:e}}}({...e,velocity:0});t={...t,...n,mass:Kr},t.isResolvedFromDuration=!0}return t}function co(e=Xr,t=Qr){const n="object"!=typeof e?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:o}=n;const a=n.keyframes[0],i=n.keyframes[n.keyframes.length-1],s={done:!1,value:a},{stiffness:l,damping:c,mass:u,duration:d,velocity:f,isResolvedFromDuration:h}=lo({...n,velocity:-vn(n.velocity||0)}),p=f||0,m=c/(2*Math.sqrt(l*u)),g=i-a,y=vn(Math.sqrt(l/u)),v=Math.abs(g)<5;let b,x,w,S,k,E;if(r||(r=v?Jr.granular:Jr.default),o||(o=v?Zr.granular:Zr.default),m<1)w=oo(y,m),S=(p+m*y*g)/w,b=e=>i-Math.exp(-m*y*e)*(S*Math.sin(w*e)+g*Math.cos(w*e)),k=m*y*S+g*w,E=m*y*g-S*w,x=e=>Math.exp(-m*y*e)*(k*Math.sin(w*e)+E*Math.cos(w*e));else if(1===m){b=e=>i-Math.exp(-y*e)*(g+(p+y*g)*e);const e=p+y*g;x=t=>Math.exp(-y*t)*(y*e*t-p)}else{const e=y*Math.sqrt(m*m-1);b=t=>{const n=Math.exp(-m*y*t),r=Math.min(e*t,300);return i-n*((p+m*y*g)*Math.sinh(r)+e*g*Math.cosh(r))/e};const t=(p+m*y*g)/e,n=m*y*t-g*e,r=m*y*g-t*e;x=t=>{const o=Math.exp(-m*y*t),a=Math.min(e*t,300);return o*(n*Math.sinh(a)+r*Math.cosh(a))}}const C={calculatedDuration:h&&d||null,velocity:e=>yn(x(e)),next:e=>{if(!h&&m<1){const t=Math.exp(-m*y*e),n=Math.sin(w*e),a=Math.cos(w*e),l=i-t*(S*n+g*a),c=yn(t*(k*n+E*a));return s.done=Math.abs(c)<=r&&Math.abs(i-l)<=o,s.value=s.done?i:l,s}const t=b(e);if(h)s.done=e>=d;else{const n=yn(x(e));s.done=Math.abs(n)<=r&&Math.abs(i-t)<=o}return s.value=s.done?i:t,s},toString:()=>{const e=Math.min(Hr(C),2e4),t=$r(t=>C.next(e*t).value,e,30);return e+"ms "+t},toTransition:()=>{}};return C}co.applyToOptions=e=>{const t=function(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(Hr(r),2e4);return{type:"keyframes",ease:e=>r.next(o*e).value/t,duration:vn(o)}}(e,100,co);return e.ease=t.ease,e.duration=yn(t.duration),e.type="keyframes",e};function uo(e,t,n){const r=Math.max(t-5,0);return bn(n-e(r),t-r)}function fo({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:a=500,modifyTarget:i,min:s,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],f={done:!1,value:d},h=e=>void 0===s?l:void 0===l||Math.abs(s-e)<Math.abs(l-e)?s:l;let p=n*t;const m=d+p,g=void 0===i?m:i(m);g!==m&&(p=g-d);const y=e=>-p*Math.exp(-e/r),v=e=>g+y(e),b=e=>{const t=y(e),n=v(e);f.done=Math.abs(t)<=c,f.value=f.done?g:n};let x,w;const S=e=>{var t;(t=f.value,void 0!==s&&t<s||void 0!==l&&t>l)&&(x=e,w=co({keyframes:[f.value,h(f.value)],velocity:uo(v,e,f.value),damping:o,stiffness:a,restDelta:c,restSpeed:u}))};return S(0),{calculatedDuration:null,next:e=>{let t=!1;return w||void 0!==x||(t=!0,b(e),S(e)),void 0!==x&&e>=x?w.next(e-x):(!t&&b(e),f)}}}function ho(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const a=e.length;if(t.length,1===a)return()=>t[0];if(2===a&&t[0]===t[1])return()=>t[1];const i=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=function(e,t,n){const r=[],o=n||ln.mix||Ur,a=e.length-1;for(let i=0;i<a;i++){let n=o(e[i],e[i+1]);t&&(n=pn(Array.isArray(t)?t[i]||hn:t,n)),r.push(n)}return r}(t,r,o),l=s.length,c=n=>{if(i&&n<e[0])return t[0];let r=0;if(l>1)for(;r<e.length-2&&!(n<e[r+1]);r++);const o=mn(e[r],e[r+1],n);return s[r](o)};return n?t=>c(sn(e[0],e[a-1],t)):c}function po(e){const t=[0];return function(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=mn(0,t,r);e.push(Pr(n,1,o))}}(t,e.length-1),t}function mo({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=(e=>Array.isArray(e)&&"number"!=typeof e[0])(r)?r.map(Ln):Ln(r),a={done:!1,value:t[0]},i=ho(function(e,t){return e.map(e=>e*t)}(n&&n.length===t.length?n:po(t),e),t,{ease:Array.isArray(o)?o:(s=t,l=o,s.map(()=>l||An).splice(0,s.length-1))});var s,l;return{calculatedDuration:e,next:t=>(a.value=i(t),a.done=t>=e,a)}}var go=e=>null!==e;function yo(e,{repeat:t,repeatType:n="loop"},r,o=1){const a=e.filter(go),i=o<0||t&&"loop"!==n&&t%2==1?0:a.length-1;return i&&void 0!==r?r:a[i]}var vo={decay:fo,inertia:fo,tween:mo,keyframes:mo,spring:co};function bo(e){"string"==typeof e.type&&(e.type=vo[e.type])}var xo=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)}},wo=e=>e/100,So=class extends xo{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=()=>{const{motionValue:e}=this.options;e&&e.updatedAt!==Wn.now()&&this.tick(Wn.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},Kn.mainThread++,this.options=e,this.initAnimation(),this.play(),!1===e.autoplay&&this.pause()}initAnimation(){const{options:e}=this;bo(e);const{type:t=mo,repeat:n=0,repeatDelay:r=0,repeatType:o,velocity:a=0}=e;let{keyframes:i}=e;const s=t||mo;s!==mo&&"number"!=typeof i[0]&&(this.mixKeyframes=pn(wo,Ur(i[0],i[1])),i=[0,100]);const l=s({...e,keyframes:i});"mirror"===o&&(this.mirroredGenerator=s({...e,keyframes:[...i].reverse(),velocity:-a})),null===l.calculatedDuration&&(l.calculatedDuration=Hr(l));const{calculatedDuration:c}=l;this.calculatedDuration=c,this.resolvedDuration=c+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=l}updateTime(e){const t=Math.round(e-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=t}tick(e,t=!1){const{generator:n,totalDuration:r,mixKeyframes:o,mirroredGenerator:a,resolvedDuration:i,calculatedDuration:s}=this;if(null===this.startTime)return n.next(0);const{delay:l=0,keyframes:c,repeat:u,repeatType:d,repeatDelay:f,type:h,onUpdate:p,finalKeyframe:m}=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);const g=this.currentTime-l*(this.playbackSpeed>=0?1:-1),y=this.playbackSpeed>=0?g<0:g>r;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=r);let v,b=this.currentTime,x=n;if(u){const e=Math.min(this.currentTime,r)/i;let t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),1===n&&t--,t=Math.min(t,u+1),Boolean(t%2)&&("reverse"===d?(n=1-n,f&&(n-=f/i)):"mirror"===d&&(x=a)),b=sn(0,1,n)*i}y?(this.delayState.value=c[0],v=this.delayState):v=x.next(b),o&&!y&&(v.value=o(v.value));let{done:w}=v;y||null===s||(w=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);const S=null===this.holdTime&&("finished"===this.state||"running"===this.state&&w);return S&&h!==fo&&(v.value=yo(c,this.options,m,this.speed)),p&&p(v.value),S&&this.finish(),v}then(e,t){return this.finished.then(e,t)}get duration(){return vn(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+vn(e)}get time(){return vn(this.currentTime)}set time(e){e=yn(e),this.currentTime=e,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?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(){const e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);return uo(e=>this.generator.next(e).value,e,this.generator.next(e).value)}get speed(){return this.playbackSpeed}set speed(e){const t=this.playbackSpeed!==e;t&&this.driver&&this.updateTime(Wn.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=vn(this.currentTime))}play(){if(this.isStopped)return;const{driver:e=Vr,startTime:t}=this.options;this.driver||(this.driver=e(e=>this.tick(e))),this.options.onPlay?.();const n=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=n):null!==this.holdTime?this.startTime=n-this.holdTime:this.startTime||(this.startTime=t??n),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Wn.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&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,Kn.mainThread--}stopDriver(){this.driver&&(this.driver.stop(),this.driver=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)}};var ko=e=>180*e/Math.PI,Eo=e=>No(ko(Math.atan2(e[1],e[0]))),Co={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Eo,rotateZ:Eo,skewX:e=>ko(Math.atan(e[1])),skewY:e=>ko(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},No=e=>((e%=360)<0&&(e+=360),e),To=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),jo=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Ro={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:To,scaleY:jo,scale:e=>(To(e)+jo(e))/2,rotateX:e=>No(ko(Math.atan2(e[6],e[5]))),rotateY:e=>No(ko(Math.atan2(-e[2],e[0]))),rotateZ:Eo,rotate:Eo,skewX:e=>ko(Math.atan(e[4])),skewY:e=>ko(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Po(e){return e.includes("scale")?1:0}function Oo(e,t){if(!e||"none"===e)return Po(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=Ro,o=n;else{const t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=Co,o=t}if(!o)return Po(t);const a=r[t],i=o[1].split(",").map(_o);return"function"==typeof a?a(i):i[a]}function _o(e){return parseFloat(e.trim())}var Ao=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Do=(()=>new Set([...Ao,"pathRotation"]))(),Mo=e=>e===er||e===pr,Lo=new Set(["x","y","z"]),Io=Ao.filter(e=>!Lo.has(e));var zo={width:({x:e},{paddingLeft:t="0",paddingRight:n="0",boxSizing:r})=>{const o=e.max-e.min;return"border-box"===r?o:o-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t="0",paddingBottom:n="0",boxSizing:r})=>{const o=e.max-e.min;return"border-box"===r?o:o-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})=>Oo(t,"x"),y:(e,{transform:t})=>Oo(t,"y")};zo.translateX=zo.x,zo.translateY=zo.y;var Fo=new Set,Bo=!1,Uo=!1,Vo=!1;function $o(){if(Uo){const e=Array.from(Fo).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{const t=function(e){const t=[];return Io.forEach(n=>{const r=e.getValue(n);void 0!==r&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}(e);t.length&&(n.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();const t=n.get(e);t&&t.forEach(([t,n])=>{e.getValue(t)?.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{void 0!==e.suspendedScrollY&&window.scrollTo(0,e.suspendedScrollY)})}Uo=!1,Bo=!1,Fo.forEach(e=>e.complete(Vo)),Fo.clear()}function Ho(){Fo.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Uo=!0)})}var qo=class{constructor(e,t,n,r,o,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=o,this.isAsync=a}scheduleResolve(){this.state="scheduled",this.isAsync?(Fo.add(this),Bo||(Bo=!0,Un.read(Ho),Un.resolveKeyframes($o))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(null===e[0]){const o=r?.get(),a=e[e.length-1];if(void 0!==o)e[0]=o;else if(n&&t){const r=n.readValue(t,a);null!=r&&(e[0]=r)}void 0===e[0]&&(e[0]=a),r&&void 0===o&&r.set(e[0])}!function(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),Fo.delete(this)}cancel(){"scheduled"===this.state&&(Fo.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}};function Wo(e,t,n){(e=>e.startsWith("--"))(t)?e.style.setProperty(t,n):e.style[t]=n}var Ko={};function Go(e,t){const n=fn(e);return()=>Ko[t]??n()}var Yo=Go(()=>void 0!==window.ScrollTimeline,"scrollTimeline"),Qo=Go(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(e){return!1}return!0},"linearEasing"),Xo=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Jo={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Xo([0,.65,.55,1]),circOut:Xo([.55,0,1,.45]),backIn:Xo([.31,.01,.66,-.59]),backOut:Xo([.33,1.53,.69,.99])};function Zo(e,t){return e?"function"==typeof e?Qo()?$r(e,t):"ease-out":Dn(e)?Xo(e):Array.isArray(e)?e.map(e=>Zo(e,t)||Jo.easeOut):Jo[e]:void 0}function ea(e,t,n,{delay:r=0,duration:o=300,repeat:a=0,repeatType:i="loop",ease:s="easeOut",times:l}={},c=void 0){const u={[t]:n};l&&(u.offset=l);const d=Zo(s,o);Array.isArray(d)&&(u.easing=d),zn.value&&Kn.waapi++;const f={delay:r,duration:o,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:a+1,direction:"reverse"===i?"alternate":"normal"};c&&(f.pseudoElement=c);const h=e.animate(u,f);return zn.value&&h.finished.finally(()=>{Kn.waapi--}),h}function ta(e){return"function"==typeof e&&"applyToOptions"in e}var na=class extends xo{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:t,name:n,keyframes:r,pseudoElement:o,allowFlatten:a=!1,finalKeyframe:i,onComplete:s}=e;this.isPseudoElement=Boolean(o),this.allowFlatten=a,this.options=e,e.type;const l=function({type:e,...t}){return ta(e)&&Qo()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}(e);this.animation=ea(t,n,r,l,o),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const e=yo(r,this.options,i,this.speed);this.updateMotionValue&&this.updateMotionValue(e),Wo(t,n,e),this.animation.cancel()}s?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(e){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;"idle"!==e&&"finished"!==e&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){const e=this.animation.effect?.getComputedTiming?.().duration||0;return vn(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+vn(e)}get time(){return vn(Number(this.animation.currentTime)||0)}set time(e){const t=null!==this.finishedTime;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=yn(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 null!==this.finishedTime?"finished":this.animation.playState}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&&Yo()?(this.animation.timeline=e,t&&(this.animation.rangeStart=t),n&&(this.animation.rangeEnd=n),hn):r(this)}},ra={anticipate:Tn,backInOut:Nn,circInOut:Pn};function oa(e){"string"==typeof e.ease&&e.ease in ra&&(e.ease=ra[e.ease])}var aa=class extends na{constructor(e){oa(e),bo(e),super(e),void 0!==e.startTime&&!1!==e.autoplay&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:t,onUpdate:n,onComplete:r,element:o,...a}=this.options;if(!t)return;if(void 0!==e)return void t.set(e);const i=new So({...a,autoplay:!1}),s=Math.max(10,Wn.now()-this.startTime),l=sn(0,10,s-10),c=i.sample(s).value,{name:u}=this.options;o&&u&&Wo(o,u,c),t.setWithVelocity(i.sample(Math.max(0,s-l)).value,c,l),i.stop()}},ia=(e,t)=>"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!Tr.test(e)&&"0"!==e||e.startsWith("url(")));function sa(e){e.duration=0,e.type="keyframes"}var la=new Set(["opacity","clipPath","filter","transform"]),ca=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;var ua=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),da=fn(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function fa(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:o,damping:a,type:i,keyframes:s}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=t.owner.getProps();return da()&&n&&(la.has(n)||ua.has(n)&&function(e){for(let t=0;t<e.length;t++)if("string"==typeof e[t]&&ca.test(e[t]))return!0;return!1}(s))&&("transform"!==n||!c)&&!l&&!r&&"mirror"!==o&&0!==a&&"inertia"!==i}var ha=class extends xo{constructor({autoplay:e=!0,delay:t=0,type:n="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:a="loop",keyframes:i,name:s,motionValue:l,element:c,...u}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Wn.now();const d={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:o,repeatType:a,name:s,motionValue:l,element:c,...u},f=c?.KeyframeResolver||qo;this.keyframeResolver=new f(i,(e,t,n)=>this.onKeyframesResolved(e,t,d,!n),s,l,c),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,r){this.keyframeResolver=void 0;const{name:o,type:a,velocity:i,delay:s,isHandoff:l,onUpdate:c}=n;this.resolvedAt=Wn.now();let u=!0;(function(e,t,n,r){const o=e[0];if(null===o)return!1;if("display"===t||"visibility"===t)return!0;const a=e[e.length-1],i=ia(o,t),s=ia(a,t);return!(!i||!s)&&(function(e){const t=e[0];if(1===e.length)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}(e)||("spring"===n||ta(n))&&r)})(e,o,a,i)||(u=!1,!ln.instantAnimations&&s||c?.(yo(e,n,t)),e[0]=e[e.length-1],sa(n),n.repeat=0);const d={startTime:r?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},f=u&&!l&&fa(d),h=d.motionValue?.owner?.current;let p;if(f)try{p=new aa({...d,element:h})}catch{p=new So(d)}else p=new So(d);p.finished.then(()=>{this.notifyFinished()}).catch(hn),this.pendingTimeline&&(this.stopTimeline=p.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=p}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(),Vo=!0,Ho(),$o(),Vo=!1),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 pa(e,t){if(e?.inherit&&t){const{inherit:n,...r}=e;return{...t,...r}}return e}function ma(e,t){const n=e?.[t]??e?.default??e;return n!==e?pa(n,e):n}var ga={type:"spring",stiffness:500,damping:25,restSpeed:10},ya={type:"keyframes",duration:.8},va={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},ba=(e,{keyframes:t})=>t.length>2?ya:Do.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===t[1]?2*Math.sqrt(550):30,restSpeed:10}:ga:va,xa=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);var wa=(e,t,n,r={},o,a)=>i=>{const s=ma(r,e)||{},l=s.delay||r.delay||0;let{elapsed:c=0}=r;c-=yn(l);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-c,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{i(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:o};(function(e){for(const t in e)if(!xa.has(t))return!0;return!1})(s)||Object.assign(u,ba(e,u)),u.duration&&(u.duration=yn(u.duration)),u.repeatDelay&&(u.repeatDelay=yn(u.repeatDelay)),void 0!==u.from&&(u.keyframes[0]=u.from);let d=!1;if((!1===u.type||0===u.duration&&!u.repeatDelay)&&(sa(u),0===u.delay&&(d=!0)),(ln.instantAnimations||ln.skipAnimations||o?.shouldSkipAnimations||s.skipAnimations)&&(d=!0,sa(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!a&&void 0!==t.get()){const e=yo(u.keyframes,s);if(void 0!==e)return void Un.update(()=>{u.onUpdate(e),u.onComplete()})}return s.isSync?new So(u):new ha(u)};function Sa(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}var ka="data-"+Sa("framerAppearId"),{schedule:Ea,cancel:Ca}=Fn(queueMicrotask,!1),Na={x:!1,y:!1};function Ta(){return Na.x||Na.y}function ja(e,t,n){if(null==e)return[];if(e instanceof EventTarget)return[e];if("string"==typeof e){let r=document;t&&(r=t.current);const o=n?.[e]??r.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e).filter(e=>null!=e)}function Ra(e,t){const n=ja(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function Pa(e,t,n={}){const[r,o,a]=Ra(e,n);return r.forEach(e=>{let n,r=!1,a=!1;const i=t=>{n&&(n(t),n=void 0),e.removeEventListener("pointerleave",l)},s=e=>{r=!1,window.removeEventListener("pointerup",s),window.removeEventListener("pointercancel",s),a&&(a=!1,i(e))},l=e=>{"touch"!==e.pointerType&&(r?a=!0:i(e))};e.addEventListener("pointerenter",r=>{if("touch"===r.pointerType||Ta())return;a=!1;const i=t(e,r);"function"==typeof i&&(n=i,e.addEventListener("pointerleave",l,o))},o),e.addEventListener("pointerdown",()=>{r=!0,window.addEventListener("pointerup",s,o),window.addEventListener("pointercancel",s,o)},o)}),a}function Oa(e){return un(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}var _a=(e,t)=>!!t&&(e===t||_a(e,t.parentElement)),Aa=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary,Da=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);var Ma=new Set(["INPUT","SELECT","TEXTAREA"]);var La=new WeakSet;function Ia(e){return t=>{"Enter"===t.key&&e(t)}}function za(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}function Fa(e){return Aa(e)&&!Ta()}var Ba=new WeakSet;function Ua(e,t,n={}){const[r,o,a]=Ra(e,n),i=e=>{const r=e.currentTarget;if(!Fa(e))return;if(Ba.has(e))return;La.add(r),n.stopPropagation&&Ba.add(e);const a=t(r,e),i=(e,t)=>{window.removeEventListener("pointerup",s),window.removeEventListener("pointercancel",l),La.has(r)&&La.delete(r),Fa(e)&&"function"==typeof a&&a(e,{success:t})},s=e=>{i(e,r===window||r===document||n.useGlobalTarget||_a(r,e.target))},l=e=>{i(e,!1)};window.addEventListener("pointerup",s,o),window.addEventListener("pointercancel",l,o)};return r.forEach(e=>{var t;(n.useGlobalTarget?window:e).addEventListener("pointerdown",i,o),Oa(e)&&(e.addEventListener("focus",e=>((e,t)=>{const n=e.currentTarget;if(!n)return;const r=Ia(()=>{if(La.has(n))return;za(n,"down");const e=Ia(()=>{za(n,"up")});n.addEventListener("keyup",e,t),n.addEventListener("blur",()=>za(n,"cancel"),t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)})(e,o)),t=e,Da.has(t.tagName)||!0===t.isContentEditable||e.hasAttribute("tabindex")||(e.tabIndex=0))}),a}function Va(e){return un(e)&&"ownerSVGElement"in e}var $a,Ha=new WeakMap,qa=(e,t,n)=>(r,o)=>o&&o[0]?o[0][e+"Size"]:Va(r)&&"getBBox"in r?r.getBBox()[t]:r[n],Wa=qa("inline","width","offsetWidth"),Ka=qa("block","height","offsetHeight");function Ga({target:e,borderBoxSize:t}){Ha.get(e)?.forEach(n=>{n(e,{get width(){return Wa(e,t)},get height(){return Ka(e,t)}})})}function Ya(e){e.forEach(Ga)}function Qa(e,t){$a||"undefined"!=typeof ResizeObserver&&($a=new ResizeObserver(Ya));const n=ja(e);return n.forEach(e=>{let n=Ha.get(e);n||(n=new Set,Ha.set(e,n)),n.add(t),$a?.observe(e)}),()=>{n.forEach(e=>{const n=Ha.get(e);n?.delete(t),n?.size||$a?.unobserve(e)})}}var Xa,Ja=new Set;function Za(e){return Ja.add(e),Xa||(Xa=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};Ja.forEach(t=>t(e))},window.addEventListener("resize",Xa)),()=>{Ja.delete(e),Ja.size||"function"!=typeof Xa||(window.removeEventListener("resize",Xa),Xa=void 0)}}function ei(e,t){return"function"==typeof e?Za(e):Qa(e,t)}var ti=e=>Boolean(e&&e.getVelocity);function ni(e,t){const n=e.getValue("willChange");if(r=n,Boolean(ti(r)&&r.add))return n.add(t);if(!n&&ln.WillChange){const n=new ln.WillChange("auto");e.addValue("willChange",n),n.add(t)}var r}var ri=class{constructor(e){this.isMounted=!1,this.node=e}update(){}};function oi({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function ai(e){return void 0===e||1===e}function ii({scale:e,scaleX:t,scaleY:n}){return!ai(e)||!ai(t)||!ai(n)}function si(e){return ii(e)||li(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function li(e){return ci(e.x)||ci(e.y)}function ci(e){return e&&"0%"!==e}function ui(e,t,n){return n+t*(e-n)}function di(e,t,n,r,o){return void 0!==o&&(e=ui(e,o,r)),ui(e,n,r)+t}function fi(e,t=0,n=1,r,o){e.min=di(e.min,t,n,r,o),e.max=di(e.max,t,n,r,o)}function hi(e,{x:t,y:n}){fi(e.x,t.translate,t.scale,t.originPoint),fi(e.y,n.translate,n.scale,n.originPoint)}var pi=.999999999999,mi=1.0000000000001;function gi(e,t){e.min+=t,e.max+=t}function yi(e,t,n,r,o=.5){fi(e,t,n,Pr(e.min,e.max,o),r)}function vi(e,t){return"string"==typeof e?parseFloat(e)/100*(t.max-t.min):e}function bi(e,t,n){const r=n??e;yi(e.x,vi(t.x,r.x),t.scaleX,t.scale,t.originX),yi(e.y,vi(t.y,r.y),t.scaleY,t.scale,t.originY)}function xi(e,t){return oi(function(e,t){if(!t)return e;const 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}}(e.getBoundingClientRect(),t))}var wi=new Set(["width","height","top","left","right","bottom",...Ao]),Si=e=>t=>t.test(e),ki=[er,pr,hr,fr,gr,mr,{test:e=>"auto"===e,parse:e=>e}],Ei=e=>ki.find(Si(e)),Ci=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Ni(e,t,n=1){const[r,o]=function(e){const t=Ci.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}(e);if(!r)return;const a=window.getComputedStyle(t).getPropertyValue(r);if(a){const e=a.trim();return cn(e)?parseFloat(e):e}return Xn(o)?Ni(o,t,n+1):o}function Ti(e){return"number"==typeof e?0===e:null===e||("none"===e||"0"===e||dn(e))}var ji=new Set(["brightness","contrast","saturate","opacity"]);function Ri(e){const[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;const[r]=n.match(or)||[];if(!r)return e;const o=n.replace(r,"");let a=ji.has(t)?1:0;return r!==n&&(a*=100),t+"("+a+o+")"}var Pi=/\b([a-z-]*)\(.*?\)/gu,Oi={...Tr,getAnimatableNone:e=>{const t=e.match(Pi);return t?t.map(Ri).join(" "):e}},_i={...Tr,getAnimatableNone:e=>{const t=Tr.parse(e);return Tr.createTransformer(e)(t.map(e=>"number"==typeof e?0:"object"==typeof e?{...e,alpha:1}:e))}},Ai={...er,transform:Math.round},Di={borderWidth:pr,borderTopWidth:pr,borderRightWidth:pr,borderBottomWidth:pr,borderLeftWidth:pr,borderRadius:pr,borderTopLeftRadius:pr,borderTopRightRadius:pr,borderBottomRightRadius:pr,borderBottomLeftRadius:pr,width:pr,maxWidth:pr,height:pr,maxHeight:pr,top:pr,right:pr,bottom:pr,left:pr,inset:pr,insetBlock:pr,insetBlockStart:pr,insetBlockEnd:pr,insetInline:pr,insetInlineStart:pr,insetInlineEnd:pr,padding:pr,paddingTop:pr,paddingRight:pr,paddingBottom:pr,paddingLeft:pr,paddingBlock:pr,paddingBlockStart:pr,paddingBlockEnd:pr,paddingInline:pr,paddingInlineStart:pr,paddingInlineEnd:pr,margin:pr,marginTop:pr,marginRight:pr,marginBottom:pr,marginLeft:pr,marginBlock:pr,marginBlockStart:pr,marginBlockEnd:pr,marginInline:pr,marginInlineStart:pr,marginInlineEnd:pr,fontSize:pr,backgroundPositionX:pr,backgroundPositionY:pr,...{rotate:fr,pathRotation:fr,rotateX:fr,rotateY:fr,rotateZ:fr,scale:nr,scaleX:nr,scaleY:nr,scaleZ:nr,skew:fr,skewX:fr,skewY:fr,distance:pr,translateX:pr,translateY:pr,translateZ:pr,x:pr,y:pr,z:pr,perspective:pr,transformPerspective:pr,opacity:tr,originX:yr,originY:yr,originZ:pr},zIndex:Ai,fillOpacity:tr,strokeOpacity:tr,numOctaves:Ai},Mi={...Di,color:br,backgroundColor:br,outlineColor:br,fill:br,stroke:br,borderColor:br,borderTopColor:br,borderRightColor:br,borderBottomColor:br,borderLeftColor:br,filter:Oi,WebkitFilter:Oi,mask:_i,WebkitMask:_i},Li=e=>Mi[e],Ii=new Set([Oi,_i]);function zi(e,t){let n=Li(e);return Ii.has(n)||(n=Tr),n.getAnimatableNone?n.getAnimatableNone(t):void 0}var Fi=new Set(["auto","none","0"]);var Bi=class extends qo{constructor(e,t,n,r,o){super(e,t,n,r,o,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let s=0;s<e.length;s++){let n=e[s];if("string"==typeof n&&(n=n.trim(),Xn(n))){const r=Ni(n,t.current);void 0!==r&&(e[s]=r),s===e.length-1&&(this.finalKeyframe=n)}}if(this.resolveNoneKeyframes(),!wi.has(n)||2!==e.length)return;const[r,o]=e,a=Ei(r),i=Ei(o);if(Zn(r)!==Zn(o)&&zo[n])this.needsMeasurement=!0;else if(a!==i)if(Mo(a)&&Mo(i))for(let s=0;s<e.length;s++){const t=e[s];"string"==typeof t&&(e[s]=parseFloat(t))}else zo[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:t}=this,n=[];for(let r=0;r<e.length;r++)(null===e[r]||Ti(e[r]))&&n.push(r);n.length&&function(e,t,n){let r,o=0;for(;o<e.length&&!r;){const t=e[o];"string"==typeof t&&!Fi.has(t)&&Er(t).values.length&&(r=e[o]),o++}if(r&&n)for(const a of t)e[a]=zi(n,r)}(e,n,t)}measureInitialState(){const{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=zo[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;const r=t[t.length-1];void 0!==r&&e.getValue(n,r).jump(r,!1)}measureEndState(){const{element:e,name:t,unresolvedKeyframes:n}=this;if(!e||!e.current)return;const r=e.getValue(t);r&&r.jump(this.measuredOrigin,!1);const o=n.length-1,a=n[o];n[o]=zo[t](e.measureViewportBox(),window.getComputedStyle(e.current)),null!==a&&void 0===this.finalKeyframe&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}},Ui=()=>({x:{min:0,max:0},y:{min:0,max:0}}),Vi={current:void 0},$i=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{const t=Wn.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(const n of this.dependents)n.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){var t;this.current=e,this.updatedAt=Wn.now(),null===this.canTrackVelocity&&void 0!==e&&(this.canTrackVelocity=(t=this.current,!isNaN(parseFloat(t))))}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 gn);const n=this.events[e].add(t);return"change"===e?()=>{n(),Un.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const 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||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return Vi.current&&Vi.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const e=Wn.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||e-this.updatedAt>30)return 0;const t=Math.min(this.updatedAt-this.prevUpdatedAt,30);return bn(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 Hi(e,t){return new $i(e,t)}var qi=[...ki,br,Tr],Wi=new WeakMap;function Ki(e){return null!==e&&"object"==typeof e&&"function"==typeof e.start}function Gi(e){return"string"==typeof e||Array.isArray(e)}var Yi=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Qi=["initial",...Yi];function Xi(e){return Ki(e.animate)||Qi.some(t=>Gi(e[t]))}function Ji(e){return Boolean(Xi(e)||e.variants)}var Zi={current:null},es={current:!1},ts="undefined"!=typeof window;function ns(e){const t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function rs(e,t,n,r){if("function"==typeof t){const[o,a]=ns(r);t=t(void 0!==n?n:e.custom,o,a)}if("string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t){const[o,a]=ns(r);t=t(void 0!==n?n:e.custom,o,a)}return t}var os=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],as={};function is(e){as=e}var ss=class{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,skipAnimations:o,blockInitialAnimation:a,visualState:i},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=qo,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=()=>{const e=Wn.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,Un.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=i;this.latestValues=l,this.baseTarget={...l},this.initialValues=t.initial?{...l}:{},this.renderState=c,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.skipAnimationsConfig=o,this.options=s,this.blockInitialAnimation=Boolean(a),this.isControllingVariants=Xi(t),this.isVariantNode=Ji(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(e&&e.current);const{willChange:u,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(const f in d){const e=d[f];void 0!==l[f]&&ti(e)&&e.set(l[f])}}mount(e){if(this.hasBeenMounted)for(const t in this.initialValues)this.values.get(t)?.jump(this.initialValues[t]),this.latestValues[t]=this.initialValues[t];this.current=e,Wi.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)),"never"===this.reducedMotionConfig?this.shouldReduceMotion=!1:"always"===this.reducedMotionConfig?this.shouldReduceMotion=!0:(es.current||function(){if(es.current=!0,ts)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Zi.current=e.matches;e.addEventListener("change",t),t()}else Zi.current=!1}(),this.shouldReduceMotion=Zi.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(),Vn(this.notifyUpdate),Vn(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(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&&la.has(e)&&this.current instanceof HTMLElement){const{factory:n,keyframes:r,times:o,ease:a,duration:i}=t.accelerate,s=new na({element:this.current,name:e,keyframes:r,times:o,ease:a,duration:yn(i)}),l=n(s);return void this.valueSubscriptions.set(e,()=>{l(),s.cancel()})}const n=Do.has(e);n&&this.onBindTransform&&this.onBindTransform();const r=t.on("change",t=>{this.latestValues[e]=t,this.props.onUpdate&&Un.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;"undefined"!=typeof window&&window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),o&&o()})}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}updateFeatures(){let e="animation";for(e in as){const t=as[e];if(!t)continue;const{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){const 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):{x:{min:0,max:0},y:{min:0,max:0}}}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 n=0;n<os.length;n++){const t=os[n];this.propEventSubscriptions[t]&&(this.propEventSubscriptions[t](),delete this.propEventSubscriptions[t]);const r=e["on"+t];r&&(this.propEventSubscriptions[t]=this.on(t,r))}this.prevMotionValues=function(e,t,n){for(const r in t){const o=t[r],a=n[r];if(ti(o))e.addValue(r,o);else if(ti(a))e.addValue(r,Hi(o,{owner:e}));else if(a!==o)if(e.hasValue(r)){const t=e.getValue(r);!0===t.liveStyle?t.jump(o):t.hasAnimated||t.set(o)}else{const t=e.getStaticValue(r);e.addValue(r,Hi(void 0!==t?t:o,{owner:e}))}}for(const r in n)void 0===t[r]&&e.removeValue(r);return t}(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){const t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){const 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);const 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 void 0===n&&void 0!==t&&(n=Hi(null===t?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n=void 0===this.latestValues[e]&&this.current?this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options):this.latestValues[e];var r;return null!=n&&("string"==typeof n&&(cn(n)||dn(n))?n=parseFloat(n):(r=n,!qi.find(Si(r))&&Tr.test(t)&&(n=zi(e,t))),this.setBaseTarget(e,ti(n)?n.get():n)),ti(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){const{initial:t}=this.props;let n;if("string"==typeof t||"object"==typeof t){const r=rs(this.props,t,this.presenceContext?.custom);r&&(n=r[e])}if(t&&void 0!==n)return n;const r=this.getBaseTargetFromProps(this.props,e);return void 0===r||ti(r)?void 0!==this.initialValues[e]&&void 0===n?void 0:this.baseTarget[e]:r}on(e,t){return this.events[e]||(this.events[e]=new gn),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){Ea.render(this.render)}},ls=class extends ss{constructor(){super(...arguments),this.KeyframeResolver=Bi}sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){const 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);const{children:e}=this.props;ti(e)&&(this.childSubscription=e.on("change",e=>{this.current&&(this.current.textContent=`${e}`)}))}},cs=(e,t)=>t&&"number"==typeof e?t.transform(e):e,us={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},ds=Ao.length;function fs(e,t,n){const{style:r,vars:o,transformOrigin:a}=e;let i=!1,s=!1;for(const l in t){const e=t[l];if(Do.has(l))i=!0;else if(Yn(l))o[l]=e;else{const t=cs(e,Di[l]);l.startsWith("origin")?(s=!0,a[l]=t):r[l]=t}}if(t.transform||(i||n?r.transform=function(e,t,n){let r="",o=!0;for(let i=0;i<ds;i++){const a=Ao[i],s=e[a];if(void 0===s)continue;let l=!0;if("number"==typeof s)l=s===(a.startsWith("scale")?1:0);else{const e=parseFloat(s);l=a.startsWith("scale")?1===e:0===e}if(!l||n){const e=cs(s,Di[a]);l||(o=!1,r+=`${us[a]||a}(${e}) `),n&&(t[a]=e)}}const a=e.pathRotation;return a&&(o=!1,r+=`rotate(${cs(a,Di.pathRotation)}) `),r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}(t,e.transform,n):r.transform&&(r.transform="none")),s){const{originX:e="50%",originY:t="50%",originZ:n=0}=a;r.transformOrigin=`${e} ${t} ${n}`}}function hs(e,{style:t,vars:n},r,o){const a=e.style;let i;for(i in t)a[i]=t[i];for(i in o?.applyProjectionStyles(a,r),n)a.setProperty(i,n[i])}function ps(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var ms={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e){if(!pr.test(e))return e;e=parseFloat(e)}return`${ps(e,t.target.x)}% ${ps(e,t.target.y)}%`}},gs={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=Tr.parse(e);if(o.length>5)return r;const a=Tr.createTransformer(e),i="number"!=typeof o[0]?1:0,s=n.x.scale*t.x,l=n.y.scale*t.y;o[0+i]/=s,o[1+i]/=l;const c=Pr(s,l,.5);return"number"==typeof o[2+i]&&(o[2+i]/=c),"number"==typeof o[3+i]&&(o[3+i]/=c),a(o)}},ys={borderRadius:{...ms,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ms,borderTopRightRadius:ms,borderBottomLeftRadius:ms,borderBottomRightRadius:ms,boxShadow:gs};function vs(e,{layout:t,layoutId:n}){return Do.has(e)||e.startsWith("origin")||(t||void 0!==n)&&(!!ys[e]||"opacity"===e)}function bs(e,t,n){const r=e.style,o=t?.style,a={};if(!r)return a;for(const i in r)(ti(r[i])||o&&ti(o[i])||vs(i,e)||void 0!==n?.getValue(i)?.liveStyle)&&(a[i]=r[i]);return a}var xs=class extends ls{constructor(){super(...arguments),this.type="html",this.renderInstance=hs}readValueFromInstance(e,t){if(Do.has(t))return this.projection?.isProjecting?Po(t):((e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Oo(n,t)})(e,t);{const r=(n=e,window.getComputedStyle(n)),o=(Yn(t)?r.getPropertyValue(t):r[t])||0;return"string"==typeof o?o.trim():o}var n}measureInstanceViewportBox(e,{transformPagePoint:t}){return xi(e,t)}build(e,t,n){fs(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return bs(e,t,n)}},ws={offset:"stroke-dashoffset",array:"stroke-dasharray"},Ss={offset:"strokeDashoffset",array:"strokeDasharray"};var ks=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Es(e,{attrX:t,attrY:n,attrScale:r,pathLength:o,pathSpacing:a=1,pathOffset:i=0,...s},l,c,u){if(fs(e,s,c),l)return void(e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox));e.attrs=e.style,e.style={};const{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(const h of ks)void 0!==d[h]&&(f[h]=d[h],delete d[h]);void 0!==t&&(d.x=t),void 0!==n&&(d.y=n),void 0!==r&&(d.scale=r),void 0!==o&&function(e,t,n=1,r=0,o=!0){e.pathLength=1;const a=o?ws:Ss;e[a.offset]=""+-r,e[a.array]=`${t} ${n}`}(d,o,a,i,!1)}var Cs=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"]),Ns=e=>"string"==typeof e&&"svg"===e.toLowerCase();function Ts(e,t,n){const r=bs(e,t,n);for(const o in e)if(ti(e[o])||ti(t[o])){r[-1!==Ao.indexOf(o)?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o]=e[o]}return r}var js=class extends ls{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ui}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(Do.has(t)){const e=Li(t);return e&&e.default||0}return t=Cs.has(t)?t:Sa(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return Ts(e,t,n)}build(e,t,n){Es(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){!function(e,t,n,r){hs(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(Cs.has(o)?o:Sa(o),t.attrs[o])}(e,t,0,r)}mount(e){this.isSVGTag=Ns(e.tagName),super.mount(e)}};function Rs(e,t,n){const r=e.getProps();return rs(r,t,void 0!==n?n:r.custom,e)}var Ps=e=>Array.isArray(e);function Os(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Hi(n))}function _s(e){return Ps(e)?e[e.length-1]||0:e}function As(e){return e.props[ka]}function Ds({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&!0!==t[n];return t[n]=!1,r}function Ms(e,t,{delay:n=0,transitionOverride:r,type:o}={}){let{transition:a,transitionEnd:i,...s}=t;const l=e.getDefaultTransition();a=a?pa(a,l):l;const c=a?.reduceMotion,u=a?.skipAnimations;r&&(a=r);const d=[],f=o&&e.animationState&&e.animationState.getState()[o],h=a?.path;h&&h.animateVisualElement(e,s,a,n,d);for(const p in s){const t=e.getValue(p,e.latestValues[p]??null),r=s[p];if(void 0===r||f&&Ds(f,p))continue;const o={delay:n,...ma(a||{},p)};u&&(o.skipAnimations=!0);const i=t.get();if(void 0!==i&&!t.isAnimating()&&!Array.isArray(r)&&r===i&&!o.velocity){Un.update(()=>t.set(r));continue}let l=!1;if(window.MotionHandoffAnimation){const t=As(e);if(t){const e=window.MotionHandoffAnimation(t,p,Un);null!==e&&(o.startTime=e,l=!0)}}ni(e,p);const h=c??e.shouldReduceMotion;t.start(wa(p,t,r,h&&wi.has(p)?{type:!1}:o,e,l));const m=t.animation;m&&d.push(m)}if(i){const t=()=>Un.update(()=>{i&&function(e,t){let{transitionEnd:n={},transition:r={},...o}=Rs(e,t)||{};o={...o,...n};for(const a in o)Os(e,a,_s(o[a]))}(e,i)});d.length?Promise.all(d).then(t):t()}return d}function Ls(e,t,n,r=0,o=1){const a=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),i=e.size,s=(i-1)*r;return"function"==typeof n?n(a,i):1===o?a*r:s-a*r}function Is(e,t,n={}){const r=Rs(e,t,"exit"===n.type?e.presenceContext?.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(o=n.transitionOverride);const a=r?()=>Promise.all(Ms(e,r,n)):()=>Promise.resolve(),i=e.variantChildren&&e.variantChildren.size?(r=0)=>{const{delayChildren:a=0,staggerChildren:i,staggerDirection:s}=o;return function(e,t,n=0,r=0,o=0,a=1,i){const s=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),s.push(Is(l,t,{...i,delay:n+("function"==typeof r?0:r)+Ls(e.variantChildren,l,r,o,a)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(s)}(e,t,r,a,i,s,n)}:()=>Promise.resolve(),{when:s}=o;if(s){const[e,t]="beforeChildren"===s?[a,i]:[i,a];return e().then(()=>t())}return Promise.all([a(),i(n.delay)])}var zs=Qi.length;function Fs(e){if(!e)return;if(!e.isControllingVariants){const t=e.parent&&Fs(e.parent)||{};return void 0!==e.props.initial&&(t.initial=e.props.initial),t}const t={};for(let n=0;n<zs;n++){const r=Qi[n],o=e.props[r];(Gi(o)||!1===o)&&(t[r]=o)}return t}function Bs(e,t){if(!Array.isArray(t))return!1;const 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 Us=[...Yi].reverse(),Vs=Yi.length;function $s(e){return t=>Promise.all(t.map(({animation:t,options:n})=>function(e,t,n={}){let r;if(e.notify("AnimationStart",t),Array.isArray(t)){const o=t.map(t=>Is(e,t,n));r=Promise.all(o)}else if("string"==typeof t)r=Is(e,t,n);else{const o="function"==typeof t?Rs(e,t,n.custom):t;r=Promise.all(Ms(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}(e,t,n)))}function Hs(e){let t=$s(e),n=Ks(),r=!0,o=!1;const a=t=>(n,r)=>{const o=Rs(e,r,"exit"===t?e.presenceContext?.custom:void 0);if(o){const{transition:e,transitionEnd:t,...r}=o;n={...n,...r,...t}}return n};function i(i){const{props:s}=e,l=Fs(e.parent)||{},c=[],u=new Set;let d={},f=1/0;for(let t=0;t<Vs;t++){const h=Us[t],p=n[h],m=void 0!==s[h]?s[h]:l[h],g=Gi(m),y=h===i?p.isActive:null;!1===y&&(f=t);let v=m===l[h]&&m!==s[h]&&g;if(v&&(r||o)&&e.manuallyAnimateOnMount&&(v=!1),p.protectedKeys={...d},!p.isActive&&null===y||!m&&!p.prevProp||Ki(m)||"boolean"==typeof m)continue;if("exit"===h&&p.isActive&&!0!==y){p.prevResolvedValues&&(d={...d,...p.prevResolvedValues});continue}const b=qs(p.prevProp,m);let x=b||h===i&&p.isActive&&!v&&g||t>f&&g,w=!1;const S=Array.isArray(m)?m:[m];let k=S.reduce(a(h),{});!1===y&&(k={});const{prevResolvedValues:E={}}=p,C={...E,...k},N=t=>{x=!0,u.has(t)&&(w=!0,u.delete(t)),p.needsAnimating[t]=!0;const n=e.getValue(t);n&&(n.liveStyle=!1)};for(const e in C){const t=k[e],n=E[e];if(d.hasOwnProperty(e))continue;let r=!1;r=Ps(t)&&Ps(n)?!Bs(t,n)||b:t!==n,r?null!=t?N(e):u.add(e):void 0!==t&&u.has(e)?N(e):p.protectedKeys[e]=!0}p.prevProp=m,p.prevResolvedValues=k,p.isActive&&(d={...d,...k}),(r||o)&&e.blockInitialAnimation&&(x=!1);const T=v&&b;!x||T&&!w||c.push(...S.map(t=>{const n={type:h};if("string"==typeof t&&(r||o)&&!T&&e.manuallyAnimateOnMount&&e.parent){const{parent:r}=e,o=Rs(r,t);if(r.enteringChildren&&o){const{delayChildren:t}=o.transition||{};n.delay=Ls(r.enteringChildren,e,t)}}return{animation:t,options:n}}))}if(u.size){const t={};if("boolean"!=typeof s.initial){const n=Rs(e,Array.isArray(s.initial)?s.initial[0]:s.initial);n&&n.transition&&(t.transition=n.transition)}u.forEach(n=>{const r=e.getBaseTarget(n),o=e.getValue(n);o&&(o.liveStyle=!0),t[n]=r??null}),c.push({animation:t})}let h=Boolean(c.length);return!r||!1!==s.initial&&s.initial!==s.animate||e.manuallyAnimateOnMount||(h=!1),r=!1,o=!1,h?t(c):Promise.resolve()}return{animateChanges:i,setActive:function(t,r){if(n[t].isActive===r)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,r)),n[t].isActive=r;const o=i(t);for(const e in n)n[e].protectedKeys={};return o},setAnimateFunction:function(n){t=n(e)},getState:()=>n,reset:()=>{n=Ks(),o=!0}}}function qs(e,t){return"string"==typeof t?t!==e:!!Array.isArray(t)&&!Bs(t,e)}function Ws(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Ks(){return{animate:Ws(!0),whileInView:Ws(),whileHover:Ws(),whileTap:Ws(),whileDrag:Ws(),whileFocus:Ws(),exit:Ws()}}function Gs(e){return e.max-e.min}function Ys(e,t,n,r=.5){e.origin=r,e.originPoint=Pr(t.min,t.max,e.origin),e.scale=Gs(n)/Gs(t),e.translate=Pr(n.min,n.max,e.origin)-e.originPoint,(e.scale>=.9999&&e.scale<=1.0001||isNaN(e.scale))&&(e.scale=1),(e.translate>=-.01&&e.translate<=.01||isNaN(e.translate))&&(e.translate=0)}function Qs(e,t,n,r){Ys(e.x,t.x,n.x,r?r.originX:void 0),Ys(e.y,t.y,n.y,r?r.originY:void 0)}function Xs(e,t,n,r=0){e.min=(r?Pr(n.min,n.max,r):n.min)+t.min,e.max=e.min+Gs(t)}function Js(e,t,n,r=0){const o=r?Pr(n.min,n.max,r):n.min;e.min=t.min-o,e.max=e.min+Gs(t)}function Zs(e,t,n,r){Js(e.x,t.x,n.x,r?.x),Js(e.y,t.y,n.y,r?.y)}function el(e){return[e("x"),e("y")]}function tl(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function nl(e){return ti(e)?e.get():e}var rl=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],ol=rl.length,al=e=>"string"==typeof e?parseFloat(e):e,il=e=>"number"==typeof e||pr.test(e);function sl(e,t){return void 0!==e[t]?e[t]:e.borderRadius}var ll=ul(0,.5,Rn),cl=ul(.5,.95,hn);function ul(e,t,n){return r=>r<e?0:r>t?1:n(mn(e,t,r))}function dl(e,t){e.min=t.min,e.max=t.max}function fl(e,t){dl(e.x,t.x),dl(e.y,t.y)}function hl(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function pl(e,t,n,r,o){return e=ui(e-=t,1/n,r),void 0!==o&&(e=ui(e,1/o,r)),e}function ml(e,t,[n,r,o],a,i){!function(e,t=0,n=1,r=.5,o,a=e,i=e){if(hr.test(t)&&(t=parseFloat(t),t=Pr(i.min,i.max,t/100)-i.min),"number"!=typeof t)return;let s=Pr(a.min,a.max,r);e===a&&(s-=t),e.min=pl(e.min,t,n,s,o),e.max=pl(e.max,t,n,s,o)}(e,t[n],t[r],t[o],t.scale,a,i)}var gl=["x","scaleX","originX"],yl=["y","scaleY","originY"];function vl(e,t,n,r){ml(e.x,t,gl,n?n.x:void 0,r?r.x:void 0),ml(e.y,t,yl,n?n.y:void 0,r?r.y:void 0)}function bl(e){return 0===e.translate&&1===e.scale}function xl(e){return bl(e.x)&&bl(e.y)}function wl(e,t){return e.min===t.min&&e.max===t.max}function Sl(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function kl(e,t){return Sl(e.x,t.x)&&Sl(e.y,t.y)}function El(e){return Gs(e.x)/Gs(e.y)}function Cl(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}var Nl=class{constructor(){this.members=[]}add(e){on(this.members,e);for(let t=this.members.length-1;t>=0;t--){const n=this.members[t];if(n===e||n===this.lead||n===this.prevLead)continue;const r=n.instance;r&&!1!==r.isConnected||n.snapshot||(an(this.members,n),n.unmount())}e.scheduleRender()}remove(e){if(an(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){for(let t=this.members.indexOf(e)-1;t>=0;t--){const e=this.members[t];if(!1!==e.isPresent&&!1!==e.instance?.isConnected)return this.promote(e),!0}return!1}promote(e,t){const n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.updateSnapshot(),e.scheduleRender();const{layoutDependency:r}=n.options,{layoutDependency:o}=e.options;void 0!==r&&r===o||(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)),!1===e.options.crossfade&&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)}};var Tl=(e,t)=>e.depth-t.depth,jl=class{constructor(){this.children=[],this.isDirty=!1}add(e){on(this.children,e),this.isDirty=!0}remove(e){an(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Tl),this.isDirty=!1,this.children.forEach(e)}},Rl={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Pl={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},Ol=["","X","Y","Z"],_l=0;function Al(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Dl(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=As(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Un,!(t||r))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Dl(r)}function Ml({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(e={},n=t?.()){this.id=_l++,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,zn.value&&(Pl.nodes=Pl.calculatedTargetDeltas=Pl.calculatedProjections=0),this.nodes.forEach(zl),this.nodes.forEach(Kl),this.nodes.forEach(Gl),this.nodes.forEach(Fl),zn.addProjectionMetrics&&zn.addProjectionMetrics(Pl)},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 t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new jl)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new gn),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){const n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;var n;this.isSVG=Va(t)&&!(Va(n=t)&&"svg"===n.tagName),this.instance=t;const{layoutId:r,layout:o,visualElement:a}=this.options;if(a&&!a.current&&a.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(o||r)&&(this.isLayoutDirty=!0),e){let n,r=0;const o=()=>this.root.updateBlockedByResize=!1;Un.read(()=>{r=window.innerWidth}),e(t,()=>{const e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n&&n(),n=function(e,t){const n=Wn.now(),r=({timestamp:o})=>{const a=o-n;a>=t&&(Vn(r),e(a-t))};return Un.setup(r,!0),()=>Vn(r)}(o,250),Rl.hasAnimatedSinceResize&&(Rl.hasAnimatedSinceResize=!1,this.nodes.forEach(Wl)))})}r&&this.root.registerSharedNode(r,this),!1!==this.options.animate&&a&&(r||o)&&this.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const o=this.options.transition||a.getDefaultTransition()||ec,{onLayoutAnimationStart:i,onLayoutAnimationComplete:s}=a.getProps(),l=!this.targetLayout||!kl(this.targetLayout,r),c=!t&&n;if(this.options.layoutRoot||this.resumeFrom||c||t&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const t={...ma(o,"layout"),onPlay:i,onComplete:s};(a.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,c,t.path)}else t||Wl(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Vn(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(Yl),this.animationId++)}getTransformTemplate(){const{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Dl(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let o=0;o<this.path.length;o++){const e=this.path[o];e.shouldResetTransform=!0,"string"!=typeof e.latestValues.x&&"string"!=typeof e.latestValues.y||(e.isLayoutDirty=!0),e.updateScroll("snapshot"),e.options.layoutRoot&&e.willUpdate(!1)}const{layoutId:t,layout:n}=this.options;if(void 0===t&&!n)return;const r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,""):void 0,this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const e=this.updateBlockedByResize;return this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),e&&this.nodes.forEach(Vl),void this.nodes.forEach(Ul)}if(this.animationId<=this.animationCommitId)return void this.nodes.forEach($l);this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Hl),this.nodes.forEach(ql),this.nodes.forEach(Ll),this.nodes.forEach(Il)):this.nodes.forEach($l),this.clearAllSnapshots();const e=Wn.now();$n.delta=sn(0,1e3/60,e-$n.timestamp),$n.timestamp=e,$n.isProcessing=!0,Hn.update.process($n),Hn.preRender.process($n),Hn.render.process($n),$n.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Ea.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Bl),this.sharedNodes.forEach(Ql)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Un.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Un.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||Gs(this.snapshot.measuredBox.x)||Gs(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let n=0;n<this.path.length;n++)this.path[n].updateScroll();const e=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}}),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:t}=this.options;t&&t.notify("LayoutMeasure",this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e="measure"){let t=Boolean(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&this.instance){const 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(!o)return;const e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!xl(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,""):void 0,a=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||si(this.latestValues)||a)&&(o(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){const t=this.measurePageBox();let n=this.removeElementScroll(t);var r;return e&&(n=this.removeTransform(n)),rc((r=n).x),rc(r.y),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:e}=this.options;if(!e)return{x:{min:0,max:0},y:{min:0,max:0}};const t=e.measureViewportBox();if(!this.scroll?.wasRoot&&!this.path.some(ac)){const{scroll:e}=this.root;e&&(gi(t.x,e.offset.x),gi(t.y,e.offset.y))}return t}removeElementScroll(e){const t={x:{min:0,max:0},y:{min:0,max:0}};if(fl(t,e),this.scroll?.wasRoot)return t;for(let n=0;n<this.path.length;n++){const r=this.path[n],{scroll:o,options:a}=r;r!==this.root&&o&&a.layoutScroll&&(o.wasRoot&&fl(t,e),gi(t.x,o.offset.x),gi(t.y,o.offset.y))}return t}applyTransform(e,t=!1,n){const r=n||{x:{min:0,max:0},y:{min:0,max:0}};fl(r,e);for(let o=0;o<this.path.length;o++){const e=this.path[o];!t&&e.options.layoutScroll&&e.scroll&&e!==e.root&&(gi(r.x,-e.scroll.offset.x),gi(r.y,-e.scroll.offset.y)),si(e.latestValues)&&bi(r,e.latestValues,e.layout?.layoutBox)}return si(this.latestValues)&&bi(r,this.latestValues,this.layout?.layoutBox),r}removeTransform(e){const t={x:{min:0,max:0},y:{min:0,max:0}};fl(t,e);for(let n=0;n<this.path.length;n++){const e=this.path[n];if(!si(e.latestValues))continue;let r;e.instance&&(ii(e.latestValues)&&e.updateSnapshot(),r=Ui(),fl(r,e.measurePageBox())),vl(t,e.latestValues,e.snapshot?.layoutBox,r)}return si(this.latestValues)&&vl(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:void 0===e.crossfade||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!==$n.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){const t=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=t.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=t.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=t.isSharedProjectionDirty);const n=Boolean(this.resumingFrom)||this!==t;if(!(e||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:r,layoutId:o}=this.options;if(!this.layout||!r&&!o)return;this.resolvedRelativeTargetAt=$n.timestamp;const a=this.getClosestProjectingParent();var i,s,l,c;(a&&this.linkedParentVersion!==a.layoutVersion&&!a.options.layoutRoot&&this.removeRelativeTarget(),this.targetDelta||this.relativeTarget||(!1!==this.options.layoutAnchor&&a&&a.layout?this.createRelativeTarget(a,this.layout.layoutBox,a.layout.layoutBox):this.removeRelativeTarget()),this.relativeTarget||this.targetDelta)&&(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),i=this.target,s=this.relativeTarget,l=this.relativeParent.target,c=this.options.layoutAnchor||void 0,Xs(i.x,s.x,l.x,c?.x),Xs(i.y,s.y,l.y,c?.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.applyTransform(this.layout.layoutBox,!1,this.target):fl(this.target,this.layout.layoutBox),hi(this.target,this.targetDelta)):fl(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,!1!==this.options.layoutAnchor&&a&&Boolean(a.resumingFrom)===Boolean(this.resumingFrom)&&!a.options.layoutScroll&&a.target&&1!==this.animationProgress?this.createRelativeTarget(a,this.target,a.target):this.relativeParent=this.relativeTarget=void 0),zn.value&&Pl.calculatedTargetDeltas++)}getClosestProjectingParent(){if(this.parent&&!ii(this.parent.latestValues)&&!li(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,n){this.relativeParent=e,this.linkedParentVersion=e.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},Zs(this.relativeTargetOrigin,t,n,this.options.layoutAnchor||void 0),fl(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const e=this.getLead(),t=Boolean(this.resumingFrom)||this!==e;let n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===$n.timestamp&&(n=!1),n)return;const{layout:r,layoutId:o}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!r&&!o)return;fl(this.layoutCorrected,this.layout.layoutBox);const a=this.treeScale.x,i=this.treeScale.y;!function(e,t,n,r=!1){const o=n.length;if(!o)return;let a,i;t.x=t.y=1;for(let s=0;s<o;s++){a=n[s],i=a.projectionDelta;const{visualElement:o}=a.options;o&&o.props.style&&"contents"===o.props.style.display||(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&(gi(e.x,-a.scroll.offset.x),gi(e.y,-a.scroll.offset.y)),i&&(t.x*=i.x.scale,t.y*=i.y.scale,hi(e,i)),r&&si(a.latestValues)&&bi(e,a.latestValues,a.layout?.layoutBox))}t.x<mi&&t.x>pi&&(t.x=1),t.y<mi&&t.y>pi&&(t.y=1)}(this.layoutCorrected,this.treeScale,this.path,t),!e.layout||e.target||1===this.treeScale.x&&1===this.treeScale.y||(e.target=e.layout.layoutBox,e.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}});const{target:s}=e;s?(this.projectionDelta&&this.prevProjectionDelta?(hl(this.prevProjectionDelta.x,this.projectionDelta.x),hl(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),Qs(this.projectionDelta,this.layoutCorrected,s,this.latestValues),this.treeScale.x===a&&this.treeScale.y===i&&Cl(this.projectionDelta.x,this.prevProjectionDelta.x)&&Cl(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",s)),zn.value&&Pl.calculatedProjections++):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){if(this.options.visualElement?.scheduleRender(),e){const e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}}setAnimationOrigin(e,t=!1,n){const r=this.snapshot,o=r?r.latestValues:{},a={...this.latestValues},i={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;const s={x:{min:0,max:0},y:{min:0,max:0}},l=(r?r.source:void 0)!==(this.layout?this.layout.source:void 0),c=this.getStack(),u=!c||c.members.length<=1,d=Boolean(l&&!u&&!0===this.options.crossfade&&!this.path.some(Zl));let f;this.animationProgress=0;const h=n?.interpolateProjection(e);this.mixTargetDelta=t=>{const n=t/1e3,r=h?.(n);var c,p,m,g,y,v;r?(i.x.translate=r.x,i.x.scale=Pr(e.x.scale,1,n),i.x.origin=e.x.origin,i.x.originPoint=e.x.originPoint,i.y.translate=r.y,i.y.scale=Pr(e.y.scale,1,n),i.y.origin=e.y.origin,i.y.originPoint=e.y.originPoint):(Xl(i.x,e.x,n),Xl(i.y,e.y,n)),this.setTargetDelta(i),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Zs(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),m=this.relativeTarget,g=this.relativeTargetOrigin,y=s,v=n,Jl(m.x,g.x,y.x,v),Jl(m.y,g.y,y.y,v),f&&(c=this.relativeTarget,p=f,wl(c.x,p.x)&&wl(c.y,p.y))&&(this.isProjectionDirty=!1),f||(f={x:{min:0,max:0},y:{min:0,max:0}}),fl(f,this.relativeTarget)),l&&(this.animationValues=a,function(e,t,n,r,o,a){o?(e.opacity=Pr(0,n.opacity??1,ll(r)),e.opacityExit=Pr(t.opacity??1,0,cl(r))):a&&(e.opacity=Pr(t.opacity??1,n.opacity??1,r));for(let i=0;i<ol;i++){const o=rl[i];let a=sl(t,o),s=sl(n,o);void 0===a&&void 0===s||(a||(a=0),s||(s=0),0===a||0===s||il(a)===il(s)?(e[o]=Math.max(Pr(al(a),al(s),r),0),(hr.test(s)||hr.test(a))&&(e[o]+="%")):e[o]=s)}(t.rotate||n.rotate)&&(e.rotate=Pr(t.rotate||0,n.rotate||0,r))}(a,o,this.latestValues,n,d,u)),r&&void 0!==r.rotate&&(this.animationValues||(this.animationValues=a),this.animationValues.pathRotation=r.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Vn(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Un.update(()=>{Rl.hasAnimatedSinceResize=!0,Kn.layout++,this.motionValue||(this.motionValue=Hi(0)),this.motionValue.jump(0,!1),this.currentAnimation=function(e,t,n){const r=ti(e)?e:Hi(e);return r.start(wa("",r,t,n)),r.animation}(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onStop:()=>{Kn.layout--},onComplete:()=>{Kn.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);const e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const e=this.getLead();let{targetWithTransforms:t,target:n,layout:r,latestValues:o}=e;if(t&&n&&r){if(this!==e&&this.layout&&r&&oc(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const t=Gs(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;const r=Gs(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}fl(t,n),bi(t,o),Qs(this.projectionDeltaWithTransform,this.layoutCorrected,t,o)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new Nl),this.sharedNodes.get(e).add(t);const n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){const e=this.getStack();return!e||e.lead===this}getLead(){const{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){const{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){const r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){const e=this.getStack();return!!e&&e.relegate(this)}resetSkewAndRotation(){const{visualElement:e}=this.options;if(!e)return;let t=!1;const{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;const r={};n.z&&Al("z",e,r,this.animationValues);for(let o=0;o<Ol.length;o++)Al(`rotate${Ol[o]}`,e,r,this.animationValues),Al(`skew${Ol[o]}`,e,r,this.animationValues);e.render();for(const o in r)e.setStaticValue(o,r[o]),this.animationValues&&(this.animationValues[o]=r[o]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;if(!this.isVisible)return void(e.visibility="hidden");const n=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,e.visibility="",e.opacity="",e.pointerEvents=nl(t?.pointerEvents)||"",void(e.transform=n?n(this.latestValues,""):"none");const r=this.getLead();if(!this.projectionDelta||!this.layout||!r.target)return this.options.layoutId&&(e.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,e.pointerEvents=nl(t?.pointerEvents)||""),void(this.hasProjected&&!si(this.latestValues)&&(e.transform=n?n({},""):"none",this.hasProjected=!1));e.visibility="";const o=r.animationValues||r.latestValues;this.applyTransformsToTarget();let a=function(e,t,n){let r="";const o=e.x.translate/t.x,a=e.y.translate/t.y,i=n?.z||0;if((o||a||i)&&(r=`translate3d(${o}px, ${a}px, ${i}px) `),1===t.x&&1===t.y||(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:e,rotate:t,pathRotation:o,rotateX:a,rotateY:i,skewX:s,skewY:l}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),o&&(r+=`rotate(${o}deg) `),a&&(r+=`rotateX(${a}deg) `),i&&(r+=`rotateY(${i}deg) `),s&&(r+=`skewX(${s}deg) `),l&&(r+=`skewY(${l}deg) `)}const s=e.x.scale*t.x,l=e.y.scale*t.y;return 1===s&&1===l||(r+=`scale(${s}, ${l})`),r||"none"}(this.projectionDeltaWithTransform,this.treeScale,o);n&&(a=n(o,a)),e.transform=a;const{x:i,y:s}=this.projectionDelta;e.transformOrigin=`${100*i.origin}% ${100*s.origin}% 0`,r.animationValues?e.opacity=r===this?o.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:o.opacityExit:e.opacity=r===this?void 0!==o.opacity?o.opacity:"":void 0!==o.opacityExit?o.opacityExit:0;for(const l in ys){if(void 0===o[l])continue;const{correct:t,applyTo:n,isCSSVariable:i}=ys[l],s="none"===a?o[l]:t(o[l],r);if(n){const t=n.length;for(let r=0;r<t;r++)e[n[r]]=s}else i?this.options.visualElement.renderState.vars[l]=s:e[l]=s}this.options.layoutId&&(e.pointerEvents=r===this?nl(t?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(Ul),this.root.sharedNodes.clear()}}}function Ll(e){e.updateLayout()}function Il(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:r}=e.layout,{animationType:o}=e.options,a=t.source!==e.layout.source;if("size"===o)el(e=>{const r=a?t.measuredBox[e]:t.layoutBox[e],o=Gs(r);r.min=n[e].min,r.max=r.min+o});else if("x"===o||"y"===o){const e="x"===o?"y":"x";dl(a?t.measuredBox[e]:t.layoutBox[e],n[e])}else oc(o,t.layoutBox,n)&&el(r=>{const o=a?t.measuredBox[r]:t.layoutBox[r],i=Gs(n[r]);o.max=o.min+i,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+i)});const i={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};Qs(i,n,t.layoutBox);const s={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};a?Qs(s,e.applyTransform(r,!0),t.measuredBox):Qs(s,n,t.layoutBox);const l=!xl(i);let c=!1;if(!e.resumeFrom){const r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){const{snapshot:o,layout:a}=r;if(o&&a){const i=e.options.layoutAnchor||void 0,s={x:{min:0,max:0},y:{min:0,max:0}};Zs(s,t.layoutBox,o.layoutBox,i);const l={x:{min:0,max:0},y:{min:0,max:0}};Zs(l,n,a.layoutBox,i),kl(s,l)||(c=!0),r.options.layoutRoot&&(e.relativeTarget=l,e.relativeTargetOrigin=s,e.relativeParent=r)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:s,layoutDelta:i,hasLayoutChanged:l,hasRelativeLayoutChanged:c})}else if(e.isLead()){const{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function zl(e){zn.value&&Pl.nodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=Boolean(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function Fl(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Bl(e){e.clearSnapshot()}function Ul(e){e.clearMeasurements()}function Vl(e){e.isLayoutDirty=!0,e.updateLayout()}function $l(e){e.isLayoutDirty=!1}function Hl(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function ql(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Wl(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Kl(e){e.resolveTargetDelta()}function Gl(e){e.calcProjection()}function Yl(e){e.resetSkewAndRotation()}function Ql(e){e.removeLeadSnapshot()}function Xl(e,t,n){e.translate=Pr(t.translate,0,n),e.scale=Pr(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Jl(e,t,n,r){e.min=Pr(t.min,n.min,r),e.max=Pr(t.max,n.max,r)}function Zl(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}var ec={duration:.45,ease:[.4,0,.1,1]},tc=e=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),nc=tc("applewebkit/")&&!tc("chrome/")?Math.round:hn;function rc(e){e.min=nc(e.min),e.max=nc(e.max)}function oc(e,t,n){return"position"===e||"preserve-aspect"===e&&(r=El(t),o=El(n),a=.2,!(Math.abs(r-o)<=a));var r,o,a}function ac(e){return e!==e.root&&e.scroll?.wasRoot}var ic=Ml({attachResizeListener:(e,t)=>tl(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),sc={current:void 0},lc=Ml({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!sc.current){const e=new ic({});e.mount(window),e.setOptions({layoutScroll:!0}),sc.current=e}return sc.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>Boolean("fixed"===window.getComputedStyle(e).position)}),cc=(0,k.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function uc(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function dc(...e){return k.useCallback(function(...e){return t=>{let n=!1;const r=e.map(e=>{const r=uc(e,t);return n||"function"!=typeof r||(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():uc(e[t],null)}}}}(...e),e)}var fc=Zt(),hc=class extends k.Component{getSnapshotBeforeUpdate(e){const t=this.props.childRef.current;if(Oa(t)&&e.isPresent&&!this.props.isPresent&&!1!==this.props.pop){const e=t.offsetParent,n=Oa(e)&&e.offsetWidth||0,r=Oa(e)&&e.offsetHeight||0,o=getComputedStyle(t),a=this.props.sizeRef.current;a.height=parseFloat(o.height),a.width=parseFloat(o.width),a.top=t.offsetTop,a.left=t.offsetLeft,a.right=n-a.width-a.left,a.bottom=r-a.height-a.top,a.direction=o.direction}return null}componentDidUpdate(){}render(){return this.props.children}};function pc({children:e,isPresent:t,anchorX:n,anchorY:r,root:o,pop:a}){const i=(0,k.useId)(),s=(0,k.useRef)(null),l=(0,k.useRef)({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:"ltr"}),{nonce:c}=(0,k.useContext)(cc),u=dc(s,e.props?.ref??e?.ref);return(0,k.useInsertionEffect)(()=>{const{width:e,height:u,top:d,left:f,right:h,bottom:p,direction:m}=l.current;if(t||!1===a||!s.current||!e||!u)return;const g="rtl"===m,y="left"===n?g?`right: ${h}`:`left: ${f}`:g?`left: ${f}`:`right: ${h}`,v="bottom"===r?`bottom: ${p}`:`top: ${d}`;s.current.dataset.motionPopId=i;const b=document.createElement("style");c&&(b.nonce=c);const x=o??document.head;return x.appendChild(b),b.sheet&&b.sheet.insertRule(`\n [data-motion-pop-id="${i}"] {\n position: absolute !important;\n width: ${e}px !important;\n height: ${u}px !important;\n ${y}px !important;\n ${v}px !important;\n }\n `),()=>{s.current?.removeAttribute("data-motion-pop-id"),x.contains(b)&&x.removeChild(b)}},[t]),(0,fc.jsx)(hc,{isPresent:t,childRef:s,sizeRef:l,pop:a,children:!1===a?e:k.cloneElement(e,{ref:u})})}var mc=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:a,mode:i,anchorX:s,anchorY:l,root:c})=>{const u=tn(gc),d=(0,k.useId)();let f=!0,h=(0,k.useMemo)(()=>(f=!1,{id:d,initial:t,isPresent:n,custom:o,onExitComplete:e=>{u.set(e,!0);for(const t of u.values())if(!t)return;r&&r()},register:e=>(u.set(e,!1),()=>u.delete(e))}),[n,u,r]);return a&&f&&(h={...h}),(0,k.useMemo)(()=>{u.forEach((e,t)=>u.set(t,!1))},[n]),k.useEffect(()=>{!n&&!u.size&&r&&r()},[n]),e=(0,fc.jsx)(pc,{pop:"popLayout"===i,isPresent:n,anchorX:s,anchorY:l,root:c,children:e}),(0,fc.jsx)(rn.Provider,{value:h,children:e})};function gc(){return new Map}function yc(e=!0){const t=(0,k.useContext)(rn);if(null===t)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,a=(0,k.useId)();(0,k.useEffect)(()=>{if(e)return o(a)},[e]);const i=(0,k.useCallback)(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,i]:[!0]}var vc=e=>e.key||"";function bc(e){const t=[];return k.Children.forEach(e,e=>{(0,k.isValidElement)(e)&&t.push(e)}),t}var xc=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:o=!0,mode:a="sync",propagate:i=!1,anchorX:s="left",anchorY:l="top",root:c})=>{const[u,d]=yc(i),f=(0,k.useMemo)(()=>bc(e),[e]),h=i&&!u?[]:f.map(vc),p=(0,k.useRef)(!0),m=(0,k.useRef)(f),g=tn(()=>new Map),y=(0,k.useRef)(new Set),[v,b]=(0,k.useState)(f),[x,w]=(0,k.useState)(f);nn(()=>{p.current=!1,m.current=f;for(let e=0;e<x.length;e++){const t=vc(x[e]);h.includes(t)?(g.delete(t),y.current.delete(t)):!0!==g.get(t)&&g.set(t,!1)}},[x,h.length,h.join("-")]);const S=[];if(f!==v){let e=[...f];for(let t=0;t<x.length;t++){const n=x[t],r=vc(n);h.includes(r)||(e.splice(t,0,n),S.push(n))}return"wait"===a&&S.length&&(e=S),w(bc(e)),b(f),null}const{forceRender:E}=(0,k.useContext)(en);return(0,fc.jsx)(fc.Fragment,{children:x.map(e=>{const v=vc(e),b=!(i&&!u)&&(f===x||h.includes(v));return(0,fc.jsx)(mc,{isPresent:b,initial:!(p.current&&!n)&&void 0,custom:t,presenceAffectsLayout:o,mode:a,root:c,onExitComplete:b?void 0:()=>{if(y.current.has(v))return;if(!g.has(v))return;y.current.add(v),g.set(v,!0);let e=!0;g.forEach(t=>{t||(e=!1)}),e&&(E?.(),w(m.current),i&&d?.(),r&&r())},anchorX:s,anchorY:l,children:e},v)})})},wc=["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 Sc(e){return"string"==typeof e&&!e.includes("-")&&!!(wc.indexOf(e)>-1||/[A-Z]/u.test(e))}var kc=(e,t)=>t.isSVG??Sc(e)?new js(t):new xs(t,{allowProjection:e!==k.Fragment}),Ec=(0,k.createContext)({strict:!1}),Cc=(0,k.createContext)({});function Nc(e){const{initial:t,animate:n}=function(e,t){if(Xi(e)){const{initial:t,animate:n}=e;return{initial:!1===t||Gi(t)?t:void 0,animate:Gi(n)?n:void 0}}return!1!==e.inherit?t:{}}(e,(0,k.useContext)(Cc));return(0,k.useMemo)(()=>({initial:t,animate:n}),[Tc(t),Tc(n)])}function Tc(e){return Array.isArray(e)?e.join(" "):e}var jc=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Rc(e,t,n){for(const r in t)ti(t[r])||vs(r,n)||(e[r]=t[r])}function Pc(e,t){const n={};return Rc(n,e.style||{},e),Object.assign(n,function({transformTemplate:e},t){return(0,k.useMemo)(()=>{const n={style:{},transform:{},transformOrigin:{},vars:{}};return fs(n,t,e),Object.assign({},n.vars,n.style)},[t])}(e,t)),n}function Oc(e,t){const n={},r=Pc(e,t);return e.drag&&!1!==e.dragListener&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=!0===e.drag?"none":"pan-"+("x"===e.drag?"y":"x")),void 0===e.tabIndex&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}var _c=()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}});function Ac(e,t,n,r){const o=(0,k.useMemo)(()=>{const n={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return Es(n,t,Ns(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){const t={};Rc(t,e.style,e),o.style={...t,...o.style}}return o}var Dc=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"]);function Mc(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Dc.has(e)}var Lc,Ic,zc,Fc,Bc,Uc,Vc=s({default:()=>Lc}),$c=(Ic=()=>{throw Lc={},new Error('Could not resolve "@emotion/is-prop-valid" imported by "framer-motion". Is it installed?')},()=>{if(Fc)throw Fc[0];try{return Ic&&(zc=Ic(Ic=0)),zc}catch(e){throw Fc=[e],e}}),Hc=e=>!Mc(e);try{"function"==typeof(Bc=($c(),Uc=Vc,a.call(Uc,"module.exports")?Uc["module.exports"]:l(t({},"__esModule",{value:!0}),Uc)).default)&&(Hc=e=>e.startsWith("on")?!Mc(e):Bc(e))}catch{}function qc(e,t,n,{latestValues:r},o,a=!1,i){const s=(i??Sc(e)?Ac:Oc)(t,r,o,e),l=function(e,t,n){const r={};for(const o in e)"values"===o&&"object"==typeof e.values||ti(e[o])||(Hc(o)||!0===n&&Mc(o)||!t&&!Mc(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}(t,"string"==typeof e,a),c=e!==k.Fragment?{...l,...s,ref:n}:{},{children:u}=t,d=(0,k.useMemo)(()=>ti(u)?u.get():u,[u]);return(0,k.createElement)(e,{...c,children:d})}function Wc(e,t,n,r){const o={},a=r(e,{});for(const f in a)o[f]=nl(a[f]);let{initial:i,animate:s}=e;const l=Xi(e),c=Ji(e);t&&c&&!l&&!1!==e.inherit&&(void 0===i&&(i=t.initial),void 0===s&&(s=t.animate));let u=!!n&&!1===n.initial;u=u||!1===i;const d=u?s:i;if(d&&"boolean"!=typeof d&&!Ki(d)){const t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){const r=rs(e,t[n]);if(r){const{transitionEnd:e,transition:t,...n}=r;for(const r in n){let e=n[r];if(Array.isArray(e)){e=e[u?e.length-1:0]}null!==e&&(o[r]=e)}for(const r in e)o[r]=e[r]}}}return o}var Kc=e=>(t,n)=>{const r=(0,k.useContext)(Cc),o=(0,k.useContext)(rn),a=()=>function({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,o){return{latestValues:Wc(n,r,o,e),renderState:t()}}(e,t,r,o);return n?a():tn(a)},Gc=Kc({scrapeMotionValuesFromProps:bs,createRenderState:jc}),Yc=Kc({scrapeMotionValuesFromProps:Ts,createRenderState:_c}),Qc={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"]},Xc=!1;function Jc(){return function(){if(Xc)return;const e={};for(const t in Qc)e[t]={isEnabled:e=>Qc[t].some(t=>!!e[t])};is(e),Xc=!0}(),as}var Zc=Symbol.for("motionComponentSymbol");function eu(e,t,n){const r=(0,k.useRef)(n);(0,k.useInsertionEffect)(()=>{r.current=n});const o=(0,k.useRef)(null);return(0,k.useCallback)(n=>{n&&e.onMount?.(n),t&&(n?t.mount(n):t.unmount());const a=r.current;if("function"==typeof a)if(n){const e=a(n);"function"==typeof e&&(o.current=e)}else o.current?(o.current(),o.current=null):a(n);else a&&(a.current=n)},[t])}var tu=(0,k.createContext)({});function nu(e){return e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function ru(e,t,n,r,o,a){const{visualElement:i}=(0,k.useContext)(Cc),s=(0,k.useContext)(Ec),l=(0,k.useContext)(rn),c=(0,k.useContext)(cc),u=c.reducedMotion,d=c.skipAnimations,f=(0,k.useRef)(null),h=(0,k.useRef)(!1);r=r||s.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:i,props:n,presenceContext:l,blockInitialAnimation:!!l&&!1===l.initial,reducedMotionConfig:u,skipAnimations:d,isSVG:a}),h.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));const p=f.current,m=(0,k.useContext)(tu);!p||p.projection||!o||"html"!==p.type&&"svg"!==p.type||function(e,t,n,r){const{layoutId:o,layout:a,drag:i,dragConstraints:s,layoutScroll:l,layoutRoot:c,layoutAnchor:u,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:ou(e.parent)),e.projection.setOptions({layoutId:o,layout:a,alwaysMeasureLayout:Boolean(i)||s&&nu(s),visualElement:e,animationType:"string"==typeof a?a:"both",initialPromotionConfig:r,crossfade:d,layoutScroll:l,layoutRoot:c,layoutAnchor:u})}(f.current,n,o,m);const g=(0,k.useRef)(!1);(0,k.useInsertionEffect)(()=>{p&&g.current&&p.update(n,l)});const y=n[ka],v=(0,k.useRef)(Boolean(y)&&"undefined"!=typeof window&&!window.MotionHandoffIsComplete?.(y)&&window.MotionHasOptimisedAnimation?.(y));return nn(()=>{h.current=!0,p&&(g.current=!0,window.MotionIsMounted=!0,p.updateFeatures(),p.scheduleRenderMicrotask(),v.current&&p.animationState&&p.animationState.animateChanges())}),(0,k.useEffect)(()=>{p&&(!v.current&&p.animationState&&p.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(y)}),v.current=!1),p.enteringChildren=void 0)}),p}function ou(e){if(e)return!1!==e.options.allowProjection?e.projection:ou(e.parent)}function au(e,{forwardMotionProps:t=!1,type:n}={},r,o){r&&function(e){const t=Jc();for(const n in e)t[n]={...t[n],...e[n]};is(t)}(r);const a=n?"svg"===n:Sc(e),i=a?Yc:Gc;function s(n,r){let s;const l={...(0,k.useContext)(cc),...n,layoutId:iu(n)},{isStatic:c}=l,u=Nc(n),d=i(n,c);if(!c&&"undefined"!=typeof window){(0,k.useContext)(Ec).strict;const t=function(e){const{drag:t,layout:n}=Jc();if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}(l);s=t.MeasureLayout,u.visualElement=ru(e,d,l,o,t.ProjectionNode,a)}return(0,fc.jsxs)(Cc.Provider,{value:u,children:[s&&u.visualElement?(0,fc.jsx)(s,{visualElement:u.visualElement,...l}):null,qc(e,n,eu(d,u.visualElement,r),d,c,t,a)]})}s.displayName=`motion.${"string"==typeof e?e:`create(${e.displayName??e.name??""})`}`;const l=(0,k.forwardRef)(s);return l[Zc]=e,l}function iu({layoutId:e}){const t=(0,k.useContext)(en).id;return t&&void 0!==e?t+"-"+e:e}function su(e,t){if("undefined"==typeof Proxy)return au;const n=new Map,r=(n,r)=>au(n,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(o,a)=>"create"===a?r:(n.has(a)||n.set(a,au(a,void 0,e,t)),n.get(a))})}var lu=0,cu={animation:{Feature:class extends ri{constructor(e){super(e),e.animationState||(e.animationState=Hs(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();Ki(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}},exit:{Feature:class extends ri{constructor(){super(...arguments),this.id=lu++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;if(e&&!1===n){if(this.isExitComplete){const{initial:e,custom:t}=this.node.getProps();if("string"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)){const n=Rs(this.node,e,t);if(n){const{transition:e,transitionEnd:t,...r}=n;for(const n in r)this.node.getValue(n)?.jump(r[n])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);return void(this.isExitComplete=!1)}const r=this.node.animationState.setActive("exit",!e);t&&!e&&r.then(()=>{this.isExitComplete=!0,t(this.id)})}mount(){const{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}}};function uu(e){return{point:{x:e.pageX,y:e.pageY}}}function du(e,t,n,r){return tl(e,t,(e=>t=>Aa(t)&&e(t,uu(t)))(n),r)}var fu=({current:e})=>e?e.ownerDocument.defaultView:null,hu=(e,t)=>Math.abs(e-t);var pu=new Set(["auto","scroll"]),mu=class{constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:o=!1,distanceThreshold:a=3,element:i}={}){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=gu(this.lastRawMoveEventInfo,this.transformPagePoint));const e=vu(this.lastMoveEventInfo,this.history),t=null!==this.startEvent,n=function(e,t){const n=hu(e.x,t.x),r=hu(e.y,t.y);return Math.sqrt(n**2+r**2)}(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;const{point:r}=e,{timestamp:o}=$n;this.history.push({...r,timestamp:o});const{onStart:a,onMove:i}=this.handlers;t||(a&&a(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),i&&i(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastRawMoveEventInfo=t,this.lastMoveEventInfo=gu(t,this.transformPagePoint),Un.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();const{onEnd:n,onSessionEnd:r,resumeAnimation:o}=this.handlers;if(!this.dragSnapToOrigin&&this.startEvent||o&&o(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const a=vu("pointercancel"===e.type?this.lastMoveEventInfo:gu(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,a),r&&r(e,a)},!Aa(e))return;this.dragSnapToOrigin=o,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=a,this.contextWindow=r||window;const s=gu(uu(e),this.transformPagePoint),{point:l}=s,{timestamp:c}=$n;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=t;u&&u(e,vu(s,this.history)),this.removeListeners=pn(du(this.contextWindow,"pointermove",this.handlePointerMove),du(this.contextWindow,"pointerup",this.handlePointerUp),du(this.contextWindow,"pointercancel",this.handlePointerUp)),i&&this.startScrollTracking(i)}startScrollTracking(e){let t=e.parentElement;for(;t;){const e=getComputedStyle(t);(pu.has(e.overflowX)||pu.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){const t=this.scrollPositions.get(e);if(!t)return;const n=e===window,r=n?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},o=r.x-t.x,a=r.y-t.y;0===o&&0===a||(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=o,this.lastMoveEventInfo.point.y+=a):this.history.length>0&&(this.history[0].x-=o,this.history[0].y-=a),this.scrollPositions.set(e,r),Un.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Vn(this.updatePoint)}};function gu(e,t){return t?{point:t(e.point)}:e}function yu(e,t){return{x:e.x-t.x,y:e.y-t.y}}function vu({point:e},t){return{point:e,delta:yu(e,xu(t)),offset:yu(e,bu(t)),velocity:wu(t,.1)}}function bu(e){return e[0]}function xu(e){return e[e.length-1]}function wu(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=xu(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>yn(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&o.timestamp-r.timestamp>2*yn(t)&&(r=e[1]);const a=vn(o.timestamp-r.timestamp);if(0===a)return{x:0,y:0};const i={x:(o.x-r.x)/a,y:(o.y-r.y)/a};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}function Su(e,t,n){return{min:void 0!==t?e.min+t:void 0,max:void 0!==n?e.max+n-(e.max-e.min):void 0}}function ku(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}}var Eu=.35;function Cu(e,t,n){return{min:Nu(e,t),max:Nu(e,n)}}function Nu(e,t){return"number"==typeof e?e:e[t]||0}var Tu=new WeakMap,ju=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={x:{min:0,max:0},y:{min:0,max:0}},this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:n}={}){const{presenceContext:r}=this.visualElement;if(r&&!1===r.isPresent)return;const{dragSnapToOrigin:o}=this.getProps();this.panSession=new mu(e,{onSessionStart:e=>{t&&this.snapToCursor(uu(e).point),this.stopAnimation()},onStart:(e,t)=>{const{drag:n,dragPropagation:r,onDragStart:o}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock="x"===(a=n)||"y"===a?Na[a]?null:(Na[a]=!0,()=>{Na[a]=!1}):Na.x||Na.y?null:(Na.x=Na.y=!0,()=>{Na.x=Na.y=!1}),!this.openDragLock))return;var a;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),el(e=>{let t=this.getAxisMotionValue(e).get()||0;if(hr.test(t)){const{projection:n}=this.visualElement;if(n&&n.layout){const r=n.layout.layoutBox[e];r&&(t=Gs(r)*(parseFloat(t)/100))}}this.originPoint[e]=t}),o&&Un.update(()=>o(e,t),!1,!0),ni(this.visualElement,"transform");const{animationState:i}=this.visualElement;i&&i.setActive("whileDrag",!0)},onMove:(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;const{dragPropagation:n,dragDirectionLock:r,onDirectionLock:o,onDrag:a}=this.getProps();if(!n&&!this.openDragLock)return;const{offset:i}=t;if(r&&null===this.currentDirection)return this.currentDirection=function(e,t=10){let n=null;Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x");return n}(i),void(null!==this.currentDirection&&o&&o(this.currentDirection));this.updateAxis("x",t.point,i),this.updateAxis("y",t.point,i),this.visualElement.render(),a&&Un.update(()=>a(e,t),!1,!0)},onSessionEnd:(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},resumeAnimation:()=>{const{dragSnapToOrigin:e}=this.getProps();(e||this.constraints)&&this.startAnimation({x:0,y:0})}},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:o,distanceThreshold:n,contextWindow:fu(this.visualElement),element:this.visualElement.current})}stop(e,t){const n=e||this.latestPointerEvent,r=t||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!r||!n)return;const{velocity:a}=r;this.startAnimation(a);const{onDragEnd:i}=this.getProps();i&&Un.postRender(()=>i(n,r))}cancel(){this.isDragging=!1;const{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();const{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){const{drag:r}=this.getProps();if(!n||!Pu(e,r,this.currentDirection))return;const o=this.getAxisMotionValue(e);let a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=function(e,{min:t,max:n},r){return void 0!==t&&e<t?e=r?Pr(t,e,r.min):Math.max(e,t):void 0!==n&&e>n&&(e=r?Pr(n,e,r.max):Math.min(e,n)),e}(a,this.constraints[e],this.elastic[e])),o.set(a)}resolveConstraints(){const{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&&nu(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!e||!n)&&function(e,{top:t,left:n,bottom:r,right:o}){return{x:Su(e.x,n,o),y:Su(e.y,t,r)}}(n.layoutBox,e),this.elastic=function(e=Eu){return!1===e?e=0:!0===e&&(e=Eu),{x:Cu(e,"left","right"),y:Cu(e,"top","bottom")}}(t),r!==this.constraints&&!nu(e)&&n&&this.constraints&&!this.hasMutatedConstraints&&el(e=>{!1!==this.constraints&&this.getAxisMotionValue(e)&&(this.constraints[e]=function(e,t){const n={};return void 0!==t.min&&(n.min=t.min-e.min),void 0!==t.max&&(n.max=t.max-e.min),n}(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!nu(e))return!1;const n=e.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;r.root&&(r.root.scroll=void 0,r.root.updateScroll());const o=function(e,t,n){const r=xi(e,n),{scroll:o}=t;return o&&(gi(r.x,o.offset.x),gi(r.y,o.offset.y)),r}(n,r.root,this.visualElement.getTransformPagePoint());let a=function(e,t){return{x:ku(e.x,t.x),y:ku(e.y,t.y)}}(r.layout.layoutBox,o);if(t){const e=t(function({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}(a));this.hasMutatedConstraints=!!e,e&&(a=oi(e))}return a}startAnimation(e){const{drag:t,dragMomentum:n,dragElastic:r,dragTransition:o,dragSnapToOrigin:a,onDragTransitionEnd:i}=this.getProps(),s=this.constraints||{},l=el(i=>{if(!Pu(i,t,this.currentDirection))return;let l=s&&s[i]||{};!0!==a&&a!==i||(l={min:0,max:0});const c=r?200:1e6,u=r?40:1e7,d={type:"inertia",velocity:n?e[i]:0,bounceStiffness:c,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...o,...l};return this.startAxisValueAnimation(i,d)});return Promise.all(l).then(i)}startAxisValueAnimation(e,t){const n=this.getAxisMotionValue(e);return ni(this.visualElement,e),n.start(wa(e,n,0,t,this.visualElement,!1))}stopAnimation(){el(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){const t=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps()[t];return n||this.visualElement.getValue(e,this.visualElement.latestValues[e]??0)}snapToCursor(e){el(t=>{const{drag:n}=this.getProps();if(!Pu(t,n,this.currentDirection))return;const{projection:r}=this.visualElement,o=this.getAxisMotionValue(t);if(r&&r.layout){const{min:n,max:a}=r.layout.layoutBox[t],i=o.get()||0;o.set(e[t]-Pr(n,a,.5)+i)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!nu(t)||!n||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};el(e=>{const t=this.getAxisMotionValue(e);if(t&&!1!==this.constraints){const n=t.get();r[e]=function(e,t){let n=.5;const r=Gs(e),o=Gs(t);return o>r?n=mn(t.min,t.max-r,e.min):r>o&&(n=mn(e.min,e.max-o,t.min)),sn(0,1,n)}({min:n,max:n},this.constraints[e])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),el(t=>{if(!Pu(t,e,null))return;const n=this.getAxisMotionValue(t),{min:o,max:a}=this.constraints[t];n.set(Pr(o,a,r[t]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;Tu.set(this.visualElement,this);const e=this.visualElement.current,t=du(e,"pointerdown",t=>{const{drag:n,dragListener:r=!0}=this.getProps(),o=t.target,a=o!==e&&function(e){return Ma.has(e.tagName)||!0===e.isContentEditable}(o);n&&r&&!a&&this.start(t)});let n;const r=()=>{const{dragConstraints:t}=this.getProps();nu(t)&&t.current&&(this.constraints=this.resolveRefConstraints(),n||(n=function(e,t,n){const r=ei(e,Ru(n)),o=ei(t,Ru(n));return()=>{r(),o()}}(e,t.current,()=>this.scalePositionWithinConstraints())))},{projection:o}=this.visualElement,a=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),Un.read(r);const i=tl(window,"resize",()=>this.scalePositionWithinConstraints()),s=o.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(el(t=>{const n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())});return()=>{i(),t(),a(),s&&s(),n&&n()}}getProps(){const e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:o=!1,dragElastic:a=Eu,dragMomentum:i=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:o,dragElastic:a,dragMomentum:i}}};function Ru(e){let t=!0;return()=>{t?t=!1:e()}}function Pu(e,t,n){return!(!0!==t&&t!==e||null!==n&&n!==e)}var Ou=e=>(t,n)=>{e&&Un.update(()=>e(t,n),!1,!0)},_u=!1,Au=class extends k.Component{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:o}=e;o&&(t.group&&t.group.add(o),n&&n.register&&r&&n.register(o),_u&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Rl.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:t,visualElement:n,drag:r,isPresent:o}=this.props,{projection:a}=n;return a?(a.isPresent=o,e.layoutDependency!==t&&a.setOptions({...a.options,layoutDependency:t}),_u=!0,r||e.layoutDependency!==t||void 0===t||e.isPresent!==o?a.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?a.promote():a.relegate()||Un.postRender(()=>{const e=a.getStack();e&&e.members.length||this.safeToRemove()})),null):null}componentDidUpdate(){const{visualElement:e,layoutAnchor:t}=this.props,{projection:n}=e;n&&(n.options.layoutAnchor=t,n.root.didUpdate(),Ea.postRender(()=>{!n.currentAnimation&&n.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;_u=!0,r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}};function Du(e){const[t,n]=yc(),r=(0,k.useContext)(en);return(0,fc.jsx)(Au,{...e,layoutGroup:r,switchLayoutGroup:(0,k.useContext)(tu),isPresent:t,safeToRemove:n})}var Mu={pan:{Feature:class extends ri{constructor(){super(...arguments),this.removePointerDownListener=hn}onPointerDown(e){this.session=new mu(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:fu(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:Ou(e),onStart:Ou(t),onMove:Ou(n),onEnd:(e,t)=>{delete this.session,r&&Un.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=du(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends ri{constructor(e){super(e),this.removeGroupControls=hn,this.removeListeners=hn,this.controls=new ju(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||hn}update(){const{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()}},ProjectionNode:lc,MeasureLayout:Du}};function Lu(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover","Start"===n);const o=r["onHover"+n];o&&Un.postRender(()=>o(t,uu(t)))}function Iu(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap","Start"===n);const o=r["onTap"+("End"===n?"":n)];o&&Un.postRender(()=>o(t,uu(t)))}var zu=new WeakMap,Fu=new WeakMap,Bu=e=>{const t=zu.get(e.target);t&&t(e)},Uu=e=>{e.forEach(Bu)};function Vu(e,t,n){const r=function({root:e,...t}){const n=e||document;Fu.has(n)||Fu.set(n,{});const r=Fu.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(Uu,{root:e,...t})),r[o]}(t);return zu.set(e,n),r.observe(e),()=>{zu.delete(e),r.unobserve(e)}}var $u={some:0,all:1};var Hu={inView:{Feature:class extends ri{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();const{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r="some",once:o}=e,a={root:t?t.current:void 0,rootMargin:n,threshold:"number"==typeof r?r:$u[r]};this.stopObserver=Vu(this.node.current,a,e=>{const{isIntersecting:t}=e;if(this.isInView===t)return;if(this.isInView=t,o&&!t&&this.hasEnteredView)return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);const{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),a=t?n:r;a&&a(e)})}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:e,prevProps:t}=this.node;["amount","margin","root"].some(function({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}}},tap:{Feature:class extends ri{mount(){const{current:e}=this.node;if(!e)return;const{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=Ua(e,(e,t)=>(Iu(this.node,t,"Start"),(e,{success:t})=>Iu(this.node,e,t?"End":"Cancel")),{useGlobalTarget:t,stopPropagation:!1===n?.tap})}unmount(){}}},focus:{Feature:class extends ri{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch(t){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=pn(tl(this.node.current,"focus",()=>this.onFocus()),tl(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends ri{mount(){const{current:e}=this.node;e&&(this.unmount=Pa(e,(e,t)=>(Lu(this.node,t,"Start"),e=>Lu(this.node,e,"End"))))}unmount(){}}}},qu=su({...cu,...Hu,...Mu,...{layout:{ProjectionNode:lc,MeasureLayout:Du}}},kc),Wu=(...e)=>e.filter((e,t,n)=>Boolean(e)&&""!==e.trim()&&n.indexOf(e)===t).join(" ").trim(),Ku=e=>{const t=(e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()))(e);return t.charAt(0).toUpperCase()+t.slice(1)},Gu={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"},Yu=e=>{for(const t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0;return!1},Qu=(0,k.createContext)({}),Xu=(0,k.forwardRef)(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:o="",children:a,iconNode:i,...s},l)=>{const{size:c=24,strokeWidth:u=2,absoluteStrokeWidth:d=!1,color:f="currentColor",className:h=""}=(0,k.useContext)(Qu)??{},p=r??d?24*Number(n??u)/Number(t??c):n??u;return(0,k.createElement)("svg",{ref:l,...Gu,width:t??c??Gu.width,height:t??c??Gu.height,stroke:e??f,strokeWidth:p,className:Wu("lucide",h,o),...!a&&!Yu(s)&&{"aria-hidden":"true"},...s},[...i.map(([e,t])=>(0,k.createElement)(e,t)),...Array.isArray(a)?a:[a]])}),Ju=(e,t)=>{const n=(0,k.forwardRef)(({className:n,...r},o)=>{return(0,k.createElement)(Xu,{ref:o,iconNode:t,className:Wu(`lucide-${a=Ku(e),a.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,n),...r});var a});return n.displayName=Ku(e),n},Zu=Ju("braces",[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1",key:"ezmyqa"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1",key:"e1hn23"}]]),ed=Ju("chart-no-axes-column-increasing",[["path",{d:"M5 21v-6",key:"1hz6c0"}],["path",{d:"M12 21V9",key:"uvy0l4"}],["path",{d:"M19 21V3",key:"11j9sm"}]]),td=Ju("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"}]]),nd=Ju("circle-check-big",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]),rd=Ju("code-xml",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]]),od=Ju("file-braces",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1",key:"1oajmo"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1",key:"mpwhp6"}]]),ad=Ju("grid-3x3",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]]),id=Ju("layers",[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]]),sd=Ju("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]),ld=Ju("panels-top-left",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M9 21V9",key:"1oto5p"}]]),cd=Ju("text-align-start",[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 19H3",key:"z6ezky"}]]),ud=Ju("wand-sparkles",[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]]),dd=Ju("box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]),fd=Ju("calculator",[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",key:"1nb95v"}],["line",{x1:"8",x2:"16",y1:"6",y2:"6",key:"x4nwl0"}],["line",{x1:"16",x2:"16",y1:"14",y2:"18",key:"wjye3r"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M8 18h.01",key:"lrp35t"}]]),hd=Ju("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]),pd=Ju("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),md=Ju("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),gd=Ju("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),yd=Ju("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]),vd=Ju("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]),bd=Ju("code",[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]]),xd=Ju("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"}]]),wd=Ju("database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]),Sd=Ju("dollar-sign",[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]]),kd=Ju("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]),Ed=Ju("eye-off",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]),Cd=Ju("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]),Nd=Ju("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]),Td=Ju("file",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]]),jd=Ju("folder-tree",[["path",{d:"M20 10a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2A1 1 0 0 0 15 3h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"hod4my"}],["path",{d:"M20 21a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-2.9a1 1 0 0 1-.88-.55l-.42-.85a1 1 0 0 0-.92-.6H13a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"w4yl2u"}],["path",{d:"M3 5a2 2 0 0 0 2 2h3",key:"f2jnh7"}],["path",{d:"M3 3v13a2 2 0 0 0 2 2h3",key:"k8epm1"}]]),Rd=Ju("folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]),Pd=Ju("git-branch",[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]]),Od=Ju("globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]),_d=Ju("grip-vertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]),Ad=Ju("hash",[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]]),Dd=Ju("heading",[["path",{d:"M6 12h12",key:"8npq4p"}],["path",{d:"M6 20V4",key:"1w1bmo"}],["path",{d:"M18 20V4",key:"o2hl4u"}]]),Md=Ju("history",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]),Ld=Ju("image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]),Id=Ju("key",[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]]),zd=Ju("link-2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]),Fd=Ju("link",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]),Bd=Ju("list",[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]]),Ud=Ju("lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]),Vd=Ju("mail",[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]]),$d=Ju("map-pin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]),Hd=Ju("music",[["path",{d:"M9 18V5l12-2v13",key:"1jmyc2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["circle",{cx:"18",cy:"16",r:"3",key:"1hluhg"}]]),qd=Ju("palette",[["path",{d:"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",key:"e79jfc"}],["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}]]),Wd=Ju("percent",[["line",{x1:"19",x2:"5",y1:"5",y2:"19",key:"1x9vlm"}],["circle",{cx:"6.5",cy:"6.5",r:"2.5",key:"4mh3h7"}],["circle",{cx:"17.5",cy:"17.5",r:"2.5",key:"1mdrzq"}]]),Kd=Ju("phone",[["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]]),Gd=Ju("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]),Yd=Ju("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]),Qd=Ju("save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]),Xd=Ju("settings-2",[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]]),Jd=Ju("shapes",[["path",{d:"M8.3 10a.7.7 0 0 1-.626-1.079L11.4 3a.7.7 0 0 1 1.198-.043L16.3 8.9a.7.7 0 0 1-.572 1.1Z",key:"1bo67w"}],["rect",{x:"3",y:"14",width:"7",height:"7",rx:"1",key:"1bkyp8"}],["circle",{cx:"17.5",cy:"17.5",r:"3.5",key:"w3z12y"}]]),Zd=Ju("star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]),ef=Ju("tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]),tf=Ju("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]),nf=Ju("toggle-left",[["circle",{cx:"9",cy:"12",r:"3",key:"u3jwor"}],["rect",{width:"20",height:"14",x:"2",y:"5",rx:"7",key:"g7kal2"}]]),rf=Ju("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"}]]),of=Ju("trending-up",[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]]),af=Ju("type",[["path",{d:"M12 4v16",key:"1654pz"}],["path",{d:"M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2",key:"e0r10z"}],["path",{d:"M9 20h6",key:"s66wpe"}]]),sf=Ju("upload",[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]]),lf=Ju("video",[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]]),cf=Ju("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),uf=Ju("zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);var df=Array(12).fill(0),ff=({visible:e,className:t})=>k.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},k.createElement("div",{className:"sonner-spinner"},df.map((e,t)=>k.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${t}`})))),hf=k.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},k.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),pf=k.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},k.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),mf=k.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},k.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),gf=k.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},k.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),yf=k.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},k.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),k.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),vf=1,bf=new class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{const t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;const{message:n,...r}=e,o="number"==typeof(null==e?void 0:e.id)||(null==(t=e.id)?void 0:t.length)>0?e.id:vf++,a=this.toasts.find(e=>e.id===o),i=void 0===e.dismissible||e.dismissible;return this.dismissedToasts.has(o)&&this.dismissedToasts.delete(o),a?this.toasts=this.toasts.map(t=>t.id===o?(this.publish({...t,...e,id:o,title:n}),{...t,...e,id:o,dismissible:i,title:n}):t):this.addToast({title:n,...r,dismissible:i,id:o}),o},this.dismiss=e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(t=>t({id:e,dismiss:!0})))):this.toasts.forEach(e=>{this.subscribers.forEach(t=>t({id:e.id,dismiss:!0}))}),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;void 0!==t.loading&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:"function"!=typeof t.description?t.description:void 0}));const r=Promise.resolve(e instanceof Function?e():e);let o,a=void 0!==n;const i=r.then(async e=>{if(o=["resolve",e],k.isValidElement(e))a=!1,this.create({id:n,type:"default",message:e});else if(xf(e)&&!e.ok){a=!1;const r="function"==typeof t.error?await t.error(`HTTP error! status: ${e.status}`):t.error,o="function"==typeof t.description?await t.description(`HTTP error! status: ${e.status}`):t.description,i="object"!=typeof r||k.isValidElement(r)?{message:r}:r;this.create({id:n,type:"error",description:o,...i})}else if(e instanceof Error){a=!1;const r="function"==typeof t.error?await t.error(e):t.error,o="function"==typeof t.description?await t.description(e):t.description,i="object"!=typeof r||k.isValidElement(r)?{message:r}:r;this.create({id:n,type:"error",description:o,...i})}else if(void 0!==t.success){a=!1;const r="function"==typeof t.success?await t.success(e):t.success,o="function"==typeof t.description?await t.description(e):t.description,i="object"!=typeof r||k.isValidElement(r)?{message:r}:r;this.create({id:n,type:"success",description:o,...i})}}).catch(async e=>{if(o=["reject",e],void 0!==t.error){a=!1;const r="function"==typeof t.error?await t.error(e):t.error,o="function"==typeof t.description?await t.description(e):t.description,i="object"!=typeof r||k.isValidElement(r)?{message:r}:r;this.create({id:n,type:"error",description:o,...i})}}).finally(()=>{a&&(this.dismiss(n),n=void 0),null==t.finally||t.finally.call(t)}),s=()=>new Promise((e,t)=>i.then(()=>"reject"===o[0]?t(o[1]):e(o[1])).catch(t));return"string"!=typeof n&&"number"!=typeof n?{unwrap:s}:Object.assign(n,{unwrap:s})},this.custom=(e,t)=>{const n=(null==t?void 0:t.id)||vf++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},xf=e=>e&&"object"==typeof e&&"ok"in e&&"boolean"==typeof e.ok&&"status"in e&&"number"==typeof e.status,wf=(e,t)=>{const n=(null==t?void 0:t.id)||vf++;return bf.addToast({title:e,...t,id:n}),n},Sf=Object.assign(wf,{success:bf.success,info:bf.info,warning:bf.warning,error:bf.error,custom:bf.custom,message:bf.message,promise:bf.promise,dismiss:bf.dismiss,loading:bf.loading},{getHistory:()=>bf.toasts,getToasts:()=>bf.getActiveToasts()});function kf(e){return void 0!==e.label}!function(e){if(!e||"undefined"==typeof document)return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");var Ef=3,Cf=14;function Nf(...e){return e.filter(Boolean).join(" ")}var Tf=e=>{var t,n,r,o,a,i,s,l,c;const{invert:u,toast:d,unstyled:f,interacting:h,setHeights:p,visibleToasts:m,heights:g,index:y,toasts:v,expanded:b,removeToast:x,defaultRichColors:w,closeButton:S,style:E,cancelButtonStyle:C,actionButtonStyle:N,className:T="",descriptionClassName:j="",duration:R,position:P,gap:O,expandByDefault:_,classNames:A,icons:D,closeButtonAriaLabel:M="Close toast"}=e,[L,I]=k.useState(null),[z,F]=k.useState(null),[B,U]=k.useState(!1),[V,$]=k.useState(!1),[H,q]=k.useState(!1),[W,K]=k.useState(!1),[G,Y]=k.useState(!1),[Q,X]=k.useState(0),[J,Z]=k.useState(0),ee=k.useRef(d.duration||R||4e3),te=k.useRef(null),ne=k.useRef(null),re=0===y,oe=y+1<=m,ae=d.type,ie=!1!==d.dismissible,se=d.className||"",le=d.descriptionClassName||"",ce=k.useMemo(()=>g.findIndex(e=>e.toastId===d.id)||0,[g,d.id]),ue=k.useMemo(()=>{var e;return null!=(e=d.closeButton)?e:S},[d.closeButton,S]),de=k.useMemo(()=>d.duration||R||4e3,[d.duration,R]),fe=k.useRef(0),he=k.useRef(0),pe=k.useRef(0),me=k.useRef(null),[ge,ye]=P.split("-"),ve=k.useMemo(()=>g.reduce((e,t,n)=>n>=ce?e:e+t.height,0),[g,ce]),be=(()=>{const[e,t]=k.useState(document.hidden);return k.useEffect(()=>{const e=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",e),()=>window.removeEventListener("visibilitychange",e)},[]),e})(),xe=d.invert||u,we="loading"===ae;he.current=k.useMemo(()=>ce*O+ve,[ce,ve]),k.useEffect(()=>{ee.current=de},[de]),k.useEffect(()=>{U(!0)},[]),k.useEffect(()=>{const e=ne.current;if(e){const t=e.getBoundingClientRect().height;return Z(t),p(e=>[{toastId:d.id,height:t,position:d.position},...e]),()=>p(e=>e.filter(e=>e.toastId!==d.id))}},[p,d.id]),k.useLayoutEffect(()=>{if(!B)return;const e=ne.current,t=e.style.height;e.style.height="auto";const n=e.getBoundingClientRect().height;e.style.height=t,Z(n),p(e=>e.find(e=>e.toastId===d.id)?e.map(e=>e.toastId===d.id?{...e,height:n}:e):[{toastId:d.id,height:n,position:d.position},...e])},[B,d.title,d.description,p,d.id,d.jsx,d.action,d.cancel]);const Se=k.useCallback(()=>{$(!0),X(he.current),p(e=>e.filter(e=>e.toastId!==d.id)),setTimeout(()=>{x(d)},200)},[d,x,p,he]);k.useEffect(()=>{if(d.promise&&"loading"===ae||d.duration===1/0||"loading"===d.type)return;let e;return b||h||be?(()=>{if(pe.current<fe.current){const e=(new Date).getTime()-fe.current;ee.current=ee.current-e}pe.current=(new Date).getTime()})():ee.current!==1/0&&(fe.current=(new Date).getTime(),e=setTimeout(()=>{null==d.onAutoClose||d.onAutoClose.call(d,d),Se()},ee.current)),()=>clearTimeout(e)},[b,h,d,ae,be,Se]),k.useEffect(()=>{d.delete&&(Se(),null==d.onDismiss||d.onDismiss.call(d,d))},[Se,d.delete]);const ke=d.icon||(null==D?void 0:D[ae])||(e=>{switch(e){case"success":return hf;case"info":return mf;case"warning":return pf;case"error":return gf;default:return null}})(ae);var Ee,Ce;return k.createElement("li",{tabIndex:0,ref:ne,className:Nf(T,se,null==A?void 0:A.toast,null==d||null==(t=d.classNames)?void 0:t.toast,null==A?void 0:A.default,null==A?void 0:A[ae],null==d||null==(n=d.classNames)?void 0:n[ae]),"data-sonner-toast":"","data-rich-colors":null!=(Ee=d.richColors)?Ee:w,"data-styled":!Boolean(d.jsx||d.unstyled||f),"data-mounted":B,"data-promise":Boolean(d.promise),"data-swiped":G,"data-removed":V,"data-visible":oe,"data-y-position":ge,"data-x-position":ye,"data-index":y,"data-front":re,"data-swiping":H,"data-dismissible":ie,"data-type":ae,"data-invert":xe,"data-swipe-out":W,"data-swipe-direction":z,"data-expanded":Boolean(b||_&&B),"data-testid":d.testId,style:{"--index":y,"--toasts-before":y,"--z-index":v.length-y,"--offset":`${V?Q:he.current}px`,"--initial-height":_?"auto":`${J}px`,...E,...d.style},onDragEnd:()=>{q(!1),I(null),me.current=null},onPointerDown:e=>{2!==e.button&&!we&&ie&&(te.current=new Date,X(he.current),e.target.setPointerCapture(e.pointerId),"BUTTON"!==e.target.tagName&&(q(!0),me.current={x:e.clientX,y:e.clientY}))},onPointerUp:()=>{var e,t,n;if(W||!ie)return;me.current=null;const r=Number((null==(e=ne.current)?void 0:e.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),o=Number((null==(t=ne.current)?void 0:t.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),a=(new Date).getTime()-(null==(n=te.current)?void 0:n.getTime()),i="x"===L?r:o,s=Math.abs(i)/a;if(Math.abs(i)>=45||s>.11)return X(he.current),null==d.onDismiss||d.onDismiss.call(d,d),F("x"===L?r>0?"right":"left":o>0?"down":"up"),Se(),void K(!0);var l,c;null==(l=ne.current)||l.style.setProperty("--swipe-amount-x","0px"),null==(c=ne.current)||c.style.setProperty("--swipe-amount-y","0px"),Y(!1),q(!1),I(null)},onPointerMove:t=>{var n,r,o;if(!me.current||!ie)return;if((null==(n=window.getSelection())?void 0:n.toString().length)>0)return;const a=t.clientY-me.current.y,i=t.clientX-me.current.x;var s;const l=null!=(s=e.swipeDirections)?s:function(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}(P);!L&&(Math.abs(i)>1||Math.abs(a)>1)&&I(Math.abs(i)>Math.abs(a)?"x":"y");let c={x:0,y:0};const u=e=>1/(1.5+Math.abs(e)/20);if("y"===L){if(l.includes("top")||l.includes("bottom"))if(l.includes("top")&&a<0||l.includes("bottom")&&a>0)c.y=a;else{const e=a*u(a);c.y=Math.abs(e)<Math.abs(a)?e:a}}else if("x"===L&&(l.includes("left")||l.includes("right")))if(l.includes("left")&&i<0||l.includes("right")&&i>0)c.x=i;else{const e=i*u(i);c.x=Math.abs(e)<Math.abs(i)?e:i}(Math.abs(c.x)>0||Math.abs(c.y)>0)&&Y(!0),null==(r=ne.current)||r.style.setProperty("--swipe-amount-x",`${c.x}px`),null==(o=ne.current)||o.style.setProperty("--swipe-amount-y",`${c.y}px`)}},ue&&!d.jsx&&"loading"!==ae?k.createElement("button",{"aria-label":M,"data-disabled":we,"data-close-button":!0,onClick:we||!ie?()=>{}:()=>{Se(),null==d.onDismiss||d.onDismiss.call(d,d)},className:Nf(null==A?void 0:A.closeButton,null==d||null==(r=d.classNames)?void 0:r.closeButton)},null!=(Ce=null==D?void 0:D.close)?Ce:yf):null,(ae||d.icon||d.promise)&&null!==d.icon&&(null!==(null==D?void 0:D[ae])||d.icon)?k.createElement("div",{"data-icon":"",className:Nf(null==A?void 0:A.icon,null==d||null==(o=d.classNames)?void 0:o.icon)},d.promise||"loading"===d.type&&!d.icon?d.icon||function(){var e,t;return(null==D?void 0:D.loading)?k.createElement("div",{className:Nf(null==A?void 0:A.loader,null==d||null==(t=d.classNames)?void 0:t.loader,"sonner-loader"),"data-visible":"loading"===ae},D.loading):k.createElement(ff,{className:Nf(null==A?void 0:A.loader,null==d||null==(e=d.classNames)?void 0:e.loader),visible:"loading"===ae})}():null,"loading"!==d.type?ke:null):null,k.createElement("div",{"data-content":"",className:Nf(null==A?void 0:A.content,null==d||null==(a=d.classNames)?void 0:a.content)},k.createElement("div",{"data-title":"",className:Nf(null==A?void 0:A.title,null==d||null==(i=d.classNames)?void 0:i.title)},d.jsx?d.jsx:"function"==typeof d.title?d.title():d.title),d.description?k.createElement("div",{"data-description":"",className:Nf(j,le,null==A?void 0:A.description,null==d||null==(s=d.classNames)?void 0:s.description)},"function"==typeof d.description?d.description():d.description):null),k.isValidElement(d.cancel)?d.cancel:d.cancel&&kf(d.cancel)?k.createElement("button",{"data-button":!0,"data-cancel":!0,style:d.cancelButtonStyle||C,onClick:e=>{kf(d.cancel)&&ie&&(null==d.cancel.onClick||d.cancel.onClick.call(d.cancel,e),Se())},className:Nf(null==A?void 0:A.cancelButton,null==d||null==(l=d.classNames)?void 0:l.cancelButton)},d.cancel.label):null,k.isValidElement(d.action)?d.action:d.action&&kf(d.action)?k.createElement("button",{"data-button":!0,"data-action":!0,style:d.actionButtonStyle||N,onClick:e=>{kf(d.action)&&(null==d.action.onClick||d.action.onClick.call(d.action,e),e.defaultPrevented||Se())},className:Nf(null==A?void 0:A.actionButton,null==d||null==(c=d.classNames)?void 0:c.actionButton)},d.action.label):null)};function jf(){if("undefined"==typeof window)return"ltr";if("undefined"==typeof document)return"ltr";const e=document.documentElement.getAttribute("dir");return"auto"!==e&&e?e:window.getComputedStyle(document.documentElement).direction}function Rf(e,t){const n={};return[e,t].forEach((e,t)=>{const r=1===t,o=r?"--mobile-offset":"--offset",a=r?"16px":"24px";function i(e){["top","right","bottom","left"].forEach(t=>{n[`${o}-${t}`]="number"==typeof e?`${e}px`:e})}"number"==typeof e||"string"==typeof e?i(e):"object"==typeof e?["top","right","bottom","left"].forEach(t=>{void 0===e[t]?n[`${o}-${t}`]=a:n[`${o}-${t}`]="number"==typeof e[t]?`${e[t]}px`:e[t]}):i(a)}),n}var Pf=k.forwardRef(function(e,t){const{id:n,invert:r,position:o="bottom-right",hotkey:a=["altKey","KeyT"],expand:i,closeButton:s,className:l,offset:c,mobileOffset:u,theme:d="light",richColors:f,duration:h,style:p,visibleToasts:m=Ef,toastOptions:g,dir:y=jf(),gap:v=Cf,icons:b,containerAriaLabel:w="Notifications"}=e,[S,E]=k.useState([]),C=k.useMemo(()=>n?S.filter(e=>e.toasterId===n):S.filter(e=>!e.toasterId),[S,n]),N=k.useMemo(()=>Array.from(new Set([o].concat(C.filter(e=>e.position).map(e=>e.position)))),[C,o]),[T,j]=k.useState([]),[R,P]=k.useState(!1),[O,_]=k.useState(!1),[A,D]=k.useState("system"!==d?d:"undefined"!=typeof window&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),M=k.useRef(null),L=a.join("+").replace(/Key/g,"").replace(/Digit/g,""),I=k.useRef(null),z=k.useRef(!1),F=k.useCallback(e=>{E(t=>{var n;return(null==(n=t.find(t=>t.id===e.id))?void 0:n.delete)||bf.dismiss(e.id),t.filter(({id:t})=>t!==e.id)})},[]);return k.useEffect(()=>bf.subscribe(e=>{e.dismiss?requestAnimationFrame(()=>{E(t=>t.map(t=>t.id===e.id?{...t,delete:!0}:t))}):setTimeout(()=>{x.flushSync(()=>{E(t=>{const n=t.findIndex(t=>t.id===e.id);return-1!==n?[...t.slice(0,n),{...t[n],...e},...t.slice(n+1)]:[e,...t]})})})}),[S]),k.useEffect(()=>{if("system"!==d)return void D(d);if("system"===d&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?D("dark"):D("light")),"undefined"==typeof window)return;const e=window.matchMedia("(prefers-color-scheme: dark)");try{e.addEventListener("change",({matches:e})=>{D(e?"dark":"light")})}catch(t){e.addListener(({matches:e})=>{try{D(e?"dark":"light")}catch(t){}})}},[d]),k.useEffect(()=>{S.length<=1&&P(!1)},[S]),k.useEffect(()=>{const e=e=>{var t,n;a.every(t=>e[t]||e.code===t)&&(P(!0),null==(n=M.current)||n.focus());"Escape"!==e.code||document.activeElement!==M.current&&!(null==(t=M.current)?void 0:t.contains(document.activeElement))||P(!1)};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[a]),k.useEffect(()=>{if(M.current)return()=>{I.current&&(I.current.focus({preventScroll:!0}),I.current=null,z.current=!1)}},[M.current]),k.createElement("section",{ref:t,"aria-label":`${w} ${L}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},N.map((t,n)=>{var o;const[a,d]=t.split("-");return C.length?k.createElement("ol",{key:t,dir:"auto"===y?jf():y,tabIndex:-1,ref:M,className:l,"data-sonner-toaster":!0,"data-sonner-theme":A,"data-y-position":a,"data-x-position":d,style:{"--front-toast-height":`${(null==(o=T[0])?void 0:o.height)||0}px`,"--width":"356px","--gap":`${v}px`,...p,...Rf(c,u)},onBlur:e=>{z.current&&!e.currentTarget.contains(e.relatedTarget)&&(z.current=!1,I.current&&(I.current.focus({preventScroll:!0}),I.current=null))},onFocus:e=>{e.target instanceof HTMLElement&&"false"===e.target.dataset.dismissible||z.current||(z.current=!0,I.current=e.relatedTarget)},onMouseEnter:()=>P(!0),onMouseMove:()=>P(!0),onMouseLeave:()=>{O||P(!1)},onDragEnd:()=>P(!1),onPointerDown:e=>{e.target instanceof HTMLElement&&"false"===e.target.dataset.dismissible||_(!0)},onPointerUp:()=>_(!1)},C.filter(e=>!e.position&&0===n||e.position===t).map((n,o)=>{var a,l;return k.createElement(Tf,{key:n.id,icons:b,index:o,toast:n,defaultRichColors:f,duration:null!=(a=null==g?void 0:g.duration)?a:h,className:null==g?void 0:g.className,descriptionClassName:null==g?void 0:g.descriptionClassName,invert:r,visibleToasts:m,closeButton:null!=(l=null==g?void 0:g.closeButton)?l:s,interacting:O,position:t,style:null==g?void 0:g.style,unstyled:null==g?void 0:g.unstyled,classNames:null==g?void 0:g.classNames,cancelButtonStyle:null==g?void 0:g.cancelButtonStyle,actionButtonStyle:null==g?void 0:g.actionButtonStyle,closeButtonAriaLabel:null==g?void 0:g.closeButtonAriaLabel,removeToast:F,toasts:C.filter(e=>e.position==n.position),heights:T.filter(e=>e.position==n.position),setHeights:j,expandByDefault:i,gap:v,expanded:R,swipeDirections:e.swipeDirections})})):null}))});function Of(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Of(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function _f(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Of(e))&&(r&&(r+=" "),r+=t);return r}var Af=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Df="-",Mf=[],Lf=e=>{const t=Ff(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith("[")&&e.endsWith("]"))return zf(e);const n=e.split(Df);return If(n,""===n[0]&&n.length>1?1:0,t)},getConflictingClassGroupIds:(e,t)=>{if(t){const t=r[e],o=n[e];return t?o?((e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n})(o,t):t:o||Mf}return n[e]||Mf}}},If=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const r=e[t],o=n.nextPart.get(r);if(o){const n=If(e,t+1,o);if(n)return n}const a=n.validators;if(null===a)return;const i=0===t?e.join(Df):e.slice(t).join(Df),s=a.length;for(let l=0;l<s;l++){const e=a[l];if(e.validator(i))return e.classGroupId}},zf=e=>-1===e.slice(1,-1).indexOf(":")?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?"arbitrary.."+r:void 0})(),Ff=e=>{const{theme:t,classGroups:n}=e;return Bf(n,t)},Bf=(e,t)=>{const n=Af();for(const r in e){const o=e[r];Uf(o,n,r,t)}return n},Uf=(e,t,n,r)=>{const o=e.length;for(let a=0;a<o;a++){const o=e[a];Vf(o,t,n,r)}},Vf=(e,t,n,r)=>{"string"!=typeof e?"function"!=typeof e?qf(e,t,n,r):Hf(e,t,n,r):$f(e,t,n)},$f=(e,t,n)=>{(""===e?t:Wf(t,e)).classGroupId=n},Hf=(e,t,n,r)=>{Kf(e)?Uf(e(r),t,n,r):(null===t.validators&&(t.validators=[]),t.validators.push(((e,t)=>({classGroupId:e,validator:t}))(n,e)))},qf=(e,t,n,r)=>{const o=Object.entries(e),a=o.length;for(let i=0;i<a;i++){const[e,a]=o[i];Uf(a,Wf(t,e),n,r)}},Wf=(e,t)=>{let n=e;const r=t.split(Df),o=r.length;for(let a=0;a<o;a++){const e=r[a];let t=n.nextPart.get(e);t||(t=Af(),n.nextPart.set(e,t)),n=t}return n},Kf=e=>"isThemeGetter"in e&&!0===e.isThemeGetter,Gf=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const o=(o,a)=>{n[o]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];return void 0!==t?t:void 0!==(t=r[e])?(o(e,t),t):void 0},set(e,t){e in n?n[e]=t:o(e,t)}}},Yf=[],Qf=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),Xf=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=e=>{const t=[];let n,r=0,o=0,a=0;const i=e.length;for(let u=0;u<i;u++){const i=e[u];if(0===r&&0===o){if(":"===i){t.push(e.slice(a,u)),a=u+1;continue}if("/"===i){n=u;continue}}"["===i?r++:"]"===i?r--:"("===i?o++:")"===i&&o--}const s=0===t.length?e:e.slice(a);let l=s,c=!1;s.endsWith("!")?(l=s.slice(0,-1),c=!0):s.startsWith("!")&&(l=s.slice(1),c=!0);return Qf(t,c,l,n&&n>a?n-a:void 0)};if(t){const e=t+":",n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):Qf(Yf,!1,t,void 0,!0)}if(n){const e=r;r=t=>n({className:t,parseClassName:e})}return r},Jf=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{const n=[];let r=[];for(let o=0;o<e.length;o++){const a=e[o],i="["===a[0],s=t.has(a);i||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}},Zf=e=>{const t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let r=0;r<n.length;r++)t[n[r]]=!0;return t},eh=/\s+/,th=e=>{if("string"==typeof e)return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=th(e[r]))&&(n&&(n+=" "),n+=t);return n},nh=(e,...t)=>{let n,r,o,a;const i=e=>{const t=r(e);if(t)return t;const a=((e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:a,postfixLookupClassGroupIds:i}=t,s=[],l=e.trim().split(eh);let c="";for(let u=l.length-1;u>=0;u-=1){const e=l[u],{isExternal:t,modifiers:d,hasImportantModifier:f,baseClassName:h,maybePostfixModifierPosition:p}=n(e);if(t){c=e+(c.length>0?" "+c:c);continue}let m,g=!!p;if(g){m=r(h.substring(0,p));const e=m&&i[m]?r(h):void 0;e&&e!==m&&(m=e,g=!1)}else m=r(h);if(!m){if(!g){c=e+(c.length>0?" "+c:c);continue}if(m=r(h),!m){c=e+(c.length>0?" "+c:c);continue}g=!1}const y=0===d.length?"":1===d.length?d[0]:a(d).join(":"),v=f?y+"!":y,b=v+m;if(s.indexOf(b)>-1)continue;s.push(b);const x=o(m,g);for(let n=0;n<x.length;++n){const e=x[n];s.push(v+e)}c=e+(c.length>0?" "+c:c)}return c})(e,n);return o(e,a),a};return a=s=>{var l;return l=t.reduce((e,t)=>t(e),e()),n={cache:Gf(l.cacheSize),parseClassName:Xf(l),sortModifiers:Jf(l),postfixLookupClassGroupIds:Zf(l),...Lf(l)},r=n.cache.get,o=n.cache.set,a=i,i(s)},(...e)=>a(((...e)=>{let t,n,r=0,o="";for(;r<e.length;)(t=e[r++])&&(n=th(t))&&(o&&(o+=" "),o+=n);return o})(...e))},rh=[],oh=e=>{const t=t=>t[e]||rh;return t.isThemeGetter=!0,t},ah=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ih=/^\((?:(\w[\w-]*):)?(.+)\)$/i,sh=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,lh=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ch=/\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$/,uh=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,dh=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,fh=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,hh=e=>sh.test(e),ph=e=>!!e&&!Number.isNaN(Number(e)),mh=e=>!!e&&Number.isInteger(Number(e)),gh=e=>e.endsWith("%")&&ph(e.slice(0,-1)),yh=e=>lh.test(e),vh=()=>!0,bh=e=>ch.test(e)&&!uh.test(e),xh=()=>!1,wh=e=>dh.test(e),Sh=e=>fh.test(e),kh=e=>!Nh(e)&&!Dh(e),Eh=e=>e.startsWith("@container")&&("/"===e[10]&&void 0!==e[11]||"s"===e[11]&&void 0!==e[16]&&e.startsWith("-size/",10)||"n"===e[11]&&void 0!==e[18]&&e.startsWith("-normal/",10)),Ch=e=>Vh(e,Wh,xh),Nh=e=>ah.test(e),Th=e=>Vh(e,Kh,bh),jh=e=>Vh(e,Gh,ph),Rh=e=>Vh(e,Qh,vh),Ph=e=>Vh(e,Yh,xh),Oh=e=>Vh(e,Hh,xh),_h=e=>Vh(e,qh,Sh),Ah=e=>Vh(e,Xh,wh),Dh=e=>ih.test(e),Mh=e=>$h(e,Kh),Lh=e=>$h(e,Yh),Ih=e=>$h(e,Hh),zh=e=>$h(e,Wh),Fh=e=>$h(e,qh),Bh=e=>$h(e,Xh,!0),Uh=e=>$h(e,Qh,!0),Vh=(e,t,n)=>{const r=ah.exec(e);return!!r&&(r[1]?t(r[1]):n(r[2]))},$h=(e,t,n=!1)=>{const r=ih.exec(e);return!!r&&(r[1]?t(r[1]):n)},Hh=e=>"position"===e||"percentage"===e,qh=e=>"image"===e||"url"===e,Wh=e=>"length"===e||"size"===e||"bg-size"===e,Kh=e=>"length"===e,Gh=e=>"number"===e,Yh=e=>"family-name"===e,Qh=e=>"number"===e||"weight"===e,Xh=e=>"shadow"===e,Jh=nh(()=>{const e=oh("color"),t=oh("font"),n=oh("text"),r=oh("font-weight"),o=oh("tracking"),a=oh("leading"),i=oh("breakpoint"),s=oh("container"),l=oh("spacing"),c=oh("radius"),u=oh("shadow"),d=oh("inset-shadow"),f=oh("text-shadow"),h=oh("drop-shadow"),p=oh("blur"),m=oh("perspective"),g=oh("aspect"),y=oh("ease"),v=oh("animate"),b=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",Dh,Nh],x=()=>[Dh,Nh,l],w=()=>[hh,"full","auto",...x()],S=()=>[mh,"none","subgrid",Dh,Nh],k=()=>["auto",{span:["full",mh,Dh,Nh]},mh,Dh,Nh],E=()=>[mh,"auto",Dh,Nh],C=()=>["auto","min","max","fr",Dh,Nh],N=()=>["auto",...x()],T=()=>[hh,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...x()],j=()=>[hh,"screen","full","dvw","lvw","svw","min","max","fit",...x()],R=()=>[hh,"screen","full","lh","dvh","lvh","svh","min","max","fit",...x()],P=()=>[e,Dh,Nh],O=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",Ih,Oh,{position:[Dh,Nh]}],_=()=>["auto","cover","contain",zh,Ch,{size:[Dh,Nh]}],A=()=>[gh,Mh,Th],D=()=>["","none","full",c,Dh,Nh],M=()=>["",ph,Mh,Th],L=()=>[ph,gh,Ih,Oh],I=()=>["","none",p,Dh,Nh],z=()=>["none",ph,Dh,Nh],F=()=>["none",ph,Dh,Nh],B=()=>[ph,Dh,Nh],U=()=>[hh,"full",...x()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[yh],breakpoint:[yh],color:[vh],container:[yh],"drop-shadow":[yh],ease:["in","out","in-out"],font:[kh],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[yh],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[yh],shadow:[yh],spacing:["px",ph],text:[yh],"text-shadow":[yh],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",hh,Nh,Dh,g]}],container:["container"],"container-type":[{"@container":["","normal","size",Dh,Nh]}],"container-named":[Eh],columns:[{columns:[ph,Nh,Dh,s]}],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"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:b()}],overflow:[{overflow:["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],overscroll:[{overscroll:["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:w()}],"inset-x":[{"inset-x":w()}],"inset-y":[{"inset-y":w()}],start:[{"inset-s":w(),start:w()}],end:[{"inset-e":w(),end:w()}],"inset-bs":[{"inset-bs":w()}],"inset-be":[{"inset-be":w()}],top:[{top:w()}],right:[{right:w()}],bottom:[{bottom:w()}],left:[{left:w()}],visibility:["visible","invisible","collapse"],z:[{z:[mh,"auto",Dh,Nh]}],basis:[{basis:[hh,"full","auto",s,...x()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ph,hh,"auto","initial","none",Nh]}],grow:[{grow:["",ph,Dh,Nh]}],shrink:[{shrink:["",ph,Dh,Nh]}],order:[{order:[mh,"first","last","none",Dh,Nh]}],"grid-cols":[{"grid-cols":S()}],"col-start-end":[{col:k()}],"col-start":[{"col-start":E()}],"col-end":[{"col-end":E()}],"grid-rows":[{"grid-rows":S()}],"row-start-end":[{row:k()}],"row-start":[{"row-start":E()}],"row-end":[{"row-end":E()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":C()}],"auto-rows":[{"auto-rows":C()}],gap:[{gap:x()}],"gap-x":[{"gap-x":x()}],"gap-y":[{"gap-y":x()}],"justify-content":[{justify:["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe","normal"]}],"justify-items":[{"justify-items":["start","end","center","stretch","center-safe","end-safe","normal"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],"align-content":[{content:["normal","start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"align-items":[{items:["start","end","center","stretch","center-safe","end-safe",{baseline:["","last"]}]}],"align-self":[{self:["auto","start","end","center","stretch","center-safe","end-safe",{baseline:["","last"]}]}],"place-content":[{"place-content":["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"place-items":[{"place-items":["start","end","center","stretch","center-safe","end-safe","baseline"]}],"place-self":[{"place-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],p:[{p:x()}],px:[{px:x()}],py:[{py:x()}],ps:[{ps:x()}],pe:[{pe:x()}],pbs:[{pbs:x()}],pbe:[{pbe:x()}],pt:[{pt:x()}],pr:[{pr:x()}],pb:[{pb:x()}],pl:[{pl:x()}],m:[{m:N()}],mx:[{mx:N()}],my:[{my:N()}],ms:[{ms:N()}],me:[{me:N()}],mbs:[{mbs:N()}],mbe:[{mbe:N()}],mt:[{mt:N()}],mr:[{mr:N()}],mb:[{mb:N()}],ml:[{ml:N()}],"space-x":[{"space-x":x()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":x()}],"space-y-reverse":["space-y-reverse"],size:[{size:T()}],"inline-size":[{inline:["auto",...j()]}],"min-inline-size":[{"min-inline":["auto",...j()]}],"max-inline-size":[{"max-inline":["none",...j()]}],"block-size":[{block:["auto",...R()]}],"min-block-size":[{"min-block":["auto",...R()]}],"max-block-size":[{"max-block":["none",...R()]}],w:[{w:[s,"screen",...T()]}],"min-w":[{"min-w":[s,"screen","none",...T()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[i]},...T()]}],h:[{h:["screen","lh",...T()]}],"min-h":[{"min-h":["screen","lh","none",...T()]}],"max-h":[{"max-h":["screen","lh",...T()]}],"font-size":[{text:["base",n,Mh,Th]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Uh,Rh]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",gh,Nh]}],"font-family":[{font:[Lh,Ph,t]}],"font-features":[{"font-features":[Nh]}],"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:[o,Dh,Nh]}],"line-clamp":[{"line-clamp":[ph,"none",Dh,jh]}],leading:[{leading:[a,...x()]}],"list-image":[{"list-image":["none",Dh,Nh]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Dh,Nh]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:P()}],"text-color":[{text:P()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:["solid","dashed","dotted","double","wavy"]}],"text-decoration-thickness":[{decoration:[ph,"from-font","auto",Dh,Th]}],"text-decoration-color":[{decoration:P()}],"underline-offset":[{"underline-offset":[ph,"auto",Dh,Nh]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:x()}],"tab-size":[{tab:[mh,Dh,Nh]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Dh,Nh]}],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",Dh,Nh]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:O()}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:_()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},mh,Dh,Nh],radial:["",Dh,Nh],conic:[mh,Dh,Nh]},Fh,_h]}],"bg-color":[{bg:P()}],"gradient-from-pos":[{from:A()}],"gradient-via-pos":[{via:A()}],"gradient-to-pos":[{to:A()}],"gradient-from":[{from:P()}],"gradient-via":[{via:P()}],"gradient-to":[{to:P()}],rounded:[{rounded:D()}],"rounded-s":[{"rounded-s":D()}],"rounded-e":[{"rounded-e":D()}],"rounded-t":[{"rounded-t":D()}],"rounded-r":[{"rounded-r":D()}],"rounded-b":[{"rounded-b":D()}],"rounded-l":[{"rounded-l":D()}],"rounded-ss":[{"rounded-ss":D()}],"rounded-se":[{"rounded-se":D()}],"rounded-ee":[{"rounded-ee":D()}],"rounded-es":[{"rounded-es":D()}],"rounded-tl":[{"rounded-tl":D()}],"rounded-tr":[{"rounded-tr":D()}],"rounded-br":[{"rounded-br":D()}],"rounded-bl":[{"rounded-bl":D()}],"border-w":[{border:M()}],"border-w-x":[{"border-x":M()}],"border-w-y":[{"border-y":M()}],"border-w-s":[{"border-s":M()}],"border-w-e":[{"border-e":M()}],"border-w-bs":[{"border-bs":M()}],"border-w-be":[{"border-be":M()}],"border-w-t":[{"border-t":M()}],"border-w-r":[{"border-r":M()}],"border-w-b":[{"border-b":M()}],"border-w-l":[{"border-l":M()}],"divide-x":[{"divide-x":M()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":M()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:["solid","dashed","dotted","double","hidden","none"]}],"divide-style":[{divide:["solid","dashed","dotted","double","hidden","none"]}],"border-color":[{border:P()}],"border-color-x":[{"border-x":P()}],"border-color-y":[{"border-y":P()}],"border-color-s":[{"border-s":P()}],"border-color-e":[{"border-e":P()}],"border-color-bs":[{"border-bs":P()}],"border-color-be":[{"border-be":P()}],"border-color-t":[{"border-t":P()}],"border-color-r":[{"border-r":P()}],"border-color-b":[{"border-b":P()}],"border-color-l":[{"border-l":P()}],"divide-color":[{divide:P()}],"outline-style":[{outline:["solid","dashed","dotted","double","none","hidden"]}],"outline-offset":[{"outline-offset":[ph,Dh,Nh]}],"outline-w":[{outline:["",ph,Mh,Th]}],"outline-color":[{outline:P()}],shadow:[{shadow:["","none",u,Bh,Ah]}],"shadow-color":[{shadow:P()}],"inset-shadow":[{"inset-shadow":["none",d,Bh,Ah]}],"inset-shadow-color":[{"inset-shadow":P()}],"ring-w":[{ring:M()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:P()}],"ring-offset-w":[{"ring-offset":[ph,Th]}],"ring-offset-color":[{"ring-offset":P()}],"inset-ring-w":[{"inset-ring":M()}],"inset-ring-color":[{"inset-ring":P()}],"text-shadow":[{"text-shadow":["none",f,Bh,Ah]}],"text-shadow-color":[{"text-shadow":P()}],opacity:[{opacity:[ph,Dh,Nh]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]}],"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":[ph]}],"mask-image-linear-from-pos":[{"mask-linear-from":L()}],"mask-image-linear-to-pos":[{"mask-linear-to":L()}],"mask-image-linear-from-color":[{"mask-linear-from":P()}],"mask-image-linear-to-color":[{"mask-linear-to":P()}],"mask-image-t-from-pos":[{"mask-t-from":L()}],"mask-image-t-to-pos":[{"mask-t-to":L()}],"mask-image-t-from-color":[{"mask-t-from":P()}],"mask-image-t-to-color":[{"mask-t-to":P()}],"mask-image-r-from-pos":[{"mask-r-from":L()}],"mask-image-r-to-pos":[{"mask-r-to":L()}],"mask-image-r-from-color":[{"mask-r-from":P()}],"mask-image-r-to-color":[{"mask-r-to":P()}],"mask-image-b-from-pos":[{"mask-b-from":L()}],"mask-image-b-to-pos":[{"mask-b-to":L()}],"mask-image-b-from-color":[{"mask-b-from":P()}],"mask-image-b-to-color":[{"mask-b-to":P()}],"mask-image-l-from-pos":[{"mask-l-from":L()}],"mask-image-l-to-pos":[{"mask-l-to":L()}],"mask-image-l-from-color":[{"mask-l-from":P()}],"mask-image-l-to-color":[{"mask-l-to":P()}],"mask-image-x-from-pos":[{"mask-x-from":L()}],"mask-image-x-to-pos":[{"mask-x-to":L()}],"mask-image-x-from-color":[{"mask-x-from":P()}],"mask-image-x-to-color":[{"mask-x-to":P()}],"mask-image-y-from-pos":[{"mask-y-from":L()}],"mask-image-y-to-pos":[{"mask-y-to":L()}],"mask-image-y-from-color":[{"mask-y-from":P()}],"mask-image-y-to-color":[{"mask-y-to":P()}],"mask-image-radial":[{"mask-radial":[Dh,Nh]}],"mask-image-radial-from-pos":[{"mask-radial-from":L()}],"mask-image-radial-to-pos":[{"mask-radial-to":L()}],"mask-image-radial-from-color":[{"mask-radial-from":P()}],"mask-image-radial-to-color":[{"mask-radial-to":P()}],"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":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"]}],"mask-image-conic-pos":[{"mask-conic":[ph]}],"mask-image-conic-from-pos":[{"mask-conic-from":L()}],"mask-image-conic-to-pos":[{"mask-conic-to":L()}],"mask-image-conic-from-color":[{"mask-conic-from":P()}],"mask-image-conic-to-color":[{"mask-conic-to":P()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:O()}],"mask-repeat":[{mask:["no-repeat",{repeat:["","x","y","space","round"]}]}],"mask-size":[{mask:_()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Dh,Nh]}],filter:[{filter:["","none",Dh,Nh]}],blur:[{blur:I()}],brightness:[{brightness:[ph,Dh,Nh]}],contrast:[{contrast:[ph,Dh,Nh]}],"drop-shadow":[{"drop-shadow":["","none",h,Bh,Ah]}],"drop-shadow-color":[{"drop-shadow":P()}],grayscale:[{grayscale:["",ph,Dh,Nh]}],"hue-rotate":[{"hue-rotate":[ph,Dh,Nh]}],invert:[{invert:["",ph,Dh,Nh]}],saturate:[{saturate:[ph,Dh,Nh]}],sepia:[{sepia:["",ph,Dh,Nh]}],"backdrop-filter":[{"backdrop-filter":["","none",Dh,Nh]}],"backdrop-blur":[{"backdrop-blur":I()}],"backdrop-brightness":[{"backdrop-brightness":[ph,Dh,Nh]}],"backdrop-contrast":[{"backdrop-contrast":[ph,Dh,Nh]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ph,Dh,Nh]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ph,Dh,Nh]}],"backdrop-invert":[{"backdrop-invert":["",ph,Dh,Nh]}],"backdrop-opacity":[{"backdrop-opacity":[ph,Dh,Nh]}],"backdrop-saturate":[{"backdrop-saturate":[ph,Dh,Nh]}],"backdrop-sepia":[{"backdrop-sepia":["",ph,Dh,Nh]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":x()}],"border-spacing-x":[{"border-spacing-x":x()}],"border-spacing-y":[{"border-spacing-y":x()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Dh,Nh]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ph,"initial",Dh,Nh]}],ease:[{ease:["linear","initial",y,Dh,Nh]}],delay:[{delay:[ph,Dh,Nh]}],animate:[{animate:["none",v,Dh,Nh]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,Dh,Nh]}],"perspective-origin":[{"perspective-origin":b()}],rotate:[{rotate:z()}],"rotate-x":[{"rotate-x":z()}],"rotate-y":[{"rotate-y":z()}],"rotate-z":[{"rotate-z":z()}],scale:[{scale:F()}],"scale-x":[{"scale-x":F()}],"scale-y":[{"scale-y":F()}],"scale-z":[{"scale-z":F()}],"scale-3d":["scale-3d"],skew:[{skew:B()}],"skew-x":[{"skew-x":B()}],"skew-y":[{"skew-y":B()}],transform:[{transform:[Dh,Nh,"","none","gpu","cpu"]}],"transform-origin":[{origin:b()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:U()}],"translate-x":[{"translate-x":U()}],"translate-y":[{"translate-y":U()}],"translate-z":[{"translate-z":U()}],"translate-none":["translate-none"],zoom:[{zoom:[mh,Dh,Nh]}],accent:[{accent:P()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:P()}],"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",Dh,Nh]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":P()}],"scrollbar-track-color":[{"scrollbar-track":P()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":x()}],"scroll-mx":[{"scroll-mx":x()}],"scroll-my":[{"scroll-my":x()}],"scroll-ms":[{"scroll-ms":x()}],"scroll-me":[{"scroll-me":x()}],"scroll-mbs":[{"scroll-mbs":x()}],"scroll-mbe":[{"scroll-mbe":x()}],"scroll-mt":[{"scroll-mt":x()}],"scroll-mr":[{"scroll-mr":x()}],"scroll-mb":[{"scroll-mb":x()}],"scroll-ml":[{"scroll-ml":x()}],"scroll-p":[{"scroll-p":x()}],"scroll-px":[{"scroll-px":x()}],"scroll-py":[{"scroll-py":x()}],"scroll-ps":[{"scroll-ps":x()}],"scroll-pe":[{"scroll-pe":x()}],"scroll-pbs":[{"scroll-pbs":x()}],"scroll-pbe":[{"scroll-pbe":x()}],"scroll-pt":[{"scroll-pt":x()}],"scroll-pr":[{"scroll-pr":x()}],"scroll-pb":[{"scroll-pb":x()}],"scroll-pl":[{"scroll-pl":x()}],"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",Dh,Nh]}],fill:[{fill:["none",...P()]}],"stroke-w":[{stroke:[ph,Mh,Th,jh]}],stroke:[{stroke:["none",...P()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function Zh(...e){return Jh(_f(e))}var ep={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},tp=new class{#e=ep;#t=!1;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)}};var np="undefined"==typeof window||"Deno"in globalThis;function rp(){}function op(e){return"number"==typeof e&&e>=0&&e!==1/0}function ap(e,t){return Math.max(e+(t||0)-Date.now(),0)}function ip(e,t){return"function"==typeof e?e(t):e}function sp(e,t){return"function"==typeof e?e(t):e}function lp(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:a,queryKey:i,stale:s}=e;if(i)if(r){if(t.queryHash!==up(i,t.options))return!1}else if(!fp(t.queryKey,i))return!1;if("all"!==n){const e=t.isActive();if("active"===n&&!e)return!1;if("inactive"===n&&e)return!1}return("boolean"!=typeof s||t.isStale()===s)&&((!o||o===t.state.fetchStatus)&&!(a&&!a(t)))}function cp(e,t){const{exact:n,status:r,predicate:o,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(dp(t.options.mutationKey)!==dp(a))return!1}else if(!fp(t.options.mutationKey,a))return!1}return(!r||t.state.status===r)&&!(o&&!o(t))}function up(e,t){return(t?.queryKeyHashFn||dp)(e)}function dp(e){return JSON.stringify(e,(e,t)=>yp(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function fp(e,t){return e===t||typeof e==typeof t&&(!(!e||!t||"object"!=typeof e||"object"!=typeof t)&&Object.keys(t).every(n=>fp(e[n],t[n])))}var hp=Object.prototype.hasOwnProperty;function pp(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=gp(e)&&gp(t);if(!(r||yp(e)&&yp(t)))return t;const o=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),i=a.length,s=r?new Array(i):{};let l=0;for(let c=0;c<i;c++){const i=r?c:a[c],u=e[i],d=t[i];if(u===d){s[i]=u,(r?c<o:hp.call(e,i))&&l++;continue}if(null===u||null===d||"object"!=typeof u||"object"!=typeof d){s[i]=d;continue}const f=pp(u,d,n+1);s[i]=f,f===u&&l++}return o===i&&l===o?e:s}function mp(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function gp(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function yp(e){if(!vp(e))return!1;const t=e.constructor;if(void 0===t)return!0;const n=t.prototype;return!!vp(n)&&(!!n.hasOwnProperty("isPrototypeOf")&&Object.getPrototypeOf(e)===Object.prototype)}function vp(e){return"[object Object]"===Object.prototype.toString.call(e)}function bp(e,t,n){return"function"==typeof n.structuralSharing?n.structuralSharing(e,t):!1!==n.structuralSharing?pp(e,t):t}function xp(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function wp(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Sp=Symbol();function kp(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:e.queryFn&&e.queryFn!==Sp?e.queryFn:()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`))}function Ep(e,t){return"function"==typeof e?e(...t):!!e}var Cp=(()=>{let e=()=>np;return{isServer:()=>e(),setIsServer(t){e=t}}})(),Np=function(e){setTimeout(e,0)};var Tp=function(){let e=[],t=0,n=e=>{e()},r=e=>{e()},o=Np;const a=r=>{t?e.push(r):o(()=>{n(r)})};return{batch:a=>{let i;t++;try{i=a()}finally{t--,t||(()=>{const t=e;e=[],t.length&&o(()=>{r(()=>{t.forEach(e=>{n(e)})})})})()}return i},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{o=e}}}(),jp=class{#n;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),op(this.gcTime)&&(this.#n=tp.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Cp.isServer()?1/0:3e5))}clearGcTimeout(){void 0!==this.#n&&(tp.clearTimeout(this.#n),this.#n=void 0)}},Rp=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(){}},Pp=new class extends Rp{#r;#o;#a;constructor(){super(),this.#a=e=>{if("undefined"!=typeof window&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#o||this.setEventListener(this.#a)}onUnsubscribe(){this.hasListeners()||(this.#o?.(),this.#o=void 0)}setEventListener(e){this.#a=e,this.#o?.(),this.#o=e(e=>{"boolean"==typeof e?this.setFocused(e):this.onFocus()})}setFocused(e){this.#r!==e&&(this.#r=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return"boolean"==typeof this.#r?this.#r:"hidden"!==globalThis.document?.visibilityState}},Op=new class extends Rp{#i=!0;#o;#a;constructor(){super(),this.#a=e=>{if("undefined"!=typeof window&&window.addEventListener){const 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.#o||this.setEventListener(this.#a)}onUnsubscribe(){this.hasListeners()||(this.#o?.(),this.#o=void 0)}setEventListener(e){this.#a=e,this.#o?.(),this.#o=e(this.setOnline.bind(this))}setOnline(e){this.#i!==e&&(this.#i=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#i}};function _p(){let e,t;const n=new Promise((n,r)=>{e=n,t=r});function r(e){Object.assign(n,e),delete n.resolve,delete n.reject}return n.status="pending",n.catch(()=>{}),n.resolve=t=>{r({status:"fulfilled",value:t}),e(t)},n.reject=e=>{r({status:"rejected",reason:e}),t(e)},n}function Ap(e){return Math.min(1e3*2**e,3e4)}function Dp(e){return"online"!==(e??"online")||Op.isOnline()}var Mp=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function Lp(e){let t,n=!1,r=0;const o=_p(),a=()=>"pending"!==o.status,i=()=>Pp.isFocused()&&("always"===e.networkMode||Op.isOnline())&&e.canRun(),s=()=>Dp(e.networkMode)&&e.canRun(),l=e=>{a()||(t?.(),o.resolve(e))},c=e=>{a()||(t?.(),o.reject(e))},u=()=>new Promise(n=>{t=e=>{(a()||i())&&n(e)},e.onPause?.()}).then(()=>{t=void 0,a()||e.onContinue?.()}),d=()=>{if(a())return;let t;const o=0===r?e.initialPromise:void 0;try{t=o??e.fn()}catch(s){t=Promise.reject(s)}Promise.resolve(t).then(l).catch(t=>{if(a())return;const o=e.retry??(Cp.isServer()?0:3),s=e.retryDelay??Ap,l="function"==typeof s?s(r,t):s,f=!0===o||"number"==typeof o&&r<o||"function"==typeof o&&o(r,t);var h;!n&&f?(r++,e.onFail?.(r,t),(h=l,new Promise(e=>{tp.setTimeout(e,h)})).then(()=>i()?void 0:u()).then(()=>{n?c(t):d()})):c(t)})};return{promise:o,status:()=>o.status,cancel:t=>{if(!a()){const n=new Mp(t);c(n),e.onCancel?.(n)}},continue:()=>(t?.(),o),cancelRetry:()=>{n=!0},continueRetry:()=>{n=!1},canStart:s,start:()=>(s()?d():u().then(d),o)}}var Ip=class extends jp{#s;#l;#c;#u;constructor(e){super(),this.#s=e.client,this.mutationId=e.mutationId,this.#c=e.mutationCache,this.#l=[],this.state=e.state||{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0},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.#l.includes(e)||(this.#l.push(e),this.clearGcTimeout(),this.#c.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#l=this.#l.filter(t=>t!==e),this.scheduleGc(),this.#c.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#l.length||("pending"===this.state.status?this.scheduleGc():this.#c.remove(this))}continue(){return this.#u?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#d({type:"continue"})},n={client:this.#s,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#u=Lp({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(e,t)=>{this.#d({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#d({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#c.canRun(this)});const r="pending"===this.state.status,o=!this.#u.canStart();try{if(r)t();else{this.#d({type:"pending",variables:e,isPaused:o}),this.#c.config.onMutate&&await this.#c.config.onMutate(e,this,n);const t=await(this.options.onMutate?.(e,n));t!==this.state.context&&this.#d({type:"pending",context:t,variables:e,isPaused:o})}const a=await this.#u.start();return await(this.#c.config.onSuccess?.(a,e,this.state.context,this,n)),await(this.options.onSuccess?.(a,e,this.state.context,n)),await(this.#c.config.onSettled?.(a,null,this.state.variables,this.state.context,this,n)),await(this.options.onSettled?.(a,null,e,this.state.context,n)),this.#d({type:"success",data:a}),a}catch(a){try{await(this.#c.config.onError?.(a,e,this.state.context,this,n))}catch(i){Promise.reject(i)}try{await(this.options.onError?.(a,e,this.state.context,n))}catch(i){Promise.reject(i)}try{await(this.#c.config.onSettled?.(void 0,a,this.state.variables,this.state.context,this,n))}catch(i){Promise.reject(i)}try{await(this.options.onSettled?.(void 0,a,e,this.state.context,n))}catch(i){Promise.reject(i)}throw this.#d({type:"error",error:a}),a}finally{this.#c.runNext(this)}}#d(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),Tp.batch(()=>{this.#l.forEach(t=>{t.onMutationUpdate(e)}),this.#c.notify({mutation:this,type:"updated",action:e})})}};var zp=class extends Rp{#s;#f=void 0;#h;#p;constructor(e,t){super(),this.#s=e,this.setOptions(t),this.bindMethods(),this.#m()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){const t=this.options;this.options=this.#s.defaultMutationOptions(e),mp(this.options,t)||this.#s.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#h,observer:this}),t?.mutationKey&&this.options.mutationKey&&dp(t.mutationKey)!==dp(this.options.mutationKey)?this.reset():"pending"===this.#h?.state.status&&this.#h.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#h?.removeObserver(this)}onMutationUpdate(e){this.#m(),this.#g(e)}getCurrentResult(){return this.#f}reset(){this.#h?.removeObserver(this),this.#h=void 0,this.#m(),this.#g()}mutate(e,t){return this.#p=t,this.#h?.removeObserver(this),this.#h=this.#s.getMutationCache().build(this.#s,this.options),this.#h.addObserver(this),this.#h.execute(e)}#m(){const e=this.#h?.state??{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0};this.#f={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#g(e){Tp.batch(()=>{if(this.#p&&this.hasListeners()){const n=this.#f.variables,r=this.#f.context,o={client:this.#s,meta:this.options.meta,mutationKey:this.options.mutationKey};if("success"===e?.type){try{this.#p.onSuccess?.(e.data,n,r,o)}catch(t){Promise.reject(t)}try{this.#p.onSettled?.(e.data,null,n,r,o)}catch(t){Promise.reject(t)}}else if("error"===e?.type){try{this.#p.onError?.(e.error,n,r,o)}catch(t){Promise.reject(t)}try{this.#p.onSettled?.(void 0,e.error,n,r,o)}catch(t){Promise.reject(t)}}}this.listeners.forEach(e=>{e(this.#f)})})}};function Fp(e){return{onFetch:(t,n)=>{const r=t.options,o=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],i=t.state.data?.pageParams||[];let s={pages:[],pageParams:[]},l=0;const c=async()=>{let n=!1;const c=e=>{!function(e,t,n){let r,o=!1;Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(r??=t(),o||(o=!0,r.aborted?n():r.addEventListener("abort",n,{once:!0})),r)})}(e,()=>t.signal,()=>n=!0)},u=kp(t.options,t.fetchOptions),d=async(e,r,o)=>{if(n)return Promise.reject(t.signal.reason);if(null==r&&e.pages.length)return Promise.resolve(e);const a=await u((()=>{const e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:o?"backward":"forward",meta:t.options.meta};return c(e),e})()),{maxPages:i}=t.options,s=o?wp:xp;return{pages:s(e.pages,a,i),pageParams:s(e.pageParams,r,i)}};if(o&&a.length){const e="backward"===o,t=e?Up:Bp,n={pages:a,pageParams:i};s=await d(n,t(r,n),e)}else{const t=e??a.length;do{const e=0===l?i[0]??r.initialPageParam:Bp(r,s);if(l>0&&null==e)break;s=await d(s,e),l++}while(l<t)}return s};t.options.persister?t.fetchFn=()=>t.options.persister?.(c,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=c}}}function Bp(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Up(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var Vp=class extends jp{#y;#v;#b;#x;#s;#u;#w;#S;constructor(e){super(),this.#S=!1,this.#w=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#s=e.client,this.#x=this.#s.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#v=qp(this.options),this.state=e.state??this.#v,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#y}get promise(){return this.#u?.promise}setOptions(e){if(this.options={...this.#w,...e},e?._type&&(this.#y=e._type),this.updateGcTime(this.options.gcTime),this.state&&void 0===this.state.data){const e=qp(this.options);void 0!==e.data&&(this.setState(Hp(e.data,e.dataUpdatedAt)),this.#v=e)}}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||this.#x.remove(this)}setData(e,t){const n=bp(this.state.data,e,this.options);return this.#d({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#d({type:"setState",state:e})}cancel(e){const t=this.#u?.promise;return this.#u?.cancel(e),t?t.then(rp).catch(rp):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#v}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>!1!==sp(e.options.enabled,this))}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Sp||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>"static"===ip(e.options.staleTime,this))}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):void 0===this.state.data||this.state.isInvalidated}isStaleByTime(e=0){return void 0===this.state.data||"static"!==e&&(!!this.state.isInvalidated||!ap(this.state.dataUpdatedAt,e))}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#u?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#u?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#x.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.#u&&(this.#S||this.#k()?this.#u.cancel({revert:!0}):this.#u.cancelRetry()),this.scheduleGc()),this.#x.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}#k(){return"paused"===this.state.fetchStatus&&"pending"===this.state.status}invalidate(){this.state.isInvalidated||this.#d({type:"invalidate"})}async fetch(e,t){if("idle"!==this.state.fetchStatus&&"rejected"!==this.#u?.status())if(void 0!==this.state.data&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#u)return this.#u.continueRetry(),this.#u.promise;if(e&&this.setOptions(e),!this.options.queryFn){const e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}const n=new AbortController,r=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#S=!0,n.signal)})},o=()=>{const e=kp(this.options,t),n=(()=>{const e={client:this.#s,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#S=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{const e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#s,state:this.state,fetchFn:o};return r(e),e})();("infinite"===this.#y?Fp(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#b=this.state,"idle"!==this.state.fetchStatus&&this.state.fetchMeta===a.fetchOptions?.meta||this.#d({type:"fetch",meta:a.fetchOptions?.meta}),this.#u=Lp({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof Mp&&e.revert&&this.setState({...this.#b,fetchStatus:"idle"}),n.abort()},onFail:(e,t)=>{this.#d({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#d({type:"pause"})},onContinue:()=>{this.#d({type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{const e=await this.#u.start();if(void 0===e)throw new Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#x.config.onSuccess?.(e,this),this.#x.config.onSettled?.(e,this.state.error,this),e}catch(i){if(i instanceof Mp){if(i.silent)return this.#u.promise;if(i.revert){if(void 0===this.state.data)throw i;return this.state.data}}throw this.#d({type:"error",error:i}),this.#x.config.onError?.(i,this),this.#x.config.onSettled?.(this.state.data,i,this),i}finally{this.scheduleGc()}}#d(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,...$p(t.data,this.options),fetchMeta:e.meta??null};case"success":const n={...t,...Hp(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#b=e.manual?n:void 0,n;case"error":const 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),Tp.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#x.notify({query:this,type:"updated",action:e})})}};function $p(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Dp(t.networkMode)?"fetching":"paused",...void 0===e&&{error:null,status:"pending"}}}function Hp(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function qp(e){const t="function"==typeof e.initialData?e.initialData():e.initialData,n=void 0!==t,r=n?"function"==typeof e.initialDataUpdatedAt?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 Wp=class extends Rp{constructor(e={}){super(),this.config=e,this.#E=new Map}#E;build(e,t,n){const r=t.queryKey,o=t.queryHash??up(r,t);let a=this.get(o);return a||(a=new Vp({client:e,queryKey:r,queryHash:o,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){const t=this.#E.get(e.queryHash);t&&(e.destroy(),t===e&&this.#E.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Tp.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#E.get(e)}getAll(){return[...this.#E.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(e=>lp(t,e))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(t=>lp(e,t)):t}notify(e){Tp.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Tp.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Tp.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Kp=class extends Rp{constructor(e={}){super(),this.config=e,this.#C=new Set,this.#N=new Map,this.#T=0}#C;#N;#T;build(e,t,n){const r=new Ip({client:e,mutationCache:this,mutationId:++this.#T,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#C.add(e);const t=Gp(e);if("string"==typeof t){const n=this.#N.get(t);n?n.push(e):this.#N.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#C.delete(e)){const t=Gp(e);if("string"==typeof t){const n=this.#N.get(t);if(n)if(n.length>1){const t=n.indexOf(e);-1!==t&&n.splice(t,1)}else n[0]===e&&this.#N.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=Gp(e);if("string"==typeof t){const n=this.#N.get(t)?.find(e=>"pending"===e.state.status);return!n||n===e}return!0}runNext(e){const t=Gp(e);return"string"==typeof t?(this.#N.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){Tp.batch(()=>{this.#C.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#C.clear(),this.#N.clear()})}getAll(){return Array.from(this.#C)}find(e){const t={exact:!0,...e};return this.getAll().find(e=>cp(t,e))}findAll(e={}){return this.getAll().filter(t=>cp(e,t))}notify(e){Tp.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(e=>e.state.isPaused);return Tp.batch(()=>Promise.all(e.map(e=>e.continue().catch(rp))))}};function Gp(e){return e.options.scope?.id}var Yp=class extends Rp{constructor(e,t){super(),this.options=t,this.#s=e,this.#j=null,this.#R=_p(),this.bindMethods(),this.setOptions(t)}#s;#P=void 0;#O=void 0;#f=void 0;#_;#A;#R;#j;#D;#M;#L;#I;#z;#F;#B=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.#P.addObserver(this),Qp(this.#P,this.options)?this.#U():this.updateResult(),this.#V())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Xp(this.#P,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Xp(this.#P,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#$(),this.#H(),this.#P.removeObserver(this)}setOptions(e){const t=this.options,n=this.#P;if(this.options=this.#s.defaultQueryOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof sp(this.options.enabled,this.#P))throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#q(),this.#P.setOptions(this.options),t._defaulted&&!mp(this.options,t)&&this.#s.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#P,observer:this});const r=this.hasListeners();r&&Jp(this.#P,n,this.options,t)&&this.#U(),this.updateResult(),!r||this.#P===n&&sp(this.options.enabled,this.#P)===sp(t.enabled,this.#P)&&ip(this.options.staleTime,this.#P)===ip(t.staleTime,this.#P)||this.#W();const o=this.#K();!r||this.#P===n&&sp(this.options.enabled,this.#P)===sp(t.enabled,this.#P)&&o===this.#F||this.#G(o)}getOptimisticResult(e){const t=this.#s.getQueryCache().build(this.#s,e),n=this.createResult(t,e);return function(e,t){return!mp(e.getCurrentResult(),t)}(this,n)&&(this.#f=n,this.#A=this.options,this.#_=this.#P.state),n}getCurrentResult(){return this.#f}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),"promise"===n&&(this.trackProp("data"),this.options.experimental_prefetchInRender||"pending"!==this.#R.status||this.#R.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(e,n))})}trackProp(e){this.#B.add(e)}getCurrentQuery(){return this.#P}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#s.defaultQueryOptions(e),n=this.#s.getQueryCache().build(this.#s,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#U({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#f))}#U(e){this.#q();let t=this.#P.fetch(this.options,e);return e?.throwOnError||(t=t.catch(rp)),t}#W(){this.#$();const e=ip(this.options.staleTime,this.#P);if(Cp.isServer()||this.#f.isStale||!op(e))return;const t=ap(this.#f.dataUpdatedAt,e)+1;this.#I=tp.setTimeout(()=>{this.#f.isStale||this.updateResult()},t)}#K(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.#P):this.options.refetchInterval)??!1}#G(e){this.#H(),this.#F=e,!Cp.isServer()&&!1!==sp(this.options.enabled,this.#P)&&op(this.#F)&&0!==this.#F&&(this.#z=tp.setInterval(()=>{(this.options.refetchIntervalInBackground||Pp.isFocused())&&this.#U()},this.#F))}#V(){this.#W(),this.#G(this.#K())}#$(){void 0!==this.#I&&(tp.clearTimeout(this.#I),this.#I=void 0)}#H(){void 0!==this.#z&&(tp.clearInterval(this.#z),this.#z=void 0)}createResult(e,t){const n=this.#P,r=this.options,o=this.#f,a=this.#_,i=this.#A,s=e!==n?e.state:this.#O,{state:l}=e;let c,u={...l},d=!1;if(t._optimisticResults){const o=this.hasListeners(),a=!o&&Qp(e,t),i=o&&Jp(e,n,t,r);(a||i)&&(u={...u,...$p(l.data,e.options)}),"isRestoring"===t._optimisticResults&&(u.fetchStatus="idle")}let{error:f,errorUpdatedAt:h,status:p}=u;c=u.data;let m=!1;if(void 0!==t.placeholderData&&void 0===c&&"pending"===p){let e;o?.isPlaceholderData&&t.placeholderData===i?.placeholderData?(e=o.data,m=!0):e="function"==typeof t.placeholderData?t.placeholderData(this.#L?.state.data,this.#L):t.placeholderData,void 0!==e&&(p="success",c=bp(o?.data,e,t),d=!0)}if(t.select&&void 0!==c&&!m)if(o&&c===a?.data&&t.select===this.#D)c=this.#M;else try{this.#D=t.select,c=t.select(c),c=bp(o?.data,c,t),this.#M=c,this.#j=null}catch(S){this.#j=S}this.#j&&(f=this.#j,c=this.#M,h=Date.now(),p="error");const g="fetching"===u.fetchStatus,y="pending"===p,v="error"===p,b=y&&g,x=void 0!==c,w={status:p,fetchStatus:u.fetchStatus,isPending:y,isSuccess:"success"===p,isError:v,isInitialLoading:b,isLoading:b,data:c,dataUpdatedAt:u.dataUpdatedAt,error:f,errorUpdatedAt:h,failureCount:u.fetchFailureCount,failureReason:u.fetchFailureReason,errorUpdateCount:u.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:u.dataUpdateCount>s.dataUpdateCount||u.errorUpdateCount>s.errorUpdateCount,isFetching:g,isRefetching:g&&!y,isLoadingError:v&&!x,isPaused:"paused"===u.fetchStatus,isPlaceholderData:d,isRefetchError:v&&x,isStale:Zp(e,t),refetch:this.refetch,promise:this.#R,isEnabled:!1!==sp(t.enabled,e)};if(this.options.experimental_prefetchInRender){const t=void 0!==w.data,r="error"===w.status&&!t,o=e=>{r?e.reject(w.error):t&&e.resolve(w.data)},a=()=>{o(this.#R=w.promise=_p())},i=this.#R;switch(i.status){case"pending":e.queryHash===n.queryHash&&o(i);break;case"fulfilled":(r||w.data!==i.value)&&a();break;case"rejected":r&&w.error===i.reason||a()}}return w}updateResult(){const e=this.#f,t=this.createResult(this.#P,this.options);if(this.#_=this.#P.state,this.#A=this.options,void 0!==this.#_.data&&(this.#L=this.#P),mp(t,e))return;this.#f=t;this.#g({listeners:(()=>{if(!e)return!0;const{notifyOnChangeProps:t}=this.options,n="function"==typeof t?t():t;if("all"===n||!n&&!this.#B.size)return!0;const r=new Set(n??this.#B);return this.options.throwOnError&&r.add("error"),Object.keys(this.#f).some(t=>{const n=t;return this.#f[n]!==e[n]&&r.has(n)})})()})}#q(){const e=this.#s.getQueryCache().build(this.#s,this.options);if(e===this.#P)return;const t=this.#P;this.#P=e,this.#O=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#V()}#g(e){Tp.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#f)}),this.#s.getQueryCache().notify({query:this.#P,type:"observerResultsUpdated"})})}};function Qp(e,t){return function(e,t){return!1!==sp(t.enabled,e)&&void 0===e.state.data&&!("error"===e.state.status&&!1===sp(t.retryOnMount,e))}(e,t)||void 0!==e.state.data&&Xp(e,t,t.refetchOnMount)}function Xp(e,t,n){if(!1!==sp(t.enabled,e)&&"static"!==ip(t.staleTime,e)){const r="function"==typeof n?n(e):n;return"always"===r||!1!==r&&Zp(e,t)}return!1}function Jp(e,t,n,r){return(e!==t||!1===sp(r.enabled,e))&&(!n.suspense||"error"!==e.state.status)&&Zp(e,n)}function Zp(e,t){return!1!==sp(t.enabled,e)&&e.isStaleByTime(ip(t.staleTime,e))}var em=k.createContext(void 0),tm=e=>{const t=k.useContext(em);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},nm=({client:e,children:t})=>(k.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,fc.jsx)(em.Provider,{value:e,children:t}));var rm=k.createContext(function(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}()),om=k.createContext(!1),am=(om.Provider,(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()}));function im(e,t,n){const r=k.useContext(om),o=k.useContext(rm),a=tm(n),i=a.defaultQueryOptions(e);a.getDefaultOptions().queries?._experimental_beforeQuery?.(i);const s=a.getQueryCache().get(i.queryHash),l=!1!==e.subscribed;i._optimisticResults=r?"isRestoring":l?"optimistic":void 0,(e=>{if(e.suspense){const t=1e3,n=e=>"static"===e?e:Math.max(e??t,t),r=e.staleTime;e.staleTime="function"==typeof r?(...e)=>n(r(...e)):n(r),"number"==typeof e.gcTime&&(e.gcTime=Math.max(e.gcTime,t))}})(i),((e,t,n)=>{const r=n?.state.error&&"function"==typeof e.throwOnError?Ep(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))})(i,o,s),(e=>{k.useEffect(()=>{e.clearReset()},[e])})(o);const c=!a.getQueryCache().get(i.queryHash),[u]=k.useState(()=>new t(a,i)),d=u.getOptimisticResult(i),f=!r&&l;if(k.useSyncExternalStore(k.useCallback(e=>{const t=f?u.subscribe(Tp.batchCalls(e)):rp;return u.updateResult(),t},[u,f]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),k.useEffect(()=>{u.setOptions(i)},[i,u]),((e,t)=>e?.suspense&&t.isPending)(i,d))throw am(i,u,o);if((({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(o&&void 0===e.data||Ep(n,[e.error,r])))({result:d,errorResetBoundary:o,throwOnError:i.throwOnError,query:s,suspense:i.suspense}))throw d.error;return a.getDefaultOptions().queries?._experimental_afterQuery?.(i,d),i.experimental_prefetchInRender&&!Cp.isServer()&&((e,t)=>e.isLoading&&e.isFetching&&!t)(d,r)&&(c?am(i,u,o):s?.promise)?.catch(rp).finally(()=>{u.updateResult()}),i.notifyOnChangeProps?d:u.trackResult(d)}function sm(e,t){return im(e,Yp,t)}function lm(e,t){const n=tm(t),[r]=k.useState(()=>new zp(n,e));k.useEffect(()=>{r.setOptions(e)},[r,e]);const o=k.useSyncExternalStore(k.useCallback(e=>r.subscribe(Tp.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=k.useCallback((e,t)=>{r.mutate(e,t).catch(rp)},[r]);if(o.error&&Ep(r.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:a,mutateAsync:o.mutate}}var cm=i((e,t)=>{t.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}}),um=i((e,t)=>{var n="object"==typeof global&&global&&global.Object===Object&&global;t.exports=n}),dm=i((e,t)=>{var n=um(),r="object"==typeof self&&self&&self.Object===Object&&self,o=n||r||Function("return this")();t.exports=o}),fm=i((e,t)=>{var n=dm();t.exports=function(){return n.Date.now()}}),hm=i((e,t)=>{var n=/\s/;t.exports=function(e){for(var t=e.length;t--&&n.test(e.charAt(t)););return t}}),pm=i((e,t)=>{var n=hm(),r=/^\s+/;t.exports=function(e){return e?e.slice(0,n(e)+1).replace(r,""):e}}),mm=i((e,t)=>{var n=dm().Symbol;t.exports=n}),gm=i((e,t)=>{var n=mm(),r=Object.prototype,o=r.hasOwnProperty,a=r.toString,i=n?n.toStringTag:void 0;t.exports=function(e){var t=o.call(e,i),n=e[i];try{e[i]=void 0;var r=!0}catch(l){}var s=a.call(e);return r&&(t?e[i]=n:delete e[i]),s}}),ym=i((e,t)=>{var n=Object.prototype.toString;t.exports=function(e){return n.call(e)}}),vm=i((e,t)=>{var n=mm(),r=gm(),o=ym(),a=n?n.toStringTag:void 0;t.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?r(e):o(e)}}),bm=i((e,t)=>{t.exports=function(e){return null!=e&&"object"==typeof e}}),xm=i((e,t)=>{var n=vm(),r=bm();t.exports=function(e){return"symbol"==typeof e||r(e)&&"[object Symbol]"==n(e)}}),wm=i((e,t)=>{var n=pm(),r=cm(),o=xm(),a=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,s=/^0o[0-7]+$/i,l=parseInt;t.exports=function(e){if("number"==typeof e)return e;if(o(e))return NaN;if(r(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=r(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=n(e);var c=i.test(e);return c||s.test(e)?l(e.slice(2),c?2:8):a.test(e)?NaN:+e}}),Sm=i((e,t)=>{var n=cm(),r=fm(),o=wm(),a=Math.max,i=Math.min;t.exports=function(e,t,s){var l,c,u,d,f,h,p=0,m=!1,g=!1,y=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function v(t){var n=l,r=c;return l=c=void 0,p=t,d=e.apply(r,n)}function b(e){var n=e-h;return void 0===h||n>=t||n<0||g&&e-p>=u}function x(){var e=r();if(b(e))return w(e);f=setTimeout(x,function(e){var n=t-(e-h);return g?i(n,u-(e-p)):n}(e))}function w(e){return f=void 0,y&&l?v(e):(l=c=void 0,d)}function S(){var e=r(),n=b(e);if(l=arguments,c=this,h=e,n){if(void 0===f)return function(e){return p=e,f=setTimeout(x,t),m?v(e):d}(h);if(g)return clearTimeout(f),f=setTimeout(x,t),v(h)}return void 0===f&&(f=setTimeout(x,t)),d}return t=o(t)||0,n(s)&&(m=!!s.leading,u=(g="maxWait"in s)?a(o(s.maxWait)||0,t):u,y="trailing"in s?!!s.trailing:y),S.cancel=function(){void 0!==f&&clearTimeout(f),p=0,l=h=c=f=void 0},S.flush=function(){return void 0===f?d:w(r())},S}}),km=i((e,t)=>{t.exports=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var r,o,a;if(Array.isArray(t)){if((r=t.length)!=n.length)return!1;for(o=r;0!==o--;)if(!e(t[o],n[o]))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((r=(a=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(o=r;0!==o--;)if(!Object.prototype.hasOwnProperty.call(n,a[o]))return!1;for(o=r;0!==o--;){var i=a[o];if(!e(t[i],n[i]))return!1}return!0}return t!=t&&n!=n}});function Em(e,t){return function(){return e.apply(t,arguments)}}var Cm,{toString:Nm}=Object.prototype,{getPrototypeOf:Tm}=Object,{iterator:jm,toStringTag:Rm}=Symbol,Pm=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Om=(e,t)=>{let n=e;const r=[];for(;null!=n&&n!==Object.prototype;){if(-1!==r.indexOf(n))return!1;if(r.push(n),Pm(n,t))return!0;n=Tm(n)}return!1},_m=(Cm=Object.create(null),e=>{const t=Nm.call(e);return Cm[t]||(Cm[t]=t.slice(8,-1).toLowerCase())}),Am=e=>(e=e.toLowerCase(),t=>_m(t)===e),Dm=e=>t=>typeof t===e,{isArray:Mm}=Array,Lm=Dm("undefined");function Im(e){return null!==e&&!Lm(e)&&null!==e.constructor&&!Lm(e.constructor)&&Bm(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var zm=Am("ArrayBuffer");var Fm=Dm("string"),Bm=Dm("function"),Um=Dm("number"),Vm=e=>null!==e&&"object"==typeof e,$m=e=>{if(!Vm(e))return!1;const t=Tm(e);return!(null!==t&&t!==Object.prototype&&null!==Tm(t)||Om(e,Rm)||Om(e,jm))},Hm=Am("Date"),qm=Am("File"),Wm=Am("Blob"),Km=Am("FileList");var Gm="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},Ym=void 0!==Gm.FormData?Gm.FormData:void 0,Qm=Am("URLSearchParams"),[Xm,Jm,Zm,eg]=["ReadableStream","Request","Response","Headers"].map(Am);function tg(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,o;if("object"!=typeof e&&(e=[e]),Mm(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{if(Im(e))return;const o=n?Object.getOwnPropertyNames(e):Object.keys(e),a=o.length;let i;for(r=0;r<a;r++)i=o[r],t.call(null,e[i],i,e)}}function ng(e,t){if(Im(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r,o=n.length;for(;o-- >0;)if(r=n[o],t===r.toLowerCase())return r;return null}var rg="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,og=e=>!Lm(e)&&e!==rg;var ag,ig=(ag="undefined"!=typeof Uint8Array&&Tm(Uint8Array),e=>ag&&e instanceof ag),sg=Am("HTMLFormElement"),{propertyIsEnumerable:lg}=Object.prototype,cg=Am("RegExp"),ug=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};tg(n,(n,o)=>{let a;!1!==(a=t(n,o,e))&&(r[o]=a||n)}),Object.defineProperties(e,r)};var dg,fg,hg,pg,mg=Am("AsyncFunction"),gg=(dg="function"==typeof setImmediate,fg=Bm(rg.postMessage),dg?setImmediate:fg?(hg=`axios@${Math.random()}`,pg=[],rg.addEventListener("message",({source:e,data:t})=>{e===rg&&t===hg&&pg.length&&pg.shift()()},!1),e=>{pg.push(e),rg.postMessage(hg,"*")}):e=>setTimeout(e)),yg="undefined"!=typeof queueMicrotask?queueMicrotask.bind(rg):"undefined"!=typeof process&&process.nextTick||gg,vg=e=>null!=e&&Bm(e[jm]),bg={isArray:Mm,isArrayBuffer:zm,isBuffer:Im,isFormData:e=>{if(!e)return!1;if(Ym&&e instanceof Ym)return!0;const t=Tm(e);if(!t||t===Object.prototype)return!1;if(!Bm(e.append))return!1;const n=_m(e);return"formdata"===n||"object"===n&&Bm(e.toString)&&"[object FormData]"===e.toString()},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&zm(e.buffer),t},isString:Fm,isNumber:Um,isBoolean:e=>!0===e||!1===e,isObject:Vm,isPlainObject:$m,isEmptyObject:e=>{if(!Vm(e)||Im(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(t){return!1}},isReadableStream:Xm,isRequest:Jm,isResponse:Zm,isHeaders:eg,isUndefined:Lm,isDate:Hm,isFile:qm,isReactNativeBlob:e=>!(!e||void 0===e.uri),isReactNative:e=>e&&void 0!==e.getParts,isBlob:Wm,isRegExp:cg,isFunction:Bm,isStream:e=>Vm(e)&&Bm(e.pipe),isURLSearchParams:Qm,isTypedArray:ig,isFileList:Km,forEach:tg,merge:function e(...t){const{caseless:n,skipUndefined:r}=og(this)&&this||{},o={},a=(t,a)=>{if("__proto__"===a||"constructor"===a||"prototype"===a)return;const i=n&&"string"==typeof a&&ng(o,a)||a,s=Pm(o,i)?o[i]:void 0;$m(s)&&$m(t)?o[i]=e(s,t):$m(t)?o[i]=e({},t):Mm(t)?o[i]=t.slice():r&&Lm(t)||(o[i]=t)};for(let i=0,s=t.length;i<s;i++){const e=t[i];if(!e||Im(e))continue;if(tg(e,a),"object"!=typeof e||Mm(e))continue;const n=Object.getOwnPropertySymbols(e);for(let t=0;t<n.length;t++){const r=n[t];lg.call(e,r)&&a(e[r],r)}}return o},extend:(e,t,n,{allOwnKeys:r}={})=>(tg(t,(t,r)=>{n&&Bm(t)?Object.defineProperty(e,r,{__proto__:null,value:Em(t,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,r,{__proto__:null,value:t,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let o,a,i;const s={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),a=o.length;a-- >0;)i=o[a],r&&!r(i,e,t)||s[i]||(t[i]=e[i],s[i]=!0);e=!1!==n&&Tm(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:_m,kindOfTest:Am,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(Mm(e))return e;let t=e.length;if(!Um(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[jm]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:sg,hasOwnProperty:Pm,hasOwnProp:Pm,hasOwnInPrototypeChain:Om,getSafeProp:(e,t)=>null!=e&&Om(e,t)?e[t]:void 0,reduceDescriptors:ug,freezeMethods:e=>{ug(e,(t,n)=>{if(Bm(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];Bm(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))})},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach(e=>{n[e]=!0})};return Mm(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:ng,global:rg,isContextDefined:og,isSpecCompliantForm:function(e){return!!(e&&Bm(e.append)&&"FormData"===e[Rm]&&e[jm])},toJSONObject:e=>{const t=new WeakSet,n=e=>{if(Vm(e)){if(t.has(e))return;if(Im(e))return e;if(!("toJSON"in e)){t.add(e);const r=Mm(e)?[]:{};return tg(e,(e,t)=>{const o=n(e);!Lm(o)&&(r[t]=o)}),t.delete(e),r}}return e};return n(e)},isAsyncFn:mg,isThenable:e=>e&&(Vm(e)||Bm(e))&&Bm(e.then)&&Bm(e.catch),setImmediate:gg,asap:yg,isIterable:vg,isSafeIterable:e=>null!=e&&Om(e,jm)&&vg(e)},xg=bg.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);var wg=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),Sg=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function kg(e,t){return bg.isArray(e)?e.map(e=>kg(e,t)):function(e){let t=0,n=e.length;for(;t<n;){const n=e.charCodeAt(t);if(9!==n&&32!==n)break;t+=1}for(;n>t;){const t=e.charCodeAt(n-1);if(9!==t&&32!==t)break;n-=1}return 0===t&&n===e.length?e:e.slice(t,n)}(String(e).replace(t,""))}function Eg(e){const t=Object.create(null);return bg.forEach(e.toJSON(),(e,n)=>{t[n]=(e=>kg(e,Sg))(e)}),t}var Cg=Symbol("internals");function Ng(e){return e&&String(e).trim().toLowerCase()}function Tg(e){return!1===e||null==e?e:bg.isArray(e)?e.map(Tg):(e=>kg(e,wg))(String(e))}function jg(e,t,n,r,o){return bg.isFunction(r)?r.call(this,t,n):(o&&(t=n),bg.isString(t)?bg.isString(r)?-1!==t.indexOf(r):bg.isRegExp(r)?r.test(t):void 0:void 0)}var Rg=class{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function o(e,t,n){const o=Ng(t);if(!o)return;const a=bg.findKey(r,o);(!a||void 0===r[a]||!0===n||void 0===n&&!1!==r[a])&&(r[a||t]=Tg(e))}const a=(e,t)=>bg.forEach(e,(e,n)=>o(e,n,t));if(bg.isPlainObject(e)||e instanceof this.constructor)a(e,t);else if(bg.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))a((e=>{const t={};let n,r,o;return e&&e.split("\n").forEach(function(e){o=e.indexOf(":"),n=e.substring(0,o).trim().toLowerCase(),r=e.substring(o+1).trim(),!n||t[n]&&xg[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t})(e),t);else if(bg.isObject(e)&&bg.isSafeIterable(e)){let n,r,o=Object.create(null);for(const t of e){if(!bg.isArray(t))throw new TypeError("Object iterator must return a key-value pair");r=t[0],bg.hasOwnProp(o,r)?(n=o[r],o[r]=bg.isArray(n)?[...n,t[1]]:[n,t[1]]):o[r]=t[1]}a(o,t)}else null!=e&&o(t,e,n);return this}get(e,t){if(e=Ng(e)){const n=bg.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(bg.isFunction(t))return t.call(this,e,n);if(bg.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Ng(e)){const n=bg.findKey(this,e);return!(!n||void 0===this[n]||t&&!jg(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function o(e){if(e=Ng(e)){const o=bg.findKey(n,e);!o||t&&!jg(0,n[o],o,t)||(delete n[o],r=!0)}}return bg.isArray(e)?e.forEach(o):o(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const o=t[n];e&&!jg(0,this[o],o,e,!0)||(delete this[o],r=!0)}return r}normalize(e){const t=this,n={};return bg.forEach(this,(r,o)=>{const a=bg.findKey(n,o);if(a)return t[a]=Tg(r),void delete t[o];const i=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}(o):String(o).trim();i!==o&&delete t[o],t[i]=Tg(r),n[i]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return bg.forEach(this,(n,r)=>{null!=n&&!1!==n&&(t[r]=e&&bg.isArray(n)?n.join(", "):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){const t=(this[Cg]=this[Cg]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=Ng(e);t[r]||(!function(e,t){const n=bg.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(e,n,o){return this[r].call(this,t,e,n,o)},configurable:!0})})}(n,e),t[r]=!0)}return bg.isArray(e)?e.forEach(r):r(e),this}};Rg.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),bg.reduceDescriptors(Rg.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),bg.freezeMethods(Rg);function Pg(e,t){const n=new Set(t.map(e=>String(e).toLowerCase())),r=[],o=e=>{if(null===e||"object"!=typeof e)return e;if(bg.isBuffer(e))return e;if(-1!==r.indexOf(e))return;let t;if(e instanceof Rg&&(e=e.toJSON()),r.push(e),bg.isArray(e))t=[],e.forEach((e,n)=>{const r=o(e);bg.isUndefined(r)||(t[n]=r)});else{if(!bg.isPlainObject(e)&&function(e){if(bg.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(bg.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}(e))return r.pop(),e;t=Object.create(null);for(const[r,a]of Object.entries(e)){const e=n.has(r.toLowerCase())?"[REDACTED ****]":o(a);bg.isUndefined(e)||(t[r]=e)}}return r.pop(),t};return o(e)}var Og=class e extends Error{static from(t,n,r,o,a,i){const s=new e(t.message,n||t.code,r,o,a);return Object.defineProperty(s,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),s.name=t.name,null!=t.status&&null==s.status&&(s.status=t.status),i&&Object.assign(s,i),s}constructor(e,t,n,r,o){super(e),Object.defineProperty(this,"message",{__proto__:null,value:e,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status)}toJSON(){const e=this.config,t=e&&bg.hasOwnProp(e,"redact")?e.redact:void 0,n=bg.isArray(t)&&t.length>0?Pg(e,t):bg.toJSONObject(e);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:n,code:this.code,status:this.status}}};Og.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",Og.ERR_BAD_OPTION="ERR_BAD_OPTION",Og.ECONNABORTED="ECONNABORTED",Og.ETIMEDOUT="ETIMEDOUT",Og.ECONNREFUSED="ECONNREFUSED",Og.ERR_NETWORK="ERR_NETWORK",Og.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",Og.ERR_DEPRECATED="ERR_DEPRECATED",Og.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",Og.ERR_BAD_REQUEST="ERR_BAD_REQUEST",Og.ERR_CANCELED="ERR_CANCELED",Og.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",Og.ERR_INVALID_URL="ERR_INVALID_URL",Og.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";function _g(e){return bg.isPlainObject(e)||bg.isArray(e)}function Ag(e){return bg.endsWith(e,"[]")?e.slice(0,-2):e}function Dg(e,t,n){return e?e.concat(t).map(function(e,t){return e=Ag(e),!n&&t?"["+e+"]":e}).join(n?".":""):t}var Mg=bg.toFlatObject(bg,{},null,function(e){return/^is[A-Z]/.test(e)});function Lg(e,t,n){if(!bg.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=bg.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!bg.isUndefined(t[e])})).metaTokens,o=n.visitor||h,a=n.dots,i=n.indexes,s=n.Blob||"undefined"!=typeof Blob&&Blob,l=void 0===n.maxDepth?100:n.maxDepth,c=s&&bg.isSpecCompliantForm(t),u=[];if(!bg.isFunction(o))throw new TypeError("visitor must be a function");function d(e){if(null===e)return"";if(bg.isDate(e))return e.toISOString();if(bg.isBoolean(e))return e.toString();if(!c&&bg.isBlob(e))throw new Og("Blob is not supported. Use a Buffer instead.");if(bg.isArrayBuffer(e)||bg.isTypedArray(e)){if(c&&"function"==typeof s)return new s([e]);if("undefined"!=typeof Buffer)return Buffer.from(e);throw new Og("Blob is not supported. Use a Buffer instead.",Og.ERR_NOT_SUPPORT)}return e}function f(e){if(e>l)throw new Og("Object is too deeply nested ("+e+" levels). Max depth: "+l,Og.ERR_FORM_DATA_DEPTH_EXCEEDED)}function h(e,n,o){let s=e;if(bg.isReactNative(t)&&bg.isReactNativeBlob(e))return t.append(Dg(o,n,a),d(e)),!1;if(e&&!o&&"object"==typeof e)if(bg.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=function(e,t){if(l===1/0)return JSON.stringify(e);const n=[];return JSON.stringify(e,function(e,r){if(!bg.isObject(r))return r;for(;n.length&&n[n.length-1]!==this;)n.pop();return n.push(r),f(t+n.length-1),r})}(e,1);else if(bg.isArray(e)&&function(e){return bg.isArray(e)&&!e.some(_g)}(e)||(bg.isFileList(e)||bg.endsWith(n,"[]"))&&(s=bg.toArray(e)))return n=Ag(n),s.forEach(function(e,r){!bg.isUndefined(e)&&null!==e&&t.append(!0===i?Dg([n],r,a):null===i?n:n+"[]",d(e))}),!1;return!!_g(e)||(t.append(Dg(o,n,a),d(e)),!1)}const p=Object.assign(Mg,{defaultVisitor:h,convertValue:d,isVisitable:_g});if(!bg.isObject(e))throw new TypeError("data must be an object");return function e(n,r,a=0){if(!bg.isUndefined(n)){if(f(a),-1!==u.indexOf(n))throw new Error("Circular reference detected in "+r.join("."));u.push(n),bg.forEach(n,function(n,i){!0===(!(bg.isUndefined(n)||null===n)&&o.call(t,n,bg.isString(i)?i.trim():i,r,p))&&e(n,r?r.concat(i):[i],a+1)}),u.pop()}}(e),t}function Ig(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(e){return t[e]})}function zg(e,t){this._pairs=[],e&&Lg(e,this,t)}var Fg=zg.prototype;function Bg(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Ug(e,t,n){if(!t)return e;e=e||"";const r=bg.isFunction(n)?{serialize:n}:n,o=bg.getSafeProp(r,"encode")||Bg,a=bg.getSafeProp(r,"serialize");let i;if(i=a?a(t,r):bg.isURLSearchParams(t)?t.toString():new zg(t,r).toString(o),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}Fg.append=function(e,t){this._pairs.push([e,t])},Fg.toString=function(e){const t=e?t=>e.call(this,t,Ig):Ig;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};var Vg=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){bg.forEach(this.handlers,function(t){null!==t&&e(t)})}},$g={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},Hg={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:zg,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},qg=s({hasBrowserEnv:()=>Wg,hasStandardBrowserEnv:()=>Gg,hasStandardBrowserWebWorkerEnv:()=>Yg,navigator:()=>Kg,origin:()=>Qg}),Wg="undefined"!=typeof window&&"undefined"!=typeof document,Kg="object"==typeof navigator&&navigator||void 0,Gg=Wg&&(!Kg||["ReactNative","NativeScript","NS"].indexOf(Kg.product)<0),Yg="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,Qg=Wg&&window.location.href||"http://localhost",Xg={...qg,...Hg};function Jg(e){if(e>100)throw new Og("FormData field is too deeply nested ("+e+" levels). Max depth: 100",Og.ERR_FORM_DATA_DEPTH_EXCEEDED)}function Zg(e){function t(e,n,r,o){Jg(o);let a=e[o++];if("__proto__"===a)return!0;const i=Number.isFinite(+a),s=o>=e.length;return a=!a&&bg.isArray(r)?r.length:a,s?(bg.hasOwnProp(r,a)?r[a]=bg.isArray(r[a])?r[a].concat(n):[r[a],n]:r[a]=n,!i):(bg.hasOwnProp(r,a)&&bg.isObject(r[a])||(r[a]=[]),t(e,n,r[a],o)&&bg.isArray(r[a])&&(r[a]=function(e){const t={},n=Object.keys(e);let r;const o=n.length;let a;for(r=0;r<o;r++)a=n[r],t[a]=e[a];return t}(r[a])),!i)}if(bg.isFormData(e)&&bg.isFunction(e.entries)){const n={};return bg.forEachEntry(e,(e,r)=>{t(function(e){const t=[],n=/\w+|\[(\w*)]/g;let r;for(;null!==(r=n.exec(e));)Jg(t.length),t.push("[]"===r[0]?"":r[1]||r[0]);return t}(e),r,n,0)}),n}return null}var ey=(e,t)=>null!=e&&bg.hasOwnProp(e,t)?e[t]:void 0;var ty={transitional:$g,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,o=bg.isObject(e);if(o&&bg.isHTMLForm(e)&&(e=new FormData(e)),bg.isFormData(e))return r?JSON.stringify(Zg(e)):e;if(bg.isArrayBuffer(e)||bg.isBuffer(e)||bg.isStream(e)||bg.isFile(e)||bg.isBlob(e)||bg.isReadableStream(e))return e;if(bg.isArrayBufferView(e))return e.buffer;if(bg.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(o){const t=ey(this,"formSerializer");if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return Lg(e,new Xg.classes.URLSearchParams,{visitor:function(e,t,n,r){return Xg.isNode&&bg.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)},...t})}(e,t).toString();if((a=bg.isFileList(e))||n.indexOf("multipart/form-data")>-1){const n=ey(this,"env"),r=n&&n.FormData;return Lg(a?{"files[]":e}:e,r&&new r,t)}}return o||r?(t.setContentType("application/json",!1),function(e,t,n){if(bg.isString(e))try{return(t||JSON.parse)(e),bg.trim(e)}catch(r){if("SyntaxError"!==r.name)throw r}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=ey(this,"transitional")||ty.transitional,n=t&&t.forcedJSONParsing,r=ey(this,"responseType"),o="json"===r;if(bg.isResponse(e)||bg.isReadableStream(e))return e;if(e&&bg.isString(e)&&(n&&!r||o)){const n=!(t&&t.silentJSONParsing)&&o;try{return JSON.parse(e,ey(this,"parseReviver"))}catch(a){if(n){if("SyntaxError"===a.name)throw Og.from(a,Og.ERR_BAD_RESPONSE,this,null,ey(this,"response"));throw a}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Xg.classes.FormData,Blob:Xg.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};function ny(e,t){const n=this||ty,r=t||n,o=Rg.from(r.headers);let a=r.data;return bg.forEach(e,function(e){a=e.call(n,a,o.normalize(),t?t.status:void 0)}),o.normalize(),a}function ry(e){return!(!e||!e.__CANCEL__)}bg.forEach(["delete","get","head","post","put","patch","query"],e=>{ty.headers[e]={}});var oy=class extends Og{constructor(e,t,n){super(null==e?"canceled":e,Og.ERR_CANCELED,t,n),this.name="CanceledError",this.__CANCEL__=!0}};function ay(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new Og("Request failed with status code "+n.status,n.status>=400&&n.status<500?Og.ERR_BAD_REQUEST:Og.ERR_BAD_RESPONSE,n.config,n.request,n)):e(n)}var iy=(e,t,n=3)=>{let r=0;const o=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o,a=0,i=0;return t=void 0!==t?t:1e3,function(s){const l=Date.now(),c=r[i];o||(o=l),n[a]=s,r[a]=l;let u=i,d=0;for(;u!==a;)d+=n[u++],u%=e;if(a=(a+1)%e,a===i&&(i=(i+1)%e),l-o<t)return;const f=c&&l-c;return f?Math.round(1e3*d/f):void 0}}(50,250);return function(e,t){let n,r,o=0,a=1e3/t;const i=(t,a=Date.now())=>{o=a,n=null,r&&(clearTimeout(r),r=null),e(...t)};return[(...e)=>{const t=Date.now(),s=t-o;s>=a?i(e,t):(n=e,r||(r=setTimeout(()=>{r=null,i(n)},a-s)))},()=>n&&i(n)]}(n=>{if(!n||"number"!=typeof n.loaded)return;const a=n.loaded,i=n.lengthComputable?n.total:void 0,s=null!=i?Math.min(a,i):a,l=Math.max(0,s-r),c=o(l);r=Math.max(r,s),e({loaded:s,total:i,progress:i?s/i:void 0,bytes:l,rate:c||void 0,estimated:c&&i?(i-s)/c:void 0,event:n,lengthComputable:null!=i,[t?"download":"upload"]:!0})},n)},sy=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},ly=e=>(...t)=>bg.asap(()=>e(...t)),cy=Xg.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Xg.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Xg.origin),Xg.navigator&&/(msie|trident)/i.test(Xg.navigator.userAgent)):()=>!0,uy=Xg.hasStandardBrowserEnv?{write(e,t,n,r,o,a,i){if("undefined"==typeof document)return;const s=[`${e}=${encodeURIComponent(t)}`];bg.isNumber(n)&&s.push(`expires=${new Date(n).toUTCString()}`),bg.isString(r)&&s.push(`path=${r}`),bg.isString(o)&&s.push(`domain=${o}`),!0===a&&s.push("secure"),bg.isString(i)&&s.push(`SameSite=${i}`),document.cookie=s.join("; ")},read(e){if("undefined"==typeof document)return null;const t=document.cookie.split(";");for(let r=0;r<t.length;r++){const o=t[r].replace(/^\s+/,""),a=o.indexOf("=");if(-1!==a&&o.slice(0,a)===e)try{return decodeURIComponent(o.slice(a+1))}catch(n){return o.slice(a+1)}}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read:()=>null,remove(){}};var dy=/^https?:(?!\/\/)/i,fy=/[\t\n\r]/g;function hy(e,t){if("string"==typeof e&&dy.test(function(e){return function(e){let t=0;for(;t<e.length&&e.charCodeAt(t)<=32;)t++;return e.slice(t)}(e).replace(fy,"")}(e)))throw new Og('Invalid URL: missing "//" after protocol',Og.ERR_INVALID_URL,t)}function py(e,t,n,r){hy(t,r);let o=!("string"==typeof(a=t)&&/^([a-z][a-z\d+\-.]*:)?\/\//i.test(a));var a;return e&&(o||!1===n)?(hy(e,r),function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t)):t}var my=e=>e instanceof Rg?{...e}:e;function gy(e,t){e=e||{},t=t||{};const n=Object.create(null);function r(e,t,n,r){return bg.isPlainObject(e)&&bg.isPlainObject(t)?bg.merge.call({caseless:r},e,t):bg.isPlainObject(t)?bg.merge({},t):bg.isArray(t)?t.slice():t}function o(e,t,n,o){return bg.isUndefined(t)?bg.isUndefined(e)?void 0:r(void 0,e,0,o):r(e,t,0,o)}function a(e,t){if(!bg.isUndefined(t))return r(void 0,t)}function i(e,t){return bg.isUndefined(t)?bg.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function s(n,o,a){return bg.hasOwnProp(t,a)?r(n,o):bg.hasOwnProp(e,a)?r(void 0,n):void 0}Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});const l={url:a,method:a,data:a,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,allowedSocketPaths:i,responseEncoding:i,validateStatus:s,headers:(e,t,n)=>o(my(e),my(t),0,!0)};return bg.forEach(Object.keys({...e,...t}),function(r){if("__proto__"===r||"constructor"===r||"prototype"===r)return;const a=bg.hasOwnProp(l,r)?l[r]:o,i=a(bg.hasOwnProp(e,r)?e[r]:void 0,bg.hasOwnProp(t,r)?t[r]:void 0,r);bg.isUndefined(i)&&a!==s||(n[r]=i)}),bg.hasOwnProp(t,"validateStatus")&&bg.isUndefined(t.validateStatus)&&!1===function(n){const r=bg.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!bg.isUndefined(r)){if(!bg.isPlainObject(r))return;if(bg.hasOwnProp(r,n))return r[n]}const o=bg.hasOwnProp(e,"transitional")?e.transitional:void 0;if(bg.isPlainObject(o)&&bg.hasOwnProp(o,n))return o[n]}("validateStatusUndefinedResolves")&&(bg.hasOwnProp(e,"validateStatus")?n.validateStatus=r(void 0,e.validateStatus):delete n.validateStatus),n}var yy=["content-type","content-length"];function vy(e){const t=gy({},e),n=e=>bg.hasOwnProp(t,e)?t[e]:void 0,r=n("data");let o=n("withXSRFToken");const a=n("xsrfHeaderName"),i=n("xsrfCookieName");let s=n("headers");const l=n("auth"),c=n("baseURL"),u=n("allowAbsoluteUrls"),d=n("url");if(t.headers=s=Rg.from(s),t.url=Ug(py(c,d,u,t),n("params"),n("paramsSerializer")),l){const t=bg.getSafeProp(l,"username")||"",n=bg.getSafeProp(l,"password")||"";try{s.set("Authorization","Basic "+btoa(t+":"+(n?encodeURIComponent(n).replace(/%([0-9A-F]{2})/gi,(e,t)=>String.fromCharCode(parseInt(t,16))):"")))}catch(f){throw Og.from(f,Og.ERR_BAD_OPTION_VALUE,e)}}if(bg.isFormData(r)&&(Xg.hasStandardBrowserEnv||Xg.hasStandardBrowserWebWorkerEnv||bg.isReactNative(r)?s.setContentType(void 0):bg.isFunction(r.getHeaders)&&function(e,t,n){"content-only"===n?Object.entries(t||{}).forEach(([t,n])=>{yy.includes(t.toLowerCase())&&e.set(t,n)}):e.set(t)}(s,r.getHeaders(),n("formDataHeaderPolicy"))),Xg.hasStandardBrowserEnv&&(bg.isFunction(o)&&(o=o(t)),!0===o||null==o&&cy(t.url))){const e=a&&i&&uy.read(i);e&&s.set(a,e)}return t}var by="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,n){const r=vy(e);let o=r.data;const a=Rg.from(r.headers).normalize();let i,s,l,c,u,{responseType:d,onUploadProgress:f,onDownloadProgress:h}=r;function p(){c&&c(),u&&u(),r.cancelToken&&r.cancelToken.unsubscribe(i),r.signal&&r.signal.removeEventListener("abort",i)}let m=new XMLHttpRequest;function g(){if(!m)return;const r=Rg.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders());ay(function(e){t(e),p()},function(e){n(e),p()},{data:d&&"text"!==d&&"json"!==d?m.response:m.responseText,status:m.status,statusText:m.statusText,headers:r,config:e,request:m}),m=null}m.open(r.method.toUpperCase(),r.url,!0),m.timeout=r.timeout,"onloadend"in m?m.onloadend=g:m.onreadystatechange=function(){m&&4===m.readyState&&(0!==m.status||m.responseURL&&m.responseURL.startsWith("file:"))&&setTimeout(g)},m.onabort=function(){m&&(n(new Og("Request aborted",Og.ECONNABORTED,e,m)),p(),m=null)},m.onerror=function(t){const r=new Og(t&&t.message?t.message:"Network Error",Og.ERR_NETWORK,e,m);r.event=t||null,n(r),p(),m=null},m.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const o=r.transitional||$g;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new Og(t,o.clarifyTimeoutError?Og.ETIMEDOUT:Og.ECONNABORTED,e,m)),p(),m=null},void 0===o&&a.setContentType(null),"setRequestHeader"in m&&bg.forEach(Eg(a),function(e,t){m.setRequestHeader(t,e)}),bg.isUndefined(r.withCredentials)||(m.withCredentials=!!r.withCredentials),d&&"json"!==d&&(m.responseType=r.responseType),h&&([l,u]=iy(h,!0),m.addEventListener("progress",l)),f&&m.upload&&([s,c]=iy(f),m.upload.addEventListener("progress",s),m.upload.addEventListener("loadend",c)),(r.cancelToken||r.signal)&&(i=t=>{m&&(n(!t||t.type?new oy(null,e,m):t),m.abort(),p(),m=null)},r.cancelToken&&r.cancelToken.subscribe(i),r.signal&&(r.signal.aborted?i():r.signal.addEventListener("abort",i)));const y=function(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}(r.url);if(y&&!Xg.protocols.includes(y))return n(new Og("Unsupported protocol "+y+":",Og.ERR_BAD_REQUEST,e)),void p();m.send(o||null)})},xy=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const n=new AbortController;let r=!1;const o=function(e){if(!r){r=!0,i();const t=e instanceof Error?e:this.reason;n.abort(t instanceof Og?t:new oy(t instanceof Error?t.message:t))}};let a=t&&setTimeout(()=>{a=null,o(new Og(`timeout of ${t}ms exceeded`,Og.ETIMEDOUT))},t);const i=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(o):e.removeEventListener("abort",o)}),e=null)};e.forEach(e=>e.addEventListener("abort",o,{once:!0}));const{signal:s}=n;return s.unsubscribe=()=>bg.asap(i),s},wy=function*(e,t){let n=e.byteLength;if(!t||n<t)return void(yield e);let r,o=0;for(;o<n;)r=o+t,yield e.slice(o,r),o=r},Sy=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}},ky=(e,t,n,r)=>{const o=async function*(e,t){for await(const n of Sy(e))yield*wy(n,t)}(e,t);let a,i=0,s=e=>{a||(a=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await o.next();if(t)return s(),void e.close();let a=r.byteLength;n&&n(i+=a),e.enqueue(new Uint8Array(r))}catch(Fc){throw s(Fc),Fc}},cancel:e=>(s(e),o.return())},{highWaterMark:2})},Ey=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,Cy=(e,t,n)=>t+2<n&&Ey(e.charCodeAt(t+1))&&Ey(e.charCodeAt(t+2));var Ny="1.18.1",{isFunction:Ty}=bg,jy=e=>{if(!bg.isString(e))return e;try{return decodeURIComponent(e)}catch(t){return e}},Ry=(e,...t)=>{try{return!!e(...t)}catch(n){return!1}},Py=e=>{const t=void 0!==bg.global&&null!==bg.global?bg.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=bg.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:o,Request:a,Response:i}=e,s=o?Ty(o):"function"==typeof fetch,l=Ty(a),c=Ty(i);if(!s)return!1;const u=s&&Ty(n),d=s&&("function"==typeof r?(f=new r,e=>f.encode(e)):async e=>new Uint8Array(await new a(e).arrayBuffer()));var f;const h=l&&u&&Ry(()=>{let e=!1;const t=new a(Xg.origin,{body:new n,method:"POST",get duplex(){return e=!0,"half"}}),r=t.headers.has("Content-Type");return null!=t.body&&t.body.cancel(),e&&!r}),p=c&&u&&Ry(()=>bg.isReadableStream(new i("").body)),m={stream:p&&(e=>e.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!m[e]&&(m[e]=(t,n)=>{let r=t&&t[e];if(r)return r.call(t);throw new Og(`Response type '${e}' is not supported`,Og.ERR_NOT_SUPPORT,n)})});const g=async e=>null==e?0:bg.isBlob(e)?e.size:bg.isSpecCompliantForm(e)?(await new a(Xg.origin,{method:"POST",body:e}).arrayBuffer()).byteLength:bg.isArrayBufferView(e)||bg.isArrayBuffer(e)?e.byteLength:(bg.isURLSearchParams(e)&&(e+=""),bg.isString(e)?(await d(e)).byteLength:void 0);return async e=>{let{url:t,method:n,data:s,signal:c,cancelToken:d,timeout:f,onDownloadProgress:y,onUploadProgress:v,responseType:b,headers:x,withCredentials:w="same-origin",fetchOptions:S,maxContentLength:k,maxBodyLength:E}=vy(e);const C=bg.isNumber(k)&&k>-1,N=bg.isNumber(E)&&E>-1;let T=o||fetch;b=b?(b+"").toLowerCase():"text";let j=xy([c,d&&d.toAbortSignal()],f),R=null;const P=j&&j.unsubscribe&&(()=>{j.unsubscribe()});let O,_=null;const A=()=>new Og("Request body larger than maxBodyLength limit",Og.ERR_BAD_REQUEST,e,R);try{let o;const c=(M="auth",bg.hasOwnProp(e,M)?e[M]:void 0);if(c&&(o={username:bg.getSafeProp(c,"username")||"",password:bg.getSafeProp(c,"password")||""}),(e=>{const t=e.indexOf("://");let n=e;return-1!==t&&(n=n.slice(t+3)),n.includes("@")||n.includes(":")})(t)){const e=new URL(t,Xg.origin);o||!e.username&&!e.password||(o={username:jy(e.username),password:jy(e.password)}),(e.username||e.password)&&(e.username="",e.password="",t=e.href)}if(o&&(x.delete("authorization"),x.set("Authorization","Basic "+btoa((D=(o.username||"")+":"+(o.password||""),encodeURIComponent(D).replace(/%([0-9A-F]{2})/gi,(e,t)=>String.fromCharCode(parseInt(t,16))))))),C&&"string"==typeof t&&t.startsWith("data:")&&function(e){if(!e||"string"!=typeof e)return 0;if(!e.startsWith("data:"))return 0;const t=e.indexOf(",");if(t<0)return 0;const n=e.slice(5,t),r=e.slice(t+1);if(/;base64/i.test(n)){let e=r.length;const t=r.length;for(let s=0;s<t;s++)if(37===r.charCodeAt(s)&&s+2<t){const t=r.charCodeAt(s+1),n=r.charCodeAt(s+2);Ey(t)&&Ey(n)&&(e-=2,s+=2)}let n=0,o=t-1;const a=e=>e>=2&&37===r.charCodeAt(e-2)&&51===r.charCodeAt(e-1)&&(68===r.charCodeAt(e)||100===r.charCodeAt(e));o>=0&&(61===r.charCodeAt(o)?(n++,o--):a(o)&&(n++,o-=3)),1===n&&o>=0&&(61===r.charCodeAt(o)||a(o))&&n++;const i=3*Math.floor(e/4)-(n||0);return i>0?i:0}let o=0;for(let a=0,i=r.length;a<i;a++){const e=r.charCodeAt(a);if(37===e&&Cy(r,a,i))o+=1,a+=2;else if(e<128)o+=1;else if(e<2048)o+=2;else if(e>=55296&&e<=56319&&a+1<i){const e=r.charCodeAt(a+1);e>=56320&&e<=57343?(o+=4,a++):o+=3}else o+=3}return o}(t)>k)throw new Og("maxContentLength size of "+k+" exceeded",Og.ERR_BAD_RESPONSE,e,R);if(N&&"get"!==n&&"head"!==n){const e=await g(s);if("number"==typeof e&&isFinite(e)&&(O=e,e>E))throw A()}const d=N&&(bg.isReadableStream(s)||bg.isStream(s)),f=(e,t,n)=>ky(e,65536,e=>{if(N&&e>E)throw _=A();t&&t(e)},n);if(h&&"get"!==n&&"head"!==n&&(v||d)){if(O=null==O?await(async(e,t)=>{const n=bg.toFiniteNumber(e.getContentLength());return null==n?g(t):n})(x,s):O,0!==O||d){let e,n=new a(t,{method:"POST",body:s,duplex:"half"});if(bg.isFormData(s)&&(e=n.headers.get("content-type"))&&x.setContentType(e),n.body){const[e,t]=v&&sy(O,iy(ly(v)))||[];s=f(n.body,e,t)}}}else if(d&&!l&&u&&"get"!==n&&"head"!==n)s=f(s);else if(d&&l&&!h&&"get"!==n&&"head"!==n)throw new Og("Stream request bodies are not supported by the current fetch implementation",Og.ERR_NOT_SUPPORT,e,R);bg.isString(w)||(w=w?"include":"omit");const L=l&&"credentials"in a.prototype;if(bg.isFormData(s)){const e=x.getContentType();e&&/^multipart\/form-data/i.test(e)&&!/boundary=/i.test(e)&&x.delete("content-type")}x.set("User-Agent","axios/"+Ny,!1);const I={...S,signal:j,method:n.toUpperCase(),headers:Eg(x.normalize()),body:s,duplex:"half",credentials:L?w:void 0};R=l&&new a(t,I);let z=await(l?T(R,S):T(t,I));const F=Rg.from(z.headers);if(C){const t=bg.toFiniteNumber(F.getContentLength());if(null!=t&&t>k)throw new Og("maxContentLength size of "+k+" exceeded",Og.ERR_BAD_RESPONSE,e,R)}const B=p&&("stream"===b||"response"===b);if(p&&z.body&&(y||C||B&&P)){const t={};["status","statusText","headers"].forEach(e=>{t[e]=z[e]});const n=bg.toFiniteNumber(F.getContentLength()),[r,o]=y&&sy(n,iy(ly(y),!0))||[];let a=0;const s=t=>{if(C&&(a=t,a>k))throw new Og("maxContentLength size of "+k+" exceeded",Og.ERR_BAD_RESPONSE,e,R);r&&r(t)};z=new i(ky(z.body,65536,s,()=>{o&&o(),P&&P()}),t)}b=b||"text";let U=await m[bg.findKey(m,b)||"text"](z,e);if(C&&!p&&!B){let t;if(null!=U&&("number"==typeof U.byteLength?t=U.byteLength:"number"==typeof U.size?t=U.size:"string"==typeof U&&(t="function"==typeof r?(new r).encode(U).byteLength:U.length)),"number"==typeof t&&t>k)throw new Og("maxContentLength size of "+k+" exceeded",Og.ERR_BAD_RESPONSE,e,R)}return!B&&P&&P(),await new Promise((t,n)=>{ay(t,n,{data:U,headers:Rg.from(z.headers),status:z.status,statusText:z.statusText,config:e,request:R})})}catch(Fc){if(P&&P(),j&&j.aborted&&j.reason instanceof Og){const n=j.reason;throw n.config=e,R&&(n.request=R),Fc!==n&&Object.defineProperty(n,"cause",{__proto__:null,value:Fc,writable:!0,enumerable:!1,configurable:!0}),n}if(_)throw R&&!_.request&&(_.request=R),_;if(Fc instanceof Og)throw R&&!Fc.request&&(Fc.request=R),Fc;if(Fc&&"TypeError"===Fc.name&&/Load failed|fetch/i.test(Fc.message)){const n=new Og("Network Error",Og.ERR_NETWORK,e,R,Fc&&Fc.response);throw Object.defineProperty(n,"cause",{__proto__:null,value:Fc.cause||Fc,writable:!0,enumerable:!1,configurable:!0}),n}throw Og.from(Fc,Fc&&Fc.code,e,R,Fc&&Fc.response)}var D,M}},Oy=new Map,_y=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:o}=t,a=[r,o,n];let i,s,l=a.length,c=Oy;for(;l--;)i=a[l],s=c.get(i),void 0===s&&c.set(i,s=l?new Map:Py(t)),c=s;return s},Ay=(_y(),{http:null,xhr:by,fetch:{get:_y}});bg.forEach(Ay,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch(n){}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});var Dy=e=>`- ${e}`,My=e=>bg.isFunction(e)||null===e||!1===e;var Ly={getAdapter:function(e,t){e=bg.isArray(e)?e:[e];const{length:n}=e;let r,o;const a={};for(let i=0;i<n;i++){let n;if(r=e[i],o=r,!My(r)&&(o=Ay[(n=String(r)).toLowerCase()],void 0===o))throw new Og(`Unknown adapter '${n}'`);if(o&&(bg.isFunction(o)||(o=o.get(t))))break;a[n||"#"+i]=o}if(!o){const e=Object.entries(a).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));throw new Og("There is no suitable adapter to dispatch the request "+(n?e.length>1?"since :\n"+e.map(Dy).join("\n"):" "+Dy(e[0]):"as no adapter specified"),Og.ERR_NOT_SUPPORT)}return o},adapters:Ay};function Iy(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new oy(null,e)}function zy(e){return Iy(e),e.headers=Rg.from(e.headers),e.data=ny.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Ly.getAdapter(e.adapter||ty.adapter,e)(e).then(function(t){Iy(e),e.response=t;try{t.data=ny.call(e,e.transformResponse,t)}finally{delete e.response}return t.headers=Rg.from(t.headers),t},function(t){if(!ry(t)&&(Iy(e),t&&t.response)){e.response=t.response;try{t.response.data=ny.call(e,e.transformResponse,t.response)}finally{delete e.response}t.response.headers=Rg.from(t.response.headers)}return Promise.reject(t)})}var Fy={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Fy[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});var By={};Fy.transitional=function(e,t,n){return(r,o,a)=>{if(!1===e)throw new Og(function(e,t){return"[Axios v"+Ny+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}(o," has been removed"+(t?" in "+t:"")),Og.ERR_DEPRECATED);return t&&!By[o]&&(By[o]=!0),!e||e(r,o,a)}},Fy.spelling=function(e){return(e,t)=>!0};var Uy={assertOptions:function(e,t,n){if("object"!=typeof e||null===e)throw new Og("options must be an object",Og.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const a=r[o],i=Object.prototype.hasOwnProperty.call(t,a)?t[a]:void 0;if(i){const t=e[a],n=void 0===t||i(t,a,e);if(!0!==n)throw new Og("option "+a+" must be "+n,Og.ERR_BAD_OPTION_VALUE);continue}if(!0!==n)throw new Og("Unknown option "+a,Og.ERR_BAD_OPTION)}},validators:Fy},Vy=Uy.validators,$y=class{constructor(e){this.defaults=e||{},this.interceptors={request:new Vg,response:new Vg}}async request(e,t){try{return await this._request(e,t)}catch(Fc){if(Fc instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const r=(()=>{if(!t.stack)return"";const e=t.stack.indexOf("\n");return-1===e?"":t.stack.slice(e+1)})();try{if(Fc.stack){if(r){const t=r.indexOf("\n"),n=-1===t?-1:r.indexOf("\n",t+1),o=-1===n?"":r.slice(n+1);String(Fc.stack).endsWith(o)||(Fc.stack+="\n"+r)}}else Fc.stack=r}catch(n){}}throw Fc}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=gy(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:o}=t;void 0!==n&&Uy.assertOptions(n,{silentJSONParsing:Vy.transitional(Vy.boolean),forcedJSONParsing:Vy.transitional(Vy.boolean),clarifyTimeoutError:Vy.transitional(Vy.boolean),legacyInterceptorReqResOrdering:Vy.transitional(Vy.boolean),advertiseZstdAcceptEncoding:Vy.transitional(Vy.boolean),validateStatusUndefinedResolves:Vy.transitional(Vy.boolean)},!1),null!=r&&(bg.isFunction(r)?t.paramsSerializer={serialize:r}:Uy.assertOptions(r,{encode:Vy.function,serialize:Vy.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Uy.assertOptions(t,{baseUrl:Vy.spelling("baseURL"),withXsrfToken:Vy.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let a=o&&bg.merge(o.common,o[t.method]);o&&bg.forEach(["delete","get","head","post","put","patch","query","common"],e=>{delete o[e]}),t.headers=Rg.concat(a,o);const i=[];let s=!0;this.interceptors.request.forEach(function(e){if("function"==typeof e.runWhen&&!1===e.runWhen(t))return;s=s&&e.synchronous;const n=t.transitional||$g;n&&n.legacyInterceptorReqResOrdering?i.unshift(e.fulfilled,e.rejected):i.push(e.fulfilled,e.rejected)});const l=[];let c;this.interceptors.response.forEach(function(e){l.push(e.fulfilled,e.rejected)});let u,d=0;if(!s){const e=[zy.bind(this),void 0];for(e.unshift(...i),e.push(...l),u=e.length,c=Promise.resolve(t);d<u;)c=c.then(e[d++],e[d++]);return c}u=i.length;let f=t;for(;d<u;){const e=i[d++],t=i[d++];try{f=e(f)}catch(h){t.call(this,h);break}}try{c=zy.call(this,f)}catch(h){return Promise.reject(h)}for(d=0,u=l.length;d<u;)c=c.then(l[d++],l[d++]);return c}getUri(e){return Ug(py((e=gy(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls,e),e.params,e.paramsSerializer)}};bg.forEach(["delete","get","head","options"],function(e){$y.prototype[e]=function(t,n){return this.request(gy(n||{},{method:e,url:t,data:n&&bg.hasOwnProp(n,"data")?n.data:void 0}))}}),bg.forEach(["post","put","patch","query"],function(e){function t(t){return function(n,r,o){return this.request(gy(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}$y.prototype[e]=t(),"query"!==e&&($y.prototype[e+"Form"]=t(!0))});var Hy={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Hy).forEach(([e,t])=>{Hy[t]=e});var qy=function e(t){const n=new $y(t),r=Em($y.prototype.request,n);return bg.extend(r,$y.prototype,n,{allOwnKeys:!0}),bg.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(gy(t,n))},r}(ty);qy.Axios=$y,qy.CanceledError=oy,qy.CancelToken=class e{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(e){t=e});const n=this;this.promise.then(e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t;const r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,r,o){n.reason||(n.reason=new oy(e,r,o),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let t;return{token:new e(function(e){t=e}),cancel:t}}},qy.isCancel=ry,qy.VERSION=Ny,qy.toFormData=Lg,qy.AxiosError=Og,qy.Cancel=qy.CanceledError,qy.all=function(e){return Promise.all(e)},qy.spread=function(e){return function(t){return e.apply(null,t)}},qy.isAxiosError=function(e){return bg.isObject(e)&&!0===e.isAxiosError},qy.mergeConfig=gy,qy.AxiosHeaders=Rg,qy.formToJSON=e=>Zg(bg.isHTMLForm(e)?new FormData(e):e),qy.getAdapter=Ly.getAdapter,qy.HttpStatusCode=Hy,qy.default=qy;var Wy=c(Sm(),1),Ky=c(km(),1),Gy=qy.create({baseURL:"/api",headers:{"Content-Type":"application/json"}}),Yy=(0,k.createContext)(null),Qy=new Set(["schema","globals","config","settings","system","admin","api","content","draft","live"]),Xy=e=>e.length<=63&&/^[a-z][a-z0-9_]*$/.test(e)&&!Qy.has(e),Jy=(e,t)=>{let n=e.toLowerCase().replace(/[^a-z0-9]+/g,"_").replace(/^_+|_+$/g,"");n||(n="item");let r=n,o=1;for(;t.has(r)||r.length>63;)r=`${n.slice(0,60)}_${o}`,o++;return r},Zy=e=>Array.isArray(e)?e.map(e=>({...e,id:e.id||`field_${Date.now()}_${Math.random().toString(36).substring(2,9)}`,fields:Array.isArray(e.fields)?Zy(e.fields):void 0})):[],ev=e=>Array.isArray(e)?e.map(e=>({...e,id:e.id||`node_${Date.now()}_${Math.random().toString(36).substring(2,9)}`,fields:Zy(e.fields||[])})):[];function tv({children:e,projectId:t}){const n=tm(),r=(0,k.useCallback)(function e(t,n,r){return t.map(t=>t.id===n?{...t,...r}:t.fields&&t.fields.length>0?{...t,fields:e(t.fields,n,r)}:t)},[]),o=(0,k.useCallback)((e,t)=>e.filter(e=>e.id!==t).map(e=>e.fields?{...e,fields:o(e.fields,t)}:e),[]),[a,i]=(0,k.useState)({schemaVersion:"5.0",projectId:t,config:{siteName:"Default Site",tagline:"Built with CMS",branding:{},metadata:{},seo:{}},pages:[],collections:[]}),[s,l]=(0,k.useState)(null),[c,u]=(0,k.useState)(null),[d,f]=(0,k.useState)("idle"),[h,p]=(0,k.useState)(!1),m=(0,k.useRef)(null),g=(0,k.useRef)(null),y=(0,k.useRef)(!1),v=(0,k.useRef)(null),{data:b,isLoading:x}=sm({queryKey:["project-schema-state",t],queryFn:async()=>(await Gy.get(`/content/schema/${t}`)).data,staleTime:3e4,gcTime:0});(0,k.useEffect)(()=>{if(b?.draft&&!y.current){const e={...b.draft,pages:ev(b.draft.pages||[]),collections:ev(b.draft.collections||[])};i(e),m.current=e,g.current=b.meta.lastSaved;const t=[...e.pages,...e.collections];!s&&t.length>0&&l(t[0].id),f("saved"),y.current=!0}},[b,s]),(0,k.useEffect)(()=>{y.current=!1,g.current=null,m.current=null},[t]);const w=(0,k.useCallback)(()=>{b?.draft&&(i(b.draft),m.current=b.draft,g.current=b.meta.lastSaved,p(!1),f("saved"),Sf.success("Resolved to server version"))},[b]);(0,k.useEffect)(()=>{b?.meta.lastSaved&&g.current&&new Date(b.meta.lastSaved).getTime()>new Date(g.current).getTime()&&(p(!0),Sf.warning("Newer draft detected on server",{description:"Your local changes may conflict. Choose how to resolve.",action:{label:"Resolve",onClick:()=>w()}}))},[b?.meta.lastSaved,w]);const S=(0,k.useMemo)(()=>!!m.current&&!(0,Ky.default)(a,m.current),[a]),E=(0,k.useCallback)(e=>{const t=new Set,n=e=>{let n=e.apiKey;return Xy(n)||(n=Jy(n||"node",t)),t.has(n)&&(n=Jy(n,t)),t.add(n),{...e,apiKey:n}};return{...e,pages:e.pages.map(n),collections:e.collections.map(n)}},[]),C=lm({mutationFn:async e=>{if(h)throw new Error("CONFLICT_DETECTED");const n=E(e);return{...(await Gy.patch(`/content/schema/${t}/draft`,{schema:n})).data,savedSchema:n}},onMutate:()=>{f("saving"),p(!1)},onSuccess:e=>{f("saved");const r=(new Date).toISOString();(!g.current||r>g.current)&&(m.current=e.savedSchema,g.current=r),n.setQueryData(["project-schema-state",t],t=>t?{...t,draft:e.savedSchema,meta:{...t.meta,lastSaved:g.current}}:t)},onError:e=>{e instanceof Error&&"CONFLICT_DETECTED"===e.message?(p(!0),Sf.error("Conflict detected",{description:"Your changes conflict with the server version.",action:{label:"Use Server",onClick:()=>w()}})):(f("error"),Sf.error("Failed to save draft"))}}),N=(0,k.useMemo)(()=>(0,Wy.default)(e=>{v.current=C.mutateAsync(e).catch(()=>{})},1e3,{leading:!1,trailing:!0}),[C]),T=(0,k.useCallback)(e=>{i(e),N(e)},[N]),j=(0,k.useCallback)(()=>{p(!1),v.current?v.current.then(()=>C.mutate(a)):C.mutate(a),Sf.info("Overwriting server with your local changes")},[a,C]),R=(0,k.useCallback)((e,t)=>{a.pages.some(t=>t.id===e)?T({...a,pages:a.pages.map(n=>n.id===e?t(n):n)}):T({...a,collections:a.collections.map(n=>n.id===e?t(n):n)})},[a,T]),P=(0,k.useCallback)(e=>{const t=[...a.pages,...a.collections].map(e=>e.apiKey),n=new Set(t),r=Jy("SINGLETON"===e?"page":"collection",n),o=`node_${Date.now()}`,i={id:o,name:"SINGLETON"===e?"New Page":"New Collection",apiKey:r,type:e,fields:[{id:`field_${Date.now()}`,name:"title",label:"Title",type:"TEXT_SHORT",validation:{required:!0}}],createdAt:(new Date).toISOString(),cacheStrategy:"stale-while-revalidate"};T("SINGLETON"===e?{...a,pages:[...a.pages,i]}:{...a,collections:[...a.collections,i]}),l(o)},[a,T]),O=(0,k.useCallback)((e,t)=>{R(e,n=>{const r={...n,...t};if(t.apiKey&&t.apiKey!==n.apiKey){const n=new Set([...a.pages,...a.collections].filter(t=>t.id!==e).map(e=>e.apiKey));Xy(t.apiKey)&&!n.has(t.apiKey)||(r.apiKey=Jy(t.apiKey,n))}return r})},[a,R]),_=(0,k.useCallback)(e=>{T({...a,pages:a.pages.filter(t=>t.id!==e),collections:a.collections.filter(t=>t.id!==e)}),s===e&&l(null)},[a,T,s]),A=(0,k.useCallback)((e,t,n,r={})=>{const o=`field_${Date.now()}`,a="SECTION"===t?{id:o,name:r.name||`section_${Date.now()}`,label:r.label||"New Section",type:"SECTION",fields:[],...r}:{id:o,name:r.name||`field_${Date.now()}`,label:r.label||`New ${t.replace(/_/g," ")}`,type:t,...r};R(e,e=>{if(!n)return{...e,fields:[...e.fields,a]};const t=e=>e.map(e=>e.id===n?{...e,fields:[...e.fields||[],a]}:e.fields?{...e,fields:t(e.fields)}:e);return{...e,fields:t(e.fields)}}),u(o)},[R]),D=(0,k.useCallback)((e,t,n)=>{R(e,e=>({...e,fields:r(e.fields,t,n)}))},[R,r]),M=(0,k.useCallback)((e,t)=>{R(e,e=>({...e,fields:o(e.fields,t)})),c===t&&u(null)},[R,o,c]),L=(0,k.useCallback)((e,t)=>{R(e,e=>({...e,fields:t}))},[R]),I=lm({mutationFn:async()=>(v.current&&await v.current,N.flush(),C.isPending&&await C.mutateAsync(a).catch(()=>{}),(await Gy.post(`/content/schema/${t}/publish`)).data),onSuccess:e=>{n.invalidateQueries({queryKey:["project-schema-state",t]}),Sf.success("Schema published to production",{description:`Published at ${new Date(e.publishedAt).toLocaleTimeString()}`})},onError:()=>Sf.error("Publish failed")}),z=(0,k.useCallback)(async()=>await I.mutateAsync(),[I]),F=(0,k.useCallback)(()=>N.flush(),[N]),B=(0,k.useCallback)(e=>{const t=e,n=E({...e,pages:e.pages||t.nodes?.filter(e=>"SINGLETON"===e.type).map(e=>({id:e.id,name:e.name,apiKey:e.apiKey,type:"SINGLETON",fields:e.fields,createdAt:(new Date).toISOString()}))||[],collections:e.collections||t.nodes?.filter(e=>"COLLECTION"===e.type).map(e=>({id:e.id,name:e.name,apiKey:e.apiKey,type:"COLLECTION",fields:e.fields,createdAt:(new Date).toISOString()}))||[]}),r={...n,pages:ev(n.pages),collections:ev(n.collections)};T(r);const o=[...r.pages,...r.collections];o.length>0&&l(o[0].id),Sf.success("Schema imported")},[T,E]),U=(0,k.useMemo)(()=>({schema:a,selectedNodeId:s,selectedFieldId:c,syncStatus:d,isLoading:x,lastSaved:b?.meta.lastSaved||null,lastPublished:b?.meta.lastPublished||null,isDirty:S,hasConflict:h,setSelectedNodeId:l,setSelectedFieldId:u,addNode:P,updateNode:O,deleteNode:_,addField:A,updateField:D,deleteField:M,reorderFields:L,publishSchema:z,forceSync:F,importSchema:B,resolveConflict:w,forceOverwriteServer:j}),[a,s,c,d,x,b,S,h,P,O,_,A,D,M,L,z,F,B,w,j]);return(0,fc.jsx)(Yy.Provider,{value:U,children:e})}var nv=()=>{const e=(0,k.useContext)(Yy);if(!e)throw new Error("useSchema must be used within a SchemaProvider");return e},rv=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,ov=_f,av=(e,t)=>n=>{var r;if(null==(null==t?void 0:t.variants))return ov(e,null==n?void 0:n.class,null==n?void 0:n.className);const{variants:o,defaultVariants:a}=t,i=Object.keys(o).map(e=>{const t=null==n?void 0:n[e],r=null==a?void 0:a[e];if(null===t)return null;const i=rv(t)||rv(r);return o[e][i]}),s=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return void 0===r||(e[n]=r),e},{});return ov(e,i,null==t||null===(r=t.compoundVariants)||void 0===r?void 0:r.reduce((e,t)=>{let{class:n,className:r,...o}=t;return Object.entries(o).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...a,...s}[t]):{...a,...s}[t]===n})?[...e,n,r]:e},[]),null==n?void 0:n.class,null==n?void 0:n.className)};"undefined"==typeof window||!window.document||window.document.createElement;function iv(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),!1===n||!r.defaultPrevented)return t?.(r)}}function sv(e,t=[]){let n=[];const r=()=>{const t=n.map(e=>k.createContext(e));return function(n){const r=n?.[e]||t;return k.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return r.scopeName=e,[function(t,r){const o=k.createContext(r);o.displayName=t+"Context";const a=n.length;n=[...n,r];const i=t=>{const{scope:n,children:r,...i}=t,s=n?.[e]?.[a]||o,l=k.useMemo(()=>i,Object.values(i));return(0,fc.jsx)(s.Provider,{value:l,children:r})};return i.displayName=t+"Provider",[i,function(n,i){const s=i?.[e]?.[a]||o,l=k.useContext(s);if(l)return l;if(void 0!==r)return r;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},lv(r,...t)]}function lv(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){const r=n.reduce((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]}),{});return k.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}var cv=globalThis?.document?k.useLayoutEffect:()=>{},uv=k[" useInsertionEffect ".trim().toString()]||cv;function dv({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,a,i]=function({defaultProp:e,onChange:t}){const[n,r]=k.useState(e),o=k.useRef(n),a=k.useRef(t);return uv(()=>{a.current=t},[t]),k.useEffect(()=>{o.current!==n&&(a.current?.(n),o.current=n)},[n,o]),[n,r,a]}({defaultProp:t,onChange:n}),s=void 0!==e,l=s?e:o;{const t=k.useRef(void 0!==e);k.useEffect(()=>{t.current;t.current=s},[s,r])}return[l,k.useCallback(t=>{if(s){const n=function(e){return"function"==typeof e}(t)?t(e):t;n!==e&&i.current?.(n)}else a(t)},[s,e,a,i])]}function fv(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function hv(...e){return t=>{let n=!1;const r=e.map(e=>{const r=fv(e,t);return n||"function"!=typeof r||(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():fv(e[t],null)}}}}function pv(...e){return k.useCallback(hv(...e),e)}function mv(e){const t=k.forwardRef((t,n)=>{let{children:r,...o}=t,a=null,i=!1;const s=[];xv(r)&&"function"==typeof kv&&(r=kv(r._payload)),k.Children.forEach(r,e=>{if(t=e,k.isValidElement(t)&&"function"==typeof t.type&&"__radixId"in t.type&&t.type.__radixId===yv){i=!0;const t=e;let n="child"in t.props?t.props.child:t.props.children;xv(n)&&"function"==typeof kv&&(n=kv(n._payload)),a=vv(t,n),s.push(a?.props?.children)}else s.push(e);var t}),a?a=k.cloneElement(a,void 0,s):!i&&1===k.Children.count(r)&&k.isValidElement(r)&&(a=r);const l=a?function(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)}(a):void 0,c=pv(n,l);if(!a){if(r||0===r)throw new Error(i?Sv(e):wv(e));return r}const u=function(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...e)=>{const t=a(...e);return o(...e),t}:o&&(n[r]=o):"style"===r?n[r]={...o,...a}:"className"===r&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}(o,a.props??{});return a.type!==k.Fragment&&(u.ref=n?c:l),k.cloneElement(a,u)});return t.displayName=`${e}.Slot`,t}var gv=mv("Slot"),yv=Symbol.for("radix.slottable");var vv=(e,t)=>{if("child"in e.props){const t=e.props.child;return k.isValidElement(t)?k.cloneElement(t,void 0,e.props.children(t.props.children)):null}return k.isValidElement(t)?t:null};var bv=Symbol.for("react.lazy");function xv(e){return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===bv&&"_payload"in e&&("object"==typeof(t=e._payload)&&null!==t&&"then"in t);var t}var wv=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,Sv=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,kv=k[" use ".trim().toString()],Ev=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{const n=mv(`Primitive.${t}`),r=k.forwardRef((e,r)=>{const{asChild:o,...a}=e,i=o?n:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,fc.jsx)(i,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Cv(e,t){e&&x.flushSync(()=>e.dispatchEvent(t))}var Nv=e=>{const{present:t,children:n}=e,r=function(e){const[t,n]=k.useState(),r=k.useRef(null),o=k.useRef(e),a=k.useRef("none"),[i,s]=(l=e?"mounted":"unmounted",c={mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}},k.useReducer((e,t)=>c[e][t]??e,l));var l,c;return k.useEffect(()=>{const e=jv(r.current);a.current="mounted"===i?e:"none"},[i]),cv(()=>{const t=r.current,n=o.current;if(n!==e){const r=a.current,i=jv(t);s(e?"MOUNT":"none"===i||"none"===t?.display?"UNMOUNT":n&&r!==i?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,s]),cv(()=>{if(t){let e;const n=t.ownerDocument.defaultView??window,i=a=>{const i=jv(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&i&&(s("ANIMATION_END"),!o.current)){const r=t.style.animationFillMode;t.style.animationFillMode="forwards",e=n.setTimeout(()=>{"forwards"===t.style.animationFillMode&&(t.style.animationFillMode=r)})}},l=e=>{e.target===t&&(a.current=jv(r.current))};return t.addEventListener("animationstart",l),t.addEventListener("animationcancel",i),t.addEventListener("animationend",i),()=>{n.clearTimeout(e),t.removeEventListener("animationstart",l),t.removeEventListener("animationcancel",i),t.removeEventListener("animationend",i)}}s("ANIMATION_END")},[t,s]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:k.useCallback(e=>{r.current=e?getComputedStyle(e):null,n(e)},[])}}(t),o="function"==typeof n?n({present:r.isPresent}):k.Children.only(n),a=function(...e){const t=k.useRef(e);return t.current=e,k.useCallback(e=>{const n=t.current;let r=!1;const o=n.map(t=>{const n=Tv(t,e);return r||"function"!=typeof n||(r=!0),n});if(r)return()=>{for(let e=0;e<o.length;e++){const t=o[e];"function"==typeof t?t():Tv(n[e],null)}}},[])}(r.ref,function(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)}(o));return"function"==typeof n||r.isPresent?k.cloneElement(o,{ref:a}):null};function Tv(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function jv(e){return e?.animationName||"none"}Nv.displayName="Presence";var Rv=k[" useId ".trim().toString()]||(()=>{}),Pv=0;function Ov(e){const[t,n]=k.useState(Rv());return cv(()=>{e||n(e=>e??String(Pv++))},[e]),e||(t?`radix-${t}`:"")}var _v="Collapsible",[Av,Dv]=sv(_v),[Mv,Lv]=Av(_v),Iv=k.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:a,onOpenChange:i,...s}=e,[l,c]=dv({prop:r,defaultProp:o??!1,onChange:i,caller:_v});return(0,fc.jsx)(Mv,{scope:n,disabled:a,contentId:Ov(),open:l,onOpenToggle:k.useCallback(()=>c(e=>!e),[c]),children:(0,fc.jsx)(Ev.div,{"data-state":$v(l),"data-disabled":a?"":void 0,...s,ref:t})})});Iv.displayName=_v;var zv="CollapsibleTrigger",Fv=k.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=Lv(zv,n);return(0,fc.jsx)(Ev.button,{type:"button","aria-controls":o.open?o.contentId:void 0,"aria-expanded":o.open||!1,"data-state":$v(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...r,ref:t,onClick:iv(e.onClick,o.onOpenToggle)})});Fv.displayName=zv;var Bv="CollapsibleContent",Uv=k.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Lv(Bv,e.__scopeCollapsible);return(0,fc.jsx)(Nv,{present:n||o.open,children:({present:e})=>(0,fc.jsx)(Vv,{...r,ref:t,present:e})})});Uv.displayName=Bv;var Vv=k.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...a}=e,i=Lv(Bv,n),[s,l]=k.useState(r),c=k.useRef(null),u=pv(t,c),d=k.useRef(0),f=d.current,h=k.useRef(0),p=h.current,m=i.open||s,g=k.useRef(m),y=k.useRef(void 0);return k.useEffect(()=>{const e=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(e)},[]),cv(()=>{const e=c.current;if(e){y.current=y.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration="0s",e.style.animationName="none";const t=e.getBoundingClientRect();d.current=t.height,h.current=t.width,g.current||(e.style.transitionDuration=y.current.transitionDuration,e.style.animationName=y.current.animationName),l(r)}},[i.open,r]),(0,fc.jsx)(Ev.div,{"data-state":$v(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!m,...a,ref:u,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":p?`${p}px`:void 0,...e.style},children:m&&o})});function $v(e){return e?"open":"closed"}var Hv=Iv;function qv(e){const t=k.useRef(e);return k.useEffect(()=>{t.current=e}),k.useMemo(()=>(...e)=>t.current?.(...e),[])}var Wv,Kv="dismissableLayer.update",Gv="dismissableLayer.pointerDownOutside",Yv="dismissableLayer.focusOutside",Qv=k.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),Xv=k.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:i,onInteractOutside:s,onDismiss:l,...c}=e,u=k.useContext(Qv),[d,f]=k.useState(null),h=d?.ownerDocument??globalThis?.document,[,p]=k.useState({}),m=pv(t,e=>f(e)),g=Array.from(u.layers),[y]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=g.indexOf(y),b=d?g.indexOf(d):-1,x=u.layersWithOutsidePointerEventsDisabled.size>0,w=b>=v,S=k.useRef(!1),E=function(e,t){const{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:o,dismissableSurfaces:a}=t,i=qv(e),s=k.useRef(!1),l=k.useRef(!1),c=k.useRef(new Map),u=k.useRef(()=>{});return k.useEffect(()=>{function e(){l.current=!1,o.current=!1,c.current.clear()}function t(){return Array.from(c.current.values()).some(Boolean)}function d(e){if(!l.current)return;const t=e.target;t instanceof Node&&[...a].some(e=>e.contains(t))||c.current.set(e.type,!0),"click"===e.type&&window.setTimeout(()=>{l.current&&u.current()},0)}function f(e){l.current&&c.current.set(e.type,!1)}const h=a=>{if(a.target&&!s.current){let s=function(){n.removeEventListener("click",u.current);const r=t();e(),r||Zv(Gv,i,d,{discrete:!0})};const d={originalEvent:a};l.current=!0,o.current=r&&0===a.button,c.current.clear(),r&&0===a.button?(n.removeEventListener("click",u.current),u.current=s,n.addEventListener("click",u.current,{once:!0})):s()}else n.removeEventListener("click",u.current),e();s.current=!1},p=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const r of p)n.addEventListener(r,d,!0),n.addEventListener(r,f);const m=window.setTimeout(()=>{n.addEventListener("pointerdown",h)},0);return()=>{window.clearTimeout(m),n.removeEventListener("pointerdown",h),n.removeEventListener("click",u.current);for(const e of p)n.removeEventListener(e,d,!0),n.removeEventListener(e,f)}},[n,i,r,o,a]),{onPointerDownCapture:()=>s.current=!0}}(e=>{const t=e.target;if(!(t instanceof Node))return;const n=[...u.branches].some(e=>e.contains(t));w&&!n&&(a?.(e),s?.(e),e.defaultPrevented||l?.())},{ownerDocument:h,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:S,dismissableSurfaces:u.dismissableSurfaces}),C=function(e,t=globalThis?.document){const n=qv(e),r=k.useRef(!1);return k.useEffect(()=>{const e=e=>{e.target&&!r.current&&Zv(Yv,n,{originalEvent:e},{discrete:!1})};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}(e=>{if(r&&S.current)return;const t=e.target;[...u.branches].some(e=>e.contains(t))||(i?.(e),s?.(e),e.defaultPrevented||l?.())},h);return function(e,t=globalThis?.document){const n=qv(e);k.useEffect(()=>{const e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})},[n,t])}(e=>{b===u.layers.size-1&&(o?.(e),!e.defaultPrevented&&l&&(e.preventDefault(),l()))},h),k.useEffect(()=>{if(d)return n&&(0===u.layersWithOutsidePointerEventsDisabled.size&&(Wv=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),Jv(),()=>{n&&(u.layersWithOutsidePointerEventsDisabled.delete(d),0===u.layersWithOutsidePointerEventsDisabled.size&&(h.body.style.pointerEvents=Wv))}},[d,h,n,u]),k.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),Jv())},[d,u]),k.useEffect(()=>{const e=()=>p({});return document.addEventListener(Kv,e),()=>document.removeEventListener(Kv,e)},[]),(0,fc.jsx)(Ev.div,{...c,ref:m,style:{pointerEvents:x?w?"auto":"none":void 0,...e.style},onFocusCapture:iv(e.onFocusCapture,C.onFocusCapture),onBlurCapture:iv(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:iv(e.onPointerDownCapture,E.onPointerDownCapture)})});Xv.displayName="DismissableLayer";function Jv(){const e=new CustomEvent(Kv);document.dispatchEvent(e)}function Zv(e,t,n,{discrete:r}){const o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Cv(o,a):o.dispatchEvent(a)}k.forwardRef((e,t)=>{const n=k.useContext(Qv),r=k.useRef(null),o=pv(t,r);return k.useEffect(()=>{const e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,fc.jsx)(Ev.div,{...e,ref:o})}).displayName="DismissableLayerBranch";var eb="focusScope.autoFocusOnMount",tb="focusScope.autoFocusOnUnmount",nb={bubbles:!1,cancelable:!0},rb=k.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...i}=e,[s,l]=k.useState(null),c=qv(o),u=qv(a),d=k.useRef(null),f=pv(t,e=>l(e)),h=k.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;k.useEffect(()=>{if(r){let e=function(e){if(h.paused||!s)return;const t=e.target;s.contains(t)?d.current=t:sb(d.current,{select:!0})},t=function(e){if(h.paused||!s)return;const t=e.relatedTarget;null!==t&&(s.contains(t)||sb(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&sb(s)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const 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,h.paused]),k.useEffect(()=>{if(s){lb.add(h);const t=document.activeElement;if(!s.contains(t)){const n=new CustomEvent(eb,nb);s.addEventListener(eb,c),s.dispatchEvent(n),n.defaultPrevented||(!function(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(sb(r,{select:t}),document.activeElement!==n)return}((e=ob(s),e.filter(e=>"A"!==e.tagName)),{select:!0}),document.activeElement===t&&sb(s))}return()=>{s.removeEventListener(eb,c),setTimeout(()=>{const e=new CustomEvent(tb,nb);s.addEventListener(tb,u),s.dispatchEvent(e),e.defaultPrevented||sb(t??document.body,{select:!0}),s.removeEventListener(tb,u),lb.remove(h)},0)}}var e},[s,c,u,h]);const p=k.useCallback(e=>{if(!n&&!r)return;if(h.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,o=document.activeElement;if(t&&o){const t=e.currentTarget,[r,a]=function(e){const t=ob(e);return[ab(t,e),ab(t.reverse(),e)]}(t);r&&a?e.shiftKey||o!==a?e.shiftKey&&o===r&&(e.preventDefault(),n&&sb(a,{select:!0})):(e.preventDefault(),n&&sb(r,{select:!0})):o===t&&e.preventDefault()}},[n,r,h.paused]);return(0,fc.jsx)(Ev.div,{tabIndex:-1,...i,ref:f,onKeyDown:p})});function ob(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;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 ab(e,t){for(const n of e)if(!ib(n,{upTo:t}))return n}function ib(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function sb(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}rb.displayName="FocusScope";var lb=function(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=cb(e,t),e.unshift(t)},remove(t){e=cb(e,t),e[0]?.resume()}}}();function cb(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}var ub=k.forwardRef((e,t)=>{const{container:n,...r}=e,[o,a]=k.useState(!1);cv(()=>a(!0),[]);const i=n||o&&globalThis?.document?.body;return i?x.createPortal((0,fc.jsx)(Ev.div,{...r,ref:t}),i):null});ub.displayName="Portal";var db=0,fb=null;function hb(){k.useEffect(()=>{fb||(fb={start:pb(),end:pb()});const{start:e,end:t}=fb;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement("afterbegin",e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement("beforeend",t),db++,()=>{1===db&&(fb?.start.remove(),fb?.end.remove(),fb=null),db=Math.max(0,db-1)}},[])}function pb(){const 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 mb=function(){return mb=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},mb.apply(this,arguments)};function gb(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}var yb="right-scroll-bar-position",vb="width-before-scroll-bar";function bb(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var xb="undefined"!=typeof window?k.useLayoutEffect:k.useEffect,wb=new WeakMap;function Sb(e,t){var n,r,o,a=(n=t||null,r=function(t){return e.forEach(function(e){return bb(e,t)})},(o=(0,k.useState)(function(){return{value:n,callback:r,facade:{get current(){return o.value},set current(e){var t=o.value;t!==e&&(o.value=e,o.callback(e,t))}}}})[0]).callback=r,o.facade);return xb(function(){var t=wb.get(a);if(t){var n=new Set(t),r=new Set(e),o=a.current;n.forEach(function(e){r.has(e)||bb(e,null)}),r.forEach(function(e){n.has(e)||bb(e,o)})}wb.set(a,e)},[e]),a}function kb(e){return e}var Eb=function(e){var t=e.sideCar,n=gb(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return k.createElement(r,mb({},n))};Eb.isSideCarExport=!0;var Cb=function(e){void 0===e&&(e={});var t=function(e,t){void 0===t&&(t=kb);var n=[],r=!1;return{read:function(){if(r)throw new 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 o=t(e,r);return n.push(o),function(){n=n.filter(function(e){return e!==o})}},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 o=n;n=[],o.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},i=function(){return Promise.resolve().then(a)};i(),n={push:function(e){t.push(e),i()},filter:function(e){return t=t.filter(e),n}}}}}(null);return t.options=mb({async:!0,ssr:!1},e),t}(),Nb=function(){},Tb=k.forwardRef(function(e,t){var n=k.useRef(null),r=k.useState({onScrollCapture:Nb,onWheelCapture:Nb,onTouchMoveCapture:Nb}),o=r[0],a=r[1],i=e.forwardProps,s=e.children,l=e.className,c=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,h=e.noRelative,p=e.noIsolation,m=e.inert,g=e.allowPinchZoom,y=e.as,v=void 0===y?"div":y,b=e.gapMode,x=gb(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),w=f,S=Sb([n,t]),E=mb(mb({},x),o);return k.createElement(k.Fragment,null,u&&k.createElement(w,{sideCar:Cb,removeScrollBar:c,shards:d,noRelative:h,noIsolation:p,inert:m,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:b}),i?k.cloneElement(k.Children.only(s),mb(mb({},E),{ref:S})):k.createElement(v,mb({},E,{className:l,ref:S}),s))});Tb.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Tb.classNames={fullWidth:vb,zeroRight:yb};function jb(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=function(){if("undefined"!=typeof __webpack_nonce__)return __webpack_nonce__}();return t&&e.setAttribute("nonce",t),e}var Rb=function(){var e=0,t=null;return{add:function(n){var r,o;0==e&&(t=jb())&&(o=n,(r=t).styleSheet?r.styleSheet.cssText=o:r.appendChild(document.createTextNode(o)),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(t)),e++},remove:function(){! --e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Pb=function(){var e,t=(e=Rb(),function(t,n){k.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])});return function(e){var n=e.styles,r=e.dynamic;return t(n,r),null}},Ob={left:0,top:0,right:0,gap:0},_b=function(e){return parseInt(e||"",10)||0},Ab=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return Ob;var t=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],o=t["padding"===e?"paddingRight":"marginRight"];return[_b(n),_b(r),_b(o)]}(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])}},Db=Pb(),Mb="data-scroll-locked",Lb=function(e,t,n,r){var o=e.left,a=e.top,i=e.right,s=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(s,"px ").concat(r,";\n }\n body[").concat(Mb,"] {\n overflow: hidden ").concat(r,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n padding-left: ".concat(o,"px;\n padding-top: ").concat(a,"px;\n padding-right: ").concat(i,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(s,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(yb," {\n right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(vb," {\n margin-right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(yb," .").concat(yb," {\n right: 0 ").concat(r,";\n }\n \n .").concat(vb," .").concat(vb," {\n margin-right: 0 ").concat(r,";\n }\n \n body[").concat(Mb,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(s,"px;\n }\n")},Ib=function(){var e=parseInt(document.body.getAttribute("data-scroll-locked")||"0",10);return isFinite(e)?e:0},zb=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=void 0===r?"margin":r;k.useEffect(function(){return document.body.setAttribute(Mb,(Ib()+1).toString()),function(){var e=Ib()-1;e<=0?document.body.removeAttribute(Mb):document.body.setAttribute(Mb,e.toString())}},[]);var a=k.useMemo(function(){return Ab(o)},[o]);return k.createElement(Db,{styles:Lb(a,!t,o,n?"":"!important")})},Fb=!1;if("undefined"!=typeof window)try{var Bb=Object.defineProperty({},"passive",{get:function(){return Fb=!0,!0}});window.addEventListener("test",Bb,Bb),window.removeEventListener("test",Bb,Bb)}catch(Fc){Fb=!1}var Ub=!!Fb&&{passive:!1},Vb=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===n[t])},$b=function(e,t){var n=t.ownerDocument,r=t;do{if("undefined"!=typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),Hb(e,r)){var o=qb(e,r);if(o[1]>o[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Hb=function(e,t){return"v"===e?function(e){return Vb(e,"overflowY")}(t):function(e){return Vb(e,"overflowX")}(t)},qb=function(e,t){return"v"===e?[(n=t).scrollTop,n.scrollHeight,n.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t);var n},Wb=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Kb=function(e){return[e.deltaX,e.deltaY]},Gb=function(e){return e&&"current"in e?e.current:e},Yb=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},Qb=0,Xb=[];function Jb(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var Zb,ex=(Zb=function(e){var t=k.useRef([]),n=k.useRef([0,0]),r=k.useRef(),o=k.useState(Qb++)[0],a=k.useState(Pb)[0],i=k.useRef(e);k.useEffect(function(){i.current=e},[e]),k.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var t=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,a=t.length;o<a;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}([e.lockRef.current],(e.shards||[]).map(Gb),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),t.forEach(function(e){return e.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=k.useCallback(function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!i.current.allowPinchZoom;var o,a=Wb(e),s=n.current,l="deltaX"in e?e.deltaX:s[0]-a[0],c="deltaY"in e?e.deltaY:s[1]-a[1],u=e.target,d=Math.abs(l)>Math.abs(c)?"h":"v";if("touches"in e&&"h"===d&&"range"===u.type)return!1;var f=window.getSelection(),h=f&&f.anchorNode;if(h&&(h===u||h.contains(u)))return!1;var p=$b(d,u);if(!p)return!0;if(p?o=d:(o="v"===d?"h":"v",p=$b(d,u)),!p)return!1;if(!r.current&&"changedTouches"in e&&(l||c)&&(r.current=o),!o)return!0;var m=r.current||o;return function(e,t,n,r,o){var a=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),i=a*r,s=n.target,l=t.contains(s),c=!1,u=i>0,d=0,f=0;do{if(!s)break;var h=qb(e,s),p=h[0],m=h[1]-h[2]-a*p;(p||m)&&Hb(e,s)&&(d+=m,f+=p);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(u&&(o&&Math.abs(d)<1||!o&&i>d)||!u&&(o&&Math.abs(f)<1||!o&&-i>f))&&(c=!0),c}(m,t,e,"h"===m?l:c,!0)},[]),l=k.useCallback(function(e){var n=e;if(Xb.length&&Xb[Xb.length-1]===a){var r="deltaY"in n?Kb(n):Wb(n),o=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&(t=e.delta,o=r,t[0]===o[0]&&t[1]===o[1]);var t,o})[0];if(o&&o.should)n.cancelable&&n.preventDefault();else if(!o){var l=(i.current.shards||[]).map(Gb).filter(Boolean).filter(function(e){return e.contains(n.target)});(l.length>0?s(n,l[0]):!i.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),c=k.useCallback(function(e,n,r,o){var a={name:e,delta:n,target:r,should:o,shadowParent:Jb(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=k.useCallback(function(e){n.current=Wb(e),r.current=void 0},[]),d=k.useCallback(function(t){c(t.type,Kb(t),t.target,s(t,e.lockRef.current))},[]),f=k.useCallback(function(t){c(t.type,Wb(t),t.target,s(t,e.lockRef.current))},[]);k.useEffect(function(){return Xb.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",l,Ub),document.addEventListener("touchmove",l,Ub),document.addEventListener("touchstart",u,Ub),function(){Xb=Xb.filter(function(e){return e!==a}),document.removeEventListener("wheel",l,Ub),document.removeEventListener("touchmove",l,Ub),document.removeEventListener("touchstart",u,Ub)}},[]);var h=e.removeScrollBar,p=e.inert;return k.createElement(k.Fragment,null,p?k.createElement(a,{styles:Yb(o)}):null,h?k.createElement(zb,{noRelative:e.noRelative,gapMode:e.gapMode}):null)},Cb.useMedium(Zb),Eb),tx=k.forwardRef(function(e,t){return k.createElement(Tb,mb({},e,{ref:t,sideCar:ex}))});tx.classNames=Tb.classNames;var nx=new WeakMap,rx=new WeakMap,ox={},ax=0,ix=function(e){return e&&(e.host||ix(e.parentNode))},sx=function(e,t,n,r){var o=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=ix(t);return n&&e.contains(n)?n:null}).filter(function(e){return Boolean(e)})}(t,Array.isArray(e)?e:[e]);ox[n]||(ox[n]=new WeakMap);var a=ox[n],i=[],s=new Set,l=new Set(o),c=function(e){e&&!s.has(e)&&(s.add(e),c(e.parentNode))};o.forEach(c);var u=function(e){e&&!l.has(e)&&Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),o=null!==t&&"false"!==t,l=(nx.get(e)||0)+1,c=(a.get(e)||0)+1;nx.set(e,l),a.set(e,c),i.push(e),1===l&&o&&rx.set(e,!0),1===c&&e.setAttribute(n,"true"),o||e.setAttribute(r,"true")}catch(d){}})};return u(t),s.clear(),ax++,function(){i.forEach(function(e){var t=nx.get(e)-1,o=a.get(e)-1;nx.set(e,t),a.set(e,o),t||(rx.has(e)||e.removeAttribute(r),rx.delete(e)),o||e.removeAttribute(n)}),--ax||(nx=new WeakMap,nx=new WeakMap,rx=new WeakMap,ox={})}},lx=function(e,t,n){void 0===n&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=t||function(e){return"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body}(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),sx(r,o,n,"aria-hidden")):function(){return null}},cx="Dialog",[ux,dx]=sv(cx),[fx,hx]=ux(cx),px=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:i=!0}=e,s=k.useRef(null),l=k.useRef(null),[c,u]=dv({prop:r,defaultProp:o??!1,onChange:a,caller:cx});return(0,fc.jsx)(fx,{scope:t,triggerRef:s,contentRef:l,contentId:Ov(),titleId:Ov(),descriptionId:Ov(),open:c,onOpenChange:u,onOpenToggle:k.useCallback(()=>u(e=>!e),[u]),modal:i,children:n})};px.displayName=cx;var mx="DialogTrigger";k.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=hx(mx,n),a=pv(t,o.triggerRef);return(0,fc.jsx)(Ev.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":Mx(o.open),...r,ref:a,onClick:iv(e.onClick,o.onOpenToggle)})}).displayName=mx;var gx="DialogPortal",[yx,vx]=ux(gx,{forceMount:void 0}),bx=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,a=hx(gx,t);return(0,fc.jsx)(yx,{scope:t,forceMount:n,children:k.Children.map(r,e=>(0,fc.jsx)(Nv,{present:n||a.open,children:(0,fc.jsx)(ub,{asChild:!0,container:o,children:e})}))})};bx.displayName=gx;var xx="DialogOverlay",wx=k.forwardRef((e,t)=>{const n=vx(xx,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=hx(xx,e.__scopeDialog);return a.modal?(0,fc.jsx)(Nv,{present:r||a.open,children:(0,fc.jsx)(kx,{...o,ref:t})}):null});wx.displayName=xx;var Sx=mv("DialogOverlay.RemoveScroll"),kx=k.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=hx(xx,n),a=pv(t,function(){const e=k.useContext(Qv),[t,n]=k.useState(null);return k.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}());return(0,fc.jsx)(tx,{as:Sx,allowPinchZoom:!0,shards:[o.contentRef],children:(0,fc.jsx)(Ev.div,{"data-state":Mx(o.open),...r,ref:a,style:{pointerEvents:"auto",...r.style}})})}),Ex="DialogContent",Cx=k.forwardRef((e,t)=>{const n=vx(Ex,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=hx(Ex,e.__scopeDialog);return(0,fc.jsx)(Nv,{present:r||a.open,children:a.modal?(0,fc.jsx)(Nx,{...o,ref:t}):(0,fc.jsx)(Tx,{...o,ref:t})})});Cx.displayName=Ex;var Nx=k.forwardRef((e,t)=>{const n=hx(Ex,e.__scopeDialog),r=k.useRef(null),o=pv(t,n.contentRef,r);return k.useEffect(()=>{const e=r.current;if(e)return lx(e)},[]),(0,fc.jsx)(jx,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:iv(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:iv(e.onPointerDownOutside,e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()}),onFocusOutside:iv(e.onFocusOutside,e=>e.preventDefault())})}),Tx=k.forwardRef((e,t)=>{const n=hx(Ex,e.__scopeDialog),r=k.useRef(!1),o=k.useRef(!1);return(0,fc.jsx)(jx,{...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,o.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,"pointerdown"===t.detail.originalEvent.type&&(o.current=!0));const a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&o.current&&t.preventDefault()}})}),jx=k.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,...i}=e,s=hx(Ex,n);return hb(),(0,fc.jsx)(fc.Fragment,{children:(0,fc.jsx)(rb,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:(0,fc.jsx)(Xv,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":Mx(s.open),...i,ref:t,deferPointerDownOutside:!0,onDismiss:()=>s.onOpenChange(!1)})})})}),Rx="DialogTitle",Px=k.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=hx(Rx,n);return(0,fc.jsx)(Ev.h2,{id:o.titleId,...r,ref:t})});Px.displayName=Rx;var Ox="DialogDescription",_x=k.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=hx(Ox,n);return(0,fc.jsx)(Ev.p,{id:o.descriptionId,...r,ref:t})});_x.displayName=Ox;var Ax="DialogClose",Dx=k.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=hx(Ax,n);return(0,fc.jsx)(Ev.button,{type:"button",...r,ref:t,onClick:iv(e.onClick,()=>o.onOpenChange(!1))})});function Mx(e){return e?"open":"closed"}function Lx(e){const t=e+"CollectionProvider",[n,r]=sv(t),[o,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=e=>{const{scope:t,children:n}=e,r=k.useRef(null),a=k.useRef(new Map).current;return(0,fc.jsx)(o,{scope:t,itemMap:a,collectionRef:r,children:n})};i.displayName=t;const s=e+"CollectionSlot",l=mv(s),c=k.forwardRef((e,t)=>{const{scope:n,children:r}=e;return(0,fc.jsx)(l,{ref:pv(t,a(s,n).collectionRef),children:r})});c.displayName=s;const u=e+"CollectionItemSlot",d="data-radix-collection-item",f=mv(u),h=k.forwardRef((e,t)=>{const{scope:n,children:r,...o}=e,i=k.useRef(null),s=pv(t,i),l=a(u,n);return k.useEffect(()=>(l.itemMap.set(i,{ref:i,...o}),()=>{l.itemMap.delete(i)})),(0,fc.jsx)(f,{[d]:"",ref:s,children:r})});return h.displayName=u,[{Provider:i,Slot:c,ItemSlot:h},function(t){const n=a(e+"CollectionConsumer",t);return k.useCallback(()=>{const e=n.collectionRef.current;if(!e)return[];const 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])},r]}Dx.displayName=Ax;var Ix=k.createContext(void 0);function zx(e){const t=k.useContext(Ix);return e||t||"ltr"}var Fx=["top","right","bottom","left"],Bx=Math.min,Ux=Math.max,Vx=Math.round,$x=Math.floor,Hx=e=>({x:e,y:e}),qx={left:"right",right:"left",bottom:"top",top:"bottom"};function Wx(e,t,n){return Ux(e,Bx(t,n))}function Kx(e,t){return"function"==typeof e?e(t):e}function Gx(e){return e.split("-")[0]}function Yx(e){return e.split("-")[1]}function Qx(e){return"x"===e?"y":"x"}function Xx(e){return"y"===e?"height":"width"}function Jx(e){const t=e[0];return"t"===t||"b"===t?"y":"x"}function Zx(e){return Qx(Jx(e))}function ew(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}var tw=["left","right"],nw=["right","left"],rw=["top","bottom"],ow=["bottom","top"];function aw(e,t,n,r){const o=Yx(e);let a=function(e,t,n){switch(e){case"top":case"bottom":return n?t?nw:tw:t?tw:nw;case"left":case"right":return t?rw:ow;default:return[]}}(Gx(e),"start"===n,r);return o&&(a=a.map(e=>e+"-"+o),t&&(a=a.concat(a.map(ew)))),a}function iw(e){const t=Gx(e);return qx[t]+e.slice(t.length)}function sw(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function lw(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function cw(e,t,n){let{reference:r,floating:o}=e;const a=Jx(t),i=Zx(t),s=Xx(i),l=Gx(t),c="y"===a,u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[s]/2-o[s]/2;let h;switch(l){case"top":h={x:u,y:r.y-o.height};break;case"bottom":h={x:u,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:d};break;case"left":h={x:r.x-o.width,y:d};break;default:h={x:r.x,y:r.y}}switch(Yx(t)){case"start":h[i]-=f*(n&&c?-1:1);break;case"end":h[i]+=f*(n&&c?-1:1)}return h}async function uw(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:a,rects:i,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:h=0}=Kx(t,e),p=sw(h),m=s[f?"floating"===d?"reference":"floating":d],g=lw(await a.getClippingRect({element:null==(n=await(null==a.isElement?void 0:a.isElement(m)))||n?m:m.contextElement||await(null==a.getDocumentElement?void 0:a.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),y="floating"===d?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,v=await(null==a.getOffsetParent?void 0:a.getOffsetParent(s.floating)),b=await(null==a.isElement?void 0:a.isElement(v))&&await(null==a.getScale?void 0:a.getScale(v))||{x:1,y:1},x=lw(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:y,offsetParent:v,strategy:l}):y);return{top:(g.top-x.top+p.top)/b.y,bottom:(x.bottom-g.bottom+p.bottom)/b.y,left:(g.left-x.left+p.left)/b.x,right:(x.right-g.right+p.right)/b.x}}function dw(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function fw(e){return Fx.some(t=>e[t]>=0)}var hw=new Set(["left","top"]);function pw(){return"undefined"!=typeof window}function mw(e){return vw(e)?(e.nodeName||"").toLowerCase():"#document"}function gw(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function yw(e){var t;return null==(t=(vw(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function vw(e){return!!pw()&&(e instanceof Node||e instanceof gw(e).Node)}function bw(e){return!!pw()&&(e instanceof Element||e instanceof gw(e).Element)}function xw(e){return!!pw()&&(e instanceof HTMLElement||e instanceof gw(e).HTMLElement)}function ww(e){return!(!pw()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof gw(e).ShadowRoot)}function Sw(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=_w(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&"inline"!==o&&"contents"!==o}function kw(e){return/^(table|td|th)$/.test(mw(e))}function Ew(e){try{if(e.matches(":popover-open"))return!0}catch(t){}try{return e.matches(":modal")}catch(t){return!1}}var Cw,Nw=/transform|translate|scale|rotate|perspective|filter/,Tw=/paint|layout|strict|content/,jw=e=>!!e&&"none"!==e;function Rw(e){const t=bw(e)?_w(e):e;return jw(t.transform)||jw(t.translate)||jw(t.scale)||jw(t.rotate)||jw(t.perspective)||!Pw()&&(jw(t.backdropFilter)||jw(t.filter))||Nw.test(t.willChange||"")||Tw.test(t.contain||"")}function Pw(){return null==Cw&&(Cw="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Cw}function Ow(e){return/^(html|body|#document)$/.test(mw(e))}function _w(e){return gw(e).getComputedStyle(e)}function Aw(e){return bw(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Dw(e){if("html"===mw(e))return e;const t=e.assignedSlot||e.parentNode||ww(e)&&e.host||yw(e);return ww(t)?t.host:t}function Mw(e){const t=Dw(e);return Ow(t)?e.ownerDocument?e.ownerDocument.body:e.body:xw(t)&&Sw(t)?t:Mw(t)}function Lw(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=Mw(e),a=o===(null==(r=e.ownerDocument)?void 0:r.body),i=gw(o);if(a){const e=Iw(i);return t.concat(i,i.visualViewport||[],Sw(o)?o:[],e&&n?Lw(e):[])}return t.concat(o,Lw(o,[],n))}function Iw(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function zw(e){const t=_w(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=xw(e),a=o?e.offsetWidth:n,i=o?e.offsetHeight:r,s=Vx(n)!==a||Vx(r)!==i;return s&&(n=a,r=i),{width:n,height:r,$:s}}function Fw(e){return bw(e)?e:e.contextElement}function Bw(e){const t=Fw(e);if(!xw(t))return Hx(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=zw(t);let i=(a?Vx(n.width):n.width)/r,s=(a?Vx(n.height):n.height)/o;return i&&Number.isFinite(i)||(i=1),s&&Number.isFinite(s)||(s=1),{x:i,y:s}}var Uw=Hx(0);function Vw(e){const t=gw(e);return Pw()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Uw}function $w(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),a=Fw(e);let i=Hx(1);t&&(r?bw(r)&&(i=Bw(r)):i=Bw(e));const s=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==gw(e))&&t}(a,n,r)?Vw(a):Hx(0);let l=(o.left+s.x)/i.x,c=(o.top+s.y)/i.y,u=o.width/i.x,d=o.height/i.y;if(a){const e=gw(a),t=r&&bw(r)?gw(r):r;let n=e,o=Iw(n);for(;o&&r&&t!==n;){const e=Bw(o),t=o.getBoundingClientRect(),r=_w(o),a=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,i=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,c*=e.y,u*=e.x,d*=e.y,l+=a,c+=i,n=gw(o),o=Iw(n)}}return lw({width:u,height:d,x:l,y:c})}function Hw(e,t){const n=Aw(e).scrollLeft;return t?t.left+n:$w(yw(e)).left+n}function qw(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Hw(e,n),y:n.top+t.scrollTop}}function Ww(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=gw(e),r=yw(e),o=n.visualViewport;let a=r.clientWidth,i=r.clientHeight,s=0,l=0;if(o){a=o.width,i=o.height;const e=Pw();(!e||e&&"fixed"===t)&&(s=o.offsetLeft,l=o.offsetTop)}const c=Hw(r);if(c<=0){const e=r.ownerDocument,t=e.body,n=getComputedStyle(t),o="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(r.clientWidth-t.clientWidth-o);i<=25&&(a-=i)}else c<=25&&(a+=c);return{width:a,height:i,x:s,y:l}}(e,n);else if("document"===t)r=function(e){const t=yw(e),n=Aw(e),r=e.ownerDocument.body,o=Ux(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Ux(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+Hw(e);const s=-n.scrollTop;return"rtl"===_w(r).direction&&(i+=Ux(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:i,y:s}}(yw(e));else if(bw(t))r=function(e,t){const n=$w(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=xw(e)?Bw(e):Hx(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:o*a.x,y:r*a.y}}(t,n);else{const n=Vw(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return lw(r)}function Kw(e,t){const n=Dw(e);return!(n===t||!bw(n)||Ow(n))&&("fixed"===_w(n).position||Kw(n,t))}function Gw(e,t){const n=t.get(e);if(n)return n;let r=Lw(e,[],!1).filter(e=>bw(e)&&"body"!==mw(e)),o=null;const a="fixed"===_w(e).position;let i=a?Dw(e):e;for(;bw(i)&&!Ow(i);){const t=_w(i),n=Rw(i);n||"fixed"!==t.position||(o=null),(a?!n&&!o:!n&&"static"===t.position&&o&&("absolute"===o.position||"fixed"===o.position)||Sw(i)&&!n&&Kw(e,i))?r=r.filter(e=>e!==i):o=t,i=Dw(i)}return t.set(e,r),r}function Yw(e,t,n){const r=xw(t),o=yw(t),a="fixed"===n,i=$w(e,!0,a,t);let s={scrollLeft:0,scrollTop:0};const l=Hx(0);function c(){l.x=Hw(o)}if(r||!r&&!a)if(("body"!==mw(t)||Sw(o))&&(s=Aw(t)),r){const e=$w(t,!0,a,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&c();a&&!r&&o&&c();const u=!o||r||a?Hx(0):qw(o,s);return{x:i.left+s.scrollLeft-l.x-u.x,y:i.top+s.scrollTop-l.y-u.y,width:i.width,height:i.height}}function Qw(e){return"static"===_w(e).position}function Xw(e,t){if(!xw(e)||"fixed"===_w(e).position)return null;if(t)return t(e);let n=e.offsetParent;return yw(e)===n&&(n=n.ownerDocument.body),n}function Jw(e,t){const n=gw(e);if(Ew(e))return n;if(!xw(e)){let t=Dw(e);for(;t&&!Ow(t);){if(bw(t)&&!Qw(t))return t;t=Dw(t)}return n}let r=Xw(e,t);for(;r&&kw(r)&&Qw(r);)r=Xw(r,t);return r&&Ow(r)&&Qw(r)&&!Rw(r)?n:r||function(e){let t=Dw(e);for(;xw(t)&&!Ow(t);){if(Rw(t))return t;if(Ew(t))return null;t=Dw(t)}return null}(e)||n}var Zw={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a="fixed"===o,i=yw(r),s=!!t&&Ew(t.floating);if(r===i||s&&a)return n;let l={scrollLeft:0,scrollTop:0},c=Hx(1);const u=Hx(0),d=xw(r);if((d||!d&&!a)&&(("body"!==mw(r)||Sw(i))&&(l=Aw(r)),d)){const e=$w(r);c=Bw(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}const f=!i||d||a?Hx(0):qw(i,l);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+f.x,y:n.y*c.y-l.scrollTop*c.y+u.y+f.y}},getDocumentElement:yw,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[..."clippingAncestors"===n?Ew(t)?[]:Gw(t,this._c):[].concat(n),r],i=Ww(t,a[0],o);let s=i.top,l=i.right,c=i.bottom,u=i.left;for(let d=1;d<a.length;d++){const e=Ww(t,a[d],o);s=Ux(e.top,s),l=Bx(e.right,l),c=Bx(e.bottom,c),u=Ux(e.left,u)}return{width:l-u,height:c-s,x:u,y:s}},getOffsetParent:Jw,getElementRects:async function(e){const t=this.getOffsetParent||Jw,n=this.getDimensions,r=await n(e.floating);return{reference:Yw(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=zw(e);return{width:t,height:n}},getScale:Bw,isElement:bw,isRTL:function(e){return"rtl"===_w(e).direction}};function eS(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function tS(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:i="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,c=Fw(e),u=o||a?[...c?Lw(c):[],...t?Lw(t):[]]:[];u.forEach(e=>{o&&e.addEventListener("scroll",n,{passive:!0}),a&&e.addEventListener("resize",n)});const d=c&&s?function(e,t){let n,r=null;const o=yw(e);function a(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function i(s,l){void 0===s&&(s=!1),void 0===l&&(l=1),a();const c=e.getBoundingClientRect(),{left:u,top:d,width:f,height:h}=c;if(s||t(),!f||!h)return;const p={rootMargin:-$x(d)+"px "+-$x(o.clientWidth-(u+f))+"px "+-$x(o.clientHeight-(d+h))+"px "+-$x(u)+"px",threshold:Ux(0,Bx(1,l))||1};let m=!0;function g(t){const r=t[0].intersectionRatio;if(r!==l){if(!m)return i();r?i(!1,r):n=setTimeout(()=>{i(!1,1e-7)},1e3)}1!==r||eS(c,e.getBoundingClientRect())||i(),m=!1}try{r=new IntersectionObserver(g,{...p,root:o.ownerDocument})}catch(y){r=new IntersectionObserver(g,p)}r.observe(e)}(!0),a}(c,n):null;let f,h=-1,p=null;i&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===c&&p&&t&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var e;null==(e=p)||e.observe(t)})),n()}),c&&!l&&p.observe(c),t&&p.observe(t));let m=l?$w(e):null;return l&&function t(){const r=$w(e);m&&!eS(m,r)&&n();m=r,f=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach(e=>{o&&e.removeEventListener("scroll",n),a&&e.removeEventListener("resize",n)}),d?.(),null==(e=p)||e.disconnect(),p=null,l&&cancelAnimationFrame(f)}}var nS=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:a,placement:i,middlewareData:s}=t,l=await async function(e,t){const{placement:n,platform:r,elements:o}=e,a=await(null==r.isRTL?void 0:r.isRTL(o.floating)),i=Gx(n),s=Yx(n),l="y"===Jx(n),c=hw.has(i)?-1:1,u=a&&l?-1:1,d=Kx(t,e);let{mainAxis:f,crossAxis:h,alignmentAxis:p}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&"number"==typeof p&&(h="end"===s?-1*p:p),l?{x:h*u,y:f*c}:{x:f*c,y:h*u}}(t,e);return i===(null==(n=s.offset)?void 0:n.placement)&&null!=(r=s.arrow)&&r.alignmentOffset?{}:{x:o+l.x,y:a+l.y,data:{...l,placement:i}}}}},rS=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:a}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:l={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...c}=Kx(e,t),u={x:n,y:r},d=await a.detectOverflow(t,c),f=Jx(Gx(o)),h=Qx(f);let p=u[h],m=u[f];if(i){const e="y"===h?"bottom":"right";p=Wx(p+d["y"===h?"top":"left"],p,p-d[e])}if(s){const e="y"===f?"bottom":"right";m=Wx(m+d["y"===f?"top":"left"],m,m-d[e])}const g=l.fn({...t,[h]:p,[f]:m});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[h]:i,[f]:s}}}}}},oS=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:a,rects:i,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...g}=Kx(e,t);if(null!=(n=a.arrow)&&n.alignmentOffset)return{};const y=Gx(o),v=Jx(s),b=Gx(s)===s,x=await(null==l.isRTL?void 0:l.isRTL(c.floating)),w=f||(b||!m?[iw(s)]:function(e){const t=iw(e);return[ew(e),t,ew(t)]}(s)),S="none"!==p;!f&&S&&w.push(...aw(s,m,p,x));const k=[s,...w],E=await l.detectOverflow(t,g),C=[];let N=(null==(r=a.flip)?void 0:r.overflows)||[];if(u&&C.push(E[y]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=Yx(e),o=Zx(e),a=Xx(o);let i="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=iw(i)),[i,iw(i)]}(o,i,x);C.push(E[e[0]],E[e[1]])}if(N=[...N,{placement:o,overflows:C}],!C.every(e=>e<=0)){var T,j;const e=((null==(T=a.flip)?void 0:T.index)||0)+1,t=k[e];if(t&&("alignment"!==d||v===Jx(t)||N.every(e=>Jx(e.placement)!==v||e.overflows[0]>0)))return{data:{index:e,overflows:N},reset:{placement:t}};let n=null==(j=N.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:j.placement;if(!n)switch(h){case"bestFit":{var R;const e=null==(R=N.filter(e=>{if(S){const t=Jx(e.placement);return t===v||"y"===t}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])?void 0:R[0];e&&(n=e);break}case"initialPlacement":n=s}if(o!==n)return{reset:{placement:n}}}return{}}}},aS=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:a,platform:i,elements:s}=t,{apply:l=()=>{},...c}=Kx(e,t),u=await i.detectOverflow(t,c),d=Gx(o),f=Yx(o),h="y"===Jx(o),{width:p,height:m}=a.floating;let g,y;"top"===d||"bottom"===d?(g=d,y=f===(await(null==i.isRTL?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(y=d,g="end"===f?"top":"bottom");const v=m-u.top-u.bottom,b=p-u.left-u.right,x=Bx(m-u[g],v),w=Bx(p-u[y],b),S=!t.middlewareData.shift;let k=x,E=w;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(E=b),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(k=v),S&&!f){const e=Ux(u.left,0),t=Ux(u.right,0),n=Ux(u.top,0),r=Ux(u.bottom,0);h?E=p-2*(0!==e||0!==t?e+t:Ux(u.left,u.right)):k=m-2*(0!==n||0!==r?n+r:Ux(u.top,u.bottom))}await l({...t,availableWidth:E,availableHeight:k});const C=await i.getDimensions(s.floating);return p!==C.width||m!==C.height?{reset:{rects:!0}}:{}}}},iS=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...a}=Kx(e,t);switch(o){case"referenceHidden":{const e=dw(await r.detectOverflow(t,{...a,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:fw(e)}}}case"escaped":{const e=dw(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:fw(e)}}}default:return{}}}}},sS=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:a,platform:i,elements:s,middlewareData:l}=t,{element:c,padding:u=0}=Kx(e,t)||{};if(null==c)return{};const d=sw(u),f={x:n,y:r},h=Zx(o),p=Xx(h),m=await i.getDimensions(c),g="y"===h,y=g?"top":"left",v=g?"bottom":"right",b=g?"clientHeight":"clientWidth",x=a.reference[p]+a.reference[h]-f[h]-a.floating[p],w=f[h]-a.reference[h],S=await(null==i.getOffsetParent?void 0:i.getOffsetParent(c));let k=S?S[b]:0;k&&await(null==i.isElement?void 0:i.isElement(S))||(k=s.floating[b]||a.floating[p]);const E=x/2-w/2,C=k/2-m[p]/2-1,N=Bx(d[y],C),T=Bx(d[v],C),j=N,R=k-m[p]-T,P=k/2-m[p]/2+E,O=Wx(j,P,R),_=!l.arrow&&null!=Yx(o)&&P!==O&&a.reference[p]/2-(P<j?N:T)-m[p]/2<0,A=_?P<j?P-j:P-R:0;return{[h]:f[h]+A,data:{[h]:O,centerOffset:P-O-A,..._&&{alignmentOffset:A}},reset:_}}}),lS=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:a,middlewareData:i}=t,{offset:s=0,mainAxis:l=!0,crossAxis:c=!0}=Kx(e,t),u={x:n,y:r},d=Jx(o),f=Qx(d);let h=u[f],p=u[d];const m=Kx(s,t),g="number"==typeof m?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const e="y"===f?"height":"width",t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;h<t?h=t:h>n&&(h=n)}if(c){var y,v;const e="y"===f?"width":"height",t=hw.has(Gx(o)),n=a.reference[d]-a.floating[e]+(t&&(null==(y=i.offset)?void 0:y[d])||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:(null==(v=i.offset)?void 0:v[d])||0)-(t?g.crossAxis:0);p<n?p=n:p>r&&(p=r)}return{[f]:h,[d]:p}}}},cS=(e,t,n)=>{const r=new Map,o={platform:Zw,...n},a={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:i}=n,s=i.detectOverflow?i:{...i,detectOverflow:uw},l=await(null==i.isRTL?void 0:i.isRTL(t));let c=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=cw(c,r,l),f=r,h=0;const p={};for(let m=0;m<a.length;m++){const n=a[m];if(!n)continue;const{name:g,fn:y}=n,{x:v,y:b,data:x,reset:w}=await y({x:u,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:p,rects:c,platform:s,elements:{reference:e,floating:t}});u=null!=v?v:u,d=null!=b?b:d,p[g]={...p[g],...x},w&&h<50&&(h++,"object"==typeof w&&(w.placement&&(f=w.placement),w.rects&&(c=!0===w.rects?await i.getElementRects({reference:e,floating:t,strategy:o}):w.rects),({x:u,y:d}=cw(c,f,l))),m=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:p}})(e,t,{...o,platform:a})},uS="undefined"!=typeof document?k.useLayoutEffect:function(){};function dS(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!==r--;)if(!dS(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!==r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!==r--;){const n=o[r];if(("_owner"!==n||!e.$$typeof)&&!dS(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function fS(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function hS(e,t){const n=fS(e);return Math.round(t*n)/n}function pS(e){const t=k.useRef(e);return uS(()=>{t.current=e}),t}var mS=(e,t)=>{const n=nS(e);return{name:n.name,fn:n.fn,options:[e,t]}},gS=(e,t)=>{const n=rS(e);return{name:n.name,fn:n.fn,options:[e,t]}},yS=(e,t)=>({fn:lS(e).fn,options:[e,t]}),vS=(e,t)=>{const n=oS(e);return{name:n.name,fn:n.fn,options:[e,t]}},bS=(e,t)=>{const n=aS(e);return{name:n.name,fn:n.fn,options:[e,t]}},xS=(e,t)=>{const n=iS(e);return{name:n.name,fn:n.fn,options:[e,t]}},wS=(e,t)=>{const n=(e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&(o=n,{}.hasOwnProperty.call(o,"current"))?null!=n.current?sS({element:n.current,padding:r}).fn(t):{}:n?sS({element:n,padding:r}).fn(t):{};var o}}))(e);return{name:n.name,fn:n.fn,options:[e,t]}},SS=k.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...a}=e;return(0,fc.jsx)(Ev.svg,{...a,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:(0,fc.jsx)("polygon",{points:"0,0 30,0 15,10"})})});SS.displayName="Arrow";var kS=SS;function ES(e){const[t,n]=k.useState(void 0);return cv(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver(t=>{if(!Array.isArray(t))return;if(!t.length)return;const r=t[0];let o,a;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,a=t.blockSize}else o=e.offsetWidth,a=e.offsetHeight;n({width:o,height:a})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)},[e]),t}var CS="Popper",[NS,TS]=sv(CS),[jS,RS]=NS(CS),PS=e=>{const{__scopePopper:t,children:n}=e,[r,o]=k.useState(null),[a,i]=k.useState(void 0);return(0,fc.jsx)(jS,{scope:t,anchor:r,onAnchorChange:o,placementState:a,setPlacementState:i,children:n})};PS.displayName=CS;var OS="PopperAnchor",_S=k.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,a=RS(OS,n),i=k.useRef(null),s=a.onAnchorChange,l=pv(t,k.useCallback(e=>{i.current=e,e&&s(e)},[s])),c=k.useRef(null);k.useEffect(()=>{if(!r)return;const e=c.current;c.current=r.current,e!==c.current&&s(c.current)});const u=a.placementState&&VS(a.placementState),d=u?.[0],f=u?.[1];return r?null:(0,fc.jsx)(Ev.div,{"data-radix-popper-side":d,"data-radix-popper-align":f,...o,ref:l})});_S.displayName=OS;var AS="PopperContent",[DS,MS]=NS(AS),LS=k.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:a="center",alignOffset:i=0,arrowPadding:s=0,avoidCollisions:l=!0,collisionBoundary:c=[],collisionPadding:u=0,sticky:d="partial",hideWhenDetached:f=!1,updatePositionStrategy:h="optimized",onPlaced:p,...m}=e,g=RS(AS,n),[y,v]=k.useState(null),b=pv(t,e=>v(e)),[w,S]=k.useState(null),E=ES(w),C=E?.width??0,N=E?.height??0,T=r+("center"!==a?"-"+a:""),j="number"==typeof u?u:{top:0,right:0,bottom:0,left:0,...u},R=Array.isArray(c)?c:[c],P=R.length>0,O={padding:j,boundary:R.filter(BS),altBoundary:P},{refs:_,floatingStyles:A,placement:D,isPositioned:M,middlewareData:L}=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:a,floating:i}={},transform:s=!0,whileElementsMounted:l,open:c}=e,[u,d]=k.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,h]=k.useState(r);dS(f,r)||h(r);const[p,m]=k.useState(null),[g,y]=k.useState(null),v=k.useCallback(e=>{e!==E.current&&(E.current=e,m(e))},[]),b=k.useCallback(e=>{e!==C.current&&(C.current=e,y(e))},[]),w=a||p,S=i||g,E=k.useRef(null),C=k.useRef(null),N=k.useRef(u),T=null!=l,j=pS(l),R=pS(o),P=pS(c),O=k.useCallback(()=>{if(!E.current||!C.current)return;const e={placement:t,strategy:n,middleware:f};R.current&&(e.platform=R.current),cS(E.current,C.current,e).then(e=>{const t={...e,isPositioned:!1!==P.current};_.current&&!dS(N.current,t)&&(N.current=t,x.flushSync(()=>{d(t)}))})},[f,t,n,R,P]);uS(()=>{!1===c&&N.current.isPositioned&&(N.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[c]);const _=k.useRef(!1);uS(()=>(_.current=!0,()=>{_.current=!1}),[]),uS(()=>{if(w&&(E.current=w),S&&(C.current=S),w&&S){if(j.current)return j.current(w,S,O);O()}},[w,S,O,j,T]);const A=k.useMemo(()=>({reference:E,floating:C,setReference:v,setFloating:b}),[v,b]),D=k.useMemo(()=>({reference:w,floating:S}),[w,S]),M=k.useMemo(()=>{const e={position:n,left:0,top:0};if(!D.floating)return e;const t=hS(D.floating,u.x),r=hS(D.floating,u.y);return s?{...e,transform:"translate("+t+"px, "+r+"px)",...fS(D.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}},[n,s,D.floating,u.x,u.y]);return k.useMemo(()=>({...u,update:O,refs:A,elements:D,floatingStyles:M}),[u,O,A,D,M])}({strategy:"fixed",placement:T,whileElementsMounted:(...e)=>tS(...e,{animationFrame:"always"===h}),elements:{reference:g.anchor},middleware:[mS({mainAxis:o+N,alignmentAxis:i}),l&&gS({mainAxis:!0,crossAxis:!1,limiter:"partial"===d?yS():void 0,...O}),l&&vS({...O}),bS({...O,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{const{width:o,height:a}=t.reference,i=e.floating.style;i.setProperty("--radix-popper-available-width",`${n}px`),i.setProperty("--radix-popper-available-height",`${r}px`),i.setProperty("--radix-popper-anchor-width",`${o}px`),i.setProperty("--radix-popper-anchor-height",`${a}px`)}}),w&&wS({element:w,padding:s}),US({arrowWidth:C,arrowHeight:N}),f&&xS({strategy:"referenceHidden",...O,boundary:P?O.boundary:void 0})]}),I=g.setPlacementState;cv(()=>(I(D),()=>{I(void 0)}),[D,I]);const[z,F]=VS(D),B=qv(p);cv(()=>{M&&B?.()},[M,B]);const U=L.arrow?.x,V=L.arrow?.y,$=0!==L.arrow?.centerOffset,[H,q]=k.useState();return cv(()=>{y&&q(window.getComputedStyle(y).zIndex)},[y]),(0,fc.jsx)("div",{ref:_.setFloating,"data-radix-popper-content-wrapper":"",style:{...A,transform:M?A.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:H,"--radix-popper-transform-origin":[L.transformOrigin?.x,L.transformOrigin?.y].join(" "),...L.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:(0,fc.jsx)(DS,{scope:n,placedSide:z,placedAlign:F,onArrowChange:S,arrowX:U,arrowY:V,shouldHideArrow:$,children:(0,fc.jsx)(Ev.div,{"data-side":z,"data-align":F,...m,ref:b,style:{...m.style,animation:M?void 0:"none"}})})})});LS.displayName=AS;var IS="PopperArrow",zS={top:"bottom",right:"left",bottom:"top",left:"right"},FS=k.forwardRef(function(e,t){const{__scopePopper:n,...r}=e,o=MS(IS,n),a=zS[o.placedSide];return(0,fc.jsx)("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:(0,fc.jsx)(kS,{...r,ref:t,style:{...r.style,display:"block"}})})});function BS(e){return null!==e}FS.displayName=IS;var US=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,a=0!==o.arrow?.centerOffset,i=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[l,c]=VS(n),u={start:"0%",center:"50%",end:"100%"}[c],d=(o.arrow?.x??0)+i/2,f=(o.arrow?.y??0)+s/2;let h="",p="";return"bottom"===l?(h=a?u:`${d}px`,p=-s+"px"):"top"===l?(h=a?u:`${d}px`,p=`${r.floating.height+s}px`):"right"===l?(h=-s+"px",p=a?u:`${f}px`):"left"===l&&(h=`${r.floating.width+s}px`,p=a?u:`${f}px`),{data:{x:h,y:p}}}});function VS(e){const[t,n="center"]=e.split("-");return[t,n]}var $S=PS,HS=_S,qS=LS,WS=FS,KS="rovingFocusGroup.onEntryFocus",GS={bubbles:!1,cancelable:!0},YS="RovingFocusGroup",[QS,XS,JS]=Lx(YS),[ZS,ek]=sv(YS,[JS]),[tk,nk]=ZS(YS),rk=k.forwardRef((e,t)=>(0,fc.jsx)(QS.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,fc.jsx)(QS.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,fc.jsx)(ok,{...e,ref:t})})}));rk.displayName=YS;var ok=k.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:a,currentTabStopId:i,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:c,preventScrollOnEntryFocus:u=!1,...d}=e,f=k.useRef(null),h=pv(t,f),p=zx(a),[m,g]=dv({prop:i,defaultProp:s??null,onChange:l,caller:YS}),[y,v]=k.useState(!1),b=qv(c),x=XS(n),w=k.useRef(!1),[S,E]=k.useState(0);return k.useEffect(()=>{const e=f.current;if(e)return e.addEventListener(KS,b),()=>e.removeEventListener(KS,b)},[b]),(0,fc.jsx)(tk,{scope:n,orientation:r,dir:p,loop:o,currentTabStopId:m,onItemFocus:k.useCallback(e=>g(e),[g]),onItemShiftTab:k.useCallback(()=>v(!0),[]),onFocusableItemAdd:k.useCallback(()=>E(e=>e+1),[]),onFocusableItemRemove:k.useCallback(()=>E(e=>e-1),[]),children:(0,fc.jsx)(Ev.div,{tabIndex:y||0===S?-1:0,"data-orientation":r,...d,ref:h,style:{outline:"none",...e.style},onMouseDown:iv(e.onMouseDown,()=>{w.current=!0}),onFocus:iv(e.onFocus,e=>{const t=!w.current;if(e.target===e.currentTarget&&t&&!y){const t=new CustomEvent(KS,GS);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=x().filter(e=>e.focusable);lk([e.find(e=>e.active),e.find(e=>e.id===m),...e].filter(Boolean).map(e=>e.ref.current),u)}}w.current=!1}),onBlur:iv(e.onBlur,()=>v(!1))})})}),ak="RovingFocusGroupItem",ik=k.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:a,children:i,...s}=e,l=Ov(),c=a||l,u=nk(ak,n),d=u.currentTabStopId===c,f=XS(n),{onFocusableItemAdd:h,onFocusableItemRemove:p,currentTabStopId:m}=u;return k.useEffect(()=>{if(r)return h(),()=>p()},[r,h,p]),(0,fc.jsx)(QS.ItemSlot,{scope:n,id:c,focusable:r,active:o,children:(0,fc.jsx)(Ev.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...s,ref:t,onMouseDown:iv(e.onMouseDown,e=>{r?u.onItemFocus(c):e.preventDefault()}),onFocus:iv(e.onFocus,()=>u.onItemFocus(c)),onKeyDown:iv(e.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void u.onItemShiftTab();if(e.target!==e.currentTarget)return;const t=function(e,t,n){const r=function(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}(e.key,n);return"vertical"===t&&["ArrowLeft","ArrowRight"].includes(r)||"horizontal"===t&&["ArrowUp","ArrowDown"].includes(r)?void 0:sk[r]}(e,u.orientation,u.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let o=f().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)o.reverse();else if("prev"===t||"next"===t){"prev"===t&&o.reverse();const a=o.indexOf(e.currentTarget);o=u.loop?(r=a+1,(n=o).map((e,t)=>n[(r+t)%n.length])):o.slice(a+1)}setTimeout(()=>lk(o))}var n,r}),children:"function"==typeof i?i({isCurrentTabStop:d,hasTabStop:null!=m}):i})})});ik.displayName=ak;var sk={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function lk(e,t=!1){const n=document.activeElement;for(const r of e){if(r===n)return;if(r.focus({preventScroll:t}),document.activeElement!==n)return}}var ck=rk,uk=ik,dk=["Enter"," "],fk=["ArrowUp","PageDown","End"],hk=["ArrowDown","PageUp","Home",...fk],pk={ltr:[...dk,"ArrowRight"],rtl:[...dk,"ArrowLeft"]},mk={ltr:["ArrowLeft"],rtl:["ArrowRight"]},gk="Menu",[yk,vk,bk]=Lx(gk),[xk,wk]=sv(gk,[bk,TS,ek]),Sk=TS(),kk=ek(),[Ek,Ck]=xk(gk),[Nk,Tk]=xk(gk),jk=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:a,modal:i=!0}=e,s=Sk(t),[l,c]=k.useState(null),u=k.useRef(!1),d=qv(a),f=zx(o);return k.useEffect(()=>{const e=()=>{u.current=!0,document.addEventListener("pointerdown",t,{capture:!0,once:!0}),document.addEventListener("pointermove",t,{capture:!0,once:!0})},t=()=>u.current=!1;return document.addEventListener("keydown",e,{capture:!0}),()=>{document.removeEventListener("keydown",e,{capture:!0}),document.removeEventListener("pointerdown",t,{capture:!0}),document.removeEventListener("pointermove",t,{capture:!0})}},[]),k.useEffect(()=>{if(!n)return;const e=()=>d(!1);return window.addEventListener("blur",e),()=>window.removeEventListener("blur",e)},[n,d]),(0,fc.jsx)($S,{...s,children:(0,fc.jsx)(Ek,{scope:t,open:n,onOpenChange:d,content:l,onContentChange:c,children:(0,fc.jsx)(Nk,{scope:t,onClose:k.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:u,dir:f,modal:i,children:r})})})};jk.displayName=gk;var Rk=k.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Sk(n);return(0,fc.jsx)(HS,{...o,...r,ref:t})});Rk.displayName="MenuAnchor";var Pk="MenuPortal",[Ok,_k]=xk(Pk,{forceMount:void 0}),Ak=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,a=Ck(Pk,t);return(0,fc.jsx)(Ok,{scope:t,forceMount:n,children:(0,fc.jsx)(Nv,{present:n||a.open,children:(0,fc.jsx)(ub,{asChild:!0,container:o,children:r})})})};Ak.displayName=Pk;var Dk="MenuContent",[Mk,Lk]=xk(Dk),Ik=k.forwardRef((e,t)=>{const n=_k(Dk,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=Ck(Dk,e.__scopeMenu),i=Tk(Dk,e.__scopeMenu);return(0,fc.jsx)(yk.Provider,{scope:e.__scopeMenu,children:(0,fc.jsx)(Nv,{present:r||a.open,children:(0,fc.jsx)(yk.Slot,{scope:e.__scopeMenu,children:i.modal?(0,fc.jsx)(zk,{...o,ref:t}):(0,fc.jsx)(Fk,{...o,ref:t})})})})}),zk=k.forwardRef((e,t)=>{const n=Ck(Dk,e.__scopeMenu),r=k.useRef(null),o=pv(t,r);return k.useEffect(()=>{const e=r.current;if(e)return lx(e)},[]),(0,fc.jsx)(Uk,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:iv(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Fk=k.forwardRef((e,t)=>{const n=Ck(Dk,e.__scopeMenu);return(0,fc.jsx)(Uk,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Bk=mv("MenuContent.ScrollLock"),Uk=k.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:i,disableOutsidePointerEvents:s,onEntryFocus:l,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:h,disableOutsideScroll:p,...m}=e,g=Ck(Dk,n),y=Tk(Dk,n),v=Sk(n),b=kk(n),x=vk(n),[w,S]=k.useState(null),E=k.useRef(null),C=pv(t,E,g.onContentChange),N=k.useRef(0),T=k.useRef(""),j=k.useRef(0),R=k.useRef(null),P=k.useRef("right"),O=k.useRef(0),_=p?tx:k.Fragment,A=p?{as:Bk,allowPinchZoom:!0}:void 0,D=e=>{const t=T.current+e,n=x().filter(e=>!e.disabled),r=document.activeElement,o=n.find(e=>e.ref.current===r)?.textValue,a=function(e,t,n){const r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let a=(i=e,s=Math.max(o,0),i.map((e,t)=>i[(s+t)%i.length]));var i,s;1===r.length&&(a=a.filter(e=>e!==n));const l=a.find(e=>e.toLowerCase().startsWith(r.toLowerCase()));return l!==n?l:void 0}(n.map(e=>e.textValue),t,o),i=n.find(e=>e.textValue===a)?.ref.current;!function e(t){T.current=t,window.clearTimeout(N.current),""!==t&&(N.current=window.setTimeout(()=>e(""),1e3))}(t),i&&setTimeout(()=>i.focus())};k.useEffect(()=>()=>window.clearTimeout(N.current),[]),hb();const M=k.useCallback(e=>P.current===R.current?.side&&function(e,t){return!!t&&function(e,t){const{x:n,y:r}=e;let o=!1;for(let a=0,i=t.length-1;a<t.length;i=a++){const e=t[a],s=t[i],l=e.x,c=e.y,u=s.x,d=s.y;c>r!=d>r&&n<(u-l)*(r-c)/(d-c)+l&&(o=!o)}return o}({x:e.clientX,y:e.clientY},t)}(e,R.current?.area),[]);return(0,fc.jsx)(Mk,{scope:n,searchRef:T,onItemEnter:k.useCallback(e=>{M(e)&&e.preventDefault()},[M]),onItemLeave:k.useCallback(e=>{M(e)||(E.current?.focus(),S(null))},[M]),onTriggerLeave:k.useCallback(e=>{M(e)&&e.preventDefault()},[M]),pointerGraceTimerRef:j,onPointerGraceIntentChange:k.useCallback(e=>{R.current=e},[]),children:(0,fc.jsx)(_,{...A,children:(0,fc.jsx)(rb,{asChild:!0,trapped:o,onMountAutoFocus:iv(a,e=>{e.preventDefault(),E.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:(0,fc.jsx)(Xv,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:h,children:(0,fc.jsx)(ck,{asChild:!0,...b,dir:y.dir,orientation:"vertical",loop:r,currentTabStopId:w,onCurrentTabStopIdChange:S,onEntryFocus:iv(l,e=>{y.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,fc.jsx)(qS,{role:"menu","aria-orientation":"vertical","data-state":pE(g.open),"data-radix-menu-content":"",dir:y.dir,...v,...m,ref:C,style:{outline:"none",...m.style},onKeyDown:iv(m.onKeyDown,e=>{const t=e.target.closest("[data-radix-menu-content]")===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=1===e.key.length;t&&("Tab"===e.key&&e.preventDefault(),!n&&r&&D(e.key));const o=E.current;if(e.target!==o)return;if(!hk.includes(e.key))return;e.preventDefault();const a=x().filter(e=>!e.disabled).map(e=>e.ref.current);fk.includes(e.key)&&a.reverse(),function(e){const t=document.activeElement;for(const n of e){if(n===t)return;if(n.focus(),document.activeElement!==t)return}}(a)}),onBlur:iv(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(N.current),T.current="")}),onPointerMove:iv(e.onPointerMove,yE(e=>{const t=e.target,n=O.current!==e.clientX;e.currentTarget.contains(t)&&n&&(P.current=e.clientX>O.current?"right":"left",O.current=e.clientX)}))})})})})})})});Ik.displayName=Dk;var Vk=k.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return(0,fc.jsx)(Ev.div,{role:"group",...r,ref:t})});Vk.displayName="MenuGroup";var $k=k.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return(0,fc.jsx)(Ev.div,{...r,ref:t})});$k.displayName="MenuLabel";var Hk="MenuItem",qk="menu.itemSelect",Wk=k.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,a=k.useRef(null),i=Tk(Hk,e.__scopeMenu),s=Lk(Hk,e.__scopeMenu),l=pv(t,a),c=k.useRef(!1);return(0,fc.jsx)(Kk,{...o,ref:l,disabled:n,onClick:iv(e.onClick,()=>{const e=a.current;if(!n&&e){const t=new CustomEvent(qk,{bubbles:!0,cancelable:!0});e.addEventListener(qk,e=>r?.(e),{once:!0}),Cv(e,t),t.defaultPrevented?c.current=!1:i.onClose()}}),onPointerDown:t=>{e.onPointerDown?.(t),c.current=!0},onPointerUp:iv(e.onPointerUp,e=>{c.current||e.currentTarget?.click()}),onKeyDown:iv(e.onKeyDown,e=>{const t=""!==s.searchRef.current;n||t&&" "===e.key||dk.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});Wk.displayName=Hk;var Kk=k.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...a}=e,i=Lk(Hk,n),s=kk(n),l=k.useRef(null),c=pv(t,l),[u,d]=k.useState(!1),[f,h]=k.useState("");return k.useEffect(()=>{const e=l.current;e&&h((e.textContent??"").trim())},[a.children]),(0,fc.jsx)(yk.ItemSlot,{scope:n,disabled:r,textValue:o??f,children:(0,fc.jsx)(uk,{asChild:!0,...s,focusable:!r,children:(0,fc.jsx)(Ev.div,{role:"menuitem","data-highlighted":u?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...a,ref:c,onPointerMove:iv(e.onPointerMove,yE(e=>{r?i.onItemLeave(e):(i.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:iv(e.onPointerLeave,yE(e=>i.onItemLeave(e))),onFocus:iv(e.onFocus,()=>d(!0)),onBlur:iv(e.onBlur,()=>d(!1))})})})}),Gk=k.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return(0,fc.jsx)(nE,{scope:e.__scopeMenu,checked:n,children:(0,fc.jsx)(Wk,{role:"menuitemcheckbox","aria-checked":mE(n)?"mixed":n,...o,ref:t,"data-state":gE(n),onSelect:iv(o.onSelect,()=>r?.(!!mE(n)||!n),{checkForDefaultPrevented:!1})})})});Gk.displayName="MenuCheckboxItem";var Yk="MenuRadioGroup",[Qk,Xk]=xk(Yk,{value:void 0,onValueChange:()=>{}}),Jk=k.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,a=qv(r);return(0,fc.jsx)(Qk,{scope:e.__scopeMenu,value:n,onValueChange:a,children:(0,fc.jsx)(Vk,{...o,ref:t})})});Jk.displayName=Yk;var Zk="MenuRadioItem",eE=k.forwardRef((e,t)=>{const{value:n,...r}=e,o=Xk(Zk,e.__scopeMenu),a=n===o.value;return(0,fc.jsx)(nE,{scope:e.__scopeMenu,checked:a,children:(0,fc.jsx)(Wk,{role:"menuitemradio","aria-checked":a,...r,ref:t,"data-state":gE(a),onSelect:iv(r.onSelect,()=>o.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});eE.displayName=Zk;var tE="MenuItemIndicator",[nE,rE]=xk(tE,{checked:!1}),oE=k.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,a=rE(tE,n);return(0,fc.jsx)(Nv,{present:r||mE(a.checked)||!0===a.checked,children:(0,fc.jsx)(Ev.span,{...o,ref:t,"data-state":gE(a.checked)})})});oE.displayName=tE;var aE=k.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return(0,fc.jsx)(Ev.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});aE.displayName="MenuSeparator";var iE=k.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Sk(n);return(0,fc.jsx)(WS,{...o,...r,ref:t})});iE.displayName="MenuArrow";var sE="MenuSub",[lE,cE]=xk(sE),uE="MenuSubTrigger",dE=k.forwardRef((e,t)=>{const n=Ck(uE,e.__scopeMenu),r=Tk(uE,e.__scopeMenu),o=cE(uE,e.__scopeMenu),a=Lk(uE,e.__scopeMenu),i=k.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:l}=a,c={__scopeMenu:e.__scopeMenu},u=k.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return k.useEffect(()=>u,[u]),k.useEffect(()=>{const e=s.current;return()=>{window.clearTimeout(e),l(null)}},[s,l]),(0,fc.jsx)(Rk,{asChild:!0,...c,children:(0,fc.jsx)(Kk,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":n.open?o.contentId:void 0,"data-state":pE(n.open),...e,ref:hv(t,o.onTriggerChange),onClick:t=>{e.onClick?.(t),e.disabled||t.defaultPrevented||(t.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:iv(e.onPointerMove,yE(t=>{a.onItemEnter(t),t.defaultPrevented||e.disabled||n.open||i.current||(a.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{n.onOpenChange(!0),u()},100))})),onPointerLeave:iv(e.onPointerLeave,yE(e=>{u();const t=n.content?.getBoundingClientRect();if(t){const r=n.content?.dataset.side,o="right"===r,i=o?-5:5,l=t[o?"left":"right"],c=t[o?"right":"left"];a.onPointerGraceIntentChange({area:[{x:e.clientX+i,y:e.clientY},{x:l,y:t.top},{x:c,y:t.top},{x:c,y:t.bottom},{x:l,y:t.bottom}],side:r}),window.clearTimeout(s.current),s.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(e),e.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:iv(e.onKeyDown,t=>{const o=""!==a.searchRef.current;e.disabled||o&&" "===t.key||pk[r.dir].includes(t.key)&&(n.onOpenChange(!0),n.content?.focus(),t.preventDefault())})})})});dE.displayName=uE;var fE="MenuSubContent",hE=k.forwardRef((e,t)=>{const n=_k(Dk,e.__scopeMenu),{forceMount:r=n.forceMount,align:o="start",...a}=e,i=Ck(Dk,e.__scopeMenu),s=Tk(Dk,e.__scopeMenu),l=cE(fE,e.__scopeMenu),c=k.useRef(null),u=pv(t,c);return(0,fc.jsx)(yk.Provider,{scope:e.__scopeMenu,children:(0,fc.jsx)(Nv,{present:r||i.open,children:(0,fc.jsx)(yk.Slot,{scope:e.__scopeMenu,children:(0,fc.jsx)(Uk,{id:l.contentId,"aria-labelledby":l.triggerId,...a,ref:u,align:o,side:"rtl"===s.dir?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{s.isUsingKeyboardRef.current&&c.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:iv(e.onFocusOutside,e=>{e.target!==l.trigger&&i.onOpenChange(!1)}),onEscapeKeyDown:iv(e.onEscapeKeyDown,e=>{s.onClose(),e.preventDefault()}),onKeyDown:iv(e.onKeyDown,e=>{const t=e.currentTarget.contains(e.target),n=mk[s.dir].includes(e.key);t&&n&&(i.onOpenChange(!1),l.trigger?.focus(),e.preventDefault())})})})})})});function pE(e){return e?"open":"closed"}function mE(e){return"indeterminate"===e}function gE(e){return mE(e)?"indeterminate":e?"checked":"unchecked"}function yE(e){return t=>"mouse"===t.pointerType?e(t):void 0}hE.displayName=fE;var vE=jk,bE=Rk,xE=Ak,wE=Ik,SE=Vk,kE=$k,EE=Wk,CE=Gk,NE=Jk,TE=eE,jE=oE,RE=aE,PE=iE,OE=dE,_E=hE,AE="DropdownMenu",[DE,ME]=sv(AE,[wk]),LE=wk(),[IE,zE]=DE(AE),FE=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:a,onOpenChange:i,modal:s=!0}=e,l=LE(t),c=k.useRef(null),[u,d]=dv({prop:o,defaultProp:a??!1,onChange:i,caller:AE});return(0,fc.jsx)(IE,{scope:t,triggerId:Ov(),triggerRef:c,contentId:Ov(),open:u,onOpenChange:d,onOpenToggle:k.useCallback(()=>d(e=>!e),[d]),modal:s,children:(0,fc.jsx)(vE,{...l,open:u,onOpenChange:d,dir:r,modal:s,children:n})})};FE.displayName=AE;var BE="DropdownMenuTrigger",UE=k.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,a=zE(BE,n),i=LE(n);return(0,fc.jsx)(bE,{asChild:!0,...i,children:(0,fc.jsx)(Ev.button,{type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:hv(t,a.triggerRef),onPointerDown:iv(e.onPointerDown,e=>{r||0!==e.button||!1!==e.ctrlKey||(a.onOpenToggle(),a.open||e.preventDefault())}),onKeyDown:iv(e.onKeyDown,e=>{r||(["Enter"," "].includes(e.key)&&a.onOpenToggle(),"ArrowDown"===e.key&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(e.key)&&e.preventDefault())})})})});UE.displayName=BE;var VE=e=>{const{__scopeDropdownMenu:t,...n}=e,r=LE(t);return(0,fc.jsx)(xE,{...r,...n})};VE.displayName="DropdownMenuPortal";var $E="DropdownMenuContent",HE=k.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=zE($E,n),a=LE(n),i=k.useRef(!1);return(0,fc.jsx)(wE,{id:o.contentId,"aria-labelledby":o.triggerId,...a,...r,ref:t,onCloseAutoFocus:iv(e.onCloseAutoFocus,e=>{i.current||o.triggerRef.current?.focus(),i.current=!1,e.preventDefault()}),onInteractOutside:iv(e.onInteractOutside,e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;o.modal&&!r||(i.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});HE.displayName=$E;k.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=LE(n);return(0,fc.jsx)(SE,{...o,...r,ref:t})}).displayName="DropdownMenuGroup";k.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=LE(n);return(0,fc.jsx)(kE,{...o,...r,ref:t})}).displayName="DropdownMenuLabel";var qE=k.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=LE(n);return(0,fc.jsx)(EE,{...o,...r,ref:t})});qE.displayName="DropdownMenuItem";k.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=LE(n);return(0,fc.jsx)(CE,{...o,...r,ref:t})}).displayName="DropdownMenuCheckboxItem";k.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=LE(n);return(0,fc.jsx)(NE,{...o,...r,ref:t})}).displayName="DropdownMenuRadioGroup";k.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=LE(n);return(0,fc.jsx)(TE,{...o,...r,ref:t})}).displayName="DropdownMenuRadioItem";k.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=LE(n);return(0,fc.jsx)(jE,{...o,...r,ref:t})}).displayName="DropdownMenuItemIndicator";k.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=LE(n);return(0,fc.jsx)(RE,{...o,...r,ref:t})}).displayName="DropdownMenuSeparator";k.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=LE(n);return(0,fc.jsx)(PE,{...o,...r,ref:t})}).displayName="DropdownMenuArrow";k.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=LE(n);return(0,fc.jsx)(OE,{...o,...r,ref:t})}).displayName="DropdownMenuSubTrigger";k.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=LE(n);return(0,fc.jsx)(_E,{...o,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})}).displayName="DropdownMenuSubContent";var WE=FE,KE=UE,GE=VE,YE=HE,QE=qE,XE=k.forwardRef((e,t)=>(0,fc.jsx)(Ev.label,{...e,ref:t,onMouseDown:t=>{t.target.closest("button, input, select, textarea")||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));XE.displayName="Label";var JE=XE;function ZE(e,[t,n]){return Math.min(n,Math.max(t,e))}var eC="ScrollArea",[tC,nC]=sv(eC),[rC,oC]=tC(eC),aC=k.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:o,scrollHideDelay:a=600,...i}=e,[s,l]=k.useState(null),[c,u]=k.useState(null),[d,f]=k.useState(null),[h,p]=k.useState(null),[m,g]=k.useState(null),[y,v]=k.useState(0),[b,x]=k.useState(0),[w,S]=k.useState(!1),[E,C]=k.useState(!1),N=pv(t,e=>l(e)),T=zx(o);return(0,fc.jsx)(rC,{scope:n,type:r,dir:T,scrollHideDelay:a,scrollArea:s,viewport:c,onViewportChange:u,content:d,onContentChange:f,scrollbarX:h,onScrollbarXChange:p,scrollbarXEnabled:w,onScrollbarXEnabledChange:S,scrollbarY:m,onScrollbarYChange:g,scrollbarYEnabled:E,onScrollbarYEnabledChange:C,onCornerWidthChange:v,onCornerHeightChange:x,children:(0,fc.jsx)(Ev.div,{dir:T,...i,ref:N,style:{position:"relative","--radix-scroll-area-corner-width":y+"px","--radix-scroll-area-corner-height":b+"px",...e.style}})})});aC.displayName=eC;var iC="ScrollAreaViewport",sC=k.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:o,...a}=e,i=oC(iC,n),s=pv(t,k.useRef(null),i.onViewportChange);return(0,fc.jsxs)(fc.Fragment,{children:[(0,fc.jsx)(lC,{nonce:o}),(0,fc.jsx)(Ev.div,{"data-radix-scroll-area-viewport":"",...a,ref:s,style:{overflowX:i.scrollbarXEnabled?"scroll":"hidden",overflowY:i.scrollbarYEnabled?"scroll":"hidden",...e.style},children:(0,fc.jsx)("div",{ref:i.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});sC.displayName=iC;var lC=k.memo(({nonce:e})=>(0,fc.jsx)("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:e}),(e,t)=>e.nonce===t.nonce),cC="ScrollAreaScrollbar",uC=k.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=oC(cC,e.__scopeScrollArea),{onScrollbarXEnabledChange:a,onScrollbarYEnabledChange:i}=o,s="horizontal"===e.orientation;return k.useEffect(()=>(s?a(!0):i(!0),()=>{s?a(!1):i(!1)}),[s,a,i]),"hover"===o.type?(0,fc.jsx)(dC,{...r,ref:t,forceMount:n}):"scroll"===o.type?(0,fc.jsx)(fC,{...r,ref:t,forceMount:n}):"auto"===o.type?(0,fc.jsx)(hC,{...r,ref:t,forceMount:n}):"always"===o.type?(0,fc.jsx)(pC,{...r,ref:t,"data-state":"visible"}):null});uC.displayName=cC;var dC=k.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=oC(cC,e.__scopeScrollArea),[a,i]=k.useState(!1);return k.useEffect(()=>{const e=o.scrollArea;let t=0;if(e){const n=()=>{window.clearTimeout(t),i(!0)},r=()=>{t=window.setTimeout(()=>i(!1),o.scrollHideDelay)};return e.addEventListener("pointerenter",n),e.addEventListener("pointerleave",r),()=>{window.clearTimeout(t),e.removeEventListener("pointerenter",n),e.removeEventListener("pointerleave",r)}}},[o.scrollArea,o.scrollHideDelay]),(0,fc.jsx)(Nv,{present:n||a,children:(0,fc.jsx)(hC,{"data-state":a?"visible":"hidden",...r,ref:t})})}),fC=k.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=oC(cC,e.__scopeScrollArea),a="horizontal"===e.orientation,i=AC(()=>l("SCROLL_END"),100),[s,l]=(c="hidden",u={hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}},k.useReducer((e,t)=>u[e][t]??e,c));var c,u;return k.useEffect(()=>{if("idle"===s){const e=window.setTimeout(()=>l("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(e)}},[s,o.scrollHideDelay,l]),k.useEffect(()=>{const e=o.viewport,t=a?"scrollLeft":"scrollTop";if(e){let n=e[t];const r=()=>{const r=e[t];n!==r&&(l("SCROLL"),i()),n=r};return e.addEventListener("scroll",r),()=>e.removeEventListener("scroll",r)}},[o.viewport,a,l,i]),(0,fc.jsx)(Nv,{present:n||"hidden"!==s,children:(0,fc.jsx)(pC,{"data-state":"hidden"===s?"hidden":"visible",...r,ref:t,onPointerEnter:iv(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:iv(e.onPointerLeave,()=>l("POINTER_LEAVE"))})})}),hC=k.forwardRef((e,t)=>{const n=oC(cC,e.__scopeScrollArea),{forceMount:r,...o}=e,[a,i]=k.useState(!1),s="horizontal"===e.orientation,l=AC(()=>{if(n.viewport){const e=n.viewport.offsetWidth<n.viewport.scrollWidth,t=n.viewport.offsetHeight<n.viewport.scrollHeight;i(s?e:t)}},10);return DC(n.viewport,l),DC(n.content,l),(0,fc.jsx)(Nv,{present:r||a,children:(0,fc.jsx)(pC,{"data-state":a?"visible":"hidden",...o,ref:t})})}),pC=k.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,o=oC(cC,e.__scopeScrollArea),a=k.useRef(null),i=k.useRef(0),[s,l]=k.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),c=TC(s.viewport,s.content),u={...r,sizes:s,onSizesChange:l,hasThumb:Boolean(c>0&&c<1),onThumbChange:e=>a.current=e,onThumbPointerUp:()=>i.current=0,onThumbPointerDown:e=>i.current=e};function d(e,t){return function(e,t,n,r="ltr"){const o=jC(n),a=o/2,i=t||a,s=o-i,l=n.scrollbar.paddingStart+i,c=n.scrollbar.size-n.scrollbar.paddingEnd-s,u=n.content-n.viewport,d="ltr"===r?[0,u]:[-1*u,0];return PC([l,c],d)(e)}(e,i.current,s,t)}return"horizontal"===n?(0,fc.jsx)(mC,{...u,ref:t,onThumbPositionChange:()=>{if(o.viewport&&a.current){const e=RC(o.viewport.scrollLeft,s,o.dir);a.current.style.transform=`translate3d(${e}px, 0, 0)`}},onWheelScroll:e=>{o.viewport&&(o.viewport.scrollLeft=e)},onDragScroll:e=>{o.viewport&&(o.viewport.scrollLeft=d(e,o.dir))}}):"vertical"===n?(0,fc.jsx)(gC,{...u,ref:t,onThumbPositionChange:()=>{if(o.viewport&&a.current){const e=RC(o.viewport.scrollTop,s);a.current.style.transform=`translate3d(0, ${e}px, 0)`}},onWheelScroll:e=>{o.viewport&&(o.viewport.scrollTop=e)},onDragScroll:e=>{o.viewport&&(o.viewport.scrollTop=d(e))}}):null}),mC=k.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,a=oC(cC,e.__scopeScrollArea),[i,s]=k.useState(),l=k.useRef(null),c=pv(t,l,a.onScrollbarXChange);return k.useEffect(()=>{l.current&&s(getComputedStyle(l.current))},[l]),(0,fc.jsx)(bC,{"data-orientation":"horizontal",...o,ref:c,sizes:n,style:{bottom:0,left:"rtl"===a.dir?"var(--radix-scroll-area-corner-width)":0,right:"ltr"===a.dir?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":jC(n)+"px",...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.x),onDragScroll:t=>e.onDragScroll(t.x),onWheelScroll:(t,n)=>{if(a.viewport){const r=a.viewport.scrollLeft+t.deltaX;e.onWheelScroll(r),OC(r,n)&&t.preventDefault()}},onResize:()=>{l.current&&a.viewport&&i&&r({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:NC(i.paddingLeft),paddingEnd:NC(i.paddingRight)}})}})}),gC=k.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,a=oC(cC,e.__scopeScrollArea),[i,s]=k.useState(),l=k.useRef(null),c=pv(t,l,a.onScrollbarYChange);return k.useEffect(()=>{l.current&&s(getComputedStyle(l.current))},[l]),(0,fc.jsx)(bC,{"data-orientation":"vertical",...o,ref:c,sizes:n,style:{top:0,right:"ltr"===a.dir?0:void 0,left:"rtl"===a.dir?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":jC(n)+"px",...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.y),onDragScroll:t=>e.onDragScroll(t.y),onWheelScroll:(t,n)=>{if(a.viewport){const r=a.viewport.scrollTop+t.deltaY;e.onWheelScroll(r),OC(r,n)&&t.preventDefault()}},onResize:()=>{l.current&&a.viewport&&i&&r({content:a.viewport.scrollHeight,viewport:a.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:NC(i.paddingTop),paddingEnd:NC(i.paddingBottom)}})}})}),[yC,vC]=tC(cC),bC=k.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:o,onThumbChange:a,onThumbPointerUp:i,onThumbPointerDown:s,onThumbPositionChange:l,onDragScroll:c,onWheelScroll:u,onResize:d,...f}=e,h=oC(cC,n),[p,m]=k.useState(null),g=pv(t,e=>m(e)),y=k.useRef(null),v=k.useRef(""),b=h.viewport,x=r.content-r.viewport,w=qv(u),S=qv(l),E=AC(d,10);function C(e){y.current&&c({x:e.clientX-y.current.left,y:e.clientY-y.current.top})}return k.useEffect(()=>{const e=e=>{const t=e.target;p?.contains(t)&&w(e,x)};return document.addEventListener("wheel",e,{passive:!1}),()=>document.removeEventListener("wheel",e,{passive:!1})},[b,p,x,w]),k.useEffect(S,[r,S]),DC(p,E),DC(h.content,E),(0,fc.jsx)(yC,{scope:n,scrollbar:p,hasThumb:o,onThumbChange:qv(a),onThumbPointerUp:qv(i),onThumbPositionChange:S,onThumbPointerDown:qv(s),children:(0,fc.jsx)(Ev.div,{...f,ref:g,style:{position:"absolute",...f.style},onPointerDown:iv(e.onPointerDown,e=>{0===e.button&&(e.target.setPointerCapture(e.pointerId),y.current=p.getBoundingClientRect(),v.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",h.viewport&&(h.viewport.style.scrollBehavior="auto"),C(e))}),onPointerMove:iv(e.onPointerMove,C),onPointerUp:iv(e.onPointerUp,e=>{const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),document.body.style.webkitUserSelect=v.current,h.viewport&&(h.viewport.style.scrollBehavior=""),y.current=null})})})}),xC="ScrollAreaThumb",wC=k.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=vC(xC,e.__scopeScrollArea);return(0,fc.jsx)(Nv,{present:n||o.hasThumb,children:(0,fc.jsx)(SC,{ref:t,...r})})}),SC=k.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...o}=e,a=oC(xC,n),i=vC(xC,n),{onThumbPositionChange:s}=i,l=pv(t,e=>i.onThumbChange(e)),c=k.useRef(void 0),u=AC(()=>{c.current&&(c.current(),c.current=void 0)},100);return k.useEffect(()=>{const e=a.viewport;if(e){const t=()=>{u(),c.current||(c.current=_C(e,s),s())};return s(),e.addEventListener("scroll",t),()=>e.removeEventListener("scroll",t)}},[a.viewport,u,s]),(0,fc.jsx)(Ev.div,{"data-state":i.hasThumb?"visible":"hidden",...o,ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:iv(e.onPointerDownCapture,e=>{const t=e.target.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top;i.onThumbPointerDown({x:n,y:r})}),onPointerUp:iv(e.onPointerUp,i.onThumbPointerUp)})});wC.displayName=xC;var kC="ScrollAreaCorner",EC=k.forwardRef((e,t)=>{const n=oC(kC,e.__scopeScrollArea),r=Boolean(n.scrollbarX&&n.scrollbarY);return"scroll"!==n.type&&r?(0,fc.jsx)(CC,{...e,ref:t}):null});EC.displayName=kC;var CC=k.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,o=oC(kC,n),[a,i]=k.useState(0),[s,l]=k.useState(0),c=Boolean(a&&s);return DC(o.scrollbarX,()=>{const e=o.scrollbarX?.offsetHeight||0;o.onCornerHeightChange(e),l(e)}),DC(o.scrollbarY,()=>{const e=o.scrollbarY?.offsetWidth||0;o.onCornerWidthChange(e),i(e)}),c?(0,fc.jsx)(Ev.div,{...r,ref:t,style:{width:a,height:s,position:"absolute",right:"ltr"===o.dir?0:void 0,left:"rtl"===o.dir?0:void 0,bottom:0,...e.style}}):null});function NC(e){return e?parseInt(e,10):0}function TC(e,t){const n=e/t;return isNaN(n)?0:n}function jC(e){const t=TC(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function RC(e,t,n="ltr"){const r=jC(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-o,i=t.content-t.viewport,s=a-r,l=ZE(e,"ltr"===n?[0,i]:[-1*i,0]);return PC([0,i],[0,s])(l)}function PC(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function OC(e,t){return e>0&&e<t}var _C=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function o(){const a={left:e.scrollLeft,top:e.scrollTop},i=n.left!==a.left,s=n.top!==a.top;(i||s)&&t(),n=a,r=window.requestAnimationFrame(o)}(),()=>window.cancelAnimationFrame(r)};function AC(e,t){const n=qv(e),r=k.useRef(0);return k.useEffect(()=>()=>window.clearTimeout(r.current),[]),k.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function DC(e,t){const n=qv(t);cv(()=>{let t=0;if(e){const r=new ResizeObserver(()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(n)});return r.observe(e),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}},[e,n])}var MC=aC,LC=sC,IC=EC;function zC(e){const t=k.useRef({value:e,previous:e});return k.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var FC=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),BC=k.forwardRef((e,t)=>(0,fc.jsx)(Ev.span,{...e,ref:t,style:{...FC,...e.style}}));BC.displayName="VisuallyHidden";var UC=BC,VC=[" ","Enter","ArrowUp","ArrowDown"],$C=[" ","Enter"],HC="Select",[qC,WC,KC]=Lx(HC),[GC,YC]=sv(HC,[KC,TS]),QC=TS(),[XC,JC]=GC(HC),[ZC,eN]=GC(HC);function tN(e){const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:a,value:i,defaultValue:s,onValueChange:l,dir:c,name:u,autoComplete:d,disabled:f,required:h,form:p,internal_do_not_use_render:m}=e,g=QC(t),[y,v]=k.useState(null),[b,x]=k.useState(null),[w,S]=k.useState(!1),E=zx(c),[C,N]=dv({prop:r,defaultProp:o??!1,onChange:a,caller:HC}),[T,j]=dv({prop:i,defaultProp:s,onChange:l,caller:HC}),R=k.useRef(null),P=!y||(!!p||!!y.closest("form")),[O,_]=k.useState(new Set),A=Ov(),D=Array.from(O).map(e=>e.props.value).join(";"),M=k.useCallback(e=>{_(t=>new Set(t).add(e))},[]),L=k.useCallback(e=>{_(t=>{const n=new Set(t);return n.delete(e),n})},[]),I={required:h,trigger:y,onTriggerChange:v,valueNode:b,onValueNodeChange:x,valueNodeHasChildren:w,onValueNodeHasChildrenChange:S,contentId:A,value:T,onValueChange:j,open:C,onOpenChange:N,dir:E,triggerPointerDownPosRef:R,disabled:f,name:u,autoComplete:d,form:p,nativeOptions:O,nativeSelectKey:D,isFormControl:P};return(0,fc.jsx)($S,{...g,children:(0,fc.jsx)(XC,{scope:t,...I,children:(0,fc.jsx)(qC.Provider,{scope:t,children:(0,fc.jsx)(ZC,{scope:t,onNativeOptionAdd:M,onNativeOptionRemove:L,children:WN(m)?m(I):n})})})})}tN.displayName="SelectProvider";var nN=e=>{const{__scopeSelect:t,children:n,...r}=e;return(0,fc.jsx)(tN,{__scopeSelect:t,...r,internal_do_not_use_render:({isFormControl:e})=>(0,fc.jsxs)(fc.Fragment,{children:[n,e?(0,fc.jsx)(qN,{__scopeSelect:t}):null]})})};nN.displayName=HC;var rN="SelectTrigger",oN=k.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,a=QC(n),i=JC(rN,n),s=i.disabled||r,l=pv(t,i.onTriggerChange),c=WC(n),u=k.useRef("touch"),[d,f,h]=GN(e=>{const t=c().filter(e=>!e.disabled),n=YN(t,e,t.find(e=>e.value===i.value));void 0!==n&&i.onValueChange(n.value)}),p=e=>{s||(i.onOpenChange(!0),h()),e&&(i.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return(0,fc.jsx)(HS,{asChild:!0,...a,children:(0,fc.jsx)(Ev.button,{type:"button",role:"combobox","aria-controls":i.open?i.contentId:void 0,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:s,"data-disabled":s?"":void 0,"data-placeholder":KN(i.value)?"":void 0,...o,ref:l,onClick:iv(o.onClick,e=>{e.currentTarget.focus(),"mouse"!==u.current&&p(e)}),onPointerDown:iv(o.onPointerDown,e=>{u.current=e.pointerType;const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&"mouse"===e.pointerType&&(p(e),e.preventDefault())}),onKeyDown:iv(o.onKeyDown,e=>{const t=""!==d.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||f(e.key),t&&" "===e.key||VC.includes(e.key)&&(p(),e.preventDefault())})})})});oN.displayName=rN;var aN="SelectValue",iN=k.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:a,placeholder:i="",...s}=e,l=JC(aN,n),{onValueNodeHasChildrenChange:c}=l,u=void 0!==a,d=pv(t,l.onValueNodeChange);cv(()=>{c(u)},[c,u]);const f=KN(l.value);return(0,fc.jsx)(Ev.span,{...s,asChild:!f&&s.asChild,ref:d,style:{pointerEvents:"none"},children:(0,fc.jsx)(k.Fragment,{children:f?i:a},f?"placeholder":"value")})});iN.displayName=aN;var sN=k.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return(0,fc.jsx)(Ev.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});sN.displayName="SelectIcon";var lN="SelectPortal",[cN,uN]=GC(lN,{forceMount:void 0}),dN=e=>{const{__scopeSelect:t,forceMount:n,...r}=e;return(0,fc.jsx)(cN,{scope:e.__scopeSelect,forceMount:n,children:(0,fc.jsx)(ub,{asChild:!0,...r})})};dN.displayName=lN;var fN="SelectContent",hN=k.forwardRef((e,t)=>{const n=uN(fN,e.__scopeSelect),{forceMount:r=n.forceMount,...o}=e,a=JC(fN,e.__scopeSelect),[i,s]=k.useState();return cv(()=>{s(new DocumentFragment)},[]),(0,fc.jsx)(Nv,{present:r||a.open,children:({present:e})=>e?(0,fc.jsx)(bN,{...o,ref:t}):(0,fc.jsx)(pN,{...o,fragment:i})})});hN.displayName=fN;var pN=k.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,fragment:o}=e;return o?x.createPortal((0,fc.jsx)(gN,{scope:n,children:(0,fc.jsx)(qC.Slot,{scope:n,children:(0,fc.jsx)("div",{ref:t,children:r})})}),o):null});pN.displayName="SelectContentFragment";var mN=10,[gN,yN]=GC(fN),vN=mv("SelectContent.RemoveScroll"),bN=k.forwardRef((e,t)=>{const{__scopeSelect:n}=e,{position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:a,onPointerDownOutside:i,side:s,sideOffset:l,align:c,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:h,sticky:p,hideWhenDetached:m,avoidCollisions:g,...y}=e,v=JC(fN,n),[b,x]=k.useState(null),[w,S]=k.useState(null),E=pv(t,e=>x(e)),[C,N]=k.useState(null),[T,j]=k.useState(null),R=WC(n),[P,O]=k.useState(!1),_=k.useRef(!1);k.useEffect(()=>{if(b)return lx(b)},[b]),hb();const A=k.useCallback(e=>{const[t,...n]=R().map(e=>e.ref.current),[r]=n.slice(-1),o=document.activeElement;for(const a of e){if(a===o)return;if(a?.scrollIntoView({block:"nearest"}),a===t&&w&&(w.scrollTop=0),a===r&&w&&(w.scrollTop=w.scrollHeight),a?.focus(),document.activeElement!==o)return}},[R,w]),D=k.useCallback(()=>A([C,b]),[A,C,b]);k.useEffect(()=>{P&&D()},[P,D]);const{onOpenChange:M,triggerPointerDownPosRef:L}=v;k.useEffect(()=>{if(b){let e={x:0,y:0};const t=t=>{e={x:Math.abs(Math.round(t.pageX)-(L.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(L.current?.y??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():n.composedPath().includes(b)||M(!1),document.removeEventListener("pointermove",t),L.current=null};return null!==L.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",n,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",n,{capture:!0})}}},[b,M,L]),k.useEffect(()=>{const e=()=>M(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}},[M]);const[I,z]=GN(e=>{const t=R().filter(e=>!e.disabled),n=YN(t,e,t.find(e=>e.ref.current===document.activeElement));n&&setTimeout(()=>n.ref.current?.focus())}),F=k.useCallback((e,t,n)=>{const r=!_.current&&!n;(void 0!==v.value&&v.value===t||r)&&(N(e),r&&(_.current=!0))},[v.value]),B=k.useCallback(()=>b?.focus(),[b]),U=k.useCallback((e,t,n)=>{const r=!_.current&&!n;(void 0!==v.value&&v.value===t||r)&&j(e)},[v.value]),V="popper"===r?wN:xN,$=V===wN?{side:s,sideOffset:l,align:c,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:h,sticky:p,hideWhenDetached:m,avoidCollisions:g}:{};return(0,fc.jsx)(gN,{scope:n,content:b,viewport:w,onViewportChange:S,itemRefCallback:F,selectedItem:C,onItemLeave:B,itemTextRefCallback:U,focusSelectedItem:D,selectedItemText:T,position:r,isPositioned:P,searchRef:I,children:(0,fc.jsx)(tx,{as:vN,allowPinchZoom:!0,children:(0,fc.jsx)(rb,{asChild:!0,trapped:v.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:iv(o,e=>{v.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,fc.jsx)(Xv,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>v.onOpenChange(!1),children:(0,fc.jsx)(V,{role:"listbox",id:v.contentId,"data-state":v.open?"open":"closed",dir:v.dir,onContextMenu:e=>e.preventDefault(),...y,...$,onPlaced:()=>O(!0),ref:E,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:iv(y.onKeyDown,e=>{const t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||z(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=R().filter(e=>!e.disabled).map(e=>e.ref.current);if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){const n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>A(t)),e.preventDefault()}})})})})})})});bN.displayName="SelectContentImpl";var xN=k.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,a=JC(fN,n),i=yN(fN,n),[s,l]=k.useState(null),[c,u]=k.useState(null),d=pv(t,e=>u(e)),f=WC(n),h=k.useRef(!1),p=k.useRef(!0),{viewport:m,selectedItem:g,selectedItemText:y,focusSelectedItem:v}=i,b=k.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&c&&m&&g&&y){const e=a.trigger.getBoundingClientRect(),t=c.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),o=y.getBoundingClientRect();if("rtl"!==a.dir){const r=o.left-t.left,a=n.left-r,i=e.left-a,l=e.width+i,c=Math.max(l,t.width),u=window.innerWidth-mN,d=ZE(a,[mN,Math.max(mN,u-c)]);s.style.minWidth=l+"px",s.style.left=d+"px"}else{const r=t.right-o.right,a=window.innerWidth-n.right-r,i=window.innerWidth-e.right-a,l=e.width+i,c=Math.max(l,t.width),u=window.innerWidth-mN,d=ZE(a,[mN,Math.max(mN,u-c)]);s.style.minWidth=l+"px",s.style.right=d+"px"}const i=f(),l=window.innerHeight-2*mN,u=m.scrollHeight,d=window.getComputedStyle(c),p=parseInt(d.borderTopWidth,10),v=parseInt(d.paddingTop,10),b=parseInt(d.borderBottomWidth,10),x=p+v+u+parseInt(d.paddingBottom,10)+b,w=Math.min(5*g.offsetHeight,x),S=window.getComputedStyle(m),k=parseInt(S.paddingTop,10),E=parseInt(S.paddingBottom,10),C=e.top+e.height/2-mN,N=l-C,T=g.offsetHeight/2,j=p+v+(g.offsetTop+T),R=x-j;if(j<=C){const e=i.length>0&&g===i[i.length-1].ref.current;s.style.bottom="0px";const t=c.clientHeight-m.offsetTop-m.offsetHeight,n=j+Math.max(N,T+(e?E:0)+t+b);s.style.height=n+"px"}else{const e=i.length>0&&g===i[0].ref.current;s.style.top="0px";const t=Math.max(C,p+m.offsetTop+(e?k:0)+T)+R;s.style.height=t+"px",m.scrollTop=j-C+m.offsetTop}s.style.margin=`${mN}px 0`,s.style.minHeight=w+"px",s.style.maxHeight=l+"px",r?.(),requestAnimationFrame(()=>h.current=!0)}},[f,a.trigger,a.valueNode,s,c,m,g,y,a.dir,r]);cv(()=>b(),[b]);const[x,w]=k.useState();return cv(()=>{c&&w(window.getComputedStyle(c).zIndex)},[c]),(0,fc.jsx)(SN,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:h,onScrollButtonChange:k.useCallback(e=>{e&&!0===p.current&&(b(),v?.(),p.current=!1)},[b,v]),children:(0,fc.jsx)("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:x},children:(0,fc.jsx)(Ev.div,{...o,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});xN.displayName="SelectItemAlignedPosition";var wN=k.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=mN,...a}=e,i=QC(n);return(0,fc.jsx)(qS,{...i,...a,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});wN.displayName="SelectPopperPosition";var[SN,kN]=GC(fN,{}),EN="SelectViewport",CN=k.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,a=yN(EN,n),i=kN(EN,n),s=pv(t,a.onViewportChange),l=k.useRef(0);return(0,fc.jsxs)(fc.Fragment,{children:[(0,fc.jsx)("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),(0,fc.jsx)(qC.Slot,{scope:n,children:(0,fc.jsx)(Ev.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:s,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:iv(o.onScroll,e=>{const t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=i;if(r?.current&&n){const e=Math.abs(l.current-t.scrollTop);if(e>0){const r=window.innerHeight-2*mN,o=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),i=Math.max(o,a);if(i<r){const o=i+e,a=Math.min(r,o),s=o-a;n.style.height=a+"px","0px"===n.style.bottom&&(t.scrollTop=s>0?s:0,n.style.justifyContent="flex-end")}}}l.current=t.scrollTop})})})]})});CN.displayName=EN;var NN="SelectGroup",[TN,jN]=GC(NN);k.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Ov();return(0,fc.jsx)(TN,{scope:n,id:o,children:(0,fc.jsx)(Ev.div,{role:"group","aria-labelledby":o,...r,ref:t})})}).displayName=NN;var RN="SelectLabel";k.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=jN(RN,n);return(0,fc.jsx)(Ev.div,{id:o.id,...r,ref:t})}).displayName=RN;var PN="SelectItem",[ON,_N]=GC(PN),AN=k.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:a,...i}=e,s=JC(PN,n),l=yN(PN,n),c=s.value===r,[u,d]=k.useState(a??""),[f,h]=k.useState(!1),p=pv(t,e=>l.itemRefCallback?.(e,r,o)),m=Ov(),g=k.useRef("touch"),y=()=>{o||(s.onValueChange(r),s.onOpenChange(!1))};return(0,fc.jsx)(ON,{scope:n,value:r,disabled:o,textId:m,isSelected:c,onItemTextChange:k.useCallback(e=>{d(t=>t||(e?.textContent??"").trim())},[]),children:(0,fc.jsx)(qC.ItemSlot,{scope:n,value:r,disabled:o,textValue:u,children:(0,fc.jsx)(Ev.div,{role:"option","aria-labelledby":m,"data-highlighted":f?"":void 0,"aria-selected":c&&f,"data-state":c?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...i,ref:p,onFocus:iv(i.onFocus,()=>h(!0)),onBlur:iv(i.onBlur,()=>h(!1)),onClick:iv(i.onClick,()=>{"mouse"!==g.current&&y()}),onPointerUp:iv(i.onPointerUp,()=>{"mouse"===g.current&&y()}),onPointerDown:iv(i.onPointerDown,e=>{g.current=e.pointerType}),onPointerMove:iv(i.onPointerMove,e=>{g.current=e.pointerType,o?l.onItemLeave?.():"mouse"===g.current&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:iv(i.onPointerLeave,e=>{e.currentTarget===document.activeElement&&l.onItemLeave?.()}),onKeyDown:iv(i.onKeyDown,e=>{""!==l.searchRef?.current&&" "===e.key||($C.includes(e.key)&&y()," "===e.key&&e.preventDefault())})})})})});AN.displayName=PN;var DN="SelectItemText",MN=k.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...a}=e,i=JC(DN,n),s=yN(DN,n),l=_N(DN,n),c=eN(DN,n),[u,d]=k.useState(null),f=pv(t,e=>d(e),l.onItemTextChange,e=>s.itemTextRefCallback?.(e,l.value,l.disabled)),h=u?.textContent,p=k.useMemo(()=>(0,fc.jsx)("option",{value:l.value,disabled:l.disabled,children:h},l.value),[l.disabled,l.value,h]),{onNativeOptionAdd:m,onNativeOptionRemove:g}=c;return cv(()=>(m(p),()=>g(p)),[m,g,p]),(0,fc.jsxs)(fc.Fragment,{children:[(0,fc.jsx)(Ev.span,{id:l.textId,...a,ref:f}),l.isSelected&&i.valueNode&&!i.valueNodeHasChildren&&!KN(i.value)?x.createPortal(a.children,i.valueNode):null]})});MN.displayName=DN;var LN="SelectItemIndicator",IN=k.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return _N(LN,n).isSelected?(0,fc.jsx)(Ev.span,{"aria-hidden":!0,...r,ref:t}):null});IN.displayName=LN;var zN="SelectScrollUpButton",FN=k.forwardRef((e,t)=>{const n=yN(zN,e.__scopeSelect),r=kN(zN,e.__scopeSelect),[o,a]=k.useState(!1),i=pv(t,r.onScrollButtonChange);return cv(()=>{if(n.viewport&&n.isPositioned){let e=function(){a(t.scrollTop>0)};const t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[n.viewport,n.isPositioned]),o?(0,fc.jsx)(VN,{...e,ref:i,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null});FN.displayName=zN;var BN="SelectScrollDownButton",UN=k.forwardRef((e,t)=>{const n=yN(BN,e.__scopeSelect),r=kN(BN,e.__scopeSelect),[o,a]=k.useState(!1),i=pv(t,r.onScrollButtonChange);return cv(()=>{if(n.viewport&&n.isPositioned){let e=function(){const e=t.scrollHeight-t.clientHeight;a(Math.ceil(t.scrollTop)<e)};const t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[n.viewport,n.isPositioned]),o?(0,fc.jsx)(VN,{...e,ref:i,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null});UN.displayName=BN;var VN=k.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,a=yN("SelectScrollButton",n),i=k.useRef(null),s=WC(n),l=k.useCallback(()=>{null!==i.current&&(window.clearInterval(i.current),i.current=null)},[]);return k.useEffect(()=>()=>l(),[l]),cv(()=>{s().find(e=>e.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[s]),(0,fc.jsx)(Ev.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:iv(o.onPointerDown,()=>{null===i.current&&(i.current=window.setInterval(r,50))}),onPointerMove:iv(o.onPointerMove,()=>{a.onItemLeave?.(),null===i.current&&(i.current=window.setInterval(r,50))}),onPointerLeave:iv(o.onPointerLeave,()=>{l()})})});k.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return(0,fc.jsx)(Ev.div,{"aria-hidden":!0,...r,ref:t})}).displayName="SelectSeparator";var $N="SelectArrow";k.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=QC(n);return"popper"===yN($N,n).position?(0,fc.jsx)(WS,{...o,...r,ref:t}):null}).displayName=$N;var HN="SelectBubbleInput",qN=k.forwardRef(({__scopeSelect:e,...t},n)=>{const r=JC(HN,e),{value:o,onValueChange:a,required:i,disabled:s,name:l,autoComplete:c,form:u}=r,{nativeOptions:d,nativeSelectKey:f}=r,h=k.useRef(null),p=pv(n,h),m=o??"",g=zC(m),y=Array.from(d).some(e=>""===(e.props.value??""));return k.useEffect(()=>{const e=h.current;if(!e)return;const t=window.HTMLSelectElement.prototype,n=Object.getOwnPropertyDescriptor(t,"value").set;if(g!==m&&n){const t=new Event("change",{bubbles:!0});n.call(e,m),e.dispatchEvent(t)}},[g,m]),(0,fc.jsxs)(Ev.select,{"aria-hidden":!0,required:i,tabIndex:-1,name:l,autoComplete:c,disabled:s,form:u,onChange:e=>a(e.target.value),...t,style:{...FC,...t.style},ref:p,defaultValue:m,children:[KN(o)&&!y?(0,fc.jsx)("option",{value:""}):null,Array.from(d)]},f)});function WN(e){return"function"==typeof e}function KN(e){return""===e||void 0===e}function GN(e){const t=qv(e),n=k.useRef(""),r=k.useRef(0),o=k.useCallback(e=>{const o=n.current+e;t(o),function e(t){n.current=t,window.clearTimeout(r.current),""!==t&&(r.current=window.setTimeout(()=>e(""),1e3))}(o)},[t]),a=k.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return k.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,a]}function YN(e,t,n){const r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let a=(i=e,s=Math.max(o,0),i.map((e,t)=>i[(s+t)%i.length]));var i,s;1===r.length&&(a=a.filter(e=>e!==n));const l=a.find(e=>e.textValue.toLowerCase().startsWith(r.toLowerCase()));return l!==n?l:void 0}qN.displayName=HN;var QN="horizontal",XN=["horizontal","vertical"],JN=k.forwardRef((e,t)=>{const{decorative:n,orientation:r=QN,...o}=e,a=function(e){return XN.includes(e)}(r)?r:QN,i=n?{role:"none"}:{"aria-orientation":"vertical"===a?a:void 0,role:"separator"};return(0,fc.jsx)(Ev.div,{"data-orientation":a,...i,...o,ref:t})});JN.displayName="Separator";var ZN=JN,eT="Switch",[tT,nT]=sv(eT),[rT,oT]=tT(eT);function aT(e){const{__scopeSwitch:t,checked:n,children:r,defaultChecked:o,disabled:a,form:i,name:s,onCheckedChange:l,required:c,value:u="on",internal_do_not_use_render:d}=e,[f,h]=dv({prop:n,defaultProp:o??!1,onChange:l,caller:eT}),[p,m]=k.useState(null),[g,y]=k.useState(null),v={checked:f,setChecked:h,disabled:a,control:p,setControl:m,name:s,form:i,value:u,hasConsumerStoppedPropagationRef:k.useRef(!1),required:c,defaultChecked:o,isFormControl:!p||(!!i||!!p.closest("form")),bubbleInput:g,setBubbleInput:y};return(0,fc.jsx)(rT,{scope:t,...v,children:hT(d)?d(v):r})}var iT="SwitchTrigger",sT=k.forwardRef(({__scopeSwitch:e,onClick:t,...n},r)=>{const{value:o,disabled:a,checked:i,required:s,setControl:l,setChecked:c,hasConsumerStoppedPropagationRef:u,isFormControl:d,bubbleInput:f}=oT(iT,e),h=pv(r,l);return(0,fc.jsx)(Ev.button,{type:"button",role:"switch","aria-checked":i,"aria-required":s,"data-state":pT(i),"data-disabled":a?"":void 0,disabled:a,value:o,...n,ref:h,onClick:iv(t,e=>{c(e=>!e),f&&d&&(u.current=e.isPropagationStopped(),u.current||e.stopPropagation())})})});sT.displayName=iT;var lT=k.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:a,required:i,disabled:s,value:l,onCheckedChange:c,form:u,...d}=e;return(0,fc.jsx)(aT,{__scopeSwitch:n,checked:o,defaultChecked:a,disabled:s,required:i,onCheckedChange:c,name:r,form:u,value:l,internal_do_not_use_render:({isFormControl:e})=>(0,fc.jsxs)(fc.Fragment,{children:[(0,fc.jsx)(sT,{...d,ref:t,__scopeSwitch:n}),e&&(0,fc.jsx)(fT,{__scopeSwitch:n})]})})});lT.displayName=eT;var cT="SwitchThumb",uT=k.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,o=oT(cT,n);return(0,fc.jsx)(Ev.span,{"data-state":pT(o.checked),"data-disabled":o.disabled?"":void 0,...r,ref:t})});uT.displayName=cT;var dT="SwitchBubbleInput",fT=k.forwardRef(({__scopeSwitch:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:o,checked:a,defaultChecked:i,required:s,disabled:l,name:c,value:u,form:d,bubbleInput:f,setBubbleInput:h}=oT(dT,e),p=pv(n,h),m=zC(a),g=ES(r);k.useEffect(()=>{const e=f;if(!e)return;const t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,"checked").set,r=!o.current;if(m!==a&&n){const t=new Event("click",{bubbles:r});n.call(e,a),e.dispatchEvent(t)}},[f,m,a,o]);const y=k.useRef(a);return(0,fc.jsx)(Ev.input,{type:"checkbox","aria-hidden":!0,defaultChecked:i??y.current,required:s,disabled:l,name:c,value:u,form:d,...t,tabIndex:-1,ref:p,style:{...t.style,...g,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});function hT(e){return"function"==typeof e}function pT(e){return e?"checked":"unchecked"}fT.displayName=dT;var mT="Tabs",[gT,yT]=sv(mT,[ek]),vT=ek(),[bT,xT]=gT(mT),wT=k.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:a,orientation:i="horizontal",dir:s,activationMode:l="automatic",...c}=e,u=zx(s),[d,f]=dv({prop:r,onChange:o,defaultProp:a??"",caller:mT});return(0,fc.jsx)(bT,{scope:n,baseId:Ov(),value:d,onValueChange:f,orientation:i,dir:u,activationMode:l,children:(0,fc.jsx)(Ev.div,{dir:u,"data-orientation":i,...c,ref:t})})});wT.displayName=mT;var ST="TabsList",kT=k.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,a=xT(ST,n),i=vT(n);return(0,fc.jsx)(ck,{asChild:!0,...i,orientation:a.orientation,dir:a.dir,loop:r,children:(0,fc.jsx)(Ev.div,{role:"tablist","aria-orientation":a.orientation,...o,ref:t})})});kT.displayName=ST;var ET="TabsTrigger",CT=k.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...a}=e,i=xT(ET,n),s=vT(n),l=jT(i.baseId,r),c=RT(i.baseId,r),u=r===i.value;return(0,fc.jsx)(uk,{asChild:!0,...s,focusable:!o,active:u,children:(0,fc.jsx)(Ev.button,{type:"button",role:"tab","aria-selected":u,"aria-controls":c,"data-state":u?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:l,...a,ref:t,onMouseDown:iv(e.onMouseDown,e=>{o||0!==e.button||!1!==e.ctrlKey?e.preventDefault():i.onValueChange(r)}),onKeyDown:iv(e.onKeyDown,e=>{[" ","Enter"].includes(e.key)&&i.onValueChange(r)}),onFocus:iv(e.onFocus,()=>{const e="manual"!==i.activationMode;u||o||!e||i.onValueChange(r)})})})});CT.displayName=ET;var NT="TabsContent",TT=k.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:a,...i}=e,s=xT(NT,n),l=jT(s.baseId,r),c=RT(s.baseId,r),u=r===s.value,d=k.useRef(u);return k.useEffect(()=>{const e=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,fc.jsx)(Nv,{present:o||u,children:({present:n})=>(0,fc.jsx)(Ev.div,{"data-state":u?"active":"inactive","data-orientation":s.orientation,role:"tabpanel","aria-labelledby":l,hidden:!n,id:c,tabIndex:0,...i,ref:t,style:{...e.style,animationDuration:d.current?"0s":void 0},children:n&&a})})});function jT(e,t){return`${e}-trigger-${t}`}function RT(e,t){return`${e}-content-${t}`}TT.displayName=NT;var PT=wT,OT=kT,_T=CT,AT=TT,[DT,MT]=sv("Tooltip",[TS]),LT=TS(),IT="TooltipProvider",zT=700,FT="tooltip.open",[BT,UT]=DT(IT),VT=e=>{const{__scopeTooltip:t,delayDuration:n=zT,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:a}=e,i=k.useRef(!0),s=k.useRef(!1),l=k.useRef(0);return k.useEffect(()=>{const e=l.current;return()=>window.clearTimeout(e)},[]),(0,fc.jsx)(BT,{scope:t,isOpenDelayedRef:i,delayDuration:n,onOpen:k.useCallback(()=>{r<=0||(window.clearTimeout(l.current),i.current=!1)},[r]),onClose:k.useCallback(()=>{r<=0||(window.clearTimeout(l.current),l.current=window.setTimeout(()=>i.current=!0,r))},[r]),isPointerInTransitRef:s,onPointerInTransitChange:k.useCallback(e=>{s.current=e},[]),disableHoverableContent:o,children:a})};VT.displayName=IT;var $T="Tooltip",[HT,qT]=DT($T),WT=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:a,disableHoverableContent:i,delayDuration:s}=e,l=UT($T,e.__scopeTooltip),c=LT(t),[u,d]=k.useState(null),f=Ov(),h=k.useRef(0),p=i??l.disableHoverableContent,m=s??l.delayDuration,g=k.useRef(!1),[y,v]=dv({prop:r,defaultProp:o??!1,onChange:e=>{e?(l.onOpen(),document.dispatchEvent(new CustomEvent(FT))):l.onClose(),a?.(e)},caller:$T}),b=k.useMemo(()=>y?g.current?"delayed-open":"instant-open":"closed",[y]),x=k.useCallback(()=>{window.clearTimeout(h.current),h.current=0,g.current=!1,v(!0)},[v]),w=k.useCallback(()=>{window.clearTimeout(h.current),h.current=0,v(!1)},[v]),S=k.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{g.current=!0,v(!0),h.current=0},m)},[m,v]);return k.useEffect(()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)},[]),(0,fc.jsx)($S,{...c,children:(0,fc.jsx)(HT,{scope:t,contentId:f,open:y,stateAttribute:b,trigger:u,onTriggerChange:d,onTriggerEnter:k.useCallback(()=>{l.isOpenDelayedRef.current?S():x()},[l.isOpenDelayedRef,S,x]),onTriggerLeave:k.useCallback(()=>{p?w():(window.clearTimeout(h.current),h.current=0)},[w,p]),onOpen:x,onClose:w,disableHoverableContent:p,children:n})})};WT.displayName=$T;var KT="TooltipTrigger",GT=k.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=qT(KT,n),a=UT(KT,n),i=LT(n),s=pv(t,k.useRef(null),o.onTriggerChange),l=k.useRef(!1),c=k.useRef(!1),u=k.useCallback(()=>l.current=!1,[]);return k.useEffect(()=>()=>document.removeEventListener("pointerup",u),[u]),(0,fc.jsx)(HS,{asChild:!0,...i,children:(0,fc.jsx)(Ev.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:s,onPointerMove:iv(e.onPointerMove,e=>{"touch"!==e.pointerType&&(c.current||a.isPointerInTransitRef.current||(o.onTriggerEnter(),c.current=!0))}),onPointerLeave:iv(e.onPointerLeave,()=>{o.onTriggerLeave(),c.current=!1}),onPointerDown:iv(e.onPointerDown,()=>{o.open&&o.onClose(),l.current=!0,document.addEventListener("pointerup",u,{once:!0})}),onFocus:iv(e.onFocus,()=>{l.current||o.onOpen()}),onBlur:iv(e.onBlur,o.onClose),onClick:iv(e.onClick,o.onClose)})})});GT.displayName=KT;var YT="TooltipPortal",[QT,XT]=DT(YT,{forceMount:void 0}),JT=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,a=qT(YT,t);return(0,fc.jsx)(QT,{scope:t,forceMount:n,children:(0,fc.jsx)(Nv,{present:n||a.open,children:(0,fc.jsx)(ub,{asChild:!0,container:o,children:r})})})};JT.displayName=YT;var ZT="TooltipContent",ej=k.forwardRef((e,t)=>{const n=XT(ZT,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...a}=e,i=qT(ZT,e.__scopeTooltip);return(0,fc.jsx)(Nv,{present:r||i.open,children:i.disableHoverableContent?(0,fc.jsx)(aj,{side:o,...a,ref:t}):(0,fc.jsx)(tj,{side:o,...a,ref:t})})}),tj=k.forwardRef((e,t)=>{const n=qT(ZT,e.__scopeTooltip),r=UT(ZT,e.__scopeTooltip),o=k.useRef(null),a=pv(t,o),[i,s]=k.useState(null),{trigger:l,onClose:c}=n,u=o.current,{onPointerInTransitChange:d}=r,f=k.useCallback(()=>{s(null),d(!1)},[d]),h=k.useCallback((e,t)=>{const n=e.currentTarget,r={x:e.clientX,y:e.clientY},o=function(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n})}return r}(r,function(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,o,a)){case a:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}(r,n.getBoundingClientRect())),a=function(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}(t.getBoundingClientRect());s(function(e){const t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:e.y>t.y?1:0),function(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const n=e[r];for(;t.length>=2;){const e=t[t.length-1],r=t[t.length-2];if(!((e.x-r.x)*(n.y-r.y)>=(e.y-r.y)*(n.x-r.x)))break;t.pop()}t.push(n)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const t=e[r];for(;n.length>=2;){const e=n[n.length-1],r=n[n.length-2];if(!((e.x-r.x)*(t.y-r.y)>=(e.y-r.y)*(t.x-r.x)))break;n.pop()}n.push(t)}return n.pop(),1===t.length&&1===n.length&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}(t)}([...o,...a])),d(!0)},[d]);return k.useEffect(()=>()=>f(),[f]),k.useEffect(()=>{if(l&&u){const e=e=>h(e,u),t=e=>h(e,l);return l.addEventListener("pointerleave",e),u.addEventListener("pointerleave",t),()=>{l.removeEventListener("pointerleave",e),u.removeEventListener("pointerleave",t)}}},[l,u,h,f]),k.useEffect(()=>{if(i){const e=e=>{const t=e.target,n={x:e.clientX,y:e.clientY},r=l?.contains(t)||u?.contains(t),o=!function(e,t){const{x:n,y:r}=e;let o=!1;for(let a=0,i=t.length-1;a<t.length;i=a++){const e=t[a],s=t[i],l=e.x,c=e.y,u=s.x,d=s.y;c>r!=d>r&&n<(u-l)*(r-c)/(d-c)+l&&(o=!o)}return o}(n,i);r?f():o&&(f(),c())};return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}},[l,u,i,c,f]),(0,fc.jsx)(aj,{...e,ref:a})}),[nj,rj]=DT($T,{isInside:!1}),oj=function(e){const t=e=>"child"in e?e.children(e.child):e.children;return t.displayName=`${e}.Slottable`,t.__radixId=yv,t}("TooltipContent"),aj=k.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:i,...s}=e,l=qT(ZT,n),c=LT(n),{onClose:u}=l;return k.useEffect(()=>(document.addEventListener(FT,u),()=>document.removeEventListener(FT,u)),[u]),k.useEffect(()=>{if(l.trigger){const e=e=>{e.target instanceof Node&&e.target.contains(l.trigger)&&u()};return window.addEventListener("scroll",e,{capture:!0}),()=>window.removeEventListener("scroll",e,{capture:!0})}},[l.trigger,u]),(0,fc.jsx)(Xv,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:e=>e.preventDefault(),onDismiss:u,children:(0,fc.jsxs)(qS,{"data-state":l.stateAttribute,...c,...s,ref:t,style:{...s.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[(0,fc.jsx)(oj,{children:r}),(0,fc.jsx)(nj,{scope:n,isInside:!0,children:(0,fc.jsx)(UC,{id:l.contentId,role:"tooltip",children:o||r})})]})})});ej.displayName=ZT;var ij="TooltipArrow",sj=k.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=LT(n);return rj(ij,n).isInside?null:(0,fc.jsx)(WS,{...o,...r,ref:t})});sj.displayName=ij;var lj=VT,cj=WT,uj=GT,dj=JT,fj=ej,hj=sj,pj=av("group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/80",outline:"border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",destructive:"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",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-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg 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-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg 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-2 has-data-[icon=inline-start]:pl-2",icon:"size-8","icon-xs":"size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg","icon-lg":"size-9"}},defaultVariants:{variant:"default",size:"default"}});function mj(e){const t=(0,S.c)(16);let n,r,o,a,i;t[0]!==e?(({className:n,variant:o,size:a,asChild:i,...r}=e),t[0]=e,t[1]=n,t[2]=r,t[3]=o,t[4]=a,t[5]=i):(n=t[1],r=t[2],o=t[3],a=t[4],i=t[5]);const s=void 0===o?"default":o,l=void 0===a?"default":a,c=void 0!==i&&i?gv:"button";let u,d;return t[6]!==n||t[7]!==l||t[8]!==s?(u=Zh(pj({variant:s,size:l,className:n})),t[6]=n,t[7]=l,t[8]=s,t[9]=u):u=t[9],t[10]!==c||t[11]!==r||t[12]!==l||t[13]!==u||t[14]!==s?(d=(0,fc.jsx)(c,{"data-slot":"button","data-variant":s,"data-size":l,className:u,...r}),t[10]=c,t[11]=r,t[12]=l,t[13]=u,t[14]=s,t[15]=d):d=t[15],d}function gj(e){const t=(0,S.c)(10);let n,r,o,a,i;return t[0]!==e?(({className:n,type:o,...r}=e),t[0]=e,t[1]=n,t[2]=r,t[3]=o):(n=t[1],r=t[2],o=t[3]),t[4]!==n?(a=Zh("h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",n),t[4]=n,t[5]=a):a=t[5],t[6]!==r||t[7]!==a||t[8]!==o?(i=(0,fc.jsx)("input",{type:o,"data-slot":"input",className:a,...r}),t[6]=r,t[7]=a,t[8]=o,t[9]=i):i=t[9],i}function yj(e){const t=(0,S.c)(8);let n,r,o,a;return t[0]!==e?(({className:n,...r}=e),t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]),t[3]!==n?(o=Zh("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",n),t[3]=n,t[4]=o):o=t[4],t[5]!==r||t[6]!==o?(a=(0,fc.jsx)(JE,{"data-slot":"label",className:o,...r}),t[5]=r,t[6]=o,t[7]=a):a=t[7],a}function vj(e){const t=(0,S.c)(11);let n,r,o;t[0]!==e?(({className:n,size:o,...r}=e),t[0]=e,t[1]=n,t[2]=r,t[3]=o):(n=t[1],r=t[2],o=t[3]);const a=void 0===o?"default":o;let i,s,l;return t[4]!==n?(i=Zh("peer group/switch relative inline-flex shrink-0 items-center rounded-full border border-transparent transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:bg-primary data-unchecked:bg-input dark:data-unchecked:bg-input/80 data-disabled:cursor-not-allowed data-disabled:opacity-50",n),t[4]=n,t[5]=i):i=t[5],t[6]===Symbol.for("react.memo_cache_sentinel")?(s=(0,fc.jsx)(uT,{"data-slot":"switch-thumb",className:"pointer-events-none block rounded-full bg-background ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%-2px)] dark:data-checked:bg-primary-foreground group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0 dark:data-unchecked:bg-foreground"}),t[6]=s):s=t[6],t[7]!==r||t[8]!==a||t[9]!==i?(l=(0,fc.jsx)(lT,{"data-slot":"switch","data-size":a,className:i,...r,children:s}),t[7]=r,t[8]=a,t[9]=i,t[10]=l):l=t[10],l}function bj(e){const t=(0,S.c)(4);let n,r;return t[0]!==e?(({...n}=e),t[0]=e,t[1]=n):n=t[1],t[2]!==n?(r=(0,fc.jsx)(nN,{"data-slot":"select",...n}),t[2]=n,t[3]=r):r=t[3],r}function xj(e){const t=(0,S.c)(4);let n,r;return t[0]!==e?(({...n}=e),t[0]=e,t[1]=n):n=t[1],t[2]!==n?(r=(0,fc.jsx)(iN,{"data-slot":"select-value",...n}),t[2]=n,t[3]=r):r=t[3],r}function wj(e){const t=(0,S.c)(13);let n,r,o,a;t[0]!==e?(({className:r,size:a,children:n,...o}=e),t[0]=e,t[1]=n,t[2]=r,t[3]=o,t[4]=a):(n=t[1],r=t[2],o=t[3],a=t[4]);const i=void 0===a?"default":a;let s,l,c;return t[5]!==r?(s=Zh("flex w-fit items-center justify-between gap-1.5 rounded-lg border border-input bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",r),t[5]=r,t[6]=s):s=t[6],t[7]===Symbol.for("react.memo_cache_sentinel")?(l=(0,fc.jsx)(sN,{asChild:!0,children:(0,fc.jsx)(md,{className:"pointer-events-none size-4 text-muted-foreground"})}),t[7]=l):l=t[7],t[8]!==n||t[9]!==o||t[10]!==i||t[11]!==s?(c=(0,fc.jsxs)(oN,{"data-slot":"select-trigger","data-size":i,className:s,...o,children:[n,l]}),t[8]=n,t[9]=o,t[10]=i,t[11]=s,t[12]=c):c=t[12],c}function Sj(e){const t=(0,S.c)(24);let n,r,o,a,i;t[0]!==e?(({className:r,children:n,position:a,align:i,...o}=e),t[0]=e,t[1]=n,t[2]=r,t[3]=o,t[4]=a,t[5]=i):(n=t[1],r=t[2],o=t[3],a=t[4],i=t[5]);const s=void 0===a?"item-aligned":a,l=void 0===i?"center":i,c="item-aligned"===s,u="popper"===s&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1";let d,f;t[6]!==r||t[7]!==u?(d=Zh("relative z-50 max-h-(--radix-select-content-available-height) min-w-36 origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",u,r),t[6]=r,t[7]=u,t[8]=d):d=t[8],t[9]===Symbol.for("react.memo_cache_sentinel")?(f=(0,fc.jsx)(Ej,{}),t[9]=f):f=t[9];const h="popper"===s&&"";let p,m,g,y;return t[10]!==h?(p=Zh("data-[position=popper]:h-(--radix-select-trigger-height) data-[position=popper]:w-full data-[position=popper]:min-w-(--radix-select-trigger-width)",h),t[10]=h,t[11]=p):p=t[11],t[12]!==n||t[13]!==s||t[14]!==p?(m=(0,fc.jsx)(CN,{"data-position":s,className:p,children:n}),t[12]=n,t[13]=s,t[14]=p,t[15]=m):m=t[15],t[16]===Symbol.for("react.memo_cache_sentinel")?(g=(0,fc.jsx)(Cj,{}),t[16]=g):g=t[16],t[17]!==l||t[18]!==s||t[19]!==o||t[20]!==c||t[21]!==d||t[22]!==m?(y=(0,fc.jsx)(dN,{children:(0,fc.jsxs)(hN,{"data-slot":"select-content","data-align-trigger":c,className:d,position:s,align:l,...o,children:[f,m,g]})}),t[17]=l,t[18]=s,t[19]=o,t[20]=c,t[21]=d,t[22]=m,t[23]=y):y=t[23],y}function kj(e){const t=(0,S.c)(13);let n,r,o,a,i,s,l;return t[0]!==e?(({className:r,children:n,...o}=e),t[0]=e,t[1]=n,t[2]=r,t[3]=o):(n=t[1],r=t[2],o=t[3]),t[4]!==r?(a=Zh("relative flex w-full cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",r),t[4]=r,t[5]=a):a=t[5],t[6]===Symbol.for("react.memo_cache_sentinel")?(i=(0,fc.jsx)("span",{className:"pointer-events-none absolute right-2 flex size-4 items-center justify-center",children:(0,fc.jsx)(IN,{children:(0,fc.jsx)(pd,{className:"pointer-events-none"})})}),t[6]=i):i=t[6],t[7]!==n?(s=(0,fc.jsx)(MN,{children:n}),t[7]=n,t[8]=s):s=t[8],t[9]!==o||t[10]!==a||t[11]!==s?(l=(0,fc.jsxs)(AN,{"data-slot":"select-item",className:a,...o,children:[i,s]}),t[9]=o,t[10]=a,t[11]=s,t[12]=l):l=t[12],l}function Ej(e){const t=(0,S.c)(9);let n,r,o,a,i;return t[0]!==e?(({className:n,...r}=e),t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]),t[3]!==n?(o=Zh("z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",n),t[3]=n,t[4]=o):o=t[4],t[5]===Symbol.for("react.memo_cache_sentinel")?(a=(0,fc.jsx)(yd,{}),t[5]=a):a=t[5],t[6]!==r||t[7]!==o?(i=(0,fc.jsx)(FN,{"data-slot":"select-scroll-up-button",className:o,...r,children:a}),t[6]=r,t[7]=o,t[8]=i):i=t[8],i}function Cj(e){const t=(0,S.c)(9);let n,r,o,a,i;return t[0]!==e?(({className:n,...r}=e),t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]),t[3]!==n?(o=Zh("z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",n),t[3]=n,t[4]=o):o=t[4],t[5]===Symbol.for("react.memo_cache_sentinel")?(a=(0,fc.jsx)(md,{}),t[5]=a):a=t[5],t[6]!==r||t[7]!==o?(i=(0,fc.jsx)(UN,{"data-slot":"select-scroll-down-button",className:o,...r,children:a}),t[6]=r,t[7]=o,t[8]=i):i=t[8],i}function Nj(e){const t=(0,S.c)(10);let n,r,o;t[0]!==e?(({className:n,orientation:o,...r}=e),t[0]=e,t[1]=n,t[2]=r,t[3]=o):(n=t[1],r=t[2],o=t[3]);const a=void 0===o?"horizontal":o;let i,s;return t[4]!==n?(i=Zh("group/tabs flex gap-2 data-horizontal:flex-col",n),t[4]=n,t[5]=i):i=t[5],t[6]!==a||t[7]!==r||t[8]!==i?(s=(0,fc.jsx)(PT,{"data-slot":"tabs","data-orientation":a,className:i,...r}),t[6]=a,t[7]=r,t[8]=i,t[9]=s):s=t[9],s}var Tj=av("group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-horizontal/tabs:h-8 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none",{variants:{variant:{default:"bg-muted",line:"gap-1 bg-transparent"}},defaultVariants:{variant:"default"}});function jj(e){const t=(0,S.c)(11);let n,r,o;t[0]!==e?(({className:n,variant:o,...r}=e),t[0]=e,t[1]=n,t[2]=r,t[3]=o):(n=t[1],r=t[2],o=t[3]);const a=void 0===o?"default":o;let i,s;return t[4]!==n||t[5]!==a?(i=Zh(Tj({variant:a}),n),t[4]=n,t[5]=a,t[6]=i):i=t[6],t[7]!==r||t[8]!==i||t[9]!==a?(s=(0,fc.jsx)(OT,{"data-slot":"tabs-list","data-variant":a,className:i,...r}),t[7]=r,t[8]=i,t[9]=a,t[10]=s):s=t[10],s}function Rj(e){const t=(0,S.c)(8);let n,r,o,a;return t[0]!==e?(({className:n,...r}=e),t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]),t[3]!==n?(o=Zh("relative inline-flex cursor-pointer h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-1.5 py-0.5 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:pr-1 has-data-[icon=inline-start]:pl-1 dark:text-muted-foreground dark:hover:text-foreground group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4","group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-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 data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground","after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100",n),t[3]=n,t[4]=o):o=t[4],t[5]!==r||t[6]!==o?(a=(0,fc.jsx)(_T,{"data-slot":"tabs-trigger",className:o,...r}),t[5]=r,t[6]=o,t[7]=a):a=t[7],a}function Pj(e){const t=(0,S.c)(8);let n,r,o,a;return t[0]!==e?(({className:n,...r}=e),t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]),t[3]!==n?(o=Zh("flex-1 text-sm outline-none",n),t[3]=n,t[4]=o):o=t[4],t[5]!==r||t[6]!==o?(a=(0,fc.jsx)(AT,{"data-slot":"tabs-content",className:o,...r}),t[5]=r,t[6]=o,t[7]=a):a=t[7],a}var Oj=av("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",outline:"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});function _j(e){const t=(0,S.c)(13);let n,r,o,a;t[0]!==e?(({className:n,variant:o,asChild:a,...r}=e),t[0]=e,t[1]=n,t[2]=r,t[3]=o,t[4]=a):(n=t[1],r=t[2],o=t[3],a=t[4]);const i=void 0===o?"default":o,s=void 0!==a&&a?gv:"span";let l,c;return t[5]!==n||t[6]!==i?(l=Zh(Oj({variant:i}),n),t[5]=n,t[6]=i,t[7]=l):l=t[7],t[8]!==s||t[9]!==r||t[10]!==l||t[11]!==i?(c=(0,fc.jsx)(s,{"data-slot":"badge","data-variant":i,className:l,...r}),t[8]=s,t[9]=r,t[10]=l,t[11]=i,t[12]=c):c=t[12],c}function Aj(e){const t=(0,S.c)(12);let n,r,o,a;t[0]!==e?(({className:n,orientation:o,decorative:a,...r}=e),t[0]=e,t[1]=n,t[2]=r,t[3]=o,t[4]=a):(n=t[1],r=t[2],o=t[3],a=t[4]);const i=void 0===o?"horizontal":o,s=void 0===a||a;let l,c;return t[5]!==n?(l=Zh("shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch",n),t[5]=n,t[6]=l):l=t[6],t[7]!==s||t[8]!==i||t[9]!==r||t[10]!==l?(c=(0,fc.jsx)(ZN,{"data-slot":"separator",decorative:s,orientation:i,className:l,...r}),t[7]=s,t[8]=i,t[9]=r,t[10]=l,t[11]=c):c=t[11],c}function Dj(e){const t=(0,S.c)(6);let n,r;t[0]!==e?(({delayDuration:r,...n}=e),t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]);const o=void 0===r?0:r;let a;return t[3]!==o||t[4]!==n?(a=(0,fc.jsx)(lj,{"data-slot":"tooltip-provider",delayDuration:o,...n}),t[3]=o,t[4]=n,t[5]=a):a=t[5],a}function Mj(e){const t=(0,S.c)(4);let n,r;return t[0]!==e?(({...n}=e),t[0]=e,t[1]=n):n=t[1],t[2]!==n?(r=(0,fc.jsx)(cj,{"data-slot":"tooltip",...n}),t[2]=n,t[3]=r):r=t[3],r}function Lj(e){const t=(0,S.c)(4);let n,r;return t[0]!==e?(({...n}=e),t[0]=e,t[1]=n):n=t[1],t[2]!==n?(r=(0,fc.jsx)(uj,{"data-slot":"tooltip-trigger",...n}),t[2]=n,t[3]=r):r=t[3],r}function Ij(e){const t=(0,S.c)(13);let n,r,o,a;t[0]!==e?(({className:r,sideOffset:a,children:n,...o}=e),t[0]=e,t[1]=n,t[2]=r,t[3]=o,t[4]=a):(n=t[1],r=t[2],o=t[3],a=t[4]);const i=void 0===a?0:a;let s,l,c;return t[5]!==r?(s=Zh("z-50 inline-flex w-fit max-w-xs origin-(--radix-tooltip-content-transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",r),t[5]=r,t[6]=s):s=t[6],t[7]===Symbol.for("react.memo_cache_sentinel")?(l=(0,fc.jsx)(hj,{className:"z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground"}),t[7]=l):l=t[7],t[8]!==n||t[9]!==o||t[10]!==i||t[11]!==s?(c=(0,fc.jsx)(dj,{children:(0,fc.jsxs)(fj,{"data-slot":"tooltip-content",sideOffset:i,className:s,...o,children:[n,l]})}),t[8]=n,t[9]=o,t[10]=i,t[11]=s,t[12]=c):c=t[12],c}function zj(e){const t=(0,S.c)(225),{field:n,nodeId:r,onClose:o}=e,{updateField:a,forceSync:i,schema:s}=nv(),[l,c]=(0,k.useState)(n.label),[u,d]=(0,k.useState)(n.name),[f,h]=(0,k.useState)(n.description||""),[p,m]=(0,k.useState)(n.placeholder||"");let g;t[0]!==n.defaultValue?(g=n.defaultValue?.toString()||"",t[0]=n.defaultValue,t[1]=g):g=t[1];const[y,v]=(0,k.useState)(g);let b;t[2]!==n.validation?(b=n.validation||{},t[2]=n.validation,t[3]=b):b=t[3];const[x,w]=(0,k.useState)(b);let E,C;t[4]!==n.options?(E=n.options||[],t[4]=n.options,t[5]=E):E=t[5],t[6]!==E?(C=E.map(Uj),t[6]=E,t[7]=C):C=t[7];const[N,T]=(0,k.useState)(C),[j,R]=(0,k.useState)(""),[P,O]=(0,k.useState)(n.isLocalized||!1),[_,A]=(0,k.useState)(n.isHidden||!1),[D,M]=(0,k.useState)(n.uiOptions?.width||"full");let L;t[8]!==n.referenceTo?(L=n.referenceTo||[],t[8]=n.referenceTo,t[9]=L):L=t[9];const[I,z]=(0,k.useState)(L),[F,B]=(0,k.useState)(n);let U;n!==F&&(B(n),c(n.label),d(n.name),h(n.description||""),m(n.placeholder||""),v(n.defaultValue?.toString()||""),w(n.validation||{}),T((n.options||[]).map(Bj)),O(n.isLocalized||!1),A(n.isHidden||!1),M(n.uiOptions?.width||"full"),z(n.referenceTo||[])),t[10]===Symbol.for("react.memo_cache_sentinel")?(U=["TEXT_SHORT","TEXT_LONG","RICH_TEXT","EMAIL","URL","PHONE","SLUG","PASSWORD"],t[10]=U):U=t[10];const V=U.includes(n.type);let $;t[11]===Symbol.for("react.memo_cache_sentinel")?($=["NUMBER","PERCENT","CURRENCY","RATING","SCORE"],t[11]=$):$=t[11];const H=$.includes(n.type);let q;t[12]===Symbol.for("react.memo_cache_sentinel")?(q=["SELECT","MULTI_SELECT","TAG_SELECT"],t[12]=q):q=t[12];const W=q.includes(n.type),K="REFERENCE"===n.type;let G,Y,Q,X,J,Z,ee,te,ne,re,oe,ae,ie,se,le,ce,ue,de,fe,he,pe,me,ge;if(t[13]!==y||t[14]!==f||t[15]!==n.id||t[16]!==n.label||t[17]!==n.type||t[18]!==n.validation?.required||t[19]!==i||t[20]!==W||t[21]!==_||t[22]!==P||t[23]!==H||t[24]!==K||t[25]!==V||t[26]!==l||t[27]!==u||t[28]!==j||t[29]!==r||t[30]!==o||t[31]!==N||t[32]!==p||t[33]!==I||t[34]!==s.collections||t[35]!==s.pages||t[36]!==D||t[37]!==a||t[38]!==x){const e=[...s.pages||[],...s.collections||[]].map(Fj);let g;t[56]!==y||t[57]!==f||t[58]!==n.id||t[59]!==i||t[60]!==W||t[61]!==_||t[62]!==P||t[63]!==K||t[64]!==l||t[65]!==u||t[66]!==r||t[67]!==N||t[68]!==p||t[69]!==I||t[70]!==D||t[71]!==a||t[72]!==x?(g=()=>{a(r,n.id,{label:l,name:u,description:f||void 0,placeholder:p||void 0,defaultValue:y||void 0,validation:Object.keys(x).length>0?x:void 0,options:W?N:void 0,isLocalized:P,isHidden:_,uiOptions:{width:D},referenceTo:K?I:void 0}),i()},t[56]=y,t[57]=f,t[58]=n.id,t[59]=i,t[60]=W,t[61]=_,t[62]=P,t[63]=K,t[64]=l,t[65]=u,t[66]=r,t[67]=N,t[68]=p,t[69]=I,t[70]=D,t[71]=a,t[72]=x,t[73]=g):g=t[73];const b=g;let S;t[74]!==b?(S=()=>{b()},t[74]=b,t[75]=S):S=t[75];const k=S;let E;t[76]!==j||t[77]!==N||t[78]!==b?(E=()=>{j.trim()&&(T([...N,j.trim()]),R(""),setTimeout(()=>b(),0))},t[76]=j,t[77]=N,t[78]=b,t[79]=E):E=t[79];const C=E;let L;t[80]!==N||t[81]!==b?(L=e=>{T(N.filter((t,n)=>n!==e)),setTimeout(()=>b(),0)},t[80]=N,t[81]=b,t[82]=L):L=t[82];const F=L;let B,U,$,q,de,fe,he,pe,me,ge,ye,ve,be;if(Q=Dj,le="space-y-6 px-4",t[83]!==n.label?(B=(0,fc.jsxs)("h3",{className:"text-xs font-bold text-gray-300 uppercase tracking-wider",children:["Configure: ",n.label]}),t[83]=n.label,t[84]=B):B=t[84],t[85]!==n.type){let e;t[87]===Symbol.for("react.memo_cache_sentinel")?(e=/_/g,t[87]=e):e=t[87],U=n.type.replace(e," "),t[85]=n.type,t[86]=U}else U=t[86];t[88]!==U?($=(0,fc.jsx)(_j,{variant:"outline",className:"text-xs",children:U}),t[88]=U,t[89]=$):$=t[89],t[90]!==n.validation?.required?(q=n.validation?.required&&(0,fc.jsx)(_j,{variant:"outline",className:"border-amber-500/30 text-amber-500",children:"Required"}),t[90]=n.validation?.required,t[91]=q):q=t[91],t[92]!==B||t[93]!==$||t[94]!==q?(de=(0,fc.jsxs)("div",{className:"flex items-center gap-2",children:[B,$,q]}),t[92]=B,t[93]=$,t[94]=q,t[95]=de):de=t[95],t[96]===Symbol.for("react.memo_cache_sentinel")?(fe=(0,fc.jsx)(cf,{className:"h-4 w-4"}),t[96]=fe):fe=t[96],t[97]!==o?(he=(0,fc.jsx)(mj,{variant:"ghost",size:"icon",onClick:o,className:"h-7 w-7",children:fe}),t[97]=o,t[98]=he):he=t[98],t[99]!==de||t[100]!==he?(ce=(0,fc.jsxs)("div",{className:"flex items-center justify-between",children:[de,he]}),t[99]=de,t[100]=he,t[101]=ce):ce=t[101],Y=Nj,re="basic",oe="w-full ",t[102]===Symbol.for("react.memo_cache_sentinel")?(ae=(0,fc.jsxs)(jj,{className:"w-full rounded-none bg-muted-foreground/30",children:[(0,fc.jsx)(Rj,{value:"basic",className:"flex-1 text-xs",children:"Basic"}),(0,fc.jsx)(Rj,{value:"validation",className:"flex-1 text-xs",children:"Validation"}),(0,fc.jsx)(Rj,{value:"advanced",className:"flex-1 text-xs",children:"Advanced"})]}),t[102]=ae):ae=t[102],t[103]===Symbol.for("react.memo_cache_sentinel")?(pe=(0,fc.jsx)(yj,{htmlFor:"field-label",className:"text-xs font-bold text-gray-400",children:"Display Label"}),t[103]=pe):pe=t[103],t[104]===Symbol.for("react.memo_cache_sentinel")?(me=e=>c(e.target.value),t[104]=me):me=t[104],t[105]!==k||t[106]!==l?(ge=(0,fc.jsxs)("div",{className:"space-y-2",children:[pe,(0,fc.jsx)(gj,{id:"field-label",value:l,onChange:me,onBlur:k,placeholder:"e.g., Full Name",className:"bg-black border-white/10"})]}),t[105]=k,t[106]=l,t[107]=ge):ge=t[107],t[108]===Symbol.for("react.memo_cache_sentinel")?(ye=(0,fc.jsx)(yj,{htmlFor:"field-name",className:"text-xs font-bold text-gray-400",children:"API Identifier"}),t[108]=ye):ye=t[108],t[109]===Symbol.for("react.memo_cache_sentinel")?(ve=e=>d(e.target.value.replace(/[^a-zA-Z0-9_]/g,"_")),t[109]=ve):ve=t[109],t[110]!==k||t[111]!==u?(be=(0,fc.jsx)(gj,{id:"field-name",value:u,onChange:ve,onBlur:k,className:"bg-black border-white/10 font-mono",placeholder:"camelCase_or_snake_case"}),t[110]=k,t[111]=u,t[112]=be):be=t[112];const xe=u||"field_name";let we,Se,ke,Ee,Ce,Ne,Te,je,Re,Pe,Oe,_e;t[113]!==xe?(we=(0,fc.jsxs)("p",{className:"text-[10px] text-gray-500",children:["Used in code:"," ",(0,fc.jsx)("code",{className:"text-indigo-400",children:xe})]}),t[113]=xe,t[114]=we):we=t[114],t[115]!==be||t[116]!==we?(Se=(0,fc.jsxs)("div",{className:"space-y-2",children:[ye,be,we]}),t[115]=be,t[116]=we,t[117]=Se):Se=t[117],t[118]===Symbol.for("react.memo_cache_sentinel")?(ke=(0,fc.jsx)(yj,{htmlFor:"field-description",className:"text-xs font-bold text-gray-400",children:"Help Text"}),t[118]=ke):ke=t[118],t[119]===Symbol.for("react.memo_cache_sentinel")?(Ee=e=>h(e.target.value),t[119]=Ee):Ee=t[119],t[120]!==f||t[121]!==k?(Ce=(0,fc.jsxs)("div",{className:"space-y-2",children:[ke,(0,fc.jsx)(gj,{id:"field-description",value:f,onChange:Ee,onBlur:k,placeholder:"Instructions for content editors",className:"bg-black border-white/10"})]}),t[120]=f,t[121]=k,t[122]=Ce):Ce=t[122],t[123]===Symbol.for("react.memo_cache_sentinel")?(Ne=(0,fc.jsx)(yj,{htmlFor:"field-placeholder",className:"text-xs font-bold text-gray-400",children:"Placeholder"}),t[123]=Ne):Ne=t[123],t[124]===Symbol.for("react.memo_cache_sentinel")?(Te=e=>m(e.target.value),t[124]=Te):Te=t[124],t[125]!==k||t[126]!==p?(je=(0,fc.jsxs)("div",{className:"space-y-2",children:[Ne,(0,fc.jsx)(gj,{id:"field-placeholder",value:p,onChange:Te,onBlur:k,placeholder:"e.g., Enter your full name...",className:"bg-black border-white/10"})]}),t[125]=k,t[126]=p,t[127]=je):je=t[127],t[128]===Symbol.for("react.memo_cache_sentinel")?(Re=(0,fc.jsx)(yj,{htmlFor:"field-default",className:"text-xs font-bold text-gray-400",children:"Default Value"}),t[128]=Re):Re=t[128],t[129]!==y||t[130]!==n.type||t[131]!==k||t[132]!==b?(Pe=(0,fc.jsxs)("div",{className:"space-y-2",children:[Re,"BOOLEAN"===n.type?(0,fc.jsxs)(bj,{value:y,onValueChange:e=>{v(e),setTimeout(()=>b(),0)},children:[(0,fc.jsx)(wj,{className:"bg-black border-white/10",children:(0,fc.jsx)(xj,{placeholder:"Select default"})}),(0,fc.jsxs)(Sj,{className:"bg-[#0A0B10] border-white/10",children:[(0,fc.jsx)(kj,{value:"true",children:"True"}),(0,fc.jsx)(kj,{value:"false",children:"False"})]})]}):(0,fc.jsx)(gj,{id:"field-default",value:y,onChange:e=>v(e.target.value),onBlur:k,placeholder:"Optional default",className:"bg-black border-white/10"})]}),t[129]=y,t[130]=n.type,t[131]=k,t[132]=b,t[133]=Pe):Pe=t[133],t[134]!==C||t[135]!==k||t[136]!==W||t[137]!==j||t[138]!==N||t[139]!==F?(Oe=W&&(0,fc.jsxs)("div",{className:"space-y-3 pt-2",children:[(0,fc.jsx)(yj,{className:"text-xs font-bold text-gray-400",children:"Options"}),(0,fc.jsx)("div",{className:"space-y-2",children:N.map((e,t)=>(0,fc.jsxs)("div",{className:"flex items-center gap-2",children:[(0,fc.jsx)(gj,{value:e,onChange:e=>{const n=[...N];n[t]=e.target.value,T(n)},onBlur:k,className:"flex-1 bg-black border-white/10"}),(0,fc.jsx)(mj,{variant:"ghost",size:"icon",onClick:()=>F(t),className:"h-8 w-8",children:(0,fc.jsx)(rf,{className:"h-4 w-4"})})]},t))}),(0,fc.jsxs)("div",{className:"flex gap-2",children:[(0,fc.jsx)(gj,{value:j,onChange:e=>R(e.target.value),onKeyDown:e=>"Enter"===e.key&&C(),placeholder:"Add option...",className:"flex-1 bg-black border-white/10"}),(0,fc.jsx)(mj,{onClick:C,size:"sm",children:(0,fc.jsx)(Gd,{className:"h-4 w-4"})})]})]}),t[134]=C,t[135]=k,t[136]=W,t[137]=j,t[138]=N,t[139]=F,t[140]=Oe):Oe=t[140],t[141]!==ge||t[142]!==Se||t[143]!==Ce||t[144]!==je||t[145]!==Pe||t[146]!==Oe?(ie=(0,fc.jsxs)(Pj,{value:"basic",className:"space-y-4 mt-4",children:[ge,Se,Ce,je,Pe,Oe]}),t[141]=ge,t[142]=Se,t[143]=Ce,t[144]=je,t[145]=Pe,t[146]=Oe,t[147]=ie):ie=t[147],t[148]===Symbol.for("react.memo_cache_sentinel")?(_e=(0,fc.jsx)(yj,{htmlFor:"field-required",className:"text-sm",children:"Required field"}),t[148]=_e):_e=t[148];const Ae=x.required||!1;let De,Me,Le;t[149]!==b||t[150]!==x?(De=e=>{w({...x,required:e}),setTimeout(()=>b(),0)},t[149]=b,t[150]=x,t[151]=De):De=t[151],t[152]!==Ae||t[153]!==De?(Me=(0,fc.jsxs)("div",{className:"flex items-center justify-between",children:[_e,(0,fc.jsx)(vj,{id:"field-required",checked:Ae,onCheckedChange:De})]}),t[152]=Ae,t[153]=De,t[154]=Me):Me=t[154],t[155]===Symbol.for("react.memo_cache_sentinel")?(Le=(0,fc.jsx)(yj,{htmlFor:"field-unique",className:"text-sm",children:"Unique value"}),t[155]=Le):Le=t[155];const Ie=x.unique||!1;let ze,Fe,Be,Ue,Ve,$e,He,qe,We,Ke,Ge,Ye,Qe;t[156]!==b||t[157]!==x?(ze=e=>{w({...x,unique:e}),setTimeout(()=>b(),0)},t[156]=b,t[157]=x,t[158]=ze):ze=t[158],t[159]!==Ie||t[160]!==ze?(Fe=(0,fc.jsxs)("div",{className:"flex items-center justify-between",children:[Le,(0,fc.jsx)(vj,{id:"field-unique",checked:Ie,onCheckedChange:ze})]}),t[159]=Ie,t[160]=ze,t[161]=Fe):Fe=t[161],t[162]===Symbol.for("react.memo_cache_sentinel")?(Be=(0,fc.jsx)(Aj,{className:"bg-white/5"}),t[162]=Be):Be=t[162],t[163]!==k||t[164]!==V||t[165]!==x?(Ue=V&&(0,fc.jsxs)(fc.Fragment,{children:[(0,fc.jsxs)("div",{className:"space-y-2",children:[(0,fc.jsx)(yj,{className:"text-xs text-gray-400",children:"Min Length"}),(0,fc.jsx)(gj,{type:"number",value:x.minLength||"",onChange:e=>w({...x,minLength:parseInt(e.target.value)||void 0}),onBlur:k,className:"bg-black border-white/10",min:"0"})]}),(0,fc.jsxs)("div",{className:"space-y-2",children:[(0,fc.jsx)(yj,{className:"text-xs text-gray-400",children:"Max Length"}),(0,fc.jsx)(gj,{type:"number",value:x.maxLength||"",onChange:e=>w({...x,maxLength:parseInt(e.target.value)||void 0}),onBlur:k,className:"bg-black border-white/10",min:"0"})]}),(0,fc.jsxs)("div",{className:"space-y-2",children:[(0,fc.jsx)(yj,{className:"text-xs text-gray-400",children:"Regex Pattern"}),(0,fc.jsx)(gj,{value:x.pattern||"",onChange:e=>w({...x,pattern:e.target.value}),onBlur:k,placeholder:"e.g., ^[A-Za-z]+$",className:"bg-black border-white/10 font-mono"})]})]}),t[163]=k,t[164]=V,t[165]=x,t[166]=Ue):Ue=t[166],t[167]!==k||t[168]!==H||t[169]!==x?(Ve=H&&(0,fc.jsxs)(fc.Fragment,{children:[(0,fc.jsxs)("div",{className:"space-y-2",children:[(0,fc.jsx)(yj,{className:"text-xs text-gray-400",children:"Minimum Value"}),(0,fc.jsx)(gj,{type:"number",value:x.min||"",onChange:e=>w({...x,min:parseFloat(e.target.value)||void 0}),onBlur:k,className:"bg-black border-white/10",step:"any"})]}),(0,fc.jsxs)("div",{className:"space-y-2",children:[(0,fc.jsx)(yj,{className:"text-xs text-gray-400",children:"Maximum Value"}),(0,fc.jsx)(gj,{type:"number",value:x.max||"",onChange:e=>w({...x,max:parseFloat(e.target.value)||void 0}),onBlur:k,className:"bg-black border-white/10",step:"any"})]})]}),t[167]=k,t[168]=H,t[169]=x,t[170]=Ve):Ve=t[170],t[171]!==Me||t[172]!==Fe||t[173]!==Ue||t[174]!==Ve?(se=(0,fc.jsxs)(Pj,{value:"validation",className:"space-y-4 mt-4",children:[Me,Fe,Be,Ue,Ve]}),t[171]=Me,t[172]=Fe,t[173]=Ue,t[174]=Ve,t[175]=se):se=t[175],G=Pj,ue="advanced",X="space-y-4 mt-4",t[176]===Symbol.for("react.memo_cache_sentinel")?($e=(0,fc.jsxs)("div",{className:"flex items-center gap-2",children:[(0,fc.jsx)(Od,{className:"h-4 w-4 text-gray-400"}),(0,fc.jsx)(yj,{htmlFor:"field-localized",className:"text-sm",children:"Enable localization"})]}),t[176]=$e):$e=t[176],t[177]!==b?(He=e=>{O(e),setTimeout(()=>b(),0)},t[177]=b,t[178]=He):He=t[178],t[179]!==P||t[180]!==He?(J=(0,fc.jsxs)("div",{className:"flex items-center justify-between",children:[$e,(0,fc.jsx)(vj,{id:"field-localized",checked:P,onCheckedChange:He})]}),t[179]=P,t[180]=He,t[181]=J):J=t[181],t[182]===Symbol.for("react.memo_cache_sentinel")?(qe=(0,fc.jsxs)("div",{className:"flex items-center gap-2",children:[(0,fc.jsx)(Ed,{className:"h-4 w-4 text-gray-400"}),(0,fc.jsx)(yj,{htmlFor:"field-hidden",className:"text-sm",children:"Hide in API response"})]}),t[182]=qe):qe=t[182],t[183]!==b?(We=e=>{A(e),setTimeout(()=>b(),0)},t[183]=b,t[184]=We):We=t[184],t[185]!==_||t[186]!==We?(Z=(0,fc.jsxs)("div",{className:"flex items-center justify-between",children:[qe,(0,fc.jsx)(vj,{id:"field-hidden",checked:_,onCheckedChange:We})]}),t[185]=_,t[186]=We,t[187]=Z):Z=t[187],t[188]===Symbol.for("react.memo_cache_sentinel")?(ee=(0,fc.jsx)(Aj,{className:"bg-white/5"}),t[188]=ee):ee=t[188],t[189]===Symbol.for("react.memo_cache_sentinel")?(Ke=(0,fc.jsx)(yj,{className:"text-xs text-gray-400",children:"UI Width"}),t[189]=Ke):Ke=t[189],t[190]!==b?(Ge=e=>{M(e),setTimeout(()=>b(),0)},t[190]=b,t[191]=Ge):Ge=t[191],t[192]===Symbol.for("react.memo_cache_sentinel")?(Ye=(0,fc.jsx)(wj,{className:"bg-black border-white/10",children:(0,fc.jsx)(xj,{})}),t[192]=Ye):Ye=t[192],t[193]===Symbol.for("react.memo_cache_sentinel")?(Qe=(0,fc.jsxs)(Sj,{className:"bg-[#0A0B10] border-white/10",children:[(0,fc.jsx)(kj,{value:"full",children:"Full width"}),(0,fc.jsx)(kj,{value:"half",children:"Half width"}),(0,fc.jsx)(kj,{value:"third",children:"One third"})]}),t[193]=Qe):Qe=t[193],t[194]!==Ge||t[195]!==D?(te=(0,fc.jsxs)("div",{className:"space-y-2",children:[Ke,(0,fc.jsxs)(bj,{value:D,onValueChange:Ge,children:[Ye,Qe]})]}),t[194]=Ge,t[195]=D,t[196]=te):te=t[196],ne=K&&(0,fc.jsxs)("div",{className:"space-y-3",children:[(0,fc.jsx)(yj,{className:"text-xs text-gray-400",children:"Allowed Reference Types"}),(0,fc.jsx)("div",{className:"space-y-2 max-h-40 overflow-y-auto pr-2",children:e.map(e=>(0,fc.jsxs)("div",{className:"flex items-center gap-2",children:[(0,fc.jsx)(vj,{id:`ref-${e}`,checked:I.includes(e),onCheckedChange:t=>{z(t?[...I,e]:I.filter(t=>t!==e)),setTimeout(()=>b(),0)}}),(0,fc.jsx)(yj,{htmlFor:`ref-${e}`,className:"text-sm",children:e})]},e))}),(0,fc.jsx)("p",{className:"text-[10px] text-gray-500",children:"Leave empty to allow any reference"})]}),t[13]=y,t[14]=f,t[15]=n.id,t[16]=n.label,t[17]=n.type,t[18]=n.validation?.required,t[19]=i,t[20]=W,t[21]=_,t[22]=P,t[23]=H,t[24]=K,t[25]=V,t[26]=l,t[27]=u,t[28]=j,t[29]=r,t[30]=o,t[31]=N,t[32]=p,t[33]=I,t[34]=s.collections,t[35]=s.pages,t[36]=D,t[37]=a,t[38]=x,t[39]=G,t[40]=Y,t[41]=Q,t[42]=X,t[43]=J,t[44]=Z,t[45]=ee,t[46]=te,t[47]=ne,t[48]=re,t[49]=oe,t[50]=ae,t[51]=ie,t[52]=se,t[53]=le,t[54]=ce,t[55]=ue}else G=t[39],Y=t[40],Q=t[41],X=t[42],J=t[43],Z=t[44],ee=t[45],te=t[46],ne=t[47],re=t[48],oe=t[49],ae=t[50],ie=t[51],se=t[52],le=t[53],ce=t[54],ue=t[55];return t[197]!==G||t[198]!==X||t[199]!==J||t[200]!==Z||t[201]!==ee||t[202]!==te||t[203]!==ne||t[204]!==ue?(de=(0,fc.jsxs)(G,{value:ue,className:X,children:[J,Z,ee,te,ne]}),t[197]=G,t[198]=X,t[199]=J,t[200]=Z,t[201]=ee,t[202]=te,t[203]=ne,t[204]=ue,t[205]=de):de=t[205],t[206]!==Y||t[207]!==re||t[208]!==oe||t[209]!==ae||t[210]!==ie||t[211]!==se||t[212]!==de?(fe=(0,fc.jsxs)(Y,{defaultValue:re,className:oe,children:[ae,ie,se,de]}),t[206]=Y,t[207]=re,t[208]=oe,t[209]=ae,t[210]=ie,t[211]=se,t[212]=de,t[213]=fe):fe=t[213],t[214]===Symbol.for("react.memo_cache_sentinel")?(he=(0,fc.jsx)("p",{className:"text-[10px] text-gray-500",children:"Changes are saved automatically"}),t[214]=he):he=t[214],t[215]!==o?(pe=(0,fc.jsxs)("div",{className:"flex items-center justify-between pt-2 border-t border-white/5",children:[he,(0,fc.jsx)(mj,{variant:"outline",size:"sm",onClick:o,children:"Done"})]}),t[215]=o,t[216]=pe):pe=t[216],t[217]!==le||t[218]!==ce||t[219]!==fe||t[220]!==pe?(me=(0,fc.jsxs)("div",{className:le,children:[ce,fe,pe]}),t[217]=le,t[218]=ce,t[219]=fe,t[220]=pe,t[221]=me):me=t[221],t[222]!==Q||t[223]!==me?(ge=(0,fc.jsx)(Q,{children:me}),t[222]=Q,t[223]=me,t[224]=ge):ge=t[224],ge}function Fj(e){return e.apiKey}function Bj(e){return"string"==typeof e?e:e.value}function Uj(e){return"string"==typeof e?e:e.value}function Vj(e){const t=(0,S.c)(4);let n,r;return t[0]!==e?(({...n}=e),t[0]=e,t[1]=n):n=t[1],t[2]!==n?(r=(0,fc.jsx)(WE,{"data-slot":"dropdown-menu",...n}),t[2]=n,t[3]=r):r=t[3],r}function $j(e){const t=(0,S.c)(4);let n,r;return t[0]!==e?(({...n}=e),t[0]=e,t[1]=n):n=t[1],t[2]!==n?(r=(0,fc.jsx)(KE,{"data-slot":"dropdown-menu-trigger",...n}),t[2]=n,t[3]=r):r=t[3],r}function Hj(e){const t=(0,S.c)(12);let n,r,o,a;t[0]!==e?(({className:n,align:o,sideOffset:a,...r}=e),t[0]=e,t[1]=n,t[2]=r,t[3]=o,t[4]=a):(n=t[1],r=t[2],o=t[3],a=t[4]);const i=void 0===o?"start":o,s=void 0===a?4:a;let l,c;return t[5]!==n?(l=Zh("z-50 max-h-(--radix-dropdown-menu-content-available-height) w-(--radix-dropdown-menu-trigger-width) min-w-32 origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:overflow-hidden data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",n),t[5]=n,t[6]=l):l=t[6],t[7]!==i||t[8]!==r||t[9]!==s||t[10]!==l?(c=(0,fc.jsx)(GE,{children:(0,fc.jsx)(YE,{"data-slot":"dropdown-menu-content",sideOffset:s,align:i,className:l,...r})}),t[7]=i,t[8]=r,t[9]=s,t[10]=l,t[11]=c):c=t[11],c}function qj(e){const t=(0,S.c)(12);let n,r,o,a;t[0]!==e?(({className:n,inset:r,variant:a,...o}=e),t[0]=e,t[1]=n,t[2]=r,t[3]=o,t[4]=a):(n=t[1],r=t[2],o=t[3],a=t[4]);const i=void 0===a?"default":a;let s,l;return t[5]!==n?(s=Zh("group/dropdown-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive",n),t[5]=n,t[6]=s):s=t[6],t[7]!==r||t[8]!==o||t[9]!==s||t[10]!==i?(l=(0,fc.jsx)(QE,{"data-slot":"dropdown-menu-item","data-inset":r,"data-variant":i,className:s,...o}),t[7]=r,t[8]=o,t[9]=s,t[10]=i,t[11]=l):l=t[11],l}function Wj(e){const t=(0,S.c)(4);let n,r;return t[0]!==e?(({...n}=e),t[0]=e,t[1]=n):n=t[1],t[2]!==n?(r=(0,fc.jsx)(px,{"data-slot":"sheet",...n}),t[2]=n,t[3]=r):r=t[3],r}function Kj(e){const t=(0,S.c)(4);let n,r;return t[0]!==e?(({...n}=e),t[0]=e,t[1]=n):n=t[1],t[2]!==n?(r=(0,fc.jsx)(bx,{"data-slot":"sheet-portal",...n}),t[2]=n,t[3]=r):r=t[3],r}function Gj(e){const t=(0,S.c)(8);let n,r,o,a;return t[0]!==e?(({className:n,...r}=e),t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]),t[3]!==n?(o=Zh("fixed inset-0 z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",n),t[3]=n,t[4]=o):o=t[4],t[5]!==r||t[6]!==o?(a=(0,fc.jsx)(wx,{"data-slot":"sheet-overlay",className:o,...r}),t[5]=r,t[6]=o,t[7]=a):a=t[7],a}function Yj(e){const t=(0,S.c)(17);let n,r,o,a,i;t[0]!==e?(({className:r,children:n,side:a,showCloseButton:i,...o}=e),t[0]=e,t[1]=n,t[2]=r,t[3]=o,t[4]=a,t[5]=i):(n=t[1],r=t[2],o=t[3],a=t[4],i=t[5]);const s=void 0===a?"right":a,l=void 0===i||i;let c,u,d,f;return t[6]===Symbol.for("react.memo_cache_sentinel")?(c=(0,fc.jsx)(Gj,{}),t[6]=c):c=t[6],t[7]!==r?(u=Zh("fixed z-50 flex flex-col gap-4 bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg transition duration-200 ease-in-out data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-[side=bottom]:data-open:slide-in-from-bottom-10 data-[side=left]:data-open:slide-in-from-left-10 data-[side=right]:data-open:slide-in-from-right-10 data-[side=top]:data-open:slide-in-from-top-10 data-closed:animate-out data-closed:fade-out-0 data-[side=bottom]:data-closed:slide-out-to-bottom-10 data-[side=left]:data-closed:slide-out-to-left-10 data-[side=right]:data-closed:slide-out-to-right-10 data-[side=top]:data-closed:slide-out-to-top-10",r),t[7]=r,t[8]=u):u=t[8],t[9]!==l?(d=l&&(0,fc.jsx)(Dx,{"data-slot":"sheet-close",asChild:!0,children:(0,fc.jsxs)(mj,{variant:"ghost",className:"absolute top-3 right-3",size:"icon-sm",children:[(0,fc.jsx)(cf,{}),(0,fc.jsx)("span",{className:"sr-only",children:"Close"})]})}),t[9]=l,t[10]=d):d=t[10],t[11]!==n||t[12]!==o||t[13]!==s||t[14]!==u||t[15]!==d?(f=(0,fc.jsxs)(Kj,{children:[c,(0,fc.jsxs)(Cx,{"data-slot":"sheet-content","data-side":s,className:u,...o,children:[n,d]})]}),t[11]=n,t[12]=o,t[13]=s,t[14]=u,t[15]=d,t[16]=f):f=t[16],f}function Qj(e){const t=(0,S.c)(8);let n,r,o,a;return t[0]!==e?(({className:n,...r}=e),t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]),t[3]!==n?(o=Zh("flex flex-col gap-0.5 p-4",n),t[3]=n,t[4]=o):o=t[4],t[5]!==r||t[6]!==o?(a=(0,fc.jsx)("div",{"data-slot":"sheet-header",className:o,...r}),t[5]=r,t[6]=o,t[7]=a):a=t[7],a}function Xj(e){const t=(0,S.c)(8);let n,r,o,a;return t[0]!==e?(({className:n,...r}=e),t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]),t[3]!==n?(o=Zh("font-heading text-base font-medium text-foreground",n),t[3]=n,t[4]=o):o=t[4],t[5]!==r||t[6]!==o?(a=(0,fc.jsx)(Px,{"data-slot":"sheet-title",className:o,...r}),t[5]=r,t[6]=o,t[7]=a):a=t[7],a}function Jj(e){const t=(0,S.c)(8);let n,r,o,a;return t[0]!==e?(({className:n,...r}=e),t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]),t[3]!==n?(o=Zh("text-sm text-muted-foreground",n),t[3]=n,t[4]=o):o=t[4],t[5]!==r||t[6]!==o?(a=(0,fc.jsx)(_x,{"data-slot":"sheet-description",className:o,...r}),t[5]=r,t[6]=o,t[7]=a):a=t[7],a}var Zj={TEXT_SHORT:af,TEXT_LONG:cd,RICH_TEXT:Dd,NUMBER:Ad,BOOLEAN:nf,DATE:hd,DATE_TIME:vd,COLOR:qd,IMAGE:Ld,VIDEO:lf,AUDIO:Hd,FILE:Td,URL:Fd,EMAIL:Vd,PHONE:Kd,SLUG:Fd,LOCATION:$d,OBJECT:Rd,LIST:Bd,ARRAY:Bd,SECTION:id,REFERENCE:Fd,GALLERY:ad,KEY_VALUE:Id,RATING:Zd,PERCENT:Wd,CURRENCY:Sd,ICON:Jd,PASSWORD:Ud},eR=["TEXT_SHORT","TEXT_LONG","RICH_TEXT","NUMBER","BOOLEAN","DATE","DATE_TIME","COLOR","URL","EMAIL","PHONE","SLUG","PASSWORD","PERCENT","CURRENCY","TIME","RATING","SCORE","IMAGE","VIDEO","AUDIO","FILE","DOCUMENT","GALLERY","OBJECT","LIST","ARRAY","KEY_VALUE","SELECT","MULTI_SELECT","TAG_SELECT","REFERENCE","LOCATION","COORDINATES","ADDRESS","JSON","CODE","ICON","BLEND_MODE","GRADIENT"];function tR(e){const t=(0,S.c)(134),{field:n,nodeId:r,depth:o,onSelect:a,isSelected:i}=e,s=void 0===o?0:o,l=void 0!==i&&i,{deleteField:c,updateField:u,addField:d}=nv(),[f,h]=(0,k.useState)(!1),[p,m]=(0,k.useState)(!0),[g,y]=(0,k.useState)(!1),[v,b]=(0,k.useState)(n.label),[x,w]=(0,k.useState)(!1),E=(0,k.useRef)(null);let C;t[0]!==n.id?(C={id:n.id},t[0]=n.id,t[1]=C):C=t[1];const{attributes:N,listeners:T,setNodeRef:j,transform:R,transition:P,isDragging:O}=Kt(C);let _;t[2]!==R?(_=q.Transform.toString(R),t[2]=R,t[3]=_):_=t[3];const A=24*s;let D;t[4]!==_||t[5]!==A||t[6]!==P?(D={transform:_,transition:P,marginLeft:A},t[4]=_,t[5]=A,t[6]=P,t[7]=D):D=t[7];const M=D,L=Zj[n.type]||af;let I,z,F;t[8]!==x?(I=()=>{const e=e=>{E.current&&!E.current.contains(e.target)&&w(!1)};return x&&document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},z=[x],t[8]=x,t[9]=I,t[10]=z):(I=t[9],z=t[10]),(0,k.useEffect)(I,z),t[11]!==n.id||t[12]!==n.name||t[13]!==r||t[14]!==v||t[15]!==u?(F=()=>{if(v.trim()&&(u(r,n.id,{label:v.trim()}),n.name.startsWith("field_")||""===n.name)){const e=v.toLowerCase().replace(/[^a-z0-9]+/g,"_").replace(/^_+|_+$/g,"");u(r,n.id,{name:e})}y(!1)},t[11]=n.id,t[12]=n.name,t[13]=r,t[14]=v,t[15]=u,t[16]=F):F=t[16];const B=F;let U;t[17]!==n.label||t[18]!==B?(U=e=>{"Enter"===e.key&&B(),"Escape"===e.key&&(b(n.label),y(!1))},t[17]=n.label,t[18]=B,t[19]=U):U=t[19];const V=U,$="OBJECT"===n.type||"LIST"===n.type||"ARRAY"===n.type||"SECTION"===n.type;let H;t[20]!==n.fields?(H=n.fields||[],t[20]=n.fields,t[21]=H):H=t[21];const W=H;let K;t[22]!==d||t[23]!==n.id||t[24]!==r?(K=e=>{d(r,e,n.id),w(!1)},t[22]=d,t[23]=n.id,t[24]=r,t[25]=K):K=t[25];const G=K,Y=O&&"opacity-50 z-50 shadow-2xl",Q=l&&"border-indigo-500/50 ring-1 ring-indigo-500/30";let X,J,Z,ee,te,ne,re,oe,ae,ie,se,le,ce,ue,de,fe,he,pe,me,ge,ye,ve,be,xe,we,Se,ke,Ee,Ce,Ne,Te,je,Re,Pe,Oe,_e,Ae,De;if(t[26]!==Y||t[27]!==Q?(X=Zh("group relative rounded-xl border transition-all",Y,"border-white/5 bg-[#0A0B10] hover:border-white/10",Q),t[26]=Y,t[27]=Q,t[28]=X):X=t[28],t[29]!==a?(J=()=>a?.(),t[29]=a,t[30]=J):J=t[30],t[31]===Symbol.for("react.memo_cache_sentinel")?(Z=(0,fc.jsx)(_d,{className:"h-4 w-4"}),t[31]=Z):Z=t[31],t[32]!==N||t[33]!==T?(ee=(0,fc.jsx)("button",{...N,...T,className:"mr-3 cursor-grab active:cursor-grabbing p-1 text-gray-600 hover:text-gray-300",children:Z}),t[32]=N,t[33]=T,t[34]=ee):ee=t[34],t[35]!==$||t[36]!==p?(te=$&&(0,fc.jsx)(mj,{variant:"ghost",size:"icon",className:"mr-2 h-6 w-6 p-0",onClick:e=>{e.stopPropagation(),m(!p)},children:p?(0,fc.jsx)(md,{className:"h-3.5 w-3.5"}):(0,fc.jsx)(gd,{className:"h-3.5 w-3.5"})}),t[35]=$,t[36]=p,t[37]=te):te=t[37],t[38]!==L?(ne=(0,fc.jsx)("div",{className:"h-8 w-8 rounded-lg bg-indigo-500/10 flex items-center justify-center text-indigo-400 shrink-0",children:(0,fc.jsx)(L,{className:"h-4 w-4"})}),t[38]=L,t[39]=ne):ne=t[39],t[40]!==n.label||t[41]!==V||t[42]!==B||t[43]!==g||t[44]!==v?(re=g?(0,fc.jsx)(gj,{type:"text",value:v,onChange:e=>b(e.target.value),onBlur:B,onKeyDown:V,className:"h-7 bg-black border-indigo-500 text-sm font-medium",autoFocus:!0}):(0,fc.jsx)("div",{className:"text-sm font-medium text-white truncate cursor-pointer hover:text-indigo-400",onDoubleClick:e=>{e.stopPropagation(),y(!0)},title:"Double-click to edit",children:n.label}),t[40]=n.label,t[41]=V,t[42]=B,t[43]=g,t[44]=v,t[45]=re):re=t[45],t[46]===Symbol.for("react.memo_cache_sentinel")?(oe=e=>{e.stopPropagation(),h(!0)},t[46]=oe):oe=t[46],t[47]!==n.name?(ae=(0,fc.jsx)("span",{className:"text-[10px] font-mono text-gray-500 truncate cursor-pointer hover:text-gray-300",onDoubleClick:oe,title:"Double-click to edit API identifier",children:n.name}),t[47]=n.name,t[48]=ae):ae=t[48],t[49]!==n.type){let e;t[51]===Symbol.for("react.memo_cache_sentinel")?(e=/_/g,t[51]=e):e=t[51],ie=n.type.replace(e," "),t[49]=n.type,t[50]=ie}else ie=t[50];return t[52]!==ie?(se=(0,fc.jsx)(_j,{variant:"secondary",className:"text-[10px] py-0 h-4",children:ie}),t[52]=ie,t[53]=se):se=t[53],t[54]!==n.validation?.required?(le=n.validation?.required&&(0,fc.jsx)(_j,{variant:"outline",className:"text-[10px] py-0 h-4 border-amber-500/30 text-amber-500",children:"Required"}),t[54]=n.validation?.required,t[55]=le):le=t[55],t[56]!==n.isLocalized?(ce=n.isLocalized&&(0,fc.jsx)(_j,{variant:"outline",className:"text-[10px] py-0 h-4 border-blue-500/30 text-blue-400",children:"🌐 Localized"}),t[56]=n.isLocalized,t[57]=ce):ce=t[57],t[58]!==ae||t[59]!==se||t[60]!==le||t[61]!==ce?(ue=(0,fc.jsxs)("div",{className:"flex items-center gap-2 mt-0.5",children:[ae,se,le,ce]}),t[58]=ae,t[59]=se,t[60]=le,t[61]=ce,t[62]=ue):ue=t[62],t[63]!==n.type||t[64]!==W?(de="SECTION"===n.type&&(0,fc.jsxs)("p",{className:"text-[10px] text-purple-400 mt-0.5",children:[W.length," field",1!==W.length?"s":""," defined inside this section"]}),t[63]=n.type,t[64]=W,t[65]=de):de=t[65],t[66]!==re||t[67]!==ue||t[68]!==de?(fe=(0,fc.jsxs)("div",{className:"flex-1 min-w-0",children:[re,ue,de]}),t[66]=re,t[67]=ue,t[68]=de,t[69]=fe):fe=t[69],t[70]!==ne||t[71]!==fe?(he=(0,fc.jsxs)("div",{className:"flex-1 flex items-center gap-3 min-w-0",children:[ne,fe]}),t[70]=ne,t[71]=fe,t[72]=he):he=t[72],t[73]!==$||t[74]!==n.label||t[75]!==G||t[76]!==x?(pe=$&&(0,fc.jsx)("div",{className:"relative",ref:E,children:(0,fc.jsxs)(Vj,{open:x,onOpenChange:w,children:[(0,fc.jsxs)(Mj,{children:[(0,fc.jsx)(Lj,{asChild:!0,children:(0,fc.jsx)($j,{asChild:!0,children:(0,fc.jsx)(mj,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:nR,children:(0,fc.jsx)(Gd,{className:"h-4 w-4"})})})}),(0,fc.jsx)(Ij,{children:"Add field to container"})]}),(0,fc.jsxs)(Hj,{align:"end",className:"w-64 max-h-80 overflow-y-auto",children:[(0,fc.jsxs)("div",{className:"p-2 border-b border-white/5 flex items-center justify-between",children:[(0,fc.jsxs)("span",{className:"text-[10px] font-bold text-gray-400 uppercase",children:["Add Field to ",n.label]}),(0,fc.jsx)(mj,{variant:"ghost",size:"icon",className:"h-5 w-5",onClick:e=>{e.stopPropagation(),w(!1)},children:(0,fc.jsx)(cf,{className:"h-3 w-3"})})]}),eR.map(e=>(0,fc.jsxs)(qj,{onSelect:()=>G(e),className:"flex items-center gap-2 cursor-pointer",children:[(0,fc.jsx)(Zj[e]||af,{className:"h-3.5 w-3.5 text-gray-400"}),(0,fc.jsx)("span",{children:e.replace(/_/g," ")})]},e))]})]})}),t[73]=$,t[74]=n.label,t[75]=G,t[76]=x,t[77]=pe):pe=t[77],t[78]!==d||t[79]!==n||t[80]!==r?(me=e=>{e.stopPropagation();const t={...n,id:`field_${Date.now()}`,name:`${n.name}_copy`,label:`${n.label} (Copy)`};d(r,n.type,void 0,t)},t[78]=d,t[79]=n,t[80]=r,t[81]=me):me=t[81],t[82]===Symbol.for("react.memo_cache_sentinel")?(ge=(0,fc.jsx)(xd,{className:"h-4 w-4"}),t[82]=ge):ge=t[82],t[83]!==me?(ye=(0,fc.jsx)(Lj,{asChild:!0,children:(0,fc.jsx)(mj,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:me,children:ge})}),t[83]=me,t[84]=ye):ye=t[84],t[85]===Symbol.for("react.memo_cache_sentinel")?(ve=(0,fc.jsx)(Ij,{children:"Duplicate field"}),t[85]=ve):ve=t[85],t[86]!==ye?(be=(0,fc.jsxs)(Mj,{children:[ye,ve]}),t[86]=ye,t[87]=be):be=t[87],t[88]===Symbol.for("react.memo_cache_sentinel")?(xe=(0,fc.jsxs)(Mj,{children:[(0,fc.jsx)(Lj,{asChild:!0,children:(0,fc.jsx)(mj,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:e=>{e.stopPropagation(),h(!0)},children:(0,fc.jsx)(Xd,{className:"h-4 w-4"})})}),(0,fc.jsx)(Ij,{children:"Configure field"})]}),t[88]=xe):xe=t[88],t[89]!==c||t[90]!==n.id||t[91]!==r?(we=e=>{e.stopPropagation(),c(r,n.id)},t[89]=c,t[90]=n.id,t[91]=r,t[92]=we):we=t[92],t[93]===Symbol.for("react.memo_cache_sentinel")?(Se=(0,fc.jsx)(rf,{className:"h-4 w-4"}),t[93]=Se):Se=t[93],t[94]!==we?(ke=(0,fc.jsx)(Lj,{asChild:!0,children:(0,fc.jsx)(mj,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:text-red-400",onClick:we,children:Se})}),t[94]=we,t[95]=ke):ke=t[95],t[96]===Symbol.for("react.memo_cache_sentinel")?(Ee=(0,fc.jsx)(Ij,{children:"Delete field"}),t[96]=Ee):Ee=t[96],t[97]!==ke?(Ce=(0,fc.jsxs)(Mj,{children:[ke,Ee]}),t[97]=ke,t[98]=Ce):Ce=t[98],t[99]!==pe||t[100]!==be||t[101]!==Ce?(Ne=(0,fc.jsxs)("div",{className:"flex items-center gap-1 ml-2",children:[pe,be,xe,Ce]}),t[99]=pe,t[100]=be,t[101]=Ce,t[102]=Ne):Ne=t[102],t[103]!==ee||t[104]!==te||t[105]!==he||t[106]!==Ne?(Te=(0,fc.jsxs)("div",{className:"flex items-center p-3",children:[ee,te,he,Ne]}),t[103]=ee,t[104]=te,t[105]=he,t[106]=Ne,t[107]=Te):Te=t[107],t[108]!==$||t[109]!==s||t[110]!==n.type||t[111]!==p||t[112]!==W||t[113]!==r||t[114]!==a?(je=$&&p&&(0,fc.jsx)("div",{className:"px-3 pb-3 space-y-2",children:W.length>0?W.map(e=>(0,fc.jsx)(tR,{field:e,nodeId:r,depth:s+1,onSelect:void 0,isSelected:!1},e.id)):(0,fc.jsx)("div",{className:"py-4 text-center text-gray-600 text-xs italic border border-dashed border-white/10 rounded-lg",children:"SECTION"===n.type?"No section templates yet. Click + to add a section template.":`No fields defined. Click the + button to add fields to this ${n.type.toLowerCase()}.`})}),t[108]=$,t[109]=s,t[110]=n.type,t[111]=p,t[112]=W,t[113]=r,t[114]=a,t[115]=je):je=t[115],t[116]!==j||t[117]!==M||t[118]!==X||t[119]!==J||t[120]!==Te||t[121]!==je?(Re=(0,fc.jsxs)("div",{ref:j,style:M,className:X,onClick:J,children:[Te,je]}),t[116]=j,t[117]=M,t[118]=X,t[119]=J,t[120]=Te,t[121]=je,t[122]=Re):Re=t[122],t[123]===Symbol.for("react.memo_cache_sentinel")?(Pe=(0,fc.jsxs)(Qj,{className:"mb-4 border-b",children:[(0,fc.jsx)(Xj,{className:"text-white",children:"Configure Field"}),(0,fc.jsx)(Jj,{className:"text-gray-400",children:"Edit the properties and validation rules for this field."})]}),t[123]=Pe):Pe=t[123],t[124]===Symbol.for("react.memo_cache_sentinel")?(Oe=()=>h(!1),t[124]=Oe):Oe=t[124],t[125]!==n||t[126]!==r?(_e=(0,fc.jsxs)(Yj,{className:"w-125 sm:max-w-125 bg-zinc-800 border-white/10 text-white overflow-y-auto",children:[Pe,(0,fc.jsx)(zj,{field:n,nodeId:r,onClose:Oe})]}),t[125]=n,t[126]=r,t[127]=_e):_e=t[127],t[128]!==f||t[129]!==_e?(Ae=(0,fc.jsx)(Wj,{open:f,onOpenChange:h,children:_e}),t[128]=f,t[129]=_e,t[130]=Ae):Ae=t[130],t[131]!==Re||t[132]!==Ae?(De=(0,fc.jsxs)(Dj,{children:[Re,Ae]}),t[131]=Re,t[132]=Ae,t[133]=De):De=t[133],De}function nR(e){return e.stopPropagation()}function rR(e){const t=(0,S.c)(14);let n,r,o,a,i,s,l,c;return t[0]!==e?(({className:r,children:n,...o}=e),t[0]=e,t[1]=n,t[2]=r,t[3]=o):(n=t[1],r=t[2],o=t[3]),t[4]!==r?(a=Zh("relative",r),t[4]=r,t[5]=a):a=t[5],t[6]!==n?(i=(0,fc.jsx)(LC,{"data-slot":"scroll-area-viewport",className:"size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1",children:n}),t[6]=n,t[7]=i):i=t[7],t[8]===Symbol.for("react.memo_cache_sentinel")?(s=(0,fc.jsx)(oR,{}),l=(0,fc.jsx)(IC,{}),t[8]=s,t[9]=l):(s=t[8],l=t[9]),t[10]!==o||t[11]!==a||t[12]!==i?(c=(0,fc.jsxs)(MC,{"data-slot":"scroll-area",className:a,...o,children:[i,s,l]}),t[10]=o,t[11]=a,t[12]=i,t[13]=c):c=t[13],c}function oR(e){const t=(0,S.c)(11);let n,r,o;t[0]!==e?(({className:n,orientation:o,...r}=e),t[0]=e,t[1]=n,t[2]=r,t[3]=o):(n=t[1],r=t[2],o=t[3]);const a=void 0===o?"vertical":o;let i,s,l;return t[4]!==n?(i=Zh("flex touch-none p-px transition-colors select-none data-horizontal:h-2.5 data-horizontal:flex-col data-horizontal:border-t data-horizontal:border-t-transparent data-vertical:h-full data-vertical:w-2.5 data-vertical:border-l data-vertical:border-l-transparent",n),t[4]=n,t[5]=i):i=t[5],t[6]===Symbol.for("react.memo_cache_sentinel")?(s=(0,fc.jsx)(wC,{"data-slot":"scroll-area-thumb",className:"relative flex-1 rounded-full bg-border"}),t[6]=s):s=t[6],t[7]!==a||t[8]!==r||t[9]!==i?(l=(0,fc.jsx)(uC,{"data-slot":"scroll-area-scrollbar","data-orientation":a,orientation:a,className:i,...r,children:s}),t[7]=a,t[8]=r,t[9]=i,t[10]=l):l=t[10],l}function aR(e){const t=(0,S.c)(43),{node:n}=e;let r;t[0]!==n?(r=function(e){return`export interface ${dR(e.apiKey||e.name)} {\n${e.fields.filter(e=>!e.isHidden).map(e=>{const t=e.validation?.required?"":"?",n=lR(e);return` ${e.name}${t}: ${n};`}).join("\n")}\n}`}(n),t[0]=n,t[1]=r):r=t[1];const o=r;let a;t[2]!==n?(a=function(e){return`import { z } from "zod";\n\nexport const ${t=e.apiKey||e.name,t.replace(/[^a-zA-Z0-9]+(.)/g,(e,t)=>t.toUpperCase()).replace(/^[A-Z]/,e=>e.toLowerCase())+"Schema"} = z.object({\n${e.fields.filter(e=>!e.isHidden).map(e=>{let t=cR(e);return e.validation?.required||(t+=".optional()"),` ${e.name}: ${t},`}).join("\n")}\n});`;var t}(n),t[2]=n,t[3]=a):a=t[3];const i=a;let s;t[4]!==n?(s=function(e){const t=dR(e.apiKey||e.name);return`# Type definition\ntype ${t} {\n${e.fields.filter(e=>!e.isHidden).map(e=>{const t=uR(e),n=e.validation?.required?"!":"";return` ${e.name}: ${t}${n}`}).join("\n")}\n}\n\n# Input type for mutations\ninput ${t}Input {\n${e.fields.filter(e=>!e.isHidden).map(e=>{const t=uR(e);return` ${e.name}: ${t}`}).join("\n")}\n}`}(n),t[4]=n,t[5]=s):s=t[5];const l=s;let c;t[6]!==n?(c=function(e){const t=dR(e.apiKey||e.name);return"SINGLETON"===e.type?`// ─── Next.js Server Component (Static Page Generation) ───\nimport { nexus } from "@nexushub/client";\nimport type { ${t} } from "@/types/nexus"; // Import your local schema types\n\nexport default async function Page() {\n // ⚡ Cache Hit < 1ms in development (loads locally from .nexus/local/pages/${e.apiKey}.json)\n const page = await nexus.getPage<${t}>('${e.apiKey}');\n\n return (\n <main>\n <h1>{page.title}</h1>\n <p>{page.description}</p>\n </main>\n );\n}`:`// ─── Next.js Server Component (Data Collection Grid) ───\nimport { nexus } from "@nexushub/client";\nimport type { ${t} } from "@/types/nexus"; // Import your local schema types\n\nexport default async function CollectionPage() {\n // ⚡ Loads locally from .nexus/local/collections/${e.apiKey}.json in development\n const { items, total } = await nexus.content.getCollection<${t}>('${e.apiKey}', {\n page: 1,\n limit: 10,\n sort: "createdAt",\n order: "desc"\n });\n\n return (\n <div className="grid grid-cols-3 gap-4">\n {items.map(item => (\n <div key={item.id}>\n <h3>{item.name || "Untitled Item"}</h3>\n </div>\n ))}\n </div>\n );\n}`}(n),t[6]=n,t[7]=c):c=t[7];const u=c,d=iR;let f,h,p,m,g,y,v,b,x,w,k,E,C,N,T,j;return t[8]===Symbol.for("react.memo_cache_sentinel")?(f=(0,fc.jsx)("h3",{className:"text-xs font-bold text-gray-400 uppercase tracking-wider",children:"Generated Code"}),t[8]=f):f=t[8],t[9]!==n.apiKey?(h=(0,fc.jsxs)("div",{className:"flex items-center justify-between",children:[f,(0,fc.jsx)(_j,{variant:"outline",className:"text-[10px]",children:n.apiKey})]}),t[9]=n.apiKey,t[10]=h):h=t[10],t[11]===Symbol.for("react.memo_cache_sentinel")?(p=(0,fc.jsxs)(Rj,{value:"typescript",className:"text-xs rounded-full py-1 ",children:[(0,fc.jsx)(Zu,{className:"h-3.5 w-3.5 mr-1"})," Types"]}),t[11]=p):p=t[11],t[12]===Symbol.for("react.memo_cache_sentinel")?(m=(0,fc.jsxs)(Rj,{value:"query",className:"text-xs rounded-full py-1 ",children:[(0,fc.jsx)(tf,{className:"h-3.5 w-3.5 mr-1"})," Query"]}),t[12]=m):m=t[12],t[13]===Symbol.for("react.memo_cache_sentinel")?(g=(0,fc.jsxs)(Rj,{value:"zod",className:"text-xs rounded-full py-1 ",children:[(0,fc.jsx)(rd,{className:"h-3.5 w-3.5 mr-1"})," Zod"]}),t[13]=g):g=t[13],t[14]===Symbol.for("react.memo_cache_sentinel")?(y=(0,fc.jsxs)(jj,{className:"w-full h-10! bg-white/5 border-none rounded-full grid grid-cols-4",children:[p,m,g,(0,fc.jsxs)(Rj,{value:"graphql",className:"text-xs rounded-full py-1 ",children:[(0,fc.jsx)(od,{className:"h-3.5 w-3.5 mr-1"})," GQL"]})]}),t[14]=y):y=t[14],t[15]!==o?(v=()=>d(o,"TypeScript interface"),t[15]=o,t[16]=v):v=t[16],t[17]!==v||t[18]!==o?(b=(0,fc.jsx)(Pj,{value:"typescript",className:"mt-3",children:(0,fc.jsx)(sR,{code:o,language:"typescript",onCopy:v})}),t[17]=v,t[18]=o,t[19]=b):b=t[19],t[20]!==u?(x=()=>d(u,"SDK query code"),t[20]=u,t[21]=x):x=t[21],t[22]!==u||t[23]!==x?(w=(0,fc.jsx)(Pj,{value:"query",className:"mt-3",children:(0,fc.jsx)(sR,{code:u,language:"typescript",onCopy:x})}),t[22]=u,t[23]=x,t[24]=w):w=t[24],t[25]!==i?(k=()=>d(i,"Zod schema"),t[25]=i,t[26]=k):k=t[26],t[27]!==k||t[28]!==i?(E=(0,fc.jsx)(Pj,{value:"zod",className:"mt-3",children:(0,fc.jsx)(sR,{code:i,language:"typescript",onCopy:k})}),t[27]=k,t[28]=i,t[29]=E):E=t[29],t[30]!==l?(C=()=>d(l,"GraphQL types"),t[30]=l,t[31]=C):C=t[31],t[32]!==l||t[33]!==C?(N=(0,fc.jsx)(Pj,{value:"graphql",className:"mt-3",children:(0,fc.jsx)(sR,{code:l,language:"graphql",onCopy:C})}),t[32]=l,t[33]=C,t[34]=N):N=t[34],t[35]!==b||t[36]!==w||t[37]!==E||t[38]!==N?(T=(0,fc.jsxs)(Nj,{defaultValue:"typescript",className:"w-full",children:[y,b,w,E,N]}),t[35]=b,t[36]=w,t[37]=E,t[38]=N,t[39]=T):T=t[39],t[40]!==T||t[41]!==h?(j=(0,fc.jsx)(Dj,{children:(0,fc.jsxs)("div",{className:"space-y-4",children:[h,T]})}),t[40]=T,t[41]=h,t[42]=j):j=t[42],j}function iR(e,t){navigator.clipboard.writeText(e),Sf.success(`${t} copied to clipboard`)}function sR(e){const t=(0,S.c)(19),{code:n,language:r,onCopy:o}=e;let a;t[0]!==n||t[1]!==r?(a=function(e,t){let n=e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">");const r=[],o=[];n=n.replace(/(['"`][^'"`]*['"`])/g,e=>(r.push(e),`___STRING_${r.length-1}___`));const a="graphql"===t?/(\s*#.*)/g:/(\/\/.*)/g;if(n=n.replace(a,e=>(o.push(e),`___COMMENT_${o.length-1}___`)),"typescript"===t||"javascript"===t){const e={import:"#c586c0",export:"#c586c0",from:"#c586c0",return:"#c586c0",default:"#c586c0",if:"#c586c0",else:"#c586c0",for:"#c586c0",while:"#c586c0",switch:"#c586c0",case:"#c586c0",break:"#c586c0",const:"#569cd6",let:"#569cd6",var:"#569cd6",function:"#569cd6",interface:"#569cd6",type:"#569cd6",class:"#569cd6",declare:"#569cd6",module:"#569cd6",extends:"#569cd6",as:"#569cd6",async:"#569cd6",await:"#569cd6",string:"#4ec9b0",number:"#4ec9b0",boolean:"#4ec9b0",unknown:"#4ec9b0",any:"#4ec9b0",void:"#4ec9b0",Record:"#4ec9b0",Promise:"#4ec9b0",Array:"#4ec9b0",Object:"#4ec9b0",JSON:"#4ec9b0",ID:"#4ec9b0"},t=Object.keys(e).join("|"),r=new RegExp(`(<[^>]*>)|\\b(${t})\\b`,"g");n=n.replace(r,(t,n,r)=>r?`<span style="color: ${e[r]};">${r}</span>`:t),n=n.replace(/(<[^>]*>)|\b([A-Z][a-zA-Z0-9_]+)\b/g,(e,t,n)=>n?["Record","Date","Promise","Zod","Array","Object","JSON","ID","String","Float","Boolean","DateTime","Asset","GeoPoint"].includes(n)?e:`<span style="color: #4ec9b0; font-weight: 600;">${n}</span>`:e),n=n.replace(/(<[^>]*>)|\b([a-zA-Z_][a-zA-Z0-9_]*)(?=\s*\()/g,(e,t,n)=>n?`<span style="color: #dcdcaa;">${n}</span>`:e),n=n.replace(/(<[^>]*>)|\b([a-zA-Z_][a-zA-Z0-9_]*)(?=\s*(\??\s*:|=))/g,(e,t,n)=>n?`<span style="color: #9cdcfe;">${n}</span>`:e),n=n.replace(/(<[^>]*>)|(\.|\?\.)([a-zA-Z_][a-zA-Z0-9_]*)\b/g,(e,t,n,r)=>r?`${n}<span style="color: #9cdcfe;">${r}</span>`:e),n=n.replace(/(<[^>]*>)|<([a-zA-Z0-9-]+)(?=\s|>)/gi,(e,t,n)=>{if(n){const e=/^[A-Z]/.test(n);return`<<span style="color: ${e?"#4ec9b0":"#569cd6"}; ${e?"font-weight: 600;":""}">${n}</span>`}return e}),n=n.replace(/(<[^>]*>)|<\/([a-zA-Z0-9-]+)>/gi,(e,t,n)=>{if(n){const e=/^[A-Z]/.test(n);return`</<span style="color: ${e?"#4ec9b0":"#569cd6"}; ${e?"font-weight: 600;":""}">${n}</span>>`}return e})}else if("graphql"===t){const e={type:"#c586c0",input:"#c586c0",String:"#4ec9b0",Float:"#4ec9b0",Boolean:"#4ec9b0",DateTime:"#4ec9b0",Asset:"#4ec9b0",ID:"#4ec9b0",JSON:"#4ec9b0",GeoPoint:"#4ec9b0"},t=Object.keys(e).join("|"),r=new RegExp(`(<[^>]*>)|\\b(${t})\\b`,"g");n=n.replace(r,(t,n,r)=>r?`<span style="color: ${e[r]};">${r}</span>`:t),n=n.replace(/(<[^>]*>)|\b([A-Z][a-zA-Z0-9_]+)\b/g,(t,n,r)=>r?Object.keys(e).includes(r)?t:`<span style="color: #4ec9b0; font-weight: 600;">${r}</span>`:t),n=n.replace(/(<[^>]*>)|\b([a-zA-Z_][a-zA-Z0-9_]*)(?=\s*:)/g,(e,t,n)=>n?["type","input"].includes(n)?e:`<span style="color: #9cdcfe;">${n}</span>`:e)}return n=n.replace(/___STRING_(\d+)___/g,(e,t)=>`<span style="color: #ce9178;">${r[parseInt(t,10)]}</span>`),n=n.replace(/___COMMENT_(\d+)___/g,(e,t)=>`<span style="color: #6a9955; font-style: italic;">${o[parseInt(t,10)]}</span>`),n}(n,r),t[0]=n,t[1]=r,t[2]=a):a=t[2];const i=a;let s,l,c,u,d,f,h,p;return t[3]!==r?(s=(0,fc.jsx)("span",{className:"text-[10px] font-bold text-gray-500 uppercase",children:r}),t[3]=r,t[4]=s):s=t[4],t[5]===Symbol.for("react.memo_cache_sentinel")?(l=(0,fc.jsx)(xd,{className:"h-3.5 w-3.5"}),t[5]=l):l=t[5],t[6]!==o?(c=(0,fc.jsx)(Lj,{asChild:!0,children:(0,fc.jsx)(mj,{variant:"ghost",size:"icon",className:"h-6 w-6 text-muted-foreground hover:text-white",onClick:o,children:l})}),t[6]=o,t[7]=c):c=t[7],t[8]===Symbol.for("react.memo_cache_sentinel")?(u=(0,fc.jsx)(Ij,{children:"Copy to clipboard"}),t[8]=u):u=t[8],t[9]!==c?(d=(0,fc.jsxs)(Mj,{children:[c,u]}),t[9]=c,t[10]=d):d=t[10],t[11]!==s||t[12]!==d?(f=(0,fc.jsxs)("div",{className:"flex items-center justify-between px-3 py-2 border-b border-white/5 bg-white/2 select-none",children:[s,d]}),t[11]=s,t[12]=d,t[13]=f):f=t[13],t[14]!==i?(h=(0,fc.jsx)(rR,{className:"max-h-100",children:(0,fc.jsx)("pre",{className:"p-4 text-[11px] font-mono leading-relaxed select-text whitespace-pre-wrap",dangerouslySetInnerHTML:{__html:i}})}),t[14]=i,t[15]=h):h=t[15],t[16]!==f||t[17]!==h?(p=(0,fc.jsxs)("div",{className:"relative border-l border-white/5 overflow-hidden",children:[f,h]}),t[16]=f,t[17]=h,t[18]=p):p=t[18],p}function lR(e,t=" "){switch(e.type){case"TEXT_SHORT":case"TEXT_LONG":case"RICH_TEXT":case"EMAIL":case"URL":case"PHONE":case"SLUG":case"COLOR":case"SELECT":case"PASSWORD":case"DATE":case"DATE_TIME":case"TIME":case"ICON":case"GRADIENT":return"string";case"NUMBER":case"PERCENT":case"RATING":case"SCORE":case"CURRENCY":return"number";case"BOOLEAN":return"boolean";case"IMAGE":case"VIDEO":case"AUDIO":case"FILE":case"DOCUMENT":return"{ url: string; alt?: string; mimeType?: string; size?: number }";case"GALLERY":return"Array<{ url: string; alt?: string }>";case"JSON":case"CODE":return"Record<string, unknown>";case"OBJECT":case"SECTION":return e.fields?`{\n${e.fields.filter(e=>!e.isHidden).map(e=>`${t} ${e.name}${e.validation?.required?"":"?"}: ${lR(e,t+" ")};`).join("\n")}\n${t}}`:"Record<string, unknown>";case"LIST":case"ARRAY":if(e.fields&&e.fields.length>0){const n=e.fields[0];return"OBJECT"===n.type&&n.fields?`Array<{\n${n.fields.filter(e=>!e.isHidden).map(e=>`${t} ${e.name}${e.validation?.required?"":"?"}: ${lR(e,t+" ")};`).join("\n")}\n${t}}>`:`Array<${lR(n,t)}>`}return"unknown[]";case"REFERENCE":return"string | { id: string; _type?: string }";case"REFERENCE_LIST":return"string[] | Array<{ id: string }>";case"KEY_VALUE":return"Record<string, string>";case"LOCATION":case"COORDINATES":return"{ lat: number; lng: number; address?: string }";case"ADDRESS":return"{ street?: string; city?: string; state?: string; postalCode?: string; country?: string }";default:return"unknown"}}function cR(e){let t="z.";switch(e.type){case"TEXT_SHORT":case"TEXT_LONG":case"RICH_TEXT":case"EMAIL":case"URL":case"PHONE":case"SLUG":case"COLOR":case"SELECT":case"PASSWORD":t+="string()";break;case"NUMBER":case"PERCENT":case"RATING":case"SCORE":case"CURRENCY":t+="number()";break;case"BOOLEAN":t+="boolean()";break;case"DATE":case"DATE_TIME":case"TIME":t+="string().datetime()";break;case"IMAGE":case"VIDEO":case"AUDIO":case"FILE":case"DOCUMENT":t+="object({ url: z.string(), alt: z.string().optional(), mimeType: z.string().optional() })";break;case"GALLERY":t+="array(z.object({ url: z.string(), alt: z.string().optional() }))";break;case"JSON":case"CODE":t+="record(z.string(), z.any())";break;case"OBJECT":case"SECTION":if(e.fields){t+=`object({\n${e.fields.filter(e=>!e.isHidden).map(e=>{let t=cR(e);return e.validation?.required||(t+=".optional()"),` ${e.name}: ${t}`}).join(",\n")}\n })`}else t+="record(z.string(), z.any())";break;case"LIST":case"ARRAY":if(e.fields&&e.fields.length>0){const n=e.fields[0];if("OBJECT"===n.type&&n.fields){t+=`array(z.object({\n${n.fields.filter(e=>!e.isHidden).map(e=>{let t=cR(e);return e.validation?.required||(t+=".optional()"),` ${e.name}: ${t}`}).join(",\n")}\n }))`}else t+=`array(${cR(n)})`}else t+="array(z.any())";break;case"REFERENCE":t+="union([z.string(), z.object({ id: z.string() })])";break;case"REFERENCE_LIST":t+="array(z.union([z.string(), z.object({ id: z.string() })]))";break;case"KEY_VALUE":t+="record(z.string(), z.string())";break;case"LOCATION":case"COORDINATES":t+="object({ lat: z.number(), lng: z.number(), address: z.string().optional() })";break;default:t+="any()"}return e.validation?.minLength&&(t+=`.min(${e.validation.minLength})`),e.validation?.maxLength&&(t+=`.max(${e.validation.maxLength})`),e.validation?.min&&(t+=`.min(${e.validation.min})`),e.validation?.max&&(t+=`.max(${e.validation.max})`),e.validation?.pattern&&(t+=`.regex(/${e.validation.pattern}/)`),t}function uR(e){switch(e.type){case"TEXT_SHORT":case"TEXT_LONG":case"RICH_TEXT":case"EMAIL":case"URL":case"PHONE":case"SLUG":case"COLOR":case"SELECT":case"PASSWORD":default:return"String";case"NUMBER":case"PERCENT":case"RATING":case"SCORE":case"CURRENCY":return"Float";case"BOOLEAN":return"Boolean";case"DATE":case"DATE_TIME":case"TIME":return"DateTime";case"IMAGE":case"VIDEO":case"AUDIO":case"FILE":case"DOCUMENT":return"Asset";case"GALLERY":return"[Asset]";case"JSON":case"CODE":case"KEY_VALUE":return"JSON";case"OBJECT":case"SECTION":return e.fields?dR(e.name):"JSON";case"LIST":case"ARRAY":if(e.fields&&e.fields.length>0){return`[${uR(e.fields[0])}]`}return"[String]";case"REFERENCE":return"ID";case"REFERENCE_LIST":return"[ID]";case"LOCATION":case"COORDINATES":return"GeoPoint"}}function dR(e){return e.replace(/[^a-zA-Z0-9]+(.)/g,(e,t)=>t.toUpperCase()).replace(/^[a-z]/,e=>e.toUpperCase())}function fR(e){const t=(0,S.c)(8);let n,r,o,a;return t[0]!==e?(({className:n,...r}=e),t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]),t[3]!==n?(o=Zh("flex field-sizing-content min-h-16 w-full rounded-lg border border-input bg-transparent px-2.5 py-2 text-base transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",n),t[3]=n,t[4]=o):o=t[4],t[5]!==r||t[6]!==o?(a=(0,fc.jsx)("textarea",{"data-slot":"textarea",className:o,...r}),t[5]=r,t[6]=o,t[7]=a):a=t[7],a}function hR(e){const t=(0,S.c)(4);let n,r;return t[0]!==e?(({...n}=e),t[0]=e,t[1]=n):n=t[1],t[2]!==n?(r=(0,fc.jsx)(Hv,{"data-slot":"collapsible",...n}),t[2]=n,t[3]=r):r=t[3],r}function pR(e){const t=(0,S.c)(4);let n,r;return t[0]!==e?(({...n}=e),t[0]=e,t[1]=n):n=t[1],t[2]!==n?(r=(0,fc.jsx)(Fv,{"data-slot":"collapsible-trigger",...n}),t[2]=n,t[3]=r):r=t[3],r}function mR(e){const t=(0,S.c)(4);let n,r;return t[0]!==e?(({...n}=e),t[0]=e,t[1]=n):n=t[1],t[2]!==n?(r=(0,fc.jsx)(Uv,{"data-slot":"collapsible-content",...n}),t[2]=n,t[3]=r):r=t[3],r}function gR(e){const t=(0,S.c)(80),{node:n,projectId:r}=e,o=tm();let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a={},t[0]=a):a=t[0];const[i,s]=(0,k.useState)(a),[l,c]=(0,k.useState)("idle");let u;t[1]!==r?(u={queryKey:["project-content",r],queryFn:async()=>(await Gy.get(`/content/${r}/data`)).data,staleTime:0,gcTime:0},t[1]=r,t[2]=u):u=t[2];const{data:d,isLoading:f}=sm(u);let h,p,m,g,y,v,b;t[3]!==n.apiKey||t[4]!==d?(h=()=>{let e=!0;const t=requestAnimationFrame(()=>{e&&s(d?.data&&d.data[n.apiKey]||{})});return()=>{e=!1,cancelAnimationFrame(t)}},p=[d,n.apiKey],t[3]=n.apiKey,t[4]=d,t[5]=h,t[6]=p):(h=t[5],p=t[6]),(0,k.useEffect)(h,p),t[7]!==n.apiKey||t[8]!==r||t[9]!==o?(m=async e=>{const t={...o.getQueryData(["project-content",r])?.data||{},[n.apiKey]:e};return(await Gy.put(`/content/${r}/data`,{data:t})).data},t[7]=n.apiKey,t[8]=r,t[9]=o,t[10]=m):m=t[10],t[11]===Symbol.for("react.memo_cache_sentinel")?(g=()=>{c("saving")},t[11]=g):g=t[11],t[12]!==r||t[13]!==o?(y=()=>{c("saved"),o.invalidateQueries({queryKey:["project-content",r]}),setTimeout(()=>c("idle"),1500)},t[12]=r,t[13]=o,t[14]=y):y=t[14],t[15]===Symbol.for("react.memo_cache_sentinel")?(v=e=>{c("error"),Sf.error("Failed to save content",{description:"Your changes are preserved locally."})},t[15]=v):v=t[15],t[16]!==m||t[17]!==y?(b={mutationFn:m,onMutate:g,onSuccess:y,onError:v},t[16]=m,t[17]=y,t[18]=b):b=t[18];const x=lm(b);let w;t[19]!==x?(w=(0,Wy.default)(e=>{x.mutate(e)},800),t[19]=x,t[20]=w):w=t[20];const E=w;let C,N,T;t[21]!==E?(C=()=>()=>{E.cancel()},N=[E],t[21]=E,t[22]=C,t[23]=N):(C=t[22],N=t[23]),(0,k.useEffect)(C,N),t[24]!==E?(T=(e,t)=>{s(n=>{const r={...n,[e]:t};return E(r),r})},t[24]=E,t[25]=T):T=t[25];const j=T;let R;t[26]!==E?(R=()=>{E.flush()},t[26]=E,t[27]=R):R=t[27];const P=R;let O;t[28]!==i||t[29]!==x?(O=()=>{x.mutate(i)},t[28]=i,t[29]=x,t[30]=O):O=t[30];const _=O;let A;t[31]!==P||t[32]!==i||t[33]!==j?(A=(e,t)=>{const n=void 0===t?"":t,r=n?`${n}.${e.name}`:e.name,o=i[r]??e.defaultValue??wR(e.type);return(0,fc.jsx)(yR,{field:e,value:o,onChange:e=>{j(r,e)},onBlur:P,path:r,formData:i,setFormData:s,depth:0},e.id)},t[31]=P,t[32]=i,t[33]=j,t[34]=A):A=t[34];const D=A;if(f){let e;return t[35]===Symbol.for("react.memo_cache_sentinel")?(e=(0,fc.jsx)("div",{className:"flex items-center justify-center py-12",children:(0,fc.jsx)(Yd,{className:"h-8 w-8 animate-spin text-indigo-500"})}),t[35]=e):e=t[35],e}let M,L,I,z,F,B,U,V,$,H,q,W,K,G;if(t[36]===Symbol.for("react.memo_cache_sentinel")?(M=(0,fc.jsx)(id,{className:"h-5 w-5 text-indigo-400"}),t[36]=M):M=t[36],t[37]!==n.name?(L=(0,fc.jsxs)("h2",{className:"text-2xl font-bold text-white flex items-center gap-2",children:[M,n.name]}),t[37]=n.name,t[38]=L):L=t[38],t[39]!==n.apiKey?(I=(0,fc.jsxs)("p",{className:"text-xs font-mono text-gray-500 mt-1",children:["API ID: ",n.apiKey]}),t[39]=n.apiKey,t[40]=I):I=t[40],t[41]!==L||t[42]!==I?(z=(0,fc.jsxs)("div",{children:[L,I]}),t[41]=L,t[42]=I,t[43]=z):z=t[43],t[44]!==l?(F="saving"===l&&(0,fc.jsxs)(_j,{variant:"outline",className:"text-yellow-400 border-yellow-500/30",children:[(0,fc.jsx)(Yd,{className:"h-3 w-3 mr-1 animate-spin"})," Saving..."]}),t[44]=l,t[45]=F):F=t[45],t[46]!==l?(B="saved"===l&&(0,fc.jsxs)(_j,{variant:"outline",className:"text-emerald-400 border-emerald-500/30",children:[(0,fc.jsx)(nd,{className:"h-3 w-3 mr-1"})," Saved"]}),t[46]=l,t[47]=B):B=t[47],t[48]!==l?(U="error"===l&&(0,fc.jsxs)(_j,{variant:"outline",className:"text-red-400 border-red-500/30",children:[(0,fc.jsx)(td,{className:"h-3 w-3 mr-1"})," Error"]}),t[48]=l,t[49]=U):U=t[49],t[50]!==F||t[51]!==B||t[52]!==U?(V=(0,fc.jsxs)("div",{className:"flex items-center gap-2",children:[F,B,U]}),t[50]=F,t[51]=B,t[52]=U,t[53]=V):V=t[53],t[54]!==z||t[55]!==V?($=(0,fc.jsxs)("div",{className:"flex items-center justify-between",children:[z,V]}),t[54]=z,t[55]=V,t[56]=$):$=t[56],t[57]!==n.description?(H=n.description&&(0,fc.jsx)("p",{className:"text-sm text-gray-400 mt-4",children:n.description}),t[57]=n.description,t[58]=H):H=t[58],t[59]!==$||t[60]!==H?(q=(0,fc.jsxs)("div",{className:"mb-8 p-6 rounded-xl border border-white/10 bg-[#0A0B10]",children:[$,H]}),t[59]=$,t[60]=H,t[61]=q):q=t[61],t[62]!==n.fields||t[63]!==D){let e;t[65]!==D?(e=e=>D(e),t[65]=D,t[66]=e):e=t[66],W=n.fields.map(e),t[62]=n.fields,t[63]=D,t[64]=W}else W=t[64];t[67]!==W?(K=(0,fc.jsx)("div",{className:"space-y-6",children:W}),t[67]=W,t[68]=K):K=t[68],t[69]===Symbol.for("react.memo_cache_sentinel")?(G=(0,fc.jsx)(Aj,{className:"my-8 bg-white/5"}),t[69]=G):G=t[69];const Y="saving"===l;let Q,X,J;return t[70]!==l?(Q="saving"===l?(0,fc.jsx)(Yd,{className:"h-4 w-4 mr-2 animate-spin"}):(0,fc.jsx)(Qd,{className:"h-4 w-4 mr-2"}),t[70]=l,t[71]=Q):Q=t[71],t[72]!==_||t[73]!==Y||t[74]!==Q?(X=(0,fc.jsx)("div",{className:"flex justify-end",children:(0,fc.jsxs)(mj,{className:"bg-indigo-600 hover:bg-indigo-700 text-white",onClick:_,disabled:Y,children:[Q,"Save Content Data"]})}),t[72]=_,t[73]=Y,t[74]=Q,t[75]=X):X=t[75],t[76]!==q||t[77]!==K||t[78]!==X?(J=(0,fc.jsx)(Dj,{children:(0,fc.jsxs)("div",{className:"max-w-4xl mx-auto pb-8",children:[q,K,G,X]})}),t[76]=q,t[77]=K,t[78]=X,t[79]=J):J=t[79],J}function yR({field:e,value:t,onChange:n,onBlur:r,path:o,formData:a,setFormData:i,depth:s=0}){const[l,c]=(0,k.useState)(!0),u=s>0?"pl-4 ml-2 border-l-2 border-white/10":"",d=()=>{switch(e.type){case"TEXT_SHORT":case"SLUG":case"PASSWORD":return(0,fc.jsx)(gj,{type:"PASSWORD"===e.type?"password":"text",value:"string"==typeof t?t:"",onChange:e=>n(e.target.value),onBlur:r,placeholder:e.placeholder,className:"bg-black/50 border-white/10 text-sm"});case"TEXT_LONG":return(0,fc.jsx)(fR,{value:"string"==typeof t?t:"",onChange:e=>n(e.target.value),onBlur:r,placeholder:e.placeholder,rows:4,className:"bg-black/50 border-white/10 resize-y text-sm"});case"RICH_TEXT":return(0,fc.jsxs)("div",{className:"border border-white/10 rounded-lg overflow-hidden bg-black/50",children:[(0,fc.jsxs)("div",{className:"bg-white/5 px-3 py-1.5 border-b border-white/10 flex items-center gap-2",children:[(0,fc.jsx)(mj,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0 hover:bg-white/10",children:"B"}),(0,fc.jsx)(mj,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0 hover:bg-white/10",children:"I"}),(0,fc.jsx)(mj,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0 hover:bg-white/10",children:"U"}),(0,fc.jsx)("div",{className:"w-px h-4 bg-white/10 mx-1"}),(0,fc.jsx)(mj,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0 hover:bg-white/10",children:"Link"})]}),(0,fc.jsx)(fR,{value:"string"==typeof t?t:"",onChange:e=>n(e.target.value),onBlur:r,placeholder:e.placeholder,rows:6,className:"bg-transparent border-0 focus-visible:ring-0 resize-y text-sm"})]});case"NUMBER":case"PERCENT":case"CURRENCY":case"RATING":case"SCORE":{const o="RATING"===e.type||"SCORE"===e.type?.5:.01,a=e.validation?.min??("RATING"===e.type||"SCORE"===e.type?0:void 0),i=e.validation?.max??("RATING"===e.type||"SCORE"===e.type?5:void 0);return(0,fc.jsxs)("div",{className:"relative",children:[(0,fc.jsx)(gj,{type:"number",value:"number"==typeof t?t:"",onChange:e=>n(parseFloat(e.target.value)||0),onBlur:r,min:a,max:i,step:o,placeholder:e.placeholder,className:"bg-black/50 border-white/10"}),"PERCENT"===e.type&&(0,fc.jsx)("span",{className:"absolute right-3 top-1/2 -translate-y-1/2 text-gray-500 text-sm",children:"%"}),"CURRENCY"===e.type&&(0,fc.jsx)("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-gray-500 text-sm",children:"$"})]})}case"BOOLEAN":return(0,fc.jsxs)("div",{className:"flex items-center gap-3",children:[(0,fc.jsx)(vj,{checked:"boolean"==typeof t&&t,onCheckedChange:e=>{n(e),r()}}),(0,fc.jsx)("span",{className:"text-sm text-gray-400",children:t?"Enabled":"Disabled"})]});case"DATE":return(0,fc.jsx)(gj,{type:"date",value:"string"==typeof t?t:"",onChange:e=>n(e.target.value),onBlur:r,className:"bg-black/50 border-white/10 scheme-dark"});case"DATE_TIME":return(0,fc.jsx)(gj,{type:"datetime-local",value:"string"==typeof t?t:"",onChange:e=>n(e.target.value),onBlur:r,className:"bg-black/50 border-white/10 scheme-dark"});case"TIME":return(0,fc.jsx)(gj,{type:"time",value:"string"==typeof t?t:"",onChange:e=>n(e.target.value),onBlur:r,className:"bg-black/50 border-white/10 scheme-dark"});case"COLOR":return(0,fc.jsxs)("div",{className:"flex gap-2",children:[(0,fc.jsx)(gj,{type:"color",value:"string"==typeof t?t:"#000000",onChange:e=>n(e.target.value),onBlur:r,className:"w-12 h-10 p-1 bg-black/50 border-white/10 cursor-pointer rounded-lg"}),(0,fc.jsx)(gj,{type:"text",value:"string"==typeof t?t:"",onChange:e=>n(e.target.value),onBlur:r,placeholder:"#000000",className:"flex-1 bg-black/50 border-white/10 font-mono"})]});case"EMAIL":return(0,fc.jsxs)("div",{className:"relative",children:[(0,fc.jsx)(Vd,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-500"}),(0,fc.jsx)(gj,{type:"email",value:"string"==typeof t?t:"",onChange:e=>n(e.target.value),onBlur:r,placeholder:e.placeholder||"email@example.com",className:"pl-10 bg-black/50 border-white/10"})]});case"PHONE":return(0,fc.jsxs)("div",{className:"relative",children:[(0,fc.jsx)(Kd,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-500"}),(0,fc.jsx)(gj,{type:"tel",value:"string"==typeof t?t:"",onChange:e=>n(e.target.value),onBlur:r,placeholder:e.placeholder||"+1 (555) 000-0000",className:"pl-10 bg-black/50 border-white/10"})]});case"URL":return(0,fc.jsxs)("div",{className:"relative",children:[(0,fc.jsx)(zd,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-500"}),(0,fc.jsx)(gj,{type:"url",value:"string"==typeof t?t:"",onChange:e=>n(e.target.value),onBlur:r,placeholder:e.placeholder||"https://example.com",className:"pl-10 bg-black/50 border-white/10"})]});case"SELECT":return(0,fc.jsxs)(bj,{value:"string"==typeof t?t:"",onValueChange:e=>{n(e),r()},children:[(0,fc.jsx)(wj,{className:"bg-black/50 border-white/10",children:(0,fc.jsx)(xj,{placeholder:"Select an option..."})}),(0,fc.jsx)(Sj,{className:"bg-[#0A0B10] border-white/10",children:e.options?.map(e=>{const t="string"==typeof e?e:e.value;return(0,fc.jsx)(kj,{value:t,children:"string"==typeof e?e:e.label},t)})})]});case"MULTI_SELECT":{const o=Array.isArray(t)?t.filter(e=>"string"==typeof e):[];return(0,fc.jsxs)("div",{className:"space-y-2 bg-black/20 p-3 rounded-lg border border-white/5",children:[(0,fc.jsx)("div",{className:"flex flex-wrap gap-2",children:o.map((e,t)=>(0,fc.jsxs)(_j,{variant:"secondary",className:"gap-1 bg-white/10 hover:bg-white/20",children:[e,(0,fc.jsx)("button",{onClick:()=>{n(o.filter((e,n)=>n!==t)),r()},className:"ml-1 text-gray-400 hover:text-white",children:"×"})]},t))}),(0,fc.jsxs)(bj,{value:"",onValueChange:e=>{e&&!o.includes(e)&&(n([...o,e]),r())},children:[(0,fc.jsx)(wj,{className:"bg-black/50 border-white/10",children:(0,fc.jsx)(xj,{placeholder:"Add item..."})}),(0,fc.jsx)(Sj,{className:"bg-[#0A0B10] border-white/10",children:e.options?.map(e=>({val:"string"==typeof e?e:e.value,label:"string"==typeof e?e:e.label})).filter(e=>!o.includes(e.val)).map(e=>(0,fc.jsx)(kj,{value:e.val,children:e.label},e.val))})]})]})}case"TAG_SELECT":return(0,fc.jsx)(vR,{tags:Array.isArray(t)?t.filter(e=>"string"==typeof e):[],onChange:n,onBlur:r,placeholder:e.placeholder});case"IMAGE":return(0,fc.jsxs)("div",{className:"space-y-3 p-3 bg-black/20 rounded-lg border border-white/5",children:["string"==typeof t&&t&&(0,fc.jsx)("div",{className:"relative group rounded-md overflow-hidden border border-white/10 bg-black",children:(0,fc.jsx)("img",{src:t,alt:"Preview",className:"w-full h-40 object-cover opacity-80 group-hover:opacity-100 transition-opacity"})}),(0,fc.jsx)(gj,{type:"text",value:"string"==typeof t?t:"",onChange:e=>n(e.target.value),onBlur:r,placeholder:"Image URL (https://...)",className:"bg-black/50 border-white/10"})]});case"GALLERY":return(0,fc.jsx)(bR,{images:Array.isArray(t)?t.filter(e=>"string"==typeof e):[],onChange:n,onBlur:r});case"OBJECT":case"SECTION":{const u=t||{};return(0,fc.jsx)(hR,{open:l,onOpenChange:c,className:"mt-1",children:(0,fc.jsxs)("div",{className:"rounded-xl border border-white/10 bg-[#0c0d12] overflow-hidden",children:[(0,fc.jsx)(pR,{asChild:!0,children:(0,fc.jsxs)(mj,{variant:"ghost",className:"w-full flex items-center justify-between p-3 h-auto hover:bg-white/5 rounded-none border-b border-transparent data-[state=open]:border-white/5",children:[(0,fc.jsxs)("div",{className:"flex items-center gap-2",children:[l?(0,fc.jsx)(md,{className:"h-4 w-4 text-gray-400"}):(0,fc.jsx)(gd,{className:"h-4 w-4 text-gray-400"}),(0,fc.jsx)("span",{className:"text-sm font-semibold text-indigo-300",children:e.label})]}),(0,fc.jsx)(_j,{variant:"outline",className:"text-[10px] bg-black/50 border-white/10",children:"Object"})]})}),(0,fc.jsx)(mR,{className:"p-4 space-y-4",children:e.fields?.map(e=>(0,fc.jsx)(yR,{field:e,value:u[e.name],onChange:t=>n({...u,[e.name]:t}),onBlur:r,path:`${o}.${e.name}`,formData:a,setFormData:i,depth:s+1},e.id))})]})})}case"LIST":{const l=Array.isArray(t)?t:[],c=e.fields?.[0]?.fields||[],u=!e.fields?.[0]?.fields;return(0,fc.jsxs)("div",{className:"space-y-3 mt-1",children:[(0,fc.jsx)("div",{className:"space-y-4",children:l.map((e,t)=>(0,fc.jsxs)("div",{className:"relative rounded-xl border border-white/10 bg-[#0c0d12] shadow-sm",children:[(0,fc.jsxs)("div",{className:"flex items-center justify-between p-2 border-b border-white/5 bg-white/2",children:[(0,fc.jsxs)("div",{className:"flex items-center gap-2 text-xs font-bold text-gray-500 uppercase tracking-wider px-2",children:[(0,fc.jsx)(_d,{className:"h-3.5 w-3.5 opacity-50"}),"Item ",t+1]}),(0,fc.jsx)(mj,{variant:"ghost",size:"icon",className:"h-7 w-7 text-gray-500 hover:text-red-400 hover:bg-red-500/10",onClick:()=>{n(l.filter((e,n)=>n!==t)),r()},children:(0,fc.jsx)(rf,{className:"h-3.5 w-3.5"})})]}),(0,fc.jsx)("div",{className:"p-4 space-y-4",children:u?(0,fc.jsx)(gj,{type:"text",value:"string"==typeof e?e:"",onChange:e=>{const r=[...l];r[t]=e.target.value,n(r)},onBlur:r,className:"bg-black/50 border-white/10"}):c.map(c=>(0,fc.jsx)(yR,{field:c,value:e[c.name],onChange:r=>{const o=[...l];o[t]={...e,[c.name]:r},n(o)},onBlur:r,path:`${o}[${t}].${c.name}`,formData:a,setFormData:i,depth:s+1},c.id))})]},t))}),(0,fc.jsxs)(mj,{variant:"outline",className:"w-full border-dashed border-white/20 hover:border-indigo-500/50 hover:bg-indigo-500/10 text-indigo-300",onClick:()=>{const e=c.reduce((e,t)=>(e[t.name]=wR(t.type),e),{});n([...l,u?"":e]),r()},children:[(0,fc.jsx)(Gd,{className:"h-4 w-4 mr-2"})," Add ",e.label," Item"]})]})}case"KEY_VALUE":return(0,fc.jsx)(xR,{pairs:t||{},onChange:e=>n(e),onBlur:r});case"JSON":case"CODE":return(0,fc.jsx)(fR,{value:"object"==typeof t?JSON.stringify(t,null,2):String(t||""),onChange:t=>{try{n("JSON"===e.type?JSON.parse(t.target.value):t.target.value)}catch{n(t.target.value)}},onBlur:r,rows:8,className:"bg-black/50 border-white/10 font-mono text-emerald-400 resize-y text-xs",spellCheck:!1});default:return(0,fc.jsx)(gj,{type:"text",value:"string"==typeof t?t:"",onChange:e=>n(e.target.value),onBlur:r,placeholder:e.placeholder,className:"bg-black/50 border-white/10 text-sm"})}};return"BOOLEAN"===e.type?(0,fc.jsxs)("div",{className:Zh("space-y-1 mb-4",u),children:[d(),e.description&&(0,fc.jsx)("p",{className:"text-xs text-gray-500 ml-11",children:e.description})]}):(0,fc.jsxs)("div",{className:Zh("flex flex-col mb-5",u),children:[(0,fc.jsxs)("div",{className:"flex items-center gap-2 mb-1.5",children:[(0,fc.jsxs)(yj,{className:"text-sm font-semibold text-gray-200",children:[e.label,e.validation?.required&&(0,fc.jsx)("span",{className:"text-red-400 ml-1",children:"*"})]}),(0,fc.jsx)("span",{className:"text-[10px] font-mono text-gray-600 bg-white/5 px-1.5 py-0.5 rounded",children:e.name})]}),e.description&&(0,fc.jsx)("p",{className:"text-xs text-gray-500 mb-2 leading-relaxed",children:e.description}),(0,fc.jsx)("div",{className:"w-full",children:d()})]})}function vR(e){const t=(0,S.c)(27),{tags:n,onChange:r,onBlur:o,placeholder:a}=e,[i,s]=(0,k.useState)("");let l;t[0]!==i||t[1]!==o||t[2]!==r||t[3]!==n?(l=()=>{i.trim()&&(r([...n,i.trim()]),s(""),o())},t[0]=i,t[1]=o,t[2]=r,t[3]=n,t[4]=l):l=t[4];const c=l;let u,d,f,h;t[5]!==o||t[6]!==r||t[7]!==n?(u=n.map((e,t)=>(0,fc.jsxs)(_j,{variant:"secondary",className:"gap-1 bg-white/10 hover:bg-white/20",children:[e,(0,fc.jsx)("button",{onClick:()=>{r(n.filter((e,n)=>n!==t)),o()},className:"ml-1 text-gray-400 hover:text-red-400",children:"×"})]},t)),t[5]=o,t[6]=r,t[7]=n,t[8]=u):u=t[8],t[9]!==u?(d=(0,fc.jsx)("div",{className:"flex flex-wrap gap-2",children:u}),t[9]=u,t[10]=d):d=t[10],t[11]===Symbol.for("react.memo_cache_sentinel")?(f=e=>s(e.target.value),t[11]=f):f=t[11],t[12]!==c?(h=e=>"Enter"===e.key&&c(),t[12]=c,t[13]=h):h=t[13];const p=a||"Add a tag...";let m,g,y,v;return t[14]!==c||t[15]!==i||t[16]!==h||t[17]!==p?(m=(0,fc.jsx)(gj,{type:"text",value:i,onChange:f,onKeyDown:h,onBlur:c,placeholder:p,className:"flex-1 bg-black/50 border-white/10"}),t[14]=c,t[15]=i,t[16]=h,t[17]=p,t[18]=m):m=t[18],t[19]!==c?(g=(0,fc.jsx)(mj,{onClick:c,variant:"secondary",children:"Add"}),t[19]=c,t[20]=g):g=t[20],t[21]!==m||t[22]!==g?(y=(0,fc.jsxs)("div",{className:"flex gap-2",children:[m,g]}),t[21]=m,t[22]=g,t[23]=y):y=t[23],t[24]!==d||t[25]!==y?(v=(0,fc.jsxs)("div",{className:"space-y-3 p-3 bg-black/20 rounded-lg border border-white/5",children:[d,y]}),t[24]=d,t[25]=y,t[26]=v):v=t[26],v}function bR(e){const t=(0,S.c)(15),{images:n,onChange:r,onBlur:o}=e;let a,i,s,l,c,u;return t[0]!==n||t[1]!==o||t[2]!==r?(a=n.map((e,t)=>(0,fc.jsxs)("div",{className:"relative group aspect-square rounded-lg overflow-hidden border border-white/10 bg-black/50",children:[(0,fc.jsx)("img",{src:e,alt:`Gallery ${t+1}`,className:"w-full h-full object-cover opacity-80 group-hover:opacity-100 transition-opacity"}),(0,fc.jsx)(mj,{variant:"destructive",size:"icon",className:"absolute top-2 right-2 h-7 w-7 opacity-0 group-hover:opacity-100 transition-all shadow-lg scale-90 group-hover:scale-100",onClick:()=>{r(n.filter((e,n)=>n!==t)),o()},children:(0,fc.jsx)(rf,{className:"h-3.5 w-3.5"})})]},t)),t[0]=n,t[1]=o,t[2]=r,t[3]=a):a=t[3],t[4]!==n||t[5]!==o||t[6]!==r?(i=()=>{const e=prompt("Enter image URL:");e&&(r([...n,e]),o())},t[4]=n,t[5]=o,t[6]=r,t[7]=i):i=t[7],t[8]===Symbol.for("react.memo_cache_sentinel")?(s=(0,fc.jsx)(Gd,{className:"h-6 w-6 text-indigo-400"}),l=(0,fc.jsx)("span",{className:"text-xs text-gray-400",children:"Add Image"}),t[8]=s,t[9]=l):(s=t[8],l=t[9]),t[10]!==i?(c=(0,fc.jsxs)(mj,{variant:"outline",className:"aspect-square border-dashed border-white/20 hover:border-indigo-500/50 hover:bg-indigo-500/10 flex flex-col gap-2",onClick:i,children:[s,l]}),t[10]=i,t[11]=c):c=t[11],t[12]!==a||t[13]!==c?(u=(0,fc.jsx)("div",{className:"space-y-3 p-4 bg-black/20 rounded-xl border border-white/5",children:(0,fc.jsxs)("div",{className:"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 gap-3",children:[a,c]})}),t[12]=a,t[13]=c,t[14]=u):u=t[14],u}function xR({pairs:e,onChange:t,onBlur:n}){const[r,o]=(0,k.useState)(""),[a,i]=(0,k.useState)("");return(0,fc.jsxs)("div",{className:"space-y-4 p-4 bg-black/20 rounded-xl border border-white/5",children:[(0,fc.jsx)("div",{className:"space-y-2",children:Object.entries(e).map(([r,o])=>(0,fc.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,fc.jsx)(gj,{type:"text",value:r,onChange:n=>{const a={...e};delete a[r],a[n.target.value]=o,t(a)},onBlur:n,className:"w-1/3 bg-black/50 border-white/10 font-mono text-sm",placeholder:"Key"}),(0,fc.jsx)("span",{className:"text-gray-500 font-bold",children:":"}),(0,fc.jsx)(gj,{type:"text",value:o,onChange:n=>{t({...e,[r]:n.target.value})},onBlur:n,className:"flex-1 bg-black/50 border-white/10 text-sm",placeholder:"Value"}),(0,fc.jsx)(mj,{variant:"ghost",size:"icon",className:"text-gray-500 hover:text-red-400 hover:bg-red-500/10",onClick:()=>{const o={...e};delete o[r],t(o),n()},children:(0,fc.jsx)(rf,{className:"h-4 w-4"})})]},r))}),(0,fc.jsx)(Aj,{className:"bg-white/5"}),(0,fc.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,fc.jsx)(gj,{type:"text",value:r,onChange:e=>o(e.target.value),placeholder:"New key",className:"w-1/3 bg-black/50 border-white/10 font-mono text-sm"}),(0,fc.jsx)("span",{className:"text-gray-500 font-bold",children:":"}),(0,fc.jsx)(gj,{type:"text",value:a,onChange:e=>i(e.target.value),placeholder:"Value",className:"flex-1 bg-black/50 border-white/10 text-sm"}),(0,fc.jsx)(mj,{onClick:()=>{r.trim()&&(t({...e,[r.trim()]:a}),o(""),i(""),n())},variant:"secondary",children:"Add"})]})]})}function wR(e){switch(e){case"TEXT_SHORT":case"TEXT_LONG":case"RICH_TEXT":case"EMAIL":case"PHONE":case"URL":case"SLUG":case"COLOR":case"CODE":case"JSON":case"ICON":case"GRADIENT":case"PASSWORD":case"DATE":case"DATE_TIME":case"TIME":case"SELECT":case"REFERENCE":case"IMAGE":case"VIDEO":case"AUDIO":case"FILE":case"DOCUMENT":default:return"";case"NUMBER":case"PERCENT":case"CURRENCY":case"RATING":case"SCORE":return 0;case"BOOLEAN":return!1;case"MULTI_SELECT":case"TAG_SELECT":case"GALLERY":case"ARRAY":case"LIST":case"SECTION":return[];case"OBJECT":case"LOCATION":case"COORDINATES":case"ADDRESS":case"KEY_VALUE":return{}}}function SR(e){const t=(0,S.c)(136),{node:n,onUpdate:r}=e,{forceSync:o}=nv(),[a,i]=(0,k.useState)(!1),[s,l]=(0,k.useState)(n.apiKey||""),[c,u]=(0,k.useState)(n.description||""),[d,f]=(0,k.useState)(n.previewUrl||""),[h,p]=(0,k.useState)(n.cacheStrategy||"stale-while-revalidate"),[m,g]=(0,k.useState)(n.isDraft||!1),[y,v]=(0,k.useState)(n.enableVersioning||!1),[b,x]=(0,k.useState)(n.isHidden||!1),[w,E]=(0,k.useState)(n);let C;n!==w&&(E(n),l(n.apiKey||""),u(n.description||""),f(n.previewUrl||""),p(n.cacheStrategy||"stale-while-revalidate"),g(n.isDraft||!1),v(n.enableVersioning||!1),x(n.isHidden||!1)),t[0]!==o||t[1]!==n.id||t[2]!==r?(C=e=>{r(n.id,e),o()},t[0]=o,t[1]=n.id,t[2]=r,t[3]=C):C=t[3];const N=C;let T;t[4]===Symbol.for("react.memo_cache_sentinel")?(T=e=>{l(e.target.value.toLowerCase().replace(/[^a-z0-9_]/g,"_").replace(/^_+|_+$/g,""))},t[4]=T):T=t[4];const j=T;let R;t[5]!==s||t[6]!==n.apiKey||t[7]!==N?(R=()=>{s!==n.apiKey&&N({apiKey:s})},t[5]=s,t[6]=n.apiKey,t[7]=N,t[8]=R):R=t[8];const P=R;let O;t[9]!==c||t[10]!==n.description||t[11]!==N?(O=()=>{c!==n.description&&N({description:c||void 0})},t[9]=c,t[10]=n.description,t[11]=N,t[12]=O):O=t[12];const _=O;let A;t[13]!==n.previewUrl||t[14]!==d||t[15]!==N?(A=()=>{d!==n.previewUrl&&N({previewUrl:d||void 0})},t[13]=n.previewUrl,t[14]=d,t[15]=N,t[16]=A):A=t[16];const D=A;let M;t[17]!==N?(M=e=>{const t=e;p(t),N({cacheStrategy:t})},t[17]=N,t[18]=M):M=t[18];const L=M;let I;t[19]!==N?(I=e=>{g(e),N({isDraft:e})},t[19]=N,t[20]=I):I=t[20];const z=I;let F;t[21]!==N?(F=e=>{v(e),N({enableVersioning:e})},t[21]=N,t[22]=F):F=t[22];const B=F;let U;t[23]!==N?(U=e=>{x(e),N({isHidden:e})},t[23]=N,t[24]=U):U=t[24];const V=U;let $;t[25]!==s?($=()=>{navigator.clipboard.writeText(`/api/${s}`),Sf.success("API path copied to clipboard")},t[25]=s,t[26]=$):$=t[26];const H=$;let q,W,K,G,Y,Q,X;t[27]===Symbol.for("react.memo_cache_sentinel")?(q=(0,fc.jsx)(yj,{htmlFor:"apiKey",className:"text-xs font-bold text-gray-400 uppercase tracking-wider",children:"API Identifier"}),t[27]=q):q=t[27],t[28]!==s||t[29]!==P?(W=(0,fc.jsx)(gj,{id:"apiKey",value:s,onChange:j,onBlur:P,className:"font-mono text-sm bg-black border-white/10 focus:border-indigo-500/50 pr-12",placeholder:"e.g., blog_post"}),t[28]=s,t[29]=P,t[30]=W):W=t[30],t[31]===Symbol.for("react.memo_cache_sentinel")?(K=(0,fc.jsx)(xd,{className:"h-3.5 w-3.5"}),t[31]=K):K=t[31],t[32]!==H?(G=(0,fc.jsx)(Lj,{asChild:!0,children:(0,fc.jsx)(mj,{variant:"ghost",size:"icon",className:"absolute right-1 top-1/2 -translate-y-1/2 h-7 w-7",onClick:H,children:K})}),t[32]=H,t[33]=G):G=t[33],t[34]===Symbol.for("react.memo_cache_sentinel")?(Y=(0,fc.jsx)(Ij,{children:"Copy API path"}),t[34]=Y):Y=t[34],t[35]!==G?(Q=(0,fc.jsxs)(Mj,{children:[G,Y]}),t[35]=G,t[36]=Q):Q=t[36],t[37]!==W||t[38]!==Q?(X=(0,fc.jsxs)("div",{className:"relative",children:[W,Q]}),t[37]=W,t[38]=Q,t[39]=X):X=t[39];const J=s||"...";let Z,ee,te,ne,re,oe,ae,ie,se,le,ce,ue,de,fe,he,pe,me,ge,ye,ve,be,xe,we,Se,ke,Ee,Ce;t[40]!==J?(Z=(0,fc.jsxs)("p",{className:"text-[10px] text-gray-500",children:["Used in API endpoints:"," ",(0,fc.jsxs)("code",{className:"text-indigo-400",children:["/api/",J]})]}),t[40]=J,t[41]=Z):Z=t[41],t[42]!==X||t[43]!==Z?(ee=(0,fc.jsxs)("div",{className:"space-y-2",children:[q,X,Z]}),t[42]=X,t[43]=Z,t[44]=ee):ee=t[44],t[45]===Symbol.for("react.memo_cache_sentinel")?(te=(0,fc.jsx)(yj,{htmlFor:"description",className:"text-xs font-bold text-gray-400 uppercase tracking-wider",children:"Description"}),t[45]=te):te=t[45],t[46]===Symbol.for("react.memo_cache_sentinel")?(ne=e=>u(e.target.value),t[46]=ne):ne=t[46],t[47]!==c||t[48]!==_?(re=(0,fc.jsxs)("div",{className:"space-y-2",children:[te,(0,fc.jsx)(fR,{id:"description",value:c,onChange:ne,onBlur:_,className:"bg-black border-white/10 text-sm resize-none focus:border-indigo-500/50",rows:2,placeholder:"What is this content type for?"})]}),t[47]=c,t[48]=_,t[49]=re):re=t[49],t[50]===Symbol.for("react.memo_cache_sentinel")?(oe=(0,fc.jsx)(yj,{htmlFor:"previewUrl",className:"text-xs font-bold text-gray-400 uppercase tracking-wider",children:"Preview URL Pattern"}),t[50]=oe):oe=t[50],t[51]===Symbol.for("react.memo_cache_sentinel")?(ae=e=>f(e.target.value),t[51]=ae):ae=t[51],t[52]!==D||t[53]!==d?(ie=(0,fc.jsx)(gj,{id:"previewUrl",value:d,onChange:ae,onBlur:D,className:"font-mono text-sm bg-black border-white/10 focus:border-indigo-500/50",placeholder:"/preview/{slug}"}),t[52]=D,t[53]=d,t[54]=ie):ie=t[54],t[55]===Symbol.for("react.memo_cache_sentinel")?(se=(0,fc.jsx)("code",{className:"text-indigo-400",children:"{slug}"}),t[55]=se):se=t[55],t[56]===Symbol.for("react.memo_cache_sentinel")?(le=(0,fc.jsxs)("p",{className:"text-[10px] text-gray-500",children:["Use ",se," or"," ",(0,fc.jsx)("code",{className:"text-indigo-400",children:"{id}"})," as placeholders"]}),t[56]=le):le=t[56],t[57]!==ie?(ce=(0,fc.jsxs)("div",{className:"space-y-2",children:[oe,ie,le]}),t[57]=ie,t[58]=ce):ce=t[58],t[59]!==ee||t[60]!==re||t[61]!==ce?(ue=(0,fc.jsxs)("div",{className:"space-y-4",children:[ee,re,ce]}),t[59]=ee,t[60]=re,t[61]=ce,t[62]=ue):ue=t[62],t[63]===Symbol.for("react.memo_cache_sentinel")?(de=(0,fc.jsx)(Aj,{className:"bg-white/5"}),t[63]=de):de=t[63],t[64]===Symbol.for("react.memo_cache_sentinel")?(fe=(0,fc.jsxs)("h4",{className:"text-[10px] font-bold text-gray-400 uppercase tracking-wider flex items-center gap-1.5",children:[(0,fc.jsx)(uf,{className:"h-3 w-3"})," Cache Strategy"]}),t[64]=fe):fe=t[64],t[65]===Symbol.for("react.memo_cache_sentinel")?(he=(0,fc.jsx)(wj,{className:"bg-black border-white/10 text-sm",children:(0,fc.jsx)(xj,{placeholder:"Select cache strategy"})}),t[65]=he):he=t[65],t[66]===Symbol.for("react.memo_cache_sentinel")?(pe=(0,fc.jsx)(kj,{value:"stale-while-revalidate",children:(0,fc.jsxs)("div",{className:"flex flex-col",children:[(0,fc.jsx)("span",{children:"Stale-While-Revalidate"}),(0,fc.jsx)("span",{className:"text-[10px] text-gray-500",children:"Serve stale content while revalidating"})]})}),t[66]=pe):pe=t[66],t[67]===Symbol.for("react.memo_cache_sentinel")?(me=(0,fc.jsx)(kj,{value:"cache-first",children:(0,fc.jsxs)("div",{className:"flex flex-col",children:[(0,fc.jsx)("span",{children:"Cache First"}),(0,fc.jsx)("span",{className:"text-[10px] text-gray-500",children:"Serve from cache, fallback to network"})]})}),t[67]=me):me=t[67],t[68]===Symbol.for("react.memo_cache_sentinel")?(ge=(0,fc.jsxs)(Sj,{className:"bg-[#0A0B10] border-white/10",children:[pe,me,(0,fc.jsx)(kj,{value:"no-cache",children:(0,fc.jsxs)("div",{className:"flex flex-col",children:[(0,fc.jsx)("span",{children:"No Cache"}),(0,fc.jsx)("span",{className:"text-[10px] text-gray-500",children:"Always fetch fresh content"})]})})]}),t[68]=ge):ge=t[68],t[69]!==h||t[70]!==L?(ye=(0,fc.jsxs)("div",{className:"space-y-3",children:[fe,(0,fc.jsxs)(bj,{value:h,onValueChange:L,children:[he,ge]})]}),t[69]=h,t[70]=L,t[71]=ye):ye=t[71],t[72]===Symbol.for("react.memo_cache_sentinel")?(ve=(0,fc.jsx)(Aj,{className:"bg-white/5"}),t[72]=ve):ve=t[72],t[73]===Symbol.for("react.memo_cache_sentinel")?(be=(0,fc.jsx)("span",{children:"Advanced Settings"}),t[73]=be):be=t[73],t[74]!==a?(xe=(0,fc.jsx)(pR,{asChild:!0,children:(0,fc.jsxs)(mj,{variant:"ghost",className:"w-full flex items-center justify-between text-xs font-bold text-gray-400 uppercase tracking-wider hover:text-white p-0 h-auto",children:[be,a?(0,fc.jsx)(md,{className:"h-4 w-4"}):(0,fc.jsx)(gd,{className:"h-4 w-4"})]})}),t[74]=a,t[75]=xe):xe=t[75],t[76]===Symbol.for("react.memo_cache_sentinel")?(we=(0,fc.jsxs)("div",{className:"space-y-0.5",children:[(0,fc.jsx)(yj,{className:"text-sm text-gray-300",children:"Draft Mode"}),(0,fc.jsx)("p",{className:"text-[10px] text-gray-500",children:"Content won't appear in production"})]}),t[76]=we):we=t[76],t[77]!==z||t[78]!==m?(Se=(0,fc.jsxs)("div",{className:"flex items-center justify-between",children:[we,(0,fc.jsx)(vj,{checked:m,onCheckedChange:z})]}),t[77]=z,t[78]=m,t[79]=Se):Se=t[79],t[80]===Symbol.for("react.memo_cache_sentinel")?(ke=(0,fc.jsxs)("div",{className:"space-y-0.5",children:[(0,fc.jsx)(yj,{className:"text-sm text-gray-300",children:"Enable Versioning"}),(0,fc.jsx)("p",{className:"text-[10px] text-gray-500",children:"Keep revision history for rollbacks"})]}),t[80]=ke):ke=t[80],t[81]!==y||t[82]!==B?(Ee=(0,fc.jsxs)("div",{className:"flex items-center justify-between",children:[ke,(0,fc.jsx)(vj,{checked:y,onCheckedChange:B})]}),t[81]=y,t[82]=B,t[83]=Ee):Ee=t[83],t[84]===Symbol.for("react.memo_cache_sentinel")?(Ce=(0,fc.jsx)(yj,{className:"text-xs font-bold text-gray-400 uppercase tracking-wider",children:"Visibility"}),t[84]=Ce):Ce=t[84];const Ne=b?"default":"outline";let Te,je,Re;t[85]!==V?(Te=()=>V(!0),t[85]=V,t[86]=Te):Te=t[86],t[87]===Symbol.for("react.memo_cache_sentinel")?(je=(0,fc.jsx)(Ed,{className:"h-3.5 w-3.5 mr-1"}),t[87]=je):je=t[87],t[88]!==Ne||t[89]!==Te?(Re=(0,fc.jsxs)(mj,{variant:Ne,size:"sm",className:"flex-1",onClick:Te,children:[je," Hidden"]}),t[88]=Ne,t[89]=Te,t[90]=Re):Re=t[90];const Pe=b?"outline":"default";let Oe,_e,Ae,De,Me,Le,Ie,ze,Fe,Be,Ue,Ve,$e,He,qe,We;t[91]!==V?(Oe=()=>V(!1),t[91]=V,t[92]=Oe):Oe=t[92],t[93]===Symbol.for("react.memo_cache_sentinel")?(_e=(0,fc.jsx)(Cd,{className:"h-3.5 w-3.5 mr-1"}),t[93]=_e):_e=t[93],t[94]!==Pe||t[95]!==Oe?(Ae=(0,fc.jsxs)(mj,{variant:Pe,size:"sm",className:"flex-1",onClick:Oe,children:[_e," Visible"]}),t[94]=Pe,t[95]=Oe,t[96]=Ae):Ae=t[96],t[97]!==Re||t[98]!==Ae?(De=(0,fc.jsxs)("div",{className:"space-y-2",children:[Ce,(0,fc.jsxs)("div",{className:"flex gap-2",children:[Re,Ae]})]}),t[97]=Re,t[98]=Ae,t[99]=De):De=t[99],t[100]!==Se||t[101]!==Ee||t[102]!==De?(Me=(0,fc.jsxs)(mR,{className:"space-y-4 pt-4",children:[Se,Ee,De]}),t[100]=Se,t[101]=Ee,t[102]=De,t[103]=Me):Me=t[103],t[104]!==a||t[105]!==xe||t[106]!==Me?(Le=(0,fc.jsxs)(hR,{open:a,onOpenChange:i,children:[xe,Me]}),t[104]=a,t[105]=xe,t[106]=Me,t[107]=Le):Le=t[107],t[108]===Symbol.for("react.memo_cache_sentinel")?(Ie=(0,fc.jsx)(Aj,{className:"bg-white/5"}),t[108]=Ie):Ie=t[108],t[109]===Symbol.for("react.memo_cache_sentinel")?(ze=(0,fc.jsx)(vd,{className:"h-3 w-3"}),t[109]=ze):ze=t[109],t[110]!==n.createdAt?(Fe=n.createdAt?new Date(n.createdAt).toLocaleDateString():"—",t[110]=n.createdAt,t[111]=Fe):Fe=t[111],t[112]!==Fe?(Be=(0,fc.jsxs)("div",{className:"flex items-center gap-2",children:[ze,(0,fc.jsxs)("span",{children:["Created:"," ",Fe]})]}),t[112]=Fe,t[113]=Be):Be=t[113],t[114]===Symbol.for("react.memo_cache_sentinel")?(Ue=(0,fc.jsx)(wd,{className:"h-3 w-3"}),t[114]=Ue):Ue=t[114],t[115]!==n.updatedAt?(Ve=n.updatedAt?new Date(n.updatedAt).toLocaleDateString():"—",t[115]=n.updatedAt,t[116]=Ve):Ve=t[116],t[117]!==Ve?($e=(0,fc.jsxs)("div",{className:"flex items-center gap-2",children:[Ue,(0,fc.jsxs)("span",{children:["Updated:"," ",Ve]})]}),t[117]=Ve,t[118]=$e):$e=t[118],t[119]===Symbol.for("react.memo_cache_sentinel")?(He=(0,fc.jsx)(Ud,{className:"h-3 w-3"}),t[119]=He):He=t[119],t[120]!==n.type?(qe=(0,fc.jsxs)("div",{className:"flex items-center gap-2",children:[He,(0,fc.jsxs)("span",{children:["Type: ",n.type]})]}),t[120]=n.type,t[121]=qe):qe=t[121],t[122]!==Be||t[123]!==$e||t[124]!==qe?(We=(0,fc.jsxs)("div",{className:"space-y-2 text-[10px] text-gray-500",children:[Be,$e,qe]}),t[122]=Be,t[123]=$e,t[124]=qe,t[125]=We):We=t[125];const Ke=n.isDraft?"border-yellow-500/30 text-yellow-400":"border-green-500/30 text-green-400",Ge=n.isDraft?"Draft":"Published";let Ye,Qe,Xe;return t[126]!==Ke||t[127]!==Ge?(Ye=(0,fc.jsx)("div",{className:"flex justify-end",children:(0,fc.jsx)(_j,{variant:"outline",className:Ke,children:Ge})}),t[126]=Ke,t[127]=Ge,t[128]=Ye):Ye=t[128],t[129]===Symbol.for("react.memo_cache_sentinel")?(Qe=(0,fc.jsx)("p",{className:"text-[10px] text-gray-500 text-center",children:"Changes are saved automatically"}),t[129]=Qe):Qe=t[129],t[130]!==ue||t[131]!==ye||t[132]!==Le||t[133]!==We||t[134]!==Ye?(Xe=(0,fc.jsx)(Dj,{children:(0,fc.jsxs)("div",{className:"space-y-6",children:[ue,de,ye,ve,Le,Ie,We,Ye,Qe]})}),t[130]=ue,t[131]=ye,t[132]=Le,t[133]=We,t[134]=Ye,t[135]=Xe):Xe=t[135],Xe}var kR=[{label:"Page Builder",types:[{type:"SECTION",label:"Section (Repeatable)",icon:(0,fc.jsx)(id,{className:"h-4 w-4"})}]},{label:"Text",types:[{type:"TEXT_SHORT",label:"Short Text",icon:(0,fc.jsx)(af,{className:"h-4 w-4"})},{type:"TEXT_LONG",label:"Long Text",icon:(0,fc.jsx)(cd,{className:"h-4 w-4"})},{type:"RICH_TEXT",label:"Rich Text",icon:(0,fc.jsx)(Dd,{className:"h-4 w-4"})},{type:"SLUG",label:"Slug",icon:(0,fc.jsx)(zd,{className:"h-4 w-4"})},{type:"PASSWORD",label:"Password",icon:(0,fc.jsx)(Ud,{className:"h-4 w-4"})}]},{label:"Numeric",types:[{type:"NUMBER",label:"Number",icon:(0,fc.jsx)(Ad,{className:"h-4 w-4"})},{type:"PERCENT",label:"Percent",icon:(0,fc.jsx)(Wd,{className:"h-4 w-4"})},{type:"CURRENCY",label:"Currency",icon:(0,fc.jsx)(Sd,{className:"h-4 w-4"})},{type:"RATING",label:"Rating",icon:(0,fc.jsx)(Zd,{className:"h-4 w-4"})},{type:"SCORE",label:"Score",icon:(0,fc.jsx)(of,{className:"h-4 w-4"})}]},{label:"Date & Time",types:[{type:"DATE",label:"Date",icon:(0,fc.jsx)(hd,{className:"h-4 w-4"})},{type:"DATE_TIME",label:"Date & Time",icon:(0,fc.jsx)(vd,{className:"h-4 w-4"})},{type:"TIME",label:"Time",icon:(0,fc.jsx)(vd,{className:"h-4 w-4"})}]},{label:"Media",types:[{type:"IMAGE",label:"Image",icon:(0,fc.jsx)(Ld,{className:"h-4 w-4"})},{type:"VIDEO",label:"Video",icon:(0,fc.jsx)(lf,{className:"h-4 w-4"})},{type:"AUDIO",label:"Audio",icon:(0,fc.jsx)(Hd,{className:"h-4 w-4"})},{type:"FILE",label:"File",icon:(0,fc.jsx)(Td,{className:"h-4 w-4"})},{type:"DOCUMENT",label:"Document",icon:(0,fc.jsx)(Td,{className:"h-4 w-4"})},{type:"GALLERY",label:"Gallery",icon:(0,fc.jsx)(ad,{className:"h-4 w-4"})},{type:"LOTTIE",label:"Lottie",icon:(0,fc.jsx)(dd,{className:"h-4 w-4"})}]},{label:"Selection",types:[{type:"BOOLEAN",label:"Boolean",icon:(0,fc.jsx)(nf,{className:"h-4 w-4"})},{type:"SELECT",label:"Select",icon:(0,fc.jsx)(Bd,{className:"h-4 w-4"})},{type:"MULTI_SELECT",label:"Multi Select",icon:(0,fc.jsx)(id,{className:"h-4 w-4"})},{type:"TAG_SELECT",label:"Tag Select",icon:(0,fc.jsx)(ef,{className:"h-4 w-4"})}]},{label:"Reference",types:[{type:"REFERENCE",label:"Reference",icon:(0,fc.jsx)(zd,{className:"h-4 w-4"})},{type:"REFERENCE_LIST",label:"Reference List",icon:(0,fc.jsx)(Bd,{className:"h-4 w-4"})},{type:"ASSET_SELECT",label:"Asset Select",icon:(0,fc.jsx)(Ld,{className:"h-4 w-4"})}]},{label:"Structured",types:[{type:"OBJECT",label:"Object",icon:(0,fc.jsx)(jd,{className:"h-4 w-4"})},{type:"LIST",label:"List",icon:(0,fc.jsx)(Bd,{className:"h-4 w-4"})},{type:"KEY_VALUE",label:"Key-Value",icon:(0,fc.jsx)(Id,{className:"h-4 w-4"})},{type:"MATRIX",label:"Matrix",icon:(0,fc.jsx)(ad,{className:"h-4 w-4"})},{type:"SORTABLE_LIST",label:"Sortable List",icon:(0,fc.jsx)(Bd,{className:"h-4 w-4"})}]},{label:"Geo",types:[{type:"LOCATION",label:"Location",icon:(0,fc.jsx)($d,{className:"h-4 w-4"})},{type:"COORDINATES",label:"Coordinates",icon:(0,fc.jsx)(Od,{className:"h-4 w-4"})},{type:"ADDRESS",label:"Address",icon:(0,fc.jsx)($d,{className:"h-4 w-4"})}]},{label:"Advanced",types:[{type:"COLOR",label:"Color",icon:(0,fc.jsx)(qd,{className:"h-4 w-4"})},{type:"GRADIENT",label:"Gradient",icon:(0,fc.jsx)(qd,{className:"h-4 w-4"})},{type:"ICON",label:"Icon",icon:(0,fc.jsx)(Jd,{className:"h-4 w-4"})},{type:"BLEND_MODE",label:"Blend Mode",icon:(0,fc.jsx)(id,{className:"h-4 w-4"})},{type:"FORMULA",label:"Formula",icon:(0,fc.jsx)(fd,{className:"h-4 w-4"})},{type:"CHART",label:"Chart",icon:(0,fc.jsx)(ed,{className:"h-4 w-4"})},{type:"JSON",label:"JSON",icon:(0,fc.jsx)(bd,{className:"h-4 w-4"})},{type:"CODE",label:"Code",icon:(0,fc.jsx)(bd,{className:"h-4 w-4"})},{type:"AI_GENERATED",label:"AI Generated",icon:(0,fc.jsx)(ud,{className:"h-4 w-4"})},{type:"WORKFLOW_STATE",label:"Workflow State",icon:(0,fc.jsx)(Pd,{className:"h-4 w-4"})}]}];function ER(e){const t=(0,S.c)(27),{nodeId:n,parentFieldId:r}=e,{addField:o}=nv(),[a,i]=(0,k.useState)(!1),[s,l]=(0,k.useState)("");let c,u,d,f,h,p;if(t[0]!==o||t[1]!==a||t[2]!==n||t[3]!==r||t[4]!==s){let e;t[9]!==s?(e=e=>({...e,types:e.types.filter(e=>e.label.toLowerCase().includes(s.toLowerCase())||e.type.toLowerCase().includes(s.toLowerCase()))}),t[9]=s,t[10]=e):e=t[10];const h=kR.map(e).filter(CR);let p;t[11]!==o||t[12]!==n||t[13]!==r?(p=e=>{o(n,e,r),i(!1),l("")},t[11]=o,t[12]=n,t[13]=r,t[14]=p):p=t[14];const m=p;let g,y;d="relative mt-4",t[15]!==a?(g=()=>i(!a),t[15]=a,t[16]=g):g=t[16],t[17]===Symbol.for("react.memo_cache_sentinel")?(y=(0,fc.jsx)(Gd,{className:"h-4 w-4"}),t[17]=y):y=t[17],t[18]!==g?(f=(0,fc.jsxs)("button",{onClick:g,className:"w-full py-3 rounded-xl border border-dashed border-white/10 hover:border-indigo-500/30 hover:bg-indigo-500/5 text-xs font-bold text-gray-500 hover:text-indigo-400 transition-all flex items-center justify-center gap-2",children:[y," Add Field"]}),t[18]=g,t[19]=f):f=t[19],c=xc,u=a&&(0,fc.jsxs)(qu.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"absolute left-0 right-0 pb-4 mt-2 w-120 max-h-125 overflow-hidden rounded-4xl border border-white/10 bg-[#0D0E12] shadow-2xl z-50",children:[(0,fc.jsx)("div",{className:"p-3 relative border-b border-white/5",children:(0,fc.jsx)("input",{"aria-label":"search field types",type:"text",placeholder:"Search field types...",value:s,onChange:e=>l(e.target.value),className:"w-full bg-muted-foreground/20 border border-white/10 rounded-full px-3 py-2 text-sm focus:border-indigo-500/50 focus:outline-none",autoFocus:!0})}),(0,fc.jsxs)("div",{className:"max-h-100 overflow-y-auto p-2 custom-scrollbar",children:[h.map(e=>(0,fc.jsxs)("div",{className:"mb-3",children:[(0,fc.jsx)("h4",{className:"text-[10px] font-bold text-gray-500 uppercase tracking-wider px-2 mb-1",children:e.label}),(0,fc.jsx)("div",{className:"grid grid-cols-3 gap-1",children:e.types.map(e=>(0,fc.jsxs)("button",{onClick:()=>m(e.type),className:"flex items-center gap-2 px-3 py-2 rounded-lg text-xs hover:bg-white/5 text-left transition-colors",children:[(0,fc.jsx)("span",{className:"text-gray-400",children:e.icon}),(0,fc.jsx)("span",{children:e.label})]},e.type))})]},e.label)),0===h.length&&(0,fc.jsx)("div",{className:"py-8 text-center text-gray-500 text-sm",children:"No field types found"})]})]}),t[0]=o,t[1]=a,t[2]=n,t[3]=r,t[4]=s,t[5]=c,t[6]=u,t[7]=d,t[8]=f}else c=t[5],u=t[6],d=t[7],f=t[8];return t[20]!==c||t[21]!==u?(h=(0,fc.jsx)(c,{children:u}),t[20]=c,t[21]=u,t[22]=h):h=t[22],t[23]!==d||t[24]!==f||t[25]!==h?(p=(0,fc.jsxs)("div",{className:d,children:[f,h]}),t[23]=d,t[24]=f,t[25]=h,t[26]=p):p=t[26],p}function CR(e){return e.types.length>0}function NR(e){const t=(0,S.c)(5),{projectId:n}=e;let r,o;return t[0]!==n?(r=(0,fc.jsx)(TR,{projectId:n}),t[0]=n,t[1]=r):r=t[1],t[2]!==n||t[3]!==r?(o=(0,fc.jsx)(tv,{projectId:n,children:r}),t[2]=n,t[3]=r,t[4]=o):o=t[4],o}function TR({projectId:e}){const{schema:t,selectedNodeId:n,setSelectedNodeId:r,selectedFieldId:o,setSelectedFieldId:a,syncStatus:i,isLoading:s,addNode:l,deleteNode:c,updateNode:u,reorderFields:d,importSchema:f}=nv(),[h,p]=(0,k.useState)("visual"),[m,g]=(0,k.useState)("sdk"),y=(0,k.useRef)(null),v=(0,k.useMemo)(()=>t.pages.find(e=>e.id===n)||t.collections.find(e=>e.id===n),[t.pages,t.collections,n]),b=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,k.useMemo)(()=>[...t].filter(e=>null!=e),[...t])}(re(Ge),re($e,{coordinateGetter:Qt}));return s?(0,fc.jsx)("div",{className:"flex h-full items-center justify-center",children:(0,fc.jsx)(Yd,{className:"h-8 w-8 animate-spin text-indigo-500"})}):(0,fc.jsxs)("div",{className:"flex h-screen relative w-screen overflow-hidden font-sans text-gray-200 bg-[#050505]",children:[(0,fc.jsx)("div",{className:"absolute inset-0 pointer-events-none",children:(0,fc.jsx)("div",{className:"absolute inset-0 opacity-10",style:{backgroundImage:"radial-gradient(rgba(255, 255, 255, 0.15) 1px, transparent 1px)",backgroundSize:"24px 24px",maskImage:"linear-gradient(180deg, white, transparent)",WebkitMaskImage:"linear-gradient(180deg, white, transparent)"}})}),(0,fc.jsxs)("aside",{className:"flex w-80 flex-col border-r border-white/5 bg-[#030303]",children:[(0,fc.jsxs)("div",{className:"p-5 border-b border-white/5",children:[(0,fc.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,fc.jsxs)("h2",{className:"text-xs font-bold tracking-[0.2em] text-gray-500 uppercase flex items-center gap-2",children:[(0,fc.jsx)(wd,{className:"h-3.5 w-3.5"})," Content Model"]}),(0,fc.jsxs)("div",{className:"flex gap-1",children:[(0,fc.jsx)("button",{onClick:()=>{const n=new Blob([JSON.stringify(t,null,2)],{type:"application/json"}),r=URL.createObjectURL(n),o=document.createElement("a");o.href=r,o.download=`schema-${e}.json`,o.click(),URL.revokeObjectURL(r),Sf.success("Schema exported successfully")},className:"p-1.5 rounded-md hover:bg-white/5",title:"Export Schema",children:(0,fc.jsx)(kd,{className:"h-4 w-4"})}),(0,fc.jsxs)("label",{className:"p-1.5 rounded-md hover:bg-white/5 cursor-pointer",title:"Import Schema",children:[(0,fc.jsx)("input",{type:"file",accept:".json",className:"hidden",ref:y,onChange:e=>{const t=e.target.files?.[0];if(!t)return;const n=new FileReader;n.onload=e=>{try{f(JSON.parse(e.target?.result))}catch{Sf.error("Invalid JSON schema")}y.current&&(y.current.value="")},n.readAsText(t)}}),(0,fc.jsx)(sf,{className:"h-4 w-4"})]})]})]}),(0,fc.jsxs)("div",{className:"flex gap-2",children:[(0,fc.jsxs)("button",{onClick:()=>l("SINGLETON"),className:"flex-1 flex items-center justify-center gap-2 rounded-lg border border-white/5 bg-white/5 py-2 text-xs font-semibold hover:bg-white/10",children:[(0,fc.jsx)(ld,{className:"h-3.5 w-3.5 text-cyan-400"})," + Page"]}),(0,fc.jsxs)("button",{onClick:()=>l("COLLECTION"),className:"flex-1 flex items-center justify-center gap-2 rounded-lg border border-white/5 bg-white/5 py-2 text-xs font-semibold hover:bg-white/10",children:[(0,fc.jsx)(id,{className:"h-3.5 w-3.5 text-purple-400"})," + Collection"]})]})]}),(0,fc.jsxs)("div",{className:"flex-1 overflow-y-auto p-3 space-y-4 custom-scrollbar",children:[(0,fc.jsxs)("div",{className:"space-y-1",children:[(0,fc.jsxs)("div",{className:"px-3 pb-1 text-[10px] font-bold text-gray-500 uppercase tracking-wider flex items-center gap-1.5",children:[(0,fc.jsx)(Nd,{className:"h-3 w-3"})," Pages (Singletons)"]}),0===t.pages.length&&(0,fc.jsx)("p",{className:"text-xs text-gray-600 px-3 italic",children:"No pages created."}),t.pages.map(e=>(0,fc.jsx)(jR,{node:e,isSelected:n===e.id,onSelect:()=>{r(e.id),a(null)},onDelete:()=>c(e.id)},e.id))]}),(0,fc.jsxs)("div",{className:"space-y-1",children:[(0,fc.jsxs)("div",{className:"px-3 pb-1 text-[10px] font-bold text-gray-500 uppercase tracking-wider flex items-center gap-1.5 mt-2",children:[(0,fc.jsx)(wd,{className:"h-3 w-3"})," Collections"]}),0===t.collections.length&&(0,fc.jsx)("p",{className:"text-xs text-gray-600 px-3 italic",children:"No collections created."}),t.collections.map(e=>(0,fc.jsx)(jR,{node:e,isSelected:n===e.id,onSelect:()=>{r(e.id),a(null)},onDelete:()=>c(e.id)},e.id))]})]}),(0,fc.jsxs)("div",{className:"p-4 border-t border-white/5 space-y-3.5 shrink-0",children:["saved"===i?(0,fc.jsxs)("div",{className:"flex items-center gap-1.5 justify-center py-1.5 rounded-lg bg-emerald-500/10 border border-emerald-500/20 text-emerald-400 text-[10px] font-bold uppercase tracking-wider",children:[(0,fc.jsx)(nd,{className:"h-3.5 w-3.5"})," Local Changes Saved (.nx)"]}):"saving"===i?(0,fc.jsxs)("div",{className:"flex items-center gap-1.5 justify-center py-1.5 rounded-lg bg-yellow-500/10 border border-yellow-500/20 text-yellow-400 text-[10px] font-bold uppercase tracking-wider",children:[(0,fc.jsx)(Yd,{className:"h-3.5 w-3.5 animate-spin"})," Auto-Saving Draft..."]}):(0,fc.jsxs)("div",{className:"flex items-center gap-1.5 justify-center py-1.5 rounded-lg bg-white/3 border border-white/5 text-gray-500 text-[10px] font-bold uppercase tracking-wider",children:[(0,fc.jsx)(td,{className:"h-3.5 w-3.5"})," Local Staging Idle"]}),(0,fc.jsxs)("div",{className:"rounded-xl border border-white/5 bg-white/2 p-4 space-y-3 select-none",children:[(0,fc.jsxs)("div",{children:[(0,fc.jsx)("p",{className:"text-[9px] font-bold text-gray-500 uppercase tracking-widest",children:"Publish Protocol"}),(0,fc.jsx)("p",{className:"text-[11px] text-gray-400 leading-relaxed mt-1 font-sans",children:"Content is compiled locally into secure binaries. Run these commands in your project terminal to sync live:"})]}),(0,fc.jsxs)("div",{className:"space-y-2 pt-1",children:[(0,fc.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,fc.jsx)("span",{className:"text-[9px] text-gray-600 uppercase font-mono font-bold tracking-wider",children:"1. View Local Changes"}),(0,fc.jsx)("code",{className:"bg-[#090A0F] text-[10px] font-mono text-cyan-400 p-2 rounded-lg border border-white/5 select-all",children:"npx nexus diff"})]}),(0,fc.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,fc.jsx)("span",{className:"text-[9px] text-gray-600 uppercase font-mono font-bold tracking-wider",children:"2. Push Content Live"}),(0,fc.jsx)("code",{className:"bg-[#090A0F] text-[10px] font-mono text-purple-400 p-2 rounded-lg border border-white/5 select-all",children:"npx nexus push"})]})]})]})]})]}),(0,fc.jsxs)("main",{className:"flex-1 relative flex flex-col overflow-hidden bg-neutral-900/50",children:[(0,fc.jsxs)("header",{className:"h-14 flex items-center bg-[#030303]/30 justify-between px-6 border-b border-white/5 shrink-0",children:[(0,fc.jsxs)("div",{className:"flex justify-between items-center gap-4",children:[(0,fc.jsx)("h1",{className:"text-sm min-w-30 font-medium text-white m-0",children:v?.name||"Select a node"}),(0,fc.jsx)("div",{className:"flex rounded-full border border-white/5 bg-white/5 p-0.5",children:["visual","json","preview"].map(e=>(0,fc.jsx)("button",{onClick:()=>p(e),className:Zh("rounded-full px-3 py-1 text-[10px] font-bold uppercase cursor-pointer",h===e?"bg-gray-800 text-white":"text-gray-500"),children:e},e))})]}),(0,fc.jsxs)("div",{className:"flex items-center gap-3",children:[(0,fc.jsx)("div",{className:"h-4 w-px bg-white/10"}),(0,fc.jsxs)("div",{className:"flex items-center gap-1 text-[10px] text-gray-500",children:[(0,fc.jsx)(Md,{className:"h-3 w-3"}),(0,fc.jsxs)("span",{children:["v",v?.version||"1.0.0"]})]})]})]}),(0,fc.jsxs)("div",{className:"flex-1 overflow-hidden flex min-h-0",children:[(0,fc.jsx)("div",{className:"flex-1 overflow-y-auto p-6 custom-scrollbar min-h-0",children:(0,fc.jsx)(xc,{mode:"wait",children:v&&"visual"===h?(0,fc.jsxs)(qu.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"max-w-3xl mx-auto",children:[(0,fc.jsxs)("div",{className:"mb-8",children:[(0,fc.jsxs)("div",{className:"flex items-center gap-2 text-[10px] font-mono text-purple-400 uppercase tracking-widest mb-1",children:[(0,fc.jsx)(wd,{className:"h-3 w-3"})," ",v.type," NODE"]}),(0,fc.jsx)("input",{value:v.name,onChange:e=>u(v.id,{name:e.target.value}),className:"bg-transparent text-3xl font-bold text-white outline-none border-b border-transparent focus:border-white/10 pb-2 w-full"})]}),(0,fc.jsx)(Tt,{sensors:b,collisionDetection:de,onDragEnd:e=>{const{active:t,over:n}=e;if(!v||!n||t.id===n.id)return;const r=v.fields.findIndex(e=>e.id===t.id),o=v.fields.findIndex(e=>e.id===n.id);if(-1===r||-1===o)return;const a=_t(v.fields,r,o);d(v.id,a)},children:(0,fc.jsx)(Bt,{items:v.fields.map(e=>e.id),strategy:It,children:(0,fc.jsx)("div",{className:"space-y-2",children:v.fields.map(e=>(0,fc.jsx)(tR,{field:e,nodeId:v.id,onSelect:()=>a(e.id),isSelected:o===e.id},e.id))})})}),(0,fc.jsx)(ER,{nodeId:v.id})]},v.id):v&&"json"===h?(0,fc.jsx)(qu.div,{className:"h-full bg-black/20 p-5 font-mono text-sm overflow-auto",children:(0,fc.jsx)("pre",{className:"text-indigo-300 whitespace-pre-wrap",children:JSON.stringify(t,null,2)})},"json"):v&&"preview"===h?(0,fc.jsx)(gR,{node:v,projectId:e}):(0,fc.jsxs)("div",{className:"h-full flex flex-col items-center justify-center opacity-20",children:[(0,fc.jsx)(Zu,{className:"h-20 w-20 mb-4"}),(0,fc.jsx)("p",{className:"text-xl font-black uppercase tracking-widest",children:"Select or create a node"})]})})}),(0,fc.jsxs)("aside",{className:"w-96 border-l border-white/5 bg-[#030303]/30 flex flex-col",children:[(0,fc.jsxs)("div",{className:"border-b border-white/5 flex shrink-0",children:[(0,fc.jsx)("button",{onClick:()=>{g("sdk"),a(null)},className:Zh("flex-1 py-3 text-[10px] font-bold uppercase tracking-wider cursor-pointer","sdk"===m?"text-white border-b-2 border-indigo-500":"text-gray-600"),children:"SDK"}),(0,fc.jsx)("button",{onClick:()=>{g("config"),a(null)},className:Zh("flex-1 py-3 text-[10px] font-bold uppercase tracking-wider cursor-pointer","config"===m?"text-white border-b-2 border-indigo-500":"text-gray-600"),children:"Config"})]}),(0,fc.jsx)("div",{className:"flex-1 overflow-y-auto p-5 custom-scrollbar min-h-0",children:"sdk"===m&&v?(0,fc.jsx)(aR,{node:v}):"config"===m&&v?(0,fc.jsx)(SR,{node:v,onUpdate:u}):(0,fc.jsx)("div",{className:"text-center text-gray-500 text-sm mt-8",children:"Select a node first"})})]})]})]})]})}function jR(e){const t=(0,S.c)(26),{node:n,isSelected:r,onSelect:o,onDelete:a}=e,i=r?"bg-indigo-600/15 ":"hover:bg-white/5 ";let s;t[0]!==i?(s=Zh("group rounded-xl transition-all",i),t[0]=i,t[1]=s):s=t[1];const l="SINGLETON"===n.type?"bg-cyan-400":"bg-purple-400";let c,u;t[2]!==l?(c=Zh("h-2 w-2 rounded-full",l),t[2]=l,t[3]=c):c=t[3],t[4]!==c?(u=(0,fc.jsx)("div",{className:c}),t[4]=c,t[5]=u):u=t[5];const d=n.name||"Untitled";let f,h,p,m,g,y,v,b;return t[6]!==d?(f=(0,fc.jsx)("p",{className:"text-sm font-medium truncate",children:d}),t[6]=d,t[7]=f):f=t[7],t[8]!==n.apiKey?(h=(0,fc.jsxs)("p",{className:"text-[10px] text-gray-500 truncate",children:["/",n.apiKey]}),t[8]=n.apiKey,t[9]=h):h=t[9],t[10]!==f||t[11]!==h?(p=(0,fc.jsxs)("div",{className:"overflow-hidden",children:[f,h]}),t[10]=f,t[11]=h,t[12]=p):p=t[12],t[13]!==o||t[14]!==u||t[15]!==p?(m=(0,fc.jsxs)("button",{onClick:o,className:"flex-1 flex cursor-pointer px-3 py-2.5 items-center gap-3 text-left",children:[u,p]}),t[13]=o,t[14]=u,t[15]=p,t[16]=m):m=t[16],t[17]===Symbol.for("react.memo_cache_sentinel")?(g=(0,fc.jsx)(rf,{className:"h-3.5 w-3.5"}),t[17]=g):g=t[17],t[18]!==a?(y=(0,fc.jsx)("div",{className:"flex items-center opacity-0 group-hover:opacity-100 transition-opacity",children:(0,fc.jsx)("button",{onClick:a,className:"p-1 hover:text-red-400 pr-5 cursor-pointer",title:"Delete",children:g})}),t[18]=a,t[19]=y):y=t[19],t[20]!==m||t[21]!==y?(v=(0,fc.jsxs)("div",{className:"flex items-center ",children:[m,y]}),t[20]=m,t[21]=y,t[22]=v):v=t[22],t[23]!==v||t[24]!==s?(b=(0,fc.jsx)("div",{className:s,children:v}),t[23]=v,t[24]=s,t[25]=b):b=t[25],b}function RR(){const e=(0,S.c)(15),[t,n]=(0,k.useState)(null),[r,o]=(0,k.useState)(null);let a,i,s,l,c;if(e[0]===Symbol.for("react.memo_cache_sentinel")?(a=()=>{Gy.get("/context").then(e=>{e.data.projectId?(n(e.data.projectId),document.documentElement.classList.add("dark")):o("No Project ID found in CLI context.")}).catch(e=>{o(e.response?.data?.error||e.message||"Failed to connect to Local CLI.")})},i=[],e[0]=a,e[1]=i):(a=e[0],i=e[1]),(0,k.useEffect)(a,i),r){let t,n,o,a,i;return e[2]===Symbol.for("react.memo_cache_sentinel")?(t=(0,fc.jsx)(td,{className:"h-12 w-12 text-red-500 mb-4"}),n=(0,fc.jsx)("h1",{className:"text-xl font-bold mb-2",children:"Studio Initialization Failed"}),e[2]=t,e[3]=n):(t=e[2],n=e[3]),e[4]!==r?(o=(0,fc.jsx)("p",{className:"text-gray-400 font-mono text-sm",children:r}),e[4]=r,e[5]=o):o=e[5],e[6]===Symbol.for("react.memo_cache_sentinel")?(a=(0,fc.jsx)("p",{className:"text-gray-500 text-xs mt-4",children:"Make sure you are running 'npx nexus studio'"}),e[6]=a):a=e[6],e[7]!==o?(i=(0,fc.jsxs)("div",{className:"h-screen w-screen flex flex-col items-center justify-center bg-[#050505] text-white",children:[t,n,o,a]}),e[7]=o,e[8]=i):i=e[8],i}if(!t){let t;return e[9]===Symbol.for("react.memo_cache_sentinel")?(t=(0,fc.jsxs)("div",{className:"h-screen w-screen flex flex-col items-center justify-center bg-[#050505] text-white",children:[(0,fc.jsx)(sd,{className:"h-8 w-8 animate-spin text-cyan-500 mb-4"}),(0,fc.jsx)("p",{className:"text-sm text-gray-400 tracking-widest uppercase",children:"Connecting to CLI Gateway..."})]}),e[9]=t):t=e[9],t}return e[10]!==t?(s=(0,fc.jsx)(NR,{projectId:t}),e[10]=t,e[11]=s):s=e[11],e[12]===Symbol.for("react.memo_cache_sentinel")?(l=(0,fc.jsx)(Pf,{theme:"dark",position:"bottom-right"}),e[12]=l):l=e[12],e[13]!==s?(c=(0,fc.jsxs)(fc.Fragment,{children:[s,l]}),e[13]=s,e[14]=c):c=e[14],c}var PR=new class{#Y;#c;#w;#Q;#X;#J;#Z;#ee;constructor(e={}){this.#Y=e.queryCache||new Wp,this.#c=e.mutationCache||new Kp,this.#w=e.defaultOptions||{},this.#Q=new Map,this.#X=new Map,this.#J=0}mount(){this.#J++,1===this.#J&&(this.#Z=Pp.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#Y.onFocus())}),this.#ee=Op.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#Y.onOnline())}))}unmount(){this.#J--,0===this.#J&&(this.#Z?.(),this.#Z=void 0,this.#ee?.(),this.#ee=void 0)}isFetching(e){return this.#Y.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#c.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#Y.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=this.#Y.build(this,t),r=n.state.data;return void 0===r?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(ip(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#Y.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),o=this.#Y.get(r.queryHash)?.state.data,a=function(e,t){return"function"==typeof e?e(t):e}(t,o);if(void 0!==a)return this.#Y.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return Tp.batch(()=>this.#Y.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#Y.get(t.queryHash)?.state}removeQueries(e){const t=this.#Y;Tp.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){const n=this.#Y;return Tp.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Tp.batch(()=>this.#Y.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(rp).catch(rp)}invalidateQueries(e,t={}){return Tp.batch(()=>(this.#Y.findAll(e).forEach(e=>{e.invalidate()}),"none"===e?.refetchType?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Tp.batch(()=>this.#Y.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(rp)),"paused"===e.state.fetchStatus?Promise.resolve():t}));return Promise.all(r).then(rp)}fetchQuery(e){const t=this.defaultQueryOptions(e);void 0===t.retry&&(t.retry=!1);const n=this.#Y.build(this,t);return n.isStaleByTime(ip(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(rp).catch(rp)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(rp).catch(rp)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return Op.isOnline()?this.#c.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#Y}getMutationCache(){return this.#c}getDefaultOptions(){return this.#w}setDefaultOptions(e){this.#w=e}setQueryDefaults(e,t){this.#Q.set(dp(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#Q.values()],n={};return t.forEach(t=>{fp(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#X.set(dp(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#X.values()],n={};return t.forEach(t=>{fp(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#w.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=up(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.throwOnError&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Sp&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#w.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#Y.clear(),this.#c.clear()}}({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1}}});w.createRoot(document.getElementById("root")).render((0,fc.jsx)(k.StrictMode,{children:(0,fc.jsx)(nm,{client:PR,children:(0,fc.jsx)(RR,{})})}));
|