@concavejs/cli 0.0.1-alpha.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/dashboard/dashboard.js +1 -0
- package/dist/assets/manifest.json +54 -0
- package/dist/assets/runtime-bun/server/index.js +25049 -0
- package/dist/assets/runtime-cf/runtime.bundle.js +46626 -0
- package/dist/assets/runtime-node/server/index.js +27819 -0
- package/dist/cli.js +12332 -0
- package/package.json +37 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const DASHBOARD_HTML = "<!doctype html>\n<html lang=\"en\">\n <head>\n <meta charset=\"UTF-8\" />\n \n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n <title>Concave Dashboard</title>\n <script type=\"module\">\nfunction vD(e,t){for(var n=0;n<t.length;n++){const a=t[n];if(typeof a!=\"string\"&&!Array.isArray(a)){for(const o in a)if(o!==\"default\"&&!(o in e)){const s=Object.getOwnPropertyDescriptor(a,o);s&&Object.defineProperty(e,o,s.get?s:{enumerable:!0,get:()=>a[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:\"Module\"}))}(function(){const t=document.createElement(\"link\").relList;if(t&&t.supports&&t.supports(\"modulepreload\"))return;for(const o of document.querySelectorAll('link[rel=\"modulepreload\"]'))a(o);new MutationObserver(o=>{for(const s of o)if(s.type===\"childList\")for(const c of s.addedNodes)c.tagName===\"LINK\"&&c.rel===\"modulepreload\"&&a(c)}).observe(document,{childList:!0,subtree:!0});function n(o){const s={};return o.integrity&&(s.integrity=o.integrity),o.referrerPolicy&&(s.referrerPolicy=o.referrerPolicy),o.crossOrigin===\"use-credentials\"?s.credentials=\"include\":o.crossOrigin===\"anonymous\"?s.credentials=\"omit\":s.credentials=\"same-origin\",s}function a(o){if(o.ep)return;o.ep=!0;const s=n(o);fetch(o.href,s)}})();var Yf=typeof globalThis<\"u\"?globalThis:typeof window<\"u\"?window:typeof global<\"u\"?global:typeof self<\"u\"?self:{};function Ua(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,\"default\")?e.default:e}var fg={exports:{}},Su={};var jS;function yD(){if(jS)return Su;jS=1;var e=Symbol.for(\"react.transitional.element\"),t=Symbol.for(\"react.fragment\");function n(a,o,s){var c=null;if(s!==void 0&&(c=\"\"+s),o.key!==void 0&&(c=\"\"+o.key),\"key\"in o){s={};for(var u in o)u!==\"key\"&&(s[u]=o[u])}else s=o;return o=s.ref,{$$typeof:e,type:a,key:c,ref:o!==void 0?o:null,props:s}}return Su.Fragment=t,Su.jsx=n,Su.jsxs=n,Su}var zS;function bD(){return zS||(zS=1,fg.exports=yD()),fg.exports}var g=bD(),hg={exports:{}},ht={};var PS;function xD(){if(PS)return ht;PS=1;var e=Symbol.for(\"react.transitional.element\"),t=Symbol.for(\"react.portal\"),n=Symbol.for(\"react.fragment\"),a=Symbol.for(\"react.strict_mode\"),o=Symbol.for(\"react.profiler\"),s=Symbol.for(\"react.consumer\"),c=Symbol.for(\"react.context\"),u=Symbol.for(\"react.forward_ref\"),f=Symbol.for(\"react.suspense\"),h=Symbol.for(\"react.memo\"),v=Symbol.for(\"react.lazy\"),y=Symbol.for(\"react.activity\"),x=Symbol.iterator;function S(L){return L===null||typeof L!=\"object\"?null:(L=x&&L[x]||L[\"@@iterator\"],typeof L==\"function\"?L:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,R={};function k(L,X,Y){this.props=L,this.context=X,this.refs=R,this.updater=Y||w}k.prototype.isReactComponent={},k.prototype.setState=function(L,X){if(typeof L!=\"object\"&&typeof L!=\"function\"&&L!=null)throw Error(\"takes an object of state variables to update or a function which returns an object of state variables.\");this.updater.enqueueSetState(this,L,X,\"setState\")},k.prototype.forceUpdate=function(L){this.updater.enqueueForceUpdate(this,L,\"forceUpdate\")};function T(){}T.prototype=k.prototype;function M(L,X,Y){this.props=L,this.context=X,this.refs=R,this.updater=Y||w}var j=M.prototype=new T;j.constructor=M,C(j,k.prototype),j.isPureReactComponent=!0;var I=Array.isArray;function P(){}var A={H:null,A:null,T:null,S:null},q=Object.prototype.hasOwnProperty;function B(L,X,Y){var re=Y.ref;return{$$typeof:e,type:L,key:X,ref:re!==void 0?re:null,props:Y}}function V(L,X){return B(L.type,X,L.props)}function N(L){return typeof L==\"object\"&&L!==null&&L.$$typeof===e}function _(L){var X={\"=\":\"=0\",\":\":\"=2\"};return\"$\"+L.replace(/[=:]/g,function(Y){return X[Y]})}var z=/\\/+/g;function F(L,X){return typeof L==\"object\"&&L!==null&&L.key!=null?_(\"\"+L.key):X.toString(36)}function O(L){switch(L.status){case\"fulfilled\":return L.value;case\"rejected\":throw L.reason;default:switch(typeof L.status==\"string\"?L.then(P,P):(L.status=\"pending\",L.then(function(X){L.status===\"pending\"&&(L.status=\"fulfilled\",L.value=X)},function(X){L.status===\"pending\"&&(L.status=\"rejected\",L.reason=X)})),L.status){case\"fulfilled\":return L.value;case\"rejected\":throw L.reason}}throw L}function $(L,X,Y,re,Z){var oe=typeof L;(oe===\"undefined\"||oe===\"boolean\")&&(L=null);var ne=!1;if(L===null)ne=!0;else switch(oe){case\"bigint\":case\"string\":case\"number\":ne=!0;break;case\"object\":switch(L.$$typeof){case e:case t:ne=!0;break;case v:return ne=L._init,$(ne(L._payload),X,Y,re,Z)}}if(ne)return Z=Z(L),ne=re===\"\"?\".\"+F(L,0):re,I(Z)?(Y=\"\",ne!=null&&(Y=ne.replace(z,\"$&/\")+\"/\"),$(Z,X,Y,\"\",function(Fe){return Fe})):Z!=null&&(N(Z)&&(Z=V(Z,Y+(Z.key==null||L&&L.key===Z.key?\"\":(\"\"+Z.key).replace(z,\"$&/\")+\"/\")+ne)),X.push(Z)),1;ne=0;var me=re===\"\"?\".\":re+\":\";if(I(L))for(var Me=0;Me<L.length;Me++)re=L[Me],oe=me+F(re,Me),ne+=$(re,X,Y,oe,Z);else if(Me=S(L),typeof Me==\"function\")for(L=Me.call(L),Me=0;!(re=L.next()).done;)re=re.value,oe=me+F(re,Me++),ne+=$(re,X,Y,oe,Z);else if(oe===\"object\"){if(typeof L.then==\"function\")return $(O(L),X,Y,re,Z);throw X=String(L),Error(\"Objects are not valid as a React child (found: \"+(X===\"[object Object]\"?\"object with keys {\"+Object.keys(L).join(\", \")+\"}\":X)+\"). If you meant to render a collection of children, use an array instead.\")}return ne}function W(L,X,Y){if(L==null)return L;var re=[],Z=0;return $(L,re,\"\",\"\",function(oe){return X.call(Y,oe,Z++)}),re}function U(L){if(L._status===-1){var X=L._result;X=X(),X.then(function(Y){(L._status===0||L._status===-1)&&(L._status=1,L._result=Y)},function(Y){(L._status===0||L._status===-1)&&(L._status=2,L._result=Y)}),L._status===-1&&(L._status=0,L._result=X)}if(L._status===1)return L._result.default;throw L._result}var K=typeof reportError==\"function\"?reportError:function(L){if(typeof window==\"object\"&&typeof window.ErrorEvent==\"function\"){var X=new window.ErrorEvent(\"error\",{bubbles:!0,cancelable:!0,message:typeof L==\"object\"&&L!==null&&typeof L.message==\"string\"?String(L.message):String(L),error:L});if(!window.dispatchEvent(X))return}else if(typeof process==\"object\"&&typeof process.emit==\"function\"){process.emit(\"uncaughtException\",L);return}console.error(L)},ie={map:W,forEach:function(L,X,Y){W(L,function(){X.apply(this,arguments)},Y)},count:function(L){var X=0;return W(L,function(){X++}),X},toArray:function(L){return W(L,function(X){return X})||[]},only:function(L){if(!N(L))throw Error(\"React.Children.only expected to receive a single React element child.\");return L}};return ht.Activity=y,ht.Children=ie,ht.Component=k,ht.Fragment=n,ht.Profiler=o,ht.PureComponent=M,ht.StrictMode=a,ht.Suspense=f,ht.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=A,ht.__COMPILER_RUNTIME={__proto__:null,c:function(L){return A.H.useMemoCache(L)}},ht.cache=function(L){return function(){return L.apply(null,arguments)}},ht.cacheSignal=function(){return null},ht.cloneElement=function(L,X,Y){if(L==null)throw Error(\"The argument must be a React element, but you passed \"+L+\".\");var re=C({},L.props),Z=L.key;if(X!=null)for(oe in X.key!==void 0&&(Z=\"\"+X.key),X)!q.call(X,oe)||oe===\"key\"||oe===\"__self\"||oe===\"__source\"||oe===\"ref\"&&X.ref===void 0||(re[oe]=X[oe]);var oe=arguments.length-2;if(oe===1)re.children=Y;else if(1<oe){for(var ne=Array(oe),me=0;me<oe;me++)ne[me]=arguments[me+2];re.children=ne}return B(L.type,Z,re)},ht.createContext=function(L){return L={$$typeof:c,_currentValue:L,_currentValue2:L,_threadCount:0,Provider:null,Consumer:null},L.Provider=L,L.Consumer={$$typeof:s,_context:L},L},ht.createElement=function(L,X,Y){var re,Z={},oe=null;if(X!=null)for(re in X.key!==void 0&&(oe=\"\"+X.key),X)q.call(X,re)&&re!==\"key\"&&re!==\"__self\"&&re!==\"__source\"&&(Z[re]=X[re]);var ne=arguments.length-2;if(ne===1)Z.children=Y;else if(1<ne){for(var me=Array(ne),Me=0;Me<ne;Me++)me[Me]=arguments[Me+2];Z.children=me}if(L&&L.defaultProps)for(re in ne=L.defaultProps,ne)Z[re]===void 0&&(Z[re]=ne[re]);return B(L,oe,Z)},ht.createRef=function(){return{current:null}},ht.forwardRef=function(L){return{$$typeof:u,render:L}},ht.isValidElement=N,ht.lazy=function(L){return{$$typeof:v,_payload:{_status:-1,_result:L},_init:U}},ht.memo=function(L,X){return{$$typeof:h,type:L,compare:X===void 0?null:X}},ht.startTransition=function(L){var X=A.T,Y={};A.T=Y;try{var re=L(),Z=A.S;Z!==null&&Z(Y,re),typeof re==\"object\"&&re!==null&&typeof re.then==\"function\"&&re.then(P,K)}catch(oe){K(oe)}finally{X!==null&&Y.types!==null&&(X.types=Y.types),A.T=X}},ht.unstable_useCacheRefresh=function(){return A.H.useCacheRefresh()},ht.use=function(L){return A.H.use(L)},ht.useActionState=function(L,X,Y){return A.H.useActionState(L,X,Y)},ht.useCallback=function(L,X){return A.H.useCallback(L,X)},ht.useContext=function(L){return A.H.useContext(L)},ht.useDebugValue=function(){},ht.useDeferredValue=function(L,X){return A.H.useDeferredValue(L,X)},ht.useEffect=function(L,X){return A.H.useEffect(L,X)},ht.useEffectEvent=function(L){return A.H.useEffectEvent(L)},ht.useId=function(){return A.H.useId()},ht.useImperativeHandle=function(L,X,Y){return A.H.useImperativeHandle(L,X,Y)},ht.useInsertionEffect=function(L,X){return A.H.useInsertionEffect(L,X)},ht.useLayoutEffect=function(L,X){return A.H.useLayoutEffect(L,X)},ht.useMemo=function(L,X){return A.H.useMemo(L,X)},ht.useOptimistic=function(L,X){return A.H.useOptimistic(L,X)},ht.useReducer=function(L,X,Y){return A.H.useReducer(L,X,Y)},ht.useRef=function(L){return A.H.useRef(L)},ht.useState=function(L){return A.H.useState(L)},ht.useSyncExternalStore=function(L,X,Y){return A.H.useSyncExternalStore(L,X,Y)},ht.useTransition=function(){return A.H.useTransition()},ht.version=\"19.2.4\",ht}var LS;function cs(){return LS||(LS=1,hg.exports=xD()),hg.exports}var m=cs();const At=Ua(m),Vh=vD({__proto__:null,default:At},[m]);var mg={exports:{}},Cu={},pg={exports:{}},gg={};var IS;function wD(){return IS||(IS=1,(function(e){function t($,W){var U=$.length;$.push(W);e:for(;0<U;){var K=U-1>>>1,ie=$[K];if(0<o(ie,W))$[K]=W,$[U]=ie,U=K;else break e}}function n($){return $.length===0?null:$[0]}function a($){if($.length===0)return null;var W=$[0],U=$.pop();if(U!==W){$[0]=U;e:for(var K=0,ie=$.length,L=ie>>>1;K<L;){var X=2*(K+1)-1,Y=$[X],re=X+1,Z=$[re];if(0>o(Y,U))re<ie&&0>o(Z,Y)?($[K]=Z,$[re]=U,K=re):($[K]=Y,$[X]=U,K=X);else if(re<ie&&0>o(Z,U))$[K]=Z,$[re]=U,K=re;else break e}}return W}function o($,W){var U=$.sortIndex-W.sortIndex;return U!==0?U:$.id-W.id}if(e.unstable_now=void 0,typeof performance==\"object\"&&typeof performance.now==\"function\"){var s=performance;e.unstable_now=function(){return s.now()}}else{var c=Date,u=c.now();e.unstable_now=function(){return c.now()-u}}var f=[],h=[],v=1,y=null,x=3,S=!1,w=!1,C=!1,R=!1,k=typeof setTimeout==\"function\"?setTimeout:null,T=typeof clearTimeout==\"function\"?clearTimeout:null,M=typeof setImmediate<\"u\"?setImmediate:null;function j($){for(var W=n(h);W!==null;){if(W.callback===null)a(h);else if(W.startTime<=$)a(h),W.sortIndex=W.expirationTime,t(f,W);else break;W=n(h)}}function I($){if(C=!1,j($),!w)if(n(f)!==null)w=!0,P||(P=!0,_());else{var W=n(h);W!==null&&O(I,W.startTime-$)}}var P=!1,A=-1,q=5,B=-1;function V(){return R?!0:!(e.unstable_now()-B<q)}function N(){if(R=!1,P){var $=e.unstable_now();B=$;var W=!0;try{e:{w=!1,C&&(C=!1,T(A),A=-1),S=!0;var U=x;try{t:{for(j($),y=n(f);y!==null&&!(y.expirationTime>$&&V());){var K=y.callback;if(typeof K==\"function\"){y.callback=null,x=y.priorityLevel;var ie=K(y.expirationTime<=$);if($=e.unstable_now(),typeof ie==\"function\"){y.callback=ie,j($),W=!0;break t}y===n(f)&&a(f),j($)}else a(f);y=n(f)}if(y!==null)W=!0;else{var L=n(h);L!==null&&O(I,L.startTime-$),W=!1}}break e}finally{y=null,x=U,S=!1}W=void 0}}finally{W?_():P=!1}}}var _;if(typeof M==\"function\")_=function(){M(N)};else if(typeof MessageChannel<\"u\"){var z=new MessageChannel,F=z.port2;z.port1.onmessage=N,_=function(){F.postMessage(null)}}else _=function(){k(N,0)};function O($,W){A=k(function(){$(e.unstable_now())},W)}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($){$.callback=null},e.unstable_forceFrameRate=function($){0>$||125<$?console.error(\"forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported\"):q=0<$?Math.floor(1e3/$):5},e.unstable_getCurrentPriorityLevel=function(){return x},e.unstable_next=function($){switch(x){case 1:case 2:case 3:var W=3;break;default:W=x}var U=x;x=W;try{return $()}finally{x=U}},e.unstable_requestPaint=function(){R=!0},e.unstable_runWithPriority=function($,W){switch($){case 1:case 2:case 3:case 4:case 5:break;default:$=3}var U=x;x=$;try{return W()}finally{x=U}},e.unstable_scheduleCallback=function($,W,U){var K=e.unstable_now();switch(typeof U==\"object\"&&U!==null?(U=U.delay,U=typeof U==\"number\"&&0<U?K+U:K):U=K,$){case 1:var ie=-1;break;case 2:ie=250;break;case 5:ie=1073741823;break;case 4:ie=1e4;break;default:ie=5e3}return ie=U+ie,$={id:v++,callback:W,priorityLevel:$,startTime:U,expirationTime:ie,sortIndex:-1},U>K?($.sortIndex=U,t(h,$),n(f)===null&&$===n(h)&&(C?(T(A),A=-1):C=!0,O(I,U-K))):($.sortIndex=ie,t(f,$),w||S||(w=!0,P||(P=!0,_()))),$},e.unstable_shouldYield=V,e.unstable_wrapCallback=function($){var W=x;return function(){var U=x;x=W;try{return $.apply(this,arguments)}finally{x=U}}}})(gg)),gg}var HS;function SD(){return HS||(HS=1,pg.exports=wD()),pg.exports}var vg={exports:{}},mr={};var qS;function CD(){if(qS)return mr;qS=1;var e=cs();function t(f){var h=\"https://react.dev/errors/\"+f;if(1<arguments.length){h+=\"?args[]=\"+encodeURIComponent(arguments[1]);for(var v=2;v<arguments.length;v++)h+=\"&args[]=\"+encodeURIComponent(arguments[v])}return\"Minified React error #\"+f+\"; visit \"+h+\" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.\"}function n(){}var a={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},o=Symbol.for(\"react.portal\");function s(f,h,v){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:y==null?null:\"\"+y,children:f,containerInfo:h,implementation:v}}var c=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(f,h){if(f===\"font\")return\"\";if(typeof h==\"string\")return h===\"use-credentials\"?h:\"\"}return mr.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,mr.createPortal=function(f,h){var v=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(t(299));return s(f,h,null,v)},mr.flushSync=function(f){var h=c.T,v=a.p;try{if(c.T=null,a.p=2,f)return f()}finally{c.T=h,a.p=v,a.d.f()}},mr.preconnect=function(f,h){typeof f==\"string\"&&(h?(h=h.crossOrigin,h=typeof h==\"string\"?h===\"use-credentials\"?h:\"\":void 0):h=null,a.d.C(f,h))},mr.prefetchDNS=function(f){typeof f==\"string\"&&a.d.D(f)},mr.preinit=function(f,h){if(typeof f==\"string\"&&h&&typeof h.as==\"string\"){var v=h.as,y=u(v,h.crossOrigin),x=typeof h.integrity==\"string\"?h.integrity:void 0,S=typeof h.fetchPriority==\"string\"?h.fetchPriority:void 0;v===\"style\"?a.d.S(f,typeof h.precedence==\"string\"?h.precedence:void 0,{crossOrigin:y,integrity:x,fetchPriority:S}):v===\"script\"&&a.d.X(f,{crossOrigin:y,integrity:x,fetchPriority:S,nonce:typeof h.nonce==\"string\"?h.nonce:void 0})}},mr.preinitModule=function(f,h){if(typeof f==\"string\")if(typeof h==\"object\"&&h!==null){if(h.as==null||h.as===\"script\"){var v=u(h.as,h.crossOrigin);a.d.M(f,{crossOrigin:v,integrity:typeof h.integrity==\"string\"?h.integrity:void 0,nonce:typeof h.nonce==\"string\"?h.nonce:void 0})}}else h==null&&a.d.M(f)},mr.preload=function(f,h){if(typeof f==\"string\"&&typeof h==\"object\"&&h!==null&&typeof h.as==\"string\"){var v=h.as,y=u(v,h.crossOrigin);a.d.L(f,v,{crossOrigin:y,integrity:typeof h.integrity==\"string\"?h.integrity:void 0,nonce:typeof h.nonce==\"string\"?h.nonce:void 0,type:typeof h.type==\"string\"?h.type:void 0,fetchPriority:typeof h.fetchPriority==\"string\"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy==\"string\"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet==\"string\"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes==\"string\"?h.imageSizes:void 0,media:typeof h.media==\"string\"?h.media:void 0})}},mr.preloadModule=function(f,h){if(typeof f==\"string\")if(h){var v=u(h.as,h.crossOrigin);a.d.m(f,{as:typeof h.as==\"string\"&&h.as!==\"script\"?h.as:void 0,crossOrigin:v,integrity:typeof h.integrity==\"string\"?h.integrity:void 0})}else a.d.m(f)},mr.requestFormReset=function(f){a.d.r(f)},mr.unstable_batchedUpdates=function(f,h){return f(h)},mr.useFormState=function(f,h,v){return c.H.useFormState(f,h,v)},mr.useFormStatus=function(){return c.H.useHostTransitionStatus()},mr.version=\"19.2.4\",mr}var FS;function iM(){if(FS)return vg.exports;FS=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>\"u\"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=\"function\"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),vg.exports=CD(),vg.exports}var $S;function RD(){if($S)return Cu;$S=1;var e=SD(),t=cs(),n=iM();function a(r){var i=\"https://react.dev/errors/\"+r;if(1<arguments.length){i+=\"?args[]=\"+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)i+=\"&args[]=\"+encodeURIComponent(arguments[l])}return\"Minified React error #\"+r+\"; visit \"+i+\" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.\"}function o(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function s(r){var i=r,l=r;if(r.alternate)for(;i.return;)i=i.return;else{r=i;do i=r,(i.flags&4098)!==0&&(l=i.return),r=i.return;while(r)}return i.tag===3?l:null}function c(r){if(r.tag===13){var i=r.memoizedState;if(i===null&&(r=r.alternate,r!==null&&(i=r.memoizedState)),i!==null)return i.dehydrated}return null}function u(r){if(r.tag===31){var i=r.memoizedState;if(i===null&&(r=r.alternate,r!==null&&(i=r.memoizedState)),i!==null)return i.dehydrated}return null}function f(r){if(s(r)!==r)throw Error(a(188))}function h(r){var i=r.alternate;if(!i){if(i=s(r),i===null)throw Error(a(188));return i!==r?null:r}for(var l=r,d=i;;){var p=l.return;if(p===null)break;var b=p.alternate;if(b===null){if(d=p.return,d!==null){l=d;continue}break}if(p.child===b.child){for(b=p.child;b;){if(b===l)return f(p),r;if(b===d)return f(p),i;b=b.sibling}throw Error(a(188))}if(l.return!==d.return)l=p,d=b;else{for(var E=!1,H=p.child;H;){if(H===l){E=!0,l=p,d=b;break}if(H===d){E=!0,d=p,l=b;break}H=H.sibling}if(!E){for(H=b.child;H;){if(H===l){E=!0,l=b,d=p;break}if(H===d){E=!0,d=b,l=p;break}H=H.sibling}if(!E)throw Error(a(189))}}if(l.alternate!==d)throw Error(a(190))}if(l.tag!==3)throw Error(a(188));return l.stateNode.current===l?r:i}function v(r){var i=r.tag;if(i===5||i===26||i===27||i===6)return r;for(r=r.child;r!==null;){if(i=v(r),i!==null)return i;r=r.sibling}return null}var y=Object.assign,x=Symbol.for(\"react.element\"),S=Symbol.for(\"react.transitional.element\"),w=Symbol.for(\"react.portal\"),C=Symbol.for(\"react.fragment\"),R=Symbol.for(\"react.strict_mode\"),k=Symbol.for(\"react.profiler\"),T=Symbol.for(\"react.consumer\"),M=Symbol.for(\"react.context\"),j=Symbol.for(\"react.forward_ref\"),I=Symbol.for(\"react.suspense\"),P=Symbol.for(\"react.suspense_list\"),A=Symbol.for(\"react.memo\"),q=Symbol.for(\"react.lazy\"),B=Symbol.for(\"react.activity\"),V=Symbol.for(\"react.memo_cache_sentinel\"),N=Symbol.iterator;function _(r){return r===null||typeof r!=\"object\"?null:(r=N&&r[N]||r[\"@@iterator\"],typeof r==\"function\"?r:null)}var z=Symbol.for(\"react.client.reference\");function F(r){if(r==null)return null;if(typeof r==\"function\")return r.$$typeof===z?null:r.displayName||r.name||null;if(typeof r==\"string\")return r;switch(r){case C:return\"Fragment\";case k:return\"Profiler\";case R:return\"StrictMode\";case I:return\"Suspense\";case P:return\"SuspenseList\";case B:return\"Activity\"}if(typeof r==\"object\")switch(r.$$typeof){case w:return\"Portal\";case M:return r.displayName||\"Context\";case T:return(r._context.displayName||\"Context\")+\".Consumer\";case j:var i=r.render;return r=r.displayName,r||(r=i.displayName||i.name||\"\",r=r!==\"\"?\"ForwardRef(\"+r+\")\":\"ForwardRef\"),r;case A:return i=r.displayName||null,i!==null?i:F(r.type)||\"Memo\";case q:i=r._payload,r=r._init;try{return F(r(i))}catch{}}return null}var O=Array.isArray,$=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,U={pending:!1,data:null,method:null,action:null},K=[],ie=-1;function L(r){return{current:r}}function X(r){0>ie||(r.current=K[ie],K[ie]=null,ie--)}function Y(r,i){ie++,K[ie]=r.current,r.current=i}var re=L(null),Z=L(null),oe=L(null),ne=L(null);function me(r,i){switch(Y(oe,i),Y(Z,r),Y(re,null),i.nodeType){case 9:case 11:r=(r=i.documentElement)&&(r=r.namespaceURI)?rS(r):0;break;default:if(r=i.tagName,i=i.namespaceURI)i=rS(i),r=aS(i,r);else switch(r){case\"svg\":r=1;break;case\"math\":r=2;break;default:r=0}}X(re),Y(re,r)}function Me(){X(re),X(Z),X(oe)}function Fe(r){r.memoizedState!==null&&Y(ne,r);var i=re.current,l=aS(i,r.type);i!==l&&(Y(Z,r),Y(re,l))}function Ue(r){Z.current===r&&(X(re),X(Z)),ne.current===r&&(X(ne),yu._currentValue=U)}var tt,Le;function Ve(r){if(tt===void 0)try{throw Error()}catch(l){var i=l.stack.trim().match(/\\n( *(at )?)/);tt=i&&i[1]||\"\",Le=-1<l.stack.indexOf(`\n at`)?\" (<anonymous>)\":-1<l.stack.indexOf(\"@\")?\"@unknown:0:0\":\"\"}return`\n`+tt+r+Le}var Je=!1;function jt(r,i){if(!r||Je)return\"\";Je=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var d={DetermineComponentFrameRoot:function(){try{if(i){var Te=function(){throw Error()};if(Object.defineProperty(Te.prototype,\"props\",{set:function(){throw Error()}}),typeof Reflect==\"object\"&&Reflect.construct){try{Reflect.construct(Te,[])}catch(pe){var fe=pe}Reflect.construct(r,[],Te)}else{try{Te.call()}catch(pe){fe=pe}r.call(Te.prototype)}}else{try{throw Error()}catch(pe){fe=pe}(Te=r())&&typeof Te.catch==\"function\"&&Te.catch(function(){})}}catch(pe){if(pe&&fe&&typeof pe.stack==\"string\")return[pe.stack,fe.stack]}return[null,null]}};d.DetermineComponentFrameRoot.displayName=\"DetermineComponentFrameRoot\";var p=Object.getOwnPropertyDescriptor(d.DetermineComponentFrameRoot,\"name\");p&&p.configurable&&Object.defineProperty(d.DetermineComponentFrameRoot,\"name\",{value:\"DetermineComponentFrameRoot\"});var b=d.DetermineComponentFrameRoot(),E=b[0],H=b[1];if(E&&H){var Q=E.split(`\n`),de=H.split(`\n`);for(p=d=0;d<Q.length&&!Q[d].includes(\"DetermineComponentFrameRoot\");)d++;for(;p<de.length&&!de[p].includes(\"DetermineComponentFrameRoot\");)p++;if(d===Q.length||p===de.length)for(d=Q.length-1,p=de.length-1;1<=d&&0<=p&&Q[d]!==de[p];)p--;for(;1<=d&&0<=p;d--,p--)if(Q[d]!==de[p]){if(d!==1||p!==1)do if(d--,p--,0>p||Q[d]!==de[p]){var we=`\n`+Q[d].replace(\" at new \",\" at \");return r.displayName&&we.includes(\"<anonymous>\")&&(we=we.replace(\"<anonymous>\",r.displayName)),we}while(1<=d&&0<=p);break}}}finally{Je=!1,Error.prepareStackTrace=l}return(l=r?r.displayName||r.name:\"\")?Ve(l):\"\"}function xe(r,i){switch(r.tag){case 26:case 27:case 5:return Ve(r.type);case 16:return Ve(\"Lazy\");case 13:return r.child!==i&&i!==null?Ve(\"Suspense Fallback\"):Ve(\"Suspense\");case 19:return Ve(\"SuspenseList\");case 0:case 15:return jt(r.type,!1);case 11:return jt(r.type.render,!1);case 1:return jt(r.type,!0);case 31:return Ve(\"Activity\");default:return\"\"}}function G(r){try{var i=\"\",l=null;do i+=xe(r,l),l=r,r=r.return;while(r);return i}catch(d){return`\nError generating stack: `+d.message+`\n`+d.stack}}var se=Object.prototype.hasOwnProperty,ge=e.unstable_scheduleCallback,Ne=e.unstable_cancelCallback,Re=e.unstable_shouldYield,ze=e.unstable_requestPaint,Ge=e.unstable_now,Xe=e.unstable_getCurrentPriorityLevel,Pe=e.unstable_ImmediatePriority,Mt=e.unstable_UserBlockingPriority,ut=e.unstable_NormalPriority,lt=e.unstable_LowPriority,xn=e.unstable_IdlePriority,Nt=e.log,Et=e.unstable_setDisableYieldValue,mt=null,zt=null;function dn(r){if(typeof Nt==\"function\"&&Et(r),zt&&typeof zt.setStrictMode==\"function\")try{zt.setStrictMode(mt,r)}catch{}}var sn=Math.clz32?Math.clz32:pr,$r=Math.log,Rn=Math.LN2;function pr(r){return r>>>=0,r===0?32:31-($r(r)/Rn|0)|0}var Pn=256,Ar=262144,Nr=4194304;function Lt(r){var i=r&42;if(i!==0)return i;switch(r&-r){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 r&261888;case 262144:case 524288:case 1048576:case 2097152:return r&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return r&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return r}}function St(r,i,l){var d=r.pendingLanes;if(d===0)return 0;var p=0,b=r.suspendedLanes,E=r.pingedLanes;r=r.warmLanes;var H=d&134217727;return H!==0?(d=H&~b,d!==0?p=Lt(d):(E&=H,E!==0?p=Lt(E):l||(l=H&~r,l!==0&&(p=Lt(l))))):(H=d&~b,H!==0?p=Lt(H):E!==0?p=Lt(E):l||(l=d&~r,l!==0&&(p=Lt(l)))),p===0?0:i!==0&&i!==p&&(i&b)===0&&(b=p&-p,l=i&-i,b>=l||b===32&&(l&4194048)!==0)?i:p}function Wt(r,i){return(r.pendingLanes&~(r.suspendedLanes&~r.pingedLanes)&i)===0}function gr(r,i){switch(r){case 1:case 2:case 4:case 8:case 64:return i+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 i+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Un(){var r=Nr;return Nr<<=1,(Nr&62914560)===0&&(Nr=4194304),r}function rt(r){for(var i=[],l=0;31>l;l++)i.push(r);return i}function Bt(r,i){r.pendingLanes|=i,i!==268435456&&(r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0)}function Zt(r,i,l,d,p,b){var E=r.pendingLanes;r.pendingLanes=l,r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0,r.expiredLanes&=l,r.entangledLanes&=l,r.errorRecoveryDisabledLanes&=l,r.shellSuspendCounter=0;var H=r.entanglements,Q=r.expirationTimes,de=r.hiddenUpdates;for(l=E&~l;0<l;){var we=31-sn(l),Te=1<<we;H[we]=0,Q[we]=-1;var fe=de[we];if(fe!==null)for(de[we]=null,we=0;we<fe.length;we++){var pe=fe[we];pe!==null&&(pe.lane&=-536870913)}l&=~Te}d!==0&&Br(r,d,0),b!==0&&p===0&&r.tag!==0&&(r.suspendedLanes|=b&~(E&~i))}function Br(r,i,l){r.pendingLanes|=i,r.suspendedLanes&=~i;var d=31-sn(i);r.entangledLanes|=i,r.entanglements[d]=r.entanglements[d]|1073741824|l&261930}function Vn(r,i){var l=r.entangledLanes|=i;for(r=r.entanglements;l;){var d=31-sn(l),p=1<<d;p&i|r[d]&i&&(r[d]|=i),l&=~p}}function vr(r,i){var l=i&-i;return l=(l&42)!==0?1:fn(l),(l&(r.suspendedLanes|i))!==0?0:l}function fn(r){switch(r){case 2:r=1;break;case 8:r=4;break;case 32:r=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:r=128;break;case 268435456:r=134217728;break;default:r=0}return r}function Ga(r){return r&=-r,2<r?8<r?(r&134217727)!==0?32:268435456:8:2}function wn(){var r=W.p;return r!==0?r:(r=window.event,r===void 0?32:MS(r.type))}function En(r,i){var l=W.p;try{return W.p=r,i()}finally{W.p=l}}var Sn=Math.random().toString(36).slice(2),Tn=\"__reactFiber$\"+Sn,On=\"__reactProps$\"+Sn,sr=\"__reactContainer$\"+Sn,Ur=\"__reactEvents$\"+Sn,oo=\"__reactListeners$\"+Sn,ml=\"__reactHandles$\"+Sn,ms=\"__reactResources$\"+Sn,lr=\"__reactMarker$\"+Sn;function Ya(r){delete r[Tn],delete r[On],delete r[Ur],delete r[oo],delete r[ml]}function Vr(r){var i=r[Tn];if(i)return i;for(var l=r.parentNode;l;){if(i=l[sr]||l[Tn]){if(l=i.alternate,i.child!==null||l!==null&&l.child!==null)for(r=dS(r);r!==null;){if(l=r[Tn])return l;r=dS(r)}return i}r=l,l=r.parentNode}return null}function Wr(r){if(r=r[Tn]||r[sr]){var i=r.tag;if(i===5||i===6||i===13||i===31||i===26||i===27||i===3)return r}return null}function Gr(r){var i=r.tag;if(i===5||i===26||i===27||i===6)return r.stateNode;throw Error(a(33))}function yr(r){var i=r[ms];return i||(i=r[ms]={hoistableStyles:new Map,hoistableScripts:new Map}),i}function Cn(r){r[lr]=!0}var ps=new Set,pl={};function Ma(r,i){Yr(r,i),Yr(r+\"Capture\",i)}function Yr(r,i){for(pl[r]=i,r=0;r<i.length;r++)ps.add(i[r])}var ka=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]*$\"),gl={},vl={};function yl(r){return se.call(vl,r)?!0:se.call(gl,r)?!1:ka.test(r)?vl[r]=!0:(gl[r]=!0,!1)}function _a(r,i,l){if(yl(i))if(l===null)r.removeAttribute(i);else{switch(typeof l){case\"undefined\":case\"function\":case\"symbol\":r.removeAttribute(i);return;case\"boolean\":var d=i.toLowerCase().slice(0,5);if(d!==\"data-\"&&d!==\"aria-\"){r.removeAttribute(i);return}}r.setAttribute(i,\"\"+l)}}function br(r,i,l){if(l===null)r.removeAttribute(i);else{switch(typeof l){case\"undefined\":case\"function\":case\"symbol\":case\"boolean\":r.removeAttribute(i);return}r.setAttribute(i,\"\"+l)}}function Mn(r,i,l,d){if(d===null)r.removeAttribute(l);else{switch(typeof d){case\"undefined\":case\"function\":case\"symbol\":case\"boolean\":r.removeAttribute(l);return}r.setAttributeNS(i,l,\"\"+d)}}function Jn(r){switch(typeof r){case\"bigint\":case\"boolean\":case\"number\":case\"string\":case\"undefined\":return r;case\"object\":return r;default:return\"\"}}function yi(r){var i=r.type;return(r=r.nodeName)&&r.toLowerCase()===\"input\"&&(i===\"checkbox\"||i===\"radio\")}function gs(r,i,l){var d=Object.getOwnPropertyDescriptor(r.constructor.prototype,i);if(!r.hasOwnProperty(i)&&typeof d<\"u\"&&typeof d.get==\"function\"&&typeof d.set==\"function\"){var p=d.get,b=d.set;return Object.defineProperty(r,i,{configurable:!0,get:function(){return p.call(this)},set:function(E){l=\"\"+E,b.call(this,E)}}),Object.defineProperty(r,i,{enumerable:d.enumerable}),{getValue:function(){return l},setValue:function(E){l=\"\"+E},stopTracking:function(){r._valueTracker=null,delete r[i]}}}}function pa(r){if(!r._valueTracker){var i=yi(r)?\"checked\":\"value\";r._valueTracker=gs(r,i,\"\"+r[i])}}function cr(r){if(!r)return!1;var i=r._valueTracker;if(!i)return!0;var l=i.getValue(),d=\"\";return r&&(d=yi(r)?r.checked?\"true\":\"false\":r.value),r=d,r!==l?(i.setValue(r),!0):!1}function ur(r){if(r=r||(typeof document<\"u\"?document:void 0),typeof r>\"u\")return null;try{return r.activeElement||r.body}catch{return r.body}}var vs=/[\\n\"\\\\]/g;function Dn(r){return r.replace(vs,function(i){return\"\\\\\"+i.charCodeAt(0).toString(16)+\" \"})}function bi(r,i,l,d,p,b,E,H){r.name=\"\",E!=null&&typeof E!=\"function\"&&typeof E!=\"symbol\"&&typeof E!=\"boolean\"?r.type=E:r.removeAttribute(\"type\"),i!=null?E===\"number\"?(i===0&&r.value===\"\"||r.value!=i)&&(r.value=\"\"+Jn(i)):r.value!==\"\"+Jn(i)&&(r.value=\"\"+Jn(i)):E!==\"submit\"&&E!==\"reset\"||r.removeAttribute(\"value\"),i!=null?Xa(r,E,Jn(i)):l!=null?Xa(r,E,Jn(l)):d!=null&&r.removeAttribute(\"value\"),p==null&&b!=null&&(r.defaultChecked=!!b),p!=null&&(r.checked=p&&typeof p!=\"function\"&&typeof p!=\"symbol\"),H!=null&&typeof H!=\"function\"&&typeof H!=\"symbol\"&&typeof H!=\"boolean\"?r.name=\"\"+Jn(H):r.removeAttribute(\"name\")}function Gn(r,i,l,d,p,b,E,H){if(b!=null&&typeof b!=\"function\"&&typeof b!=\"symbol\"&&typeof b!=\"boolean\"&&(r.type=b),i!=null||l!=null){if(!(b!==\"submit\"&&b!==\"reset\"||i!=null)){pa(r);return}l=l!=null?\"\"+Jn(l):\"\",i=i!=null?\"\"+Jn(i):l,H||i===r.value||(r.value=i),r.defaultValue=i}d=d??p,d=typeof d!=\"function\"&&typeof d!=\"symbol\"&&!!d,r.checked=H?r.checked:!!d,r.defaultChecked=!!d,E!=null&&typeof E!=\"function\"&&typeof E!=\"symbol\"&&typeof E!=\"boolean\"&&(r.name=E),pa(r)}function Xa(r,i,l){i===\"number\"&&ur(r.ownerDocument)===r||r.defaultValue===\"\"+l||(r.defaultValue=\"\"+l)}function ga(r,i,l,d){if(r=r.options,i){i={};for(var p=0;p<l.length;p++)i[\"$\"+l[p]]=!0;for(l=0;l<r.length;l++)p=i.hasOwnProperty(\"$\"+r[l].value),r[l].selected!==p&&(r[l].selected=p),p&&d&&(r[l].defaultSelected=!0)}else{for(l=\"\"+Jn(l),i=null,p=0;p<r.length;p++){if(r[p].value===l){r[p].selected=!0,d&&(r[p].defaultSelected=!0);return}i!==null||r[p].disabled||(i=r[p])}i!==null&&(i.selected=!0)}}function ys(r,i,l){if(i!=null&&(i=\"\"+Jn(i),i!==r.value&&(r.value=i),l==null)){r.defaultValue!==i&&(r.defaultValue=i);return}r.defaultValue=l!=null?\"\"+Jn(l):\"\"}function bl(r,i,l,d){if(i==null){if(d!=null){if(l!=null)throw Error(a(92));if(O(d)){if(1<d.length)throw Error(a(93));d=d[0]}l=d}l==null&&(l=\"\"),i=l}l=Jn(i),r.defaultValue=l,d=r.textContent,d===l&&d!==\"\"&&d!==null&&(r.value=d),pa(r)}function Aa(r,i){if(i){var l=r.firstChild;if(l&&l===r.lastChild&&l.nodeType===3){l.nodeValue=i;return}}r.textContent=i}var Xr=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 va(r,i,l){var d=i.indexOf(\"--\")===0;l==null||typeof l==\"boolean\"||l===\"\"?d?r.setProperty(i,\"\"):i===\"float\"?r.cssFloat=\"\":r[i]=\"\":d?r.setProperty(i,l):typeof l!=\"number\"||l===0||Xr.has(i)?i===\"float\"?r.cssFloat=l:r[i]=(\"\"+l).trim():r[i]=l+\"px\"}function dr(r,i,l){if(i!=null&&typeof i!=\"object\")throw Error(a(62));if(r=r.style,l!=null){for(var d in l)!l.hasOwnProperty(d)||i!=null&&i.hasOwnProperty(d)||(d.indexOf(\"--\")===0?r.setProperty(d,\"\"):d===\"float\"?r.cssFloat=\"\":r[d]=\"\");for(var p in i)d=i[p],i.hasOwnProperty(p)&&l[p]!==d&&va(r,p,d)}else for(var b in i)i.hasOwnProperty(b)&&va(r,b,i[b])}function ve(r){if(r.indexOf(\"-\")===-1)return!1;switch(r){case\"annotation-xml\":case\"color-profile\":case\"font-face\":case\"font-face-src\":case\"font-face-uri\":case\"font-face-format\":case\"font-face-name\":case\"missing-glyph\":return!1;default:return!0}}var ln=new Map([[\"acceptCharset\",\"accept-charset\"],[\"htmlFor\",\"for\"],[\"httpEquiv\",\"http-equiv\"],[\"crossOrigin\",\"crossorigin\"],[\"accentHeight\",\"accent-height\"],[\"alignmentBaseline\",\"alignment-baseline\"],[\"arabicForm\",\"arabic-form\"],[\"baselineShift\",\"baseline-shift\"],[\"capHeight\",\"cap-height\"],[\"clipPath\",\"clip-path\"],[\"clipRule\",\"clip-rule\"],[\"colorInterpolation\",\"color-interpolation\"],[\"colorInterpolationFilters\",\"color-interpolation-filters\"],[\"colorProfile\",\"color-profile\"],[\"colorRendering\",\"color-rendering\"],[\"dominantBaseline\",\"dominant-baseline\"],[\"enableBackground\",\"enable-background\"],[\"fillOpacity\",\"fill-opacity\"],[\"fillRule\",\"fill-rule\"],[\"floodColor\",\"flood-color\"],[\"floodOpacity\",\"flood-opacity\"],[\"fontFamily\",\"font-family\"],[\"fontSize\",\"font-size\"],[\"fontSizeAdjust\",\"font-size-adjust\"],[\"fontStretch\",\"font-stretch\"],[\"fontStyle\",\"font-style\"],[\"fontVariant\",\"font-variant\"],[\"fontWeight\",\"font-weight\"],[\"glyphName\",\"glyph-name\"],[\"glyphOrientationHorizontal\",\"glyph-orientation-horizontal\"],[\"glyphOrientationVertical\",\"glyph-orientation-vertical\"],[\"horizAdvX\",\"horiz-adv-x\"],[\"horizOriginX\",\"horiz-origin-x\"],[\"imageRendering\",\"image-rendering\"],[\"letterSpacing\",\"letter-spacing\"],[\"lightingColor\",\"lighting-color\"],[\"markerEnd\",\"marker-end\"],[\"markerMid\",\"marker-mid\"],[\"markerStart\",\"marker-start\"],[\"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\"]]),xi=/^[\\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 so(r){return xi.test(\"\"+r)?\"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')\":r}function Or(){}var wi=null;function bs(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var Si=null,Se=null;function er(r){var i=Wr(r);if(i&&(r=i.stateNode)){var l=r[On]||null;e:switch(r=i.stateNode,i.type){case\"input\":if(bi(r,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),i=l.name,l.type===\"radio\"&&i!=null){for(l=r;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name=\"'+Dn(\"\"+i)+'\"][type=\"radio\"]'),i=0;i<l.length;i++){var d=l[i];if(d!==r&&d.form===r.form){var p=d[On]||null;if(!p)throw Error(a(90));bi(d,p.value,p.defaultValue,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name)}}for(i=0;i<l.length;i++)d=l[i],d.form===r.form&&cr(d)}break e;case\"textarea\":ys(r,l.value,l.defaultValue);break e;case\"select\":i=l.value,i!=null&&ga(r,!!l.multiple,i,!1)}}}var gn=!1;function Ci(r,i,l){if(gn)return r(i,l);gn=!0;try{var d=r(i);return d}finally{if(gn=!1,(Si!==null||Se!==null)&&(Tf(),Si&&(i=Si,r=Se,Se=Si=null,er(i),r)))for(i=0;i<r.length;i++)er(r[i])}}function Na(r,i){var l=r.stateNode;if(l===null)return null;var d=l[On]||null;if(d===null)return null;l=d[i];e:switch(i){case\"onClick\":case\"onClickCapture\":case\"onDoubleClick\":case\"onDoubleClickCapture\":case\"onMouseDown\":case\"onMouseDownCapture\":case\"onMouseMove\":case\"onMouseMoveCapture\":case\"onMouseUp\":case\"onMouseUpCapture\":case\"onMouseEnter\":(d=!d.disabled)||(r=r.type,d=!(r===\"button\"||r===\"input\"||r===\"select\"||r===\"textarea\")),r=!d;break e;default:r=!1}if(r)return null;if(l&&typeof l!=\"function\")throw Error(a(231,i,typeof l));return l}var Yn=!(typeof window>\"u\"||typeof window.document>\"u\"||typeof window.document.createElement>\"u\"),Xn=!1;if(Yn)try{var xr={};Object.defineProperty(xr,\"passive\",{get:function(){Xn=!0}}),window.addEventListener(\"test\",xr,xr),window.removeEventListener(\"test\",xr,xr)}catch{Xn=!1}var ya=null,Qa=null,lo=null;function xl(){if(lo)return lo;var r,i=Qa,l=i.length,d,p=\"value\"in ya?ya.value:ya.textContent,b=p.length;for(r=0;r<l&&i[r]===p[r];r++);var E=l-r;for(d=1;d<=E&&i[l-d]===p[b-d];d++);return lo=p.slice(r,1<d?1-d:void 0)}function le(r){var i=r.keyCode;return\"charCode\"in r?(r=r.charCode,r===0&&i===13&&(r=13)):r=i,r===10&&(r=13),32<=r||r===13?r:0}function ke(){return!0}function He(){return!1}function Oe(r){function i(l,d,p,b,E){this._reactName=l,this._targetInst=p,this.type=d,this.nativeEvent=b,this.target=E,this.currentTarget=null;for(var H in r)r.hasOwnProperty(H)&&(l=r[H],this[H]=l?l(b):b[H]);return this.isDefaultPrevented=(b.defaultPrevented!=null?b.defaultPrevented:b.returnValue===!1)?ke:He,this.isPropagationStopped=He,this}return y(i.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!=\"unknown\"&&(l.returnValue=!1),this.isDefaultPrevented=ke)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!=\"unknown\"&&(l.cancelBubble=!0),this.isPropagationStopped=ke)},persist:function(){},isPersistent:ke}),i}var Ae={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},qe=Oe(Ae),nt=y({},Ae,{view:0,detail:0}),$e=Oe(nt),Ye,ct,Jt,en=y({},nt,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:uo,button:0,buttons:0,relatedTarget:function(r){return r.relatedTarget===void 0?r.fromElement===r.srcElement?r.toElement:r.fromElement:r.relatedTarget},movementX:function(r){return\"movementX\"in r?r.movementX:(r!==Jt&&(Jt&&r.type===\"mousemove\"?(Ye=r.screenX-Jt.screenX,ct=r.screenY-Jt.screenY):ct=Ye=0,Jt=r),Ye)},movementY:function(r){return\"movementY\"in r?r.movementY:ct}}),Ht=Oe(en),Tt=y({},en,{dataTransfer:0}),cn=Oe(Tt),dt=y({},nt,{relatedTarget:0}),Gt=Oe(dt),Ri=y({},Ae,{animationName:0,elapsedTime:0,pseudoElement:0}),kn=Oe(Ri),Ei=y({},Ae,{clipboardData:function(r){return\"clipboardData\"in r?r.clipboardData:window.clipboardData}}),qt=Oe(Ei),Ln=y({},Ae,{data:0}),fr=Oe(Ln),ba={Esc:\"Escape\",Spacebar:\" \",Left:\"ArrowLeft\",Up:\"ArrowUp\",Right:\"ArrowRight\",Down:\"ArrowDown\",Del:\"Delete\",Win:\"OS\",Menu:\"ContextMenu\",Apps:\"ContextMenu\",Scroll:\"ScrollLock\",MozPrintableKey:\"Unidentified\"},Qr={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\"},co={Alt:\"altKey\",Control:\"ctrlKey\",Meta:\"metaKey\",Shift:\"shiftKey\"};function Ti(r){var i=this.nativeEvent;return i.getModifierState?i.getModifierState(r):(r=co[r])?!!i[r]:!1}function uo(){return Ti}var hr=y({},nt,{key:function(r){if(r.key){var i=ba[r.key]||r.key;if(i!==\"Unidentified\")return i}return r.type===\"keypress\"?(r=le(r),r===13?\"Enter\":String.fromCharCode(r)):r.type===\"keydown\"||r.type===\"keyup\"?Qr[r.keyCode]||\"Unidentified\":\"\"},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:uo,charCode:function(r){return r.type===\"keypress\"?le(r):0},keyCode:function(r){return r.type===\"keydown\"||r.type===\"keyup\"?r.keyCode:0},which:function(r){return r.type===\"keypress\"?le(r):r.type===\"keydown\"||r.type===\"keyup\"?r.keyCode:0}}),tr=Oe(hr),Qn=y({},en,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),wr=Oe(Qn),Mi=y({},nt,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:uo}),Pc=Oe(Mi),wl=y({},Ae,{propertyName:0,elapsedTime:0,pseudoElement:0}),qd=Oe(wl),Sl=y({},en,{deltaX:function(r){return\"deltaX\"in r?r.deltaX:\"wheelDeltaX\"in r?-r.wheelDeltaX:0},deltaY:function(r){return\"deltaY\"in r?r.deltaY:\"wheelDeltaY\"in r?-r.wheelDeltaY:\"wheelDelta\"in r?-r.wheelDelta:0},deltaZ:0,deltaMode:0}),Cl=Oe(Sl),km=y({},Ae,{newState:0,oldState:0}),Fd=Oe(km),Sr=[9,13,27,32],xs=Yn&&\"CompositionEvent\"in window,Ka=null;Yn&&\"documentMode\"in document&&(Ka=document.documentMode);var fo=Yn&&\"TextEvent\"in window&&!Ka,Lc=Yn&&(!xs||Ka&&8<Ka&&11>=Ka),vn=\" \",Ic=!1;function Hc(r,i){switch(r){case\"keyup\":return Sr.indexOf(i.keyCode)!==-1;case\"keydown\":return i.keyCode!==229;case\"keypress\":case\"mousedown\":case\"focusout\":return!0;default:return!1}}function Rl(r){return r=r.detail,typeof r==\"object\"&&\"data\"in r?r.data:null}var Kr=!1;function El(r,i){switch(r){case\"compositionend\":return Rl(i);case\"keypress\":return i.which!==32?null:(Ic=!0,vn);case\"textInput\":return r=i.data,r===vn&&Ic?null:r;default:return null}}function Za(r,i){if(Kr)return r===\"compositionend\"||!xs&&Hc(r,i)?(r=xl(),lo=Qa=ya=null,Kr=!1,r):null;switch(r){case\"paste\":return null;case\"keypress\":if(!(i.ctrlKey||i.altKey||i.metaKey)||i.ctrlKey&&i.altKey){if(i.char&&1<i.char.length)return i.char;if(i.which)return String.fromCharCode(i.which)}return null;case\"compositionend\":return Lc&&i.locale!==\"ko\"?null:i.data;default:return null}}var ho={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 mo(r){var i=r&&r.nodeName&&r.nodeName.toLowerCase();return i===\"input\"?!!ho[r.type]:i===\"textarea\"}function po(r,i,l,d){Si?Se?Se.push(d):Se=[d]:Si=d,i=Df(i,\"onChange\"),0<i.length&&(l=new qe(\"onChange\",\"change\",null,l,d),r.push({event:l,listeners:i}))}var Oa=null,Zr=null;function $d(r){Kw(r,0)}function Cr(r){var i=Gr(r);if(cr(i))return r}function Bd(r,i){if(r===\"change\")return i}var Tl=!1;if(Yn){var ws;if(Yn){var Ml=\"oninput\"in document;if(!Ml){var ki=document.createElement(\"div\");ki.setAttribute(\"oninput\",\"return;\"),Ml=typeof ki.oninput==\"function\"}ws=Ml}else ws=!1;Tl=ws&&(!document.documentMode||9<document.documentMode)}function Ss(){Oa&&(Oa.detachEvent(\"onpropertychange\",Ud),Zr=Oa=null)}function Ud(r){if(r.propertyName===\"value\"&&Cr(Zr)){var i=[];po(i,Zr,r,bs(r)),Ci($d,i)}}function qc(r,i,l){r===\"focusin\"?(Ss(),Oa=i,Zr=l,Oa.attachEvent(\"onpropertychange\",Ud)):r===\"focusout\"&&Ss()}function go(r){if(r===\"selectionchange\"||r===\"keyup\"||r===\"keydown\")return Cr(Zr)}function Vd(r,i){if(r===\"click\")return Cr(i)}function Wd(r,i){if(r===\"input\"||r===\"change\")return Cr(i)}function _m(r,i){return r===i&&(r!==0||1/r===1/i)||r!==r&&i!==i}var Rr=typeof Object.is==\"function\"?Object.is:_m;function Cs(r,i){if(Rr(r,i))return!0;if(typeof r!=\"object\"||r===null||typeof i!=\"object\"||i===null)return!1;var l=Object.keys(r),d=Object.keys(i);if(l.length!==d.length)return!1;for(d=0;d<l.length;d++){var p=l[d];if(!se.call(i,p)||!Rr(r[p],i[p]))return!1}return!0}function _i(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function Gd(r,i){var l=_i(r);r=0;for(var d;l;){if(l.nodeType===3){if(d=r+l.textContent.length,r<=i&&d>=i)return{node:l,offset:i-r};r=d}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=_i(l)}}function Yd(r,i){return r&&i?r===i?!0:r&&r.nodeType===3?!1:i&&i.nodeType===3?Yd(r,i.parentNode):\"contains\"in r?r.contains(i):r.compareDocumentPosition?!!(r.compareDocumentPosition(i)&16):!1:!1}function kl(r){r=r!=null&&r.ownerDocument!=null&&r.ownerDocument.defaultView!=null?r.ownerDocument.defaultView:window;for(var i=ur(r.document);i instanceof r.HTMLIFrameElement;){try{var l=typeof i.contentWindow.location.href==\"string\"}catch{l=!1}if(l)r=i.contentWindow;else break;i=ur(r.document)}return i}function Fc(r){var i=r&&r.nodeName&&r.nodeName.toLowerCase();return i&&(i===\"input\"&&(r.type===\"text\"||r.type===\"search\"||r.type===\"tel\"||r.type===\"url\"||r.type===\"password\")||i===\"textarea\"||r.contentEditable===\"true\")}var Am=Yn&&\"documentMode\"in document&&11>=document.documentMode,Ja=null,Rs=null,Es=null,Er=!1;function Da(r,i,l){var d=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Er||Ja==null||Ja!==ur(d)||(d=Ja,\"selectionStart\"in d&&Fc(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),Es&&Cs(Es,d)||(Es=d,d=Df(Rs,\"onSelect\"),0<d.length&&(i=new qe(\"onSelect\",\"select\",null,i,l),r.push({event:i,listeners:d}),i.target=Ja)))}function Ai(r,i){var l={};return l[r.toLowerCase()]=i.toLowerCase(),l[\"Webkit\"+r]=\"webkit\"+i,l[\"Moz\"+r]=\"moz\"+i,l}var vo={animationend:Ai(\"Animation\",\"AnimationEnd\"),animationiteration:Ai(\"Animation\",\"AnimationIteration\"),animationstart:Ai(\"Animation\",\"AnimationStart\"),transitionrun:Ai(\"Transition\",\"TransitionRun\"),transitionstart:Ai(\"Transition\",\"TransitionStart\"),transitioncancel:Ai(\"Transition\",\"TransitionCancel\"),transitionend:Ai(\"Transition\",\"TransitionEnd\")},ja={},yo={};Yn&&(yo=document.createElement(\"div\").style,\"AnimationEvent\"in window||(delete vo.animationend.animation,delete vo.animationiteration.animation,delete vo.animationstart.animation),\"TransitionEvent\"in window||delete vo.transitionend.transition);function ei(r){if(ja[r])return ja[r];if(!vo[r])return r;var i=vo[r],l;for(l in i)if(i.hasOwnProperty(l)&&l in yo)return ja[r]=i[l];return r}var bo=ei(\"animationend\"),Xd=ei(\"animationiteration\"),_l=ei(\"animationstart\"),Ts=ei(\"transitionrun\"),Nm=ei(\"transitionstart\"),Om=ei(\"transitioncancel\"),Ms=ei(\"transitionend\"),ks=new Map,xo=\"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(\" \");xo.push(\"scrollEnd\");function Dr(r,i){ks.set(r,i),Ma(i,[r])}var Al=typeof reportError==\"function\"?reportError:function(r){if(typeof window==\"object\"&&typeof window.ErrorEvent==\"function\"){var i=new window.ErrorEvent(\"error\",{bubbles:!0,cancelable:!0,message:typeof r==\"object\"&&r!==null&&typeof r.message==\"string\"?String(r.message):String(r),error:r});if(!window.dispatchEvent(i))return}else if(typeof process==\"object\"&&typeof process.emit==\"function\"){process.emit(\"uncaughtException\",r);return}console.error(r)},jr=[],wo=0,$c=0;function _s(){for(var r=wo,i=$c=wo=0;i<r;){var l=jr[i];jr[i++]=null;var d=jr[i];jr[i++]=null;var p=jr[i];jr[i++]=null;var b=jr[i];if(jr[i++]=null,d!==null&&p!==null){var E=d.pending;E===null?p.next=p:(p.next=E.next,E.next=p),d.pending=p}b!==0&&Qd(l,p,b)}}function As(r,i,l,d){jr[wo++]=r,jr[wo++]=i,jr[wo++]=l,jr[wo++]=d,$c|=d,r.lanes|=d,r=r.alternate,r!==null&&(r.lanes|=d)}function Bc(r,i,l,d){return As(r,i,l,d),Ns(r)}function Ni(r,i){return As(r,null,null,i),Ns(r)}function Qd(r,i,l){r.lanes|=l;var d=r.alternate;d!==null&&(d.lanes|=l);for(var p=!1,b=r.return;b!==null;)b.childLanes|=l,d=b.alternate,d!==null&&(d.childLanes|=l),b.tag===22&&(r=b.stateNode,r===null||r._visibility&1||(p=!0)),r=b,b=b.return;return r.tag===3?(b=r.stateNode,p&&i!==null&&(p=31-sn(l),r=b.hiddenUpdates,d=r[p],d===null?r[p]=[i]:d.push(i),i.lane=l|536870912),b):null}function Ns(r){if(50<du)throw du=0,Pp=null,Error(a(185));for(var i=r.return;i!==null;)r=i,i=r.return;return r.tag===3?r.stateNode:null}var So={};function Dm(r,i,l,d){this.tag=r,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=i,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=d,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Tr(r,i,l,d){return new Dm(r,i,l,d)}function Uc(r){return r=r.prototype,!(!r||!r.isReactComponent)}function za(r,i){var l=r.alternate;return l===null?(l=Tr(r.tag,i,r.key,r.mode),l.elementType=r.elementType,l.type=r.type,l.stateNode=r.stateNode,l.alternate=r,r.alternate=l):(l.pendingProps=i,l.type=r.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=r.flags&65011712,l.childLanes=r.childLanes,l.lanes=r.lanes,l.child=r.child,l.memoizedProps=r.memoizedProps,l.memoizedState=r.memoizedState,l.updateQueue=r.updateQueue,i=r.dependencies,l.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},l.sibling=r.sibling,l.index=r.index,l.ref=r.ref,l.refCleanup=r.refCleanup,l}function D(r,i){r.flags&=65011714;var l=r.alternate;return l===null?(r.childLanes=0,r.lanes=i,r.child=null,r.subtreeFlags=0,r.memoizedProps=null,r.memoizedState=null,r.updateQueue=null,r.dependencies=null,r.stateNode=null):(r.childLanes=l.childLanes,r.lanes=l.lanes,r.child=l.child,r.subtreeFlags=0,r.deletions=null,r.memoizedProps=l.memoizedProps,r.memoizedState=l.memoizedState,r.updateQueue=l.updateQueue,r.type=l.type,i=l.dependencies,r.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),r}function te(r,i,l,d,p,b){var E=0;if(d=r,typeof r==\"function\")Uc(r)&&(E=1);else if(typeof r==\"string\")E=iD(r,l,re.current)?26:r===\"html\"||r===\"head\"||r===\"body\"?27:5;else e:switch(r){case B:return r=Tr(31,l,i,p),r.elementType=B,r.lanes=b,r;case C:return ee(l.children,p,b,i);case R:E=8,p|=24;break;case k:return r=Tr(12,l,i,p|2),r.elementType=k,r.lanes=b,r;case I:return r=Tr(13,l,i,p),r.elementType=I,r.lanes=b,r;case P:return r=Tr(19,l,i,p),r.elementType=P,r.lanes=b,r;default:if(typeof r==\"object\"&&r!==null)switch(r.$$typeof){case M:E=10;break e;case T:E=9;break e;case j:E=11;break e;case A:E=14;break e;case q:E=16,d=null;break e}E=29,l=Error(a(130,r===null?\"null\":typeof r,\"\")),d=null}return i=Tr(E,l,i,p),i.elementType=r,i.type=d,i.lanes=b,i}function ee(r,i,l,d){return r=Tr(7,r,d,i),r.lanes=l,r}function ye(r,i,l){return r=Tr(6,r,null,i),r.lanes=l,r}function be(r){var i=Tr(18,null,null,0);return i.stateNode=r,i}function Ee(r,i,l){return i=Tr(4,r.children!==null?r.children:[],r.key,i),i.lanes=l,i.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},i}var ce=new WeakMap;function he(r,i){if(typeof r==\"object\"&&r!==null){var l=ce.get(r);return l!==void 0?l:(i={value:r,source:i,stack:G(i)},ce.set(r,i),i)}return{value:r,source:i,stack:G(i)}}var _e=[],De=0,Be=null,st=0,Qe=[],Ke=0,ft=null,Rt=1,Vt=\"\";function Pt(r,i){_e[De++]=st,_e[De++]=Be,Be=r,st=i}function Oi(r,i,l){Qe[Ke++]=Rt,Qe[Ke++]=Vt,Qe[Ke++]=ft,ft=r;var d=Rt;r=Vt;var p=32-sn(d)-1;d&=~(1<<p),l+=1;var b=32-sn(i)+p;if(30<b){var E=p-p%5;b=(d&(1<<E)-1).toString(32),d>>=E,p-=E,Rt=1<<32-sn(i)+p|l<<p|d,Vt=b+r}else Rt=1<<b|l<<p|d,Vt=r}function Di(r){r.return!==null&&(Pt(r,1),Oi(r,1,0))}function ji(r){for(;r===Be;)Be=_e[--De],_e[De]=null,st=_e[--De],_e[De]=null;for(;r===ft;)ft=Qe[--Ke],Qe[Ke]=null,Vt=Qe[--Ke],Qe[Ke]=null,Rt=Qe[--Ke],Qe[Ke]=null}function Jr(r,i){Qe[Ke++]=Rt,Qe[Ke++]=Vt,Qe[Ke++]=ft,Rt=i.id,Vt=i.overflow,ft=r}var yn=null,It=null,pt=!1,ea=null,nr=!1,Os=Error(a(519));function Co(r){var i=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?\"text\":\"HTML\",\"\"));throw Vc(he(i,r)),Os}function I1(r){var i=r.stateNode,l=r.type,d=r.memoizedProps;switch(i[Tn]=r,i[On]=d,l){case\"dialog\":_t(\"cancel\",i),_t(\"close\",i);break;case\"iframe\":case\"object\":case\"embed\":_t(\"load\",i);break;case\"video\":case\"audio\":for(l=0;l<hu.length;l++)_t(hu[l],i);break;case\"source\":_t(\"error\",i);break;case\"img\":case\"image\":case\"link\":_t(\"error\",i),_t(\"load\",i);break;case\"details\":_t(\"toggle\",i);break;case\"input\":_t(\"invalid\",i),Gn(i,d.value,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name,!0);break;case\"select\":_t(\"invalid\",i);break;case\"textarea\":_t(\"invalid\",i),bl(i,d.value,d.defaultValue,d.children)}l=d.children,typeof l!=\"string\"&&typeof l!=\"number\"&&typeof l!=\"bigint\"||i.textContent===\"\"+l||d.suppressHydrationWarning===!0||tS(i.textContent,l)?(d.popover!=null&&(_t(\"beforetoggle\",i),_t(\"toggle\",i)),d.onScroll!=null&&_t(\"scroll\",i),d.onScrollEnd!=null&&_t(\"scrollend\",i),d.onClick!=null&&(i.onclick=Or),i=!0):i=!1,i||Co(r,!0)}function H1(r){for(yn=r.return;yn;)switch(yn.tag){case 5:case 31:case 13:nr=!1;return;case 27:case 3:nr=!0;return;default:yn=yn.return}}function Nl(r){if(r!==yn)return!1;if(!pt)return H1(r),pt=!0,!1;var i=r.tag,l;if((l=i!==3&&i!==27)&&((l=i===5)&&(l=r.type,l=!(l!==\"form\"&&l!==\"button\")||Kp(r.type,r.memoizedProps)),l=!l),l&&It&&Co(r),H1(r),i===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(a(317));It=uS(r)}else if(i===31){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(a(317));It=uS(r)}else i===27?(i=It,Lo(r.type)?(r=ng,ng=null,It=r):It=i):It=yn?wa(r.stateNode.nextSibling):null;return!0}function Ds(){It=yn=null,pt=!1}function jm(){var r=ea;return r!==null&&(Ir===null?Ir=r:Ir.push.apply(Ir,r),ea=null),r}function Vc(r){ea===null?ea=[r]:ea.push(r)}var zm=L(null),js=null,zi=null;function Ro(r,i,l){Y(zm,i._currentValue),i._currentValue=l}function Pi(r){r._currentValue=zm.current,X(zm)}function Pm(r,i,l){for(;r!==null;){var d=r.alternate;if((r.childLanes&i)!==i?(r.childLanes|=i,d!==null&&(d.childLanes|=i)):d!==null&&(d.childLanes&i)!==i&&(d.childLanes|=i),r===l)break;r=r.return}}function Lm(r,i,l,d){var p=r.child;for(p!==null&&(p.return=r);p!==null;){var b=p.dependencies;if(b!==null){var E=p.child;b=b.firstContext;e:for(;b!==null;){var H=b;b=p;for(var Q=0;Q<i.length;Q++)if(H.context===i[Q]){b.lanes|=l,H=b.alternate,H!==null&&(H.lanes|=l),Pm(b.return,l,r),d||(E=null);break e}b=H.next}}else if(p.tag===18){if(E=p.return,E===null)throw Error(a(341));E.lanes|=l,b=E.alternate,b!==null&&(b.lanes|=l),Pm(E,l,r),E=null}else E=p.child;if(E!==null)E.return=p;else for(E=p;E!==null;){if(E===r){E=null;break}if(p=E.sibling,p!==null){p.return=E.return,E=p;break}E=E.return}p=E}}function Ol(r,i,l,d){r=null;for(var p=i,b=!1;p!==null;){if(!b){if((p.flags&524288)!==0)b=!0;else if((p.flags&262144)!==0)break}if(p.tag===10){var E=p.alternate;if(E===null)throw Error(a(387));if(E=E.memoizedProps,E!==null){var H=p.type;Rr(p.pendingProps.value,E.value)||(r!==null?r.push(H):r=[H])}}else if(p===ne.current){if(E=p.alternate,E===null)throw Error(a(387));E.memoizedState.memoizedState!==p.memoizedState.memoizedState&&(r!==null?r.push(yu):r=[yu])}p=p.return}r!==null&&Lm(i,r,l,d),i.flags|=262144}function Kd(r){for(r=r.firstContext;r!==null;){if(!Rr(r.context._currentValue,r.memoizedValue))return!0;r=r.next}return!1}function zs(r){js=r,zi=null,r=r.dependencies,r!==null&&(r.firstContext=null)}function rr(r){return q1(js,r)}function Zd(r,i){return js===null&&zs(r),q1(r,i)}function q1(r,i){var l=i._currentValue;if(i={context:i,memoizedValue:l,next:null},zi===null){if(r===null)throw Error(a(308));zi=i,r.dependencies={lanes:0,firstContext:i},r.flags|=524288}else zi=zi.next=i;return l}var tO=typeof AbortController<\"u\"?AbortController:function(){var r=[],i=this.signal={aborted:!1,addEventListener:function(l,d){r.push(d)}};this.abort=function(){i.aborted=!0,r.forEach(function(l){return l()})}},nO=e.unstable_scheduleCallback,rO=e.unstable_NormalPriority,In={$$typeof:M,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Im(){return{controller:new tO,data:new Map,refCount:0}}function Wc(r){r.refCount--,r.refCount===0&&nO(rO,function(){r.controller.abort()})}var Gc=null,Hm=0,Dl=0,jl=null;function aO(r,i){if(Gc===null){var l=Gc=[];Hm=0,Dl=$p(),jl={status:\"pending\",value:void 0,then:function(d){l.push(d)}}}return Hm++,i.then(F1,F1),i}function F1(){if(--Hm===0&&Gc!==null){jl!==null&&(jl.status=\"fulfilled\");var r=Gc;Gc=null,Dl=0,jl=null;for(var i=0;i<r.length;i++)(0,r[i])()}}function iO(r,i){var l=[],d={status:\"pending\",value:null,reason:null,then:function(p){l.push(p)}};return r.then(function(){d.status=\"fulfilled\",d.value=i;for(var p=0;p<l.length;p++)(0,l[p])(i)},function(p){for(d.status=\"rejected\",d.reason=p,p=0;p<l.length;p++)(0,l[p])(void 0)}),d}var $1=$.S;$.S=function(r,i){Ew=Ge(),typeof i==\"object\"&&i!==null&&typeof i.then==\"function\"&&aO(r,i),$1!==null&&$1(r,i)};var Ps=L(null);function qm(){var r=Ps.current;return r!==null?r:on.pooledCache}function Jd(r,i){i===null?Y(Ps,Ps.current):Y(Ps,i.pool)}function B1(){var r=qm();return r===null?null:{parent:In._currentValue,pool:r}}var zl=Error(a(460)),Fm=Error(a(474)),ef=Error(a(542)),tf={then:function(){}};function U1(r){return r=r.status,r===\"fulfilled\"||r===\"rejected\"}function V1(r,i,l){switch(l=r[l],l===void 0?r.push(i):l!==i&&(i.then(Or,Or),i=l),i.status){case\"fulfilled\":return i.value;case\"rejected\":throw r=i.reason,G1(r),r;default:if(typeof i.status==\"string\")i.then(Or,Or);else{if(r=on,r!==null&&100<r.shellSuspendCounter)throw Error(a(482));r=i,r.status=\"pending\",r.then(function(d){if(i.status===\"pending\"){var p=i;p.status=\"fulfilled\",p.value=d}},function(d){if(i.status===\"pending\"){var p=i;p.status=\"rejected\",p.reason=d}})}switch(i.status){case\"fulfilled\":return i.value;case\"rejected\":throw r=i.reason,G1(r),r}throw Is=i,zl}}function Ls(r){try{var i=r._init;return i(r._payload)}catch(l){throw l!==null&&typeof l==\"object\"&&typeof l.then==\"function\"?(Is=l,zl):l}}var Is=null;function W1(){if(Is===null)throw Error(a(459));var r=Is;return Is=null,r}function G1(r){if(r===zl||r===ef)throw Error(a(483))}var Pl=null,Yc=0;function nf(r){var i=Yc;return Yc+=1,Pl===null&&(Pl=[]),V1(Pl,r,i)}function Xc(r,i){i=i.props.ref,r.ref=i!==void 0?i:null}function rf(r,i){throw i.$$typeof===x?Error(a(525)):(r=Object.prototype.toString.call(i),Error(a(31,r===\"[object Object]\"?\"object with keys {\"+Object.keys(i).join(\", \")+\"}\":r)))}function Y1(r){function i(ae,J){if(r){var ue=ae.deletions;ue===null?(ae.deletions=[J],ae.flags|=16):ue.push(J)}}function l(ae,J){if(!r)return null;for(;J!==null;)i(ae,J),J=J.sibling;return null}function d(ae){for(var J=new Map;ae!==null;)ae.key!==null?J.set(ae.key,ae):J.set(ae.index,ae),ae=ae.sibling;return J}function p(ae,J){return ae=za(ae,J),ae.index=0,ae.sibling=null,ae}function b(ae,J,ue){return ae.index=ue,r?(ue=ae.alternate,ue!==null?(ue=ue.index,ue<J?(ae.flags|=67108866,J):ue):(ae.flags|=67108866,J)):(ae.flags|=1048576,J)}function E(ae){return r&&ae.alternate===null&&(ae.flags|=67108866),ae}function H(ae,J,ue,Ce){return J===null||J.tag!==6?(J=ye(ue,ae.mode,Ce),J.return=ae,J):(J=p(J,ue),J.return=ae,J)}function Q(ae,J,ue,Ce){var et=ue.type;return et===C?we(ae,J,ue.props.children,Ce,ue.key):J!==null&&(J.elementType===et||typeof et==\"object\"&&et!==null&&et.$$typeof===q&&Ls(et)===J.type)?(J=p(J,ue.props),Xc(J,ue),J.return=ae,J):(J=te(ue.type,ue.key,ue.props,null,ae.mode,Ce),Xc(J,ue),J.return=ae,J)}function de(ae,J,ue,Ce){return J===null||J.tag!==4||J.stateNode.containerInfo!==ue.containerInfo||J.stateNode.implementation!==ue.implementation?(J=Ee(ue,ae.mode,Ce),J.return=ae,J):(J=p(J,ue.children||[]),J.return=ae,J)}function we(ae,J,ue,Ce,et){return J===null||J.tag!==7?(J=ee(ue,ae.mode,Ce,et),J.return=ae,J):(J=p(J,ue),J.return=ae,J)}function Te(ae,J,ue){if(typeof J==\"string\"&&J!==\"\"||typeof J==\"number\"||typeof J==\"bigint\")return J=ye(\"\"+J,ae.mode,ue),J.return=ae,J;if(typeof J==\"object\"&&J!==null){switch(J.$$typeof){case S:return ue=te(J.type,J.key,J.props,null,ae.mode,ue),Xc(ue,J),ue.return=ae,ue;case w:return J=Ee(J,ae.mode,ue),J.return=ae,J;case q:return J=Ls(J),Te(ae,J,ue)}if(O(J)||_(J))return J=ee(J,ae.mode,ue,null),J.return=ae,J;if(typeof J.then==\"function\")return Te(ae,nf(J),ue);if(J.$$typeof===M)return Te(ae,Zd(ae,J),ue);rf(ae,J)}return null}function fe(ae,J,ue,Ce){var et=J!==null?J.key:null;if(typeof ue==\"string\"&&ue!==\"\"||typeof ue==\"number\"||typeof ue==\"bigint\")return et!==null?null:H(ae,J,\"\"+ue,Ce);if(typeof ue==\"object\"&&ue!==null){switch(ue.$$typeof){case S:return ue.key===et?Q(ae,J,ue,Ce):null;case w:return ue.key===et?de(ae,J,ue,Ce):null;case q:return ue=Ls(ue),fe(ae,J,ue,Ce)}if(O(ue)||_(ue))return et!==null?null:we(ae,J,ue,Ce,null);if(typeof ue.then==\"function\")return fe(ae,J,nf(ue),Ce);if(ue.$$typeof===M)return fe(ae,J,Zd(ae,ue),Ce);rf(ae,ue)}return null}function pe(ae,J,ue,Ce,et){if(typeof Ce==\"string\"&&Ce!==\"\"||typeof Ce==\"number\"||typeof Ce==\"bigint\")return ae=ae.get(ue)||null,H(J,ae,\"\"+Ce,et);if(typeof Ce==\"object\"&&Ce!==null){switch(Ce.$$typeof){case S:return ae=ae.get(Ce.key===null?ue:Ce.key)||null,Q(J,ae,Ce,et);case w:return ae=ae.get(Ce.key===null?ue:Ce.key)||null,de(J,ae,Ce,et);case q:return Ce=Ls(Ce),pe(ae,J,ue,Ce,et)}if(O(Ce)||_(Ce))return ae=ae.get(ue)||null,we(J,ae,Ce,et,null);if(typeof Ce.then==\"function\")return pe(ae,J,ue,nf(Ce),et);if(Ce.$$typeof===M)return pe(ae,J,ue,Zd(J,Ce),et);rf(J,Ce)}return null}function We(ae,J,ue,Ce){for(var et=null,Ft=null,Ze=J,yt=J=0,Dt=null;Ze!==null&&yt<ue.length;yt++){Ze.index>yt?(Dt=Ze,Ze=null):Dt=Ze.sibling;var $t=fe(ae,Ze,ue[yt],Ce);if($t===null){Ze===null&&(Ze=Dt);break}r&&Ze&&$t.alternate===null&&i(ae,Ze),J=b($t,J,yt),Ft===null?et=$t:Ft.sibling=$t,Ft=$t,Ze=Dt}if(yt===ue.length)return l(ae,Ze),pt&&Pt(ae,yt),et;if(Ze===null){for(;yt<ue.length;yt++)Ze=Te(ae,ue[yt],Ce),Ze!==null&&(J=b(Ze,J,yt),Ft===null?et=Ze:Ft.sibling=Ze,Ft=Ze);return pt&&Pt(ae,yt),et}for(Ze=d(Ze);yt<ue.length;yt++)Dt=pe(Ze,ae,yt,ue[yt],Ce),Dt!==null&&(r&&Dt.alternate!==null&&Ze.delete(Dt.key===null?yt:Dt.key),J=b(Dt,J,yt),Ft===null?et=Dt:Ft.sibling=Dt,Ft=Dt);return r&&Ze.forEach(function($o){return i(ae,$o)}),pt&&Pt(ae,yt),et}function ot(ae,J,ue,Ce){if(ue==null)throw Error(a(151));for(var et=null,Ft=null,Ze=J,yt=J=0,Dt=null,$t=ue.next();Ze!==null&&!$t.done;yt++,$t=ue.next()){Ze.index>yt?(Dt=Ze,Ze=null):Dt=Ze.sibling;var $o=fe(ae,Ze,$t.value,Ce);if($o===null){Ze===null&&(Ze=Dt);break}r&&Ze&&$o.alternate===null&&i(ae,Ze),J=b($o,J,yt),Ft===null?et=$o:Ft.sibling=$o,Ft=$o,Ze=Dt}if($t.done)return l(ae,Ze),pt&&Pt(ae,yt),et;if(Ze===null){for(;!$t.done;yt++,$t=ue.next())$t=Te(ae,$t.value,Ce),$t!==null&&(J=b($t,J,yt),Ft===null?et=$t:Ft.sibling=$t,Ft=$t);return pt&&Pt(ae,yt),et}for(Ze=d(Ze);!$t.done;yt++,$t=ue.next())$t=pe(Ze,ae,yt,$t.value,Ce),$t!==null&&(r&&$t.alternate!==null&&Ze.delete($t.key===null?yt:$t.key),J=b($t,J,yt),Ft===null?et=$t:Ft.sibling=$t,Ft=$t);return r&&Ze.forEach(function(gD){return i(ae,gD)}),pt&&Pt(ae,yt),et}function rn(ae,J,ue,Ce){if(typeof ue==\"object\"&&ue!==null&&ue.type===C&&ue.key===null&&(ue=ue.props.children),typeof ue==\"object\"&&ue!==null){switch(ue.$$typeof){case S:e:{for(var et=ue.key;J!==null;){if(J.key===et){if(et=ue.type,et===C){if(J.tag===7){l(ae,J.sibling),Ce=p(J,ue.props.children),Ce.return=ae,ae=Ce;break e}}else if(J.elementType===et||typeof et==\"object\"&&et!==null&&et.$$typeof===q&&Ls(et)===J.type){l(ae,J.sibling),Ce=p(J,ue.props),Xc(Ce,ue),Ce.return=ae,ae=Ce;break e}l(ae,J);break}else i(ae,J);J=J.sibling}ue.type===C?(Ce=ee(ue.props.children,ae.mode,Ce,ue.key),Ce.return=ae,ae=Ce):(Ce=te(ue.type,ue.key,ue.props,null,ae.mode,Ce),Xc(Ce,ue),Ce.return=ae,ae=Ce)}return E(ae);case w:e:{for(et=ue.key;J!==null;){if(J.key===et)if(J.tag===4&&J.stateNode.containerInfo===ue.containerInfo&&J.stateNode.implementation===ue.implementation){l(ae,J.sibling),Ce=p(J,ue.children||[]),Ce.return=ae,ae=Ce;break e}else{l(ae,J);break}else i(ae,J);J=J.sibling}Ce=Ee(ue,ae.mode,Ce),Ce.return=ae,ae=Ce}return E(ae);case q:return ue=Ls(ue),rn(ae,J,ue,Ce)}if(O(ue))return We(ae,J,ue,Ce);if(_(ue)){if(et=_(ue),typeof et!=\"function\")throw Error(a(150));return ue=et.call(ue),ot(ae,J,ue,Ce)}if(typeof ue.then==\"function\")return rn(ae,J,nf(ue),Ce);if(ue.$$typeof===M)return rn(ae,J,Zd(ae,ue),Ce);rf(ae,ue)}return typeof ue==\"string\"&&ue!==\"\"||typeof ue==\"number\"||typeof ue==\"bigint\"?(ue=\"\"+ue,J!==null&&J.tag===6?(l(ae,J.sibling),Ce=p(J,ue),Ce.return=ae,ae=Ce):(l(ae,J),Ce=ye(ue,ae.mode,Ce),Ce.return=ae,ae=Ce),E(ae)):l(ae,J)}return function(ae,J,ue,Ce){try{Yc=0;var et=rn(ae,J,ue,Ce);return Pl=null,et}catch(Ze){if(Ze===zl||Ze===ef)throw Ze;var Ft=Tr(29,Ze,null,ae.mode);return Ft.lanes=Ce,Ft.return=ae,Ft}}}var Hs=Y1(!0),X1=Y1(!1),Eo=!1;function $m(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Bm(r,i){r=r.updateQueue,i.updateQueue===r&&(i.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,callbacks:null})}function To(r){return{lane:r,tag:0,payload:null,callback:null,next:null}}function Mo(r,i,l){var d=r.updateQueue;if(d===null)return null;if(d=d.shared,(Ut&2)!==0){var p=d.pending;return p===null?i.next=i:(i.next=p.next,p.next=i),d.pending=i,i=Ns(r),Qd(r,null,l),i}return As(r,d,i,l),Ns(r)}function Qc(r,i,l){if(i=i.updateQueue,i!==null&&(i=i.shared,(l&4194048)!==0)){var d=i.lanes;d&=r.pendingLanes,l|=d,i.lanes=l,Vn(r,l)}}function Um(r,i){var l=r.updateQueue,d=r.alternate;if(d!==null&&(d=d.updateQueue,l===d)){var p=null,b=null;if(l=l.firstBaseUpdate,l!==null){do{var E={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};b===null?p=b=E:b=b.next=E,l=l.next}while(l!==null);b===null?p=b=i:b=b.next=i}else p=b=i;l={baseState:d.baseState,firstBaseUpdate:p,lastBaseUpdate:b,shared:d.shared,callbacks:d.callbacks},r.updateQueue=l;return}r=l.lastBaseUpdate,r===null?l.firstBaseUpdate=i:r.next=i,l.lastBaseUpdate=i}var Vm=!1;function Kc(){if(Vm){var r=jl;if(r!==null)throw r}}function Zc(r,i,l,d){Vm=!1;var p=r.updateQueue;Eo=!1;var b=p.firstBaseUpdate,E=p.lastBaseUpdate,H=p.shared.pending;if(H!==null){p.shared.pending=null;var Q=H,de=Q.next;Q.next=null,E===null?b=de:E.next=de,E=Q;var we=r.alternate;we!==null&&(we=we.updateQueue,H=we.lastBaseUpdate,H!==E&&(H===null?we.firstBaseUpdate=de:H.next=de,we.lastBaseUpdate=Q))}if(b!==null){var Te=p.baseState;E=0,we=de=Q=null,H=b;do{var fe=H.lane&-536870913,pe=fe!==H.lane;if(pe?(Ot&fe)===fe:(d&fe)===fe){fe!==0&&fe===Dl&&(Vm=!0),we!==null&&(we=we.next={lane:0,tag:H.tag,payload:H.payload,callback:null,next:null});e:{var We=r,ot=H;fe=i;var rn=l;switch(ot.tag){case 1:if(We=ot.payload,typeof We==\"function\"){Te=We.call(rn,Te,fe);break e}Te=We;break e;case 3:We.flags=We.flags&-65537|128;case 0:if(We=ot.payload,fe=typeof We==\"function\"?We.call(rn,Te,fe):We,fe==null)break e;Te=y({},Te,fe);break e;case 2:Eo=!0}}fe=H.callback,fe!==null&&(r.flags|=64,pe&&(r.flags|=8192),pe=p.callbacks,pe===null?p.callbacks=[fe]:pe.push(fe))}else pe={lane:fe,tag:H.tag,payload:H.payload,callback:H.callback,next:null},we===null?(de=we=pe,Q=Te):we=we.next=pe,E|=fe;if(H=H.next,H===null){if(H=p.shared.pending,H===null)break;pe=H,H=pe.next,pe.next=null,p.lastBaseUpdate=pe,p.shared.pending=null}}while(!0);we===null&&(Q=Te),p.baseState=Q,p.firstBaseUpdate=de,p.lastBaseUpdate=we,b===null&&(p.shared.lanes=0),Oo|=E,r.lanes=E,r.memoizedState=Te}}function Q1(r,i){if(typeof r!=\"function\")throw Error(a(191,r));r.call(i)}function K1(r,i){var l=r.callbacks;if(l!==null)for(r.callbacks=null,r=0;r<l.length;r++)Q1(l[r],i)}var Ll=L(null),af=L(0);function Z1(r,i){r=Vi,Y(af,r),Y(Ll,i),Vi=r|i.baseLanes}function Wm(){Y(af,Vi),Y(Ll,Ll.current)}function Gm(){Vi=af.current,X(Ll),X(af)}var ta=L(null),xa=null;function ko(r){var i=r.alternate;Y(jn,jn.current&1),Y(ta,r),xa===null&&(i===null||Ll.current!==null||i.memoizedState!==null)&&(xa=r)}function Ym(r){Y(jn,jn.current),Y(ta,r),xa===null&&(xa=r)}function J1(r){r.tag===22?(Y(jn,jn.current),Y(ta,r),xa===null&&(xa=r)):_o()}function _o(){Y(jn,jn.current),Y(ta,ta.current)}function na(r){X(ta),xa===r&&(xa=null),X(jn)}var jn=L(0);function of(r){for(var i=r;i!==null;){if(i.tag===13){var l=i.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||eg(l)||tg(l)))return i}else if(i.tag===19&&(i.memoizedProps.revealOrder===\"forwards\"||i.memoizedProps.revealOrder===\"backwards\"||i.memoizedProps.revealOrder===\"unstable_legacy-backwards\"||i.memoizedProps.revealOrder===\"together\")){if((i.flags&128)!==0)return i}else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===r)break;for(;i.sibling===null;){if(i.return===null||i.return===r)return null;i=i.return}i.sibling.return=i.return,i=i.sibling}return null}var Li=0,gt=null,tn=null,Hn=null,sf=!1,Il=!1,qs=!1,lf=0,Jc=0,Hl=null,oO=0;function _n(){throw Error(a(321))}function Xm(r,i){if(i===null)return!1;for(var l=0;l<i.length&&l<r.length;l++)if(!Rr(r[l],i[l]))return!1;return!0}function Qm(r,i,l,d,p,b){return Li=b,gt=i,i.memoizedState=null,i.updateQueue=null,i.lanes=0,$.H=r===null||r.memoizedState===null?Px:dp,qs=!1,b=l(d,p),qs=!1,Il&&(b=tx(i,l,d,p)),ex(r),b}function ex(r){$.H=nu;var i=tn!==null&&tn.next!==null;if(Li=0,Hn=tn=gt=null,sf=!1,Jc=0,Hl=null,i)throw Error(a(300));r===null||qn||(r=r.dependencies,r!==null&&Kd(r)&&(qn=!0))}function tx(r,i,l,d){gt=r;var p=0;do{if(Il&&(Hl=null),Jc=0,Il=!1,25<=p)throw Error(a(301));if(p+=1,Hn=tn=null,r.updateQueue!=null){var b=r.updateQueue;b.lastEffect=null,b.events=null,b.stores=null,b.memoCache!=null&&(b.memoCache.index=0)}$.H=Lx,b=i(l,d)}while(Il);return b}function sO(){var r=$.H,i=r.useState()[0];return i=typeof i.then==\"function\"?eu(i):i,r=r.useState()[0],(tn!==null?tn.memoizedState:null)!==r&&(gt.flags|=1024),i}function Km(){var r=lf!==0;return lf=0,r}function Zm(r,i,l){i.updateQueue=r.updateQueue,i.flags&=-2053,r.lanes&=~l}function Jm(r){if(sf){for(r=r.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}sf=!1}Li=0,Hn=tn=gt=null,Il=!1,Jc=lf=0,Hl=null}function Mr(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Hn===null?gt.memoizedState=Hn=r:Hn=Hn.next=r,Hn}function zn(){if(tn===null){var r=gt.alternate;r=r!==null?r.memoizedState:null}else r=tn.next;var i=Hn===null?gt.memoizedState:Hn.next;if(i!==null)Hn=i,tn=r;else{if(r===null)throw gt.alternate===null?Error(a(467)):Error(a(310));tn=r,r={memoizedState:tn.memoizedState,baseState:tn.baseState,baseQueue:tn.baseQueue,queue:tn.queue,next:null},Hn===null?gt.memoizedState=Hn=r:Hn=Hn.next=r}return Hn}function cf(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function eu(r){var i=Jc;return Jc+=1,Hl===null&&(Hl=[]),r=V1(Hl,r,i),i=gt,(Hn===null?i.memoizedState:Hn.next)===null&&(i=i.alternate,$.H=i===null||i.memoizedState===null?Px:dp),r}function uf(r){if(r!==null&&typeof r==\"object\"){if(typeof r.then==\"function\")return eu(r);if(r.$$typeof===M)return rr(r)}throw Error(a(438,String(r)))}function ep(r){var i=null,l=gt.updateQueue;if(l!==null&&(i=l.memoCache),i==null){var d=gt.alternate;d!==null&&(d=d.updateQueue,d!==null&&(d=d.memoCache,d!=null&&(i={data:d.data.map(function(p){return p.slice()}),index:0})))}if(i==null&&(i={data:[],index:0}),l===null&&(l=cf(),gt.updateQueue=l),l.memoCache=i,l=i.data[i.index],l===void 0)for(l=i.data[i.index]=Array(r),d=0;d<r;d++)l[d]=V;return i.index++,l}function Ii(r,i){return typeof i==\"function\"?i(r):i}function df(r){var i=zn();return tp(i,tn,r)}function tp(r,i,l){var d=r.queue;if(d===null)throw Error(a(311));d.lastRenderedReducer=l;var p=r.baseQueue,b=d.pending;if(b!==null){if(p!==null){var E=p.next;p.next=b.next,b.next=E}i.baseQueue=p=b,d.pending=null}if(b=r.baseState,p===null)r.memoizedState=b;else{i=p.next;var H=E=null,Q=null,de=i,we=!1;do{var Te=de.lane&-536870913;if(Te!==de.lane?(Ot&Te)===Te:(Li&Te)===Te){var fe=de.revertLane;if(fe===0)Q!==null&&(Q=Q.next={lane:0,revertLane:0,gesture:null,action:de.action,hasEagerState:de.hasEagerState,eagerState:de.eagerState,next:null}),Te===Dl&&(we=!0);else if((Li&fe)===fe){de=de.next,fe===Dl&&(we=!0);continue}else Te={lane:0,revertLane:de.revertLane,gesture:null,action:de.action,hasEagerState:de.hasEagerState,eagerState:de.eagerState,next:null},Q===null?(H=Q=Te,E=b):Q=Q.next=Te,gt.lanes|=fe,Oo|=fe;Te=de.action,qs&&l(b,Te),b=de.hasEagerState?de.eagerState:l(b,Te)}else fe={lane:Te,revertLane:de.revertLane,gesture:de.gesture,action:de.action,hasEagerState:de.hasEagerState,eagerState:de.eagerState,next:null},Q===null?(H=Q=fe,E=b):Q=Q.next=fe,gt.lanes|=Te,Oo|=Te;de=de.next}while(de!==null&&de!==i);if(Q===null?E=b:Q.next=H,!Rr(b,r.memoizedState)&&(qn=!0,we&&(l=jl,l!==null)))throw l;r.memoizedState=b,r.baseState=E,r.baseQueue=Q,d.lastRenderedState=b}return p===null&&(d.lanes=0),[r.memoizedState,d.dispatch]}function np(r){var i=zn(),l=i.queue;if(l===null)throw Error(a(311));l.lastRenderedReducer=r;var d=l.dispatch,p=l.pending,b=i.memoizedState;if(p!==null){l.pending=null;var E=p=p.next;do b=r(b,E.action),E=E.next;while(E!==p);Rr(b,i.memoizedState)||(qn=!0),i.memoizedState=b,i.baseQueue===null&&(i.baseState=b),l.lastRenderedState=b}return[b,d]}function nx(r,i,l){var d=gt,p=zn(),b=pt;if(b){if(l===void 0)throw Error(a(407));l=l()}else l=i();var E=!Rr((tn||p).memoizedState,l);if(E&&(p.memoizedState=l,qn=!0),p=p.queue,ip(ix.bind(null,d,p,r),[r]),p.getSnapshot!==i||E||Hn!==null&&Hn.memoizedState.tag&1){if(d.flags|=2048,ql(9,{destroy:void 0},ax.bind(null,d,p,l,i),null),on===null)throw Error(a(349));b||(Li&127)!==0||rx(d,i,l)}return l}function rx(r,i,l){r.flags|=16384,r={getSnapshot:i,value:l},i=gt.updateQueue,i===null?(i=cf(),gt.updateQueue=i,i.stores=[r]):(l=i.stores,l===null?i.stores=[r]:l.push(r))}function ax(r,i,l,d){i.value=l,i.getSnapshot=d,ox(i)&&sx(r)}function ix(r,i,l){return l(function(){ox(i)&&sx(r)})}function ox(r){var i=r.getSnapshot;r=r.value;try{var l=i();return!Rr(r,l)}catch{return!0}}function sx(r){var i=Ni(r,2);i!==null&&Hr(i,r,2)}function rp(r){var i=Mr();if(typeof r==\"function\"){var l=r;if(r=l(),qs){dn(!0);try{l()}finally{dn(!1)}}}return i.memoizedState=i.baseState=r,i.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ii,lastRenderedState:r},i}function lx(r,i,l,d){return r.baseState=l,tp(r,tn,typeof d==\"function\"?d:Ii)}function lO(r,i,l,d,p){if(mf(r))throw Error(a(485));if(r=i.action,r!==null){var b={payload:p,action:r,next:null,isTransition:!0,status:\"pending\",value:null,reason:null,listeners:[],then:function(E){b.listeners.push(E)}};$.T!==null?l(!0):b.isTransition=!1,d(b),l=i.pending,l===null?(b.next=i.pending=b,cx(i,b)):(b.next=l.next,i.pending=l.next=b)}}function cx(r,i){var l=i.action,d=i.payload,p=r.state;if(i.isTransition){var b=$.T,E={};$.T=E;try{var H=l(p,d),Q=$.S;Q!==null&&Q(E,H),ux(r,i,H)}catch(de){ap(r,i,de)}finally{b!==null&&E.types!==null&&(b.types=E.types),$.T=b}}else try{b=l(p,d),ux(r,i,b)}catch(de){ap(r,i,de)}}function ux(r,i,l){l!==null&&typeof l==\"object\"&&typeof l.then==\"function\"?l.then(function(d){dx(r,i,d)},function(d){return ap(r,i,d)}):dx(r,i,l)}function dx(r,i,l){i.status=\"fulfilled\",i.value=l,fx(i),r.state=l,i=r.pending,i!==null&&(l=i.next,l===i?r.pending=null:(l=l.next,i.next=l,cx(r,l)))}function ap(r,i,l){var d=r.pending;if(r.pending=null,d!==null){d=d.next;do i.status=\"rejected\",i.reason=l,fx(i),i=i.next;while(i!==d)}r.action=null}function fx(r){r=r.listeners;for(var i=0;i<r.length;i++)(0,r[i])()}function hx(r,i){return i}function mx(r,i){if(pt){var l=on.formState;if(l!==null){e:{var d=gt;if(pt){if(It){t:{for(var p=It,b=nr;p.nodeType!==8;){if(!b){p=null;break t}if(p=wa(p.nextSibling),p===null){p=null;break t}}b=p.data,p=b===\"F!\"||b===\"F\"?p:null}if(p){It=wa(p.nextSibling),d=p.data===\"F!\";break e}}Co(d)}d=!1}d&&(i=l[0])}}return l=Mr(),l.memoizedState=l.baseState=i,d={pending:null,lanes:0,dispatch:null,lastRenderedReducer:hx,lastRenderedState:i},l.queue=d,l=Dx.bind(null,gt,d),d.dispatch=l,d=rp(!1),b=up.bind(null,gt,!1,d.queue),d=Mr(),p={state:i,dispatch:null,action:r,pending:null},d.queue=p,l=lO.bind(null,gt,p,b,l),p.dispatch=l,d.memoizedState=r,[i,l,!1]}function px(r){var i=zn();return gx(i,tn,r)}function gx(r,i,l){if(i=tp(r,i,hx)[0],r=df(Ii)[0],typeof i==\"object\"&&i!==null&&typeof i.then==\"function\")try{var d=eu(i)}catch(E){throw E===zl?ef:E}else d=i;i=zn();var p=i.queue,b=p.dispatch;return l!==i.memoizedState&&(gt.flags|=2048,ql(9,{destroy:void 0},cO.bind(null,p,l),null)),[d,b,r]}function cO(r,i){r.action=i}function vx(r){var i=zn(),l=tn;if(l!==null)return gx(i,l,r);zn(),i=i.memoizedState,l=zn();var d=l.queue.dispatch;return l.memoizedState=r,[i,d,!1]}function ql(r,i,l,d){return r={tag:r,create:l,deps:d,inst:i,next:null},i=gt.updateQueue,i===null&&(i=cf(),gt.updateQueue=i),l=i.lastEffect,l===null?i.lastEffect=r.next=r:(d=l.next,l.next=r,r.next=d,i.lastEffect=r),r}function yx(){return zn().memoizedState}function ff(r,i,l,d){var p=Mr();gt.flags|=r,p.memoizedState=ql(1|i,{destroy:void 0},l,d===void 0?null:d)}function hf(r,i,l,d){var p=zn();d=d===void 0?null:d;var b=p.memoizedState.inst;tn!==null&&d!==null&&Xm(d,tn.memoizedState.deps)?p.memoizedState=ql(i,b,l,d):(gt.flags|=r,p.memoizedState=ql(1|i,b,l,d))}function bx(r,i){ff(8390656,8,r,i)}function ip(r,i){hf(2048,8,r,i)}function uO(r){gt.flags|=4;var i=gt.updateQueue;if(i===null)i=cf(),gt.updateQueue=i,i.events=[r];else{var l=i.events;l===null?i.events=[r]:l.push(r)}}function xx(r){var i=zn().memoizedState;return uO({ref:i,nextImpl:r}),function(){if((Ut&2)!==0)throw Error(a(440));return i.impl.apply(void 0,arguments)}}function wx(r,i){return hf(4,2,r,i)}function Sx(r,i){return hf(4,4,r,i)}function Cx(r,i){if(typeof i==\"function\"){r=r();var l=i(r);return function(){typeof l==\"function\"?l():i(null)}}if(i!=null)return r=r(),i.current=r,function(){i.current=null}}function Rx(r,i,l){l=l!=null?l.concat([r]):null,hf(4,4,Cx.bind(null,i,r),l)}function op(){}function Ex(r,i){var l=zn();i=i===void 0?null:i;var d=l.memoizedState;return i!==null&&Xm(i,d[1])?d[0]:(l.memoizedState=[r,i],r)}function Tx(r,i){var l=zn();i=i===void 0?null:i;var d=l.memoizedState;if(i!==null&&Xm(i,d[1]))return d[0];if(d=r(),qs){dn(!0);try{r()}finally{dn(!1)}}return l.memoizedState=[d,i],d}function sp(r,i,l){return l===void 0||(Li&1073741824)!==0&&(Ot&261930)===0?r.memoizedState=i:(r.memoizedState=l,r=Mw(),gt.lanes|=r,Oo|=r,l)}function Mx(r,i,l,d){return Rr(l,i)?l:Ll.current!==null?(r=sp(r,l,d),Rr(r,i)||(qn=!0),r):(Li&42)===0||(Li&1073741824)!==0&&(Ot&261930)===0?(qn=!0,r.memoizedState=l):(r=Mw(),gt.lanes|=r,Oo|=r,i)}function kx(r,i,l,d,p){var b=W.p;W.p=b!==0&&8>b?b:8;var E=$.T,H={};$.T=H,up(r,!1,i,l);try{var Q=p(),de=$.S;if(de!==null&&de(H,Q),Q!==null&&typeof Q==\"object\"&&typeof Q.then==\"function\"){var we=iO(Q,d);tu(r,i,we,ia(r))}else tu(r,i,d,ia(r))}catch(Te){tu(r,i,{then:function(){},status:\"rejected\",reason:Te},ia())}finally{W.p=b,E!==null&&H.types!==null&&(E.types=H.types),$.T=E}}function dO(){}function lp(r,i,l,d){if(r.tag!==5)throw Error(a(476));var p=_x(r).queue;kx(r,p,i,U,l===null?dO:function(){return Ax(r),l(d)})}function _x(r){var i=r.memoizedState;if(i!==null)return i;i={memoizedState:U,baseState:U,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ii,lastRenderedState:U},next:null};var l={};return i.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ii,lastRenderedState:l},next:null},r.memoizedState=i,r=r.alternate,r!==null&&(r.memoizedState=i),i}function Ax(r){var i=_x(r);i.next===null&&(i=r.alternate.memoizedState),tu(r,i.next.queue,{},ia())}function cp(){return rr(yu)}function Nx(){return zn().memoizedState}function Ox(){return zn().memoizedState}function fO(r){for(var i=r.return;i!==null;){switch(i.tag){case 24:case 3:var l=ia();r=To(l);var d=Mo(i,r,l);d!==null&&(Hr(d,i,l),Qc(d,i,l)),i={cache:Im()},r.payload=i;return}i=i.return}}function hO(r,i,l){var d=ia();l={lane:d,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},mf(r)?jx(i,l):(l=Bc(r,i,l,d),l!==null&&(Hr(l,r,d),zx(l,i,d)))}function Dx(r,i,l){var d=ia();tu(r,i,l,d)}function tu(r,i,l,d){var p={lane:d,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(mf(r))jx(i,p);else{var b=r.alternate;if(r.lanes===0&&(b===null||b.lanes===0)&&(b=i.lastRenderedReducer,b!==null))try{var E=i.lastRenderedState,H=b(E,l);if(p.hasEagerState=!0,p.eagerState=H,Rr(H,E))return As(r,i,p,0),on===null&&_s(),!1}catch{}if(l=Bc(r,i,p,d),l!==null)return Hr(l,r,d),zx(l,i,d),!0}return!1}function up(r,i,l,d){if(d={lane:2,revertLane:$p(),gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null},mf(r)){if(i)throw Error(a(479))}else i=Bc(r,l,d,2),i!==null&&Hr(i,r,2)}function mf(r){var i=r.alternate;return r===gt||i!==null&&i===gt}function jx(r,i){Il=sf=!0;var l=r.pending;l===null?i.next=i:(i.next=l.next,l.next=i),r.pending=i}function zx(r,i,l){if((l&4194048)!==0){var d=i.lanes;d&=r.pendingLanes,l|=d,i.lanes=l,Vn(r,l)}}var nu={readContext:rr,use:uf,useCallback:_n,useContext:_n,useEffect:_n,useImperativeHandle:_n,useLayoutEffect:_n,useInsertionEffect:_n,useMemo:_n,useReducer:_n,useRef:_n,useState:_n,useDebugValue:_n,useDeferredValue:_n,useTransition:_n,useSyncExternalStore:_n,useId:_n,useHostTransitionStatus:_n,useFormState:_n,useActionState:_n,useOptimistic:_n,useMemoCache:_n,useCacheRefresh:_n};nu.useEffectEvent=_n;var Px={readContext:rr,use:uf,useCallback:function(r,i){return Mr().memoizedState=[r,i===void 0?null:i],r},useContext:rr,useEffect:bx,useImperativeHandle:function(r,i,l){l=l!=null?l.concat([r]):null,ff(4194308,4,Cx.bind(null,i,r),l)},useLayoutEffect:function(r,i){return ff(4194308,4,r,i)},useInsertionEffect:function(r,i){ff(4,2,r,i)},useMemo:function(r,i){var l=Mr();i=i===void 0?null:i;var d=r();if(qs){dn(!0);try{r()}finally{dn(!1)}}return l.memoizedState=[d,i],d},useReducer:function(r,i,l){var d=Mr();if(l!==void 0){var p=l(i);if(qs){dn(!0);try{l(i)}finally{dn(!1)}}}else p=i;return d.memoizedState=d.baseState=p,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:p},d.queue=r,r=r.dispatch=hO.bind(null,gt,r),[d.memoizedState,r]},useRef:function(r){var i=Mr();return r={current:r},i.memoizedState=r},useState:function(r){r=rp(r);var i=r.queue,l=Dx.bind(null,gt,i);return i.dispatch=l,[r.memoizedState,l]},useDebugValue:op,useDeferredValue:function(r,i){var l=Mr();return sp(l,r,i)},useTransition:function(){var r=rp(!1);return r=kx.bind(null,gt,r.queue,!0,!1),Mr().memoizedState=r,[!1,r]},useSyncExternalStore:function(r,i,l){var d=gt,p=Mr();if(pt){if(l===void 0)throw Error(a(407));l=l()}else{if(l=i(),on===null)throw Error(a(349));(Ot&127)!==0||rx(d,i,l)}p.memoizedState=l;var b={value:l,getSnapshot:i};return p.queue=b,bx(ix.bind(null,d,b,r),[r]),d.flags|=2048,ql(9,{destroy:void 0},ax.bind(null,d,b,l,i),null),l},useId:function(){var r=Mr(),i=on.identifierPrefix;if(pt){var l=Vt,d=Rt;l=(d&~(1<<32-sn(d)-1)).toString(32)+l,i=\"_\"+i+\"R_\"+l,l=lf++,0<l&&(i+=\"H\"+l.toString(32)),i+=\"_\"}else l=oO++,i=\"_\"+i+\"r_\"+l.toString(32)+\"_\";return r.memoizedState=i},useHostTransitionStatus:cp,useFormState:mx,useActionState:mx,useOptimistic:function(r){var i=Mr();i.memoizedState=i.baseState=r;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return i.queue=l,i=up.bind(null,gt,!0,l),l.dispatch=i,[r,i]},useMemoCache:ep,useCacheRefresh:function(){return Mr().memoizedState=fO.bind(null,gt)},useEffectEvent:function(r){var i=Mr(),l={impl:r};return i.memoizedState=l,function(){if((Ut&2)!==0)throw Error(a(440));return l.impl.apply(void 0,arguments)}}},dp={readContext:rr,use:uf,useCallback:Ex,useContext:rr,useEffect:ip,useImperativeHandle:Rx,useInsertionEffect:wx,useLayoutEffect:Sx,useMemo:Tx,useReducer:df,useRef:yx,useState:function(){return df(Ii)},useDebugValue:op,useDeferredValue:function(r,i){var l=zn();return Mx(l,tn.memoizedState,r,i)},useTransition:function(){var r=df(Ii)[0],i=zn().memoizedState;return[typeof r==\"boolean\"?r:eu(r),i]},useSyncExternalStore:nx,useId:Nx,useHostTransitionStatus:cp,useFormState:px,useActionState:px,useOptimistic:function(r,i){var l=zn();return lx(l,tn,r,i)},useMemoCache:ep,useCacheRefresh:Ox};dp.useEffectEvent=xx;var Lx={readContext:rr,use:uf,useCallback:Ex,useContext:rr,useEffect:ip,useImperativeHandle:Rx,useInsertionEffect:wx,useLayoutEffect:Sx,useMemo:Tx,useReducer:np,useRef:yx,useState:function(){return np(Ii)},useDebugValue:op,useDeferredValue:function(r,i){var l=zn();return tn===null?sp(l,r,i):Mx(l,tn.memoizedState,r,i)},useTransition:function(){var r=np(Ii)[0],i=zn().memoizedState;return[typeof r==\"boolean\"?r:eu(r),i]},useSyncExternalStore:nx,useId:Nx,useHostTransitionStatus:cp,useFormState:vx,useActionState:vx,useOptimistic:function(r,i){var l=zn();return tn!==null?lx(l,tn,r,i):(l.baseState=r,[r,l.queue.dispatch])},useMemoCache:ep,useCacheRefresh:Ox};Lx.useEffectEvent=xx;function fp(r,i,l,d){i=r.memoizedState,l=l(d,i),l=l==null?i:y({},i,l),r.memoizedState=l,r.lanes===0&&(r.updateQueue.baseState=l)}var hp={enqueueSetState:function(r,i,l){r=r._reactInternals;var d=ia(),p=To(d);p.payload=i,l!=null&&(p.callback=l),i=Mo(r,p,d),i!==null&&(Hr(i,r,d),Qc(i,r,d))},enqueueReplaceState:function(r,i,l){r=r._reactInternals;var d=ia(),p=To(d);p.tag=1,p.payload=i,l!=null&&(p.callback=l),i=Mo(r,p,d),i!==null&&(Hr(i,r,d),Qc(i,r,d))},enqueueForceUpdate:function(r,i){r=r._reactInternals;var l=ia(),d=To(l);d.tag=2,i!=null&&(d.callback=i),i=Mo(r,d,l),i!==null&&(Hr(i,r,l),Qc(i,r,l))}};function Ix(r,i,l,d,p,b,E){return r=r.stateNode,typeof r.shouldComponentUpdate==\"function\"?r.shouldComponentUpdate(d,b,E):i.prototype&&i.prototype.isPureReactComponent?!Cs(l,d)||!Cs(p,b):!0}function Hx(r,i,l,d){r=i.state,typeof i.componentWillReceiveProps==\"function\"&&i.componentWillReceiveProps(l,d),typeof i.UNSAFE_componentWillReceiveProps==\"function\"&&i.UNSAFE_componentWillReceiveProps(l,d),i.state!==r&&hp.enqueueReplaceState(i,i.state,null)}function Fs(r,i){var l=i;if(\"ref\"in i){l={};for(var d in i)d!==\"ref\"&&(l[d]=i[d])}if(r=r.defaultProps){l===i&&(l=y({},l));for(var p in r)l[p]===void 0&&(l[p]=r[p])}return l}function qx(r){Al(r)}function Fx(r){console.error(r)}function $x(r){Al(r)}function pf(r,i){try{var l=r.onUncaughtError;l(i.value,{componentStack:i.stack})}catch(d){setTimeout(function(){throw d})}}function Bx(r,i,l){try{var d=r.onCaughtError;d(l.value,{componentStack:l.stack,errorBoundary:i.tag===1?i.stateNode:null})}catch(p){setTimeout(function(){throw p})}}function mp(r,i,l){return l=To(l),l.tag=3,l.payload={element:null},l.callback=function(){pf(r,i)},l}function Ux(r){return r=To(r),r.tag=3,r}function Vx(r,i,l,d){var p=l.type.getDerivedStateFromError;if(typeof p==\"function\"){var b=d.value;r.payload=function(){return p(b)},r.callback=function(){Bx(i,l,d)}}var E=l.stateNode;E!==null&&typeof E.componentDidCatch==\"function\"&&(r.callback=function(){Bx(i,l,d),typeof p!=\"function\"&&(Do===null?Do=new Set([this]):Do.add(this));var H=d.stack;this.componentDidCatch(d.value,{componentStack:H!==null?H:\"\"})})}function mO(r,i,l,d,p){if(l.flags|=32768,d!==null&&typeof d==\"object\"&&typeof d.then==\"function\"){if(i=l.alternate,i!==null&&Ol(i,l,p,!0),l=ta.current,l!==null){switch(l.tag){case 31:case 13:return xa===null?Mf():l.alternate===null&&An===0&&(An=3),l.flags&=-257,l.flags|=65536,l.lanes=p,d===tf?l.flags|=16384:(i=l.updateQueue,i===null?l.updateQueue=new Set([d]):i.add(d),Hp(r,d,p)),!1;case 22:return l.flags|=65536,d===tf?l.flags|=16384:(i=l.updateQueue,i===null?(i={transitions:null,markerInstances:null,retryQueue:new Set([d])},l.updateQueue=i):(l=i.retryQueue,l===null?i.retryQueue=new Set([d]):l.add(d)),Hp(r,d,p)),!1}throw Error(a(435,l.tag))}return Hp(r,d,p),Mf(),!1}if(pt)return i=ta.current,i!==null?((i.flags&65536)===0&&(i.flags|=256),i.flags|=65536,i.lanes=p,d!==Os&&(r=Error(a(422),{cause:d}),Vc(he(r,l)))):(d!==Os&&(i=Error(a(423),{cause:d}),Vc(he(i,l))),r=r.current.alternate,r.flags|=65536,p&=-p,r.lanes|=p,d=he(d,l),p=mp(r.stateNode,d,p),Um(r,p),An!==4&&(An=2)),!1;var b=Error(a(520),{cause:d});if(b=he(b,l),uu===null?uu=[b]:uu.push(b),An!==4&&(An=2),i===null)return!0;d=he(d,l),l=i;do{switch(l.tag){case 3:return l.flags|=65536,r=p&-p,l.lanes|=r,r=mp(l.stateNode,d,r),Um(l,r),!1;case 1:if(i=l.type,b=l.stateNode,(l.flags&128)===0&&(typeof i.getDerivedStateFromError==\"function\"||b!==null&&typeof b.componentDidCatch==\"function\"&&(Do===null||!Do.has(b))))return l.flags|=65536,p&=-p,l.lanes|=p,p=Ux(p),Vx(p,r,l,d),Um(l,p),!1}l=l.return}while(l!==null);return!1}var pp=Error(a(461)),qn=!1;function ar(r,i,l,d){i.child=r===null?X1(i,null,l,d):Hs(i,r.child,l,d)}function Wx(r,i,l,d,p){l=l.render;var b=i.ref;if(\"ref\"in d){var E={};for(var H in d)H!==\"ref\"&&(E[H]=d[H])}else E=d;return zs(i),d=Qm(r,i,l,E,b,p),H=Km(),r!==null&&!qn?(Zm(r,i,p),Hi(r,i,p)):(pt&&H&&Di(i),i.flags|=1,ar(r,i,d,p),i.child)}function Gx(r,i,l,d,p){if(r===null){var b=l.type;return typeof b==\"function\"&&!Uc(b)&&b.defaultProps===void 0&&l.compare===null?(i.tag=15,i.type=b,Yx(r,i,b,d,p)):(r=te(l.type,null,d,i,i.mode,p),r.ref=i.ref,r.return=i,i.child=r)}if(b=r.child,!Cp(r,p)){var E=b.memoizedProps;if(l=l.compare,l=l!==null?l:Cs,l(E,d)&&r.ref===i.ref)return Hi(r,i,p)}return i.flags|=1,r=za(b,d),r.ref=i.ref,r.return=i,i.child=r}function Yx(r,i,l,d,p){if(r!==null){var b=r.memoizedProps;if(Cs(b,d)&&r.ref===i.ref)if(qn=!1,i.pendingProps=d=b,Cp(r,p))(r.flags&131072)!==0&&(qn=!0);else return i.lanes=r.lanes,Hi(r,i,p)}return gp(r,i,l,d,p)}function Xx(r,i,l,d){var p=d.children,b=r!==null?r.memoizedState:null;if(r===null&&i.stateNode===null&&(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),d.mode===\"hidden\"){if((i.flags&128)!==0){if(b=b!==null?b.baseLanes|l:l,r!==null){for(d=i.child=r.child,p=0;d!==null;)p=p|d.lanes|d.childLanes,d=d.sibling;d=p&~b}else d=0,i.child=null;return Qx(r,i,b,l,d)}if((l&536870912)!==0)i.memoizedState={baseLanes:0,cachePool:null},r!==null&&Jd(i,b!==null?b.cachePool:null),b!==null?Z1(i,b):Wm(),J1(i);else return d=i.lanes=536870912,Qx(r,i,b!==null?b.baseLanes|l:l,l,d)}else b!==null?(Jd(i,b.cachePool),Z1(i,b),_o(),i.memoizedState=null):(r!==null&&Jd(i,null),Wm(),_o());return ar(r,i,p,l),i.child}function ru(r,i){return r!==null&&r.tag===22||i.stateNode!==null||(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.sibling}function Qx(r,i,l,d,p){var b=qm();return b=b===null?null:{parent:In._currentValue,pool:b},i.memoizedState={baseLanes:l,cachePool:b},r!==null&&Jd(i,null),Wm(),J1(i),r!==null&&Ol(r,i,d,!0),i.childLanes=p,null}function gf(r,i){return i=yf({mode:i.mode,children:i.children},r.mode),i.ref=r.ref,r.child=i,i.return=r,i}function Kx(r,i,l){return Hs(i,r.child,null,l),r=gf(i,i.pendingProps),r.flags|=2,na(i),i.memoizedState=null,r}function pO(r,i,l){var d=i.pendingProps,p=(i.flags&128)!==0;if(i.flags&=-129,r===null){if(pt){if(d.mode===\"hidden\")return r=gf(i,d),i.lanes=536870912,ru(null,r);if(Ym(i),(r=It)?(r=cS(r,nr),r=r!==null&&r.data===\"&\"?r:null,r!==null&&(i.memoizedState={dehydrated:r,treeContext:ft!==null?{id:Rt,overflow:Vt}:null,retryLane:536870912,hydrationErrors:null},l=be(r),l.return=i,i.child=l,yn=i,It=null)):r=null,r===null)throw Co(i);return i.lanes=536870912,null}return gf(i,d)}var b=r.memoizedState;if(b!==null){var E=b.dehydrated;if(Ym(i),p)if(i.flags&256)i.flags&=-257,i=Kx(r,i,l);else if(i.memoizedState!==null)i.child=r.child,i.flags|=128,i=null;else throw Error(a(558));else if(qn||Ol(r,i,l,!1),p=(l&r.childLanes)!==0,qn||p){if(d=on,d!==null&&(E=vr(d,l),E!==0&&E!==b.retryLane))throw b.retryLane=E,Ni(r,E),Hr(d,r,E),pp;Mf(),i=Kx(r,i,l)}else r=b.treeContext,It=wa(E.nextSibling),yn=i,pt=!0,ea=null,nr=!1,r!==null&&Jr(i,r),i=gf(i,d),i.flags|=4096;return i}return r=za(r.child,{mode:d.mode,children:d.children}),r.ref=i.ref,i.child=r,r.return=i,r}function vf(r,i){var l=i.ref;if(l===null)r!==null&&r.ref!==null&&(i.flags|=4194816);else{if(typeof l!=\"function\"&&typeof l!=\"object\")throw Error(a(284));(r===null||r.ref!==l)&&(i.flags|=4194816)}}function gp(r,i,l,d,p){return zs(i),l=Qm(r,i,l,d,void 0,p),d=Km(),r!==null&&!qn?(Zm(r,i,p),Hi(r,i,p)):(pt&&d&&Di(i),i.flags|=1,ar(r,i,l,p),i.child)}function Zx(r,i,l,d,p,b){return zs(i),i.updateQueue=null,l=tx(i,d,l,p),ex(r),d=Km(),r!==null&&!qn?(Zm(r,i,b),Hi(r,i,b)):(pt&&d&&Di(i),i.flags|=1,ar(r,i,l,b),i.child)}function Jx(r,i,l,d,p){if(zs(i),i.stateNode===null){var b=So,E=l.contextType;typeof E==\"object\"&&E!==null&&(b=rr(E)),b=new l(d,b),i.memoizedState=b.state!==null&&b.state!==void 0?b.state:null,b.updater=hp,i.stateNode=b,b._reactInternals=i,b=i.stateNode,b.props=d,b.state=i.memoizedState,b.refs={},$m(i),E=l.contextType,b.context=typeof E==\"object\"&&E!==null?rr(E):So,b.state=i.memoizedState,E=l.getDerivedStateFromProps,typeof E==\"function\"&&(fp(i,l,E,d),b.state=i.memoizedState),typeof l.getDerivedStateFromProps==\"function\"||typeof b.getSnapshotBeforeUpdate==\"function\"||typeof b.UNSAFE_componentWillMount!=\"function\"&&typeof b.componentWillMount!=\"function\"||(E=b.state,typeof b.componentWillMount==\"function\"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount==\"function\"&&b.UNSAFE_componentWillMount(),E!==b.state&&hp.enqueueReplaceState(b,b.state,null),Zc(i,d,b,p),Kc(),b.state=i.memoizedState),typeof b.componentDidMount==\"function\"&&(i.flags|=4194308),d=!0}else if(r===null){b=i.stateNode;var H=i.memoizedProps,Q=Fs(l,H);b.props=Q;var de=b.context,we=l.contextType;E=So,typeof we==\"object\"&&we!==null&&(E=rr(we));var Te=l.getDerivedStateFromProps;we=typeof Te==\"function\"||typeof b.getSnapshotBeforeUpdate==\"function\",H=i.pendingProps!==H,we||typeof b.UNSAFE_componentWillReceiveProps!=\"function\"&&typeof b.componentWillReceiveProps!=\"function\"||(H||de!==E)&&Hx(i,b,d,E),Eo=!1;var fe=i.memoizedState;b.state=fe,Zc(i,d,b,p),Kc(),de=i.memoizedState,H||fe!==de||Eo?(typeof Te==\"function\"&&(fp(i,l,Te,d),de=i.memoizedState),(Q=Eo||Ix(i,l,Q,d,fe,de,E))?(we||typeof b.UNSAFE_componentWillMount!=\"function\"&&typeof b.componentWillMount!=\"function\"||(typeof b.componentWillMount==\"function\"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount==\"function\"&&b.UNSAFE_componentWillMount()),typeof b.componentDidMount==\"function\"&&(i.flags|=4194308)):(typeof b.componentDidMount==\"function\"&&(i.flags|=4194308),i.memoizedProps=d,i.memoizedState=de),b.props=d,b.state=de,b.context=E,d=Q):(typeof b.componentDidMount==\"function\"&&(i.flags|=4194308),d=!1)}else{b=i.stateNode,Bm(r,i),E=i.memoizedProps,we=Fs(l,E),b.props=we,Te=i.pendingProps,fe=b.context,de=l.contextType,Q=So,typeof de==\"object\"&&de!==null&&(Q=rr(de)),H=l.getDerivedStateFromProps,(de=typeof H==\"function\"||typeof b.getSnapshotBeforeUpdate==\"function\")||typeof b.UNSAFE_componentWillReceiveProps!=\"function\"&&typeof b.componentWillReceiveProps!=\"function\"||(E!==Te||fe!==Q)&&Hx(i,b,d,Q),Eo=!1,fe=i.memoizedState,b.state=fe,Zc(i,d,b,p),Kc();var pe=i.memoizedState;E!==Te||fe!==pe||Eo||r!==null&&r.dependencies!==null&&Kd(r.dependencies)?(typeof H==\"function\"&&(fp(i,l,H,d),pe=i.memoizedState),(we=Eo||Ix(i,l,we,d,fe,pe,Q)||r!==null&&r.dependencies!==null&&Kd(r.dependencies))?(de||typeof b.UNSAFE_componentWillUpdate!=\"function\"&&typeof b.componentWillUpdate!=\"function\"||(typeof b.componentWillUpdate==\"function\"&&b.componentWillUpdate(d,pe,Q),typeof b.UNSAFE_componentWillUpdate==\"function\"&&b.UNSAFE_componentWillUpdate(d,pe,Q)),typeof b.componentDidUpdate==\"function\"&&(i.flags|=4),typeof b.getSnapshotBeforeUpdate==\"function\"&&(i.flags|=1024)):(typeof b.componentDidUpdate!=\"function\"||E===r.memoizedProps&&fe===r.memoizedState||(i.flags|=4),typeof b.getSnapshotBeforeUpdate!=\"function\"||E===r.memoizedProps&&fe===r.memoizedState||(i.flags|=1024),i.memoizedProps=d,i.memoizedState=pe),b.props=d,b.state=pe,b.context=Q,d=we):(typeof b.componentDidUpdate!=\"function\"||E===r.memoizedProps&&fe===r.memoizedState||(i.flags|=4),typeof b.getSnapshotBeforeUpdate!=\"function\"||E===r.memoizedProps&&fe===r.memoizedState||(i.flags|=1024),d=!1)}return b=d,vf(r,i),d=(i.flags&128)!==0,b||d?(b=i.stateNode,l=d&&typeof l.getDerivedStateFromError!=\"function\"?null:b.render(),i.flags|=1,r!==null&&d?(i.child=Hs(i,r.child,null,p),i.child=Hs(i,null,l,p)):ar(r,i,l,p),i.memoizedState=b.state,r=i.child):r=Hi(r,i,p),r}function ew(r,i,l,d){return Ds(),i.flags|=256,ar(r,i,l,d),i.child}var vp={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function yp(r){return{baseLanes:r,cachePool:B1()}}function bp(r,i,l){return r=r!==null?r.childLanes&~l:0,i&&(r|=aa),r}function tw(r,i,l){var d=i.pendingProps,p=!1,b=(i.flags&128)!==0,E;if((E=b)||(E=r!==null&&r.memoizedState===null?!1:(jn.current&2)!==0),E&&(p=!0,i.flags&=-129),E=(i.flags&32)!==0,i.flags&=-33,r===null){if(pt){if(p?ko(i):_o(),(r=It)?(r=cS(r,nr),r=r!==null&&r.data!==\"&\"?r:null,r!==null&&(i.memoizedState={dehydrated:r,treeContext:ft!==null?{id:Rt,overflow:Vt}:null,retryLane:536870912,hydrationErrors:null},l=be(r),l.return=i,i.child=l,yn=i,It=null)):r=null,r===null)throw Co(i);return tg(r)?i.lanes=32:i.lanes=536870912,null}var H=d.children;return d=d.fallback,p?(_o(),p=i.mode,H=yf({mode:\"hidden\",children:H},p),d=ee(d,p,l,null),H.return=i,d.return=i,H.sibling=d,i.child=H,d=i.child,d.memoizedState=yp(l),d.childLanes=bp(r,E,l),i.memoizedState=vp,ru(null,d)):(ko(i),xp(i,H))}var Q=r.memoizedState;if(Q!==null&&(H=Q.dehydrated,H!==null)){if(b)i.flags&256?(ko(i),i.flags&=-257,i=wp(r,i,l)):i.memoizedState!==null?(_o(),i.child=r.child,i.flags|=128,i=null):(_o(),H=d.fallback,p=i.mode,d=yf({mode:\"visible\",children:d.children},p),H=ee(H,p,l,null),H.flags|=2,d.return=i,H.return=i,d.sibling=H,i.child=d,Hs(i,r.child,null,l),d=i.child,d.memoizedState=yp(l),d.childLanes=bp(r,E,l),i.memoizedState=vp,i=ru(null,d));else if(ko(i),tg(H)){if(E=H.nextSibling&&H.nextSibling.dataset,E)var de=E.dgst;E=de,d=Error(a(419)),d.stack=\"\",d.digest=E,Vc({value:d,source:null,stack:null}),i=wp(r,i,l)}else if(qn||Ol(r,i,l,!1),E=(l&r.childLanes)!==0,qn||E){if(E=on,E!==null&&(d=vr(E,l),d!==0&&d!==Q.retryLane))throw Q.retryLane=d,Ni(r,d),Hr(E,r,d),pp;eg(H)||Mf(),i=wp(r,i,l)}else eg(H)?(i.flags|=192,i.child=r.child,i=null):(r=Q.treeContext,It=wa(H.nextSibling),yn=i,pt=!0,ea=null,nr=!1,r!==null&&Jr(i,r),i=xp(i,d.children),i.flags|=4096);return i}return p?(_o(),H=d.fallback,p=i.mode,Q=r.child,de=Q.sibling,d=za(Q,{mode:\"hidden\",children:d.children}),d.subtreeFlags=Q.subtreeFlags&65011712,de!==null?H=za(de,H):(H=ee(H,p,l,null),H.flags|=2),H.return=i,d.return=i,d.sibling=H,i.child=d,ru(null,d),d=i.child,H=r.child.memoizedState,H===null?H=yp(l):(p=H.cachePool,p!==null?(Q=In._currentValue,p=p.parent!==Q?{parent:Q,pool:Q}:p):p=B1(),H={baseLanes:H.baseLanes|l,cachePool:p}),d.memoizedState=H,d.childLanes=bp(r,E,l),i.memoizedState=vp,ru(r.child,d)):(ko(i),l=r.child,r=l.sibling,l=za(l,{mode:\"visible\",children:d.children}),l.return=i,l.sibling=null,r!==null&&(E=i.deletions,E===null?(i.deletions=[r],i.flags|=16):E.push(r)),i.child=l,i.memoizedState=null,l)}function xp(r,i){return i=yf({mode:\"visible\",children:i},r.mode),i.return=r,r.child=i}function yf(r,i){return r=Tr(22,r,null,i),r.lanes=0,r}function wp(r,i,l){return Hs(i,r.child,null,l),r=xp(i,i.pendingProps.children),r.flags|=2,i.memoizedState=null,r}function nw(r,i,l){r.lanes|=i;var d=r.alternate;d!==null&&(d.lanes|=i),Pm(r.return,i,l)}function Sp(r,i,l,d,p,b){var E=r.memoizedState;E===null?r.memoizedState={isBackwards:i,rendering:null,renderingStartTime:0,last:d,tail:l,tailMode:p,treeForkCount:b}:(E.isBackwards=i,E.rendering=null,E.renderingStartTime=0,E.last=d,E.tail=l,E.tailMode=p,E.treeForkCount=b)}function rw(r,i,l){var d=i.pendingProps,p=d.revealOrder,b=d.tail;d=d.children;var E=jn.current,H=(E&2)!==0;if(H?(E=E&1|2,i.flags|=128):E&=1,Y(jn,E),ar(r,i,d,l),d=pt?st:0,!H&&r!==null&&(r.flags&128)!==0)e:for(r=i.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&nw(r,l,i);else if(r.tag===19)nw(r,l,i);else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===i)break e;for(;r.sibling===null;){if(r.return===null||r.return===i)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}switch(p){case\"forwards\":for(l=i.child,p=null;l!==null;)r=l.alternate,r!==null&&of(r)===null&&(p=l),l=l.sibling;l=p,l===null?(p=i.child,i.child=null):(p=l.sibling,l.sibling=null),Sp(i,!1,p,l,b,d);break;case\"backwards\":case\"unstable_legacy-backwards\":for(l=null,p=i.child,i.child=null;p!==null;){if(r=p.alternate,r!==null&&of(r)===null){i.child=p;break}r=p.sibling,p.sibling=l,l=p,p=r}Sp(i,!0,l,null,b,d);break;case\"together\":Sp(i,!1,null,null,void 0,d);break;default:i.memoizedState=null}return i.child}function Hi(r,i,l){if(r!==null&&(i.dependencies=r.dependencies),Oo|=i.lanes,(l&i.childLanes)===0)if(r!==null){if(Ol(r,i,l,!1),(l&i.childLanes)===0)return null}else return null;if(r!==null&&i.child!==r.child)throw Error(a(153));if(i.child!==null){for(r=i.child,l=za(r,r.pendingProps),i.child=l,l.return=i;r.sibling!==null;)r=r.sibling,l=l.sibling=za(r,r.pendingProps),l.return=i;l.sibling=null}return i.child}function Cp(r,i){return(r.lanes&i)!==0?!0:(r=r.dependencies,!!(r!==null&&Kd(r)))}function gO(r,i,l){switch(i.tag){case 3:me(i,i.stateNode.containerInfo),Ro(i,In,r.memoizedState.cache),Ds();break;case 27:case 5:Fe(i);break;case 4:me(i,i.stateNode.containerInfo);break;case 10:Ro(i,i.type,i.memoizedProps.value);break;case 31:if(i.memoizedState!==null)return i.flags|=128,Ym(i),null;break;case 13:var d=i.memoizedState;if(d!==null)return d.dehydrated!==null?(ko(i),i.flags|=128,null):(l&i.child.childLanes)!==0?tw(r,i,l):(ko(i),r=Hi(r,i,l),r!==null?r.sibling:null);ko(i);break;case 19:var p=(r.flags&128)!==0;if(d=(l&i.childLanes)!==0,d||(Ol(r,i,l,!1),d=(l&i.childLanes)!==0),p){if(d)return rw(r,i,l);i.flags|=128}if(p=i.memoizedState,p!==null&&(p.rendering=null,p.tail=null,p.lastEffect=null),Y(jn,jn.current),d)break;return null;case 22:return i.lanes=0,Xx(r,i,l,i.pendingProps);case 24:Ro(i,In,r.memoizedState.cache)}return Hi(r,i,l)}function aw(r,i,l){if(r!==null)if(r.memoizedProps!==i.pendingProps)qn=!0;else{if(!Cp(r,l)&&(i.flags&128)===0)return qn=!1,gO(r,i,l);qn=(r.flags&131072)!==0}else qn=!1,pt&&(i.flags&1048576)!==0&&Oi(i,st,i.index);switch(i.lanes=0,i.tag){case 16:e:{var d=i.pendingProps;if(r=Ls(i.elementType),i.type=r,typeof r==\"function\")Uc(r)?(d=Fs(r,d),i.tag=1,i=Jx(null,i,r,d,l)):(i.tag=0,i=gp(null,i,r,d,l));else{if(r!=null){var p=r.$$typeof;if(p===j){i.tag=11,i=Wx(null,i,r,d,l);break e}else if(p===A){i.tag=14,i=Gx(null,i,r,d,l);break e}}throw i=F(r)||r,Error(a(306,i,\"\"))}}return i;case 0:return gp(r,i,i.type,i.pendingProps,l);case 1:return d=i.type,p=Fs(d,i.pendingProps),Jx(r,i,d,p,l);case 3:e:{if(me(i,i.stateNode.containerInfo),r===null)throw Error(a(387));d=i.pendingProps;var b=i.memoizedState;p=b.element,Bm(r,i),Zc(i,d,null,l);var E=i.memoizedState;if(d=E.cache,Ro(i,In,d),d!==b.cache&&Lm(i,[In],l,!0),Kc(),d=E.element,b.isDehydrated)if(b={element:d,isDehydrated:!1,cache:E.cache},i.updateQueue.baseState=b,i.memoizedState=b,i.flags&256){i=ew(r,i,d,l);break e}else if(d!==p){p=he(Error(a(424)),i),Vc(p),i=ew(r,i,d,l);break e}else for(r=i.stateNode.containerInfo,r.nodeType===9?r=r.body:r=r.nodeName===\"HTML\"?r.ownerDocument.body:r,It=wa(r.firstChild),yn=i,pt=!0,ea=null,nr=!0,l=X1(i,null,d,l),i.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(Ds(),d===p){i=Hi(r,i,l);break e}ar(r,i,d,l)}i=i.child}return i;case 26:return vf(r,i),r===null?(l=pS(i.type,null,i.pendingProps,null))?i.memoizedState=l:pt||(l=i.type,r=i.pendingProps,d=jf(oe.current).createElement(l),d[Tn]=i,d[On]=r,ir(d,l,r),Cn(d),i.stateNode=d):i.memoizedState=pS(i.type,r.memoizedProps,i.pendingProps,r.memoizedState),null;case 27:return Fe(i),r===null&&pt&&(d=i.stateNode=fS(i.type,i.pendingProps,oe.current),yn=i,nr=!0,p=It,Lo(i.type)?(ng=p,It=wa(d.firstChild)):It=p),ar(r,i,i.pendingProps.children,l),vf(r,i),r===null&&(i.flags|=4194304),i.child;case 5:return r===null&&pt&&((p=d=It)&&(d=WO(d,i.type,i.pendingProps,nr),d!==null?(i.stateNode=d,yn=i,It=wa(d.firstChild),nr=!1,p=!0):p=!1),p||Co(i)),Fe(i),p=i.type,b=i.pendingProps,E=r!==null?r.memoizedProps:null,d=b.children,Kp(p,b)?d=null:E!==null&&Kp(p,E)&&(i.flags|=32),i.memoizedState!==null&&(p=Qm(r,i,sO,null,null,l),yu._currentValue=p),vf(r,i),ar(r,i,d,l),i.child;case 6:return r===null&&pt&&((r=l=It)&&(l=GO(l,i.pendingProps,nr),l!==null?(i.stateNode=l,yn=i,It=null,r=!0):r=!1),r||Co(i)),null;case 13:return tw(r,i,l);case 4:return me(i,i.stateNode.containerInfo),d=i.pendingProps,r===null?i.child=Hs(i,null,d,l):ar(r,i,d,l),i.child;case 11:return Wx(r,i,i.type,i.pendingProps,l);case 7:return ar(r,i,i.pendingProps,l),i.child;case 8:return ar(r,i,i.pendingProps.children,l),i.child;case 12:return ar(r,i,i.pendingProps.children,l),i.child;case 10:return d=i.pendingProps,Ro(i,i.type,d.value),ar(r,i,d.children,l),i.child;case 9:return p=i.type._context,d=i.pendingProps.children,zs(i),p=rr(p),d=d(p),i.flags|=1,ar(r,i,d,l),i.child;case 14:return Gx(r,i,i.type,i.pendingProps,l);case 15:return Yx(r,i,i.type,i.pendingProps,l);case 19:return rw(r,i,l);case 31:return pO(r,i,l);case 22:return Xx(r,i,l,i.pendingProps);case 24:return zs(i),d=rr(In),r===null?(p=qm(),p===null&&(p=on,b=Im(),p.pooledCache=b,b.refCount++,b!==null&&(p.pooledCacheLanes|=l),p=b),i.memoizedState={parent:d,cache:p},$m(i),Ro(i,In,p)):((r.lanes&l)!==0&&(Bm(r,i),Zc(i,null,null,l),Kc()),p=r.memoizedState,b=i.memoizedState,p.parent!==d?(p={parent:d,cache:d},i.memoizedState=p,i.lanes===0&&(i.memoizedState=i.updateQueue.baseState=p),Ro(i,In,d)):(d=b.cache,Ro(i,In,d),d!==p.cache&&Lm(i,[In],l,!0))),ar(r,i,i.pendingProps.children,l),i.child;case 29:throw i.pendingProps}throw Error(a(156,i.tag))}function qi(r){r.flags|=4}function Rp(r,i,l,d,p){if((i=(r.mode&32)!==0)&&(i=!1),i){if(r.flags|=16777216,(p&335544128)===p)if(r.stateNode.complete)r.flags|=8192;else if(Nw())r.flags|=8192;else throw Is=tf,Fm}else r.flags&=-16777217}function iw(r,i){if(i.type!==\"stylesheet\"||(i.state.loading&4)!==0)r.flags&=-16777217;else if(r.flags|=16777216,!xS(i))if(Nw())r.flags|=8192;else throw Is=tf,Fm}function bf(r,i){i!==null&&(r.flags|=4),r.flags&16384&&(i=r.tag!==22?Un():536870912,r.lanes|=i,Ul|=i)}function au(r,i){if(!pt)switch(r.tailMode){case\"hidden\":i=r.tail;for(var l=null;i!==null;)i.alternate!==null&&(l=i),i=i.sibling;l===null?r.tail=null:l.sibling=null;break;case\"collapsed\":l=r.tail;for(var d=null;l!==null;)l.alternate!==null&&(d=l),l=l.sibling;d===null?i||r.tail===null?r.tail=null:r.tail.sibling=null:d.sibling=null}}function hn(r){var i=r.alternate!==null&&r.alternate.child===r.child,l=0,d=0;if(i)for(var p=r.child;p!==null;)l|=p.lanes|p.childLanes,d|=p.subtreeFlags&65011712,d|=p.flags&65011712,p.return=r,p=p.sibling;else for(p=r.child;p!==null;)l|=p.lanes|p.childLanes,d|=p.subtreeFlags,d|=p.flags,p.return=r,p=p.sibling;return r.subtreeFlags|=d,r.childLanes=l,i}function vO(r,i,l){var d=i.pendingProps;switch(ji(i),i.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return hn(i),null;case 1:return hn(i),null;case 3:return l=i.stateNode,d=null,r!==null&&(d=r.memoizedState.cache),i.memoizedState.cache!==d&&(i.flags|=2048),Pi(In),Me(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(r===null||r.child===null)&&(Nl(i)?qi(i):r===null||r.memoizedState.isDehydrated&&(i.flags&256)===0||(i.flags|=1024,jm())),hn(i),null;case 26:var p=i.type,b=i.memoizedState;return r===null?(qi(i),b!==null?(hn(i),iw(i,b)):(hn(i),Rp(i,p,null,d,l))):b?b!==r.memoizedState?(qi(i),hn(i),iw(i,b)):(hn(i),i.flags&=-16777217):(r=r.memoizedProps,r!==d&&qi(i),hn(i),Rp(i,p,r,d,l)),null;case 27:if(Ue(i),l=oe.current,p=i.type,r!==null&&i.stateNode!=null)r.memoizedProps!==d&&qi(i);else{if(!d){if(i.stateNode===null)throw Error(a(166));return hn(i),null}r=re.current,Nl(i)?I1(i):(r=fS(p,d,l),i.stateNode=r,qi(i))}return hn(i),null;case 5:if(Ue(i),p=i.type,r!==null&&i.stateNode!=null)r.memoizedProps!==d&&qi(i);else{if(!d){if(i.stateNode===null)throw Error(a(166));return hn(i),null}if(b=re.current,Nl(i))I1(i);else{var E=jf(oe.current);switch(b){case 1:b=E.createElementNS(\"http://www.w3.org/2000/svg\",p);break;case 2:b=E.createElementNS(\"http://www.w3.org/1998/Math/MathML\",p);break;default:switch(p){case\"svg\":b=E.createElementNS(\"http://www.w3.org/2000/svg\",p);break;case\"math\":b=E.createElementNS(\"http://www.w3.org/1998/Math/MathML\",p);break;case\"script\":b=E.createElement(\"div\"),b.innerHTML=\"<script><\\/script>\",b=b.removeChild(b.firstChild);break;case\"select\":b=typeof d.is==\"string\"?E.createElement(\"select\",{is:d.is}):E.createElement(\"select\"),d.multiple?b.multiple=!0:d.size&&(b.size=d.size);break;default:b=typeof d.is==\"string\"?E.createElement(p,{is:d.is}):E.createElement(p)}}b[Tn]=i,b[On]=d;e:for(E=i.child;E!==null;){if(E.tag===5||E.tag===6)b.appendChild(E.stateNode);else if(E.tag!==4&&E.tag!==27&&E.child!==null){E.child.return=E,E=E.child;continue}if(E===i)break e;for(;E.sibling===null;){if(E.return===null||E.return===i)break e;E=E.return}E.sibling.return=E.return,E=E.sibling}i.stateNode=b;e:switch(ir(b,p,d),p){case\"button\":case\"input\":case\"select\":case\"textarea\":d=!!d.autoFocus;break e;case\"img\":d=!0;break e;default:d=!1}d&&qi(i)}}return hn(i),Rp(i,i.type,r===null?null:r.memoizedProps,i.pendingProps,l),null;case 6:if(r&&i.stateNode!=null)r.memoizedProps!==d&&qi(i);else{if(typeof d!=\"string\"&&i.stateNode===null)throw Error(a(166));if(r=oe.current,Nl(i)){if(r=i.stateNode,l=i.memoizedProps,d=null,p=yn,p!==null)switch(p.tag){case 27:case 5:d=p.memoizedProps}r[Tn]=i,r=!!(r.nodeValue===l||d!==null&&d.suppressHydrationWarning===!0||tS(r.nodeValue,l)),r||Co(i,!0)}else r=jf(r).createTextNode(d),r[Tn]=i,i.stateNode=r}return hn(i),null;case 31:if(l=i.memoizedState,r===null||r.memoizedState!==null){if(d=Nl(i),l!==null){if(r===null){if(!d)throw Error(a(318));if(r=i.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(a(557));r[Tn]=i}else Ds(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;hn(i),r=!1}else l=jm(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=l),r=!0;if(!r)return i.flags&256?(na(i),i):(na(i),null);if((i.flags&128)!==0)throw Error(a(558))}return hn(i),null;case 13:if(d=i.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(p=Nl(i),d!==null&&d.dehydrated!==null){if(r===null){if(!p)throw Error(a(318));if(p=i.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(a(317));p[Tn]=i}else Ds(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;hn(i),p=!1}else p=jm(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=p),p=!0;if(!p)return i.flags&256?(na(i),i):(na(i),null)}return na(i),(i.flags&128)!==0?(i.lanes=l,i):(l=d!==null,r=r!==null&&r.memoizedState!==null,l&&(d=i.child,p=null,d.alternate!==null&&d.alternate.memoizedState!==null&&d.alternate.memoizedState.cachePool!==null&&(p=d.alternate.memoizedState.cachePool.pool),b=null,d.memoizedState!==null&&d.memoizedState.cachePool!==null&&(b=d.memoizedState.cachePool.pool),b!==p&&(d.flags|=2048)),l!==r&&l&&(i.child.flags|=8192),bf(i,i.updateQueue),hn(i),null);case 4:return Me(),r===null&&Wp(i.stateNode.containerInfo),hn(i),null;case 10:return Pi(i.type),hn(i),null;case 19:if(X(jn),d=i.memoizedState,d===null)return hn(i),null;if(p=(i.flags&128)!==0,b=d.rendering,b===null)if(p)au(d,!1);else{if(An!==0||r!==null&&(r.flags&128)!==0)for(r=i.child;r!==null;){if(b=of(r),b!==null){for(i.flags|=128,au(d,!1),r=b.updateQueue,i.updateQueue=r,bf(i,r),i.subtreeFlags=0,r=l,l=i.child;l!==null;)D(l,r),l=l.sibling;return Y(jn,jn.current&1|2),pt&&Pt(i,d.treeForkCount),i.child}r=r.sibling}d.tail!==null&&Ge()>Rf&&(i.flags|=128,p=!0,au(d,!1),i.lanes=4194304)}else{if(!p)if(r=of(b),r!==null){if(i.flags|=128,p=!0,r=r.updateQueue,i.updateQueue=r,bf(i,r),au(d,!0),d.tail===null&&d.tailMode===\"hidden\"&&!b.alternate&&!pt)return hn(i),null}else 2*Ge()-d.renderingStartTime>Rf&&l!==536870912&&(i.flags|=128,p=!0,au(d,!1),i.lanes=4194304);d.isBackwards?(b.sibling=i.child,i.child=b):(r=d.last,r!==null?r.sibling=b:i.child=b,d.last=b)}return d.tail!==null?(r=d.tail,d.rendering=r,d.tail=r.sibling,d.renderingStartTime=Ge(),r.sibling=null,l=jn.current,Y(jn,p?l&1|2:l&1),pt&&Pt(i,d.treeForkCount),r):(hn(i),null);case 22:case 23:return na(i),Gm(),d=i.memoizedState!==null,r!==null?r.memoizedState!==null!==d&&(i.flags|=8192):d&&(i.flags|=8192),d?(l&536870912)!==0&&(i.flags&128)===0&&(hn(i),i.subtreeFlags&6&&(i.flags|=8192)):hn(i),l=i.updateQueue,l!==null&&bf(i,l.retryQueue),l=null,r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(l=r.memoizedState.cachePool.pool),d=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(d=i.memoizedState.cachePool.pool),d!==l&&(i.flags|=2048),r!==null&&X(Ps),null;case 24:return l=null,r!==null&&(l=r.memoizedState.cache),i.memoizedState.cache!==l&&(i.flags|=2048),Pi(In),hn(i),null;case 25:return null;case 30:return null}throw Error(a(156,i.tag))}function yO(r,i){switch(ji(i),i.tag){case 1:return r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 3:return Pi(In),Me(),r=i.flags,(r&65536)!==0&&(r&128)===0?(i.flags=r&-65537|128,i):null;case 26:case 27:case 5:return Ue(i),null;case 31:if(i.memoizedState!==null){if(na(i),i.alternate===null)throw Error(a(340));Ds()}return r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 13:if(na(i),r=i.memoizedState,r!==null&&r.dehydrated!==null){if(i.alternate===null)throw Error(a(340));Ds()}return r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 19:return X(jn),null;case 4:return Me(),null;case 10:return Pi(i.type),null;case 22:case 23:return na(i),Gm(),r!==null&&X(Ps),r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 24:return Pi(In),null;case 25:return null;default:return null}}function ow(r,i){switch(ji(i),i.tag){case 3:Pi(In),Me();break;case 26:case 27:case 5:Ue(i);break;case 4:Me();break;case 31:i.memoizedState!==null&&na(i);break;case 13:na(i);break;case 19:X(jn);break;case 10:Pi(i.type);break;case 22:case 23:na(i),Gm(),r!==null&&X(Ps);break;case 24:Pi(In)}}function iu(r,i){try{var l=i.updateQueue,d=l!==null?l.lastEffect:null;if(d!==null){var p=d.next;l=p;do{if((l.tag&r)===r){d=void 0;var b=l.create,E=l.inst;d=b(),E.destroy=d}l=l.next}while(l!==p)}}catch(H){Xt(i,i.return,H)}}function Ao(r,i,l){try{var d=i.updateQueue,p=d!==null?d.lastEffect:null;if(p!==null){var b=p.next;d=b;do{if((d.tag&r)===r){var E=d.inst,H=E.destroy;if(H!==void 0){E.destroy=void 0,p=i;var Q=l,de=H;try{de()}catch(we){Xt(p,Q,we)}}}d=d.next}while(d!==b)}}catch(we){Xt(i,i.return,we)}}function sw(r){var i=r.updateQueue;if(i!==null){var l=r.stateNode;try{K1(i,l)}catch(d){Xt(r,r.return,d)}}}function lw(r,i,l){l.props=Fs(r.type,r.memoizedProps),l.state=r.memoizedState;try{l.componentWillUnmount()}catch(d){Xt(r,i,d)}}function ou(r,i){try{var l=r.ref;if(l!==null){switch(r.tag){case 26:case 27:case 5:var d=r.stateNode;break;case 30:d=r.stateNode;break;default:d=r.stateNode}typeof l==\"function\"?r.refCleanup=l(d):l.current=d}}catch(p){Xt(r,i,p)}}function ti(r,i){var l=r.ref,d=r.refCleanup;if(l!==null)if(typeof d==\"function\")try{d()}catch(p){Xt(r,i,p)}finally{r.refCleanup=null,r=r.alternate,r!=null&&(r.refCleanup=null)}else if(typeof l==\"function\")try{l(null)}catch(p){Xt(r,i,p)}else l.current=null}function cw(r){var i=r.type,l=r.memoizedProps,d=r.stateNode;try{e:switch(i){case\"button\":case\"input\":case\"select\":case\"textarea\":l.autoFocus&&d.focus();break e;case\"img\":l.src?d.src=l.src:l.srcSet&&(d.srcset=l.srcSet)}}catch(p){Xt(r,r.return,p)}}function Ep(r,i,l){try{var d=r.stateNode;qO(d,r.type,l,i),d[On]=i}catch(p){Xt(r,r.return,p)}}function uw(r){return r.tag===5||r.tag===3||r.tag===26||r.tag===27&&Lo(r.type)||r.tag===4}function Tp(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||uw(r.return))return null;r=r.return}for(r.sibling.return=r.return,r=r.sibling;r.tag!==5&&r.tag!==6&&r.tag!==18;){if(r.tag===27&&Lo(r.type)||r.flags&2||r.child===null||r.tag===4)continue e;r.child.return=r,r=r.child}if(!(r.flags&2))return r.stateNode}}function Mp(r,i,l){var d=r.tag;if(d===5||d===6)r=r.stateNode,i?(l.nodeType===9?l.body:l.nodeName===\"HTML\"?l.ownerDocument.body:l).insertBefore(r,i):(i=l.nodeType===9?l.body:l.nodeName===\"HTML\"?l.ownerDocument.body:l,i.appendChild(r),l=l._reactRootContainer,l!=null||i.onclick!==null||(i.onclick=Or));else if(d!==4&&(d===27&&Lo(r.type)&&(l=r.stateNode,i=null),r=r.child,r!==null))for(Mp(r,i,l),r=r.sibling;r!==null;)Mp(r,i,l),r=r.sibling}function xf(r,i,l){var d=r.tag;if(d===5||d===6)r=r.stateNode,i?l.insertBefore(r,i):l.appendChild(r);else if(d!==4&&(d===27&&Lo(r.type)&&(l=r.stateNode),r=r.child,r!==null))for(xf(r,i,l),r=r.sibling;r!==null;)xf(r,i,l),r=r.sibling}function dw(r){var i=r.stateNode,l=r.memoizedProps;try{for(var d=r.type,p=i.attributes;p.length;)i.removeAttributeNode(p[0]);ir(i,d,l),i[Tn]=r,i[On]=l}catch(b){Xt(r,r.return,b)}}var Fi=!1,Fn=!1,kp=!1,fw=typeof WeakSet==\"function\"?WeakSet:Set,Kn=null;function bO(r,i){if(r=r.containerInfo,Xp=Ff,r=kl(r),Fc(r)){if(\"selectionStart\"in r)var l={start:r.selectionStart,end:r.selectionEnd};else e:{l=(l=r.ownerDocument)&&l.defaultView||window;var d=l.getSelection&&l.getSelection();if(d&&d.rangeCount!==0){l=d.anchorNode;var p=d.anchorOffset,b=d.focusNode;d=d.focusOffset;try{l.nodeType,b.nodeType}catch{l=null;break e}var E=0,H=-1,Q=-1,de=0,we=0,Te=r,fe=null;t:for(;;){for(var pe;Te!==l||p!==0&&Te.nodeType!==3||(H=E+p),Te!==b||d!==0&&Te.nodeType!==3||(Q=E+d),Te.nodeType===3&&(E+=Te.nodeValue.length),(pe=Te.firstChild)!==null;)fe=Te,Te=pe;for(;;){if(Te===r)break t;if(fe===l&&++de===p&&(H=E),fe===b&&++we===d&&(Q=E),(pe=Te.nextSibling)!==null)break;Te=fe,fe=Te.parentNode}Te=pe}l=H===-1||Q===-1?null:{start:H,end:Q}}else l=null}l=l||{start:0,end:0}}else l=null;for(Qp={focusedElem:r,selectionRange:l},Ff=!1,Kn=i;Kn!==null;)if(i=Kn,r=i.child,(i.subtreeFlags&1028)!==0&&r!==null)r.return=i,Kn=r;else for(;Kn!==null;){switch(i=Kn,b=i.alternate,r=i.flags,i.tag){case 0:if((r&4)!==0&&(r=i.updateQueue,r=r!==null?r.events:null,r!==null))for(l=0;l<r.length;l++)p=r[l],p.ref.impl=p.nextImpl;break;case 11:case 15:break;case 1:if((r&1024)!==0&&b!==null){r=void 0,l=i,p=b.memoizedProps,b=b.memoizedState,d=l.stateNode;try{var We=Fs(l.type,p);r=d.getSnapshotBeforeUpdate(We,b),d.__reactInternalSnapshotBeforeUpdate=r}catch(ot){Xt(l,l.return,ot)}}break;case 3:if((r&1024)!==0){if(r=i.stateNode.containerInfo,l=r.nodeType,l===9)Jp(r);else if(l===1)switch(r.nodeName){case\"HEAD\":case\"HTML\":case\"BODY\":Jp(r);break;default:r.textContent=\"\"}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((r&1024)!==0)throw Error(a(163))}if(r=i.sibling,r!==null){r.return=i.return,Kn=r;break}Kn=i.return}}function hw(r,i,l){var d=l.flags;switch(l.tag){case 0:case 11:case 15:Bi(r,l),d&4&&iu(5,l);break;case 1:if(Bi(r,l),d&4)if(r=l.stateNode,i===null)try{r.componentDidMount()}catch(E){Xt(l,l.return,E)}else{var p=Fs(l.type,i.memoizedProps);i=i.memoizedState;try{r.componentDidUpdate(p,i,r.__reactInternalSnapshotBeforeUpdate)}catch(E){Xt(l,l.return,E)}}d&64&&sw(l),d&512&&ou(l,l.return);break;case 3:if(Bi(r,l),d&64&&(r=l.updateQueue,r!==null)){if(i=null,l.child!==null)switch(l.child.tag){case 27:case 5:i=l.child.stateNode;break;case 1:i=l.child.stateNode}try{K1(r,i)}catch(E){Xt(l,l.return,E)}}break;case 27:i===null&&d&4&&dw(l);case 26:case 5:Bi(r,l),i===null&&d&4&&cw(l),d&512&&ou(l,l.return);break;case 12:Bi(r,l);break;case 31:Bi(r,l),d&4&&gw(r,l);break;case 13:Bi(r,l),d&4&&vw(r,l),d&64&&(r=l.memoizedState,r!==null&&(r=r.dehydrated,r!==null&&(l=kO.bind(null,l),YO(r,l))));break;case 22:if(d=l.memoizedState!==null||Fi,!d){i=i!==null&&i.memoizedState!==null||Fn,p=Fi;var b=Fn;Fi=d,(Fn=i)&&!b?Ui(r,l,(l.subtreeFlags&8772)!==0):Bi(r,l),Fi=p,Fn=b}break;case 30:break;default:Bi(r,l)}}function mw(r){var i=r.alternate;i!==null&&(r.alternate=null,mw(i)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(i=r.stateNode,i!==null&&Ya(i)),r.stateNode=null,r.return=null,r.dependencies=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.stateNode=null,r.updateQueue=null}var bn=null,zr=!1;function $i(r,i,l){for(l=l.child;l!==null;)pw(r,i,l),l=l.sibling}function pw(r,i,l){if(zt&&typeof zt.onCommitFiberUnmount==\"function\")try{zt.onCommitFiberUnmount(mt,l)}catch{}switch(l.tag){case 26:Fn||ti(l,i),$i(r,i,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:Fn||ti(l,i);var d=bn,p=zr;Lo(l.type)&&(bn=l.stateNode,zr=!1),$i(r,i,l),pu(l.stateNode),bn=d,zr=p;break;case 5:Fn||ti(l,i);case 6:if(d=bn,p=zr,bn=null,$i(r,i,l),bn=d,zr=p,bn!==null)if(zr)try{(bn.nodeType===9?bn.body:bn.nodeName===\"HTML\"?bn.ownerDocument.body:bn).removeChild(l.stateNode)}catch(b){Xt(l,i,b)}else try{bn.removeChild(l.stateNode)}catch(b){Xt(l,i,b)}break;case 18:bn!==null&&(zr?(r=bn,sS(r.nodeType===9?r.body:r.nodeName===\"HTML\"?r.ownerDocument.body:r,l.stateNode),Zl(r)):sS(bn,l.stateNode));break;case 4:d=bn,p=zr,bn=l.stateNode.containerInfo,zr=!0,$i(r,i,l),bn=d,zr=p;break;case 0:case 11:case 14:case 15:Ao(2,l,i),Fn||Ao(4,l,i),$i(r,i,l);break;case 1:Fn||(ti(l,i),d=l.stateNode,typeof d.componentWillUnmount==\"function\"&&lw(l,i,d)),$i(r,i,l);break;case 21:$i(r,i,l);break;case 22:Fn=(d=Fn)||l.memoizedState!==null,$i(r,i,l),Fn=d;break;default:$i(r,i,l)}}function gw(r,i){if(i.memoizedState===null&&(r=i.alternate,r!==null&&(r=r.memoizedState,r!==null))){r=r.dehydrated;try{Zl(r)}catch(l){Xt(i,i.return,l)}}}function vw(r,i){if(i.memoizedState===null&&(r=i.alternate,r!==null&&(r=r.memoizedState,r!==null&&(r=r.dehydrated,r!==null))))try{Zl(r)}catch(l){Xt(i,i.return,l)}}function xO(r){switch(r.tag){case 31:case 13:case 19:var i=r.stateNode;return i===null&&(i=r.stateNode=new fw),i;case 22:return r=r.stateNode,i=r._retryCache,i===null&&(i=r._retryCache=new fw),i;default:throw Error(a(435,r.tag))}}function wf(r,i){var l=xO(r);i.forEach(function(d){if(!l.has(d)){l.add(d);var p=_O.bind(null,r,d);d.then(p,p)}})}function Pr(r,i){var l=i.deletions;if(l!==null)for(var d=0;d<l.length;d++){var p=l[d],b=r,E=i,H=E;e:for(;H!==null;){switch(H.tag){case 27:if(Lo(H.type)){bn=H.stateNode,zr=!1;break e}break;case 5:bn=H.stateNode,zr=!1;break e;case 3:case 4:bn=H.stateNode.containerInfo,zr=!0;break e}H=H.return}if(bn===null)throw Error(a(160));pw(b,E,p),bn=null,zr=!1,b=p.alternate,b!==null&&(b.return=null),p.return=null}if(i.subtreeFlags&13886)for(i=i.child;i!==null;)yw(i,r),i=i.sibling}var Pa=null;function yw(r,i){var l=r.alternate,d=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:Pr(i,r),Lr(r),d&4&&(Ao(3,r,r.return),iu(3,r),Ao(5,r,r.return));break;case 1:Pr(i,r),Lr(r),d&512&&(Fn||l===null||ti(l,l.return)),d&64&&Fi&&(r=r.updateQueue,r!==null&&(d=r.callbacks,d!==null&&(l=r.shared.hiddenCallbacks,r.shared.hiddenCallbacks=l===null?d:l.concat(d))));break;case 26:var p=Pa;if(Pr(i,r),Lr(r),d&512&&(Fn||l===null||ti(l,l.return)),d&4){var b=l!==null?l.memoizedState:null;if(d=r.memoizedState,l===null)if(d===null)if(r.stateNode===null){e:{d=r.type,l=r.memoizedProps,p=p.ownerDocument||p;t:switch(d){case\"title\":b=p.getElementsByTagName(\"title\")[0],(!b||b[lr]||b[Tn]||b.namespaceURI===\"http://www.w3.org/2000/svg\"||b.hasAttribute(\"itemprop\"))&&(b=p.createElement(d),p.head.insertBefore(b,p.querySelector(\"head > title\"))),ir(b,d,l),b[Tn]=r,Cn(b),d=b;break e;case\"link\":var E=yS(\"link\",\"href\",p).get(d+(l.href||\"\"));if(E){for(var H=0;H<E.length;H++)if(b=E[H],b.getAttribute(\"href\")===(l.href==null||l.href===\"\"?null:l.href)&&b.getAttribute(\"rel\")===(l.rel==null?null:l.rel)&&b.getAttribute(\"title\")===(l.title==null?null:l.title)&&b.getAttribute(\"crossorigin\")===(l.crossOrigin==null?null:l.crossOrigin)){E.splice(H,1);break t}}b=p.createElement(d),ir(b,d,l),p.head.appendChild(b);break;case\"meta\":if(E=yS(\"meta\",\"content\",p).get(d+(l.content||\"\"))){for(H=0;H<E.length;H++)if(b=E[H],b.getAttribute(\"content\")===(l.content==null?null:\"\"+l.content)&&b.getAttribute(\"name\")===(l.name==null?null:l.name)&&b.getAttribute(\"property\")===(l.property==null?null:l.property)&&b.getAttribute(\"http-equiv\")===(l.httpEquiv==null?null:l.httpEquiv)&&b.getAttribute(\"charset\")===(l.charSet==null?null:l.charSet)){E.splice(H,1);break t}}b=p.createElement(d),ir(b,d,l),p.head.appendChild(b);break;default:throw Error(a(468,d))}b[Tn]=r,Cn(b),d=b}r.stateNode=d}else bS(p,r.type,r.stateNode);else r.stateNode=vS(p,d,r.memoizedProps);else b!==d?(b===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):b.count--,d===null?bS(p,r.type,r.stateNode):vS(p,d,r.memoizedProps)):d===null&&r.stateNode!==null&&Ep(r,r.memoizedProps,l.memoizedProps)}break;case 27:Pr(i,r),Lr(r),d&512&&(Fn||l===null||ti(l,l.return)),l!==null&&d&4&&Ep(r,r.memoizedProps,l.memoizedProps);break;case 5:if(Pr(i,r),Lr(r),d&512&&(Fn||l===null||ti(l,l.return)),r.flags&32){p=r.stateNode;try{Aa(p,\"\")}catch(We){Xt(r,r.return,We)}}d&4&&r.stateNode!=null&&(p=r.memoizedProps,Ep(r,p,l!==null?l.memoizedProps:p)),d&1024&&(kp=!0);break;case 6:if(Pr(i,r),Lr(r),d&4){if(r.stateNode===null)throw Error(a(162));d=r.memoizedProps,l=r.stateNode;try{l.nodeValue=d}catch(We){Xt(r,r.return,We)}}break;case 3:if(Lf=null,p=Pa,Pa=zf(i.containerInfo),Pr(i,r),Pa=p,Lr(r),d&4&&l!==null&&l.memoizedState.isDehydrated)try{Zl(i.containerInfo)}catch(We){Xt(r,r.return,We)}kp&&(kp=!1,bw(r));break;case 4:d=Pa,Pa=zf(r.stateNode.containerInfo),Pr(i,r),Lr(r),Pa=d;break;case 12:Pr(i,r),Lr(r);break;case 31:Pr(i,r),Lr(r),d&4&&(d=r.updateQueue,d!==null&&(r.updateQueue=null,wf(r,d)));break;case 13:Pr(i,r),Lr(r),r.child.flags&8192&&r.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(Cf=Ge()),d&4&&(d=r.updateQueue,d!==null&&(r.updateQueue=null,wf(r,d)));break;case 22:p=r.memoizedState!==null;var Q=l!==null&&l.memoizedState!==null,de=Fi,we=Fn;if(Fi=de||p,Fn=we||Q,Pr(i,r),Fn=we,Fi=de,Lr(r),d&8192)e:for(i=r.stateNode,i._visibility=p?i._visibility&-2:i._visibility|1,p&&(l===null||Q||Fi||Fn||$s(r)),l=null,i=r;;){if(i.tag===5||i.tag===26){if(l===null){Q=l=i;try{if(b=Q.stateNode,p)E=b.style,typeof E.setProperty==\"function\"?E.setProperty(\"display\",\"none\",\"important\"):E.display=\"none\";else{H=Q.stateNode;var Te=Q.memoizedProps.style,fe=Te!=null&&Te.hasOwnProperty(\"display\")?Te.display:null;H.style.display=fe==null||typeof fe==\"boolean\"?\"\":(\"\"+fe).trim()}}catch(We){Xt(Q,Q.return,We)}}}else if(i.tag===6){if(l===null){Q=i;try{Q.stateNode.nodeValue=p?\"\":Q.memoizedProps}catch(We){Xt(Q,Q.return,We)}}}else if(i.tag===18){if(l===null){Q=i;try{var pe=Q.stateNode;p?lS(pe,!0):lS(Q.stateNode,!1)}catch(We){Xt(Q,Q.return,We)}}}else if((i.tag!==22&&i.tag!==23||i.memoizedState===null||i===r)&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===r)break e;for(;i.sibling===null;){if(i.return===null||i.return===r)break e;l===i&&(l=null),i=i.return}l===i&&(l=null),i.sibling.return=i.return,i=i.sibling}d&4&&(d=r.updateQueue,d!==null&&(l=d.retryQueue,l!==null&&(d.retryQueue=null,wf(r,l))));break;case 19:Pr(i,r),Lr(r),d&4&&(d=r.updateQueue,d!==null&&(r.updateQueue=null,wf(r,d)));break;case 30:break;case 21:break;default:Pr(i,r),Lr(r)}}function Lr(r){var i=r.flags;if(i&2){try{for(var l,d=r.return;d!==null;){if(uw(d)){l=d;break}d=d.return}if(l==null)throw Error(a(160));switch(l.tag){case 27:var p=l.stateNode,b=Tp(r);xf(r,b,p);break;case 5:var E=l.stateNode;l.flags&32&&(Aa(E,\"\"),l.flags&=-33);var H=Tp(r);xf(r,H,E);break;case 3:case 4:var Q=l.stateNode.containerInfo,de=Tp(r);Mp(r,de,Q);break;default:throw Error(a(161))}}catch(we){Xt(r,r.return,we)}r.flags&=-3}i&4096&&(r.flags&=-4097)}function bw(r){if(r.subtreeFlags&1024)for(r=r.child;r!==null;){var i=r;bw(i),i.tag===5&&i.flags&1024&&i.stateNode.reset(),r=r.sibling}}function Bi(r,i){if(i.subtreeFlags&8772)for(i=i.child;i!==null;)hw(r,i.alternate,i),i=i.sibling}function $s(r){for(r=r.child;r!==null;){var i=r;switch(i.tag){case 0:case 11:case 14:case 15:Ao(4,i,i.return),$s(i);break;case 1:ti(i,i.return);var l=i.stateNode;typeof l.componentWillUnmount==\"function\"&&lw(i,i.return,l),$s(i);break;case 27:pu(i.stateNode);case 26:case 5:ti(i,i.return),$s(i);break;case 22:i.memoizedState===null&&$s(i);break;case 30:$s(i);break;default:$s(i)}r=r.sibling}}function Ui(r,i,l){for(l=l&&(i.subtreeFlags&8772)!==0,i=i.child;i!==null;){var d=i.alternate,p=r,b=i,E=b.flags;switch(b.tag){case 0:case 11:case 15:Ui(p,b,l),iu(4,b);break;case 1:if(Ui(p,b,l),d=b,p=d.stateNode,typeof p.componentDidMount==\"function\")try{p.componentDidMount()}catch(de){Xt(d,d.return,de)}if(d=b,p=d.updateQueue,p!==null){var H=d.stateNode;try{var Q=p.shared.hiddenCallbacks;if(Q!==null)for(p.shared.hiddenCallbacks=null,p=0;p<Q.length;p++)Q1(Q[p],H)}catch(de){Xt(d,d.return,de)}}l&&E&64&&sw(b),ou(b,b.return);break;case 27:dw(b);case 26:case 5:Ui(p,b,l),l&&d===null&&E&4&&cw(b),ou(b,b.return);break;case 12:Ui(p,b,l);break;case 31:Ui(p,b,l),l&&E&4&&gw(p,b);break;case 13:Ui(p,b,l),l&&E&4&&vw(p,b);break;case 22:b.memoizedState===null&&Ui(p,b,l),ou(b,b.return);break;case 30:break;default:Ui(p,b,l)}i=i.sibling}}function _p(r,i){var l=null;r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(l=r.memoizedState.cachePool.pool),r=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(r=i.memoizedState.cachePool.pool),r!==l&&(r!=null&&r.refCount++,l!=null&&Wc(l))}function Ap(r,i){r=null,i.alternate!==null&&(r=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==r&&(i.refCount++,r!=null&&Wc(r))}function La(r,i,l,d){if(i.subtreeFlags&10256)for(i=i.child;i!==null;)xw(r,i,l,d),i=i.sibling}function xw(r,i,l,d){var p=i.flags;switch(i.tag){case 0:case 11:case 15:La(r,i,l,d),p&2048&&iu(9,i);break;case 1:La(r,i,l,d);break;case 3:La(r,i,l,d),p&2048&&(r=null,i.alternate!==null&&(r=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==r&&(i.refCount++,r!=null&&Wc(r)));break;case 12:if(p&2048){La(r,i,l,d),r=i.stateNode;try{var b=i.memoizedProps,E=b.id,H=b.onPostCommit;typeof H==\"function\"&&H(E,i.alternate===null?\"mount\":\"update\",r.passiveEffectDuration,-0)}catch(Q){Xt(i,i.return,Q)}}else La(r,i,l,d);break;case 31:La(r,i,l,d);break;case 13:La(r,i,l,d);break;case 23:break;case 22:b=i.stateNode,E=i.alternate,i.memoizedState!==null?b._visibility&2?La(r,i,l,d):su(r,i):b._visibility&2?La(r,i,l,d):(b._visibility|=2,Fl(r,i,l,d,(i.subtreeFlags&10256)!==0||!1)),p&2048&&_p(E,i);break;case 24:La(r,i,l,d),p&2048&&Ap(i.alternate,i);break;default:La(r,i,l,d)}}function Fl(r,i,l,d,p){for(p=p&&((i.subtreeFlags&10256)!==0||!1),i=i.child;i!==null;){var b=r,E=i,H=l,Q=d,de=E.flags;switch(E.tag){case 0:case 11:case 15:Fl(b,E,H,Q,p),iu(8,E);break;case 23:break;case 22:var we=E.stateNode;E.memoizedState!==null?we._visibility&2?Fl(b,E,H,Q,p):su(b,E):(we._visibility|=2,Fl(b,E,H,Q,p)),p&&de&2048&&_p(E.alternate,E);break;case 24:Fl(b,E,H,Q,p),p&&de&2048&&Ap(E.alternate,E);break;default:Fl(b,E,H,Q,p)}i=i.sibling}}function su(r,i){if(i.subtreeFlags&10256)for(i=i.child;i!==null;){var l=r,d=i,p=d.flags;switch(d.tag){case 22:su(l,d),p&2048&&_p(d.alternate,d);break;case 24:su(l,d),p&2048&&Ap(d.alternate,d);break;default:su(l,d)}i=i.sibling}}var lu=8192;function $l(r,i,l){if(r.subtreeFlags&lu)for(r=r.child;r!==null;)ww(r,i,l),r=r.sibling}function ww(r,i,l){switch(r.tag){case 26:$l(r,i,l),r.flags&lu&&r.memoizedState!==null&&oD(l,Pa,r.memoizedState,r.memoizedProps);break;case 5:$l(r,i,l);break;case 3:case 4:var d=Pa;Pa=zf(r.stateNode.containerInfo),$l(r,i,l),Pa=d;break;case 22:r.memoizedState===null&&(d=r.alternate,d!==null&&d.memoizedState!==null?(d=lu,lu=16777216,$l(r,i,l),lu=d):$l(r,i,l));break;default:$l(r,i,l)}}function Sw(r){var i=r.alternate;if(i!==null&&(r=i.child,r!==null)){i.child=null;do i=r.sibling,r.sibling=null,r=i;while(r!==null)}}function cu(r){var i=r.deletions;if((r.flags&16)!==0){if(i!==null)for(var l=0;l<i.length;l++){var d=i[l];Kn=d,Rw(d,r)}Sw(r)}if(r.subtreeFlags&10256)for(r=r.child;r!==null;)Cw(r),r=r.sibling}function Cw(r){switch(r.tag){case 0:case 11:case 15:cu(r),r.flags&2048&&Ao(9,r,r.return);break;case 3:cu(r);break;case 12:cu(r);break;case 22:var i=r.stateNode;r.memoizedState!==null&&i._visibility&2&&(r.return===null||r.return.tag!==13)?(i._visibility&=-3,Sf(r)):cu(r);break;default:cu(r)}}function Sf(r){var i=r.deletions;if((r.flags&16)!==0){if(i!==null)for(var l=0;l<i.length;l++){var d=i[l];Kn=d,Rw(d,r)}Sw(r)}for(r=r.child;r!==null;){switch(i=r,i.tag){case 0:case 11:case 15:Ao(8,i,i.return),Sf(i);break;case 22:l=i.stateNode,l._visibility&2&&(l._visibility&=-3,Sf(i));break;default:Sf(i)}r=r.sibling}}function Rw(r,i){for(;Kn!==null;){var l=Kn;switch(l.tag){case 0:case 11:case 15:Ao(8,l,i);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var d=l.memoizedState.cachePool.pool;d!=null&&d.refCount++}break;case 24:Wc(l.memoizedState.cache)}if(d=l.child,d!==null)d.return=l,Kn=d;else e:for(l=r;Kn!==null;){d=Kn;var p=d.sibling,b=d.return;if(mw(d),d===l){Kn=null;break e}if(p!==null){p.return=b,Kn=p;break e}Kn=b}}}var wO={getCacheForType:function(r){var i=rr(In),l=i.data.get(r);return l===void 0&&(l=r(),i.data.set(r,l)),l},cacheSignal:function(){return rr(In).controller.signal}},SO=typeof WeakMap==\"function\"?WeakMap:Map,Ut=0,on=null,kt=null,Ot=0,Yt=0,ra=null,No=!1,Bl=!1,Np=!1,Vi=0,An=0,Oo=0,Bs=0,Op=0,aa=0,Ul=0,uu=null,Ir=null,Dp=!1,Cf=0,Ew=0,Rf=1/0,Ef=null,Do=null,Wn=0,jo=null,Vl=null,Wi=0,jp=0,zp=null,Tw=null,du=0,Pp=null;function ia(){return(Ut&2)!==0&&Ot!==0?Ot&-Ot:$.T!==null?$p():wn()}function Mw(){if(aa===0)if((Ot&536870912)===0||pt){var r=Ar;Ar<<=1,(Ar&3932160)===0&&(Ar=262144),aa=r}else aa=536870912;return r=ta.current,r!==null&&(r.flags|=32),aa}function Hr(r,i,l){(r===on&&(Yt===2||Yt===9)||r.cancelPendingCommit!==null)&&(Wl(r,0),zo(r,Ot,aa,!1)),Bt(r,l),((Ut&2)===0||r!==on)&&(r===on&&((Ut&2)===0&&(Bs|=l),An===4&&zo(r,Ot,aa,!1)),ni(r))}function kw(r,i,l){if((Ut&6)!==0)throw Error(a(327));var d=!l&&(i&127)===0&&(i&r.expiredLanes)===0||Wt(r,i),p=d?EO(r,i):Ip(r,i,!0),b=d;do{if(p===0){Bl&&!d&&zo(r,i,0,!1);break}else{if(l=r.current.alternate,b&&!CO(l)){p=Ip(r,i,!1),b=!1;continue}if(p===2){if(b=i,r.errorRecoveryDisabledLanes&b)var E=0;else E=r.pendingLanes&-536870913,E=E!==0?E:E&536870912?536870912:0;if(E!==0){i=E;e:{var H=r;p=uu;var Q=H.current.memoizedState.isDehydrated;if(Q&&(Wl(H,E).flags|=256),E=Ip(H,E,!1),E!==2){if(Np&&!Q){H.errorRecoveryDisabledLanes|=b,Bs|=b,p=4;break e}b=Ir,Ir=p,b!==null&&(Ir===null?Ir=b:Ir.push.apply(Ir,b))}p=E}if(b=!1,p!==2)continue}}if(p===1){Wl(r,0),zo(r,i,0,!0);break}e:{switch(d=r,b=p,b){case 0:case 1:throw Error(a(345));case 4:if((i&4194048)!==i)break;case 6:zo(d,i,aa,!No);break e;case 2:Ir=null;break;case 3:case 5:break;default:throw Error(a(329))}if((i&62914560)===i&&(p=Cf+300-Ge(),10<p)){if(zo(d,i,aa,!No),St(d,0,!0)!==0)break e;Wi=i,d.timeoutHandle=iS(_w.bind(null,d,l,Ir,Ef,Dp,i,aa,Bs,Ul,No,b,\"Throttled\",-0,0),p);break e}_w(d,l,Ir,Ef,Dp,i,aa,Bs,Ul,No,b,null,-0,0)}}break}while(!0);ni(r)}function _w(r,i,l,d,p,b,E,H,Q,de,we,Te,fe,pe){if(r.timeoutHandle=-1,Te=i.subtreeFlags,Te&8192||(Te&16785408)===16785408){Te={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Or},ww(i,b,Te);var We=(b&62914560)===b?Cf-Ge():(b&4194048)===b?Ew-Ge():0;if(We=sD(Te,We),We!==null){Wi=b,r.cancelPendingCommit=We(Lw.bind(null,r,i,b,l,d,p,E,H,Q,we,Te,null,fe,pe)),zo(r,b,E,!de);return}}Lw(r,i,b,l,d,p,E,H,Q)}function CO(r){for(var i=r;;){var l=i.tag;if((l===0||l===11||l===15)&&i.flags&16384&&(l=i.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var d=0;d<l.length;d++){var p=l[d],b=p.getSnapshot;p=p.value;try{if(!Rr(b(),p))return!1}catch{return!1}}if(l=i.child,i.subtreeFlags&16384&&l!==null)l.return=i,i=l;else{if(i===r)break;for(;i.sibling===null;){if(i.return===null||i.return===r)return!0;i=i.return}i.sibling.return=i.return,i=i.sibling}}return!0}function zo(r,i,l,d){i&=~Op,i&=~Bs,r.suspendedLanes|=i,r.pingedLanes&=~i,d&&(r.warmLanes|=i),d=r.expirationTimes;for(var p=i;0<p;){var b=31-sn(p),E=1<<b;d[b]=-1,p&=~E}l!==0&&Br(r,l,i)}function Tf(){return(Ut&6)===0?(fu(0),!1):!0}function Lp(){if(kt!==null){if(Yt===0)var r=kt.return;else r=kt,zi=js=null,Jm(r),Pl=null,Yc=0,r=kt;for(;r!==null;)ow(r.alternate,r),r=r.return;kt=null}}function Wl(r,i){var l=r.timeoutHandle;l!==-1&&(r.timeoutHandle=-1,BO(l)),l=r.cancelPendingCommit,l!==null&&(r.cancelPendingCommit=null,l()),Wi=0,Lp(),on=r,kt=l=za(r.current,null),Ot=i,Yt=0,ra=null,No=!1,Bl=Wt(r,i),Np=!1,Ul=aa=Op=Bs=Oo=An=0,Ir=uu=null,Dp=!1,(i&8)!==0&&(i|=i&32);var d=r.entangledLanes;if(d!==0)for(r=r.entanglements,d&=i;0<d;){var p=31-sn(d),b=1<<p;i|=r[p],d&=~b}return Vi=i,_s(),l}function Aw(r,i){gt=null,$.H=nu,i===zl||i===ef?(i=W1(),Yt=3):i===Fm?(i=W1(),Yt=4):Yt=i===pp?8:i!==null&&typeof i==\"object\"&&typeof i.then==\"function\"?6:1,ra=i,kt===null&&(An=1,pf(r,he(i,r.current)))}function Nw(){var r=ta.current;return r===null?!0:(Ot&4194048)===Ot?xa===null:(Ot&62914560)===Ot||(Ot&536870912)!==0?r===xa:!1}function Ow(){var r=$.H;return $.H=nu,r===null?nu:r}function Dw(){var r=$.A;return $.A=wO,r}function Mf(){An=4,No||(Ot&4194048)!==Ot&&ta.current!==null||(Bl=!0),(Oo&134217727)===0&&(Bs&134217727)===0||on===null||zo(on,Ot,aa,!1)}function Ip(r,i,l){var d=Ut;Ut|=2;var p=Ow(),b=Dw();(on!==r||Ot!==i)&&(Ef=null,Wl(r,i)),i=!1;var E=An;e:do try{if(Yt!==0&&kt!==null){var H=kt,Q=ra;switch(Yt){case 8:Lp(),E=6;break e;case 3:case 2:case 9:case 6:ta.current===null&&(i=!0);var de=Yt;if(Yt=0,ra=null,Gl(r,H,Q,de),l&&Bl){E=0;break e}break;default:de=Yt,Yt=0,ra=null,Gl(r,H,Q,de)}}RO(),E=An;break}catch(we){Aw(r,we)}while(!0);return i&&r.shellSuspendCounter++,zi=js=null,Ut=d,$.H=p,$.A=b,kt===null&&(on=null,Ot=0,_s()),E}function RO(){for(;kt!==null;)jw(kt)}function EO(r,i){var l=Ut;Ut|=2;var d=Ow(),p=Dw();on!==r||Ot!==i?(Ef=null,Rf=Ge()+500,Wl(r,i)):Bl=Wt(r,i);e:do try{if(Yt!==0&&kt!==null){i=kt;var b=ra;t:switch(Yt){case 1:Yt=0,ra=null,Gl(r,i,b,1);break;case 2:case 9:if(U1(b)){Yt=0,ra=null,zw(i);break}i=function(){Yt!==2&&Yt!==9||on!==r||(Yt=7),ni(r)},b.then(i,i);break e;case 3:Yt=7;break e;case 4:Yt=5;break e;case 7:U1(b)?(Yt=0,ra=null,zw(i)):(Yt=0,ra=null,Gl(r,i,b,7));break;case 5:var E=null;switch(kt.tag){case 26:E=kt.memoizedState;case 5:case 27:var H=kt;if(E?xS(E):H.stateNode.complete){Yt=0,ra=null;var Q=H.sibling;if(Q!==null)kt=Q;else{var de=H.return;de!==null?(kt=de,kf(de)):kt=null}break t}}Yt=0,ra=null,Gl(r,i,b,5);break;case 6:Yt=0,ra=null,Gl(r,i,b,6);break;case 8:Lp(),An=6;break e;default:throw Error(a(462))}}TO();break}catch(we){Aw(r,we)}while(!0);return zi=js=null,$.H=d,$.A=p,Ut=l,kt!==null?0:(on=null,Ot=0,_s(),An)}function TO(){for(;kt!==null&&!Re();)jw(kt)}function jw(r){var i=aw(r.alternate,r,Vi);r.memoizedProps=r.pendingProps,i===null?kf(r):kt=i}function zw(r){var i=r,l=i.alternate;switch(i.tag){case 15:case 0:i=Zx(l,i,i.pendingProps,i.type,void 0,Ot);break;case 11:i=Zx(l,i,i.pendingProps,i.type.render,i.ref,Ot);break;case 5:Jm(i);default:ow(l,i),i=kt=D(i,Vi),i=aw(l,i,Vi)}r.memoizedProps=r.pendingProps,i===null?kf(r):kt=i}function Gl(r,i,l,d){zi=js=null,Jm(i),Pl=null,Yc=0;var p=i.return;try{if(mO(r,p,i,l,Ot)){An=1,pf(r,he(l,r.current)),kt=null;return}}catch(b){if(p!==null)throw kt=p,b;An=1,pf(r,he(l,r.current)),kt=null;return}i.flags&32768?(pt||d===1?r=!0:Bl||(Ot&536870912)!==0?r=!1:(No=r=!0,(d===2||d===9||d===3||d===6)&&(d=ta.current,d!==null&&d.tag===13&&(d.flags|=16384))),Pw(i,r)):kf(i)}function kf(r){var i=r;do{if((i.flags&32768)!==0){Pw(i,No);return}r=i.return;var l=vO(i.alternate,i,Vi);if(l!==null){kt=l;return}if(i=i.sibling,i!==null){kt=i;return}kt=i=r}while(i!==null);An===0&&(An=5)}function Pw(r,i){do{var l=yO(r.alternate,r);if(l!==null){l.flags&=32767,kt=l;return}if(l=r.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!i&&(r=r.sibling,r!==null)){kt=r;return}kt=r=l}while(r!==null);An=6,kt=null}function Lw(r,i,l,d,p,b,E,H,Q){r.cancelPendingCommit=null;do _f();while(Wn!==0);if((Ut&6)!==0)throw Error(a(327));if(i!==null){if(i===r.current)throw Error(a(177));if(b=i.lanes|i.childLanes,b|=$c,Zt(r,l,b,E,H,Q),r===on&&(kt=on=null,Ot=0),Vl=i,jo=r,Wi=l,jp=b,zp=p,Tw=d,(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?(r.callbackNode=null,r.callbackPriority=0,AO(ut,function(){return $w(),null})):(r.callbackNode=null,r.callbackPriority=0),d=(i.flags&13878)!==0,(i.subtreeFlags&13878)!==0||d){d=$.T,$.T=null,p=W.p,W.p=2,E=Ut,Ut|=4;try{bO(r,i,l)}finally{Ut=E,W.p=p,$.T=d}}Wn=1,Iw(),Hw(),qw()}}function Iw(){if(Wn===1){Wn=0;var r=jo,i=Vl,l=(i.flags&13878)!==0;if((i.subtreeFlags&13878)!==0||l){l=$.T,$.T=null;var d=W.p;W.p=2;var p=Ut;Ut|=4;try{yw(i,r);var b=Qp,E=kl(r.containerInfo),H=b.focusedElem,Q=b.selectionRange;if(E!==H&&H&&H.ownerDocument&&Yd(H.ownerDocument.documentElement,H)){if(Q!==null&&Fc(H)){var de=Q.start,we=Q.end;if(we===void 0&&(we=de),\"selectionStart\"in H)H.selectionStart=de,H.selectionEnd=Math.min(we,H.value.length);else{var Te=H.ownerDocument||document,fe=Te&&Te.defaultView||window;if(fe.getSelection){var pe=fe.getSelection(),We=H.textContent.length,ot=Math.min(Q.start,We),rn=Q.end===void 0?ot:Math.min(Q.end,We);!pe.extend&&ot>rn&&(E=rn,rn=ot,ot=E);var ae=Gd(H,ot),J=Gd(H,rn);if(ae&&J&&(pe.rangeCount!==1||pe.anchorNode!==ae.node||pe.anchorOffset!==ae.offset||pe.focusNode!==J.node||pe.focusOffset!==J.offset)){var ue=Te.createRange();ue.setStart(ae.node,ae.offset),pe.removeAllRanges(),ot>rn?(pe.addRange(ue),pe.extend(J.node,J.offset)):(ue.setEnd(J.node,J.offset),pe.addRange(ue))}}}}for(Te=[],pe=H;pe=pe.parentNode;)pe.nodeType===1&&Te.push({element:pe,left:pe.scrollLeft,top:pe.scrollTop});for(typeof H.focus==\"function\"&&H.focus(),H=0;H<Te.length;H++){var Ce=Te[H];Ce.element.scrollLeft=Ce.left,Ce.element.scrollTop=Ce.top}}Ff=!!Xp,Qp=Xp=null}finally{Ut=p,W.p=d,$.T=l}}r.current=i,Wn=2}}function Hw(){if(Wn===2){Wn=0;var r=jo,i=Vl,l=(i.flags&8772)!==0;if((i.subtreeFlags&8772)!==0||l){l=$.T,$.T=null;var d=W.p;W.p=2;var p=Ut;Ut|=4;try{hw(r,i.alternate,i)}finally{Ut=p,W.p=d,$.T=l}}Wn=3}}function qw(){if(Wn===4||Wn===3){Wn=0,ze();var r=jo,i=Vl,l=Wi,d=Tw;(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?Wn=5:(Wn=0,Vl=jo=null,Fw(r,r.pendingLanes));var p=r.pendingLanes;if(p===0&&(Do=null),Ga(l),i=i.stateNode,zt&&typeof zt.onCommitFiberRoot==\"function\")try{zt.onCommitFiberRoot(mt,i,void 0,(i.current.flags&128)===128)}catch{}if(d!==null){i=$.T,p=W.p,W.p=2,$.T=null;try{for(var b=r.onRecoverableError,E=0;E<d.length;E++){var H=d[E];b(H.value,{componentStack:H.stack})}}finally{$.T=i,W.p=p}}(Wi&3)!==0&&_f(),ni(r),p=r.pendingLanes,(l&261930)!==0&&(p&42)!==0?r===Pp?du++:(du=0,Pp=r):du=0,fu(0)}}function Fw(r,i){(r.pooledCacheLanes&=i)===0&&(i=r.pooledCache,i!=null&&(r.pooledCache=null,Wc(i)))}function _f(){return Iw(),Hw(),qw(),$w()}function $w(){if(Wn!==5)return!1;var r=jo,i=jp;jp=0;var l=Ga(Wi),d=$.T,p=W.p;try{W.p=32>l?32:l,$.T=null,l=zp,zp=null;var b=jo,E=Wi;if(Wn=0,Vl=jo=null,Wi=0,(Ut&6)!==0)throw Error(a(331));var H=Ut;if(Ut|=4,Cw(b.current),xw(b,b.current,E,l),Ut=H,fu(0,!1),zt&&typeof zt.onPostCommitFiberRoot==\"function\")try{zt.onPostCommitFiberRoot(mt,b)}catch{}return!0}finally{W.p=p,$.T=d,Fw(r,i)}}function Bw(r,i,l){i=he(l,i),i=mp(r.stateNode,i,2),r=Mo(r,i,2),r!==null&&(Bt(r,2),ni(r))}function Xt(r,i,l){if(r.tag===3)Bw(r,r,l);else for(;i!==null;){if(i.tag===3){Bw(i,r,l);break}else if(i.tag===1){var d=i.stateNode;if(typeof i.type.getDerivedStateFromError==\"function\"||typeof d.componentDidCatch==\"function\"&&(Do===null||!Do.has(d))){r=he(l,r),l=Ux(2),d=Mo(i,l,2),d!==null&&(Vx(l,d,i,r),Bt(d,2),ni(d));break}}i=i.return}}function Hp(r,i,l){var d=r.pingCache;if(d===null){d=r.pingCache=new SO;var p=new Set;d.set(i,p)}else p=d.get(i),p===void 0&&(p=new Set,d.set(i,p));p.has(l)||(Np=!0,p.add(l),r=MO.bind(null,r,i,l),i.then(r,r))}function MO(r,i,l){var d=r.pingCache;d!==null&&d.delete(i),r.pingedLanes|=r.suspendedLanes&l,r.warmLanes&=~l,on===r&&(Ot&l)===l&&(An===4||An===3&&(Ot&62914560)===Ot&&300>Ge()-Cf?(Ut&2)===0&&Wl(r,0):Op|=l,Ul===Ot&&(Ul=0)),ni(r)}function Uw(r,i){i===0&&(i=Un()),r=Ni(r,i),r!==null&&(Bt(r,i),ni(r))}function kO(r){var i=r.memoizedState,l=0;i!==null&&(l=i.retryLane),Uw(r,l)}function _O(r,i){var l=0;switch(r.tag){case 31:case 13:var d=r.stateNode,p=r.memoizedState;p!==null&&(l=p.retryLane);break;case 19:d=r.stateNode;break;case 22:d=r.stateNode._retryCache;break;default:throw Error(a(314))}d!==null&&d.delete(i),Uw(r,l)}function AO(r,i){return ge(r,i)}var Af=null,Yl=null,qp=!1,Nf=!1,Fp=!1,Po=0;function ni(r){r!==Yl&&r.next===null&&(Yl===null?Af=Yl=r:Yl=Yl.next=r),Nf=!0,qp||(qp=!0,OO())}function fu(r,i){if(!Fp&&Nf){Fp=!0;do for(var l=!1,d=Af;d!==null;){if(r!==0){var p=d.pendingLanes;if(p===0)var b=0;else{var E=d.suspendedLanes,H=d.pingedLanes;b=(1<<31-sn(42|r)+1)-1,b&=p&~(E&~H),b=b&201326741?b&201326741|1:b?b|2:0}b!==0&&(l=!0,Yw(d,b))}else b=Ot,b=St(d,d===on?b:0,d.cancelPendingCommit!==null||d.timeoutHandle!==-1),(b&3)===0||Wt(d,b)||(l=!0,Yw(d,b));d=d.next}while(l);Fp=!1}}function NO(){Vw()}function Vw(){Nf=qp=!1;var r=0;Po!==0&&$O()&&(r=Po);for(var i=Ge(),l=null,d=Af;d!==null;){var p=d.next,b=Ww(d,i);b===0?(d.next=null,l===null?Af=p:l.next=p,p===null&&(Yl=l)):(l=d,(r!==0||(b&3)!==0)&&(Nf=!0)),d=p}Wn!==0&&Wn!==5||fu(r),Po!==0&&(Po=0)}function Ww(r,i){for(var l=r.suspendedLanes,d=r.pingedLanes,p=r.expirationTimes,b=r.pendingLanes&-62914561;0<b;){var E=31-sn(b),H=1<<E,Q=p[E];Q===-1?((H&l)===0||(H&d)!==0)&&(p[E]=gr(H,i)):Q<=i&&(r.expiredLanes|=H),b&=~H}if(i=on,l=Ot,l=St(r,r===i?l:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),d=r.callbackNode,l===0||r===i&&(Yt===2||Yt===9)||r.cancelPendingCommit!==null)return d!==null&&d!==null&&Ne(d),r.callbackNode=null,r.callbackPriority=0;if((l&3)===0||Wt(r,l)){if(i=l&-l,i===r.callbackPriority)return i;switch(d!==null&&Ne(d),Ga(l)){case 2:case 8:l=Mt;break;case 32:l=ut;break;case 268435456:l=xn;break;default:l=ut}return d=Gw.bind(null,r),l=ge(l,d),r.callbackPriority=i,r.callbackNode=l,i}return d!==null&&d!==null&&Ne(d),r.callbackPriority=2,r.callbackNode=null,2}function Gw(r,i){if(Wn!==0&&Wn!==5)return r.callbackNode=null,r.callbackPriority=0,null;var l=r.callbackNode;if(_f()&&r.callbackNode!==l)return null;var d=Ot;return d=St(r,r===on?d:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),d===0?null:(kw(r,d,i),Ww(r,Ge()),r.callbackNode!=null&&r.callbackNode===l?Gw.bind(null,r):null)}function Yw(r,i){if(_f())return null;kw(r,i,!0)}function OO(){UO(function(){(Ut&6)!==0?ge(Pe,NO):Vw()})}function $p(){if(Po===0){var r=Dl;r===0&&(r=Pn,Pn<<=1,(Pn&261888)===0&&(Pn=256)),Po=r}return Po}function Xw(r){return r==null||typeof r==\"symbol\"||typeof r==\"boolean\"?null:typeof r==\"function\"?r:so(\"\"+r)}function Qw(r,i){var l=i.ownerDocument.createElement(\"input\");return l.name=i.name,l.value=i.value,r.id&&l.setAttribute(\"form\",r.id),i.parentNode.insertBefore(l,i),r=new FormData(r),l.parentNode.removeChild(l),r}function DO(r,i,l,d,p){if(i===\"submit\"&&l&&l.stateNode===p){var b=Xw((p[On]||null).action),E=d.submitter;E&&(i=(i=E[On]||null)?Xw(i.formAction):E.getAttribute(\"formAction\"),i!==null&&(b=i,E=null));var H=new qe(\"action\",\"action\",null,d,p);r.push({event:H,listeners:[{instance:null,listener:function(){if(d.defaultPrevented){if(Po!==0){var Q=E?Qw(p,E):new FormData(p);lp(l,{pending:!0,data:Q,method:p.method,action:b},null,Q)}}else typeof b==\"function\"&&(H.preventDefault(),Q=E?Qw(p,E):new FormData(p),lp(l,{pending:!0,data:Q,method:p.method,action:b},b,Q))},currentTarget:p}]})}}for(var Bp=0;Bp<xo.length;Bp++){var Up=xo[Bp],jO=Up.toLowerCase(),zO=Up[0].toUpperCase()+Up.slice(1);Dr(jO,\"on\"+zO)}Dr(bo,\"onAnimationEnd\"),Dr(Xd,\"onAnimationIteration\"),Dr(_l,\"onAnimationStart\"),Dr(\"dblclick\",\"onDoubleClick\"),Dr(\"focusin\",\"onFocus\"),Dr(\"focusout\",\"onBlur\"),Dr(Ts,\"onTransitionRun\"),Dr(Nm,\"onTransitionStart\"),Dr(Om,\"onTransitionCancel\"),Dr(Ms,\"onTransitionEnd\"),Yr(\"onMouseEnter\",[\"mouseout\",\"mouseover\"]),Yr(\"onMouseLeave\",[\"mouseout\",\"mouseover\"]),Yr(\"onPointerEnter\",[\"pointerout\",\"pointerover\"]),Yr(\"onPointerLeave\",[\"pointerout\",\"pointerover\"]),Ma(\"onChange\",\"change click focusin focusout input keydown keyup selectionchange\".split(\" \")),Ma(\"onSelect\",\"focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange\".split(\" \")),Ma(\"onBeforeInput\",[\"compositionend\",\"keypress\",\"textInput\",\"paste\"]),Ma(\"onCompositionEnd\",\"compositionend focusout keydown keypress keyup mousedown\".split(\" \")),Ma(\"onCompositionStart\",\"compositionstart focusout keydown keypress keyup mousedown\".split(\" \")),Ma(\"onCompositionUpdate\",\"compositionupdate focusout keydown keypress keyup mousedown\".split(\" \"));var hu=\"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(\" \"),PO=new Set(\"beforetoggle cancel close invalid load scroll scrollend toggle\".split(\" \").concat(hu));function Kw(r,i){i=(i&4)!==0;for(var l=0;l<r.length;l++){var d=r[l],p=d.event;d=d.listeners;e:{var b=void 0;if(i)for(var E=d.length-1;0<=E;E--){var H=d[E],Q=H.instance,de=H.currentTarget;if(H=H.listener,Q!==b&&p.isPropagationStopped())break e;b=H,p.currentTarget=de;try{b(p)}catch(we){Al(we)}p.currentTarget=null,b=Q}else for(E=0;E<d.length;E++){if(H=d[E],Q=H.instance,de=H.currentTarget,H=H.listener,Q!==b&&p.isPropagationStopped())break e;b=H,p.currentTarget=de;try{b(p)}catch(we){Al(we)}p.currentTarget=null,b=Q}}}}function _t(r,i){var l=i[Ur];l===void 0&&(l=i[Ur]=new Set);var d=r+\"__bubble\";l.has(d)||(Zw(i,r,2,!1),l.add(d))}function Vp(r,i,l){var d=0;i&&(d|=4),Zw(l,r,d,i)}var Of=\"_reactListening\"+Math.random().toString(36).slice(2);function Wp(r){if(!r[Of]){r[Of]=!0,ps.forEach(function(l){l!==\"selectionchange\"&&(PO.has(l)||Vp(l,!1,r),Vp(l,!0,r))});var i=r.nodeType===9?r:r.ownerDocument;i===null||i[Of]||(i[Of]=!0,Vp(\"selectionchange\",!1,i))}}function Zw(r,i,l,d){switch(MS(i)){case 2:var p=uD;break;case 8:p=dD;break;default:p=sg}l=p.bind(null,i,l,r),p=void 0,!Xn||i!==\"touchstart\"&&i!==\"touchmove\"&&i!==\"wheel\"||(p=!0),d?p!==void 0?r.addEventListener(i,l,{capture:!0,passive:p}):r.addEventListener(i,l,!0):p!==void 0?r.addEventListener(i,l,{passive:p}):r.addEventListener(i,l,!1)}function Gp(r,i,l,d,p){var b=d;if((i&1)===0&&(i&2)===0&&d!==null)e:for(;;){if(d===null)return;var E=d.tag;if(E===3||E===4){var H=d.stateNode.containerInfo;if(H===p)break;if(E===4)for(E=d.return;E!==null;){var Q=E.tag;if((Q===3||Q===4)&&E.stateNode.containerInfo===p)return;E=E.return}for(;H!==null;){if(E=Vr(H),E===null)return;if(Q=E.tag,Q===5||Q===6||Q===26||Q===27){d=b=E;continue e}H=H.parentNode}}d=d.return}Ci(function(){var de=b,we=bs(l),Te=[];e:{var fe=ks.get(r);if(fe!==void 0){var pe=qe,We=r;switch(r){case\"keypress\":if(le(l)===0)break e;case\"keydown\":case\"keyup\":pe=tr;break;case\"focusin\":We=\"focus\",pe=Gt;break;case\"focusout\":We=\"blur\",pe=Gt;break;case\"beforeblur\":case\"afterblur\":pe=Gt;break;case\"click\":if(l.button===2)break e;case\"auxclick\":case\"dblclick\":case\"mousedown\":case\"mousemove\":case\"mouseup\":case\"mouseout\":case\"mouseover\":case\"contextmenu\":pe=Ht;break;case\"drag\":case\"dragend\":case\"dragenter\":case\"dragexit\":case\"dragleave\":case\"dragover\":case\"dragstart\":case\"drop\":pe=cn;break;case\"touchcancel\":case\"touchend\":case\"touchmove\":case\"touchstart\":pe=Pc;break;case bo:case Xd:case _l:pe=kn;break;case Ms:pe=qd;break;case\"scroll\":case\"scrollend\":pe=$e;break;case\"wheel\":pe=Cl;break;case\"copy\":case\"cut\":case\"paste\":pe=qt;break;case\"gotpointercapture\":case\"lostpointercapture\":case\"pointercancel\":case\"pointerdown\":case\"pointermove\":case\"pointerout\":case\"pointerover\":case\"pointerup\":pe=wr;break;case\"toggle\":case\"beforetoggle\":pe=Fd}var ot=(i&4)!==0,rn=!ot&&(r===\"scroll\"||r===\"scrollend\"),ae=ot?fe!==null?fe+\"Capture\":null:fe;ot=[];for(var J=de,ue;J!==null;){var Ce=J;if(ue=Ce.stateNode,Ce=Ce.tag,Ce!==5&&Ce!==26&&Ce!==27||ue===null||ae===null||(Ce=Na(J,ae),Ce!=null&&ot.push(mu(J,Ce,ue))),rn)break;J=J.return}0<ot.length&&(fe=new pe(fe,We,null,l,we),Te.push({event:fe,listeners:ot}))}}if((i&7)===0){e:{if(fe=r===\"mouseover\"||r===\"pointerover\",pe=r===\"mouseout\"||r===\"pointerout\",fe&&l!==wi&&(We=l.relatedTarget||l.fromElement)&&(Vr(We)||We[sr]))break e;if((pe||fe)&&(fe=we.window===we?we:(fe=we.ownerDocument)?fe.defaultView||fe.parentWindow:window,pe?(We=l.relatedTarget||l.toElement,pe=de,We=We?Vr(We):null,We!==null&&(rn=s(We),ot=We.tag,We!==rn||ot!==5&&ot!==27&&ot!==6)&&(We=null)):(pe=null,We=de),pe!==We)){if(ot=Ht,Ce=\"onMouseLeave\",ae=\"onMouseEnter\",J=\"mouse\",(r===\"pointerout\"||r===\"pointerover\")&&(ot=wr,Ce=\"onPointerLeave\",ae=\"onPointerEnter\",J=\"pointer\"),rn=pe==null?fe:Gr(pe),ue=We==null?fe:Gr(We),fe=new ot(Ce,J+\"leave\",pe,l,we),fe.target=rn,fe.relatedTarget=ue,Ce=null,Vr(we)===de&&(ot=new ot(ae,J+\"enter\",We,l,we),ot.target=ue,ot.relatedTarget=rn,Ce=ot),rn=Ce,pe&&We)t:{for(ot=LO,ae=pe,J=We,ue=0,Ce=ae;Ce;Ce=ot(Ce))ue++;Ce=0;for(var et=J;et;et=ot(et))Ce++;for(;0<ue-Ce;)ae=ot(ae),ue--;for(;0<Ce-ue;)J=ot(J),Ce--;for(;ue--;){if(ae===J||J!==null&&ae===J.alternate){ot=ae;break t}ae=ot(ae),J=ot(J)}ot=null}else ot=null;pe!==null&&Jw(Te,fe,pe,ot,!1),We!==null&&rn!==null&&Jw(Te,rn,We,ot,!0)}}e:{if(fe=de?Gr(de):window,pe=fe.nodeName&&fe.nodeName.toLowerCase(),pe===\"select\"||pe===\"input\"&&fe.type===\"file\")var Ft=Bd;else if(mo(fe))if(Tl)Ft=Wd;else{Ft=go;var Ze=qc}else pe=fe.nodeName,!pe||pe.toLowerCase()!==\"input\"||fe.type!==\"checkbox\"&&fe.type!==\"radio\"?de&&ve(de.elementType)&&(Ft=Bd):Ft=Vd;if(Ft&&(Ft=Ft(r,de))){po(Te,Ft,l,we);break e}Ze&&Ze(r,fe,de),r===\"focusout\"&&de&&fe.type===\"number\"&&de.memoizedProps.value!=null&&Xa(fe,\"number\",fe.value)}switch(Ze=de?Gr(de):window,r){case\"focusin\":(mo(Ze)||Ze.contentEditable===\"true\")&&(Ja=Ze,Rs=de,Es=null);break;case\"focusout\":Es=Rs=Ja=null;break;case\"mousedown\":Er=!0;break;case\"contextmenu\":case\"mouseup\":case\"dragend\":Er=!1,Da(Te,l,we);break;case\"selectionchange\":if(Am)break;case\"keydown\":case\"keyup\":Da(Te,l,we)}var yt;if(xs)e:{switch(r){case\"compositionstart\":var Dt=\"onCompositionStart\";break e;case\"compositionend\":Dt=\"onCompositionEnd\";break e;case\"compositionupdate\":Dt=\"onCompositionUpdate\";break e}Dt=void 0}else Kr?Hc(r,l)&&(Dt=\"onCompositionEnd\"):r===\"keydown\"&&l.keyCode===229&&(Dt=\"onCompositionStart\");Dt&&(Lc&&l.locale!==\"ko\"&&(Kr||Dt!==\"onCompositionStart\"?Dt===\"onCompositionEnd\"&&Kr&&(yt=xl()):(ya=we,Qa=\"value\"in ya?ya.value:ya.textContent,Kr=!0)),Ze=Df(de,Dt),0<Ze.length&&(Dt=new fr(Dt,r,null,l,we),Te.push({event:Dt,listeners:Ze}),yt?Dt.data=yt:(yt=Rl(l),yt!==null&&(Dt.data=yt)))),(yt=fo?El(r,l):Za(r,l))&&(Dt=Df(de,\"onBeforeInput\"),0<Dt.length&&(Ze=new fr(\"onBeforeInput\",\"beforeinput\",null,l,we),Te.push({event:Ze,listeners:Dt}),Ze.data=yt)),DO(Te,r,de,l,we)}Kw(Te,i)})}function mu(r,i,l){return{instance:r,listener:i,currentTarget:l}}function Df(r,i){for(var l=i+\"Capture\",d=[];r!==null;){var p=r,b=p.stateNode;if(p=p.tag,p!==5&&p!==26&&p!==27||b===null||(p=Na(r,l),p!=null&&d.unshift(mu(r,p,b)),p=Na(r,i),p!=null&&d.push(mu(r,p,b))),r.tag===3)return d;r=r.return}return[]}function LO(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5&&r.tag!==27);return r||null}function Jw(r,i,l,d,p){for(var b=i._reactName,E=[];l!==null&&l!==d;){var H=l,Q=H.alternate,de=H.stateNode;if(H=H.tag,Q!==null&&Q===d)break;H!==5&&H!==26&&H!==27||de===null||(Q=de,p?(de=Na(l,b),de!=null&&E.unshift(mu(l,de,Q))):p||(de=Na(l,b),de!=null&&E.push(mu(l,de,Q)))),l=l.return}E.length!==0&&r.push({event:i,listeners:E})}var IO=/\\r\\n?/g,HO=/\\u0000|\\uFFFD/g;function eS(r){return(typeof r==\"string\"?r:\"\"+r).replace(IO,`\n`).replace(HO,\"\")}function tS(r,i){return i=eS(i),eS(r)===i}function nn(r,i,l,d,p,b){switch(l){case\"children\":typeof d==\"string\"?i===\"body\"||i===\"textarea\"&&d===\"\"||Aa(r,d):(typeof d==\"number\"||typeof d==\"bigint\")&&i!==\"body\"&&Aa(r,\"\"+d);break;case\"className\":br(r,\"class\",d);break;case\"tabIndex\":br(r,\"tabindex\",d);break;case\"dir\":case\"role\":case\"viewBox\":case\"width\":case\"height\":br(r,l,d);break;case\"style\":dr(r,d,b);break;case\"data\":if(i!==\"object\"){br(r,\"data\",d);break}case\"src\":case\"href\":if(d===\"\"&&(i!==\"a\"||l!==\"href\")){r.removeAttribute(l);break}if(d==null||typeof d==\"function\"||typeof d==\"symbol\"||typeof d==\"boolean\"){r.removeAttribute(l);break}d=so(\"\"+d),r.setAttribute(l,d);break;case\"action\":case\"formAction\":if(typeof d==\"function\"){r.setAttribute(l,\"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')\");break}else typeof b==\"function\"&&(l===\"formAction\"?(i!==\"input\"&&nn(r,i,\"name\",p.name,p,null),nn(r,i,\"formEncType\",p.formEncType,p,null),nn(r,i,\"formMethod\",p.formMethod,p,null),nn(r,i,\"formTarget\",p.formTarget,p,null)):(nn(r,i,\"encType\",p.encType,p,null),nn(r,i,\"method\",p.method,p,null),nn(r,i,\"target\",p.target,p,null)));if(d==null||typeof d==\"symbol\"||typeof d==\"boolean\"){r.removeAttribute(l);break}d=so(\"\"+d),r.setAttribute(l,d);break;case\"onClick\":d!=null&&(r.onclick=Or);break;case\"onScroll\":d!=null&&_t(\"scroll\",r);break;case\"onScrollEnd\":d!=null&&_t(\"scrollend\",r);break;case\"dangerouslySetInnerHTML\":if(d!=null){if(typeof d!=\"object\"||!(\"__html\"in d))throw Error(a(61));if(l=d.__html,l!=null){if(p.children!=null)throw Error(a(60));r.innerHTML=l}}break;case\"multiple\":r.multiple=d&&typeof d!=\"function\"&&typeof d!=\"symbol\";break;case\"muted\":r.muted=d&&typeof d!=\"function\"&&typeof d!=\"symbol\";break;case\"suppressContentEditableWarning\":case\"suppressHydrationWarning\":case\"defaultValue\":case\"defaultChecked\":case\"innerHTML\":case\"ref\":break;case\"autoFocus\":break;case\"xlinkHref\":if(d==null||typeof d==\"function\"||typeof d==\"boolean\"||typeof d==\"symbol\"){r.removeAttribute(\"xlink:href\");break}l=so(\"\"+d),r.setAttributeNS(\"http://www.w3.org/1999/xlink\",\"xlink:href\",l);break;case\"contentEditable\":case\"spellCheck\":case\"draggable\":case\"value\":case\"autoReverse\":case\"externalResourcesRequired\":case\"focusable\":case\"preserveAlpha\":d!=null&&typeof d!=\"function\"&&typeof d!=\"symbol\"?r.setAttribute(l,\"\"+d):r.removeAttribute(l);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\":d&&typeof d!=\"function\"&&typeof d!=\"symbol\"?r.setAttribute(l,\"\"):r.removeAttribute(l);break;case\"capture\":case\"download\":d===!0?r.setAttribute(l,\"\"):d!==!1&&d!=null&&typeof d!=\"function\"&&typeof d!=\"symbol\"?r.setAttribute(l,d):r.removeAttribute(l);break;case\"cols\":case\"rows\":case\"size\":case\"span\":d!=null&&typeof d!=\"function\"&&typeof d!=\"symbol\"&&!isNaN(d)&&1<=d?r.setAttribute(l,d):r.removeAttribute(l);break;case\"rowSpan\":case\"start\":d==null||typeof d==\"function\"||typeof d==\"symbol\"||isNaN(d)?r.removeAttribute(l):r.setAttribute(l,d);break;case\"popover\":_t(\"beforetoggle\",r),_t(\"toggle\",r),_a(r,\"popover\",d);break;case\"xlinkActuate\":Mn(r,\"http://www.w3.org/1999/xlink\",\"xlink:actuate\",d);break;case\"xlinkArcrole\":Mn(r,\"http://www.w3.org/1999/xlink\",\"xlink:arcrole\",d);break;case\"xlinkRole\":Mn(r,\"http://www.w3.org/1999/xlink\",\"xlink:role\",d);break;case\"xlinkShow\":Mn(r,\"http://www.w3.org/1999/xlink\",\"xlink:show\",d);break;case\"xlinkTitle\":Mn(r,\"http://www.w3.org/1999/xlink\",\"xlink:title\",d);break;case\"xlinkType\":Mn(r,\"http://www.w3.org/1999/xlink\",\"xlink:type\",d);break;case\"xmlBase\":Mn(r,\"http://www.w3.org/XML/1998/namespace\",\"xml:base\",d);break;case\"xmlLang\":Mn(r,\"http://www.w3.org/XML/1998/namespace\",\"xml:lang\",d);break;case\"xmlSpace\":Mn(r,\"http://www.w3.org/XML/1998/namespace\",\"xml:space\",d);break;case\"is\":_a(r,\"is\",d);break;case\"innerText\":case\"textContent\":break;default:(!(2<l.length)||l[0]!==\"o\"&&l[0]!==\"O\"||l[1]!==\"n\"&&l[1]!==\"N\")&&(l=ln.get(l)||l,_a(r,l,d))}}function Yp(r,i,l,d,p,b){switch(l){case\"style\":dr(r,d,b);break;case\"dangerouslySetInnerHTML\":if(d!=null){if(typeof d!=\"object\"||!(\"__html\"in d))throw Error(a(61));if(l=d.__html,l!=null){if(p.children!=null)throw Error(a(60));r.innerHTML=l}}break;case\"children\":typeof d==\"string\"?Aa(r,d):(typeof d==\"number\"||typeof d==\"bigint\")&&Aa(r,\"\"+d);break;case\"onScroll\":d!=null&&_t(\"scroll\",r);break;case\"onScrollEnd\":d!=null&&_t(\"scrollend\",r);break;case\"onClick\":d!=null&&(r.onclick=Or);break;case\"suppressContentEditableWarning\":case\"suppressHydrationWarning\":case\"innerHTML\":case\"ref\":break;case\"innerText\":case\"textContent\":break;default:if(!pl.hasOwnProperty(l))e:{if(l[0]===\"o\"&&l[1]===\"n\"&&(p=l.endsWith(\"Capture\"),i=l.slice(2,p?l.length-7:void 0),b=r[On]||null,b=b!=null?b[l]:null,typeof b==\"function\"&&r.removeEventListener(i,b,p),typeof d==\"function\")){typeof b!=\"function\"&&b!==null&&(l in r?r[l]=null:r.hasAttribute(l)&&r.removeAttribute(l)),r.addEventListener(i,d,p);break e}l in r?r[l]=d:d===!0?r.setAttribute(l,\"\"):_a(r,l,d)}}}function ir(r,i,l){switch(i){case\"div\":case\"span\":case\"svg\":case\"path\":case\"a\":case\"g\":case\"p\":case\"li\":break;case\"img\":_t(\"error\",r),_t(\"load\",r);var d=!1,p=!1,b;for(b in l)if(l.hasOwnProperty(b)){var E=l[b];if(E!=null)switch(b){case\"src\":d=!0;break;case\"srcSet\":p=!0;break;case\"children\":case\"dangerouslySetInnerHTML\":throw Error(a(137,i));default:nn(r,i,b,E,l,null)}}p&&nn(r,i,\"srcSet\",l.srcSet,l,null),d&&nn(r,i,\"src\",l.src,l,null);return;case\"input\":_t(\"invalid\",r);var H=b=E=p=null,Q=null,de=null;for(d in l)if(l.hasOwnProperty(d)){var we=l[d];if(we!=null)switch(d){case\"name\":p=we;break;case\"type\":E=we;break;case\"checked\":Q=we;break;case\"defaultChecked\":de=we;break;case\"value\":b=we;break;case\"defaultValue\":H=we;break;case\"children\":case\"dangerouslySetInnerHTML\":if(we!=null)throw Error(a(137,i));break;default:nn(r,i,d,we,l,null)}}Gn(r,b,H,Q,de,E,p,!1);return;case\"select\":_t(\"invalid\",r),d=E=b=null;for(p in l)if(l.hasOwnProperty(p)&&(H=l[p],H!=null))switch(p){case\"value\":b=H;break;case\"defaultValue\":E=H;break;case\"multiple\":d=H;default:nn(r,i,p,H,l,null)}i=b,l=E,r.multiple=!!d,i!=null?ga(r,!!d,i,!1):l!=null&&ga(r,!!d,l,!0);return;case\"textarea\":_t(\"invalid\",r),b=p=d=null;for(E in l)if(l.hasOwnProperty(E)&&(H=l[E],H!=null))switch(E){case\"value\":d=H;break;case\"defaultValue\":p=H;break;case\"children\":b=H;break;case\"dangerouslySetInnerHTML\":if(H!=null)throw Error(a(91));break;default:nn(r,i,E,H,l,null)}bl(r,d,p,b);return;case\"option\":for(Q in l)l.hasOwnProperty(Q)&&(d=l[Q],d!=null)&&(Q===\"selected\"?r.selected=d&&typeof d!=\"function\"&&typeof d!=\"symbol\":nn(r,i,Q,d,l,null));return;case\"dialog\":_t(\"beforetoggle\",r),_t(\"toggle\",r),_t(\"cancel\",r),_t(\"close\",r);break;case\"iframe\":case\"object\":_t(\"load\",r);break;case\"video\":case\"audio\":for(d=0;d<hu.length;d++)_t(hu[d],r);break;case\"image\":_t(\"error\",r),_t(\"load\",r);break;case\"details\":_t(\"toggle\",r);break;case\"embed\":case\"source\":case\"link\":_t(\"error\",r),_t(\"load\",r);case\"area\":case\"base\":case\"br\":case\"col\":case\"hr\":case\"keygen\":case\"meta\":case\"param\":case\"track\":case\"wbr\":case\"menuitem\":for(de in l)if(l.hasOwnProperty(de)&&(d=l[de],d!=null))switch(de){case\"children\":case\"dangerouslySetInnerHTML\":throw Error(a(137,i));default:nn(r,i,de,d,l,null)}return;default:if(ve(i)){for(we in l)l.hasOwnProperty(we)&&(d=l[we],d!==void 0&&Yp(r,i,we,d,l,void 0));return}}for(H in l)l.hasOwnProperty(H)&&(d=l[H],d!=null&&nn(r,i,H,d,l,null))}function qO(r,i,l,d){switch(i){case\"div\":case\"span\":case\"svg\":case\"path\":case\"a\":case\"g\":case\"p\":case\"li\":break;case\"input\":var p=null,b=null,E=null,H=null,Q=null,de=null,we=null;for(pe in l){var Te=l[pe];if(l.hasOwnProperty(pe)&&Te!=null)switch(pe){case\"checked\":break;case\"value\":break;case\"defaultValue\":Q=Te;default:d.hasOwnProperty(pe)||nn(r,i,pe,null,d,Te)}}for(var fe in d){var pe=d[fe];if(Te=l[fe],d.hasOwnProperty(fe)&&(pe!=null||Te!=null))switch(fe){case\"type\":b=pe;break;case\"name\":p=pe;break;case\"checked\":de=pe;break;case\"defaultChecked\":we=pe;break;case\"value\":E=pe;break;case\"defaultValue\":H=pe;break;case\"children\":case\"dangerouslySetInnerHTML\":if(pe!=null)throw Error(a(137,i));break;default:pe!==Te&&nn(r,i,fe,pe,d,Te)}}bi(r,E,H,Q,de,we,b,p);return;case\"select\":pe=E=H=fe=null;for(b in l)if(Q=l[b],l.hasOwnProperty(b)&&Q!=null)switch(b){case\"value\":break;case\"multiple\":pe=Q;default:d.hasOwnProperty(b)||nn(r,i,b,null,d,Q)}for(p in d)if(b=d[p],Q=l[p],d.hasOwnProperty(p)&&(b!=null||Q!=null))switch(p){case\"value\":fe=b;break;case\"defaultValue\":H=b;break;case\"multiple\":E=b;default:b!==Q&&nn(r,i,p,b,d,Q)}i=H,l=E,d=pe,fe!=null?ga(r,!!l,fe,!1):!!d!=!!l&&(i!=null?ga(r,!!l,i,!0):ga(r,!!l,l?[]:\"\",!1));return;case\"textarea\":pe=fe=null;for(H in l)if(p=l[H],l.hasOwnProperty(H)&&p!=null&&!d.hasOwnProperty(H))switch(H){case\"value\":break;case\"children\":break;default:nn(r,i,H,null,d,p)}for(E in d)if(p=d[E],b=l[E],d.hasOwnProperty(E)&&(p!=null||b!=null))switch(E){case\"value\":fe=p;break;case\"defaultValue\":pe=p;break;case\"children\":break;case\"dangerouslySetInnerHTML\":if(p!=null)throw Error(a(91));break;default:p!==b&&nn(r,i,E,p,d,b)}ys(r,fe,pe);return;case\"option\":for(var We in l)fe=l[We],l.hasOwnProperty(We)&&fe!=null&&!d.hasOwnProperty(We)&&(We===\"selected\"?r.selected=!1:nn(r,i,We,null,d,fe));for(Q in d)fe=d[Q],pe=l[Q],d.hasOwnProperty(Q)&&fe!==pe&&(fe!=null||pe!=null)&&(Q===\"selected\"?r.selected=fe&&typeof fe!=\"function\"&&typeof fe!=\"symbol\":nn(r,i,Q,fe,d,pe));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 ot in l)fe=l[ot],l.hasOwnProperty(ot)&&fe!=null&&!d.hasOwnProperty(ot)&&nn(r,i,ot,null,d,fe);for(de in d)if(fe=d[de],pe=l[de],d.hasOwnProperty(de)&&fe!==pe&&(fe!=null||pe!=null))switch(de){case\"children\":case\"dangerouslySetInnerHTML\":if(fe!=null)throw Error(a(137,i));break;default:nn(r,i,de,fe,d,pe)}return;default:if(ve(i)){for(var rn in l)fe=l[rn],l.hasOwnProperty(rn)&&fe!==void 0&&!d.hasOwnProperty(rn)&&Yp(r,i,rn,void 0,d,fe);for(we in d)fe=d[we],pe=l[we],!d.hasOwnProperty(we)||fe===pe||fe===void 0&&pe===void 0||Yp(r,i,we,fe,d,pe);return}}for(var ae in l)fe=l[ae],l.hasOwnProperty(ae)&&fe!=null&&!d.hasOwnProperty(ae)&&nn(r,i,ae,null,d,fe);for(Te in d)fe=d[Te],pe=l[Te],!d.hasOwnProperty(Te)||fe===pe||fe==null&&pe==null||nn(r,i,Te,fe,d,pe)}function nS(r){switch(r){case\"css\":case\"script\":case\"font\":case\"img\":case\"image\":case\"input\":case\"link\":return!0;default:return!1}}function FO(){if(typeof performance.getEntriesByType==\"function\"){for(var r=0,i=0,l=performance.getEntriesByType(\"resource\"),d=0;d<l.length;d++){var p=l[d],b=p.transferSize,E=p.initiatorType,H=p.duration;if(b&&H&&nS(E)){for(E=0,H=p.responseEnd,d+=1;d<l.length;d++){var Q=l[d],de=Q.startTime;if(de>H)break;var we=Q.transferSize,Te=Q.initiatorType;we&&nS(Te)&&(Q=Q.responseEnd,E+=we*(Q<H?1:(H-de)/(Q-de)))}if(--d,i+=8*(b+E)/(p.duration/1e3),r++,10<r)break}}if(0<r)return i/r/1e6}return navigator.connection&&(r=navigator.connection.downlink,typeof r==\"number\")?r:5}var Xp=null,Qp=null;function jf(r){return r.nodeType===9?r:r.ownerDocument}function rS(r){switch(r){case\"http://www.w3.org/2000/svg\":return 1;case\"http://www.w3.org/1998/Math/MathML\":return 2;default:return 0}}function aS(r,i){if(r===0)switch(i){case\"svg\":return 1;case\"math\":return 2;default:return 0}return r===1&&i===\"foreignObject\"?0:r}function Kp(r,i){return r===\"textarea\"||r===\"noscript\"||typeof i.children==\"string\"||typeof i.children==\"number\"||typeof i.children==\"bigint\"||typeof i.dangerouslySetInnerHTML==\"object\"&&i.dangerouslySetInnerHTML!==null&&i.dangerouslySetInnerHTML.__html!=null}var Zp=null;function $O(){var r=window.event;return r&&r.type===\"popstate\"?r===Zp?!1:(Zp=r,!0):(Zp=null,!1)}var iS=typeof setTimeout==\"function\"?setTimeout:void 0,BO=typeof clearTimeout==\"function\"?clearTimeout:void 0,oS=typeof Promise==\"function\"?Promise:void 0,UO=typeof queueMicrotask==\"function\"?queueMicrotask:typeof oS<\"u\"?function(r){return oS.resolve(null).then(r).catch(VO)}:iS;function VO(r){setTimeout(function(){throw r})}function Lo(r){return r===\"head\"}function sS(r,i){var l=i,d=0;do{var p=l.nextSibling;if(r.removeChild(l),p&&p.nodeType===8)if(l=p.data,l===\"/$\"||l===\"/&\"){if(d===0){r.removeChild(p),Zl(i);return}d--}else if(l===\"$\"||l===\"$?\"||l===\"$~\"||l===\"$!\"||l===\"&\")d++;else if(l===\"html\")pu(r.ownerDocument.documentElement);else if(l===\"head\"){l=r.ownerDocument.head,pu(l);for(var b=l.firstChild;b;){var E=b.nextSibling,H=b.nodeName;b[lr]||H===\"SCRIPT\"||H===\"STYLE\"||H===\"LINK\"&&b.rel.toLowerCase()===\"stylesheet\"||l.removeChild(b),b=E}}else l===\"body\"&&pu(r.ownerDocument.body);l=p}while(l);Zl(i)}function lS(r,i){var l=r;r=0;do{var d=l.nextSibling;if(l.nodeType===1?i?(l._stashedDisplay=l.style.display,l.style.display=\"none\"):(l.style.display=l._stashedDisplay||\"\",l.getAttribute(\"style\")===\"\"&&l.removeAttribute(\"style\")):l.nodeType===3&&(i?(l._stashedText=l.nodeValue,l.nodeValue=\"\"):l.nodeValue=l._stashedText||\"\"),d&&d.nodeType===8)if(l=d.data,l===\"/$\"){if(r===0)break;r--}else l!==\"$\"&&l!==\"$?\"&&l!==\"$~\"&&l!==\"$!\"||r++;l=d}while(l)}function Jp(r){var i=r.firstChild;for(i&&i.nodeType===10&&(i=i.nextSibling);i;){var l=i;switch(i=i.nextSibling,l.nodeName){case\"HTML\":case\"HEAD\":case\"BODY\":Jp(l),Ya(l);continue;case\"SCRIPT\":case\"STYLE\":continue;case\"LINK\":if(l.rel.toLowerCase()===\"stylesheet\")continue}r.removeChild(l)}}function WO(r,i,l,d){for(;r.nodeType===1;){var p=l;if(r.nodeName.toLowerCase()!==i.toLowerCase()){if(!d&&(r.nodeName!==\"INPUT\"||r.type!==\"hidden\"))break}else if(d){if(!r[lr])switch(i){case\"meta\":if(!r.hasAttribute(\"itemprop\"))break;return r;case\"link\":if(b=r.getAttribute(\"rel\"),b===\"stylesheet\"&&r.hasAttribute(\"data-precedence\"))break;if(b!==p.rel||r.getAttribute(\"href\")!==(p.href==null||p.href===\"\"?null:p.href)||r.getAttribute(\"crossorigin\")!==(p.crossOrigin==null?null:p.crossOrigin)||r.getAttribute(\"title\")!==(p.title==null?null:p.title))break;return r;case\"style\":if(r.hasAttribute(\"data-precedence\"))break;return r;case\"script\":if(b=r.getAttribute(\"src\"),(b!==(p.src==null?null:p.src)||r.getAttribute(\"type\")!==(p.type==null?null:p.type)||r.getAttribute(\"crossorigin\")!==(p.crossOrigin==null?null:p.crossOrigin))&&b&&r.hasAttribute(\"async\")&&!r.hasAttribute(\"itemprop\"))break;return r;default:return r}}else if(i===\"input\"&&r.type===\"hidden\"){var b=p.name==null?null:\"\"+p.name;if(p.type===\"hidden\"&&r.getAttribute(\"name\")===b)return r}else return r;if(r=wa(r.nextSibling),r===null)break}return null}function GO(r,i,l){if(i===\"\")return null;for(;r.nodeType!==3;)if((r.nodeType!==1||r.nodeName!==\"INPUT\"||r.type!==\"hidden\")&&!l||(r=wa(r.nextSibling),r===null))return null;return r}function cS(r,i){for(;r.nodeType!==8;)if((r.nodeType!==1||r.nodeName!==\"INPUT\"||r.type!==\"hidden\")&&!i||(r=wa(r.nextSibling),r===null))return null;return r}function eg(r){return r.data===\"$?\"||r.data===\"$~\"}function tg(r){return r.data===\"$!\"||r.data===\"$?\"&&r.ownerDocument.readyState!==\"loading\"}function YO(r,i){var l=r.ownerDocument;if(r.data===\"$~\")r._reactRetry=i;else if(r.data!==\"$?\"||l.readyState!==\"loading\")i();else{var d=function(){i(),l.removeEventListener(\"DOMContentLoaded\",d)};l.addEventListener(\"DOMContentLoaded\",d),r._reactRetry=d}}function wa(r){for(;r!=null;r=r.nextSibling){var i=r.nodeType;if(i===1||i===3)break;if(i===8){if(i=r.data,i===\"$\"||i===\"$!\"||i===\"$?\"||i===\"$~\"||i===\"&\"||i===\"F!\"||i===\"F\")break;if(i===\"/$\"||i===\"/&\")return null}}return r}var ng=null;function uS(r){r=r.nextSibling;for(var i=0;r;){if(r.nodeType===8){var l=r.data;if(l===\"/$\"||l===\"/&\"){if(i===0)return wa(r.nextSibling);i--}else l!==\"$\"&&l!==\"$!\"&&l!==\"$?\"&&l!==\"$~\"&&l!==\"&\"||i++}r=r.nextSibling}return null}function dS(r){r=r.previousSibling;for(var i=0;r;){if(r.nodeType===8){var l=r.data;if(l===\"$\"||l===\"$!\"||l===\"$?\"||l===\"$~\"||l===\"&\"){if(i===0)return r;i--}else l!==\"/$\"&&l!==\"/&\"||i++}r=r.previousSibling}return null}function fS(r,i,l){switch(i=jf(l),r){case\"html\":if(r=i.documentElement,!r)throw Error(a(452));return r;case\"head\":if(r=i.head,!r)throw Error(a(453));return r;case\"body\":if(r=i.body,!r)throw Error(a(454));return r;default:throw Error(a(451))}}function pu(r){for(var i=r.attributes;i.length;)r.removeAttributeNode(i[0]);Ya(r)}var Sa=new Map,hS=new Set;function zf(r){return typeof r.getRootNode==\"function\"?r.getRootNode():r.nodeType===9?r:r.ownerDocument}var Gi=W.d;W.d={f:XO,r:QO,D:KO,C:ZO,L:JO,m:eD,X:nD,S:tD,M:rD};function XO(){var r=Gi.f(),i=Tf();return r||i}function QO(r){var i=Wr(r);i!==null&&i.tag===5&&i.type===\"form\"?Ax(i):Gi.r(r)}var Xl=typeof document>\"u\"?null:document;function mS(r,i,l){var d=Xl;if(d&&typeof i==\"string\"&&i){var p=Dn(i);p='link[rel=\"'+r+'\"][href=\"'+p+'\"]',typeof l==\"string\"&&(p+='[crossorigin=\"'+l+'\"]'),hS.has(p)||(hS.add(p),r={rel:r,crossOrigin:l,href:i},d.querySelector(p)===null&&(i=d.createElement(\"link\"),ir(i,\"link\",r),Cn(i),d.head.appendChild(i)))}}function KO(r){Gi.D(r),mS(\"dns-prefetch\",r,null)}function ZO(r,i){Gi.C(r,i),mS(\"preconnect\",r,i)}function JO(r,i,l){Gi.L(r,i,l);var d=Xl;if(d&&r&&i){var p='link[rel=\"preload\"][as=\"'+Dn(i)+'\"]';i===\"image\"&&l&&l.imageSrcSet?(p+='[imagesrcset=\"'+Dn(l.imageSrcSet)+'\"]',typeof l.imageSizes==\"string\"&&(p+='[imagesizes=\"'+Dn(l.imageSizes)+'\"]')):p+='[href=\"'+Dn(r)+'\"]';var b=p;switch(i){case\"style\":b=Ql(r);break;case\"script\":b=Kl(r)}Sa.has(b)||(r=y({rel:\"preload\",href:i===\"image\"&&l&&l.imageSrcSet?void 0:r,as:i},l),Sa.set(b,r),d.querySelector(p)!==null||i===\"style\"&&d.querySelector(gu(b))||i===\"script\"&&d.querySelector(vu(b))||(i=d.createElement(\"link\"),ir(i,\"link\",r),Cn(i),d.head.appendChild(i)))}}function eD(r,i){Gi.m(r,i);var l=Xl;if(l&&r){var d=i&&typeof i.as==\"string\"?i.as:\"script\",p='link[rel=\"modulepreload\"][as=\"'+Dn(d)+'\"][href=\"'+Dn(r)+'\"]',b=p;switch(d){case\"audioworklet\":case\"paintworklet\":case\"serviceworker\":case\"sharedworker\":case\"worker\":case\"script\":b=Kl(r)}if(!Sa.has(b)&&(r=y({rel:\"modulepreload\",href:r},i),Sa.set(b,r),l.querySelector(p)===null)){switch(d){case\"audioworklet\":case\"paintworklet\":case\"serviceworker\":case\"sharedworker\":case\"worker\":case\"script\":if(l.querySelector(vu(b)))return}d=l.createElement(\"link\"),ir(d,\"link\",r),Cn(d),l.head.appendChild(d)}}}function tD(r,i,l){Gi.S(r,i,l);var d=Xl;if(d&&r){var p=yr(d).hoistableStyles,b=Ql(r);i=i||\"default\";var E=p.get(b);if(!E){var H={loading:0,preload:null};if(E=d.querySelector(gu(b)))H.loading=5;else{r=y({rel:\"stylesheet\",href:r,\"data-precedence\":i},l),(l=Sa.get(b))&&rg(r,l);var Q=E=d.createElement(\"link\");Cn(Q),ir(Q,\"link\",r),Q._p=new Promise(function(de,we){Q.onload=de,Q.onerror=we}),Q.addEventListener(\"load\",function(){H.loading|=1}),Q.addEventListener(\"error\",function(){H.loading|=2}),H.loading|=4,Pf(E,i,d)}E={type:\"stylesheet\",instance:E,count:1,state:H},p.set(b,E)}}}function nD(r,i){Gi.X(r,i);var l=Xl;if(l&&r){var d=yr(l).hoistableScripts,p=Kl(r),b=d.get(p);b||(b=l.querySelector(vu(p)),b||(r=y({src:r,async:!0},i),(i=Sa.get(p))&&ag(r,i),b=l.createElement(\"script\"),Cn(b),ir(b,\"link\",r),l.head.appendChild(b)),b={type:\"script\",instance:b,count:1,state:null},d.set(p,b))}}function rD(r,i){Gi.M(r,i);var l=Xl;if(l&&r){var d=yr(l).hoistableScripts,p=Kl(r),b=d.get(p);b||(b=l.querySelector(vu(p)),b||(r=y({src:r,async:!0,type:\"module\"},i),(i=Sa.get(p))&&ag(r,i),b=l.createElement(\"script\"),Cn(b),ir(b,\"link\",r),l.head.appendChild(b)),b={type:\"script\",instance:b,count:1,state:null},d.set(p,b))}}function pS(r,i,l,d){var p=(p=oe.current)?zf(p):null;if(!p)throw Error(a(446));switch(r){case\"meta\":case\"title\":return null;case\"style\":return typeof l.precedence==\"string\"&&typeof l.href==\"string\"?(i=Ql(l.href),l=yr(p).hoistableStyles,d=l.get(i),d||(d={type:\"style\",instance:null,count:0,state:null},l.set(i,d)),d):{type:\"void\",instance:null,count:0,state:null};case\"link\":if(l.rel===\"stylesheet\"&&typeof l.href==\"string\"&&typeof l.precedence==\"string\"){r=Ql(l.href);var b=yr(p).hoistableStyles,E=b.get(r);if(E||(p=p.ownerDocument||p,E={type:\"stylesheet\",instance:null,count:0,state:{loading:0,preload:null}},b.set(r,E),(b=p.querySelector(gu(r)))&&!b._p&&(E.instance=b,E.state.loading=5),Sa.has(r)||(l={rel:\"preload\",as:\"style\",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},Sa.set(r,l),b||aD(p,r,l,E.state))),i&&d===null)throw Error(a(528,\"\"));return E}if(i&&d!==null)throw Error(a(529,\"\"));return null;case\"script\":return i=l.async,l=l.src,typeof l==\"string\"&&i&&typeof i!=\"function\"&&typeof i!=\"symbol\"?(i=Kl(l),l=yr(p).hoistableScripts,d=l.get(i),d||(d={type:\"script\",instance:null,count:0,state:null},l.set(i,d)),d):{type:\"void\",instance:null,count:0,state:null};default:throw Error(a(444,r))}}function Ql(r){return'href=\"'+Dn(r)+'\"'}function gu(r){return'link[rel=\"stylesheet\"]['+r+\"]\"}function gS(r){return y({},r,{\"data-precedence\":r.precedence,precedence:null})}function aD(r,i,l,d){r.querySelector('link[rel=\"preload\"][as=\"style\"]['+i+\"]\")?d.loading=1:(i=r.createElement(\"link\"),d.preload=i,i.addEventListener(\"load\",function(){return d.loading|=1}),i.addEventListener(\"error\",function(){return d.loading|=2}),ir(i,\"link\",l),Cn(i),r.head.appendChild(i))}function Kl(r){return'[src=\"'+Dn(r)+'\"]'}function vu(r){return\"script[async]\"+r}function vS(r,i,l){if(i.count++,i.instance===null)switch(i.type){case\"style\":var d=r.querySelector('style[data-href~=\"'+Dn(l.href)+'\"]');if(d)return i.instance=d,Cn(d),d;var p=y({},l,{\"data-href\":l.href,\"data-precedence\":l.precedence,href:null,precedence:null});return d=(r.ownerDocument||r).createElement(\"style\"),Cn(d),ir(d,\"style\",p),Pf(d,l.precedence,r),i.instance=d;case\"stylesheet\":p=Ql(l.href);var b=r.querySelector(gu(p));if(b)return i.state.loading|=4,i.instance=b,Cn(b),b;d=gS(l),(p=Sa.get(p))&&rg(d,p),b=(r.ownerDocument||r).createElement(\"link\"),Cn(b);var E=b;return E._p=new Promise(function(H,Q){E.onload=H,E.onerror=Q}),ir(b,\"link\",d),i.state.loading|=4,Pf(b,l.precedence,r),i.instance=b;case\"script\":return b=Kl(l.src),(p=r.querySelector(vu(b)))?(i.instance=p,Cn(p),p):(d=l,(p=Sa.get(b))&&(d=y({},l),ag(d,p)),r=r.ownerDocument||r,p=r.createElement(\"script\"),Cn(p),ir(p,\"link\",d),r.head.appendChild(p),i.instance=p);case\"void\":return null;default:throw Error(a(443,i.type))}else i.type===\"stylesheet\"&&(i.state.loading&4)===0&&(d=i.instance,i.state.loading|=4,Pf(d,l.precedence,r));return i.instance}function Pf(r,i,l){for(var d=l.querySelectorAll('link[rel=\"stylesheet\"][data-precedence],style[data-precedence]'),p=d.length?d[d.length-1]:null,b=p,E=0;E<d.length;E++){var H=d[E];if(H.dataset.precedence===i)b=H;else if(b!==p)break}b?b.parentNode.insertBefore(r,b.nextSibling):(i=l.nodeType===9?l.head:l,i.insertBefore(r,i.firstChild))}function rg(r,i){r.crossOrigin==null&&(r.crossOrigin=i.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=i.referrerPolicy),r.title==null&&(r.title=i.title)}function ag(r,i){r.crossOrigin==null&&(r.crossOrigin=i.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=i.referrerPolicy),r.integrity==null&&(r.integrity=i.integrity)}var Lf=null;function yS(r,i,l){if(Lf===null){var d=new Map,p=Lf=new Map;p.set(l,d)}else p=Lf,d=p.get(l),d||(d=new Map,p.set(l,d));if(d.has(r))return d;for(d.set(r,null),l=l.getElementsByTagName(r),p=0;p<l.length;p++){var b=l[p];if(!(b[lr]||b[Tn]||r===\"link\"&&b.getAttribute(\"rel\")===\"stylesheet\")&&b.namespaceURI!==\"http://www.w3.org/2000/svg\"){var E=b.getAttribute(i)||\"\";E=r+E;var H=d.get(E);H?H.push(b):d.set(E,[b])}}return d}function bS(r,i,l){r=r.ownerDocument||r,r.head.insertBefore(l,i===\"title\"?r.querySelector(\"head > title\"):null)}function iD(r,i,l){if(l===1||i.itemProp!=null)return!1;switch(r){case\"meta\":case\"title\":return!0;case\"style\":if(typeof i.precedence!=\"string\"||typeof i.href!=\"string\"||i.href===\"\")break;return!0;case\"link\":if(typeof i.rel!=\"string\"||typeof i.href!=\"string\"||i.href===\"\"||i.onLoad||i.onError)break;return i.rel===\"stylesheet\"?(r=i.disabled,typeof i.precedence==\"string\"&&r==null):!0;case\"script\":if(i.async&&typeof i.async!=\"function\"&&typeof i.async!=\"symbol\"&&!i.onLoad&&!i.onError&&i.src&&typeof i.src==\"string\")return!0}return!1}function xS(r){return!(r.type===\"stylesheet\"&&(r.state.loading&3)===0)}function oD(r,i,l,d){if(l.type===\"stylesheet\"&&(typeof d.media!=\"string\"||matchMedia(d.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var p=Ql(d.href),b=i.querySelector(gu(p));if(b){i=b._p,i!==null&&typeof i==\"object\"&&typeof i.then==\"function\"&&(r.count++,r=If.bind(r),i.then(r,r)),l.state.loading|=4,l.instance=b,Cn(b);return}b=i.ownerDocument||i,d=gS(d),(p=Sa.get(p))&&rg(d,p),b=b.createElement(\"link\"),Cn(b);var E=b;E._p=new Promise(function(H,Q){E.onload=H,E.onerror=Q}),ir(b,\"link\",d),l.instance=b}r.stylesheets===null&&(r.stylesheets=new Map),r.stylesheets.set(l,i),(i=l.state.preload)&&(l.state.loading&3)===0&&(r.count++,l=If.bind(r),i.addEventListener(\"load\",l),i.addEventListener(\"error\",l))}}var ig=0;function sD(r,i){return r.stylesheets&&r.count===0&&qf(r,r.stylesheets),0<r.count||0<r.imgCount?function(l){var d=setTimeout(function(){if(r.stylesheets&&qf(r,r.stylesheets),r.unsuspend){var b=r.unsuspend;r.unsuspend=null,b()}},6e4+i);0<r.imgBytes&&ig===0&&(ig=62500*FO());var p=setTimeout(function(){if(r.waitingForImages=!1,r.count===0&&(r.stylesheets&&qf(r,r.stylesheets),r.unsuspend)){var b=r.unsuspend;r.unsuspend=null,b()}},(r.imgBytes>ig?50:800)+i);return r.unsuspend=l,function(){r.unsuspend=null,clearTimeout(d),clearTimeout(p)}}:null}function If(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)qf(this,this.stylesheets);else if(this.unsuspend){var r=this.unsuspend;this.unsuspend=null,r()}}}var Hf=null;function qf(r,i){r.stylesheets=null,r.unsuspend!==null&&(r.count++,Hf=new Map,i.forEach(lD,r),Hf=null,If.call(r))}function lD(r,i){if(!(i.state.loading&4)){var l=Hf.get(r);if(l)var d=l.get(null);else{l=new Map,Hf.set(r,l);for(var p=r.querySelectorAll(\"link[data-precedence],style[data-precedence]\"),b=0;b<p.length;b++){var E=p[b];(E.nodeName===\"LINK\"||E.getAttribute(\"media\")!==\"not all\")&&(l.set(E.dataset.precedence,E),d=E)}d&&l.set(null,d)}p=i.instance,E=p.getAttribute(\"data-precedence\"),b=l.get(E)||d,b===d&&l.set(null,p),l.set(E,p),this.count++,d=If.bind(this),p.addEventListener(\"load\",d),p.addEventListener(\"error\",d),b?b.parentNode.insertBefore(p,b.nextSibling):(r=r.nodeType===9?r.head:r,r.insertBefore(p,r.firstChild)),i.state.loading|=4}}var yu={$$typeof:M,Provider:null,Consumer:null,_currentValue:U,_currentValue2:U,_threadCount:0};function cD(r,i,l,d,p,b,E,H,Q){this.tag=1,this.containerInfo=r,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=rt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=rt(0),this.hiddenUpdates=rt(null),this.identifierPrefix=d,this.onUncaughtError=p,this.onCaughtError=b,this.onRecoverableError=E,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=Q,this.incompleteTransitions=new Map}function wS(r,i,l,d,p,b,E,H,Q,de,we,Te){return r=new cD(r,i,l,E,Q,de,we,Te,H),i=1,b===!0&&(i|=24),b=Tr(3,null,null,i),r.current=b,b.stateNode=r,i=Im(),i.refCount++,r.pooledCache=i,i.refCount++,b.memoizedState={element:d,isDehydrated:l,cache:i},$m(b),r}function SS(r){return r?(r=So,r):So}function CS(r,i,l,d,p,b){p=SS(p),d.context===null?d.context=p:d.pendingContext=p,d=To(i),d.payload={element:l},b=b===void 0?null:b,b!==null&&(d.callback=b),l=Mo(r,d,i),l!==null&&(Hr(l,r,i),Qc(l,r,i))}function RS(r,i){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var l=r.retryLane;r.retryLane=l!==0&&l<i?l:i}}function og(r,i){RS(r,i),(r=r.alternate)&&RS(r,i)}function ES(r){if(r.tag===13||r.tag===31){var i=Ni(r,67108864);i!==null&&Hr(i,r,67108864),og(r,67108864)}}function TS(r){if(r.tag===13||r.tag===31){var i=ia();i=fn(i);var l=Ni(r,i);l!==null&&Hr(l,r,i),og(r,i)}}var Ff=!0;function uD(r,i,l,d){var p=$.T;$.T=null;var b=W.p;try{W.p=2,sg(r,i,l,d)}finally{W.p=b,$.T=p}}function dD(r,i,l,d){var p=$.T;$.T=null;var b=W.p;try{W.p=8,sg(r,i,l,d)}finally{W.p=b,$.T=p}}function sg(r,i,l,d){if(Ff){var p=lg(d);if(p===null)Gp(r,i,d,$f,l),kS(r,d);else if(hD(p,r,i,l,d))d.stopPropagation();else if(kS(r,d),i&4&&-1<fD.indexOf(r)){for(;p!==null;){var b=Wr(p);if(b!==null)switch(b.tag){case 3:if(b=b.stateNode,b.current.memoizedState.isDehydrated){var E=Lt(b.pendingLanes);if(E!==0){var H=b;for(H.pendingLanes|=2,H.entangledLanes|=2;E;){var Q=1<<31-sn(E);H.entanglements[1]|=Q,E&=~Q}ni(b),(Ut&6)===0&&(Rf=Ge()+500,fu(0))}}break;case 31:case 13:H=Ni(b,2),H!==null&&Hr(H,b,2),Tf(),og(b,2)}if(b=lg(d),b===null&&Gp(r,i,d,$f,l),b===p)break;p=b}p!==null&&d.stopPropagation()}else Gp(r,i,d,null,l)}}function lg(r){return r=bs(r),cg(r)}var $f=null;function cg(r){if($f=null,r=Vr(r),r!==null){var i=s(r);if(i===null)r=null;else{var l=i.tag;if(l===13){if(r=c(i),r!==null)return r;r=null}else if(l===31){if(r=u(i),r!==null)return r;r=null}else if(l===3){if(i.stateNode.current.memoizedState.isDehydrated)return i.tag===3?i.stateNode.containerInfo:null;r=null}else i!==r&&(r=null)}}return $f=r,null}function MS(r){switch(r){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(Xe()){case Pe:return 2;case Mt:return 8;case ut:case lt:return 32;case xn:return 268435456;default:return 32}default:return 32}}var ug=!1,Io=null,Ho=null,qo=null,bu=new Map,xu=new Map,Fo=[],fD=\"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 kS(r,i){switch(r){case\"focusin\":case\"focusout\":Io=null;break;case\"dragenter\":case\"dragleave\":Ho=null;break;case\"mouseover\":case\"mouseout\":qo=null;break;case\"pointerover\":case\"pointerout\":bu.delete(i.pointerId);break;case\"gotpointercapture\":case\"lostpointercapture\":xu.delete(i.pointerId)}}function wu(r,i,l,d,p,b){return r===null||r.nativeEvent!==b?(r={blockedOn:i,domEventName:l,eventSystemFlags:d,nativeEvent:b,targetContainers:[p]},i!==null&&(i=Wr(i),i!==null&&ES(i)),r):(r.eventSystemFlags|=d,i=r.targetContainers,p!==null&&i.indexOf(p)===-1&&i.push(p),r)}function hD(r,i,l,d,p){switch(i){case\"focusin\":return Io=wu(Io,r,i,l,d,p),!0;case\"dragenter\":return Ho=wu(Ho,r,i,l,d,p),!0;case\"mouseover\":return qo=wu(qo,r,i,l,d,p),!0;case\"pointerover\":var b=p.pointerId;return bu.set(b,wu(bu.get(b)||null,r,i,l,d,p)),!0;case\"gotpointercapture\":return b=p.pointerId,xu.set(b,wu(xu.get(b)||null,r,i,l,d,p)),!0}return!1}function _S(r){var i=Vr(r.target);if(i!==null){var l=s(i);if(l!==null){if(i=l.tag,i===13){if(i=c(l),i!==null){r.blockedOn=i,En(r.priority,function(){TS(l)});return}}else if(i===31){if(i=u(l),i!==null){r.blockedOn=i,En(r.priority,function(){TS(l)});return}}else if(i===3&&l.stateNode.current.memoizedState.isDehydrated){r.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}r.blockedOn=null}function Bf(r){if(r.blockedOn!==null)return!1;for(var i=r.targetContainers;0<i.length;){var l=lg(r.nativeEvent);if(l===null){l=r.nativeEvent;var d=new l.constructor(l.type,l);wi=d,l.target.dispatchEvent(d),wi=null}else return i=Wr(l),i!==null&&ES(i),r.blockedOn=l,!1;i.shift()}return!0}function AS(r,i,l){Bf(r)&&l.delete(i)}function mD(){ug=!1,Io!==null&&Bf(Io)&&(Io=null),Ho!==null&&Bf(Ho)&&(Ho=null),qo!==null&&Bf(qo)&&(qo=null),bu.forEach(AS),xu.forEach(AS)}function Uf(r,i){r.blockedOn===i&&(r.blockedOn=null,ug||(ug=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,mD)))}var Vf=null;function NS(r){Vf!==r&&(Vf=r,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Vf===r&&(Vf=null);for(var i=0;i<r.length;i+=3){var l=r[i],d=r[i+1],p=r[i+2];if(typeof d!=\"function\"){if(cg(d||l)===null)continue;break}var b=Wr(l);b!==null&&(r.splice(i,3),i-=3,lp(b,{pending:!0,data:p,method:l.method,action:d},d,p))}}))}function Zl(r){function i(Q){return Uf(Q,r)}Io!==null&&Uf(Io,r),Ho!==null&&Uf(Ho,r),qo!==null&&Uf(qo,r),bu.forEach(i),xu.forEach(i);for(var l=0;l<Fo.length;l++){var d=Fo[l];d.blockedOn===r&&(d.blockedOn=null)}for(;0<Fo.length&&(l=Fo[0],l.blockedOn===null);)_S(l),l.blockedOn===null&&Fo.shift();if(l=(r.ownerDocument||r).$$reactFormReplay,l!=null)for(d=0;d<l.length;d+=3){var p=l[d],b=l[d+1],E=p[On]||null;if(typeof b==\"function\")E||NS(l);else if(E){var H=null;if(b&&b.hasAttribute(\"formAction\")){if(p=b,E=b[On]||null)H=E.formAction;else if(cg(p)!==null)continue}else H=E.action;typeof H==\"function\"?l[d+1]=H:(l.splice(d,3),d-=3),NS(l)}}}function OS(){function r(b){b.canIntercept&&b.info===\"react-transition\"&&b.intercept({handler:function(){return new Promise(function(E){return p=E})},focusReset:\"manual\",scroll:\"manual\"})}function i(){p!==null&&(p(),p=null),d||setTimeout(l,20)}function l(){if(!d&&!navigation.transition){var b=navigation.currentEntry;b&&b.url!=null&&navigation.navigate(b.url,{state:b.getState(),info:\"react-transition\",history:\"replace\"})}}if(typeof navigation==\"object\"){var d=!1,p=null;return navigation.addEventListener(\"navigate\",r),navigation.addEventListener(\"navigatesuccess\",i),navigation.addEventListener(\"navigateerror\",i),setTimeout(l,100),function(){d=!0,navigation.removeEventListener(\"navigate\",r),navigation.removeEventListener(\"navigatesuccess\",i),navigation.removeEventListener(\"navigateerror\",i),p!==null&&(p(),p=null)}}}function dg(r){this._internalRoot=r}Wf.prototype.render=dg.prototype.render=function(r){var i=this._internalRoot;if(i===null)throw Error(a(409));var l=i.current,d=ia();CS(l,d,r,i,null,null)},Wf.prototype.unmount=dg.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var i=r.containerInfo;CS(r.current,2,null,r,null,null),Tf(),i[sr]=null}};function Wf(r){this._internalRoot=r}Wf.prototype.unstable_scheduleHydration=function(r){if(r){var i=wn();r={blockedOn:null,target:r,priority:i};for(var l=0;l<Fo.length&&i!==0&&i<Fo[l].priority;l++);Fo.splice(l,0,r),l===0&&_S(r)}};var DS=t.version;if(DS!==\"19.2.4\")throw Error(a(527,DS,\"19.2.4\"));W.findDOMNode=function(r){var i=r._reactInternals;if(i===void 0)throw typeof r.render==\"function\"?Error(a(188)):(r=Object.keys(r).join(\",\"),Error(a(268,r)));return r=h(i),r=r!==null?v(r):null,r=r===null?null:r.stateNode,r};var pD={bundleType:0,version:\"19.2.4\",rendererPackageName:\"react-dom\",currentDispatcherRef:$,reconcilerVersion:\"19.2.4\"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<\"u\"){var Gf=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Gf.isDisabled&&Gf.supportsFiber)try{mt=Gf.inject(pD),zt=Gf}catch{}}return Cu.createRoot=function(r,i){if(!o(r))throw Error(a(299));var l=!1,d=\"\",p=qx,b=Fx,E=$x;return i!=null&&(i.unstable_strictMode===!0&&(l=!0),i.identifierPrefix!==void 0&&(d=i.identifierPrefix),i.onUncaughtError!==void 0&&(p=i.onUncaughtError),i.onCaughtError!==void 0&&(b=i.onCaughtError),i.onRecoverableError!==void 0&&(E=i.onRecoverableError)),i=wS(r,1,!1,null,null,l,d,null,p,b,E,OS),r[sr]=i.current,Wp(r),new dg(i)},Cu.hydrateRoot=function(r,i,l){if(!o(r))throw Error(a(299));var d=!1,p=\"\",b=qx,E=Fx,H=$x,Q=null;return l!=null&&(l.unstable_strictMode===!0&&(d=!0),l.identifierPrefix!==void 0&&(p=l.identifierPrefix),l.onUncaughtError!==void 0&&(b=l.onUncaughtError),l.onCaughtError!==void 0&&(E=l.onCaughtError),l.onRecoverableError!==void 0&&(H=l.onRecoverableError),l.formState!==void 0&&(Q=l.formState)),i=wS(r,1,!0,i,l??null,d,p,Q,b,E,H,OS),i.context=SS(null),l=i.current,d=ia(),d=fn(d),p=To(d),p.callback=null,Mo(l,p,d),l=d,i.current.lanes=l,Bt(i,l),ni(i),r[sr]=i.current,Wp(r),new Wf(i)},Cu.version=\"19.2.4\",Cu}var BS;function ED(){if(BS)return mg.exports;BS=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>\"u\"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=\"function\"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),mg.exports=RD(),mg.exports}var TD=ED();const MD=Ua(TD);var ii=[],Ra=[],kD=Uint8Array,yg=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";for(var Jl=0,_D=yg.length;Jl<_D;++Jl)ii[Jl]=yg[Jl],Ra[yg.charCodeAt(Jl)]=Jl;Ra[45]=62;Ra[95]=63;function AD(e){var t=e.length;if(t%4>0)throw new Error(\"Invalid string. Length must be a multiple of 4\");var n=e.indexOf(\"=\");n===-1&&(n=t);var a=n===t?0:4-n%4;return[n,a]}function ND(e,t,n){return(t+n)*3/4-n}function id(e){var t,n=AD(e),a=n[0],o=n[1],s=new kD(ND(e,a,o)),c=0,u=o>0?a-4:a,f;for(f=0;f<u;f+=4)t=Ra[e.charCodeAt(f)]<<18|Ra[e.charCodeAt(f+1)]<<12|Ra[e.charCodeAt(f+2)]<<6|Ra[e.charCodeAt(f+3)],s[c++]=t>>16&255,s[c++]=t>>8&255,s[c++]=t&255;return o===2&&(t=Ra[e.charCodeAt(f)]<<2|Ra[e.charCodeAt(f+1)]>>4,s[c++]=t&255),o===1&&(t=Ra[e.charCodeAt(f)]<<10|Ra[e.charCodeAt(f+1)]<<4|Ra[e.charCodeAt(f+2)]>>2,s[c++]=t>>8&255,s[c++]=t&255),s}function OD(e){return ii[e>>18&63]+ii[e>>12&63]+ii[e>>6&63]+ii[e&63]}function DD(e,t,n){for(var a,o=[],s=t;s<n;s+=3)a=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(e[s+2]&255),o.push(OD(a));return o.join(\"\")}function od(e){for(var t,n=e.length,a=n%3,o=[],s=16383,c=0,u=n-a;c<u;c+=s)o.push(DD(e,c,c+s>u?u:c+s));return a===1?(t=e[n-1],o.push(ii[t>>2]+ii[t<<4&63]+\"==\")):a===2&&(t=(e[n-2]<<8)+e[n-1],o.push(ii[t>>10]+ii[t>>4&63]+ii[t<<2&63]+\"=\")),o.join(\"\")}function Qi(e){if(e===void 0)return{};if(!oM(e))throw new Error(`The arguments to a Convex function must be an object. Received: ${e}`);return e}function jD(e){if(typeof e>\"u\")throw new Error(\"Client created with undefined deployment address. If you used an environment variable, check that it's set.\");if(typeof e!=\"string\")throw new Error(`Invalid deployment address: found ${e}\".`);if(!(e.startsWith(\"http:\")||e.startsWith(\"https:\")))throw new Error(`Invalid deployment address: Must start with \"https://\" or \"http://\". Found \"${e}\".`);try{new URL(e)}catch{throw new Error(`Invalid deployment address: \"${e}\" is not a valid URL. If you believe this URL is correct, use the \\`skipConvexDeploymentUrlCheck\\` option to bypass this.`)}if(e.endsWith(\".convex.site\"))throw new Error(`Invalid deployment address: \"${e}\" ends with .convex.site, which is used for HTTP Actions. Convex deployment URLs typically end with .convex.cloud? If you believe this URL is correct, use the \\`skipConvexDeploymentUrlCheck\\` option to bypass this.`)}function oM(e){const t=typeof e==\"object\",n=Object.getPrototypeOf(e),a=n===null||n===Object.prototype||n?.constructor?.name===\"Object\";return t&&a}const sM=!0,Sc=BigInt(\"-9223372036854775808\"),Eb=BigInt(\"9223372036854775807\"),Q0=BigInt(\"0\"),zD=BigInt(\"8\"),PD=BigInt(\"256\");function lM(e){return Number.isNaN(e)||!Number.isFinite(e)||Object.is(e,-0)}function LD(e){e<Q0&&(e-=Sc+Sc);let t=e.toString(16);t.length%2===1&&(t=\"0\"+t);const n=new Uint8Array(new ArrayBuffer(8));let a=0;for(const o of t.match(/.{2}/g).reverse())n.set([parseInt(o,16)],a++),e>>=zD;return od(n)}function ID(e){const t=id(e);if(t.byteLength!==8)throw new Error(`Received ${t.byteLength} bytes, expected 8 for $integer`);let n=Q0,a=Q0;for(const o of t)n+=BigInt(o)*PD**a,a++;return n>Eb&&(n+=Sc+Sc),n}function HD(e){if(e<Sc||Eb<e)throw new Error(`BigInt ${e} does not fit into a 64-bit signed integer.`);const t=new ArrayBuffer(8);return new DataView(t).setBigInt64(0,e,!0),od(new Uint8Array(t))}function qD(e){const t=id(e);if(t.byteLength!==8)throw new Error(`Received ${t.byteLength} bytes, expected 8 for $integer`);return new DataView(t.buffer).getBigInt64(0,!0)}const FD=DataView.prototype.setBigInt64?HD:LD,$D=DataView.prototype.getBigInt64?qD:ID,US=1024;function cM(e){if(e.length>US)throw new Error(`Field name ${e} exceeds maximum field name length ${US}.`);if(e.startsWith(\"$\"))throw new Error(`Field name ${e} starts with a '$', which is reserved.`);for(let t=0;t<e.length;t+=1){const n=e.charCodeAt(t);if(n<32||n>=127)throw new Error(`Field name ${e} has invalid character '${e[t]}': Field names can only contain non-control ASCII characters`)}}function Cc(e){if(e===null||typeof e==\"boolean\"||typeof e==\"number\"||typeof e==\"string\")return e;if(Array.isArray(e))return e.map(a=>Cc(a));if(typeof e!=\"object\")throw new Error(`Unexpected type of ${e}`);const t=Object.entries(e);if(t.length===1){const a=t[0][0];if(a===\"$bytes\"){if(typeof e.$bytes!=\"string\")throw new Error(`Malformed $bytes field on ${e}`);return id(e.$bytes).buffer}if(a===\"$integer\"){if(typeof e.$integer!=\"string\")throw new Error(`Malformed $integer field on ${e}`);return $D(e.$integer)}if(a===\"$float\"){if(typeof e.$float!=\"string\")throw new Error(`Malformed $float field on ${e}`);const o=id(e.$float);if(o.byteLength!==8)throw new Error(`Received ${o.byteLength} bytes, expected 8 for $float`);const c=new DataView(o.buffer).getFloat64(0,sM);if(!lM(c))throw new Error(`Float ${c} should be encoded as a number`);return c}if(a===\"$set\")throw new Error(\"Received a Set which is no longer supported as a Convex type.\");if(a===\"$map\")throw new Error(\"Received a Map which is no longer supported as a Convex type.\")}const n={};for(const[a,o]of Object.entries(e))cM(a),n[a]=Cc(o);return n}const VS=16384;function Xu(e){const t=JSON.stringify(e,(n,a)=>a===void 0?\"undefined\":typeof a==\"bigint\"?`${a.toString()}n`:a);if(t.length>VS){const n=\"[...truncated]\";let a=VS-n.length;const o=t.codePointAt(a-1);return o!==void 0&&o>65535&&(a-=1),t.substring(0,a)+n}return t}function K0(e,t,n,a){if(e===void 0){const c=n&&` (present at path ${n} in original object ${Xu(t)})`;throw new Error(`undefined is not a valid Convex value${c}. To learn about Convex's supported types, see https://docs.convex.dev/using/types.`)}if(e===null)return e;if(typeof e==\"bigint\"){if(e<Sc||Eb<e)throw new Error(`BigInt ${e} does not fit into a 64-bit signed integer.`);return{$integer:FD(e)}}if(typeof e==\"number\")if(lM(e)){const c=new ArrayBuffer(8);return new DataView(c).setFloat64(0,e,sM),{$float:od(new Uint8Array(c))}}else return e;if(typeof e==\"boolean\"||typeof e==\"string\")return e;if(e instanceof ArrayBuffer)return{$bytes:od(new Uint8Array(e))};if(Array.isArray(e))return e.map((c,u)=>K0(c,t,n+`[${u}]`));if(e instanceof Set)throw new Error(bg(n,\"Set\",[...e],t));if(e instanceof Map)throw new Error(bg(n,\"Map\",[...e],t));if(!oM(e)){const c=e?.constructor?.name,u=c?`${c} `:\"\";throw new Error(bg(n,u,e,t))}const o={},s=Object.entries(e);s.sort(([c,u],[f,h])=>c===f?0:c<f?-1:1);for(const[c,u]of s)u!==void 0&&(cM(c),o[c]=K0(u,t,n+`.${c}`));return o}function bg(e,t,n,a){return e?`${t}${Xu(n)} is not a supported Convex type (present at path ${e} in original object ${Xu(a)}). To learn about Convex's supported types, see https://docs.convex.dev/using/types.`:`${t}${Xu(n)} is not a supported Convex type.`}function fi(e){return K0(e,e,\"\")}var BD=Object.defineProperty,UD=(e,t,n)=>t in e?BD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,xg=(e,t,n)=>UD(e,typeof t!=\"symbol\"?t+\"\":t,n),WS,GS;const VD=Symbol.for(\"ConvexError\");class Z0 extends(GS=Error,WS=VD,GS){constructor(t){super(typeof t==\"string\"?t:Xu(t)),xg(this,\"name\",\"ConvexError\"),xg(this,\"data\"),xg(this,WS,!0),this.data=t}}const uM=()=>Array.from({length:4},()=>0);uM();uM();const YS=\"1.32.0\";var WD=Object.defineProperty,GD=(e,t,n)=>t in e?WD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,XS=(e,t,n)=>GD(e,typeof t!=\"symbol\"?t+\"\":t,n);const YD=\"color:rgb(0, 145, 255)\";function dM(e){switch(e){case\"query\":return\"Q\";case\"mutation\":return\"M\";case\"action\":return\"A\";case\"any\":return\"?\"}}class fM{constructor(t){XS(this,\"_onLogLineFuncs\"),XS(this,\"_verbose\"),this._onLogLineFuncs={},this._verbose=t.verbose}addLogLineListener(t){let n=Math.random().toString(36).substring(2,15);for(let a=0;a<10&&this._onLogLineFuncs[n]!==void 0;a++)n=Math.random().toString(36).substring(2,15);return this._onLogLineFuncs[n]=t,()=>{delete this._onLogLineFuncs[n]}}logVerbose(...t){if(this._verbose)for(const n of Object.values(this._onLogLineFuncs))n(\"debug\",`${new Date().toISOString()}`,...t)}log(...t){for(const n of Object.values(this._onLogLineFuncs))n(\"info\",...t)}warn(...t){for(const n of Object.values(this._onLogLineFuncs))n(\"warn\",...t)}error(...t){for(const n of Object.values(this._onLogLineFuncs))n(\"error\",...t)}}function hM(e){const t=new fM(e);return t.addLogLineListener((n,...a)=>{switch(n){case\"debug\":console.debug(...a);break;case\"info\":console.log(...a);break;case\"warn\":console.warn(...a);break;case\"error\":console.error(...a);break;default:console.log(...a)}}),t}function mM(e){return new fM(e)}function Sh(e,t,n,a,o){const s=dM(n);if(typeof o==\"object\"&&(o=`ConvexError ${JSON.stringify(o.errorData,null,2)}`),t===\"info\"){const c=o.match(/^\\[.*?\\] /);if(c===null){e.error(`[CONVEX ${s}(${a})] Could not parse console.log`);return}const u=o.slice(1,c[0].length-2),f=o.slice(c[0].length);e.log(`%c[CONVEX ${s}(${a})] [${u}]`,YD,f)}else e.error(`[CONVEX ${s}(${a})] ${o}`)}function XD(e,t){const n=`[CONVEX FATAL ERROR] ${t}`;return e.error(n),new Error(n)}function fc(e,t,n){return`[CONVEX ${dM(e)}(${t})] ${n.errorMessage}\n Called by client`}function J0(e,t){return t.data=e.errorData,t}function nl(e){const t=e.split(\":\");let n,a;return t.length===1?(n=t[0],a=\"default\"):(n=t.slice(0,t.length-1).join(\":\"),a=t[t.length-1]),n.endsWith(\".js\")&&(n=n.slice(0,-3)),`${n}:${a}`}function el(e,t){return JSON.stringify({udfPath:nl(e),args:fi(t)})}function QS(e,t,n){const{initialNumItems:a,id:o}=n;return JSON.stringify({type:\"paginated\",udfPath:nl(e),args:fi(t),options:fi({initialNumItems:a,id:o})})}var QD=Object.defineProperty,KD=(e,t,n)=>t in e?QD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ri=(e,t,n)=>KD(e,typeof t!=\"symbol\"?t+\"\":t,n);class ZD{constructor(){ri(this,\"nextQueryId\"),ri(this,\"querySetVersion\"),ri(this,\"querySet\"),ri(this,\"queryIdToToken\"),ri(this,\"identityVersion\"),ri(this,\"auth\"),ri(this,\"outstandingQueriesOlderThanRestart\"),ri(this,\"outstandingAuthOlderThanRestart\"),ri(this,\"paused\"),ri(this,\"pendingQuerySetModifications\"),this.nextQueryId=0,this.querySetVersion=0,this.identityVersion=0,this.querySet=new Map,this.queryIdToToken=new Map,this.outstandingQueriesOlderThanRestart=new Set,this.outstandingAuthOlderThanRestart=!1,this.paused=!1,this.pendingQuerySetModifications=new Map}hasSyncedPastLastReconnect(){return this.outstandingQueriesOlderThanRestart.size===0&&!this.outstandingAuthOlderThanRestart}markAuthCompletion(){this.outstandingAuthOlderThanRestart=!1}subscribe(t,n,a,o){const s=nl(t),c=el(s,n),u=this.querySet.get(c);if(u!==void 0)return u.numSubscribers+=1,{queryToken:c,modification:null,unsubscribe:()=>this.removeSubscriber(c)};{const f=this.nextQueryId++,h={id:f,canonicalizedUdfPath:s,args:n,numSubscribers:1,journal:a,componentPath:o};this.querySet.set(c,h),this.queryIdToToken.set(f,c);const v=this.querySetVersion,y=this.querySetVersion+1,x={type:\"Add\",queryId:f,udfPath:s,args:[fi(n)],journal:a,componentPath:o};return this.paused?this.pendingQuerySetModifications.set(f,x):this.querySetVersion=y,{queryToken:c,modification:{type:\"ModifyQuerySet\",baseVersion:v,newVersion:y,modifications:[x]},unsubscribe:()=>this.removeSubscriber(c)}}}transition(t){for(const n of t.modifications)switch(n.type){case\"QueryUpdated\":case\"QueryFailed\":{this.outstandingQueriesOlderThanRestart.delete(n.queryId);const a=n.journal;if(a!==void 0){const o=this.queryIdToToken.get(n.queryId);o!==void 0&&(this.querySet.get(o).journal=a)}break}case\"QueryRemoved\":{this.outstandingQueriesOlderThanRestart.delete(n.queryId);break}default:throw new Error(`Invalid modification ${n.type}`)}}queryId(t,n){const a=nl(t),o=el(a,n),s=this.querySet.get(o);return s!==void 0?s.id:null}isCurrentOrNewerAuthVersion(t){return t>=this.identityVersion}getAuth(){return this.auth}setAuth(t){this.auth={tokenType:\"User\",value:t};const n=this.identityVersion;return this.paused||(this.identityVersion=n+1),{type:\"Authenticate\",baseVersion:n,...this.auth}}setAdminAuth(t,n){const a={tokenType:\"Admin\",value:t,impersonating:n};this.auth=a;const o=this.identityVersion;return this.paused||(this.identityVersion=o+1),{type:\"Authenticate\",baseVersion:o,...a}}clearAuth(){this.auth=void 0,this.markAuthCompletion();const t=this.identityVersion;return this.paused||(this.identityVersion=t+1),{type:\"Authenticate\",tokenType:\"None\",baseVersion:t}}hasAuth(){return!!this.auth}isNewAuth(t){return this.auth?.value!==t}queryPath(t){const n=this.queryIdToToken.get(t);return n?this.querySet.get(n).canonicalizedUdfPath:null}queryArgs(t){const n=this.queryIdToToken.get(t);return n?this.querySet.get(n).args:null}queryToken(t){return this.queryIdToToken.get(t)??null}queryJournal(t){return this.querySet.get(t)?.journal}restart(t){this.unpause(),this.outstandingQueriesOlderThanRestart.clear();const n=[];for(const s of this.querySet.values()){const c={type:\"Add\",queryId:s.id,udfPath:s.canonicalizedUdfPath,args:[fi(s.args)],journal:s.journal,componentPath:s.componentPath};n.push(c),t.has(s.id)||this.outstandingQueriesOlderThanRestart.add(s.id)}this.querySetVersion=1;const a={type:\"ModifyQuerySet\",baseVersion:0,newVersion:1,modifications:n};if(!this.auth)return this.identityVersion=0,[a,void 0];this.outstandingAuthOlderThanRestart=!0;const o={type:\"Authenticate\",baseVersion:0,...this.auth};return this.identityVersion=1,[a,o]}pause(){this.paused=!0}resume(){const t=this.pendingQuerySetModifications.size>0?{type:\"ModifyQuerySet\",baseVersion:this.querySetVersion,newVersion:++this.querySetVersion,modifications:Array.from(this.pendingQuerySetModifications.values())}:void 0,n=this.auth!==void 0?{type:\"Authenticate\",baseVersion:this.identityVersion++,...this.auth}:void 0;return this.unpause(),[t,n]}unpause(){this.paused=!1,this.pendingQuerySetModifications.clear()}removeSubscriber(t){const n=this.querySet.get(t);if(n.numSubscribers>1)return n.numSubscribers-=1,null;{this.querySet.delete(t),this.queryIdToToken.delete(n.id),this.outstandingQueriesOlderThanRestart.delete(n.id);const a=this.querySetVersion,o=this.querySetVersion+1,s={type:\"Remove\",queryId:n.id};return this.paused?this.pendingQuerySetModifications.has(n.id)?this.pendingQuerySetModifications.delete(n.id):this.pendingQuerySetModifications.set(n.id,s):this.querySetVersion=o,{type:\"ModifyQuerySet\",baseVersion:a,newVersion:o,modifications:[s]}}}}var JD=Object.defineProperty,e5=(e,t,n)=>t in e?JD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Xf=(e,t,n)=>e5(e,typeof t!=\"symbol\"?t+\"\":t,n);class t5{constructor(t,n){this.logger=t,this.markConnectionStateDirty=n,Xf(this,\"inflightRequests\"),Xf(this,\"requestsOlderThanRestart\"),Xf(this,\"inflightMutationsCount\",0),Xf(this,\"inflightActionsCount\",0),this.inflightRequests=new Map,this.requestsOlderThanRestart=new Set}request(t,n){const a=new Promise(o=>{const s=n?\"Requested\":\"NotSent\";this.inflightRequests.set(t.requestId,{message:t,status:{status:s,requestedAt:new Date,onResult:o}}),t.type===\"Mutation\"?this.inflightMutationsCount++:t.type===\"Action\"&&this.inflightActionsCount++});return this.markConnectionStateDirty(),a}onResponse(t){const n=this.inflightRequests.get(t.requestId);if(n===void 0||n.status.status===\"Completed\")return null;const a=n.message.type===\"Mutation\"?\"mutation\":\"action\",o=n.message.udfPath;for(const f of t.logLines)Sh(this.logger,\"info\",a,o,f);const s=n.status;let c,u;if(t.success)c={success:!0,logLines:t.logLines,value:Cc(t.result)},u=()=>s.onResult(c);else{const f=t.result,{errorData:h}=t;Sh(this.logger,\"error\",a,o,f),c={success:!1,errorMessage:f,errorData:h!==void 0?Cc(h):void 0,logLines:t.logLines},u=()=>s.onResult(c)}return t.type===\"ActionResponse\"||!t.success?(u(),this.inflightRequests.delete(t.requestId),this.requestsOlderThanRestart.delete(t.requestId),n.message.type===\"Action\"?this.inflightActionsCount--:n.message.type===\"Mutation\"&&this.inflightMutationsCount--,this.markConnectionStateDirty(),{requestId:t.requestId,result:c}):(n.status={status:\"Completed\",result:c,ts:t.ts,onResolve:u},null)}removeCompleted(t){const n=new Map;for(const[a,o]of this.inflightRequests.entries()){const s=o.status;s.status===\"Completed\"&&s.ts.lessThanOrEqual(t)&&(s.onResolve(),n.set(a,s.result),o.message.type===\"Mutation\"?this.inflightMutationsCount--:o.message.type===\"Action\"&&this.inflightActionsCount--,this.inflightRequests.delete(a),this.requestsOlderThanRestart.delete(a))}return n.size>0&&this.markConnectionStateDirty(),n}restart(){this.requestsOlderThanRestart=new Set(this.inflightRequests.keys());const t=[];for(const[n,a]of this.inflightRequests){if(a.status.status===\"NotSent\"){a.status.status=\"Requested\",t.push(a.message);continue}if(a.message.type===\"Mutation\")t.push(a.message);else if(a.message.type===\"Action\"){if(this.inflightRequests.delete(n),this.requestsOlderThanRestart.delete(n),this.inflightActionsCount--,a.status.status===\"Completed\")throw new Error(\"Action should never be in 'Completed' state\");a.status.onResult({success:!1,errorMessage:\"Connection lost while action was in flight\",logLines:[]})}}return this.markConnectionStateDirty(),t}resume(){const t=[];for(const[,n]of this.inflightRequests)if(n.status.status===\"NotSent\"){n.status.status=\"Requested\",t.push(n.message);continue}return t}hasIncompleteRequests(){for(const t of this.inflightRequests.values())if(t.status.status===\"Requested\")return!0;return!1}hasInflightRequests(){return this.inflightRequests.size>0}hasSyncedPastLastReconnect(){return this.requestsOlderThanRestart.size===0}timeOfOldestInflightRequest(){if(this.inflightRequests.size===0)return null;let t=Date.now();for(const n of this.inflightRequests.values())n.status.status!==\"Completed\"&&n.status.requestedAt.getTime()<t&&(t=n.status.requestedAt.getTime());return new Date(t)}inflightMutations(){return this.inflightMutationsCount}inflightActions(){return this.inflightActionsCount}}const sd=Symbol.for(\"functionName\"),n5=Symbol.for(\"toReferencePath\");function r5(e){return e[n5]??null}function a5(e){return e.startsWith(\"function://\")}function i5(e){let t;if(typeof e==\"string\")a5(e)?t={functionHandle:e}:t={name:e};else if(e[sd])t={name:e[sd]};else{const n=r5(e);if(!n)throw new Error(`${e} is not a functionReference`);t={reference:n}}return t}function Fr(e){const t=i5(e);if(t.name===void 0)throw t.functionHandle!==void 0?new Error(`Expected function reference like \"api.file.func\" or \"internal.file.func\", but received function handle ${t.functionHandle}`):t.reference!==void 0?new Error(`Expected function reference in the current component like \"api.file.func\" or \"internal.file.func\", but received reference ${t.reference}`):new Error(`Expected function reference like \"api.file.func\" or \"internal.file.func\", but received ${JSON.stringify(t)}`);if(typeof e==\"string\")return e;const n=e[sd];if(!n)throw new Error(`${e} is not a functionReference`);return n}function pM(e){return{[sd]:e}}function gM(e=[]){const t={get(n,a){if(typeof a==\"string\"){const o=[...e,a];return gM(o)}else if(a===sd){if(e.length<2){const c=[\"api\",...e].join(\".\");throw new Error(`API path is expected to be of the form \\`api.moduleName.functionName\\`. Found: \\`${c}\\``)}const o=e.slice(0,-1).join(\"/\"),s=e[e.length-1];return s===\"default\"?o:o+\":\"+s}else return a===Symbol.toStringTag?\"FunctionReference\":void 0}};return new Proxy({},t)}gM();var o5=Object.defineProperty,s5=(e,t,n)=>t in e?o5(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ch=(e,t,n)=>s5(e,typeof t!=\"symbol\"?t+\"\":t,n);class ld{constructor(t){Ch(this,\"queryResults\"),Ch(this,\"modifiedQueries\"),this.queryResults=t,this.modifiedQueries=[]}getQuery(t,...n){const a=Qi(n[0]),o=Fr(t),s=this.queryResults.get(el(o,a));if(s!==void 0)return ld.queryValue(s.result)}getAllQueries(t){const n=[],a=Fr(t);for(const o of this.queryResults.values())o.udfPath===nl(a)&&n.push({args:o.args,value:ld.queryValue(o.result)});return n}setQuery(t,n,a){const o=Qi(n),s=Fr(t),c=el(s,o);let u;a===void 0?u=void 0:u={success:!0,value:a,logLines:[]};const f={udfPath:s,args:o,result:u};this.queryResults.set(c,f),this.modifiedQueries.push(c)}static queryValue(t){if(t!==void 0)return t.success?t.value:void 0}}class l5{constructor(){Ch(this,\"queryResults\"),Ch(this,\"optimisticUpdates\"),this.queryResults=new Map,this.optimisticUpdates=[]}ingestQueryResultsFromServer(t,n){this.optimisticUpdates=this.optimisticUpdates.filter(c=>!n.has(c.mutationId));const a=this.queryResults;this.queryResults=new Map(t);const o=new ld(this.queryResults);for(const c of this.optimisticUpdates)c.update(o);const s=[];for(const[c,u]of this.queryResults){const f=a.get(c);(f===void 0||f.result!==u.result)&&s.push(c)}return s}applyOptimisticUpdate(t,n){this.optimisticUpdates.push({update:t,mutationId:n});const a=new ld(this.queryResults);return t(a),a.modifiedQueries}rawQueryResult(t){const n=this.queryResults.get(t);if(n!==void 0)return n.result}queryResult(t){const n=this.queryResults.get(t);if(n===void 0)return;const a=n.result;if(a!==void 0){if(a.success)return a.value;throw a.errorData!==void 0?J0(a,new Z0(fc(\"query\",n.udfPath,a))):new Error(fc(\"query\",n.udfPath,a))}}hasQueryResult(t){return this.queryResults.get(t)!==void 0}queryLogs(t){return this.queryResults.get(t)?.result?.logLines}}var c5=Object.defineProperty,u5=(e,t,n)=>t in e?c5(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,wg=(e,t,n)=>u5(e,typeof t!=\"symbol\"?t+\"\":t,n);class qr{constructor(t,n){wg(this,\"low\"),wg(this,\"high\"),wg(this,\"__isUnsignedLong__\"),this.low=t|0,this.high=n|0,this.__isUnsignedLong__=!0}static isLong(t){return(t&&t.__isUnsignedLong__)===!0}static fromBytesLE(t){return new qr(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24)}toBytesLE(){const t=this.high,n=this.low;return[n&255,n>>>8&255,n>>>16&255,n>>>24,t&255,t>>>8&255,t>>>16&255,t>>>24]}static fromNumber(t){return isNaN(t)||t<0?KS:t>=d5?f5:new qr(t%Qu|0,t/Qu|0)}toString(){return(BigInt(this.high)*BigInt(Qu)+BigInt(this.low)).toString()}equals(t){return qr.isLong(t)||(t=qr.fromValue(t)),this.high>>>31===1&&t.high>>>31===1?!1:this.high===t.high&&this.low===t.low}notEquals(t){return!this.equals(t)}comp(t){return qr.isLong(t)||(t=qr.fromValue(t)),this.equals(t)?0:t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1}lessThanOrEqual(t){return this.comp(t)<=0}static fromValue(t){return typeof t==\"number\"?qr.fromNumber(t):new qr(t.low,t.high)}}const KS=new qr(0,0),ZS=65536,Qu=ZS*ZS,d5=Qu*Qu,f5=new qr(-1,-1);var h5=Object.defineProperty,m5=(e,t,n)=>t in e?h5(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Qf=(e,t,n)=>m5(e,typeof t!=\"symbol\"?t+\"\":t,n);class JS{constructor(t,n){Qf(this,\"version\"),Qf(this,\"remoteQuerySet\"),Qf(this,\"queryPath\"),Qf(this,\"logger\"),this.version={querySet:0,ts:qr.fromNumber(0),identity:0},this.remoteQuerySet=new Map,this.queryPath=t,this.logger=n}transition(t){const n=t.startVersion;if(this.version.querySet!==n.querySet||this.version.ts.notEquals(n.ts)||this.version.identity!==n.identity)throw new Error(`Invalid start version: ${n.ts.toString()}:${n.querySet}:${n.identity}, transitioning from ${this.version.ts.toString()}:${this.version.querySet}:${this.version.identity}`);for(const a of t.modifications)switch(a.type){case\"QueryUpdated\":{const o=this.queryPath(a.queryId);if(o)for(const c of a.logLines)Sh(this.logger,\"info\",\"query\",o,c);const s=Cc(a.value??null);this.remoteQuerySet.set(a.queryId,{success:!0,value:s,logLines:a.logLines});break}case\"QueryFailed\":{const o=this.queryPath(a.queryId);if(o)for(const c of a.logLines)Sh(this.logger,\"info\",\"query\",o,c);const{errorData:s}=a;this.remoteQuerySet.set(a.queryId,{success:!1,errorMessage:a.errorMessage,errorData:s!==void 0?Cc(s):void 0,logLines:a.logLines});break}case\"QueryRemoved\":{this.remoteQuerySet.delete(a.queryId);break}default:throw new Error(`Invalid modification ${a.type}`)}this.version=t.endVersion}remoteQueryResults(){return this.remoteQuerySet}timestamp(){return this.version.ts}}function Sg(e){const t=id(e);return qr.fromBytesLE(Array.from(t))}function p5(e){const t=new Uint8Array(e.toBytesLE());return od(t)}function eC(e){switch(e.type){case\"FatalError\":case\"AuthError\":case\"ActionResponse\":case\"TransitionChunk\":case\"Ping\":return{...e};case\"MutationResponse\":return e.success?{...e,ts:Sg(e.ts)}:{...e};case\"Transition\":return{...e,startVersion:{...e.startVersion,ts:Sg(e.startVersion.ts)},endVersion:{...e.endVersion,ts:Sg(e.endVersion.ts)}}}}function g5(e){switch(e.type){case\"Authenticate\":case\"ModifyQuerySet\":case\"Mutation\":case\"Action\":case\"Event\":return{...e};case\"Connect\":return e.maxObservedTimestamp!==void 0?{...e,maxObservedTimestamp:p5(e.maxObservedTimestamp)}:{...e,maxObservedTimestamp:void 0}}}var v5=Object.defineProperty,y5=(e,t,n)=>t in e?v5(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,$n=(e,t,n)=>y5(e,typeof t!=\"symbol\"?t+\"\":t,n);const b5=1e3,x5=1001,w5=1005,S5=4040;let hh;function sc(){return hh===void 0&&(hh=Date.now()),typeof performance>\"u\"||!performance.now?Date.now():Math.round(hh+performance.now())}function tC(){return`t=${Math.round((sc()-hh)/100)/10}s`}const vM={InternalServerError:{timeout:1e3},SubscriptionsWorkerFullError:{timeout:3e3},TooManyConcurrentRequests:{timeout:3e3},CommitterFullError:{timeout:3e3},AwsTooManyRequestsException:{timeout:3e3},ExecuteFullError:{timeout:3e3},SystemTimeoutError:{timeout:3e3},ExpiredInQueue:{timeout:3e3},VectorIndexesUnavailable:{timeout:1e3},SearchIndexesUnavailable:{timeout:1e3},TableSummariesUnavailable:{timeout:1e3},VectorIndexTooLarge:{timeout:3e3},SearchIndexTooLarge:{timeout:3e3},TooManyWritesInTimePeriod:{timeout:3e3}};function C5(e){if(e===void 0)return\"Unknown\";for(const t of Object.keys(vM))if(e.startsWith(t))return t;return\"Unknown\"}class R5{constructor(t,n,a,o,s,c){this.markConnectionStateDirty=s,this.debug=c,$n(this,\"socket\"),$n(this,\"connectionCount\"),$n(this,\"_hasEverConnected\",!1),$n(this,\"lastCloseReason\"),$n(this,\"transitionChunkBuffer\",null),$n(this,\"defaultInitialBackoff\"),$n(this,\"maxBackoff\"),$n(this,\"retries\"),$n(this,\"serverInactivityThreshold\"),$n(this,\"reconnectDueToServerInactivityTimeout\"),$n(this,\"scheduledReconnect\",null),$n(this,\"networkOnlineHandler\",null),$n(this,\"pendingNetworkRecoveryInfo\",null),$n(this,\"uri\"),$n(this,\"onOpen\"),$n(this,\"onResume\"),$n(this,\"onMessage\"),$n(this,\"webSocketConstructor\"),$n(this,\"logger\"),$n(this,\"onServerDisconnectError\"),this.webSocketConstructor=a,this.socket={state:\"disconnected\"},this.connectionCount=0,this.lastCloseReason=\"InitialConnect\",this.defaultInitialBackoff=1e3,this.maxBackoff=16e3,this.retries=0,this.serverInactivityThreshold=6e4,this.reconnectDueToServerInactivityTimeout=null,this.uri=t,this.onOpen=n.onOpen,this.onResume=n.onResume,this.onMessage=n.onMessage,this.onServerDisconnectError=n.onServerDisconnectError,this.logger=o,this.setupNetworkListener(),this.connect()}setSocketState(t){this.socket=t,this._logVerbose(`socket state changed: ${this.socket.state}, paused: ${\"paused\"in this.socket?this.socket.paused:void 0}`),this.markConnectionStateDirty()}setupNetworkListener(){typeof window>\"u\"||typeof window.addEventListener!=\"function\"||this.networkOnlineHandler===null&&(this.networkOnlineHandler=()=>{this._logVerbose(\"network online event detected\"),this.tryReconnectImmediately()},window.addEventListener(\"online\",this.networkOnlineHandler),this._logVerbose(\"network online event listener registered\"))}cleanupNetworkListener(){this.networkOnlineHandler&&typeof window<\"u\"&&typeof window.removeEventListener==\"function\"&&(window.removeEventListener(\"online\",this.networkOnlineHandler),this.networkOnlineHandler=null,this._logVerbose(\"network online event listener removed\"))}assembleTransition(t){if(t.partNumber<0||t.partNumber>=t.totalParts||t.totalParts===0||this.transitionChunkBuffer&&(this.transitionChunkBuffer.totalParts!==t.totalParts||this.transitionChunkBuffer.transitionId!==t.transitionId))throw this.transitionChunkBuffer=null,new Error(\"Invalid TransitionChunk\");if(this.transitionChunkBuffer===null&&(this.transitionChunkBuffer={chunks:[],totalParts:t.totalParts,transitionId:t.transitionId}),t.partNumber!==this.transitionChunkBuffer.chunks.length){const n=this.transitionChunkBuffer.chunks.length;throw this.transitionChunkBuffer=null,new Error(`TransitionChunk received out of order: expected part ${n}, got ${t.partNumber}`)}if(this.transitionChunkBuffer.chunks.push(t.chunk),this.transitionChunkBuffer.chunks.length===t.totalParts){const n=this.transitionChunkBuffer.chunks.join(\"\");this.transitionChunkBuffer=null;const a=eC(JSON.parse(n));if(a.type!==\"Transition\")throw new Error(`Expected Transition, got ${a.type} after assembling chunks`);return a}return null}connect(){if(this.socket.state===\"terminated\")return;if(this.socket.state!==\"disconnected\"&&this.socket.state!==\"stopped\")throw new Error(\"Didn't start connection from disconnected state: \"+this.socket.state);const t=new this.webSocketConstructor(this.uri);this._logVerbose(\"constructed WebSocket\"),this.setSocketState({state:\"connecting\",ws:t,paused:\"no\"}),this.resetServerInactivityTimeout(),t.onopen=()=>{if(this.logger.logVerbose(\"begin ws.onopen\"),this.socket.state!==\"connecting\")throw new Error(\"onopen called with socket not in connecting state\");if(this.setSocketState({state:\"ready\",ws:t,paused:this.socket.paused===\"yes\"?\"uninitialized\":\"no\"}),this.resetServerInactivityTimeout(),this.socket.paused===\"no\"&&(this._hasEverConnected=!0,this.onOpen({connectionCount:this.connectionCount,lastCloseReason:this.lastCloseReason,clientTs:sc()})),this.lastCloseReason!==\"InitialConnect\"&&(this.lastCloseReason?this.logger.log(\"WebSocket reconnected at\",tC(),\"after disconnect due to\",this.lastCloseReason):this.logger.log(\"WebSocket reconnected at\",tC())),this.connectionCount+=1,this.lastCloseReason=null,this.pendingNetworkRecoveryInfo!==null){const{timeSavedMs:n}=this.pendingNetworkRecoveryInfo;this.pendingNetworkRecoveryInfo=null,this.sendMessage({type:\"Event\",eventType:\"NetworkRecoveryReconnect\",event:{timeSavedMs:n}}),this.logger.log(`Network recovery reconnect saved ~${Math.round(n/1e3)}s of waiting`)}},t.onerror=n=>{this.transitionChunkBuffer=null;const a=n.message;a&&this.logger.log(`WebSocket error message: ${a}`)},t.onmessage=n=>{this.resetServerInactivityTimeout();const a=n.data.length;let o=eC(JSON.parse(n.data));if(this._logVerbose(`received ws message with type ${o.type}`),o.type===\"Ping\")return;if(o.type===\"TransitionChunk\"){const c=this.assembleTransition(o);if(!c)return;o=c,this._logVerbose(`assembled full ws message of type ${o.type}`)}this.transitionChunkBuffer!==null&&(this.transitionChunkBuffer=null,this.logger.log(`Received unexpected ${o.type} while buffering TransitionChunks`)),o.type===\"Transition\"&&this.reportLargeTransition({messageLength:a,transition:o}),this.onMessage(o).hasSyncedPastLastReconnect&&(this.retries=0,this.markConnectionStateDirty())},t.onclose=n=>{if(this._logVerbose(\"begin ws.onclose\"),this.transitionChunkBuffer=null,this.lastCloseReason===null&&(this.lastCloseReason=n.reason||`closed with code ${n.code}`),n.code!==b5&&n.code!==x5&&n.code!==w5&&n.code!==S5){let o=`WebSocket closed with code ${n.code}`;n.reason&&(o+=`: ${n.reason}`),this.logger.log(o),this.onServerDisconnectError&&n.reason&&this.onServerDisconnectError(o)}const a=C5(n.reason);this.scheduleReconnect(a)}}socketState(){return this.socket.state}sendMessage(t){const n={type:t.type,...t.type===\"Authenticate\"&&t.tokenType===\"User\"?{value:`...${t.value.slice(-7)}`}:{}};if(this.socket.state===\"ready\"&&this.socket.paused===\"no\"){const a=g5(t),o=JSON.stringify(a);let s=!1;try{this.socket.ws.send(o),s=!0}catch(c){this.logger.log(`Failed to send message on WebSocket, reconnecting: ${c}`),this.closeAndReconnect(\"FailedToSendMessage\")}return this._logVerbose(`${s?\"sent\":\"failed to send\"} message with type ${t.type}: ${JSON.stringify(n)}`),!0}return this._logVerbose(`message not sent (socket state: ${this.socket.state}, paused: ${\"paused\"in this.socket?this.socket.paused:void 0}): ${JSON.stringify(n)}`),!1}resetServerInactivityTimeout(){this.socket.state!==\"terminated\"&&(this.reconnectDueToServerInactivityTimeout!==null&&(clearTimeout(this.reconnectDueToServerInactivityTimeout),this.reconnectDueToServerInactivityTimeout=null),this.reconnectDueToServerInactivityTimeout=setTimeout(()=>{this.closeAndReconnect(\"InactiveServer\")},this.serverInactivityThreshold))}scheduleReconnect(t){this.scheduledReconnect&&(clearTimeout(this.scheduledReconnect.timeout),this.scheduledReconnect=null),this.socket={state:\"disconnected\"};const n=this.nextBackoff(t);this.markConnectionStateDirty(),this.logger.log(`Attempting reconnect in ${Math.round(n)}ms`);const a=sc(),o=setTimeout(()=>{this.scheduledReconnect?.timeout===o&&(this.scheduledReconnect=null,this.connect())},n);this.scheduledReconnect={timeout:o,scheduledAt:a,backoffMs:n}}closeAndReconnect(t){switch(this._logVerbose(`begin closeAndReconnect with reason ${t}`),this.socket.state){case\"disconnected\":case\"terminated\":case\"stopped\":return;case\"connecting\":case\"ready\":{this.lastCloseReason=t,this.close(),this.scheduleReconnect(\"client\");return}default:this.socket}}close(){switch(this.transitionChunkBuffer=null,this.socket.state){case\"disconnected\":case\"terminated\":case\"stopped\":return Promise.resolve();case\"connecting\":{const t=this.socket.ws;return t.onmessage=n=>{this._logVerbose(\"Ignoring message received after close\")},new Promise(n=>{t.onclose=()=>{this._logVerbose(\"Closed after connecting\"),n()},t.onopen=()=>{this._logVerbose(\"Opened after connecting\"),t.close()}})}case\"ready\":{this._logVerbose(\"ws.close called\");const t=this.socket.ws;t.onmessage=a=>{this._logVerbose(\"Ignoring message received after close\")};const n=new Promise(a=>{t.onclose=()=>{a()}});return t.close(),n}default:return this.socket,Promise.resolve()}}terminate(){switch(this.reconnectDueToServerInactivityTimeout&&clearTimeout(this.reconnectDueToServerInactivityTimeout),this.scheduledReconnect&&(clearTimeout(this.scheduledReconnect.timeout),this.scheduledReconnect=null),this.cleanupNetworkListener(),this.socket.state){case\"terminated\":case\"stopped\":case\"disconnected\":case\"connecting\":case\"ready\":{const t=this.close();return this.setSocketState({state:\"terminated\"}),t}default:throw this.socket,new Error(`Invalid websocket state: ${this.socket.state}`)}}stop(){switch(this.socket.state){case\"terminated\":return Promise.resolve();case\"connecting\":case\"stopped\":case\"disconnected\":case\"ready\":{this.cleanupNetworkListener();const t=this.close();return this.socket={state:\"stopped\"},t}default:return this.socket,Promise.resolve()}}tryRestart(){switch(this.socket.state){case\"stopped\":break;case\"terminated\":case\"connecting\":case\"ready\":case\"disconnected\":this.logger.logVerbose(\"Restart called without stopping first\");return;default:this.socket}this.setupNetworkListener(),this.connect()}pause(){switch(this.socket.state){case\"disconnected\":case\"stopped\":case\"terminated\":return;case\"connecting\":case\"ready\":{this.socket={...this.socket,paused:\"yes\"};return}default:{this.socket;return}}}tryReconnectImmediately(){if(this._logVerbose(\"tryReconnectImmediately called\"),this.socket.state!==\"disconnected\"){this._logVerbose(`tryReconnectImmediately called but socket state is ${this.socket.state}, no action taken`);return}let t=null;if(this.scheduledReconnect){const n=sc()-this.scheduledReconnect.scheduledAt;t=Math.max(0,this.scheduledReconnect.backoffMs-n),this._logVerbose(`would have waited ${Math.round(t)}ms more (backoff was ${Math.round(this.scheduledReconnect.backoffMs)}ms, elapsed ${Math.round(n)}ms)`),clearTimeout(this.scheduledReconnect.timeout),this.scheduledReconnect=null,this._logVerbose(\"canceled scheduled reconnect\")}this.logger.log(\"Network recovery detected, reconnecting immediately\"),this.pendingNetworkRecoveryInfo=t!==null?{timeSavedMs:t}:null,this.connect()}resume(){switch(this.socket.state){case\"connecting\":this.socket={...this.socket,paused:\"no\"};return;case\"ready\":this.socket.paused===\"uninitialized\"?(this.socket={...this.socket,paused:\"no\"},this.onOpen({connectionCount:this.connectionCount,lastCloseReason:this.lastCloseReason,clientTs:sc()})):this.socket.paused===\"yes\"&&(this.socket={...this.socket,paused:\"no\"},this.onResume());return;case\"terminated\":case\"stopped\":case\"disconnected\":return;default:this.socket}this.connect()}connectionState(){return{isConnected:this.socket.state===\"ready\",hasEverConnected:this._hasEverConnected,connectionCount:this.connectionCount,connectionRetries:this.retries}}_logVerbose(t){this.logger.logVerbose(t)}nextBackoff(t){const a=(t===\"client\"?100:t===\"Unknown\"?this.defaultInitialBackoff:vM[t].timeout)*Math.pow(2,this.retries);this.retries+=1;const o=Math.min(a,this.maxBackoff),s=o*(Math.random()-.5);return o+s}reportLargeTransition({transition:t,messageLength:n}){if(t.clientClockSkew===void 0||t.serverTs===void 0)return;const a=sc()-t.clientClockSkew-t.serverTs/1e6,o=`${Math.round(a)}ms`,s=`${Math.round(n/1e4)/100}MB`,c=n/(a/1e3),u=`${Math.round(c/1e4)/100}MB per second`;this._logVerbose(`received ${s} transition in ${o} at ${u}`),n>2e7?this.logger.log(`received query results totaling more that 20MB (${s}) which will take a long time to download on slower connections`):a>2e4&&this.logger.log(`received query results totaling ${s} which took more than 20s to arrive (${o})`),this.debug&&this.sendMessage({type:\"Event\",eventType:\"ClientReceivedTransition\",event:{transitionTransitTime:a,messageLength:n}})}}function E5(){return T5()}function T5(){return\"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx\".replace(/[xy]/g,e=>{const t=Math.random()*16|0;return(e===\"x\"?t:t&3|8).toString(16)})}class Fu extends Error{}Fu.prototype.name=\"InvalidTokenError\";function M5(e){return decodeURIComponent(atob(e).replace(/(.)/g,(t,n)=>{let a=n.charCodeAt(0).toString(16).toUpperCase();return a.length<2&&(a=\"0\"+a),\"%\"+a}))}function k5(e){let t=e.replace(/-/g,\"+\").replace(/_/g,\"/\");switch(t.length%4){case 0:break;case 2:t+=\"==\";break;case 3:t+=\"=\";break;default:throw new Error(\"base64 string is not of the correct length\")}try{return M5(t)}catch{return atob(t)}}function yM(e,t){if(typeof e!=\"string\")throw new Fu(\"Invalid token specified: must be a string\");t||(t={});const n=t.header===!0?0:1,a=e.split(\".\")[n];if(typeof a!=\"string\")throw new Fu(`Invalid token specified: missing part #${n+1}`);let o;try{o=k5(a)}catch(s){throw new Fu(`Invalid token specified: invalid base64 for part #${n+1} (${s.message})`)}try{return JSON.parse(o)}catch(s){throw new Fu(`Invalid token specified: invalid json for part #${n+1} (${s.message})`)}}var _5=Object.defineProperty,A5=(e,t,n)=>t in e?_5(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ca=(e,t,n)=>A5(e,typeof t!=\"symbol\"?t+\"\":t,n);const N5=480*60*60*1e3,nC=2;class O5{constructor(t,n,a){Ca(this,\"authState\",{state:\"noAuth\"}),Ca(this,\"configVersion\",0),Ca(this,\"syncState\"),Ca(this,\"authenticate\"),Ca(this,\"stopSocket\"),Ca(this,\"tryRestartSocket\"),Ca(this,\"pauseSocket\"),Ca(this,\"resumeSocket\"),Ca(this,\"clearAuth\"),Ca(this,\"logger\"),Ca(this,\"refreshTokenLeewaySeconds\"),Ca(this,\"tokenConfirmationAttempts\",0),this.syncState=t,this.authenticate=n.authenticate,this.stopSocket=n.stopSocket,this.tryRestartSocket=n.tryRestartSocket,this.pauseSocket=n.pauseSocket,this.resumeSocket=n.resumeSocket,this.clearAuth=n.clearAuth,this.logger=a.logger,this.refreshTokenLeewaySeconds=a.refreshTokenLeewaySeconds}async setConfig(t,n){this.resetAuthState(),this._logVerbose(\"pausing WS for auth token fetch\"),this.pauseSocket();const a=await this.fetchTokenAndGuardAgainstRace(t,{forceRefreshToken:!1});a.isFromOutdatedConfig||(a.value?(this.setAuthState({state:\"waitingForServerConfirmationOfCachedToken\",config:{fetchToken:t,onAuthChange:n},hasRetried:!1}),this.authenticate(a.value)):(this.setAuthState({state:\"initialRefetch\",config:{fetchToken:t,onAuthChange:n}}),await this.refetchToken()),this._logVerbose(\"resuming WS after auth token fetch\"),this.resumeSocket())}onTransition(t){if(this.syncState.isCurrentOrNewerAuthVersion(t.endVersion.identity)&&!(t.endVersion.identity<=t.startVersion.identity)){if(this.authState.state===\"waitingForServerConfirmationOfCachedToken\"){this._logVerbose(\"server confirmed auth token is valid\"),this.refetchToken(),this.authState.config.onAuthChange(!0);return}this.authState.state===\"waitingForServerConfirmationOfFreshToken\"&&(this._logVerbose(\"server confirmed new auth token is valid\"),this.scheduleTokenRefetch(this.authState.token),this.tokenConfirmationAttempts=0,this.authState.hadAuth||this.authState.config.onAuthChange(!0))}}onAuthError(t){if(t.authUpdateAttempted===!1&&(this.authState.state===\"waitingForServerConfirmationOfFreshToken\"||this.authState.state===\"waitingForServerConfirmationOfCachedToken\")){this._logVerbose(\"ignoring non-auth token expired error\");return}const{baseVersion:n}=t;if(!this.syncState.isCurrentOrNewerAuthVersion(n+1)){this._logVerbose(\"ignoring auth error for previous auth attempt\");return}this.tryToReauthenticate(t)}async tryToReauthenticate(t){if(this._logVerbose(`attempting to reauthenticate: ${t.error}`),this.authState.state===\"noAuth\"||this.authState.state===\"waitingForServerConfirmationOfFreshToken\"&&this.tokenConfirmationAttempts>=nC){this.logger.error(`Failed to authenticate: \"${t.error}\", check your server auth config`),this.syncState.hasAuth()&&this.syncState.clearAuth(),this.authState.state!==\"noAuth\"&&this.setAndReportAuthFailed(this.authState.config.onAuthChange);return}this.authState.state===\"waitingForServerConfirmationOfFreshToken\"&&(this.tokenConfirmationAttempts++,this._logVerbose(`retrying reauthentication, ${nC-this.tokenConfirmationAttempts} attempts remaining`)),await this.stopSocket();const n=await this.fetchTokenAndGuardAgainstRace(this.authState.config.fetchToken,{forceRefreshToken:!0});n.isFromOutdatedConfig||(n.value&&this.syncState.isNewAuth(n.value)?(this.authenticate(n.value),this.setAuthState({state:\"waitingForServerConfirmationOfFreshToken\",config:this.authState.config,token:n.value,hadAuth:this.authState.state===\"notRefetching\"||this.authState.state===\"waitingForScheduledRefetch\"})):(this._logVerbose(\"reauthentication failed, could not fetch a new token\"),this.syncState.hasAuth()&&this.syncState.clearAuth(),this.setAndReportAuthFailed(this.authState.config.onAuthChange)),this.tryRestartSocket())}async refetchToken(){if(this.authState.state===\"noAuth\")return;this._logVerbose(\"refetching auth token\");const t=await this.fetchTokenAndGuardAgainstRace(this.authState.config.fetchToken,{forceRefreshToken:!0});t.isFromOutdatedConfig||(t.value?this.syncState.isNewAuth(t.value)?(this.setAuthState({state:\"waitingForServerConfirmationOfFreshToken\",hadAuth:this.syncState.hasAuth(),token:t.value,config:this.authState.config}),this.authenticate(t.value)):this.setAuthState({state:\"notRefetching\",config:this.authState.config}):(this._logVerbose(\"refetching token failed\"),this.syncState.hasAuth()&&this.clearAuth(),this.setAndReportAuthFailed(this.authState.config.onAuthChange)),this._logVerbose(\"restarting WS after auth token fetch (if currently stopped)\"),this.tryRestartSocket())}scheduleTokenRefetch(t){if(this.authState.state===\"noAuth\")return;const n=this.decodeToken(t);if(!n){this.logger.error(\"Auth token is not a valid JWT, cannot refetch the token\");return}const{iat:a,exp:o}=n;if(!a||!o){this.logger.error(\"Auth token does not have required fields, cannot refetch the token\");return}const s=o-a;if(s<=2){this.logger.error(\"Auth token does not live long enough, cannot refetch the token\");return}let c=Math.min(N5,(s-this.refreshTokenLeewaySeconds)*1e3);c<=0&&(this.logger.warn(`Refetching auth token immediately, configured leeway ${this.refreshTokenLeewaySeconds}s is larger than the token's lifetime ${s}s`),c=0);const u=setTimeout(()=>{this._logVerbose(\"running scheduled token refetch\"),this.refetchToken()},c);this.setAuthState({state:\"waitingForScheduledRefetch\",refetchTokenTimeoutId:u,config:this.authState.config}),this._logVerbose(`scheduled preemptive auth token refetching in ${c}ms`)}async fetchTokenAndGuardAgainstRace(t,n){const a=++this.configVersion;this._logVerbose(`fetching token with config version ${a}`);const o=await t(n);return this.configVersion!==a?(this._logVerbose(`stale config version, expected ${a}, got ${this.configVersion}`),{isFromOutdatedConfig:!0}):{isFromOutdatedConfig:!1,value:o}}stop(){this.resetAuthState(),this.configVersion++,this._logVerbose(`config version bumped to ${this.configVersion}`)}setAndReportAuthFailed(t){t(!1),this.resetAuthState()}resetAuthState(){this.setAuthState({state:\"noAuth\"})}setAuthState(t){const n=t.state===\"waitingForServerConfirmationOfFreshToken\"?{hadAuth:t.hadAuth,state:t.state,token:`...${t.token.slice(-7)}`}:{state:t.state};switch(this._logVerbose(`setting auth state to ${JSON.stringify(n)}`),t.state){case\"waitingForScheduledRefetch\":case\"notRefetching\":case\"noAuth\":this.tokenConfirmationAttempts=0;break}this.authState.state===\"waitingForScheduledRefetch\"&&(clearTimeout(this.authState.refetchTokenTimeoutId),this.syncState.markAuthCompletion()),this.authState=t}decodeToken(t){try{return yM(t)}catch(n){return this._logVerbose(`Error decoding token: ${n instanceof Error?n.message:\"Unknown error\"}`),null}}_logVerbose(t){this.logger.logVerbose(`${t} [v${this.configVersion}]`)}}const D5=[\"convexClientConstructed\",\"convexWebSocketOpen\",\"convexFirstMessageReceived\"];function j5(e,t){const n={sessionId:t};typeof performance>\"u\"||!performance.mark||performance.mark(e,{detail:n})}function z5(e){let t=e.name.slice(6);return t=t.charAt(0).toLowerCase()+t.slice(1),{name:t,startTime:e.startTime}}function P5(e){if(typeof performance>\"u\"||!performance.getEntriesByName)return[];const t=[];for(const n of D5){const a=performance.getEntriesByName(n).filter(o=>o.entryType===\"mark\").filter(o=>o.detail.sessionId===e);t.push(...a)}return t.map(z5)}var L5=Object.defineProperty,I5=(e,t,n)=>t in e?L5(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Bn=(e,t,n)=>I5(e,typeof t!=\"symbol\"?t+\"\":t,n);class H5{constructor(t,n,a){if(Bn(this,\"address\"),Bn(this,\"state\"),Bn(this,\"requestManager\"),Bn(this,\"webSocketManager\"),Bn(this,\"authenticationManager\"),Bn(this,\"remoteQuerySet\"),Bn(this,\"optimisticQueryResults\"),Bn(this,\"_transitionHandlerCounter\",0),Bn(this,\"_nextRequestId\"),Bn(this,\"_onTransitionFns\",new Map),Bn(this,\"_sessionId\"),Bn(this,\"firstMessageReceived\",!1),Bn(this,\"debug\"),Bn(this,\"logger\"),Bn(this,\"maxObservedTimestamp\"),Bn(this,\"connectionStateSubscribers\",new Map),Bn(this,\"nextConnectionStateSubscriberId\",0),Bn(this,\"_lastPublishedConnectionState\"),Bn(this,\"markConnectionStateDirty\",()=>{Promise.resolve().then(()=>{const S=this.connectionState();if(JSON.stringify(S)!==JSON.stringify(this._lastPublishedConnectionState)){this._lastPublishedConnectionState=S;for(const w of this.connectionStateSubscribers.values())w(S)}})}),Bn(this,\"mark\",S=>{this.debug&&j5(S,this.sessionId)}),typeof t==\"object\")throw new Error(\"Passing a ClientConfig object is no longer supported. Pass the URL of the Convex deployment as a string directly.\");a?.skipConvexDeploymentUrlCheck!==!0&&jD(t),a={...a};const o=a.authRefreshTokenLeewaySeconds??10;let s=a.webSocketConstructor;if(!s&&typeof WebSocket>\"u\")throw new Error(\"No WebSocket global variable defined! To use Convex in an environment without WebSocket try the HTTP client: https://docs.convex.dev/api/classes/browser.ConvexHttpClient\");s=s||WebSocket,this.debug=a.reportDebugInfoToConvex??!1,this.address=t,this.logger=a.logger===!1?mM({verbose:a.verbose??!1}):a.logger!==!0&&a.logger?a.logger:hM({verbose:a.verbose??!1});const c=t.search(\"://\");if(c===-1)throw new Error(\"Provided address was not an absolute URL.\");const u=t.substring(c+3),f=t.substring(0,c);let h;if(f===\"http\")h=\"ws\";else if(f===\"https\")h=\"wss\";else throw new Error(`Unknown parent protocol ${f}`);const v=`${h}://${u}/api/${YS}/sync`;this.state=new ZD,this.remoteQuerySet=new JS(S=>this.state.queryPath(S),this.logger),this.requestManager=new t5(this.logger,this.markConnectionStateDirty);const y=()=>{this.webSocketManager.pause(),this.state.pause()};this.authenticationManager=new O5(this.state,{authenticate:S=>{const w=this.state.setAuth(S);return this.webSocketManager.sendMessage(w),w.baseVersion},stopSocket:()=>this.webSocketManager.stop(),tryRestartSocket:()=>this.webSocketManager.tryRestart(),pauseSocket:y,resumeSocket:()=>this.webSocketManager.resume(),clearAuth:()=>{this.clearAuth()}},{logger:this.logger,refreshTokenLeewaySeconds:o}),this.optimisticQueryResults=new l5,this.addOnTransitionHandler(S=>{n(S.queries.map(w=>w.token))}),this._nextRequestId=0,this._sessionId=E5();const{unsavedChangesWarning:x}=a;if(typeof window>\"u\"||typeof window.addEventListener>\"u\"){if(x===!0)throw new Error(\"unsavedChangesWarning requested, but window.addEventListener not found! Remove {unsavedChangesWarning: true} from Convex client options.\")}else x!==!1&&window.addEventListener(\"beforeunload\",S=>{if(this.requestManager.hasIncompleteRequests()){S.preventDefault();const w=\"Are you sure you want to leave? Your changes may not be saved.\";return(S||window.event).returnValue=w,w}});this.webSocketManager=new R5(v,{onOpen:S=>{this.mark(\"convexWebSocketOpen\"),this.webSocketManager.sendMessage({...S,type:\"Connect\",sessionId:this._sessionId,maxObservedTimestamp:this.maxObservedTimestamp});const w=new Set(this.remoteQuerySet.remoteQueryResults().keys());this.remoteQuerySet=new JS(k=>this.state.queryPath(k),this.logger);const[C,R]=this.state.restart(w);R&&this.webSocketManager.sendMessage(R),this.webSocketManager.sendMessage(C);for(const k of this.requestManager.restart())this.webSocketManager.sendMessage(k)},onResume:()=>{const[S,w]=this.state.resume();w&&this.webSocketManager.sendMessage(w),S&&this.webSocketManager.sendMessage(S);for(const C of this.requestManager.resume())this.webSocketManager.sendMessage(C)},onMessage:S=>{switch(this.firstMessageReceived||(this.firstMessageReceived=!0,this.mark(\"convexFirstMessageReceived\"),this.reportMarks()),S.type){case\"Transition\":{this.observedTimestamp(S.endVersion.ts),this.authenticationManager.onTransition(S),this.remoteQuerySet.transition(S),this.state.transition(S);const w=this.requestManager.removeCompleted(this.remoteQuerySet.timestamp());this.notifyOnQueryResultChanges(w);break}case\"MutationResponse\":{S.success&&this.observedTimestamp(S.ts);const w=this.requestManager.onResponse(S);w!==null&&this.notifyOnQueryResultChanges(new Map([[w.requestId,w.result]]));break}case\"ActionResponse\":{this.requestManager.onResponse(S);break}case\"AuthError\":{this.authenticationManager.onAuthError(S);break}case\"FatalError\":{const w=XD(this.logger,S.error);throw this.webSocketManager.terminate(),w}}return{hasSyncedPastLastReconnect:this.hasSyncedPastLastReconnect()}},onServerDisconnectError:a.onServerDisconnectError},s,this.logger,this.markConnectionStateDirty,this.debug),this.mark(\"convexClientConstructed\"),a.expectAuth&&y()}hasSyncedPastLastReconnect(){return this.requestManager.hasSyncedPastLastReconnect()||this.state.hasSyncedPastLastReconnect()}observedTimestamp(t){(this.maxObservedTimestamp===void 0||this.maxObservedTimestamp.lessThanOrEqual(t))&&(this.maxObservedTimestamp=t)}getMaxObservedTimestamp(){return this.maxObservedTimestamp}notifyOnQueryResultChanges(t){const n=this.remoteQuerySet.remoteQueryResults(),a=new Map;for(const[s,c]of n){const u=this.state.queryToken(s);if(u!==null){const f={result:c,udfPath:this.state.queryPath(s),args:this.state.queryArgs(s)};a.set(u,f)}}const o=this.optimisticQueryResults.ingestQueryResultsFromServer(a,new Set(t.keys()));this.handleTransition({queries:o.map(s=>{const c=this.optimisticQueryResults.rawQueryResult(s);return{token:s,modification:{kind:\"Updated\",result:c}}}),reflectedMutations:Array.from(t).map(([s,c])=>({requestId:s,result:c})),timestamp:this.remoteQuerySet.timestamp()})}handleTransition(t){for(const n of this._onTransitionFns.values())n(t)}addOnTransitionHandler(t){const n=this._transitionHandlerCounter++;return this._onTransitionFns.set(n,t),()=>this._onTransitionFns.delete(n)}getCurrentAuthClaims(){const t=this.state.getAuth();let n={};if(t&&t.tokenType===\"User\")try{n=t?yM(t.value):{}}catch{n={}}else return;return{token:t.value,decoded:n}}setAuth(t,n){this.authenticationManager.setConfig(t,n)}hasAuth(){return this.state.hasAuth()}setAdminAuth(t,n){const a=this.state.setAdminAuth(t,n);this.webSocketManager.sendMessage(a)}clearAuth(){const t=this.state.clearAuth();this.webSocketManager.sendMessage(t)}subscribe(t,n,a){const o=Qi(n),{modification:s,queryToken:c,unsubscribe:u}=this.state.subscribe(t,o,a?.journal,a?.componentPath);return s!==null&&this.webSocketManager.sendMessage(s),{queryToken:c,unsubscribe:()=>{const f=u();f&&this.webSocketManager.sendMessage(f)}}}localQueryResult(t,n){const a=Qi(n),o=el(t,a);return this.optimisticQueryResults.queryResult(o)}localQueryResultByToken(t){return this.optimisticQueryResults.queryResult(t)}hasLocalQueryResultByToken(t){return this.optimisticQueryResults.hasQueryResult(t)}localQueryLogs(t,n){const a=Qi(n),o=el(t,a);return this.optimisticQueryResults.queryLogs(o)}queryJournal(t,n){const a=Qi(n),o=el(t,a);return this.state.queryJournal(o)}connectionState(){const t=this.webSocketManager.connectionState();return{hasInflightRequests:this.requestManager.hasInflightRequests(),isWebSocketConnected:t.isConnected,hasEverConnected:t.hasEverConnected,connectionCount:t.connectionCount,connectionRetries:t.connectionRetries,timeOfOldestInflightRequest:this.requestManager.timeOfOldestInflightRequest(),inflightMutations:this.requestManager.inflightMutations(),inflightActions:this.requestManager.inflightActions()}}subscribeToConnectionState(t){const n=this.nextConnectionStateSubscriberId++;return this.connectionStateSubscribers.set(n,t),()=>{this.connectionStateSubscribers.delete(n)}}async mutation(t,n,a){const o=await this.mutationInternal(t,n,a);if(!o.success)throw o.errorData!==void 0?J0(o,new Z0(fc(\"mutation\",t,o))):new Error(fc(\"mutation\",t,o));return o.value}async mutationInternal(t,n,a,o){const{mutationPromise:s}=this.enqueueMutation(t,n,a,o);return s}enqueueMutation(t,n,a,o){const s=Qi(n);this.tryReportLongDisconnect();const c=this.nextRequestId;if(this._nextRequestId++,a!==void 0){const v=a.optimisticUpdate;if(v!==void 0){const y=w=>{v(w,s)instanceof Promise&&this.logger.warn(\"Optimistic update handler returned a Promise. Optimistic updates should be synchronous.\")},S=this.optimisticQueryResults.applyOptimisticUpdate(y,c).map(w=>{const C=this.localQueryResultByToken(w);return{token:w,modification:{kind:\"Updated\",result:C===void 0?void 0:{success:!0,value:C,logLines:[]}}}});this.handleTransition({queries:S,reflectedMutations:[],timestamp:this.remoteQuerySet.timestamp()})}}const u={type:\"Mutation\",requestId:c,udfPath:t,componentPath:o,args:[fi(s)]},f=this.webSocketManager.sendMessage(u),h=this.requestManager.request(u,f);return{requestId:c,mutationPromise:h}}async action(t,n){const a=await this.actionInternal(t,n);if(!a.success)throw a.errorData!==void 0?J0(a,new Z0(fc(\"action\",t,a))):new Error(fc(\"action\",t,a));return a.value}async actionInternal(t,n,a){const o=Qi(n),s=this.nextRequestId;this._nextRequestId++,this.tryReportLongDisconnect();const c={type:\"Action\",requestId:s,udfPath:t,componentPath:a,args:[fi(o)]},u=this.webSocketManager.sendMessage(c);return this.requestManager.request(c,u)}async close(){return this.authenticationManager.stop(),this.webSocketManager.terminate()}get url(){return this.address}get nextRequestId(){return this._nextRequestId}get sessionId(){return this._sessionId}reportMarks(){if(this.debug){const t=P5(this.sessionId);this.webSocketManager.sendMessage({type:\"Event\",eventType:\"ClientConnect\",event:t})}}tryReportLongDisconnect(){if(!this.debug)return;const t=this.connectionState().timeOfOldestInflightRequest;if(t===null||Date.now()-t.getTime()<=60*1e3)return;const n=`${this.address}/api/debug_event`;fetch(n,{method:\"POST\",headers:{\"Content-Type\":\"application/json\",\"Convex-Client\":`npm-${YS}`},body:JSON.stringify({event:\"LongWebsocketDisconnect\"})}).then(a=>{a.ok||this.logger.warn(\"Analytics request failed with response:\",a.body)}).catch(a=>{this.logger.warn(\"Analytics response failed with error:\",a)})}}function Cg(e){if(typeof e!=\"object\"||e===null||!Array.isArray(e.page)||typeof e.isDone!=\"boolean\"||typeof e.continueCursor!=\"string\")throw new Error(`Not a valid paginated query result: ${e?.toString()}`);return e}var q5=Object.defineProperty,F5=(e,t,n)=>t in e?q5(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,rC=(e,t,n)=>F5(e,typeof t!=\"symbol\"?t+\"\":t,n);class $5{constructor(t,n){this.client=t,this.onTransition=n,rC(this,\"paginatedQuerySet\",new Map),rC(this,\"lastTransitionTs\"),this.lastTransitionTs=qr.fromNumber(0),this.client.addOnTransitionHandler(a=>this.onBaseTransition(a))}subscribe(t,n,a){const o=nl(t),s=QS(o,n,a),c=()=>this.removePaginatedQuerySubscriber(s),u=this.paginatedQuerySet.get(s);return u?(u.numSubscribers+=1,{paginatedQueryToken:s,unsubscribe:c}):(this.paginatedQuerySet.set(s,{token:s,canonicalizedUdfPath:o,args:n,numSubscribers:1,options:{initialNumItems:a.initialNumItems},nextPageKey:0,pageKeys:[],pageKeyToQuery:new Map,ongoingSplits:new Map,skip:!1,id:a.id}),this.addPageToPaginatedQuery(s,null,a.initialNumItems),{paginatedQueryToken:s,unsubscribe:c})}localQueryResult(t,n,a){const o=nl(t),s=QS(o,n,a);return this.localQueryResultByToken(s)}localQueryResultByToken(t){const n=this.paginatedQuerySet.get(t);if(!n)return;const a=this.activePageQueryTokens(n);if(a.length===0)return{results:[],status:\"LoadingFirstPage\",loadMore:f=>this.loadMoreOfPaginatedQuery(t,f)};let o=[],s=!1,c=!1;for(const f of a){const h=this.client.localQueryResultByToken(f);if(h===void 0){s=!0,c=!1;continue}const v=Cg(h);o=o.concat(v.page),c=!!v.isDone}let u;return s?u=o.length===0?\"LoadingFirstPage\":\"LoadingMore\":c?u=\"Exhausted\":u=\"CanLoadMore\",{results:o,status:u,loadMore:f=>this.loadMoreOfPaginatedQuery(t,f)}}onBaseTransition(t){const n=t.queries.map(c=>c.token),a=this.queriesContainingTokens(n);let o=[];a.length>0&&(this.processPaginatedQuerySplits(a,c=>this.client.localQueryResultByToken(c)),o=a.map(c=>({token:c,modification:{kind:\"Updated\",result:this.localQueryResultByToken(c)}})));const s={...t,paginatedQueries:o};this.onTransition(s)}loadMoreOfPaginatedQuery(t,n){this.mustGetPaginatedQuery(t);const a=this.queryTokenForLastPageOfPaginatedQuery(t),o=this.client.localQueryResultByToken(a);if(!o)return!1;const s=Cg(o);if(s.isDone)return!1;this.addPageToPaginatedQuery(t,s.continueCursor,n);const c={timestamp:this.lastTransitionTs,reflectedMutations:[],queries:[],paginatedQueries:[{token:t,modification:{kind:\"Updated\",result:this.localQueryResultByToken(t)}}]};return this.onTransition(c),!0}queriesContainingTokens(t){if(t.length===0)return[];const n=[],a=new Set(t);for(const[o,s]of this.paginatedQuerySet)for(const c of this.allQueryTokens(s))if(a.has(c)){n.push(o);break}return n}processPaginatedQuerySplits(t,n){for(const a of t){const o=this.mustGetPaginatedQuery(a),{ongoingSplits:s,pageKeyToQuery:c,pageKeys:u}=o;for(const[f,[h,v]]of s)n(c.get(h).queryToken)!==void 0&&n(c.get(v).queryToken)!==void 0&&this.completePaginatedQuerySplit(o,f,h,v);for(const f of u){if(s.has(f))continue;const h=c.get(f).queryToken,v=n(h);if(!v)continue;const y=Cg(v);y.splitCursor&&(y.pageStatus===\"SplitRecommended\"||y.pageStatus===\"SplitRequired\"||y.page.length>o.options.initialNumItems*2)&&this.splitPaginatedQueryPage(o,f,y.splitCursor,y.continueCursor)}}}splitPaginatedQueryPage(t,n,a,o){const s=t.nextPageKey++,c=t.nextPageKey++,u={cursor:o,numItems:t.options.initialNumItems,id:t.id},f=this.client.subscribe(t.canonicalizedUdfPath,{...t.args,paginationOpts:{...u,cursor:null,endCursor:a}});t.pageKeyToQuery.set(s,f);const h=this.client.subscribe(t.canonicalizedUdfPath,{...t.args,paginationOpts:{...u,cursor:a,endCursor:o}});t.pageKeyToQuery.set(c,h),t.ongoingSplits.set(n,[s,c])}addPageToPaginatedQuery(t,n,a){const o=this.mustGetPaginatedQuery(t),s=o.nextPageKey++,c={cursor:n,numItems:a,id:o.id},u={...o.args,paginationOpts:c},f=this.client.subscribe(o.canonicalizedUdfPath,u);return o.pageKeys.push(s),o.pageKeyToQuery.set(s,f),f}removePaginatedQuerySubscriber(t){const n=this.paginatedQuerySet.get(t);if(n&&(n.numSubscribers-=1,!(n.numSubscribers>0))){for(const a of n.pageKeyToQuery.values())a.unsubscribe();this.paginatedQuerySet.delete(t)}}completePaginatedQuerySplit(t,n,a,o){const s=t.pageKeyToQuery.get(n);t.pageKeyToQuery.delete(n);const c=t.pageKeys.indexOf(n);t.pageKeys.splice(c,1,a,o),t.ongoingSplits.delete(n),s.unsubscribe()}activePageQueryTokens(t){return t.pageKeys.map(n=>t.pageKeyToQuery.get(n).queryToken)}allQueryTokens(t){return Array.from(t.pageKeyToQuery.values()).map(n=>n.queryToken)}queryTokenForLastPageOfPaginatedQuery(t){const n=this.mustGetPaginatedQuery(t),a=n.pageKeys[n.pageKeys.length-1];if(a===void 0)throw new Error(`No pages for paginated query ${t}`);return n.pageKeyToQuery.get(a).queryToken}mustGetPaginatedQuery(t){const n=this.paginatedQuerySet.get(t);if(!n)throw new Error(\"paginated query no longer exists for token \"+t);return n}}function B5({getCurrentValue:e,subscribe:t}){const[n,a]=m.useState(()=>({getCurrentValue:e,subscribe:t,value:e()}));let o=n.value;return(n.getCurrentValue!==e||n.subscribe!==t)&&(o=e(),a({getCurrentValue:e,subscribe:t,value:o})),m.useEffect(()=>{let s=!1;const c=()=>{s||a(f=>{if(f.getCurrentValue!==e||f.subscribe!==t)return f;const h=e();return f.value===h?f:{...f,value:h}})},u=t(c);return c(),()=>{s=!0,u()}},[e,t]),o}var U5=Object.defineProperty,V5=(e,t,n)=>t in e?U5(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Yi=(e,t,n)=>V5(e,typeof t!=\"symbol\"?t+\"\":t,n);const W5=5e3;if(typeof At>\"u\")throw new Error(\"Required dependency 'react' not found\");function bM(e,t,n){function a(o){return K5(o),t.mutation(e,o,{optimisticUpdate:n})}return a.withOptimisticUpdate=function(s){if(n!==void 0)throw new Error(`Already specified optimistic update for mutation ${Fr(e)}`);return bM(e,t,s)},a}class G5{constructor(t,n){if(Yi(this,\"address\"),Yi(this,\"cachedSync\"),Yi(this,\"cachedPaginatedQueryClient\"),Yi(this,\"listeners\"),Yi(this,\"options\"),Yi(this,\"closed\",!1),Yi(this,\"_logger\"),Yi(this,\"adminAuth\"),Yi(this,\"fakeUserIdentity\"),t===void 0)throw new Error(\"No address provided to ConvexReactClient.\\nIf trying to deploy to production, make sure to follow all the instructions found at https://docs.convex.dev/production/hosting/\\nIf running locally, make sure to run `convex dev` and ensure the .env.local file is populated.\");if(typeof t!=\"string\")throw new Error(`ConvexReactClient requires a URL like 'https://happy-otter-123.convex.cloud', received something of type ${typeof t} instead.`);if(!t.includes(\"://\"))throw new Error(\"Provided address was not an absolute URL.\");this.address=t,this.listeners=new Map,this._logger=n?.logger===!1?mM({verbose:n?.verbose??!1}):n?.logger!==!0&&n?.logger?n.logger:hM({verbose:n?.verbose??!1}),this.options={...n,logger:this._logger}}get url(){return this.address}get sync(){if(this.closed)throw new Error(\"ConvexReactClient has already been closed.\");return this.cachedSync?this.cachedSync:(this.cachedSync=new H5(this.address,()=>{},this.options),this.adminAuth&&this.cachedSync.setAdminAuth(this.adminAuth,this.fakeUserIdentity),this.cachedPaginatedQueryClient=new $5(this.cachedSync,t=>this.handleTransition(t)),this.cachedSync)}get paginatedQueryClient(){if(this.sync,this.cachedPaginatedQueryClient)return this.cachedPaginatedQueryClient;throw new Error(\"Should already be instantiated\")}setAuth(t,n){if(typeof t==\"string\")throw new Error(\"Passing a string to ConvexReactClient.setAuth is no longer supported, please upgrade to passing in an async function to handle reauthentication.\");this.sync.setAuth(t,n??(()=>{}))}clearAuth(){this.sync.clearAuth()}setAdminAuth(t,n){if(this.adminAuth=t,this.fakeUserIdentity=n,this.closed)throw new Error(\"ConvexReactClient has already been closed.\");this.cachedSync&&this.sync.setAdminAuth(t,n)}watchQuery(t,...n){const[a,o]=n,s=Fr(t);return{onUpdate:c=>{const{queryToken:u,unsubscribe:f}=this.sync.subscribe(s,a,o),h=this.listeners.get(u);return h!==void 0?h.add(c):this.listeners.set(u,new Set([c])),()=>{if(this.closed)return;const v=this.listeners.get(u);v.delete(c),v.size===0&&this.listeners.delete(u),f()}},localQueryResult:()=>{if(this.cachedSync)return this.cachedSync.localQueryResult(s,a)},localQueryLogs:()=>{if(this.cachedSync)return this.cachedSync.localQueryLogs(s,a)},journal:()=>{if(this.cachedSync)return this.cachedSync.queryJournal(s,a)}}}prewarmQuery(t){const n=t.extendSubscriptionFor??W5,o=this.watchQuery(t.query,t.args||{}).onUpdate(()=>{});setTimeout(o,n)}watchPaginatedQuery(t,n,a){const o=Fr(t);return{onUpdate:s=>{const{paginatedQueryToken:c,unsubscribe:u}=this.paginatedQueryClient.subscribe(o,n||{},a),f=this.listeners.get(c);return f!==void 0?f.add(s):this.listeners.set(c,new Set([s])),()=>{if(this.closed)return;const h=this.listeners.get(c);h.delete(s),h.size===0&&this.listeners.delete(c),u()}},localQueryResult:()=>this.paginatedQueryClient.localQueryResult(o,n,a)}}mutation(t,...n){const[a,o]=n,s=Fr(t);return this.sync.mutation(s,a,o)}action(t,...n){const a=Fr(t);return this.sync.action(a,...n)}query(t,...n){const a=this.watchQuery(t,...n),o=a.localQueryResult();return o!==void 0?Promise.resolve(o):new Promise((s,c)=>{const u=a.onUpdate(()=>{u();try{s(a.localQueryResult())}catch(f){c(f)}})})}connectionState(){return this.sync.connectionState()}subscribeToConnectionState(t){return this.sync.subscribeToConnectionState(t)}get logger(){return this._logger}async close(){if(this.closed=!0,this.listeners=new Map,this.cachedPaginatedQueryClient&&(this.cachedPaginatedQueryClient=void 0),this.cachedSync){const t=this.cachedSync;this.cachedSync=void 0,await t.close()}}handleTransition(t){const n=t.queries.map(o=>o.token),a=t.paginatedQueries.map(o=>o.token);this.transition([...n,...a])}transition(t){for(const n of t){const a=this.listeners.get(n);if(a)for(const o of a)o()}}}const Tb=At.createContext(void 0);function Y5(){return m.useContext(Tb)}const X5=({client:e,children:t})=>At.createElement(Tb.Provider,{value:e},t);function aC(e,...t){const n=t[0]===\"skip\",a=t[0]===\"skip\"?{}:Qi(t[0]),o=typeof e==\"string\"?pM(e):e,s=Fr(o),c=m.useMemo(()=>n?{}:{query:{query:o,args:a}},[JSON.stringify(fi(a)),s,n]),f=t4(c).query;if(f instanceof Error)throw f;return f}function Q5(e){const t=typeof e==\"string\"?pM(e):e,n=m.useContext(Tb);if(n===void 0)throw new Error(\"Could not find Convex client! `useMutation` must be used in the React component tree under `ConvexProvider`. Did you forget it? See https://docs.convex.dev/quick-start#set-up-convex-in-your-react-app\");return m.useMemo(()=>bM(t,n),[n,Fr(t)])}function K5(e){if(typeof e==\"object\"&&e!==null&&\"bubbles\"in e&&\"persist\"in e&&\"isDefaultPrevented\"in e)throw new Error(\"Convex function called with SyntheticEvent object. Did you use a Convex function as an event handler directly? Event handlers like onClick receive an event object as their first argument. These SyntheticEvent objects are not valid Convex values. Try wrapping the function like `const handler = () => myMutation();` and using `handler` in the event handler.\")}var Z5=Object.defineProperty,J5=(e,t,n)=>t in e?Z5(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Rg=(e,t,n)=>J5(e,typeof t!=\"symbol\"?t+\"\":t,n);class e4{constructor(t){Rg(this,\"createWatch\"),Rg(this,\"queries\"),Rg(this,\"listeners\"),this.createWatch=t,this.queries={},this.listeners=new Set}setQueries(t){for(const n of Object.keys(t)){const{query:a,args:o,paginationOptions:s}=t[n];if(Fr(a),this.queries[n]===void 0)this.addQuery(n,a,o,s?{paginationOptions:s}:{});else{const c=this.queries[n];(Fr(a)!==Fr(c.query)||JSON.stringify(fi(o))!==JSON.stringify(fi(c.args))||JSON.stringify(s)!==JSON.stringify(c.paginationOptions))&&(this.removeQuery(n),this.addQuery(n,a,o,s?{paginationOptions:s}:{}))}}for(const n of Object.keys(this.queries))t[n]===void 0&&this.removeQuery(n)}subscribe(t){return this.listeners.add(t),()=>{this.listeners.delete(t)}}getLocalResults(t){const n={};for(const a of Object.keys(t)){const{query:o,args:s}=t[a],c=t[a].paginationOptions;Fr(o);const u=this.createWatch(o,s,c?{paginationOptions:c}:{});let f;try{f=u.localQueryResult()}catch(h){if(h instanceof Error)f=h;else throw h}n[a]=f}return n}setCreateWatch(t){this.createWatch=t;for(const n of Object.keys(this.queries)){const{query:a,args:o,watch:s,paginationOptions:c}=this.queries[n],u=\"journal\"in s?s.journal():void 0;this.removeQuery(n),this.addQuery(n,a,o,{...u?{journal:u}:[],...c?{paginationOptions:c}:{}})}}destroy(){for(const t of Object.keys(this.queries))this.removeQuery(t);this.listeners=new Set}addQuery(t,n,a,{paginationOptions:o,journal:s}){if(this.queries[t]!==void 0)throw new Error(`Tried to add a new query with identifier ${t} when it already exists.`);const c=this.createWatch(n,a,{...s?{journal:s}:[],...o?{paginationOptions:o}:{}}),u=c.onUpdate(()=>this.notifyListeners());this.queries[t]={query:n,args:a,watch:c,unsubscribe:u,...o?{paginationOptions:o}:{}}}removeQuery(t){const n=this.queries[t];if(n===void 0)throw new Error(`No query found with identifier ${t}.`);n.unsubscribe(),delete this.queries[t]}notifyListeners(){for(const t of this.listeners)t()}}function t4(e){const t=Y5();if(t===void 0)throw new Error(\"Could not find Convex client! `useQuery` must be used in the React component tree under `ConvexProvider`. Did you forget it? See https://docs.convex.dev/quick-start#set-up-convex-in-your-react-app\");const n=m.useMemo(()=>(a,o,{journal:s,paginationOptions:c})=>c?t.watchPaginatedQuery(a,o,c):t.watchQuery(a,o,s?{journal:s}:{}),[t]);return n4(e,n)}function n4(e,t){const[n]=m.useState(()=>new e4(t));n.createWatch!==t&&n.setCreateWatch(t),m.useEffect(()=>()=>n.destroy(),[n]);const a=m.useMemo(()=>({getCurrentValue:()=>n.getLocalResults(e),subscribe:o=>(n.setQueries(e),n.subscribe(o))}),[n,e]);return B5(a)}const r4=e=>e.replace(/([a-z0-9])([A-Z])/g,\"$1-$2\").toLowerCase(),xM=(...e)=>e.filter((t,n,a)=>!!t&&t.trim()!==\"\"&&a.indexOf(t)===n).join(\" \").trim();var a4={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\"};const i4=m.forwardRef(({color:e=\"currentColor\",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:a,className:o=\"\",children:s,iconNode:c,...u},f)=>m.createElement(\"svg\",{ref:f,...a4,width:t,height:t,stroke:e,strokeWidth:a?Number(n)*24/Number(t):n,className:xM(\"lucide\",o),...u},[...c.map(([h,v])=>m.createElement(h,v)),...Array.isArray(s)?s:[s]]));const it=(e,t)=>{const n=m.forwardRef(({className:a,...o},s)=>m.createElement(i4,{ref:s,iconNode:t,className:xM(`lucide-${r4(e)}`,a),...o}));return n.displayName=`${e}`,n};const o4=it(\"Activity\",[[\"path\",{d:\"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2\",key:\"169zse\"}]]);const s4=it(\"ArrowDown\",[[\"path\",{d:\"M12 5v14\",key:\"s699le\"}],[\"path\",{d:\"m19 12-7 7-7-7\",key:\"1idqje\"}]]);const l4=it(\"ArrowUpDown\",[[\"path\",{d:\"m21 16-4 4-4-4\",key:\"f6ql7i\"}],[\"path\",{d:\"M17 20V4\",key:\"1ejh1v\"}],[\"path\",{d:\"m3 8 4-4 4 4\",key:\"11wl7u\"}],[\"path\",{d:\"M7 4v16\",key:\"1glfcx\"}]]);const c4=it(\"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\"}]]);const wM=it(\"ChartColumn\",[[\"path\",{d:\"M3 3v16a2 2 0 0 0 2 2h16\",key:\"c24i48\"}],[\"path\",{d:\"M18 17V9\",key:\"2bz60n\"}],[\"path\",{d:\"M13 17V5\",key:\"1frdt8\"}],[\"path\",{d:\"M8 17v-3\",key:\"17ska0\"}]]);const xd=it(\"Check\",[[\"path\",{d:\"M20 6 9 17l-5-5\",key:\"1gmf2c\"}]]);const ns=it(\"ChevronDown\",[[\"path\",{d:\"m6 9 6 6 6-6\",key:\"qrunsl\"}]]);const u4=it(\"ChevronLeft\",[[\"path\",{d:\"m15 18-6-6 6-6\",key:\"1wnfg3\"}]]);const Ac=it(\"ChevronRight\",[[\"path\",{d:\"m9 18 6-6-6-6\",key:\"mthhwq\"}]]);const Mb=it(\"CircleAlert\",[[\"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\"}]]);const Wh=it(\"CircleCheck\",[[\"circle\",{cx:\"12\",cy:\"12\",r:\"10\",key:\"1mglay\"}],[\"path\",{d:\"m9 12 2 2 4-4\",key:\"dzmm74\"}]]);const d4=it(\"CircleHelp\",[[\"circle\",{cx:\"12\",cy:\"12\",r:\"10\",key:\"1mglay\"}],[\"path\",{d:\"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3\",key:\"1u773s\"}],[\"path\",{d:\"M12 17h.01\",key:\"p32p05\"}]]);const eb=it(\"CircleX\",[[\"circle\",{cx:\"12\",cy:\"12\",r:\"10\",key:\"1mglay\"}],[\"path\",{d:\"m15 9-6 6\",key:\"1uzhvr\"}],[\"path\",{d:\"m9 9 6 6\",key:\"z0biqf\"}]]);const f4=it(\"Circle\",[[\"circle\",{cx:\"12\",cy:\"12\",r:\"10\",key:\"1mglay\"}]]);const h4=it(\"ClipboardCopy\",[[\"rect\",{width:\"8\",height:\"4\",x:\"8\",y:\"2\",rx:\"1\",ry:\"1\",key:\"tgr4d6\"}],[\"path\",{d:\"M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2\",key:\"4jdomd\"}],[\"path\",{d:\"M16 4h2a2 2 0 0 1 2 2v4\",key:\"3hqy98\"}],[\"path\",{d:\"M21 14H11\",key:\"1bme5i\"}],[\"path\",{d:\"m15 10-4 4 4 4\",key:\"5dvupr\"}]]);const iC=it(\"ClipboardList\",[[\"rect\",{width:\"8\",height:\"4\",x:\"8\",y:\"2\",rx:\"1\",ry:\"1\",key:\"tgr4d6\"}],[\"path\",{d:\"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2\",key:\"116196\"}],[\"path\",{d:\"M12 11h4\",key:\"1jrz19\"}],[\"path\",{d:\"M12 16h4\",key:\"n85exb\"}],[\"path\",{d:\"M8 11h.01\",key:\"1dfujw\"}],[\"path\",{d:\"M8 16h.01\",key:\"18s6g9\"}]]);const m4=it(\"Clipboard\",[[\"rect\",{width:\"8\",height:\"4\",x:\"8\",y:\"2\",rx:\"1\",ry:\"1\",key:\"tgr4d6\"}],[\"path\",{d:\"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2\",key:\"116196\"}]]);const SM=it(\"Clock\",[[\"circle\",{cx:\"12\",cy:\"12\",r:\"10\",key:\"1mglay\"}],[\"polyline\",{points:\"12 6 12 12 16 14\",key:\"68esgv\"}]]);const tb=it(\"Code\",[[\"polyline\",{points:\"16 18 22 12 16 6\",key:\"z7tu5w\"}],[\"polyline\",{points:\"8 6 2 12 8 18\",key:\"1eg1df\"}]]);const Rc=it(\"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\"}]]);const CM=it(\"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\"}]]);const RM=it(\"Download\",[[\"path\",{d:\"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4\",key:\"ih7n3h\"}],[\"polyline\",{points:\"7 10 12 15 17 10\",key:\"2ggqvy\"}],[\"line\",{x1:\"12\",x2:\"12\",y1:\"15\",y2:\"3\",key:\"1vk2je\"}]]);const p4=it(\"Ellipsis\",[[\"circle\",{cx:\"12\",cy:\"12\",r:\"1\",key:\"41hilf\"}],[\"circle\",{cx:\"19\",cy:\"12\",r:\"1\",key:\"1wjl8i\"}],[\"circle\",{cx:\"5\",cy:\"12\",r:\"1\",key:\"1pcz8c\"}]]);const g4=it(\"Eraser\",[[\"path\",{d:\"m7 21-4.3-4.3c-1-1-1-2.5 0-3.4l9.6-9.6c1-1 2.5-1 3.4 0l5.6 5.6c1 1 1 2.5 0 3.4L13 21\",key:\"182aya\"}],[\"path\",{d:\"M22 21H7\",key:\"t4ddhn\"}],[\"path\",{d:\"m5 11 9 9\",key:\"1mo9qw\"}]]);const v4=it(\"EyeOff\",[[\"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\"}]]);const y4=it(\"FileArchive\",[[\"path\",{d:\"M10 12v-1\",key:\"v7bkov\"}],[\"path\",{d:\"M10 18v-2\",key:\"1cjy8d\"}],[\"path\",{d:\"M10 7V6\",key:\"dljcrl\"}],[\"path\",{d:\"M14 2v4a2 2 0 0 0 2 2h4\",key:\"tnqrlb\"}],[\"path\",{d:\"M15.5 22H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v16a2 2 0 0 0 .274 1.01\",key:\"gkbcor\"}],[\"circle\",{cx:\"10\",cy:\"20\",r:\"2\",key:\"1xzdoj\"}]]);const Eg=it(\"FileJson\",[[\"path\",{d:\"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z\",key:\"1rqfz7\"}],[\"path\",{d:\"M14 2v4a2 2 0 0 0 2 2h4\",key:\"tnqrlb\"}],[\"path\",{d:\"M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1\",key:\"1oajmo\"}],[\"path\",{d:\"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1\",key:\"mpwhp6\"}]]);const EM=it(\"FileText\",[[\"path\",{d:\"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z\",key:\"1rqfz7\"}],[\"path\",{d:\"M14 2v4a2 2 0 0 0 2 2h4\",key:\"tnqrlb\"}],[\"path\",{d:\"M10 9H8\",key:\"b1mrlr\"}],[\"path\",{d:\"M16 13H8\",key:\"t4e002\"}],[\"path\",{d:\"M16 17H8\",key:\"z1uh3a\"}]]);const oC=it(\"File\",[[\"path\",{d:\"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z\",key:\"1rqfz7\"}],[\"path\",{d:\"M14 2v4a2 2 0 0 0 2 2h4\",key:\"tnqrlb\"}]]);const b4=it(\"Filter\",[[\"polygon\",{points:\"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3\",key:\"1yg77f\"}]]);const x4=it(\"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\"}]]);const TM=it(\"HardDrive\",[[\"line\",{x1:\"22\",x2:\"2\",y1:\"12\",y2:\"12\",key:\"1y58io\"}],[\"path\",{d:\"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z\",key:\"oot6mr\"}],[\"line\",{x1:\"6\",x2:\"6.01\",y1:\"16\",y2:\"16\",key:\"sgf278\"}],[\"line\",{x1:\"10\",x2:\"10.01\",y1:\"16\",y2:\"16\",key:\"1l4acy\"}]]);const w4=it(\"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\"}]]);const hi=it(\"LoaderCircle\",[[\"path\",{d:\"M21 12a9 9 0 1 1-6.219-8.56\",key:\"13zald\"}]]);const S4=it(\"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\"}]]);const C4=it(\"Moon\",[[\"path\",{d:\"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z\",key:\"a7tn18\"}]]);const R4=it(\"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\"}]]);const sC=it(\"Package\",[[\"path\",{d:\"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 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.73z\",key:\"1a0edw\"}],[\"path\",{d:\"M12 22V12\",key:\"d0xqtd\"}],[\"path\",{d:\"m3.3 7 7.703 4.734a2 2 0 0 0 1.994 0L20.7 7\",key:\"yx3hmr\"}],[\"path\",{d:\"m7.5 4.27 9 5.15\",key:\"1c824w\"}]]);const E4=it(\"Pause\",[[\"rect\",{x:\"14\",y:\"4\",width:\"4\",height:\"16\",rx:\"1\",key:\"zuxfzm\"}],[\"rect\",{x:\"6\",y:\"4\",width:\"4\",height:\"16\",rx:\"1\",key:\"1okwgv\"}]]);const T4=it(\"PenLine\",[[\"path\",{d:\"M12 20h9\",key:\"t2du7b\"}],[\"path\",{d:\"M16.376 3.622a1 1 0 0 1 3.002 3.002L7.368 18.635a2 2 0 0 1-.855.506l-2.872.838a.5.5 0 0 1-.62-.62l.838-2.872a2 2 0 0 1 .506-.854z\",key:\"1ykcvy\"}]]);const MM=it(\"Play\",[[\"polygon\",{points:\"6 3 20 12 6 21 6 3\",key:\"1oa8hb\"}]]);const M4=it(\"Plus\",[[\"path\",{d:\"M5 12h14\",key:\"1ays0h\"}],[\"path\",{d:\"M12 5v14\",key:\"s699le\"}]]);const k4=it(\"RefreshCcw\",[[\"path\",{d:\"M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8\",key:\"14sxne\"}],[\"path\",{d:\"M3 3v5h5\",key:\"1xhq8a\"}],[\"path\",{d:\"M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16\",key:\"1hlbsb\"}],[\"path\",{d:\"M16 16h5v5\",key:\"ccwih5\"}]]);const wd=it(\"Search\",[[\"circle\",{cx:\"11\",cy:\"11\",r:\"8\",key:\"4ej97u\"}],[\"path\",{d:\"m21 21-4.3-4.3\",key:\"1qie3q\"}]]);const _4=it(\"Send\",[[\"path\",{d:\"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z\",key:\"1ffxy3\"}],[\"path\",{d:\"m21.854 2.147-10.94 10.939\",key:\"12cjpa\"}]]);const A4=it(\"Sun\",[[\"circle\",{cx:\"12\",cy:\"12\",r:\"4\",key:\"4exip2\"}],[\"path\",{d:\"M12 2v2\",key:\"tus03m\"}],[\"path\",{d:\"M12 20v2\",key:\"1lh1kg\"}],[\"path\",{d:\"m4.93 4.93 1.41 1.41\",key:\"149t6j\"}],[\"path\",{d:\"m17.66 17.66 1.41 1.41\",key:\"ptbguv\"}],[\"path\",{d:\"M2 12h2\",key:\"1t8f8n\"}],[\"path\",{d:\"M20 12h2\",key:\"1q8mjw\"}],[\"path\",{d:\"m6.34 17.66-1.41 1.41\",key:\"1m8zz5\"}],[\"path\",{d:\"m19.07 4.93-1.41 1.41\",key:\"1shlcs\"}]]);const nb=it(\"Table2\",[[\"path\",{d:\"M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18\",key:\"gugj83\"}]]);const Ks=it(\"Trash2\",[[\"path\",{d:\"M3 6h18\",key:\"d0wm0j\"}],[\"path\",{d:\"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6\",key:\"4alrt4\"}],[\"path\",{d:\"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2\",key:\"v07s0e\"}],[\"line\",{x1:\"10\",x2:\"10\",y1:\"11\",y2:\"17\",key:\"1uufr5\"}],[\"line\",{x1:\"14\",x2:\"14\",y1:\"11\",y2:\"17\",key:\"xtxkd\"}]]);const N4=it(\"TrendingUp\",[[\"polyline\",{points:\"22 7 13.5 15.5 8.5 10.5 2 17\",key:\"126l90\"}],[\"polyline\",{points:\"16 7 22 7 22 13\",key:\"kwv8wd\"}]]);const O4=it(\"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\"}]]);const D4=it(\"X\",[[\"path\",{d:\"M18 6 6 18\",key:\"1bl5f8\"}],[\"path\",{d:\"m6 6 12 12\",key:\"d8bk6v\"}]]);const kb=it(\"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\"}]]),j4=\"#f97316\",z4=6,P4=\"M16 6 Q 9.2 13.3 8 22 Q 16 19 24 22 Q 22.8 13.3 16 6 Z\";function kM(e){var t,n,a=\"\";if(typeof e==\"string\"||typeof e==\"number\")a+=e;else if(typeof e==\"object\")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=kM(e[t]))&&(a&&(a+=\" \"),a+=n)}else for(n in e)e[n]&&(a&&(a+=\" \"),a+=n);return a}function _M(){for(var e,t,n=0,a=\"\",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=kM(e))&&(a&&(a+=\" \"),a+=t);return a}const _b=\"-\",L4=e=>{const t=H4(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:a}=e;return{getClassGroupId:c=>{const u=c.split(_b);return u[0]===\"\"&&u.length!==1&&u.shift(),AM(u,t)||I4(c)},getConflictingClassGroupIds:(c,u)=>{const f=n[c]||[];return u&&a[c]?[...f,...a[c]]:f}}},AM=(e,t)=>{if(e.length===0)return t.classGroupId;const n=e[0],a=t.nextPart.get(n),o=a?AM(e.slice(1),a):void 0;if(o)return o;if(t.validators.length===0)return;const s=e.join(_b);return t.validators.find(({validator:c})=>c(s))?.classGroupId},lC=/^\\[(.+)\\]$/,I4=e=>{if(lC.test(e)){const t=lC.exec(e)[1],n=t?.substring(0,t.indexOf(\":\"));if(n)return\"arbitrary..\"+n}},H4=e=>{const{theme:t,prefix:n}=e,a={nextPart:new Map,validators:[]};return F4(Object.entries(e.classGroups),n).forEach(([s,c])=>{rb(c,a,s,t)}),a},rb=(e,t,n,a)=>{e.forEach(o=>{if(typeof o==\"string\"){const s=o===\"\"?t:cC(t,o);s.classGroupId=n;return}if(typeof o==\"function\"){if(q4(o)){rb(o(a),t,n,a);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([s,c])=>{rb(c,cC(t,s),n,a)})})},cC=(e,t)=>{let n=e;return t.split(_b).forEach(a=>{n.nextPart.has(a)||n.nextPart.set(a,{nextPart:new Map,validators:[]}),n=n.nextPart.get(a)}),n},q4=e=>e.isThemeGetter,F4=(e,t)=>t?e.map(([n,a])=>{const o=a.map(s=>typeof s==\"string\"?t+s:typeof s==\"object\"?Object.fromEntries(Object.entries(s).map(([c,u])=>[t+c,u])):s);return[n,o]}):e,$4=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,a=new Map;const o=(s,c)=>{n.set(s,c),t++,t>e&&(t=0,a=n,n=new Map)};return{get(s){let c=n.get(s);if(c!==void 0)return c;if((c=a.get(s))!==void 0)return o(s,c),c},set(s,c){n.has(s)?n.set(s,c):o(s,c)}}},NM=\"!\",B4=e=>{const{separator:t,experimentalParseClassName:n}=e,a=t.length===1,o=t[0],s=t.length,c=u=>{const f=[];let h=0,v=0,y;for(let R=0;R<u.length;R++){let k=u[R];if(h===0){if(k===o&&(a||u.slice(R,R+s)===t)){f.push(u.slice(v,R)),v=R+s;continue}if(k===\"/\"){y=R;continue}}k===\"[\"?h++:k===\"]\"&&h--}const x=f.length===0?u:u.substring(v),S=x.startsWith(NM),w=S?x.substring(1):x,C=y&&y>v?y-v:void 0;return{modifiers:f,hasImportantModifier:S,baseClassName:w,maybePostfixModifierPosition:C}};return n?u=>n({className:u,parseClassName:c}):c},U4=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(a=>{a[0]===\"[\"?(t.push(...n.sort(),a),n=[]):n.push(a)}),t.push(...n.sort()),t},V4=e=>({cache:$4(e.cacheSize),parseClassName:B4(e),...L4(e)}),W4=/\\s+/,G4=(e,t)=>{const{parseClassName:n,getClassGroupId:a,getConflictingClassGroupIds:o}=t,s=[],c=e.trim().split(W4);let u=\"\";for(let f=c.length-1;f>=0;f-=1){const h=c[f],{modifiers:v,hasImportantModifier:y,baseClassName:x,maybePostfixModifierPosition:S}=n(h);let w=!!S,C=a(w?x.substring(0,S):x);if(!C){if(!w){u=h+(u.length>0?\" \"+u:u);continue}if(C=a(x),!C){u=h+(u.length>0?\" \"+u:u);continue}w=!1}const R=U4(v).join(\":\"),k=y?R+NM:R,T=k+C;if(s.includes(T))continue;s.push(T);const M=o(C,w);for(let j=0;j<M.length;++j){const I=M[j];s.push(k+I)}u=h+(u.length>0?\" \"+u:u)}return u};function Y4(){let e=0,t,n,a=\"\";for(;e<arguments.length;)(t=arguments[e++])&&(n=OM(t))&&(a&&(a+=\" \"),a+=n);return a}const OM=e=>{if(typeof e==\"string\")return e;let t,n=\"\";for(let a=0;a<e.length;a++)e[a]&&(t=OM(e[a]))&&(n&&(n+=\" \"),n+=t);return n};function X4(e,...t){let n,a,o,s=c;function c(f){const h=t.reduce((v,y)=>y(v),e());return n=V4(h),a=n.cache.get,o=n.cache.set,s=u,u(f)}function u(f){const h=a(f);if(h)return h;const v=G4(f,n);return o(f,v),v}return function(){return s(Y4.apply(null,arguments))}}const mn=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},DM=/^\\[(?:([a-z-]+):)?(.+)\\]$/i,Q4=/^\\d+\\/\\d+$/,K4=new Set([\"px\",\"full\",\"screen\"]),Z4=/^(\\d+(\\.\\d+)?)?(xs|sm|md|lg|xl)$/,J4=/\\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$/,e6=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\\(.+\\)$/,t6=/^(inset_)?-?((\\d+)?\\.?(\\d+)[a-z]+|0)_-?((\\d+)?\\.?(\\d+)[a-z]+|0)/,n6=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\\(.+\\)$/,Xi=e=>gc(e)||K4.has(e)||Q4.test(e),Bo=e=>Nc(e,\"length\",u6),gc=e=>!!e&&!Number.isNaN(Number(e)),Tg=e=>Nc(e,\"number\",gc),Ru=e=>!!e&&Number.isInteger(Number(e)),r6=e=>e.endsWith(\"%\")&&gc(e.slice(0,-1)),bt=e=>DM.test(e),Uo=e=>Z4.test(e),a6=new Set([\"length\",\"size\",\"percentage\"]),i6=e=>Nc(e,a6,jM),o6=e=>Nc(e,\"position\",jM),s6=new Set([\"image\",\"url\"]),l6=e=>Nc(e,s6,f6),c6=e=>Nc(e,\"\",d6),Eu=()=>!0,Nc=(e,t,n)=>{const a=DM.exec(e);return a?a[1]?typeof t==\"string\"?a[1]===t:t.has(a[1]):n(a[2]):!1},u6=e=>J4.test(e)&&!e6.test(e),jM=()=>!1,d6=e=>t6.test(e),f6=e=>n6.test(e),h6=()=>{const e=mn(\"colors\"),t=mn(\"spacing\"),n=mn(\"blur\"),a=mn(\"brightness\"),o=mn(\"borderColor\"),s=mn(\"borderRadius\"),c=mn(\"borderSpacing\"),u=mn(\"borderWidth\"),f=mn(\"contrast\"),h=mn(\"grayscale\"),v=mn(\"hueRotate\"),y=mn(\"invert\"),x=mn(\"gap\"),S=mn(\"gradientColorStops\"),w=mn(\"gradientColorStopPositions\"),C=mn(\"inset\"),R=mn(\"margin\"),k=mn(\"opacity\"),T=mn(\"padding\"),M=mn(\"saturate\"),j=mn(\"scale\"),I=mn(\"sepia\"),P=mn(\"skew\"),A=mn(\"space\"),q=mn(\"translate\"),B=()=>[\"auto\",\"contain\",\"none\"],V=()=>[\"auto\",\"hidden\",\"clip\",\"visible\",\"scroll\"],N=()=>[\"auto\",bt,t],_=()=>[bt,t],z=()=>[\"\",Xi,Bo],F=()=>[\"auto\",gc,bt],O=()=>[\"bottom\",\"center\",\"left\",\"left-bottom\",\"left-top\",\"right\",\"right-bottom\",\"right-top\",\"top\"],$=()=>[\"solid\",\"dashed\",\"dotted\",\"double\",\"none\"],W=()=>[\"normal\",\"multiply\",\"screen\",\"overlay\",\"darken\",\"lighten\",\"color-dodge\",\"color-burn\",\"hard-light\",\"soft-light\",\"difference\",\"exclusion\",\"hue\",\"saturation\",\"color\",\"luminosity\"],U=()=>[\"start\",\"end\",\"center\",\"between\",\"around\",\"evenly\",\"stretch\"],K=()=>[\"\",\"0\",bt],ie=()=>[\"auto\",\"avoid\",\"all\",\"avoid-page\",\"page\",\"left\",\"right\",\"column\"],L=()=>[gc,bt];return{cacheSize:500,separator:\":\",theme:{colors:[Eu],spacing:[Xi,Bo],blur:[\"none\",\"\",Uo,bt],brightness:L(),borderColor:[e],borderRadius:[\"none\",\"\",\"full\",Uo,bt],borderSpacing:_(),borderWidth:z(),contrast:L(),grayscale:K(),hueRotate:L(),invert:K(),gap:_(),gradientColorStops:[e],gradientColorStopPositions:[r6,Bo],inset:N(),margin:N(),opacity:L(),padding:_(),saturate:L(),scale:L(),sepia:K(),skew:L(),space:_(),translate:_()},classGroups:{aspect:[{aspect:[\"auto\",\"square\",\"video\",bt]}],container:[\"container\"],columns:[{columns:[Uo]}],\"break-after\":[{\"break-after\":ie()}],\"break-before\":[{\"break-before\":ie()}],\"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\"],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:[...O(),bt]}],overflow:[{overflow:V()}],\"overflow-x\":[{\"overflow-x\":V()}],\"overflow-y\":[{\"overflow-y\":V()}],overscroll:[{overscroll:B()}],\"overscroll-x\":[{\"overscroll-x\":B()}],\"overscroll-y\":[{\"overscroll-y\":B()}],position:[\"static\",\"fixed\",\"absolute\",\"relative\",\"sticky\"],inset:[{inset:[C]}],\"inset-x\":[{\"inset-x\":[C]}],\"inset-y\":[{\"inset-y\":[C]}],start:[{start:[C]}],end:[{end:[C]}],top:[{top:[C]}],right:[{right:[C]}],bottom:[{bottom:[C]}],left:[{left:[C]}],visibility:[\"visible\",\"invisible\",\"collapse\"],z:[{z:[\"auto\",Ru,bt]}],basis:[{basis:N()}],\"flex-direction\":[{flex:[\"row\",\"row-reverse\",\"col\",\"col-reverse\"]}],\"flex-wrap\":[{flex:[\"wrap\",\"wrap-reverse\",\"nowrap\"]}],flex:[{flex:[\"1\",\"auto\",\"initial\",\"none\",bt]}],grow:[{grow:K()}],shrink:[{shrink:K()}],order:[{order:[\"first\",\"last\",\"none\",Ru,bt]}],\"grid-cols\":[{\"grid-cols\":[Eu]}],\"col-start-end\":[{col:[\"auto\",{span:[\"full\",Ru,bt]},bt]}],\"col-start\":[{\"col-start\":F()}],\"col-end\":[{\"col-end\":F()}],\"grid-rows\":[{\"grid-rows\":[Eu]}],\"row-start-end\":[{row:[\"auto\",{span:[Ru,bt]},bt]}],\"row-start\":[{\"row-start\":F()}],\"row-end\":[{\"row-end\":F()}],\"grid-flow\":[{\"grid-flow\":[\"row\",\"col\",\"dense\",\"row-dense\",\"col-dense\"]}],\"auto-cols\":[{\"auto-cols\":[\"auto\",\"min\",\"max\",\"fr\",bt]}],\"auto-rows\":[{\"auto-rows\":[\"auto\",\"min\",\"max\",\"fr\",bt]}],gap:[{gap:[x]}],\"gap-x\":[{\"gap-x\":[x]}],\"gap-y\":[{\"gap-y\":[x]}],\"justify-content\":[{justify:[\"normal\",...U()]}],\"justify-items\":[{\"justify-items\":[\"start\",\"end\",\"center\",\"stretch\"]}],\"justify-self\":[{\"justify-self\":[\"auto\",\"start\",\"end\",\"center\",\"stretch\"]}],\"align-content\":[{content:[\"normal\",...U(),\"baseline\"]}],\"align-items\":[{items:[\"start\",\"end\",\"center\",\"baseline\",\"stretch\"]}],\"align-self\":[{self:[\"auto\",\"start\",\"end\",\"center\",\"stretch\",\"baseline\"]}],\"place-content\":[{\"place-content\":[...U(),\"baseline\"]}],\"place-items\":[{\"place-items\":[\"start\",\"end\",\"center\",\"baseline\",\"stretch\"]}],\"place-self\":[{\"place-self\":[\"auto\",\"start\",\"end\",\"center\",\"stretch\"]}],p:[{p:[T]}],px:[{px:[T]}],py:[{py:[T]}],ps:[{ps:[T]}],pe:[{pe:[T]}],pt:[{pt:[T]}],pr:[{pr:[T]}],pb:[{pb:[T]}],pl:[{pl:[T]}],m:[{m:[R]}],mx:[{mx:[R]}],my:[{my:[R]}],ms:[{ms:[R]}],me:[{me:[R]}],mt:[{mt:[R]}],mr:[{mr:[R]}],mb:[{mb:[R]}],ml:[{ml:[R]}],\"space-x\":[{\"space-x\":[A]}],\"space-x-reverse\":[\"space-x-reverse\"],\"space-y\":[{\"space-y\":[A]}],\"space-y-reverse\":[\"space-y-reverse\"],w:[{w:[\"auto\",\"min\",\"max\",\"fit\",\"svw\",\"lvw\",\"dvw\",bt,t]}],\"min-w\":[{\"min-w\":[bt,t,\"min\",\"max\",\"fit\"]}],\"max-w\":[{\"max-w\":[bt,t,\"none\",\"full\",\"min\",\"max\",\"fit\",\"prose\",{screen:[Uo]},Uo]}],h:[{h:[bt,t,\"auto\",\"min\",\"max\",\"fit\",\"svh\",\"lvh\",\"dvh\"]}],\"min-h\":[{\"min-h\":[bt,t,\"min\",\"max\",\"fit\",\"svh\",\"lvh\",\"dvh\"]}],\"max-h\":[{\"max-h\":[bt,t,\"min\",\"max\",\"fit\",\"svh\",\"lvh\",\"dvh\"]}],size:[{size:[bt,t,\"auto\",\"min\",\"max\",\"fit\"]}],\"font-size\":[{text:[\"base\",Uo,Bo]}],\"font-smoothing\":[\"antialiased\",\"subpixel-antialiased\"],\"font-style\":[\"italic\",\"not-italic\"],\"font-weight\":[{font:[\"thin\",\"extralight\",\"light\",\"normal\",\"medium\",\"semibold\",\"bold\",\"extrabold\",\"black\",Tg]}],\"font-family\":[{font:[Eu]}],\"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:[\"tighter\",\"tight\",\"normal\",\"wide\",\"wider\",\"widest\",bt]}],\"line-clamp\":[{\"line-clamp\":[\"none\",gc,Tg]}],leading:[{leading:[\"none\",\"tight\",\"snug\",\"normal\",\"relaxed\",\"loose\",Xi,bt]}],\"list-image\":[{\"list-image\":[\"none\",bt]}],\"list-style-type\":[{list:[\"none\",\"disc\",\"decimal\",bt]}],\"list-style-position\":[{list:[\"inside\",\"outside\"]}],\"placeholder-color\":[{placeholder:[e]}],\"placeholder-opacity\":[{\"placeholder-opacity\":[k]}],\"text-alignment\":[{text:[\"left\",\"center\",\"right\",\"justify\",\"start\",\"end\"]}],\"text-color\":[{text:[e]}],\"text-opacity\":[{\"text-opacity\":[k]}],\"text-decoration\":[\"underline\",\"overline\",\"line-through\",\"no-underline\"],\"text-decoration-style\":[{decoration:[...$(),\"wavy\"]}],\"text-decoration-thickness\":[{decoration:[\"auto\",\"from-font\",Xi,Bo]}],\"underline-offset\":[{\"underline-offset\":[\"auto\",Xi,bt]}],\"text-decoration-color\":[{decoration:[e]}],\"text-transform\":[\"uppercase\",\"lowercase\",\"capitalize\",\"normal-case\"],\"text-overflow\":[\"truncate\",\"text-ellipsis\",\"text-clip\"],\"text-wrap\":[{text:[\"wrap\",\"nowrap\",\"balance\",\"pretty\"]}],indent:[{indent:_()}],\"vertical-align\":[{align:[\"baseline\",\"top\",\"middle\",\"bottom\",\"text-top\",\"text-bottom\",\"sub\",\"super\",bt]}],whitespace:[{whitespace:[\"normal\",\"nowrap\",\"pre\",\"pre-line\",\"pre-wrap\",\"break-spaces\"]}],break:[{break:[\"normal\",\"words\",\"all\",\"keep\"]}],hyphens:[{hyphens:[\"none\",\"manual\",\"auto\"]}],content:[{content:[\"none\",bt]}],\"bg-attachment\":[{bg:[\"fixed\",\"local\",\"scroll\"]}],\"bg-clip\":[{\"bg-clip\":[\"border\",\"padding\",\"content\",\"text\"]}],\"bg-opacity\":[{\"bg-opacity\":[k]}],\"bg-origin\":[{\"bg-origin\":[\"border\",\"padding\",\"content\"]}],\"bg-position\":[{bg:[...O(),o6]}],\"bg-repeat\":[{bg:[\"no-repeat\",{repeat:[\"\",\"x\",\"y\",\"round\",\"space\"]}]}],\"bg-size\":[{bg:[\"auto\",\"cover\",\"contain\",i6]}],\"bg-image\":[{bg:[\"none\",{\"gradient-to\":[\"t\",\"tr\",\"r\",\"br\",\"b\",\"bl\",\"l\",\"tl\"]},l6]}],\"bg-color\":[{bg:[e]}],\"gradient-from-pos\":[{from:[w]}],\"gradient-via-pos\":[{via:[w]}],\"gradient-to-pos\":[{to:[w]}],\"gradient-from\":[{from:[S]}],\"gradient-via\":[{via:[S]}],\"gradient-to\":[{to:[S]}],rounded:[{rounded:[s]}],\"rounded-s\":[{\"rounded-s\":[s]}],\"rounded-e\":[{\"rounded-e\":[s]}],\"rounded-t\":[{\"rounded-t\":[s]}],\"rounded-r\":[{\"rounded-r\":[s]}],\"rounded-b\":[{\"rounded-b\":[s]}],\"rounded-l\":[{\"rounded-l\":[s]}],\"rounded-ss\":[{\"rounded-ss\":[s]}],\"rounded-se\":[{\"rounded-se\":[s]}],\"rounded-ee\":[{\"rounded-ee\":[s]}],\"rounded-es\":[{\"rounded-es\":[s]}],\"rounded-tl\":[{\"rounded-tl\":[s]}],\"rounded-tr\":[{\"rounded-tr\":[s]}],\"rounded-br\":[{\"rounded-br\":[s]}],\"rounded-bl\":[{\"rounded-bl\":[s]}],\"border-w\":[{border:[u]}],\"border-w-x\":[{\"border-x\":[u]}],\"border-w-y\":[{\"border-y\":[u]}],\"border-w-s\":[{\"border-s\":[u]}],\"border-w-e\":[{\"border-e\":[u]}],\"border-w-t\":[{\"border-t\":[u]}],\"border-w-r\":[{\"border-r\":[u]}],\"border-w-b\":[{\"border-b\":[u]}],\"border-w-l\":[{\"border-l\":[u]}],\"border-opacity\":[{\"border-opacity\":[k]}],\"border-style\":[{border:[...$(),\"hidden\"]}],\"divide-x\":[{\"divide-x\":[u]}],\"divide-x-reverse\":[\"divide-x-reverse\"],\"divide-y\":[{\"divide-y\":[u]}],\"divide-y-reverse\":[\"divide-y-reverse\"],\"divide-opacity\":[{\"divide-opacity\":[k]}],\"divide-style\":[{divide:$()}],\"border-color\":[{border:[o]}],\"border-color-x\":[{\"border-x\":[o]}],\"border-color-y\":[{\"border-y\":[o]}],\"border-color-s\":[{\"border-s\":[o]}],\"border-color-e\":[{\"border-e\":[o]}],\"border-color-t\":[{\"border-t\":[o]}],\"border-color-r\":[{\"border-r\":[o]}],\"border-color-b\":[{\"border-b\":[o]}],\"border-color-l\":[{\"border-l\":[o]}],\"divide-color\":[{divide:[o]}],\"outline-style\":[{outline:[\"\",...$()]}],\"outline-offset\":[{\"outline-offset\":[Xi,bt]}],\"outline-w\":[{outline:[Xi,Bo]}],\"outline-color\":[{outline:[e]}],\"ring-w\":[{ring:z()}],\"ring-w-inset\":[\"ring-inset\"],\"ring-color\":[{ring:[e]}],\"ring-opacity\":[{\"ring-opacity\":[k]}],\"ring-offset-w\":[{\"ring-offset\":[Xi,Bo]}],\"ring-offset-color\":[{\"ring-offset\":[e]}],shadow:[{shadow:[\"\",\"inner\",\"none\",Uo,c6]}],\"shadow-color\":[{shadow:[Eu]}],opacity:[{opacity:[k]}],\"mix-blend\":[{\"mix-blend\":[...W(),\"plus-lighter\",\"plus-darker\"]}],\"bg-blend\":[{\"bg-blend\":W()}],filter:[{filter:[\"\",\"none\"]}],blur:[{blur:[n]}],brightness:[{brightness:[a]}],contrast:[{contrast:[f]}],\"drop-shadow\":[{\"drop-shadow\":[\"\",\"none\",Uo,bt]}],grayscale:[{grayscale:[h]}],\"hue-rotate\":[{\"hue-rotate\":[v]}],invert:[{invert:[y]}],saturate:[{saturate:[M]}],sepia:[{sepia:[I]}],\"backdrop-filter\":[{\"backdrop-filter\":[\"\",\"none\"]}],\"backdrop-blur\":[{\"backdrop-blur\":[n]}],\"backdrop-brightness\":[{\"backdrop-brightness\":[a]}],\"backdrop-contrast\":[{\"backdrop-contrast\":[f]}],\"backdrop-grayscale\":[{\"backdrop-grayscale\":[h]}],\"backdrop-hue-rotate\":[{\"backdrop-hue-rotate\":[v]}],\"backdrop-invert\":[{\"backdrop-invert\":[y]}],\"backdrop-opacity\":[{\"backdrop-opacity\":[k]}],\"backdrop-saturate\":[{\"backdrop-saturate\":[M]}],\"backdrop-sepia\":[{\"backdrop-sepia\":[I]}],\"border-collapse\":[{border:[\"collapse\",\"separate\"]}],\"border-spacing\":[{\"border-spacing\":[c]}],\"border-spacing-x\":[{\"border-spacing-x\":[c]}],\"border-spacing-y\":[{\"border-spacing-y\":[c]}],\"table-layout\":[{table:[\"auto\",\"fixed\"]}],caption:[{caption:[\"top\",\"bottom\"]}],transition:[{transition:[\"none\",\"all\",\"\",\"colors\",\"opacity\",\"shadow\",\"transform\",bt]}],duration:[{duration:L()}],ease:[{ease:[\"linear\",\"in\",\"out\",\"in-out\",bt]}],delay:[{delay:L()}],animate:[{animate:[\"none\",\"spin\",\"ping\",\"pulse\",\"bounce\",bt]}],transform:[{transform:[\"\",\"gpu\",\"none\"]}],scale:[{scale:[j]}],\"scale-x\":[{\"scale-x\":[j]}],\"scale-y\":[{\"scale-y\":[j]}],rotate:[{rotate:[Ru,bt]}],\"translate-x\":[{\"translate-x\":[q]}],\"translate-y\":[{\"translate-y\":[q]}],\"skew-x\":[{\"skew-x\":[P]}],\"skew-y\":[{\"skew-y\":[P]}],\"transform-origin\":[{origin:[\"center\",\"top\",\"top-right\",\"right\",\"bottom-right\",\"bottom\",\"bottom-left\",\"left\",\"top-left\",bt]}],accent:[{accent:[\"auto\",e]}],appearance:[{appearance:[\"none\",\"auto\"]}],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\",bt]}],\"caret-color\":[{caret:[e]}],\"pointer-events\":[{\"pointer-events\":[\"none\",\"auto\"]}],resize:[{resize:[\"none\",\"y\",\"x\",\"\"]}],\"scroll-behavior\":[{scroll:[\"auto\",\"smooth\"]}],\"scroll-m\":[{\"scroll-m\":_()}],\"scroll-mx\":[{\"scroll-mx\":_()}],\"scroll-my\":[{\"scroll-my\":_()}],\"scroll-ms\":[{\"scroll-ms\":_()}],\"scroll-me\":[{\"scroll-me\":_()}],\"scroll-mt\":[{\"scroll-mt\":_()}],\"scroll-mr\":[{\"scroll-mr\":_()}],\"scroll-mb\":[{\"scroll-mb\":_()}],\"scroll-ml\":[{\"scroll-ml\":_()}],\"scroll-p\":[{\"scroll-p\":_()}],\"scroll-px\":[{\"scroll-px\":_()}],\"scroll-py\":[{\"scroll-py\":_()}],\"scroll-ps\":[{\"scroll-ps\":_()}],\"scroll-pe\":[{\"scroll-pe\":_()}],\"scroll-pt\":[{\"scroll-pt\":_()}],\"scroll-pr\":[{\"scroll-pr\":_()}],\"scroll-pb\":[{\"scroll-pb\":_()}],\"scroll-pl\":[{\"scroll-pl\":_()}],\"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\",bt]}],fill:[{fill:[e,\"none\"]}],\"stroke-w\":[{stroke:[Xi,Bo,Tg]}],stroke:[{stroke:[e,\"none\"]}],sr:[\"sr-only\",\"not-sr-only\"],\"forced-color-adjust\":[{\"forced-color-adjust\":[\"auto\",\"none\"]}]},conflictingClassGroups:{overflow:[\"overflow-x\",\"overflow-y\"],overscroll:[\"overscroll-x\",\"overscroll-y\"],inset:[\"inset-x\",\"inset-y\",\"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\",\"pt\",\"pr\",\"pb\",\"pl\"],px:[\"pr\",\"pl\"],py:[\"pt\",\"pb\"],m:[\"mx\",\"my\",\"ms\",\"me\",\"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-s\",\"border-w-e\",\"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-s\",\"border-color-e\",\"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\"],\"scroll-m\":[\"scroll-mx\",\"scroll-my\",\"scroll-ms\",\"scroll-me\",\"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-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\"]}}},m6=X4(h6);function je(...e){return m6(_M(e))}function uC(e){if(e===0)return\"0 B\";const t=1024,n=[\"B\",\"KB\",\"MB\",\"GB\",\"TB\"],a=Math.floor(Math.log(e)/Math.log(t));return`${(e/t**a).toFixed(2)} ${n[a]}`}function ab(e){return e<1?\"<1ms\":e<1e3?`${Math.round(e)}ms`:`${(e/1e3).toFixed(2)}s`}const zM=m.createContext(void 0);function p6({children:e}){const[t,n]=m.useState(()=>{const o=localStorage.getItem(\"concave-theme\");return o===\"light\"||o===\"dark\"?o:window.matchMedia?.(\"(prefers-color-scheme: dark)\").matches?\"dark\":\"light\"});m.useEffect(()=>{const o=document.documentElement;t===\"dark\"?o.classList.add(\"dark\"):o.classList.remove(\"dark\"),localStorage.setItem(\"concave-theme\",t)},[t]);const a=()=>{n(o=>o===\"light\"?\"dark\":\"light\")};return g.jsx(zM.Provider,{value:{theme:t,toggleTheme:a},children:e})}function PM(){const e=m.useContext(zM);if(e===void 0)throw new Error(\"useTheme must be used within a ThemeProvider\");return e}function us(e,t){return t===void 0?aC(e):aC(e,t)}function es(e){return Q5(e)}const g6=\"_system:systemListComponents\",v6=\"_system:systemListTables\",y6=\"_system:systemGetTableData\",b6=\"_system:systemDeleteDocument\",x6=\"_system:systemClearTable\",w6=\"_system:systemUpdateDocument\",S6=\"_system:systemInsertDocument\",C6=\"_system:systemGetLogs\",R6=\"_system:systemClearLogs\",E6=\"_system:systemGetAnalytics\",T6=\"_system:systemListStorage\",M6=\"_system:systemDeleteStorage\",k6=\"_system:systemListFunctions\",_6=\"_system:systemExecuteFunction\",A6=\"_system:systemListScheduledFunctions\",N6=\"_system:systemCancelScheduledFunction\",LM=m.createContext(null);function O6({children:e}){const[t,n]=m.useState(\"\"),a=us(g6),o=a??[],s=a===void 0;return g.jsx(LM.Provider,{value:{selectedComponent:t,setSelectedComponent:n,components:o,componentsLoading:s},children:e})}const D6={selectedComponent:\"\",setSelectedComponent:()=>{},components:[],componentsLoading:!1};function Ab(){return m.useContext(LM)??D6}function at(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}function dC(e,t){if(typeof e==\"function\")return e(t);e!=null&&(e.current=t)}function Zn(...e){return t=>{let n=!1;const a=e.map(o=>{const s=dC(o,t);return!n&&typeof s==\"function\"&&(n=!0),s});if(n)return()=>{for(let o=0;o<a.length;o++){const s=a[o];typeof s==\"function\"?s():dC(e[o],null)}}}}function pn(...e){return m.useCallback(Zn(...e),e)}function j6(e,t){const n=m.createContext(t),a=s=>{const{children:c,...u}=s,f=m.useMemo(()=>u,Object.values(u));return g.jsx(n.Provider,{value:f,children:c})};a.displayName=e+\"Provider\";function o(s){const c=m.useContext(n);if(c)return c;if(t!==void 0)return t;throw new Error(`\\`${s}\\` must be used within \\`${e}\\``)}return[a,o]}function mi(e,t=[]){let n=[];function a(s,c){const u=m.createContext(c),f=n.length;n=[...n,c];const h=y=>{const{scope:x,children:S,...w}=y,C=x?.[e]?.[f]||u,R=m.useMemo(()=>w,Object.values(w));return g.jsx(C.Provider,{value:R,children:S})};h.displayName=s+\"Provider\";function v(y,x){const S=x?.[e]?.[f]||u,w=m.useContext(S);if(w)return w;if(c!==void 0)return c;throw new Error(`\\`${y}\\` must be used within \\`${s}\\``)}return[h,v]}const o=()=>{const s=n.map(c=>m.createContext(c));return function(u){const f=u?.[e]||s;return m.useMemo(()=>({[`__scope${e}`]:{...u,[e]:f}}),[u,f])}};return o.scopeName=e,[a,z6(o,...t)]}function z6(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const a=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const c=a.reduce((u,{useScope:f,scopeName:h})=>{const y=f(s)[`__scope${h}`];return{...u,...y}},{});return m.useMemo(()=>({[`__scope${t.scopeName}`]:c}),[c])}};return n.scopeName=t.scopeName,n}var Sd=iM();const P6=Ua(Sd);function L6(e){const t=I6(e),n=m.forwardRef((a,o)=>{const{children:s,...c}=a,u=m.Children.toArray(s),f=u.find(q6);if(f){const h=f.props.children,v=u.map(y=>y===f?m.Children.count(h)>1?m.Children.only(null):m.isValidElement(h)?h.props.children:null:y);return g.jsx(t,{...c,ref:o,children:m.isValidElement(h)?m.cloneElement(h,void 0,v):null})}return g.jsx(t,{...c,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function I6(e){const t=m.forwardRef((n,a)=>{const{children:o,...s}=n;if(m.isValidElement(o)){const c=$6(o),u=F6(s,o.props);return o.type!==m.Fragment&&(u.ref=a?Zn(a,c):c),m.cloneElement(o,u)}return m.Children.count(o)>1?m.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var H6=Symbol(\"radix.slottable\");function q6(e){return m.isValidElement(e)&&typeof e.type==\"function\"&&\"__radixId\"in e.type&&e.type.__radixId===H6}function F6(e,t){const n={...t};for(const a in t){const o=e[a],s=t[a];/^on[A-Z]/.test(a)?o&&s?n[a]=(...u)=>{const f=s(...u);return o(...u),f}:o&&(n[a]=o):a===\"style\"?n[a]={...o,...s}:a===\"className\"&&(n[a]=[o,s].filter(Boolean).join(\" \"))}return{...e,...n}}function $6(e){let t=Object.getOwnPropertyDescriptor(e.props,\"ref\")?.get,n=t&&\"isReactWarning\"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,\"ref\")?.get,n=t&&\"isReactWarning\"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var B6=[\"a\",\"button\",\"div\",\"form\",\"h2\",\"h3\",\"img\",\"input\",\"label\",\"li\",\"nav\",\"ol\",\"p\",\"select\",\"span\",\"svg\",\"ul\"],IM=B6.reduce((e,t)=>{const n=L6(`Primitive.${t}`),a=m.forwardRef((o,s)=>{const{asChild:c,...u}=o,f=c?n:t;return typeof window<\"u\"&&(window[Symbol.for(\"radix-ui\")]=!0),g.jsx(f,{...u,ref:s})});return a.displayName=`Primitive.${t}`,{...e,[t]:a}},{});function U6(e,t){e&&Sd.flushSync(()=>e.dispatchEvent(t))}function eo(e){const t=m.useRef(e);return m.useEffect(()=>{t.current=e}),m.useMemo(()=>(...n)=>t.current?.(...n),[])}function V6(e,t=globalThis?.document){const n=eo(e);m.useEffect(()=>{const a=o=>{o.key===\"Escape\"&&n(o)};return t.addEventListener(\"keydown\",a,{capture:!0}),()=>t.removeEventListener(\"keydown\",a,{capture:!0})},[n,t])}var W6=\"DismissableLayer\",ib=\"dismissableLayer.update\",G6=\"dismissableLayer.pointerDownOutside\",Y6=\"dismissableLayer.focusOutside\",fC,HM=m.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Cd=m.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:c,onDismiss:u,...f}=e,h=m.useContext(HM),[v,y]=m.useState(null),x=v?.ownerDocument??globalThis?.document,[,S]=m.useState({}),w=pn(t,A=>y(A)),C=Array.from(h.layers),[R]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),k=C.indexOf(R),T=v?C.indexOf(v):-1,M=h.layersWithOutsidePointerEventsDisabled.size>0,j=T>=k,I=K6(A=>{const q=A.target,B=[...h.branches].some(V=>V.contains(q));!j||B||(o?.(A),c?.(A),A.defaultPrevented||u?.())},x),P=Z6(A=>{const q=A.target;[...h.branches].some(V=>V.contains(q))||(s?.(A),c?.(A),A.defaultPrevented||u?.())},x);return V6(A=>{T===h.layers.size-1&&(a?.(A),!A.defaultPrevented&&u&&(A.preventDefault(),u()))},x),m.useEffect(()=>{if(v)return n&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(fC=x.body.style.pointerEvents,x.body.style.pointerEvents=\"none\"),h.layersWithOutsidePointerEventsDisabled.add(v)),h.layers.add(v),hC(),()=>{n&&h.layersWithOutsidePointerEventsDisabled.size===1&&(x.body.style.pointerEvents=fC)}},[v,x,n,h]),m.useEffect(()=>()=>{v&&(h.layers.delete(v),h.layersWithOutsidePointerEventsDisabled.delete(v),hC())},[v,h]),m.useEffect(()=>{const A=()=>S({});return document.addEventListener(ib,A),()=>document.removeEventListener(ib,A)},[]),g.jsx(IM.div,{...f,ref:w,style:{pointerEvents:M?j?\"auto\":\"none\":void 0,...e.style},onFocusCapture:at(e.onFocusCapture,P.onFocusCapture),onBlurCapture:at(e.onBlurCapture,P.onBlurCapture),onPointerDownCapture:at(e.onPointerDownCapture,I.onPointerDownCapture)})});Cd.displayName=W6;var X6=\"DismissableLayerBranch\",Q6=m.forwardRef((e,t)=>{const n=m.useContext(HM),a=m.useRef(null),o=pn(t,a);return m.useEffect(()=>{const s=a.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),g.jsx(IM.div,{...e,ref:o})});Q6.displayName=X6;function K6(e,t=globalThis?.document){const n=eo(e),a=m.useRef(!1),o=m.useRef(()=>{});return m.useEffect(()=>{const s=u=>{if(u.target&&!a.current){let f=function(){qM(G6,n,h,{discrete:!0})};const h={originalEvent:u};u.pointerType===\"touch\"?(t.removeEventListener(\"click\",o.current),o.current=f,t.addEventListener(\"click\",o.current,{once:!0})):f()}else t.removeEventListener(\"click\",o.current);a.current=!1},c=window.setTimeout(()=>{t.addEventListener(\"pointerdown\",s)},0);return()=>{window.clearTimeout(c),t.removeEventListener(\"pointerdown\",s),t.removeEventListener(\"click\",o.current)}},[t,n]),{onPointerDownCapture:()=>a.current=!0}}function Z6(e,t=globalThis?.document){const n=eo(e),a=m.useRef(!1);return m.useEffect(()=>{const o=s=>{s.target&&!a.current&&qM(Y6,n,{originalEvent:s},{discrete:!1})};return t.addEventListener(\"focusin\",o),()=>t.removeEventListener(\"focusin\",o)},[t,n]),{onFocusCapture:()=>a.current=!0,onBlurCapture:()=>a.current=!1}}function hC(){const e=new CustomEvent(ib);document.dispatchEvent(e)}function qM(e,t,n,{discrete:a}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),a?U6(o,s):o.dispatchEvent(s)}var is=globalThis?.document?m.useLayoutEffect:()=>{},J6=Vh[\" useId \".trim().toString()]||(()=>{}),ej=0;function rs(e){const[t,n]=m.useState(J6());return is(()=>{n(a=>a??String(ej++))},[e]),t?`radix-${t}`:\"\"}const tj=[\"top\",\"right\",\"bottom\",\"left\"],os=Math.min,ua=Math.max,Rh=Math.round,Kf=Math.floor,ui=e=>({x:e,y:e}),nj={left:\"right\",right:\"left\",bottom:\"top\",top:\"bottom\"};function ob(e,t,n){return ua(e,os(t,n))}function to(e,t){return typeof e==\"function\"?e(t):e}function no(e){return e.split(\"-\")[0]}function Oc(e){return e.split(\"-\")[1]}function Nb(e){return e===\"x\"?\"y\":\"x\"}function Ob(e){return e===\"y\"?\"height\":\"width\"}function si(e){const t=e[0];return t===\"t\"||t===\"b\"?\"y\":\"x\"}function Db(e){return Nb(si(e))}function rj(e,t,n){n===void 0&&(n=!1);const a=Oc(e),o=Db(e),s=Ob(o);let c=o===\"x\"?a===(n?\"end\":\"start\")?\"right\":\"left\":a===\"start\"?\"bottom\":\"top\";return t.reference[s]>t.floating[s]&&(c=Eh(c)),[c,Eh(c)]}function aj(e){const t=Eh(e);return[sb(e),t,sb(t)]}function sb(e){return e.includes(\"start\")?e.replace(\"start\",\"end\"):e.replace(\"end\",\"start\")}const mC=[\"left\",\"right\"],pC=[\"right\",\"left\"],ij=[\"top\",\"bottom\"],oj=[\"bottom\",\"top\"];function sj(e,t,n){switch(e){case\"top\":case\"bottom\":return n?t?pC:mC:t?mC:pC;case\"left\":case\"right\":return t?ij:oj;default:return[]}}function lj(e,t,n,a){const o=Oc(e);let s=sj(no(e),n===\"start\",a);return o&&(s=s.map(c=>c+\"-\"+o),t&&(s=s.concat(s.map(sb)))),s}function Eh(e){const t=no(e);return nj[t]+e.slice(t.length)}function cj(e){return{top:0,right:0,bottom:0,left:0,...e}}function FM(e){return typeof e!=\"number\"?cj(e):{top:e,right:e,bottom:e,left:e}}function Th(e){const{x:t,y:n,width:a,height:o}=e;return{width:a,height:o,top:n,left:t,right:t+a,bottom:n+o,x:t,y:n}}function gC(e,t,n){let{reference:a,floating:o}=e;const s=si(t),c=Db(t),u=Ob(c),f=no(t),h=s===\"y\",v=a.x+a.width/2-o.width/2,y=a.y+a.height/2-o.height/2,x=a[u]/2-o[u]/2;let S;switch(f){case\"top\":S={x:v,y:a.y-o.height};break;case\"bottom\":S={x:v,y:a.y+a.height};break;case\"right\":S={x:a.x+a.width,y};break;case\"left\":S={x:a.x-o.width,y};break;default:S={x:a.x,y:a.y}}switch(Oc(t)){case\"start\":S[c]-=x*(n&&h?-1:1);break;case\"end\":S[c]+=x*(n&&h?-1:1);break}return S}async function uj(e,t){var n;t===void 0&&(t={});const{x:a,y:o,platform:s,rects:c,elements:u,strategy:f}=e,{boundary:h=\"clippingAncestors\",rootBoundary:v=\"viewport\",elementContext:y=\"floating\",altBoundary:x=!1,padding:S=0}=to(t,e),w=FM(S),R=u[x?y===\"floating\"?\"reference\":\"floating\":y],k=Th(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(R)))==null||n?R:R.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(u.floating)),boundary:h,rootBoundary:v,strategy:f})),T=y===\"floating\"?{x:a,y:o,width:c.floating.width,height:c.floating.height}:c.reference,M=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u.floating)),j=await(s.isElement==null?void 0:s.isElement(M))?await(s.getScale==null?void 0:s.getScale(M))||{x:1,y:1}:{x:1,y:1},I=Th(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:T,offsetParent:M,strategy:f}):T);return{top:(k.top-I.top+w.top)/j.y,bottom:(I.bottom-k.bottom+w.bottom)/j.y,left:(k.left-I.left+w.left)/j.x,right:(I.right-k.right+w.right)/j.x}}const dj=50,fj=async(e,t,n)=>{const{placement:a=\"bottom\",strategy:o=\"absolute\",middleware:s=[],platform:c}=n,u=c.detectOverflow?c:{...c,detectOverflow:uj},f=await(c.isRTL==null?void 0:c.isRTL(t));let h=await c.getElementRects({reference:e,floating:t,strategy:o}),{x:v,y}=gC(h,a,f),x=a,S=0;const w={};for(let C=0;C<s.length;C++){const R=s[C];if(!R)continue;const{name:k,fn:T}=R,{x:M,y:j,data:I,reset:P}=await T({x:v,y,initialPlacement:a,placement:x,strategy:o,middlewareData:w,rects:h,platform:u,elements:{reference:e,floating:t}});v=M??v,y=j??y,w[k]={...w[k],...I},P&&S<dj&&(S++,typeof P==\"object\"&&(P.placement&&(x=P.placement),P.rects&&(h=P.rects===!0?await c.getElementRects({reference:e,floating:t,strategy:o}):P.rects),{x:v,y}=gC(h,x,f)),C=-1)}return{x:v,y,placement:x,strategy:o,middlewareData:w}},hj=e=>({name:\"arrow\",options:e,async fn(t){const{x:n,y:a,placement:o,rects:s,platform:c,elements:u,middlewareData:f}=t,{element:h,padding:v=0}=to(e,t)||{};if(h==null)return{};const y=FM(v),x={x:n,y:a},S=Db(o),w=Ob(S),C=await c.getDimensions(h),R=S===\"y\",k=R?\"top\":\"left\",T=R?\"bottom\":\"right\",M=R?\"clientHeight\":\"clientWidth\",j=s.reference[w]+s.reference[S]-x[S]-s.floating[w],I=x[S]-s.reference[S],P=await(c.getOffsetParent==null?void 0:c.getOffsetParent(h));let A=P?P[M]:0;(!A||!await(c.isElement==null?void 0:c.isElement(P)))&&(A=u.floating[M]||s.floating[w]);const q=j/2-I/2,B=A/2-C[w]/2-1,V=os(y[k],B),N=os(y[T],B),_=V,z=A-C[w]-N,F=A/2-C[w]/2+q,O=ob(_,F,z),$=!f.arrow&&Oc(o)!=null&&F!==O&&s.reference[w]/2-(F<_?V:N)-C[w]/2<0,W=$?F<_?F-_:F-z:0;return{[S]:x[S]+W,data:{[S]:O,centerOffset:F-O-W,...$&&{alignmentOffset:W}},reset:$}}}),mj=function(e){return e===void 0&&(e={}),{name:\"flip\",options:e,async fn(t){var n,a;const{placement:o,middlewareData:s,rects:c,initialPlacement:u,platform:f,elements:h}=t,{mainAxis:v=!0,crossAxis:y=!0,fallbackPlacements:x,fallbackStrategy:S=\"bestFit\",fallbackAxisSideDirection:w=\"none\",flipAlignment:C=!0,...R}=to(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const k=no(o),T=si(u),M=no(u)===u,j=await(f.isRTL==null?void 0:f.isRTL(h.floating)),I=x||(M||!C?[Eh(u)]:aj(u)),P=w!==\"none\";!x&&P&&I.push(...lj(u,C,w,j));const A=[u,...I],q=await f.detectOverflow(t,R),B=[];let V=((a=s.flip)==null?void 0:a.overflows)||[];if(v&&B.push(q[k]),y){const F=rj(o,c,j);B.push(q[F[0]],q[F[1]])}if(V=[...V,{placement:o,overflows:B}],!B.every(F=>F<=0)){var N,_;const F=(((N=s.flip)==null?void 0:N.index)||0)+1,O=A[F];if(O&&(!(y===\"alignment\"?T!==si(O):!1)||V.every(U=>si(U.placement)===T?U.overflows[0]>0:!0)))return{data:{index:F,overflows:V},reset:{placement:O}};let $=(_=V.filter(W=>W.overflows[0]<=0).sort((W,U)=>W.overflows[1]-U.overflows[1])[0])==null?void 0:_.placement;if(!$)switch(S){case\"bestFit\":{var z;const W=(z=V.filter(U=>{if(P){const K=si(U.placement);return K===T||K===\"y\"}return!0}).map(U=>[U.placement,U.overflows.filter(K=>K>0).reduce((K,ie)=>K+ie,0)]).sort((U,K)=>U[1]-K[1])[0])==null?void 0:z[0];W&&($=W);break}case\"initialPlacement\":$=u;break}if(o!==$)return{reset:{placement:$}}}return{}}}};function vC(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function yC(e){return tj.some(t=>e[t]>=0)}const pj=function(e){return e===void 0&&(e={}),{name:\"hide\",options:e,async fn(t){const{rects:n,platform:a}=t,{strategy:o=\"referenceHidden\",...s}=to(e,t);switch(o){case\"referenceHidden\":{const c=await a.detectOverflow(t,{...s,elementContext:\"reference\"}),u=vC(c,n.reference);return{data:{referenceHiddenOffsets:u,referenceHidden:yC(u)}}}case\"escaped\":{const c=await a.detectOverflow(t,{...s,altBoundary:!0}),u=vC(c,n.floating);return{data:{escapedOffsets:u,escaped:yC(u)}}}default:return{}}}}},$M=new Set([\"left\",\"top\"]);async function gj(e,t){const{placement:n,platform:a,elements:o}=e,s=await(a.isRTL==null?void 0:a.isRTL(o.floating)),c=no(n),u=Oc(n),f=si(n)===\"y\",h=$M.has(c)?-1:1,v=s&&f?-1:1,y=to(t,e);let{mainAxis:x,crossAxis:S,alignmentAxis:w}=typeof y==\"number\"?{mainAxis:y,crossAxis:0,alignmentAxis:null}:{mainAxis:y.mainAxis||0,crossAxis:y.crossAxis||0,alignmentAxis:y.alignmentAxis};return u&&typeof w==\"number\"&&(S=u===\"end\"?w*-1:w),f?{x:S*v,y:x*h}:{x:x*h,y:S*v}}const vj=function(e){return e===void 0&&(e=0),{name:\"offset\",options:e,async fn(t){var n,a;const{x:o,y:s,placement:c,middlewareData:u}=t,f=await gj(t,e);return c===((n=u.offset)==null?void 0:n.placement)&&(a=u.arrow)!=null&&a.alignmentOffset?{}:{x:o+f.x,y:s+f.y,data:{...f,placement:c}}}}},yj=function(e){return e===void 0&&(e={}),{name:\"shift\",options:e,async fn(t){const{x:n,y:a,placement:o,platform:s}=t,{mainAxis:c=!0,crossAxis:u=!1,limiter:f={fn:k=>{let{x:T,y:M}=k;return{x:T,y:M}}},...h}=to(e,t),v={x:n,y:a},y=await s.detectOverflow(t,h),x=si(no(o)),S=Nb(x);let w=v[S],C=v[x];if(c){const k=S===\"y\"?\"top\":\"left\",T=S===\"y\"?\"bottom\":\"right\",M=w+y[k],j=w-y[T];w=ob(M,w,j)}if(u){const k=x===\"y\"?\"top\":\"left\",T=x===\"y\"?\"bottom\":\"right\",M=C+y[k],j=C-y[T];C=ob(M,C,j)}const R=f.fn({...t,[S]:w,[x]:C});return{...R,data:{x:R.x-n,y:R.y-a,enabled:{[S]:c,[x]:u}}}}}},bj=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:a,placement:o,rects:s,middlewareData:c}=t,{offset:u=0,mainAxis:f=!0,crossAxis:h=!0}=to(e,t),v={x:n,y:a},y=si(o),x=Nb(y);let S=v[x],w=v[y];const C=to(u,t),R=typeof C==\"number\"?{mainAxis:C,crossAxis:0}:{mainAxis:0,crossAxis:0,...C};if(f){const M=x===\"y\"?\"height\":\"width\",j=s.reference[x]-s.floating[M]+R.mainAxis,I=s.reference[x]+s.reference[M]-R.mainAxis;S<j?S=j:S>I&&(S=I)}if(h){var k,T;const M=x===\"y\"?\"width\":\"height\",j=$M.has(no(o)),I=s.reference[y]-s.floating[M]+(j&&((k=c.offset)==null?void 0:k[y])||0)+(j?0:R.crossAxis),P=s.reference[y]+s.reference[M]+(j?0:((T=c.offset)==null?void 0:T[y])||0)-(j?R.crossAxis:0);w<I?w=I:w>P&&(w=P)}return{[x]:S,[y]:w}}}},xj=function(e){return e===void 0&&(e={}),{name:\"size\",options:e,async fn(t){var n,a;const{placement:o,rects:s,platform:c,elements:u}=t,{apply:f=()=>{},...h}=to(e,t),v=await c.detectOverflow(t,h),y=no(o),x=Oc(o),S=si(o)===\"y\",{width:w,height:C}=s.floating;let R,k;y===\"top\"||y===\"bottom\"?(R=y,k=x===(await(c.isRTL==null?void 0:c.isRTL(u.floating))?\"start\":\"end\")?\"left\":\"right\"):(k=y,R=x===\"end\"?\"top\":\"bottom\");const T=C-v.top-v.bottom,M=w-v.left-v.right,j=os(C-v[R],T),I=os(w-v[k],M),P=!t.middlewareData.shift;let A=j,q=I;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(q=M),(a=t.middlewareData.shift)!=null&&a.enabled.y&&(A=T),P&&!x){const V=ua(v.left,0),N=ua(v.right,0),_=ua(v.top,0),z=ua(v.bottom,0);S?q=w-2*(V!==0||N!==0?V+N:ua(v.left,v.right)):A=C-2*(_!==0||z!==0?_+z:ua(v.top,v.bottom))}await f({...t,availableWidth:q,availableHeight:A});const B=await c.getDimensions(u.floating);return w!==B.width||C!==B.height?{reset:{rects:!0}}:{}}}};function Gh(){return typeof window<\"u\"}function Dc(e){return BM(e)?(e.nodeName||\"\").toLowerCase():\"#document\"}function ha(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function pi(e){var t;return(t=(BM(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function BM(e){return Gh()?e instanceof Node||e instanceof ha(e).Node:!1}function $a(e){return Gh()?e instanceof Element||e instanceof ha(e).Element:!1}function ao(e){return Gh()?e instanceof HTMLElement||e instanceof ha(e).HTMLElement:!1}function bC(e){return!Gh()||typeof ShadowRoot>\"u\"?!1:e instanceof ShadowRoot||e instanceof ha(e).ShadowRoot}function Rd(e){const{overflow:t,overflowX:n,overflowY:a,display:o}=Ba(e);return/auto|scroll|overlay|hidden|clip/.test(t+a+n)&&o!==\"inline\"&&o!==\"contents\"}function wj(e){return/^(table|td|th)$/.test(Dc(e))}function Yh(e){try{if(e.matches(\":popover-open\"))return!0}catch{}try{return e.matches(\":modal\")}catch{return!1}}const Sj=/transform|translate|scale|rotate|perspective|filter/,Cj=/paint|layout|strict|content/,Us=e=>!!e&&e!==\"none\";let Mg;function jb(e){const t=$a(e)?Ba(e):e;return Us(t.transform)||Us(t.translate)||Us(t.scale)||Us(t.rotate)||Us(t.perspective)||!zb()&&(Us(t.backdropFilter)||Us(t.filter))||Sj.test(t.willChange||\"\")||Cj.test(t.contain||\"\")}function Rj(e){let t=ss(e);for(;ao(t)&&!Ec(t);){if(jb(t))return t;if(Yh(t))return null;t=ss(t)}return null}function zb(){return Mg==null&&(Mg=typeof CSS<\"u\"&&CSS.supports&&CSS.supports(\"-webkit-backdrop-filter\",\"none\")),Mg}function Ec(e){return/^(html|body|#document)$/.test(Dc(e))}function Ba(e){return ha(e).getComputedStyle(e)}function Xh(e){return $a(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ss(e){if(Dc(e)===\"html\")return e;const t=e.assignedSlot||e.parentNode||bC(e)&&e.host||pi(e);return bC(t)?t.host:t}function UM(e){const t=ss(e);return Ec(t)?e.ownerDocument?e.ownerDocument.body:e.body:ao(t)&&Rd(t)?t:UM(t)}function cd(e,t,n){var a;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=UM(e),s=o===((a=e.ownerDocument)==null?void 0:a.body),c=ha(o);if(s){const u=lb(c);return t.concat(c,c.visualViewport||[],Rd(o)?o:[],u&&n?cd(u):[])}else return t.concat(o,cd(o,[],n))}function lb(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function VM(e){const t=Ba(e);let n=parseFloat(t.width)||0,a=parseFloat(t.height)||0;const o=ao(e),s=o?e.offsetWidth:n,c=o?e.offsetHeight:a,u=Rh(n)!==s||Rh(a)!==c;return u&&(n=s,a=c),{width:n,height:a,$:u}}function Pb(e){return $a(e)?e:e.contextElement}function vc(e){const t=Pb(e);if(!ao(t))return ui(1);const n=t.getBoundingClientRect(),{width:a,height:o,$:s}=VM(t);let c=(s?Rh(n.width):n.width)/a,u=(s?Rh(n.height):n.height)/o;return(!c||!Number.isFinite(c))&&(c=1),(!u||!Number.isFinite(u))&&(u=1),{x:c,y:u}}const Ej=ui(0);function WM(e){const t=ha(e);return!zb()||!t.visualViewport?Ej:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Tj(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ha(e)?!1:t}function rl(e,t,n,a){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=Pb(e);let c=ui(1);t&&(a?$a(a)&&(c=vc(a)):c=vc(e));const u=Tj(s,n,a)?WM(s):ui(0);let f=(o.left+u.x)/c.x,h=(o.top+u.y)/c.y,v=o.width/c.x,y=o.height/c.y;if(s){const x=ha(s),S=a&&$a(a)?ha(a):a;let w=x,C=lb(w);for(;C&&a&&S!==w;){const R=vc(C),k=C.getBoundingClientRect(),T=Ba(C),M=k.left+(C.clientLeft+parseFloat(T.paddingLeft))*R.x,j=k.top+(C.clientTop+parseFloat(T.paddingTop))*R.y;f*=R.x,h*=R.y,v*=R.x,y*=R.y,f+=M,h+=j,w=ha(C),C=lb(w)}}return Th({width:v,height:y,x:f,y:h})}function Qh(e,t){const n=Xh(e).scrollLeft;return t?t.left+n:rl(pi(e)).left+n}function GM(e,t){const n=e.getBoundingClientRect(),a=n.left+t.scrollLeft-Qh(e,n),o=n.top+t.scrollTop;return{x:a,y:o}}function Mj(e){let{elements:t,rect:n,offsetParent:a,strategy:o}=e;const s=o===\"fixed\",c=pi(a),u=t?Yh(t.floating):!1;if(a===c||u&&s)return n;let f={scrollLeft:0,scrollTop:0},h=ui(1);const v=ui(0),y=ao(a);if((y||!y&&!s)&&((Dc(a)!==\"body\"||Rd(c))&&(f=Xh(a)),y)){const S=rl(a);h=vc(a),v.x=S.x+a.clientLeft,v.y=S.y+a.clientTop}const x=c&&!y&&!s?GM(c,f):ui(0);return{width:n.width*h.x,height:n.height*h.y,x:n.x*h.x-f.scrollLeft*h.x+v.x+x.x,y:n.y*h.y-f.scrollTop*h.y+v.y+x.y}}function kj(e){return Array.from(e.getClientRects())}function _j(e){const t=pi(e),n=Xh(e),a=e.ownerDocument.body,o=ua(t.scrollWidth,t.clientWidth,a.scrollWidth,a.clientWidth),s=ua(t.scrollHeight,t.clientHeight,a.scrollHeight,a.clientHeight);let c=-n.scrollLeft+Qh(e);const u=-n.scrollTop;return Ba(a).direction===\"rtl\"&&(c+=ua(t.clientWidth,a.clientWidth)-o),{width:o,height:s,x:c,y:u}}const xC=25;function Aj(e,t){const n=ha(e),a=pi(e),o=n.visualViewport;let s=a.clientWidth,c=a.clientHeight,u=0,f=0;if(o){s=o.width,c=o.height;const v=zb();(!v||v&&t===\"fixed\")&&(u=o.offsetLeft,f=o.offsetTop)}const h=Qh(a);if(h<=0){const v=a.ownerDocument,y=v.body,x=getComputedStyle(y),S=v.compatMode===\"CSS1Compat\"&&parseFloat(x.marginLeft)+parseFloat(x.marginRight)||0,w=Math.abs(a.clientWidth-y.clientWidth-S);w<=xC&&(s-=w)}else h<=xC&&(s+=h);return{width:s,height:c,x:u,y:f}}function Nj(e,t){const n=rl(e,!0,t===\"fixed\"),a=n.top+e.clientTop,o=n.left+e.clientLeft,s=ao(e)?vc(e):ui(1),c=e.clientWidth*s.x,u=e.clientHeight*s.y,f=o*s.x,h=a*s.y;return{width:c,height:u,x:f,y:h}}function wC(e,t,n){let a;if(t===\"viewport\")a=Aj(e,n);else if(t===\"document\")a=_j(pi(e));else if($a(t))a=Nj(t,n);else{const o=WM(e);a={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Th(a)}function YM(e,t){const n=ss(e);return n===t||!$a(n)||Ec(n)?!1:Ba(n).position===\"fixed\"||YM(n,t)}function Oj(e,t){const n=t.get(e);if(n)return n;let a=cd(e,[],!1).filter(u=>$a(u)&&Dc(u)!==\"body\"),o=null;const s=Ba(e).position===\"fixed\";let c=s?ss(e):e;for(;$a(c)&&!Ec(c);){const u=Ba(c),f=jb(c);!f&&u.position===\"fixed\"&&(o=null),(s?!f&&!o:!f&&u.position===\"static\"&&!!o&&(o.position===\"absolute\"||o.position===\"fixed\")||Rd(c)&&!f&&YM(e,c))?a=a.filter(v=>v!==c):o=u,c=ss(c)}return t.set(e,a),a}function Dj(e){let{element:t,boundary:n,rootBoundary:a,strategy:o}=e;const c=[...n===\"clippingAncestors\"?Yh(t)?[]:Oj(t,this._c):[].concat(n),a],u=wC(t,c[0],o);let f=u.top,h=u.right,v=u.bottom,y=u.left;for(let x=1;x<c.length;x++){const S=wC(t,c[x],o);f=ua(S.top,f),h=os(S.right,h),v=os(S.bottom,v),y=ua(S.left,y)}return{width:h-y,height:v-f,x:y,y:f}}function jj(e){const{width:t,height:n}=VM(e);return{width:t,height:n}}function zj(e,t,n){const a=ao(t),o=pi(t),s=n===\"fixed\",c=rl(e,!0,s,t);let u={scrollLeft:0,scrollTop:0};const f=ui(0);function h(){f.x=Qh(o)}if(a||!a&&!s)if((Dc(t)!==\"body\"||Rd(o))&&(u=Xh(t)),a){const S=rl(t,!0,s,t);f.x=S.x+t.clientLeft,f.y=S.y+t.clientTop}else o&&h();s&&!a&&o&&h();const v=o&&!a&&!s?GM(o,u):ui(0),y=c.left+u.scrollLeft-f.x-v.x,x=c.top+u.scrollTop-f.y-v.y;return{x:y,y:x,width:c.width,height:c.height}}function kg(e){return Ba(e).position===\"static\"}function SC(e,t){if(!ao(e)||Ba(e).position===\"fixed\")return null;if(t)return t(e);let n=e.offsetParent;return pi(e)===n&&(n=n.ownerDocument.body),n}function XM(e,t){const n=ha(e);if(Yh(e))return n;if(!ao(e)){let o=ss(e);for(;o&&!Ec(o);){if($a(o)&&!kg(o))return o;o=ss(o)}return n}let a=SC(e,t);for(;a&&wj(a)&&kg(a);)a=SC(a,t);return a&&Ec(a)&&kg(a)&&!jb(a)?n:a||Rj(e)||n}const Pj=async function(e){const t=this.getOffsetParent||XM,n=this.getDimensions,a=await n(e.floating);return{reference:zj(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:a.width,height:a.height}}};function Lj(e){return Ba(e).direction===\"rtl\"}const Ij={convertOffsetParentRelativeRectToViewportRelativeRect:Mj,getDocumentElement:pi,getClippingRect:Dj,getOffsetParent:XM,getElementRects:Pj,getClientRects:kj,getDimensions:jj,getScale:vc,isElement:$a,isRTL:Lj};function QM(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Hj(e,t){let n=null,a;const o=pi(e);function s(){var u;clearTimeout(a),(u=n)==null||u.disconnect(),n=null}function c(u,f){u===void 0&&(u=!1),f===void 0&&(f=1),s();const h=e.getBoundingClientRect(),{left:v,top:y,width:x,height:S}=h;if(u||t(),!x||!S)return;const w=Kf(y),C=Kf(o.clientWidth-(v+x)),R=Kf(o.clientHeight-(y+S)),k=Kf(v),M={rootMargin:-w+\"px \"+-C+\"px \"+-R+\"px \"+-k+\"px\",threshold:ua(0,os(1,f))||1};let j=!0;function I(P){const A=P[0].intersectionRatio;if(A!==f){if(!j)return c();A?c(!1,A):a=setTimeout(()=>{c(!1,1e-7)},1e3)}A===1&&!QM(h,e.getBoundingClientRect())&&c(),j=!1}try{n=new IntersectionObserver(I,{...M,root:o.ownerDocument})}catch{n=new IntersectionObserver(I,M)}n.observe(e)}return c(!0),s}function qj(e,t,n,a){a===void 0&&(a={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:c=typeof ResizeObserver==\"function\",layoutShift:u=typeof IntersectionObserver==\"function\",animationFrame:f=!1}=a,h=Pb(e),v=o||s?[...h?cd(h):[],...t?cd(t):[]]:[];v.forEach(k=>{o&&k.addEventListener(\"scroll\",n,{passive:!0}),s&&k.addEventListener(\"resize\",n)});const y=h&&u?Hj(h,n):null;let x=-1,S=null;c&&(S=new ResizeObserver(k=>{let[T]=k;T&&T.target===h&&S&&t&&(S.unobserve(t),cancelAnimationFrame(x),x=requestAnimationFrame(()=>{var M;(M=S)==null||M.observe(t)})),n()}),h&&!f&&S.observe(h),t&&S.observe(t));let w,C=f?rl(e):null;f&&R();function R(){const k=rl(e);C&&!QM(C,k)&&n(),C=k,w=requestAnimationFrame(R)}return n(),()=>{var k;v.forEach(T=>{o&&T.removeEventListener(\"scroll\",n),s&&T.removeEventListener(\"resize\",n)}),y?.(),(k=S)==null||k.disconnect(),S=null,f&&cancelAnimationFrame(w)}}const Fj=vj,$j=yj,Bj=mj,Uj=xj,Vj=pj,CC=hj,Wj=bj,Gj=(e,t,n)=>{const a=new Map,o={platform:Ij,...n},s={...o.platform,_c:a};return fj(e,t,{...o,platform:s})};var Yj=typeof document<\"u\",Xj=function(){},mh=Yj?m.useLayoutEffect:Xj;function Mh(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==\"function\"&&e.toString()===t.toString())return!0;let n,a,o;if(e&&t&&typeof e==\"object\"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(a=n;a--!==0;)if(!Mh(e[a],t[a]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(a=n;a--!==0;)if(!{}.hasOwnProperty.call(t,o[a]))return!1;for(a=n;a--!==0;){const s=o[a];if(!(s===\"_owner\"&&e.$$typeof)&&!Mh(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function KM(e){return typeof window>\"u\"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function RC(e,t){const n=KM(e);return Math.round(t*n)/n}function _g(e){const t=m.useRef(e);return mh(()=>{t.current=e}),t}function Qj(e){e===void 0&&(e={});const{placement:t=\"bottom\",strategy:n=\"absolute\",middleware:a=[],platform:o,elements:{reference:s,floating:c}={},transform:u=!0,whileElementsMounted:f,open:h}=e,[v,y]=m.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[x,S]=m.useState(a);Mh(x,a)||S(a);const[w,C]=m.useState(null),[R,k]=m.useState(null),T=m.useCallback(U=>{U!==P.current&&(P.current=U,C(U))},[]),M=m.useCallback(U=>{U!==A.current&&(A.current=U,k(U))},[]),j=s||w,I=c||R,P=m.useRef(null),A=m.useRef(null),q=m.useRef(v),B=f!=null,V=_g(f),N=_g(o),_=_g(h),z=m.useCallback(()=>{if(!P.current||!A.current)return;const U={placement:t,strategy:n,middleware:x};N.current&&(U.platform=N.current),Gj(P.current,A.current,U).then(K=>{const ie={...K,isPositioned:_.current!==!1};F.current&&!Mh(q.current,ie)&&(q.current=ie,Sd.flushSync(()=>{y(ie)}))})},[x,t,n,N,_]);mh(()=>{h===!1&&q.current.isPositioned&&(q.current.isPositioned=!1,y(U=>({...U,isPositioned:!1})))},[h]);const F=m.useRef(!1);mh(()=>(F.current=!0,()=>{F.current=!1}),[]),mh(()=>{if(j&&(P.current=j),I&&(A.current=I),j&&I){if(V.current)return V.current(j,I,z);z()}},[j,I,z,V,B]);const O=m.useMemo(()=>({reference:P,floating:A,setReference:T,setFloating:M}),[T,M]),$=m.useMemo(()=>({reference:j,floating:I}),[j,I]),W=m.useMemo(()=>{const U={position:n,left:0,top:0};if(!$.floating)return U;const K=RC($.floating,v.x),ie=RC($.floating,v.y);return u?{...U,transform:\"translate(\"+K+\"px, \"+ie+\"px)\",...KM($.floating)>=1.5&&{willChange:\"transform\"}}:{position:n,left:K,top:ie}},[n,u,$.floating,v.x,v.y]);return m.useMemo(()=>({...v,update:z,refs:O,elements:$,floatingStyles:W}),[v,z,O,$,W])}const Kj=e=>{function t(n){return{}.hasOwnProperty.call(n,\"current\")}return{name:\"arrow\",options:e,fn(n){const{element:a,padding:o}=typeof e==\"function\"?e(n):e;return a&&t(a)?a.current!=null?CC({element:a.current,padding:o}).fn(n):{}:a?CC({element:a,padding:o}).fn(n):{}}}},Zj=(e,t)=>{const n=Fj(e);return{name:n.name,fn:n.fn,options:[e,t]}},Jj=(e,t)=>{const n=$j(e);return{name:n.name,fn:n.fn,options:[e,t]}},e8=(e,t)=>({fn:Wj(e).fn,options:[e,t]}),t8=(e,t)=>{const n=Bj(e);return{name:n.name,fn:n.fn,options:[e,t]}},n8=(e,t)=>{const n=Uj(e);return{name:n.name,fn:n.fn,options:[e,t]}},r8=(e,t)=>{const n=Vj(e);return{name:n.name,fn:n.fn,options:[e,t]}},a8=(e,t)=>{const n=Kj(e);return{name:n.name,fn:n.fn,options:[e,t]}};function i8(e){const t=o8(e),n=m.forwardRef((a,o)=>{const{children:s,...c}=a,u=m.Children.toArray(s),f=u.find(l8);if(f){const h=f.props.children,v=u.map(y=>y===f?m.Children.count(h)>1?m.Children.only(null):m.isValidElement(h)?h.props.children:null:y);return g.jsx(t,{...c,ref:o,children:m.isValidElement(h)?m.cloneElement(h,void 0,v):null})}return g.jsx(t,{...c,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function o8(e){const t=m.forwardRef((n,a)=>{const{children:o,...s}=n;if(m.isValidElement(o)){const c=u8(o),u=c8(s,o.props);return o.type!==m.Fragment&&(u.ref=a?Zn(a,c):c),m.cloneElement(o,u)}return m.Children.count(o)>1?m.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var s8=Symbol(\"radix.slottable\");function l8(e){return m.isValidElement(e)&&typeof e.type==\"function\"&&\"__radixId\"in e.type&&e.type.__radixId===s8}function c8(e,t){const n={...t};for(const a in t){const o=e[a],s=t[a];/^on[A-Z]/.test(a)?o&&s?n[a]=(...u)=>{const f=s(...u);return o(...u),f}:o&&(n[a]=o):a===\"style\"?n[a]={...o,...s}:a===\"className\"&&(n[a]=[o,s].filter(Boolean).join(\" \"))}return{...e,...n}}function u8(e){let t=Object.getOwnPropertyDescriptor(e.props,\"ref\")?.get,n=t&&\"isReactWarning\"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,\"ref\")?.get,n=t&&\"isReactWarning\"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var d8=[\"a\",\"button\",\"div\",\"form\",\"h2\",\"h3\",\"img\",\"input\",\"label\",\"li\",\"nav\",\"ol\",\"p\",\"select\",\"span\",\"svg\",\"ul\"],f8=d8.reduce((e,t)=>{const n=i8(`Primitive.${t}`),a=m.forwardRef((o,s)=>{const{asChild:c,...u}=o,f=c?n:t;return typeof window<\"u\"&&(window[Symbol.for(\"radix-ui\")]=!0),g.jsx(f,{...u,ref:s})});return a.displayName=`Primitive.${t}`,{...e,[t]:a}},{}),h8=\"Arrow\",ZM=m.forwardRef((e,t)=>{const{children:n,width:a=10,height:o=5,...s}=e;return g.jsx(f8.svg,{...s,ref:t,width:a,height:o,viewBox:\"0 0 30 10\",preserveAspectRatio:\"none\",children:e.asChild?n:g.jsx(\"polygon\",{points:\"0,0 30,0 15,10\"})})});ZM.displayName=h8;var m8=ZM;function p8(e){const t=g8(e),n=m.forwardRef((a,o)=>{const{children:s,...c}=a,u=m.Children.toArray(s),f=u.find(y8);if(f){const h=f.props.children,v=u.map(y=>y===f?m.Children.count(h)>1?m.Children.only(null):m.isValidElement(h)?h.props.children:null:y);return g.jsx(t,{...c,ref:o,children:m.isValidElement(h)?m.cloneElement(h,void 0,v):null})}return g.jsx(t,{...c,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function g8(e){const t=m.forwardRef((n,a)=>{const{children:o,...s}=n;if(m.isValidElement(o)){const c=x8(o),u=b8(s,o.props);return o.type!==m.Fragment&&(u.ref=a?Zn(a,c):c),m.cloneElement(o,u)}return m.Children.count(o)>1?m.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var v8=Symbol(\"radix.slottable\");function y8(e){return m.isValidElement(e)&&typeof e.type==\"function\"&&\"__radixId\"in e.type&&e.type.__radixId===v8}function b8(e,t){const n={...t};for(const a in t){const o=e[a],s=t[a];/^on[A-Z]/.test(a)?o&&s?n[a]=(...u)=>{const f=s(...u);return o(...u),f}:o&&(n[a]=o):a===\"style\"?n[a]={...o,...s}:a===\"className\"&&(n[a]=[o,s].filter(Boolean).join(\" \"))}return{...e,...n}}function x8(e){let t=Object.getOwnPropertyDescriptor(e.props,\"ref\")?.get,n=t&&\"isReactWarning\"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,\"ref\")?.get,n=t&&\"isReactWarning\"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var w8=[\"a\",\"button\",\"div\",\"form\",\"h2\",\"h3\",\"img\",\"input\",\"label\",\"li\",\"nav\",\"ol\",\"p\",\"select\",\"span\",\"svg\",\"ul\"],JM=w8.reduce((e,t)=>{const n=p8(`Primitive.${t}`),a=m.forwardRef((o,s)=>{const{asChild:c,...u}=o,f=c?n:t;return typeof window<\"u\"&&(window[Symbol.for(\"radix-ui\")]=!0),g.jsx(f,{...u,ref:s})});return a.displayName=`Primitive.${t}`,{...e,[t]:a}},{});function ek(e){const[t,n]=m.useState(void 0);return is(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const a=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let c,u;if(\"borderBoxSize\"in s){const f=s.borderBoxSize,h=Array.isArray(f)?f[0]:f;c=h.inlineSize,u=h.blockSize}else c=e.offsetWidth,u=e.offsetHeight;n({width:c,height:u})});return a.observe(e,{box:\"border-box\"}),()=>a.unobserve(e)}else n(void 0)},[e]),t}var Lb=\"Popper\",[tk,jc]=mi(Lb),[S8,nk]=tk(Lb),rk=e=>{const{__scopePopper:t,children:n}=e,[a,o]=m.useState(null);return g.jsx(S8,{scope:t,anchor:a,onAnchorChange:o,children:n})};rk.displayName=Lb;var ak=\"PopperAnchor\",ik=m.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:a,...o}=e,s=nk(ak,n),c=m.useRef(null),u=pn(t,c),f=m.useRef(null);return m.useEffect(()=>{const h=f.current;f.current=a?.current||c.current,h!==f.current&&s.onAnchorChange(f.current)}),a?null:g.jsx(JM.div,{...o,ref:u})});ik.displayName=ak;var Ib=\"PopperContent\",[C8,R8]=tk(Ib),ok=m.forwardRef((e,t)=>{const{__scopePopper:n,side:a=\"bottom\",sideOffset:o=0,align:s=\"center\",alignOffset:c=0,arrowPadding:u=0,avoidCollisions:f=!0,collisionBoundary:h=[],collisionPadding:v=0,sticky:y=\"partial\",hideWhenDetached:x=!1,updatePositionStrategy:S=\"optimized\",onPlaced:w,...C}=e,R=nk(Ib,n),[k,T]=m.useState(null),M=pn(t,ne=>T(ne)),[j,I]=m.useState(null),P=ek(j),A=P?.width??0,q=P?.height??0,B=a+(s!==\"center\"?\"-\"+s:\"\"),V=typeof v==\"number\"?v:{top:0,right:0,bottom:0,left:0,...v},N=Array.isArray(h)?h:[h],_=N.length>0,z={padding:V,boundary:N.filter(T8),altBoundary:_},{refs:F,floatingStyles:O,placement:$,isPositioned:W,middlewareData:U}=Qj({strategy:\"fixed\",placement:B,whileElementsMounted:(...ne)=>qj(...ne,{animationFrame:S===\"always\"}),elements:{reference:R.anchor},middleware:[Zj({mainAxis:o+q,alignmentAxis:c}),f&&Jj({mainAxis:!0,crossAxis:!1,limiter:y===\"partial\"?e8():void 0,...z}),f&&t8({...z}),n8({...z,apply:({elements:ne,rects:me,availableWidth:Me,availableHeight:Fe})=>{const{width:Ue,height:tt}=me.reference,Le=ne.floating.style;Le.setProperty(\"--radix-popper-available-width\",`${Me}px`),Le.setProperty(\"--radix-popper-available-height\",`${Fe}px`),Le.setProperty(\"--radix-popper-anchor-width\",`${Ue}px`),Le.setProperty(\"--radix-popper-anchor-height\",`${tt}px`)}}),j&&a8({element:j,padding:u}),M8({arrowWidth:A,arrowHeight:q}),x&&r8({strategy:\"referenceHidden\",...z})]}),[K,ie]=ck($),L=eo(w);is(()=>{W&&L?.()},[W,L]);const X=U.arrow?.x,Y=U.arrow?.y,re=U.arrow?.centerOffset!==0,[Z,oe]=m.useState();return is(()=>{k&&oe(window.getComputedStyle(k).zIndex)},[k]),g.jsx(\"div\",{ref:F.setFloating,\"data-radix-popper-content-wrapper\":\"\",style:{...O,transform:W?O.transform:\"translate(0, -200%)\",minWidth:\"max-content\",zIndex:Z,\"--radix-popper-transform-origin\":[U.transformOrigin?.x,U.transformOrigin?.y].join(\" \"),...U.hide?.referenceHidden&&{visibility:\"hidden\",pointerEvents:\"none\"}},dir:e.dir,children:g.jsx(C8,{scope:n,placedSide:K,onArrowChange:I,arrowX:X,arrowY:Y,shouldHideArrow:re,children:g.jsx(JM.div,{\"data-side\":K,\"data-align\":ie,...C,ref:M,style:{...C.style,animation:W?void 0:\"none\"}})})})});ok.displayName=Ib;var sk=\"PopperArrow\",E8={top:\"bottom\",right:\"left\",bottom:\"top\",left:\"right\"},lk=m.forwardRef(function(t,n){const{__scopePopper:a,...o}=t,s=R8(sk,a),c=E8[s.placedSide];return g.jsx(\"span\",{ref:s.onArrowChange,style:{position:\"absolute\",left:s.arrowX,top:s.arrowY,[c]:0,transformOrigin:{top:\"\",right:\"0 0\",bottom:\"center 0\",left:\"100% 0\"}[s.placedSide],transform:{top:\"translateY(100%)\",right:\"translateY(50%) rotate(90deg) translateX(-50%)\",bottom:\"rotate(180deg)\",left:\"translateY(50%) rotate(-90deg) translateX(50%)\"}[s.placedSide],visibility:s.shouldHideArrow?\"hidden\":void 0},children:g.jsx(m8,{...o,ref:n,style:{...o.style,display:\"block\"}})})});lk.displayName=sk;function T8(e){return e!==null}var M8=e=>({name:\"transformOrigin\",options:e,fn(t){const{placement:n,rects:a,middlewareData:o}=t,c=o.arrow?.centerOffset!==0,u=c?0:e.arrowWidth,f=c?0:e.arrowHeight,[h,v]=ck(n),y={start:\"0%\",center:\"50%\",end:\"100%\"}[v],x=(o.arrow?.x??0)+u/2,S=(o.arrow?.y??0)+f/2;let w=\"\",C=\"\";return h===\"bottom\"?(w=c?y:`${x}px`,C=`${-f}px`):h===\"top\"?(w=c?y:`${x}px`,C=`${a.floating.height+f}px`):h===\"right\"?(w=`${-f}px`,C=c?y:`${S}px`):h===\"left\"&&(w=`${a.floating.width+f}px`,C=c?y:`${S}px`),{data:{x:w,y:C}}}});function ck(e){const[t,n=\"center\"]=e.split(\"-\");return[t,n]}var Hb=rk,Kh=ik,qb=ok,Fb=lk;function k8(e){const t=_8(e),n=m.forwardRef((a,o)=>{const{children:s,...c}=a,u=m.Children.toArray(s),f=u.find(N8);if(f){const h=f.props.children,v=u.map(y=>y===f?m.Children.count(h)>1?m.Children.only(null):m.isValidElement(h)?h.props.children:null:y);return g.jsx(t,{...c,ref:o,children:m.isValidElement(h)?m.cloneElement(h,void 0,v):null})}return g.jsx(t,{...c,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function _8(e){const t=m.forwardRef((n,a)=>{const{children:o,...s}=n;if(m.isValidElement(o)){const c=D8(o),u=O8(s,o.props);return o.type!==m.Fragment&&(u.ref=a?Zn(a,c):c),m.cloneElement(o,u)}return m.Children.count(o)>1?m.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var A8=Symbol(\"radix.slottable\");function N8(e){return m.isValidElement(e)&&typeof e.type==\"function\"&&\"__radixId\"in e.type&&e.type.__radixId===A8}function O8(e,t){const n={...t};for(const a in t){const o=e[a],s=t[a];/^on[A-Z]/.test(a)?o&&s?n[a]=(...u)=>{const f=s(...u);return o(...u),f}:o&&(n[a]=o):a===\"style\"?n[a]={...o,...s}:a===\"className\"&&(n[a]=[o,s].filter(Boolean).join(\" \"))}return{...e,...n}}function D8(e){let t=Object.getOwnPropertyDescriptor(e.props,\"ref\")?.get,n=t&&\"isReactWarning\"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,\"ref\")?.get,n=t&&\"isReactWarning\"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var j8=[\"a\",\"button\",\"div\",\"form\",\"h2\",\"h3\",\"img\",\"input\",\"label\",\"li\",\"nav\",\"ol\",\"p\",\"select\",\"span\",\"svg\",\"ul\"],z8=j8.reduce((e,t)=>{const n=k8(`Primitive.${t}`),a=m.forwardRef((o,s)=>{const{asChild:c,...u}=o,f=c?n:t;return typeof window<\"u\"&&(window[Symbol.for(\"radix-ui\")]=!0),g.jsx(f,{...u,ref:s})});return a.displayName=`Primitive.${t}`,{...e,[t]:a}},{}),P8=\"Portal\",Zh=m.forwardRef((e,t)=>{const{container:n,...a}=e,[o,s]=m.useState(!1);is(()=>s(!0),[]);const c=n||o&&globalThis?.document?.body;return c?P6.createPortal(g.jsx(z8.div,{...a,ref:t}),c):null});Zh.displayName=P8;function L8(e,t){return m.useReducer((n,a)=>t[n][a]??n,e)}var Va=e=>{const{present:t,children:n}=e,a=I8(t),o=typeof n==\"function\"?n({present:a.isPresent}):m.Children.only(n),s=pn(a.ref,H8(o));return typeof n==\"function\"||a.isPresent?m.cloneElement(o,{ref:s}):null};Va.displayName=\"Presence\";function I8(e){const[t,n]=m.useState(),a=m.useRef(null),o=m.useRef(e),s=m.useRef(\"none\"),c=e?\"mounted\":\"unmounted\",[u,f]=L8(c,{mounted:{UNMOUNT:\"unmounted\",ANIMATION_OUT:\"unmountSuspended\"},unmountSuspended:{MOUNT:\"mounted\",ANIMATION_END:\"unmounted\"},unmounted:{MOUNT:\"mounted\"}});return m.useEffect(()=>{const h=Zf(a.current);s.current=u===\"mounted\"?h:\"none\"},[u]),is(()=>{const h=a.current,v=o.current;if(v!==e){const x=s.current,S=Zf(h);e?f(\"MOUNT\"):S===\"none\"||h?.display===\"none\"?f(\"UNMOUNT\"):f(v&&x!==S?\"ANIMATION_OUT\":\"UNMOUNT\"),o.current=e}},[e,f]),is(()=>{if(t){let h;const v=t.ownerDocument.defaultView??window,y=S=>{const C=Zf(a.current).includes(CSS.escape(S.animationName));if(S.target===t&&C&&(f(\"ANIMATION_END\"),!o.current)){const R=t.style.animationFillMode;t.style.animationFillMode=\"forwards\",h=v.setTimeout(()=>{t.style.animationFillMode===\"forwards\"&&(t.style.animationFillMode=R)})}},x=S=>{S.target===t&&(s.current=Zf(a.current))};return t.addEventListener(\"animationstart\",x),t.addEventListener(\"animationcancel\",y),t.addEventListener(\"animationend\",y),()=>{v.clearTimeout(h),t.removeEventListener(\"animationstart\",x),t.removeEventListener(\"animationcancel\",y),t.removeEventListener(\"animationend\",y)}}else f(\"ANIMATION_END\")},[t,f]),{isPresent:[\"mounted\",\"unmountSuspended\"].includes(u),ref:m.useCallback(h=>{a.current=h?getComputedStyle(h):null,n(h)},[])}}function Zf(e){return e?.animationName||\"none\"}function H8(e){let t=Object.getOwnPropertyDescriptor(e.props,\"ref\")?.get,n=t&&\"isReactWarning\"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,\"ref\")?.get,n=t&&\"isReactWarning\"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function q8(e){const t=F8(e),n=m.forwardRef((a,o)=>{const{children:s,...c}=a,u=m.Children.toArray(s),f=u.find(B8);if(f){const h=f.props.children,v=u.map(y=>y===f?m.Children.count(h)>1?m.Children.only(null):m.isValidElement(h)?h.props.children:null:y);return g.jsx(t,{...c,ref:o,children:m.isValidElement(h)?m.cloneElement(h,void 0,v):null})}return g.jsx(t,{...c,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function F8(e){const t=m.forwardRef((n,a)=>{const{children:o,...s}=n;if(m.isValidElement(o)){const c=V8(o),u=U8(s,o.props);return o.type!==m.Fragment&&(u.ref=a?Zn(a,c):c),m.cloneElement(o,u)}return m.Children.count(o)>1?m.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var uk=Symbol(\"radix.slottable\");function $8(e){const t=({children:n})=>g.jsx(g.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=uk,t}function B8(e){return m.isValidElement(e)&&typeof e.type==\"function\"&&\"__radixId\"in e.type&&e.type.__radixId===uk}function U8(e,t){const n={...t};for(const a in t){const o=e[a],s=t[a];/^on[A-Z]/.test(a)?o&&s?n[a]=(...u)=>{const f=s(...u);return o(...u),f}:o&&(n[a]=o):a===\"style\"?n[a]={...o,...s}:a===\"className\"&&(n[a]=[o,s].filter(Boolean).join(\" \"))}return{...e,...n}}function V8(e){let t=Object.getOwnPropertyDescriptor(e.props,\"ref\")?.get,n=t&&\"isReactWarning\"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,\"ref\")?.get,n=t&&\"isReactWarning\"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var W8=[\"a\",\"button\",\"div\",\"form\",\"h2\",\"h3\",\"img\",\"input\",\"label\",\"li\",\"nav\",\"ol\",\"p\",\"select\",\"span\",\"svg\",\"ul\"],G8=W8.reduce((e,t)=>{const n=q8(`Primitive.${t}`),a=m.forwardRef((o,s)=>{const{asChild:c,...u}=o,f=c?n:t;return typeof window<\"u\"&&(window[Symbol.for(\"radix-ui\")]=!0),g.jsx(f,{...u,ref:s})});return a.displayName=`Primitive.${t}`,{...e,[t]:a}},{}),Y8=Vh[\" useInsertionEffect \".trim().toString()]||is;function zc({prop:e,defaultProp:t,onChange:n=()=>{},caller:a}){const[o,s,c]=X8({defaultProp:t,onChange:n}),u=e!==void 0,f=u?e:o;{const v=m.useRef(e!==void 0);m.useEffect(()=>{const y=v.current;y!==u&&console.warn(`${a} is changing from ${y?\"controlled\":\"uncontrolled\"} to ${u?\"controlled\":\"uncontrolled\"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),v.current=u},[u,a])}const h=m.useCallback(v=>{if(u){const y=Q8(v)?v(e):v;y!==e&&c.current?.(y)}else s(v)},[u,e,s,c]);return[f,h]}function X8({defaultProp:e,onChange:t}){const[n,a]=m.useState(e),o=m.useRef(n),s=m.useRef(t);return Y8(()=>{s.current=t},[t]),m.useEffect(()=>{o.current!==n&&(s.current?.(n),o.current=n)},[n,o]),[n,a,s]}function Q8(e){return typeof e==\"function\"}function K8(e){const t=Z8(e),n=m.forwardRef((a,o)=>{const{children:s,...c}=a,u=m.Children.toArray(s),f=u.find(e7);if(f){const h=f.props.children,v=u.map(y=>y===f?m.Children.count(h)>1?m.Children.only(null):m.isValidElement(h)?h.props.children:null:y);return g.jsx(t,{...c,ref:o,children:m.isValidElement(h)?m.cloneElement(h,void 0,v):null})}return g.jsx(t,{...c,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function Z8(e){const t=m.forwardRef((n,a)=>{const{children:o,...s}=n;if(m.isValidElement(o)){const c=n7(o),u=t7(s,o.props);return o.type!==m.Fragment&&(u.ref=a?Zn(a,c):c),m.cloneElement(o,u)}return m.Children.count(o)>1?m.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var J8=Symbol(\"radix.slottable\");function e7(e){return m.isValidElement(e)&&typeof e.type==\"function\"&&\"__radixId\"in e.type&&e.type.__radixId===J8}function t7(e,t){const n={...t};for(const a in t){const o=e[a],s=t[a];/^on[A-Z]/.test(a)?o&&s?n[a]=(...u)=>{const f=s(...u);return o(...u),f}:o&&(n[a]=o):a===\"style\"?n[a]={...o,...s}:a===\"className\"&&(n[a]=[o,s].filter(Boolean).join(\" \"))}return{...e,...n}}function n7(e){let t=Object.getOwnPropertyDescriptor(e.props,\"ref\")?.get,n=t&&\"isReactWarning\"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,\"ref\")?.get,n=t&&\"isReactWarning\"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var r7=[\"a\",\"button\",\"div\",\"form\",\"h2\",\"h3\",\"img\",\"input\",\"label\",\"li\",\"nav\",\"ol\",\"p\",\"select\",\"span\",\"svg\",\"ul\"],a7=r7.reduce((e,t)=>{const n=K8(`Primitive.${t}`),a=m.forwardRef((o,s)=>{const{asChild:c,...u}=o,f=c?n:t;return typeof window<\"u\"&&(window[Symbol.for(\"radix-ui\")]=!0),g.jsx(f,{...u,ref:s})});return a.displayName=`Primitive.${t}`,{...e,[t]:a}},{}),i7=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\"}),o7=\"VisuallyHidden\",dk=m.forwardRef((e,t)=>g.jsx(a7.span,{...e,ref:t,style:{...i7,...e.style}}));dk.displayName=o7;var s7=dk,[Jh,zG]=mi(\"Tooltip\",[jc]),em=jc(),fk=\"TooltipProvider\",l7=700,cb=\"tooltip.open\",[c7,$b]=Jh(fk),hk=e=>{const{__scopeTooltip:t,delayDuration:n=l7,skipDelayDuration:a=300,disableHoverableContent:o=!1,children:s}=e,c=m.useRef(!0),u=m.useRef(!1),f=m.useRef(0);return m.useEffect(()=>{const h=f.current;return()=>window.clearTimeout(h)},[]),g.jsx(c7,{scope:t,isOpenDelayedRef:c,delayDuration:n,onOpen:m.useCallback(()=>{window.clearTimeout(f.current),c.current=!1},[]),onClose:m.useCallback(()=>{window.clearTimeout(f.current),f.current=window.setTimeout(()=>c.current=!0,a)},[a]),isPointerInTransitRef:u,onPointerInTransitChange:m.useCallback(h=>{u.current=h},[]),disableHoverableContent:o,children:s})};hk.displayName=fk;var ud=\"Tooltip\",[u7,tm]=Jh(ud),mk=e=>{const{__scopeTooltip:t,children:n,open:a,defaultOpen:o,onOpenChange:s,disableHoverableContent:c,delayDuration:u}=e,f=$b(ud,e.__scopeTooltip),h=em(t),[v,y]=m.useState(null),x=rs(),S=m.useRef(0),w=c??f.disableHoverableContent,C=u??f.delayDuration,R=m.useRef(!1),[k,T]=zc({prop:a,defaultProp:o??!1,onChange:A=>{A?(f.onOpen(),document.dispatchEvent(new CustomEvent(cb))):f.onClose(),s?.(A)},caller:ud}),M=m.useMemo(()=>k?R.current?\"delayed-open\":\"instant-open\":\"closed\",[k]),j=m.useCallback(()=>{window.clearTimeout(S.current),S.current=0,R.current=!1,T(!0)},[T]),I=m.useCallback(()=>{window.clearTimeout(S.current),S.current=0,T(!1)},[T]),P=m.useCallback(()=>{window.clearTimeout(S.current),S.current=window.setTimeout(()=>{R.current=!0,T(!0),S.current=0},C)},[C,T]);return m.useEffect(()=>()=>{S.current&&(window.clearTimeout(S.current),S.current=0)},[]),g.jsx(Hb,{...h,children:g.jsx(u7,{scope:t,contentId:x,open:k,stateAttribute:M,trigger:v,onTriggerChange:y,onTriggerEnter:m.useCallback(()=>{f.isOpenDelayedRef.current?P():j()},[f.isOpenDelayedRef,P,j]),onTriggerLeave:m.useCallback(()=>{w?I():(window.clearTimeout(S.current),S.current=0)},[I,w]),onOpen:j,onClose:I,disableHoverableContent:w,children:n})})};mk.displayName=ud;var ub=\"TooltipTrigger\",pk=m.forwardRef((e,t)=>{const{__scopeTooltip:n,...a}=e,o=tm(ub,n),s=$b(ub,n),c=em(n),u=m.useRef(null),f=pn(t,u,o.onTriggerChange),h=m.useRef(!1),v=m.useRef(!1),y=m.useCallback(()=>h.current=!1,[]);return m.useEffect(()=>()=>document.removeEventListener(\"pointerup\",y),[y]),g.jsx(Kh,{asChild:!0,...c,children:g.jsx(G8.button,{\"aria-describedby\":o.open?o.contentId:void 0,\"data-state\":o.stateAttribute,...a,ref:f,onPointerMove:at(e.onPointerMove,x=>{x.pointerType!==\"touch\"&&!v.current&&!s.isPointerInTransitRef.current&&(o.onTriggerEnter(),v.current=!0)}),onPointerLeave:at(e.onPointerLeave,()=>{o.onTriggerLeave(),v.current=!1}),onPointerDown:at(e.onPointerDown,()=>{o.open&&o.onClose(),h.current=!0,document.addEventListener(\"pointerup\",y,{once:!0})}),onFocus:at(e.onFocus,()=>{h.current||o.onOpen()}),onBlur:at(e.onBlur,o.onClose),onClick:at(e.onClick,o.onClose)})})});pk.displayName=ub;var d7=\"TooltipPortal\",[PG,f7]=Jh(d7,{forceMount:void 0}),Tc=\"TooltipContent\",gk=m.forwardRef((e,t)=>{const n=f7(Tc,e.__scopeTooltip),{forceMount:a=n.forceMount,side:o=\"top\",...s}=e,c=tm(Tc,e.__scopeTooltip);return g.jsx(Va,{present:a||c.open,children:c.disableHoverableContent?g.jsx(vk,{side:o,...s,ref:t}):g.jsx(h7,{side:o,...s,ref:t})})}),h7=m.forwardRef((e,t)=>{const n=tm(Tc,e.__scopeTooltip),a=$b(Tc,e.__scopeTooltip),o=m.useRef(null),s=pn(t,o),[c,u]=m.useState(null),{trigger:f,onClose:h}=n,v=o.current,{onPointerInTransitChange:y}=a,x=m.useCallback(()=>{u(null),y(!1)},[y]),S=m.useCallback((w,C)=>{const R=w.currentTarget,k={x:w.clientX,y:w.clientY},T=y7(k,R.getBoundingClientRect()),M=b7(k,T),j=x7(C.getBoundingClientRect()),I=S7([...M,...j]);u(I),y(!0)},[y]);return m.useEffect(()=>()=>x(),[x]),m.useEffect(()=>{if(f&&v){const w=R=>S(R,v),C=R=>S(R,f);return f.addEventListener(\"pointerleave\",w),v.addEventListener(\"pointerleave\",C),()=>{f.removeEventListener(\"pointerleave\",w),v.removeEventListener(\"pointerleave\",C)}}},[f,v,S,x]),m.useEffect(()=>{if(c){const w=C=>{const R=C.target,k={x:C.clientX,y:C.clientY},T=f?.contains(R)||v?.contains(R),M=!w7(k,c);T?x():M&&(x(),h())};return document.addEventListener(\"pointermove\",w),()=>document.removeEventListener(\"pointermove\",w)}},[f,v,c,h,x]),g.jsx(vk,{...e,ref:s})}),[m7,p7]=Jh(ud,{isInside:!1}),g7=$8(\"TooltipContent\"),vk=m.forwardRef((e,t)=>{const{__scopeTooltip:n,children:a,\"aria-label\":o,onEscapeKeyDown:s,onPointerDownOutside:c,...u}=e,f=tm(Tc,n),h=em(n),{onClose:v}=f;return m.useEffect(()=>(document.addEventListener(cb,v),()=>document.removeEventListener(cb,v)),[v]),m.useEffect(()=>{if(f.trigger){const y=x=>{x.target?.contains(f.trigger)&&v()};return window.addEventListener(\"scroll\",y,{capture:!0}),()=>window.removeEventListener(\"scroll\",y,{capture:!0})}},[f.trigger,v]),g.jsx(Cd,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:y=>y.preventDefault(),onDismiss:v,children:g.jsxs(qb,{\"data-state\":f.stateAttribute,...h,...u,ref:t,style:{...u.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:[g.jsx(g7,{children:a}),g.jsx(m7,{scope:n,isInside:!0,children:g.jsx(s7,{id:f.contentId,role:\"tooltip\",children:o||a})})]})})});gk.displayName=Tc;var yk=\"TooltipArrow\",v7=m.forwardRef((e,t)=>{const{__scopeTooltip:n,...a}=e,o=em(n);return p7(yk,n).isInside?null:g.jsx(Fb,{...o,...a,ref:t})});v7.displayName=yk;function y7(e,t){const n=Math.abs(t.top-e.y),a=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,a,o,s)){case s:return\"left\";case o:return\"right\";case n:return\"top\";case a:return\"bottom\";default:throw new Error(\"unreachable\")}}function b7(e,t,n=5){const a=[];switch(t){case\"top\":a.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case\"bottom\":a.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case\"left\":a.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case\"right\":a.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return a}function x7(e){const{top:t,right:n,bottom:a,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:a},{x:o,y:a}]}function w7(e,t){const{x:n,y:a}=e;let o=!1;for(let s=0,c=t.length-1;s<t.length;c=s++){const u=t[s],f=t[c],h=u.x,v=u.y,y=f.x,x=f.y;v>a!=x>a&&n<(y-h)*(a-v)/(x-v)+h&&(o=!o)}return o}function S7(e){const t=e.slice();return t.sort((n,a)=>n.x<a.x?-1:n.x>a.x?1:n.y<a.y?-1:n.y>a.y?1:0),C7(t)}function C7(e){if(e.length<=1)return e.slice();const t=[];for(let a=0;a<e.length;a++){const o=e[a];for(;t.length>=2;){const s=t[t.length-1],c=t[t.length-2];if((s.x-c.x)*(o.y-c.y)>=(s.y-c.y)*(o.x-c.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let a=e.length-1;a>=0;a--){const o=e[a];for(;n.length>=2;){const s=n[n.length-1],c=n[n.length-2];if((s.x-c.x)*(o.y-c.y)>=(s.y-c.y)*(o.x-c.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var R7=hk,E7=mk,T7=pk,bk=gk;const M7=R7,Ag=E7,Ng=T7,ph=m.forwardRef(({className:e,sideOffset:t=4,...n},a)=>g.jsx(bk,{ref:a,sideOffset:t,className:je(\"z-50 overflow-hidden rounded-md border border-stone-200 dark:border-[#3e3e42] bg-white dark:bg-[#2d2d30] px-3 py-1.5 text-sm text-stone-950 dark:text-[#cccccc] shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",e),...n}));ph.displayName=bk.displayName;var Og=0;function Bb(){m.useEffect(()=>{const e=document.querySelectorAll(\"[data-radix-focus-guard]\");return document.body.insertAdjacentElement(\"afterbegin\",e[0]??EC()),document.body.insertAdjacentElement(\"beforeend\",e[1]??EC()),Og++,()=>{Og===1&&document.querySelectorAll(\"[data-radix-focus-guard]\").forEach(t=>t.remove()),Og--}},[])}function EC(){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}function k7(e){const t=_7(e),n=m.forwardRef((a,o)=>{const{children:s,...c}=a,u=m.Children.toArray(s),f=u.find(N7);if(f){const h=f.props.children,v=u.map(y=>y===f?m.Children.count(h)>1?m.Children.only(null):m.isValidElement(h)?h.props.children:null:y);return g.jsx(t,{...c,ref:o,children:m.isValidElement(h)?m.cloneElement(h,void 0,v):null})}return g.jsx(t,{...c,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function _7(e){const t=m.forwardRef((n,a)=>{const{children:o,...s}=n;if(m.isValidElement(o)){const c=D7(o),u=O7(s,o.props);return o.type!==m.Fragment&&(u.ref=a?Zn(a,c):c),m.cloneElement(o,u)}return m.Children.count(o)>1?m.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var A7=Symbol(\"radix.slottable\");function N7(e){return m.isValidElement(e)&&typeof e.type==\"function\"&&\"__radixId\"in e.type&&e.type.__radixId===A7}function O7(e,t){const n={...t};for(const a in t){const o=e[a],s=t[a];/^on[A-Z]/.test(a)?o&&s?n[a]=(...u)=>{const f=s(...u);return o(...u),f}:o&&(n[a]=o):a===\"style\"?n[a]={...o,...s}:a===\"className\"&&(n[a]=[o,s].filter(Boolean).join(\" \"))}return{...e,...n}}function D7(e){let t=Object.getOwnPropertyDescriptor(e.props,\"ref\")?.get,n=t&&\"isReactWarning\"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,\"ref\")?.get,n=t&&\"isReactWarning\"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var j7=[\"a\",\"button\",\"div\",\"form\",\"h2\",\"h3\",\"img\",\"input\",\"label\",\"li\",\"nav\",\"ol\",\"p\",\"select\",\"span\",\"svg\",\"ul\"],z7=j7.reduce((e,t)=>{const n=k7(`Primitive.${t}`),a=m.forwardRef((o,s)=>{const{asChild:c,...u}=o,f=c?n:t;return typeof window<\"u\"&&(window[Symbol.for(\"radix-ui\")]=!0),g.jsx(f,{...u,ref:s})});return a.displayName=`Primitive.${t}`,{...e,[t]:a}},{}),Dg=\"focusScope.autoFocusOnMount\",jg=\"focusScope.autoFocusOnUnmount\",TC={bubbles:!1,cancelable:!0},P7=\"FocusScope\",nm=m.forwardRef((e,t)=>{const{loop:n=!1,trapped:a=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...c}=e,[u,f]=m.useState(null),h=eo(o),v=eo(s),y=m.useRef(null),x=pn(t,C=>f(C)),S=m.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;m.useEffect(()=>{if(a){let C=function(M){if(S.paused||!u)return;const j=M.target;u.contains(j)?y.current=j:Yo(y.current,{select:!0})},R=function(M){if(S.paused||!u)return;const j=M.relatedTarget;j!==null&&(u.contains(j)||Yo(y.current,{select:!0}))},k=function(M){if(document.activeElement===document.body)for(const I of M)I.removedNodes.length>0&&Yo(u)};document.addEventListener(\"focusin\",C),document.addEventListener(\"focusout\",R);const T=new MutationObserver(k);return u&&T.observe(u,{childList:!0,subtree:!0}),()=>{document.removeEventListener(\"focusin\",C),document.removeEventListener(\"focusout\",R),T.disconnect()}}},[a,u,S.paused]),m.useEffect(()=>{if(u){kC.add(S);const C=document.activeElement;if(!u.contains(C)){const k=new CustomEvent(Dg,TC);u.addEventListener(Dg,h),u.dispatchEvent(k),k.defaultPrevented||(L7($7(xk(u)),{select:!0}),document.activeElement===C&&Yo(u))}return()=>{u.removeEventListener(Dg,h),setTimeout(()=>{const k=new CustomEvent(jg,TC);u.addEventListener(jg,v),u.dispatchEvent(k),k.defaultPrevented||Yo(C??document.body,{select:!0}),u.removeEventListener(jg,v),kC.remove(S)},0)}}},[u,h,v,S]);const w=m.useCallback(C=>{if(!n&&!a||S.paused)return;const R=C.key===\"Tab\"&&!C.altKey&&!C.ctrlKey&&!C.metaKey,k=document.activeElement;if(R&&k){const T=C.currentTarget,[M,j]=I7(T);M&&j?!C.shiftKey&&k===j?(C.preventDefault(),n&&Yo(M,{select:!0})):C.shiftKey&&k===M&&(C.preventDefault(),n&&Yo(j,{select:!0})):k===T&&C.preventDefault()}},[n,a,S.paused]);return g.jsx(z7.div,{tabIndex:-1,...c,ref:x,onKeyDown:w})});nm.displayName=P7;function L7(e,{select:t=!1}={}){const n=document.activeElement;for(const a of e)if(Yo(a,{select:t}),document.activeElement!==n)return}function I7(e){const t=xk(e),n=MC(t,e),a=MC(t.reverse(),e);return[n,a]}function xk(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:a=>{const o=a.tagName===\"INPUT\"&&a.type===\"hidden\";return a.disabled||a.hidden||o?NodeFilter.FILTER_SKIP:a.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function MC(e,t){for(const n of e)if(!H7(n,{upTo:t}))return n}function H7(e,{upTo:t}){if(getComputedStyle(e).visibility===\"hidden\")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===\"none\")return!0;e=e.parentElement}return!1}function q7(e){return e instanceof HTMLInputElement&&\"select\"in e}function Yo(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&q7(e)&&t&&e.select()}}var kC=F7();function F7(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=_C(e,t),e.unshift(t)},remove(t){e=_C(e,t),e[0]?.resume()}}}function _C(e,t){const n=[...e],a=n.indexOf(t);return a!==-1&&n.splice(a,1),n}function $7(e){return e.filter(t=>t.tagName!==\"A\")}function wk(e){const t=B7(e),n=m.forwardRef((a,o)=>{const{children:s,...c}=a,u=m.Children.toArray(s),f=u.find(V7);if(f){const h=f.props.children,v=u.map(y=>y===f?m.Children.count(h)>1?m.Children.only(null):m.isValidElement(h)?h.props.children:null:y);return g.jsx(t,{...c,ref:o,children:m.isValidElement(h)?m.cloneElement(h,void 0,v):null})}return g.jsx(t,{...c,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function B7(e){const t=m.forwardRef((n,a)=>{const{children:o,...s}=n;if(m.isValidElement(o)){const c=G7(o),u=W7(s,o.props);return o.type!==m.Fragment&&(u.ref=a?Zn(a,c):c),m.cloneElement(o,u)}return m.Children.count(o)>1?m.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var U7=Symbol(\"radix.slottable\");function V7(e){return m.isValidElement(e)&&typeof e.type==\"function\"&&\"__radixId\"in e.type&&e.type.__radixId===U7}function W7(e,t){const n={...t};for(const a in t){const o=e[a],s=t[a];/^on[A-Z]/.test(a)?o&&s?n[a]=(...u)=>{const f=s(...u);return o(...u),f}:o&&(n[a]=o):a===\"style\"?n[a]={...o,...s}:a===\"className\"&&(n[a]=[o,s].filter(Boolean).join(\" \"))}return{...e,...n}}function G7(e){let t=Object.getOwnPropertyDescriptor(e.props,\"ref\")?.get,n=t&&\"isReactWarning\"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,\"ref\")?.get,n=t&&\"isReactWarning\"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Y7=[\"a\",\"button\",\"div\",\"form\",\"h2\",\"h3\",\"img\",\"input\",\"label\",\"li\",\"nav\",\"ol\",\"p\",\"select\",\"span\",\"svg\",\"ul\"],Sk=Y7.reduce((e,t)=>{const n=wk(`Primitive.${t}`),a=m.forwardRef((o,s)=>{const{asChild:c,...u}=o,f=c?n:t;return typeof window<\"u\"&&(window[Symbol.for(\"radix-ui\")]=!0),g.jsx(f,{...u,ref:s})});return a.displayName=`Primitive.${t}`,{...e,[t]:a}},{}),X7=function(e){if(typeof document>\"u\")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},ec=new WeakMap,Jf=new WeakMap,eh={},zg=0,Ck=function(e){return e&&(e.host||Ck(e.parentNode))},Q7=function(e,t){return t.map(function(n){if(e.contains(n))return n;var a=Ck(n);return a&&e.contains(a)?a:(console.error(\"aria-hidden\",n,\"in not contained inside\",e,\". Doing nothing\"),null)}).filter(function(n){return!!n})},K7=function(e,t,n,a){var o=Q7(t,Array.isArray(e)?e:[e]);eh[n]||(eh[n]=new WeakMap);var s=eh[n],c=[],u=new Set,f=new Set(o),h=function(y){!y||u.has(y)||(u.add(y),h(y.parentNode))};o.forEach(h);var v=function(y){!y||f.has(y)||Array.prototype.forEach.call(y.children,function(x){if(u.has(x))v(x);else try{var S=x.getAttribute(a),w=S!==null&&S!==\"false\",C=(ec.get(x)||0)+1,R=(s.get(x)||0)+1;ec.set(x,C),s.set(x,R),c.push(x),C===1&&w&&Jf.set(x,!0),R===1&&x.setAttribute(n,\"true\"),w||x.setAttribute(a,\"true\")}catch(k){console.error(\"aria-hidden: cannot operate on \",x,k)}})};return v(t),u.clear(),zg++,function(){c.forEach(function(y){var x=ec.get(y)-1,S=s.get(y)-1;ec.set(y,x),s.set(y,S),x||(Jf.has(y)||y.removeAttribute(a),Jf.delete(y)),S||y.removeAttribute(n)}),zg--,zg||(ec=new WeakMap,ec=new WeakMap,Jf=new WeakMap,eh={})}},Ub=function(e,t,n){n===void 0&&(n=\"data-aria-hidden\");var a=Array.from(Array.isArray(e)?e:[e]),o=X7(e);return o?(a.push.apply(a,Array.from(o.querySelectorAll(\"[aria-live], script\"))),K7(a,o,n,\"aria-hidden\")):function(){return null}},oi=function(){return oi=Object.assign||function(t){for(var n,a=1,o=arguments.length;a<o;a++){n=arguments[a];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},oi.apply(this,arguments)};function Rk(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols==\"function\")for(var o=0,a=Object.getOwnPropertySymbols(e);o<a.length;o++)t.indexOf(a[o])<0&&Object.prototype.propertyIsEnumerable.call(e,a[o])&&(n[a[o]]=e[a[o]]);return n}function Z7(e,t,n){if(n||arguments.length===2)for(var a=0,o=t.length,s;a<o;a++)(s||!(a in t))&&(s||(s=Array.prototype.slice.call(t,0,a)),s[a]=t[a]);return e.concat(s||Array.prototype.slice.call(t))}var gh=\"right-scroll-bar-position\",vh=\"width-before-scroll-bar\",J7=\"with-scroll-bars-hidden\",ez=\"--removed-body-scroll-bar-size\";function Pg(e,t){return typeof e==\"function\"?e(t):e&&(e.current=t),e}function tz(e,t){var n=m.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(a){var o=n.value;o!==a&&(n.value=a,n.callback(a,o))}}}})[0];return n.callback=t,n.facade}var nz=typeof window<\"u\"?m.useLayoutEffect:m.useEffect,AC=new WeakMap;function rz(e,t){var n=tz(null,function(a){return e.forEach(function(o){return Pg(o,a)})});return nz(function(){var a=AC.get(n);if(a){var o=new Set(a),s=new Set(e),c=n.current;o.forEach(function(u){s.has(u)||Pg(u,null)}),s.forEach(function(u){o.has(u)||Pg(u,c)})}AC.set(n,e)},[e]),n}function az(e){return e}function iz(e,t){t===void 0&&(t=az);var n=[],a=!1,o={read:function(){if(a)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(s){var c=t(s,a);return n.push(c),function(){n=n.filter(function(u){return u!==c})}},assignSyncMedium:function(s){for(a=!0;n.length;){var c=n;n=[],c.forEach(s)}n={push:function(u){return s(u)},filter:function(){return n}}},assignMedium:function(s){a=!0;var c=[];if(n.length){var u=n;n=[],u.forEach(s),c=n}var f=function(){var v=c;c=[],v.forEach(s)},h=function(){return Promise.resolve().then(f)};h(),n={push:function(v){c.push(v),h()},filter:function(v){return c=c.filter(v),n}}}};return o}function oz(e){e===void 0&&(e={});var t=iz(null);return t.options=oi({async:!0,ssr:!1},e),t}var Ek=function(e){var t=e.sideCar,n=Rk(e,[\"sideCar\"]);if(!t)throw new Error(\"Sidecar: please provide `sideCar` property to import the right car\");var a=t.read();if(!a)throw new Error(\"Sidecar medium not found\");return m.createElement(a,oi({},n))};Ek.isSideCarExport=!0;function sz(e,t){return e.useMedium(t),Ek}var Tk=oz(),Lg=function(){},rm=m.forwardRef(function(e,t){var n=m.useRef(null),a=m.useState({onScrollCapture:Lg,onWheelCapture:Lg,onTouchMoveCapture:Lg}),o=a[0],s=a[1],c=e.forwardProps,u=e.children,f=e.className,h=e.removeScrollBar,v=e.enabled,y=e.shards,x=e.sideCar,S=e.noRelative,w=e.noIsolation,C=e.inert,R=e.allowPinchZoom,k=e.as,T=k===void 0?\"div\":k,M=e.gapMode,j=Rk(e,[\"forwardProps\",\"children\",\"className\",\"removeScrollBar\",\"enabled\",\"shards\",\"sideCar\",\"noRelative\",\"noIsolation\",\"inert\",\"allowPinchZoom\",\"as\",\"gapMode\"]),I=x,P=rz([n,t]),A=oi(oi({},j),o);return m.createElement(m.Fragment,null,v&&m.createElement(I,{sideCar:Tk,removeScrollBar:h,shards:y,noRelative:S,noIsolation:w,inert:C,setCallbacks:s,allowPinchZoom:!!R,lockRef:n,gapMode:M}),c?m.cloneElement(m.Children.only(u),oi(oi({},A),{ref:P})):m.createElement(T,oi({},A,{className:f,ref:P}),u))});rm.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};rm.classNames={fullWidth:vh,zeroRight:gh};var lz=function(){if(typeof __webpack_nonce__<\"u\")return __webpack_nonce__};function cz(){if(!document)return null;var e=document.createElement(\"style\");e.type=\"text/css\";var t=lz();return t&&e.setAttribute(\"nonce\",t),e}function uz(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function dz(e){var t=document.head||document.getElementsByTagName(\"head\")[0];t.appendChild(e)}var fz=function(){var e=0,t=null;return{add:function(n){e==0&&(t=cz())&&(uz(t,n),dz(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},hz=function(){var e=fz();return function(t,n){m.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Mk=function(){var e=hz(),t=function(n){var a=n.styles,o=n.dynamic;return e(a,o),null};return t},mz={left:0,top:0,right:0,gap:0},Ig=function(e){return parseInt(e||\"\",10)||0},pz=function(e){var t=window.getComputedStyle(document.body),n=t[e===\"padding\"?\"paddingLeft\":\"marginLeft\"],a=t[e===\"padding\"?\"paddingTop\":\"marginTop\"],o=t[e===\"padding\"?\"paddingRight\":\"marginRight\"];return[Ig(n),Ig(a),Ig(o)]},gz=function(e){if(e===void 0&&(e=\"margin\"),typeof window>\"u\")return mz;var t=pz(e),n=document.documentElement.clientWidth,a=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,a-n+t[2]-t[0])}},vz=Mk(),yc=\"data-scroll-locked\",yz=function(e,t,n,a){var o=e.left,s=e.top,c=e.right,u=e.gap;return n===void 0&&(n=\"margin\"),`\n .`.concat(J7,` {\n overflow: hidden `).concat(a,`;\n padding-right: `).concat(u,\"px \").concat(a,`;\n }\n body[`).concat(yc,`] {\n overflow: hidden `).concat(a,`;\n overscroll-behavior: contain;\n `).concat([t&&\"position: relative \".concat(a,\";\"),n===\"margin\"&&`\n padding-left: `.concat(o,`px;\n padding-top: `).concat(s,`px;\n padding-right: `).concat(c,`px;\n margin-left:0;\n margin-top:0;\n margin-right: `).concat(u,\"px \").concat(a,`;\n `),n===\"padding\"&&\"padding-right: \".concat(u,\"px \").concat(a,\";\")].filter(Boolean).join(\"\"),`\n }\n \n .`).concat(gh,` {\n right: `).concat(u,\"px \").concat(a,`;\n }\n \n .`).concat(vh,` {\n margin-right: `).concat(u,\"px \").concat(a,`;\n }\n \n .`).concat(gh,\" .\").concat(gh,` {\n right: 0 `).concat(a,`;\n }\n \n .`).concat(vh,\" .\").concat(vh,` {\n margin-right: 0 `).concat(a,`;\n }\n \n body[`).concat(yc,`] {\n `).concat(ez,\": \").concat(u,`px;\n }\n`)},NC=function(){var e=parseInt(document.body.getAttribute(yc)||\"0\",10);return isFinite(e)?e:0},bz=function(){m.useEffect(function(){return document.body.setAttribute(yc,(NC()+1).toString()),function(){var e=NC()-1;e<=0?document.body.removeAttribute(yc):document.body.setAttribute(yc,e.toString())}},[])},xz=function(e){var t=e.noRelative,n=e.noImportant,a=e.gapMode,o=a===void 0?\"margin\":a;bz();var s=m.useMemo(function(){return gz(o)},[o]);return m.createElement(vz,{styles:yz(s,!t,o,n?\"\":\"!important\")})},db=!1;if(typeof window<\"u\")try{var th=Object.defineProperty({},\"passive\",{get:function(){return db=!0,!0}});window.addEventListener(\"test\",th,th),window.removeEventListener(\"test\",th,th)}catch{db=!1}var tc=db?{passive:!1}:!1,wz=function(e){return e.tagName===\"TEXTAREA\"},kk=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==\"hidden\"&&!(n.overflowY===n.overflowX&&!wz(e)&&n[t]===\"visible\")},Sz=function(e){return kk(e,\"overflowY\")},Cz=function(e){return kk(e,\"overflowX\")},OC=function(e,t){var n=t.ownerDocument,a=t;do{typeof ShadowRoot<\"u\"&&a instanceof ShadowRoot&&(a=a.host);var o=_k(e,a);if(o){var s=Ak(e,a),c=s[1],u=s[2];if(c>u)return!0}a=a.parentNode}while(a&&a!==n.body);return!1},Rz=function(e){var t=e.scrollTop,n=e.scrollHeight,a=e.clientHeight;return[t,n,a]},Ez=function(e){var t=e.scrollLeft,n=e.scrollWidth,a=e.clientWidth;return[t,n,a]},_k=function(e,t){return e===\"v\"?Sz(t):Cz(t)},Ak=function(e,t){return e===\"v\"?Rz(t):Ez(t)},Tz=function(e,t){return e===\"h\"&&t===\"rtl\"?-1:1},Mz=function(e,t,n,a,o){var s=Tz(e,window.getComputedStyle(t).direction),c=s*a,u=n.target,f=t.contains(u),h=!1,v=c>0,y=0,x=0;do{if(!u)break;var S=Ak(e,u),w=S[0],C=S[1],R=S[2],k=C-R-s*w;(w||k)&&_k(e,u)&&(y+=k,x+=w);var T=u.parentNode;u=T&&T.nodeType===Node.DOCUMENT_FRAGMENT_NODE?T.host:T}while(!f&&u!==document.body||f&&(t.contains(u)||t===u));return(v&&Math.abs(y)<1||!v&&Math.abs(x)<1)&&(h=!0),h},nh=function(e){return\"changedTouches\"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},DC=function(e){return[e.deltaX,e.deltaY]},jC=function(e){return e&&\"current\"in e?e.current:e},kz=function(e,t){return e[0]===t[0]&&e[1]===t[1]},_z=function(e){return`\n .block-interactivity-`.concat(e,` {pointer-events: none;}\n .allow-interactivity-`).concat(e,` {pointer-events: all;}\n`)},Az=0,nc=[];function Nz(e){var t=m.useRef([]),n=m.useRef([0,0]),a=m.useRef(),o=m.useState(Az++)[0],s=m.useState(Mk)[0],c=m.useRef(e);m.useEffect(function(){c.current=e},[e]),m.useEffect(function(){if(e.inert){document.body.classList.add(\"block-interactivity-\".concat(o));var C=Z7([e.lockRef.current],(e.shards||[]).map(jC),!0).filter(Boolean);return C.forEach(function(R){return R.classList.add(\"allow-interactivity-\".concat(o))}),function(){document.body.classList.remove(\"block-interactivity-\".concat(o)),C.forEach(function(R){return R.classList.remove(\"allow-interactivity-\".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var u=m.useCallback(function(C,R){if(\"touches\"in C&&C.touches.length===2||C.type===\"wheel\"&&C.ctrlKey)return!c.current.allowPinchZoom;var k=nh(C),T=n.current,M=\"deltaX\"in C?C.deltaX:T[0]-k[0],j=\"deltaY\"in C?C.deltaY:T[1]-k[1],I,P=C.target,A=Math.abs(M)>Math.abs(j)?\"h\":\"v\";if(\"touches\"in C&&A===\"h\"&&P.type===\"range\")return!1;var q=window.getSelection(),B=q&&q.anchorNode,V=B?B===P||B.contains(P):!1;if(V)return!1;var N=OC(A,P);if(!N)return!0;if(N?I=A:(I=A===\"v\"?\"h\":\"v\",N=OC(A,P)),!N)return!1;if(!a.current&&\"changedTouches\"in C&&(M||j)&&(a.current=I),!I)return!0;var _=a.current||I;return Mz(_,R,C,_===\"h\"?M:j)},[]),f=m.useCallback(function(C){var R=C;if(!(!nc.length||nc[nc.length-1]!==s)){var k=\"deltaY\"in R?DC(R):nh(R),T=t.current.filter(function(I){return I.name===R.type&&(I.target===R.target||R.target===I.shadowParent)&&kz(I.delta,k)})[0];if(T&&T.should){R.cancelable&&R.preventDefault();return}if(!T){var M=(c.current.shards||[]).map(jC).filter(Boolean).filter(function(I){return I.contains(R.target)}),j=M.length>0?u(R,M[0]):!c.current.noIsolation;j&&R.cancelable&&R.preventDefault()}}},[]),h=m.useCallback(function(C,R,k,T){var M={name:C,delta:R,target:k,should:T,shadowParent:Oz(k)};t.current.push(M),setTimeout(function(){t.current=t.current.filter(function(j){return j!==M})},1)},[]),v=m.useCallback(function(C){n.current=nh(C),a.current=void 0},[]),y=m.useCallback(function(C){h(C.type,DC(C),C.target,u(C,e.lockRef.current))},[]),x=m.useCallback(function(C){h(C.type,nh(C),C.target,u(C,e.lockRef.current))},[]);m.useEffect(function(){return nc.push(s),e.setCallbacks({onScrollCapture:y,onWheelCapture:y,onTouchMoveCapture:x}),document.addEventListener(\"wheel\",f,tc),document.addEventListener(\"touchmove\",f,tc),document.addEventListener(\"touchstart\",v,tc),function(){nc=nc.filter(function(C){return C!==s}),document.removeEventListener(\"wheel\",f,tc),document.removeEventListener(\"touchmove\",f,tc),document.removeEventListener(\"touchstart\",v,tc)}},[]);var S=e.removeScrollBar,w=e.inert;return m.createElement(m.Fragment,null,w?m.createElement(s,{styles:_z(o)}):null,S?m.createElement(xz,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Oz(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Dz=sz(Tk,Nz);var am=m.forwardRef(function(e,t){return m.createElement(rm,oi({},e,{ref:t,sideCar:Dz}))});am.classNames=rm.classNames;var im=\"Popover\",[Nk,LG]=mi(im,[jc]),Ed=jc(),[jz,ds]=Nk(im),Ok=e=>{const{__scopePopover:t,children:n,open:a,defaultOpen:o,onOpenChange:s,modal:c=!1}=e,u=Ed(t),f=m.useRef(null),[h,v]=m.useState(!1),[y,x]=zc({prop:a,defaultProp:o??!1,onChange:s,caller:im});return g.jsx(Hb,{...u,children:g.jsx(jz,{scope:t,contentId:rs(),triggerRef:f,open:y,onOpenChange:x,onOpenToggle:m.useCallback(()=>x(S=>!S),[x]),hasCustomAnchor:h,onCustomAnchorAdd:m.useCallback(()=>v(!0),[]),onCustomAnchorRemove:m.useCallback(()=>v(!1),[]),modal:c,children:n})})};Ok.displayName=im;var Dk=\"PopoverAnchor\",zz=m.forwardRef((e,t)=>{const{__scopePopover:n,...a}=e,o=ds(Dk,n),s=Ed(n),{onCustomAnchorAdd:c,onCustomAnchorRemove:u}=o;return m.useEffect(()=>(c(),()=>u()),[c,u]),g.jsx(Kh,{...s,...a,ref:t})});zz.displayName=Dk;var jk=\"PopoverTrigger\",zk=m.forwardRef((e,t)=>{const{__scopePopover:n,...a}=e,o=ds(jk,n),s=Ed(n),c=pn(t,o.triggerRef),u=g.jsx(Sk.button,{type:\"button\",\"aria-haspopup\":\"dialog\",\"aria-expanded\":o.open,\"aria-controls\":o.contentId,\"data-state\":qk(o.open),...a,ref:c,onClick:at(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?u:g.jsx(Kh,{asChild:!0,...s,children:u})});zk.displayName=jk;var Vb=\"PopoverPortal\",[Pz,Lz]=Nk(Vb,{forceMount:void 0}),Pk=e=>{const{__scopePopover:t,forceMount:n,children:a,container:o}=e,s=ds(Vb,t);return g.jsx(Pz,{scope:t,forceMount:n,children:g.jsx(Va,{present:n||s.open,children:g.jsx(Zh,{asChild:!0,container:o,children:a})})})};Pk.displayName=Vb;var Mc=\"PopoverContent\",Lk=m.forwardRef((e,t)=>{const n=Lz(Mc,e.__scopePopover),{forceMount:a=n.forceMount,...o}=e,s=ds(Mc,e.__scopePopover);return g.jsx(Va,{present:a||s.open,children:s.modal?g.jsx(Hz,{...o,ref:t}):g.jsx(qz,{...o,ref:t})})});Lk.displayName=Mc;var Iz=wk(\"PopoverContent.RemoveScroll\"),Hz=m.forwardRef((e,t)=>{const n=ds(Mc,e.__scopePopover),a=m.useRef(null),o=pn(t,a),s=m.useRef(!1);return m.useEffect(()=>{const c=a.current;if(c)return Ub(c)},[]),g.jsx(am,{as:Iz,allowPinchZoom:!0,children:g.jsx(Ik,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:at(e.onCloseAutoFocus,c=>{c.preventDefault(),s.current||n.triggerRef.current?.focus()}),onPointerDownOutside:at(e.onPointerDownOutside,c=>{const u=c.detail.originalEvent,f=u.button===0&&u.ctrlKey===!0,h=u.button===2||f;s.current=h},{checkForDefaultPrevented:!1}),onFocusOutside:at(e.onFocusOutside,c=>c.preventDefault(),{checkForDefaultPrevented:!1})})})}),qz=m.forwardRef((e,t)=>{const n=ds(Mc,e.__scopePopover),a=m.useRef(!1),o=m.useRef(!1);return g.jsx(Ik,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(a.current||n.triggerRef.current?.focus(),s.preventDefault()),a.current=!1,o.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(a.current=!0,s.detail.originalEvent.type===\"pointerdown\"&&(o.current=!0));const c=s.target;n.triggerRef.current?.contains(c)&&s.preventDefault(),s.detail.originalEvent.type===\"focusin\"&&o.current&&s.preventDefault()}})}),Ik=m.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:a,onOpenAutoFocus:o,onCloseAutoFocus:s,disableOutsidePointerEvents:c,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:h,onInteractOutside:v,...y}=e,x=ds(Mc,n),S=Ed(n);return Bb(),g.jsx(nm,{asChild:!0,loop:!0,trapped:a,onMountAutoFocus:o,onUnmountAutoFocus:s,children:g.jsx(Cd,{asChild:!0,disableOutsidePointerEvents:c,onInteractOutside:v,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:h,onDismiss:()=>x.onOpenChange(!1),children:g.jsx(qb,{\"data-state\":qk(x.open),role:\"dialog\",id:x.contentId,...S,...y,ref:t,style:{...y.style,\"--radix-popover-content-transform-origin\":\"var(--radix-popper-transform-origin)\",\"--radix-popover-content-available-width\":\"var(--radix-popper-available-width)\",\"--radix-popover-content-available-height\":\"var(--radix-popper-available-height)\",\"--radix-popover-trigger-width\":\"var(--radix-popper-anchor-width)\",\"--radix-popover-trigger-height\":\"var(--radix-popper-anchor-height)\"}})})})}),Hk=\"PopoverClose\",Fz=m.forwardRef((e,t)=>{const{__scopePopover:n,...a}=e,o=ds(Hk,n);return g.jsx(Sk.button,{type:\"button\",...a,ref:t,onClick:at(e.onClick,()=>o.onOpenChange(!1))})});Fz.displayName=Hk;var $z=\"PopoverArrow\",Bz=m.forwardRef((e,t)=>{const{__scopePopover:n,...a}=e,o=Ed(n);return g.jsx(Fb,{...o,...a,ref:t})});Bz.displayName=$z;function qk(e){return e?\"open\":\"closed\"}var Uz=Ok,Vz=zk,Wz=Pk,Fk=Lk;const Gz=Uz,Yz=Vz,$k=m.forwardRef(({className:e,align:t=\"center\",sideOffset:n=4,...a},o)=>g.jsx(Wz,{children:g.jsx(Fk,{ref:o,align:t,sideOffset:n,className:je(\"z-50 w-72 rounded-md border border-stone-200 dark:border-[#3e3e42] bg-white dark:bg-[#252526] p-4 text-stone-950 dark:text-[#cccccc] shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",e),...a})}));$k.displayName=Fk.displayName;const Xz=[{id:\"tables\",label:\"Tables\",icon:nb},{id:\"functions\",label:\"Functions\",icon:tb},{id:\"storage\",label:\"Storage\",icon:TM},{id:\"logs\",label:\"Logs\",icon:EM},{id:\"analytics\",label:\"Analytics\",icon:wM}];function Qz({children:e,activeTab:t,onTabChange:n,navItems:a=Xz}){const{theme:o,toggleTheme:s}=PM(),{selectedComponent:c,setSelectedComponent:u,components:f,componentsLoading:h}=Ab(),v=f.length>1||f.length===1&&!f[0].isRoot,y=c||\"(root)\";return g.jsx(M7,{delayDuration:300,children:g.jsxs(\"div\",{className:\"flex h-screen bg-[var(--bg-secondary)]\",children:[g.jsxs(\"aside\",{className:\"w-12 flex flex-col border-r border-[var(--border-color)] bg-[var(--bg-primary)]\",children:[g.jsx(\"div\",{className:\"h-12 flex items-center justify-center border-b border-[var(--border-color)]\",children:g.jsxs(\"svg\",{width:\"24\",height:\"24\",viewBox:\"0 0 32 32\",fill:\"none\",xmlns:\"http://www.w3.org/2000/svg\",children:[g.jsx(\"rect\",{width:\"32\",height:\"32\",rx:z4,fill:j4}),g.jsx(\"path\",{d:P4,fill:\"white\"})]})}),g.jsx(\"nav\",{className:\"py-2\",children:a.map(x=>{const S=x.icon,w=t===x.id;return g.jsxs(Ag,{children:[g.jsx(Ng,{asChild:!0,children:g.jsxs(\"button\",{onClick:()=>n(x.id),className:je(\"w-full h-10 flex items-center justify-center transition-colors relative\",w?\"text-[var(--accent-color)] bg-[var(--bg-selected)]\":\"text-[var(--text-secondary)] hover:text-[var(--text-primary)] hover:bg-[var(--bg-hover)]\"),children:[g.jsx(S,{className:\"h-5 w-5\"}),w&&g.jsx(\"div\",{className:\"absolute left-0 top-1 bottom-1 w-0.5 bg-[var(--accent-color)] rounded-r\"})]})}),g.jsx(ph,{side:\"right\",children:g.jsx(\"p\",{children:x.label})})]},x.id)})}),g.jsx(\"div\",{className:\"flex-1\"}),g.jsxs(\"div\",{className:\"py-2 border-t border-[var(--border-color)]\",children:[g.jsxs(Ag,{children:[g.jsx(Ng,{asChild:!0,children:g.jsx(\"button\",{onClick:s,className:\"w-full h-10 flex items-center justify-center text-[var(--text-secondary)] hover:text-[var(--text-primary)] hover:bg-[var(--bg-hover)] transition-colors\",children:o===\"light\"?g.jsx(C4,{className:\"h-5 w-5\"}):g.jsx(A4,{className:\"h-5 w-5\"})})}),g.jsx(ph,{side:\"right\",children:g.jsx(\"p\",{children:o===\"light\"?\"Dark mode\":\"Light mode\"})})]}),g.jsxs(Ag,{children:[g.jsx(Ng,{asChild:!0,children:g.jsx(\"button\",{className:\"w-full h-10 flex items-center justify-center text-[var(--text-secondary)] hover:text-[var(--text-primary)] hover:bg-[var(--bg-hover)] transition-colors\",children:g.jsx(d4,{className:\"h-5 w-5\"})})}),g.jsx(ph,{side:\"right\",children:g.jsx(\"p\",{children:\"Help\"})})]})]})]}),g.jsxs(\"main\",{className:\"flex-1 overflow-hidden flex flex-col\",children:[v&&g.jsx(\"div\",{className:\"h-10 border-b border-[var(--border-color)] bg-[var(--bg-primary)] flex items-center px-4\",children:g.jsxs(Gz,{children:[g.jsx(Yz,{asChild:!0,children:g.jsxs(\"button\",{className:\"flex items-center gap-2 px-3 py-1.5 rounded-md hover:bg-[var(--bg-hover)] transition-colors\",disabled:h,children:[g.jsx(sC,{className:\"h-4 w-4 text-[var(--text-secondary)]\"}),g.jsx(\"span\",{className:\"text-sm font-medium text-[var(--text-primary)]\",children:y}),g.jsx(ns,{className:\"h-3 w-3 text-[var(--text-secondary)]\"})]})}),g.jsx($k,{align:\"start\",className:\"w-64 p-2\",children:g.jsx(\"div\",{className:\"space-y-1\",children:f.map(x=>g.jsxs(\"button\",{onClick:()=>u(x.isRoot?\"\":x.path),className:je(\"w-full flex items-center justify-between px-3 py-2 rounded-md text-left transition-colors\",x.isRoot&&c===\"\"||x.path===c?\"bg-[var(--bg-selected)] text-[var(--accent-color)]\":\"hover:bg-[var(--bg-hover)] text-[var(--text-primary)]\"),children:[g.jsxs(\"div\",{className:\"flex items-center gap-2\",children:[g.jsx(sC,{className:\"h-4 w-4\"}),g.jsx(\"span\",{className:\"text-sm font-medium\",children:x.isRoot?\"(root)\":x.path})]}),g.jsxs(\"span\",{className:\"text-xs text-[var(--text-secondary)]\",children:[x.functionCount,\" fn\"]})]},x.path))})})]})}),g.jsx(\"div\",{className:\"flex-1 overflow-hidden\",children:e})]})]})})}function Bk(e=\"This should not happen\"){throw new Error(e)}function da(e,t=\"Assertion failed\"){if(!e)return Bk(t)}function dd(e,t){return Bk(t??\"Hell froze over\")}function Kz(e,t){try{return e()}catch{return t}}const zC=Object.prototype.hasOwnProperty;function kc(e,t){let n,a;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((a=e.length)===t.length)for(;a--&&kc(e[a],t[a]););return a===-1}if(!n||typeof e==\"object\"){a=0;for(n in e)if(zC.call(e,n)&&++a&&!zC.call(t,n)||!(n in t)||!kc(e[n],t[n]))return!1;return Object.keys(t).length===a}}return e!==e&&t!==t}var Hg,PC;function Zz(){if(PC)return Hg;PC=1;var e=Object.prototype,t=e.hasOwnProperty;function n(a,o){return a!=null&&t.call(a,o)}return Hg=n,Hg}var qg,LC;function gi(){if(LC)return qg;LC=1;var e=Array.isArray;return qg=e,qg}var Fg,IC;function Uk(){if(IC)return Fg;IC=1;var e=typeof Yf==\"object\"&&Yf&&Yf.Object===Object&&Yf;return Fg=e,Fg}var $g,HC;function vi(){if(HC)return $g;HC=1;var e=Uk(),t=typeof self==\"object\"&&self&&self.Object===Object&&self,n=e||t||Function(\"return this\")();return $g=n,$g}var Bg,qC;function Td(){if(qC)return Bg;qC=1;var e=vi(),t=e.Symbol;return Bg=t,Bg}var Ug,FC;function Jz(){if(FC)return Ug;FC=1;var e=Td(),t=Object.prototype,n=t.hasOwnProperty,a=t.toString,o=e?e.toStringTag:void 0;function s(c){var u=n.call(c,o),f=c[o];try{c[o]=void 0;var h=!0}catch{}var v=a.call(c);return h&&(u?c[o]=f:delete c[o]),v}return Ug=s,Ug}var Vg,$C;function eP(){if($C)return Vg;$C=1;var e=Object.prototype,t=e.toString;function n(a){return t.call(a)}return Vg=n,Vg}var Wg,BC;function Md(){if(BC)return Wg;BC=1;var e=Td(),t=Jz(),n=eP(),a=\"[object Null]\",o=\"[object Undefined]\",s=e?e.toStringTag:void 0;function c(u){return u==null?u===void 0?o:a:s&&s in Object(u)?t(u):n(u)}return Wg=c,Wg}var Gg,UC;function kd(){if(UC)return Gg;UC=1;function e(t){return t!=null&&typeof t==\"object\"}return Gg=e,Gg}var Yg,VC;function om(){if(VC)return Yg;VC=1;var e=Md(),t=kd(),n=\"[object Symbol]\";function a(o){return typeof o==\"symbol\"||t(o)&&e(o)==n}return Yg=a,Yg}var Xg,WC;function Wb(){if(WC)return Xg;WC=1;var e=gi(),t=om(),n=/\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,a=/^\\w*$/;function o(s,c){if(e(s))return!1;var u=typeof s;return u==\"number\"||u==\"symbol\"||u==\"boolean\"||s==null||t(s)?!0:a.test(s)||!n.test(s)||c!=null&&s in Object(c)}return Xg=o,Xg}var Qg,GC;function ll(){if(GC)return Qg;GC=1;function e(t){var n=typeof t;return t!=null&&(n==\"object\"||n==\"function\")}return Qg=e,Qg}var Kg,YC;function Vk(){if(YC)return Kg;YC=1;var e=Md(),t=ll(),n=\"[object AsyncFunction]\",a=\"[object Function]\",o=\"[object GeneratorFunction]\",s=\"[object Proxy]\";function c(u){if(!t(u))return!1;var f=e(u);return f==a||f==o||f==n||f==s}return Kg=c,Kg}var Zg,XC;function tP(){if(XC)return Zg;XC=1;var e=vi(),t=e[\"__core-js_shared__\"];return Zg=t,Zg}var Jg,QC;function nP(){if(QC)return Jg;QC=1;var e=tP(),t=(function(){var a=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||\"\");return a?\"Symbol(src)_1.\"+a:\"\"})();function n(a){return!!t&&t in a}return Jg=n,Jg}var ev,KC;function Wk(){if(KC)return ev;KC=1;var e=Function.prototype,t=e.toString;function n(a){if(a!=null){try{return t.call(a)}catch{}try{return a+\"\"}catch{}}return\"\"}return ev=n,ev}var tv,ZC;function rP(){if(ZC)return tv;ZC=1;var e=Vk(),t=nP(),n=ll(),a=Wk(),o=/[\\\\^$.*+?()[\\]{}|]/g,s=/^\\[object .+?Constructor\\]$/,c=Function.prototype,u=Object.prototype,f=c.toString,h=u.hasOwnProperty,v=RegExp(\"^\"+f.call(h).replace(o,\"\\\\$&\").replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g,\"$1.*?\")+\"$\");function y(x){if(!n(x)||t(x))return!1;var S=e(x)?v:s;return S.test(a(x))}return tv=y,tv}var nv,JC;function aP(){if(JC)return nv;JC=1;function e(t,n){return t?.[n]}return nv=e,nv}var rv,e2;function cl(){if(e2)return rv;e2=1;var e=rP(),t=aP();function n(a,o){var s=t(a,o);return e(s)?s:void 0}return rv=n,rv}var av,t2;function sm(){if(t2)return av;t2=1;var e=cl(),t=e(Object,\"create\");return av=t,av}var iv,n2;function iP(){if(n2)return iv;n2=1;var e=sm();function t(){this.__data__=e?e(null):{},this.size=0}return iv=t,iv}var ov,r2;function oP(){if(r2)return ov;r2=1;function e(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}return ov=e,ov}var sv,a2;function sP(){if(a2)return sv;a2=1;var e=sm(),t=\"__lodash_hash_undefined__\",n=Object.prototype,a=n.hasOwnProperty;function o(s){var c=this.__data__;if(e){var u=c[s];return u===t?void 0:u}return a.call(c,s)?c[s]:void 0}return sv=o,sv}var lv,i2;function lP(){if(i2)return lv;i2=1;var e=sm(),t=Object.prototype,n=t.hasOwnProperty;function a(o){var s=this.__data__;return e?s[o]!==void 0:n.call(s,o)}return lv=a,lv}var cv,o2;function cP(){if(o2)return cv;o2=1;var e=sm(),t=\"__lodash_hash_undefined__\";function n(a,o){var s=this.__data__;return this.size+=this.has(a)?0:1,s[a]=e&&o===void 0?t:o,this}return cv=n,cv}var uv,s2;function uP(){if(s2)return uv;s2=1;var e=iP(),t=oP(),n=sP(),a=lP(),o=cP();function s(c){var u=-1,f=c==null?0:c.length;for(this.clear();++u<f;){var h=c[u];this.set(h[0],h[1])}}return s.prototype.clear=e,s.prototype.delete=t,s.prototype.get=n,s.prototype.has=a,s.prototype.set=o,uv=s,uv}var dv,l2;function dP(){if(l2)return dv;l2=1;function e(){this.__data__=[],this.size=0}return dv=e,dv}var fv,c2;function Gb(){if(c2)return fv;c2=1;function e(t,n){return t===n||t!==t&&n!==n}return fv=e,fv}var hv,u2;function lm(){if(u2)return hv;u2=1;var e=Gb();function t(n,a){for(var o=n.length;o--;)if(e(n[o][0],a))return o;return-1}return hv=t,hv}var mv,d2;function fP(){if(d2)return mv;d2=1;var e=lm(),t=Array.prototype,n=t.splice;function a(o){var s=this.__data__,c=e(s,o);if(c<0)return!1;var u=s.length-1;return c==u?s.pop():n.call(s,c,1),--this.size,!0}return mv=a,mv}var pv,f2;function hP(){if(f2)return pv;f2=1;var e=lm();function t(n){var a=this.__data__,o=e(a,n);return o<0?void 0:a[o][1]}return pv=t,pv}var gv,h2;function mP(){if(h2)return gv;h2=1;var e=lm();function t(n){return e(this.__data__,n)>-1}return gv=t,gv}var vv,m2;function pP(){if(m2)return vv;m2=1;var e=lm();function t(n,a){var o=this.__data__,s=e(o,n);return s<0?(++this.size,o.push([n,a])):o[s][1]=a,this}return vv=t,vv}var yv,p2;function cm(){if(p2)return yv;p2=1;var e=dP(),t=fP(),n=hP(),a=mP(),o=pP();function s(c){var u=-1,f=c==null?0:c.length;for(this.clear();++u<f;){var h=c[u];this.set(h[0],h[1])}}return s.prototype.clear=e,s.prototype.delete=t,s.prototype.get=n,s.prototype.has=a,s.prototype.set=o,yv=s,yv}var bv,g2;function Yb(){if(g2)return bv;g2=1;var e=cl(),t=vi(),n=e(t,\"Map\");return bv=n,bv}var xv,v2;function gP(){if(v2)return xv;v2=1;var e=uP(),t=cm(),n=Yb();function a(){this.size=0,this.__data__={hash:new e,map:new(n||t),string:new e}}return xv=a,xv}var wv,y2;function vP(){if(y2)return wv;y2=1;function e(t){var n=typeof t;return n==\"string\"||n==\"number\"||n==\"symbol\"||n==\"boolean\"?t!==\"__proto__\":t===null}return wv=e,wv}var Sv,b2;function um(){if(b2)return Sv;b2=1;var e=vP();function t(n,a){var o=n.__data__;return e(a)?o[typeof a==\"string\"?\"string\":\"hash\"]:o.map}return Sv=t,Sv}var Cv,x2;function yP(){if(x2)return Cv;x2=1;var e=um();function t(n){var a=e(this,n).delete(n);return this.size-=a?1:0,a}return Cv=t,Cv}var Rv,w2;function bP(){if(w2)return Rv;w2=1;var e=um();function t(n){return e(this,n).get(n)}return Rv=t,Rv}var Ev,S2;function xP(){if(S2)return Ev;S2=1;var e=um();function t(n){return e(this,n).has(n)}return Ev=t,Ev}var Tv,C2;function wP(){if(C2)return Tv;C2=1;var e=um();function t(n,a){var o=e(this,n),s=o.size;return o.set(n,a),this.size+=o.size==s?0:1,this}return Tv=t,Tv}var Mv,R2;function Xb(){if(R2)return Mv;R2=1;var e=gP(),t=yP(),n=bP(),a=xP(),o=wP();function s(c){var u=-1,f=c==null?0:c.length;for(this.clear();++u<f;){var h=c[u];this.set(h[0],h[1])}}return s.prototype.clear=e,s.prototype.delete=t,s.prototype.get=n,s.prototype.has=a,s.prototype.set=o,Mv=s,Mv}var kv,E2;function SP(){if(E2)return kv;E2=1;var e=Xb(),t=\"Expected a function\";function n(a,o){if(typeof a!=\"function\"||o!=null&&typeof o!=\"function\")throw new TypeError(t);var s=function(){var c=arguments,u=o?o.apply(this,c):c[0],f=s.cache;if(f.has(u))return f.get(u);var h=a.apply(this,c);return s.cache=f.set(u,h)||f,h};return s.cache=new(n.Cache||e),s}return n.Cache=e,kv=n,kv}var _v,T2;function CP(){if(T2)return _v;T2=1;var e=SP(),t=500;function n(a){var o=e(a,function(c){return s.size===t&&s.clear(),c}),s=o.cache;return o}return _v=n,_v}var Av,M2;function RP(){if(M2)return Av;M2=1;var e=CP(),t=/[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g,n=/\\\\(\\\\)?/g,a=e(function(o){var s=[];return o.charCodeAt(0)===46&&s.push(\"\"),o.replace(t,function(c,u,f,h){s.push(f?h.replace(n,\"$1\"):u||c)}),s});return Av=a,Av}var Nv,k2;function EP(){if(k2)return Nv;k2=1;function e(t,n){for(var a=-1,o=t==null?0:t.length,s=Array(o);++a<o;)s[a]=n(t[a],a,t);return s}return Nv=e,Nv}var Ov,_2;function TP(){if(_2)return Ov;_2=1;var e=Td(),t=EP(),n=gi(),a=om(),o=e?e.prototype:void 0,s=o?o.toString:void 0;function c(u){if(typeof u==\"string\")return u;if(n(u))return t(u,c)+\"\";if(a(u))return s?s.call(u):\"\";var f=u+\"\";return f==\"0\"&&1/u==-1/0?\"-0\":f}return Ov=c,Ov}var Dv,A2;function MP(){if(A2)return Dv;A2=1;var e=TP();function t(n){return n==null?\"\":e(n)}return Dv=t,Dv}var jv,N2;function Gk(){if(N2)return jv;N2=1;var e=gi(),t=Wb(),n=RP(),a=MP();function o(s,c){return e(s)?s:t(s,c)?[s]:n(a(s))}return jv=o,jv}var zv,O2;function kP(){if(O2)return zv;O2=1;var e=Md(),t=kd(),n=\"[object Arguments]\";function a(o){return t(o)&&e(o)==n}return zv=a,zv}var Pv,D2;function Qb(){if(D2)return Pv;D2=1;var e=kP(),t=kd(),n=Object.prototype,a=n.hasOwnProperty,o=n.propertyIsEnumerable,s=e((function(){return arguments})())?e:function(c){return t(c)&&a.call(c,\"callee\")&&!o.call(c,\"callee\")};return Pv=s,Pv}var Lv,j2;function Kb(){if(j2)return Lv;j2=1;var e=9007199254740991,t=/^(?:0|[1-9]\\d*)$/;function n(a,o){var s=typeof a;return o=o??e,!!o&&(s==\"number\"||s!=\"symbol\"&&t.test(a))&&a>-1&&a%1==0&&a<o}return Lv=n,Lv}var Iv,z2;function Zb(){if(z2)return Iv;z2=1;var e=9007199254740991;function t(n){return typeof n==\"number\"&&n>-1&&n%1==0&&n<=e}return Iv=t,Iv}var Hv,P2;function dm(){if(P2)return Hv;P2=1;var e=om();function t(n){if(typeof n==\"string\"||e(n))return n;var a=n+\"\";return a==\"0\"&&1/n==-1/0?\"-0\":a}return Hv=t,Hv}var qv,L2;function Yk(){if(L2)return qv;L2=1;var e=Gk(),t=Qb(),n=gi(),a=Kb(),o=Zb(),s=dm();function c(u,f,h){f=e(f,u);for(var v=-1,y=f.length,x=!1;++v<y;){var S=s(f[v]);if(!(x=u!=null&&h(u,S)))break;u=u[S]}return x||++v!=y?x:(y=u==null?0:u.length,!!y&&o(y)&&a(S,y)&&(n(u)||t(u)))}return qv=c,qv}var Fv,I2;function _P(){if(I2)return Fv;I2=1;var e=Zz(),t=Yk();function n(a,o){return a!=null&&t(a,o,e)}return Fv=n,Fv}var AP=_P();const NP=Ua(AP),kh=null,Jb=void 0;var Ie;(function(e){e.Uri=\"uri\",e.Text=\"text\",e.Image=\"image\",e.RowID=\"row-id\",e.Number=\"number\",e.Bubble=\"bubble\",e.Boolean=\"boolean\",e.Loading=\"loading\",e.Markdown=\"markdown\",e.Drilldown=\"drilldown\",e.Protected=\"protected\",e.Custom=\"custom\"})(Ie||(Ie={}));var H2;(function(e){e.HeaderRowID=\"headerRowID\",e.HeaderCode=\"headerCode\",e.HeaderNumber=\"headerNumber\",e.HeaderString=\"headerString\",e.HeaderBoolean=\"headerBoolean\",e.HeaderAudioUri=\"headerAudioUri\",e.HeaderVideoUri=\"headerVideoUri\",e.HeaderEmoji=\"headerEmoji\",e.HeaderImage=\"headerImage\",e.HeaderUri=\"headerUri\",e.HeaderPhone=\"headerPhone\",e.HeaderMarkdown=\"headerMarkdown\",e.HeaderDate=\"headerDate\",e.HeaderTime=\"headerTime\",e.HeaderEmail=\"headerEmail\",e.HeaderReference=\"headerReference\",e.HeaderIfThenElse=\"headerIfThenElse\",e.HeaderSingleValue=\"headerSingleValue\",e.HeaderLookup=\"headerLookup\",e.HeaderTextTemplate=\"headerTextTemplate\",e.HeaderMath=\"headerMath\",e.HeaderRollup=\"headerRollup\",e.HeaderJoinStrings=\"headerJoinStrings\",e.HeaderSplitString=\"headerSplitString\",e.HeaderGeoDistance=\"headerGeoDistance\",e.HeaderArray=\"headerArray\",e.RowOwnerOverlay=\"rowOwnerOverlay\",e.ProtectedColumnOverlay=\"protectedColumnOverlay\"})(H2||(H2={}));var _h;(function(e){e.Triangle=\"triangle\",e.Dots=\"dots\"})(_h||(_h={}));function rh(e){return\"width\"in e&&typeof e.width==\"number\"}async function q2(e){return typeof e==\"object\"?e:await e()}function Ki(e){return!(e.kind===Ie.Loading||e.kind===Ie.Bubble||e.kind===Ie.RowID||e.kind===Ie.Protected||e.kind===Ie.Drilldown)}function Zs(e){return e.kind===Ea.Marker||e.kind===Ea.NewRow}function $u(e){if(!Ki(e)||e.kind===Ie.Image)return!1;if(e.kind===Ie.Text||e.kind===Ie.Number||e.kind===Ie.Markdown||e.kind===Ie.Uri||e.kind===Ie.Custom||e.kind===Ie.Boolean)return e.readonly!==!0;dd(e,\"A cell was passed with an invalid kind\")}function Xk(e){return NP(e,\"editor\")}function fb(e){return!(e.readonly??!1)}var Ea;(function(e){e.NewRow=\"new-row\",e.Marker=\"marker\"})(Ea||(Ea={}));function OP(e){if(e.length===0)return[];const t=[...e],n=[];t.sort(function(a,o){return a[0]-o[0]}),n.push([...t[0]]);for(const a of t.slice(1)){const o=n[n.length-1];o[1]<a[0]?n.push([...a]):o[1]<a[1]&&(o[1]=a[1])}return n}let F2;class vt{items;constructor(t){this.items=t}static empty=()=>F2??(F2=new vt([]));static fromSingleSelection=t=>vt.empty().add(t);offset(t){if(t===0)return this;const n=this.items.map(a=>[a[0]+t,a[1]+t]);return new vt(n)}add(t){const n=typeof t==\"number\"?[t,t+1]:t,a=OP([...this.items,n]);return new vt(a)}remove(t){const n=[...this.items],a=typeof t==\"number\"?t:t[0],o=typeof t==\"number\"?t+1:t[1];for(const[s,c]of n.entries()){const[u,f]=c;if(u<=o&&a<=f){const h=[];u<a&&h.push([u,a]),o<f&&h.push([o,f]),n.splice(s,1,...h)}}return new vt(n)}first(){if(this.items.length!==0)return this.items[0][0]}last(){if(this.items.length!==0)return this.items.slice(-1)[0][1]-1}hasIndex(t){for(let n=0;n<this.items.length;n++){const[a,o]=this.items[n];if(t>=a&&t<o)return!0}return!1}hasAll(t){for(let n=t[0];n<t[1];n++)if(!this.hasIndex(n))return!1;return!0}some(t){for(const n of this)if(t(n))return!0;return!1}equals(t){if(t===this)return!0;if(t.items.length!==this.items.length)return!1;for(let n=0;n<this.items.length;n++){const a=t.items[n],o=this.items[n];if(a[0]!==o[0]||a[1]!==o[1])return!1}return!0}toArray(){const t=[];for(const[n,a]of this.items)for(let o=n;o<a;o++)t.push(o);return t}get length(){let t=0;for(const[n,a]of this.items)t+=a-n;return t}*[Symbol.iterator](){for(const[t,n]of this.items)for(let a=t;a<n;a++)yield a}}function DP(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var jP=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,$v=DP(function(e){return jP.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),zP=function(){const t=Array.prototype.slice.call(arguments).filter(Boolean),n={},a=[];t.forEach(s=>{(s?s.split(\" \"):[]).forEach(u=>{if(u.startsWith(\"atm_\")){const[,f]=u.split(\"_\");n[f]=u}else a.push(u)})});const o=[];for(const s in n)Object.prototype.hasOwnProperty.call(n,s)&&o.push(n[s]);return o.push(...a),o.join(\" \")},$2=zP,PP=e=>e.toUpperCase()===e,LP=e=>t=>e.indexOf(t)===-1,Qk=(e,t)=>{const n={};return Object.keys(e).filter(LP(t)).forEach(a=>{n[a]=e[a]}),n};function IP(e,t,n){const a=Qk(t,n);if(!e){const o=typeof $v==\"function\"?{default:$v}:$v;Object.keys(a).forEach(s=>{o.default(s)||delete a[s]})}return a}var HP=(e,t)=>{};function qP(e){let t=\"\";return n=>{const a=(s,c)=>{const{as:u=e,class:f=t}=s,h=n.propsAsIs===void 0?!(typeof u==\"string\"&&u.indexOf(\"-\")===-1&&!PP(u[0])):n.propsAsIs,v=IP(h,s,[\"as\",\"class\"]);v.ref=c,v.className=n.atomic?$2(n.class,v.className||f):$2(v.className||f,n.class);const{vars:y}=n;if(y){const x={};for(const C in y){const R=y[C],k=R[0],T=R[1]||\"\",M=typeof k==\"function\"?k(s):k;HP(M,n.name),x[`--${C}`]=`${M}${T}`}const S=v.style||{},w=Object.keys(S);w.length>0&&w.forEach(C=>{x[C]=S[C]}),v.style=x}return e.__linaria&&e!==u?(v.as=u,At.createElement(e,v)):At.createElement(u,v)},o=At.forwardRef?At.forwardRef(a):s=>{const c=Qk(s,[\"innerRef\"]);return a(c,s.innerRef)};return o.displayName=n.name,o.__linaria={className:n.class||t,extends:e},o}}var kr=qP;const FP=kr(\"div\")({name:\"ImageOverlayEditorStyle\",class:\"gdg-i2iowwq\",propsAsIs:!1});var Bv={},Tu={},ah={},ih={},Uv={exports:{}},Vv,B2;function $P(){if(B2)return Vv;B2=1;var e=\"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED\";return Vv=e,Vv}var Wv,U2;function BP(){if(U2)return Wv;U2=1;var e=$P();function t(){}function n(){}return n.resetWarningCache=t,Wv=function(){function a(c,u,f,h,v,y){if(y!==e){var x=new Error(\"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types\");throw x.name=\"Invariant Violation\",x}}a.isRequired=a;function o(){return a}var s={array:a,bigint:a,bool:a,func:a,number:a,object:a,string:a,symbol:a,any:a,arrayOf:o,element:a,elementType:a,instanceOf:o,node:a,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return s.PropTypes=s,s},Wv}var V2;function UP(){return V2||(V2=1,Uv.exports=BP()()),Uv.exports}var W2;function VP(){return W2||(W2=1,(function(e){(function(t,n){n(e,cs(),UP())})(ih,function(t,n,a){Object.defineProperty(t,\"__esModule\",{value:!0}),t.setHasSupportToCaptureOption=w;var o=c(n),s=c(a);function c(T){return T&&T.__esModule?T:{default:T}}var u=Object.assign||function(T){for(var M=1;M<arguments.length;M++){var j=arguments[M];for(var I in j)Object.prototype.hasOwnProperty.call(j,I)&&(T[I]=j[I])}return T};function f(T,M){var j={};for(var I in T)M.indexOf(I)>=0||Object.prototype.hasOwnProperty.call(T,I)&&(j[I]=T[I]);return j}function h(T,M){if(!(T instanceof M))throw new TypeError(\"Cannot call a class as a function\")}var v=(function(){function T(M,j){for(var I=0;I<j.length;I++){var P=j[I];P.enumerable=P.enumerable||!1,P.configurable=!0,\"value\"in P&&(P.writable=!0),Object.defineProperty(M,P.key,P)}}return function(M,j,I){return j&&T(M.prototype,j),I&&T(M,I),M}})();function y(T,M){if(!T)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return M&&(typeof M==\"object\"||typeof M==\"function\")?M:T}function x(T,M){if(typeof M!=\"function\"&&M!==null)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof M);T.prototype=Object.create(M&&M.prototype,{constructor:{value:T,enumerable:!1,writable:!0,configurable:!0}}),M&&(Object.setPrototypeOf?Object.setPrototypeOf(T,M):T.__proto__=M)}var S=!1;function w(T){S=T}try{addEventListener(\"test\",null,Object.defineProperty({},\"capture\",{get:function(){w(!0)}}))}catch{}function C(){var T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{capture:!0};return S?T:T.capture}function R(T){if(\"touches\"in T){var M=T.touches[0],j=M.pageX,I=M.pageY;return{x:j,y:I}}var P=T.screenX,A=T.screenY;return{x:P,y:A}}var k=(function(T){x(M,T);function M(){var j;h(this,M);for(var I=arguments.length,P=Array(I),A=0;A<I;A++)P[A]=arguments[A];var q=y(this,(j=M.__proto__||Object.getPrototypeOf(M)).call.apply(j,[this].concat(P)));return q._handleSwipeStart=q._handleSwipeStart.bind(q),q._handleSwipeMove=q._handleSwipeMove.bind(q),q._handleSwipeEnd=q._handleSwipeEnd.bind(q),q._onMouseDown=q._onMouseDown.bind(q),q._onMouseMove=q._onMouseMove.bind(q),q._onMouseUp=q._onMouseUp.bind(q),q._setSwiperRef=q._setSwiperRef.bind(q),q}return v(M,[{key:\"componentDidMount\",value:function(){this.swiper&&this.swiper.addEventListener(\"touchmove\",this._handleSwipeMove,C({capture:!0,passive:!1}))}},{key:\"componentWillUnmount\",value:function(){this.swiper&&this.swiper.removeEventListener(\"touchmove\",this._handleSwipeMove,C({capture:!0,passive:!1}))}},{key:\"_onMouseDown\",value:function(I){this.props.allowMouseEvents&&(this.mouseDown=!0,document.addEventListener(\"mouseup\",this._onMouseUp),document.addEventListener(\"mousemove\",this._onMouseMove),this._handleSwipeStart(I))}},{key:\"_onMouseMove\",value:function(I){this.mouseDown&&this._handleSwipeMove(I)}},{key:\"_onMouseUp\",value:function(I){this.mouseDown=!1,document.removeEventListener(\"mouseup\",this._onMouseUp),document.removeEventListener(\"mousemove\",this._onMouseMove),this._handleSwipeEnd(I)}},{key:\"_handleSwipeStart\",value:function(I){var P=R(I),A=P.x,q=P.y;this.moveStart={x:A,y:q},this.props.onSwipeStart(I)}},{key:\"_handleSwipeMove\",value:function(I){if(this.moveStart){var P=R(I),A=P.x,q=P.y,B=A-this.moveStart.x,V=q-this.moveStart.y;this.moving=!0;var N=this.props.onSwipeMove({x:B,y:V},I);N&&I.cancelable&&I.preventDefault(),this.movePosition={deltaX:B,deltaY:V}}}},{key:\"_handleSwipeEnd\",value:function(I){this.props.onSwipeEnd(I);var P=this.props.tolerance;this.moving&&this.movePosition&&(this.movePosition.deltaX<-P?this.props.onSwipeLeft(1,I):this.movePosition.deltaX>P&&this.props.onSwipeRight(1,I),this.movePosition.deltaY<-P?this.props.onSwipeUp(1,I):this.movePosition.deltaY>P&&this.props.onSwipeDown(1,I)),this.moveStart=null,this.moving=!1,this.movePosition=null}},{key:\"_setSwiperRef\",value:function(I){this.swiper=I,this.props.innerRef(I)}},{key:\"render\",value:function(){var I=this.props;I.tagName;var P=I.className,A=I.style,q=I.children;I.allowMouseEvents,I.onSwipeUp,I.onSwipeDown,I.onSwipeLeft,I.onSwipeRight,I.onSwipeStart,I.onSwipeMove,I.onSwipeEnd,I.innerRef,I.tolerance;var B=f(I,[\"tagName\",\"className\",\"style\",\"children\",\"allowMouseEvents\",\"onSwipeUp\",\"onSwipeDown\",\"onSwipeLeft\",\"onSwipeRight\",\"onSwipeStart\",\"onSwipeMove\",\"onSwipeEnd\",\"innerRef\",\"tolerance\"]);return o.default.createElement(this.props.tagName,u({ref:this._setSwiperRef,onMouseDown:this._onMouseDown,onTouchStart:this._handleSwipeStart,onTouchEnd:this._handleSwipeEnd,className:P,style:A},B),q)}}]),M})(n.Component);k.displayName=\"ReactSwipe\",k.propTypes={tagName:s.default.string,className:s.default.string,style:s.default.object,children:s.default.node,allowMouseEvents:s.default.bool,onSwipeUp:s.default.func,onSwipeDown:s.default.func,onSwipeLeft:s.default.func,onSwipeRight:s.default.func,onSwipeStart:s.default.func,onSwipeMove:s.default.func,onSwipeEnd:s.default.func,innerRef:s.default.func,tolerance:s.default.number.isRequired},k.defaultProps={tagName:\"div\",allowMouseEvents:!1,onSwipeUp:function(){},onSwipeDown:function(){},onSwipeLeft:function(){},onSwipeRight:function(){},onSwipeStart:function(){},onSwipeMove:function(){},onSwipeEnd:function(){},innerRef:function(){},tolerance:0},t.default=k})})(ih)),ih}var G2;function Kk(){return G2||(G2=1,(function(e){(function(t,n){n(e,VP())})(ah,function(t,n){Object.defineProperty(t,\"__esModule\",{value:!0});var a=o(n);function o(s){return s&&s.__esModule?s:{default:s}}t.default=a.default})})(ah)),ah}var Mu={},Gv={exports:{}};var Y2;function WP(){return Y2||(Y2=1,(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var s=\"\",c=0;c<arguments.length;c++){var u=arguments[c];u&&(s=o(s,a(u)))}return s}function a(s){if(typeof s==\"string\"||typeof s==\"number\")return s;if(typeof s!=\"object\")return\"\";if(Array.isArray(s))return n.apply(null,s);if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes(\"[native code]\"))return s.toString();var c=\"\";for(var u in s)t.call(s,u)&&s[u]&&(c=o(c,u));return c}function o(s,c){return c?s?s+\" \"+c:s+c:s}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(Gv)),Gv.exports}var X2;function Zk(){if(X2)return Mu;X2=1,Object.defineProperty(Mu,\"__esModule\",{value:!0}),Mu.default=void 0;var e=t(WP());function t(o){return o&&o.__esModule?o:{default:o}}function n(o,s,c){return s in o?Object.defineProperty(o,s,{value:c,enumerable:!0,configurable:!0,writable:!0}):o[s]=c,o}var a={ROOT:function(s){return(0,e.default)(n({\"carousel-root\":!0},s||\"\",!!s))},CAROUSEL:function(s){return(0,e.default)({carousel:!0,\"carousel-slider\":s})},WRAPPER:function(s,c){return(0,e.default)({\"thumbs-wrapper\":!s,\"slider-wrapper\":s,\"axis-horizontal\":c===\"horizontal\",\"axis-vertical\":c!==\"horizontal\"})},SLIDER:function(s,c){return(0,e.default)({thumbs:!s,slider:s,animated:!c})},ITEM:function(s,c,u){return(0,e.default)({thumb:!s,slide:s,selected:c,previous:u})},ARROW_PREV:function(s){return(0,e.default)({\"control-arrow control-prev\":!0,\"control-disabled\":s})},ARROW_NEXT:function(s){return(0,e.default)({\"control-arrow control-next\":!0,\"control-disabled\":s})},DOT:function(s){return(0,e.default)({dot:!0,selected:s})}};return Mu.default=a,Mu}var ku={},_u={},Q2;function GP(){if(Q2)return _u;Q2=1,Object.defineProperty(_u,\"__esModule\",{value:!0}),_u.outerWidth=void 0;var e=function(n){var a=n.offsetWidth,o=getComputedStyle(n);return a+=parseInt(o.marginLeft)+parseInt(o.marginRight),a};return _u.outerWidth=e,_u}var Au={},K2;function e1(){if(K2)return Au;K2=1,Object.defineProperty(Au,\"__esModule\",{value:!0}),Au.default=void 0;var e=function(n,a,o){var s=n===0?n:n+a,c=o===\"horizontal\"?[s,0,0]:[0,s,0],u=\"translate3d\",f=\"(\"+c.join(\",\")+\")\";return u+f};return Au.default=e,Au}var Nu={},Z2;function Jk(){if(Z2)return Nu;Z2=1,Object.defineProperty(Nu,\"__esModule\",{value:!0}),Nu.default=void 0;var e=function(){return window};return Nu.default=e,Nu}var J2;function e_(){if(J2)return ku;J2=1,Object.defineProperty(ku,\"__esModule\",{value:!0}),ku.default=void 0;var e=f(cs()),t=c(Zk()),n=GP(),a=c(e1()),o=c(Kk()),s=c(Jk());function c(q){return q&&q.__esModule?q:{default:q}}function u(){if(typeof WeakMap!=\"function\")return null;var q=new WeakMap;return u=function(){return q},q}function f(q){if(q&&q.__esModule)return q;if(q===null||h(q)!==\"object\"&&typeof q!=\"function\")return{default:q};var B=u();if(B&&B.has(q))return B.get(q);var V={},N=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var _ in q)if(Object.prototype.hasOwnProperty.call(q,_)){var z=N?Object.getOwnPropertyDescriptor(q,_):null;z&&(z.get||z.set)?Object.defineProperty(V,_,z):V[_]=q[_]}return V.default=q,B&&B.set(q,V),V}function h(q){\"@babel/helpers - typeof\";return typeof Symbol==\"function\"&&typeof Symbol.iterator==\"symbol\"?h=function(V){return typeof V}:h=function(V){return V&&typeof Symbol==\"function\"&&V.constructor===Symbol&&V!==Symbol.prototype?\"symbol\":typeof V},h(q)}function v(){return v=Object.assign||function(q){for(var B=1;B<arguments.length;B++){var V=arguments[B];for(var N in V)Object.prototype.hasOwnProperty.call(V,N)&&(q[N]=V[N])}return q},v.apply(this,arguments)}function y(q,B){if(!(q instanceof B))throw new TypeError(\"Cannot call a class as a function\")}function x(q,B){for(var V=0;V<B.length;V++){var N=B[V];N.enumerable=N.enumerable||!1,N.configurable=!0,\"value\"in N&&(N.writable=!0),Object.defineProperty(q,N.key,N)}}function S(q,B,V){return B&&x(q.prototype,B),q}function w(q,B){if(typeof B!=\"function\"&&B!==null)throw new TypeError(\"Super expression must either be null or a function\");q.prototype=Object.create(B&&B.prototype,{constructor:{value:q,writable:!0,configurable:!0}}),B&&C(q,B)}function C(q,B){return C=Object.setPrototypeOf||function(N,_){return N.__proto__=_,N},C(q,B)}function R(q){var B=M();return function(){var N=j(q),_;if(B){var z=j(this).constructor;_=Reflect.construct(N,arguments,z)}else _=N.apply(this,arguments);return k(this,_)}}function k(q,B){return B&&(h(B)===\"object\"||typeof B==\"function\")?B:T(q)}function T(q){if(q===void 0)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return q}function M(){if(typeof Reflect>\"u\"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy==\"function\")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function j(q){return j=Object.setPrototypeOf?Object.getPrototypeOf:function(V){return V.__proto__||Object.getPrototypeOf(V)},j(q)}function I(q,B,V){return B in q?Object.defineProperty(q,B,{value:V,enumerable:!0,configurable:!0,writable:!0}):q[B]=V,q}var P=function(B){return B.hasOwnProperty(\"key\")},A=(function(q){w(V,q);var B=R(V);function V(N){var _;return y(this,V),_=B.call(this,N),I(T(_),\"itemsWrapperRef\",void 0),I(T(_),\"itemsListRef\",void 0),I(T(_),\"thumbsRef\",void 0),I(T(_),\"setItemsWrapperRef\",function(z){_.itemsWrapperRef=z}),I(T(_),\"setItemsListRef\",function(z){_.itemsListRef=z}),I(T(_),\"setThumbsRef\",function(z,F){_.thumbsRef||(_.thumbsRef=[]),_.thumbsRef[F]=z}),I(T(_),\"updateSizes\",function(){if(!(!_.props.children||!_.itemsWrapperRef||!_.thumbsRef)){var z=e.Children.count(_.props.children),F=_.itemsWrapperRef.clientWidth,O=_.props.thumbWidth?_.props.thumbWidth:(0,n.outerWidth)(_.thumbsRef[0]),$=Math.floor(F/O),W=$<z,U=W?z-$:0;_.setState(function(K,ie){return{itemSize:O,visibleItems:$,firstItem:W?_.getFirstItem(ie.selectedItem):0,lastPosition:U,showArrows:W}})}}),I(T(_),\"handleClickItem\",function(z,F,O){if(!P(O)||O.key===\"Enter\"){var $=_.props.onSelectItem;typeof $==\"function\"&&$(z,F)}}),I(T(_),\"onSwipeStart\",function(){_.setState({swiping:!0})}),I(T(_),\"onSwipeEnd\",function(){_.setState({swiping:!1})}),I(T(_),\"onSwipeMove\",function(z){var F=z.x;if(!_.state.itemSize||!_.itemsWrapperRef||!_.state.visibleItems)return!1;var O=0,$=e.Children.count(_.props.children),W=-(_.state.firstItem*100)/_.state.visibleItems,U=Math.max($-_.state.visibleItems,0),K=-U*100/_.state.visibleItems;W===O&&F>0&&(F=0),W===K&&F<0&&(F=0);var ie=_.itemsWrapperRef.clientWidth,L=W+100/(ie/F);return _.itemsListRef&&[\"WebkitTransform\",\"MozTransform\",\"MsTransform\",\"OTransform\",\"transform\",\"msTransform\"].forEach(function(X){_.itemsListRef.style[X]=(0,a.default)(L,\"%\",_.props.axis)}),!0}),I(T(_),\"slideRight\",function(z){_.moveTo(_.state.firstItem-(typeof z==\"number\"?z:1))}),I(T(_),\"slideLeft\",function(z){_.moveTo(_.state.firstItem+(typeof z==\"number\"?z:1))}),I(T(_),\"moveTo\",function(z){z=z<0?0:z,z=z>=_.state.lastPosition?_.state.lastPosition:z,_.setState({firstItem:z})}),_.state={selectedItem:N.selectedItem,swiping:!1,showArrows:!1,firstItem:0,visibleItems:0,lastPosition:0},_}return S(V,[{key:\"componentDidMount\",value:function(){this.setupThumbs()}},{key:\"componentDidUpdate\",value:function(_){this.props.selectedItem!==this.state.selectedItem&&this.setState({selectedItem:this.props.selectedItem,firstItem:this.getFirstItem(this.props.selectedItem)}),this.props.children!==_.children&&this.updateSizes()}},{key:\"componentWillUnmount\",value:function(){this.destroyThumbs()}},{key:\"setupThumbs\",value:function(){(0,s.default)().addEventListener(\"resize\",this.updateSizes),(0,s.default)().addEventListener(\"DOMContentLoaded\",this.updateSizes),this.updateSizes()}},{key:\"destroyThumbs\",value:function(){(0,s.default)().removeEventListener(\"resize\",this.updateSizes),(0,s.default)().removeEventListener(\"DOMContentLoaded\",this.updateSizes)}},{key:\"getFirstItem\",value:function(_){var z=_;return _>=this.state.lastPosition&&(z=this.state.lastPosition),_<this.state.firstItem+this.state.visibleItems&&(z=this.state.firstItem),_<this.state.firstItem&&(z=_),z}},{key:\"renderItems\",value:function(){var _=this;return this.props.children.map(function(z,F){var O=t.default.ITEM(!1,F===_.state.selectedItem),$={key:F,ref:function(U){return _.setThumbsRef(U,F)},className:O,onClick:_.handleClickItem.bind(_,F,_.props.children[F]),onKeyDown:_.handleClickItem.bind(_,F,_.props.children[F]),\"aria-label\":\"\".concat(_.props.labels.item,\" \").concat(F+1),style:{width:_.props.thumbWidth}};return e.default.createElement(\"li\",v({},$,{role:\"button\",tabIndex:0}),z)})}},{key:\"render\",value:function(){var _=this;if(!this.props.children)return null;var z=e.Children.count(this.props.children)>1,F=this.state.showArrows&&this.state.firstItem>0,O=this.state.showArrows&&this.state.firstItem<this.state.lastPosition,$={},W=-this.state.firstItem*(this.state.itemSize||0),U=(0,a.default)(W,\"px\",this.props.axis),K=this.props.transitionTime+\"ms\";return $={WebkitTransform:U,MozTransform:U,MsTransform:U,OTransform:U,transform:U,msTransform:U,WebkitTransitionDuration:K,MozTransitionDuration:K,MsTransitionDuration:K,OTransitionDuration:K,transitionDuration:K,msTransitionDuration:K},e.default.createElement(\"div\",{className:t.default.CAROUSEL(!1)},e.default.createElement(\"div\",{className:t.default.WRAPPER(!1),ref:this.setItemsWrapperRef},e.default.createElement(\"button\",{type:\"button\",className:t.default.ARROW_PREV(!F),onClick:function(){return _.slideRight()},\"aria-label\":this.props.labels.leftArrow}),z?e.default.createElement(o.default,{tagName:\"ul\",className:t.default.SLIDER(!1,this.state.swiping),onSwipeLeft:this.slideLeft,onSwipeRight:this.slideRight,onSwipeMove:this.onSwipeMove,onSwipeStart:this.onSwipeStart,onSwipeEnd:this.onSwipeEnd,style:$,innerRef:this.setItemsListRef,allowMouseEvents:this.props.emulateTouch},this.renderItems()):e.default.createElement(\"ul\",{className:t.default.SLIDER(!1,this.state.swiping),ref:function(L){return _.setItemsListRef(L)},style:$},this.renderItems()),e.default.createElement(\"button\",{type:\"button\",className:t.default.ARROW_NEXT(!O),onClick:function(){return _.slideLeft()},\"aria-label\":this.props.labels.rightArrow})))}}]),V})(e.Component);return ku.default=A,I(A,\"displayName\",\"Thumbs\"),I(A,\"defaultProps\",{axis:\"horizontal\",labels:{leftArrow:\"previous slide / item\",rightArrow:\"next slide / item\",item:\"slide item\"},selectedItem:0,thumbWidth:80,transitionTime:350}),ku}var Ou={},eR;function YP(){if(eR)return Ou;eR=1,Object.defineProperty(Ou,\"__esModule\",{value:!0}),Ou.default=void 0;var e=function(){return document};return Ou.default=e,Ou}var oa={},tR;function t_(){if(tR)return oa;tR=1,Object.defineProperty(oa,\"__esModule\",{value:!0}),oa.setPosition=oa.getPosition=oa.isKeyboardEvent=oa.defaultStatusFormatter=oa.noop=void 0;var e=cs(),t=n(e1());function n(f){return f&&f.__esModule?f:{default:f}}var a=function(){};oa.noop=a;var o=function(h,v){return\"\".concat(h,\" of \").concat(v)};oa.defaultStatusFormatter=o;var s=function(h){return h?h.hasOwnProperty(\"key\"):!1};oa.isKeyboardEvent=s;var c=function(h,v){if(v.infiniteLoop&&++h,h===0)return 0;var y=e.Children.count(v.children);if(v.centerMode&&v.axis===\"horizontal\"){var x=-h*v.centerSlidePercentage,S=y-1;return h&&(h!==S||v.infiniteLoop)?x+=(100-v.centerSlidePercentage)/2:h===S&&(x+=100-v.centerSlidePercentage),x}return-h*100};oa.getPosition=c;var u=function(h,v){var y={};return[\"WebkitTransform\",\"MozTransform\",\"MsTransform\",\"OTransform\",\"transform\",\"msTransform\"].forEach(function(x){y[x]=(0,t.default)(h,\"%\",v)}),y};return oa.setPosition=u,oa}var Ia={},nR;function XP(){if(nR)return Ia;nR=1,Object.defineProperty(Ia,\"__esModule\",{value:!0}),Ia.fadeAnimationHandler=Ia.slideStopSwipingHandler=Ia.slideSwipeAnimationHandler=Ia.slideAnimationHandler=void 0;var e=cs(),t=a(e1()),n=t_();function a(y){return y&&y.__esModule?y:{default:y}}function o(y,x){var S=Object.keys(y);if(Object.getOwnPropertySymbols){var w=Object.getOwnPropertySymbols(y);x&&(w=w.filter(function(C){return Object.getOwnPropertyDescriptor(y,C).enumerable})),S.push.apply(S,w)}return S}function s(y){for(var x=1;x<arguments.length;x++){var S=arguments[x]!=null?arguments[x]:{};x%2?o(Object(S),!0).forEach(function(w){c(y,w,S[w])}):Object.getOwnPropertyDescriptors?Object.defineProperties(y,Object.getOwnPropertyDescriptors(S)):o(Object(S)).forEach(function(w){Object.defineProperty(y,w,Object.getOwnPropertyDescriptor(S,w))})}return y}function c(y,x,S){return x in y?Object.defineProperty(y,x,{value:S,enumerable:!0,configurable:!0,writable:!0}):y[x]=S,y}var u=function(x,S){var w={},C=S.selectedItem,R=C,k=e.Children.count(x.children)-1,T=x.infiniteLoop&&(C<0||C>k);if(T)return R<0?x.centerMode&&x.centerSlidePercentage&&x.axis===\"horizontal\"?w.itemListStyle=(0,n.setPosition)(-(k+2)*x.centerSlidePercentage-(100-x.centerSlidePercentage)/2,x.axis):w.itemListStyle=(0,n.setPosition)(-(k+2)*100,x.axis):R>k&&(w.itemListStyle=(0,n.setPosition)(0,x.axis)),w;var M=(0,n.getPosition)(C,x),j=(0,t.default)(M,\"%\",x.axis),I=x.transitionTime+\"ms\";return w.itemListStyle={WebkitTransform:j,msTransform:j,OTransform:j,transform:j},S.swiping||(w.itemListStyle=s(s({},w.itemListStyle),{},{WebkitTransitionDuration:I,MozTransitionDuration:I,OTransitionDuration:I,transitionDuration:I,msTransitionDuration:I})),w};Ia.slideAnimationHandler=u;var f=function(x,S,w,C){var R={},k=S.axis===\"horizontal\",T=e.Children.count(S.children),M=0,j=(0,n.getPosition)(w.selectedItem,S),I=S.infiniteLoop?(0,n.getPosition)(T-1,S)-100:(0,n.getPosition)(T-1,S),P=k?x.x:x.y,A=P;j===M&&P>0&&(A=0),j===I&&P<0&&(A=0);var q=j+100/(w.itemSize/A),B=Math.abs(P)>S.swipeScrollTolerance;return S.infiniteLoop&&B&&(w.selectedItem===0&&q>-100?q-=T*100:w.selectedItem===T-1&&q<-T*100&&(q+=T*100)),(!S.preventMovementUntilSwipeScrollTolerance||B||w.swipeMovementStarted)&&(w.swipeMovementStarted||C({swipeMovementStarted:!0}),R.itemListStyle=(0,n.setPosition)(q,S.axis)),B&&!w.cancelClick&&C({cancelClick:!0}),R};Ia.slideSwipeAnimationHandler=f;var h=function(x,S){var w=(0,n.getPosition)(S.selectedItem,x),C=(0,n.setPosition)(w,x.axis);return{itemListStyle:C}};Ia.slideStopSwipingHandler=h;var v=function(x,S){var w=x.transitionTime+\"ms\",C=\"ease-in-out\",R={position:\"absolute\",display:\"block\",zIndex:-2,minHeight:\"100%\",opacity:0,top:0,right:0,left:0,bottom:0,transitionTimingFunction:C,msTransitionTimingFunction:C,MozTransitionTimingFunction:C,WebkitTransitionTimingFunction:C,OTransitionTimingFunction:C};return S.swiping||(R=s(s({},R),{},{WebkitTransitionDuration:w,MozTransitionDuration:w,OTransitionDuration:w,transitionDuration:w,msTransitionDuration:w})),{slideStyle:R,selectedStyle:s(s({},R),{},{opacity:1,position:\"relative\"}),prevStyle:s({},R)}};return Ia.fadeAnimationHandler=v,Ia}var rR;function QP(){if(rR)return Tu;rR=1,Object.defineProperty(Tu,\"__esModule\",{value:!0}),Tu.default=void 0;var e=v(cs()),t=f(Kk()),n=f(Zk()),a=f(e_()),o=f(YP()),s=f(Jk()),c=t_(),u=XP();function f(N){return N&&N.__esModule?N:{default:N}}function h(){if(typeof WeakMap!=\"function\")return null;var N=new WeakMap;return h=function(){return N},N}function v(N){if(N&&N.__esModule)return N;if(N===null||y(N)!==\"object\"&&typeof N!=\"function\")return{default:N};var _=h();if(_&&_.has(N))return _.get(N);var z={},F=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var O in N)if(Object.prototype.hasOwnProperty.call(N,O)){var $=F?Object.getOwnPropertyDescriptor(N,O):null;$&&($.get||$.set)?Object.defineProperty(z,O,$):z[O]=N[O]}return z.default=N,_&&_.set(N,z),z}function y(N){\"@babel/helpers - typeof\";return typeof Symbol==\"function\"&&typeof Symbol.iterator==\"symbol\"?y=function(z){return typeof z}:y=function(z){return z&&typeof Symbol==\"function\"&&z.constructor===Symbol&&z!==Symbol.prototype?\"symbol\":typeof z},y(N)}function x(){return x=Object.assign||function(N){for(var _=1;_<arguments.length;_++){var z=arguments[_];for(var F in z)Object.prototype.hasOwnProperty.call(z,F)&&(N[F]=z[F])}return N},x.apply(this,arguments)}function S(N,_){var z=Object.keys(N);if(Object.getOwnPropertySymbols){var F=Object.getOwnPropertySymbols(N);_&&(F=F.filter(function(O){return Object.getOwnPropertyDescriptor(N,O).enumerable})),z.push.apply(z,F)}return z}function w(N){for(var _=1;_<arguments.length;_++){var z=arguments[_]!=null?arguments[_]:{};_%2?S(Object(z),!0).forEach(function(F){B(N,F,z[F])}):Object.getOwnPropertyDescriptors?Object.defineProperties(N,Object.getOwnPropertyDescriptors(z)):S(Object(z)).forEach(function(F){Object.defineProperty(N,F,Object.getOwnPropertyDescriptor(z,F))})}return N}function C(N,_){if(!(N instanceof _))throw new TypeError(\"Cannot call a class as a function\")}function R(N,_){for(var z=0;z<_.length;z++){var F=_[z];F.enumerable=F.enumerable||!1,F.configurable=!0,\"value\"in F&&(F.writable=!0),Object.defineProperty(N,F.key,F)}}function k(N,_,z){return _&&R(N.prototype,_),N}function T(N,_){if(typeof _!=\"function\"&&_!==null)throw new TypeError(\"Super expression must either be null or a function\");N.prototype=Object.create(_&&_.prototype,{constructor:{value:N,writable:!0,configurable:!0}}),_&&M(N,_)}function M(N,_){return M=Object.setPrototypeOf||function(F,O){return F.__proto__=O,F},M(N,_)}function j(N){var _=A();return function(){var F=q(N),O;if(_){var $=q(this).constructor;O=Reflect.construct(F,arguments,$)}else O=F.apply(this,arguments);return I(this,O)}}function I(N,_){return _&&(y(_)===\"object\"||typeof _==\"function\")?_:P(N)}function P(N){if(N===void 0)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return N}function A(){if(typeof Reflect>\"u\"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy==\"function\")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function q(N){return q=Object.setPrototypeOf?Object.getPrototypeOf:function(z){return z.__proto__||Object.getPrototypeOf(z)},q(N)}function B(N,_,z){return _ in N?Object.defineProperty(N,_,{value:z,enumerable:!0,configurable:!0,writable:!0}):N[_]=z,N}var V=(function(N){T(z,N);var _=j(z);function z(F){var O;C(this,z),O=_.call(this,F),B(P(O),\"thumbsRef\",void 0),B(P(O),\"carouselWrapperRef\",void 0),B(P(O),\"listRef\",void 0),B(P(O),\"itemsRef\",void 0),B(P(O),\"timer\",void 0),B(P(O),\"animationHandler\",void 0),B(P(O),\"setThumbsRef\",function(W){O.thumbsRef=W}),B(P(O),\"setCarouselWrapperRef\",function(W){O.carouselWrapperRef=W}),B(P(O),\"setListRef\",function(W){O.listRef=W}),B(P(O),\"setItemsRef\",function(W,U){O.itemsRef||(O.itemsRef=[]),O.itemsRef[U]=W}),B(P(O),\"autoPlay\",function(){e.Children.count(O.props.children)<=1||(O.clearAutoPlay(),O.props.autoPlay&&(O.timer=setTimeout(function(){O.increment()},O.props.interval)))}),B(P(O),\"clearAutoPlay\",function(){O.timer&&clearTimeout(O.timer)}),B(P(O),\"resetAutoPlay\",function(){O.clearAutoPlay(),O.autoPlay()}),B(P(O),\"stopOnHover\",function(){O.setState({isMouseEntered:!0},O.clearAutoPlay)}),B(P(O),\"startOnLeave\",function(){O.setState({isMouseEntered:!1},O.autoPlay)}),B(P(O),\"isFocusWithinTheCarousel\",function(){return O.carouselWrapperRef?!!((0,o.default)().activeElement===O.carouselWrapperRef||O.carouselWrapperRef.contains((0,o.default)().activeElement)):!1}),B(P(O),\"navigateWithKeyboard\",function(W){if(O.isFocusWithinTheCarousel()){var U=O.props.axis,K=U===\"horizontal\",ie={ArrowUp:38,ArrowRight:39,ArrowDown:40,ArrowLeft:37},L=K?ie.ArrowRight:ie.ArrowDown,X=K?ie.ArrowLeft:ie.ArrowUp;L===W.keyCode?O.increment():X===W.keyCode&&O.decrement()}}),B(P(O),\"updateSizes\",function(){if(!(!O.state.initialized||!O.itemsRef||O.itemsRef.length===0)){var W=O.props.axis===\"horizontal\",U=O.itemsRef[0];if(U){var K=W?U.clientWidth:U.clientHeight;O.setState({itemSize:K}),O.thumbsRef&&O.thumbsRef.updateSizes()}}}),B(P(O),\"setMountState\",function(){O.setState({hasMount:!0}),O.updateSizes()}),B(P(O),\"handleClickItem\",function(W,U){if(e.Children.count(O.props.children)!==0){if(O.state.cancelClick){O.setState({cancelClick:!1});return}O.props.onClickItem(W,U),W!==O.state.selectedItem&&O.setState({selectedItem:W})}}),B(P(O),\"handleOnChange\",function(W,U){e.Children.count(O.props.children)<=1||O.props.onChange(W,U)}),B(P(O),\"handleClickThumb\",function(W,U){O.props.onClickThumb(W,U),O.moveTo(W)}),B(P(O),\"onSwipeStart\",function(W){O.setState({swiping:!0}),O.props.onSwipeStart(W)}),B(P(O),\"onSwipeEnd\",function(W){O.setState({swiping:!1,cancelClick:!1,swipeMovementStarted:!1}),O.props.onSwipeEnd(W),O.clearAutoPlay(),O.state.autoPlay&&O.autoPlay()}),B(P(O),\"onSwipeMove\",function(W,U){O.props.onSwipeMove(U);var K=O.props.swipeAnimationHandler(W,O.props,O.state,O.setState.bind(P(O)));return O.setState(w({},K)),!!Object.keys(K).length}),B(P(O),\"decrement\",function(){var W=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;O.moveTo(O.state.selectedItem-(typeof W==\"number\"?W:1))}),B(P(O),\"increment\",function(){var W=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;O.moveTo(O.state.selectedItem+(typeof W==\"number\"?W:1))}),B(P(O),\"moveTo\",function(W){if(typeof W==\"number\"){var U=e.Children.count(O.props.children)-1;W<0&&(W=O.props.infiniteLoop?U:0),W>U&&(W=O.props.infiniteLoop?0:U),O.selectItem({selectedItem:W}),O.state.autoPlay&&O.state.isMouseEntered===!1&&O.resetAutoPlay()}}),B(P(O),\"onClickNext\",function(){O.increment(1)}),B(P(O),\"onClickPrev\",function(){O.decrement(1)}),B(P(O),\"onSwipeForward\",function(){O.increment(1),O.props.emulateTouch&&O.setState({cancelClick:!0})}),B(P(O),\"onSwipeBackwards\",function(){O.decrement(1),O.props.emulateTouch&&O.setState({cancelClick:!0})}),B(P(O),\"changeItem\",function(W){return function(U){(!(0,c.isKeyboardEvent)(U)||U.key===\"Enter\")&&O.moveTo(W)}}),B(P(O),\"selectItem\",function(W){O.setState(w({previousItem:O.state.selectedItem},W),function(){O.setState(O.animationHandler(O.props,O.state))}),O.handleOnChange(W.selectedItem,e.Children.toArray(O.props.children)[W.selectedItem])}),B(P(O),\"getInitialImage\",function(){var W=O.props.selectedItem,U=O.itemsRef&&O.itemsRef[W],K=U&&U.getElementsByTagName(\"img\")||[];return K[0]}),B(P(O),\"getVariableItemHeight\",function(W){var U=O.itemsRef&&O.itemsRef[W];if(O.state.hasMount&&U&&U.children.length){var K=U.children[0].getElementsByTagName(\"img\")||[];if(K.length>0){var ie=K[0];if(!ie.complete){var L=function re(){O.forceUpdate(),ie.removeEventListener(\"load\",re)};ie.addEventListener(\"load\",L)}}var X=K[0]||U.children[0],Y=X.clientHeight;return Y>0?Y:null}return null});var $={initialized:!1,previousItem:F.selectedItem,selectedItem:F.selectedItem,hasMount:!1,isMouseEntered:!1,autoPlay:F.autoPlay,swiping:!1,swipeMovementStarted:!1,cancelClick:!1,itemSize:1,itemListStyle:{},slideStyle:{},selectedStyle:{},prevStyle:{}};return O.animationHandler=typeof F.animationHandler==\"function\"&&F.animationHandler||F.animationHandler===\"fade\"&&u.fadeAnimationHandler||u.slideAnimationHandler,O.state=w(w({},$),O.animationHandler(F,$)),O}return k(z,[{key:\"componentDidMount\",value:function(){this.props.children&&this.setupCarousel()}},{key:\"componentDidUpdate\",value:function(O,$){!O.children&&this.props.children&&!this.state.initialized&&this.setupCarousel(),!O.autoFocus&&this.props.autoFocus&&this.forceFocus(),$.swiping&&!this.state.swiping&&this.setState(w({},this.props.stopSwipingHandler(this.props,this.state))),(O.selectedItem!==this.props.selectedItem||O.centerMode!==this.props.centerMode)&&(this.updateSizes(),this.moveTo(this.props.selectedItem)),O.autoPlay!==this.props.autoPlay&&(this.props.autoPlay?this.setupAutoPlay():this.destroyAutoPlay(),this.setState({autoPlay:this.props.autoPlay}))}},{key:\"componentWillUnmount\",value:function(){this.destroyCarousel()}},{key:\"setupCarousel\",value:function(){var O=this;this.bindEvents(),this.state.autoPlay&&e.Children.count(this.props.children)>1&&this.setupAutoPlay(),this.props.autoFocus&&this.forceFocus(),this.setState({initialized:!0},function(){var $=O.getInitialImage();$&&!$.complete?$.addEventListener(\"load\",O.setMountState):O.setMountState()})}},{key:\"destroyCarousel\",value:function(){this.state.initialized&&(this.unbindEvents(),this.destroyAutoPlay())}},{key:\"setupAutoPlay\",value:function(){this.autoPlay();var O=this.carouselWrapperRef;this.props.stopOnHover&&O&&(O.addEventListener(\"mouseenter\",this.stopOnHover),O.addEventListener(\"mouseleave\",this.startOnLeave))}},{key:\"destroyAutoPlay\",value:function(){this.clearAutoPlay();var O=this.carouselWrapperRef;this.props.stopOnHover&&O&&(O.removeEventListener(\"mouseenter\",this.stopOnHover),O.removeEventListener(\"mouseleave\",this.startOnLeave))}},{key:\"bindEvents\",value:function(){(0,s.default)().addEventListener(\"resize\",this.updateSizes),(0,s.default)().addEventListener(\"DOMContentLoaded\",this.updateSizes),this.props.useKeyboardArrows&&(0,o.default)().addEventListener(\"keydown\",this.navigateWithKeyboard)}},{key:\"unbindEvents\",value:function(){(0,s.default)().removeEventListener(\"resize\",this.updateSizes),(0,s.default)().removeEventListener(\"DOMContentLoaded\",this.updateSizes);var O=this.getInitialImage();O&&O.removeEventListener(\"load\",this.setMountState),this.props.useKeyboardArrows&&(0,o.default)().removeEventListener(\"keydown\",this.navigateWithKeyboard)}},{key:\"forceFocus\",value:function(){var O;(O=this.carouselWrapperRef)===null||O===void 0||O.focus()}},{key:\"renderItems\",value:function(O){var $=this;return this.props.children?e.Children.map(this.props.children,function(W,U){var K=U===$.state.selectedItem,ie=U===$.state.previousItem,L=K&&$.state.selectedStyle||ie&&$.state.prevStyle||$.state.slideStyle||{};$.props.centerMode&&$.props.axis===\"horizontal\"&&(L=w(w({},L),{},{minWidth:$.props.centerSlidePercentage+\"%\"})),$.state.swiping&&$.state.swipeMovementStarted&&(L=w(w({},L),{},{pointerEvents:\"none\"}));var X={ref:function(re){return $.setItemsRef(re,U)},key:\"itemKey\"+U+(O?\"clone\":\"\"),className:n.default.ITEM(!0,U===$.state.selectedItem,U===$.state.previousItem),onClick:$.handleClickItem.bind($,U,W),style:L};return e.default.createElement(\"li\",X,$.props.renderItem(W,{isSelected:U===$.state.selectedItem,isPrevious:U===$.state.previousItem}))}):[]}},{key:\"renderControls\",value:function(){var O=this,$=this.props,W=$.showIndicators,U=$.labels,K=$.renderIndicator,ie=$.children;return W?e.default.createElement(\"ul\",{className:\"control-dots\"},e.Children.map(ie,function(L,X){return K&&K(O.changeItem(X),X===O.state.selectedItem,X,U.item)})):null}},{key:\"renderStatus\",value:function(){return this.props.showStatus?e.default.createElement(\"p\",{className:\"carousel-status\"},this.props.statusFormatter(this.state.selectedItem+1,e.Children.count(this.props.children))):null}},{key:\"renderThumbs\",value:function(){return!this.props.showThumbs||!this.props.children||e.Children.count(this.props.children)===0?null:e.default.createElement(a.default,{ref:this.setThumbsRef,onSelectItem:this.handleClickThumb,selectedItem:this.state.selectedItem,transitionTime:this.props.transitionTime,thumbWidth:this.props.thumbWidth,labels:this.props.labels,emulateTouch:this.props.emulateTouch},this.props.renderThumbs(this.props.children))}},{key:\"render\",value:function(){var O=this;if(!this.props.children||e.Children.count(this.props.children)===0)return null;var $=this.props.swipeable&&e.Children.count(this.props.children)>1,W=this.props.axis===\"horizontal\",U=this.props.showArrows&&e.Children.count(this.props.children)>1,K=U&&(this.state.selectedItem>0||this.props.infiniteLoop)||!1,ie=U&&(this.state.selectedItem<e.Children.count(this.props.children)-1||this.props.infiniteLoop)||!1,L=this.renderItems(!0),X=L.shift(),Y=L.pop(),re={className:n.default.SLIDER(!0,this.state.swiping),onSwipeMove:this.onSwipeMove,onSwipeStart:this.onSwipeStart,onSwipeEnd:this.onSwipeEnd,style:this.state.itemListStyle,tolerance:this.props.swipeScrollTolerance},Z={};if(W){if(re.onSwipeLeft=this.onSwipeForward,re.onSwipeRight=this.onSwipeBackwards,this.props.dynamicHeight){var oe=this.getVariableItemHeight(this.state.selectedItem);Z.height=oe||\"auto\"}}else re.onSwipeUp=this.props.verticalSwipe===\"natural\"?this.onSwipeBackwards:this.onSwipeForward,re.onSwipeDown=this.props.verticalSwipe===\"natural\"?this.onSwipeForward:this.onSwipeBackwards,re.style=w(w({},re.style),{},{height:this.state.itemSize}),Z.height=this.state.itemSize;return e.default.createElement(\"div\",{\"aria-label\":this.props.ariaLabel,className:n.default.ROOT(this.props.className),ref:this.setCarouselWrapperRef,tabIndex:this.props.useKeyboardArrows?0:void 0},e.default.createElement(\"div\",{className:n.default.CAROUSEL(!0),style:{width:this.props.width}},this.renderControls(),this.props.renderArrowPrev(this.onClickPrev,K,this.props.labels.leftArrow),e.default.createElement(\"div\",{className:n.default.WRAPPER(!0,this.props.axis),style:Z},$?e.default.createElement(t.default,x({tagName:\"ul\",innerRef:this.setListRef},re,{allowMouseEvents:this.props.emulateTouch}),this.props.infiniteLoop&&Y,this.renderItems(),this.props.infiniteLoop&&X):e.default.createElement(\"ul\",{className:n.default.SLIDER(!0,this.state.swiping),ref:function(me){return O.setListRef(me)},style:this.state.itemListStyle||{}},this.props.infiniteLoop&&Y,this.renderItems(),this.props.infiniteLoop&&X)),this.props.renderArrowNext(this.onClickNext,ie,this.props.labels.rightArrow),this.renderStatus()),this.renderThumbs())}}]),z})(e.default.Component);return Tu.default=V,B(V,\"displayName\",\"Carousel\"),B(V,\"defaultProps\",{ariaLabel:void 0,axis:\"horizontal\",centerSlidePercentage:80,interval:3e3,labels:{leftArrow:\"previous slide / item\",rightArrow:\"next slide / item\",item:\"slide item\"},onClickItem:c.noop,onClickThumb:c.noop,onChange:c.noop,onSwipeStart:function(){},onSwipeEnd:function(){},onSwipeMove:function(){return!1},preventMovementUntilSwipeScrollTolerance:!1,renderArrowPrev:function(_,z,F){return e.default.createElement(\"button\",{type:\"button\",\"aria-label\":F,className:n.default.ARROW_PREV(!z),onClick:_})},renderArrowNext:function(_,z,F){return e.default.createElement(\"button\",{type:\"button\",\"aria-label\":F,className:n.default.ARROW_NEXT(!z),onClick:_})},renderIndicator:function(_,z,F,O){return e.default.createElement(\"li\",{className:n.default.DOT(z),onClick:_,onKeyDown:_,value:F,key:F,role:\"button\",tabIndex:0,\"aria-label\":\"\".concat(O,\" \").concat(F+1)})},renderItem:function(_){return _},renderThumbs:function(_){var z=e.Children.map(_,function(F){var O=F;if(F.type!==\"img\"&&(O=e.Children.toArray(F.props.children).find(function($){return $.type===\"img\"})),!!O)return O});return z.filter(function(F){return F}).length===0?(console.warn(\"No images found! Can't build the thumb list without images. If you don't need thumbs, set showThumbs={false} in the Carousel. Note that it's not possible to get images rendered inside custom components. More info at https://github.com/leandrowd/react-responsive-carousel/blob/master/TROUBLESHOOTING.md\"),[]):z},statusFormatter:c.defaultStatusFormatter,selectedItem:0,showArrows:!0,showIndicators:!0,showStatus:!0,showThumbs:!0,stopOnHover:!0,swipeScrollTolerance:5,swipeable:!0,transitionTime:350,verticalSwipe:\"standard\",width:\"100%\",animationHandler:\"slide\",swipeAnimationHandler:u.slideSwipeAnimationHandler,stopSwipingHandler:u.slideStopSwipingHandler}),Tu}var aR={},iR;function KP(){return iR||(iR=1),aR}var oR;function ZP(){return oR||(oR=1,(function(e){Object.defineProperty(e,\"__esModule\",{value:!0}),Object.defineProperty(e,\"Carousel\",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(e,\"CarouselProps\",{enumerable:!0,get:function(){return n.CarouselProps}}),Object.defineProperty(e,\"Thumbs\",{enumerable:!0,get:function(){return a.default}});var t=o(QP()),n=KP(),a=o(e_());function o(s){return s&&s.__esModule?s:{default:s}}})(Bv)),Bv}var JP=ZP(),Yv,sR;function eL(){if(sR)return Yv;sR=1;var e=vi(),t=function(){return e.Date.now()};return Yv=t,Yv}var Xv,lR;function tL(){if(lR)return Xv;lR=1;var e=/\\s/;function t(n){for(var a=n.length;a--&&e.test(n.charAt(a)););return a}return Xv=t,Xv}var Qv,cR;function nL(){if(cR)return Qv;cR=1;var e=tL(),t=/^\\s+/;function n(a){return a&&a.slice(0,e(a)+1).replace(t,\"\")}return Qv=n,Qv}var Kv,uR;function t1(){if(uR)return Kv;uR=1;var e=nL(),t=ll(),n=om(),a=NaN,o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,u=parseInt;function f(h){if(typeof h==\"number\")return h;if(n(h))return a;if(t(h)){var v=typeof h.valueOf==\"function\"?h.valueOf():h;h=t(v)?v+\"\":v}if(typeof h!=\"string\")return h===0?h:+h;h=e(h);var y=s.test(h);return y||c.test(h)?u(h.slice(2),y?2:8):o.test(h)?a:+h}return Kv=f,Kv}var Zv,dR;function n_(){if(dR)return Zv;dR=1;var e=ll(),t=eL(),n=t1(),a=\"Expected a function\",o=Math.max,s=Math.min;function c(u,f,h){var v,y,x,S,w,C,R=0,k=!1,T=!1,M=!0;if(typeof u!=\"function\")throw new TypeError(a);f=n(f)||0,e(h)&&(k=!!h.leading,T=\"maxWait\"in h,x=T?o(n(h.maxWait)||0,f):x,M=\"trailing\"in h?!!h.trailing:M);function j(z){var F=v,O=y;return v=y=void 0,R=z,S=u.apply(O,F),S}function I(z){return R=z,w=setTimeout(q,f),k?j(z):S}function P(z){var F=z-C,O=z-R,$=f-F;return T?s($,x-O):$}function A(z){var F=z-C,O=z-R;return C===void 0||F>=f||F<0||T&&O>=x}function q(){var z=t();if(A(z))return B(z);w=setTimeout(q,P(z))}function B(z){return w=void 0,M&&v?j(z):(v=y=void 0,S)}function V(){w!==void 0&&clearTimeout(w),R=0,v=C=y=w=void 0}function N(){return w===void 0?S:B(t())}function _(){var z=t(),F=A(z);if(v=arguments,y=this,C=z,F){if(w===void 0)return I(C);if(T)return clearTimeout(w),w=setTimeout(q,f),j(C)}return w===void 0&&(w=setTimeout(q,f)),S}return _.cancel=V,_.flush=N,_}return Zv=c,Zv}var rL=n_();const r_=Ua(rL);function or(e,t,n,a,o=!1){const s=m.useRef();s.current=t,m.useEffect(()=>{if(n===null||n.addEventListener===void 0)return;const c=n,u=f=>{s.current?.call(c,f)};return c.addEventListener(e,u,{passive:a,capture:o}),()=>{c.removeEventListener(e,u,{capture:o})}},[e,n,a,o])}function rc(e,t){return e===void 0?void 0:t}const aL=Math.PI;function fR(e){return e*aL/180}const a_=(e,t,n)=>({x1:e-n/2,y1:t-n/2,x2:e+n/2,y2:t+n/2}),i_=(e,t,n,a,o)=>{switch(e){case\"left\":return Math.floor(t)+a+o/2;case\"center\":return Math.floor(t+n/2);case\"right\":return Math.floor(t+n)-a-o/2}},o_=(e,t,n)=>Math.min(e,t-n*2),s_=(e,t,n)=>n.x1<=e&&e<=n.x2&&n.y1<=t&&t<=n.y2,n1=e=>{const t=e.fgColor??\"currentColor\";return m.createElement(\"svg\",{viewBox:\"0 0 24 24\",fill:\"none\",xmlns:\"http://www.w3.org/2000/svg\"},m.createElement(\"path\",{d:\"M12.7073 7.05029C7.87391 11.8837 10.4544 9.30322 6.03024 13.7273C5.77392 13.9836 5.58981 14.3071 5.50189 14.6587L4.52521 18.5655C4.38789 19.1148 4.88543 19.6123 5.43472 19.475L9.34146 18.4983C9.69313 18.4104 10.0143 18.2286 10.2706 17.9722L16.9499 11.2929\",stroke:t,strokeWidth:\"1.5\",strokeLinecap:\"round\",strokeLinejoin:\"round\",fill:\"none\",vectorEffect:\"non-scaling-stroke\"}),m.createElement(\"path\",{d:\"M20.4854 4.92901L19.0712 3.5148C18.2901 2.73375 17.0238 2.73375 16.2428 3.5148L14.475 5.28257C15.5326 7.71912 16.4736 8.6278 18.7176 9.52521L20.4854 7.75744C21.2665 6.97639 21.2665 5.71006 20.4854 4.92901Z\",stroke:t,strokeWidth:\"1.5\",strokeLinecap:\"round\",strokeLinejoin:\"round\",fill:\"none\",vectorEffect:\"non-scaling-stroke\"}))},iL=e=>{const t=e.fgColor??\"currentColor\";return m.createElement(\"svg\",{viewBox:\"0 0 24 24\",fill:\"none\",xmlns:\"http://www.w3.org/2000/svg\"},m.createElement(\"path\",{d:\"M19 6L10.3802 17L5.34071 11.8758\",vectorEffect:\"non-scaling-stroke\",stroke:t,strokeWidth:\"1.5\",strokeLinecap:\"round\",strokeLinejoin:\"round\"}))};function oL(e,t,n){const[a,o]=m.useState(e),s=m.useRef(!0);m.useEffect(()=>()=>{s.current=!1},[]);const c=m.useRef(r_(u=>{s.current&&o(u)},n));return m.useLayoutEffect(()=>{s.current&&c.current(()=>e())},t),a}const sL=\"֑-߿יִ-﷽ﹰ-ﻼ\",lL=\"A-Za-zÀ-ÖØ-öø-ʸ̀-ࠀ-Ⰰ-︀--\",cL=new RegExp(\"^[^\"+lL+\"]*[\"+sL+\"]\");function r1(e){return cL.test(e)?\"rtl\":\"not-rtl\"}let oh;function hb(){if(typeof document>\"u\")return 0;if(oh!==void 0)return oh;const e=document.createElement(\"p\");e.style.width=\"100%\",e.style.height=\"200px\";const t=document.createElement(\"div\");t.id=\"testScrollbar\",t.style.position=\"absolute\",t.style.top=\"0px\",t.style.left=\"0px\",t.style.visibility=\"hidden\",t.style.width=\"200px\",t.style.height=\"150px\",t.style.overflow=\"hidden\",t.append(e),document.body.append(t);const n=e.offsetWidth;t.style.overflow=\"scroll\";let a=e.offsetWidth;return n===a&&(a=t.clientWidth),t.remove(),oh=n-a,oh}const Vs=Symbol();function uL(e){const t=m.useRef([Vs,e]);t.current[1]!==e&&(t.current[0]=e),t.current[1]=e;const[n,a]=m.useState(e),[,o]=m.useState(),s=m.useCallback(u=>{const f=t.current[0];f!==Vs&&(u=typeof u==\"function\"?u(f):u,u===f)||(f!==Vs&&o({}),a(h=>typeof u==\"function\"?u(f===Vs?h:f):u),t.current[0]=Vs)},[]),c=m.useCallback(()=>{t.current[0]=Vs,o({})},[]);return[t.current[0]===Vs?n:t.current[0],s,c]}function l_(e){if(e.length===0)return\"\";let t=0,n=0;for(const a of e){if(n+=a.length,n>1e4)break;t++}return e.slice(0,t).join(\", \")}function dL(e){const t=m.useRef(e);return kc(e,t.current)||(t.current=e),t.current}const fL=e=>{const{urls:t,canWrite:n,onEditClick:a,renderImage:o}=e,s=t.filter(u=>u!==\"\");if(s.length===0)return null;const c=s.length>1;return m.createElement(FP,{\"data-testid\":\"GDG-default-image-overlay-editor\"},m.createElement(JP.Carousel,{showArrows:c,showThumbs:!1,swipeable:c,emulateTouch:c,infiniteLoop:c},s.map(u=>{const f=o?.(u)??m.createElement(\"img\",{draggable:!1,src:u});return m.createElement(\"div\",{className:\"gdg-centering-container\",key:u},f)})),n&&a&&m.createElement(\"button\",{className:\"gdg-edit-icon\",onClick:a},m.createElement(n1,null)))};function a1(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let ul=a1();function c_(e){ul=e}const u_=/[&<>\"']/,hL=new RegExp(u_.source,\"g\"),d_=/[<>\"']|&(?!(#\\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\\w+);)/,mL=new RegExp(d_.source,\"g\"),pL={\"&\":\"&\",\"<\":\"<\",\">\":\">\",'\"':\""\",\"'\":\"'\"},hR=e=>pL[e];function la(e,t){if(t){if(u_.test(e))return e.replace(hL,hR)}else if(d_.test(e))return e.replace(mL,hR);return e}const gL=/(^|[^\\[])\\^/g;function an(e,t){let n=typeof e==\"string\"?e:e.source;t=t||\"\";const a={replace:(o,s)=>{let c=typeof s==\"string\"?s:s.source;return c=c.replace(gL,\"$1\"),n=n.replace(o,c),a},getRegex:()=>new RegExp(n,t)};return a}function mR(e){try{e=encodeURI(e).replace(/%25/g,\"%\")}catch{return null}return e}const Ku={exec:()=>null};function pR(e,t){const n=e.replace(/\\|/g,(s,c,u)=>{let f=!1,h=c;for(;--h>=0&&u[h]===\"\\\\\";)f=!f;return f?\"|\":\" |\"}),a=n.split(/ \\|/);let o=0;if(a[0].trim()||a.shift(),a.length>0&&!a[a.length-1].trim()&&a.pop(),t)if(a.length>t)a.splice(t);else for(;a.length<t;)a.push(\"\");for(;o<a.length;o++)a[o]=a[o].trim().replace(/\\\\\\|/g,\"|\");return a}function Du(e,t,n){const a=e.length;if(a===0)return\"\";let o=0;for(;o<a&&e.charAt(a-o-1)===t;)o++;return e.slice(0,a-o)}function vL(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let a=0;a<e.length;a++)if(e[a]===\"\\\\\")a++;else if(e[a]===t[0])n++;else if(e[a]===t[1]&&(n--,n<0))return a;return-1}function gR(e,t,n,a){const o=t.href,s=t.title?la(t.title):null,c=e[1].replace(/\\\\([\\[\\]])/g,\"$1\");if(e[0].charAt(0)!==\"!\"){a.state.inLink=!0;const u={type:\"link\",raw:n,href:o,title:s,text:c,tokens:a.inlineTokens(c)};return a.state.inLink=!1,u}return{type:\"image\",raw:n,href:o,title:s,text:la(c)}}function yL(e,t){const n=e.match(/^(\\s+)(?:```)/);if(n===null)return t;const a=n[1];return t.split(`\n`).map(o=>{const s=o.match(/^\\s+/);if(s===null)return o;const[c]=s;return c.length>=a.length?o.slice(a.length):o}).join(`\n`)}class Ah{options;rules;lexer;constructor(t){this.options=t||ul}space(t){const n=this.rules.block.newline.exec(t);if(n&&n[0].length>0)return{type:\"space\",raw:n[0]}}code(t){const n=this.rules.block.code.exec(t);if(n){const a=n[0].replace(/^ {1,4}/gm,\"\");return{type:\"code\",raw:n[0],codeBlockStyle:\"indented\",text:this.options.pedantic?a:Du(a,`\n`)}}}fences(t){const n=this.rules.block.fences.exec(t);if(n){const a=n[0],o=yL(a,n[3]||\"\");return{type:\"code\",raw:a,lang:n[2]?n[2].trim().replace(this.rules.inline.anyPunctuation,\"$1\"):n[2],text:o}}}heading(t){const n=this.rules.block.heading.exec(t);if(n){let a=n[2].trim();if(/#$/.test(a)){const o=Du(a,\"#\");(this.options.pedantic||!o||/ $/.test(o))&&(a=o.trim())}return{type:\"heading\",raw:n[0],depth:n[1].length,text:a,tokens:this.lexer.inline(a)}}}hr(t){const n=this.rules.block.hr.exec(t);if(n)return{type:\"hr\",raw:Du(n[0],`\n`)}}blockquote(t){const n=this.rules.block.blockquote.exec(t);if(n){let a=Du(n[0],`\n`).split(`\n`),o=\"\",s=\"\";const c=[];for(;a.length>0;){let u=!1;const f=[];let h;for(h=0;h<a.length;h++)if(/^ {0,3}>/.test(a[h]))f.push(a[h]),u=!0;else if(!u)f.push(a[h]);else break;a=a.slice(h);const v=f.join(`\n`),y=v.replace(/\\n {0,3}((?:=+|-+) *)(?=\\n|$)/g,`\n $1`).replace(/^ {0,3}>[ \\t]?/gm,\"\");o=o?`${o}\n${v}`:v,s=s?`${s}\n${y}`:y;const x=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(y,c,!0),this.lexer.state.top=x,a.length===0)break;const S=c[c.length-1];if(S?.type===\"code\")break;if(S?.type===\"blockquote\"){const w=S,C=w.raw+`\n`+a.join(`\n`),R=this.blockquote(C);c[c.length-1]=R,o=o.substring(0,o.length-w.raw.length)+R.raw,s=s.substring(0,s.length-w.text.length)+R.text;break}else if(S?.type===\"list\"){const w=S,C=w.raw+`\n`+a.join(`\n`),R=this.list(C);c[c.length-1]=R,o=o.substring(0,o.length-S.raw.length)+R.raw,s=s.substring(0,s.length-w.raw.length)+R.raw,a=C.substring(c[c.length-1].raw.length).split(`\n`);continue}}return{type:\"blockquote\",raw:o,tokens:c,text:s}}}list(t){let n=this.rules.block.list.exec(t);if(n){let a=n[1].trim();const o=a.length>1,s={type:\"list\",raw:\"\",ordered:o,start:o?+a.slice(0,-1):\"\",loose:!1,items:[]};a=o?`\\\\d{1,9}\\\\${a.slice(-1)}`:`\\\\${a}`,this.options.pedantic&&(a=o?a:\"[*+-]\");const c=new RegExp(`^( {0,3}${a})((?:[\t ][^\\\\n]*)?(?:\\\\n|$))`);let u=!1;for(;t;){let f=!1,h=\"\",v=\"\";if(!(n=c.exec(t))||this.rules.block.hr.test(t))break;h=n[0],t=t.substring(h.length);let y=n[2].split(`\n`,1)[0].replace(/^\\t+/,k=>\" \".repeat(3*k.length)),x=t.split(`\n`,1)[0],S=!y.trim(),w=0;if(this.options.pedantic?(w=2,v=y.trimStart()):S?w=n[1].length+1:(w=n[2].search(/[^ ]/),w=w>4?1:w,v=y.slice(w),w+=n[1].length),S&&/^ *$/.test(x)&&(h+=x+`\n`,t=t.substring(x.length+1),f=!0),!f){const k=new RegExp(`^ {0,${Math.min(3,w-1)}}(?:[*+-]|\\\\d{1,9}[.)])((?:[ \t][^\\\\n]*)?(?:\\\\n|$))`),T=new RegExp(`^ {0,${Math.min(3,w-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\\\* *){3,})(?:\\\\n+|$)`),M=new RegExp(`^ {0,${Math.min(3,w-1)}}(?:\\`\\`\\`|~~~)`),j=new RegExp(`^ {0,${Math.min(3,w-1)}}#`);for(;t;){const I=t.split(`\n`,1)[0];if(x=I,this.options.pedantic&&(x=x.replace(/^ {1,4}(?=( {4})*[^ ])/g,\" \")),M.test(x)||j.test(x)||k.test(x)||T.test(t))break;if(x.search(/[^ ]/)>=w||!x.trim())v+=`\n`+x.slice(w);else{if(S||y.search(/[^ ]/)>=4||M.test(y)||j.test(y)||T.test(y))break;v+=`\n`+x}!S&&!x.trim()&&(S=!0),h+=I+`\n`,t=t.substring(I.length+1),y=x.slice(w)}}s.loose||(u?s.loose=!0:/\\n *\\n *$/.test(h)&&(u=!0));let C=null,R;this.options.gfm&&(C=/^\\[[ xX]\\] /.exec(v),C&&(R=C[0]!==\"[ ] \",v=v.replace(/^\\[[ xX]\\] +/,\"\"))),s.items.push({type:\"list_item\",raw:h,task:!!C,checked:R,loose:!1,text:v,tokens:[]}),s.raw+=h}s.items[s.items.length-1].raw=s.items[s.items.length-1].raw.trimEnd(),s.items[s.items.length-1].text=s.items[s.items.length-1].text.trimEnd(),s.raw=s.raw.trimEnd();for(let f=0;f<s.items.length;f++)if(this.lexer.state.top=!1,s.items[f].tokens=this.lexer.blockTokens(s.items[f].text,[]),!s.loose){const h=s.items[f].tokens.filter(y=>y.type===\"space\"),v=h.length>0&&h.some(y=>/\\n.*\\n/.test(y.raw));s.loose=v}if(s.loose)for(let f=0;f<s.items.length;f++)s.items[f].loose=!0;return s}}html(t){const n=this.rules.block.html.exec(t);if(n)return{type:\"html\",block:!0,raw:n[0],pre:n[1]===\"pre\"||n[1]===\"script\"||n[1]===\"style\",text:n[0]}}def(t){const n=this.rules.block.def.exec(t);if(n){const a=n[1].toLowerCase().replace(/\\s+/g,\" \"),o=n[2]?n[2].replace(/^<(.*)>$/,\"$1\").replace(this.rules.inline.anyPunctuation,\"$1\"):\"\",s=n[3]?n[3].substring(1,n[3].length-1).replace(this.rules.inline.anyPunctuation,\"$1\"):n[3];return{type:\"def\",tag:a,raw:n[0],href:o,title:s}}}table(t){const n=this.rules.block.table.exec(t);if(!n||!/[:|]/.test(n[2]))return;const a=pR(n[1]),o=n[2].replace(/^\\||\\| *$/g,\"\").split(\"|\"),s=n[3]&&n[3].trim()?n[3].replace(/\\n[ \\t]*$/,\"\").split(`\n`):[],c={type:\"table\",raw:n[0],header:[],align:[],rows:[]};if(a.length===o.length){for(const u of o)/^ *-+: *$/.test(u)?c.align.push(\"right\"):/^ *:-+: *$/.test(u)?c.align.push(\"center\"):/^ *:-+ *$/.test(u)?c.align.push(\"left\"):c.align.push(null);for(let u=0;u<a.length;u++)c.header.push({text:a[u],tokens:this.lexer.inline(a[u]),header:!0,align:c.align[u]});for(const u of s)c.rows.push(pR(u,c.header.length).map((f,h)=>({text:f,tokens:this.lexer.inline(f),header:!1,align:c.align[h]})));return c}}lheading(t){const n=this.rules.block.lheading.exec(t);if(n)return{type:\"heading\",raw:n[0],depth:n[2].charAt(0)===\"=\"?1:2,text:n[1],tokens:this.lexer.inline(n[1])}}paragraph(t){const n=this.rules.block.paragraph.exec(t);if(n){const a=n[1].charAt(n[1].length-1)===`\n`?n[1].slice(0,-1):n[1];return{type:\"paragraph\",raw:n[0],text:a,tokens:this.lexer.inline(a)}}}text(t){const n=this.rules.block.text.exec(t);if(n)return{type:\"text\",raw:n[0],text:n[0],tokens:this.lexer.inline(n[0])}}escape(t){const n=this.rules.inline.escape.exec(t);if(n)return{type:\"escape\",raw:n[0],text:la(n[1])}}tag(t){const n=this.rules.inline.tag.exec(t);if(n)return!this.lexer.state.inLink&&/^<a /i.test(n[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\\/a>/i.test(n[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\\s|>)/i.test(n[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\\/(pre|code|kbd|script)(\\s|>)/i.test(n[0])&&(this.lexer.state.inRawBlock=!1),{type:\"html\",raw:n[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:n[0]}}link(t){const n=this.rules.inline.link.exec(t);if(n){const a=n[2].trim();if(!this.options.pedantic&&/^</.test(a)){if(!/>$/.test(a))return;const c=Du(a.slice(0,-1),\"\\\\\");if((a.length-c.length)%2===0)return}else{const c=vL(n[2],\"()\");if(c>-1){const f=(n[0].indexOf(\"!\")===0?5:4)+n[1].length+c;n[2]=n[2].substring(0,c),n[0]=n[0].substring(0,f).trim(),n[3]=\"\"}}let o=n[2],s=\"\";if(this.options.pedantic){const c=/^([^'\"]*[^\\s])\\s+(['\"])(.*)\\2/.exec(o);c&&(o=c[1],s=c[3])}else s=n[3]?n[3].slice(1,-1):\"\";return o=o.trim(),/^</.test(o)&&(this.options.pedantic&&!/>$/.test(a)?o=o.slice(1):o=o.slice(1,-1)),gR(n,{href:o&&o.replace(this.rules.inline.anyPunctuation,\"$1\"),title:s&&s.replace(this.rules.inline.anyPunctuation,\"$1\")},n[0],this.lexer)}}reflink(t,n){let a;if((a=this.rules.inline.reflink.exec(t))||(a=this.rules.inline.nolink.exec(t))){const o=(a[2]||a[1]).replace(/\\s+/g,\" \"),s=n[o.toLowerCase()];if(!s){const c=a[0].charAt(0);return{type:\"text\",raw:c,text:c}}return gR(a,s,a[0],this.lexer)}}emStrong(t,n,a=\"\"){let o=this.rules.inline.emStrongLDelim.exec(t);if(!o||o[3]&&a.match(/[\\p{L}\\p{N}]/u))return;if(!(o[1]||o[2]||\"\")||!a||this.rules.inline.punctuation.exec(a)){const c=[...o[0]].length-1;let u,f,h=c,v=0;const y=o[0][0]===\"*\"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(y.lastIndex=0,n=n.slice(-1*t.length+c);(o=y.exec(n))!=null;){if(u=o[1]||o[2]||o[3]||o[4]||o[5]||o[6],!u)continue;if(f=[...u].length,o[3]||o[4]){h+=f;continue}else if((o[5]||o[6])&&c%3&&!((c+f)%3)){v+=f;continue}if(h-=f,h>0)continue;f=Math.min(f,f+h+v);const x=[...o[0]][0].length,S=t.slice(0,c+o.index+x+f);if(Math.min(c,f)%2){const C=S.slice(1,-1);return{type:\"em\",raw:S,text:C,tokens:this.lexer.inlineTokens(C)}}const w=S.slice(2,-2);return{type:\"strong\",raw:S,text:w,tokens:this.lexer.inlineTokens(w)}}}}codespan(t){const n=this.rules.inline.code.exec(t);if(n){let a=n[2].replace(/\\n/g,\" \");const o=/[^ ]/.test(a),s=/^ /.test(a)&&/ $/.test(a);return o&&s&&(a=a.substring(1,a.length-1)),a=la(a,!0),{type:\"codespan\",raw:n[0],text:a}}}br(t){const n=this.rules.inline.br.exec(t);if(n)return{type:\"br\",raw:n[0]}}del(t){const n=this.rules.inline.del.exec(t);if(n)return{type:\"del\",raw:n[0],text:n[2],tokens:this.lexer.inlineTokens(n[2])}}autolink(t){const n=this.rules.inline.autolink.exec(t);if(n){let a,o;return n[2]===\"@\"?(a=la(n[1]),o=\"mailto:\"+a):(a=la(n[1]),o=a),{type:\"link\",raw:n[0],text:a,href:o,tokens:[{type:\"text\",raw:a,text:a}]}}}url(t){let n;if(n=this.rules.inline.url.exec(t)){let a,o;if(n[2]===\"@\")a=la(n[0]),o=\"mailto:\"+a;else{let s;do s=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])?.[0]??\"\";while(s!==n[0]);a=la(n[0]),n[1]===\"www.\"?o=\"http://\"+n[0]:o=n[0]}return{type:\"link\",raw:n[0],text:a,href:o,tokens:[{type:\"text\",raw:a,text:a}]}}}inlineText(t){const n=this.rules.inline.text.exec(t);if(n){let a;return this.lexer.state.inRawBlock?a=n[0]:a=la(n[0]),{type:\"text\",raw:n[0],text:a}}}}const bL=/^(?: *(?:\\n|$))+/,xL=/^( {4}[^\\n]+(?:\\n(?: *(?:\\n|$))*)?)+/,wL=/^ {0,3}(`{3,}(?=[^`\\n]*(?:\\n|$))|~{3,})([^\\n]*)(?:\\n|$)(?:|([\\s\\S]*?)(?:\\n|$))(?: {0,3}\\1[~`]* *(?=\\n|$)|$)/,_d=/^ {0,3}((?:-[\\t ]*){3,}|(?:_[ \\t]*){3,}|(?:\\*[ \\t]*){3,})(?:\\n+|$)/,SL=/^ {0,3}(#{1,6})(?=\\s|$)(.*)(?:\\n+|$)/,f_=/(?:[*+-]|\\d{1,9}[.)])/,h_=an(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\\n(?!\\s*?\\n|bull |blockCode|fences|blockquote|heading|html))+?)\\n {0,3}(=+|-+) *(?:\\n+|$)/).replace(/bull/g,f_).replace(/blockCode/g,/ {4}/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\\n>]+>\\n/).getRegex(),i1=/^([^\\n]+(?:\\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\\n)[^\\n]+)*)/,CL=/^[^\\n]+/,o1=/(?!\\s*\\])(?:\\\\.|[^\\[\\]\\\\])+/,RL=an(/^ {0,3}\\[(label)\\]: *(?:\\n *)?([^<\\s][^\\s]*|<.*?>)(?:(?: +(?:\\n *)?| *\\n *)(title))? *(?:\\n+|$)/).replace(\"label\",o1).replace(\"title\",/(?:\"(?:\\\\\"?|[^\"\\\\])*\"|'[^'\\n]*(?:\\n[^'\\n]+)*\\n?'|\\([^()]*\\))/).getRegex(),EL=an(/^( {0,3}bull)([ \\t][^\\n]+?)?(?:\\n|$)/).replace(/bull/g,f_).getRegex(),fm=\"address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul\",s1=/<!--(?:-?>|[\\s\\S]*?(?:-->|$))/,TL=an(\"^ {0,3}(?:<(script|pre|style|textarea)[\\\\s>][\\\\s\\\\S]*?(?:</\\\\1>[^\\\\n]*\\\\n+|$)|comment[^\\\\n]*(\\\\n+|$)|<\\\\?[\\\\s\\\\S]*?(?:\\\\?>\\\\n*|$)|<![A-Z][\\\\s\\\\S]*?(?:>\\\\n*|$)|<!\\\\[CDATA\\\\[[\\\\s\\\\S]*?(?:\\\\]\\\\]>\\\\n*|$)|</?(tag)(?: +|\\\\n|/?>)[\\\\s\\\\S]*?(?:(?:\\\\n *)+\\\\n|$)|<(?!script|pre|style|textarea)([a-z][\\\\w-]*)(?:attribute)*? */?>(?=[ \\\\t]*(?:\\\\n|$))[\\\\s\\\\S]*?(?:(?:\\\\n *)+\\\\n|$)|</(?!script|pre|style|textarea)[a-z][\\\\w-]*\\\\s*>(?=[ \\\\t]*(?:\\\\n|$))[\\\\s\\\\S]*?(?:(?:\\\\n *)+\\\\n|$))\",\"i\").replace(\"comment\",s1).replace(\"tag\",fm).replace(\"attribute\",/ +[a-zA-Z:_][\\w.:-]*(?: *= *\"[^\"\\n]*\"| *= *'[^'\\n]*'| *= *[^\\s\"'=<>`]+)?/).getRegex(),m_=an(i1).replace(\"hr\",_d).replace(\"heading\",\" {0,3}#{1,6}(?:\\\\s|$)\").replace(\"|lheading\",\"\").replace(\"|table\",\"\").replace(\"blockquote\",\" {0,3}>\").replace(\"fences\",\" {0,3}(?:`{3,}(?=[^`\\\\n]*\\\\n)|~{3,})[^\\\\n]*\\\\n\").replace(\"list\",\" {0,3}(?:[*+-]|1[.)]) \").replace(\"html\",\"</?(?:tag)(?: +|\\\\n|/?>)|<(?:script|pre|style|textarea|!--)\").replace(\"tag\",fm).getRegex(),ML=an(/^( {0,3}> ?(paragraph|[^\\n]*)(?:\\n|$))+/).replace(\"paragraph\",m_).getRegex(),l1={blockquote:ML,code:xL,def:RL,fences:wL,heading:SL,hr:_d,html:TL,lheading:h_,list:EL,newline:bL,paragraph:m_,table:Ku,text:CL},vR=an(\"^ *([^\\\\n ].*)\\\\n {0,3}((?:\\\\| *)?:?-+:? *(?:\\\\| *:?-+:? *)*(?:\\\\| *)?)(?:\\\\n((?:(?! *\\\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\\\n|$))*)\\\\n*|$)\").replace(\"hr\",_d).replace(\"heading\",\" {0,3}#{1,6}(?:\\\\s|$)\").replace(\"blockquote\",\" {0,3}>\").replace(\"code\",\" {4}[^\\\\n]\").replace(\"fences\",\" {0,3}(?:`{3,}(?=[^`\\\\n]*\\\\n)|~{3,})[^\\\\n]*\\\\n\").replace(\"list\",\" {0,3}(?:[*+-]|1[.)]) \").replace(\"html\",\"</?(?:tag)(?: +|\\\\n|/?>)|<(?:script|pre|style|textarea|!--)\").replace(\"tag\",fm).getRegex(),kL={...l1,table:vR,paragraph:an(i1).replace(\"hr\",_d).replace(\"heading\",\" {0,3}#{1,6}(?:\\\\s|$)\").replace(\"|lheading\",\"\").replace(\"table\",vR).replace(\"blockquote\",\" {0,3}>\").replace(\"fences\",\" {0,3}(?:`{3,}(?=[^`\\\\n]*\\\\n)|~{3,})[^\\\\n]*\\\\n\").replace(\"list\",\" {0,3}(?:[*+-]|1[.)]) \").replace(\"html\",\"</?(?:tag)(?: +|\\\\n|/?>)|<(?:script|pre|style|textarea|!--)\").replace(\"tag\",fm).getRegex()},_L={...l1,html:an(`^ *(?:comment *(?:\\\\n|\\\\s*$)|<(tag)[\\\\s\\\\S]+?</\\\\1> *(?:\\\\n{2,}|\\\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\\\s[^'\"/>\\\\s]*)*?/?> *(?:\\\\n{2,}|\\\\s*$))`).replace(\"comment\",s1).replace(/tag/g,\"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\\\b)\\\\w+(?!:|[^\\\\w\\\\s@]*@)\\\\b\").getRegex(),def:/^ *\\[([^\\]]+)\\]: *<?([^\\s>]+)>?(?: +([\"(][^\\n]+[\")]))? *(?:\\n+|$)/,heading:/^(#{1,6})(.*)(?:\\n+|$)/,fences:Ku,lheading:/^(.+?)\\n {0,3}(=+|-+) *(?:\\n+|$)/,paragraph:an(i1).replace(\"hr\",_d).replace(\"heading\",` *#{1,6} *[^\n]`).replace(\"lheading\",h_).replace(\"|table\",\"\").replace(\"blockquote\",\" {0,3}>\").replace(\"|fences\",\"\").replace(\"|list\",\"\").replace(\"|html\",\"\").replace(\"|tag\",\"\").getRegex()},p_=/^\\\\([!\"#$%&'()*+,\\-./:;<=>?@\\[\\]\\\\^_`{|}~])/,AL=/^(`+)([^`]|[^`][\\s\\S]*?[^`])\\1(?!`)/,g_=/^( {2,}|\\\\)\\n(?!\\s*$)/,NL=/^(`+|[^`])(?:(?= {2,}\\n)|[\\s\\S]*?(?:(?=[\\\\<!\\[`*_]|\\b_|$)|[^ ](?= {2,}\\n)))/,Ad=\"\\\\p{P}\\\\p{S}\",OL=an(/^((?![*_])[\\spunctuation])/,\"u\").replace(/punctuation/g,Ad).getRegex(),DL=/\\[[^[\\]]*?\\]\\([^\\(\\)]*?\\)|`[^`]*?`|<[^<>]*?>/g,jL=an(/^(?:\\*+(?:((?!\\*)[punct])|[^\\s*]))|^_+(?:((?!_)[punct])|([^\\s_]))/,\"u\").replace(/punct/g,Ad).getRegex(),zL=an(\"^[^_*]*?__[^_*]*?\\\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\\\*)[punct](\\\\*+)(?=[\\\\s]|$)|[^punct\\\\s](\\\\*+)(?!\\\\*)(?=[punct\\\\s]|$)|(?!\\\\*)[punct\\\\s](\\\\*+)(?=[^punct\\\\s])|[\\\\s](\\\\*+)(?!\\\\*)(?=[punct])|(?!\\\\*)[punct](\\\\*+)(?!\\\\*)(?=[punct])|[^punct\\\\s](\\\\*+)(?=[^punct\\\\s])\",\"gu\").replace(/punct/g,Ad).getRegex(),PL=an(\"^[^_*]*?\\\\*\\\\*[^_*]*?_[^_*]*?(?=\\\\*\\\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\\\s]|$)|[^punct\\\\s](_+)(?!_)(?=[punct\\\\s]|$)|(?!_)[punct\\\\s](_+)(?=[^punct\\\\s])|[\\\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])\",\"gu\").replace(/punct/g,Ad).getRegex(),LL=an(/\\\\([punct])/,\"gu\").replace(/punct/g,Ad).getRegex(),IL=an(/^<(scheme:[^\\s\\x00-\\x1f<>]*|email)>/).replace(\"scheme\",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace(\"email\",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),HL=an(s1).replace(\"(?:-->|$)\",\"-->\").getRegex(),qL=an(\"^comment|^</[a-zA-Z][\\\\w:-]*\\\\s*>|^<[a-zA-Z][\\\\w-]*(?:attribute)*?\\\\s*/?>|^<\\\\?[\\\\s\\\\S]*?\\\\?>|^<![a-zA-Z]+\\\\s[\\\\s\\\\S]*?>|^<!\\\\[CDATA\\\\[[\\\\s\\\\S]*?\\\\]\\\\]>\").replace(\"comment\",HL).replace(\"attribute\",/\\s+[a-zA-Z:_][\\w.:-]*(?:\\s*=\\s*\"[^\"]*\"|\\s*=\\s*'[^']*'|\\s*=\\s*[^\\s\"'=<>`]+)?/).getRegex(),Nh=/(?:\\[(?:\\\\.|[^\\[\\]\\\\])*\\]|\\\\.|`[^`]*`|[^\\[\\]\\\\`])*?/,FL=an(/^!?\\[(label)\\]\\(\\s*(href)(?:\\s+(title))?\\s*\\)/).replace(\"label\",Nh).replace(\"href\",/<(?:\\\\.|[^\\n<>\\\\])+>|[^\\s\\x00-\\x1f]*/).replace(\"title\",/\"(?:\\\\\"?|[^\"\\\\])*\"|'(?:\\\\'?|[^'\\\\])*'|\\((?:\\\\\\)?|[^)\\\\])*\\)/).getRegex(),v_=an(/^!?\\[(label)\\]\\[(ref)\\]/).replace(\"label\",Nh).replace(\"ref\",o1).getRegex(),y_=an(/^!?\\[(ref)\\](?:\\[\\])?/).replace(\"ref\",o1).getRegex(),$L=an(\"reflink|nolink(?!\\\\()\",\"g\").replace(\"reflink\",v_).replace(\"nolink\",y_).getRegex(),c1={_backpedal:Ku,anyPunctuation:LL,autolink:IL,blockSkip:DL,br:g_,code:AL,del:Ku,emStrongLDelim:jL,emStrongRDelimAst:zL,emStrongRDelimUnd:PL,escape:p_,link:FL,nolink:y_,punctuation:OL,reflink:v_,reflinkSearch:$L,tag:qL,text:NL,url:Ku},BL={...c1,link:an(/^!?\\[(label)\\]\\((.*?)\\)/).replace(\"label\",Nh).getRegex(),reflink:an(/^!?\\[(label)\\]\\s*\\[([^\\]]*)\\]/).replace(\"label\",Nh).getRegex()},mb={...c1,escape:an(p_).replace(\"])\",\"~|])\").getRegex(),url:an(/^((?:ftp|https?):\\/\\/|www\\.)(?:[a-zA-Z0-9\\-]+\\.?)+[^\\s<]*|^email/,\"i\").replace(\"email\",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'\"~()&]+|\\([^)]*\\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'\"~)]+(?!$))+/,del:/^(~~?)(?=[^\\s~])([\\s\\S]*?[^\\s~])\\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\\n)|(?=[a-zA-Z0-9.!#$%&'*+\\/=?_`{\\|}~-]+@)|[\\s\\S]*?(?:(?=[\\\\<!\\[`*~_]|\\b_|https?:\\/\\/|ftp:\\/\\/|www\\.|$)|[^ ](?= {2,}\\n)|[^a-zA-Z0-9.!#$%&'*+\\/=?_`{\\|}~-](?=[a-zA-Z0-9.!#$%&'*+\\/=?_`{\\|}~-]+@)))/},UL={...mb,br:an(g_).replace(\"{2,}\",\"*\").getRegex(),text:an(mb.text).replace(\"\\\\b_\",\"\\\\b_| {2,}\\\\n\").replace(/\\{2,\\}/g,\"*\").getRegex()},sh={normal:l1,gfm:kL,pedantic:_L},ju={normal:c1,gfm:mb,breaks:UL,pedantic:BL};class li{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||ul,this.options.tokenizer=this.options.tokenizer||new Ah,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const n={block:sh.normal,inline:ju.normal};this.options.pedantic?(n.block=sh.pedantic,n.inline=ju.pedantic):this.options.gfm&&(n.block=sh.gfm,this.options.breaks?n.inline=ju.breaks:n.inline=ju.gfm),this.tokenizer.rules=n}static get rules(){return{block:sh,inline:ju}}static lex(t,n){return new li(n).lex(t)}static lexInline(t,n){return new li(n).inlineTokens(t)}lex(t){t=t.replace(/\\r\\n|\\r/g,`\n`),this.blockTokens(t,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){const a=this.inlineQueue[n];this.inlineTokens(a.src,a.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,n=[],a=!1){this.options.pedantic?t=t.replace(/\\t/g,\" \").replace(/^ +$/gm,\"\"):t=t.replace(/^( *)(\\t+)/gm,(u,f,h)=>f+\" \".repeat(h.length));let o,s,c;for(;t;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(u=>(o=u.call({lexer:this},t,n))?(t=t.substring(o.raw.length),n.push(o),!0):!1))){if(o=this.tokenizer.space(t)){t=t.substring(o.raw.length),o.raw.length===1&&n.length>0?n[n.length-1].raw+=`\n`:n.push(o);continue}if(o=this.tokenizer.code(t)){t=t.substring(o.raw.length),s=n[n.length-1],s&&(s.type===\"paragraph\"||s.type===\"text\")?(s.raw+=`\n`+o.raw,s.text+=`\n`+o.text,this.inlineQueue[this.inlineQueue.length-1].src=s.text):n.push(o);continue}if(o=this.tokenizer.fences(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.heading(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.hr(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.blockquote(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.list(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.html(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.def(t)){t=t.substring(o.raw.length),s=n[n.length-1],s&&(s.type===\"paragraph\"||s.type===\"text\")?(s.raw+=`\n`+o.raw,s.text+=`\n`+o.raw,this.inlineQueue[this.inlineQueue.length-1].src=s.text):this.tokens.links[o.tag]||(this.tokens.links[o.tag]={href:o.href,title:o.title});continue}if(o=this.tokenizer.table(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.lheading(t)){t=t.substring(o.raw.length),n.push(o);continue}if(c=t,this.options.extensions&&this.options.extensions.startBlock){let u=1/0;const f=t.slice(1);let h;this.options.extensions.startBlock.forEach(v=>{h=v.call({lexer:this},f),typeof h==\"number\"&&h>=0&&(u=Math.min(u,h))}),u<1/0&&u>=0&&(c=t.substring(0,u+1))}if(this.state.top&&(o=this.tokenizer.paragraph(c))){s=n[n.length-1],a&&s?.type===\"paragraph\"?(s.raw+=`\n`+o.raw,s.text+=`\n`+o.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=s.text):n.push(o),a=c.length!==t.length,t=t.substring(o.raw.length);continue}if(o=this.tokenizer.text(t)){t=t.substring(o.raw.length),s=n[n.length-1],s&&s.type===\"text\"?(s.raw+=`\n`+o.raw,s.text+=`\n`+o.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=s.text):n.push(o);continue}if(t){const u=\"Infinite loop on byte: \"+t.charCodeAt(0);if(this.options.silent){console.error(u);break}else throw new Error(u)}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){let a,o,s,c=t,u,f,h;if(this.tokens.links){const v=Object.keys(this.tokens.links);if(v.length>0)for(;(u=this.tokenizer.rules.inline.reflinkSearch.exec(c))!=null;)v.includes(u[0].slice(u[0].lastIndexOf(\"[\")+1,-1))&&(c=c.slice(0,u.index)+\"[\"+\"a\".repeat(u[0].length-2)+\"]\"+c.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(u=this.tokenizer.rules.inline.blockSkip.exec(c))!=null;)c=c.slice(0,u.index)+\"[\"+\"a\".repeat(u[0].length-2)+\"]\"+c.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(u=this.tokenizer.rules.inline.anyPunctuation.exec(c))!=null;)c=c.slice(0,u.index)+\"++\"+c.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;t;)if(f||(h=\"\"),f=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(v=>(a=v.call({lexer:this},t,n))?(t=t.substring(a.raw.length),n.push(a),!0):!1))){if(a=this.tokenizer.escape(t)){t=t.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.tag(t)){t=t.substring(a.raw.length),o=n[n.length-1],o&&a.type===\"text\"&&o.type===\"text\"?(o.raw+=a.raw,o.text+=a.text):n.push(a);continue}if(a=this.tokenizer.link(t)){t=t.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(a.raw.length),o=n[n.length-1],o&&a.type===\"text\"&&o.type===\"text\"?(o.raw+=a.raw,o.text+=a.text):n.push(a);continue}if(a=this.tokenizer.emStrong(t,c,h)){t=t.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.codespan(t)){t=t.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.br(t)){t=t.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.del(t)){t=t.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.autolink(t)){t=t.substring(a.raw.length),n.push(a);continue}if(!this.state.inLink&&(a=this.tokenizer.url(t))){t=t.substring(a.raw.length),n.push(a);continue}if(s=t,this.options.extensions&&this.options.extensions.startInline){let v=1/0;const y=t.slice(1);let x;this.options.extensions.startInline.forEach(S=>{x=S.call({lexer:this},y),typeof x==\"number\"&&x>=0&&(v=Math.min(v,x))}),v<1/0&&v>=0&&(s=t.substring(0,v+1))}if(a=this.tokenizer.inlineText(s)){t=t.substring(a.raw.length),a.raw.slice(-1)!==\"_\"&&(h=a.raw.slice(-1)),f=!0,o=n[n.length-1],o&&o.type===\"text\"?(o.raw+=a.raw,o.text+=a.text):n.push(a);continue}if(t){const v=\"Infinite loop on byte: \"+t.charCodeAt(0);if(this.options.silent){console.error(v);break}else throw new Error(v)}}return n}}class Oh{options;parser;constructor(t){this.options=t||ul}space(t){return\"\"}code({text:t,lang:n,escaped:a}){const o=(n||\"\").match(/^\\S*/)?.[0],s=t.replace(/\\n$/,\"\")+`\n`;return o?'<pre><code class=\"language-'+la(o)+'\">'+(a?s:la(s,!0))+`</code></pre>\n`:\"<pre><code>\"+(a?s:la(s,!0))+`</code></pre>\n`}blockquote({tokens:t}){return`<blockquote>\n${this.parser.parse(t)}</blockquote>\n`}html({text:t}){return t}heading({tokens:t,depth:n}){return`<h${n}>${this.parser.parseInline(t)}</h${n}>\n`}hr(t){return`<hr>\n`}list(t){const n=t.ordered,a=t.start;let o=\"\";for(let u=0;u<t.items.length;u++){const f=t.items[u];o+=this.listitem(f)}const s=n?\"ol\":\"ul\",c=n&&a!==1?' start=\"'+a+'\"':\"\";return\"<\"+s+c+`>\n`+o+\"</\"+s+`>\n`}listitem(t){let n=\"\";if(t.task){const a=this.checkbox({checked:!!t.checked});t.loose?t.tokens.length>0&&t.tokens[0].type===\"paragraph\"?(t.tokens[0].text=a+\" \"+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type===\"text\"&&(t.tokens[0].tokens[0].text=a+\" \"+t.tokens[0].tokens[0].text)):t.tokens.unshift({type:\"text\",raw:a+\" \",text:a+\" \"}):n+=a+\" \"}return n+=this.parser.parse(t.tokens,!!t.loose),`<li>${n}</li>\n`}checkbox({checked:t}){return\"<input \"+(t?'checked=\"\" ':\"\")+'disabled=\"\" type=\"checkbox\">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>\n`}table(t){let n=\"\",a=\"\";for(let s=0;s<t.header.length;s++)a+=this.tablecell(t.header[s]);n+=this.tablerow({text:a});let o=\"\";for(let s=0;s<t.rows.length;s++){const c=t.rows[s];a=\"\";for(let u=0;u<c.length;u++)a+=this.tablecell(c[u]);o+=this.tablerow({text:a})}return o&&(o=`<tbody>${o}</tbody>`),`<table>\n<thead>\n`+n+`</thead>\n`+o+`</table>\n`}tablerow({text:t}){return`<tr>\n${t}</tr>\n`}tablecell(t){const n=this.parser.parseInline(t.tokens),a=t.header?\"th\":\"td\";return(t.align?`<${a} align=\"${t.align}\">`:`<${a}>`)+n+`</${a}>\n`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${t}</code>`}br(t){return\"<br>\"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:n,tokens:a}){const o=this.parser.parseInline(a),s=mR(t);if(s===null)return o;t=s;let c='<a href=\"'+t+'\"';return n&&(c+=' title=\"'+n+'\"'),c+=\">\"+o+\"</a>\",c}image({href:t,title:n,text:a}){const o=mR(t);if(o===null)return a;t=o;let s=`<img src=\"${t}\" alt=\"${a}\"`;return n&&(s+=` title=\"${n}\"`),s+=\">\",s}text(t){return\"tokens\"in t&&t.tokens?this.parser.parseInline(t.tokens):t.text}}class u1{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return\"\"+t}image({text:t}){return\"\"+t}br(){return\"\"}}class ci{options;renderer;textRenderer;constructor(t){this.options=t||ul,this.options.renderer=this.options.renderer||new Oh,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new u1}static parse(t,n){return new ci(n).parse(t)}static parseInline(t,n){return new ci(n).parseInline(t)}parse(t,n=!0){let a=\"\";for(let o=0;o<t.length;o++){const s=t[o];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[s.type]){const u=s,f=this.options.extensions.renderers[u.type].call({parser:this},u);if(f!==!1||![\"space\",\"hr\",\"heading\",\"code\",\"table\",\"blockquote\",\"list\",\"html\",\"paragraph\",\"text\"].includes(u.type)){a+=f||\"\";continue}}const c=s;switch(c.type){case\"space\":{a+=this.renderer.space(c);continue}case\"hr\":{a+=this.renderer.hr(c);continue}case\"heading\":{a+=this.renderer.heading(c);continue}case\"code\":{a+=this.renderer.code(c);continue}case\"table\":{a+=this.renderer.table(c);continue}case\"blockquote\":{a+=this.renderer.blockquote(c);continue}case\"list\":{a+=this.renderer.list(c);continue}case\"html\":{a+=this.renderer.html(c);continue}case\"paragraph\":{a+=this.renderer.paragraph(c);continue}case\"text\":{let u=c,f=this.renderer.text(u);for(;o+1<t.length&&t[o+1].type===\"text\";)u=t[++o],f+=`\n`+this.renderer.text(u);n?a+=this.renderer.paragraph({type:\"paragraph\",raw:f,text:f,tokens:[{type:\"text\",raw:f,text:f}]}):a+=f;continue}default:{const u='Token with \"'+c.type+'\" type was not found.';if(this.options.silent)return console.error(u),\"\";throw new Error(u)}}}return a}parseInline(t,n){n=n||this.renderer;let a=\"\";for(let o=0;o<t.length;o++){const s=t[o];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[s.type]){const u=this.options.extensions.renderers[s.type].call({parser:this},s);if(u!==!1||![\"escape\",\"html\",\"link\",\"image\",\"strong\",\"em\",\"codespan\",\"br\",\"del\",\"text\"].includes(s.type)){a+=u||\"\";continue}}const c=s;switch(c.type){case\"escape\":{a+=n.text(c);break}case\"html\":{a+=n.html(c);break}case\"link\":{a+=n.link(c);break}case\"image\":{a+=n.image(c);break}case\"strong\":{a+=n.strong(c);break}case\"em\":{a+=n.em(c);break}case\"codespan\":{a+=n.codespan(c);break}case\"br\":{a+=n.br(c);break}case\"del\":{a+=n.del(c);break}case\"text\":{a+=n.text(c);break}default:{const u='Token with \"'+c.type+'\" type was not found.';if(this.options.silent)return console.error(u),\"\";throw new Error(u)}}}return a}}class yh{options;constructor(t){this.options=t||ul}static passThroughHooks=new Set([\"preprocess\",\"postprocess\",\"processAllTokens\"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}}class VL{defaults=a1();options=this.setOptions;parse=this.parseMarkdown(li.lex,ci.parse);parseInline=this.parseMarkdown(li.lexInline,ci.parseInline);Parser=ci;Renderer=Oh;TextRenderer=u1;Lexer=li;Tokenizer=Ah;Hooks=yh;constructor(...t){this.use(...t)}walkTokens(t,n){let a=[];for(const o of t)switch(a=a.concat(n.call(this,o)),o.type){case\"table\":{const s=o;for(const c of s.header)a=a.concat(this.walkTokens(c.tokens,n));for(const c of s.rows)for(const u of c)a=a.concat(this.walkTokens(u.tokens,n));break}case\"list\":{const s=o;a=a.concat(this.walkTokens(s.items,n));break}default:{const s=o;this.defaults.extensions?.childTokens?.[s.type]?this.defaults.extensions.childTokens[s.type].forEach(c=>{const u=s[c].flat(1/0);a=a.concat(this.walkTokens(u,n))}):s.tokens&&(a=a.concat(this.walkTokens(s.tokens,n)))}}return a}use(...t){const n=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(a=>{const o={...a};if(o.async=this.defaults.async||o.async||!1,a.extensions&&(a.extensions.forEach(s=>{if(!s.name)throw new Error(\"extension name required\");if(\"renderer\"in s){const c=n.renderers[s.name];c?n.renderers[s.name]=function(...u){let f=s.renderer.apply(this,u);return f===!1&&(f=c.apply(this,u)),f}:n.renderers[s.name]=s.renderer}if(\"tokenizer\"in s){if(!s.level||s.level!==\"block\"&&s.level!==\"inline\")throw new Error(\"extension level must be 'block' or 'inline'\");const c=n[s.level];c?c.unshift(s.tokenizer):n[s.level]=[s.tokenizer],s.start&&(s.level===\"block\"?n.startBlock?n.startBlock.push(s.start):n.startBlock=[s.start]:s.level===\"inline\"&&(n.startInline?n.startInline.push(s.start):n.startInline=[s.start]))}\"childTokens\"in s&&s.childTokens&&(n.childTokens[s.name]=s.childTokens)}),o.extensions=n),a.renderer){const s=this.defaults.renderer||new Oh(this.defaults);for(const c in a.renderer){if(!(c in s))throw new Error(`renderer '${c}' does not exist`);if([\"options\",\"parser\"].includes(c))continue;const u=c,f=a.renderer[u],h=s[u];s[u]=(...v)=>{let y=f.apply(s,v);return y===!1&&(y=h.apply(s,v)),y||\"\"}}o.renderer=s}if(a.tokenizer){const s=this.defaults.tokenizer||new Ah(this.defaults);for(const c in a.tokenizer){if(!(c in s))throw new Error(`tokenizer '${c}' does not exist`);if([\"options\",\"rules\",\"lexer\"].includes(c))continue;const u=c,f=a.tokenizer[u],h=s[u];s[u]=(...v)=>{let y=f.apply(s,v);return y===!1&&(y=h.apply(s,v)),y}}o.tokenizer=s}if(a.hooks){const s=this.defaults.hooks||new yh;for(const c in a.hooks){if(!(c in s))throw new Error(`hook '${c}' does not exist`);if(c===\"options\")continue;const u=c,f=a.hooks[u],h=s[u];yh.passThroughHooks.has(c)?s[u]=v=>{if(this.defaults.async)return Promise.resolve(f.call(s,v)).then(x=>h.call(s,x));const y=f.call(s,v);return h.call(s,y)}:s[u]=(...v)=>{let y=f.apply(s,v);return y===!1&&(y=h.apply(s,v)),y}}o.hooks=s}if(a.walkTokens){const s=this.defaults.walkTokens,c=a.walkTokens;o.walkTokens=function(u){let f=[];return f.push(c.call(this,u)),s&&(f=f.concat(s.call(this,u))),f}}this.defaults={...this.defaults,...o}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,n){return li.lex(t,n??this.defaults)}parser(t,n){return ci.parse(t,n??this.defaults)}parseMarkdown(t,n){return(o,s)=>{const c={...s},u={...this.defaults,...c},f=this.onError(!!u.silent,!!u.async);if(this.defaults.async===!0&&c.async===!1)return f(new Error(\"marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise.\"));if(typeof o>\"u\"||o===null)return f(new Error(\"marked(): input parameter is undefined or null\"));if(typeof o!=\"string\")return f(new Error(\"marked(): input parameter is of type \"+Object.prototype.toString.call(o)+\", string expected\"));if(u.hooks&&(u.hooks.options=u),u.async)return Promise.resolve(u.hooks?u.hooks.preprocess(o):o).then(h=>t(h,u)).then(h=>u.hooks?u.hooks.processAllTokens(h):h).then(h=>u.walkTokens?Promise.all(this.walkTokens(h,u.walkTokens)).then(()=>h):h).then(h=>n(h,u)).then(h=>u.hooks?u.hooks.postprocess(h):h).catch(f);try{u.hooks&&(o=u.hooks.preprocess(o));let h=t(o,u);u.hooks&&(h=u.hooks.processAllTokens(h)),u.walkTokens&&this.walkTokens(h,u.walkTokens);let v=n(h,u);return u.hooks&&(v=u.hooks.postprocess(v)),v}catch(h){return f(h)}}}onError(t,n){return a=>{if(a.message+=`\nPlease report this to https://github.com/markedjs/marked.`,t){const o=\"<p>An error occurred:</p><pre>\"+la(a.message+\"\",!0)+\"</pre>\";return n?Promise.resolve(o):o}if(n)return Promise.reject(a);throw a}}}const al=new VL;function Kt(e,t){return al.parse(e,t)}Kt.options=Kt.setOptions=function(e){return al.setOptions(e),Kt.defaults=al.defaults,c_(Kt.defaults),Kt};Kt.getDefaults=a1;Kt.defaults=ul;Kt.use=function(...e){return al.use(...e),Kt.defaults=al.defaults,c_(Kt.defaults),Kt};Kt.walkTokens=function(e,t){return al.walkTokens(e,t)};Kt.parseInline=al.parseInline;Kt.Parser=ci;Kt.parser=ci.parse;Kt.Renderer=Oh;Kt.TextRenderer=u1;Kt.Lexer=li;Kt.lexer=li.lex;Kt.Tokenizer=Ah;Kt.Hooks=yh;Kt.parse=Kt;Kt.options;Kt.setOptions;Kt.use;Kt.walkTokens;Kt.parseInline;ci.parse;li.lex;const WL=kr(\"div\")({name:\"MarkdownContainer\",class:\"gdg-mnuv029\",propsAsIs:!1});class GL extends At.PureComponent{targetElement=null;renderMarkdownIntoDiv(){const{targetElement:t,props:n}=this;if(t===null)return;const{contents:a,createNode:o}=n,s=Kt(a),c=document.createRange();c.selectNodeContents(t),c.deleteContents();let u=o?.(s);if(u===void 0){const h=document.createElement(\"template\");h.innerHTML=s,u=h.content}t.append(u);const f=t.getElementsByTagName(\"a\");for(const h of f)h.target=\"_blank\",h.rel=\"noreferrer noopener\"}containerRefHook=t=>{this.targetElement=t,this.renderMarkdownIntoDiv()};render(){return this.renderMarkdownIntoDiv(),At.createElement(WL,{ref:this.containerRefHook})}}const YL=kr(\"textarea\")({name:\"InputBox\",class:\"gdg-izpuzkl\",propsAsIs:!1}),XL=kr(\"div\")({name:\"ShadowBox\",class:\"gdg-s69h75o\",propsAsIs:!1}),QL=kr(\"div\")({name:\"GrowingEntryStyle\",class:\"gdg-g1y0xocz\",propsAsIs:!1});let yR=0;const hm=e=>{const{placeholder:t,value:n,onKeyDown:a,highlight:o,altNewline:s,validatedSelection:c,...u}=e,{onChange:f,className:h}=u,v=m.useRef(null),y=n??\"\";da(f!==void 0,\"GrowingEntry must be a controlled input area\");const[x]=m.useState(()=>\"input-box-\"+(yR=(yR+1)%1e7));m.useEffect(()=>{const w=v.current;if(w===null||w.disabled)return;const C=y.toString().length;w.focus(),w.setSelectionRange(o?0:C,C)},[]),m.useLayoutEffect(()=>{if(c!==void 0){const w=typeof c==\"number\"?[c,null]:c;v.current?.setSelectionRange(w[0],w[1])}},[c]);const S=m.useCallback(w=>{w.key===\"Enter\"&&w.shiftKey&&s===!0||a?.(w)},[s,a]);return m.createElement(QL,{className:\"gdg-growing-entry\"},m.createElement(XL,{className:h},y+`\n`),m.createElement(YL,{...u,className:(h??\"\")+\" gdg-input\",id:x,ref:v,onKeyDown:S,value:y,placeholder:t,dir:\"auto\"}))},Jv={};let Vo=null;function KL(){const e=document.createElement(\"div\");return e.style.opacity=\"0\",e.style.pointerEvents=\"none\",e.style.position=\"fixed\",document.body.append(e),e}function pb(e){const t=e.toLowerCase().trim();if(Jv[t]!==void 0)return Jv[t];Vo=Vo||KL(),Vo.style.color=\"#000\",Vo.style.color=t;const n=getComputedStyle(Vo).color;Vo.style.color=\"#fff\",Vo.style.color=t;const a=getComputedStyle(Vo).color;if(a!==n)return[0,0,0,1];let o=a.replace(/[^\\d.,]/g,\"\").split(\",\").map(Number.parseFloat);return o.length<4&&o.push(1),o=o.map(s=>Number.isNaN(s)?0:s),Jv[t]=o,o}function il(e,t){const[n,a,o]=pb(e);return`rgba(${n}, ${a}, ${o}, ${t})`}const bR=new Map;function xR(e,t){const n=`${e}-${t}`,a=bR.get(n);if(a!==void 0)return a;const o=fa(e,t);return bR.set(n,o),o}function fa(e,t){if(t===void 0)return e;const[n,a,o,s]=pb(e);if(s===1)return e;const[c,u,f,h]=pb(t),v=s+h*(1-s),y=(s*n+h*c*(1-s))/v,x=(s*a+h*u*(1-s))/v,S=(s*o+h*f*(1-s))/v;return`rgba(${y}, ${x}, ${S}, ${v})`}var lc=new Map,hc=new Map,gb=new Map;function ZL(){lc.clear(),gb.clear(),hc.clear()}function JL(e,t,n,a,o){var s,c,u;let f=0,h={};for(let y of e)f+=(s=n.get(y))!=null?s:o,h[y]=((c=h[y])!=null?c:0)+1;let v=t-f;for(let y of Object.keys(h)){let x=h[y],S=(u=n.get(y))!=null?u:o,w=S*x/f,C=v*w*a/x,R=S+C;n.set(y,R)}}function eI(e,t){var n;let a=new Map,o=0;for(let h of\"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890,.-+=?\"){let v=e.measureText(h).width;a.set(h,v),o+=v}let s=o/a.size,c=3,u=(t/s+c)/(c+1),f=a.keys();for(let h of f)a.set(h,((n=a.get(h))!=null?n:s)*u);return a}function Zu(e,t,n,a){var o,s;let c=hc.get(n);if(a&&c!==void 0&&c.count>2e4){let h=gb.get(n);if(h===void 0&&(h=eI(e,c.size),gb.set(n,h)),c.count>5e5){let y=0;for(let x of t)y+=(o=h.get(x))!=null?o:c.size;return y*1.01}let v=e.measureText(t);return JL(t,v.width,h,Math.max(.05,1-c.count/2e5),c.size),hc.set(n,{count:c.count+t.length,size:c.size}),v.width}let u=e.measureText(t),f=u.width/t.length;if(((s=c?.count)!=null?s:0)>2e4)return u.width;if(c===void 0)hc.set(n,{count:t.length,size:f});else{let h=f-c.size,v=t.length/(c.count+t.length),y=c.size+h*v;hc.set(n,{count:c.count+t.length,size:y})}return u.width}function tI(e,t,n,a,o,s,c,u){if(t.length<=1)return t.length;if(o<n)return-1;let f=Math.floor(n/o*s),h=Zu(e,t.slice(0,Math.max(0,f)),a,c);if(h!==n)if(h<n){for(;h<n;)f++,h=Zu(e,t.slice(0,Math.max(0,f)),a,c);f--}else for(;h>n;){let v=t.lastIndexOf(\" \",f-1);v>0?f=v:f--,h=Zu(e,t.slice(0,Math.max(0,f)),a,c)}if(t[f]!==\" \"){let v=0;v=t.lastIndexOf(\" \",f),v>0&&(f=v)}return f}function nI(e,t,n,a,o,s){let c=`${t}_${n}_${a}px`,u=lc.get(c);if(u!==void 0)return u;if(a<=0)return[];let f=[],h=t.split(`\n`),v=hc.get(n),y=v===void 0?t.length:a/v.size*1.5,x=o&&v!==void 0&&v.count>2e4;for(let S of h){let w=Zu(e,S.slice(0,Math.max(0,y)),n,x),C=Math.min(S.length,y);if(w<=a)f.push(S);else{for(;w>a;){let R=tI(e,S,a,n,w,C,x),k=S.slice(0,Math.max(0,R));S=S.slice(k.length),f.push(k),w=Zu(e,S.slice(0,Math.max(0,y)),n,x),C=Math.min(S.length,y)}w>0&&f.push(S)}}return f=f.map((S,w)=>w===0?S.trimEnd():S.trim()),lc.set(c,f),lc.size>500&&lc.delete(lc.keys().next().value),f}function rI(e,t){return At.useMemo(()=>e.map((n,a)=>({group:n.group,grow:n.grow,hasMenu:n.hasMenu,icon:n.icon,id:n.id,menuIcon:n.menuIcon,overlayIcon:n.overlayIcon,sourceIndex:a,sticky:a<t,style:n.style,themeOverride:n.themeOverride,title:n.title,trailingRowOptions:n.trailingRowOptions,width:n.width,growOffset:n.growOffset,rowMarker:n.rowMarker,rowMarkerChecked:n.rowMarkerChecked})),[e,t])}function aI(e,t){const[n,a]=t;if(e.columns.hasIndex(n)||e.rows.hasIndex(a))return!0;if(e.current!==void 0){if(Ju(e.current.cell,t))return!0;const o=[e.current.range,...e.current.rangeStack];for(const s of o)if(n>=s.x&&n<s.x+s.width&&a>=s.y&&a<s.y+s.height)return!0}return!1}function fd(e,t){return(e??\"\")===(t??\"\")}function iI(e,t,n){return n.current===void 0||e[1]!==n.current.cell[1]?!1:t.span===void 0?n.current.cell[0]===e[0]:n.current.cell[0]>=t.span[0]&&n.current.cell[0]<=t.span[1]}function b_(e,t){const[n,a]=e;return n>=t.x&&n<t.x+t.width&&a>=t.y&&a<t.y+t.height}function Ju(e,t){return e?.[0]===t?.[0]&&e?.[1]===t?.[1]}function x_(e){return[e.x+e.width-1,e.y+e.height-1]}function wR(e,t,n){const a=n.x,o=n.x+n.width-1,s=n.y,c=n.y+n.height-1,[u,f]=e;if(f<s||f>c)return!1;if(t.span===void 0)return u>=a&&u<=o;const[h,v]=t.span;return h>=a&&h<=o||v>=a&&h<=o||h<a&&v>o}function oI(e,t,n,a){let o=0;if(n.current===void 0)return o;const s=n.current.range;(a||s.height*s.width>1)&&wR(e,t,s)&&o++;for(const c of n.current.rangeStack)wR(e,t,c)&&o++;return o}function w_(e,t){let n=e;if(t!==void 0){let a=[...e];const o=n[t.src];t.src>t.dest?(a.splice(t.src,1),a.splice(t.dest,0,o)):(a.splice(t.dest+1,0,o),a.splice(t.src,1)),a=a.map((s,c)=>({...s,sticky:e[c].sticky})),n=a}return n}function _c(e,t){let n=0;const a=w_(e,t);for(let o=0;o<a.length;o++){const s=a[o];if(s.sticky)n+=s.width;else break}return n}function dl(e,t,n){if(typeof n==\"number\")return t*n;{let a=0;for(let o=e-t;o<e;o++)a+=n(o);return a}}function vb(e,t,n,a,o){const s=w_(e,a),c=[];for(const h of s)if(h.sticky)c.push(h);else break;if(c.length>0)for(const h of c)n-=h.width;let u=t,f=o??0;for(;f<=n&&u<s.length;)f+=s[u].width,u++;for(let h=t;h<u;h++){const v=s[h];v.sticky||c.push(v)}return c}function sI(e,t,n){let a=0;for(const o of t){const s=o.sticky?a:a+(n??0);if(e<=s+o.width)return o.sourceIndex;a+=o.width}return-1}function lI(e,t,n,a,o,s,c,u,f,h){const v=a+o;if(n&&e<=o)return-2;if(e<=v)return-1;let y=t;for(let w=0;w<h;w++){const C=s-1-w,R=typeof c==\"number\"?c:c(C);if(y-=R,e>=y)return C}const x=s-h,S=e-(f??0);if(typeof c==\"number\"){const w=Math.floor((S-v)/c)+u;return w>=x?void 0:w}else{let w=v;for(let C=u;C<x;C++){const R=c(C);if(S<=w+R)return C;w+=R}return}}let bh=0,ed={};const cI=typeof window>\"u\";async function uI(){cI||document?.fonts?.ready===void 0||(await document.fonts.ready,bh=0,ed={},ZL())}uI();function S_(e,t,n,a){return`${e}_${a??t?.font}_${n}`}function Nd(e,t,n,a=\"middle\"){const o=S_(e,t,a,n);let s=ed[o];return s===void 0&&(s=t.measureText(e),ed[o]=s,bh++),bh>1e4&&(ed={},bh=0),s}function dI(e,t){const n=S_(e,void 0,\"middle\",t);return ed[n]}function fs(e,t){return typeof t!=\"string\"&&(t=t.baseFontFull),fI(e,t)}function SR(e,t){const n=\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\";e.save(),e.textBaseline=t;const a=e.measureText(n);return e.restore(),a}const CR=[];function fI(e,t){for(const s of CR)if(s.key===t)return s.val;const n=SR(e,\"alphabetic\"),o=-(SR(e,\"middle\").actualBoundingBoxDescent-n.actualBoundingBoxDescent)+n.actualBoundingBoxAscent/2;return CR.push({key:t,val:o}),o}function hI(e,t,n,a,o,s){const{ctx:c,rect:u,theme:f}=e;let h=Number.MAX_SAFE_INTEGER;const v=500;if(t!==void 0&&(h=n-t,h<v)){const y=1-h/v;c.globalAlpha=y,c.fillStyle=f.bgSearchResult,c.fillRect(u.x+1,u.y+1,u.width-(o?2:1),u.height-(s?2:1)),c.globalAlpha=1,a!==void 0&&(a.fillStyle=f.bgSearchResult)}return h<v}function Od(e,t,n){const{ctx:a,theme:o}=e,s=t??{},c=n??o.textDark;return c!==s.fillStyle&&(a.fillStyle=c,s.fillStyle=c),s}function C_(e,t,n,a,o,s,c,u,f){f===\"right\"?e.fillText(t,n+o-(u.cellHorizontalPadding+.5),a+s/2+c):f===\"center\"?e.fillText(t,n+o/2,a+s/2+c):e.fillText(t,n+u.cellHorizontalPadding+.5,a+s/2+c)}function R_(e,t){const n=Nd(\"ABCi09jgqpy\",e,t);return n.actualBoundingBoxAscent+n.actualBoundingBoxDescent}function mI(e,t){e.includes(`\n`)&&(e=e.split(/\\r?\\n/,1)[0]);const n=t/4;return e.length>n&&(e=e.slice(0,n)),e}function pI(e,t,n,a,o,s,c,u,f,h){const v=u.baseFontFull,y=nI(e,t,v,o-u.cellHorizontalPadding*2,h??!1),x=R_(e,v),S=u.lineHeight*x,w=x+S*(y.length-1),C=w+u.cellVerticalPadding>s;C&&(e.save(),e.rect(n,a,o,s),e.clip());const R=a+s/2-w/2;let k=Math.max(a+u.cellVerticalPadding,R);for(const T of y)if(C_(e,T,n,k,o,x,c,u,f),k+=S,k>a+s)break;C&&e.restore()}function Zi(e,t,n,a,o){const{ctx:s,rect:c,theme:u}=e,{x:f,y:h,width:v,height:y}=c;a=a??!1,a||(t=mI(t,v));const x=fs(s,u),S=r1(t)===\"rtl\";if(n===void 0&&S&&(n=\"right\"),S&&(s.direction=\"rtl\"),t.length>0){let w=!1;n===\"right\"?(s.textAlign=\"right\",w=!0):n!==void 0&&n!==\"left\"&&(s.textAlign=n,w=!0),a?pI(s,t,f,h,v,y,x,u,n,o):C_(s,t,f,h,v,y,x,u,n),w&&(s.textAlign=\"start\"),S&&(s.direction=\"inherit\")}}function di(e,t,n,a,o,s){typeof s==\"number\"&&(s={tl:s,tr:s,br:s,bl:s}),s={tl:Math.max(0,Math.min(s.tl,o/2,a/2)),tr:Math.max(0,Math.min(s.tr,o/2,a/2)),bl:Math.max(0,Math.min(s.bl,o/2,a/2)),br:Math.max(0,Math.min(s.br,o/2,a/2))},e.moveTo(t+s.tl,n),e.arcTo(t+a,n,t+a,n+s.tr,s.tr),e.arcTo(t+a,n+o,t+a-s.br,n+o,s.br),e.arcTo(t,n+o,t,n+o-s.bl,s.bl),e.arcTo(t,n,t+s.tl,n,s.tl)}function gI(e,t,n){e.arc(t,n-1.25*3.5,1.25,0,2*Math.PI,!1),e.arc(t,n,1.25,0,2*Math.PI,!1),e.arc(t,n+1.25*3.5,1.25,0,2*Math.PI,!1)}function vI(e,t,n){const a=function(u,f){const h=f.x-u.x,v=f.y-u.y,y=Math.sqrt(h*h+v*v),x=h/y,S=v/y;return{x:h,y:f.y-u.y,len:y,nx:x,ny:S,ang:Math.atan2(S,x)}};let o;const s=t.length;let c=t[s-1];for(let u=0;u<s;u++){let f=t[u%s];const h=t[(u+1)%s],v=a(f,c),y=a(f,h),x=v.nx*y.ny-v.ny*y.nx,S=v.nx*y.nx-v.ny*-y.ny;let w=Math.asin(x<-1?-1:x>1?1:x),C=1,R=!1;S<0?w<0?w=Math.PI+w:(w=Math.PI-w,C=-1,R=!0):w>0&&(C=-1,R=!0),o=f.radius!==void 0?f.radius:n;const k=w/2;let T=Math.abs(Math.cos(k)*o/Math.sin(k)),M;T>Math.min(v.len/2,y.len/2)?(T=Math.min(v.len/2,y.len/2),M=Math.abs(T*Math.sin(k)/Math.cos(k))):M=o;let j=f.x+y.nx*T,I=f.y+y.ny*T;j+=-y.ny*M*C,I+=y.nx*M*C,e.arc(j,I,M,v.ang+Math.PI/2*C,y.ang-Math.PI/2*C,R),c=f,f=h}e.closePath()}function yb(e,t,n,a,o,s,c,u,f,h,v,y,x,S,w){const C={x:0,y:s+h,width:0,height:0};if(e>=S.length||t>=v||t<-2||e<0)return C;const R=s-o;if(e>=y){const k=c>e?-1:1,T=_c(S);C.x+=T+f;for(let M=c;M!==e;M+=k)C.x+=S[k===1?M:M-1].width*k}else for(let k=0;k<e;k++)C.x+=S[k].width;if(C.width=S[e].width+1,t===-1)C.y=o,C.height=R;else if(t===-2){C.y=0,C.height=o;let k=e;const T=S[e].group,M=S[e].sticky;for(;k>0&&fd(S[k-1].group,T)&&S[k-1].sticky===M;){const I=S[k-1];C.x-=I.width,C.width+=I.width,k--}let j=e;for(;j+1<S.length&&fd(S[j+1].group,T)&&S[j+1].sticky===M;){const I=S[j+1];C.width+=I.width,j++}if(!M){const I=_c(S),P=C.x-I;P<0&&(C.x-=P,C.width+=P),C.x+C.width>n&&(C.width=n-C.x)}}else if(t>=v-x){let k=v-t;for(C.y=a;k>0;){const T=t+k-1;C.height=typeof w==\"number\"?w:w(T),C.y-=C.height,k--}C.height+=1}else{const k=u>t?-1:1;if(typeof w==\"number\"){const T=t-u;C.y+=T*w}else for(let T=u;T!==t;T+=k)C.y+=w(T)*k;C.height=(typeof w==\"number\"?w:w(t))+1}return C}const d1=1<<21;function qa(e,t){return(t+2)*d1+e}function E_(e){return e%d1}function f1(e){return Math.floor(e/d1)-2}function h1(e){const t=E_(e),n=f1(e);return[t,n]}class T_{visibleWindow={x:0,y:0,width:0,height:0};freezeCols=0;freezeRows=[];isInWindow=t=>{const n=E_(t),a=f1(t),o=this.visibleWindow,s=n>=o.x&&n<=o.x+o.width||n<this.freezeCols,c=a>=o.y&&a<=o.y+o.height||this.freezeRows.includes(a);return s&&c};setWindow(t,n,a){this.visibleWindow.x===t.x&&this.visibleWindow.y===t.y&&this.visibleWindow.width===t.width&&this.visibleWindow.height===t.height&&this.freezeCols===n&&kc(this.freezeRows,a)||(this.visibleWindow=t,this.freezeCols=n,this.freezeRows=a,this.clearOutOfWindow())}}class yI extends T_{cache=new Map;setValue=(t,n)=>{this.cache.set(qa(t[0],t[1]),n)};getValue=t=>this.cache.get(qa(t[0],t[1]));clearOutOfWindow=()=>{for(const[t]of this.cache.entries())this.isInWindow(t)||this.cache.delete(t)}}class td{cells;constructor(t=[]){this.cells=new Set(t.map(n=>qa(n[0],n[1])))}add(t){this.cells.add(qa(t[0],t[1]))}has(t){return t===void 0?!1:this.cells.has(qa(t[0],t[1]))}remove(t){this.cells.delete(qa(t[0],t[1]))}clear(){this.cells.clear()}get size(){return this.cells.size}hasHeader(){for(const t of this.cells)if(f1(t)<0)return!0;return!1}hasItemInRectangle(t){for(let n=t.y;n<t.y+t.height;n++)for(let a=t.x;a<t.x+t.width;a++)if(this.cells.has(qa(a,n)))return!0;return!1}hasItemInRegion(t){for(const n of t)if(this.hasItemInRectangle(n))return!0;return!1}*values(){for(const t of this.cells)yield h1(t)}}function M_(e){return{\"--gdg-accent-color\":e.accentColor,\"--gdg-accent-fg\":e.accentFg,\"--gdg-accent-light\":e.accentLight,\"--gdg-text-dark\":e.textDark,\"--gdg-text-medium\":e.textMedium,\"--gdg-text-light\":e.textLight,\"--gdg-text-bubble\":e.textBubble,\"--gdg-bg-icon-header\":e.bgIconHeader,\"--gdg-fg-icon-header\":e.fgIconHeader,\"--gdg-text-header\":e.textHeader,\"--gdg-text-group-header\":e.textGroupHeader??e.textHeader,\"--gdg-text-header-selected\":e.textHeaderSelected,\"--gdg-bg-cell\":e.bgCell,\"--gdg-bg-cell-medium\":e.bgCellMedium,\"--gdg-bg-header\":e.bgHeader,\"--gdg-bg-header-has-focus\":e.bgHeaderHasFocus,\"--gdg-bg-header-hovered\":e.bgHeaderHovered,\"--gdg-bg-bubble\":e.bgBubble,\"--gdg-bg-bubble-selected\":e.bgBubbleSelected,\"--gdg-bg-search-result\":e.bgSearchResult,\"--gdg-border-color\":e.borderColor,\"--gdg-horizontal-border-color\":e.horizontalBorderColor??e.borderColor,\"--gdg-drilldown-border\":e.drilldownBorder,\"--gdg-link-color\":e.linkColor,\"--gdg-cell-horizontal-padding\":`${e.cellHorizontalPadding}px`,\"--gdg-cell-vertical-padding\":`${e.cellVerticalPadding}px`,\"--gdg-header-font-style\":e.headerFontStyle,\"--gdg-base-font-style\":e.baseFontStyle,\"--gdg-marker-font-style\":e.markerFontStyle,\"--gdg-font-family\":e.fontFamily,\"--gdg-editor-font-size\":e.editorFontSize,...e.resizeIndicatorColor===void 0?{}:{\"--gdg-resize-indicator-color\":e.resizeIndicatorColor},...e.headerBottomBorderColor===void 0?{}:{\"--gdg-header-bottom-border-color\":e.headerBottomBorderColor},...e.roundingRadius===void 0?{}:{\"--gdg-rounding-radius\":`${e.roundingRadius}px`}}}const k_={accentColor:\"#4F5DFF\",accentFg:\"#FFFFFF\",accentLight:\"rgba(62, 116, 253, 0.1)\",textDark:\"#313139\",textMedium:\"#737383\",textLight:\"#B2B2C0\",textBubble:\"#313139\",bgIconHeader:\"#737383\",fgIconHeader:\"#FFFFFF\",textHeader:\"#313139\",textGroupHeader:\"#313139BB\",textHeaderSelected:\"#FFFFFF\",bgCell:\"#FFFFFF\",bgCellMedium:\"#FAFAFB\",bgHeader:\"#F7F7F8\",bgHeaderHasFocus:\"#E9E9EB\",bgHeaderHovered:\"#EFEFF1\",bgBubble:\"#EDEDF3\",bgBubbleSelected:\"#FFFFFF\",bgSearchResult:\"#fff9e3\",borderColor:\"rgba(115, 116, 131, 0.16)\",drilldownBorder:\"rgba(0, 0, 0, 0)\",linkColor:\"#353fb5\",cellHorizontalPadding:8,cellVerticalPadding:3,headerIconSize:18,headerFontStyle:\"600 13px\",baseFontStyle:\"13px\",markerFontStyle:\"9px\",fontFamily:\"Inter, Roboto, -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Ubuntu, noto, arial, sans-serif\",editorFontSize:\"13px\",lineHeight:1.4};function __(){return k_}const A_=At.createContext(k_);function as(e,...t){const n={...e};for(const a of t)if(a!==void 0)for(const o in a)a.hasOwnProperty(o)&&(o===\"bgCell\"?n[o]=fa(a[o],n[o]):n[o]=a[o]);return(n.headerFontFull===void 0||e.fontFamily!==n.fontFamily||e.headerFontStyle!==n.headerFontStyle)&&(n.headerFontFull=`${n.headerFontStyle} ${n.fontFamily}`),(n.baseFontFull===void 0||e.fontFamily!==n.fontFamily||e.baseFontStyle!==n.baseFontStyle)&&(n.baseFontFull=`${n.baseFontStyle} ${n.fontFamily}`),(n.markerFontFull===void 0||e.fontFamily!==n.fontFamily||e.markerFontStyle!==n.markerFontStyle)&&(n.markerFontFull=`${n.markerFontStyle} ${n.fontFamily}`),n}const bb=150;function bI(e,t,n,a){return a(t)?.measure?.(e,t,n)??bb}function N_(e,t,n,a,o,s,c,u,f){let h=0;const v=o===void 0?[]:o.map(x=>{const S=bI(e,x[a],t,f);return h=Math.max(h,S),S});if(v.length>5&&u){h=0;let x=0;for(const w of v)x+=w;const S=x/v.length;for(let w=0;w<v.length;w++)v[w]>=S*2?v[w]=0:h=Math.max(h,v[w])}h=Math.max(h,e.measureText(n.title).width+16+(n.icon===void 0?0:28));const y=Math.max(Math.ceil(s),Math.min(Math.floor(c),Math.ceil(h)));return{...n,width:y}}function xI(e,t,n,a,o,s,c,u,f){const h=m.useRef(t),v=m.useRef(n),y=m.useRef(c);h.current=t,v.current=n,y.current=c;const[x,S]=m.useMemo(()=>{if(typeof window>\"u\")return[null,null];const T=document.createElement(\"canvas\");return T.style.display=\"none\",T.style.opacity=\"0\",T.style.position=\"fixed\",[T,T.getContext(\"2d\",{alpha:!1})]},[]);m.useLayoutEffect(()=>(x&&document.documentElement.append(x),()=>{x?.remove()}),[x]);const w=m.useRef({}),C=m.useRef(),[R,k]=m.useState();return m.useLayoutEffect(()=>{const T=v.current;if(T===void 0||e.every(rh))return;let M=Math.max(1,10-Math.floor(e.length/1e4)),j=0;M<h.current&&M>1&&(M--,j=1);const I={x:0,y:0,width:e.length,height:Math.min(h.current,M)},P={x:0,y:h.current-1,width:e.length,height:1};(async()=>{const q=T(I,f.signal),B=j>0?T(P,f.signal):void 0;let V;typeof q==\"object\"?V=q:V=await q2(q),B!==void 0&&(typeof B==\"object\"?V=[...V,...B]:V=[...V,...await q2(B)]),C.current=e,k(V)})()},[f.signal,e]),m.useMemo(()=>{let M=e.every(rh)?e:S===null?e.map(A=>rh(A)?A:{...A,width:bb}):(S.font=y.current.baseFontFull,e.map((A,q)=>{if(rh(A))return A;if(w.current[A.id]!==void 0)return{...A,width:w.current[A.id]};if(R===void 0||C.current!==e||A.id===void 0)return{...A,width:bb};const B=N_(S,c,A,q,R,o,s,!0,u);return w.current[A.id]=B.width,B})),j=0,I=0;const P=[];for(const[A,q]of M.entries())j+=q.width,q.grow!==void 0&&q.grow>0&&(I+=q.grow,P.push(A));if(j<a&&P.length>0){const A=[...M],q=a-j;let B=q;for(let V=0;V<P.length;V++){const N=P[V],_=(M[N].grow??0)/I,z=V===P.length-1?B:Math.min(B,Math.floor(q*_));A[N]={...M[N],growOffset:z,width:M[N].width+z},B-=z}M=A}return{sizedColumns:M,nonGrowWidth:j}},[a,e,S,R,c,o,s,u])}const wI=\"modulepreload\",SI=function(e){return\"/_dashboard/\"+e},RR={},O_=function(t,n,a){let o=Promise.resolve();if(n&&n.length>0){let h=function(v){return Promise.all(v.map(y=>Promise.resolve(y).then(x=>({status:\"fulfilled\",value:x}),x=>({status:\"rejected\",reason:x}))))};var c=h;document.getElementsByTagName(\"link\");const u=document.querySelector(\"meta[property=csp-nonce]\"),f=u?.nonce||u?.getAttribute(\"nonce\");o=h(n.map(v=>{if(v=SI(v),v in RR)return;RR[v]=!0;const y=v.endsWith(\".css\"),x=y?'[rel=\"stylesheet\"]':\"\";if(document.querySelector(`link[href=\"${v}\"]${x}`))return;const S=document.createElement(\"link\");if(S.rel=y?\"stylesheet\":wI,y||(S.as=\"script\"),S.crossOrigin=\"\",S.href=v,f&&S.setAttribute(\"nonce\",f),document.head.appendChild(S),y)return new Promise((w,C)=>{S.addEventListener(\"load\",w),S.addEventListener(\"error\",()=>C(new Error(`Unable to preload CSS for ${v}`)))})}))}function s(u){const f=new Event(\"vite:preloadError\",{cancelable:!0});if(f.payload=u,window.dispatchEvent(f),!f.defaultPrevented)throw u}return o.then(u=>{for(const f of u||[])f.status===\"rejected\"&&s(f.reason);return t().catch(s)})};var ey,ER;function CI(){if(ER)return ey;ER=1;function e(t,n,a){return t===t&&(a!==void 0&&(t=t<=a?t:a),n!==void 0&&(t=t>=n?t:n)),t}return ey=e,ey}var ty,TR;function RI(){if(TR)return ty;TR=1;var e=CI(),t=t1();function n(a,o,s){return s===void 0&&(s=o,o=void 0),s!==void 0&&(s=t(s),s=s===s?s:0),o!==void 0&&(o=t(o),o=o===o?o:0),e(t(a),o,s)}return ty=n,ty}var EI=RI();const Ha=Ua(EI);var ny,MR;function TI(){if(MR)return ny;MR=1;var e=\"__lodash_hash_undefined__\";function t(n){return this.__data__.set(n,e),this}return ny=t,ny}var ry,kR;function MI(){if(kR)return ry;kR=1;function e(t){return this.__data__.has(t)}return ry=e,ry}var ay,_R;function D_(){if(_R)return ay;_R=1;var e=Xb(),t=TI(),n=MI();function a(o){var s=-1,c=o==null?0:o.length;for(this.__data__=new e;++s<c;)this.add(o[s])}return a.prototype.add=a.prototype.push=t,a.prototype.has=n,ay=a,ay}var iy,AR;function kI(){if(AR)return iy;AR=1;function e(t,n,a,o){for(var s=t.length,c=a+(o?1:-1);o?c--:++c<s;)if(n(t[c],c,t))return c;return-1}return iy=e,iy}var oy,NR;function _I(){if(NR)return oy;NR=1;function e(t){return t!==t}return oy=e,oy}var sy,OR;function AI(){if(OR)return sy;OR=1;function e(t,n,a){for(var o=a-1,s=t.length;++o<s;)if(t[o]===n)return o;return-1}return sy=e,sy}var ly,DR;function NI(){if(DR)return ly;DR=1;var e=kI(),t=_I(),n=AI();function a(o,s,c){return s===s?n(o,s,c):e(o,t,c)}return ly=a,ly}var cy,jR;function OI(){if(jR)return cy;jR=1;var e=NI();function t(n,a){var o=n==null?0:n.length;return!!o&&e(n,a,0)>-1}return cy=t,cy}var uy,zR;function DI(){if(zR)return uy;zR=1;function e(t,n,a){for(var o=-1,s=t==null?0:t.length;++o<s;)if(a(n,t[o]))return!0;return!1}return uy=e,uy}var dy,PR;function j_(){if(PR)return dy;PR=1;function e(t,n){return t.has(n)}return dy=e,dy}var fy,LR;function z_(){if(LR)return fy;LR=1;var e=cl(),t=vi(),n=e(t,\"Set\");return fy=n,fy}var hy,IR;function jI(){if(IR)return hy;IR=1;function e(){}return hy=e,hy}var my,HR;function m1(){if(HR)return my;HR=1;function e(t){var n=-1,a=Array(t.size);return t.forEach(function(o){a[++n]=o}),a}return my=e,my}var py,qR;function zI(){if(qR)return py;qR=1;var e=z_(),t=jI(),n=m1(),a=1/0,o=e&&1/n(new e([,-0]))[1]==a?function(s){return new e(s)}:t;return py=o,py}var gy,FR;function PI(){if(FR)return gy;FR=1;var e=D_(),t=OI(),n=DI(),a=j_(),o=zI(),s=m1(),c=200;function u(f,h,v){var y=-1,x=t,S=f.length,w=!0,C=[],R=C;if(v)w=!1,x=n;else if(S>=c){var k=h?null:o(f);if(k)return s(k);w=!1,x=a,R=new e}else R=h?[]:C;e:for(;++y<S;){var T=f[y],M=h?h(T):T;if(T=v||T!==0?T:0,w&&M===M){for(var j=R.length;j--;)if(R[j]===M)continue e;h&&R.push(M),C.push(T)}else x(R,M,v)||(R!==C&&R.push(M),C.push(T))}return C}return gy=u,gy}var vy,$R;function LI(){if($R)return vy;$R=1;var e=PI();function t(n){return n&&n.length?e(n):[]}return vy=t,vy}var II=LI();const HI=Ua(II);var yy,BR;function P_(){if(BR)return yy;BR=1;function e(t,n){for(var a=-1,o=n.length,s=t.length;++a<o;)t[s+a]=n[a];return t}return yy=e,yy}var by,UR;function qI(){if(UR)return by;UR=1;var e=Td(),t=Qb(),n=gi(),a=e?e.isConcatSpreadable:void 0;function o(s){return n(s)||t(s)||!!(a&&s&&s[a])}return by=o,by}var xy,VR;function FI(){if(VR)return xy;VR=1;var e=P_(),t=qI();function n(a,o,s,c,u){var f=-1,h=a.length;for(s||(s=t),u||(u=[]);++f<h;){var v=a[f];o>0&&s(v)?o>1?n(v,o-1,s,c,u):e(u,v):c||(u[u.length]=v)}return u}return xy=n,xy}var wy,WR;function $I(){if(WR)return wy;WR=1;var e=FI();function t(n){var a=n==null?0:n.length;return a?e(n,1):[]}return wy=t,wy}var BI=$I();const GR=Ua(BI);var Sy,YR;function UI(){if(YR)return Sy;YR=1;var e=Math.ceil,t=Math.max;function n(a,o,s,c){for(var u=-1,f=t(e((o-a)/(s||1)),0),h=Array(f);f--;)h[c?f:++u]=a,a+=s;return h}return Sy=n,Sy}var Cy,XR;function p1(){if(XR)return Cy;XR=1;var e=Vk(),t=Zb();function n(a){return a!=null&&t(a.length)&&!e(a)}return Cy=n,Cy}var Ry,QR;function VI(){if(QR)return Ry;QR=1;var e=Gb(),t=p1(),n=Kb(),a=ll();function o(s,c,u){if(!a(u))return!1;var f=typeof c;return(f==\"number\"?t(u)&&n(c,u.length):f==\"string\"&&c in u)?e(u[c],s):!1}return Ry=o,Ry}var Ey,KR;function WI(){if(KR)return Ey;KR=1;var e=t1(),t=1/0,n=17976931348623157e292;function a(o){if(!o)return o===0?o:0;if(o=e(o),o===t||o===-t){var s=o<0?-1:1;return s*n}return o===o?o:0}return Ey=a,Ey}var Ty,ZR;function GI(){if(ZR)return Ty;ZR=1;var e=UI(),t=VI(),n=WI();function a(o){return function(s,c,u){return u&&typeof u!=\"number\"&&t(s,c,u)&&(c=u=void 0),s=n(s),c===void 0?(c=s,s=0):c=n(c),u=u===void 0?s<c?1:-1:n(u),e(s,c,u,o)}}return Ty=a,Ty}var My,JR;function YI(){if(JR)return My;JR=1;var e=GI(),t=e();return My=t,My}var XI=YI();const Xs=Ua(XI),un='<svg width=\"20\" height=\"20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">',QI=e=>{const t=e.fgColor,n=e.bgColor;return`\n ${un}<rect x=\"2\" y=\"2\" width=\"16\" height=\"16\" rx=\"2\" fill=\"${n}\"/><path d=\"M15.75 4h-1.5a.25.25 0 0 0-.177.074L9.308 8.838a3.75 3.75 0 1 0 1.854 1.854l1.155-1.157.967.322a.5.5 0 0 0 .65-.55l-.18-1.208.363-.363.727.331a.5.5 0 0 0 .69-.59l-.254-.904.647-.647A.25.25 0 0 0 16 5.75v-1.5a.25.25 0 0 0-.25-.25zM7.5 13.25a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0z\" fill=\"${t}\"/></svg>`},KI=e=>{const t=e.fgColor,n=e.bgColor;return`\n ${un}<rect x=\"2\" y=\"2\" width=\"16\" height=\"16\" rx=\"4\" fill=\"${n}\"/><path d=\"m12.223 13.314 3.052-2.826a.65.65 0 0 0 0-.984l-3.052-2.822c-.27-.25-.634-.242-.865.022-.232.263-.206.636.056.882l2.601 2.41-2.601 2.41c-.262.245-.288.619-.056.882.231.263.595.277.865.026Zm-4.444.005c.266.25.634.241.866-.027.231-.263.206-.636-.06-.882L5.983 10l2.602-2.405c.266-.25.291-.62.06-.887-.232-.263-.596-.272-.866-.022L4.723 9.51a.653.653 0 0 0 0 .983l3.056 2.827Z\" fill=\"${t}\"/></svg>`},ZI=e=>{const t=e.fgColor,n=e.bgColor;return`${un}\n <path d=\"M16.22 2H3.78C2.8 2 2 2.8 2 3.78v12.44C2 17.2 2.8 18 3.78 18h12.44c.98 0 1.77-.8 1.77-1.78L18 3.78C18 2.8 17.2 2 16.22 2z\" fill=\"${n}\"/>\n <path d=\"M6.52 12.78H5.51V8.74l-1.33.47v-.87l2.29-.83h.05v5.27zm5.2 0H8.15v-.69l1.7-1.83a6.38 6.38 0 0 0 .34-.4c.09-.11.16-.22.22-.32s.1-.19.12-.27a.9.9 0 0 0 0-.56.63.63 0 0 0-.15-.23.58.58 0 0 0-.22-.15.75.75 0 0 0-.29-.05c-.27 0-.48.08-.62.23a.95.95 0 0 0-.2.65H8.03c0-.24.04-.46.13-.67a1.67 1.67 0 0 1 .97-.91c.23-.1.49-.14.77-.14.26 0 .5.04.7.11.21.08.38.18.52.32.14.13.25.3.32.48a1.74 1.74 0 0 1 .03 1.13 2.05 2.05 0 0 1-.24.47 4.16 4.16 0 0 1-.35.47l-.47.5-1 1.05h2.32v.8zm1.8-3.08h.55c.28 0 .48-.06.61-.2a.76.76 0 0 0 .2-.55.8.8 0 0 0-.05-.28.56.56 0 0 0-.13-.22.6.6 0 0 0-.23-.15.93.93 0 0 0-.32-.05.92.92 0 0 0-.29.05.72.72 0 0 0-.23.12.57.57 0 0 0-.21.46H12.4a1.3 1.3 0 0 1 .5-1.04c.15-.13.33-.23.54-.3a2.48 2.48 0 0 1 1.4 0c.2.06.4.15.55.28.15.13.27.28.36.47.08.19.13.4.13.65a1.15 1.15 0 0 1-.2.65 1.36 1.36 0 0 1-.58.49c.15.05.28.12.38.2a1.14 1.14 0 0 1 .43.62c.03.13.05.26.05.4 0 .25-.05.47-.14.66a1.42 1.42 0 0 1-.4.49c-.16.13-.35.23-.58.3a2.51 2.51 0 0 1-.73.1c-.22 0-.44-.03-.65-.09a1.8 1.8 0 0 1-.57-.28 1.43 1.43 0 0 1-.4-.47 1.41 1.41 0 0 1-.15-.66h1a.66.66 0 0 0 .22.5.87.87 0 0 0 .58.2c.25 0 .45-.07.6-.2a.71.71 0 0 0 .21-.56.97.97 0 0 0-.06-.36.61.61 0 0 0-.18-.25.74.74 0 0 0-.28-.15 1.33 1.33 0 0 0-.37-.04h-.55V9.7z\" fill=\"${t}\"/>\n </svg>`},JI=e=>{const t=e.fgColor,n=e.bgColor;return`${un}\n <path d=\"M16.222 2H3.778C2.8 2 2 2.8 2 3.778v12.444C2 17.2 2.8 18 3.778 18h12.444c.978 0 1.77-.8 1.77-1.778L18 3.778C18 2.8 17.2 2 16.222 2z\" fill=\"${n}\"/>\n <path d=\"M8.182 12.4h3.636l.655 1.6H14l-3.454-8H9.455L6 14h1.527l.655-1.6zM10 7.44l1.36 3.651H8.64L10 7.441z\" fill=\"${t}\"/>\n</svg>`},eH=e=>{const t=e.fgColor,n=e.bgColor;return`${un}\n <path\n d=\"M16.2222 2H3.77778C2.8 2 2 2.8 2 3.77778V16.2222C2 17.2 2.8 18 3.77778 18H16.2222C17.2 18 17.9911 17.2 17.9911 16.2222L18 3.77778C18 2.8 17.2 2 16.2222 2Z\"\n fill=\"${n}\"\n />\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M7.66667 6.66669C5.73368 6.66669 4.16667 8.15907 4.16667 10C4.16667 11.841 5.73368 13.3334 7.66667 13.3334H12.3333C14.2663 13.3334 15.8333 11.841 15.8333 10C15.8333 8.15907 14.2663 6.66669 12.3333 6.66669H7.66667ZM12.5 12.5C13.8807 12.5 15 11.3807 15 10C15 8.61931 13.8807 7.50002 12.5 7.50002C11.1193 7.50002 10 8.61931 10 10C10 11.3807 11.1193 12.5 12.5 12.5Z\"\n fill=\"${t}\"\n />\n</svg>`},L_=e=>{const t=e.fgColor,n=e.bgColor;return`${un}\n<path d=\"M16.222 2H3.778C2.8 2 2 2.8 2 3.778v12.444C2 17.2 2.8 18 3.778 18h12.444c.978 0 1.77-.8 1.77-1.778L18 3.778C18 2.8 17.2 2 16.222 2z\" fill=\"${n}\"/>\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M10.29 4.947a3.368 3.368 0 014.723.04 3.375 3.375 0 01.041 4.729l-.009.009-1.596 1.597a3.367 3.367 0 01-5.081-.364.71.71 0 011.136-.85 1.95 1.95 0 002.942.21l1.591-1.593a1.954 1.954 0 00-.027-2.733 1.95 1.95 0 00-2.732-.027l-.91.907a.709.709 0 11-1.001-1.007l.915-.911.007-.007z\" fill=\"${t}\"/>\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M6.55 8.678a3.368 3.368 0 015.082.364.71.71 0 01-1.136.85 1.95 1.95 0 00-2.942-.21l-1.591 1.593a1.954 1.954 0 00.027 2.733 1.95 1.95 0 002.73.028l.906-.906a.709.709 0 111.003 1.004l-.91.91-.008.01a3.368 3.368 0 01-4.724-.042 3.375 3.375 0 01-.041-4.728l.009-.009L6.55 8.678z\" fill=\"${t}\"/>\n</svg>\n `},tH=e=>{const t=e.bgColor;return`${un}\n <path stroke=\"${t}\" stroke-width=\"2\" d=\"M12 3v14\"/>\n <path stroke=\"${t}\" stroke-width=\"2\" stroke-linecap=\"round\" d=\"M10 4h4m-4 12h4\"/>\n <path d=\"M11 14h4a3 3 0 0 0 3-3V9a3 3 0 0 0-3-3h-4v2h4a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1h-4v2ZM9.5 8H5a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h4.5v2H5a3 3 0 0 1-3-3V9a3 3 0 0 1 3-3h4.5v2Z\" fill=\"${t}\"/>\n </svg>\n`},nH=L_,rH=e=>{const t=e.fgColor,n=e.bgColor;return`${un}\n <path d=\"M16.222 2H3.778C2.8 2 2 2.8 2 3.778v12.444C2 17.2 2.8 18 3.778 18h12.444c.978 0 1.77-.8 1.77-1.778L18 3.778C18 2.8 17.2 2 16.222 2z\" fill=\"${n}\"/>\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M7 13.138a.5.5 0 00.748.434l5.492-3.138a.5.5 0 000-.868L7.748 6.427A.5.5 0 007 6.862v6.276z\" fill=\"${t}\"/>\n</svg>`},aH=e=>{const t=e.fgColor,n=e.bgColor;return`\n ${un}\n <path d=\"M10 5a5 5 0 1 0 0 10 5 5 0 0 0 0-10zm0 9.17A4.17 4.17 0 0 1 5.83 10 4.17 4.17 0 0 1 10 5.83 4.17 4.17 0 0 1 14.17 10 4.17 4.17 0 0 1 10 14.17z\" fill=\"${t}\"/>\n <path d=\"M8.33 8.21a.83.83 0 1 0-.03 1.67.83.83 0 0 0 .03-1.67zm3.34 0a.83.83 0 1 0-.04 1.67.83.83 0 0 0 .04-1.67z\" fill=\"${t}\"/>\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M14.53 13.9a2.82 2.82 0 0 1-5.06 0l.77-.38a1.97 1.97 0 0 0 3.52 0l.77.39z\" fill=\"${t}\"/>\n <path d=\"M16.22 2H3.78C2.8 2 2 2.8 2 3.78v12.44C2 17.2 2.8 18 3.78 18h12.44c.98 0 1.77-.8 1.77-1.78L18 3.78C18 2.8 17.2 2 16.22 2z\" fill=\"${n}\"/>\n <path d=\"M10 4a6 6 0 1 0 0 12 6 6 0 0 0 0-12zm0 11a5 5 0 1 1 .01-10.01A5 5 0 0 1 10 15z\" fill=\"${t}\"/>\n <path d=\"M8 7.86a1 1 0 1 0-.04 2 1 1 0 0 0 .04-2zm4 0a1 1 0 1 0-.04 2 1 1 0 0 0 .04-2z\" fill=\"${t}\"/>\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M12.53 11.9a2.82 2.82 0 0 1-5.06 0l.77-.38a1.97 1.97 0 0 0 3.52 0l.77.39z\" fill=\"${t}\"/>\n </svg>`},iH=e=>{const t=e.fgColor,n=e.bgColor;return`${un}\n <path d=\"M16.222 2H3.778C2.8 2 2 2.8 2 3.778v12.444C2 17.2 2.8 18 3.778 18h12.444c.978 0 1.77-.8 1.77-1.778L18 3.778C18 2.8 17.2 2 16.222 2z\" fill=\"${n}\"/>\n <path opacity=\".5\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M12.499 10.801a.5.5 0 01.835 0l2.698 4.098a.5.5 0 01-.418.775H10.22a.5.5 0 01-.417-.775l2.697-4.098z\" fill=\"${t}\"/>\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M8.07 8.934a.5.5 0 01.824 0l4.08 5.958a.5.5 0 01-.412.782h-8.16a.5.5 0 01-.413-.782l4.08-5.958zM13.75 8.333a2.083 2.083 0 100-4.166 2.083 2.083 0 000 4.166z\" fill=\"${t}\"/>\n</svg>`},oH=e=>{const t=e.fgColor,n=e.bgColor;return`\n ${un}\n <path fill=\"${t}\" d=\"M3 3h14v14H3z\"/>\n <path d=\"M16.22 2H3.78C2.8 2 2 2.8 2 3.78v12.44C2 17.2 2.8 18 3.78 18h12.44c.98 0 1.77-.8 1.77-1.78L18 3.78C18 2.8 17.2 2 16.22 2zm-7.24 9.78h1.23c.15 0 .27.06.36.18l.98 1.28a.43.43 0 0 1-.05.58l-1.2 1.21a.45.45 0 0 1-.6.04A6.72 6.72 0 0 1 7.33 10c0-.61.1-1.2.25-1.78a6.68 6.68 0 0 1 2.12-3.3.44.44 0 0 1 .6.04l1.2 1.2c.16.17.18.42.05.59l-.98 1.29a.43.43 0 0 1-.36.17H8.98A5.38 5.38 0 0 0 8.67 10c0 .62.11 1.23.3 1.79z\" fill=\"${n}\"/>\n </svg>`},sH=e=>{const t=e.fgColor,n=e.bgColor;return`\n ${un}\n <path d=\"M16.22 2H3.78C2.8 2 2 2.8 2 3.78v12.44C2 17.2 2.8 18 3.78 18h12.44c.98 0 1.77-.8 1.77-1.78L18 3.78C18 2.8 17.2 2 16.22 2z\" fill=\"${n}\"/>\n <path d=\"m13.49 13.15-2.32-3.27h1.4V7h1.86v2.88h1.4l-2.34 3.27zM11 13H9v-3l-1.5 1.92L6 10v3H4V7h2l1.5 2L9 7h2v6z\" fill=\"${t}\"/>\n </svg>`},lH=e=>{const t=e.fgColor,n=e.bgColor;return`${un}\n <path d=\"M16.222 2H3.778C2.8 2 2 2.8 2 3.778v12.444C2 17.2 2.8 18 3.778 18h12.444c.978 0 1.77-.8 1.77-1.778L18 3.778C18 2.8 17.2 2 16.222 2z\" fill=\"${n}\"/>\n <path d=\"M14.8 4.182h-.6V3H13v1.182H7V3H5.8v1.182h-.6c-.66 0-1.2.532-1.2 1.182v9.454C4 15.468 4.54 16 5.2 16h9.6c.66 0 1.2-.532 1.2-1.182V5.364c0-.65-.54-1.182-1.2-1.182zm0 10.636H5.2V7.136h9.6v7.682z\" fill=\"${t}\"/>\n</svg>`},cH=e=>{const t=e.fgColor,n=e.bgColor;return`\n ${un}\n <path d=\"M16.22 2H3.78C2.8 2 2 2.8 2 3.78v12.44C2 17.2 2.8 18 3.78 18h12.44c.98 0 1.77-.8 1.77-1.78L18 3.78C18 2.8 17.2 2 16.22 2z\" fill=\"${n}\"/>\n <path d=\"M10 4a6 6 0 0 0-6 6 6 6 0 0 0 6 6 6 6 0 0 0 6-6 6 6 0 0 0-6-6zm0 10.8A4.8 4.8 0 0 1 5.2 10a4.8 4.8 0 1 1 4.8 4.8z\" fill=\"${t}\"/>\n <path d=\"M10 7H9v3.93L12.5 13l.5-.8-3-1.76V7z\" fill=\"${t}\"/>\n </svg>`},uH=e=>{const t=e.fgColor,n=e.bgColor;return`${un}\n <rect x=\"2\" y=\"2\" width=\"16\" height=\"16\" rx=\"2\" fill=\"${n}\"/>\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M10 8.643a1.357 1.357 0 100 2.714 1.357 1.357 0 000-2.714zM7.357 10a2.643 2.643 0 115.286 0 2.643 2.643 0 01-5.286 0z\" fill=\"${t}\"/>\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M7.589 4.898A5.643 5.643 0 0115.643 10v.5a2.143 2.143 0 01-4.286 0V8a.643.643 0 011.286 0v2.5a.857.857 0 001.714 0V10a4.357 4.357 0 10-1.708 3.46.643.643 0 01.782 1.02 5.643 5.643 0 11-5.842-9.582z\" fill=\"${t}\"/>\n</svg>`},dH=e=>{const t=e.fgColor,n=e.bgColor;return`\n ${un}\n <rect x=\"2\" y=\"8\" width=\"10\" height=\"8\" rx=\"2\" fill=\"${n}\"/>\n <rect x=\"8\" y=\"4\" width=\"10\" height=\"8\" rx=\"2\" fill=\"${n}\"/>\n <path d=\"M10.68 7.73V6l2.97 3.02-2.97 3.02v-1.77c-2.13 0-3.62.7-4.68 2.2.43-2.15 1.7-4.31 4.68-4.74z\" fill=\"${t}\"/>\n </svg>`},fH=e=>{const t=e.fgColor,n=e.bgColor;return`${un}\n <path fill=\"${t}\" d=\"M4 3h12v14H4z\"/>\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M3.6 2A1.6 1.6 0 002 3.6v12.8A1.6 1.6 0 003.6 18h12.8a1.6 1.6 0 001.6-1.6V3.6A1.6 1.6 0 0016.4 2H3.6zm11.3 10.8a.7.7 0 01.7.7v1.4a.7.7 0 01-.7.7h-1.4a.7.7 0 01-.7-.7v-1.4a.7.7 0 01.6-.693.117.117 0 00.1-.115V10.35a.117.117 0 00-.117-.116h-2.8a.117.117 0 00-.117.116v2.333c0 .064.053.117.117.117h.117a.7.7 0 01.7.7v1.4a.7.7 0 01-.7.7H9.3a.7.7 0 01-.7-.7v-1.4a.7.7 0 01.7-.7h.117a.117.117 0 00.117-.117V10.35a.117.117 0 00-.117-.117h-2.8a.117.117 0 00-.117.117v2.342c0 .058.042.106.1.115a.7.7 0 01.6.693v1.4a.7.7 0 01-.7.7H5.1a.7.7 0 01-.7-.7v-1.4a.7.7 0 01.7-.7h.35a.116.116 0 00.116-.117v-2.45c0-.515.418-.933.934-.933h2.917a.117.117 0 00.117-.117V6.85a.117.117 0 00-.117-.116h-2.45a.7.7 0 01-.7-.7V5.1a.7.7 0 01.7-.7h6.067a.7.7 0 01.7.7v.934a.7.7 0 01-.7.7h-2.45a.117.117 0 00-.118.116v2.333c0 .064.053.117.117.117H13.5c.516 0 .934.418.934.934v2.45c0 .063.052.116.116.116h.35z\" fill=\"${n}\"/>\n</svg>`},hH=e=>{const t=e.fgColor,n=e.bgColor;return`\n ${un}\n <rect x=\"2\" y=\"2\" width=\"16\" height=\"16\" rx=\"2\" fill=\"${n}\"/>\n <path d=\"M9.98 13.33c.45 0 .74-.3.73-.75l-.01-.1-.16-1.67 1.45 1.05a.81.81 0 0 0 .5.18c.37 0 .72-.32.72-.76 0-.3-.17-.54-.49-.68l-1.63-.77 1.63-.77c.32-.14.49-.37.49-.67 0-.45-.34-.76-.71-.76a.81.81 0 0 0-.5.18l-1.47 1.03.16-1.74.01-.08c.01-.46-.27-.76-.72-.76-.46 0-.76.32-.75.76l.01.08.16 1.74-1.47-1.03a.77.77 0 0 0-.5-.18.74.74 0 0 0-.72.76c0 .3.17.53.49.67l1.63.77-1.62.77c-.32.14-.5.37-.5.68 0 .44.35.75.72.75a.78.78 0 0 0 .5-.17L9.4 10.8l-.16 1.68v.09c-.02.44.28.75.74.75z\" fill=\"${t}\"/>\n </svg>`},mH=e=>{const t=e.fgColor,n=e.bgColor;return`\n ${un}\n <rect x=\"2\" y=\"2\" width=\"16\" height=\"16\" rx=\"2\" fill=\"${n}\"/>\n <path d=\"M8 5.83H5.83a.83.83 0 0 0 0 1.67h1.69A4.55 4.55 0 0 1 8 5.83zm-.33 3.34H5.83a.83.83 0 0 0 0 1.66h2.72a4.57 4.57 0 0 1-.88-1.66zM5.83 12.5a.83.83 0 0 0 0 1.67h7.5a.83.83 0 1 0 0-1.67h-7.5zm8.8-2.9a3.02 3.02 0 0 0 .46-1.6c0-1.66-1.32-3-2.94-3C10.52 5 9.2 6.34 9.2 8s1.31 3 2.93 3c.58 0 1.11-.17 1.56-.47l2.04 2.08.93-.94-2.04-2.08zm-2.48.07c-.9 0-1.63-.75-1.63-1.67s.73-1.67 1.63-1.67c.9 0 1.63.75 1.63 1.67s-.73 1.67-1.63 1.67z\" fill=\"${t}\"/>\n </svg>`},pH=e=>{const t=e.fgColor,n=e.bgColor;return`${un}\n <rect x=\"2\" y=\"2\" width=\"16\" height=\"16\" rx=\"2\" fill=\"${n}\"/>\n <path d=\"M7.676 4.726V3l2.976 3.021-2.976 3.022v-1.77c-2.125 0-3.613.69-4.676 2.201.425-2.158 1.7-4.316 4.676-4.748zM10.182 14.4h3.636l.655 1.6H16l-3.454-8h-1.091L8 16h1.527l.655-1.6zM12 9.44l1.36 3.65h-2.72L12 9.44z\" fill=\"${t}\"/>\n</svg>`},gH=e=>{const t=e.fgColor,n=e.bgColor;return`${un}\n <rect x=\"2\" y=\"2\" width=\"16\" height=\"16\" rx=\"2\" fill=\"${n}\"/>\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M4.167 5.417a.833.833 0 100 1.666h4.166a.833.833 0 100-1.666H4.167z\" fill=\"${t}\"/>\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M7.083 4.167a.833.833 0 10-1.666 0v4.166a.833.833 0 101.666 0V4.167zM11.667 5.417a.833.833 0 100 1.666h4.166a.833.833 0 100-1.666h-4.166zM5.367 11.688a.833.833 0 00-1.179 1.179l2.947 2.946a.833.833 0 001.178-1.178l-2.946-2.947z\" fill=\"${t}\"/>\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M8.313 12.867a.833.833 0 10-1.178-1.179l-2.947 2.947a.833.833 0 101.179 1.178l2.946-2.946z\" fill=\"${t}\"/>\n <path d=\"M10.833 12.5c0-.46.373-.833.834-.833h4.166a.833.833 0 110 1.666h-4.166a.833.833 0 01-.834-.833zM10.833 15c0-.46.373-.833.834-.833h4.166a.833.833 0 110 1.666h-4.166a.833.833 0 01-.834-.833z\" fill=\"${t}\"/>\n</svg>`},vH=e=>{const t=e.fgColor,n=e.bgColor;return`\n ${un}\n <path d=\"M16.22 2H3.78C2.8 2 2 2.8 2 3.78v12.44C2 17.2 2.8 18 3.78 18h12.44c.98 0 1.77-.8 1.77-1.78L18 3.78C18 2.8 17.2 2 16.22 2z\" fill=\"${n}\"/>\n <path d=\"M10 8.84a1.16 1.16 0 1 0 0 2.32 1.16 1.16 0 0 0 0-2.32zm3.02 3.61a3.92 3.92 0 0 0 .78-3.28.49.49 0 1 0-.95.2c.19.87-.02 1.78-.58 2.47a2.92 2.92 0 1 1-4.13-4.08 2.94 2.94 0 0 1 2.43-.62.49.49 0 1 0 .17-.96 3.89 3.89 0 1 0 2.28 6.27zM10 4.17a5.84 5.84 0 0 0-5.44 7.93.49.49 0 1 0 .9-.35 4.86 4.86 0 1 1 2.5 2.67.49.49 0 1 0-.4.88c.76.35 1.6.54 2.44.53a5.83 5.83 0 0 0 0-11.66zm3.02 3.5a.7.7 0 1 0-1.4 0 .7.7 0 0 0 1.4 0zm-6.97 5.35a.7.7 0 1 1 0 1.4.7.7 0 0 1 0-1.4z\" fill=\"${t}\"/>\n </svg>`},yH=e=>{const t=e.fgColor,n=e.bgColor;return`${un}\n <rect x=\"2\" y=\"2\" width=\"16\" height=\"16\" rx=\"2\" fill=\"${n}\"/>\n <path d=\"M12.4 13.565c1.865-.545 3.645-2.083 3.645-4.396 0-1.514-.787-2.604-2.071-2.604C12.69 6.565 12 7.63 12 8.939c1.114.072 1.865.726 1.865 1.683 0 .933-.8 1.647-1.84 2.023l.375.92zM4 5h6v2H4zM4 9h5v2H4zM4 13h4v2H4z\" fill=\"${t}\"/>\n</svg>`},bH=e=>{const t=e.fgColor,n=e.bgColor;return`\n ${un}\n <rect x=\"2\" y=\"2\" width=\"16\" height=\"16\" rx=\"2\" fill=\"${n}\"/>\n <path d=\"M12.4 13.56c1.86-.54 3.65-2.08 3.65-4.4 0-1.5-.8-2.6-2.08-2.6S12 7.64 12 8.95c1.11.07 1.86.73 1.86 1.68 0 .94-.8 1.65-1.83 2.03l.37.91zM4 5h6v2H4zm0 4h5v2H4zm0 4h4v2H4z\" fill=\"${t}\"/>\n </svg>`},xH=e=>{const t=e.fgColor,n=e.bgColor;return`${un}\n <path d=\"M16.222 2H3.778C2.8 2 2 2.8 2 3.778v12.444C2 17.2 2.8 18 3.778 18h12.444c.978 0 1.77-.8 1.77-1.778L18 3.778C18 2.8 17.2 2 16.222 2z\" fill=\"${n}\"/>\n <path d=\"M10 7a1 1 0 100-2v2zm0 6a1 1 0 100 2v-2zm0-8H7v2h3V5zm-3 6h5V9H7v2zm5 2h-2v2h2v-2zm1-1a1 1 0 01-1 1v2a3 3 0 003-3h-2zm-1-1a1 1 0 011 1h2a3 3 0 00-3-3v2zM4 8a3 3 0 003 3V9a1 1 0 01-1-1H4zm3-3a3 3 0 00-3 3h2a1 1 0 011-1V5z\" fill=\"${t}\"/>\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M4.856 12.014a.5.5 0 00-.712.702L5.409 14l-1.265 1.284a.5.5 0 00.712.702l1.255-1.274 1.255 1.274a.5.5 0 00.712-.702L6.813 14l1.265-1.284a.5.5 0 00-.712-.702L6.11 13.288l-1.255-1.274zM12.856 4.014a.5.5 0 00-.712.702L13.409 6l-1.265 1.284a.5.5 0 10.712.702l1.255-1.274 1.255 1.274a.5.5 0 10.712-.702L14.813 6l1.265-1.284a.5.5 0 00-.712-.702L14.11 5.288l-1.255-1.274z\" fill=\"${t}\"/>\n</svg>`},wH=e=>{const t=e.fgColor,n=e.bgColor;return`${un}\n <rect x=\"2\" y=\"2\" width=\"16\" height=\"16\" rx=\"2\" fill=\"${n}\"/>\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M14.25 7.25a.75.75 0 000-1.5h-6.5a.75.75 0 100 1.5h6.5zM15 10a.75.75 0 01-.75.75h-6.5a.75.75 0 010-1.5h6.5A.75.75 0 0115 10zm-.75 4.25a.75.75 0 000-1.5h-6.5a.75.75 0 000 1.5h6.5zm-8.987-7a.75.75 0 100-1.5.75.75 0 000 1.5zm.75 2.75a.75.75 0 11-1.5 0 .75.75 0 011.5 0zm-.75 4.25a.75.75 0 100-1.5.75.75 0 000 1.5z\" fill=\"${t}\"/>\n</svg>`},SH=e=>{const t=e.fgColor;return`\n <svg width=\"18\" height=\"18\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M2 15v1h14v-2.5c0-.87-.44-1.55-.98-2.04a6.19 6.19 0 0 0-1.9-1.14 12.1 12.1 0 0 0-2.48-.67A4 4 0 1 0 5 6a4 4 0 0 0 2.36 3.65c-.82.13-1.7.36-2.48.67-.69.28-1.37.65-1.9 1.13A2.8 2.8 0 0 0 2 13.5V15z\" fill=\"${e.bgColor}\" stroke=\"${t}\" stroke-width=\"2\"/>\n </svg>`},CH=e=>{const t=e.fgColor;return`\n <svg width=\"18\" height=\"18\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M12.43 6.04v-.18a3.86 3.86 0 0 0-7.72 0v.18A2.15 2.15 0 0 0 3 8.14v5.72C3 15.04 3.96 16 5.14 16H12c1.18 0 2.14-.96 2.14-2.14V8.14c0-1.03-.73-1.9-1.71-2.1zM7.86 6v-.14a.71.71 0 1 1 1.43 0V6H7.86z\" fill=\"${e.bgColor}\" stroke=\"${t}\" stroke-width=\"2\"/>\n </svg>\n`},RH={headerRowID:QI,headerNumber:ZI,headerCode:KI,headerString:JI,headerBoolean:eH,headerAudioUri:nH,headerVideoUri:rH,headerEmoji:aH,headerImage:iH,headerUri:L_,headerPhone:oH,headerMarkdown:sH,headerDate:lH,headerTime:cH,headerEmail:uH,headerReference:dH,headerIfThenElse:fH,headerSingleValue:hH,headerLookup:mH,headerTextTemplate:pH,headerMath:gH,headerRollup:vH,headerJoinStrings:yH,headerSplitString:bH,headerGeoDistance:xH,headerArray:wH,rowOwnerOverlay:SH,protectedColumnOverlay:CH,renameIcon:tH};function EH(e,t){return e===\"normal\"?[t.bgIconHeader,t.fgIconHeader]:e===\"selected\"?[\"white\",t.accentColor]:[t.accentColor,t.bgHeader]}class TH{onSettled;spriteMap=new Map;headerIcons;inFlight=0;constructor(t,n){this.onSettled=n,this.headerIcons=t??{}}drawSprite(t,n,a,o,s,c,u,f=1){const[h,v]=EH(n,u),y=c*Math.ceil(window.devicePixelRatio),x=`${h}_${v}_${y}_${t}`;let S=this.spriteMap.get(x);if(S===void 0){const w=this.headerIcons[t];if(w===void 0)return;S=document.createElement(\"canvas\");const C=S.getContext(\"2d\");if(C===null)return;const R=new Image;R.src=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(w({fgColor:v,bgColor:h}))}`,this.spriteMap.set(x,S);const k=R.decode();if(k===void 0)return;this.inFlight++,k.then(()=>{C.drawImage(R,0,0,y,y)}).finally(()=>{this.inFlight--,this.inFlight===0&&this.onSettled()})}else f<1&&(a.globalAlpha=f),a.drawImage(S,0,0,y,y,o,s,c,c),f<1&&(a.globalAlpha=1)}}function I_(e){if(e.length===0)return;let t;for(const n of e)t=Math.min(t??n.y,n.y)}function mm(e,t,n,a,o,s,c,u,f){u=u??t;let h=t,v=e;const y=a-s;let x=!1;for(;h<n&&v<y;){const S=o(v);if(h+S>u&&f(h,v,S,!1,c&&v===a-1)===!0){x=!0;break}h+=S,v++}if(!x){h=n;for(let S=0;S<s;S++){v=a-1-S;const w=o(v);h-=w,f(h,v,w,!0,c&&v===a-1)}}}function hs(e,t,n,a,o,s){let c=0,u=0;const f=o+a;for(const h of e){const v=h.sticky?u:c+n;if(s(h,v,f,h.sticky?0:u,t)===!0)break;c+=h.width,u+=h.sticky?h.width:0}}function H_(e,t,n,a,o){let s=0,c=0;for(let u=0;u<e.length;u++){const f=e[u];let h=u+1,v=f.width;for(f.sticky&&(c+=v);h<e.length&&fd(e[h].group,f.group)&&e[h].sticky===e[u].sticky;){const C=e[h];v+=C.width,h++,u++,C.sticky&&(c+=C.width)}const y=f.sticky?0:n,x=s+y,S=f.sticky?0:Math.max(0,c-x),w=Math.min(v-S,t-(x+S));o([f.sourceIndex,e[h-1].sourceIndex],f.group??\"\",x+S,0,w,a),s+=v}}function q_(e,t,n,a,o,s,c){const[u,f]=e;let h,v;const y=c.find(x=>!x.sticky)?.sourceIndex??0;if(f>y){const x=Math.max(u,y);let S=t,w=a;for(let C=s.sourceIndex-1;C>=x;C--)S-=c[C].width,w+=c[C].width;for(let C=s.sourceIndex+1;C<=f;C++)w+=c[C].width;v={x:S,y:n,width:w,height:o}}if(y>u){const x=Math.min(f,y-1);let S=t,w=a;for(let C=s.sourceIndex-1;C>=u;C--)S-=c[C].width,w+=c[C].width;for(let C=s.sourceIndex+1;C<=x;C++)w+=c[C].width;h={x:S,y:n,width:w,height:o}}return[h,v]}function MH(e,t,n,a){if(a===\"any\")return F_(e,{x:t,y:n,width:1,height:1});if(a===\"vertical\"&&(t=e.x),a===\"horizontal\"&&(n=e.y),b_([t,n],e))return;const o=t-e.x,s=e.x+e.width-t,c=n-e.y+1,u=e.y+e.height-n,f=Math.min(a===\"vertical\"?Number.MAX_SAFE_INTEGER:o,a===\"vertical\"?Number.MAX_SAFE_INTEGER:s,a===\"horizontal\"?Number.MAX_SAFE_INTEGER:c,a===\"horizontal\"?Number.MAX_SAFE_INTEGER:u);return f===u?{x:e.x,y:e.y+e.height,width:e.width,height:n-e.y-e.height+1}:f===c?{x:e.x,y:n,width:e.width,height:e.y-n}:f===s?{x:e.x+e.width,y:e.y,width:t-e.x-e.width+1,height:e.height}:{x:t,y:e.y,width:e.x-t,height:e.height}}function Dh(e,t,n,a,o,s,c,u){return e<=o+c&&o<=e+n&&t<=s+u&&s<=t+a}function pm(e,t,n){return t>=e.x&&t<=e.x+e.width&&n>=e.y&&n<=e.y+e.height}function F_(e,t){const n=Math.min(e.x,t.x),a=Math.min(e.y,t.y),o=Math.max(e.x+e.width,t.x+t.width)-n,s=Math.max(e.y+e.height,t.y+t.height)-a;return{x:n,y:a,width:o,height:s}}function kH(e,t){return e.x<=t.x&&e.y<=t.y&&e.x+e.width>=t.x+t.width&&e.y+e.height>=t.y+t.height}function _H(e,t,n,a){if(e.x>t||e.y>n||e.x<0&&e.y<0&&e.x+e.width>t&&e.y+e.height>n)return;if(e.x>=0&&e.y>=0&&e.x+e.width<=t&&e.y+e.height<=n)return e;const o=-4,s=-4,c=t+4,u=n+4,f=o-e.x,h=e.x+e.width-c,v=s-e.y,y=e.y+e.height-u,x=f>0?e.x+Math.floor(f/a)*a:e.x,S=h>0?e.x+e.width-Math.floor(h/a)*a:e.x+e.width,w=v>0?e.y+Math.floor(v/a)*a:e.y,C=y>0?e.y+e.height-Math.floor(y/a)*a:e.y+e.height;return{x,y:w,width:S-x,height:C-w}}function AH(e,t,n,a,o){const[s,c,u,f]=t,[h,v,y,x]=o,{x:S,y:w,width:C,height:R}=e,k=[];if(C<=0||R<=0)return k;const T=S+C,M=w+R,j=S<s,I=w<c,P=S+C>u,A=w+R>f,q=S>=s&&S<u||T>s&&T<=u||S<s&&T>u,B=w>=c&&w<f||M>c&&M<=f||w<c&&M>f;if(q&&B){const N=Math.max(S,s),_=Math.max(w,c),z=Math.min(T,u),F=Math.min(M,f);k.push({rect:{x:N,y:_,width:z-N,height:F-_},clip:{x:h,y:v,width:y-h+1,height:x-v+1}})}if(j&&I){const N=S,_=w,z=Math.min(T,s),F=Math.min(M,c);k.push({rect:{x:N,y:_,width:z-N,height:F-_},clip:{x:0,y:0,width:h+1,height:v+1}})}if(I&&q){const N=Math.max(S,s),_=w,z=Math.min(T,u),F=Math.min(M,c);k.push({rect:{x:N,y:_,width:z-N,height:F-_},clip:{x:h,y:0,width:y-h+1,height:v+1}})}if(I&&P){const N=Math.max(S,u),_=w,z=T,F=Math.min(M,c);k.push({rect:{x:N,y:_,width:z-N,height:F-_},clip:{x:y,y:0,width:n-y+1,height:v+1}})}if(j&&B){const N=S,_=Math.max(w,c),z=Math.min(T,s),F=Math.min(M,f);k.push({rect:{x:N,y:_,width:z-N,height:F-_},clip:{x:0,y:v,width:h+1,height:x-v+1}})}if(P&&B){const N=Math.max(S,u),_=Math.max(w,c),z=T,F=Math.min(M,f);k.push({rect:{x:N,y:_,width:z-N,height:F-_},clip:{x:y,y:v,width:n-y+1,height:x-v+1}})}if(j&&A){const N=S,_=Math.max(w,f),z=Math.min(T,s),F=M;k.push({rect:{x:N,y:_,width:z-N,height:F-_},clip:{x:0,y:x,width:h+1,height:a-x+1}})}if(A&&q){const N=Math.max(S,s),_=Math.max(w,f),z=Math.min(T,u),F=M;k.push({rect:{x:N,y:_,width:z-N,height:F-_},clip:{x:h,y:x,width:y-h+1,height:a-x+1}})}if(P&&A){const N=Math.max(S,u),_=Math.max(w,f),z=T,F=M;k.push({rect:{x:N,y:_,width:z-N,height:F-_},clip:{x:y,y:x,width:n-y+1,height:a-x+1}})}return k}const NH={kind:Ie.Loading,allowOverlay:!1};function eE(e,t,n,a,o,s,c,u,f,h,v,y,x,S,w,C,R,k,T,M,j,I,P,A,q,B,V,N,_,z,F,O,$,W,U){let K=M?.size??Number.MAX_SAFE_INTEGER;const ie=performance.now();let L=z.baseFontFull;e.font=L;const X={ctx:e},Y=[0,0],re=R>0?dl(f,R,h):0;let Z,oe;const ne=I_(T);return hs(t,u,s,c,o,(me,Me,Fe,Ue,tt)=>{const Le=Math.max(0,Ue-Me),Ve=Me+Le,Je=o+1,jt=me.width-Le,xe=a-o-1;if(T.length>0){let Ge=!1;for(let Xe=0;Xe<T.length;Xe++){const Pe=T[Xe];if(Dh(Ve,Je,jt,xe,Pe.x,Pe.y,Pe.width,Pe.height)){Ge=!0;break}}if(!Ge)return}const G=()=>{e.save(),e.beginPath(),e.rect(Ve,Je,jt,xe),e.clip()},se=j.columns.hasIndex(me.sourceIndex),ge=y(me.group??\"\").overrideTheme,Ne=me.themeOverride===void 0&&ge===void 0?z:as(z,ge,me.themeOverride),Re=Ne.baseFontFull;Re!==L&&(L=Re,e.font=Re),G();let ze;return mm(tt,Fe,a,f,h,R,k,ne,(Ge,Xe,Pe,Mt,ut)=>{if(Xe<0||(Y[0]=me.sourceIndex,Y[1]=Xe,M!==void 0&&!M.has(Y)))return;if(T.length>0){let rt=!1;for(let Bt=0;Bt<T.length;Bt++){const Zt=T[Bt];if(Dh(Me,Ge,me.width,Pe,Zt.x,Zt.y,Zt.width,Zt.height)){rt=!0;break}}if(!rt)return}const lt=j.rows.hasIndex(Xe),xn=S.hasIndex(Xe),Nt=Xe<f?v(Y):NH;let Et=Me,mt=me.width,zt=!1,dn=!1;if(Nt.span!==void 0){const[rt,Bt]=Nt.span,Zt=`${Xe},${rt},${Bt},${me.sticky}`;if(oe===void 0&&(oe=new Set),oe.has(Zt)){K--;return}else{const Br=q_(Nt.span,Me,Ge,me.width,Pe,me,n),Vn=me.sticky?Br[0]:Br[1];if(!me.sticky&&Br[0]!==void 0&&(dn=!0),Vn!==void 0){Et=Vn.x,mt=Vn.width,oe.add(Zt),e.restore(),ze=void 0,e.save(),e.beginPath();const vr=Math.max(0,Ue-Vn.x);e.rect(Vn.x+vr,Ge,Vn.width-vr,Pe),Z===void 0&&(Z=[]),Z.push({x:Vn.x+vr,y:Ge,width:Vn.width-vr,height:Pe}),e.clip(),zt=!0}}}const sn=x?.(Xe),$r=ut&&me.trailingRowOptions?.themeOverride!==void 0?me.trailingRowOptions?.themeOverride:void 0,Rn=Nt.themeOverride===void 0&&sn===void 0&&$r===void 0?Ne:as(Ne,sn,$r,Nt.themeOverride);e.beginPath();const pr=iI(Y,Nt,j);let Pn=oI(Y,Nt,j,C);const Ar=Nt.span!==void 0&&j.columns.some(rt=>Nt.span!==void 0&&rt>=Nt.span[0]&&rt<=Nt.span[1]);pr&&!w&&C?Pn=0:pr&&C&&(Pn=Math.max(Pn,1)),Ar&&Pn++,pr||(lt&&Pn++,se&&!ut&&Pn++);const Nr=Nt.kind===Ie.Protected?Rn.bgCellMedium:Rn.bgCell;let Lt;if((Mt||Nr!==z.bgCell)&&(Lt=fa(Nr,Lt)),Pn>0||xn){xn&&(Lt=fa(Rn.bgHeader,Lt));for(let rt=0;rt<Pn;rt++)Lt=fa(Rn.accentLight,Lt)}else if(I!==void 0){for(const rt of I)if(rt[0]===me.sourceIndex&&rt[1]===Xe){Lt=fa(Rn.bgSearchResult,Lt);break}}if(P!==void 0)for(let rt=0;rt<P.length;rt++){const Bt=P[rt],Zt=Bt.range;Bt.style!==\"solid-outline\"&&Zt.x<=me.sourceIndex&&me.sourceIndex<Zt.x+Zt.width&&Zt.y<=Xe&&Xe<Zt.y+Zt.height&&(Lt=fa(Bt.color,Lt))}let St=!1;if(M!==void 0){const rt=Ge+1,Zt=(Mt?rt+Pe-1:Math.min(rt+Pe-1,a-re))-rt;(Zt!==Pe-1||Et+1<=Ue)&&(St=!0,e.save(),e.beginPath(),e.rect(Et+1,rt,mt-1,Zt),e.clip()),Lt=Lt===void 0?Rn.bgCell:fa(Lt,Rn.bgCell)}const Wt=me.sourceIndex===n.length-1,gr=Xe===f-1;Lt!==void 0&&(e.fillStyle=Lt,ze!==void 0&&(ze.fillStyle=Lt),M!==void 0?e.fillRect(Et+1,Ge+1,mt-(Wt?2:1),Pe-(gr?2:1)):e.fillRect(Et,Ge,mt,Pe)),Nt.style===\"faded\"&&(e.globalAlpha=.6);let Un;for(let rt=0;rt<B.length;rt++){const Bt=B[rt];if(Bt.item[0]===me.sourceIndex&&Bt.item[1]===Xe){Un=Bt;break}}if(mt>U&&!dn){const rt=Rn.baseFontFull;rt!==L&&(e.font=rt,L=rt),ze=$_(e,Nt,me.sourceIndex,Xe,Wt,gr,Et,Ge,mt,Pe,Pn>0,Rn,Lt??Rn.bgCell,A,q,Un?.hoverAmount??0,V,_,ie,N,ze,F,O,$,W)}return St&&e.restore(),Nt.style===\"faded\"&&(e.globalAlpha=1),K--,zt&&(e.restore(),ze?.deprep?.(X),ze=void 0,G(),L=Re,e.font=Re),K<=0}),e.restore(),K<=0}),Z}const zu=[0,0],Pu={x:0,y:0,width:0,height:0},ky=[void 0,()=>{}];let xb=!1;function OH(){xb=!0}function $_(e,t,n,a,o,s,c,u,f,h,v,y,x,S,w,C,R,k,T,M,j,I,P,A,q){let B,V;R!==void 0&&R[0][0]===n&&R[0][1]===a&&(B=R[1][0],V=R[1][1]);let N;zu[0]=n,zu[1]=a,Pu.x=c,Pu.y=u,Pu.width=f,Pu.height=h,ky[0]=P.getValue(zu),ky[1]=O=>P.setValue(zu,O),xb=!1;const _={ctx:e,theme:y,col:n,row:a,cell:t,rect:Pu,highlighted:v,cellFillColor:x,hoverAmount:C,frameTime:T,hoverX:B,drawState:ky,hoverY:V,imageLoader:S,spriteManager:w,hyperWrapping:k,overrideCursor:B!==void 0?q:void 0,requestAnimationFrame:OH},z=hI(_,t.lastUpdated,T,j,o,s),F=A(t);if(F!==void 0){j?.renderer!==F&&(j?.deprep?.(_),j=void 0);const O=F.drawPrep?.(_,j);M!==void 0&&!Zs(_.cell)?M(_,()=>F.draw(_,t)):F.draw(_,t),N=O===void 0?void 0:{deprep:O?.deprep,fillStyle:O?.fillStyle,font:O?.font,renderer:F}}return(z||xb)&&I?.(zu),N}function g1(e,t,n,a,o,s,c,u,f=-20,h=-20,v=32,y=\"center\",x=\"square\"){const S=Math.floor(o+c/2),w=x===\"circle\"?1e4:t.roundingRadius??4;let C=o_(v,c,t.cellVerticalPadding),R=C/2;const k=i_(y,a,s,t.cellHorizontalPadding,C),T=a_(k,S,C),M=s_(a+f,o+h,T);switch(n){case!0:{e.beginPath(),di(e,k-C/2,S-C/2,C,C,w),x===\"circle\"&&(R*=.8,C*=.8),e.fillStyle=u?t.accentColor:t.textMedium,e.fill(),e.beginPath(),e.moveTo(k-R+C/4.23,S-R+C/1.97),e.lineTo(k-R+C/2.42,S-R+C/1.44),e.lineTo(k-R+C/1.29,S-R+C/3.25),e.strokeStyle=t.bgCell,e.lineJoin=\"round\",e.lineCap=\"round\",e.lineWidth=1.9,e.stroke();break}case kh:case!1:{e.beginPath(),di(e,k-C/2+.5,S-C/2+.5,C-1,C-1,w),e.lineWidth=1,e.strokeStyle=M?t.textDark:t.textMedium,e.stroke();break}case Jb:{e.beginPath(),di(e,k-C/2,S-C/2,C,C,w),e.fillStyle=M?t.textMedium:t.textLight,e.fill(),x===\"circle\"&&(R*=.8,C*=.8),e.beginPath(),e.moveTo(k-C/3,S),e.lineTo(k+C/3,S),e.strokeStyle=t.bgCell,e.lineCap=\"round\",e.lineWidth=1.9,e.stroke();break}default:dd()}}function DH(e,t,n,a,o,s,c,u,f,h,v,y,x,S,w,C,R,k,T){const M=c+u;if(M<=0)return;e.fillStyle=y.bgHeader,e.fillRect(0,0,o,M);const[j,I]=a?.[0]??[],P=y.headerFontFull;e.font=P,hs(t,0,s,0,M,(A,q,B,V)=>{if(R!==void 0&&!R.has([A.sourceIndex,-1]))return;const N=Math.max(0,V-q);e.save(),e.beginPath(),e.rect(q+N,u,A.width-N,c),e.clip();const _=C(A.group??\"\").overrideTheme,z=A.themeOverride===void 0&&_===void 0?y:as(y,_,A.themeOverride);z.bgHeader!==y.bgHeader&&(e.fillStyle=z.bgHeader,e.fill()),z!==y&&(e.font=z.baseFontFull);const F=v.columns.hasIndex(A.sourceIndex),O=f!==void 0||h,$=!O&&I===-1&&j===A.sourceIndex,W=O?0:S.find(X=>X.item[0]===A.sourceIndex&&X.item[1]===-1)?.hoverAmount??0,U=v?.current!==void 0&&v.current.cell[0]===A.sourceIndex,K=F?z.accentColor:U?z.bgHeaderHasFocus:z.bgHeader,ie=n?u:0,L=A.sourceIndex===0?0:1;F?(e.fillStyle=K,e.fillRect(q+L,ie,A.width-L,c)):(U||W>0)&&(e.beginPath(),e.rect(q+L,ie,A.width-L,c),U&&(e.fillStyle=z.bgHeaderHasFocus,e.fill()),W>0&&(e.globalAlpha=W,e.fillStyle=z.bgHeaderHovered,e.fill(),e.globalAlpha=1)),V_(e,q,ie,A.width,c,A,F,z,$,U,W,x,k,T),e.restore()}),n&&jH(e,t,o,s,u,a,y,x,S,w,C,R)}function jH(e,t,n,a,o,s,c,u,f,h,v,y){const[S,w]=s?.[0]??[];let C=0;H_(t,n,a,o,(R,k,T,M,j,I)=>{if(y!==void 0&&!y.hasItemInRectangle({x:R[0],y:-2,width:R[1]-R[0]+1,height:1}))return;e.save(),e.beginPath(),e.rect(T,M,j,I),e.clip();const P=v(k),A=P?.overrideTheme===void 0?c:as(c,P.overrideTheme),q=w===-2&&S!==void 0&&S>=R[0]&&S<=R[1],B=q?A.bgHeaderHovered:A.bgHeader;if(B!==c.bgHeader&&(e.fillStyle=B,e.fill()),e.fillStyle=A.textGroupHeader??A.textHeader,P!==void 0){let V=T;if(P.icon!==void 0&&(u.drawSprite(P.icon,\"normal\",e,V+8,(o-20)/2,20,A),V+=26),e.fillText(P.name,V+8,o/2+fs(e,c.headerFontFull)),P.actions!==void 0&&q){const N=U_({x:T,y:M,width:j,height:I},P.actions);e.beginPath();const _=N[0].x-10,z=T+j-_;e.rect(_,0,z,o);const F=e.createLinearGradient(_,0,_+z,0),O=il(B,0);F.addColorStop(0,O),F.addColorStop(10/z,B),F.addColorStop(1,B),e.fillStyle=F,e.fill(),e.globalAlpha=.6;const[$,W]=s?.[1]??[-1,-1];for(let U=0;U<P.actions.length;U++){const K=P.actions[U],ie=N[U],L=pm(ie,$+T,W);L&&(e.globalAlpha=1),u.drawSprite(K.icon,\"normal\",e,ie.x+ie.width/2-10,ie.y+ie.height/2-10,20,A),L&&(e.globalAlpha=.6)}e.globalAlpha=1}}T!==0&&h(R[0])&&(e.beginPath(),e.moveTo(T+.5,0),e.lineTo(T+.5,o),e.strokeStyle=c.borderColor,e.lineWidth=1,e.stroke()),e.restore(),C=T+j}),e.beginPath(),e.moveTo(C+.5,0),e.lineTo(C+.5,o),e.moveTo(0,o+.5),e.lineTo(n,o+.5),e.strokeStyle=c.borderColor,e.lineWidth=1,e.stroke()}const ac=30;function B_(e,t,n,a,o){return o?{x:e,y:t,width:ac,height:Math.min(ac,a)}:{x:e+n-ac,y:Math.max(t,t+a/2-ac/2),width:ac,height:Math.min(ac,a)}}function U_(e,t){const n=[];let a=e.x+e.width-26*t.length;const o=e.y+e.height/2-13,s=26,c=26;for(let u=0;u<t.length;u++)n.push({x:a,y:o,width:c,height:s}),a+=26;return n}function tE(e,t,n,a,o,s,c,u,f,h,v,y,x,S){if(s.rowMarker!==void 0){const M=s.rowMarkerChecked;M!==!0&&(e.globalAlpha=h),g1(e,u,M,t,n,a,o,!1,void 0,void 0,18,\"center\",s.rowMarker),M!==!0&&(e.globalAlpha=1);return}const w=u.cellHorizontalPadding,C=c?u.textHeaderSelected:u.textHeader,R=s.hasMenu===!0&&(f||y&&c),k=x?-1:1;let T=x?t+a-w:t+w;if(s.icon!==void 0){let M=c?\"selected\":\"normal\";s.style===\"highlight\"&&(M=c?\"selected\":\"special\");const j=u.headerIconSize;v.drawSprite(s.icon,M,e,x?T-j:T,n+(o-j)/2,j,u),s.overlayIcon!==void 0&&v.drawSprite(s.overlayIcon,c?\"selected\":\"special\",e,x?T-j+9:T+9,n+((o-18)/2+6),18,u),T+=Math.ceil(j*1.3)*k}if(R&&s.hasMenu===!0&&a>35){const j=x?35:a-35,I=x?35*.7:a-35*.7,P=j/a,A=I/a,q=e.createLinearGradient(t,0,t+a,0),B=il(C,0);q.addColorStop(x?1:0,C),q.addColorStop(P,C),q.addColorStop(A,B),q.addColorStop(x?0:1,B),e.fillStyle=q}else e.fillStyle=C;if(x&&(e.textAlign=\"right\"),e.fillText(s.title,T,n+o/2+fs(e,u.headerFontFull)),x&&(e.textAlign=\"left\"),R&&s.hasMenu===!0)if(s.menuIcon===void 0||s.menuIcon===_h.Triangle){e.beginPath();const M=S.x+S.width/2-5.5,j=S.y+S.height/2-3;vI(e,[{x:M,y:j},{x:M+11,y:j},{x:M+5.5,y:j+6}],1),e.fillStyle=C,e.fill()}else if(s.menuIcon===_h.Dots){e.beginPath();const M=S.x+S.width/2,j=S.y+S.height/2;gI(e,M,j),e.fillStyle=C,e.fill()}else{const M=S.x+(S.width-u.headerIconSize)/2,j=S.y+(S.height-u.headerIconSize)/2;v.drawSprite(s.menuIcon,\"normal\",e,M,j,u.headerIconSize,u)}}function V_(e,t,n,a,o,s,c,u,f,h,v,y,x,S){const w=r1(s.title)===\"rtl\",C=B_(t,n,a,o,w);x!==void 0?x({ctx:e,theme:u,rect:{x:t,y:n,width:a,height:o},column:s,columnIndex:s.sourceIndex,isSelected:c,hoverAmount:v,isHovered:f,hasSelectedCell:h,spriteManager:y,menuBounds:C},()=>tE(e,t,n,a,o,s,c,u,f,v,y,S,w,C)):tE(e,t,n,a,o,s,c,u,f,v,y,S,w,C)}var _y,nE;function zH(){if(nE)return _y;nE=1;var e=cl(),t=(function(){try{var n=e(Object,\"defineProperty\");return n({},\"\",{}),n}catch{}})();return _y=t,_y}var Ay,rE;function PH(){if(rE)return Ay;rE=1;var e=zH();function t(n,a,o){a==\"__proto__\"&&e?e(n,a,{configurable:!0,enumerable:!0,value:o,writable:!0}):n[a]=o}return Ay=t,Ay}var Ny,aE;function LH(){if(aE)return Ny;aE=1;function e(t,n,a,o){for(var s=-1,c=t==null?0:t.length;++s<c;){var u=t[s];n(o,u,a(u),t)}return o}return Ny=e,Ny}var Oy,iE;function IH(){if(iE)return Oy;iE=1;function e(t){return function(n,a,o){for(var s=-1,c=Object(n),u=o(n),f=u.length;f--;){var h=u[t?f:++s];if(a(c[h],h,c)===!1)break}return n}}return Oy=e,Oy}var Dy,oE;function HH(){if(oE)return Dy;oE=1;var e=IH(),t=e();return Dy=t,Dy}var jy,sE;function qH(){if(sE)return jy;sE=1;function e(t,n){for(var a=-1,o=Array(t);++a<t;)o[a]=n(a);return o}return jy=e,jy}var Bu={exports:{}},zy,lE;function FH(){if(lE)return zy;lE=1;function e(){return!1}return zy=e,zy}Bu.exports;var cE;function W_(){return cE||(cE=1,(function(e,t){var n=vi(),a=FH(),o=t&&!t.nodeType&&t,s=o&&!0&&e&&!e.nodeType&&e,c=s&&s.exports===o,u=c?n.Buffer:void 0,f=u?u.isBuffer:void 0,h=f||a;e.exports=h})(Bu,Bu.exports)),Bu.exports}var Py,uE;function $H(){if(uE)return Py;uE=1;var e=Md(),t=Zb(),n=kd(),a=\"[object Arguments]\",o=\"[object Array]\",s=\"[object Boolean]\",c=\"[object Date]\",u=\"[object Error]\",f=\"[object Function]\",h=\"[object Map]\",v=\"[object Number]\",y=\"[object Object]\",x=\"[object RegExp]\",S=\"[object Set]\",w=\"[object String]\",C=\"[object WeakMap]\",R=\"[object ArrayBuffer]\",k=\"[object DataView]\",T=\"[object Float32Array]\",M=\"[object Float64Array]\",j=\"[object Int8Array]\",I=\"[object Int16Array]\",P=\"[object Int32Array]\",A=\"[object Uint8Array]\",q=\"[object Uint8ClampedArray]\",B=\"[object Uint16Array]\",V=\"[object Uint32Array]\",N={};N[T]=N[M]=N[j]=N[I]=N[P]=N[A]=N[q]=N[B]=N[V]=!0,N[a]=N[o]=N[R]=N[s]=N[k]=N[c]=N[u]=N[f]=N[h]=N[v]=N[y]=N[x]=N[S]=N[w]=N[C]=!1;function _(z){return n(z)&&t(z.length)&&!!N[e(z)]}return Py=_,Py}var Ly,dE;function BH(){if(dE)return Ly;dE=1;function e(t){return function(n){return t(n)}}return Ly=e,Ly}var Uu={exports:{}};Uu.exports;var fE;function UH(){return fE||(fE=1,(function(e,t){var n=Uk(),a=t&&!t.nodeType&&t,o=a&&!0&&e&&!e.nodeType&&e,s=o&&o.exports===a,c=s&&n.process,u=(function(){try{var f=o&&o.require&&o.require(\"util\").types;return f||c&&c.binding&&c.binding(\"util\")}catch{}})();e.exports=u})(Uu,Uu.exports)),Uu.exports}var Iy,hE;function G_(){if(hE)return Iy;hE=1;var e=$H(),t=BH(),n=UH(),a=n&&n.isTypedArray,o=a?t(a):e;return Iy=o,Iy}var Hy,mE;function VH(){if(mE)return Hy;mE=1;var e=qH(),t=Qb(),n=gi(),a=W_(),o=Kb(),s=G_(),c=Object.prototype,u=c.hasOwnProperty;function f(h,v){var y=n(h),x=!y&&t(h),S=!y&&!x&&a(h),w=!y&&!x&&!S&&s(h),C=y||x||S||w,R=C?e(h.length,String):[],k=R.length;for(var T in h)(v||u.call(h,T))&&!(C&&(T==\"length\"||S&&(T==\"offset\"||T==\"parent\")||w&&(T==\"buffer\"||T==\"byteLength\"||T==\"byteOffset\")||o(T,k)))&&R.push(T);return R}return Hy=f,Hy}var qy,pE;function WH(){if(pE)return qy;pE=1;var e=Object.prototype;function t(n){var a=n&&n.constructor,o=typeof a==\"function\"&&a.prototype||e;return n===o}return qy=t,qy}var Fy,gE;function GH(){if(gE)return Fy;gE=1;function e(t,n){return function(a){return t(n(a))}}return Fy=e,Fy}var $y,vE;function YH(){if(vE)return $y;vE=1;var e=GH(),t=e(Object.keys,Object);return $y=t,$y}var By,yE;function XH(){if(yE)return By;yE=1;var e=WH(),t=YH(),n=Object.prototype,a=n.hasOwnProperty;function o(s){if(!e(s))return t(s);var c=[];for(var u in Object(s))a.call(s,u)&&u!=\"constructor\"&&c.push(u);return c}return By=o,By}var Uy,bE;function v1(){if(bE)return Uy;bE=1;var e=VH(),t=XH(),n=p1();function a(o){return n(o)?e(o):t(o)}return Uy=a,Uy}var Vy,xE;function QH(){if(xE)return Vy;xE=1;var e=HH(),t=v1();function n(a,o){return a&&e(a,o,t)}return Vy=n,Vy}var Wy,wE;function KH(){if(wE)return Wy;wE=1;var e=p1();function t(n,a){return function(o,s){if(o==null)return o;if(!e(o))return n(o,s);for(var c=o.length,u=a?c:-1,f=Object(o);(a?u--:++u<c)&&s(f[u],u,f)!==!1;);return o}}return Wy=t,Wy}var Gy,SE;function ZH(){if(SE)return Gy;SE=1;var e=QH(),t=KH(),n=t(e);return Gy=n,Gy}var Yy,CE;function JH(){if(CE)return Yy;CE=1;var e=ZH();function t(n,a,o,s){return e(n,function(c,u,f){a(s,c,o(c),f)}),s}return Yy=t,Yy}var Xy,RE;function eq(){if(RE)return Xy;RE=1;var e=cm();function t(){this.__data__=new e,this.size=0}return Xy=t,Xy}var Qy,EE;function tq(){if(EE)return Qy;EE=1;function e(t){var n=this.__data__,a=n.delete(t);return this.size=n.size,a}return Qy=e,Qy}var Ky,TE;function nq(){if(TE)return Ky;TE=1;function e(t){return this.__data__.get(t)}return Ky=e,Ky}var Zy,ME;function rq(){if(ME)return Zy;ME=1;function e(t){return this.__data__.has(t)}return Zy=e,Zy}var Jy,kE;function aq(){if(kE)return Jy;kE=1;var e=cm(),t=Yb(),n=Xb(),a=200;function o(s,c){var u=this.__data__;if(u instanceof e){var f=u.__data__;if(!t||f.length<a-1)return f.push([s,c]),this.size=++u.size,this;u=this.__data__=new n(f)}return u.set(s,c),this.size=u.size,this}return Jy=o,Jy}var e0,_E;function Y_(){if(_E)return e0;_E=1;var e=cm(),t=eq(),n=tq(),a=nq(),o=rq(),s=aq();function c(u){var f=this.__data__=new e(u);this.size=f.size}return c.prototype.clear=t,c.prototype.delete=n,c.prototype.get=a,c.prototype.has=o,c.prototype.set=s,e0=c,e0}var t0,AE;function iq(){if(AE)return t0;AE=1;function e(t,n){for(var a=-1,o=t==null?0:t.length;++a<o;)if(n(t[a],a,t))return!0;return!1}return t0=e,t0}var n0,NE;function X_(){if(NE)return n0;NE=1;var e=D_(),t=iq(),n=j_(),a=1,o=2;function s(c,u,f,h,v,y){var x=f&a,S=c.length,w=u.length;if(S!=w&&!(x&&w>S))return!1;var C=y.get(c),R=y.get(u);if(C&&R)return C==u&&R==c;var k=-1,T=!0,M=f&o?new e:void 0;for(y.set(c,u),y.set(u,c);++k<S;){var j=c[k],I=u[k];if(h)var P=x?h(I,j,k,u,c,y):h(j,I,k,c,u,y);if(P!==void 0){if(P)continue;T=!1;break}if(M){if(!t(u,function(A,q){if(!n(M,q)&&(j===A||v(j,A,f,h,y)))return M.push(q)})){T=!1;break}}else if(!(j===I||v(j,I,f,h,y))){T=!1;break}}return y.delete(c),y.delete(u),T}return n0=s,n0}var r0,OE;function oq(){if(OE)return r0;OE=1;var e=vi(),t=e.Uint8Array;return r0=t,r0}var a0,DE;function sq(){if(DE)return a0;DE=1;function e(t){var n=-1,a=Array(t.size);return t.forEach(function(o,s){a[++n]=[s,o]}),a}return a0=e,a0}var i0,jE;function lq(){if(jE)return i0;jE=1;var e=Td(),t=oq(),n=Gb(),a=X_(),o=sq(),s=m1(),c=1,u=2,f=\"[object Boolean]\",h=\"[object Date]\",v=\"[object Error]\",y=\"[object Map]\",x=\"[object Number]\",S=\"[object RegExp]\",w=\"[object Set]\",C=\"[object String]\",R=\"[object Symbol]\",k=\"[object ArrayBuffer]\",T=\"[object DataView]\",M=e?e.prototype:void 0,j=M?M.valueOf:void 0;function I(P,A,q,B,V,N,_){switch(q){case T:if(P.byteLength!=A.byteLength||P.byteOffset!=A.byteOffset)return!1;P=P.buffer,A=A.buffer;case k:return!(P.byteLength!=A.byteLength||!N(new t(P),new t(A)));case f:case h:case x:return n(+P,+A);case v:return P.name==A.name&&P.message==A.message;case S:case C:return P==A+\"\";case y:var z=o;case w:var F=B&c;if(z||(z=s),P.size!=A.size&&!F)return!1;var O=_.get(P);if(O)return O==A;B|=u,_.set(P,A);var $=a(z(P),z(A),B,V,N,_);return _.delete(P),$;case R:if(j)return j.call(P)==j.call(A)}return!1}return i0=I,i0}var o0,zE;function cq(){if(zE)return o0;zE=1;var e=P_(),t=gi();function n(a,o,s){var c=o(a);return t(a)?c:e(c,s(a))}return o0=n,o0}var s0,PE;function uq(){if(PE)return s0;PE=1;function e(t,n){for(var a=-1,o=t==null?0:t.length,s=0,c=[];++a<o;){var u=t[a];n(u,a,t)&&(c[s++]=u)}return c}return s0=e,s0}var l0,LE;function dq(){if(LE)return l0;LE=1;function e(){return[]}return l0=e,l0}var c0,IE;function fq(){if(IE)return c0;IE=1;var e=uq(),t=dq(),n=Object.prototype,a=n.propertyIsEnumerable,o=Object.getOwnPropertySymbols,s=o?function(c){return c==null?[]:(c=Object(c),e(o(c),function(u){return a.call(c,u)}))}:t;return c0=s,c0}var u0,HE;function hq(){if(HE)return u0;HE=1;var e=cq(),t=fq(),n=v1();function a(o){return e(o,n,t)}return u0=a,u0}var d0,qE;function mq(){if(qE)return d0;qE=1;var e=hq(),t=1,n=Object.prototype,a=n.hasOwnProperty;function o(s,c,u,f,h,v){var y=u&t,x=e(s),S=x.length,w=e(c),C=w.length;if(S!=C&&!y)return!1;for(var R=S;R--;){var k=x[R];if(!(y?k in c:a.call(c,k)))return!1}var T=v.get(s),M=v.get(c);if(T&&M)return T==c&&M==s;var j=!0;v.set(s,c),v.set(c,s);for(var I=y;++R<S;){k=x[R];var P=s[k],A=c[k];if(f)var q=y?f(A,P,k,c,s,v):f(P,A,k,s,c,v);if(!(q===void 0?P===A||h(P,A,u,f,v):q)){j=!1;break}I||(I=k==\"constructor\")}if(j&&!I){var B=s.constructor,V=c.constructor;B!=V&&\"constructor\"in s&&\"constructor\"in c&&!(typeof B==\"function\"&&B instanceof B&&typeof V==\"function\"&&V instanceof V)&&(j=!1)}return v.delete(s),v.delete(c),j}return d0=o,d0}var f0,FE;function pq(){if(FE)return f0;FE=1;var e=cl(),t=vi(),n=e(t,\"DataView\");return f0=n,f0}var h0,$E;function gq(){if($E)return h0;$E=1;var e=cl(),t=vi(),n=e(t,\"Promise\");return h0=n,h0}var m0,BE;function vq(){if(BE)return m0;BE=1;var e=cl(),t=vi(),n=e(t,\"WeakMap\");return m0=n,m0}var p0,UE;function yq(){if(UE)return p0;UE=1;var e=pq(),t=Yb(),n=gq(),a=z_(),o=vq(),s=Md(),c=Wk(),u=\"[object Map]\",f=\"[object Object]\",h=\"[object Promise]\",v=\"[object Set]\",y=\"[object WeakMap]\",x=\"[object DataView]\",S=c(e),w=c(t),C=c(n),R=c(a),k=c(o),T=s;return(e&&T(new e(new ArrayBuffer(1)))!=x||t&&T(new t)!=u||n&&T(n.resolve())!=h||a&&T(new a)!=v||o&&T(new o)!=y)&&(T=function(M){var j=s(M),I=j==f?M.constructor:void 0,P=I?c(I):\"\";if(P)switch(P){case S:return x;case w:return u;case C:return h;case R:return v;case k:return y}return j}),p0=T,p0}var g0,VE;function bq(){if(VE)return g0;VE=1;var e=Y_(),t=X_(),n=lq(),a=mq(),o=yq(),s=gi(),c=W_(),u=G_(),f=1,h=\"[object Arguments]\",v=\"[object Array]\",y=\"[object Object]\",x=Object.prototype,S=x.hasOwnProperty;function w(C,R,k,T,M,j){var I=s(C),P=s(R),A=I?v:o(C),q=P?v:o(R);A=A==h?y:A,q=q==h?y:q;var B=A==y,V=q==y,N=A==q;if(N&&c(C)){if(!c(R))return!1;I=!0,B=!1}if(N&&!B)return j||(j=new e),I||u(C)?t(C,R,k,T,M,j):n(C,R,A,k,T,M,j);if(!(k&f)){var _=B&&S.call(C,\"__wrapped__\"),z=V&&S.call(R,\"__wrapped__\");if(_||z){var F=_?C.value():C,O=z?R.value():R;return j||(j=new e),M(F,O,k,T,j)}}return N?(j||(j=new e),a(C,R,k,T,M,j)):!1}return g0=w,g0}var v0,WE;function Q_(){if(WE)return v0;WE=1;var e=bq(),t=kd();function n(a,o,s,c,u){return a===o?!0:a==null||o==null||!t(a)&&!t(o)?a!==a&&o!==o:e(a,o,s,c,n,u)}return v0=n,v0}var y0,GE;function xq(){if(GE)return y0;GE=1;var e=Y_(),t=Q_(),n=1,a=2;function o(s,c,u,f){var h=u.length,v=h,y=!f;if(s==null)return!v;for(s=Object(s);h--;){var x=u[h];if(y&&x[2]?x[1]!==s[x[0]]:!(x[0]in s))return!1}for(;++h<v;){x=u[h];var S=x[0],w=s[S],C=x[1];if(y&&x[2]){if(w===void 0&&!(S in s))return!1}else{var R=new e;if(f)var k=f(w,C,S,s,c,R);if(!(k===void 0?t(C,w,n|a,f,R):k))return!1}}return!0}return y0=o,y0}var b0,YE;function K_(){if(YE)return b0;YE=1;var e=ll();function t(n){return n===n&&!e(n)}return b0=t,b0}var x0,XE;function wq(){if(XE)return x0;XE=1;var e=K_(),t=v1();function n(a){for(var o=t(a),s=o.length;s--;){var c=o[s],u=a[c];o[s]=[c,u,e(u)]}return o}return x0=n,x0}var w0,QE;function Z_(){if(QE)return w0;QE=1;function e(t,n){return function(a){return a==null?!1:a[t]===n&&(n!==void 0||t in Object(a))}}return w0=e,w0}var S0,KE;function Sq(){if(KE)return S0;KE=1;var e=xq(),t=wq(),n=Z_();function a(o){var s=t(o);return s.length==1&&s[0][2]?n(s[0][0],s[0][1]):function(c){return c===o||e(c,o,s)}}return S0=a,S0}var C0,ZE;function J_(){if(ZE)return C0;ZE=1;var e=Gk(),t=dm();function n(a,o){o=e(o,a);for(var s=0,c=o.length;a!=null&&s<c;)a=a[t(o[s++])];return s&&s==c?a:void 0}return C0=n,C0}var R0,JE;function Cq(){if(JE)return R0;JE=1;var e=J_();function t(n,a,o){var s=n==null?void 0:e(n,a);return s===void 0?o:s}return R0=t,R0}var E0,eT;function Rq(){if(eT)return E0;eT=1;function e(t,n){return t!=null&&n in Object(t)}return E0=e,E0}var T0,tT;function Eq(){if(tT)return T0;tT=1;var e=Rq(),t=Yk();function n(a,o){return a!=null&&t(a,o,e)}return T0=n,T0}var M0,nT;function Tq(){if(nT)return M0;nT=1;var e=Q_(),t=Cq(),n=Eq(),a=Wb(),o=K_(),s=Z_(),c=dm(),u=1,f=2;function h(v,y){return a(v)&&o(y)?s(c(v),y):function(x){var S=t(x,v);return S===void 0&&S===y?n(x,v):e(y,S,u|f)}}return M0=h,M0}var k0,rT;function Mq(){if(rT)return k0;rT=1;function e(t){return t}return k0=e,k0}var _0,aT;function kq(){if(aT)return _0;aT=1;function e(t){return function(n){return n?.[t]}}return _0=e,_0}var A0,iT;function _q(){if(iT)return A0;iT=1;var e=J_();function t(n){return function(a){return e(a,n)}}return A0=t,A0}var N0,oT;function Aq(){if(oT)return N0;oT=1;var e=kq(),t=_q(),n=Wb(),a=dm();function o(s){return n(s)?e(a(s)):t(s)}return N0=o,N0}var O0,sT;function Nq(){if(sT)return O0;sT=1;var e=Sq(),t=Tq(),n=Mq(),a=gi(),o=Aq();function s(c){return typeof c==\"function\"?c:c==null?n:typeof c==\"object\"?a(c)?t(c[0],c[1]):e(c):o(c)}return O0=s,O0}var D0,lT;function Oq(){if(lT)return D0;lT=1;var e=LH(),t=JH(),n=Nq(),a=gi();function o(s,c){return function(u,f){var h=a(u)?e:t,v=c?c():{};return h(u,s,n(f,2),v)}}return D0=o,D0}var j0,cT;function Dq(){if(cT)return j0;cT=1;var e=PH(),t=Oq(),n=Object.prototype,a=n.hasOwnProperty,o=t(function(s,c,u){a.call(s,u)?s[u].push(c):e(s,u,[c])});return j0=o,j0}var jq=Dq();const zq=Ua(jq);function Pq(e,t,n,a,o,s,c,u,f,h,v,y,x,S,w,C,R,k,T){if(k!==void 0||t[t.length-1]!==n[t.length-1])return;const M=I_(R);hs(t,f,c,u,s,(j,I,P,A,q)=>{if(j!==t[t.length-1])return;I+=j.width;const B=Math.max(I,A);B>a||(e.save(),e.beginPath(),e.rect(B,s+1,1e4,o-s-1),e.clip(),mm(q,P,o,h,v,w,C,M,(V,N,_,z)=>{if(!z&&R.length>0&&!R.some(U=>Dh(I,V,1e4,_,U.x,U.y,U.width,U.height)))return;const F=x.hasIndex(N),O=S.hasIndex(N);e.beginPath();const $=y?.(N),W=$===void 0?T:as(T,$);W.bgCell!==T.bgCell&&(e.fillStyle=W.bgCell,e.fillRect(I,V,1e4,_)),O&&(e.fillStyle=W.bgHeader,e.fillRect(I,V,1e4,_)),F&&(e.fillStyle=W.accentLight,e.fillRect(I,V,1e4,_))}),e.restore())})}function Lq(e,t,n,a,o,s,c,u,f){let h=!1;for(const w of t)if(!w.sticky){h=c(w.sourceIndex);break}const v=f.horizontalBorderColor??f.borderColor,y=f.borderColor,x=h?_c(t):0;let S;if(x!==0&&(S=xR(y,f.bgCell),e.beginPath(),e.moveTo(x+.5,0),e.lineTo(x+.5,a),e.strokeStyle=S,e.stroke()),o>0){const w=y===v&&S!==void 0?S:xR(v,f.bgCell),C=dl(s,o,u);e.beginPath(),e.moveTo(0,a-C+.5),e.lineTo(n,a-C+.5),e.strokeStyle=w,e.stroke()}}const eA=(e,t,n)=>{let a=0,o=t,s=0,c=n;if(e!==void 0&&e.length>0){a=Number.MAX_SAFE_INTEGER,s=Number.MAX_SAFE_INTEGER,o=Number.MIN_SAFE_INTEGER,c=Number.MIN_SAFE_INTEGER;for(const u of e)a=Math.min(a,u.x-1),o=Math.max(o,u.x+u.width+1),s=Math.min(s,u.y-1),c=Math.max(c,u.y+u.height+1)}return{minX:a,maxX:o,minY:s,maxY:c}};function Iq(e,t,n,a,o,s,c,u,f,h,v,y,x,S,w){const C=w.bgCell,{minX:R,maxX:k,minY:T,maxY:M}=eA(u,s,c),j=[],I=c-dl(S,x,h);let P=f,A=n,q=0;for(;P+o<I;){const _=P+o,z=h(A);if(_>=T&&_<=M-1){const O=v?.(A)?.bgCell;O!==void 0&&O!==C&&A>=S-x&&j.push({x:R,y:_,w:k-R,h:z,color:O})}P+=z,A<S-x&&(q=P),A++}let B=0;const V=Math.min(I,M)-q;if(V>0)for(let _=0;_<t.length;_++){const z=t[_];if(z.width===0)continue;const F=z.sticky?B:B+a,O=z.themeOverride?.bgCell;O!==void 0&&O!==C&&F>=R&&F<=k&&y(_+1)&&j.push({x:F,y:q,w:z.width,h:V,color:O}),B+=z.width}if(j.length===0)return;let N;e.beginPath();for(let _=j.length-1;_>=0;_--){const z=j[_];N===void 0?N=z.color:z.color!==N&&(e.fillStyle=N,e.fill(),e.beginPath(),N=z.color),e.rect(z.x,z.y,z.w,z.h)}N!==void 0&&(e.fillStyle=N,e.fill()),e.beginPath()}function uT(e,t,n,a,o,s,c,u,f,h,v,y,x,S,w,C,R,k=!1){if(f!==void 0){e.beginPath(),e.save(),e.rect(0,0,s,c);for(const _ of f)e.rect(_.x+1,_.y+1,_.width-1,_.height-1);e.clip(\"evenodd\")}const T=R.horizontalBorderColor??R.borderColor,M=R.borderColor,{minX:j,maxX:I,minY:P,maxY:A}=eA(u,s,c),q=[];e.beginPath();let B=.5;for(let _=0;_<t.length;_++){const z=t[_];if(z.width===0)continue;B+=z.width;const F=z.sticky?B:B+a;F>=j&&F<=I&&S(_+1)&&q.push({x1:F,y1:Math.max(h,P),x2:F,y2:Math.min(c,A),color:M})}let V=c+.5;for(let _=C-w;_<C;_++){const z=y(_);V-=z,q.push({x1:j,y1:V,x2:I,y2:V,color:T})}if(k!==!0){let _=v+.5,z=n;const F=V;for(;_+o<F;){const O=_+o;if(O>=P&&O<=A-1){const $=x?.(z);q.push({x1:j,y1:O,x2:I,y2:O,color:$?.horizontalBorderColor??$?.borderColor??T})}_+=y(z),z++}}const N=zq(q,_=>_.color);for(const _ of Object.keys(N)){e.strokeStyle=_;for(const z of N[_])e.moveTo(z.x1,z.y1),e.lineTo(z.x2,z.y2);e.stroke(),e.beginPath()}f!==void 0&&e.restore()}function Hq(e,t,n,a,o,s,c,u,f,h,v,y,x,S,w,C,R,k,T){const M=[];e.imageSmoothingEnabled=!1;const j=Math.min(o.cellYOffset,c),I=Math.max(o.cellYOffset,c);let P=0;if(typeof k==\"number\")P+=(I-j)*k;else for(let F=j;F<I;F++)P+=k(F);c>o.cellYOffset&&(P=-P),P+=f-o.translateY;const A=Math.min(o.cellXOffset,s),q=Math.max(o.cellXOffset,s);let B=0;for(let F=A;F<q;F++)B+=C[F].width;s>o.cellXOffset&&(B=-B),B+=u-o.translateX;const V=_c(R);if(B!==0&&P!==0)return{regions:[]};const N=h>0?dl(x,h,k):0,_=v-V-Math.abs(B),z=y-S-N-Math.abs(P)-1;if(_>150&&z>150){const F={sx:0,sy:0,sw:v*w,sh:y*w,dx:0,dy:0,dw:v*w,dh:y*w};if(P>0?(F.sy=(S+1)*w,F.sh=z*w,F.dy=(P+S+1)*w,F.dh=z*w,M.push({x:0,y:S,width:v,height:P+1})):P<0&&(F.sy=(-P+S+1)*w,F.sh=z*w,F.dy=(S+1)*w,F.dh=z*w,M.push({x:0,y:y+P-N,width:v,height:-P+N})),B>0?(F.sx=V*w,F.sw=_*w,F.dx=(B+V)*w,F.dw=_*w,M.push({x:V-1,y:0,width:B+2,height:y})):B<0&&(F.sx=(V-B)*w,F.sw=_*w,F.dx=V*w,F.dw=_*w,M.push({x:v+B,y:0,width:-B,height:y})),e.setTransform(1,0,0,1,0,0),T){if(V>0&&B!==0&&P===0&&(a===void 0||n?.[1]!==!1)){const O=V*w,$=y*w;e.drawImage(t,0,0,O,$,0,0,O,$)}if(N>0&&B===0&&P!==0&&(a===void 0||n?.[0]!==!1)){const O=(y-N)*w,$=v*w,W=N*w;e.drawImage(t,0,O,$,W,0,O,$,W)}}e.drawImage(t,F.sx,F.sy,F.sw,F.sh,F.dx,F.dy,F.dw,F.dh),e.scale(w,w)}return e.imageSmoothingEnabled=!0,{regions:M}}function qq(e,t,n,a,o,s,c,u,f,h){const v=[];return t!==e.cellXOffset||n!==e.cellYOffset||a!==e.translateX||o!==e.translateY||hs(f,n,a,o,u,(y,x,S,w)=>{if(y.sourceIndex===h){const C=Math.max(x,w)+1;return v.push({x:C,y:0,width:s-C,height:c}),!0}}),v}function Fq(e,t){if(t===void 0||e.width!==t.width||e.height!==t.height||e.theme!==t.theme||e.headerHeight!==t.headerHeight||e.rowHeight!==t.rowHeight||e.rows!==t.rows||e.freezeColumns!==t.freezeColumns||e.getRowThemeOverride!==t.getRowThemeOverride||e.isFocused!==t.isFocused||e.isResizing!==t.isResizing||e.verticalBorder!==t.verticalBorder||e.getCellContent!==t.getCellContent||e.highlightRegions!==t.highlightRegions||e.selection!==t.selection||e.dragAndDropState!==t.dragAndDropState||e.prelightCells!==t.prelightCells||e.touchMode!==t.touchMode||e.maxScaleFactor!==t.maxScaleFactor)return!1;if(e.mappedColumns!==t.mappedColumns){if(e.mappedColumns.length>100||e.mappedColumns.length!==t.mappedColumns.length)return!1;let n;for(let a=0;a<e.mappedColumns.length;a++){const o=e.mappedColumns[a],s=t.mappedColumns[a];if(kc(o,s))continue;if(n!==void 0||o.width===s.width)return!1;const{width:c,...u}=o,{width:f,...h}=s;if(!kc(u,h))return!1;n=a}return n===void 0?!0:n}return!0}function dT(e,t,n,a,o,s,c,u,f,h,v,y,x,S,w,C){const R=w?.filter(A=>A.style!==\"no-outline\");if(R===void 0||R.length===0)return;const k=_c(u),T=dl(S,x,y),M=[f,0,u.length,S-x],j=[k,0,t,n-T],I=R.map(A=>{const q=A.range,B=A.style??\"dashed\";return AH(q,M,t,n,j).map(V=>{const N=V.rect,_=yb(N.x,N.y,t,n,v,h+v,a,o,s,c,S,f,x,u,y),z=N.width===1&&N.height===1?_:yb(N.x+N.width-1,N.y+N.height-1,t,n,v,h+v,a,o,s,c,S,f,x,u,y);return N.x+N.width>=u.length&&(z.width-=1),N.y+N.height>=S&&(z.height-=1),{color:A.color,style:B,clip:V.clip,rect:_H({x:_.x,y:_.y,width:z.x+z.width-_.x,height:z.y+z.height-_.y},t,n,8)}})}),P=()=>{e.lineWidth=1;let A=!1;for(const q of I)for(const B of q)if(B?.rect!==void 0&&Dh(0,0,t,n,B.rect.x,B.rect.y,B.rect.width,B.rect.height)){const V=A,N=!kH(B.clip,B.rect);N&&(e.save(),e.rect(B.clip.x,B.clip.y,B.clip.width,B.clip.height),e.clip()),B.style===\"dashed\"&&!A?(e.setLineDash([5,3]),A=!0):(B.style===\"solid\"||B.style===\"solid-outline\")&&A&&(e.setLineDash([]),A=!1),e.strokeStyle=B.style===\"solid-outline\"?fa(fa(B.color,C.borderColor),C.bgCell):il(B.color,1),e.strokeRect(B.rect.x+.5,B.rect.y+.5,B.rect.width-1,B.rect.height-1),N&&(e.restore(),A=V)}A&&e.setLineDash([])};return P(),P}function fT(e,t,n,a,o){e.beginPath(),e.moveTo(t,n),e.lineTo(t,a),e.lineWidth=2,e.strokeStyle=o,e.stroke(),e.globalAlpha=1}function z0(e,t,n,a,o,s,c,u,f,h,v,y,x,S,w,C,R){if(v.current===void 0)return;const k=v.current.range,T=v.current.cell,M=[k.x+k.width-1,k.y+k.height-1];if(T[1]>=R&&M[1]>=R||!c.some(F=>F.sourceIndex===T[0]||F.sourceIndex===M[0]))return;const[I,P]=v.current.cell,A=x(v.current.cell),q=A.span??[I,I],B=P>=R-S,V=S>0&&!B?dl(R,S,y)-1:0,N=M[1];let _;if(hs(c,a,o,s,h,(F,O,$,W,U)=>{if(F.sticky&&I>F.sourceIndex)return;const K=F.sourceIndex<q[0],ie=F.sourceIndex>q[1],L=F.sourceIndex===M[0];if(!(!L&&(K||ie)))return mm(U,$,n,R,y,S,w,void 0,(X,Y,re)=>{if(Y!==P&&Y!==N)return;let Z=O,oe=F.width;if(A.span!==void 0){const me=q_(A.span,O,X,F.width,re,F,u),Me=F.sticky?me[0]:me[1];Me!==void 0&&(Z=Me.x,oe=Me.width)}return Y===N&&L&&C&&(_=()=>{W>Z&&!F.sticky&&(e.beginPath(),e.rect(W,0,t-W,n),e.clip()),e.beginPath(),e.rect(Z+oe-4,X+re-4,4,4),e.fillStyle=F.themeOverride?.accentColor??f.accentColor,e.fill()}),_!==void 0}),_!==void 0}),_===void 0)return;const z=()=>{e.save(),e.beginPath(),e.rect(0,h,t,n-h-V),e.clip(),_?.(),e.restore()};return z(),z}function $q(e,t,n,a,o,s,c,u,f){f===void 0||f.size===0||(e.beginPath(),H_(t,n,s,a,(h,v,y,x,S,w)=>{f.hasItemInRectangle({x:h[0],y:-2,width:h[1]-h[0]+1,height:1})&&e.rect(y,x,S,w)}),hs(t,u,s,c,o,(h,v,y,x)=>{const S=Math.max(0,x-v),w=v+S+1,C=h.width-S-1;f.has([h.sourceIndex,-1])&&e.rect(w,a,C,o-a)}),e.clip())}function Bq(e,t,n,a,o,s,c,u,f,h){let v=0;return hs(e,s,a,o,n,(y,x,S,w,C)=>(mm(C,S,t,c,u,f,h,void 0,(R,k,T,M)=>{M||(v=Math.max(k,v))}),!0)),v}function hT(e,t){const{canvasCtx:n,headerCanvasCtx:a,width:o,height:s,cellXOffset:c,cellYOffset:u,translateX:f,translateY:h,mappedColumns:v,enableGroups:y,freezeColumns:x,dragAndDropState:S,theme:w,drawFocus:C,headerHeight:R,groupHeaderHeight:k,disabledRows:T,rowHeight:M,verticalBorder:j,overrideCursor:I,isResizing:P,selection:A,fillHandle:q,freezeTrailingRows:B,rows:V,getCellContent:N,getGroupDetails:_,getRowThemeOverride:z,isFocused:F,drawHeaderCallback:O,prelightCells:$,drawCellCallback:W,highlightRegions:U,resizeCol:K,imageLoader:ie,lastBlitData:L,hoverValues:X,hyperWrapping:Y,hoverInfo:re,spriteManager:Z,maxScaleFactor:oe,hasAppendRow:ne,touchMode:me,enqueue:Me,renderStateProvider:Fe,getCellRenderer:Ue,renderStrategy:tt,bufferACtx:Le,bufferBCtx:Ve,damage:Je,minimumCellWidth:jt}=e;if(o===0||s===0)return;const xe=tt===\"double-buffer\",G=Math.min(oe,Math.ceil(window.devicePixelRatio??1)),se=tt!==\"direct\"&&Fq(e,t),ge=n.canvas;(ge.width!==o*G||ge.height!==s*G)&&(ge.width=o*G,ge.height=s*G,ge.style.width=o+\"px\",ge.style.height=s+\"px\");const Ne=a.canvas,Re=y?k+R:R,ze=Re+1;(Ne.width!==o*G||Ne.height!==ze*G)&&(Ne.width=o*G,Ne.height=ze*G,Ne.style.width=o+\"px\",Ne.style.height=ze+\"px\");const Ge=Le.canvas,Xe=Ve.canvas;xe&&(Ge.width!==o*G||Ge.height!==s*G)&&(Ge.width=o*G,Ge.height=s*G,L.current!==void 0&&(L.current.aBufferScroll=void 0)),xe&&(Xe.width!==o*G||Xe.height!==s*G)&&(Xe.width=o*G,Xe.height=s*G,L.current!==void 0&&(L.current.bBufferScroll=void 0));const Pe=L.current;if(se===!0&&c===Pe?.cellXOffset&&u===Pe?.cellYOffset&&f===Pe?.translateX&&h===Pe?.translateY)return;let Mt=null;xe&&(Mt=n);const ut=a;let lt;xe?Je!==void 0?lt=Pe?.lastBuffer===\"b\"?Ve:Le:lt=Pe?.lastBuffer===\"b\"?Le:Ve:lt=n;const xn=lt.canvas,Nt=xe?xn===Ge?Xe:Ge:ge,Et=typeof M==\"number\"?()=>M:M;ut.save(),lt.save(),ut.beginPath(),lt.beginPath(),ut.textBaseline=\"middle\",lt.textBaseline=\"middle\",G!==1&&(ut.scale(G,G),lt.scale(G,G));const mt=vb(v,c,o,S,f);let zt=[];const dn=C&&A.current?.cell[1]===u&&h===0;let sn=!1;if(U!==void 0){for(const St of U)if(St.style!==\"no-outline\"&&St.range.y===u&&h===0){sn=!0;break}}const $r=()=>{DH(ut,mt,y,re,o,f,R,k,S,P,A,w,Z,X,j,_,Je,O,me),uT(ut,mt,u,f,h,o,s,void 0,void 0,k,Re,Et,z,j,B,V,w,!0),ut.beginPath(),ut.moveTo(0,ze-.5),ut.lineTo(o,ze-.5),ut.strokeStyle=fa(w.headerBottomBorderColor??w.horizontalBorderColor??w.borderColor,w.bgHeader),ut.stroke(),sn&&dT(ut,o,s,c,u,f,h,v,x,R,k,M,B,V,U,w),dn&&z0(ut,o,s,u,f,h,mt,v,w,Re,A,Et,N,B,ne,q,V)};if(Je!==void 0){const St=mt[mt.length-1].sourceIndex+1,Wt=Je.hasItemInRegion([{x:c,y:-2,width:St,height:2},{x:c,y:u,width:St,height:300},{x:0,y:u,width:x,height:300},{x:0,y:-2,width:x,height:2},{x:c,y:V-B,width:St,height:B,when:B>0}]),gr=Un=>{eE(Un,mt,v,s,Re,f,h,u,V,Et,N,_,z,T,F,C,B,ne,zt,Je,A,$,U,ie,Z,X,re,W,Y,w,Me,Fe,Ue,I,jt);const rt=A.current;q&&C&&rt!==void 0&&Je.has(x_(rt.range))&&z0(Un,o,s,u,f,h,mt,v,w,Re,A,Et,N,B,ne,q,V)};Wt&&(gr(lt),Mt!==null&&(Mt.save(),Mt.scale(G,G),Mt.textBaseline=\"middle\",gr(Mt),Mt.restore()),Je.hasHeader()&&($q(ut,mt,o,k,Re,f,h,u,Je),$r())),lt.restore(),ut.restore();return}if((se!==!0||c!==Pe?.cellXOffset||f!==Pe?.translateX||dn!==Pe?.mustDrawFocusOnHeader||sn!==Pe?.mustDrawHighlightRingsOnHeader)&&$r(),se===!0){da(Nt!==void 0&&Pe!==void 0);const{regions:St}=Hq(lt,Nt,Nt===Ge?Pe.aBufferScroll:Pe.bBufferScroll,Nt===Ge?Pe.bBufferScroll:Pe.aBufferScroll,Pe,c,u,f,h,B,o,s,V,Re,G,v,mt,M,xe);zt=St}else se!==!1&&(da(Pe!==void 0),zt=qq(Pe,c,u,f,h,o,s,Re,mt,se));Lq(lt,mt,o,s,B,V,j,Et,w);const Rn=dT(lt,o,s,c,u,f,h,v,x,R,k,M,B,V,U,w),pr=C?z0(lt,o,s,u,f,h,mt,v,w,Re,A,Et,N,B,ne,q,V):void 0;if(lt.fillStyle=w.bgCell,zt.length>0){lt.beginPath();for(const St of zt)lt.rect(St.x,St.y,St.width,St.height);lt.clip(),lt.fill(),lt.beginPath()}else lt.fillRect(0,0,o,s);const Pn=eE(lt,mt,v,s,Re,f,h,u,V,Et,N,_,z,T,F,C,B,ne,zt,Je,A,$,U,ie,Z,X,re,W,Y,w,Me,Fe,Ue,I,jt);Pq(lt,mt,v,o,s,Re,f,h,u,V,Et,z,A.rows,T,B,ne,zt,Je,w),Iq(lt,mt,u,f,h,o,s,zt,Re,Et,z,j,B,V,w),uT(lt,mt,u,f,h,o,s,zt,Pn,k,Re,Et,z,j,B,V,w),Rn?.(),pr?.(),P&&hs(mt,0,f,0,Re,(St,Wt)=>St.sourceIndex===K?(fT(ut,Wt+St.width,0,Re+1,fa(w.resizeIndicatorColor??w.accentLight,w.bgHeader)),fT(lt,Wt+St.width,Re,s,fa(w.resizeIndicatorColor??w.accentLight,w.bgCell)),!0):!1),Mt!==null&&(Mt.fillStyle=w.bgCell,Mt.fillRect(0,0,o,s),Mt.drawImage(lt.canvas,0,0));const Ar=Bq(mt,s,Re,f,h,u,V,Et,B,ne);ie?.setWindow({x:c,y:u,width:mt.length,height:Ar-u},x,Array.from({length:B},(St,Wt)=>V-1-Wt));const Nr=Pe!==void 0&&(c!==Pe.cellXOffset||f!==Pe.translateX),Lt=Pe!==void 0&&(u!==Pe.cellYOffset||h!==Pe.translateY);L.current={cellXOffset:c,cellYOffset:u,translateX:f,translateY:h,mustDrawFocusOnHeader:dn,mustDrawHighlightRingsOnHeader:sn,lastBuffer:xe?xn===Ge?\"a\":\"b\":void 0,aBufferScroll:xn===Ge?[Nr,Lt]:Pe?.aBufferScroll,bBufferScroll:xn===Xe?[Nr,Lt]:Pe?.bBufferScroll},lt.restore(),ut.restore()}const Uq=80;function Vq(e){const t=e-1;return t*t*t+1}class Wq{callback;constructor(t){this.callback=t}currentHoveredItem=void 0;leavingItems=[];lastAnimationTime;addToLeavingItems=t=>{this.leavingItems.some(a=>Ju(a.item,t.item))||this.leavingItems.push(t)};removeFromLeavingItems=t=>{const n=this.leavingItems.find(a=>Ju(a.item,t));return this.leavingItems=this.leavingItems.filter(a=>a!==n),n?.hoverAmount??0};cleanUpLeavingElements=()=>{this.leavingItems=this.leavingItems.filter(t=>t.hoverAmount>0)};shouldStep=()=>{const t=this.leavingItems.length>0,n=this.currentHoveredItem!==void 0&&this.currentHoveredItem.hoverAmount<1;return t||n};getAnimatingItems=()=>this.currentHoveredItem!==void 0?[...this.leavingItems,this.currentHoveredItem]:this.leavingItems.map(t=>({...t,hoverAmount:Vq(t.hoverAmount)}));step=t=>{if(this.lastAnimationTime===void 0)this.lastAnimationTime=t;else{const a=(t-this.lastAnimationTime)/Uq;for(const s of this.leavingItems)s.hoverAmount=Ha(s.hoverAmount-a,0,1);this.currentHoveredItem!==void 0&&(this.currentHoveredItem.hoverAmount=Ha(this.currentHoveredItem.hoverAmount+a,0,1));const o=this.getAnimatingItems();this.callback(o),this.cleanUpLeavingElements()}this.shouldStep()?(this.lastAnimationTime=t,window.requestAnimationFrame(this.step)):this.lastAnimationTime=void 0};setHovered=t=>{if(!Ju(this.currentHoveredItem?.item,t)){if(this.currentHoveredItem!==void 0&&this.addToLeavingItems(this.currentHoveredItem),t!==void 0){const n=this.removeFromLeavingItems(t);this.currentHoveredItem={item:t,hoverAmount:n}}else this.currentHoveredItem=void 0;this.lastAnimationTime===void 0&&window.requestAnimationFrame(this.step)}}}class Gq{fn;val;constructor(t){this.fn=t}get value(){return this.val??(this.val=this.fn())}}function y1(e){return new Gq(e)}const Yq=y1(()=>window.navigator.userAgent.includes(\"Firefox\")),jh=y1(()=>window.navigator.userAgent.includes(\"Mac OS\")&&window.navigator.userAgent.includes(\"Safari\")&&!window.navigator.userAgent.includes(\"Chrome\")),zh=y1(()=>window.navigator.platform.toLowerCase().startsWith(\"mac\"));function Xq(e){const t=m.useRef([]),n=m.useRef(0),a=m.useRef(e);a.current=e;const o=m.useCallback(()=>{const s=()=>window.requestAnimationFrame(c),c=()=>{const u=t.current.map(h1);t.current=[],a.current(new td(u)),t.current.length>0?n.current++:n.current=0};window.requestAnimationFrame(n.current>600?s:c)},[]);return m.useCallback(s=>{t.current.length===0&&o();const c=qa(s[0],s[1]);t.current.includes(c)||t.current.push(c)},[o])}const Xo=\"header\",ca=\"group-header\",Ph=\"out-of-bounds\";var mc;(function(e){e[e.Start=-2]=\"Start\",e[e.StartPadding=-1]=\"StartPadding\",e[e.Center=0]=\"Center\",e[e.EndPadding=1]=\"EndPadding\",e[e.End=2]=\"End\"})(mc||(mc={}));function tA(e,t){return e===t?!0:e?.kind===\"out-of-bounds\"?e?.kind===t?.kind&&e?.location[0]===t?.location[0]&&e?.location[1]===t?.location[1]&&e?.region[0]===t?.region[0]&&e?.region[1]===t?.region[1]:e?.kind===t?.kind&&e?.location[0]===t?.location[0]&&e?.location[1]===t?.location[1]}const mT=6,Qq=(e,t)=>e.kind===Ie.Custom?e.copyData:t?.(e)?.getAccessibilityString(e)??\"\",Kq=(e,t)=>{const{width:n,height:a,accessibilityHeight:o,columns:s,cellXOffset:c,cellYOffset:u,headerHeight:f,fillHandle:h=!1,groupHeaderHeight:v,rowHeight:y,rows:x,getCellContent:S,getRowThemeOverride:w,onHeaderMenuClick:C,enableGroups:R,isFilling:k,onCanvasFocused:T,onCanvasBlur:M,isFocused:j,selection:I,freezeColumns:P,onContextMenu:A,freezeTrailingRows:q,fixedShadowX:B=!0,fixedShadowY:V=!0,drawFocusRing:N,onMouseDown:_,onMouseUp:z,onMouseMoveRaw:F,onMouseMove:O,onItemHovered:$,dragAndDropState:W,firstColAccessible:U,onKeyDown:K,onKeyUp:ie,highlightRegions:L,canvasRef:X,onDragStart:Y,onDragEnd:re,eventTargetRef:Z,isResizing:oe,resizeColumn:ne,isDragging:me,isDraggable:Me=!1,allowResize:Fe,disabledRows:Ue,hasAppendRow:tt,getGroupDetails:Le,theme:Ve,prelightCells:Je,headerIcons:jt,verticalBorder:xe,drawCell:G,drawHeader:se,onCellFocused:ge,onDragOverCell:Ne,onDrop:Re,onDragLeave:ze,imageWindowLoader:Ge,smoothScrollX:Xe=!1,smoothScrollY:Pe=!1,experimental:Mt,getCellRenderer:ut}=e,lt=e.translateX??0,xn=e.translateY??0,Nt=Math.max(P,Math.min(s.length-1,c)),Et=m.useRef(null),mt=Ge,zt=m.useRef(),[dn,sn]=m.useState(!1),$r=m.useRef([]),Rn=m.useRef(),[pr,Pn]=m.useState(),[Ar,Nr]=m.useState(),Lt=m.useRef(null),[St,Wt]=m.useState(),[gr,Un]=m.useState(!1),rt=m.useRef(gr);rt.current=gr;const Bt=m.useMemo(()=>new TH(jt,()=>{lr.current=void 0,Gr.current()}),[jt]),Zt=R?v+f:f,Br=m.useRef(-1),Vn=(Mt?.enableFirefoxRescaling??!1)&&Yq.value,vr=(Mt?.enableSafariRescaling??!1)&&jh.value;m.useLayoutEffect(()=>{window.devicePixelRatio===1||!Vn&&!vr||(Br.current!==-1&&sn(!0),window.clearTimeout(Br.current),Br.current=window.setTimeout(()=>{sn(!1),Br.current=-1},200))},[u,Nt,lt,xn,Vn,vr]);const fn=rI(s,P),Ga=B?_c(fn,W):0,wn=m.useCallback((le,ke,He)=>{const Oe=le.getBoundingClientRect();if(ke>=fn.length||He>=x)return;const Ae=Oe.width/n,qe=yb(ke,He,n,a,v,Zt,Nt,u,lt,xn,x,P,q,fn,y);return Ae!==1&&(qe.x*=Ae,qe.y*=Ae,qe.width*=Ae,qe.height*=Ae),qe.x+=Oe.x,qe.y+=Oe.y,qe},[n,a,v,Zt,Nt,u,lt,xn,x,P,q,fn,y]),En=m.useCallback((le,ke,He,Oe)=>{const Ae=le.getBoundingClientRect(),qe=Ae.width/n,nt=(ke-Ae.left)/qe,$e=(He-Ae.top)/qe,Ye=5,ct=vb(fn,Nt,n,void 0,lt);let Jt=0,en=0;Oe instanceof MouseEvent&&(Jt=Oe.button,en=Oe.buttons);const Ht=sI(nt,ct,lt),Tt=lI($e,a,R,f,v,x,y,u,xn,q),cn=Oe?.shiftKey===!0,dt=Oe?.ctrlKey===!0,Gt=Oe?.metaKey===!0,Ri=Oe!==void 0&&!(Oe instanceof MouseEvent)||Oe?.pointerType===\"touch\",kn=[nt<0?-1:n<nt?1:0,$e<Zt?-1:a<$e?1:0];let Ei;if(Ht===-1||$e<0||nt<0||Tt===void 0||nt>n||$e>a){const qt=nt>n?1:nt<0?-1:0,Ln=$e>a?1:$e<0?-1:0;let fr=qt*2,ba=Ln*2;qt===0&&(fr=Ht===-1?mc.EndPadding:mc.Center),Ln===0&&(ba=Tt===void 0?mc.EndPadding:mc.Center);let Qr=!1;if(Ht===-1&&Tt===-1){const Ti=wn(le,fn.length-1,-1);da(Ti!==void 0),Qr=ke<Ti.x+Ti.width+Ye}const co=nt>n&&nt<n+hb()||$e>a&&$e<a+hb();Ei={kind:Ph,location:[Ht!==-1?Ht:nt<0?0:fn.length-1,Tt??x-1],region:[fr,ba],shiftKey:cn,ctrlKey:dt,metaKey:Gt,isEdge:Qr,isTouch:Ri,button:Jt,buttons:en,scrollEdge:kn,isMaybeScrollbar:co}}else if(Tt<=-1){let qt=wn(le,Ht,Tt);da(qt!==void 0);let Ln=qt!==void 0&&qt.x+qt.width-ke<=Ye;const fr=Ht-1;ke-qt.x<=Ye&&fr>=0?(Ln=!0,qt=wn(le,fr,Tt),da(qt!==void 0),Ei={kind:R&&Tt===-2?ca:Xo,location:[fr,Tt],bounds:qt,group:fn[fr].group??\"\",isEdge:Ln,shiftKey:cn,ctrlKey:dt,metaKey:Gt,isTouch:Ri,localEventX:ke-qt.x,localEventY:He-qt.y,button:Jt,buttons:en,scrollEdge:kn}):Ei={kind:R&&Tt===-2?ca:Xo,group:fn[Ht].group??\"\",location:[Ht,Tt],bounds:qt,isEdge:Ln,shiftKey:cn,ctrlKey:dt,metaKey:Gt,isTouch:Ri,localEventX:ke-qt.x,localEventY:He-qt.y,button:Jt,buttons:en,scrollEdge:kn}}else{const qt=wn(le,Ht,Tt);da(qt!==void 0);const Ln=qt!==void 0&&qt.x+qt.width-ke<Ye;let fr=!1;if(h&&I.current!==void 0){const ba=x_(I.current.range),Qr=wn(le,ba[0],ba[1]);if(Qr!==void 0){const co=Qr.x+Qr.width-2,Ti=Qr.y+Qr.height-2;fr=Math.abs(co-ke)<mT&&Math.abs(Ti-He)<mT}}Ei={kind:\"cell\",location:[Ht,Tt],bounds:qt,isEdge:Ln,shiftKey:cn,ctrlKey:dt,isFillHandle:fr,metaKey:Gt,isTouch:Ri,localEventX:ke-qt.x,localEventY:He-qt.y,button:Jt,buttons:en,scrollEdge:kn}}return Ei},[n,fn,Nt,lt,a,R,f,v,x,y,u,xn,q,wn,h,I,Zt]),[Sn]=pr??[],Tn=m.useRef(()=>{}),On=m.useRef(pr);On.current=pr;const[sr,Ur]=m.useMemo(()=>{const le=document.createElement(\"canvas\"),ke=document.createElement(\"canvas\");return le.style.display=\"none\",le.style.opacity=\"0\",le.style.position=\"fixed\",ke.style.display=\"none\",ke.style.opacity=\"0\",ke.style.position=\"fixed\",[le.getContext(\"2d\",{alpha:!1}),ke.getContext(\"2d\",{alpha:!1})]},[]);m.useLayoutEffect(()=>{if(!(sr===null||Ur===null))return document.documentElement.append(sr.canvas),document.documentElement.append(Ur.canvas),()=>{sr.canvas.remove(),Ur.canvas.remove()}},[sr,Ur]);const oo=m.useMemo(()=>new yI,[]),ml=Vn&&dn?1:vr&&dn?2:5,ms=Mt?.disableMinimumCellWidth===!0?1:10,lr=m.useRef(),Ya=m.useRef(null),Vr=m.useRef(null),Wr=m.useCallback(()=>{const le=Et.current,ke=Lt.current;if(le===null||ke===null||(Ya.current===null&&(Ya.current=le.getContext(\"2d\",{alpha:!1}),le.width=0,le.height=0),Vr.current===null&&(Vr.current=ke.getContext(\"2d\",{alpha:!1}),ke.width=0,ke.height=0),Ya.current===null||Vr.current===null||sr===null||Ur===null))return;let He=!1;const Oe=nt=>{He=!0,Wt(nt)},Ae=lr.current,qe={headerCanvasCtx:Vr.current,canvasCtx:Ya.current,bufferACtx:sr,bufferBCtx:Ur,width:n,height:a,cellXOffset:Nt,cellYOffset:u,translateX:Math.round(lt),translateY:Math.round(xn),mappedColumns:fn,enableGroups:R,freezeColumns:P,dragAndDropState:W,theme:Ve,headerHeight:f,groupHeaderHeight:v,disabledRows:Ue??vt.empty(),rowHeight:y,verticalBorder:xe,isResizing:oe,resizeCol:ne,isFocused:j,selection:I,fillHandle:h,drawCellCallback:G,hasAppendRow:tt,overrideCursor:Oe,maxScaleFactor:ml,freezeTrailingRows:q,rows:x,drawFocus:N,getCellContent:S,getGroupDetails:Le??(nt=>({name:nt})),getRowThemeOverride:w,drawHeaderCallback:se,prelightCells:Je,highlightRegions:L,imageLoader:mt,lastBlitData:Rn,damage:zt.current,hoverValues:$r.current,hoverInfo:On.current,spriteManager:Bt,scrolling:dn,hyperWrapping:Mt?.hyperWrapping??!1,touchMode:gr,enqueue:Tn.current,renderStateProvider:oo,renderStrategy:Mt?.renderStrategy??(jh.value?\"double-buffer\":\"single-buffer\"),getCellRenderer:ut,minimumCellWidth:ms};qe.damage===void 0?(lr.current=qe,hT(qe,Ae)):hT(qe,void 0),!He&&(qe.damage===void 0||qe.damage.has(On?.current?.[0]))&&Wt(void 0)},[sr,Ur,n,a,Nt,u,lt,xn,fn,R,P,W,Ve,f,v,Ue,y,xe,oe,tt,ne,j,I,h,q,x,N,ml,S,Le,w,G,se,Je,L,mt,Bt,dn,Mt?.hyperWrapping,Mt?.renderStrategy,gr,oo,ut,ms]),Gr=m.useRef(Wr);m.useLayoutEffect(()=>{Wr(),Gr.current=Wr},[Wr]),m.useLayoutEffect(()=>{(async()=>document?.fonts?.ready!==void 0&&(await document.fonts.ready,lr.current=void 0,Gr.current()))()},[]);const yr=m.useCallback(le=>{zt.current=le,Gr.current(),zt.current=void 0},[]),Cn=Xq(yr);Tn.current=Cn;const ps=m.useCallback(le=>{yr(new td(le.map(ke=>ke.cell)))},[yr]);mt.setCallback(yr);const[pl,Ma]=m.useState(!1),[Yr,ka]=Sn??[],gl=Yr!==void 0&&ka===-1,vl=Yr!==void 0&&ka===-2;let yl=!1,_a=!1,br=St;if(br===void 0&&Yr!==void 0&&ka!==void 0&&ka>-1&&ka<x){const le=S([Yr,ka],!0);yl=le.kind===Ea.NewRow||le.kind===Ea.Marker&&le.markerKind!==\"number\",_a=le.kind===Ie.Boolean&&fb(le),br=le.cursor}const Jn=me?\"grabbing\":(Ar??!1)||oe?\"col-resize\":pl||k?\"crosshair\":br!==void 0?br:gl||yl||_a||vl?\"pointer\":\"default\",yi=m.useMemo(()=>({contain:\"strict\",display:\"block\",cursor:Jn}),[Jn]),gs=m.useRef(\"default\"),pa=Z?.current;pa!=null&&gs.current!==yi.cursor&&(pa.style.cursor=gs.current=yi.cursor);const cr=m.useCallback((le,ke,He,Oe)=>{if(Le===void 0)return;const Ae=Le(le);if(Ae.actions!==void 0){const qe=U_(ke,Ae.actions);for(const[nt,$e]of qe.entries())if(pm($e,He+ke.x,Oe+$e.y))return Ae.actions[nt]}},[Le]),ur=m.useCallback((le,ke,He,Oe)=>{const Ae=s[ke];if(!me&&!oe&&Ae.hasMenu===!0&&!(Ar??!1)){const qe=wn(le,ke,-1);da(qe!==void 0);const nt=B_(qe.x,qe.y,qe.width,qe.height,r1(Ae.title)===\"rtl\");if(He>nt.x&&He<nt.x+nt.width&&Oe>nt.y&&Oe<nt.y+nt.height)return qe}},[s,wn,Ar,me,oe]),vs=m.useRef(0),Dn=m.useRef(),bi=m.useRef(!1),Gn=m.useCallback(le=>{const ke=Et.current,He=Z?.current;if(ke===null||le.target!==ke&&le.target!==He)return;bi.current=!0;let Oe,Ae;if(le instanceof MouseEvent?(Oe=le.clientX,Ae=le.clientY):(Oe=le.touches[0].clientX,Ae=le.touches[0].clientY),le.target===He&&He!==null){const nt=He.getBoundingClientRect();if(Oe>nt.right||Ae>nt.bottom)return}const qe=En(ke,Oe,Ae,le);Dn.current=qe.location,qe.isTouch&&(vs.current=Date.now()),rt.current!==qe.isTouch&&Un(qe.isTouch),!(qe.kind===Xo&&ur(ke,qe.location[0],Oe,Ae)!==void 0)&&(qe.kind===ca&&cr(qe.group,qe.bounds,qe.localEventX,qe.localEventY)!==void 0||(_?.(qe),!qe.isTouch&&Me!==!0&&Me!==qe.kind&&qe.button<3&&qe.button!==1&&le.preventDefault()))},[Z,Me,En,cr,ur,_]);or(\"touchstart\",Gn,window,!1),or(\"mousedown\",Gn,window,!1);const Xa=m.useRef(0),ga=m.useCallback(le=>{const ke=Xa.current;Xa.current=Date.now();const He=Et.current;if(bi.current=!1,z===void 0||He===null)return;const Oe=Z?.current,Ae=le.target!==He&&le.target!==Oe;let qe,nt,$e=!0;if(le instanceof MouseEvent){if(qe=le.clientX,nt=le.clientY,$e=le.button<3,le.pointerType===\"touch\")return}else qe=le.changedTouches[0].clientX,nt=le.changedTouches[0].clientY;let Ye=En(He,qe,nt,le);Ye.isTouch&&vs.current!==0&&Date.now()-vs.current>500&&(Ye={...Ye,isLongTouch:!0}),ke!==0&&Date.now()-ke<(Ye.isTouch?1e3:500)&&(Ye={...Ye,isDoubleClick:!0}),rt.current!==Ye.isTouch&&Un(Ye.isTouch),!Ae&&le.cancelable&&$e&&le.preventDefault();const[ct]=Ye.location,Jt=ur(He,ct,qe,nt);if(Ye.kind===Xo&&Jt!==void 0){(Ye.button!==0||Dn.current?.[0]!==ct||Dn.current?.[1]!==-1)&&z(Ye,!0);return}else if(Ye.kind===ca){const en=cr(Ye.group,Ye.bounds,Ye.localEventX,Ye.localEventY);if(en!==void 0){Ye.button===0&&en.onClick(Ye);return}}z(Ye,Ae)},[z,Z,En,ur,cr]);or(\"mouseup\",ga,window,!1),or(\"touchend\",ga,window,!1);const ys=m.useCallback(le=>{const ke=Et.current;if(ke===null)return;const He=Z?.current,Oe=le.target!==ke&&le.target!==He;let Ae,qe,nt=!0;le instanceof MouseEvent?(Ae=le.clientX,qe=le.clientY,nt=le.button<3):(Ae=le.changedTouches[0].clientX,qe=le.changedTouches[0].clientY);const $e=En(ke,Ae,qe,le);rt.current!==$e.isTouch&&Un($e.isTouch),!Oe&&le.cancelable&&nt&&le.preventDefault();const[Ye]=$e.location,ct=ur(ke,Ye,Ae,qe);if($e.kind===Xo&&ct!==void 0)$e.button===0&&Dn.current?.[0]===Ye&&Dn.current?.[1]===-1&&C?.(Ye,ct);else if($e.kind===ca){const Jt=cr($e.group,$e.bounds,$e.localEventX,$e.localEventY);Jt!==void 0&&$e.button===0&&Jt.onClick($e)}},[Z,En,ur,C,cr]);or(\"click\",ys,window,!1);const bl=m.useCallback(le=>{const ke=Et.current,He=Z?.current;if(ke===null||le.target!==ke&&le.target!==He||A===void 0)return;const Oe=En(ke,le.clientX,le.clientY,le);A(Oe,()=>{le.cancelable&&le.preventDefault()})},[Z,En,A]);or(\"contextmenu\",bl,Z?.current??null,!1);const Aa=m.useCallback(le=>{zt.current=new td(le.map(ke=>ke.item)),$r.current=le,Gr.current(),zt.current=void 0},[]),Xr=m.useMemo(()=>new Wq(Aa),[Aa]),va=m.useRef(Xr);va.current=Xr,m.useLayoutEffect(()=>{const le=va.current;if(Sn===void 0||Sn[1]<0){le.setHovered(Sn);return}const ke=S(Sn,!0),He=ut(ke),Oe=He===void 0&&ke.kind===Ie.Custom||He?.needsHover!==void 0&&(typeof He.needsHover==\"boolean\"?He.needsHover:He.needsHover(ke));le.setHovered(Oe?Sn:void 0)},[S,ut,Sn]);const dr=m.useRef(),ve=m.useCallback(le=>{const ke=Et.current;if(ke===null)return;const He=Z?.current,Oe=le.target!==ke&&le.target!==He,Ae=En(ke,le.clientX,le.clientY,le);if(Ae.kind!==\"out-of-bounds\"&&Oe&&!bi.current&&!Ae.isTouch)return;const qe=($e,Ye)=>{Pn(ct=>ct===$e||ct?.[0][0]===$e?.[0][0]&&ct?.[0][1]===$e?.[0][1]&&(ct?.[1][0]===$e?.[1][0]&&ct?.[1][1]===$e?.[1][1]||!Ye)?ct:$e)};if(!tA(Ae,dr.current))Wt(void 0),$?.(Ae),qe(Ae.kind===Ph?void 0:[Ae.location,[Ae.localEventX,Ae.localEventY]],!0),dr.current=Ae;else if(Ae.kind===\"cell\"||Ae.kind===Xo||Ae.kind===ca){let $e=!1,Ye=!0;if(Ae.kind===\"cell\"){const Jt=S(Ae.location);Ye=ut(Jt)?.needsHoverPosition??Jt.kind===Ie.Custom,$e=Ye}else Ae.kind===ca&&($e=!0);const ct=[Ae.location,[Ae.localEventX,Ae.localEventY]];qe(ct,Ye),On.current=ct,$e&&yr(new td([Ae.location]))}const nt=Ae.location[0]>=(U?0:1);Nr(Ae.kind===Xo&&Ae.isEdge&&nt&&Fe===!0),Ma(Ae.kind===\"cell\"&&Ae.isFillHandle),F?.(le),O(Ae)},[Z,En,U,Fe,F,O,$,S,ut,yr]);or(\"mousemove\",ve,window,!0);const ln=m.useCallback(le=>{const ke=Et.current;if(ke===null)return;let He,Oe;I.current!==void 0&&(He=wn(ke,I.current.cell[0],I.current.cell[1]),Oe=I.current.cell),K?.({bounds:He,stopPropagation:()=>le.stopPropagation(),preventDefault:()=>le.preventDefault(),cancel:()=>{},ctrlKey:le.ctrlKey,metaKey:le.metaKey,shiftKey:le.shiftKey,altKey:le.altKey,key:le.key,keyCode:le.keyCode,rawEvent:le,location:Oe})},[K,I,wn]),xi=m.useCallback(le=>{const ke=Et.current;if(ke===null)return;let He,Oe;I.current!==void 0&&(He=wn(ke,I.current.cell[0],I.current.cell[1]),Oe=I.current.cell),ie?.({bounds:He,stopPropagation:()=>le.stopPropagation(),preventDefault:()=>le.preventDefault(),cancel:()=>{},ctrlKey:le.ctrlKey,metaKey:le.metaKey,shiftKey:le.shiftKey,altKey:le.altKey,key:le.key,keyCode:le.keyCode,rawEvent:le,location:Oe})},[ie,I,wn]),so=m.useCallback(le=>{Et.current=le,X!==void 0&&(X.current=le)},[X]),Or=m.useCallback(le=>{const ke=Et.current;if(ke===null||Me===!1||oe){le.preventDefault();return}let He,Oe;const Ae=En(ke,le.clientX,le.clientY);if(Me!==!0&&Ae.kind!==Me){le.preventDefault();return}const qe=(en,Ht)=>{He=en,Oe=Ht};let nt,$e,Ye;const ct=(en,Ht,Tt)=>{nt=en,$e=Ht,Ye=Tt};let Jt=!1;if(Y?.({...Ae,setData:qe,setDragImage:ct,preventDefault:()=>Jt=!0,defaultPrevented:()=>Jt}),!Jt&&He!==void 0&&Oe!==void 0&&le.dataTransfer!==null)if(le.dataTransfer.setData(He,Oe),le.dataTransfer.effectAllowed=\"copyLink\",nt!==void 0&&$e!==void 0&&Ye!==void 0)le.dataTransfer.setDragImage(nt,$e,Ye);else{const[en,Ht]=Ae.location;if(Ht!==void 0){const Tt=document.createElement(\"canvas\"),cn=wn(ke,en,Ht);da(cn!==void 0);const dt=Math.ceil(window.devicePixelRatio??1);Tt.width=cn.width*dt,Tt.height=cn.height*dt;const Gt=Tt.getContext(\"2d\");Gt!==null&&(Gt.scale(dt,dt),Gt.textBaseline=\"middle\",Ht===-1?(Gt.font=Ve.headerFontFull,Gt.fillStyle=Ve.bgHeader,Gt.fillRect(0,0,Tt.width,Tt.height),V_(Gt,0,0,cn.width,cn.height,fn[en],!1,Ve,!1,!1,0,Bt,se,!1)):(Gt.font=Ve.baseFontFull,Gt.fillStyle=Ve.bgCell,Gt.fillRect(0,0,Tt.width,Tt.height),$_(Gt,S([en,Ht]),0,Ht,!1,!1,0,0,cn.width,cn.height,!1,Ve,Ve.bgCell,mt,Bt,1,void 0,!1,0,void 0,void 0,void 0,oo,ut,()=>{}))),Tt.style.left=\"-100%\",Tt.style.position=\"absolute\",Tt.style.width=`${cn.width}px`,Tt.style.height=`${cn.height}px`,document.body.append(Tt),le.dataTransfer.setDragImage(Tt,cn.width/2,cn.height/2),window.setTimeout(()=>{Tt.remove()},0)}}else le.preventDefault()},[Me,oe,En,Y,wn,Ve,fn,Bt,se,S,mt,oo,ut]);or(\"dragstart\",Or,Z?.current??null,!1,!1);const wi=m.useRef(),bs=m.useCallback(le=>{const ke=Et.current;if(Re!==void 0&&le.preventDefault(),ke===null||Ne===void 0)return;const He=En(ke,le.clientX,le.clientY),[Oe,Ae]=He.location,qe=Oe-(U?0:1),[nt,$e]=wi.current??[];(nt!==qe||$e!==Ae)&&(wi.current=[qe,Ae],Ne([qe,Ae],le.dataTransfer))},[U,En,Ne,Re]);or(\"dragover\",bs,Z?.current??null,!1,!1);const Si=m.useCallback(()=>{wi.current=void 0,re?.()},[re]);or(\"dragend\",Si,Z?.current??null,!1,!1);const Se=m.useCallback(le=>{const ke=Et.current;if(ke===null||Re===void 0)return;le.preventDefault();const He=En(ke,le.clientX,le.clientY),[Oe,Ae]=He.location,qe=Oe-(U?0:1);Re([qe,Ae],le.dataTransfer)},[U,En,Re]);or(\"drop\",Se,Z?.current??null,!1,!1);const er=m.useCallback(()=>{ze?.()},[ze]);or(\"dragleave\",er,Z?.current??null,!1,!1);const gn=m.useRef(I);gn.current=I;const Ci=m.useRef(null),Na=m.useCallback(le=>{Et.current===null||!Et.current.contains(document.activeElement)||(le===null&&gn.current.current!==void 0?X?.current?.focus({preventScroll:!0}):le!==null&&le.focus({preventScroll:!0}),Ci.current=le)},[X]);m.useImperativeHandle(t,()=>({focus:()=>{const le=Ci.current;le===null||!document.contains(le)?X?.current?.focus({preventScroll:!0}):le.focus({preventScroll:!0})},getBounds:(le,ke)=>{if(!(X===void 0||X.current===null))return wn(X.current,le??0,ke??-1)},damage:ps}),[X,ps,wn]);const Yn=m.useRef(),Xn=oL(()=>{if(n<50||Mt?.disableAccessibilityTree===!0)return null;let le=vb(fn,Nt,n,W,lt);const ke=U?0:-1;!U&&le[0]?.sourceIndex===0&&(le=le.slice(1));const[He,Oe]=I.current?.cell??[],Ae=I.current?.range,qe=le.map($e=>$e.sourceIndex),nt=Xs(u,Math.min(x,u+o));return He!==void 0&&Oe!==void 0&&!(qe.includes(He)&&nt.includes(Oe))&&Na(null),m.createElement(\"table\",{key:\"access-tree\",role:\"grid\",\"aria-rowcount\":x+1,\"aria-multiselectable\":\"true\",\"aria-colcount\":fn.length+ke},m.createElement(\"thead\",{role:\"rowgroup\"},m.createElement(\"tr\",{role:\"row\",\"aria-rowindex\":1},le.map($e=>m.createElement(\"th\",{role:\"columnheader\",\"aria-selected\":I.columns.hasIndex($e.sourceIndex),\"aria-colindex\":$e.sourceIndex+1+ke,tabIndex:-1,onFocus:Ye=>{if(Ye.target!==Ci.current)return ge?.([$e.sourceIndex,-1])},key:$e.sourceIndex},$e.title)))),m.createElement(\"tbody\",{role:\"rowgroup\"},nt.map($e=>m.createElement(\"tr\",{role:\"row\",\"aria-selected\":I.rows.hasIndex($e),key:$e,\"aria-rowindex\":$e+2},le.map(Ye=>{const ct=Ye.sourceIndex,Jt=qa(ct,$e),en=He===ct&&Oe===$e,Ht=Ae!==void 0&&ct>=Ae.x&&ct<Ae.x+Ae.width&&$e>=Ae.y&&$e<Ae.y+Ae.height,Tt=`glide-cell-${ct}-${$e}`,cn=[ct,$e],dt=S(cn,!0);return m.createElement(\"td\",{key:Jt,role:\"gridcell\",\"aria-colindex\":ct+1+ke,\"aria-selected\":Ht,\"aria-readonly\":Zs(dt)||!$u(dt),id:Tt,\"data-testid\":Tt,onClick:()=>{const Gt=X?.current;if(Gt!=null)return K?.({bounds:wn(Gt,ct,$e),cancel:()=>{},preventDefault:()=>{},stopPropagation:()=>{},ctrlKey:!1,key:\"Enter\",keyCode:13,metaKey:!1,shiftKey:!1,altKey:!1,rawEvent:void 0,location:cn})},onFocusCapture:Gt=>{if(!(Gt.target===Ci.current||Yn.current?.[0]===ct&&Yn.current?.[1]===$e))return Yn.current=cn,ge?.(cn)},ref:en?Na:void 0,tabIndex:-1},Qq(dt,ut))})))))},[n,fn,Nt,W,lt,x,u,o,I,Na,S,X,K,wn,ge],200),xr=P===0||!B?0:Nt>P?1:Ha(-lt/100,0,1),ya=-u*32+xn,Qa=V?Ha(-ya/100,0,1):0,lo=m.useMemo(()=>{if(!xr&&!Qa)return null;const le={position:\"absolute\",top:0,left:Ga,width:n-Ga,height:a,opacity:xr,pointerEvents:\"none\",transition:Xe?void 0:\"opacity 0.2s\",boxShadow:\"inset 13px 0 10px -13px rgba(0, 0, 0, 0.2)\"},ke={position:\"absolute\",top:Zt,left:0,width:n,height:a,opacity:Qa,pointerEvents:\"none\",transition:Pe?void 0:\"opacity 0.2s\",boxShadow:\"inset 0 13px 10px -13px rgba(0, 0, 0, 0.2)\"};return m.createElement(m.Fragment,null,xr>0&&m.createElement(\"div\",{id:\"shadow-x\",style:le}),Qa>0&&m.createElement(\"div\",{id:\"shadow-y\",style:ke}))},[xr,Qa,Ga,n,Xe,Zt,a,Pe]),xl=m.useMemo(()=>({position:\"absolute\",top:0,left:0}),[]);return m.createElement(m.Fragment,null,m.createElement(\"canvas\",{\"data-testid\":\"data-grid-canvas\",tabIndex:0,onKeyDown:ln,onKeyUp:xi,onFocus:T,onBlur:M,ref:so,style:yi},Xn),m.createElement(\"canvas\",{ref:Lt,style:xl}),lo)},Zq=m.memo(m.forwardRef(Kq));function Lu(e,t,n,a){return Ha(Math.round(t-(e.growOffset??0)),Math.ceil(n),Math.floor(a))}const Jq=e=>{const[t,n]=m.useState(),[a,o]=m.useState(),[s,c]=m.useState(),[u,f]=m.useState(),[h,v]=m.useState(!1),[y,x]=m.useState(),[S,w]=m.useState(),[C,R]=m.useState(),[k,T]=m.useState(!1),[M,j]=m.useState(),{onHeaderMenuClick:I,getCellContent:P,onColumnMoved:A,onColumnResize:q,onColumnResizeStart:B,onColumnResizeEnd:V,gridRef:N,maxColumnWidth:_,minColumnWidth:z,onRowMoved:F,lockColumns:O,onColumnProposeMove:$,onMouseDown:W,onMouseUp:U,onItemHovered:K,onDragStart:ie,canvasRef:L}=e,X=(q??V??B)!==void 0,{columns:Y,selection:re}=e,Z=re.columns,oe=m.useCallback(xe=>{const[G,se]=xe.location;s!==void 0&&u!==G&&G>=O?(v(!0),f(G)):S!==void 0&&se!==void 0?(T(!0),R(Math.max(0,se))):a===void 0&&!h&&!k&&K?.(xe)},[s,S,u,K,O,a,h,k]),ne=A!==void 0,me=m.useCallback(xe=>{if(xe.button===0){const[G,se]=xe.location;if(xe.kind===\"out-of-bounds\"&&xe.isEdge&&X){const ge=N?.current?.getBounds(Y.length-1,-1);ge!==void 0&&(n(ge.x),o(Y.length-1))}else if(xe.kind===\"header\"&&G>=O){const ge=L?.current;if(xe.isEdge&&X&&ge){n(xe.bounds.x),o(G);const Re=ge.getBoundingClientRect().width/ge.offsetWidth,ze=xe.bounds.width/Re;B?.(Y[G],ze,G,ze+(Y[G].growOffset??0))}else xe.kind===\"header\"&&ne&&(x(xe.bounds.x),c(G))}else xe.kind===\"cell\"&&O>0&&G===0&&se!==void 0&&F!==void 0&&(j(xe.bounds.y),w(se))}W?.(xe)},[W,X,O,F,N,Y,ne,B,L]),Me=m.useCallback((xe,G)=>{h||k||I?.(xe,G)},[h,k,I]),Fe=m.useRef(-1),Ue=m.useCallback(()=>{Fe.current=-1,w(void 0),R(void 0),j(void 0),T(!1),c(void 0),f(void 0),x(void 0),v(!1),o(void 0),n(void 0)},[]),tt=m.useCallback((xe,G)=>{if(xe.button===0){if(a!==void 0){if(Z?.hasIndex(a)===!0)for(const ge of Z){if(ge===a)continue;const Ne=Y[ge],Re=Lu(Ne,Fe.current,z,_);q?.(Ne,Re,ge,Re+(Ne.growOffset??0))}const se=Lu(Y[a],Fe.current,z,_);if(V?.(Y[a],se,a,se+(Y[a].growOffset??0)),Z.hasIndex(a))for(const ge of Z){if(ge===a)continue;const Ne=Y[ge],Re=Lu(Ne,Fe.current,z,_);V?.(Ne,Re,ge,Re+(Ne.growOffset??0))}}Ue(),s!==void 0&&u!==void 0&&A?.(s,u),S!==void 0&&C!==void 0&&F?.(S,C)}U?.(xe,G)},[U,a,s,u,S,C,Z,V,Y,z,_,q,A,F,Ue]),Le=m.useMemo(()=>{if(!(s===void 0||u===void 0)&&s!==u&&$?.(s,u)!==!1)return{src:s,dest:u}},[s,u,$]),Ve=m.useCallback(xe=>{const G=L?.current;if(s!==void 0&&y!==void 0)Math.abs(xe.clientX-y)>20&&v(!0);else if(S!==void 0&&M!==void 0)Math.abs(xe.clientY-M)>20&&T(!0);else if(a!==void 0&&t!==void 0&&G){const ge=G.getBoundingClientRect().width/G.offsetWidth,Ne=(xe.clientX-t)/ge,Re=Y[a],ze=Lu(Re,Ne,z,_);if(q?.(Re,ze,a,ze+(Re.growOffset??0)),Fe.current=Ne,Z?.first()===a)for(const Ge of Z){if(Ge===a)continue;const Xe=Y[Ge],Pe=Lu(Xe,Fe.current,z,_);q?.(Xe,Pe,Ge,Pe+(Xe.growOffset??0))}}},[s,y,S,M,a,t,Y,z,_,q,Z,L]),Je=m.useCallback((xe,G)=>{if(S===void 0||C===void 0)return P(xe,G);let[se,ge]=xe;return ge===C?ge=S:(ge>C&&(ge-=1),ge>=S&&(ge+=1)),P([se,ge],G)},[S,C,P]),jt=m.useCallback(xe=>{ie?.(xe),xe.defaultPrevented()||Ue()},[Ue,ie]);return m.createElement(Zq,{accessibilityHeight:e.accessibilityHeight,canvasRef:e.canvasRef,cellXOffset:e.cellXOffset,cellYOffset:e.cellYOffset,columns:e.columns,disabledRows:e.disabledRows,drawFocusRing:e.drawFocusRing,drawHeader:e.drawHeader,drawCell:e.drawCell,enableGroups:e.enableGroups,eventTargetRef:e.eventTargetRef,experimental:e.experimental,fillHandle:e.fillHandle,firstColAccessible:e.firstColAccessible,fixedShadowX:e.fixedShadowX,fixedShadowY:e.fixedShadowY,freezeColumns:e.freezeColumns,getCellRenderer:e.getCellRenderer,getGroupDetails:e.getGroupDetails,getRowThemeOverride:e.getRowThemeOverride,groupHeaderHeight:e.groupHeaderHeight,headerHeight:e.headerHeight,headerIcons:e.headerIcons,height:e.height,highlightRegions:e.highlightRegions,imageWindowLoader:e.imageWindowLoader,resizeColumn:a,isDraggable:e.isDraggable,isFilling:e.isFilling,isFocused:e.isFocused,onCanvasBlur:e.onCanvasBlur,onCanvasFocused:e.onCanvasFocused,onCellFocused:e.onCellFocused,onContextMenu:e.onContextMenu,onDragEnd:e.onDragEnd,onDragLeave:e.onDragLeave,onDragOverCell:e.onDragOverCell,onDrop:e.onDrop,onKeyDown:e.onKeyDown,onKeyUp:e.onKeyUp,onMouseMove:e.onMouseMove,prelightCells:e.prelightCells,rowHeight:e.rowHeight,rows:e.rows,selection:e.selection,smoothScrollX:e.smoothScrollX,smoothScrollY:e.smoothScrollY,theme:e.theme,freezeTrailingRows:e.freezeTrailingRows,hasAppendRow:e.hasAppendRow,translateX:e.translateX,translateY:e.translateY,verticalBorder:e.verticalBorder,width:e.width,getCellContent:Je,isResizing:a!==void 0,onHeaderMenuClick:Me,isDragging:h,onItemHovered:oe,onDragStart:jt,onMouseDown:me,allowResize:X,onMouseUp:tt,dragAndDropState:Le,onMouseMoveRaw:Ve,ref:N})};function e9(e){const t=m.useRef(null),[n,a]=m.useState({width:e?.[0],height:e?.[1]});return m.useLayoutEffect(()=>{const o=c=>{for(const u of c){const{width:f,height:h}=u&&u.contentRect||{};a(v=>v.width===f&&v.height===h?v:{width:f,height:h})}},s=new window.ResizeObserver(o);return t.current&&s.observe(t.current,void 0),()=>{s.disconnect()}},[t.current]),{ref:t,...n}}const t9=(e,t,n)=>{const a=m.useRef(null),o=m.useRef(null),s=m.useRef(null),c=m.useRef(0),u=m.useRef(t);u.current=t;const f=n.current;m.useEffect(()=>{const h=()=>{if(o.current===!1&&f!==null){const x=[f.scrollLeft,f.scrollTop];if(s.current?.[0]===x[0]&&s.current?.[1]===x[1])if(c.current>10){s.current=null,o.current=null;return}else c.current++;else c.current=0,u.current(x[0],x[1]),s.current=x;a.current=window.setTimeout(h,8.333333333333334)}},v=()=>{o.current=!0,s.current=null,a.current!==null&&(window.clearTimeout(a.current),a.current=null)},y=x=>{x.touches.length===0&&(o.current=!1,c.current=0,a.current=window.setTimeout(h,8.333333333333334))};if(e&&f!==null){const x=f;return x.addEventListener(\"touchstart\",v),x.addEventListener(\"touchend\",y),()=>{x.removeEventListener(\"touchstart\",v),x.removeEventListener(\"touchend\",y),a.current!==null&&window.clearTimeout(a.current)}}},[e,f])},n9=()=>e=>e.isSafari?\"scroll\":\"auto\",r9=kr(\"div\")({name:\"ScrollRegionStyle\",class:\"gdg-s1dgczr6\",propsAsIs:!1,vars:{\"s1dgczr6-0\":[n9()]}});function a9(e){const[t,n]=m.useState(!1),a=typeof window>\"u\"?null:window,o=m.useRef(0);return or(\"touchstart\",m.useCallback(()=>{window.clearTimeout(o.current),n(!0)},[]),a,!0,!1),or(\"touchend\",m.useCallback(s=>{s.touches.length===0&&(o.current=window.setTimeout(()=>n(!1),e))},[e]),a,!0,!1),t}const i9=e=>{const{children:t,clientHeight:n,scrollHeight:a,scrollWidth:o,update:s,draggable:c,className:u,preventDiagonalScrolling:f=!1,paddingBottom:h=0,paddingRight:v=0,rightElement:y,rightElementProps:x,kineticScrollPerfHack:S=!1,scrollRef:w,initialSize:C}=e,R=[],k=x?.sticky??!1,T=x?.fill??!1,M=m.useRef(0),j=m.useRef(0),I=m.useRef(null),P=typeof window>\"u\"?1:window.devicePixelRatio,A=m.useRef({scrollLeft:0,scrollTop:0,lockDirection:void 0}),q=m.useRef(null),B=a9(200),[V,N]=m.useState(!0),_=m.useRef(0);m.useLayoutEffect(()=>{if(!V||B||A.current.lockDirection===void 0)return;const Y=I.current;if(Y===null)return;const[re,Z]=A.current.lockDirection;re!==void 0?Y.scrollLeft=re:Z!==void 0&&(Y.scrollTop=Z),A.current.lockDirection=void 0},[B,V]);const z=m.useCallback((Y,re)=>{const Z=I.current;if(Z===null)return;re=re??Z.scrollTop,Y=Y??Z.scrollLeft;const oe=A.current.scrollTop,ne=A.current.scrollLeft,me=Y-ne,Me=re-oe;B&&me!==0&&Me!==0&&(Math.abs(me)>3||Math.abs(Me)>3)&&f&&A.current.lockDirection===void 0&&(A.current.lockDirection=Math.abs(me)<Math.abs(Me)?[ne,void 0]:[void 0,oe]);const Fe=A.current.lockDirection;Y=Fe?.[0]??Y,re=Fe?.[1]??re,A.current.scrollLeft=Y,A.current.scrollTop=re;const Ue=Z.clientWidth,tt=Z.clientHeight,Le=re,Ve=j.current-Le,Je=Z.scrollHeight-tt;if(j.current=Le,Je>0&&(Math.abs(Ve)>2e3||Le===0||Le===Je)&&a>Z.scrollHeight+5){const jt=Le/Je,xe=(a-tt)*jt;M.current=xe-Le}Fe!==void 0&&(window.clearTimeout(_.current),N(!1),_.current=window.setTimeout(()=>N(!0),200)),s({x:Y,y:Le+M.current,width:Ue-v,height:tt-h,paddingRight:q.current?.clientWidth??0})},[h,v,a,s,f,B]);t9(S&&jh.value,z,I);const F=m.useRef(z);F.current=z;const O=m.useRef(),$=m.useRef(!1);m.useLayoutEffect(()=>{$.current?z():$.current=!0},[z,h,v]);const W=m.useCallback(Y=>{I.current=Y,w!==void 0&&(w.current=Y)},[w]);let U=0,K=0;for(R.push(m.createElement(\"div\",{key:U++,style:{width:o,height:0}}));K<a;){const Y=Math.min(5e6,a-K);R.push(m.createElement(\"div\",{key:U++,style:{width:0,height:Y}})),K+=Y}const{ref:ie,width:L,height:X}=e9(C);return typeof window<\"u\"&&(O.current?.height!==X||O.current?.width!==L)&&(window.setTimeout(()=>F.current(),0),O.current={width:L,height:X}),(L??0)===0||(X??0)===0?m.createElement(\"div\",{ref:ie}):m.createElement(\"div\",{ref:ie},m.createElement(r9,{isSafari:jh.value},m.createElement(\"div\",{className:\"dvn-underlay\"},t),m.createElement(\"div\",{ref:W,style:O.current,draggable:c,onDragStart:Y=>{c||(Y.stopPropagation(),Y.preventDefault())},className:\"dvn-scroller \"+(u??\"\"),onScroll:()=>z()},m.createElement(\"div\",{className:\"dvn-scroll-inner\"+(y===void 0?\" dvn-hidden\":\"\")},m.createElement(\"div\",{className:\"dvn-stack\"},R),y!==void 0&&m.createElement(m.Fragment,null,!T&&m.createElement(\"div\",{className:\"dvn-spacer\"}),m.createElement(\"div\",{ref:q,style:{height:X,maxHeight:n-Math.ceil(P%1),position:\"sticky\",top:0,paddingLeft:1,marginBottom:-40,marginRight:v,flexGrow:T?1:void 0,right:k?v??0:void 0,pointerEvents:\"auto\"}},y))))))},o9=e=>{const{columns:t,rows:n,rowHeight:a,headerHeight:o,groupHeaderHeight:s,enableGroups:c,freezeColumns:u,experimental:f,nonGrowWidth:h,clientSize:v,className:y,onVisibleRegionChanged:x,scrollRef:S,preventDiagonalScrolling:w,rightElement:C,rightElementProps:R,overscrollX:k,overscrollY:T,initialSize:M,smoothScrollX:j=!1,smoothScrollY:I=!1,isDraggable:P}=e,{paddingRight:A,paddingBottom:q}=f??{},[B,V]=v,N=m.useRef(),_=m.useRef(),z=m.useRef(),F=m.useRef(),O=h+Math.max(0,k??0);let $=c?o+s:o;if(typeof a==\"number\")$+=n*a;else for(let ie=0;ie<n;ie++)$+=a(ie);T!==void 0&&($+=T);const W=m.useRef(),U=m.useCallback(()=>{if(W.current===void 0)return;const ie={...W.current};let L=0,X=ie.x<0?-ie.x:0,Y=0,re=0;ie.x=ie.x<0?0:ie.x;let Z=0;for(let Ue=0;Ue<u;Ue++)Z+=t[Ue].width;for(const Ue of t){const tt=L-Z;if(ie.x>=tt+Ue.width)L+=Ue.width,re++,Y++;else if(ie.x>tt)L+=Ue.width,j?X+=tt-ie.x:re++,Y++;else if(ie.x+ie.width>tt)L+=Ue.width,Y++;else break}let oe=0,ne=0,me=0;if(typeof a==\"number\")I?(ne=Math.floor(ie.y/a),oe=ne*a-ie.y):ne=Math.ceil(ie.y/a),me=Math.ceil(ie.height/a)+ne,oe<0&&me++;else{let Ue=0;for(let tt=0;tt<n;tt++){const Le=a(tt),Ve=Ue+(I?0:Le/2);if(ie.y>=Ue+Le)Ue+=Le,ne++,me++;else if(ie.y>Ve)Ue+=Le,I?oe+=Ve-ie.y:ne++,me++;else if(ie.y+ie.height>Le/2+Ue)Ue+=Le,me++;else break}}const Me={x:re,y:ne,width:Y-re,height:me-ne},Fe=N.current;(Fe===void 0||Fe.y!==Me.y||Fe.x!==Me.x||Fe.height!==Me.height||Fe.width!==Me.width||_.current!==X||z.current!==oe||ie.width!==F.current?.[0]||ie.height!==F.current?.[1])&&(x?.({x:re,y:ne,width:Y-re,height:me-ne},ie.width,ie.height,ie.paddingRight??0,X,oe),N.current=Me,_.current=X,z.current=oe,F.current=[ie.width,ie.height])},[t,a,n,x,u,j,I]),K=m.useCallback(ie=>{W.current=ie,U()},[U]);return m.useEffect(()=>{U()},[U]),m.createElement(i9,{scrollRef:S,className:y,kineticScrollPerfHack:f?.kineticScrollPerfHack,preventDiagonalScrolling:w,draggable:P===!0||typeof P==\"string\",scrollWidth:O+(A??0),scrollHeight:$+(q??0),clientHeight:V,rightElement:C,paddingBottom:q,paddingRight:A,rightElementProps:R,update:K,initialSize:M},m.createElement(Jq,{eventTargetRef:S,width:B,height:V,accessibilityHeight:e.accessibilityHeight,canvasRef:e.canvasRef,cellXOffset:e.cellXOffset,cellYOffset:e.cellYOffset,columns:e.columns,disabledRows:e.disabledRows,enableGroups:e.enableGroups,fillHandle:e.fillHandle,firstColAccessible:e.firstColAccessible,fixedShadowX:e.fixedShadowX,fixedShadowY:e.fixedShadowY,freezeColumns:e.freezeColumns,getCellContent:e.getCellContent,getCellRenderer:e.getCellRenderer,getGroupDetails:e.getGroupDetails,getRowThemeOverride:e.getRowThemeOverride,groupHeaderHeight:e.groupHeaderHeight,headerHeight:e.headerHeight,highlightRegions:e.highlightRegions,imageWindowLoader:e.imageWindowLoader,isFilling:e.isFilling,isFocused:e.isFocused,lockColumns:e.lockColumns,maxColumnWidth:e.maxColumnWidth,minColumnWidth:e.minColumnWidth,onHeaderMenuClick:e.onHeaderMenuClick,onMouseMove:e.onMouseMove,prelightCells:e.prelightCells,rowHeight:e.rowHeight,rows:e.rows,selection:e.selection,theme:e.theme,freezeTrailingRows:e.freezeTrailingRows,hasAppendRow:e.hasAppendRow,translateX:e.translateX,translateY:e.translateY,onColumnProposeMove:e.onColumnProposeMove,verticalBorder:e.verticalBorder,drawFocusRing:e.drawFocusRing,drawHeader:e.drawHeader,drawCell:e.drawCell,experimental:e.experimental,gridRef:e.gridRef,headerIcons:e.headerIcons,isDraggable:e.isDraggable,onCanvasBlur:e.onCanvasBlur,onCanvasFocused:e.onCanvasFocused,onCellFocused:e.onCellFocused,onColumnMoved:e.onColumnMoved,onColumnResize:e.onColumnResize,onColumnResizeEnd:e.onColumnResizeEnd,onColumnResizeStart:e.onColumnResizeStart,onContextMenu:e.onContextMenu,onDragEnd:e.onDragEnd,onDragLeave:e.onDragLeave,onDragOverCell:e.onDragOverCell,onDragStart:e.onDragStart,onDrop:e.onDrop,onItemHovered:e.onItemHovered,onKeyDown:e.onKeyDown,onKeyUp:e.onKeyUp,onMouseDown:e.onMouseDown,onMouseUp:e.onMouseUp,onRowMoved:e.onRowMoved,smoothScrollX:e.smoothScrollX,smoothScrollY:e.smoothScrollY}))},s9=kr(\"div\")({name:\"SearchWrapper\",class:\"gdg-seveqep\",propsAsIs:!1}),l9=m.createElement(\"svg\",{className:\"button-icon\",viewBox:\"0 0 512 512\"},m.createElement(\"path\",{fill:\"none\",stroke:\"currentColor\",strokeLinecap:\"round\",strokeLinejoin:\"round\",strokeWidth:\"48\",d:\"M112 244l144-144 144 144M256 120v292\"})),c9=m.createElement(\"svg\",{className:\"button-icon\",viewBox:\"0 0 512 512\"},m.createElement(\"path\",{fill:\"none\",stroke:\"currentColor\",strokeLinecap:\"round\",strokeLinejoin:\"round\",strokeWidth:\"48\",d:\"M112 268l144 144 144-144M256 392V100\"})),u9=m.createElement(\"svg\",{className:\"button-icon\",viewBox:\"0 0 512 512\"},m.createElement(\"path\",{fill:\"none\",stroke:\"currentColor\",strokeLinecap:\"round\",strokeLinejoin:\"round\",strokeWidth:\"32\",d:\"M368 368L144 144M368 144L144 368\"})),d9=10,f9=e=>{const{canvasRef:t,cellYOffset:n,rows:a,columns:o,searchInputRef:s,searchValue:c,searchResults:u,onSearchValueChange:f,getCellsForSelection:h,onSearchResultsChanged:v,showSearch:y=!1,onSearchClose:x}=e,[S]=m.useState(()=>\"search-box-\"+Math.round(Math.random()*1e3)),[w,C]=m.useState(\"\"),R=c??w,k=m.useCallback(L=>{C(L),f?.(L)},[f]),[T,M]=m.useState(),j=m.useRef(T);j.current=T,m.useEffect(()=>{u!==void 0&&(u.length>0?M(L=>({rowsSearched:a,results:u.length,selectedIndex:L?.selectedIndex??-1})):M(void 0))},[a,u]);const I=m.useRef();I.current===void 0&&(I.current=new AbortController);const P=m.useRef(),[A,q]=m.useState([]),B=u??A,V=m.useCallback(()=>{P.current!==void 0&&(window.cancelAnimationFrame(P.current),P.current=void 0,I.current.abort())},[]),N=m.useRef(n);N.current=n;const _=m.useCallback(L=>{const X=new RegExp(L.replace(/([$()*+.?[\\\\\\]^{|}-])/g,\"\\\\$1\"),\"i\");let Y=N.current,re=Math.min(10,a),Z=0;M(void 0),q([]);const oe=[],ne=async()=>{if(h===void 0)return;const me=performance.now(),Me=a-Z;let Fe=h({x:0,y:Y,width:o.length,height:Math.min(re,Me,a-Y)},I.current.signal);typeof Fe==\"function\"&&(Fe=await Fe());let Ue=!1;for(const[xe,G]of Fe.entries())for(const[se,ge]of G.entries()){let Ne;switch(ge.kind){case Ie.Text:case Ie.Number:Ne=ge.displayData;break;case Ie.Uri:case Ie.Markdown:Ne=ge.data;break;case Ie.Boolean:Ne=typeof ge.data==\"boolean\"?ge.data.toString():void 0;break;case Ie.Image:case Ie.Bubble:Ne=ge.data.join(\"🐳\");break;case Ie.Custom:Ne=ge.copyData;break}Ne!==void 0&&X.test(Ne)&&(oe.push([se,xe+Y]),Ue=!0)}const tt=performance.now();Ue&&q([...oe]),Z+=Fe.length,da(Z<=a);const Le=j.current?.selectedIndex??-1;M({results:oe.length,rowsSearched:Z,selectedIndex:Le}),v?.(oe,Le),Y+re>=a?Y=0:Y+=re;const Ve=tt-me,Je=Math.max(Ve,1),jt=d9/Je;re=Math.ceil(re*jt),Z<a&&oe.length<1e3&&(P.current=window.requestAnimationFrame(ne))};V(),P.current=window.requestAnimationFrame(ne)},[V,o.length,h,v,a]),z=m.useCallback(()=>{x?.(),M(void 0),q([]),v?.([],-1),V(),t?.current?.focus()},[V,t,x,v]),F=m.useCallback(L=>{k(L.target.value),u===void 0&&(L.target.value===\"\"?(M(void 0),q([]),V()):_(L.target.value))},[_,V,k,u]);m.useEffect(()=>{y&&s.current!==null&&(k(\"\"),s.current.focus({preventScroll:!0}))},[y,s,k]);const O=m.useCallback(L=>{if(L?.stopPropagation?.(),T===void 0)return;const X=(T.selectedIndex+1)%T.results;M({...T,selectedIndex:X}),v?.(B,X)},[T,v,B]),$=m.useCallback(L=>{if(L?.stopPropagation?.(),T===void 0)return;let X=(T.selectedIndex-1)%T.results;X<0&&(X+=T.results),M({...T,selectedIndex:X}),v?.(B,X)},[v,B,T]),W=m.useCallback(L=>{(L.ctrlKey||L.metaKey)&&L.nativeEvent.code===\"KeyF\"||L.key===\"Escape\"?(z(),L.stopPropagation(),L.preventDefault()):L.key===\"Enter\"&&(L.shiftKey?$():O())},[z,O,$]);m.useEffect(()=>()=>{V()},[V]);const[U,K]=m.useState(!1);m.useEffect(()=>{if(y)K(!0);else{const L=setTimeout(()=>K(!1),150);return()=>clearTimeout(L)}},[y]);const ie=m.useMemo(()=>{if(!y&&!U)return null;let L;T!==void 0&&(L=T.results>=1e3?\"over 1000\":`${T.results} result${T.results!==1?\"s\":\"\"}`,T.selectedIndex>=0&&(L=`${T.selectedIndex+1} of ${L}`));const X=Z=>{Z.stopPropagation()},re={width:`${Math.floor((T?.rowsSearched??0)/a*100)}%`};return m.createElement(s9,{className:y?\"\":\"out\",onMouseDown:X,onMouseMove:X,onMouseUp:X,onClick:X},m.createElement(\"div\",{className:\"gdg-search-bar-inner\"},m.createElement(\"input\",{id:S,\"aria-hidden\":!y,\"data-testid\":\"search-input\",ref:s,onChange:F,value:R,tabIndex:y?void 0:-1,onKeyDownCapture:W}),m.createElement(\"button\",{\"aria-label\":\"Previous Result\",\"aria-hidden\":!y,tabIndex:y?void 0:-1,onClick:$,disabled:(T?.results??0)===0},l9),m.createElement(\"button\",{\"aria-label\":\"Next Result\",\"aria-hidden\":!y,tabIndex:y?void 0:-1,onClick:O,disabled:(T?.results??0)===0},c9),x!==void 0&&m.createElement(\"button\",{\"aria-label\":\"Close Search\",\"aria-hidden\":!y,\"data-testid\":\"search-close-button\",tabIndex:y?void 0:-1,onClick:z},u9)),T!==void 0?m.createElement(m.Fragment,null,m.createElement(\"div\",{className:\"gdg-search-status\"},m.createElement(\"div\",{\"data-testid\":\"search-result-area\"},L)),m.createElement(\"div\",{className:\"gdg-search-progress\",style:re})):m.createElement(\"div\",{className:\"gdg-search-status\"},m.createElement(\"label\",{htmlFor:S},\"Type to search\")))},[y,U,T,a,S,s,F,R,W,$,O,x,z]);return m.createElement(m.Fragment,null,m.createElement(o9,{prelightCells:B,accessibilityHeight:e.accessibilityHeight,canvasRef:e.canvasRef,cellXOffset:e.cellXOffset,cellYOffset:e.cellYOffset,className:e.className,clientSize:e.clientSize,columns:e.columns,disabledRows:e.disabledRows,enableGroups:e.enableGroups,fillHandle:e.fillHandle,firstColAccessible:e.firstColAccessible,nonGrowWidth:e.nonGrowWidth,fixedShadowX:e.fixedShadowX,fixedShadowY:e.fixedShadowY,freezeColumns:e.freezeColumns,getCellContent:e.getCellContent,getCellRenderer:e.getCellRenderer,getGroupDetails:e.getGroupDetails,getRowThemeOverride:e.getRowThemeOverride,groupHeaderHeight:e.groupHeaderHeight,headerHeight:e.headerHeight,highlightRegions:e.highlightRegions,imageWindowLoader:e.imageWindowLoader,initialSize:e.initialSize,isFilling:e.isFilling,isFocused:e.isFocused,lockColumns:e.lockColumns,maxColumnWidth:e.maxColumnWidth,minColumnWidth:e.minColumnWidth,onHeaderMenuClick:e.onHeaderMenuClick,onMouseMove:e.onMouseMove,onVisibleRegionChanged:e.onVisibleRegionChanged,overscrollX:e.overscrollX,overscrollY:e.overscrollY,preventDiagonalScrolling:e.preventDiagonalScrolling,rightElement:e.rightElement,rightElementProps:e.rightElementProps,rowHeight:e.rowHeight,rows:e.rows,scrollRef:e.scrollRef,selection:e.selection,theme:e.theme,freezeTrailingRows:e.freezeTrailingRows,hasAppendRow:e.hasAppendRow,translateX:e.translateX,translateY:e.translateY,verticalBorder:e.verticalBorder,onColumnProposeMove:e.onColumnProposeMove,drawFocusRing:e.drawFocusRing,drawCell:e.drawCell,drawHeader:e.drawHeader,experimental:e.experimental,gridRef:e.gridRef,headerIcons:e.headerIcons,isDraggable:e.isDraggable,onCanvasBlur:e.onCanvasBlur,onCanvasFocused:e.onCanvasFocused,onCellFocused:e.onCellFocused,onColumnMoved:e.onColumnMoved,onColumnResize:e.onColumnResize,onColumnResizeEnd:e.onColumnResizeEnd,onColumnResizeStart:e.onColumnResizeStart,onContextMenu:e.onContextMenu,onDragEnd:e.onDragEnd,onDragLeave:e.onDragLeave,onDragOverCell:e.onDragOverCell,onDragStart:e.onDragStart,onDrop:e.onDrop,onItemHovered:e.onItemHovered,onKeyDown:e.onKeyDown,onKeyUp:e.onKeyUp,onMouseDown:e.onMouseDown,onMouseUp:e.onMouseUp,onRowMoved:e.onRowMoved,smoothScrollX:e.smoothScrollX,smoothScrollY:e.smoothScrollY}),ie)};class nA extends m.PureComponent{wrapperRef=m.createRef();componentDidMount(){document.addEventListener(\"touchend\",this.clickOutside,!0),document.addEventListener(\"mousedown\",this.clickOutside,!0),document.addEventListener(\"contextmenu\",this.clickOutside,!0)}componentWillUnmount(){document.removeEventListener(\"touchend\",this.clickOutside,!0),document.removeEventListener(\"mousedown\",this.clickOutside,!0),document.removeEventListener(\"contextmenu\",this.clickOutside,!0)}clickOutside=t=>{if(!(this.props.isOutsideClick&&!this.props.isOutsideClick(t))&&this.wrapperRef.current!==null&&!this.wrapperRef.current.contains(t.target)){let n=t.target;for(;n!==null;){if(n.classList.contains(\"click-outside-ignore\"))return;n=n.parentElement}this.props.onClickOutside()}};render(){const{onClickOutside:t,isOutsideClick:n,...a}=this.props;return m.createElement(\"div\",{...a,ref:this.wrapperRef},this.props.children)}}const h9=()=>e=>Math.max(16,e.targetHeight-10),m9=kr(\"input\")({name:\"RenameInput\",class:\"gdg-r17m35ur\",propsAsIs:!1,vars:{\"r17m35ur-0\":[h9(),\"px\"]}}),p9=e=>{const{bounds:t,group:n,onClose:a,canvasBounds:o,onFinish:s}=e,[c,u]=At.useState(n);return At.createElement(nA,{style:{position:\"absolute\",left:t.x-o.left+1,top:t.y-o.top,width:t.width-2,height:t.height},className:\"gdg-c1tqibwd\",onClickOutside:a},At.createElement(m9,{targetHeight:t.height,\"data-testid\":\"group-rename-input\",value:c,onBlur:a,onFocus:f=>f.target.setSelectionRange(0,c.length),onChange:f=>u(f.target.value),onKeyDown:f=>{f.key===\"Enter\"?s(c):f.key===\"Escape\"&&a()},autoFocus:!0}))};function g9(e,t){return e===void 0?!1:e.length>1&&e.startsWith(\"_\")?Number.parseInt(e.slice(1))===t.keyCode:e.length===1&&e>=\"a\"&&e<=\"z\"?e.toUpperCase().codePointAt(0)===t.keyCode:e===t.key}function xt(e,t,n){const a=rA(e,t);return a&&(n.didMatch=!0),a}function rA(e,t){if(e.length===0)return!1;if(e.includes(\"|\")){const f=e.split(\"|\");for(const h of f)if(rA(h,t))return!0;return!1}let n=!1,a=!1,o=!1,s=!1;const c=e.split(\"+\"),u=c.pop();if(!g9(u,t))return!1;if(c[0]===\"any\")return!0;for(const f of c)switch(f){case\"ctrl\":n=!0;break;case\"shift\":a=!0;break;case\"alt\":o=!0;break;case\"meta\":s=!0;break;case\"primary\":zh.value?s=!0:n=!0;break}return t.altKey===o&&t.ctrlKey===n&&t.shiftKey===a&&t.metaKey===s}function v9(e,t,n,a,o,s){const c=At.useCallback((h,v,y,x)=>{(s===\"cell\"||s===\"multi-cell\")&&h!==void 0&&(h={...h,range:{x:h.cell[0],y:h.cell[1],width:1,height:1}});const S=n===\"mixed\"&&(y||x===\"drag\"),w=a===\"mixed\"&&S,C=o===\"mixed\"&&S;let R={current:h===void 0?void 0:{...h,rangeStack:x===\"drag\"?e.current?.rangeStack??[]:[]},columns:w?e.columns:vt.empty(),rows:C?e.rows:vt.empty()};y&&(s===\"multi-rect\"||s===\"multi-cell\")&&R.current!==void 0&&e.current!==void 0&&(R={...R,current:{...R.current,rangeStack:[...e.current.rangeStack,e.current.range]}}),t(R,v)},[a,e,n,s,o,t]),u=At.useCallback((h,v,y)=>{h=h??e.rows,v!==void 0&&(h=h.add(v));let x;if(o===\"exclusive\"&&h.length>0)x={current:void 0,columns:vt.empty(),rows:h};else{const S=y&&n===\"mixed\",w=y&&a===\"mixed\";x={current:S?e.current:void 0,columns:w?e.columns:vt.empty(),rows:h}}t(x,!1)},[a,e,n,o,t]),f=At.useCallback((h,v,y)=>{h=h??e.columns,v!==void 0&&(h=h.add(v));let x;if(a===\"exclusive\"&&h.length>0)x={current:void 0,rows:vt.empty(),columns:h};else{const S=y&&n===\"mixed\",w=y&&o===\"mixed\";x={current:S?e.current:void 0,rows:w?e.rows:vt.empty(),columns:h}}t(x,!1)},[a,e,n,o,t]);return[c,u,f]}function y9(e,t,n,a,o){const s=m.useCallback(h=>{if(e===!0){const v=[];for(let y=h.y;y<h.y+h.height;y++){const x=[];for(let S=h.x;S<h.x+h.width;S++)S<0||y>=o?x.push({kind:Ie.Loading,allowOverlay:!1}):x.push(t([S,y]));v.push(x)}return v}return e?.(h,a.signal)??[]},[a.signal,t,e,o]),c=e!==void 0?s:void 0,u=m.useCallback(h=>{if(c===void 0)return[];const v={...h,x:h.x-n};if(v.x<0){v.x=0,v.width--;const y=c(v,a.signal);return typeof y==\"function\"?async()=>(await y()).map(x=>[{kind:Ie.Loading,allowOverlay:!1},...x]):y.map(x=>[{kind:Ie.Loading,allowOverlay:!1},...x])}return c(v,a.signal)},[a.signal,c,n]);return[e!==void 0?u:void 0,c]}function b9(e){if(e.copyData!==void 0)return{formatted:e.copyData,rawValue:e.copyData,format:\"string\"};switch(e.kind){case Ie.Boolean:return{formatted:e.data===!0?\"TRUE\":e.data===!1?\"FALSE\":e.data===Jb?\"INDETERMINATE\":\"\",rawValue:e.data,format:\"boolean\"};case Ie.Custom:return{formatted:e.copyData,rawValue:e.copyData,format:\"string\"};case Ie.Image:case Ie.Bubble:return{formatted:e.data,rawValue:e.data,format:\"string-array\"};case Ie.Drilldown:return{formatted:e.data.map(t=>t.text),rawValue:e.data.map(t=>t.text),format:\"string-array\"};case Ie.Text:return{formatted:e.displayData??e.data,rawValue:e.data,format:\"string\"};case Ie.Uri:return{formatted:e.displayData??e.data,rawValue:e.data,format:\"url\"};case Ie.Markdown:case Ie.RowID:return{formatted:e.data,rawValue:e.data,format:\"string\"};case Ie.Number:return{formatted:e.displayData,rawValue:e.data,format:\"number\"};case Ie.Loading:return{formatted:\"#LOADING\",rawValue:\"\",format:\"string\"};case Ie.Protected:return{formatted:\"************\",rawValue:\"\",format:\"string\"};default:dd()}}function x9(e,t){return e.map((a,o)=>{const s=t[o];return a.map(c=>c.span!==void 0&&c.span[0]!==s?{formatted:\"\",rawValue:\"\",format:\"string\"}:b9(c))})}function pT(e,t){return(t?/[\\t\\n\",]/:/[\\t\\n\"]/).test(e)&&(e=`\"${e.replace(/\"/g,'\"\"')}\"`),e}function w9(e){const t=[];for(const n of e){const a=[];for(const o of n)o.format===\"url\"?a.push(o.rawValue?.toString()??\"\"):o.format===\"string-array\"?a.push(o.formatted.map(s=>pT(s,!0)).join(\",\")):a.push(pT(o.formatted,!1));t.push(a.join(\"\t\"))}return t.join(`\n`)}function P0(e){return e.replace(/\\t/g,\" \").replace(/ {2,}/g,t=>\"<span> </span>\".repeat(t.length))}function gT(e){return'\"'+e.replace(/&/g,\"&\").replace(/\"/g,\""\").replace(/</g,\"<\").replace(/>/g,\">\")+'\"'}function S9(e){return e.replace(/"/g,'\"').replace(/</g,\"<\").replace(/>/g,\">\").replace(/&/g,\"&\")}function C9(e){const t=[];t.push('<style type=\"text/css\"><!--br {mso-data-placement:same-cell;}--></style>',\"<table><tbody>\");for(const n of e){t.push(\"<tr>\");for(const a of n){const o=`gdg-format=\"${a.format}\"`;a.format===\"url\"?t.push(`<td ${o}><a href=\"${a.rawValue}\">${P0(a.formatted)}</a></td>`):a.format===\"string-array\"?t.push(`<td ${o}><ol>${a.formatted.map((s,c)=>`<li gdg-raw-value=${gT(a.rawValue[c])}>`+P0(s)+\"</li>\").join(\"\")}</ol></td>`):t.push(`<td gdg-raw-value=${gT(a.rawValue?.toString()??\"\")} ${o}>${P0(a.formatted)}</td>`)}t.push(\"</tr>\")}return t.push(\"</tbody></table>\"),t.join(\"\")}function R9(e,t){const n=x9(e,t),a=w9(n),o=C9(n);return{textPlain:a,textHtml:o}}function vT(e){const t=document.createElement(\"html\");t.innerHTML=e.replace(/ /g,\" \");const n=t.querySelector(\"table\");if(n===null)return;const a=[n],o=[];let s;for(;a.length>0;){const c=a.pop();if(c===void 0)break;if(c instanceof HTMLTableElement||c.nodeName===\"TBODY\")a.push(...[...c.children].reverse());else if(c instanceof HTMLTableRowElement)s!==void 0&&o.push(s),s=[],a.push(...[...c.children].reverse());else if(c instanceof HTMLTableCellElement){const u=c.cloneNode(!0),h=u.children.length===1&&u.children[0].nodeName===\"P\"?u.children[0]:null,v=h?.children.length===1&&h.children[0].nodeName===\"FONT\",y=u.querySelectorAll(\"br\");for(const w of y)w.replaceWith(`\n`);const x=u.getAttribute(\"gdg-raw-value\"),S=u.getAttribute(\"gdg-format\")??\"string\";if(u.querySelector(\"a\")!==null)s?.push({rawValue:u.querySelector(\"a\")?.getAttribute(\"href\")??\"\",formatted:u.textContent??\"\",format:S});else if(u.querySelector(\"ol\")!==null){const w=u.querySelectorAll(\"li\");s?.push({rawValue:[...w].map(C=>C.getAttribute(\"gdg-raw-value\")??\"\"),formatted:[...w].map(C=>C.textContent??\"\"),format:\"string-array\"})}else if(x!==null)s?.push({rawValue:S9(x),formatted:u.textContent??\"\",format:S});else{let w=u.textContent??\"\";v&&(w=w.replace(/\\n(?!\\n)/g,\"\")),s?.push({rawValue:w??\"\",formatted:w??\"\",format:S})}}}return s!==void 0&&o.push(s),o}function E9(e,t,n,a,o){const s=e;if(a===\"allowPartial\"||e.current===void 0||t===void 0)return e;let c=!1;do{if(e?.current===void 0)break;const u=e.current?.range,f=[];if(u.width>2){const y=t({x:u.x,y:u.y,width:1,height:u.height},o.signal);if(typeof y==\"function\")return s;f.push(...y);const x=t({x:u.x+u.width-1,y:u.y,width:1,height:u.height},o.signal);if(typeof x==\"function\")return s;f.push(...x)}else{const y=t({x:u.x,y:u.y,width:u.width,height:u.height},o.signal);if(typeof y==\"function\")return s;f.push(...y)}let h=u.x-n,v=u.x+u.width-1-n;for(const y of f)for(const x of y)x.span!==void 0&&(h=Math.min(x.span[0],h),v=Math.max(x.span[1],v));h===u.x-n&&v===u.x+u.width-1-n?c=!0:e={current:{cell:e.current.cell??[0,0],range:{x:h+n,y:u.y,width:v-h+1,height:u.height},rangeStack:e.current.rangeStack},columns:e.columns,rows:e.rows}}while(!c);return e}function yT(e){return e.startsWith('\"')&&e.endsWith('\"')&&(e=e.slice(1,-1).replace(/\"\"/g,'\"')),e}function T9(e){let t;(function(u){u[u.None=0]=\"None\",u[u.inString=1]=\"inString\",u[u.inStringPostQuote=2]=\"inStringPostQuote\"})(t||(t={}));const n=[];let a=[],o=0,s=t.None;e=e.replace(/\\r\\n/g,`\n`);let c=0;for(const u of e){switch(s){case t.None:u===\"\t\"||u===`\n`?(a.push(e.slice(o,c)),o=c+1,u===`\n`&&(n.push(a),a=[])):u==='\"'&&(s=t.inString);break;case t.inString:u==='\"'&&(s=t.inStringPostQuote);break;case t.inStringPostQuote:u==='\"'?s=t.inString:((u===\"\t\"||u===`\n`)&&(a.push(yT(e.slice(o,c))),o=c+1,u===`\n`&&(n.push(a),a=[])),s=t.None);break}c++}return o<e.length&&a.push(yT(e.slice(o,e.length))),n.push(a),n.map(u=>u.map(f=>({rawValue:f,formatted:f,format:\"string\"})))}function bT(e,t,n){const a=R9(e,t),o=u=>{window.navigator.clipboard?.writeText(u)},s=(u,f)=>window.navigator.clipboard?.write===void 0?!1:(window.navigator.clipboard.write([new ClipboardItem({\"text/plain\":new Blob([u],{type:\"text/plain\"}),\"text/html\":new Blob([f],{type:\"text/html\"})})]),!0),c=(u,f)=>{try{if(n===void 0||n.clipboardData===null)throw new Error(\"No clipboard data\");n?.clipboardData?.setData(\"text/plain\",u),n?.clipboardData?.setData(\"text/html\",f)}catch{s(u,f)||o(u)}};window.navigator.clipboard?.write!==void 0||n?.clipboardData!==void 0?c(a.textPlain,a.textHtml):o(a.textPlain),n?.preventDefault()}function aA(e){return e!==!0}function xT(e){return typeof e==\"string\"?e:`${e}px`}const M9=()=>e=>e.innerWidth,k9=()=>e=>e.innerHeight,_9=kr(\"div\")({name:\"Wrapper\",class:\"gdg-wmyidgi\",propsAsIs:!1,vars:{\"wmyidgi-0\":[M9()],\"wmyidgi-1\":[k9()]}}),A9=e=>{const{inWidth:t,inHeight:n,children:a,...o}=e;return m.createElement(_9,{innerHeight:xT(n),innerWidth:xT(t),...o},a)},N9=2,O9=1300;function D9(e,t,n){const a=At.useRef(0),[o,s]=e??[0,0];At.useEffect(()=>{if(o===0&&s===0){a.current=0;return}let c=!1,u=0;const f=h=>{if(!c){if(u===0)u=h;else{const v=h-u;a.current=Math.min(1,a.current+v/O9);const y=a.current**1.618*v*N9;t.current?.scrollBy(o*y,s*y),u=h,n?.()}window.requestAnimationFrame(f)}};return window.requestAnimationFrame(f),()=>{c=!0}},[t,o,s,n])}function j9({rowHeight:e,headerHeight:t,groupHeaderHeight:n,theme:a,overscrollX:o,overscrollY:s,scaleToRem:c,remSize:u}){const[f,h,v,y,x,S]=At.useMemo(()=>{if(!c||u===16)return[e,t,n,a,o,s];const w=u/16,C=e,R=__();return[typeof C==\"number\"?C*w:k=>Math.ceil(C(k)*w),Math.ceil(t*w),Math.ceil(n*w),{...a,headerIconSize:(a?.headerIconSize??R.headerIconSize)*w,cellHorizontalPadding:(a?.cellHorizontalPadding??R.cellHorizontalPadding)*w,cellVerticalPadding:(a?.cellVerticalPadding??R.cellVerticalPadding)*w},Math.ceil((o??0)*w),Math.ceil((s??0)*w)]},[n,t,o,s,u,e,c,a]);return{rowHeight:f,headerHeight:h,groupHeaderHeight:v,theme:y,overscrollX:x,overscrollY:S}}const Wo={downFill:!1,rightFill:!1,clear:!0,closeOverlay:!0,acceptOverlayDown:!0,acceptOverlayUp:!0,acceptOverlayLeft:!0,acceptOverlayRight:!0,copy:!0,paste:!0,cut:!0,search:!1,delete:!0,activateCell:!0,scrollToSelectedCell:!0,goToFirstCell:!0,goToFirstColumn:!0,goToFirstRow:!0,goToLastCell:!0,goToLastColumn:!0,goToLastRow:!0,goToNextPage:!0,goToPreviousPage:!0,selectToFirstCell:!0,selectToFirstColumn:!0,selectToFirstRow:!0,selectToLastCell:!0,selectToLastColumn:!0,selectToLastRow:!0,selectAll:!0,selectRow:!0,selectColumn:!0,goUpCell:!0,goRightCell:!0,goDownCell:!0,goLeftCell:!0,goUpCellRetainSelection:!0,goRightCellRetainSelection:!0,goDownCellRetainSelection:!0,goLeftCellRetainSelection:!0,selectGrowUp:!0,selectGrowRight:!0,selectGrowDown:!0,selectGrowLeft:!0};function wt(e,t){return e===!0?t:e===!1?\"\":e}function wT(e){const t=zh.value;return{activateCell:wt(e.activateCell,\" |Enter|shift+Enter\"),clear:wt(e.clear,\"any+Escape\"),closeOverlay:wt(e.closeOverlay,\"any+Escape\"),acceptOverlayDown:wt(e.acceptOverlayDown,\"Enter\"),acceptOverlayUp:wt(e.acceptOverlayUp,\"shift+Enter\"),acceptOverlayLeft:wt(e.acceptOverlayLeft,\"shift+Tab\"),acceptOverlayRight:wt(e.acceptOverlayRight,\"Tab\"),copy:e.copy,cut:e.cut,delete:wt(e.delete,t?\"Backspace|Delete\":\"Delete\"),downFill:wt(e.downFill,\"primary+_68\"),scrollToSelectedCell:wt(e.scrollToSelectedCell,\"primary+Enter\"),goDownCell:wt(e.goDownCell,\"ArrowDown\"),goDownCellRetainSelection:wt(e.goDownCellRetainSelection,\"alt+ArrowDown\"),goLeftCell:wt(e.goLeftCell,\"ArrowLeft|shift+Tab\"),goLeftCellRetainSelection:wt(e.goLeftCellRetainSelection,\"alt+ArrowLeft\"),goRightCell:wt(e.goRightCell,\"ArrowRight|Tab\"),goRightCellRetainSelection:wt(e.goRightCellRetainSelection,\"alt+ArrowRight\"),goUpCell:wt(e.goUpCell,\"ArrowUp\"),goUpCellRetainSelection:wt(e.goUpCellRetainSelection,\"alt+ArrowUp\"),goToFirstCell:wt(e.goToFirstCell,\"primary+Home\"),goToFirstColumn:wt(e.goToFirstColumn,\"Home|primary+ArrowLeft\"),goToFirstRow:wt(e.goToFirstRow,\"primary+ArrowUp\"),goToLastCell:wt(e.goToLastCell,\"primary+End\"),goToLastColumn:wt(e.goToLastColumn,\"End|primary+ArrowRight\"),goToLastRow:wt(e.goToLastRow,\"primary+ArrowDown\"),goToNextPage:wt(e.goToNextPage,\"PageDown\"),goToPreviousPage:wt(e.goToPreviousPage,\"PageUp\"),paste:e.paste,rightFill:wt(e.rightFill,\"primary+_82\"),search:wt(e.search,\"primary+f\"),selectAll:wt(e.selectAll,\"primary+a\"),selectColumn:wt(e.selectColumn,\"ctrl+ \"),selectGrowDown:wt(e.selectGrowDown,\"shift+ArrowDown\"),selectGrowLeft:wt(e.selectGrowLeft,\"shift+ArrowLeft\"),selectGrowRight:wt(e.selectGrowRight,\"shift+ArrowRight\"),selectGrowUp:wt(e.selectGrowUp,\"shift+ArrowUp\"),selectRow:wt(e.selectRow,\"shift+ \"),selectToFirstCell:wt(e.selectToFirstCell,\"primary+shift+Home\"),selectToFirstColumn:wt(e.selectToFirstColumn,\"primary+shift+ArrowLeft\"),selectToFirstRow:wt(e.selectToFirstRow,\"primary+shift+ArrowUp\"),selectToLastCell:wt(e.selectToLastCell,\"primary+shift+End\"),selectToLastColumn:wt(e.selectToLastColumn,\"primary+shift+ArrowRight\"),selectToLastRow:wt(e.selectToLastRow,\"primary+shift+ArrowDown\")}}function z9(e){const t=dL(e);return At.useMemo(()=>{if(t===void 0)return wT(Wo);const n={...t,goToNextPage:t?.goToNextPage??t?.pageDown??Wo.goToNextPage,goToPreviousPage:t?.goToPreviousPage??t?.pageUp??Wo.goToPreviousPage,goToFirstCell:t?.goToFirstCell??t?.first??Wo.goToFirstCell,goToLastCell:t?.goToLastCell??t?.last??Wo.goToLastCell,selectToFirstCell:t?.selectToFirstCell??t?.first??Wo.selectToFirstCell,selectToLastCell:t?.selectToLastCell??t?.last??Wo.selectToLastCell};return wT({...Wo,...n})},[t])}const P9=m.lazy(async()=>await O_(()=>Promise.resolve().then(()=>oG),void 0));let L9=0;function I9(e){return HI(GR(GR(e).filter(t=>t.span!==void 0).map(t=>Xs((t.span?.[0]??0)+1,(t.span?.[1]??0)+1))))}function lh(e,t){return e===void 0||t===0||e.columns.length===0&&e.current===void 0?e:{current:e.current===void 0?void 0:{cell:[e.current.cell[0]+t,e.current.cell[1]],range:{...e.current.range,x:e.current.range.x+t},rangeStack:e.current.rangeStack.map(n=>({...n,x:n.x+t}))},rows:e.rows,columns:e.columns.offset(t)}}const L0={kind:Ie.Loading,allowOverlay:!1},ch={columns:vt.empty(),rows:vt.empty(),current:void 0},H9=(e,t)=>{const[n,a]=m.useState(ch),[o,s]=m.useState(),c=m.useRef(null),u=m.useRef(null),[f,h]=m.useState(),v=m.useRef(null),y=m.useRef(),x=typeof window>\"u\"?null:window,{imageEditorOverride:S,getRowThemeOverride:w,markdownDivCreateNode:C,width:R,height:k,columns:T,rows:M,getCellContent:j,onCellClicked:I,onCellActivated:P,onFillPattern:A,onFinishedEditing:q,coercePasteValue:B,drawHeader:V,drawCell:N,editorBloom:_,onHeaderClicked:z,onColumnProposeMove:F,spanRangeBehavior:O=\"default\",onGroupHeaderClicked:$,onCellContextMenu:W,className:U,onHeaderContextMenu:K,getCellsForSelection:ie,onGroupHeaderContextMenu:L,onGroupHeaderRenamed:X,onCellEdited:Y,onCellsEdited:re,onSearchResultsChanged:Z,searchResults:oe,onSearchValueChange:ne,searchValue:me,onKeyDown:Me,onKeyUp:Fe,keybindings:Ue,editOnType:tt=!0,onRowAppended:Le,onColumnMoved:Ve,validateCell:Je,highlightRegions:jt,rangeSelect:xe=\"rect\",columnSelect:G=\"multi\",rowSelect:se=\"multi\",rangeSelectionBlending:ge=\"exclusive\",columnSelectionBlending:Ne=\"exclusive\",rowSelectionBlending:Re=\"exclusive\",onDelete:ze,onDragStart:Ge,onMouseMove:Xe,onPaste:Pe,copyHeaders:Mt=!1,freezeColumns:ut=0,cellActivationBehavior:lt=\"second-click\",rowSelectionMode:xn=\"auto\",onHeaderMenuClick:Nt,getGroupDetails:Et,onSearchClose:mt,onItemHovered:zt,onSelectionCleared:dn,showSearch:sn,onVisibleRegionChanged:$r,gridSelection:Rn,onGridSelectionChange:pr,minColumnWidth:Pn=50,maxColumnWidth:Ar=500,maxColumnAutoWidth:Nr,provideEditor:Lt,trailingRowOptions:St,freezeTrailingRows:Wt=0,allowedFillDirections:gr=\"orthogonal\",scrollOffsetX:Un,scrollOffsetY:rt,verticalBorder:Bt,onDragOverCell:Zt,onDrop:Br,onColumnResize:Vn,onColumnResizeEnd:vr,onColumnResizeStart:fn,customRenderers:Ga,fillHandle:wn,drawFocusRing:En=!0,experimental:Sn,fixedShadowX:Tn,fixedShadowY:On,headerIcons:sr,imageWindowLoader:Ur,initialSize:oo,isDraggable:ml,onDragLeave:ms,onRowMoved:lr,overscrollX:Ya,overscrollY:Vr,preventDiagonalScrolling:Wr,rightElement:Gr,rightElementProps:yr,trapFocus:Cn=!1,smoothScrollX:ps,smoothScrollY:pl,scaleToRem:Ma=!1,rowHeight:Yr=34,headerHeight:ka=36,groupHeaderHeight:gl=ka,theme:vl,isOutsideClick:yl,renderers:_a}=e,br=typeof e.rowMarkers==\"string\"?void 0:e.rowMarkers,Mn=br?.kind??e.rowMarkers??\"none\",Jn=br?.width??e.rowMarkerWidth,yi=br?.startIndex??e.rowMarkerStartIndex??1,gs=br?.theme??e.rowMarkerTheme,pa=br?.checkboxStyle??\"square\",cr=Math.max(Pn,20),ur=Math.max(Ar,cr),vs=Math.max(Nr??ur,cr),Dn=m.useMemo(()=>typeof window>\"u\"?{fontSize:\"16px\"}:window.getComputedStyle(document.documentElement),[]),bi=m.useMemo(()=>Number.parseFloat(Dn.fontSize),[Dn]),{rowHeight:Gn,headerHeight:Xa,groupHeaderHeight:ga,theme:ys,overscrollX:bl,overscrollY:Aa}=j9({groupHeaderHeight:gl,headerHeight:ka,overscrollX:Ya,overscrollY:Vr,remSize:bi,rowHeight:Yr,scaleToRem:Ma,theme:vl}),Xr=z9(Ue),va=Jn??(M>1e4?48:M>1e3?44:M>100?36:32),dr=Mn!==\"none\",ve=dr?1:0,ln=Le!==void 0,xi=St?.sticky===!0,[so,Or]=m.useState(!1),wi=sn??so,bs=m.useCallback(()=>{mt!==void 0?mt():Or(!1)},[mt]),Se=m.useMemo(()=>Rn===void 0?void 0:lh(Rn,ve),[Rn,ve])??n,er=m.useRef();er.current===void 0&&(er.current=new AbortController),m.useEffect(()=>()=>er?.current.abort(),[]);const[gn,Ci]=y9(ie,j,ve,er.current,M),Na=m.useCallback((D,te,ee)=>{if(Je===void 0)return!0;const ye=[D[0]-ve,D[1]];return Je?.(ye,te,ee)},[ve,Je]),Yn=m.useRef(Rn),Xn=m.useCallback((D,te)=>{te&&(D=E9(D,gn,ve,O,er.current)),pr!==void 0?(Yn.current=lh(D,-ve),pr(Yn.current)):a(D)},[pr,gn,ve,O]),xr=rc(Vn,m.useCallback((D,te,ee,ye)=>{Vn?.(T[ee-ve],te,ee-ve,ye)},[Vn,ve,T])),ya=rc(vr,m.useCallback((D,te,ee,ye)=>{vr?.(T[ee-ve],te,ee-ve,ye)},[vr,ve,T])),Qa=rc(fn,m.useCallback((D,te,ee,ye)=>{fn?.(T[ee-ve],te,ee-ve,ye)},[fn,ve,T])),lo=rc(V,m.useCallback((D,te)=>V?.({...D,columnIndex:D.columnIndex-ve},te)??!1,[V,ve])),xl=rc(N,m.useCallback((D,te)=>N?.({...D,col:D.col-ve},te)??!1,[N,ve])),le=m.useCallback(D=>{if(ze!==void 0){const te=ze(lh(D,-ve));return typeof te==\"boolean\"?te:lh(te,ve)}return!0},[ze,ve]),[ke,He,Oe]=v9(Se,Xn,ge,Ne,Re,xe),Ae=m.useMemo(()=>as(__(),ys),[ys]),[qe,nt]=m.useState([0,0,0]),$e=m.useMemo(()=>{if(_a===void 0)return{};const D={};for(const te of _a)D[te.kind]=te;return D},[_a]),Ye=m.useCallback(D=>D.kind!==Ie.Custom?$e[D.kind]:Ga?.find(te=>te.isMatch(D)),[Ga,$e]);let{sizedColumns:ct,nonGrowWidth:Jt}=xI(T,M,Ci,qe[0]-(ve===0?0:va)-qe[2],cr,vs,Ae,Ye,er.current);Mn!==\"none\"&&(Jt+=va);const en=m.useMemo(()=>ct.some(D=>D.group!==void 0),[ct]),Ht=en?Xa+ga:Xa,Tt=Se.rows.length,cn=Mn===\"none\"?void 0:Tt===0?!1:Tt===M?!0:void 0,dt=m.useMemo(()=>Mn===\"none\"?ct:[{title:\"\",width:va,icon:void 0,hasMenu:!1,style:\"normal\",themeOverride:gs,rowMarker:pa,rowMarkerChecked:cn},...ct],[Mn,ct,va,gs,pa,cn]),[Gt,Ri]=m.useMemo(()=>[rt!==void 0&&typeof Gn==\"number\"?Math.floor(rt/Gn):0,rt!==void 0&&typeof Gn==\"number\"?-(rt%Gn):0],[rt,Gn]),kn=m.useRef({height:1,width:1,x:0,y:0}),Ei=m.useMemo(()=>({x:kn.current.x,y:Gt,width:kn.current.width??1,height:kn.current.height??1,ty:Ri}),[Ri,Gt]),qt=m.useRef(!1),[Ln,fr,ba]=uL(Ei);kn.current=Ln;const Qr=(Ln.height??1)>1;m.useLayoutEffect(()=>{if(rt!==void 0&&v.current!==null&&Qr){if(v.current.scrollTop===rt)return;v.current.scrollTop=rt,v.current.scrollTop!==rt&&ba(),qt.current=!0}},[rt,Qr,ba]);const co=(Ln.width??1)>1;m.useLayoutEffect(()=>{if(Un!==void 0&&v.current!==null&&co){if(v.current.scrollLeft===Un)return;v.current.scrollLeft=Un,v.current.scrollLeft!==Un&&ba(),qt.current=!0}},[Un,co,ba]);const Ti=Ln.x+ve,uo=Ln.y,hr=m.useRef(null),tr=m.useCallback(D=>{D===!0?hr.current?.focus():window.requestAnimationFrame(()=>{hr.current?.focus()})},[]),Qn=ln?M+1:M,wr=m.useCallback(D=>{const te=ve===0?D:D.map(ye=>({...ye,location:[ye.location[0]-ve,ye.location[1]]})),ee=re?.(te);if(ee!==!0)for(const ye of te)Y?.(ye.location,ye.value);return ee},[Y,re,ve]),[Mi,Pc]=m.useState(),wl=Se.current!==void 0&&Se.current.range.width*Se.current.range.height>1?Se.current.range:void 0,qd=En?Se.current?.cell:void 0,Sl=qd?.[0],Cl=qd?.[1],km=m.useMemo(()=>{if((jt===void 0||jt.length===0)&&(wl??Sl??Cl??Mi)===void 0)return;const D=[];if(jt!==void 0)for(const te of jt){const ee=dt.length-te.range.x-ve;ee>0&&D.push({color:te.color,range:{...te.range,x:te.range.x+ve,width:Math.min(ee,te.range.width)},style:te.style})}return Mi!==void 0&&D.push({color:il(Ae.accentColor,0),range:Mi,style:\"dashed\"}),wl!==void 0&&D.push({color:il(Ae.accentColor,.5),range:wl,style:\"solid-outline\"}),Sl!==void 0&&Cl!==void 0&&D.push({color:Ae.accentColor,range:{x:Sl,y:Cl,width:1,height:1},style:\"solid-outline\"}),D.length>0?D:void 0},[Mi,wl,Sl,Cl,jt,dt.length,Ae.accentColor,ve]),Fd=m.useRef(dt);Fd.current=dt;const Sr=m.useCallback(([D,te],ee=!1)=>{const ye=ln&&te===Qn-1;if(D===0&&dr)return ye?L0:{kind:Ea.Marker,allowOverlay:!1,checkboxStyle:pa,checked:Se?.rows.hasIndex(te)===!0,markerKind:Mn===\"clickable-number\"?\"number\":Mn,row:yi+te,drawHandle:lr!==void 0,cursor:Mn===\"clickable-number\"?\"pointer\":void 0};if(ye){const ce=D===ve?St?.hint??\"\":\"\",he=Fd.current[D];if(he?.trailingRowOptions?.disabled===!0)return L0;{const _e=he?.trailingRowOptions?.hint??ce,De=he?.trailingRowOptions?.addIcon??St?.addIcon;return{kind:Ea.NewRow,hint:_e,allowOverlay:!1,icon:De}}}else{const Ee=D-ve;if(ee||Sn?.strict===!0){const he=kn.current,_e=he.x>Ee||Ee>he.x+he.width||he.y>te||te>he.y+he.height||te>=Rl.current,De=Ee===he.extras?.selected?.[0]&&te===he.extras?.selected[1];let Be=!1;if(he.extras?.freezeRegions!==void 0){for(const st of he.extras.freezeRegions)if(pm(st,Ee,te)){Be=!0;break}}if(_e&&!De&&!Be)return L0}let ce=j([Ee,te]);return ve!==0&&ce.span!==void 0&&(ce={...ce,span:[ce.span[0]+ve,ce.span[1]+ve]}),ce}},[ln,Qn,dr,pa,Se?.rows,Mn,yi,lr,ve,St?.hint,St?.addIcon,Sn?.strict,j]),xs=m.useCallback(D=>{let te=Et?.(D)??{name:D};return X!==void 0&&D!==\"\"&&(te={icon:te.icon,name:te.name,overrideTheme:te.overrideTheme,actions:[...te.actions??[],{title:\"Rename\",icon:\"renameIcon\",onClick:ee=>ws({group:te.name,bounds:ee.bounds})}]}),te},[Et,X]),Ka=m.useCallback(D=>{const[te,ee]=D.cell,ye=dt[te],be=ye?.group!==void 0?xs(ye.group)?.overrideTheme:void 0,Ee=ye?.themeOverride,ce=w?.(ee);s({...D,theme:as(Ae,be,Ee,ce,D.content.themeOverride)})},[w,dt,xs,Ae]),fo=m.useCallback((D,te,ee)=>{if(Se.current===void 0)return;const[ye,be]=Se.current.cell,Ee=Sr([ye,be]);if(Ee.kind!==Ie.Boolean&&Ee.allowOverlay){let ce=Ee;if(ee!==void 0)switch(ce.kind){case Ie.Number:{const he=Kz(()=>ee===\"-\"?-0:Number.parseFloat(ee),0);ce={...ce,data:Number.isNaN(he)?0:he};break}case Ie.Text:case Ie.Markdown:case Ie.Uri:ce={...ce,data:ee};break}Ka({target:D,content:ce,initialValue:ee,cell:[ye,be],highlight:ee===void 0,forceEditMode:ee!==void 0})}else Ee.kind===Ie.Boolean&&te&&Ee.readonly!==!0&&(wr([{location:Se.current.cell,value:{...Ee,data:aA(Ee.data)}}]),hr.current?.damage([{cell:Se.current.cell}]))},[Sr,Se,wr,Ka]),Lc=m.useCallback((D,te)=>{const ee=hr.current?.getBounds(D,te);if(ee===void 0||v.current===null)return;const ye=Sr([D,te]);ye.allowOverlay&&Ka({target:ee,content:ye,initialValue:void 0,highlight:!0,cell:[D,te],forceEditMode:!0})},[Sr,Ka]),vn=m.useCallback((D,te,ee=\"both\",ye=0,be=0,Ee=void 0)=>{if(v.current!==null){const ce=hr.current,he=u.current,_e=typeof D!=\"number\"?D.unit===\"cell\"?D.amount:void 0:D,De=typeof te!=\"number\"?te.unit===\"cell\"?te.amount:void 0:te,Be=typeof D!=\"number\"&&D.unit===\"px\"?D.amount:void 0,st=typeof te!=\"number\"&&te.unit===\"px\"?te.amount:void 0;if(ce!==null&&he!==null){let Qe={x:0,y:0,width:0,height:0},Ke=0,ft=0;if((_e!==void 0||De!==void 0)&&(Qe=ce.getBounds((_e??0)+ve,De??0)??Qe,Qe.width===0||Qe.height===0))return;const Rt=he.getBoundingClientRect(),Vt=Rt.width/he.offsetWidth;if(Be!==void 0&&(Qe={...Qe,x:Be-Rt.left-v.current.scrollLeft,width:1}),st!==void 0&&(Qe={...Qe,y:st+Rt.top-v.current.scrollTop,height:1}),Qe!==void 0){const Pt={x:Qe.x-ye,y:Qe.y-be,width:Qe.width+2*ye,height:Qe.height+2*be};let Oi=0;for(let Os=0;Os<ut;Os++)Oi+=ct[Os].width;let Di=0;const ji=Wt+(xi?1:0);ji>0&&(Di=dl(Qn,ji,Gn));let Jr=Oi*Vt+Rt.left+ve*va*Vt,yn=Rt.right,It=Rt.top+Ht*Vt,pt=Rt.bottom-Di*Vt;const ea=Qe.width+ye*2;switch(Ee?.hAlign){case\"start\":yn=Jr+ea;break;case\"end\":Jr=yn-ea;break;case\"center\":Jr=Math.floor((Jr+yn)/2)-ea/2,yn=Jr+ea;break}const nr=Qe.height+be*2;switch(Ee?.vAlign){case\"start\":pt=It+nr;break;case\"end\":It=pt-nr;break;case\"center\":It=Math.floor((It+pt)/2)-nr/2,pt=It+nr;break}Jr>Pt.x?Ke=Pt.x-Jr:yn<Pt.x+Pt.width&&(Ke=Pt.x+Pt.width-yn),It>Pt.y?ft=Pt.y-It:pt<Pt.y+Pt.height&&(ft=Pt.y+Pt.height-pt),ee===\"vertical\"||typeof D==\"number\"&&D<ut?Ke=0:(ee===\"horizontal\"||typeof te==\"number\"&&te>=Qn-ji)&&(ft=0),(Ke!==0||ft!==0)&&(Vt!==1&&(Ke/=Vt,ft/=Vt),v.current.scrollTo(Ke+v.current.scrollLeft,ft+v.current.scrollTop))}}}},[ve,Wt,va,Ht,ut,ct,Qn,xi,Gn]),Ic=m.useRef(Lc),Hc=m.useRef(j),Rl=m.useRef(M);Ic.current=Lc,Hc.current=j,Rl.current=M;const Kr=m.useCallback(async(D,te=!0)=>{if(dt[D]?.trailingRowOptions?.disabled===!0)return;const ye=Le?.();let be,Ee=!0;ye!==void 0&&(be=await ye,be===\"top\"&&(Ee=!1),typeof be==\"number\"&&(Ee=!1));let ce=0;const he=()=>{if(Rl.current<=M){ce<500&&window.setTimeout(he,ce),ce=50+ce*2;return}const _e=typeof be==\"number\"?be:Ee?M:0;xo.current(D-ve,_e),ke({cell:[D,_e],range:{x:D,y:_e,width:1,height:1}},!1,!1,\"edit\");const De=Hc.current([D-ve,_e]);De.allowOverlay&&$u(De)&&De.readonly!==!0&&te&&window.setTimeout(()=>{Ic.current(D,_e)},0)};he()},[dt,Le,ve,M,ke]),El=m.useCallback(D=>{const te=ct[D]?.trailingRowOptions?.targetColumn??St?.targetColumn;if(typeof te==\"number\")return te+(dr?1:0);if(typeof te==\"object\"){const ee=T.indexOf(te);if(ee>=0)return ee+(dr?1:0)}},[ct,T,dr,St?.targetColumn]),Za=m.useRef(),ho=m.useRef(),mo=m.useCallback((D,te)=>{const[ee,ye]=te;return as(Ae,dt[ee]?.themeOverride,w?.(ye),D.themeOverride)},[w,dt,Ae]),po=m.useCallback(D=>{const te=zh.value?D.metaKey:D.ctrlKey,ee=te&&se===\"multi\",ye=te&&G===\"multi\",[be,Ee]=D.location,ce=Se.columns,he=Se.rows,[_e,De]=Se.current?.cell??[];if(D.kind===\"cell\"){if(ho.current=void 0,Zr.current=[be,Ee],be===0&&dr){if(ln===!0&&Ee===M||Mn===\"number\"||se===\"none\")return;const Be=Sr(D.location);if(Be.kind!==Ea.Marker)return;if(lr!==void 0){const Ke=Ye(Be);da(Ke?.kind===Ea.Marker);const ft=Ke?.onClick?.({...D,cell:Be,posX:D.localEventX,posY:D.localEventY,bounds:D.bounds,theme:mo(Be,D.location),preventDefault:()=>{}});if(ft===void 0||ft.checked===Be.checked)return}s(void 0),tr();const st=he.hasIndex(Ee),Qe=Za.current;if(se===\"multi\"&&(D.shiftKey||D.isLongTouch===!0)&&Qe!==void 0&&he.hasIndex(Qe)){const Ke=[Math.min(Qe,Ee),Math.max(Qe,Ee)+1];ee||xn===\"multi\"?He(void 0,Ke,!0):He(vt.fromSingleSelection(Ke),void 0,ee)}else ee||D.isTouch||xn===\"multi\"?st?He(he.remove(Ee),void 0,!0):(He(void 0,Ee,!0),Za.current=Ee):st&&he.length===1?He(vt.empty(),void 0,te):(He(vt.fromSingleSelection(Ee),void 0,te),Za.current=Ee)}else if(be>=ve&&ln&&Ee===M){const Be=El(be);Kr(Be??be)}else if(_e!==be||De!==Ee){const Be=Sr(D.location),st=Ye(Be);if(st?.onSelect!==void 0){let ft=!1;if(st.onSelect({...D,cell:Be,posX:D.localEventX,posY:D.localEventY,bounds:D.bounds,preventDefault:()=>ft=!0,theme:mo(Be,D.location)}),ft)return}const Qe=xi&&Ee===M,Ke=xi&&Se!==void 0&&Se.current?.cell[1]===M;if((D.shiftKey||D.isLongTouch===!0)&&_e!==void 0&&De!==void 0&&Se.current!==void 0&&!Ke){if(Qe)return;const ft=Math.min(be,_e),Rt=Math.max(be,_e),Vt=Math.min(Ee,De),Pt=Math.max(Ee,De);ke({...Se.current,range:{x:ft,y:Vt,width:Rt-ft+1,height:Pt-Vt+1}},!0,te,\"click\"),Za.current=void 0,tr()}else ke({cell:[be,Ee],range:{x:be,y:Ee,width:1,height:1}},!0,te,\"click\"),Za.current=void 0,s(void 0),tr()}}else if(D.kind===\"header\")if(Zr.current=[be,Ee],s(void 0),dr&&be===0)Za.current=void 0,ho.current=void 0,se===\"multi\"&&(he.length!==M?He(vt.fromSingleSelection([0,M]),void 0,te):He(vt.empty(),void 0,te),tr());else{const Be=ho.current;if(G===\"multi\"&&(D.shiftKey||D.isLongTouch===!0)&&Be!==void 0&&ce.hasIndex(Be)){const st=[Math.min(Be,be),Math.max(Be,be)+1];ye?Oe(void 0,st,te):Oe(vt.fromSingleSelection(st),void 0,te)}else ye?(ce.hasIndex(be)?Oe(ce.remove(be),void 0,te):Oe(void 0,be,te),ho.current=be):G!==\"none\"&&(Oe(vt.fromSingleSelection(be),void 0,te),ho.current=be);Za.current=void 0,tr()}else D.kind===ca?Zr.current=[be,Ee]:D.kind===Ph&&!D.isMaybeScrollbar&&(Xn(ch,!1),s(void 0),tr(),dn?.(),Za.current=void 0,ho.current=void 0)},[Kr,G,tr,Ye,El,Sr,Se,dr,xi,dn,lr,ve,Mn,se,xn,M,ke,Xn,Oe,He,ln,mo]),Oa=m.useRef(!1),Zr=m.useRef(),$d=m.useRef(Ln),Cr=m.useRef(),Bd=m.useCallback(D=>{if(ki.current=!1,$d.current=kn.current,D.button!==0&&D.button!==1){Cr.current=void 0;return}const te=performance.now();Cr.current={button:D.button,time:te,location:D.location},D?.kind===\"header\"&&(Oa.current=!0);const ee=D.kind===\"cell\"&&D.isFillHandle;!ee&&D.kind!==\"cell\"&&D.isEdge||(h({previousSelection:Se,fillHandle:ee}),Zr.current=void 0,!D.isTouch&&D.button===0&&!ee?po(D):!D.isTouch&&D.button===1&&(Zr.current=D.location))},[Se,po]),[Tl,ws]=m.useState(),Ml=m.useCallback(D=>{if(D.kind!==ca||G!==\"multi\")return;const te=zh.value?D.metaKey:D.ctrlKey,[ee]=D.location,ye=Se.columns;if(ee<ve)return;const be=dt[ee];let Ee=ee,ce=ee;for(let he=ee-1;he>=ve&&fd(be.group,dt[he].group);he--)Ee--;for(let he=ee+1;he<dt.length&&fd(be.group,dt[he].group);he++)ce++;if(tr(),te)if(ye.hasAll([Ee,ce+1])){let he=ye;for(let _e=Ee;_e<=ce;_e++)he=he.remove(_e);Oe(he,void 0,te)}else Oe(void 0,[Ee,ce+1],te);else Oe(vt.fromSingleSelection([Ee,ce+1]),void 0,te)},[G,tr,Se.columns,dt,ve,Oe]),ki=m.useRef(!1),Ss=m.useCallback(async D=>{if(gn!==void 0&&xr!==void 0){const te=kn.current.y,ee=kn.current.height;let ye=gn({x:D,y:te,width:1,height:Math.min(ee,M-te)},er.current.signal);typeof ye!=\"object\"&&(ye=await ye());const be=ct[D-ve],ce=document.createElement(\"canvas\").getContext(\"2d\",{alpha:!1});if(ce!==null){ce.font=Ae.baseFontFull;const he=N_(ce,Ae,be,0,ye,cr,ur,!1,Ye);xr?.(be,he.width,D,he.width)}}},[ct,gn,ur,Ae,cr,xr,ve,M,Ye]),[Ud,qc]=m.useState(),go=m.useCallback(async(D,te)=>{const ee=D.current?.range;if(ee===void 0||gn===void 0||te.current===void 0)return;const ye=te.current.range;if(A!==void 0){let he=!1;if(A({fillDestination:{...ye,x:ye.x-ve},patternSource:{...ee,x:ee.x-ve},preventDefault:()=>he=!0}),he)return}let be=gn(ee,er.current.signal);typeof be!=\"object\"&&(be=await be());const Ee=be,ce=[];for(let he=0;he<ye.width;he++)for(let _e=0;_e<ye.height;_e++){const De=[ye.x+he,ye.y+_e];if(b_(De,ee))continue;const Be=Ee[_e%ee.height][he%ee.width];Zs(Be)||!$u(Be)||ce.push({location:De,value:{...Be}})}wr(ce),hr.current?.damage(ce.map(he=>({cell:he.location})))},[gn,wr,A,ve]),Vd=m.useCallback(()=>{if(Se.current===void 0||Se.current.range.width<=1)return;const D={...Se,current:{...Se.current,range:{...Se.current.range,width:1}}};go(D,Se)},[go,Se]),Wd=m.useCallback(()=>{if(Se.current===void 0||Se.current.range.height<=1)return;const D={...Se,current:{...Se.current,range:{...Se.current.range,height:1}}};go(D,Se)},[go,Se]),_m=m.useCallback((D,te)=>{const ee=f;if(h(void 0),Pc(void 0),qc(void 0),Oa.current=!1,te)return;if(ee?.fillHandle===!0&&Se.current!==void 0&&ee.previousSelection?.current!==void 0){if(Mi===void 0)return;const Be={...Se,current:{...Se.current,range:F_(ee.previousSelection.current.range,Mi)}};go(ee.previousSelection,Be),Xn(Be,!0);return}const[ye,be]=D.location,[Ee,ce]=Zr.current??[],he=()=>{ki.current=!0},_e=Be=>{const st=Be.isTouch||Ee===ye&&ce===be;if(st&&I?.([ye-ve,be],{...Be,preventDefault:he}),Be.button===1)return!ki.current;if(!ki.current){const Qe=Sr(D.location),Ke=Ye(Qe);if(Ke!==void 0&&Ke.onClick!==void 0&&st){const Rt=Ke.onClick({...Be,cell:Qe,posX:Be.localEventX,posY:Be.localEventY,bounds:Be.bounds,theme:mo(Qe,D.location),preventDefault:he});Rt!==void 0&&!Zs(Rt)&&Ki(Rt)&&(wr([{location:Be.location,value:Rt}]),hr.current?.damage([{cell:Be.location}]))}if(ki.current||Se.current===void 0)return!1;let ft=!1;switch(Qe.activationBehaviorOverride??lt){case\"double-click\":case\"second-click\":{if(ee?.previousSelection?.current?.cell===void 0)break;const[Rt,Vt]=Se.current.cell,[Pt,Oi]=ee.previousSelection.current.cell;ft=ye===Rt&&ye===Pt&&be===Vt&&be===Oi&&(Be.isDoubleClick===!0||lt===\"second-click\");break}case\"single-click\":{ft=!0;break}}if(ft)return P?.([ye-ve,be]),fo(Be.bounds,!1),!0}return!1},De=D.location[0]-ve;if(D.isTouch){const Be=kn.current,st=$d.current;if(Be.x!==st.x||Be.y!==st.y)return;if(D.isLongTouch===!0){if(D.kind===\"cell\"&&Ju(Se.current?.cell,D.location)){W?.([De,D.location[1]],{...D,preventDefault:he});return}else if(D.kind===\"header\"&&Se.columns.hasIndex(ye)){K?.(De,{...D,preventDefault:he});return}else if(D.kind===ca){if(De<0)return;L?.(De,{...D,preventDefault:he});return}}D.kind===\"cell\"?_e(D)||po(D):D.kind===ca?$?.(De,{...D,preventDefault:he}):(D.kind===Xo&&z?.(De,{...D,preventDefault:he}),po(D));return}if(D.kind===\"header\"){if(De<0)return;D.isEdge?D.isDoubleClick===!0&&Ss(ye):D.button===0&&ye===Ee&&be===ce&&z?.(De,{...D,preventDefault:he})}if(D.kind===ca){if(De<0)return;D.button===0&&ye===Ee&&be===ce&&($?.(De,{...D,preventDefault:he}),ki.current||Ml(D))}D.kind===\"cell\"&&(D.button===0||D.button===1)&&_e(D),Zr.current=void 0},[f,Se,ve,Mi,go,Xn,I,Sr,Ye,lt,mo,wr,P,fo,W,K,L,po,$,z,Ss,Ml]),Rr=m.useCallback(D=>{const te={...D,location:[D.location[0]-ve,D.location[1]]};Xe?.(te),f!==void 0&&D.buttons===0&&(h(void 0),Pc(void 0),qc(void 0),Oa.current=!1),qc(ee=>Oa.current?[D.scrollEdge[0],0]:D.scrollEdge[0]===ee?.[0]&&D.scrollEdge[1]===ee[1]?ee:f===void 0||(Cr.current?.location[0]??0)<ve?void 0:D.scrollEdge)},[f,Xe,ve]),Cs=m.useCallback((D,te)=>{Nt?.(D-ve,te)},[Nt,ve]),_i=Se?.current?.cell,Gd=m.useCallback((D,te,ee,ye,be,Ee)=>{qt.current=!1;let ce=_i;ce!==void 0&&(ce=[ce[0]-ve,ce[1]]);const he=ut===0?void 0:{x:0,y:D.y,width:ut,height:D.height},_e=[];he!==void 0&&_e.push(he),Wt>0&&(_e.push({x:D.x-ve,y:M-Wt,width:D.width,height:Wt}),ut>0&&_e.push({x:0,y:M-Wt,width:ut,height:Wt}));const De={x:D.x-ve,y:D.y,width:D.width,height:ln&&D.y+D.height>=M?D.height-1:D.height,tx:be,ty:Ee,extras:{selected:ce,freezeRegion:he,freezeRegions:_e}};kn.current=De,fr(De),nt([te,ee,ye]),$r?.(De,De.tx,De.ty,De.extras)},[_i,ve,ln,M,ut,Wt,fr,$r]),Yd=rc(Ve,m.useCallback((D,te)=>{Ve?.(D-ve,te-ve),G!==\"none\"&&Oe(vt.fromSingleSelection(te),void 0,!0)},[G,Ve,ve,Oe])),kl=m.useRef(!1),Fc=m.useCallback(D=>{if(D.location[0]===0&&ve>0){D.preventDefault();return}Ge?.({...D,location:[D.location[0]-ve,D.location[1]]}),D.defaultPrevented()||(kl.current=!0),h(void 0)},[Ge,ve]),Am=m.useCallback(()=>{kl.current=!1},[]),Ja=m.useRef(),Rs=m.useCallback(D=>{if(!tA(D,Ja.current)&&(Ja.current=D,!(Cr?.current?.button!==void 0&&Cr.current.button>=1))){if(D.buttons!==0&&f!==void 0&&Cr.current?.location[0]===0&&D.location[0]===0&&ve===1&&se===\"multi\"&&f.previousSelection&&!f.previousSelection.rows.hasIndex(Cr.current.location[1])&&Se.rows.hasIndex(Cr.current.location[1])){const te=Math.min(Cr.current.location[1],D.location[1]),ee=Math.max(Cr.current.location[1],D.location[1])+1;He(vt.fromSingleSelection([te,ee]),void 0,!1)}if(D.buttons!==0&&f!==void 0&&Se.current!==void 0&&!kl.current&&!Oa.current&&(xe===\"rect\"||xe===\"multi-rect\")){const[te,ee]=Se.current.cell;let[ye,be]=D.location;if(be<0&&(be=kn.current.y),f.fillHandle===!0&&f.previousSelection?.current!==void 0){const Ee=f.previousSelection.current.range;be=Math.min(be,ln?M-1:M);const ce=MH(Ee,ye,be,gr);Pc(ce)}else{if(ln&&ee===M)return;if(ln&&be===M)if(D.kind===Ph)be--;else return;ye=Math.max(ye,ve);const he=ye-te,_e=be-ee,De={x:he>=0?te:ye,y:_e>=0?ee:be,width:Math.abs(he)+1,height:Math.abs(_e)+1};ke({...Se.current,range:De},!0,!1,\"drag\")}}zt?.({...D,location:[D.location[0]-ve,D.location[1]]})}},[gr,f,ve,se,Se,xe,zt,He,ln,M,ke]),Es=m.useCallback(()=>{const D=Ja.current;if(D===void 0)return;const[te,ee]=D.scrollEdge;let[ye,be]=D.location;const Ee=kn.current;te===-1?ye=Ee.extras?.freezeRegion?.x??Ee.x:te===1&&(ye=Ee.x+Ee.width),ee===-1?be=Math.max(0,Ee.y):ee===1&&(be=Math.min(M-1,Ee.y+Ee.height)),ye=Ha(ye,0,dt.length-1),be=Ha(be,0,M-1),Rs({...D,location:[ye,be]})},[dt.length,Rs,M]);D9(Ud,v,Es);const Er=m.useCallback(D=>{if(Se.current===void 0)return;const[te,ee]=D,[ye,be]=Se.current.cell,Ee=Se.current.range;let ce=Ee.x,he=Ee.x+Ee.width,_e=Ee.y,De=Ee.y+Ee.height;if(ee!==0)switch(ee){case 2:{De=M,_e=be,vn(0,De,\"vertical\");break}case-2:{_e=0,De=be+1,vn(0,_e,\"vertical\");break}case 1:{_e<be?(_e++,vn(0,_e,\"vertical\")):(De=Math.min(M,De+1),vn(0,De,\"vertical\"));break}case-1:{De>be+1?(De--,vn(0,De,\"vertical\")):(_e=Math.max(0,_e-1),vn(0,_e,\"vertical\"));break}default:dd()}if(te!==0)if(te===2)he=dt.length,ce=ye,vn(he-1-ve,0,\"horizontal\");else if(te===-2)ce=ve,he=ye+1,vn(ce-ve,0,\"horizontal\");else{let Be=[];if(gn!==void 0){const st=gn({x:ce,y:_e,width:he-ce-ve,height:De-_e},er.current.signal);typeof st==\"object\"&&(Be=I9(st))}if(te===1){let st=!1;if(ce<ye){if(Be.length>0){const Qe=Xs(ce+1,ye+1).find(Ke=>!Be.includes(Ke-ve));Qe!==void 0&&(ce=Qe,st=!0)}else ce++,st=!0;st&&vn(ce,0,\"horizontal\")}st||(he=Math.min(dt.length,he+1),vn(he-1-ve,0,\"horizontal\"))}else if(te===-1){let st=!1;if(he>ye+1){if(Be.length>0){const Qe=Xs(he-1,ye,-1).find(Ke=>!Be.includes(Ke-ve));Qe!==void 0&&(he=Qe,st=!0)}else he--,st=!0;st&&vn(he-ve,0,\"horizontal\")}st||(ce=Math.max(ve,ce-1),vn(ce-ve,0,\"horizontal\"))}else dd()}ke({cell:Se.current.cell,range:{x:ce,y:_e,width:he-ce,height:De-_e}},!0,!1,\"keyboard-select\")},[gn,Se,dt.length,ve,M,vn,ke]),Da=m.useCallback((D,te,ee,ye)=>{const be=Qn-(ee?0:1);if(D=Ha(D,ve,ct.length-1+ve),te=Ha(te,0,be),D===_i?.[0]&&te===_i?.[1])return!1;if(ye&&Se.current!==void 0){const Ee=[...Se.current.rangeStack];(Se.current.range.width>1||Se.current.range.height>1)&&Ee.push(Se.current.range),Xn({...Se,current:{cell:[D,te],range:{x:D,y:te,width:1,height:1},rangeStack:Ee}},!0)}else ke({cell:[D,te],range:{x:D,y:te,width:1,height:1}},!0,!1,\"keyboard-nav\");return y.current!==void 0&&y.current[0]===D&&y.current[1]===te&&(y.current=void 0),vn(D-ve,te),!0},[Qn,ve,ct.length,_i,Se,vn,Xn,ke]),Ai=m.useCallback((D,te)=>{o?.cell!==void 0&&D!==void 0&&Ki(D)&&(wr([{location:o.cell,value:D}]),window.requestAnimationFrame(()=>{hr.current?.damage([{cell:o.cell}])})),tr(!0),s(void 0);const[ee,ye]=te;if(Se.current!==void 0&&(ee!==0||ye!==0)){const be=Se.current.cell[1]===Qn-1&&D!==void 0;Da(Ha(Se.current.cell[0]+ee,0,dt.length-1),Ha(Se.current.cell[1]+ye,0,Qn-1),be,!1)}q?.(D,te)},[o?.cell,tr,Se,q,wr,Qn,Da,dt.length]),vo=m.useMemo(()=>`gdg-overlay-${L9++}`,[]),ja=m.useCallback(D=>{tr();const te=[];for(let ee=D.x;ee<D.x+D.width;ee++)for(let ye=D.y;ye<D.y+D.height;ye++){const be=j([ee-ve,ye]);if(!be.allowOverlay&&be.kind!==Ie.Boolean)continue;let Ee;if(be.kind===Ie.Custom){const ce=Ye(be),he=ce?.provideEditor?.(be);ce?.onDelete!==void 0?Ee=ce.onDelete(be):Xk(he)&&(Ee=he?.deletedValue?.(be))}else(Ki(be)&&be.allowOverlay||be.kind===Ie.Boolean)&&(Ee=Ye(be)?.onDelete?.(be));Ee!==void 0&&!Zs(Ee)&&Ki(Ee)&&te.push({location:[ee,ye],value:Ee})}wr(te),hr.current?.damage(te.map(ee=>({cell:ee.location})))},[tr,j,Ye,wr,ve]),yo=o!==void 0,ei=m.useCallback(D=>{const te=()=>{D.stopPropagation(),D.preventDefault()},ee={didMatch:!1},{bounds:ye}=D,be=Se.columns,Ee=Se.rows,ce=Xr;if(!yo&&xt(ce.clear,D,ee))Xn(ch,!1),dn?.();else if(!yo&&xt(ce.selectAll,D,ee))Xn({columns:vt.empty(),rows:vt.empty(),current:{cell:Se.current?.cell??[ve,0],range:{x:ve,y:0,width:T.length,height:M},rangeStack:[]}},!1);else if(xt(ce.search,D,ee))c?.current?.focus({preventScroll:!0}),Or(!0);else if(xt(ce.delete,D,ee)){const Ke=le?.(Se)??!0;if(Ke!==!1){const ft=Ke===!0?Se:Ke;if(ft.current!==void 0){ja(ft.current.range);for(const Rt of ft.current.rangeStack)ja(Rt)}for(const Rt of ft.rows)ja({x:ve,y:Rt,width:T.length,height:1});for(const Rt of ft.columns)ja({x:Rt,y:0,width:1,height:M})}}if(ee.didMatch)return te(),!0;if(Se.current===void 0)return!1;let[he,_e]=Se.current.cell,De=!1,Be=!1;xt(ce.scrollToSelectedCell,D,ee)?xo.current(he-ve,_e):G!==\"none\"&&xt(ce.selectColumn,D,ee)?be.hasIndex(he)?Oe(be.remove(he),void 0,!0):G===\"single\"?Oe(vt.fromSingleSelection(he),void 0,!0):Oe(void 0,he,!0):se!==\"none\"&&xt(ce.selectRow,D,ee)?Ee.hasIndex(_e)?He(Ee.remove(_e),void 0,!0):se===\"single\"?He(vt.fromSingleSelection(_e),void 0,!0):He(void 0,_e,!0):!yo&&ye!==void 0&&xt(ce.activateCell,D,ee)?_e===M&&ln?window.setTimeout(()=>{const Ke=El(he);Kr(Ke??he)},0):(P?.([he-ve,_e]),fo(ye,!0)):Se.current.range.height>1&&xt(ce.downFill,D,ee)?Wd():Se.current.range.width>1&&xt(ce.rightFill,D,ee)?Vd():xt(ce.goToNextPage,D,ee)?_e+=Math.max(1,kn.current.height-4):xt(ce.goToPreviousPage,D,ee)?_e-=Math.max(1,kn.current.height-4):xt(ce.goToFirstCell,D,ee)?(s(void 0),_e=0,he=0):xt(ce.goToLastCell,D,ee)?(s(void 0),_e=Number.MAX_SAFE_INTEGER,he=Number.MAX_SAFE_INTEGER):xt(ce.selectToFirstCell,D,ee)?(s(void 0),Er([-2,-2])):xt(ce.selectToLastCell,D,ee)?(s(void 0),Er([2,2])):yo?(xt(ce.closeOverlay,D,ee)&&s(void 0),xt(ce.acceptOverlayDown,D,ee)&&(s(void 0),_e++),xt(ce.acceptOverlayUp,D,ee)&&(s(void 0),_e--),xt(ce.acceptOverlayLeft,D,ee)&&(s(void 0),he--),xt(ce.acceptOverlayRight,D,ee)&&(s(void 0),he++)):(xt(ce.goDownCell,D,ee)?_e+=1:xt(ce.goUpCell,D,ee)?_e-=1:xt(ce.goRightCell,D,ee)?he+=1:xt(ce.goLeftCell,D,ee)?he-=1:xt(ce.goDownCellRetainSelection,D,ee)?(_e+=1,De=!0):xt(ce.goUpCellRetainSelection,D,ee)?(_e-=1,De=!0):xt(ce.goRightCellRetainSelection,D,ee)?(he+=1,De=!0):xt(ce.goLeftCellRetainSelection,D,ee)?(he-=1,De=!0):xt(ce.goToLastRow,D,ee)?_e=M-1:xt(ce.goToFirstRow,D,ee)?_e=Number.MIN_SAFE_INTEGER:xt(ce.goToLastColumn,D,ee)?he=Number.MAX_SAFE_INTEGER:xt(ce.goToFirstColumn,D,ee)?he=Number.MIN_SAFE_INTEGER:(xe===\"rect\"||xe===\"multi-rect\")&&(xt(ce.selectGrowDown,D,ee)?Er([0,1]):xt(ce.selectGrowUp,D,ee)?Er([0,-1]):xt(ce.selectGrowRight,D,ee)?Er([1,0]):xt(ce.selectGrowLeft,D,ee)?Er([-1,0]):xt(ce.selectToLastRow,D,ee)?Er([0,2]):xt(ce.selectToFirstRow,D,ee)?Er([0,-2]):xt(ce.selectToLastColumn,D,ee)?Er([2,0]):xt(ce.selectToFirstColumn,D,ee)&&Er([-2,0])),Be=ee.didMatch);const st=Da(he,_e,!1,De),Qe=ee.didMatch;return Qe&&(st||!Be||Cn)&&te(),Qe},[yo,Se,Xr,G,se,xe,ve,M,Da,Xn,dn,T.length,le,Cn,ja,Oe,He,ln,El,Kr,P,fo,Wd,Vd,Er]),bo=m.useCallback(D=>{let te=!1;if(Me!==void 0&&Me({...D,cancel:()=>{te=!0}}),te||ei(D)||Se.current===void 0)return;const[ee,ye]=Se.current.cell,be=kn.current;if(tt&&!D.metaKey&&!D.ctrlKey&&Se.current!==void 0&&D.key.length===1&&/[ -~]/g.test(D.key)&&D.bounds!==void 0&&$u(j([ee-ve,Math.max(0,Math.min(ye,M-1))]))){if((!ln||ye!==M)&&(be.y>ye||ye>be.y+be.height||be.x>ee||ee>be.x+be.width))return;fo(D.bounds,!0,D.key),D.stopPropagation(),D.preventDefault()}},[tt,Me,ei,Se,j,ve,M,ln,fo]),Xd=m.useCallback((D,te)=>{const ee=D.location[0]-ve;if(D.kind===\"header\"&&K?.(ee,{...D,preventDefault:te}),D.kind===ca){if(ee<0)return;L?.(ee,{...D,preventDefault:te})}if(D.kind===\"cell\"){const[ye,be]=D.location;W?.([ee,be],{...D,preventDefault:te}),aI(Se,D.location)||Da(ye,be,!1,!1)}},[Se,W,L,K,ve,Da]),_l=m.useCallback(async D=>{if(!Xr.paste)return;function te(ce,he,_e,De){const Be=typeof _e==\"object\"?_e?.join(`\n`)??\"\":_e?.toString()??\"\";if(!Zs(ce)&&$u(ce)&&ce.readonly!==!0){const st=B?.(Be,ce);if(st!==void 0&&Ki(st))return{location:he,value:st};const Qe=Ye(ce);if(Qe===void 0)return;if(Qe.kind===Ie.Custom){da(ce.kind===Ie.Custom);const Ke=Qe.onPaste?.(Be,ce.data);return Ke===void 0?void 0:{location:he,value:{...ce,data:Ke}}}else{const Ke=Qe.onPaste?.(Be,ce,{formatted:De,formattedString:typeof De==\"string\"?De:De?.join(`\n`),rawValue:_e});return Ke===void 0?void 0:(da(Ke.kind===ce.kind),{location:he,value:Ke})}}}const ee=Se.columns,ye=Se.rows,be=v.current?.contains(document.activeElement)===!0||u.current?.contains(document.activeElement)===!0;let Ee;if(Se.current!==void 0?Ee=[Se.current.range.x,Se.current.range.y]:ee.length===1?Ee=[ee.first()??0,0]:ye.length===1&&(Ee=[ve,ye.first()??0]),be&&Ee!==void 0){let ce,he;const _e=\"text/plain\",De=\"text/html\";if(navigator.clipboard.read!==void 0){const Ke=await navigator.clipboard.read();for(const ft of Ke){if(ft.types.includes(De)){const Vt=await(await ft.getType(De)).text(),Pt=vT(Vt);if(Pt!==void 0){ce=Pt;break}}ft.types.includes(_e)&&(he=await(await ft.getType(_e)).text())}}else if(navigator.clipboard.readText!==void 0)he=await navigator.clipboard.readText();else if(D!==void 0&&D?.clipboardData!==null){if(D.clipboardData.types.includes(De)){const Ke=D.clipboardData.getData(De);ce=vT(Ke)}ce===void 0&&D.clipboardData.types.includes(_e)&&(he=D.clipboardData.getData(_e))}else return;const[Be,st]=Ee,Qe=[];do{if(Pe===void 0){const Ke=Sr(Ee),ft=he??ce?.map(Vt=>Vt.map(Pt=>Pt.rawValue).join(\"\t\")).join(\"\t\")??\"\",Rt=te(Ke,Ee,ft,void 0);Rt!==void 0&&Qe.push(Rt);break}if(ce===void 0){if(he===void 0)return;ce=T9(he)}if(Pe===!1||typeof Pe==\"function\"&&Pe?.([Ee[0]-ve,Ee[1]],ce.map(Ke=>Ke.map(ft=>ft.rawValue?.toString()??\"\")))!==!0)return;for(const[Ke,ft]of ce.entries()){if(Ke+st>=M)break;for(const[Rt,Vt]of ft.entries()){const Pt=[Rt+Be,Ke+st],[Oi,Di]=Pt;if(Oi>=dt.length||Di>=Qn)continue;const ji=Sr(Pt),Jr=te(ji,Pt,Vt.rawValue,Vt.formatted);Jr!==void 0&&Qe.push(Jr)}}}while(!1);wr(Qe),hr.current?.damage(Qe.map(Ke=>({cell:Ke.location})))}},[B,Ye,Sr,Se,Xr.paste,dt.length,wr,Qn,Pe,ve,M]);or(\"paste\",_l,x,!1,!0);const Ts=m.useCallback(async(D,te)=>{if(!Xr.copy)return;const ee=te===!0||v.current?.contains(document.activeElement)===!0||u.current?.contains(document.activeElement)===!0,ye=Se.columns,be=Se.rows,Ee=(ce,he)=>{if(!Mt)bT(ce,he,D);else{const _e=he.map(De=>({kind:Ie.Text,data:T[De].title,displayData:T[De].title,allowOverlay:!1}));bT([_e,...ce],he,D)}};if(ee&&gn!==void 0){if(Se.current!==void 0){let ce=gn(Se.current.range,er.current.signal);typeof ce!=\"object\"&&(ce=await ce()),Ee(ce,Xs(Se.current.range.x-ve,Se.current.range.x+Se.current.range.width-ve))}else if(be!==void 0&&be.length>0){const he=[...be].map(_e=>{const De=gn({x:ve,y:_e,width:T.length,height:1},er.current.signal);return typeof De==\"object\"?De[0]:De().then(Be=>Be[0])});if(he.some(_e=>_e instanceof Promise)){const _e=await Promise.all(he);Ee(_e,Xs(T.length))}else Ee(he,Xs(T.length))}else if(ye.length>0){const ce=[],he=[];for(const _e of ye){let De=gn({x:_e,y:0,width:1,height:M},er.current.signal);typeof De!=\"object\"&&(De=await De()),ce.push(De),he.push(_e-ve)}if(ce.length===1)Ee(ce[0],he);else{const _e=ce.reduce((De,Be)=>De.map((st,Qe)=>[...st,...Be[Qe]]));Ee(_e,he)}}}},[T,gn,Se,Xr.copy,ve,M,Mt]);or(\"copy\",Ts,x,!1,!1);const Nm=m.useCallback(async D=>{if(!(!Xr.cut||!(v.current?.contains(document.activeElement)===!0||u.current?.contains(document.activeElement)===!0))&&(await Ts(D),Se.current!==void 0)){let ee={current:{cell:Se.current.cell,range:Se.current.range,rangeStack:[]},rows:vt.empty(),columns:vt.empty()};const ye=le?.(ee);if(ye===!1||(ee=ye===!0?ee:ye,ee.current===void 0))return;ja(ee.current.range)}},[ja,Se,Xr.cut,Ts,le]);or(\"cut\",Nm,x,!1,!1);const Om=m.useCallback((D,te)=>{if(Z!==void 0){ve!==0&&(D=D.map(be=>[be[0]-ve,be[1]])),Z(D,te);return}if(D.length===0||te===-1)return;const[ee,ye]=D[te];y.current!==void 0&&y.current[0]===ee&&y.current[1]===ye||(y.current=[ee,ye],Da(ee,ye,!1,!1))},[Z,ve,Da]),[Ms,ks]=Rn?.current?.cell??[],xo=m.useRef(vn);xo.current=vn,m.useLayoutEffect(()=>{!qt.current&&Ms!==void 0&&ks!==void 0&&(Ms!==Yn.current?.current?.cell[0]||ks!==Yn.current?.current?.cell[1])&&xo.current(Ms,ks),qt.current=!1},[Ms,ks]);const Dr=Se.current!==void 0&&(Se.current.cell[0]>=dt.length||Se.current.cell[1]>=Qn);m.useLayoutEffect(()=>{Dr&&Xn(ch,!1)},[Dr,Xn]);const Al=m.useMemo(()=>ln===!0&&St?.tint===!0?vt.fromSingleSelection(Qn-1):vt.empty(),[Qn,ln,St?.tint]),jr=m.useCallback(D=>typeof Bt==\"boolean\"?Bt:Bt?.(D-ve)??!0,[ve,Bt]),wo=m.useMemo(()=>{if(Tl===void 0||u.current===null)return null;const{bounds:D,group:te}=Tl,ee=u.current.getBoundingClientRect();return m.createElement(p9,{bounds:D,group:te,canvasBounds:ee,onClose:()=>ws(void 0),onFinish:ye=>{ws(void 0),X?.(te,ye)}})},[X,Tl]),$c=Math.min(dt.length,ut+(dr?1:0));m.useImperativeHandle(t,()=>({appendRow:(D,te)=>Kr(D+ve,te),updateCells:D=>(ve!==0&&(D=D.map(te=>({cell:[te.cell[0]+ve,te.cell[1]]}))),hr.current?.damage(D)),getBounds:(D,te)=>{if(!(u?.current===null||v?.current===null)){if(D===void 0&&te===void 0){const ee=u.current.getBoundingClientRect(),ye=ee.width/v.current.clientWidth;return{x:ee.x-v.current.scrollLeft*ye,y:ee.y-v.current.scrollTop*ye,width:v.current.scrollWidth*ye,height:v.current.scrollHeight*ye}}return hr.current?.getBounds((D??0)+ve,te)}},focus:()=>hr.current?.focus(),emit:async D=>{switch(D){case\"delete\":bo({bounds:void 0,cancel:()=>{},stopPropagation:()=>{},preventDefault:()=>{},ctrlKey:!1,key:\"Delete\",keyCode:46,metaKey:!1,shiftKey:!1,altKey:!1,rawEvent:void 0,location:void 0});break;case\"fill-right\":bo({bounds:void 0,cancel:()=>{},stopPropagation:()=>{},preventDefault:()=>{},ctrlKey:!0,key:\"r\",keyCode:82,metaKey:!1,shiftKey:!1,altKey:!1,rawEvent:void 0,location:void 0});break;case\"fill-down\":bo({bounds:void 0,cancel:()=>{},stopPropagation:()=>{},preventDefault:()=>{},ctrlKey:!0,key:\"d\",keyCode:68,metaKey:!1,shiftKey:!1,altKey:!1,rawEvent:void 0,location:void 0});break;case\"copy\":await Ts(void 0,!0);break;case\"paste\":await _l();break}},scrollTo:vn,remeasureColumns:D=>{for(const te of D)Ss(te+ve)}}),[Kr,Ss,Ts,bo,_l,ve,vn]);const[_s,As]=_i??[],Bc=m.useCallback(D=>{const[te,ee]=D;if(ee===-1){G!==\"none\"&&(Oe(vt.fromSingleSelection(te),void 0,!1),tr());return}_s===te&&As===ee||(ke({cell:D,range:{x:te,y:ee,width:1,height:1}},!0,!1,\"keyboard-nav\"),vn(te,ee))},[G,tr,vn,_s,As,ke,Oe]),[Ni,Qd]=m.useState(!1),Ns=m.useRef(r_(D=>{Qd(D)},5)),So=m.useCallback(()=>{Ns.current(!0),Se.current===void 0&&Se.columns.length===0&&Se.rows.length===0&&f===void 0&&ke({cell:[ve,uo],range:{x:ve,y:uo,width:1,height:1}},!0,!1,\"keyboard-select\")},[uo,Se,f,ve,ke]),Dm=m.useCallback(()=>{Ns.current(!1)},[]),[Tr,Uc]=m.useMemo(()=>{let D;const te=Sn?.scrollbarWidthOverride??hb(),ee=M+(ln?1:0);if(typeof Gn==\"number\")D=Ht+ee*Gn;else{let be=0;const Ee=Math.min(ee,10);for(let ce=0;ce<Ee;ce++)be+=Gn(ce);be=Math.floor(be/Ee),D=Ht+ee*be}D+=te;const ye=dt.reduce((be,Ee)=>Ee.width+be,0)+te;return[`${Math.min(1e5,ye)}px`,`${Math.min(1e5,D)}px`]},[dt,Sn?.scrollbarWidthOverride,Gn,M,ln,Ht]),za=m.useMemo(()=>M_(Ae),[Ae]);return m.createElement(A_.Provider,{value:Ae},m.createElement(A9,{style:za,className:U,inWidth:R??Tr,inHeight:k??Uc},m.createElement(f9,{fillHandle:wn,drawFocusRing:En,experimental:Sn,fixedShadowX:Tn,fixedShadowY:On,getRowThemeOverride:w,headerIcons:sr,imageWindowLoader:Ur,initialSize:oo,isDraggable:ml,onDragLeave:ms,onRowMoved:lr,overscrollX:bl,overscrollY:Aa,preventDiagonalScrolling:Wr,rightElement:Gr,rightElementProps:yr,smoothScrollX:ps,smoothScrollY:pl,className:U,enableGroups:en,onCanvasFocused:So,onCanvasBlur:Dm,canvasRef:u,onContextMenu:Xd,theme:Ae,cellXOffset:Ti,cellYOffset:uo,accessibilityHeight:Ln.height,onDragEnd:Am,columns:dt,nonGrowWidth:Jt,drawHeader:lo,onColumnProposeMove:F,drawCell:xl,disabledRows:Al,freezeColumns:$c,lockColumns:ve,firstColAccessible:ve===0,getCellContent:Sr,minColumnWidth:cr,maxColumnWidth:ur,searchInputRef:c,showSearch:wi,onSearchClose:bs,highlightRegions:km,getCellsForSelection:gn,getGroupDetails:xs,headerHeight:Xa,isFocused:Ni,groupHeaderHeight:en?ga:0,freezeTrailingRows:Wt+(ln&&St?.sticky===!0?1:0),hasAppendRow:ln,onColumnResize:xr,onColumnResizeEnd:ya,onColumnResizeStart:Qa,onCellFocused:Bc,onColumnMoved:Yd,onDragStart:Fc,onHeaderMenuClick:Cs,onItemHovered:Rs,isFilling:f?.fillHandle===!0,onMouseMove:Rr,onKeyDown:bo,onKeyUp:Fe,onMouseDown:Bd,onMouseUp:_m,onDragOverCell:Zt,onDrop:Br,onSearchResultsChanged:Om,onVisibleRegionChanged:Gd,clientSize:qe,rowHeight:Gn,searchResults:oe,searchValue:me,onSearchValueChange:ne,rows:Qn,scrollRef:v,selection:Se,translateX:Ln.tx,translateY:Ln.ty,verticalBorder:jr,gridRef:hr,getCellRenderer:Ye}),wo,o!==void 0&&m.createElement(m.Suspense,{fallback:null},m.createElement(P9,{...o,validateCell:Na,bloom:_,id:vo,getCellRenderer:Ye,className:Sn?.isSubGrid===!0?\"click-outside-ignore\":void 0,provideEditor:Lt,imageEditorOverride:S,onFinishEditing:Ai,markdownDivCreateNode:C,isOutsideClick:yl}))))},q9=m.forwardRef(H9),ST=20,F9={getAccessibilityString:e=>e.data?.toString()??\"false\",kind:Ie.Boolean,needsHover:!0,useLabel:!1,needsHoverPosition:!0,measure:()=>50,draw:e=>$9(e,e.cell.data,fb(e.cell),e.cell.maxSize??ST),onDelete:e=>({...e,data:!1}),onClick:e=>{const{cell:t,posX:n,posY:a,bounds:o,theme:s}=e,{width:c,height:u,x:f,y:h}=o,v=t.maxSize??ST,y=Math.floor(o.y+u/2),x=o_(v,u,s.cellVerticalPadding),S=i_(t.contentAlign??\"center\",f,c,s.cellHorizontalPadding,x),w=a_(S,y,x),C=s_(f+n,h+a,w);if(fb(t)&&C)return{...t,data:aA(t.data)}},onPaste:(e,t)=>{let n=kh;return e.toLowerCase()===\"true\"?n=!0:e.toLowerCase()===\"false\"?n=!1:e.toLowerCase()===\"indeterminate\"&&(n=Jb),n===t.data?void 0:{...t,data:n}}};function $9(e,t,n,a){if(!n&&t===kh)return;const{ctx:o,hoverAmount:s,theme:c,rect:u,highlighted:f,hoverX:h,hoverY:v,cell:{contentAlign:y}}=e,{x,y:S,width:w,height:C}=u,R=.35;let k=n?1-R+R*s:.4;t===kh&&(k*=s),k!==0&&(o.globalAlpha=k,g1(o,c,t,x,S,w,C,f,h,v,a,y),o.globalAlpha=1)}const B9=kr(\"div\")({name:\"BubblesOverlayEditorStyle\",class:\"gdg-b1ygi5by\",propsAsIs:!1}),U9=e=>{const{bubbles:t}=e;return m.createElement(B9,null,t.map((n,a)=>m.createElement(\"div\",{key:a,className:\"boe-bubble\"},n)),m.createElement(\"textarea\",{className:\"gdg-input\",autoFocus:!0}))},V9={getAccessibilityString:e=>l_(e.data),kind:Ie.Bubble,needsHover:!1,useLabel:!1,needsHoverPosition:!1,measure:(e,t,n)=>t.data.reduce((a,o)=>e.measureText(o).width+a+20,0)+2*n.cellHorizontalPadding-4,draw:e=>G9(e,e.cell.data),provideEditor:()=>e=>{const{value:t}=e;return m.createElement(U9,{bubbles:t.data})},onPaste:()=>{}},W9=4;function G9(e,t){const{rect:n,theme:a,ctx:o,highlighted:s}=e,{x:c,y:u,width:f,height:h}=n,v=20,y=8,x=W9;let S=c+a.cellHorizontalPadding;const w=[];for(const C of t){if(S>c+f)break;const R=Nd(C,o,a.baseFontFull).width;w.push({x:S,width:R}),S+=R+y*2+x}o.beginPath();for(const C of w)di(o,C.x,u+(h-v)/2,C.width+y*2,v,a.roundingRadius??v/2);o.fillStyle=s?a.bgBubbleSelected:a.bgBubble,o.fill();for(const[C,R]of w.entries())o.beginPath(),o.fillStyle=a.textBubble,o.fillText(t[C],R.x+y,u+h/2+fs(o,a))}const Y9=kr(\"div\")({name:\"DrilldownOverlayEditorStyle\",class:\"gdg-d4zsq0x\",propsAsIs:!1}),X9=e=>{const{drilldowns:t}=e;return m.createElement(Y9,null,t.map((n,a)=>m.createElement(\"div\",{key:a,className:\"doe-bubble\"},n.img!==void 0&&m.createElement(\"img\",{src:n.img}),m.createElement(\"div\",null,n.text))))},Q9={getAccessibilityString:e=>l_(e.data.map(t=>t.text)),kind:Ie.Drilldown,needsHover:!1,useLabel:!1,needsHoverPosition:!1,measure:(e,t,n)=>t.data.reduce((a,o)=>e.measureText(o.text).width+a+20+(o.img!==void 0?18:0),0)+2*n.cellHorizontalPadding-4,draw:e=>J9(e,e.cell.data),provideEditor:()=>e=>{const{value:t}=e;return m.createElement(X9,{drilldowns:t.data})},onPaste:()=>{}},K9=4,I0={};function Z9(e,t,n,a){const o=Math.ceil(window.devicePixelRatio),s=5,c=n-s*2,u=4,f=n*o,h=a+s,v=a*3,y=(v+s*2)*o,x=`${e},${t},${o},${n}`;if(I0[x]!==void 0)return{el:I0[x],height:f,width:y,middleWidth:u*o,sideWidth:h*o,padding:s*o,dpr:o};const S=document.createElement(\"canvas\"),w=S.getContext(\"2d\");return w===null?null:(S.width=y,S.height=f,w.scale(o,o),I0[x]=S,w.beginPath(),di(w,s,s,v,c,a),w.shadowColor=\"rgba(24, 25, 34, 0.4)\",w.shadowBlur=1,w.fillStyle=e,w.fill(),w.shadowColor=\"rgba(24, 25, 34, 0.3)\",w.shadowOffsetY=1,w.shadowBlur=5,w.fillStyle=e,w.fill(),w.shadowOffsetY=0,w.shadowBlur=0,w.shadowBlur=0,w.beginPath(),di(w,s+.5,s+.5,v,c,a),w.strokeStyle=t,w.lineWidth=1,w.stroke(),{el:S,height:f,width:y,sideWidth:h*o,middleWidth:a*o,padding:s*o,dpr:o})}function J9(e,t){const{rect:n,theme:a,ctx:o,imageLoader:s,col:c,row:u}=e,{x:f,width:h}=n,v=a.baseFontFull,y=R_(o,v),x=Math.min(n.height,Math.max(16,Math.ceil(y*a.lineHeight)*2)),S=Math.floor(n.y+(n.height-x)/2),w=x-10,C=8,R=K9;let k=f+a.cellHorizontalPadding;const T=a.roundingRadius??6,M=Z9(a.bgCell,a.drilldownBorder,x,T),j=[];for(const I of t){if(k>f+h)break;const A=Nd(I.text,o,v).width;let q=0;I.img!==void 0&&s.loadOrGetImage(I.img,c,u)!==void 0&&(q=w-8+4);const B=A+q+C*2;j.push({x:k,width:B}),k+=B+R}if(M!==null){const{el:I,height:P,middleWidth:A,sideWidth:q,width:B,dpr:V,padding:N}=M,_=q/V,z=N/V;for(const F of j){const O=Math.floor(F.x),$=Math.floor(F.width),W=$-(_-z)*2;o.imageSmoothingEnabled=!1,o.drawImage(I,0,0,q,P,O-z,S,_,x),W>0&&o.drawImage(I,q,0,A,P,O+(_-z),S,W,x),o.drawImage(I,B-q,0,q,P,O+$-(_-z),S,_,x),o.imageSmoothingEnabled=!0}}o.beginPath();for(const[I,P]of j.entries()){const A=t[I];let q=P.x+C;if(A.img!==void 0){const B=s.loadOrGetImage(A.img,c,u);if(B!==void 0){const V=w-8;let N=0,_=0,z=B.width,F=B.height;z>F?(N+=(z-F)/2,z=F):F>z&&(_+=(F-z)/2,F=z),o.beginPath(),di(o,q,S+x/2-V/2,V,V,a.roundingRadius??3),o.save(),o.clip(),o.drawImage(B,N,_,z,F,q,S+x/2-V/2,V,V),o.restore(),q+=V+4}}o.beginPath(),o.fillStyle=a.textBubble,o.fillText(A.text,q,S+x/2+fs(o,a))}}const eF={getAccessibilityString:e=>e.data.join(\", \"),kind:Ie.Image,needsHover:!1,useLabel:!1,needsHoverPosition:!1,draw:e=>tF(e,e.cell.displayData??e.cell.data,e.cell.rounding??e.theme.roundingRadius??4,e.cell.contentAlign),measure:(e,t)=>t.data.length*50,onDelete:e=>({...e,data:[]}),provideEditor:()=>e=>{const{value:t,onFinishedEditing:n,imageEditorOverride:a}=e,o=a??fL;return m.createElement(o,{urls:t.data,canWrite:t.readonly!==!1,onCancel:n,onChange:s=>{n({...t,data:[s]})}})},onPaste:(e,t)=>{e=e.trim();const a=e.split(\",\").map(o=>{try{return new URL(o),o}catch{return}}).filter(o=>o!==void 0);if(!(a.length===t.data.length&&a.every((o,s)=>o===t.data[s])))return{...t,data:a}}},H0=4;function tF(e,t,n,a){const{rect:o,col:s,row:c,theme:u,ctx:f,imageLoader:h}=e,{x:v,y,height:x,width:S}=o,w=x-u.cellVerticalPadding*2,C=[];let R=0;for(let T=0;T<t.length;T++){const M=t[T];if(M.length===0)continue;const j=h.loadOrGetImage(M,s,c);if(j!==void 0){C[T]=j;const I=j.width*(w/j.height);R+=I+H0}}if(R===0)return;R-=H0;let k=v+u.cellHorizontalPadding;a===\"right\"?k=Math.floor(v+S-u.cellHorizontalPadding-R):a===\"center\"&&(k=Math.floor(v+S/2-R/2));for(const T of C){if(T===void 0)continue;const M=T.width*(w/T.height);n>0&&(f.beginPath(),di(f,k,y+u.cellVerticalPadding,M,w,n),f.save(),f.clip()),f.drawImage(T,k,y+u.cellVerticalPadding,M,w),n>0&&f.restore(),k+=M+H0}}function nF(e,t){let n=e*49632+t*325176;return n^=n<<13,n^=n>>17,n^=n<<5,n/4294967295*2}const rF={getAccessibilityString:()=>\"\",kind:Ie.Loading,needsHover:!1,useLabel:!1,needsHoverPosition:!1,measure:()=>120,draw:e=>{const{cell:t,col:n,row:a,ctx:o,rect:s,theme:c}=e;if(t.skeletonWidth===void 0||t.skeletonWidth===0)return;let u=t.skeletonWidth;t.skeletonWidthVariability!==void 0&&t.skeletonWidthVariability>0&&(u+=Math.round(nF(n,a)*t.skeletonWidthVariability));const f=c.cellHorizontalPadding,h=t.skeletonHeight??Math.min(18,s.height-2*c.cellVerticalPadding);di(o,s.x+f,s.y+(s.height-h)/2,u,h,c.roundingRadius??3),o.fillStyle=il(c.textDark,.1),o.fill()},onPaste:()=>{}},aF=()=>e=>e.targetWidth,CT=kr(\"div\")({name:\"MarkdownOverlayEditorStyle\",class:\"gdg-m1pnx84e\",propsAsIs:!1,vars:{\"m1pnx84e-0\":[aF(),\"px\"]}}),iF=e=>{const{value:t,onChange:n,forceEditMode:a,createNode:o,targetRect:s,onFinish:c,validatedSelection:u}=e,f=t.data,h=t.readonly===!0,[v,y]=m.useState(f===\"\"||a),x=m.useCallback(()=>{y(w=>!w)},[]),S=f?\"gdg-ml-6\":\"\";return v?m.createElement(CT,{targetWidth:s.width-20},m.createElement(hm,{autoFocus:!0,highlight:!1,validatedSelection:u,value:f,onKeyDown:w=>{w.key===\"Enter\"&&w.stopPropagation()},onChange:n}),m.createElement(\"div\",{className:`gdg-edit-icon gdg-checkmark-hover ${S}`,onClick:()=>c(t)},m.createElement(iL,null))):m.createElement(CT,{targetWidth:s.width},m.createElement(GL,{contents:f,createNode:o}),!h&&m.createElement(m.Fragment,null,m.createElement(\"div\",{className:\"spacer\"}),m.createElement(\"div\",{className:`gdg-edit-icon gdg-edit-hover ${S}`,onClick:x},m.createElement(n1,null))),m.createElement(\"textarea\",{className:\"gdg-md-edit-textarea gdg-input\",autoFocus:!0}))},oF={getAccessibilityString:e=>e.data?.toString()??\"\",kind:Ie.Markdown,needsHover:!1,needsHoverPosition:!1,drawPrep:Od,measure:(e,t,n)=>{const a=t.data.split(`\n`)[0];return e.measureText(a).width+2*n.cellHorizontalPadding},draw:e=>Zi(e,e.cell.data,e.cell.contentAlign),onDelete:e=>({...e,data:\"\"}),provideEditor:()=>e=>{const{onChange:t,value:n,target:a,onFinishedEditing:o,markdownDivCreateNode:s,forceEditMode:c,validatedSelection:u}=e;return m.createElement(iF,{onFinish:o,targetRect:a,value:n,validatedSelection:u,onChange:f=>t({...n,data:f.target.value}),forceEditMode:c,createNode:s})},onPaste:(e,t)=>e===t.data?void 0:{...t,data:e}},sF={getAccessibilityString:e=>e.row.toString(),kind:Ea.Marker,needsHover:!0,needsHoverPosition:!1,drawPrep:lF,measure:()=>44,draw:e=>uF(e,e.cell.row,e.cell.checked,e.cell.markerKind,e.cell.drawHandle,e.cell.checkboxStyle),onClick:e=>{const{bounds:t,cell:n,posX:a,posY:o}=e,{width:s,height:c}=t,u=n.drawHandle?7+(s-7)/2:s/2,f=c/2;if(Math.abs(a-u)<=10&&Math.abs(o-f)<=10)return{...n,checked:!n.checked}},onPaste:()=>{}};function lF(e,t){const{ctx:n,theme:a}=e,o=a.markerFontFull,s=t??{};return s?.font!==o&&(n.font=o,s.font=o),s.deprep=cF,n.textAlign=\"center\",s}function cF(e){const{ctx:t}=e;t.textAlign=\"start\"}function uF(e,t,n,a,o,s){const{ctx:c,rect:u,hoverAmount:f,theme:h}=e,{x:v,y,width:x,height:S}=u,w=n?1:a===\"checkbox-visible\"?.6+.4*f:f;if(a!==\"number\"&&w>0){c.globalAlpha=w;const C=7*(n?f:1);if(g1(c,h,n,o?v+C:v,y,o?x-C:x,S,!0,void 0,void 0,18,\"center\",s),o){c.globalAlpha=f,c.beginPath();for(const R of[3,6])for(const k of[-5,-1,3])c.rect(v+R,y+S/2+k,2,2);c.fillStyle=h.textLight,c.fill(),c.beginPath()}c.globalAlpha=1}if(a===\"number\"||a===\"both\"&&!n){const C=t.toString(),R=h.markerFontFull,k=v+x/2;a===\"both\"&&f!==0&&(c.globalAlpha=1-f),c.fillStyle=h.textLight,c.font=R,c.fillText(C,k,y+S/2+fs(c,R)),f!==0&&(c.globalAlpha=1)}}const dF={getAccessibilityString:()=>\"\",kind:Ea.NewRow,needsHover:!0,needsHoverPosition:!1,measure:()=>200,draw:e=>fF(e,e.cell.hint,e.cell.icon),onPaste:()=>{}};function fF(e,t,n){const{ctx:a,rect:o,hoverAmount:s,theme:c,spriteManager:u}=e,{x:f,y:h,width:v,height:y}=o;a.beginPath(),a.globalAlpha=s,a.rect(f+1,h+1,v,y-2),a.fillStyle=c.bgHeaderHovered,a.fill(),a.globalAlpha=1,a.beginPath();const x=t!==\"\";let S=0;if(n!==void 0){const C=y-8,R=f+8/2,k=h+8/2;u.drawSprite(n,\"normal\",a,R,k,C,c,x?1:s),S=C}else{S=24;const w=12,C=x?w:s*w,R=x?0:(1-s)*w*.5,k=c.cellHorizontalPadding+4;C>0&&(a.moveTo(f+k+R,h+y/2),a.lineTo(f+k+R+C,h+y/2),a.moveTo(f+k+R+C*.5,h+y/2-C*.5),a.lineTo(f+k+R+C*.5,h+y/2+C*.5),a.lineWidth=2,a.strokeStyle=c.bgIconHeader,a.lineCap=\"round\",a.stroke())}a.fillStyle=c.textMedium,a.fillText(t,S+f+c.cellHorizontalPadding+.5,h+y/2+fs(a,c)),a.beginPath()}const hF=m.lazy(async()=>await O_(()=>Promise.resolve().then(()=>jG),void 0)),mF={getAccessibilityString:e=>e.data?.toString()??\"\",kind:Ie.Number,needsHover:!1,needsHoverPosition:!1,useLabel:!0,drawPrep:Od,draw:e=>Zi(e,e.cell.displayData,e.cell.contentAlign),measure:(e,t,n)=>e.measureText(t.displayData).width+n.cellHorizontalPadding*2,onDelete:e=>({...e,data:void 0}),provideEditor:()=>e=>{const{isHighlighted:t,onChange:n,value:a,validatedSelection:o}=e;return m.createElement(m.Suspense,{fallback:null},m.createElement(hF,{highlight:t,disabled:a.readonly===!0,value:a.data,fixedDecimals:a.fixedDecimals,allowNegative:a.allowNegative,thousandSeparator:a.thousandSeparator,decimalSeparator:a.decimalSeparator,validatedSelection:o,onChange:s=>n({...a,data:Number.isNaN(s.floatValue??0)?0:s.floatValue})}))},onPaste:(e,t,n)=>{const a=typeof n.rawValue==\"number\"?n.rawValue:Number.parseFloat(typeof n.rawValue==\"string\"?n.rawValue:e);if(!(Number.isNaN(a)||t.data===a))return{...t,data:a,displayData:n.formattedString??t.displayData}}},pF={getAccessibilityString:()=>\"\",measure:()=>108,kind:Ie.Protected,needsHover:!1,needsHoverPosition:!1,draw:gF,onPaste:()=>{}};function gF(e){const{ctx:t,theme:n,rect:a}=e,{x:o,y:s,height:c}=a;t.beginPath();const u=2.5;let f=o+n.cellHorizontalPadding+u;const h=s+c/2,v=Math.cos(fR(30))*u,y=Math.sin(fR(30))*u;for(let x=0;x<12;x++)t.moveTo(f,h-u),t.lineTo(f,h+u),t.moveTo(f+v,h-y),t.lineTo(f-v,h+y),t.moveTo(f-v,h-y),t.lineTo(f+v,h+y),f+=8;t.lineWidth=1.1,t.lineCap=\"square\",t.strokeStyle=n.textLight,t.stroke()}const vF={getAccessibilityString:e=>e.data?.toString()??\"\",kind:Ie.RowID,needsHover:!1,needsHoverPosition:!1,drawPrep:(e,t)=>Od(e,t,e.theme.textLight),draw:e=>Zi(e,e.cell.data,e.cell.contentAlign),measure:(e,t,n)=>e.measureText(t.data).width+n.cellHorizontalPadding*2,provideEditor:()=>e=>{const{isHighlighted:t,onChange:n,value:a,validatedSelection:o}=e;return At.createElement(hm,{highlight:t,autoFocus:a.readonly!==!0,disabled:a.readonly!==!1,value:a.data,validatedSelection:o,onChange:s=>n({...a,data:s.target.value})})},onPaste:()=>{}},yF={getAccessibilityString:e=>e.data?.toString()??\"\",kind:Ie.Text,needsHover:e=>e.hoverEffect===!0,needsHoverPosition:!1,drawPrep:Od,useLabel:!0,draw:e=>{const{cell:t,hoverAmount:n,hyperWrapping:a,ctx:o,rect:s,theme:c,overrideCursor:u}=e,{displayData:f,contentAlign:h,hoverEffect:v,allowWrapping:y}=t;if(v===!0&&n>0){o.textBaseline=\"alphabetic\";const x=c.cellHorizontalPadding,S=c.cellVerticalPadding,w=Nd(f,o,c.baseFontFull,\"alphabetic\"),C=s.height-S,R=Math.min(C,w.actualBoundingBoxAscent*2.5);o.beginPath(),di(o,s.x+x/2,s.y+(s.height-R)/2+1,w.width+x*3,R-1,c.roundingRadius??4),o.globalAlpha=n,o.fillStyle=il(c.textDark,.1),o.fill(),o.globalAlpha=1,o.fillStyle=c.textDark,o.textBaseline=\"middle\",u?.(\"text\")}Zi(e,f,h,y,a)},measure:(e,t,n)=>{const a=t.displayData.split(`\n`,t.allowWrapping===!0?void 0:1);let o=0;for(const s of a)o=Math.max(o,e.measureText(s).width);return o+2*n.cellHorizontalPadding},onDelete:e=>({...e,data:\"\"}),provideEditor:e=>({disablePadding:e.allowWrapping===!0,editor:t=>{const{isHighlighted:n,onChange:a,value:o,validatedSelection:s}=t;return m.createElement(hm,{style:e.allowWrapping===!0?{padding:\"3px 8.5px\"}:void 0,highlight:n,autoFocus:o.readonly!==!0,disabled:o.readonly===!0,altNewline:!0,value:o.data,validatedSelection:s,onChange:c=>a({...o,data:c.target.value})})}}),onPaste:(e,t,n)=>e===t.data?void 0:{...t,data:e,displayData:n.formattedString??t.displayData}},bF=kr(\"div\")({name:\"UriOverlayEditorStyle\",class:\"gdg-u1rrojo\",propsAsIs:!1}),xF=e=>{const{uri:t,onChange:n,forceEditMode:a,readonly:o,validatedSelection:s,preview:c}=e,[u,f]=m.useState(!o&&(t===\"\"||a)),h=m.useCallback(()=>{f(!0)},[]);return u?m.createElement(hm,{validatedSelection:s,highlight:!0,autoFocus:!0,value:t,onChange:n}):m.createElement(bF,null,m.createElement(\"a\",{className:\"gdg-link-area\",href:t,target:\"_blank\",rel:\"noopener noreferrer\"},c),!o&&m.createElement(\"div\",{className:\"gdg-edit-icon\",onClick:h},m.createElement(n1,null)),m.createElement(\"textarea\",{className:\"gdg-input\",autoFocus:!0}))};function RT(e,t,n,a){let o=n.cellHorizontalPadding;const s=t.height/2-e.actualBoundingBoxAscent/2,c=e.width,u=e.actualBoundingBoxAscent;return a===\"right\"?o=t.width-c-n.cellHorizontalPadding:a===\"center\"&&(o=t.width/2-c/2),{x:o,y:s,width:c,height:u}}const wF={getAccessibilityString:e=>e.data?.toString()??\"\",kind:Ie.Uri,needsHover:e=>e.hoverEffect===!0,needsHoverPosition:!0,useLabel:!0,drawPrep:Od,draw:e=>{const{cell:t,theme:n,overrideCursor:a,hoverX:o,hoverY:s,rect:c,ctx:u}=e,f=t.displayData??t.data,h=t.hoverEffect===!0;if(a!==void 0&&h&&o!==void 0&&s!==void 0){const v=Nd(f,u,n.baseFontFull),y=RT(v,c,n,t.contentAlign),{x,y:S,width:w,height:C}=y;if(o>=x-4&&o<=x-4+w+8&&s>=S-4&&s<=S-4+C+8){const R=fs(u,n.baseFontFull);a(\"pointer\");const k=5,T=S-R;u.beginPath(),u.moveTo(c.x+x,Math.floor(c.y+T+C+k)+.5),u.lineTo(c.x+x+w,Math.floor(c.y+T+C+k)+.5),u.strokeStyle=n.linkColor,u.stroke(),u.save(),u.fillStyle=e.cellFillColor,Zi({...e,rect:{...c,x:c.x-1}},f,t.contentAlign),Zi({...e,rect:{...c,x:c.x-2}},f,t.contentAlign),Zi({...e,rect:{...c,x:c.x+1}},f,t.contentAlign),Zi({...e,rect:{...c,x:c.x+2}},f,t.contentAlign),u.restore()}}u.fillStyle=h?n.linkColor:n.textDark,Zi(e,f,t.contentAlign)},onClick:e=>{const{cell:t,bounds:n,posX:a,posY:o,theme:s}=e,c=t.displayData??t.data;if(t.hoverEffect!==!0||t.onClickUri===void 0)return;const u=dI(c,s.baseFontFull);if(u===void 0)return;const f=RT(u,n,s,t.contentAlign);pm({x:f.x-4,y:f.y-4,width:f.width+8,height:f.height+8},a,o)&&t.onClickUri(e)},measure:(e,t,n)=>e.measureText(t.displayData??t.data).width+n.cellHorizontalPadding*2,onDelete:e=>({...e,data:\"\"}),provideEditor:e=>t=>{const{onChange:n,value:a,forceEditMode:o,validatedSelection:s}=t;return m.createElement(xF,{forceEditMode:a.readonly!==!0&&(o||e.hoverEffect===!0&&e.onClickUri!==void 0),uri:a.data,preview:a.displayData??a.data,validatedSelection:s,readonly:a.readonly===!0,onChange:c=>n({...a,data:c.target.value})})},onPaste:(e,t,n)=>e===t.data?void 0:{...t,data:e,displayData:n.formattedString??t.displayData}},SF=[sF,dF,F9,V9,Q9,eF,rF,oF,mF,pF,vF,yF,wF];var q0,ET;function CF(){if(ET)return q0;ET=1;var e=n_(),t=ll(),n=\"Expected a function\";function a(o,s,c){var u=!0,f=!0;if(typeof o!=\"function\")throw new TypeError(n);return t(c)&&(u=\"leading\"in c?!!c.leading:u,f=\"trailing\"in c?!!c.trailing:f),e(o,s,{leading:u,maxWait:s,trailing:f})}return q0=a,q0}var RF=CF();const EF=Ua(RF),F0=[];class TF extends T_{imageLoaded=()=>{};loadedLocations=[];cache={};setCallback(t){this.imageLoaded=t}sendLoaded=EF(()=>{this.imageLoaded(new td(this.loadedLocations)),this.loadedLocations=[]},20);clearOutOfWindow=()=>{const t=Object.keys(this.cache);for(const n of t){const a=this.cache[n];let o=!1;for(let s=0;s<a.cells.length;s++){const c=a.cells[s];if(this.isInWindow(c)){o=!0;break}}o?a.cells=a.cells.filter(this.isInWindow):(a.cancel(),delete this.cache[n])}};loadImage(t,n,a,o){let s=!1;const c=F0.pop()??new Image;let u=!1;const f={img:void 0,cells:[qa(n,a)],url:t,cancel:()=>{u||(u=!0,F0.length<12?F0.unshift(c):s||(c.src=\"\"))}},h=new Promise(v=>c.addEventListener(\"load\",()=>v(null)));requestAnimationFrame(async()=>{try{c.src=t,await h,await c.decode();const v=this.cache[o];if(v!==void 0&&!u){v.img=c;for(const y of v.cells)this.loadedLocations.push(h1(y));s=!0,this.sendLoaded()}}catch{f.cancel()}}),this.cache[o]=f}loadOrGetImage(t,n,a){const o=t,s=this.cache[o];if(s!==void 0){const c=qa(n,a);return s.cells.includes(c)||s.cells.push(c),s.img}else this.loadImage(t,n,a,o)}}const MF=(e,t)=>{const n=m.useMemo(()=>({...RH,...e.headerIcons}),[e.headerIcons]),a=m.useMemo(()=>e.imageWindowLoader??new TF,[e.imageWindowLoader]);return m.createElement(q9,{...e,renderers:SF,headerIcons:n,ref:t,imageWindowLoader:a})},kF=m.forwardRef(MF);function _F(e){const t=AF(e),n=m.forwardRef((a,o)=>{const{children:s,...c}=a,u=m.Children.toArray(s),f=u.find(OF);if(f){const h=f.props.children,v=u.map(y=>y===f?m.Children.count(h)>1?m.Children.only(null):m.isValidElement(h)?h.props.children:null:y);return g.jsx(t,{...c,ref:o,children:m.isValidElement(h)?m.cloneElement(h,void 0,v):null})}return g.jsx(t,{...c,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function AF(e){const t=m.forwardRef((n,a)=>{const{children:o,...s}=n;if(m.isValidElement(o)){const c=jF(o),u=DF(s,o.props);return o.type!==m.Fragment&&(u.ref=a?Zn(a,c):c),m.cloneElement(o,u)}return m.Children.count(o)>1?m.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var NF=Symbol(\"radix.slottable\");function OF(e){return m.isValidElement(e)&&typeof e.type==\"function\"&&\"__radixId\"in e.type&&e.type.__radixId===NF}function DF(e,t){const n={...t};for(const a in t){const o=e[a],s=t[a];/^on[A-Z]/.test(a)?o&&s?n[a]=(...u)=>{const f=s(...u);return o(...u),f}:o&&(n[a]=o):a===\"style\"?n[a]={...o,...s}:a===\"className\"&&(n[a]=[o,s].filter(Boolean).join(\" \"))}return{...e,...n}}function jF(e){let t=Object.getOwnPropertyDescriptor(e.props,\"ref\")?.get,n=t&&\"isReactWarning\"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,\"ref\")?.get,n=t&&\"isReactWarning\"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var zF=[\"a\",\"button\",\"div\",\"form\",\"h2\",\"h3\",\"img\",\"input\",\"label\",\"li\",\"nav\",\"ol\",\"p\",\"select\",\"span\",\"svg\",\"ul\"],PF=zF.reduce((e,t)=>{const n=_F(`Primitive.${t}`),a=m.forwardRef((o,s)=>{const{asChild:c,...u}=o,f=c?n:t;return typeof window<\"u\"&&(window[Symbol.for(\"radix-ui\")]=!0),g.jsx(f,{...u,ref:s})});return a.displayName=`Primitive.${t}`,{...e,[t]:a}},{});function TT(e){const t=LF(e),n=m.forwardRef((a,o)=>{const{children:s,...c}=a,u=m.Children.toArray(s),f=u.find(HF);if(f){const h=f.props.children,v=u.map(y=>y===f?m.Children.count(h)>1?m.Children.only(null):m.isValidElement(h)?h.props.children:null:y);return g.jsx(t,{...c,ref:o,children:m.isValidElement(h)?m.cloneElement(h,void 0,v):null})}return g.jsx(t,{...c,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function LF(e){const t=m.forwardRef((n,a)=>{const{children:o,...s}=n;if(m.isValidElement(o)){const c=FF(o),u=qF(s,o.props);return o.type!==m.Fragment&&(u.ref=a?Zn(a,c):c),m.cloneElement(o,u)}return m.Children.count(o)>1?m.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var IF=Symbol(\"radix.slottable\");function HF(e){return m.isValidElement(e)&&typeof e.type==\"function\"&&\"__radixId\"in e.type&&e.type.__radixId===IF}function qF(e,t){const n={...t};for(const a in t){const o=e[a],s=t[a];/^on[A-Z]/.test(a)?o&&s?n[a]=(...u)=>{const f=s(...u);return o(...u),f}:o&&(n[a]=o):a===\"style\"?n[a]={...o,...s}:a===\"className\"&&(n[a]=[o,s].filter(Boolean).join(\" \"))}return{...e,...n}}function FF(e){let t=Object.getOwnPropertyDescriptor(e.props,\"ref\")?.get,n=t&&\"isReactWarning\"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,\"ref\")?.get,n=t&&\"isReactWarning\"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function iA(e){const t=e+\"CollectionProvider\",[n,a]=mi(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),c=C=>{const{scope:R,children:k}=C,T=At.useRef(null),M=At.useRef(new Map).current;return g.jsx(o,{scope:R,itemMap:M,collectionRef:T,children:k})};c.displayName=t;const u=e+\"CollectionSlot\",f=TT(u),h=At.forwardRef((C,R)=>{const{scope:k,children:T}=C,M=s(u,k),j=pn(R,M.collectionRef);return g.jsx(f,{ref:j,children:T})});h.displayName=u;const v=e+\"CollectionItemSlot\",y=\"data-radix-collection-item\",x=TT(v),S=At.forwardRef((C,R)=>{const{scope:k,children:T,...M}=C,j=At.useRef(null),I=pn(R,j),P=s(v,k);return At.useEffect(()=>(P.itemMap.set(j,{ref:j,...M}),()=>{P.itemMap.delete(j)})),g.jsx(x,{[y]:\"\",ref:I,children:T})});S.displayName=v;function w(C){const R=s(e+\"CollectionConsumer\",C);return At.useCallback(()=>{const T=R.collectionRef.current;if(!T)return[];const M=Array.from(T.querySelectorAll(`[${y}]`));return Array.from(R.itemMap.values()).sort((P,A)=>M.indexOf(P.ref.current)-M.indexOf(A.ref.current))},[R.collectionRef,R.itemMap])}return[{Provider:c,Slot:h,ItemSlot:S},w,a]}var $F=m.createContext(void 0);function oA(e){const t=m.useContext($F);return e||t||\"ltr\"}function sA(e){const t=BF(e),n=m.forwardRef((a,o)=>{const{children:s,...c}=a,u=m.Children.toArray(s),f=u.find(VF);if(f){const h=f.props.children,v=u.map(y=>y===f?m.Children.count(h)>1?m.Children.only(null):m.isValidElement(h)?h.props.children:null:y);return g.jsx(t,{...c,ref:o,children:m.isValidElement(h)?m.cloneElement(h,void 0,v):null})}return g.jsx(t,{...c,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function BF(e){const t=m.forwardRef((n,a)=>{const{children:o,...s}=n;if(m.isValidElement(o)){const c=GF(o),u=WF(s,o.props);return o.type!==m.Fragment&&(u.ref=a?Zn(a,c):c),m.cloneElement(o,u)}return m.Children.count(o)>1?m.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var UF=Symbol(\"radix.slottable\");function VF(e){return m.isValidElement(e)&&typeof e.type==\"function\"&&\"__radixId\"in e.type&&e.type.__radixId===UF}function WF(e,t){const n={...t};for(const a in t){const o=e[a],s=t[a];/^on[A-Z]/.test(a)?o&&s?n[a]=(...u)=>{const f=s(...u);return o(...u),f}:o&&(n[a]=o):a===\"style\"?n[a]={...o,...s}:a===\"className\"&&(n[a]=[o,s].filter(Boolean).join(\" \"))}return{...e,...n}}function GF(e){let t=Object.getOwnPropertyDescriptor(e.props,\"ref\")?.get,n=t&&\"isReactWarning\"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,\"ref\")?.get,n=t&&\"isReactWarning\"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var YF=[\"a\",\"button\",\"div\",\"form\",\"h2\",\"h3\",\"img\",\"input\",\"label\",\"li\",\"nav\",\"ol\",\"p\",\"select\",\"span\",\"svg\",\"ul\"],Dd=YF.reduce((e,t)=>{const n=sA(`Primitive.${t}`),a=m.forwardRef((o,s)=>{const{asChild:c,...u}=o,f=c?n:t;return typeof window<\"u\"&&(window[Symbol.for(\"radix-ui\")]=!0),g.jsx(f,{...u,ref:s})});return a.displayName=`Primitive.${t}`,{...e,[t]:a}},{});function XF(e,t){e&&Sd.flushSync(()=>e.dispatchEvent(t))}function QF(e){const t=KF(e),n=m.forwardRef((a,o)=>{const{children:s,...c}=a,u=m.Children.toArray(s),f=u.find(JF);if(f){const h=f.props.children,v=u.map(y=>y===f?m.Children.count(h)>1?m.Children.only(null):m.isValidElement(h)?h.props.children:null:y);return g.jsx(t,{...c,ref:o,children:m.isValidElement(h)?m.cloneElement(h,void 0,v):null})}return g.jsx(t,{...c,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function KF(e){const t=m.forwardRef((n,a)=>{const{children:o,...s}=n;if(m.isValidElement(o)){const c=t$(o),u=e$(s,o.props);return o.type!==m.Fragment&&(u.ref=a?Zn(a,c):c),m.cloneElement(o,u)}return m.Children.count(o)>1?m.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ZF=Symbol(\"radix.slottable\");function JF(e){return m.isValidElement(e)&&typeof e.type==\"function\"&&\"__radixId\"in e.type&&e.type.__radixId===ZF}function e$(e,t){const n={...t};for(const a in t){const o=e[a],s=t[a];/^on[A-Z]/.test(a)?o&&s?n[a]=(...u)=>{const f=s(...u);return o(...u),f}:o&&(n[a]=o):a===\"style\"?n[a]={...o,...s}:a===\"className\"&&(n[a]=[o,s].filter(Boolean).join(\" \"))}return{...e,...n}}function t$(e){let t=Object.getOwnPropertyDescriptor(e.props,\"ref\")?.get,n=t&&\"isReactWarning\"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,\"ref\")?.get,n=t&&\"isReactWarning\"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var n$=[\"a\",\"button\",\"div\",\"form\",\"h2\",\"h3\",\"img\",\"input\",\"label\",\"li\",\"nav\",\"ol\",\"p\",\"select\",\"span\",\"svg\",\"ul\"],lA=n$.reduce((e,t)=>{const n=QF(`Primitive.${t}`),a=m.forwardRef((o,s)=>{const{asChild:c,...u}=o,f=c?n:t;return typeof window<\"u\"&&(window[Symbol.for(\"radix-ui\")]=!0),g.jsx(f,{...u,ref:s})});return a.displayName=`Primitive.${t}`,{...e,[t]:a}},{}),$0=\"rovingFocusGroup.onEntryFocus\",r$={bubbles:!1,cancelable:!0},jd=\"RovingFocusGroup\",[wb,cA,a$]=iA(jd),[i$,uA]=mi(jd,[a$]),[o$,s$]=i$(jd),dA=m.forwardRef((e,t)=>g.jsx(wb.Provider,{scope:e.__scopeRovingFocusGroup,children:g.jsx(wb.Slot,{scope:e.__scopeRovingFocusGroup,children:g.jsx(l$,{...e,ref:t})})}));dA.displayName=jd;var l$=m.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:a,loop:o=!1,dir:s,currentTabStopId:c,defaultCurrentTabStopId:u,onCurrentTabStopIdChange:f,onEntryFocus:h,preventScrollOnEntryFocus:v=!1,...y}=e,x=m.useRef(null),S=pn(t,x),w=oA(s),[C,R]=zc({prop:c,defaultProp:u??null,onChange:f,caller:jd}),[k,T]=m.useState(!1),M=eo(h),j=cA(n),I=m.useRef(!1),[P,A]=m.useState(0);return m.useEffect(()=>{const q=x.current;if(q)return q.addEventListener($0,M),()=>q.removeEventListener($0,M)},[M]),g.jsx(o$,{scope:n,orientation:a,dir:w,loop:o,currentTabStopId:C,onItemFocus:m.useCallback(q=>R(q),[R]),onItemShiftTab:m.useCallback(()=>T(!0),[]),onFocusableItemAdd:m.useCallback(()=>A(q=>q+1),[]),onFocusableItemRemove:m.useCallback(()=>A(q=>q-1),[]),children:g.jsx(lA.div,{tabIndex:k||P===0?-1:0,\"data-orientation\":a,...y,ref:S,style:{outline:\"none\",...e.style},onMouseDown:at(e.onMouseDown,()=>{I.current=!0}),onFocus:at(e.onFocus,q=>{const B=!I.current;if(q.target===q.currentTarget&&B&&!k){const V=new CustomEvent($0,r$);if(q.currentTarget.dispatchEvent(V),!V.defaultPrevented){const N=j().filter($=>$.focusable),_=N.find($=>$.active),z=N.find($=>$.id===C),O=[_,z,...N].filter(Boolean).map($=>$.ref.current);mA(O,v)}}I.current=!1}),onBlur:at(e.onBlur,()=>T(!1))})})}),fA=\"RovingFocusGroupItem\",hA=m.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:a=!0,active:o=!1,tabStopId:s,children:c,...u}=e,f=rs(),h=s||f,v=s$(fA,n),y=v.currentTabStopId===h,x=cA(n),{onFocusableItemAdd:S,onFocusableItemRemove:w,currentTabStopId:C}=v;return m.useEffect(()=>{if(a)return S(),()=>w()},[a,S,w]),g.jsx(wb.ItemSlot,{scope:n,id:h,focusable:a,active:o,children:g.jsx(lA.span,{tabIndex:y?0:-1,\"data-orientation\":v.orientation,...u,ref:t,onMouseDown:at(e.onMouseDown,R=>{a?v.onItemFocus(h):R.preventDefault()}),onFocus:at(e.onFocus,()=>v.onItemFocus(h)),onKeyDown:at(e.onKeyDown,R=>{if(R.key===\"Tab\"&&R.shiftKey){v.onItemShiftTab();return}if(R.target!==R.currentTarget)return;const k=d$(R,v.orientation,v.dir);if(k!==void 0){if(R.metaKey||R.ctrlKey||R.altKey||R.shiftKey)return;R.preventDefault();let M=x().filter(j=>j.focusable).map(j=>j.ref.current);if(k===\"last\")M.reverse();else if(k===\"prev\"||k===\"next\"){k===\"prev\"&&M.reverse();const j=M.indexOf(R.currentTarget);M=v.loop?f$(M,j+1):M.slice(j+1)}setTimeout(()=>mA(M))}}),children:typeof c==\"function\"?c({isCurrentTabStop:y,hasTabStop:C!=null}):c})})});hA.displayName=fA;var c$={ArrowLeft:\"prev\",ArrowUp:\"prev\",ArrowRight:\"next\",ArrowDown:\"next\",PageUp:\"first\",Home:\"first\",PageDown:\"last\",End:\"last\"};function u$(e,t){return t!==\"rtl\"?e:e===\"ArrowLeft\"?\"ArrowRight\":e===\"ArrowRight\"?\"ArrowLeft\":e}function d$(e,t,n){const a=u$(e.key,n);if(!(t===\"vertical\"&&[\"ArrowLeft\",\"ArrowRight\"].includes(a))&&!(t===\"horizontal\"&&[\"ArrowUp\",\"ArrowDown\"].includes(a)))return c$[a]}function mA(e,t=!1){const n=document.activeElement;for(const a of e)if(a===n||(a.focus({preventScroll:t}),document.activeElement!==n))return}function f$(e,t){return e.map((n,a)=>e[(t+a)%e.length])}var h$=dA,m$=hA,Sb=[\"Enter\",\" \"],p$=[\"ArrowDown\",\"PageUp\",\"Home\"],pA=[\"ArrowUp\",\"PageDown\",\"End\"],g$=[...p$,...pA],v$={ltr:[...Sb,\"ArrowRight\"],rtl:[...Sb,\"ArrowLeft\"]},y$={ltr:[\"ArrowLeft\"],rtl:[\"ArrowRight\"]},zd=\"Menu\",[hd,b$,x$]=iA(zd),[fl,gA]=mi(zd,[x$,jc,uA]),gm=jc(),vA=uA(),[w$,hl]=fl(zd),[S$,Pd]=fl(zd),yA=e=>{const{__scopeMenu:t,open:n=!1,children:a,dir:o,onOpenChange:s,modal:c=!0}=e,u=gm(t),[f,h]=m.useState(null),v=m.useRef(!1),y=eo(s),x=oA(o);return m.useEffect(()=>{const S=()=>{v.current=!0,document.addEventListener(\"pointerdown\",w,{capture:!0,once:!0}),document.addEventListener(\"pointermove\",w,{capture:!0,once:!0})},w=()=>v.current=!1;return document.addEventListener(\"keydown\",S,{capture:!0}),()=>{document.removeEventListener(\"keydown\",S,{capture:!0}),document.removeEventListener(\"pointerdown\",w,{capture:!0}),document.removeEventListener(\"pointermove\",w,{capture:!0})}},[]),g.jsx(Hb,{...u,children:g.jsx(w$,{scope:t,open:n,onOpenChange:y,content:f,onContentChange:h,children:g.jsx(S$,{scope:t,onClose:m.useCallback(()=>y(!1),[y]),isUsingKeyboardRef:v,dir:x,modal:c,children:a})})})};yA.displayName=zd;var C$=\"MenuAnchor\",b1=m.forwardRef((e,t)=>{const{__scopeMenu:n,...a}=e,o=gm(n);return g.jsx(Kh,{...o,...a,ref:t})});b1.displayName=C$;var x1=\"MenuPortal\",[R$,bA]=fl(x1,{forceMount:void 0}),xA=e=>{const{__scopeMenu:t,forceMount:n,children:a,container:o}=e,s=hl(x1,t);return g.jsx(R$,{scope:t,forceMount:n,children:g.jsx(Va,{present:n||s.open,children:g.jsx(Zh,{asChild:!0,container:o,children:a})})})};xA.displayName=x1;var Ta=\"MenuContent\",[E$,w1]=fl(Ta),wA=m.forwardRef((e,t)=>{const n=bA(Ta,e.__scopeMenu),{forceMount:a=n.forceMount,...o}=e,s=hl(Ta,e.__scopeMenu),c=Pd(Ta,e.__scopeMenu);return g.jsx(hd.Provider,{scope:e.__scopeMenu,children:g.jsx(Va,{present:a||s.open,children:g.jsx(hd.Slot,{scope:e.__scopeMenu,children:c.modal?g.jsx(T$,{...o,ref:t}):g.jsx(M$,{...o,ref:t})})})})}),T$=m.forwardRef((e,t)=>{const n=hl(Ta,e.__scopeMenu),a=m.useRef(null),o=pn(t,a);return m.useEffect(()=>{const s=a.current;if(s)return Ub(s)},[]),g.jsx(S1,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:at(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),M$=m.forwardRef((e,t)=>{const n=hl(Ta,e.__scopeMenu);return g.jsx(S1,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),k$=sA(\"MenuContent.ScrollLock\"),S1=m.forwardRef((e,t)=>{const{__scopeMenu:n,loop:a=!1,trapFocus:o,onOpenAutoFocus:s,onCloseAutoFocus:c,disableOutsidePointerEvents:u,onEntryFocus:f,onEscapeKeyDown:h,onPointerDownOutside:v,onFocusOutside:y,onInteractOutside:x,onDismiss:S,disableOutsideScroll:w,...C}=e,R=hl(Ta,n),k=Pd(Ta,n),T=gm(n),M=vA(n),j=b$(n),[I,P]=m.useState(null),A=m.useRef(null),q=pn(t,A,R.onContentChange),B=m.useRef(0),V=m.useRef(\"\"),N=m.useRef(0),_=m.useRef(null),z=m.useRef(\"right\"),F=m.useRef(0),O=w?am:m.Fragment,$=w?{as:k$,allowPinchZoom:!0}:void 0,W=K=>{const ie=V.current+K,L=j().filter(ne=>!ne.disabled),X=document.activeElement,Y=L.find(ne=>ne.ref.current===X)?.textValue,re=L.map(ne=>ne.textValue),Z=q$(re,ie,Y),oe=L.find(ne=>ne.textValue===Z)?.ref.current;(function ne(me){V.current=me,window.clearTimeout(B.current),me!==\"\"&&(B.current=window.setTimeout(()=>ne(\"\"),1e3))})(ie),oe&&setTimeout(()=>oe.focus())};m.useEffect(()=>()=>window.clearTimeout(B.current),[]),Bb();const U=m.useCallback(K=>z.current===_.current?.side&&$$(K,_.current?.area),[]);return g.jsx(E$,{scope:n,searchRef:V,onItemEnter:m.useCallback(K=>{U(K)&&K.preventDefault()},[U]),onItemLeave:m.useCallback(K=>{U(K)||(A.current?.focus(),P(null))},[U]),onTriggerLeave:m.useCallback(K=>{U(K)&&K.preventDefault()},[U]),pointerGraceTimerRef:N,onPointerGraceIntentChange:m.useCallback(K=>{_.current=K},[]),children:g.jsx(O,{...$,children:g.jsx(nm,{asChild:!0,trapped:o,onMountAutoFocus:at(s,K=>{K.preventDefault(),A.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:c,children:g.jsx(Cd,{asChild:!0,disableOutsidePointerEvents:u,onEscapeKeyDown:h,onPointerDownOutside:v,onFocusOutside:y,onInteractOutside:x,onDismiss:S,children:g.jsx(h$,{asChild:!0,...M,dir:k.dir,orientation:\"vertical\",loop:a,currentTabStopId:I,onCurrentTabStopIdChange:P,onEntryFocus:at(f,K=>{k.isUsingKeyboardRef.current||K.preventDefault()}),preventScrollOnEntryFocus:!0,children:g.jsx(qb,{role:\"menu\",\"aria-orientation\":\"vertical\",\"data-state\":LA(R.open),\"data-radix-menu-content\":\"\",dir:k.dir,...T,...C,ref:q,style:{outline:\"none\",...C.style},onKeyDown:at(C.onKeyDown,K=>{const L=K.target.closest(\"[data-radix-menu-content]\")===K.currentTarget,X=K.ctrlKey||K.altKey||K.metaKey,Y=K.key.length===1;L&&(K.key===\"Tab\"&&K.preventDefault(),!X&&Y&&W(K.key));const re=A.current;if(K.target!==re||!g$.includes(K.key))return;K.preventDefault();const oe=j().filter(ne=>!ne.disabled).map(ne=>ne.ref.current);pA.includes(K.key)&&oe.reverse(),I$(oe)}),onBlur:at(e.onBlur,K=>{K.currentTarget.contains(K.target)||(window.clearTimeout(B.current),V.current=\"\")}),onPointerMove:at(e.onPointerMove,md(K=>{const ie=K.target,L=F.current!==K.clientX;if(K.currentTarget.contains(ie)&&L){const X=K.clientX>F.current?\"right\":\"left\";z.current=X,F.current=K.clientX}}))})})})})})})});wA.displayName=Ta;var _$=\"MenuGroup\",C1=m.forwardRef((e,t)=>{const{__scopeMenu:n,...a}=e;return g.jsx(Dd.div,{role:\"group\",...a,ref:t})});C1.displayName=_$;var A$=\"MenuLabel\",SA=m.forwardRef((e,t)=>{const{__scopeMenu:n,...a}=e;return g.jsx(Dd.div,{...a,ref:t})});SA.displayName=A$;var Lh=\"MenuItem\",MT=\"menu.itemSelect\",vm=m.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:a,...o}=e,s=m.useRef(null),c=Pd(Lh,e.__scopeMenu),u=w1(Lh,e.__scopeMenu),f=pn(t,s),h=m.useRef(!1),v=()=>{const y=s.current;if(!n&&y){const x=new CustomEvent(MT,{bubbles:!0,cancelable:!0});y.addEventListener(MT,S=>a?.(S),{once:!0}),XF(y,x),x.defaultPrevented?h.current=!1:c.onClose()}};return g.jsx(CA,{...o,ref:f,disabled:n,onClick:at(e.onClick,v),onPointerDown:y=>{e.onPointerDown?.(y),h.current=!0},onPointerUp:at(e.onPointerUp,y=>{h.current||y.currentTarget?.click()}),onKeyDown:at(e.onKeyDown,y=>{const x=u.searchRef.current!==\"\";n||x&&y.key===\" \"||Sb.includes(y.key)&&(y.currentTarget.click(),y.preventDefault())})})});vm.displayName=Lh;var CA=m.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:a=!1,textValue:o,...s}=e,c=w1(Lh,n),u=vA(n),f=m.useRef(null),h=pn(t,f),[v,y]=m.useState(!1),[x,S]=m.useState(\"\");return m.useEffect(()=>{const w=f.current;w&&S((w.textContent??\"\").trim())},[s.children]),g.jsx(hd.ItemSlot,{scope:n,disabled:a,textValue:o??x,children:g.jsx(m$,{asChild:!0,...u,focusable:!a,children:g.jsx(Dd.div,{role:\"menuitem\",\"data-highlighted\":v?\"\":void 0,\"aria-disabled\":a||void 0,\"data-disabled\":a?\"\":void 0,...s,ref:h,onPointerMove:at(e.onPointerMove,md(w=>{a?c.onItemLeave(w):(c.onItemEnter(w),w.defaultPrevented||w.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:at(e.onPointerLeave,md(w=>c.onItemLeave(w))),onFocus:at(e.onFocus,()=>y(!0)),onBlur:at(e.onBlur,()=>y(!1))})})})}),N$=\"MenuCheckboxItem\",RA=m.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:a,...o}=e;return g.jsx(_A,{scope:e.__scopeMenu,checked:n,children:g.jsx(vm,{role:\"menuitemcheckbox\",\"aria-checked\":Ih(n)?\"mixed\":n,...o,ref:t,\"data-state\":E1(n),onSelect:at(o.onSelect,()=>a?.(Ih(n)?!0:!n),{checkForDefaultPrevented:!1})})})});RA.displayName=N$;var EA=\"MenuRadioGroup\",[O$,D$]=fl(EA,{value:void 0,onValueChange:()=>{}}),TA=m.forwardRef((e,t)=>{const{value:n,onValueChange:a,...o}=e,s=eo(a);return g.jsx(O$,{scope:e.__scopeMenu,value:n,onValueChange:s,children:g.jsx(C1,{...o,ref:t})})});TA.displayName=EA;var MA=\"MenuRadioItem\",kA=m.forwardRef((e,t)=>{const{value:n,...a}=e,o=D$(MA,e.__scopeMenu),s=n===o.value;return g.jsx(_A,{scope:e.__scopeMenu,checked:s,children:g.jsx(vm,{role:\"menuitemradio\",\"aria-checked\":s,...a,ref:t,\"data-state\":E1(s),onSelect:at(a.onSelect,()=>o.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});kA.displayName=MA;var R1=\"MenuItemIndicator\",[_A,j$]=fl(R1,{checked:!1}),AA=m.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:a,...o}=e,s=j$(R1,n);return g.jsx(Va,{present:a||Ih(s.checked)||s.checked===!0,children:g.jsx(Dd.span,{...o,ref:t,\"data-state\":E1(s.checked)})})});AA.displayName=R1;var z$=\"MenuSeparator\",NA=m.forwardRef((e,t)=>{const{__scopeMenu:n,...a}=e;return g.jsx(Dd.div,{role:\"separator\",\"aria-orientation\":\"horizontal\",...a,ref:t})});NA.displayName=z$;var P$=\"MenuArrow\",OA=m.forwardRef((e,t)=>{const{__scopeMenu:n,...a}=e,o=gm(n);return g.jsx(Fb,{...o,...a,ref:t})});OA.displayName=P$;var L$=\"MenuSub\",[IG,DA]=fl(L$),Vu=\"MenuSubTrigger\",jA=m.forwardRef((e,t)=>{const n=hl(Vu,e.__scopeMenu),a=Pd(Vu,e.__scopeMenu),o=DA(Vu,e.__scopeMenu),s=w1(Vu,e.__scopeMenu),c=m.useRef(null),{pointerGraceTimerRef:u,onPointerGraceIntentChange:f}=s,h={__scopeMenu:e.__scopeMenu},v=m.useCallback(()=>{c.current&&window.clearTimeout(c.current),c.current=null},[]);return m.useEffect(()=>v,[v]),m.useEffect(()=>{const y=u.current;return()=>{window.clearTimeout(y),f(null)}},[u,f]),g.jsx(b1,{asChild:!0,...h,children:g.jsx(CA,{id:o.triggerId,\"aria-haspopup\":\"menu\",\"aria-expanded\":n.open,\"aria-controls\":o.contentId,\"data-state\":LA(n.open),...e,ref:Zn(t,o.onTriggerChange),onClick:y=>{e.onClick?.(y),!(e.disabled||y.defaultPrevented)&&(y.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:at(e.onPointerMove,md(y=>{s.onItemEnter(y),!y.defaultPrevented&&!e.disabled&&!n.open&&!c.current&&(s.onPointerGraceIntentChange(null),c.current=window.setTimeout(()=>{n.onOpenChange(!0),v()},100))})),onPointerLeave:at(e.onPointerLeave,md(y=>{v();const x=n.content?.getBoundingClientRect();if(x){const S=n.content?.dataset.side,w=S===\"right\",C=w?-5:5,R=x[w?\"left\":\"right\"],k=x[w?\"right\":\"left\"];s.onPointerGraceIntentChange({area:[{x:y.clientX+C,y:y.clientY},{x:R,y:x.top},{x:k,y:x.top},{x:k,y:x.bottom},{x:R,y:x.bottom}],side:S}),window.clearTimeout(u.current),u.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(y),y.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:at(e.onKeyDown,y=>{const x=s.searchRef.current!==\"\";e.disabled||x&&y.key===\" \"||v$[a.dir].includes(y.key)&&(n.onOpenChange(!0),n.content?.focus(),y.preventDefault())})})})});jA.displayName=Vu;var zA=\"MenuSubContent\",PA=m.forwardRef((e,t)=>{const n=bA(Ta,e.__scopeMenu),{forceMount:a=n.forceMount,...o}=e,s=hl(Ta,e.__scopeMenu),c=Pd(Ta,e.__scopeMenu),u=DA(zA,e.__scopeMenu),f=m.useRef(null),h=pn(t,f);return g.jsx(hd.Provider,{scope:e.__scopeMenu,children:g.jsx(Va,{present:a||s.open,children:g.jsx(hd.Slot,{scope:e.__scopeMenu,children:g.jsx(S1,{id:u.contentId,\"aria-labelledby\":u.triggerId,...o,ref:h,align:\"start\",side:c.dir===\"rtl\"?\"left\":\"right\",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:v=>{c.isUsingKeyboardRef.current&&f.current?.focus(),v.preventDefault()},onCloseAutoFocus:v=>v.preventDefault(),onFocusOutside:at(e.onFocusOutside,v=>{v.target!==u.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:at(e.onEscapeKeyDown,v=>{c.onClose(),v.preventDefault()}),onKeyDown:at(e.onKeyDown,v=>{const y=v.currentTarget.contains(v.target),x=y$[c.dir].includes(v.key);y&&x&&(s.onOpenChange(!1),u.trigger?.focus(),v.preventDefault())})})})})})});PA.displayName=zA;function LA(e){return e?\"open\":\"closed\"}function Ih(e){return e===\"indeterminate\"}function E1(e){return Ih(e)?\"indeterminate\":e?\"checked\":\"unchecked\"}function I$(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function H$(e,t){return e.map((n,a)=>e[(t+a)%e.length])}function q$(e,t,n){const o=t.length>1&&Array.from(t).every(h=>h===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let c=H$(e,Math.max(s,0));o.length===1&&(c=c.filter(h=>h!==n));const f=c.find(h=>h.toLowerCase().startsWith(o.toLowerCase()));return f!==n?f:void 0}function F$(e,t){const{x:n,y:a}=e;let o=!1;for(let s=0,c=t.length-1;s<t.length;c=s++){const u=t[s],f=t[c],h=u.x,v=u.y,y=f.x,x=f.y;v>a!=x>a&&n<(y-h)*(a-v)/(x-v)+h&&(o=!o)}return o}function $$(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return F$(n,t)}function md(e){return t=>t.pointerType===\"mouse\"?e(t):void 0}var B$=yA,U$=b1,V$=xA,W$=wA,G$=C1,Y$=SA,X$=vm,Q$=RA,K$=TA,Z$=kA,J$=AA,eB=NA,tB=OA,nB=jA,rB=PA,ym=\"DropdownMenu\",[aB,HG]=mi(ym,[gA]),_r=gA(),[iB,IA]=aB(ym),HA=e=>{const{__scopeDropdownMenu:t,children:n,dir:a,open:o,defaultOpen:s,onOpenChange:c,modal:u=!0}=e,f=_r(t),h=m.useRef(null),[v,y]=zc({prop:o,defaultProp:s??!1,onChange:c,caller:ym});return g.jsx(iB,{scope:t,triggerId:rs(),triggerRef:h,contentId:rs(),open:v,onOpenChange:y,onOpenToggle:m.useCallback(()=>y(x=>!x),[y]),modal:u,children:g.jsx(B$,{...f,open:v,onOpenChange:y,dir:a,modal:u,children:n})})};HA.displayName=ym;var qA=\"DropdownMenuTrigger\",FA=m.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:a=!1,...o}=e,s=IA(qA,n),c=_r(n);return g.jsx(U$,{asChild:!0,...c,children:g.jsx(PF.button,{type:\"button\",id:s.triggerId,\"aria-haspopup\":\"menu\",\"aria-expanded\":s.open,\"aria-controls\":s.open?s.contentId:void 0,\"data-state\":s.open?\"open\":\"closed\",\"data-disabled\":a?\"\":void 0,disabled:a,...o,ref:Zn(t,s.triggerRef),onPointerDown:at(e.onPointerDown,u=>{!a&&u.button===0&&u.ctrlKey===!1&&(s.onOpenToggle(),s.open||u.preventDefault())}),onKeyDown:at(e.onKeyDown,u=>{a||([\"Enter\",\" \"].includes(u.key)&&s.onOpenToggle(),u.key===\"ArrowDown\"&&s.onOpenChange(!0),[\"Enter\",\" \",\"ArrowDown\"].includes(u.key)&&u.preventDefault())})})})});FA.displayName=qA;var oB=\"DropdownMenuPortal\",$A=e=>{const{__scopeDropdownMenu:t,...n}=e,a=_r(t);return g.jsx(V$,{...a,...n})};$A.displayName=oB;var BA=\"DropdownMenuContent\",UA=m.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,o=IA(BA,n),s=_r(n),c=m.useRef(!1);return g.jsx(W$,{id:o.contentId,\"aria-labelledby\":o.triggerId,...s,...a,ref:t,onCloseAutoFocus:at(e.onCloseAutoFocus,u=>{c.current||o.triggerRef.current?.focus(),c.current=!1,u.preventDefault()}),onInteractOutside:at(e.onInteractOutside,u=>{const f=u.detail.originalEvent,h=f.button===0&&f.ctrlKey===!0,v=f.button===2||h;(!o.modal||v)&&(c.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)\"}})});UA.displayName=BA;var sB=\"DropdownMenuGroup\",lB=m.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,o=_r(n);return g.jsx(G$,{...o,...a,ref:t})});lB.displayName=sB;var cB=\"DropdownMenuLabel\",VA=m.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,o=_r(n);return g.jsx(Y$,{...o,...a,ref:t})});VA.displayName=cB;var uB=\"DropdownMenuItem\",WA=m.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,o=_r(n);return g.jsx(X$,{...o,...a,ref:t})});WA.displayName=uB;var dB=\"DropdownMenuCheckboxItem\",GA=m.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,o=_r(n);return g.jsx(Q$,{...o,...a,ref:t})});GA.displayName=dB;var fB=\"DropdownMenuRadioGroup\",hB=m.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,o=_r(n);return g.jsx(K$,{...o,...a,ref:t})});hB.displayName=fB;var mB=\"DropdownMenuRadioItem\",YA=m.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,o=_r(n);return g.jsx(Z$,{...o,...a,ref:t})});YA.displayName=mB;var pB=\"DropdownMenuItemIndicator\",XA=m.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,o=_r(n);return g.jsx(J$,{...o,...a,ref:t})});XA.displayName=pB;var gB=\"DropdownMenuSeparator\",QA=m.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,o=_r(n);return g.jsx(eB,{...o,...a,ref:t})});QA.displayName=gB;var vB=\"DropdownMenuArrow\",yB=m.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,o=_r(n);return g.jsx(tB,{...o,...a,ref:t})});yB.displayName=vB;var bB=\"DropdownMenuSubTrigger\",KA=m.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,o=_r(n);return g.jsx(nB,{...o,...a,ref:t})});KA.displayName=bB;var xB=\"DropdownMenuSubContent\",ZA=m.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,o=_r(n);return g.jsx(rB,{...o,...a,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)\"}})});ZA.displayName=xB;var wB=HA,SB=FA,CB=$A,JA=UA,eN=VA,tN=WA,nN=GA,rN=YA,aN=XA,iN=QA,oN=KA,sN=ZA;const uh=wB,dh=SB,RB=m.forwardRef(({className:e,inset:t,children:n,...a},o)=>g.jsxs(oN,{ref:o,className:je(\"flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-stone-100 dark:focus:bg-[#2a2a2b] data-[state=open]:bg-stone-100 dark:data-[state=open]:bg-[#2a2a2b]\",t&&\"pl-8\",e),...a,children:[n,g.jsx(Ac,{className:\"ml-auto h-4 w-4\"})]}));RB.displayName=oN.displayName;const EB=m.forwardRef(({className:e,...t},n)=>g.jsx(sN,{ref:n,className:je(\"z-50 min-w-[8rem] overflow-hidden rounded-md border border-stone-200 dark:border-[#3e3e42] bg-white dark:bg-[#252526] p-1 text-stone-950 dark:text-[#cccccc] shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",e),...t}));EB.displayName=sN.displayName;const Wu=m.forwardRef(({className:e,sideOffset:t=4,...n},a)=>g.jsx(CB,{children:g.jsx(JA,{ref:a,sideOffset:t,className:je(\"z-50 min-w-[8rem] overflow-hidden rounded-md border border-stone-200 dark:border-[#3e3e42] bg-white dark:bg-[#252526] p-1 text-stone-950 dark:text-[#cccccc] shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",e),...n})}));Wu.displayName=JA.displayName;const cc=m.forwardRef(({className:e,inset:t,...n},a)=>g.jsx(tN,{ref:a,className:je(\"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-stone-100 dark:focus:bg-[#2a2a2b] focus:text-stone-900 dark:focus:text-[#cccccc] data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",t&&\"pl-8\",e),...n}));cc.displayName=tN.displayName;const lN=m.forwardRef(({className:e,children:t,checked:n,...a},o)=>g.jsxs(nN,{ref:o,className:je(\"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-stone-100 dark:focus:bg-[#2a2a2b] focus:text-stone-900 dark:focus:text-[#cccccc] data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",e),checked:n,...a,children:[g.jsx(\"span\",{className:\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\",children:g.jsx(aN,{children:g.jsx(xd,{className:\"h-4 w-4\"})})}),t]}));lN.displayName=nN.displayName;const TB=m.forwardRef(({className:e,children:t,...n},a)=>g.jsxs(rN,{ref:a,className:je(\"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-stone-100 dark:focus:bg-[#2a2a2b] focus:text-stone-900 dark:focus:text-[#cccccc] data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",e),...n,children:[g.jsx(\"span\",{className:\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\",children:g.jsx(aN,{children:g.jsx(f4,{className:\"h-2 w-2 fill-current\"})})}),t]}));TB.displayName=rN.displayName;const xh=m.forwardRef(({className:e,inset:t,...n},a)=>g.jsx(eN,{ref:a,className:je(\"px-2 py-1.5 text-sm font-semibold\",t&&\"pl-8\",e),...n}));xh.displayName=eN.displayName;const Qo=m.forwardRef(({className:e,...t},n)=>g.jsx(iN,{ref:n,className:je(\"-mx-1 my-1 h-px bg-stone-100 dark:bg-[#3e3e42]\",e),...t}));Qo.displayName=iN.displayName;const ls=m.forwardRef(({className:e,type:t,...n},a)=>g.jsx(\"input\",{type:t,className:je(\"flex h-9 w-full rounded-md border border-[var(--border-color)] bg-[var(--bg-secondary)] px-3 py-1 text-sm text-[var(--text-primary)] shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-[var(--text-tertiary)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--accent-color)] focus-visible:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50\",e),ref:a,...n}));ls.displayName=\"Input\";var MB=Symbol.for(\"react.lazy\"),Hh=Vh[\" use \".trim().toString()];function kB(e){return typeof e==\"object\"&&e!==null&&\"then\"in e}function cN(e){return e!=null&&typeof e==\"object\"&&\"$$typeof\"in e&&e.$$typeof===MB&&\"_payload\"in e&&kB(e._payload)}function _B(e){const t=AB(e),n=m.forwardRef((a,o)=>{let{children:s,...c}=a;cN(s)&&typeof Hh==\"function\"&&(s=Hh(s._payload));const u=m.Children.toArray(s),f=u.find(OB);if(f){const h=f.props.children,v=u.map(y=>y===f?m.Children.count(h)>1?m.Children.only(null):m.isValidElement(h)?h.props.children:null:y);return g.jsx(t,{...c,ref:o,children:m.isValidElement(h)?m.cloneElement(h,void 0,v):null})}return g.jsx(t,{...c,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function AB(e){const t=m.forwardRef((n,a)=>{let{children:o,...s}=n;if(cN(o)&&typeof Hh==\"function\"&&(o=Hh(o._payload)),m.isValidElement(o)){const c=jB(o),u=DB(s,o.props);return o.type!==m.Fragment&&(u.ref=a?Zn(a,c):c),m.cloneElement(o,u)}return m.Children.count(o)>1?m.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var NB=Symbol(\"radix.slottable\");function OB(e){return m.isValidElement(e)&&typeof e.type==\"function\"&&\"__radixId\"in e.type&&e.type.__radixId===NB}function DB(e,t){const n={...t};for(const a in t){const o=e[a],s=t[a];/^on[A-Z]/.test(a)?o&&s?n[a]=(...u)=>{const f=s(...u);return o(...u),f}:o&&(n[a]=o):a===\"style\"?n[a]={...o,...s}:a===\"className\"&&(n[a]=[o,s].filter(Boolean).join(\" \"))}return{...e,...n}}function jB(e){let t=Object.getOwnPropertyDescriptor(e.props,\"ref\")?.get,n=t&&\"isReactWarning\"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,\"ref\")?.get,n=t&&\"isReactWarning\"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var zB=[\"a\",\"button\",\"div\",\"form\",\"h2\",\"h3\",\"img\",\"input\",\"label\",\"li\",\"nav\",\"ol\",\"p\",\"select\",\"span\",\"svg\",\"ul\"],PB=zB.reduce((e,t)=>{const n=_B(`Primitive.${t}`),a=m.forwardRef((o,s)=>{const{asChild:c,...u}=o,f=c?n:t;return typeof window<\"u\"&&(window[Symbol.for(\"radix-ui\")]=!0),g.jsx(f,{...u,ref:s})});return a.displayName=`Primitive.${t}`,{...e,[t]:a}},{}),LB=\"Label\",uN=m.forwardRef((e,t)=>g.jsx(PB.label,{...e,ref:t,onMouseDown:n=>{n.target.closest(\"button, input, select, textarea\")||(e.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));uN.displayName=LB;var dN=uN;const kT=e=>typeof e==\"boolean\"?`${e}`:e===0?\"0\":e,_T=_M,fN=(e,t)=>n=>{var a;if(t?.variants==null)return _T(e,n?.class,n?.className);const{variants:o,defaultVariants:s}=t,c=Object.keys(o).map(h=>{const v=n?.[h],y=s?.[h];if(v===null)return null;const x=kT(v)||kT(y);return o[h][x]}),u=n&&Object.entries(n).reduce((h,v)=>{let[y,x]=v;return x===void 0||(h[y]=x),h},{}),f=t==null||(a=t.compoundVariants)===null||a===void 0?void 0:a.reduce((h,v)=>{let{class:y,className:x,...S}=v;return Object.entries(S).every(w=>{let[C,R]=w;return Array.isArray(R)?R.includes({...s,...u}[C]):{...s,...u}[C]===R})?[...h,y,x]:h},[]);return _T(e,c,f,n?.class,n?.className)},IB=fN(\"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70\"),ts=m.forwardRef(({className:e,...t},n)=>g.jsx(dN,{ref:n,className:je(IB(),\"text-stone-700 dark:text-[#cccccc]\",e),...t}));ts.displayName=dN.displayName;const nd=m.forwardRef(({className:e,...t},n)=>g.jsx(\"textarea\",{className:je(\"flex min-h-[80px] w-full rounded-md border border-stone-200 dark:border-[#3e3e42] bg-white dark:bg-[#1e1e1e] px-3 py-2 text-sm text-stone-900 dark:text-[#cccccc] ring-offset-white placeholder:text-stone-500 dark:placeholder:text-[#6a6a6a] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 dark:focus-visible:ring-[#569cd6] focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 dark:ring-offset-[#1e1e1e]\",e),ref:n,...t}));nd.displayName=\"Textarea\";function hN(e){const t=HB(e),n=m.forwardRef((a,o)=>{const{children:s,...c}=a,u=m.Children.toArray(s),f=u.find(FB);if(f){const h=f.props.children,v=u.map(y=>y===f?m.Children.count(h)>1?m.Children.only(null):m.isValidElement(h)?h.props.children:null:y);return g.jsx(t,{...c,ref:o,children:m.isValidElement(h)?m.cloneElement(h,void 0,v):null})}return g.jsx(t,{...c,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function HB(e){const t=m.forwardRef((n,a)=>{const{children:o,...s}=n;if(m.isValidElement(o)){const c=BB(o),u=$B(s,o.props);return o.type!==m.Fragment&&(u.ref=a?Zn(a,c):c),m.cloneElement(o,u)}return m.Children.count(o)>1?m.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var qB=Symbol(\"radix.slottable\");function FB(e){return m.isValidElement(e)&&typeof e.type==\"function\"&&\"__radixId\"in e.type&&e.type.__radixId===qB}function $B(e,t){const n={...t};for(const a in t){const o=e[a],s=t[a];/^on[A-Z]/.test(a)?o&&s?n[a]=(...u)=>{const f=s(...u);return o(...u),f}:o&&(n[a]=o):a===\"style\"?n[a]={...o,...s}:a===\"className\"&&(n[a]=[o,s].filter(Boolean).join(\" \"))}return{...e,...n}}function BB(e){let t=Object.getOwnPropertyDescriptor(e.props,\"ref\")?.get,n=t&&\"isReactWarning\"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,\"ref\")?.get,n=t&&\"isReactWarning\"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var UB=[\"a\",\"button\",\"div\",\"form\",\"h2\",\"h3\",\"img\",\"input\",\"label\",\"li\",\"nav\",\"ol\",\"p\",\"select\",\"span\",\"svg\",\"ul\"],Ld=UB.reduce((e,t)=>{const n=hN(`Primitive.${t}`),a=m.forwardRef((o,s)=>{const{asChild:c,...u}=o,f=c?n:t;return typeof window<\"u\"&&(window[Symbol.for(\"radix-ui\")]=!0),g.jsx(f,{...u,ref:s})});return a.displayName=`Primitive.${t}`,{...e,[t]:a}},{}),bm=\"Dialog\",[mN,pN]=mi(bm),[VB,Wa]=mN(bm),gN=e=>{const{__scopeDialog:t,children:n,open:a,defaultOpen:o,onOpenChange:s,modal:c=!0}=e,u=m.useRef(null),f=m.useRef(null),[h,v]=zc({prop:a,defaultProp:o??!1,onChange:s,caller:bm});return g.jsx(VB,{scope:t,triggerRef:u,contentRef:f,contentId:rs(),titleId:rs(),descriptionId:rs(),open:h,onOpenChange:v,onOpenToggle:m.useCallback(()=>v(y=>!y),[v]),modal:c,children:n})};gN.displayName=bm;var vN=\"DialogTrigger\",yN=m.forwardRef((e,t)=>{const{__scopeDialog:n,...a}=e,o=Wa(vN,n),s=pn(t,o.triggerRef);return g.jsx(Ld.button,{type:\"button\",\"aria-haspopup\":\"dialog\",\"aria-expanded\":o.open,\"aria-controls\":o.contentId,\"data-state\":k1(o.open),...a,ref:s,onClick:at(e.onClick,o.onOpenToggle)})});yN.displayName=vN;var T1=\"DialogPortal\",[WB,bN]=mN(T1,{forceMount:void 0}),xN=e=>{const{__scopeDialog:t,forceMount:n,children:a,container:o}=e,s=Wa(T1,t);return g.jsx(WB,{scope:t,forceMount:n,children:m.Children.map(a,c=>g.jsx(Va,{present:n||s.open,children:g.jsx(Zh,{asChild:!0,container:o,children:c})}))})};xN.displayName=T1;var qh=\"DialogOverlay\",wN=m.forwardRef((e,t)=>{const n=bN(qh,e.__scopeDialog),{forceMount:a=n.forceMount,...o}=e,s=Wa(qh,e.__scopeDialog);return s.modal?g.jsx(Va,{present:a||s.open,children:g.jsx(YB,{...o,ref:t})}):null});wN.displayName=qh;var GB=hN(\"DialogOverlay.RemoveScroll\"),YB=m.forwardRef((e,t)=>{const{__scopeDialog:n,...a}=e,o=Wa(qh,n);return g.jsx(am,{as:GB,allowPinchZoom:!0,shards:[o.contentRef],children:g.jsx(Ld.div,{\"data-state\":k1(o.open),...a,ref:t,style:{pointerEvents:\"auto\",...a.style}})})}),ol=\"DialogContent\",SN=m.forwardRef((e,t)=>{const n=bN(ol,e.__scopeDialog),{forceMount:a=n.forceMount,...o}=e,s=Wa(ol,e.__scopeDialog);return g.jsx(Va,{present:a||s.open,children:s.modal?g.jsx(XB,{...o,ref:t}):g.jsx(QB,{...o,ref:t})})});SN.displayName=ol;var XB=m.forwardRef((e,t)=>{const n=Wa(ol,e.__scopeDialog),a=m.useRef(null),o=pn(t,n.contentRef,a);return m.useEffect(()=>{const s=a.current;if(s)return Ub(s)},[]),g.jsx(CN,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:at(e.onCloseAutoFocus,s=>{s.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:at(e.onPointerDownOutside,s=>{const c=s.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0;(c.button===2||u)&&s.preventDefault()}),onFocusOutside:at(e.onFocusOutside,s=>s.preventDefault())})}),QB=m.forwardRef((e,t)=>{const n=Wa(ol,e.__scopeDialog),a=m.useRef(!1),o=m.useRef(!1);return g.jsx(CN,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(a.current||n.triggerRef.current?.focus(),s.preventDefault()),a.current=!1,o.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(a.current=!0,s.detail.originalEvent.type===\"pointerdown\"&&(o.current=!0));const c=s.target;n.triggerRef.current?.contains(c)&&s.preventDefault(),s.detail.originalEvent.type===\"focusin\"&&o.current&&s.preventDefault()}})}),CN=m.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:a,onOpenAutoFocus:o,onCloseAutoFocus:s,...c}=e,u=Wa(ol,n),f=m.useRef(null),h=pn(t,f);return Bb(),g.jsxs(g.Fragment,{children:[g.jsx(nm,{asChild:!0,loop:!0,trapped:a,onMountAutoFocus:o,onUnmountAutoFocus:s,children:g.jsx(Cd,{role:\"dialog\",id:u.contentId,\"aria-describedby\":u.descriptionId,\"aria-labelledby\":u.titleId,\"data-state\":k1(u.open),...c,ref:h,onDismiss:()=>u.onOpenChange(!1)})}),g.jsxs(g.Fragment,{children:[g.jsx(ZB,{titleId:u.titleId}),g.jsx(eU,{contentRef:f,descriptionId:u.descriptionId})]})]})}),M1=\"DialogTitle\",RN=m.forwardRef((e,t)=>{const{__scopeDialog:n,...a}=e,o=Wa(M1,n);return g.jsx(Ld.h2,{id:o.titleId,...a,ref:t})});RN.displayName=M1;var EN=\"DialogDescription\",TN=m.forwardRef((e,t)=>{const{__scopeDialog:n,...a}=e,o=Wa(EN,n);return g.jsx(Ld.p,{id:o.descriptionId,...a,ref:t})});TN.displayName=EN;var MN=\"DialogClose\",kN=m.forwardRef((e,t)=>{const{__scopeDialog:n,...a}=e,o=Wa(MN,n);return g.jsx(Ld.button,{type:\"button\",...a,ref:t,onClick:at(e.onClick,()=>o.onOpenChange(!1))})});kN.displayName=MN;function k1(e){return e?\"open\":\"closed\"}var _N=\"DialogTitleWarning\",[KB,AN]=j6(_N,{contentName:ol,titleName:M1,docsSlug:\"dialog\"}),ZB=({titleId:e})=>{const t=AN(_N),n=`\\`${t.contentName}\\` requires a \\`${t.titleName}\\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \\`${t.titleName}\\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return m.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},JB=\"DialogDescriptionWarning\",eU=({contentRef:e,descriptionId:t})=>{const a=`Warning: Missing \\`Description\\` or \\`aria-describedby={undefined}\\` for {${AN(JB).contentName}}.`;return m.useEffect(()=>{const o=e.current?.getAttribute(\"aria-describedby\");t&&o&&(document.getElementById(t)||console.warn(a))},[a,e,t]),null},NN=gN,tU=yN,ON=xN,_1=wN,A1=SN,N1=RN,O1=TN,xm=kN;const nU=NN,rU=xm,aU=ON,DN=m.forwardRef(({className:e,...t},n)=>g.jsx(_1,{className:je(\"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",e),...t,ref:n}));DN.displayName=_1.displayName;const iU={top:\"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top\",bottom:\"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom\",left:\"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm\",right:\"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm\"},jN=m.forwardRef(({side:e=\"right\",className:t,children:n,...a},o)=>g.jsxs(aU,{children:[g.jsx(DN,{}),g.jsxs(A1,{ref:o,className:je(\"fixed z-50 gap-4 bg-white dark:bg-[#252526] p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500\",iU[e],t),...a,children:[n,g.jsxs(xm,{className:\"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-white transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-stone-950 focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-stone-100 dark:ring-offset-stone-950 dark:focus:ring-stone-300 dark:data-[state=open]:bg-stone-800\",children:[g.jsx(D4,{className:\"h-4 w-4\"}),g.jsx(\"span\",{className:\"sr-only\",children:\"Close\"})]})]})]}));jN.displayName=A1.displayName;const zN=({className:e,...t})=>g.jsx(\"div\",{className:je(\"flex flex-col space-y-2 text-center sm:text-left\",e),...t});zN.displayName=\"SheetHeader\";const PN=({className:e,...t})=>g.jsx(\"div\",{className:je(\"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2\",e),...t});PN.displayName=\"SheetFooter\";const LN=m.forwardRef(({className:e,...t},n)=>g.jsx(N1,{ref:n,className:je(\"text-lg font-semibold text-stone-950 dark:text-stone-50\",e),...t}));LN.displayName=N1.displayName;const oU=m.forwardRef(({className:e,...t},n)=>g.jsx(O1,{ref:n,className:je(\"text-sm text-stone-500 dark:text-stone-400\",e),...t}));oU.displayName=O1.displayName;const D1=fN(\"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50\",{variants:{variant:{default:\"bg-orange-600 dark:bg-[#569cd6] text-white shadow hover:bg-orange-700 dark:hover:bg-[#4a8cc7]\",destructive:\"bg-red-600 dark:bg-[#f48771] text-white dark:text-[#1e1e1e] shadow-sm hover:bg-red-700 dark:hover:bg-[#f5917e]\",outline:\"border border-stone-200 dark:border-[#3e3e42] bg-white dark:bg-[#252526] shadow-sm hover:bg-stone-50 dark:hover:bg-[#2a2a2b] hover:text-stone-900 dark:hover:text-[#cccccc] text-stone-900 dark:text-[#cccccc]\",secondary:\"bg-stone-100 dark:bg-[#2d2d30] text-stone-900 dark:text-[#cccccc] shadow-sm hover:bg-stone-200 dark:hover:bg-[#37373d]\",ghost:\"hover:bg-stone-100 dark:hover:bg-[#2a2a2b] hover:text-stone-900 dark:hover:text-[#cccccc] text-stone-700 dark:text-[#cccccc]\",link:\"text-orange-600 dark:text-[#569cd6] underline-offset-4 hover:underline\"},size:{default:\"h-9 px-4 py-2\",sm:\"h-8 rounded-md px-3 text-xs\",lg:\"h-10 rounded-md px-8\",icon:\"h-9 w-9\"}},defaultVariants:{variant:\"default\",size:\"default\"}}),Js=m.forwardRef(({className:e,variant:t,size:n,...a},o)=>g.jsx(\"button\",{className:je(D1({variant:t,size:n,className:e})),ref:o,...a}));Js.displayName=\"Button\";const sU=e=>[/^(active|inactive|pending|completed|draft)$/i,/^(high|medium|low)$/i,/^(success|error|warning|info)$/i,/^(commercial|informational|transactional)$/i,/^(yes|no)$/i].some(n=>n.test(e));function lU({selectedTable:e,componentPath:t}){const{theme:n}=PM(),a=m.useRef(null),[o,s]=m.useState(new Set),[c,u]=m.useState(null),[f,h]=m.useState(null),[v,y]=m.useState(!1),[x,S]=m.useState({current:void 0,columns:vt.empty(),rows:vt.empty()}),[w,C]=m.useState(null),[R,k]=m.useState(null),[T,M]=m.useState({}),[j,I]=m.useState(!1),[P,A]=m.useState(`{\n \n}`),q=us(y6,e?{tableName:e,componentPath:t,page:1,pageSize:1e3}:\"skip\"),B=es(w6),V=es(b6),N=es(S6),_=es(x6),z=e?q===void 0:!1;let F=q?.data||[];const O=F.length>0?Object.keys(F[0]):[],$=O.filter(G=>!o.has(G)),W=Object.entries(T).filter(([G,se])=>se.trim()!==\"\");W.length>0&&(F=F.filter(G=>W.every(([se,ge])=>{const Ne=G[se];return Ne==null?!1:String(Ne).toLowerCase().includes(ge.toLowerCase())}))),c&&(F=[...F].sort((G,se)=>{const ge=G[c.field],Ne=se[c.field];if(ge===Ne)return 0;if(ge==null)return 1;if(Ne==null)return-1;const Re=ge<Ne?-1:1;return c.direction===\"asc\"?Re:-Re}));const U=F,K=()=>{if(!U.length||!O.length)return;const G=Xe=>{if(Xe==null)return\"\";const Pe=typeof Xe==\"object\"?JSON.stringify(Xe):String(Xe);return Pe.includes(\",\")||Pe.includes('\"')||Pe.includes(`\n`)?`\"${Pe.replace(/\"/g,'\"\"')}\"`:Pe},se=O.map(G).join(\",\"),ge=U.map(Xe=>O.map(Pe=>G(Xe[Pe])).join(\",\")),Ne=[se,...ge].join(`\n`),Re=new Blob([Ne],{type:\"text/csv;charset=utf-8;\"}),ze=URL.createObjectURL(Re),Ge=document.createElement(\"a\");Ge.href=ze,Ge.download=`${e}.csv`,Ge.click(),URL.revokeObjectURL(ze),h({type:\"success\",message:`Exported ${U.length} rows as CSV`}),setTimeout(()=>h(null),2e3)},ie=()=>{if(!U.length)return;const G=JSON.stringify(U,null,2),se=new Blob([G],{type:\"application/json;charset=utf-8;\"}),ge=URL.createObjectURL(se),Ne=document.createElement(\"a\");Ne.href=ge,Ne.download=`${e}.json`,Ne.click(),URL.revokeObjectURL(ge),h({type:\"success\",message:`Exported ${U.length} rows as JSON`}),setTimeout(()=>h(null),2e3)},L=async()=>{if(e&&F.length&&confirm(`Are you sure you want to delete all ${F.length} records from \"${e}\"?`))try{const G=await _({tableName:e,componentPath:t});h({type:\"success\",message:`Cleared ${G.deleted} records`}),S({current:void 0,columns:vt.empty(),rows:vt.empty()})}catch(G){console.error(\"Failed to clear table:\",G),h({type:\"error\",message:G instanceof Error?G.message:\"Failed to clear table\"})}finally{setTimeout(()=>h(null),3e3)}},X=(G,se)=>{const ge=U[G],Ne=Ve[se]?.id;if(!ge||!Ne)return;const Re=ge[Ne],ze=Re==null?\"\":typeof Re==\"object\"?JSON.stringify(Re):String(Re);navigator.clipboard.writeText(ze).then(()=>{h({type:\"success\",message:\"Copied to clipboard\"}),setTimeout(()=>h(null),2e3)}).catch(()=>{h({type:\"error\",message:\"Failed to copy\"}),setTimeout(()=>h(null),2e3)}),k(null)},Y=m.useCallback(()=>{const G=[],se=x.rows;for(let ge=0;ge<U.length;ge++)se.hasIndex(ge)&&G.push(ge);return G},[x.rows,U.length]),re=G=>G,Z=m.useCallback(G=>{const se=U[G];if(!se)return;const ge=JSON.stringify(re(se),null,2);navigator.clipboard.writeText(ge).then(()=>{h({type:\"success\",message:\"Row copied as JSON\"}),setTimeout(()=>h(null),2e3)}).catch(()=>{h({type:\"error\",message:\"Failed to copy\"}),setTimeout(()=>h(null),2e3)}),k(null)},[U]),oe=m.useCallback(()=>{const G=Y();if(G.length===0){h({type:\"error\",message:\"No rows selected\"}),setTimeout(()=>h(null),2e3);return}const se=G.map(Ne=>re(U[Ne])),ge=JSON.stringify(se.length===1?se[0]:se,null,2);navigator.clipboard.writeText(ge).then(()=>{h({type:\"success\",message:`Copied ${G.length} row${G.length>1?\"s\":\"\"} as JSON`}),setTimeout(()=>h(null),2e3)}).catch(()=>{h({type:\"error\",message:\"Failed to copy\"}),setTimeout(()=>h(null),2e3)}),k(null)},[Y,U]),ne=m.useCallback(async()=>{if(!e)return;const G=Y();if(G.length!==0&&confirm(`Delete ${G.length} selected record${G.length>1?\"s\":\"\"}?`))try{for(const se of G){const ge=U[se];ge?._id&&await V({tableName:e,documentId:ge._id})}h({type:\"success\",message:`Deleted ${G.length} record${G.length>1?\"s\":\"\"}`}),S({current:void 0,columns:vt.empty(),rows:vt.empty()})}catch(se){console.error(\"Failed to delete records:\",se),h({type:\"error\",message:se instanceof Error?se.message:\"Failed to delete records\"})}finally{k(null),setTimeout(()=>h(null),3e3)}},[e,Y,U,V]),me=(G,se)=>{k(null);const ge=Ve[se]?.id;if(ge){if(ge===\"_id\"||ge===\"_creationTime\"){h({type:\"error\",message:\"Cannot edit system fields\"}),setTimeout(()=>h(null),2e3);return}S({current:{cell:[se,G],range:{x:se,y:G,width:1,height:1},rangeStack:[]},columns:vt.empty(),rows:vt.empty()}),C([se,G])}};m.useEffect(()=>{w&&(C(null),requestAnimationFrame(()=>{requestAnimationFrame(()=>{const G=document.querySelector(\"[data-testid='data-grid-canvas']\");G&&(G.focus(),G.dispatchEvent(new KeyboardEvent(\"keydown\",{key:\"Enter\",code:\"Enter\",keyCode:13,bubbles:!0})))})}))},[w]);const Me=async G=>{if(!e)return;const se=F[G];if(se?._id&&confirm(\"Are you sure you want to delete this record?\"))try{await V({tableName:e,documentId:se._id}),h({type:\"success\",message:\"Record deleted\"})}catch(ge){console.error(\"Failed to delete record:\",ge),h({type:\"error\",message:ge instanceof Error?ge.message:\"Failed to delete record\"})}finally{k(null),setTimeout(()=>h(null),3e3)}},Fe=async G=>{if(!e)return;const se=F[G];if(!se)return;const{_id:ge,_creationTime:Ne,...Re}=se;try{await N({tableName:e,data:Re}),h({type:\"success\",message:\"Record duplicated\"})}catch(ze){console.error(\"Failed to duplicate record:\",ze),h({type:\"error\",message:ze instanceof Error?ze.message:\"Failed to duplicate record\"})}finally{k(null),setTimeout(()=>h(null),3e3)}};m.useEffect(()=>{const G=se=>{if(se.key===\"Escape\"){k(null);return}if((se.metaKey||se.ctrlKey)&&se.key===\"c\"&&Y().length>0){se.preventDefault(),oe();return}if((se.key===\"Delete\"||se.key===\"Backspace\")&&Y().length>0&&document.activeElement?.tagName!==\"INPUT\"&&document.activeElement?.tagName!==\"TEXTAREA\"){se.preventDefault(),ne();return}};return document.addEventListener(\"keydown\",G),()=>document.removeEventListener(\"keydown\",G)},[Y,oe,ne]);const Ue=G=>!c||c.field!==G?null:c.direction===\"asc\"?\"↑\":\"↓\",tt=$.map(G=>{const se=Ue(G);return{title:`${G}${se||\"\"}`,id:G,width:G===\"_id\"?220:G===\"_creationTime\"?200:180}}),Le=n===\"dark\"?{borderColor:\"transparent\",horizontalBorderColor:\"#3e3e42\"}:{borderColor:\"transparent\",horizontalBorderColor:\"#e2e8f0\"},Ve=[...tt,{title:\"\",id:\"__fill\",grow:1,themeOverride:Le}],Je=tt.length,jt=m.useCallback(([G,se])=>{if(G>=Je)return{kind:Ie.Text,data:\"\",displayData:\"\",allowOverlay:!1};const ge=U[se],Ne=Ve[G]?.id,Re=Ne!==void 0?ge?.[Ne]:void 0;if(Re==null)return{kind:Ie.Text,data:\"\",displayData:\"\",allowOverlay:!1,contentAlign:\"left\"};if(typeof Re==\"boolean\")return{kind:Ie.Boolean,data:Re,allowOverlay:!1};if(typeof Re==\"number\")return Ne===\"_creationTime\"?{kind:Ie.Text,data:new Date(Re).toLocaleString(),displayData:new Date(Re).toLocaleString(),allowOverlay:!0}:{kind:Ie.Number,data:Re,displayData:String(Re),allowOverlay:!0};if(typeof Re==\"object\")return{kind:Ie.Text,data:JSON.stringify(Re),displayData:JSON.stringify(Re),allowOverlay:!0};const ze=String(Re);return sU(ze)?{kind:Ie.Bubble,data:[ze],allowOverlay:!1}:{kind:Ie.Text,data:ze,displayData:ze,allowOverlay:!0}},[U,Ve,Je]),xe=G=>{const se=new Set(o);se.has(G)?se.delete(G):se.add(G),s(se)};return g.jsxs(\"div\",{className:\"h-full flex flex-col bg-[var(--bg-secondary)]\",children:[g.jsx(\"div\",{className:\"bg-[var(--bg-primary)] border-b border-[var(--border-color)] px-4 py-3\",children:g.jsxs(\"div\",{className:\"flex items-center justify-between\",children:[g.jsxs(\"div\",{className:\"flex items-center gap-4\",children:[g.jsxs(\"div\",{className:\"flex items-center gap-2\",children:[g.jsxs(\"span\",{className:\"text-sm text-[var(--text-primary)] font-medium\",children:[F.length,\" records\"]}),Y().length>0&&g.jsxs(\"div\",{className:\"flex items-center gap-1.5 ml-2\",children:[g.jsxs(\"span\",{className:\"text-xs text-[var(--accent-color)] font-medium\",children:[Y().length,\" selected\"]}),g.jsx(\"button\",{onClick:oe,className:\"p-1 text-[var(--text-secondary)] hover:text-[var(--accent-color)] rounded transition-colors\",title:\"Copy selected rows as JSON\",children:g.jsx(iC,{className:\"h-3.5 w-3.5\"})}),g.jsx(\"button\",{onClick:ne,className:\"p-1 text-[var(--text-secondary)] hover:text-[var(--error-color)] rounded transition-colors\",title:\"Delete selected rows\",children:g.jsx(Ks,{className:\"h-3.5 w-3.5\"})})]})]}),f&&g.jsxs(\"div\",{className:je(\"flex items-center gap-1.5 px-2 py-1 text-xs rounded-full\",f.type===\"success\"?\"bg-green-100 bg-[var(--bg-selected)] text-green-700 text-[var(--success-color)]\":\"bg-red-100 dark:bg-red-500/20 text-red-700 dark:text-red-400\"),children:[f.type===\"success\"?g.jsx(Wh,{className:\"h-3.5 w-3.5\"}):g.jsx(eb,{className:\"h-3.5 w-3.5\"}),g.jsx(\"span\",{children:f.message})]}),v&&!f&&g.jsxs(\"div\",{className:\"flex items-center gap-1.5 px-2 py-1 text-xs bg-blue-100 bg-[var(--bg-selected)] text-blue-700 text-[var(--accent-color)] rounded-full\",children:[g.jsx(hi,{className:\"h-3.5 w-3.5 animate-spin\"}),g.jsx(\"span\",{children:\"Saving...\"})]})]}),g.jsxs(\"div\",{className:\"flex items-center gap-1\",children:[g.jsxs(Js,{size:\"sm\",onClick:()=>{e&&(A(`{\n \n}`),I(!0))},className:\"mr-2\",children:[g.jsx(M4,{className:\"h-4 w-4\"}),\"Add\"]}),g.jsxs(uh,{children:[g.jsx(dh,{asChild:!0,children:g.jsxs(\"button\",{className:je(\"flex items-center gap-1.5 px-2 py-1 text-xs rounded transition-colors\",o.size>0?\"bg-blue-600 text-white hover:bg-blue-700\":\"text-[var(--text-primary)] hover:bg-[var(--bg-hover)] hover:text-[var(--text-primary)]\"),children:[g.jsx(v4,{className:\"h-4 w-4\"}),g.jsx(\"span\",{children:\"Fields\"}),o.size>0&&g.jsxs(\"span\",{className:\"ml-1\",children:[\"(\",o.size,\")\"]}),g.jsx(ns,{className:\"h-3.5 w-3.5\"})]})}),g.jsxs(Wu,{align:\"end\",className:\"min-w-[220px] max-h-[400px] overflow-y-auto\",children:[g.jsxs(xh,{className:\"text-xs\",children:[g.jsx(\"div\",{children:\"Toggle fields\"}),g.jsxs(\"div\",{className:\"text-xs text-[var(--text-secondary)] font-normal mt-1\",children:[O.length-o.size,\" of \",O.length,\" visible\"]})]}),g.jsx(Qo,{}),O.map(G=>g.jsx(lN,{checked:!o.has(G),onCheckedChange:()=>xe(G),onSelect:se=>se.preventDefault(),className:\"text-xs\",children:G},G))]})]}),g.jsxs(uh,{children:[g.jsx(dh,{asChild:!0,children:g.jsxs(\"button\",{className:je(\"flex items-center gap-1.5 px-2 py-1 text-xs rounded transition-colors\",W.length>0?\"bg-green-600 text-white hover:bg-green-700\":\"text-[var(--text-primary)] hover:bg-[var(--bg-hover)] hover:text-[var(--text-primary)]\"),children:[g.jsx(b4,{className:\"h-4 w-4\"}),W.length>0&&g.jsx(\"span\",{className:\"ml-1 text-[10px] font-bold\",children:W.length}),g.jsx(ns,{className:\"h-3.5 w-3.5\"})]})}),g.jsxs(Wu,{align:\"end\",className:\"min-w-[320px]\",children:[g.jsxs(xh,{className:\"text-xs\",children:[g.jsx(\"div\",{children:\"Filter by field\"}),g.jsxs(\"div\",{className:\"text-xs text-[var(--text-secondary)] font-normal mt-1\",children:[W.length,\" filter\",W.length!==1?\"s\":\"\",\" active\"]})]}),g.jsx(Qo,{}),g.jsxs(\"div\",{className:\"p-3 max-h-80 overflow-y-auto space-y-3\",children:[g.jsxs(\"div\",{children:[g.jsx(ts,{htmlFor:\"global-filter\",className:\"text-xs mb-1\",children:\"Search all fields\"}),g.jsx(ls,{id:\"global-filter\",type:\"text\",value:Object.values(T).some(G=>G.trim())&&Object.values(T).find(G=>G.trim())||\"\",onChange:G=>{if(G.target.value.trim()){const se={...T};$.forEach(ge=>{se[ge]=G.target.value}),M(se)}else M({})},placeholder:\"Search all fields...\",className:\"h-8 text-xs\"})]}),g.jsxs(\"div\",{className:\"space-y-2\",children:[g.jsx(ts,{className:\"text-xs\",children:\"Filter by specific field\"}),$.map(G=>g.jsxs(\"div\",{className:\"flex gap-2 items-center\",children:[g.jsx(\"span\",{className:\"text-xs text-[var(--text-primary)] min-w-[80px] truncate\",children:G}),g.jsx(ls,{type:\"text\",value:T[G]||\"\",onChange:se=>{const ge={...T};se.target.value.trim()?ge[G]=se.target.value:delete ge[G],M(ge)},placeholder:`Filter ${G}...`,className:\"flex-1 h-7 text-xs\"}),T[G]&&g.jsx(\"button\",{onClick:()=>{const se={...T};delete se[G],M(se)},className:\"text-[var(--text-tertiary)] hover:text-[var(--text-primary)] hover:text-[var(--text-primary)] p-0.5\",children:g.jsx(eb,{className:\"h-3 w-3\"})})]},G))]}),W.length>0&&g.jsxs(g.Fragment,{children:[g.jsx(Qo,{}),g.jsx(Js,{variant:\"outline\",size:\"sm\",onClick:()=>M({}),className:\"w-full text-xs text-[var(--error-color)] hover:text-red-700 hover:text-[var(--error-color)] hover:bg-[var(--error-bg)] h-7\",children:\"Clear all filters\"})]})]})]})]}),g.jsxs(uh,{children:[g.jsx(dh,{asChild:!0,children:g.jsxs(\"button\",{className:je(\"flex items-center gap-1.5 px-2 py-1 text-xs rounded transition-colors\",c?\"bg-orange-600 text-white hover:bg-orange-700\":\"text-[var(--text-primary)] hover:bg-[var(--bg-hover)] hover:text-[var(--text-primary)]\"),children:[g.jsx(l4,{className:\"h-4 w-4\"}),c&&g.jsx(\"span\",{className:\"ml-1 text-[10px] font-bold\",children:\"1\"}),g.jsx(ns,{className:\"h-3.5 w-3.5\"})]})}),g.jsxs(Wu,{align:\"end\",className:\"min-w-[220px] max-h-[400px] overflow-y-auto\",children:[g.jsx(xh,{className:\"text-xs\",children:\"Sort by field\"}),g.jsx(Qo,{}),O.map(G=>g.jsxs(\"div\",{className:\"flex gap-1 px-1\",children:[g.jsxs(\"button\",{onClick:()=>u({field:G,direction:\"asc\"}),className:je(\"flex-1 text-left px-3 py-1.5 text-xs hover:bg-[var(--bg-hover)] rounded transition-colors\",c?.field===G&&c.direction===\"asc\"?\"bg-orange-50 dark:bg-orange-500/20 text-orange-700 dark:text-orange-400 font-medium\":\"text-[var(--text-primary)]\"),children:[G,\" ↑\"]}),g.jsxs(\"button\",{onClick:()=>u({field:G,direction:\"desc\"}),className:je(\"flex-1 text-left px-3 py-1.5 text-xs hover:bg-[var(--bg-hover)] rounded transition-colors\",c?.field===G&&c.direction===\"desc\"?\"bg-orange-50 dark:bg-orange-500/20 text-orange-700 dark:text-orange-400 font-medium\":\"text-[var(--text-primary)]\"),children:[G,\" ↓\"]})]},G)),c&&g.jsxs(g.Fragment,{children:[g.jsx(Qo,{}),g.jsx(cc,{onClick:()=>u(null),className:\"text-xs text-[var(--error-color)] hover:bg-[var(--error-bg)]\",children:\"Clear sort\"})]})]})]}),g.jsxs(uh,{children:[g.jsx(dh,{asChild:!0,children:g.jsx(\"button\",{className:\"flex items-center gap-1.5 px-2 py-1 text-xs text-[var(--text-primary)] hover:bg-[var(--bg-hover)] hover:text-[var(--text-primary)] rounded transition-colors\",children:g.jsx(p4,{className:\"h-4 w-4\"})})}),g.jsxs(Wu,{align:\"end\",className:\"min-w-[180px]\",children:[g.jsxs(cc,{className:\"text-xs\",onClick:K,disabled:!U.length,children:[g.jsx(RM,{className:\"h-4 w-4 mr-2\"}),g.jsx(\"span\",{children:\"Export CSV\"})]}),g.jsxs(cc,{className:\"text-xs\",onClick:ie,disabled:!U.length,children:[g.jsx(Eg,{className:\"h-4 w-4 mr-2\"}),g.jsx(\"span\",{children:\"Export JSON\"})]}),g.jsx(Qo,{}),g.jsxs(cc,{className:\"text-xs\",onClick:L,disabled:!U.length,children:[g.jsx(g4,{className:\"h-4 w-4 mr-2\"}),g.jsx(\"span\",{children:\"Clear Table\"})]}),g.jsxs(cc,{className:\"text-xs text-[var(--error-color)]\",onClick:L,disabled:!U.length,children:[g.jsx(Ks,{className:\"h-4 w-4 mr-2\"}),g.jsx(\"span\",{children:\"Delete Table\"})]}),g.jsx(Qo,{}),g.jsxs(\"div\",{className:\"px-2 py-2 text-xs text-[var(--text-secondary)]\",children:[g.jsx(\"div\",{className:\"font-medium mb-1.5\",children:\"Keyboard shortcuts:\"}),g.jsxs(\"div\",{className:\"space-y-1\",children:[g.jsxs(\"div\",{children:[g.jsx(\"kbd\",{className:\"px-1 py-0.5 bg-[var(--bg-tertiary)] rounded text-xs\",children:\"Enter\"}),\" Edit cell\"]}),g.jsxs(\"div\",{children:[g.jsx(\"kbd\",{className:\"px-1 py-0.5 bg-[var(--bg-tertiary)] rounded text-xs\",children:\"Esc\"}),\" Cancel\"]}),g.jsxs(\"div\",{children:[g.jsx(\"kbd\",{className:\"px-1 py-0.5 bg-[var(--bg-tertiary)] rounded text-xs\",children:\"⌘C\"}),\" Copy selected rows\"]}),g.jsxs(\"div\",{children:[g.jsx(\"kbd\",{className:\"px-1 py-0.5 bg-[var(--bg-tertiary)] rounded text-xs\",children:\"⌫\"}),\" Delete selected rows\"]})]})]})]})]})]})]})}),g.jsx(\"div\",{className:\"flex-1 overflow-hidden\",children:z?g.jsx(\"div\",{className:\"flex items-center justify-center h-full bg-[var(--bg-primary)]\",children:g.jsx(hi,{className:\"h-5 w-5 animate-spin text-[var(--text-tertiary)]\"})}):F.length>0?g.jsx(\"div\",{className:\"w-full h-full [&>div]:!min-w-full\",children:g.jsx(kF,{ref:a,columns:Ve,rows:F.length,rowHeight:34,headerHeight:36,getCellContent:jt,gridSelection:x,onGridSelectionChange:G=>{G.current&&G.current.cell[0]>=Je||S(G)},onCellEdited:async(G,se)=>{const[ge,Ne]=G;if(ge>=Je)return;const Re=Ve[ge]?.id;if(!Re)return;const ze=F[Ne],Ge=ze._id;if(!Ge){h({type:\"error\",message:\"Cannot edit: No document ID\"}),setTimeout(()=>h(null),3e3);return}let Xe;typeof se==\"object\"&&\"data\"in se?Xe=se.data:Xe=se;const Pe=ze[Re];typeof Pe==\"number\"&&typeof Xe==\"string\"?Xe=parseFloat(Xe)||0:typeof Pe==\"boolean\"&&(Xe=!!Xe),y(!0);try{if(!e)throw new Error(\"No table selected\");await B({tableName:e,documentId:Ge,data:{[Re]:Xe}}),h({type:\"success\",message:`Updated ${Re}`})}catch(Mt){console.error(\"Failed to update cell:\",Mt),h({type:\"error\",message:Mt instanceof Error?Mt.message:\"Update failed\"})}finally{y(!1),setTimeout(()=>h(null),3e3)}},onCellContextMenu:(G,se)=>{se.preventDefault();const[ge,Ne]=G;if(ge>=Je)return;const Re=se,ze=Re.bounds?Re.bounds.x+Re.localEventX:0,Ge=Re.bounds?Re.bounds.y+Re.localEventY:0;k({position:{x:ze,y:Ge},type:\"cell\",row:Ne,column:ge})},rowMarkers:\"both\",rowSelect:\"multi\",smoothScrollX:!0,smoothScrollY:!0,height:\"100%\",getCellsForSelection:!0,theme:n===\"dark\"?{accentColor:\"#569cd6\",accentLight:\"#264f78\",textDark:\"#cccccc\",textMedium:\"#969696\",textLight:\"#6a6a6a\",textBubble:\"#cccccc\",bgCell:\"#1e1e1e\",bgCellMedium:\"#252526\",bgHeader:\"#252526\",bgHeaderHasFocus:\"#2a2a2b\",bgHeaderHovered:\"#2a2a2b\",borderColor:\"#3e3e42\",horizontalBorderColor:\"#3e3e42\",bgIconHeader:\"#569cd6\",fgIconHeader:\"#ffffff\",textHeader:\"#cccccc\",textHeaderSelected:\"#569cd6\",textGroupHeader:\"#969696\",bgBubble:\"#264f78\",bgBubbleSelected:\"#1e3a5f\",fontFamily:'-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif',baseFontStyle:\"14px\",headerFontStyle:\"600 14px\"}:{accentColor:\"#2563eb\",accentLight:\"#dbeafe\",textDark:\"#111827\",textMedium:\"#4b5563\",textLight:\"#9ca3af\",textBubble:\"#111827\",bgCell:\"#ffffff\",bgCellMedium:\"#f9fafb\",bgHeader:\"#f8fafc\",bgHeaderHasFocus:\"#f1f5f9\",bgHeaderHovered:\"#f1f5f9\",borderColor:\"#e2e8f0\",horizontalBorderColor:\"#f1f5f9\",bgIconHeader:\"#64748b\",fgIconHeader:\"#ffffff\",textHeader:\"#1e293b\",textHeaderSelected:\"#2563eb\",textGroupHeader:\"#475569\",bgBubble:\"#dbeafe\",bgBubbleSelected:\"#bfdbfe\",fontFamily:'-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif',baseFontStyle:\"14px\",headerFontStyle:\"600 14px\"}})}):e?g.jsx(\"div\",{className:\"flex flex-col items-center justify-center h-full bg-[var(--bg-primary)]\",children:g.jsxs(\"div\",{className:\"text-center\",children:[g.jsx(\"div\",{className:\"h-10 w-10 rounded-full bg-[var(--bg-tertiary)] flex items-center justify-center mx-auto mb-3\",children:g.jsx(Eg,{className:\"h-5 w-5 text-[var(--text-tertiary)]\"})}),g.jsx(\"div\",{className:\"font-medium text-[var(--text-primary)] mb-1\",children:\"No records found\"}),g.jsx(\"div\",{className:\"text-sm text-[var(--text-secondary)]\",children:\"This table appears to be empty\"})]})}):g.jsx(\"div\",{className:\"flex flex-col items-center justify-center h-full bg-[var(--bg-primary)]\",children:g.jsxs(\"div\",{className:\"text-center\",children:[g.jsx(\"div\",{className:\"h-10 w-10 rounded-full bg-[var(--bg-tertiary)] flex items-center justify-center mx-auto mb-3\",children:g.jsx(Eg,{className:\"h-5 w-5 text-[var(--text-tertiary)]\"})}),g.jsx(\"div\",{className:\"font-medium text-[var(--text-primary)] mb-1\",children:\"Select a table to view data\"}),g.jsx(\"div\",{className:\"text-sm text-[var(--text-secondary)]\",children:\"Choose a table from the dropdown above to get started\"})]})})}),R&&g.jsxs(\"div\",{ref:G=>{if(!G)return;const se=G.getBoundingClientRect(),ge=8;let Ne=R.position.x,Re=R.position.y;Ne+se.width>window.innerWidth-ge&&(Ne=Math.max(ge,window.innerWidth-se.width-ge)),Re+se.height>window.innerHeight-ge&&(Re=Math.max(ge,window.innerHeight-se.height-ge)),(G.style.left!==`${Ne}px`||G.style.top!==`${Re}px`)&&(G.style.left=`${Ne}px`,G.style.top=`${Re}px`)},className:\"fixed bg-[var(--bg-primary)] border border-[var(--border-color)] rounded-lg shadow-lg z-[9999] min-w-[160px]\",style:{left:R.position.x,top:R.position.y},children:[g.jsxs(\"div\",{className:\"p-1\",children:[g.jsxs(\"button\",{onClick:()=>R.row!==void 0&&R.column!==void 0&&me(R.row,R.column),className:\"w-full flex items-center gap-2 px-3 py-1.5 text-xs text-left hover:bg-[var(--bg-hover)] rounded\",children:[g.jsx(T4,{className:\"h-4 w-4\"}),g.jsx(\"span\",{children:\"Edit cell\"})]}),g.jsxs(\"button\",{onClick:()=>R.row!==void 0&&R.column!==void 0&&X(R.row,R.column),className:\"w-full flex items-center gap-2 px-3 py-1.5 text-xs text-left hover:bg-[var(--bg-hover)] rounded\",children:[g.jsx(Rc,{className:\"h-4 w-4\"}),g.jsx(\"span\",{children:\"Copy cell\"})]})]}),g.jsx(\"div\",{className:\"h-px bg-[var(--border-color)] my-1\"}),g.jsxs(\"div\",{className:\"p-1\",children:[R.row!==void 0&&g.jsxs(\"button\",{onClick:()=>Z(R.row),className:\"w-full flex items-center gap-2 px-3 py-1.5 text-xs text-left hover:bg-[var(--bg-hover)] rounded\",children:[g.jsx(m4,{className:\"h-4 w-4\"}),g.jsx(\"span\",{children:\"Copy row as JSON\"})]}),Y().length>1&&g.jsxs(\"button\",{onClick:oe,className:\"w-full flex items-center gap-2 px-3 py-1.5 text-xs text-left hover:bg-[var(--bg-hover)] rounded\",children:[g.jsx(iC,{className:\"h-4 w-4\"}),g.jsxs(\"span\",{children:[\"Copy \",Y().length,\" rows as JSON\"]})]})]}),g.jsx(\"div\",{className:\"h-px bg-[var(--border-color)] my-1\"}),g.jsx(\"div\",{className:\"p-1\",children:(R.type===\"row\"||R.type===\"cell\")&&g.jsxs(g.Fragment,{children:[g.jsxs(\"button\",{onClick:()=>R.row!==void 0&&Fe(R.row),className:\"w-full flex items-center gap-2 px-3 py-1.5 text-xs text-left hover:bg-[var(--bg-hover)] rounded\",children:[g.jsx(Rc,{className:\"h-4 w-4\"}),g.jsx(\"span\",{children:\"Duplicate record\"})]}),g.jsxs(\"button\",{onClick:()=>R.row!==void 0&&Me(R.row),className:\"w-full flex items-center gap-2 px-3 py-1.5 text-xs text-left text-[var(--error-color)] hover:bg-[var(--error-bg)] rounded\",children:[g.jsx(Ks,{className:\"h-4 w-4\"}),g.jsx(\"span\",{children:\"Delete record\"})]}),Y().length>1&&g.jsxs(\"button\",{onClick:ne,className:\"w-full flex items-center gap-2 px-3 py-1.5 text-xs text-left text-[var(--error-color)] hover:bg-[var(--error-bg)] rounded\",children:[g.jsx(Ks,{className:\"h-4 w-4\"}),g.jsxs(\"span\",{children:[\"Delete \",Y().length,\" selected\"]})]})]})})]}),R&&g.jsx(\"div\",{className:\"fixed inset-0 z-[9998]\",onClick:()=>k(null)}),g.jsx(nU,{open:j,onOpenChange:I,children:g.jsxs(jN,{className:\"w-[500px] sm:max-w-[500px] overflow-y-auto\",children:[g.jsx(zN,{children:g.jsxs(LN,{children:[\"Add Record to \",e]})}),g.jsx(\"div\",{className:\"mt-6 space-y-4\",children:g.jsxs(\"div\",{className:\"space-y-2\",children:[g.jsx(ts,{children:\"Document JSON\"}),g.jsx(nd,{value:P,onChange:G=>A(G.target.value),className:\"font-mono text-xs h-[400px]\",placeholder:\"{ ... }\"}),g.jsx(\"p\",{className:\"text-xs text-[var(--text-secondary)]\",children:\"Enter the document data as JSON. Keys do not need quotes (relaxed JSON).\"})]})}),g.jsxs(PN,{className:\"mt-6\",children:[g.jsx(rU,{asChild:!0,children:g.jsx(Js,{variant:\"outline\",className:\"mr-2\",children:\"Cancel\"})}),g.jsx(Js,{onClick:()=>{try{let G;try{G=new Function(\"return \"+P)()}catch{G=JSON.parse(P)}if(typeof G!=\"object\"||G===null)throw new Error(\"Input must be an object\");N({tableName:e,data:G}),I(!1),h({type:\"success\",message:\"Added new record\"}),setTimeout(()=>h(null),3e3)}catch(G){alert(\"Invalid JSON: \"+(G instanceof Error?G.message:String(G)))}},children:\"Add Record\"})]})]})})]})}const wm=m.createContext(null);wm.displayName=\"PanelGroupContext\";const Nn={group:\"data-panel-group\",groupDirection:\"data-panel-group-direction\",groupId:\"data-panel-group-id\",panel:\"data-panel\",panelCollapsible:\"data-panel-collapsible\",panelId:\"data-panel-id\",panelSize:\"data-panel-size\",resizeHandle:\"data-resize-handle\",resizeHandleActive:\"data-resize-handle-active\",resizeHandleEnabled:\"data-panel-resize-handle-enabled\",resizeHandleId:\"data-panel-resize-handle-id\",resizeHandleState:\"data-resize-handle-state\"},j1=10,tl=m.useLayoutEffect,AT=Vh.useId,cU=typeof AT==\"function\"?AT:()=>null;let uU=0;function z1(e=null){const t=cU(),n=m.useRef(e||t||null);return n.current===null&&(n.current=\"\"+uU++),e??n.current}function IN({children:e,className:t=\"\",collapsedSize:n,collapsible:a,defaultSize:o,forwardedRef:s,id:c,maxSize:u,minSize:f,onCollapse:h,onExpand:v,onResize:y,order:x,style:S,tagName:w=\"div\",...C}){const R=m.useContext(wm);if(R===null)throw Error(\"Panel components must be rendered within a PanelGroup container\");const{collapsePanel:k,expandPanel:T,getPanelSize:M,getPanelStyle:j,groupId:I,isPanelCollapsed:P,reevaluatePanelConstraints:A,registerPanel:q,resizePanel:B,unregisterPanel:V}=R,N=z1(c),_=m.useRef({callbacks:{onCollapse:h,onExpand:v,onResize:y},constraints:{collapsedSize:n,collapsible:a,defaultSize:o,maxSize:u,minSize:f},id:N,idIsFromProps:c!==void 0,order:x});m.useRef({didLogMissingDefaultSizeWarning:!1}),tl(()=>{const{callbacks:F,constraints:O}=_.current,$={...O};_.current.id=N,_.current.idIsFromProps=c!==void 0,_.current.order=x,F.onCollapse=h,F.onExpand=v,F.onResize=y,O.collapsedSize=n,O.collapsible=a,O.defaultSize=o,O.maxSize=u,O.minSize=f,($.collapsedSize!==O.collapsedSize||$.collapsible!==O.collapsible||$.maxSize!==O.maxSize||$.minSize!==O.minSize)&&A(_.current,$)}),tl(()=>{const F=_.current;return q(F),()=>{V(F)}},[x,N,q,V]),m.useImperativeHandle(s,()=>({collapse:()=>{k(_.current)},expand:F=>{T(_.current,F)},getId(){return N},getSize(){return M(_.current)},isCollapsed(){return P(_.current)},isExpanded(){return!P(_.current)},resize:F=>{B(_.current,F)}}),[k,T,M,P,N,B]);const z=j(_.current,o);return m.createElement(w,{...C,children:e,className:t,id:N,style:{...z,...S},[Nn.groupId]:I,[Nn.panel]:\"\",[Nn.panelCollapsible]:a||void 0,[Nn.panelId]:N,[Nn.panelSize]:parseFloat(\"\"+z.flexGrow).toFixed(1)})}const HN=m.forwardRef((e,t)=>m.createElement(IN,{...e,forwardedRef:t}));IN.displayName=\"Panel\";HN.displayName=\"forwardRef(Panel)\";let Cb=null,wh=-1,Ko=null;function dU(e,t,n){const a=(t&UN)!==0,o=(t&VN)!==0,s=(t&WN)!==0,c=(t&GN)!==0;if(t){if(a)return s?\"se-resize\":c?\"ne-resize\":\"e-resize\";if(o)return s?\"sw-resize\":c?\"nw-resize\":\"w-resize\";if(s)return\"s-resize\";if(c)return\"n-resize\"}switch(e){case\"horizontal\":return\"ew-resize\";case\"intersection\":return\"move\";case\"vertical\":return\"ns-resize\"}}function fU(){Ko!==null&&(document.head.removeChild(Ko),Cb=null,Ko=null,wh=-1)}function B0(e,t,n){var a,o;const s=dU(e,t);if(Cb!==s){if(Cb=s,Ko===null&&(Ko=document.createElement(\"style\"),document.head.appendChild(Ko)),wh>=0){var c;(c=Ko.sheet)===null||c===void 0||c.removeRule(wh)}wh=(a=(o=Ko.sheet)===null||o===void 0?void 0:o.insertRule(`*{cursor: ${s} !important;}`))!==null&&a!==void 0?a:-1}}function qN(e){return e.type===\"keydown\"}function FN(e){return e.type.startsWith(\"pointer\")}function $N(e){return e.type.startsWith(\"mouse\")}function Sm(e){if(FN(e)){if(e.isPrimary)return{x:e.clientX,y:e.clientY}}else if($N(e))return{x:e.clientX,y:e.clientY};return{x:1/0,y:1/0}}function hU(){if(typeof matchMedia==\"function\")return matchMedia(\"(pointer:coarse)\").matches?\"coarse\":\"fine\"}function mU(e,t,n){return e.x<t.x+t.width&&e.x+e.width>t.x&&e.y<t.y+t.height&&e.y+e.height>t.y}function pU(e,t){if(e===t)throw new Error(\"Cannot compare node with itself\");const n={a:DT(e),b:DT(t)};let a;for(;n.a.at(-1)===n.b.at(-1);)e=n.a.pop(),t=n.b.pop(),a=e;Ct(a,\"Stacking order can only be calculated for elements with a common ancestor\");const o={a:OT(NT(n.a)),b:OT(NT(n.b))};if(o.a===o.b){const s=a.childNodes,c={a:n.a.at(-1),b:n.b.at(-1)};let u=s.length;for(;u--;){const f=s[u];if(f===c.a)return 1;if(f===c.b)return-1}}return Math.sign(o.a-o.b)}const gU=/\\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\\b/;function vU(e){var t;const n=getComputedStyle((t=BN(e))!==null&&t!==void 0?t:e).display;return n===\"flex\"||n===\"inline-flex\"}function yU(e){const t=getComputedStyle(e);return!!(t.position===\"fixed\"||t.zIndex!==\"auto\"&&(t.position!==\"static\"||vU(e))||+t.opacity<1||\"transform\"in t&&t.transform!==\"none\"||\"webkitTransform\"in t&&t.webkitTransform!==\"none\"||\"mixBlendMode\"in t&&t.mixBlendMode!==\"normal\"||\"filter\"in t&&t.filter!==\"none\"||\"webkitFilter\"in t&&t.webkitFilter!==\"none\"||\"isolation\"in t&&t.isolation===\"isolate\"||gU.test(t.willChange)||t.webkitOverflowScrolling===\"touch\")}function NT(e){let t=e.length;for(;t--;){const n=e[t];if(Ct(n,\"Missing node\"),yU(n))return n}return null}function OT(e){return e&&Number(getComputedStyle(e).zIndex)||0}function DT(e){const t=[];for(;e;)t.push(e),e=BN(e);return t}function BN(e){const{parentNode:t}=e;return t&&t instanceof ShadowRoot?t.host:t}const UN=1,VN=2,WN=4,GN=8,bU=hU()===\"coarse\";let Fa=[],bc=!1,Zo=new Map,Cm=new Map;const pd=new Set;function xU(e,t,n,a,o){var s;const{ownerDocument:c}=t,u={direction:n,element:t,hitAreaMargins:a,setResizeHandlerState:o},f=(s=Zo.get(c))!==null&&s!==void 0?s:0;return Zo.set(c,f+1),pd.add(u),Fh(),function(){var v;Cm.delete(e),pd.delete(u);const y=(v=Zo.get(c))!==null&&v!==void 0?v:1;if(Zo.set(c,y-1),Fh(),y===1&&Zo.delete(c),Fa.includes(u)){const x=Fa.indexOf(u);x>=0&&Fa.splice(x,1),Rm(),o(\"up\",!0,null)}}}function wU(e){const{target:t}=e,{x:n,y:a}=Sm(e);bc=!0,P1({target:t,x:n,y:a}),Fh(),Fa.length>0&&($h(\"down\",e),Rm(),e.preventDefault(),YN(t)||e.stopImmediatePropagation())}function U0(e){const{x:t,y:n}=Sm(e);if(bc&&e.type!==\"pointerleave\"&&e.buttons===0&&(bc=!1,$h(\"up\",e)),!bc){const{target:a}=e;P1({target:a,x:t,y:n})}$h(\"move\",e),Rm(),Fa.length>0&&e.preventDefault()}function V0(e){const{target:t}=e,{x:n,y:a}=Sm(e);Cm.clear(),bc=!1,Fa.length>0&&(e.preventDefault(),YN(t)||e.stopImmediatePropagation()),$h(\"up\",e),P1({target:t,x:n,y:a}),Rm(),Fh()}function YN(e){let t=e;for(;t;){if(t.hasAttribute(Nn.resizeHandle))return!0;t=t.parentElement}return!1}function P1({target:e,x:t,y:n}){Fa.splice(0);let a=null;(e instanceof HTMLElement||e instanceof SVGElement)&&(a=e),pd.forEach(o=>{const{element:s,hitAreaMargins:c}=o,u=s.getBoundingClientRect(),{bottom:f,left:h,right:v,top:y}=u,x=bU?c.coarse:c.fine;if(t>=h-x&&t<=v+x&&n>=y-x&&n<=f+x){if(a!==null&&document.contains(a)&&s!==a&&!s.contains(a)&&!a.contains(s)&&pU(a,s)>0){let w=a,C=!1;for(;w&&!w.contains(s);){if(mU(w.getBoundingClientRect(),u)){C=!0;break}w=w.parentElement}if(C)return}Fa.push(o)}})}function W0(e,t){Cm.set(e,t)}function Rm(){let e=!1,t=!1;Fa.forEach(a=>{const{direction:o}=a;o===\"horizontal\"?e=!0:t=!0});let n=0;Cm.forEach(a=>{n|=a}),e&&t?B0(\"intersection\",n):e?B0(\"horizontal\",n):t?B0(\"vertical\",n):fU()}let G0;function Fh(){var e;(e=G0)===null||e===void 0||e.abort(),G0=new AbortController;const t={capture:!0,signal:G0.signal};pd.size&&(bc?(Fa.length>0&&Zo.forEach((n,a)=>{const{body:o}=a;n>0&&(o.addEventListener(\"contextmenu\",V0,t),o.addEventListener(\"pointerleave\",U0,t),o.addEventListener(\"pointermove\",U0,t))}),Zo.forEach((n,a)=>{const{body:o}=a;o.addEventListener(\"pointerup\",V0,t),o.addEventListener(\"pointercancel\",V0,t)})):Zo.forEach((n,a)=>{const{body:o}=a;n>0&&(o.addEventListener(\"pointerdown\",wU,t),o.addEventListener(\"pointermove\",U0,t))}))}function $h(e,t){pd.forEach(n=>{const{setResizeHandlerState:a}=n,o=Fa.includes(n);a(e,o,t)})}function SU(){const[e,t]=m.useState(0);return m.useCallback(()=>t(n=>n+1),[])}function Ct(e,t){if(!e)throw console.error(t),Error(t)}function sl(e,t,n=j1){return e.toFixed(n)===t.toFixed(n)?0:e>t?1:-1}function Ji(e,t,n=j1){return sl(e,t,n)===0}function sa(e,t,n){return sl(e,t,n)===0}function CU(e,t,n){if(e.length!==t.length)return!1;for(let a=0;a<e.length;a++){const o=e[a],s=t[a];if(!sa(o,s,n))return!1}return!0}function pc({panelConstraints:e,panelIndex:t,size:n}){const a=e[t];Ct(a!=null,`Panel constraints not found for index ${t}`);let{collapsedSize:o=0,collapsible:s,maxSize:c=100,minSize:u=0}=a;if(sl(n,u)<0)if(s){const f=(o+u)/2;sl(n,f)<0?n=o:n=u}else n=u;return n=Math.min(c,n),n=parseFloat(n.toFixed(j1)),n}function Gu({delta:e,initialLayout:t,panelConstraints:n,pivotIndices:a,prevLayout:o,trigger:s}){if(sa(e,0))return t;const c=[...t],[u,f]=a;Ct(u!=null,\"Invalid first pivot index\"),Ct(f!=null,\"Invalid second pivot index\");let h=0;if(s===\"keyboard\"){{const y=e<0?f:u,x=n[y];Ct(x,`Panel constraints not found for index ${y}`);const{collapsedSize:S=0,collapsible:w,minSize:C=0}=x;if(w){const R=t[y];if(Ct(R!=null,`Previous layout not found for panel index ${y}`),sa(R,S)){const k=C-R;sl(k,Math.abs(e))>0&&(e=e<0?0-k:k)}}}{const y=e<0?u:f,x=n[y];Ct(x,`No panel constraints found for index ${y}`);const{collapsedSize:S=0,collapsible:w,minSize:C=0}=x;if(w){const R=t[y];if(Ct(R!=null,`Previous layout not found for panel index ${y}`),sa(R,C)){const k=R-S;sl(k,Math.abs(e))>0&&(e=e<0?0-k:k)}}}}{const y=e<0?1:-1;let x=e<0?f:u,S=0;for(;;){const C=t[x];Ct(C!=null,`Previous layout not found for panel index ${x}`);const k=pc({panelConstraints:n,panelIndex:x,size:100})-C;if(S+=k,x+=y,x<0||x>=n.length)break}const w=Math.min(Math.abs(e),Math.abs(S));e=e<0?0-w:w}{let x=e<0?u:f;for(;x>=0&&x<n.length;){const S=Math.abs(e)-Math.abs(h),w=t[x];Ct(w!=null,`Previous layout not found for panel index ${x}`);const C=w-S,R=pc({panelConstraints:n,panelIndex:x,size:C});if(!sa(w,R)&&(h+=w-R,c[x]=R,h.toFixed(3).localeCompare(Math.abs(e).toFixed(3),void 0,{numeric:!0})>=0))break;e<0?x--:x++}}if(CU(o,c))return o;{const y=e<0?f:u,x=t[y];Ct(x!=null,`Previous layout not found for panel index ${y}`);const S=x+h,w=pc({panelConstraints:n,panelIndex:y,size:S});if(c[y]=w,!sa(w,S)){let C=S-w,k=e<0?f:u;for(;k>=0&&k<n.length;){const T=c[k];Ct(T!=null,`Previous layout not found for panel index ${k}`);const M=T+C,j=pc({panelConstraints:n,panelIndex:k,size:M});if(sa(T,j)||(C-=j-T,c[k]=j),sa(C,0))break;e>0?k--:k++}}}const v=c.reduce((y,x)=>x+y,0);return sa(v,100)?c:o}function RU({layout:e,panelsArray:t,pivotIndices:n}){let a=0,o=100,s=0,c=0;const u=n[0];Ct(u!=null,\"No pivot index found\"),t.forEach((y,x)=>{const{constraints:S}=y,{maxSize:w=100,minSize:C=0}=S;x===u?(a=C,o=w):(s+=C,c+=w)});const f=Math.min(o,100-s),h=Math.max(a,100-c),v=e[u];return{valueMax:f,valueMin:h,valueNow:v}}function gd(e,t=document){return Array.from(t.querySelectorAll(`[${Nn.resizeHandleId}][data-panel-group-id=\"${e}\"]`))}function XN(e,t,n=document){const o=gd(e,n).findIndex(s=>s.getAttribute(Nn.resizeHandleId)===t);return o??null}function QN(e,t,n){const a=XN(e,t,n);return a!=null?[a,a+1]:[-1,-1]}function EU(e){return e instanceof HTMLElement?!0:typeof e==\"object\"&&e!==null&&\"tagName\"in e&&\"getAttribute\"in e}function KN(e,t=document){if(EU(t)&&t.dataset.panelGroupId==e)return t;const n=t.querySelector(`[data-panel-group][data-panel-group-id=\"${e}\"]`);return n||null}function Em(e,t=document){const n=t.querySelector(`[${Nn.resizeHandleId}=\"${e}\"]`);return n||null}function TU(e,t,n,a=document){var o,s,c,u;const f=Em(t,a),h=gd(e,a),v=f?h.indexOf(f):-1,y=(o=(s=n[v])===null||s===void 0?void 0:s.id)!==null&&o!==void 0?o:null,x=(c=(u=n[v+1])===null||u===void 0?void 0:u.id)!==null&&c!==void 0?c:null;return[y,x]}function MU({committedValuesRef:e,eagerValuesRef:t,groupId:n,layout:a,panelDataArray:o,panelGroupElement:s,setLayout:c}){m.useRef({didWarnAboutMissingResizeHandle:!1}),tl(()=>{if(!s)return;const u=gd(n,s);for(let f=0;f<o.length-1;f++){const{valueMax:h,valueMin:v,valueNow:y}=RU({layout:a,panelsArray:o,pivotIndices:[f,f+1]}),x=u[f];if(x!=null){const S=o[f];Ct(S,`No panel data found for index \"${f}\"`),x.setAttribute(\"aria-controls\",S.id),x.setAttribute(\"aria-valuemax\",\"\"+Math.round(h)),x.setAttribute(\"aria-valuemin\",\"\"+Math.round(v)),x.setAttribute(\"aria-valuenow\",y!=null?\"\"+Math.round(y):\"\")}}return()=>{u.forEach((f,h)=>{f.removeAttribute(\"aria-controls\"),f.removeAttribute(\"aria-valuemax\"),f.removeAttribute(\"aria-valuemin\"),f.removeAttribute(\"aria-valuenow\")})}},[n,a,o,s]),m.useEffect(()=>{if(!s)return;const u=t.current;Ct(u,\"Eager values not found\");const{panelDataArray:f}=u,h=KN(n,s);Ct(h!=null,`No group found for id \"${n}\"`);const v=gd(n,s);Ct(v,`No resize handles found for group id \"${n}\"`);const y=v.map(x=>{const S=x.getAttribute(Nn.resizeHandleId);Ct(S,\"Resize handle element has no handle id attribute\");const[w,C]=TU(n,S,f,s);if(w==null||C==null)return()=>{};const R=k=>{if(!k.defaultPrevented)switch(k.key){case\"Enter\":{k.preventDefault();const T=f.findIndex(M=>M.id===w);if(T>=0){const M=f[T];Ct(M,`No panel data found for index ${T}`);const j=a[T],{collapsedSize:I=0,collapsible:P,minSize:A=0}=M.constraints;if(j!=null&&P){const q=Gu({delta:sa(j,I)?A-I:I-j,initialLayout:a,panelConstraints:f.map(B=>B.constraints),pivotIndices:QN(n,S,s),prevLayout:a,trigger:\"keyboard\"});a!==q&&c(q)}}break}}};return x.addEventListener(\"keydown\",R),()=>{x.removeEventListener(\"keydown\",R)}});return()=>{y.forEach(x=>x())}},[s,e,t,n,a,o,c])}function jT(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function ZN(e,t){const n=e===\"horizontal\",{x:a,y:o}=Sm(t);return n?a:o}function kU(e,t,n,a,o){const s=n===\"horizontal\",c=Em(t,o);Ct(c,`No resize handle element found for id \"${t}\"`);const u=c.getAttribute(Nn.groupId);Ct(u,\"Resize handle element has no group id attribute\");let{initialCursorPosition:f}=a;const h=ZN(n,e),v=KN(u,o);Ct(v,`No group element found for id \"${u}\"`);const y=v.getBoundingClientRect(),x=s?y.width:y.height;return(h-f)/x*100}function _U(e,t,n,a,o,s){if(qN(e)){const c=n===\"horizontal\";let u=0;e.shiftKey?u=100:o!=null?u=o:u=10;let f=0;switch(e.key){case\"ArrowDown\":f=c?0:u;break;case\"ArrowLeft\":f=c?-u:0;break;case\"ArrowRight\":f=c?u:0;break;case\"ArrowUp\":f=c?0:-u;break;case\"End\":f=100;break;case\"Home\":f=-100;break}return f}else return a==null?0:kU(e,t,n,a,s)}function AU({panelDataArray:e}){const t=Array(e.length),n=e.map(s=>s.constraints);let a=0,o=100;for(let s=0;s<e.length;s++){const c=n[s];Ct(c,`Panel constraints not found for index ${s}`);const{defaultSize:u}=c;u!=null&&(a++,t[s]=u,o-=u)}for(let s=0;s<e.length;s++){const c=n[s];Ct(c,`Panel constraints not found for index ${s}`);const{defaultSize:u}=c;if(u!=null)continue;const f=e.length-a,h=o/f;a++,t[s]=h,o-=h}return t}function ic(e,t,n){t.forEach((a,o)=>{const s=e[o];Ct(s,`Panel data not found for index ${o}`);const{callbacks:c,constraints:u,id:f}=s,{collapsedSize:h=0,collapsible:v}=u,y=n[f];if(y==null||a!==y){n[f]=a;const{onCollapse:x,onExpand:S,onResize:w}=c;w&&w(a,y),v&&(x||S)&&(S&&(y==null||Ji(y,h))&&!Ji(a,h)&&S(),x&&(y==null||!Ji(y,h))&&Ji(a,h)&&x())}})}function fh(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!=t[n])return!1;return!0}function NU({defaultSize:e,dragState:t,layout:n,panelData:a,panelIndex:o,precision:s=3}){const c=n[o];let u;return c==null?u=e!=null?e.toFixed(s):\"1\":a.length===1?u=\"1\":u=c.toFixed(s),{flexBasis:0,flexGrow:u,flexShrink:1,overflow:\"hidden\",pointerEvents:t!==null?\"none\":void 0}}function OU(e,t=10){let n=null;return(...o)=>{n!==null&&clearTimeout(n),n=setTimeout(()=>{e(...o)},t)}}function zT(e){try{if(typeof localStorage<\"u\")e.getItem=t=>localStorage.getItem(t),e.setItem=(t,n)=>{localStorage.setItem(t,n)};else throw new Error(\"localStorage not supported in this environment\")}catch(t){console.error(t),e.getItem=()=>null,e.setItem=()=>{}}}function JN(e){return`react-resizable-panels:${e}`}function e3(e){return e.map(t=>{const{constraints:n,id:a,idIsFromProps:o,order:s}=t;return o?a:s?`${s}:${JSON.stringify(n)}`:JSON.stringify(n)}).sort((t,n)=>t.localeCompare(n)).join(\",\")}function t3(e,t){try{const n=JN(e),a=t.getItem(n);if(a){const o=JSON.parse(a);if(typeof o==\"object\"&&o!=null)return o}}catch{}return null}function DU(e,t,n){var a,o;const s=(a=t3(e,n))!==null&&a!==void 0?a:{},c=e3(t);return(o=s[c])!==null&&o!==void 0?o:null}function jU(e,t,n,a,o){var s;const c=JN(e),u=e3(t),f=(s=t3(e,o))!==null&&s!==void 0?s:{};f[u]={expandToSizes:Object.fromEntries(n.entries()),layout:a};try{o.setItem(c,JSON.stringify(f))}catch(h){console.error(h)}}function PT({layout:e,panelConstraints:t}){const n=[...e],a=n.reduce((s,c)=>s+c,0);if(n.length!==t.length)throw Error(`Invalid ${t.length} panel layout: ${n.map(s=>`${s}%`).join(\", \")}`);if(!sa(a,100)&&n.length>0)for(let s=0;s<t.length;s++){const c=n[s];Ct(c!=null,`No layout data found for index ${s}`);const u=100/a*c;n[s]=u}let o=0;for(let s=0;s<t.length;s++){const c=n[s];Ct(c!=null,`No layout data found for index ${s}`);const u=pc({panelConstraints:t,panelIndex:s,size:c});c!=u&&(o+=c-u,n[s]=u)}if(!sa(o,0))for(let s=0;s<t.length;s++){const c=n[s];Ct(c!=null,`No layout data found for index ${s}`);const u=c+o,f=pc({panelConstraints:t,panelIndex:s,size:u});if(c!==f&&(o-=f-c,n[s]=f,sa(o,0)))break}return n}const zU=100,Yu={getItem:e=>(zT(Yu),Yu.getItem(e)),setItem:(e,t)=>{zT(Yu),Yu.setItem(e,t)}},LT={};function n3({autoSaveId:e=null,children:t,className:n=\"\",direction:a,forwardedRef:o,id:s=null,onLayout:c=null,keyboardResizeBy:u=null,storage:f=Yu,style:h,tagName:v=\"div\",...y}){const x=z1(s),S=m.useRef(null),[w,C]=m.useState(null),[R,k]=m.useState([]),T=SU(),M=m.useRef({}),j=m.useRef(new Map),I=m.useRef(0),P=m.useRef({autoSaveId:e,direction:a,dragState:w,id:x,keyboardResizeBy:u,onLayout:c,storage:f}),A=m.useRef({layout:R,panelDataArray:[],panelDataArrayChanged:!1});m.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),m.useImperativeHandle(o,()=>({getId:()=>P.current.id,getLayout:()=>{const{layout:Y}=A.current;return Y},setLayout:Y=>{const{onLayout:re}=P.current,{layout:Z,panelDataArray:oe}=A.current,ne=PT({layout:Y,panelConstraints:oe.map(me=>me.constraints)});jT(Z,ne)||(k(ne),A.current.layout=ne,re&&re(ne),ic(oe,ne,M.current))}}),[]),tl(()=>{P.current.autoSaveId=e,P.current.direction=a,P.current.dragState=w,P.current.id=x,P.current.onLayout=c,P.current.storage=f}),MU({committedValuesRef:P,eagerValuesRef:A,groupId:x,layout:R,panelDataArray:A.current.panelDataArray,setLayout:k,panelGroupElement:S.current}),m.useEffect(()=>{const{panelDataArray:Y}=A.current;if(e){if(R.length===0||R.length!==Y.length)return;let re=LT[e];re==null&&(re=OU(jU,zU),LT[e]=re);const Z=[...Y],oe=new Map(j.current);re(e,Z,oe,R,f)}},[e,R,f]),m.useEffect(()=>{});const q=m.useCallback(Y=>{const{onLayout:re}=P.current,{layout:Z,panelDataArray:oe}=A.current;if(Y.constraints.collapsible){const ne=oe.map(Ue=>Ue.constraints),{collapsedSize:me=0,panelSize:Me,pivotIndices:Fe}=Ws(oe,Y,Z);if(Ct(Me!=null,`Panel size not found for panel \"${Y.id}\"`),!Ji(Me,me)){j.current.set(Y.id,Me);const tt=uc(oe,Y)===oe.length-1?Me-me:me-Me,Le=Gu({delta:tt,initialLayout:Z,panelConstraints:ne,pivotIndices:Fe,prevLayout:Z,trigger:\"imperative-api\"});fh(Z,Le)||(k(Le),A.current.layout=Le,re&&re(Le),ic(oe,Le,M.current))}}},[]),B=m.useCallback((Y,re)=>{const{onLayout:Z}=P.current,{layout:oe,panelDataArray:ne}=A.current;if(Y.constraints.collapsible){const me=ne.map(Ve=>Ve.constraints),{collapsedSize:Me=0,panelSize:Fe=0,minSize:Ue=0,pivotIndices:tt}=Ws(ne,Y,oe),Le=re??Ue;if(Ji(Fe,Me)){const Ve=j.current.get(Y.id),Je=Ve!=null&&Ve>=Le?Ve:Le,xe=uc(ne,Y)===ne.length-1?Fe-Je:Je-Fe,G=Gu({delta:xe,initialLayout:oe,panelConstraints:me,pivotIndices:tt,prevLayout:oe,trigger:\"imperative-api\"});fh(oe,G)||(k(G),A.current.layout=G,Z&&Z(G),ic(ne,G,M.current))}}},[]),V=m.useCallback(Y=>{const{layout:re,panelDataArray:Z}=A.current,{panelSize:oe}=Ws(Z,Y,re);return Ct(oe!=null,`Panel size not found for panel \"${Y.id}\"`),oe},[]),N=m.useCallback((Y,re)=>{const{panelDataArray:Z}=A.current,oe=uc(Z,Y);return NU({defaultSize:re,dragState:w,layout:R,panelData:Z,panelIndex:oe})},[w,R]),_=m.useCallback(Y=>{const{layout:re,panelDataArray:Z}=A.current,{collapsedSize:oe=0,collapsible:ne,panelSize:me}=Ws(Z,Y,re);return Ct(me!=null,`Panel size not found for panel \"${Y.id}\"`),ne===!0&&Ji(me,oe)},[]),z=m.useCallback(Y=>{const{layout:re,panelDataArray:Z}=A.current,{collapsedSize:oe=0,collapsible:ne,panelSize:me}=Ws(Z,Y,re);return Ct(me!=null,`Panel size not found for panel \"${Y.id}\"`),!ne||sl(me,oe)>0},[]),F=m.useCallback(Y=>{const{panelDataArray:re}=A.current;re.push(Y),re.sort((Z,oe)=>{const ne=Z.order,me=oe.order;return ne==null&&me==null?0:ne==null?-1:me==null?1:ne-me}),A.current.panelDataArrayChanged=!0,T()},[T]);tl(()=>{if(A.current.panelDataArrayChanged){A.current.panelDataArrayChanged=!1;const{autoSaveId:Y,onLayout:re,storage:Z}=P.current,{layout:oe,panelDataArray:ne}=A.current;let me=null;if(Y){const Fe=DU(Y,ne,Z);Fe&&(j.current=new Map(Object.entries(Fe.expandToSizes)),me=Fe.layout)}me==null&&(me=AU({panelDataArray:ne}));const Me=PT({layout:me,panelConstraints:ne.map(Fe=>Fe.constraints)});jT(oe,Me)||(k(Me),A.current.layout=Me,re&&re(Me),ic(ne,Me,M.current))}}),tl(()=>{const Y=A.current;return()=>{Y.layout=[]}},[]);const O=m.useCallback(Y=>{let re=!1;const Z=S.current;return Z&&window.getComputedStyle(Z,null).getPropertyValue(\"direction\")===\"rtl\"&&(re=!0),function(ne){ne.preventDefault();const me=S.current;if(!me)return()=>null;const{direction:Me,dragState:Fe,id:Ue,keyboardResizeBy:tt,onLayout:Le}=P.current,{layout:Ve,panelDataArray:Je}=A.current,{initialLayout:jt}=Fe??{},xe=QN(Ue,Y,me);let G=_U(ne,Y,Me,Fe,tt,me);const se=Me===\"horizontal\";se&&re&&(G=-G);const ge=Je.map(ze=>ze.constraints),Ne=Gu({delta:G,initialLayout:jt??Ve,panelConstraints:ge,pivotIndices:xe,prevLayout:Ve,trigger:qN(ne)?\"keyboard\":\"mouse-or-touch\"}),Re=!fh(Ve,Ne);(FN(ne)||$N(ne))&&I.current!=G&&(I.current=G,!Re&&G!==0?se?W0(Y,G<0?UN:VN):W0(Y,G<0?WN:GN):W0(Y,0)),Re&&(k(Ne),A.current.layout=Ne,Le&&Le(Ne),ic(Je,Ne,M.current))}},[]),$=m.useCallback((Y,re)=>{const{onLayout:Z}=P.current,{layout:oe,panelDataArray:ne}=A.current,me=ne.map(Ve=>Ve.constraints),{panelSize:Me,pivotIndices:Fe}=Ws(ne,Y,oe);Ct(Me!=null,`Panel size not found for panel \"${Y.id}\"`);const tt=uc(ne,Y)===ne.length-1?Me-re:re-Me,Le=Gu({delta:tt,initialLayout:oe,panelConstraints:me,pivotIndices:Fe,prevLayout:oe,trigger:\"imperative-api\"});fh(oe,Le)||(k(Le),A.current.layout=Le,Z&&Z(Le),ic(ne,Le,M.current))},[]),W=m.useCallback((Y,re)=>{const{layout:Z,panelDataArray:oe}=A.current,{collapsedSize:ne=0,collapsible:me}=re,{collapsedSize:Me=0,collapsible:Fe,maxSize:Ue=100,minSize:tt=0}=Y.constraints,{panelSize:Le}=Ws(oe,Y,Z);Le!=null&&(me&&Fe&&Ji(Le,ne)?Ji(ne,Me)||$(Y,Me):Le<tt?$(Y,tt):Le>Ue&&$(Y,Ue))},[$]),U=m.useCallback((Y,re)=>{const{direction:Z}=P.current,{layout:oe}=A.current;if(!S.current)return;const ne=Em(Y,S.current);Ct(ne,`Drag handle element not found for id \"${Y}\"`);const me=ZN(Z,re);C({dragHandleId:Y,dragHandleRect:ne.getBoundingClientRect(),initialCursorPosition:me,initialLayout:oe})},[]),K=m.useCallback(()=>{C(null)},[]),ie=m.useCallback(Y=>{const{panelDataArray:re}=A.current,Z=uc(re,Y);Z>=0&&(re.splice(Z,1),delete M.current[Y.id],A.current.panelDataArrayChanged=!0,T())},[T]),L=m.useMemo(()=>({collapsePanel:q,direction:a,dragState:w,expandPanel:B,getPanelSize:V,getPanelStyle:N,groupId:x,isPanelCollapsed:_,isPanelExpanded:z,reevaluatePanelConstraints:W,registerPanel:F,registerResizeHandle:O,resizePanel:$,startDragging:U,stopDragging:K,unregisterPanel:ie,panelGroupElement:S.current}),[q,w,a,B,V,N,x,_,z,W,F,O,$,U,K,ie]),X={display:\"flex\",flexDirection:a===\"horizontal\"?\"row\":\"column\",height:\"100%\",overflow:\"hidden\",width:\"100%\"};return m.createElement(wm.Provider,{value:L},m.createElement(v,{...y,children:t,className:n,id:s,ref:S,style:{...X,...h},[Nn.group]:\"\",[Nn.groupDirection]:a,[Nn.groupId]:x}))}const r3=m.forwardRef((e,t)=>m.createElement(n3,{...e,forwardedRef:t}));n3.displayName=\"PanelGroup\";r3.displayName=\"forwardRef(PanelGroup)\";function uc(e,t){return e.findIndex(n=>n===t||n.id===t.id)}function Ws(e,t,n){const a=uc(e,t),s=a===e.length-1?[a-1,a]:[a,a+1],c=n[a];return{...t.constraints,panelSize:c,pivotIndices:s}}function PU({disabled:e,handleId:t,resizeHandler:n,panelGroupElement:a}){m.useEffect(()=>{if(e||n==null||a==null)return;const o=Em(t,a);if(o==null)return;const s=c=>{if(!c.defaultPrevented)switch(c.key){case\"ArrowDown\":case\"ArrowLeft\":case\"ArrowRight\":case\"ArrowUp\":case\"End\":case\"Home\":{c.preventDefault(),n(c);break}case\"F6\":{c.preventDefault();const u=o.getAttribute(Nn.groupId);Ct(u,`No group element found for id \"${u}\"`);const f=gd(u,a),h=XN(u,t,a);Ct(h!==null,`No resize element found for id \"${t}\"`);const v=c.shiftKey?h>0?h-1:f.length-1:h+1<f.length?h+1:0;f[v].focus();break}}};return o.addEventListener(\"keydown\",s),()=>{o.removeEventListener(\"keydown\",s)}},[a,e,t,n])}function a3({children:e=null,className:t=\"\",disabled:n=!1,hitAreaMargins:a,id:o,onBlur:s,onClick:c,onDragging:u,onFocus:f,onPointerDown:h,onPointerUp:v,style:y={},tabIndex:x=0,tagName:S=\"div\",...w}){var C,R;const k=m.useRef(null),T=m.useRef({onClick:c,onDragging:u,onPointerDown:h,onPointerUp:v});m.useEffect(()=>{T.current.onClick=c,T.current.onDragging=u,T.current.onPointerDown=h,T.current.onPointerUp=v});const M=m.useContext(wm);if(M===null)throw Error(\"PanelResizeHandle components must be rendered within a PanelGroup container\");const{direction:j,groupId:I,registerResizeHandle:P,startDragging:A,stopDragging:q,panelGroupElement:B}=M,V=z1(o),[N,_]=m.useState(\"inactive\"),[z,F]=m.useState(!1),[O,$]=m.useState(null),W=m.useRef({state:N});tl(()=>{W.current.state=N}),m.useEffect(()=>{if(n)$(null);else{const L=P(V);$(()=>L)}},[n,V,P]);const U=(C=a?.coarse)!==null&&C!==void 0?C:15,K=(R=a?.fine)!==null&&R!==void 0?R:5;m.useEffect(()=>{if(n||O==null)return;const L=k.current;Ct(L,\"Element ref not attached\");let X=!1;return xU(V,L,j,{coarse:U,fine:K},(re,Z,oe)=>{if(!Z){_(\"inactive\");return}switch(re){case\"down\":{_(\"drag\"),X=!1,Ct(oe,'Expected event to be defined for \"down\" action'),A(V,oe);const{onDragging:ne,onPointerDown:me}=T.current;ne?.(!0),me?.();break}case\"move\":{const{state:ne}=W.current;X=!0,ne!==\"drag\"&&_(\"hover\"),Ct(oe,'Expected event to be defined for \"move\" action'),O(oe);break}case\"up\":{_(\"hover\"),q();const{onClick:ne,onDragging:me,onPointerUp:Me}=T.current;me?.(!1),Me?.(),X||ne?.();break}}})},[U,j,n,K,P,V,O,A,q]),PU({disabled:n,handleId:V,resizeHandler:O,panelGroupElement:B});const ie={touchAction:\"none\",userSelect:\"none\"};return m.createElement(S,{...w,children:e,className:t,id:o,onBlur:()=>{F(!1),s?.()},onFocus:()=>{F(!0),f?.()},ref:k,role:\"separator\",style:{...ie,...y},tabIndex:x,[Nn.groupDirection]:j,[Nn.groupId]:I,[Nn.resizeHandle]:\"\",[Nn.resizeHandleActive]:N===\"drag\"?\"pointer\":z?\"keyboard\":void 0,[Nn.resizeHandleEnabled]:!n,[Nn.resizeHandleId]:V,[Nn.resizeHandleState]:N})}a3.displayName=\"PanelResizeHandle\";const rd=({className:e,...t})=>g.jsx(r3,{className:je(\"flex h-full w-full data-[panel-group-direction=vertical]:flex-col\",e),...t}),ai=HN,ad=({withHandle:e,className:t,...n})=>g.jsx(a3,{className:je(\"relative flex w-px items-center justify-center bg-[var(--border-color)] after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-[var(--accent-color)] focus-visible:ring-offset-1 data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90\",t),...n,children:e&&g.jsx(\"div\",{className:\"z-10 flex h-4 w-3 items-center justify-center rounded-sm border border-[var(--border-color)] bg-[var(--border-color)]\",children:g.jsx(\"svg\",{className:\"h-2.5 w-2.5\",width:\"15\",height:\"15\",viewBox:\"0 0 15 15\",fill:\"none\",xmlns:\"http://www.w3.org/2000/svg\",children:g.jsx(\"path\",{d:\"M5.5 4.625C6.12132 4.625 6.625 4.12132 6.625 3.5C6.625 2.87868 6.12132 2.375 5.5 2.375C4.87868 2.375 4.375 2.87868 4.375 3.5C4.375 4.12132 4.87868 4.625 5.5 4.625ZM9.5 4.625C10.1213 4.625 10.625 4.12132 10.625 3.5C10.625 2.87868 10.1213 2.375 9.5 2.375C8.87868 2.375 8.375 2.87868 8.375 3.5C8.375 4.12132 8.87868 4.625 9.5 4.625ZM10.625 7.5C10.625 8.12132 10.1213 8.625 9.5 8.625C8.87868 8.625 8.375 8.12132 8.375 7.5C8.375 6.87868 8.87868 6.375 9.5 6.375C10.1213 6.375 10.625 6.87868 10.625 7.5ZM5.5 8.625C6.12132 8.625 6.625 8.12132 6.625 7.5C6.625 6.87868 6.12132 6.375 5.5 6.375C4.87868 6.375 4.375 6.87868 4.375 7.5C4.375 8.12132 4.87868 8.625 5.5 8.625ZM10.625 11.5C10.625 12.1213 10.1213 12.625 9.5 12.625C8.87868 12.625 8.375 12.1213 8.375 11.5C8.375 10.8787 8.87868 10.375 9.5 10.375C10.1213 10.375 10.625 10.8787 10.625 11.5ZM5.5 12.625C6.12132 12.625 6.625 12.1213 6.625 11.5C6.625 10.8787 6.12132 10.375 5.5 10.375C4.87868 10.375 4.375 10.8787 4.375 11.5C4.375 12.1213 4.87868 12.625 5.5 12.625Z\",fill:\"currentColor\",fillRule:\"evenodd\",clipRule:\"evenodd\"})})})}),i3=m.createContext({registerSearchRef:()=>{},focusSearch:()=>{}});function LU({children:e,activeTab:t}){const n=m.useRef(null),a=m.useCallback(s=>{n.current=s},[]),o=m.useCallback(()=>{n.current?.focus()},[]);return m.useEffect(()=>{const s=c=>{if((c.metaKey||c.ctrlKey)&&c.key===\"f\"&&!c.shiftKey&&!c.altKey){if(!n.current)return;const u=document.activeElement;if(u&&(u.tagName===\"TEXTAREA\"||u.tagName===\"INPUT\"&&u!==n.current))return;c.preventDefault(),n.current.focus(),n.current.select()}};return window.addEventListener(\"keydown\",s),()=>window.removeEventListener(\"keydown\",s)},[]),m.useEffect(()=>{const s=setTimeout(()=>{n.current?.focus()},50);return()=>clearTimeout(s)},[t]),g.jsx(i3.Provider,{value:{registerSearchRef:a,focusSearch:o},children:e})}function Id(){const{registerSearchRef:e}=m.useContext(i3);return m.useCallback(n=>{e(n)},[e])}function IT(){const[e,t]=m.useState(\"\"),[n,a]=m.useState(\"\"),{selectedComponent:o}=Ab(),s=Id(),c=us(v6,o?{componentPath:o}:{}),u=c??[],f=c===void 0;m.useEffect(()=>{t(\"\")},[o]),m.useEffect(()=>{u.length>0&&!e&&t(u[0].name)},[u,e]);const h=u.filter(v=>v.name.toLowerCase().includes(n.toLowerCase()));return g.jsxs(rd,{direction:\"horizontal\",className:\"h-full\",children:[g.jsx(ai,{defaultSize:25,minSize:15,maxSize:50,children:g.jsxs(\"div\",{className:\"h-full border-r border-[var(--border-color)] bg-[var(--bg-primary)] flex flex-col\",children:[g.jsx(\"div\",{className:\"p-4 border-b border-[var(--border-color)]\",children:g.jsxs(\"div\",{className:\"relative\",children:[g.jsx(wd,{className:\"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-[var(--text-tertiary)] z-10\"}),g.jsx(ls,{ref:s,type:\"text\",placeholder:\"Search tables...\",value:n,onChange:v=>a(v.target.value),className:\"pl-9\"})]})}),g.jsx(\"div\",{className:\"flex-1 overflow-auto\",children:f?g.jsx(\"div\",{className:\"flex items-center justify-center py-8\",children:g.jsx(hi,{className:\"h-5 w-5 animate-spin text-[var(--text-tertiary)]\"})}):h.length===0?g.jsxs(\"div\",{className:\"flex flex-col items-center justify-center py-16 gap-2\",children:[g.jsx(\"div\",{className:\"h-10 w-10 rounded-full bg-[var(--bg-tertiary)] flex items-center justify-center\",children:g.jsx(nb,{className:\"h-5 w-5 text-[var(--text-tertiary)]\"})}),g.jsx(\"p\",{className:\"text-sm text-[var(--text-secondary)]\",children:n?\"No tables found\":\"No tables available\"}),g.jsx(\"p\",{className:\"text-xs text-[var(--text-tertiary)]\",children:\"Tables will appear here when created\"})]}):g.jsx(\"div\",{className:\"py-2\",children:h.map(v=>{const y=e===v.name;return g.jsxs(\"button\",{onClick:()=>t(v.name),className:je(\"w-full flex items-center gap-2 px-4 py-2 text-left hover:bg-[var(--bg-hover)] transition-colors\",y&&\"bg-[var(--bg-selected)] hover:bg-[var(--bg-selected)]\"),children:[g.jsx(nb,{className:je(\"h-4 w-4\",y?\"text-[var(--accent-color)]\":\"text-[var(--text-tertiary)]\")}),g.jsxs(\"div\",{className:\"flex-1 min-w-0\",children:[g.jsx(\"span\",{className:je(\"text-sm block truncate\",y?\"text-[var(--accent-color)] font-medium\":\"text-[var(--text-primary)]\"),children:v.name}),g.jsxs(\"span\",{className:\"text-xs text-[var(--text-tertiary)]\",children:[v.documentCount,\" \",v.documentCount===1?\"record\":\"records\"]})]})]},v.name)})})})]})}),g.jsx(ad,{withHandle:!0}),g.jsx(ai,{defaultSize:75,className:\"h-full\",children:e?g.jsx(\"div\",{className:\"h-full flex flex-col bg-[var(--bg-secondary)]\",children:g.jsx(lU,{selectedTable:e,componentPath:o||void 0})}):g.jsx(\"div\",{className:\"h-full flex items-center justify-center bg-[var(--bg-secondary)]\",children:g.jsxs(\"div\",{className:\"text-center\",children:[g.jsx(\"div\",{className:\"h-12 w-12 rounded-full bg-[var(--bg-tertiary)] flex items-center justify-center mx-auto mb-4\",children:g.jsx(CM,{className:\"h-6 w-6 text-[var(--text-tertiary)]\"})}),g.jsx(\"h3\",{className:\"text-lg font-medium text-[var(--text-primary)] mb-2\",children:\"No table selected\"}),g.jsx(\"p\",{className:\"text-sm text-[var(--text-secondary)]\",children:\"Select a table from the sidebar to explore its data\"})]})})})]})}const Gs=m.forwardRef(({className:e,...t},n)=>g.jsx(\"div\",{ref:n,className:je(\"rounded-xl border border-stone-200 dark:border-[#3e3e42] bg-white dark:bg-[#252526] text-stone-950 dark:text-[#cccccc] shadow-sm\",e),...t}));Gs.displayName=\"Card\";const IU=m.forwardRef(({className:e,...t},n)=>g.jsx(\"div\",{ref:n,className:je(\"flex flex-col space-y-1.5 p-6\",e),...t}));IU.displayName=\"CardHeader\";const HU=m.forwardRef(({className:e,...t},n)=>g.jsx(\"h3\",{ref:n,className:je(\"font-semibold leading-none tracking-tight\",e),...t}));HU.displayName=\"CardTitle\";const qU=m.forwardRef(({className:e,...t},n)=>g.jsx(\"p\",{ref:n,className:je(\"text-sm text-stone-500 dark:text-[#969696]\",e),...t}));qU.displayName=\"CardDescription\";const FU=m.forwardRef(({className:e,...t},n)=>g.jsx(\"div\",{ref:n,className:je(\"p-6 pt-0\",e),...t}));FU.displayName=\"CardContent\";const $U=m.forwardRef(({className:e,...t},n)=>g.jsx(\"div\",{ref:n,className:je(\"flex items-center p-6 pt-0\",e),...t}));$U.displayName=\"CardFooter\";function BU(e){const t=m.useRef({value:e,previous:e});return m.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function UU(e){const t=VU(e),n=m.forwardRef((a,o)=>{const{children:s,...c}=a,u=m.Children.toArray(s),f=u.find(GU);if(f){const h=f.props.children,v=u.map(y=>y===f?m.Children.count(h)>1?m.Children.only(null):m.isValidElement(h)?h.props.children:null:y);return g.jsx(t,{...c,ref:o,children:m.isValidElement(h)?m.cloneElement(h,void 0,v):null})}return g.jsx(t,{...c,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function VU(e){const t=m.forwardRef((n,a)=>{const{children:o,...s}=n;if(m.isValidElement(o)){const c=XU(o),u=YU(s,o.props);return o.type!==m.Fragment&&(u.ref=a?Zn(a,c):c),m.cloneElement(o,u)}return m.Children.count(o)>1?m.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var WU=Symbol(\"radix.slottable\");function GU(e){return m.isValidElement(e)&&typeof e.type==\"function\"&&\"__radixId\"in e.type&&e.type.__radixId===WU}function YU(e,t){const n={...t};for(const a in t){const o=e[a],s=t[a];/^on[A-Z]/.test(a)?o&&s?n[a]=(...u)=>{const f=s(...u);return o(...u),f}:o&&(n[a]=o):a===\"style\"?n[a]={...o,...s}:a===\"className\"&&(n[a]=[o,s].filter(Boolean).join(\" \"))}return{...e,...n}}function XU(e){let t=Object.getOwnPropertyDescriptor(e.props,\"ref\")?.get,n=t&&\"isReactWarning\"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,\"ref\")?.get,n=t&&\"isReactWarning\"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var QU=[\"a\",\"button\",\"div\",\"form\",\"h2\",\"h3\",\"img\",\"input\",\"label\",\"li\",\"nav\",\"ol\",\"p\",\"select\",\"span\",\"svg\",\"ul\"],o3=QU.reduce((e,t)=>{const n=UU(`Primitive.${t}`),a=m.forwardRef((o,s)=>{const{asChild:c,...u}=o,f=c?n:t;return typeof window<\"u\"&&(window[Symbol.for(\"radix-ui\")]=!0),g.jsx(f,{...u,ref:s})});return a.displayName=`Primitive.${t}`,{...e,[t]:a}},{}),Tm=\"Switch\",[KU,qG]=mi(Tm),[ZU,JU]=KU(Tm),s3=m.forwardRef((e,t)=>{const{__scopeSwitch:n,name:a,checked:o,defaultChecked:s,required:c,disabled:u,value:f=\"on\",onCheckedChange:h,form:v,...y}=e,[x,S]=m.useState(null),w=pn(t,M=>S(M)),C=m.useRef(!1),R=x?v||!!x.closest(\"form\"):!0,[k,T]=zc({prop:o,defaultProp:s??!1,onChange:h,caller:Tm});return g.jsxs(ZU,{scope:n,checked:k,disabled:u,children:[g.jsx(o3.button,{type:\"button\",role:\"switch\",\"aria-checked\":k,\"aria-required\":c,\"data-state\":d3(k),\"data-disabled\":u?\"\":void 0,disabled:u,value:f,...y,ref:w,onClick:at(e.onClick,M=>{T(j=>!j),R&&(C.current=M.isPropagationStopped(),C.current||M.stopPropagation())})}),R&&g.jsx(u3,{control:x,bubbles:!C.current,name:a,value:f,checked:k,required:c,disabled:u,form:v,style:{transform:\"translateX(-100%)\"}})]})});s3.displayName=Tm;var l3=\"SwitchThumb\",c3=m.forwardRef((e,t)=>{const{__scopeSwitch:n,...a}=e,o=JU(l3,n);return g.jsx(o3.span,{\"data-state\":d3(o.checked),\"data-disabled\":o.disabled?\"\":void 0,...a,ref:t})});c3.displayName=l3;var eV=\"SwitchBubbleInput\",u3=m.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:a=!0,...o},s)=>{const c=m.useRef(null),u=pn(c,s),f=BU(n),h=ek(t);return m.useEffect(()=>{const v=c.current;if(!v)return;const y=window.HTMLInputElement.prototype,S=Object.getOwnPropertyDescriptor(y,\"checked\").set;if(f!==n&&S){const w=new Event(\"click\",{bubbles:a});S.call(v,n),v.dispatchEvent(w)}},[f,n,a]),g.jsx(\"input\",{type:\"checkbox\",\"aria-hidden\":!0,defaultChecked:n,...o,tabIndex:-1,ref:u,style:{...o.style,...h,position:\"absolute\",pointerEvents:\"none\",opacity:0,margin:0}})});u3.displayName=eV;function d3(e){return e?\"checked\":\"unchecked\"}var f3=s3,tV=c3;const h3=m.forwardRef(({className:e,...t},n)=>g.jsx(f3,{className:je(\"peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-stone-950 focus-visible:ring-offset-2 focus-visible:ring-offset-white disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-orange-600 dark:data-[state=checked]:bg-[#569cd6] data-[state=unchecked]:bg-stone-200 dark:data-[state=unchecked]:bg-[#3e3e42] dark:focus-visible:ring-stone-300 dark:focus-visible:ring-offset-[#1e1e1e]\",e),...t,ref:n,children:g.jsx(tV,{className:je(\"pointer-events-none block h-5 w-5 rounded-full bg-white shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0\")})}));h3.displayName=f3.displayName;function nV(){const[e,t]=m.useState(\"\"),[n,a]=m.useState(null),[o,s]=m.useState(\"statistics\"),[c,u]=m.useState(new Set),[f,h]=m.useState(\"{}\"),[v,y]=m.useState(!1),[x,S]=m.useState(null),[w,C]=m.useState(null),[R,k]=m.useState(!1),[T,M]=m.useState(!1),{selectedComponent:j}=Ab(),I=Id(),[P,A]=m.useState(\"{}\"),[q,B]=m.useState(\"\"),[V,N]=m.useState(null),[_,z]=m.useState(null),F=us(k6,j?{componentPath:j}:{}),O=F??[],$=F===void 0,W=es(_6),U=O.reduce((Z,oe)=>{const ne=oe.componentPath?`${oe.componentPath}/${oe.module}`:oe.module;return Z[ne]||(Z[ne]=[]),Z[ne].push(oe),Z},{}),K=Object.keys(U).reduce((Z,oe)=>{const ne=U[oe].filter(me=>me.name.toLowerCase().includes(e.toLowerCase())||me.path.toLowerCase().includes(e.toLowerCase()));return ne.length>0&&(Z[oe]=ne),Z},{}),ie=Z=>{const oe=new Set(c);oe.has(Z)?oe.delete(Z):oe.add(Z),u(oe)},L=async()=>{if(n){k(!0),C(null),S(null),N(null),z(null);try{if(n.type===\"http\"){const Z=n.httpMethod||\"GET\",oe=n.httpPath||\"/\",me=`${typeof window<\"u\"&&window.location.pathname.startsWith(\"/_dashboard\")?`${window.location.protocol}//${window.location.host}`:\"http://localhost:8799\"}${oe}`;let Me={};try{const Je=JSON.parse(P);typeof Je==\"object\"&&Je!==null&&(Me=Je)}catch{}const Fe=Z!==\"GET\"&&Z!==\"HEAD\"&&q.trim();if(Fe&&!Me[\"Content-Type\"]&&!Me[\"content-type\"])try{JSON.parse(q),Me[\"Content-Type\"]=\"application/json\"}catch{Me[\"Content-Type\"]=\"text/plain\"}const Ue=await fetch(me,{method:Z,headers:Me,body:Fe?q:void 0});N(Ue.status);const tt={};Ue.headers.forEach((Je,jt)=>{tt[jt]=Je}),z(tt);const Le=Ue.headers.get(\"content-type\")||\"\";let Ve;Le.includes(\"application/json\")?Ve=await Ue.json():Ve=await Ue.text(),S(Ve)}else{const Z=JSON.parse(f),oe=await W({functionPath:n.path,args:Z,functionType:n.type,componentPath:n.componentPath});S(oe)}}catch(Z){C(Z.message||\"Execution failed\")}finally{k(!1)}}},X=Z=>{navigator.clipboard.writeText(Z),M(!0),setTimeout(()=>M(!1),2e3)},Y=Z=>{switch(Z){case\"query\":return\"bg-blue-100 dark:bg-blue-500/20 text-blue-700 dark:text-blue-400\";case\"mutation\":return\"bg-orange-100 dark:bg-orange-500/20 text-orange-700 dark:text-orange-400\";case\"action\":return\"bg-purple-100 dark:bg-purple-500/20 text-purple-700 dark:text-purple-400\";default:return\"bg-[var(--bg-tertiary)] text-[var(--text-secondary)]\"}},re=Z=>{switch(Z){case\"query\":return{letter:\"Q\",color:\"text-blue-600 dark:text-blue-400\",bg:\"bg-blue-100 dark:bg-blue-500/20\"};case\"mutation\":return{letter:\"M\",color:\"text-orange-600 dark:text-orange-400\",bg:\"bg-orange-100 dark:bg-orange-500/20\"};case\"action\":return{letter:\"A\",color:\"text-purple-600 dark:text-purple-400\",bg:\"bg-purple-100 dark:bg-purple-500/20\"};case\"http\":return{letter:\"H\",color:\"text-green-600 dark:text-green-400\",bg:\"bg-green-100 dark:bg-green-500/20\"};default:return{letter:\"?\",color:\"text-[var(--text-secondary)]\",bg:\"bg-[var(--bg-tertiary)]\"}}};return g.jsxs(rd,{direction:\"horizontal\",className:\"h-full\",children:[g.jsx(ai,{defaultSize:25,minSize:15,maxSize:50,children:g.jsxs(\"div\",{className:\"h-full border-r border-[var(--border-color)] bg-[var(--bg-primary)] flex flex-col\",children:[g.jsx(\"div\",{className:\"p-4 border-b border-[var(--border-color)]\",children:g.jsxs(\"div\",{className:\"relative\",children:[g.jsx(wd,{className:\"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-[var(--text-tertiary)] z-10\"}),g.jsx(ls,{ref:I,type:\"text\",placeholder:\"Search functions...\",value:e,onChange:Z=>t(Z.target.value),className:\"pl-9\"})]})}),g.jsx(\"div\",{className:\"flex-1 overflow-auto\",children:$?g.jsx(\"div\",{className:\"flex items-center justify-center py-8\",children:g.jsx(hi,{className:\"h-5 w-5 animate-spin text-[var(--text-tertiary)]\"})}):Object.keys(K).length===0?g.jsxs(\"div\",{className:\"flex flex-col items-center justify-center py-16 gap-2\",children:[g.jsx(\"div\",{className:\"h-10 w-10 rounded-full bg-[var(--bg-tertiary)] flex items-center justify-center\",children:g.jsx(tb,{className:\"h-5 w-5 text-[var(--text-tertiary)]\"})}),g.jsx(\"p\",{className:\"text-sm text-[var(--text-secondary)]\",children:e?\"No functions found\":\"No functions available\"}),g.jsx(\"p\",{className:\"text-xs text-[var(--text-tertiary)]\",children:\"Functions will appear here when defined\"})]}):g.jsx(\"div\",{className:\"py-2\",children:Object.keys(K).sort().map(Z=>{const oe=c.has(Z),ne=K[Z],me=Z.includes(\"/\")?Z:ne[0]?.module??Z;return g.jsxs(\"div\",{children:[g.jsxs(\"button\",{onClick:()=>ie(Z),className:\"w-full flex items-center gap-2 px-4 py-2 hover:bg-[var(--bg-hover)] text-left\",children:[oe?g.jsx(ns,{className:\"h-4 w-4 text-[var(--text-tertiary)]\"}):g.jsx(Ac,{className:\"h-4 w-4 text-[var(--text-tertiary)]\"}),g.jsx(\"span\",{className:\"text-sm font-medium text-[var(--text-primary)]\",children:me}),g.jsx(\"span\",{className:\"text-xs text-[var(--text-tertiary)] ml-auto\",children:ne.length})]}),oe&&g.jsx(\"div\",{className:\"ml-2\",children:ne.map(Me=>{const{letter:Fe,color:Ue,bg:tt}=re(Me.type),Le=n?.path===Me.path,Ve=Me.isInternal||Me.visibility===\"internal\",Je=Me.type===\"http\"&&Me.httpMethod&&Me.httpPath?`${Me.httpMethod} ${Me.httpPath}`:Me.name;return g.jsxs(\"button\",{onClick:()=>a(Me),className:je(\"w-full flex items-center gap-2 px-4 py-2 text-left hover:bg-[var(--bg-hover)] transition-colors\",Le&&\"bg-[var(--bg-selected)] hover:bg-[var(--bg-selected)]\"),children:[g.jsx(\"span\",{className:je(\"text-xs font-semibold w-5 h-5 rounded-full flex items-center justify-center flex-shrink-0\",Ue,tt),children:Fe}),g.jsx(\"span\",{className:je(\"text-sm flex-1\",Le?\"text-[var(--accent-color)] font-medium\":\"text-[var(--text-primary)]\"),children:Je}),Ve&&g.jsx(S4,{className:\"h-3 w-3 text-[var(--text-tertiary)] flex-shrink-0\"})]},Me.path)})})]},Z)})})})]})}),g.jsx(ad,{withHandle:!0}),g.jsx(ai,{defaultSize:75,className:\"h-full\",children:g.jsx(\"div\",{className:\"h-full flex flex-col bg-[var(--bg-secondary)]\",children:n?g.jsxs(rd,{direction:\"vertical\",className:\"h-full\",children:[g.jsx(ai,{defaultSize:60,minSize:30,children:g.jsxs(\"div\",{className:\"h-full flex flex-col\",children:[g.jsx(\"div\",{className:\"border-b border-[var(--border-color)] bg-[var(--bg-primary)] px-6 py-4\",children:g.jsxs(\"div\",{className:\"flex items-center justify-between\",children:[g.jsxs(\"div\",{className:\"flex items-center gap-3\",children:[g.jsx(\"h2\",{className:\"text-lg font-semibold text-[var(--text-primary)]\",children:n.name}),g.jsx(\"span\",{className:je(\"text-xs px-2 py-1 rounded font-medium\",Y(n.type)),children:n.type}),n.componentPath&&g.jsx(\"span\",{className:\"text-xs px-2 py-1 rounded bg-[var(--bg-tertiary)] text-[var(--text-secondary)]\",children:n.componentPath}),g.jsx(\"span\",{className:\"text-sm text-[var(--text-secondary)] font-mono\",children:n.path})]}),g.jsxs(Js,{onClick:L,disabled:R,children:[R?g.jsx(hi,{className:\"h-4 w-4 animate-spin mr-2\"}):n.type===\"http\"?g.jsx(_4,{className:\"h-4 w-4 mr-2\"}):g.jsx(MM,{className:\"h-4 w-4 mr-2\"}),n.type===\"http\"?\"Send Request\":\"Run Function\"]})]})}),g.jsx(\"div\",{className:\"border-b border-[var(--border-color)] bg-[var(--bg-primary)] px-6\",children:g.jsx(\"div\",{className:\"flex gap-1\",children:[\"statistics\",\"code\",\"logs\"].map(Z=>g.jsx(\"button\",{onClick:()=>s(Z),className:je(\"px-4 py-3 text-sm font-medium border-b-2 transition-colors capitalize\",o===Z?\"border-[var(--accent-color)] text-[var(--accent-color)]\":\"border-transparent text-[var(--text-secondary)] hover:text-[var(--text-primary)]\"),children:Z},Z))})}),g.jsxs(\"div\",{className:\"flex-1 overflow-auto\",children:[o===\"statistics\"&&g.jsxs(\"div\",{className:\"p-6\",children:[g.jsxs(\"div\",{className:\"grid grid-cols-2 gap-4 mb-6\",children:[g.jsxs(Gs,{className:\"p-4\",children:[g.jsx(\"h3\",{className:\"text-sm font-medium text-[var(--text-primary)] mb-3\",children:\"Function Calls\"}),g.jsx(\"div\",{className:\"h-32 flex items-center justify-center bg-[var(--bg-secondary)] rounded\",children:g.jsx(\"p\",{className:\"text-xs text-[var(--text-tertiary)]\",children:\"No data available\"})})]}),g.jsxs(Gs,{className:\"p-4\",children:[g.jsx(\"h3\",{className:\"text-sm font-medium text-[var(--text-primary)] mb-3\",children:\"Errors\"}),g.jsx(\"div\",{className:\"h-32 flex items-center justify-center bg-[var(--bg-secondary)] rounded\",children:g.jsx(\"p\",{className:\"text-xs text-[var(--text-tertiary)]\",children:\"No data available\"})})]})]}),g.jsxs(\"div\",{className:\"grid grid-cols-2 gap-4\",children:[g.jsxs(Gs,{className:\"p-4\",children:[g.jsx(\"h3\",{className:\"text-sm font-medium text-[var(--text-primary)] mb-2\",children:\"Execution Time\"}),g.jsx(\"p\",{className:\"text-2xl font-semibold text-[var(--text-primary)]\",children:\"-\"}),g.jsx(\"p\",{className:\"text-xs text-[var(--text-secondary)] mt-1\",children:\"Average duration\"})]}),g.jsxs(Gs,{className:\"p-4\",children:[g.jsx(\"h3\",{className:\"text-sm font-medium text-[var(--text-primary)] mb-2\",children:\"Cache Hit Rate\"}),g.jsx(\"p\",{className:\"text-2xl font-semibold text-[var(--text-primary)]\",children:\"-\"}),g.jsx(\"p\",{className:\"text-xs text-[var(--text-secondary)] mt-1\",children:\"Percentage cached\"})]})]})]}),o===\"code\"&&g.jsx(\"div\",{className:\"p-6\",children:g.jsx(Gs,{className:\"p-4\",children:g.jsx(\"p\",{className:\"text-sm text-[var(--text-secondary)]\",children:\"Function code viewing coming soon\"})})}),o===\"logs\"&&g.jsx(\"div\",{className:\"p-6\",children:g.jsx(Gs,{className:\"p-4\",children:g.jsx(\"p\",{className:\"text-sm text-[var(--text-secondary)]\",children:\"Function execution logs coming soon\"})})})]})]})}),g.jsx(ad,{withHandle:!0}),g.jsx(ai,{defaultSize:40,minSize:15,children:g.jsx(\"div\",{className:\"h-full bg-[var(--bg-primary)]\",children:g.jsxs(rd,{direction:\"horizontal\",className:\"h-full\",children:[g.jsx(ai,{defaultSize:50,minSize:25,children:g.jsxs(\"div\",{className:\"h-full flex flex-col\",children:[g.jsxs(\"div\",{className:\"px-4 py-2 border-b border-[var(--border-color)] flex items-center justify-between\",children:[g.jsx(\"span\",{className:\"text-sm font-medium text-[var(--text-primary)]\",children:n.type===\"http\"?\"HTTP Request\":\"Function Input\"}),n.type!==\"http\"&&g.jsxs(\"div\",{className:\"flex items-center gap-2\",children:[g.jsx(h3,{id:\"act-as-user\",checked:v,onCheckedChange:y}),g.jsx(ts,{htmlFor:\"act-as-user\",className:\"text-xs cursor-pointer\",children:\"Act as a user\"})]})]}),g.jsx(\"div\",{className:\"flex-1 p-4 overflow-auto bg-[var(--bg-primary)]\",children:n.type===\"http\"?g.jsxs(g.Fragment,{children:[g.jsxs(\"div\",{className:\"mb-3 flex items-center gap-2\",children:[g.jsx(\"span\",{className:je(\"text-xs font-bold px-2 py-1 rounded\",n.httpMethod===\"GET\"?\"bg-green-100 dark:bg-green-500/20 text-green-700 dark:text-green-400\":n.httpMethod===\"POST\"?\"bg-blue-100 dark:bg-blue-500/20 text-blue-700 dark:text-blue-400\":n.httpMethod===\"PUT\"?\"bg-orange-100 dark:bg-orange-500/20 text-orange-700 dark:text-orange-400\":n.httpMethod===\"DELETE\"?\"bg-red-100 dark:bg-red-500/20 text-red-700 dark:text-red-400\":\"bg-[var(--bg-tertiary)] text-[var(--text-primary)]\"),children:n.httpMethod||\"GET\"}),g.jsx(\"span\",{className:\"text-sm font-mono text-[var(--text-primary)]\",children:n.httpPath||\"/\"})]}),g.jsxs(\"div\",{className:\"space-y-3\",children:[g.jsxs(\"div\",{className:\"space-y-1\",children:[g.jsx(ts,{className:\"text-xs\",children:\"Headers (JSON)\"}),g.jsx(nd,{value:P,onChange:Z=>A(Z.target.value),className:\"w-full h-16 text-xs font-mono resize-none\",placeholder:'{\"Authorization\": \"Bearer ...\"}'})]}),n.httpMethod!==\"GET\"&&n.httpMethod!==\"HEAD\"&&g.jsxs(\"div\",{className:\"space-y-1\",children:[g.jsx(ts,{className:\"text-xs\",children:\"Body\"}),g.jsx(nd,{value:q,onChange:Z=>B(Z.target.value),className:\"w-full h-20 text-xs font-mono resize-none\",placeholder:'{\"key\": \"value\"}'})]})]})]}):g.jsxs(g.Fragment,{children:[g.jsx(\"div\",{className:\"mb-3\",children:g.jsx(\"div\",{className:\"text-xs text-[var(--text-secondary)] mb-1 font-mono\",children:n.path})}),g.jsxs(\"div\",{className:\"space-y-2\",children:[g.jsx(ts,{htmlFor:\"function-args\",className:\"text-xs\",children:\"Arguments\"}),g.jsx(nd,{id:\"function-args\",value:f,onChange:Z=>h(Z.target.value),className:\"w-full h-32 text-sm font-mono resize-none\",placeholder:\"{}\"})]})]})})]})}),g.jsx(ad,{withHandle:!0}),g.jsx(ai,{defaultSize:50,minSize:25,children:g.jsxs(\"div\",{className:\"h-full flex flex-col\",children:[g.jsxs(\"div\",{className:\"px-4 py-2 border-b border-[var(--border-color)] flex items-center justify-between\",children:[g.jsxs(\"div\",{className:\"flex items-center gap-2\",children:[g.jsx(\"span\",{className:\"text-sm font-medium text-[var(--text-primary)]\",children:n.type===\"http\"?\"Response\":\"Output\"}),V!==null&&g.jsx(\"span\",{className:je(\"text-xs font-mono px-1.5 py-0.5 rounded\",V>=200&&V<300?\"bg-green-100 dark:bg-green-500/20 text-green-700 dark:text-green-400\":V>=400?\"bg-red-100 dark:bg-red-500/20 text-red-700 dark:text-red-400\":\"bg-orange-100 dark:bg-orange-500/20 text-orange-700 dark:text-orange-400\"),children:V})]}),(x||w)&&g.jsx(\"button\",{onClick:()=>X(w||(typeof x==\"string\"?x:JSON.stringify(x,null,2))),className:\"text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] flex items-center gap-1\",children:T?g.jsxs(g.Fragment,{children:[g.jsx(xd,{className:\"h-3 w-3\"}),\"Copied\"]}):g.jsxs(g.Fragment,{children:[g.jsx(Rc,{className:\"h-3 w-3\"}),\"Copy\"]})})]}),g.jsx(\"div\",{className:\"flex-1 p-4 overflow-auto bg-[var(--bg-primary)]\",children:w?g.jsx(\"div\",{className:\"bg-[var(--error-bg)] border border-[var(--error-color)] rounded p-3\",children:g.jsxs(\"div\",{className:\"flex items-start gap-2 mb-2\",children:[g.jsx(Mb,{className:\"h-4 w-4 text-[var(--error-color)] mt-0.5 flex-shrink-0\"}),g.jsxs(\"div\",{children:[g.jsx(\"div\",{className:\"text-sm font-medium text-[var(--error-color)]\",children:\"failure\"}),g.jsx(\"div\",{className:\"text-xs text-[var(--error-color)] mt-1\",children:w})]})]})}):x!=null?g.jsxs(g.Fragment,{children:[_&&g.jsxs(\"details\",{className:\"mb-3\",children:[g.jsx(\"summary\",{className:\"text-xs text-[var(--text-secondary)] cursor-pointer hover:text-[var(--text-primary)]\",children:\"Response Headers\"}),g.jsx(\"pre\",{className:\"text-xs font-mono text-[var(--text-secondary)] mt-1 pl-2 border-l-2 border-[var(--border-color)]\",children:Object.entries(_).map(([Z,oe])=>`${Z}: ${oe}`).join(`\n`)})]}),g.jsx(\"pre\",{className:\"text-xs font-mono text-[var(--text-primary)] whitespace-pre-wrap\",children:typeof x==\"string\"?x:JSON.stringify(x,null,2)})]}):g.jsx(\"div\",{className:\"text-sm text-[var(--text-tertiary)] text-center py-8\",children:n.type===\"http\"?\"Send a request to see the response\":\"Run the function to see output\"})})]})})]})})})]}):g.jsx(\"div\",{className:\"flex items-center justify-center h-full\",children:g.jsxs(\"div\",{className:\"text-center\",children:[g.jsx(\"div\",{className:\"h-12 w-12 rounded-full bg-[var(--bg-tertiary)] flex items-center justify-center mx-auto mb-4\",children:g.jsx(tb,{className:\"h-6 w-6 text-[var(--text-tertiary)]\"})}),g.jsx(\"h3\",{className:\"text-lg font-medium text-[var(--text-primary)] mb-2\",children:\"No function selected\"}),g.jsx(\"p\",{className:\"text-sm text-[var(--text-secondary)]\",children:\"Select a function from the sidebar to view details\"})]})})})})]})}var rV=Symbol(\"radix.slottable\");function aV(e){const t=({children:n})=>g.jsx(g.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=rV,t}var m3=\"AlertDialog\",[iV,FG]=mi(m3,[pN]),io=pN(),p3=e=>{const{__scopeAlertDialog:t,...n}=e,a=io(t);return g.jsx(NN,{...a,...n,modal:!0})};p3.displayName=m3;var oV=\"AlertDialogTrigger\",sV=m.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...a}=e,o=io(n);return g.jsx(tU,{...o,...a,ref:t})});sV.displayName=oV;var lV=\"AlertDialogPortal\",g3=e=>{const{__scopeAlertDialog:t,...n}=e,a=io(t);return g.jsx(ON,{...a,...n})};g3.displayName=lV;var cV=\"AlertDialogOverlay\",v3=m.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...a}=e,o=io(n);return g.jsx(_1,{...o,...a,ref:t})});v3.displayName=cV;var xc=\"AlertDialogContent\",[uV,dV]=iV(xc),fV=aV(\"AlertDialogContent\"),y3=m.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:a,...o}=e,s=io(n),c=m.useRef(null),u=pn(t,c),f=m.useRef(null);return g.jsx(KB,{contentName:xc,titleName:b3,docsSlug:\"alert-dialog\",children:g.jsx(uV,{scope:n,cancelRef:f,children:g.jsxs(A1,{role:\"alertdialog\",...s,...o,ref:u,onOpenAutoFocus:at(o.onOpenAutoFocus,h=>{h.preventDefault(),f.current?.focus({preventScroll:!0})}),onPointerDownOutside:h=>h.preventDefault(),onInteractOutside:h=>h.preventDefault(),children:[g.jsx(fV,{children:a}),g.jsx(mV,{contentRef:c})]})})})});y3.displayName=xc;var b3=\"AlertDialogTitle\",x3=m.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...a}=e,o=io(n);return g.jsx(N1,{...o,...a,ref:t})});x3.displayName=b3;var w3=\"AlertDialogDescription\",S3=m.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...a}=e,o=io(n);return g.jsx(O1,{...o,...a,ref:t})});S3.displayName=w3;var hV=\"AlertDialogAction\",C3=m.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...a}=e,o=io(n);return g.jsx(xm,{...o,...a,ref:t})});C3.displayName=hV;var R3=\"AlertDialogCancel\",E3=m.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...a}=e,{cancelRef:o}=dV(R3,n),s=io(n),c=pn(t,o);return g.jsx(xm,{...s,...a,ref:c})});E3.displayName=R3;var mV=({contentRef:e})=>{const t=`\\`${xc}\\` requires a description for the component to be accessible for screen reader users.\n\nYou can add a description to the \\`${xc}\\` by passing a \\`${w3}\\` component as a child, which also benefits sighted users by adding visible context to the dialog.\n\nAlternatively, you can use your own component as a description by assigning it an \\`id\\` and passing the same value to the \\`aria-describedby\\` prop in \\`${xc}\\`. If the description is confusing or duplicative for sighted users, you can use the \\`@radix-ui/react-visually-hidden\\` primitive as a wrapper around your description component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return m.useEffect(()=>{document.getElementById(e.current?.getAttribute(\"aria-describedby\"))||console.warn(t)},[t,e]),null},pV=p3,gV=g3,T3=v3,M3=y3,k3=C3,_3=E3,A3=x3,N3=S3;const vV=pV,yV=gV,O3=m.forwardRef(({className:e,...t},n)=>g.jsx(T3,{className:je(\"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",e),...t,ref:n}));O3.displayName=T3.displayName;const D3=m.forwardRef(({className:e,...t},n)=>g.jsxs(yV,{children:[g.jsx(O3,{}),g.jsx(M3,{ref:n,className:je(\"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-stone-200 dark:border-[#3e3e42] bg-white dark:bg-[#252526] p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg\",e),...t})]}));D3.displayName=M3.displayName;const j3=({className:e,...t})=>g.jsx(\"div\",{className:je(\"flex flex-col space-y-2 text-center sm:text-left\",e),...t});j3.displayName=\"AlertDialogHeader\";const z3=({className:e,...t})=>g.jsx(\"div\",{className:je(\"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2\",e),...t});z3.displayName=\"AlertDialogFooter\";const P3=m.forwardRef(({className:e,...t},n)=>g.jsx(A3,{ref:n,className:je(\"text-lg font-semibold text-stone-900 dark:text-[#cccccc]\",e),...t}));P3.displayName=A3.displayName;const L3=m.forwardRef(({className:e,...t},n)=>g.jsx(N3,{ref:n,className:je(\"text-sm text-stone-500 dark:text-[#969696]\",e),...t}));L3.displayName=N3.displayName;const I3=m.forwardRef(({className:e,...t},n)=>g.jsx(k3,{ref:n,className:je(D1(),e),...t}));I3.displayName=k3.displayName;const H3=m.forwardRef(({className:e,...t},n)=>g.jsx(_3,{ref:n,className:je(D1({variant:\"outline\"}),\"mt-2 sm:mt-0\",e),...t}));H3.displayName=_3.displayName;const q3=6048e5,bV=864e5,HT=6e4,qT=525600,FT=43200,$T=1440,BT=Symbol.for(\"constructDateFrom\");function ro(e,t){return typeof e==\"function\"?e(t):e&&typeof e==\"object\"&&BT in e?e[BT](t):e instanceof Date?new e.constructor(t):new Date(t)}function ma(e,t){return ro(t||e,e)}let xV={};function Hd(){return xV}function vd(e,t){const n=Hd(),a=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=ma(e,t?.in),s=o.getDay(),c=(s<a?7:0)+s-a;return o.setDate(o.getDate()-c),o.setHours(0,0,0,0),o}function Bh(e,t){return vd(e,{...t,weekStartsOn:1})}function F3(e,t){const n=ma(e,t?.in),a=n.getFullYear(),o=ro(n,0);o.setFullYear(a+1,0,4),o.setHours(0,0,0,0);const s=Bh(o),c=ro(n,0);c.setFullYear(a,0,4),c.setHours(0,0,0,0);const u=Bh(c);return n.getTime()>=s.getTime()?a+1:n.getTime()>=u.getTime()?a:a-1}function Uh(e){const t=ma(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function $3(e,...t){const n=ro.bind(null,e||t.find(a=>typeof a==\"object\"));return t.map(n)}function UT(e,t){const n=ma(e,t?.in);return n.setHours(0,0,0,0),n}function wV(e,t,n){const[a,o]=$3(n?.in,e,t),s=UT(a),c=UT(o),u=+s-Uh(s),f=+c-Uh(c);return Math.round((u-f)/bV)}function SV(e,t){const n=F3(e,t),a=ro(e,0);return a.setFullYear(n,0,4),a.setHours(0,0,0,0),Bh(a)}function CV(e,t){const n=+ma(e)-+ma(t);return n<0?-1:n>0?1:n}function RV(e){return ro(e,Date.now())}function EV(e){return e instanceof Date||typeof e==\"object\"&&Object.prototype.toString.call(e)===\"[object Date]\"}function TV(e){return!(!EV(e)&&typeof e!=\"number\"||isNaN(+ma(e)))}function MV(e){return t=>{const a=(e?Math[e]:Math.trunc)(t);return a===0?0:a}}function kV(e,t){const n=ma(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}const _V={lessThanXSeconds:{one:\"less than a second\",other:\"less than {{count}} seconds\"},xSeconds:{one:\"1 second\",other:\"{{count}} seconds\"},halfAMinute:\"half a minute\",lessThanXMinutes:{one:\"less than a minute\",other:\"less than {{count}} minutes\"},xMinutes:{one:\"1 minute\",other:\"{{count}} minutes\"},aboutXHours:{one:\"about 1 hour\",other:\"about {{count}} hours\"},xHours:{one:\"1 hour\",other:\"{{count}} hours\"},xDays:{one:\"1 day\",other:\"{{count}} days\"},aboutXWeeks:{one:\"about 1 week\",other:\"about {{count}} weeks\"},xWeeks:{one:\"1 week\",other:\"{{count}} weeks\"},aboutXMonths:{one:\"about 1 month\",other:\"about {{count}} months\"},xMonths:{one:\"1 month\",other:\"{{count}} months\"},aboutXYears:{one:\"about 1 year\",other:\"about {{count}} years\"},xYears:{one:\"1 year\",other:\"{{count}} years\"},overXYears:{one:\"over 1 year\",other:\"over {{count}} years\"},almostXYears:{one:\"almost 1 year\",other:\"almost {{count}} years\"}},AV=(e,t,n)=>{let a;const o=_V[e];return typeof o==\"string\"?a=o:t===1?a=o.one:a=o.other.replace(\"{{count}}\",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?\"in \"+a:a+\" ago\":a};function Y0(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const NV={full:\"EEEE, MMMM do, y\",long:\"MMMM do, y\",medium:\"MMM d, y\",short:\"MM/dd/yyyy\"},OV={full:\"h:mm:ss a zzzz\",long:\"h:mm:ss a z\",medium:\"h:mm:ss a\",short:\"h:mm a\"},DV={full:\"{{date}} 'at' {{time}}\",long:\"{{date}} 'at' {{time}}\",medium:\"{{date}}, {{time}}\",short:\"{{date}}, {{time}}\"},jV={date:Y0({formats:NV,defaultWidth:\"full\"}),time:Y0({formats:OV,defaultWidth:\"full\"}),dateTime:Y0({formats:DV,defaultWidth:\"full\"})},zV={lastWeek:\"'last' eeee 'at' p\",yesterday:\"'yesterday at' p\",today:\"'today at' p\",tomorrow:\"'tomorrow at' p\",nextWeek:\"eeee 'at' p\",other:\"P\"},PV=(e,t,n,a)=>zV[e];function Iu(e){return(t,n)=>{const a=n?.context?String(n.context):\"standalone\";let o;if(a===\"formatting\"&&e.formattingValues){const c=e.defaultFormattingWidth||e.defaultWidth,u=n?.width?String(n.width):c;o=e.formattingValues[u]||e.formattingValues[c]}else{const c=e.defaultWidth,u=n?.width?String(n.width):e.defaultWidth;o=e.values[u]||e.values[c]}const s=e.argumentCallback?e.argumentCallback(t):t;return o[s]}}const LV={narrow:[\"B\",\"A\"],abbreviated:[\"BC\",\"AD\"],wide:[\"Before Christ\",\"Anno Domini\"]},IV={narrow:[\"1\",\"2\",\"3\",\"4\"],abbreviated:[\"Q1\",\"Q2\",\"Q3\",\"Q4\"],wide:[\"1st quarter\",\"2nd quarter\",\"3rd quarter\",\"4th quarter\"]},HV={narrow:[\"J\",\"F\",\"M\",\"A\",\"M\",\"J\",\"J\",\"A\",\"S\",\"O\",\"N\",\"D\"],abbreviated:[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"],wide:[\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\"]},qV={narrow:[\"S\",\"M\",\"T\",\"W\",\"T\",\"F\",\"S\"],short:[\"Su\",\"Mo\",\"Tu\",\"We\",\"Th\",\"Fr\",\"Sa\"],abbreviated:[\"Sun\",\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\"],wide:[\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"]},FV={narrow:{am:\"a\",pm:\"p\",midnight:\"mi\",noon:\"n\",morning:\"morning\",afternoon:\"afternoon\",evening:\"evening\",night:\"night\"},abbreviated:{am:\"AM\",pm:\"PM\",midnight:\"midnight\",noon:\"noon\",morning:\"morning\",afternoon:\"afternoon\",evening:\"evening\",night:\"night\"},wide:{am:\"a.m.\",pm:\"p.m.\",midnight:\"midnight\",noon:\"noon\",morning:\"morning\",afternoon:\"afternoon\",evening:\"evening\",night:\"night\"}},$V={narrow:{am:\"a\",pm:\"p\",midnight:\"mi\",noon:\"n\",morning:\"in the morning\",afternoon:\"in the afternoon\",evening:\"in the evening\",night:\"at night\"},abbreviated:{am:\"AM\",pm:\"PM\",midnight:\"midnight\",noon:\"noon\",morning:\"in the morning\",afternoon:\"in the afternoon\",evening:\"in the evening\",night:\"at night\"},wide:{am:\"a.m.\",pm:\"p.m.\",midnight:\"midnight\",noon:\"noon\",morning:\"in the morning\",afternoon:\"in the afternoon\",evening:\"in the evening\",night:\"at night\"}},BV=(e,t)=>{const n=Number(e),a=n%100;if(a>20||a<10)switch(a%10){case 1:return n+\"st\";case 2:return n+\"nd\";case 3:return n+\"rd\"}return n+\"th\"},UV={ordinalNumber:BV,era:Iu({values:LV,defaultWidth:\"wide\"}),quarter:Iu({values:IV,defaultWidth:\"wide\",argumentCallback:e=>e-1}),month:Iu({values:HV,defaultWidth:\"wide\"}),day:Iu({values:qV,defaultWidth:\"wide\"}),dayPeriod:Iu({values:FV,defaultWidth:\"wide\",formattingValues:$V,defaultFormattingWidth:\"wide\"})};function Hu(e){return(t,n={})=>{const a=n.width,o=a&&e.matchPatterns[a]||e.matchPatterns[e.defaultMatchWidth],s=t.match(o);if(!s)return null;const c=s[0],u=a&&e.parsePatterns[a]||e.parsePatterns[e.defaultParseWidth],f=Array.isArray(u)?WV(u,y=>y.test(c)):VV(u,y=>y.test(c));let h;h=e.valueCallback?e.valueCallback(f):f,h=n.valueCallback?n.valueCallback(h):h;const v=t.slice(c.length);return{value:h,rest:v}}}function VV(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function WV(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function GV(e){return(t,n={})=>{const a=t.match(e.matchPattern);if(!a)return null;const o=a[0],s=t.match(e.parsePattern);if(!s)return null;let c=e.valueCallback?e.valueCallback(s[0]):s[0];c=n.valueCallback?n.valueCallback(c):c;const u=t.slice(o.length);return{value:c,rest:u}}}const YV=/^(\\d+)(th|st|nd|rd)?/i,XV=/\\d+/i,QV={narrow:/^(b|a)/i,abbreviated:/^(b\\.?\\s?c\\.?|b\\.?\\s?c\\.?\\s?e\\.?|a\\.?\\s?d\\.?|c\\.?\\s?e\\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},KV={any:[/^b/i,/^(a|c)/i]},ZV={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},JV={any:[/1/i,/2/i,/3/i,/4/i]},eW={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},tW={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},nW={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},rW={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},aW={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\\.?\\s?m\\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},iW={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},oW={ordinalNumber:GV({matchPattern:YV,parsePattern:XV,valueCallback:e=>parseInt(e,10)}),era:Hu({matchPatterns:QV,defaultMatchWidth:\"wide\",parsePatterns:KV,defaultParseWidth:\"any\"}),quarter:Hu({matchPatterns:ZV,defaultMatchWidth:\"wide\",parsePatterns:JV,defaultParseWidth:\"any\",valueCallback:e=>e+1}),month:Hu({matchPatterns:eW,defaultMatchWidth:\"wide\",parsePatterns:tW,defaultParseWidth:\"any\"}),day:Hu({matchPatterns:nW,defaultMatchWidth:\"wide\",parsePatterns:rW,defaultParseWidth:\"any\"}),dayPeriod:Hu({matchPatterns:aW,defaultMatchWidth:\"any\",parsePatterns:iW,defaultParseWidth:\"any\"})},B3={code:\"en-US\",formatDistance:AV,formatLong:jV,formatRelative:PV,localize:UV,match:oW,options:{weekStartsOn:0,firstWeekContainsDate:1}};function sW(e,t){const n=ma(e,t?.in);return wV(n,kV(n))+1}function lW(e,t){const n=ma(e,t?.in),a=+Bh(n)-+SV(n);return Math.round(a/q3)+1}function U3(e,t){const n=ma(e,t?.in),a=n.getFullYear(),o=Hd(),s=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,c=ro(t?.in||e,0);c.setFullYear(a+1,0,s),c.setHours(0,0,0,0);const u=vd(c,t),f=ro(t?.in||e,0);f.setFullYear(a,0,s),f.setHours(0,0,0,0);const h=vd(f,t);return+n>=+u?a+1:+n>=+h?a:a-1}function cW(e,t){const n=Hd(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,o=U3(e,t),s=ro(t?.in||e,0);return s.setFullYear(o,0,a),s.setHours(0,0,0,0),vd(s,t)}function uW(e,t){const n=ma(e,t?.in),a=+vd(n,t)-+cW(n,t);return Math.round(a/q3)+1}function Qt(e,t){const n=e<0?\"-\":\"\",a=Math.abs(e).toString().padStart(t,\"0\");return n+a}const Go={y(e,t){const n=e.getFullYear(),a=n>0?n:1-n;return Qt(t===\"yy\"?a%100:a,t.length)},M(e,t){const n=e.getMonth();return t===\"M\"?String(n+1):Qt(n+1,2)},d(e,t){return Qt(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?\"pm\":\"am\";switch(t){case\"a\":case\"aa\":return n.toUpperCase();case\"aaa\":return n;case\"aaaaa\":return n[0];default:return n===\"am\"?\"a.m.\":\"p.m.\"}},h(e,t){return Qt(e.getHours()%12||12,t.length)},H(e,t){return Qt(e.getHours(),t.length)},m(e,t){return Qt(e.getMinutes(),t.length)},s(e,t){return Qt(e.getSeconds(),t.length)},S(e,t){const n=t.length,a=e.getMilliseconds(),o=Math.trunc(a*Math.pow(10,n-3));return Qt(o,t.length)}},oc={midnight:\"midnight\",noon:\"noon\",morning:\"morning\",afternoon:\"afternoon\",evening:\"evening\",night:\"night\"},VT={G:function(e,t,n){const a=e.getFullYear()>0?1:0;switch(t){case\"G\":case\"GG\":case\"GGG\":return n.era(a,{width:\"abbreviated\"});case\"GGGGG\":return n.era(a,{width:\"narrow\"});default:return n.era(a,{width:\"wide\"})}},y:function(e,t,n){if(t===\"yo\"){const a=e.getFullYear(),o=a>0?a:1-a;return n.ordinalNumber(o,{unit:\"year\"})}return Go.y(e,t)},Y:function(e,t,n,a){const o=U3(e,a),s=o>0?o:1-o;if(t===\"YY\"){const c=s%100;return Qt(c,2)}return t===\"Yo\"?n.ordinalNumber(s,{unit:\"year\"}):Qt(s,t.length)},R:function(e,t){const n=F3(e);return Qt(n,t.length)},u:function(e,t){const n=e.getFullYear();return Qt(n,t.length)},Q:function(e,t,n){const a=Math.ceil((e.getMonth()+1)/3);switch(t){case\"Q\":return String(a);case\"QQ\":return Qt(a,2);case\"Qo\":return n.ordinalNumber(a,{unit:\"quarter\"});case\"QQQ\":return n.quarter(a,{width:\"abbreviated\",context:\"formatting\"});case\"QQQQQ\":return n.quarter(a,{width:\"narrow\",context:\"formatting\"});default:return n.quarter(a,{width:\"wide\",context:\"formatting\"})}},q:function(e,t,n){const a=Math.ceil((e.getMonth()+1)/3);switch(t){case\"q\":return String(a);case\"qq\":return Qt(a,2);case\"qo\":return n.ordinalNumber(a,{unit:\"quarter\"});case\"qqq\":return n.quarter(a,{width:\"abbreviated\",context:\"standalone\"});case\"qqqqq\":return n.quarter(a,{width:\"narrow\",context:\"standalone\"});default:return n.quarter(a,{width:\"wide\",context:\"standalone\"})}},M:function(e,t,n){const a=e.getMonth();switch(t){case\"M\":case\"MM\":return Go.M(e,t);case\"Mo\":return n.ordinalNumber(a+1,{unit:\"month\"});case\"MMM\":return n.month(a,{width:\"abbreviated\",context:\"formatting\"});case\"MMMMM\":return n.month(a,{width:\"narrow\",context:\"formatting\"});default:return n.month(a,{width:\"wide\",context:\"formatting\"})}},L:function(e,t,n){const a=e.getMonth();switch(t){case\"L\":return String(a+1);case\"LL\":return Qt(a+1,2);case\"Lo\":return n.ordinalNumber(a+1,{unit:\"month\"});case\"LLL\":return n.month(a,{width:\"abbreviated\",context:\"standalone\"});case\"LLLLL\":return n.month(a,{width:\"narrow\",context:\"standalone\"});default:return n.month(a,{width:\"wide\",context:\"standalone\"})}},w:function(e,t,n,a){const o=uW(e,a);return t===\"wo\"?n.ordinalNumber(o,{unit:\"week\"}):Qt(o,t.length)},I:function(e,t,n){const a=lW(e);return t===\"Io\"?n.ordinalNumber(a,{unit:\"week\"}):Qt(a,t.length)},d:function(e,t,n){return t===\"do\"?n.ordinalNumber(e.getDate(),{unit:\"date\"}):Go.d(e,t)},D:function(e,t,n){const a=sW(e);return t===\"Do\"?n.ordinalNumber(a,{unit:\"dayOfYear\"}):Qt(a,t.length)},E:function(e,t,n){const a=e.getDay();switch(t){case\"E\":case\"EE\":case\"EEE\":return n.day(a,{width:\"abbreviated\",context:\"formatting\"});case\"EEEEE\":return n.day(a,{width:\"narrow\",context:\"formatting\"});case\"EEEEEE\":return n.day(a,{width:\"short\",context:\"formatting\"});default:return n.day(a,{width:\"wide\",context:\"formatting\"})}},e:function(e,t,n,a){const o=e.getDay(),s=(o-a.weekStartsOn+8)%7||7;switch(t){case\"e\":return String(s);case\"ee\":return Qt(s,2);case\"eo\":return n.ordinalNumber(s,{unit:\"day\"});case\"eee\":return n.day(o,{width:\"abbreviated\",context:\"formatting\"});case\"eeeee\":return n.day(o,{width:\"narrow\",context:\"formatting\"});case\"eeeeee\":return n.day(o,{width:\"short\",context:\"formatting\"});default:return n.day(o,{width:\"wide\",context:\"formatting\"})}},c:function(e,t,n,a){const o=e.getDay(),s=(o-a.weekStartsOn+8)%7||7;switch(t){case\"c\":return String(s);case\"cc\":return Qt(s,t.length);case\"co\":return n.ordinalNumber(s,{unit:\"day\"});case\"ccc\":return n.day(o,{width:\"abbreviated\",context:\"standalone\"});case\"ccccc\":return n.day(o,{width:\"narrow\",context:\"standalone\"});case\"cccccc\":return n.day(o,{width:\"short\",context:\"standalone\"});default:return n.day(o,{width:\"wide\",context:\"standalone\"})}},i:function(e,t,n){const a=e.getDay(),o=a===0?7:a;switch(t){case\"i\":return String(o);case\"ii\":return Qt(o,t.length);case\"io\":return n.ordinalNumber(o,{unit:\"day\"});case\"iii\":return n.day(a,{width:\"abbreviated\",context:\"formatting\"});case\"iiiii\":return n.day(a,{width:\"narrow\",context:\"formatting\"});case\"iiiiii\":return n.day(a,{width:\"short\",context:\"formatting\"});default:return n.day(a,{width:\"wide\",context:\"formatting\"})}},a:function(e,t,n){const o=e.getHours()/12>=1?\"pm\":\"am\";switch(t){case\"a\":case\"aa\":return n.dayPeriod(o,{width:\"abbreviated\",context:\"formatting\"});case\"aaa\":return n.dayPeriod(o,{width:\"abbreviated\",context:\"formatting\"}).toLowerCase();case\"aaaaa\":return n.dayPeriod(o,{width:\"narrow\",context:\"formatting\"});default:return n.dayPeriod(o,{width:\"wide\",context:\"formatting\"})}},b:function(e,t,n){const a=e.getHours();let o;switch(a===12?o=oc.noon:a===0?o=oc.midnight:o=a/12>=1?\"pm\":\"am\",t){case\"b\":case\"bb\":return n.dayPeriod(o,{width:\"abbreviated\",context:\"formatting\"});case\"bbb\":return n.dayPeriod(o,{width:\"abbreviated\",context:\"formatting\"}).toLowerCase();case\"bbbbb\":return n.dayPeriod(o,{width:\"narrow\",context:\"formatting\"});default:return n.dayPeriod(o,{width:\"wide\",context:\"formatting\"})}},B:function(e,t,n){const a=e.getHours();let o;switch(a>=17?o=oc.evening:a>=12?o=oc.afternoon:a>=4?o=oc.morning:o=oc.night,t){case\"B\":case\"BB\":case\"BBB\":return n.dayPeriod(o,{width:\"abbreviated\",context:\"formatting\"});case\"BBBBB\":return n.dayPeriod(o,{width:\"narrow\",context:\"formatting\"});default:return n.dayPeriod(o,{width:\"wide\",context:\"formatting\"})}},h:function(e,t,n){if(t===\"ho\"){let a=e.getHours()%12;return a===0&&(a=12),n.ordinalNumber(a,{unit:\"hour\"})}return Go.h(e,t)},H:function(e,t,n){return t===\"Ho\"?n.ordinalNumber(e.getHours(),{unit:\"hour\"}):Go.H(e,t)},K:function(e,t,n){const a=e.getHours()%12;return t===\"Ko\"?n.ordinalNumber(a,{unit:\"hour\"}):Qt(a,t.length)},k:function(e,t,n){let a=e.getHours();return a===0&&(a=24),t===\"ko\"?n.ordinalNumber(a,{unit:\"hour\"}):Qt(a,t.length)},m:function(e,t,n){return t===\"mo\"?n.ordinalNumber(e.getMinutes(),{unit:\"minute\"}):Go.m(e,t)},s:function(e,t,n){return t===\"so\"?n.ordinalNumber(e.getSeconds(),{unit:\"second\"}):Go.s(e,t)},S:function(e,t){return Go.S(e,t)},X:function(e,t,n){const a=e.getTimezoneOffset();if(a===0)return\"Z\";switch(t){case\"X\":return GT(a);case\"XXXX\":case\"XX\":return Ys(a);default:return Ys(a,\":\")}},x:function(e,t,n){const a=e.getTimezoneOffset();switch(t){case\"x\":return GT(a);case\"xxxx\":case\"xx\":return Ys(a);default:return Ys(a,\":\")}},O:function(e,t,n){const a=e.getTimezoneOffset();switch(t){case\"O\":case\"OO\":case\"OOO\":return\"GMT\"+WT(a,\":\");default:return\"GMT\"+Ys(a,\":\")}},z:function(e,t,n){const a=e.getTimezoneOffset();switch(t){case\"z\":case\"zz\":case\"zzz\":return\"GMT\"+WT(a,\":\");default:return\"GMT\"+Ys(a,\":\")}},t:function(e,t,n){const a=Math.trunc(+e/1e3);return Qt(a,t.length)},T:function(e,t,n){return Qt(+e,t.length)}};function WT(e,t=\"\"){const n=e>0?\"-\":\"+\",a=Math.abs(e),o=Math.trunc(a/60),s=a%60;return s===0?n+String(o):n+String(o)+t+Qt(s,2)}function GT(e,t){return e%60===0?(e>0?\"-\":\"+\")+Qt(Math.abs(e)/60,2):Ys(e,t)}function Ys(e,t=\"\"){const n=e>0?\"-\":\"+\",a=Math.abs(e),o=Qt(Math.trunc(a/60),2),s=Qt(a%60,2);return n+o+t+s}const YT=(e,t)=>{switch(e){case\"P\":return t.date({width:\"short\"});case\"PP\":return t.date({width:\"medium\"});case\"PPP\":return t.date({width:\"long\"});default:return t.date({width:\"full\"})}},V3=(e,t)=>{switch(e){case\"p\":return t.time({width:\"short\"});case\"pp\":return t.time({width:\"medium\"});case\"ppp\":return t.time({width:\"long\"});default:return t.time({width:\"full\"})}},dW=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],a=n[1],o=n[2];if(!o)return YT(e,t);let s;switch(a){case\"P\":s=t.dateTime({width:\"short\"});break;case\"PP\":s=t.dateTime({width:\"medium\"});break;case\"PPP\":s=t.dateTime({width:\"long\"});break;default:s=t.dateTime({width:\"full\"});break}return s.replace(\"{{date}}\",YT(a,t)).replace(\"{{time}}\",V3(o,t))},fW={p:V3,P:dW},hW=/^D+$/,mW=/^Y+$/,pW=[\"D\",\"DD\",\"YY\",\"YYYY\"];function gW(e){return hW.test(e)}function vW(e){return mW.test(e)}function yW(e,t,n){const a=bW(e,t,n);if(console.warn(a),pW.includes(e))throw new RangeError(a)}function bW(e,t,n){const a=e[0]===\"Y\"?\"years\":\"days of the month\";return`Use \\`${e.toLowerCase()}\\` instead of \\`${e}\\` (in \\`${t}\\`) for formatting ${a} to the input \\`${n}\\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const xW=/[yYQqMLwIdDecihHKkms]o|(\\w)\\1*|''|'(''|[^'])+('|$)|./g,wW=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,SW=/^'([^]*?)'?$/,CW=/''/g,RW=/[a-zA-Z]/;function EW(e,t,n){const a=Hd(),o=a.locale??B3,s=a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,c=a.weekStartsOn??a.locale?.options?.weekStartsOn??0,u=ma(e,n?.in);if(!TV(u))throw new RangeError(\"Invalid time value\");let f=t.match(wW).map(v=>{const y=v[0];if(y===\"p\"||y===\"P\"){const x=fW[y];return x(v,o.formatLong)}return v}).join(\"\").match(xW).map(v=>{if(v===\"''\")return{isToken:!1,value:\"'\"};const y=v[0];if(y===\"'\")return{isToken:!1,value:TW(v)};if(VT[y])return{isToken:!0,value:v};if(y.match(RW))throw new RangeError(\"Format string contains an unescaped latin alphabet character `\"+y+\"`\");return{isToken:!1,value:v}});o.localize.preprocessor&&(f=o.localize.preprocessor(u,f));const h={firstWeekContainsDate:s,weekStartsOn:c,locale:o};return f.map(v=>{if(!v.isToken)return v.value;const y=v.value;(vW(y)||gW(y))&&yW(y,t,String(e));const x=VT[y[0]];return x(u,y,o.localize,h)}).join(\"\")}function TW(e){const t=e.match(SW);return t?t[1].replace(CW,\"'\"):e}function MW(e,t,n){const a=Hd(),o=n?.locale??a.locale??B3,s=CV(e,t);if(isNaN(s))throw new RangeError(\"Invalid time value\");const c=Object.assign({},n,{addSuffix:n?.addSuffix,comparison:s}),[u,f]=$3(n?.in,...s>0?[t,e]:[e,t]),h=MV(n?.roundingMethod??\"round\"),v=f.getTime()-u.getTime(),y=v/HT,x=Uh(f)-Uh(u),S=(v-x)/HT,w=n?.unit;let C;if(w?C=w:y<1?C=\"second\":y<60?C=\"minute\":y<$T?C=\"hour\":S<FT?C=\"day\":S<qT?C=\"month\":C=\"year\",C===\"second\"){const R=h(v/1e3);return o.formatDistance(\"xSeconds\",R,c)}else if(C===\"minute\"){const R=h(y);return o.formatDistance(\"xMinutes\",R,c)}else if(C===\"hour\"){const R=h(y/60);return o.formatDistance(\"xHours\",R,c)}else if(C===\"day\"){const R=h(S/$T);return o.formatDistance(\"xDays\",R,c)}else if(C===\"month\"){const R=h(S/FT);return R===12&&w!==\"month\"?o.formatDistance(\"xYears\",1,c):o.formatDistance(\"xMonths\",R,c)}else{const R=h(S/qT);return o.formatDistance(\"xYears\",R,c)}}function Rb(e,t){return MW(e,RV(e),t)}const kW=50,_W=e=>e?e.startsWith(\"image/\")?w4:e.startsWith(\"video/\")?O4:e.startsWith(\"audio/\")?R4:e.startsWith(\"text/\")?EM:e.includes(\"zip\")||e.includes(\"archive\")||e.includes(\"tar\")?y4:oC:oC,XT=e=>{try{return Rb(new Date(e),{addSuffix:!0})}catch{return\"unknown\"}};function AW(e){try{const t=atob(e);return Array.from(t,n=>n.charCodeAt(0).toString(16).padStart(2,\"0\")).join(\"\")}catch{return e}}function NW(){return typeof window<\"u\"&&window.location.pathname.startsWith(\"/_dashboard\")?`${window.location.protocol}//${window.location.host}`:\"http://localhost:8799\"}function OW({file:e,isExpanded:t,onToggle:n,copiedId:a,onCopyId:o,onDownload:s,onDelete:c,storageBaseUrl:u}){const f=_W(e.contentType),h=a===e._id;return g.jsxs(\"div\",{className:je(\"group border-b border-[var(--border-color)] last:border-b-0 transition-colors cursor-pointer select-none\",h?\"bg-emerald-500/10 duration-75\":\"duration-500 hover:bg-[var(--bg-hover)]\"),children:[g.jsxs(\"div\",{className:\"flex items-center gap-2 px-3 py-1.5 min-h-[36px]\",onClick:n,children:[g.jsx(\"div\",{className:\"w-4 h-4 flex items-center justify-center flex-shrink-0\",children:t?g.jsx(ns,{className:\"h-3.5 w-3.5 text-[var(--text-tertiary)]\"}):g.jsx(Ac,{className:\"h-3.5 w-3.5 text-[var(--text-tertiary)]\"})}),g.jsx(\"div\",{className:\"flex-shrink-0\",children:g.jsx(f,{className:\"h-3.5 w-3.5 text-[var(--text-tertiary)]\"})}),g.jsx(\"code\",{className:\"text-xs text-[var(--text-primary)] font-medium truncate flex-1 min-w-0\",children:e._id}),g.jsx(\"span\",{className:\"text-[10px] text-[var(--text-tertiary)] truncate max-w-[160px] hidden sm:block\",children:e.contentType||\"application/octet-stream\"}),g.jsx(\"span\",{className:\"text-[10px] tabular-nums flex-shrink-0 min-w-[48px] text-right text-[var(--text-tertiary)]\",children:uC(e.size)}),g.jsx(\"span\",{className:\"text-[10px] text-[var(--text-tertiary)] tabular-nums flex-shrink-0 min-w-[48px] text-right\",children:XT(e._creationTime)}),g.jsx(\"button\",{onClick:v=>{v.stopPropagation(),o(e._id)},className:je(\"transition-opacity p-0.5 rounded hover:bg-[var(--bg-hover)] flex-shrink-0 cursor-pointer\",h?\"opacity-100\":\"opacity-0 group-hover:opacity-100\"),title:\"Copy ID\",children:h?g.jsx(xd,{className:\"h-3 w-3 text-emerald-400\"}):g.jsx(Rc,{className:\"h-3 w-3 text-[var(--text-tertiary)]\"})})]}),t&&(()=>{const v=`${u}/api/storage/${e._id}`,y=e.contentType||\"\",x=y.startsWith(\"image/\"),S=y.startsWith(\"video/\"),w=y.startsWith(\"audio/\");return g.jsxs(\"div\",{className:\"px-3 pb-2 pl-[52px] space-y-2\",children:[x&&g.jsx(\"div\",{className:\"rounded border border-[var(--border-color)] bg-[var(--bg-secondary)] p-2 max-w-xs\",children:g.jsx(\"img\",{src:v,alt:e._id,className:\"max-h-48 rounded object-contain\",loading:\"lazy\"})}),S&&g.jsx(\"div\",{className:\"rounded border border-[var(--border-color)] bg-[var(--bg-secondary)] p-2 max-w-sm\",children:g.jsx(\"video\",{src:v,controls:!0,className:\"max-h-48 rounded w-full\",preload:\"metadata\"})}),w&&g.jsx(\"div\",{className:\"rounded border border-[var(--border-color)] bg-[var(--bg-secondary)] p-2 max-w-sm\",children:g.jsx(\"audio\",{src:v,controls:!0,className:\"w-full\",preload:\"metadata\"})}),g.jsxs(\"div\",{className:\"bg-[var(--bg-primary)] border border-[var(--border-color)] rounded px-3 py-2 space-y-1.5\",children:[g.jsxs(\"div\",{className:\"flex items-center gap-2 text-xs\",children:[g.jsx(\"span\",{className:\"text-[var(--text-tertiary)] w-20 flex-shrink-0\",children:\"ID\"}),g.jsx(\"code\",{className:\"text-[var(--text-primary)] font-mono truncate\",children:e._id})]}),g.jsxs(\"div\",{className:\"flex items-center gap-2 text-xs\",children:[g.jsx(\"span\",{className:\"text-[var(--text-tertiary)] w-20 flex-shrink-0\",children:\"Size\"}),g.jsx(\"span\",{className:\"text-[var(--text-primary)]\",children:uC(e.size)})]}),g.jsxs(\"div\",{className:\"flex items-center gap-2 text-xs\",children:[g.jsx(\"span\",{className:\"text-[var(--text-tertiary)] w-20 flex-shrink-0\",children:\"Type\"}),g.jsx(\"span\",{className:\"text-[var(--text-primary)] font-mono\",children:e.contentType||\"N/A\"})]}),g.jsxs(\"div\",{className:\"flex items-center gap-2 text-xs\",children:[g.jsx(\"span\",{className:\"text-[var(--text-tertiary)] w-20 flex-shrink-0\",children:\"Uploaded\"}),g.jsx(\"span\",{className:\"text-[var(--text-primary)]\",children:XT(e._creationTime)})]}),e.sha256&&g.jsxs(\"div\",{className:\"flex items-start gap-2 text-xs\",children:[g.jsx(\"span\",{className:\"text-[var(--text-tertiary)] w-20 flex-shrink-0\",children:\"SHA-256\"}),g.jsx(\"span\",{className:\"text-[var(--text-secondary)] font-mono break-all\",children:AW(e.sha256)})]})]}),g.jsxs(\"div\",{className:\"flex items-center gap-2\",children:[g.jsxs(\"button\",{onClick:()=>s(e),className:\"flex items-center gap-1 px-2 py-1 text-[10px] font-medium rounded text-[var(--text-secondary)] hover:bg-[var(--bg-hover)] transition-colors cursor-pointer\",children:[g.jsx(RM,{className:\"h-3 w-3\"}),\" Download\"]}),g.jsxs(\"button\",{onClick:()=>o(e._id),className:\"flex items-center gap-1 px-2 py-1 text-[10px] font-medium rounded text-[var(--text-secondary)] hover:bg-[var(--bg-hover)] transition-colors cursor-pointer\",children:[g.jsx(Rc,{className:\"h-3 w-3\"}),\" Copy ID\"]}),g.jsxs(\"button\",{onClick:()=>c(e),className:\"flex items-center gap-1 px-2 py-1 text-[10px] font-medium rounded text-red-400 hover:bg-red-500/10 transition-colors cursor-pointer\",children:[g.jsx(Ks,{className:\"h-3 w-3\"}),\" Delete\"]})]})]})})()]})}function DW(){const[e,t]=m.useState(1),[n,a]=m.useState(\"\"),[o,s]=m.useState(new Set),[c,u]=m.useState(null),[f,h]=m.useState(null),v=Id(),y=us(T6,{page:e,pageSize:kW,sortBy:\"uploadedAt\",sortOrder:\"desc\"}),x=es(M6),S=y===void 0,w=y?.files||[],C=y?.total||0,R=y?.hasMore||!1,k=w.filter(A=>A._id.toLowerCase().includes(n.toLowerCase())||A.contentType?.toLowerCase().includes(n.toLowerCase())),T=m.useCallback(A=>{s(q=>{const B=new Set(q);return B.has(A)?B.delete(A):B.add(A),B})},[]),M=async()=>{if(c)try{await x({storageId:c._id}),s(A=>{const q=new Set(A);return q.delete(c._id),q}),u(null)}catch(A){console.error(\"Failed to delete file:\",A),alert(\"Failed to delete file\")}},j=NW(),I=A=>{const q=`${j}/api/storage/${A._id}`,B=document.createElement(\"a\");B.href=q,B.download=A._id,B.target=\"_blank\",B.click()},P=m.useCallback(A=>{navigator.clipboard.writeText(A),h(A),setTimeout(()=>h(null),600)},[]);return g.jsxs(\"div\",{className:\"flex flex-col h-full bg-[var(--bg-tertiary)]\",children:[g.jsx(\"div\",{className:\"flex-shrink-0 border-b border-[var(--border-color)] bg-[var(--bg-primary)]\",children:g.jsxs(\"div\",{className:\"flex items-center gap-2 px-3 py-2\",children:[g.jsxs(\"div\",{className:\"relative flex-1 max-w-xs\",children:[g.jsx(wd,{className:\"absolute left-2 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-[var(--text-tertiary)] z-10\"}),g.jsx(ls,{ref:v,type:\"text\",placeholder:\"Filter by ID or type...\",value:n,onChange:A=>a(A.target.value),className:\"h-7 pl-7 pr-2 text-xs\"})]}),g.jsx(\"div\",{className:\"flex-1\"}),g.jsxs(\"span\",{className:\"text-[10px] tabular-nums text-[var(--text-secondary)]\",children:[k.length,\" of \",C,\" objects\"]}),g.jsx(\"div\",{className:\"w-px h-5 bg-[var(--border-color)]\"}),g.jsx(\"button\",{onClick:()=>t(A=>Math.max(1,A-1)),disabled:e===1,className:je(\"p-1 rounded transition-colors cursor-pointer\",e===1?\"text-[var(--text-tertiary)]/30 !cursor-default\":\"text-[var(--text-tertiary)] hover:bg-[var(--bg-hover)]\"),title:\"Previous page\",children:g.jsx(u4,{className:\"h-3.5 w-3.5\"})}),g.jsx(\"span\",{className:\"text-[10px] tabular-nums text-[var(--text-tertiary)]\",children:e}),g.jsx(\"button\",{onClick:()=>t(A=>A+1),disabled:!R,className:je(\"p-1 rounded transition-colors cursor-pointer\",R?\"text-[var(--text-tertiary)] hover:bg-[var(--bg-hover)]\":\"text-[var(--text-tertiary)]/30 !cursor-default\"),title:\"Next page\",children:g.jsx(Ac,{className:\"h-3.5 w-3.5\"})}),g.jsx(\"div\",{className:\"w-px h-5 bg-[var(--border-color)]\"}),g.jsx(\"button\",{onClick:()=>t(1),className:\"p-1 rounded hover:bg-[var(--bg-hover)] text-[var(--text-tertiary)] cursor-pointer\",title:\"Refresh\",children:g.jsx(k4,{className:\"h-3.5 w-3.5\"})})]})}),g.jsx(\"div\",{className:\"flex-1 overflow-auto\",children:S?g.jsx(\"div\",{className:\"flex items-center justify-center py-16\",children:g.jsx(hi,{className:\"h-5 w-5 animate-spin text-[var(--text-tertiary)]\"})}):k.length===0?g.jsxs(\"div\",{className:\"flex flex-col items-center justify-center py-16 gap-2\",children:[g.jsx(\"div\",{className:\"h-10 w-10 rounded-full bg-[var(--bg-secondary)] flex items-center justify-center\",children:g.jsx(TM,{className:\"h-5 w-5 text-[var(--text-tertiary)]\"})}),g.jsx(\"p\",{className:\"text-sm text-[var(--text-secondary)]\",children:n?\"No files found\":\"No files yet\"}),g.jsx(\"p\",{className:\"text-xs text-[var(--text-tertiary)]\",children:n?`No files match \"${n}\"`:\"Files uploaded via storage.store() will appear here\"})]}):g.jsx(\"div\",{className:\"bg-[var(--bg-primary)]\",children:k.map(A=>g.jsx(OW,{file:A,isExpanded:o.has(A._id),onToggle:()=>T(A._id),copiedId:f,onCopyId:P,onDownload:I,onDelete:u,storageBaseUrl:j},A._id))})}),g.jsx(vV,{open:!!c,onOpenChange:A=>!A&&u(null),children:g.jsxs(D3,{children:[g.jsxs(j3,{children:[g.jsx(P3,{children:\"Delete Object?\"}),g.jsx(L3,{children:\"This will permanently delete the object from storage. This action cannot be undone.\"})]}),g.jsxs(z3,{children:[g.jsx(H3,{children:\"Cancel\"}),g.jsx(I3,{onClick:M,className:\"bg-[var(--error-color)] hover:opacity-90\",children:\"Delete\"})]})]})})]})}const QT={query:{label:\"Q\",color:\"text-blue-400\",bg:\"bg-blue-500/15\",icon:CM},mutation:{label:\"M\",color:\"text-orange-400\",bg:\"bg-orange-500/15\",icon:kb},action:{label:\"A\",color:\"text-purple-400\",bg:\"bg-purple-500/15\",icon:x4}};function jW(e){const t=Date.now()-e;return t<1e3?\"just now\":t<6e4?`${Math.floor(t/1e3)}s ago`:t<36e5?`${Math.floor(t/6e4)}m ago`:t<864e5?`${Math.floor(t/36e5)}h ago`:new Date(e).toLocaleDateString()}function zW({line:e}){return e.startsWith(\"[ERROR]\")?g.jsx(\"span\",{className:\"text-red-400 font-medium\",children:\"[ERROR]\"}):e.startsWith(\"[WARN]\")?g.jsx(\"span\",{className:\"text-yellow-400 font-medium\",children:\"[WARN]\"}):e.startsWith(\"[INFO]\")?g.jsx(\"span\",{className:\"text-blue-400 font-medium\",children:\"[INFO]\"}):e.startsWith(\"[LOG]\")?g.jsx(\"span\",{className:\"text-[var(--text-tertiary)] font-medium\",children:\"[LOG]\"}):null}function PW({line:e}){const t=e.match(/^\\[(LOG|WARN|ERROR|INFO)\\]\\s*/),n=t?e.slice(t[0].length):e;return g.jsxs(\"div\",{className:\"flex gap-1.5 font-mono text-xs leading-relaxed\",children:[g.jsx(zW,{line:e}),g.jsx(\"span\",{className:\"text-[var(--text-primary)] whitespace-pre-wrap break-all\",children:n})]})}function dc(e){return!Number.isFinite(e)||e<0?\"0ms\":e<1?\"<1ms\":e<10?`${e.toFixed(1)}ms`:`${Math.round(e)}ms`}function qu(e){return`+${dc(Math.max(0,e))}`}function KT(e){return Number.isFinite(e)?Math.max(0,Math.min(100,e)):0}function ZT(e,t=42){if(e.length<=t)return e;const n=Math.max(6,Math.floor((t-3)/2));return`${e.slice(0,n)}...${e.slice(-n)}`}function JT(e){if(typeof e==\"string\")return e.length>60?`${e.slice(0,57)}...`:e;if(typeof e==\"number\"||typeof e==\"boolean\")return String(e);if(e===null)return\"null\";try{const t=JSON.stringify(e);return t?t.length>80?`${t.slice(0,77)}...`:t:String(e)}catch{return String(e)}}function LW(e){const t=new Map,n=new Map;for(const u of e.spans){const f=u.parentId??null;n.set(u.id,f);const h=t.get(f)??[];h.push(u),t.set(f,h)}for(const u of t.values())u.sort((f,h)=>f.startMs-h.startMs||f.name.localeCompare(h.name));const a=[],o=new Set,s=(u,f)=>{if(o.has(u.id))return;o.add(u.id);const h=t.get(u.id)??[],v=h.reduce((y,x)=>!Number.isFinite(x.durationMs)||x.durationMs<=0?y:y+x.durationMs,0);a.push({span:u,depth:f,hasChildren:h.length>0,directChildDurationMs:v});for(const y of h)s(y,f+1)},c=e.spans.find(u=>u.id===e.rootSpanId);c&&s(c,0);for(const u of t.get(null)??[])s(u,0);for(const u of e.spans)s(u,0);return{rows:a,parentById:n,childrenByParent:t}}function IW(e){const t=e.attributes?Object.keys(e.attributes).join(\" \"):\"\",n=e.events?.map(a=>a.name).join(\" \")??\"\";return`${e.name} ${e.kind} ${e.status} ${t} ${n}`.toLowerCase()}function HW({trace:e}){const t=m.useMemo(()=>LW(e),[e]),n=m.useMemo(()=>Math.min(...e.spans.map(V=>V.startMs),0),[e.spans]),a=m.useMemo(()=>Math.max(...e.spans.map(V=>V.endMs),0),[e.spans]),o=m.useMemo(()=>{const V=Math.max(0,a-n);return Math.max(e.summary.totalDurationMs,V,1)},[a,n,e.summary.totalDurationMs]),s=m.useMemo(()=>e.spans.reduce((V,N)=>V+(N.status===\"error\"?1:0),0),[e.spans]),[c,u]=m.useState(e.rootSpanId||e.spans[0]?.id||null),[f,h]=m.useState(\"\"),[v,y]=m.useState(!1),[x,S]=m.useState(new Set),w=f.trim().toLowerCase(),C=w.length>0||v,R=m.useMemo(()=>{if(!C)return null;const V=new Set,N=z=>{let F=t.parentById.get(z)??null;for(;F&&!V.has(F);)V.add(F),F=t.parentById.get(F)??null},_=z=>{const F=[z];for(;F.length>0;){const O=F.pop();if(V.has(O))continue;V.add(O);const $=t.childrenByParent.get(O)??[];for(const W of $)F.push(W.id)}};for(const z of e.spans)v&&z.status!==\"error\"||w.length>0&&!IW(z).includes(w)||(N(z.id),_(z.id));return V},[C,t.childrenByParent,t.parentById,w,v,e.spans]),k=m.useMemo(()=>{const V=[],N=!C,_=[];for(const z of t.rows){for(;_.length>0&&z.depth<=_[_.length-1];)_.pop();const F=N&&_.length>0,O=!R||R.has(z.span.id),$=!F&&O;$&&V.push(z),N&&$&&z.hasChildren&&x.has(z.span.id)&&_.push(z.depth)}return V},[t.rows,C,R,x]);m.useEffect(()=>{const V=e.rootSpanId||e.spans[0]?.id||null;(!c||!e.spans.some(N=>N.id===c))&&u(V)},[c,e]),m.useEffect(()=>{k.length!==0&&(!c||!k.some(V=>V.span.id===c))&&u(k[0].span.id)},[c,k]);const T=m.useMemo(()=>t.rows.find(V=>V.span.id===c)??null,[t.rows,c]),M=T?.span??null,j=T?Math.max(0,T.span.durationMs-T.directChildDurationMs):0,I=m.useMemo(()=>M?.attributes?Object.entries(M.attributes):[],[M]),P=V=>{S(N=>{const _=new Set(N);return _.has(V)?_.delete(V):_.add(V),_})},A=()=>{S(new Set(t.rows.filter(V=>V.hasChildren).map(V=>V.span.id)))},q=()=>{S(new Set)},B=()=>{h(\"\"),y(!1)};return g.jsxs(\"div\",{className:\"bg-[var(--bg-primary)] border border-[var(--border-color)] rounded-md px-2 py-2 space-y-2\",children:[g.jsxs(\"div\",{className:\"flex items-center justify-between gap-2\",children:[g.jsx(\"div\",{className:\"text-[11px] text-[var(--text-primary)] font-semibold\",children:\"Trace Waterfall\"}),e.requestId&&g.jsx(\"div\",{className:\"text-[10px] text-[var(--text-tertiary)] font-mono\",title:e.requestId,children:ZT(e.requestId,34)})]}),g.jsxs(\"div\",{className:\"flex flex-wrap gap-1 text-[10px] font-mono text-[var(--text-secondary)]\",children:[g.jsxs(\"span\",{className:\"px-1.5 py-0.5 rounded bg-[var(--bg-secondary)]\",children:[e.summary.spanCount,\" spans\"]}),g.jsxs(\"span\",{className:\"px-1.5 py-0.5 rounded bg-[var(--bg-secondary)]\",children:[e.summary.eventCount,\" events\"]}),g.jsx(\"span\",{className:\"px-1.5 py-0.5 rounded bg-[var(--bg-secondary)]\",children:dc(e.summary.totalDurationMs)}),g.jsxs(\"span\",{className:\"px-1.5 py-0.5 rounded bg-red-500/15 text-red-300\",children:[s,\" err\"]})]}),g.jsxs(\"div\",{className:\"flex items-center gap-1.5\",children:[g.jsx(\"input\",{type:\"text\",value:f,onChange:V=>h(V.target.value),placeholder:\"Filter spans\",className:\"h-6 flex-1 min-w-0 bg-[var(--bg-secondary)] border border-[var(--border-color)] rounded px-2 text-[10px] text-[var(--text-primary)] placeholder:text-[var(--text-tertiary)] focus:outline-none focus:border-blue-500/40\"}),g.jsx(\"button\",{type:\"button\",onClick:()=>y(V=>!V),className:je(\"h-6 px-2 rounded text-[10px] font-semibold uppercase tracking-wide transition-colors border\",v?\"bg-red-500/15 border-red-500/40 text-red-300\":\"bg-transparent border-[var(--border-color)] text-[var(--text-tertiary)] hover:text-[var(--text-secondary)]\"),children:\"Errors\"}),C&&g.jsx(\"button\",{type:\"button\",onClick:B,className:\"h-6 px-2 rounded text-[10px] font-semibold uppercase tracking-wide border border-[var(--border-color)] text-[var(--text-tertiary)] hover:text-[var(--text-secondary)]\",children:\"Clear\"})]}),g.jsxs(\"div\",{className:\"flex items-center justify-between text-[9px] font-mono text-[var(--text-tertiary)]/80 px-0.5\",children:[g.jsxs(\"span\",{children:[\"showing \",k.length,\"/\",t.rows.length]}),g.jsxs(\"div\",{className:\"flex items-center gap-1.5\",children:[g.jsx(\"button\",{type:\"button\",onClick:A,disabled:C,className:\"uppercase disabled:opacity-40 disabled:cursor-not-allowed hover:text-[var(--text-secondary)]\",children:\"collapse\"}),g.jsx(\"button\",{type:\"button\",onClick:q,disabled:C,className:\"uppercase disabled:opacity-40 disabled:cursor-not-allowed hover:text-[var(--text-secondary)]\",children:\"expand\"})]})]}),g.jsxs(\"div\",{className:\"grid grid-cols-[minmax(0,1fr)_50px_52px_96px] gap-2 px-1 text-[9px] uppercase tracking-wider text-[var(--text-tertiary)]/70 font-mono\",children:[g.jsx(\"span\",{children:\"Name\"}),g.jsx(\"span\",{className:\"text-right\",children:\"Self\"}),g.jsx(\"span\",{className:\"text-right\",children:\"Total\"}),g.jsx(\"span\",{children:\"Waterfall\"})]}),g.jsxs(\"div\",{className:\"space-y-0.5 max-h-56 overflow-auto pr-1\",children:[k.map(V=>{const{span:N}=V,_=Math.max(0,N.startMs-n),z=KT(_/o*100),F=Number.isFinite(N.durationMs)&&N.durationMs>0?N.durationMs:0,O=Math.max(0,F-V.directChildDurationMs),$=Math.max(1.5,F/o*100),W=c===N.id,U=x.has(N.id);return g.jsxs(\"div\",{className:je(\"grid grid-cols-[minmax(0,1fr)_50px_52px_96px] gap-2 items-center rounded border px-1.5 py-1 cursor-pointer transition-colors\",W?\"bg-blue-500/10 border-blue-500/30\":\"border-transparent hover:bg-[var(--bg-hover)]\"),onClick:()=>u(N.id),role:\"button\",tabIndex:0,onKeyDown:K=>{(K.key===\"Enter\"||K.key===\" \")&&(K.preventDefault(),u(N.id))},children:[g.jsxs(\"div\",{className:\"min-w-0 flex items-center gap-1\",style:{paddingLeft:`${V.depth*10}px`},title:`${N.name} (${N.kind})`,children:[V.hasChildren?g.jsx(\"button\",{type:\"button\",onClick:K=>{K.stopPropagation(),P(N.id)},className:\"w-3 h-3 flex items-center justify-center text-[9px] text-[var(--text-tertiary)] hover:text-[var(--text-secondary)]\",title:U?\"Expand\":\"Collapse\",children:U?\">\":\"v\"}):g.jsx(\"span\",{className:\"w-3 h-3\"}),g.jsx(\"span\",{className:je(\"w-1.5 h-1.5 rounded-full\",N.status===\"error\"?\"bg-red-400\":\"bg-emerald-400\")}),g.jsx(\"span\",{className:\"font-mono text-[9px] uppercase text-[var(--text-tertiary)] shrink-0\",children:N.kind}),g.jsx(\"span\",{className:\"text-[11px] text-[var(--text-primary)] truncate\",children:N.name}),g.jsx(\"span\",{className:\"font-mono text-[9px] text-[var(--text-tertiary)]/80 ml-auto shrink-0\",children:qu(_)}),N.id===e.rootSpanId&&g.jsx(\"span\",{className:\"text-[9px] uppercase text-[var(--text-tertiary)] border border-[var(--border-color)] rounded px-1 py-0.5\",children:\"root\"})]}),g.jsx(\"div\",{className:\"font-mono text-[10px] text-[var(--text-tertiary)] text-right\",children:dc(O)}),g.jsx(\"div\",{className:\"font-mono text-[10px] text-[var(--text-tertiary)] text-right\",children:dc(F)}),g.jsxs(\"div\",{className:\"relative h-2.5 rounded bg-[var(--bg-secondary)] border border-[var(--border-color)] overflow-hidden\",children:[N.events?.map((K,ie)=>{const L=KT((K.atMs-n)/o*100);return g.jsx(\"span\",{className:\"absolute top-0 bottom-0 w-px bg-white/50\",style:{left:`${L}%`},title:`${K.name} @ ${qu(K.atMs-n)}`},`${N.id}:${ie}:${K.name}`)}),g.jsx(\"div\",{className:je(\"absolute top-0 bottom-0 rounded\",N.status===\"error\"?\"bg-red-400/85\":\"bg-blue-400/85\"),style:{left:`${z}%`,width:`${Math.min($,100)}%`}})]})]},N.id)}),k.length===0&&g.jsx(\"div\",{className:\"px-2 py-4 text-[11px] text-[var(--text-tertiary)] text-center border border-[var(--border-color)] rounded\",children:\"No spans match the current filter.\"})]}),M&&g.jsxs(\"div\",{className:\"border border-[var(--border-color)] rounded bg-[var(--bg-secondary)] px-2 py-1.5 space-y-1.5\",children:[g.jsxs(\"div\",{className:\"flex items-center gap-1.5\",children:[g.jsx(\"span\",{className:\"font-mono text-[9px] uppercase text-[var(--text-tertiary)]\",children:M.kind}),g.jsx(\"span\",{className:\"text-[11px] text-[var(--text-primary)] truncate\",title:M.name,children:M.name}),g.jsx(\"span\",{className:je(\"ml-auto text-[9px] uppercase font-semibold\",M.status===\"error\"?\"text-red-400\":\"text-emerald-400\"),children:M.status})]}),g.jsxs(\"div\",{className:\"flex flex-wrap items-center gap-1 text-[9px] font-mono text-[var(--text-tertiary)]\",children:[g.jsxs(\"span\",{className:\"px-1.5 py-0.5 rounded bg-[var(--bg-primary)]\",children:[\"start \",qu(M.startMs-n)]}),g.jsxs(\"span\",{className:\"px-1.5 py-0.5 rounded bg-[var(--bg-primary)]\",children:[\"end \",qu(M.endMs-n)]}),g.jsxs(\"span\",{className:\"px-1.5 py-0.5 rounded bg-[var(--bg-primary)]\",children:[\"self \",dc(j)]}),g.jsxs(\"span\",{className:\"px-1.5 py-0.5 rounded bg-[var(--bg-primary)]\",children:[\"total \",dc(M.durationMs)]}),g.jsx(\"span\",{className:\"px-1.5 py-0.5 rounded bg-[var(--bg-primary)]\",title:M.id,children:ZT(M.id,26)})]}),I.length>0&&g.jsx(\"div\",{className:\"flex flex-wrap gap-1\",children:I.map(([V,N])=>g.jsxs(\"span\",{className:\"px-1.5 py-0.5 rounded bg-[var(--bg-primary)] text-[9px] font-mono text-[var(--text-secondary)] break-all\",title:`${V}: ${JT(N)}`,children:[g.jsxs(\"span\",{className:\"text-[var(--text-tertiary)]\",children:[V,\"=\"]}),g.jsx(\"span\",{children:JT(N)})]},V))}),M.events&&M.events.length>0&&g.jsx(\"div\",{className:\"space-y-0.5 max-h-24 overflow-auto pr-1\",children:M.events.map((V,N)=>g.jsxs(\"div\",{className:\"text-[10px] font-mono text-[var(--text-secondary)]\",children:[g.jsx(\"span\",{className:\"text-[var(--text-tertiary)]\",children:qu(V.atMs-n)}),\" \",g.jsx(\"span\",{className:\"text-blue-400\",children:V.name}),V.attributes?` ${JSON.stringify(V.attributes)}`:\"\"]},`${M.id}:${N}:${V.name}`))})]})]})}function qW({log:e,isExpanded:t,onToggle:n,isCopied:a,onRowClick:o}){const s=QT[e.functionType]??QT.query,c=s.icon,u=e.logLines.length>0||!!e.error||!!e.trace,f=m.useCallback(h=>{h.stopPropagation();const v={functionName:e.functionName,functionType:e.functionType,status:e.status,duration:e.duration,timestamp:new Date(e.timestamp).toISOString(),...e.logLines.length>0&&{logLines:e.logLines},...e.error&&{error:e.error},...e.requestId&&{requestId:e.requestId},...e.trace&&{trace:e.trace}};navigator.clipboard.writeText(JSON.stringify(v,null,2)),o()},[e,o]);return g.jsxs(\"div\",{className:je(\"group border-b border-[var(--border-color)] last:border-b-0 transition-colors cursor-pointer select-none\",a?\"bg-emerald-500/10 duration-75\":je(\"duration-500 hover:bg-[var(--bg-hover)]\",e.status===\"error\"&&\"bg-red-500/[0.03]\")),children:[g.jsxs(\"div\",{className:\"flex items-center gap-2 px-3 py-1.5 min-h-[36px]\",onClick:h=>{h.target.closest(\"button\")||(u?n():o())},children:[g.jsx(\"div\",{className:\"w-4 h-4 flex items-center justify-center flex-shrink-0\",children:u?t?g.jsx(ns,{className:\"h-3.5 w-3.5 text-[var(--text-tertiary)]\"}):g.jsx(Ac,{className:\"h-3.5 w-3.5 text-[var(--text-tertiary)]\"}):null}),g.jsx(\"div\",{className:\"flex-shrink-0\",children:e.status===\"success\"?g.jsx(Wh,{className:\"h-3.5 w-3.5 text-emerald-500\"}):g.jsx(Mb,{className:\"h-3.5 w-3.5 text-red-400\"})}),g.jsxs(\"div\",{className:je(\"flex-shrink-0 flex items-center gap-1 px-1.5 py-0.5 rounded text-[10px] font-semibold leading-none\",s.bg,s.color),children:[g.jsx(c,{className:\"h-2.5 w-2.5\"}),s.label]}),g.jsx(\"code\",{className:\"text-xs text-[var(--text-primary)] font-medium truncate flex-1 min-w-0\",children:e.functionName}),e.error&&!t&&g.jsx(\"span\",{className:\"text-[10px] text-red-400 truncate max-w-[200px] hidden sm:block\",children:e.error}),e.logLines.length>0&&!t&&g.jsxs(\"span\",{className:\"text-[10px] text-[var(--text-tertiary)] tabular-nums flex-shrink-0\",children:[e.logLines.length,\" line\",e.logLines.length!==1?\"s\":\"\"]}),e.trace&&!t&&g.jsxs(\"span\",{className:\"text-[10px] text-cyan-400 tabular-nums flex-shrink-0\",children:[\"trace \",e.trace.summary.spanCount]}),g.jsx(\"span\",{className:je(\"text-[10px] tabular-nums flex-shrink-0 min-w-[48px] text-right\",e.duration>1e3?\"text-yellow-400\":\"text-[var(--text-tertiary)]\"),children:ab(e.duration)}),g.jsx(\"span\",{className:\"text-[10px] text-[var(--text-tertiary)] tabular-nums flex-shrink-0 min-w-[48px] text-right\",children:jW(e.timestamp)}),g.jsx(\"button\",{onClick:f,className:je(\"transition-opacity p-0.5 rounded hover:bg-[var(--bg-hover)] flex-shrink-0 cursor-pointer\",a?\"opacity-100\":\"opacity-0 group-hover:opacity-100\"),title:\"Copy as JSON\",children:a?g.jsx(xd,{className:\"h-3 w-3 text-emerald-400\"}):g.jsx(Rc,{className:\"h-3 w-3 text-[var(--text-tertiary)]\"})})]}),t&&u&&g.jsxs(\"div\",{className:\"px-3 pb-2 pl-[52px] space-y-1\",children:[e.error&&g.jsx(\"div\",{className:\"text-xs text-red-400 font-mono bg-red-500/10 rounded px-2 py-1.5 whitespace-pre-wrap break-all\",children:e.error}),e.logLines.length>0&&g.jsx(\"div\",{className:\"bg-[var(--bg-primary)] border border-[var(--border-color)] rounded px-2 py-1.5 space-y-0.5\",children:e.logLines.map((h,v)=>g.jsx(PW,{line:h},v))}),e.requestId&&g.jsxs(\"div\",{className:\"text-[10px] text-[var(--text-tertiary)] font-mono\",children:[\"request: \",e.requestId]}),e.trace&&g.jsx(HW,{trace:e.trace})]})]})}function FW(){const[e,t]=m.useState(\"\"),n=Id(),[a,o]=m.useState(\"all\"),[s,c]=m.useState(\"all\"),[u,f]=m.useState(new Set),[h,v]=m.useState(!0),[y,x]=m.useState(!0),[S,w]=m.useState(null),[,C]=m.useState(0),R=m.useRef(null),k=m.useRef(0),T=es(R6),M={limit:200};s!==\"all\"&&(M.functionType=s),a!==\"all\"&&(M.status=a),e.trim()&&(M.search=e.trim());const j=us(C6,M),I=j===void 0,P=j??[];m.useEffect(()=>{if(!y)return;const U=setInterval(()=>C(K=>K+1),2e3);return()=>clearInterval(U)},[y]),m.useEffect(()=>{const U=setInterval(()=>C(K=>K+1),1e4);return()=>clearInterval(U)},[]),m.useEffect(()=>{h&&R.current&&P.length!==k.current&&(R.current.scrollTop=0),k.current=P.length},[P.length,h]);const A=m.useCallback(U=>{f(K=>{const ie=new Set(K);return ie.has(U)?ie.delete(U):ie.add(U),ie})},[]),q=m.useCallback(async()=>{try{await T({})}catch(U){console.error(\"Failed to clear logs:\",U)}},[T]),B=m.useCallback(()=>{const U=P.filter(K=>K.logLines.length>0||!!K.error||!!K.trace);f(new Set(U.map(K=>K.id)))},[P]),V=m.useCallback(()=>{f(new Set)},[]),N=m.useCallback(U=>{w(U),setTimeout(()=>w(null),600)},[]),_=m.useCallback(U=>{const K=new Date(U.timestamp).toISOString(),ie=U.status===\"success\"?\"OK\":\"ERROR\",L=[`[${K}] [${U.functionType.toUpperCase()}] [${ie}] ${U.functionName} (${ab(U.duration)})`];U.error&&L.push(` ERROR: ${U.error}`),U.trace&&L.push(` TRACE: spans=${U.trace.summary.spanCount} events=${U.trace.summary.eventCount} duration=${ab(U.trace.summary.totalDurationMs)}`);for(const X of U.logLines)L.push(` ${X}`);return L.join(`\n`)},[]),[z,F]=m.useState(!1),O=m.useCallback(()=>{const U=P.map(_).join(`\n`);navigator.clipboard.writeText(U),F(!0),setTimeout(()=>F(!1),1500)},[P,_]),$=P.filter(U=>U.status===\"success\").length,W=P.filter(U=>U.status===\"error\").length;return g.jsxs(\"div\",{className:\"flex flex-col h-full bg-[var(--bg-tertiary)]\",children:[g.jsx(\"div\",{className:\"flex-shrink-0 border-b border-[var(--border-color)] bg-[var(--bg-primary)]\",children:g.jsxs(\"div\",{className:\"flex items-center gap-2 px-3 py-2\",children:[g.jsxs(\"div\",{className:\"relative flex-1 max-w-xs\",children:[g.jsx(wd,{className:\"absolute left-2 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-[var(--text-tertiary)] z-10\"}),g.jsx(ls,{ref:n,type:\"text\",value:e,onChange:U=>t(U.target.value),placeholder:\"Filter by function name or content...\",className:\"h-7 pl-7 pr-2 text-xs\"})]}),g.jsx(\"div\",{className:\"w-px h-5 bg-[var(--border-color)]\"}),[\"all\",\"query\",\"mutation\",\"action\"].map(U=>g.jsx(\"button\",{onClick:()=>c(U),className:je(\"px-2 py-1 text-[10px] font-medium rounded transition-colors cursor-pointer\",s===U?\"bg-[var(--accent-color)] text-white\":\"text-[var(--text-secondary)] hover:bg-[var(--bg-hover)]\"),children:U===\"all\"?\"All\":U.charAt(0).toUpperCase()+U.slice(1)},U)),g.jsx(\"div\",{className:\"w-px h-5 bg-[var(--border-color)]\"}),g.jsxs(\"button\",{onClick:()=>o(a===\"all\"?\"success\":a===\"success\"?\"error\":\"all\"),className:je(\"flex items-center gap-1 px-2 py-1 text-[10px] font-medium rounded transition-colors cursor-pointer\",a===\"error\"?\"bg-red-500/15 text-red-400\":a===\"success\"?\"bg-emerald-500/15 text-emerald-400\":\"text-[var(--text-secondary)] hover:bg-[var(--bg-hover)]\"),children:[a===\"all\"&&\"Status\",a===\"success\"&&g.jsxs(g.Fragment,{children:[g.jsx(Wh,{className:\"h-3 w-3\"}),\" Success\"]}),a===\"error\"&&g.jsxs(g.Fragment,{children:[g.jsx(Mb,{className:\"h-3 w-3\"}),\" Errors\"]})]}),g.jsx(\"div\",{className:\"flex-1\"}),g.jsxs(\"div\",{className:\"flex items-center gap-2 text-[10px]\",children:[g.jsxs(\"button\",{onClick:()=>o(\"all\"),className:je(\"tabular-nums transition-colors rounded px-1 py-0.5 cursor-pointer\",a===\"all\"?\"text-[var(--text-secondary)] font-medium\":\"text-[var(--text-tertiary)] hover:text-[var(--text-secondary)]\"),children:[P.length,\" entries\"]}),g.jsxs(\"button\",{onClick:()=>o(\"error\"),className:je(\"tabular-nums transition-colors rounded px-1 py-0.5 cursor-pointer\",a===\"error\"?\"text-red-400 bg-red-500/15 font-medium\":W>0?\"text-red-400/70 hover:text-red-400\":\"text-[var(--text-tertiary)]/40\"),children:[W,\" errors\"]}),g.jsxs(\"button\",{onClick:()=>o(\"success\"),className:je(\"tabular-nums transition-colors rounded px-1 py-0.5 cursor-pointer\",a===\"success\"?\"text-emerald-400 bg-emerald-500/15 font-medium\":$>0?\"text-emerald-500/70 hover:text-emerald-500\":\"text-[var(--text-tertiary)]/40\"),children:[$,\" ok\"]})]}),g.jsx(\"button\",{onClick:O,disabled:P.length===0||z,className:je(\"flex items-center gap-1 px-2 py-1 text-[10px] font-medium rounded transition-colors cursor-pointer\",z?\"bg-emerald-500/15 text-emerald-400\":P.length>0?\"text-[var(--text-tertiary)] hover:bg-[var(--bg-hover)] hover:text-[var(--text-secondary)]\":\"text-[var(--text-tertiary)]/30 !cursor-default\"),title:\"Copy all visible logs as plain text\",children:z?g.jsxs(g.Fragment,{children:[g.jsx(xd,{className:\"h-3 w-3\"}),\"Copied!\"]}):g.jsxs(g.Fragment,{children:[g.jsx(h4,{className:\"h-3 w-3\"}),\"Copy all (\",P.length,\")\"]})}),g.jsx(\"div\",{className:\"w-px h-5 bg-[var(--border-color)]\"}),g.jsx(\"button\",{onClick:u.size>0?V:B,className:\"p-1 rounded hover:bg-[var(--bg-hover)] text-[var(--text-tertiary)] cursor-pointer\",title:u.size>0?\"Collapse all\":\"Expand all\",children:u.size>0?g.jsx(ns,{className:\"h-3.5 w-3.5\"}):g.jsx(Ac,{className:\"h-3.5 w-3.5\"})}),g.jsx(\"button\",{onClick:()=>x(!y),className:je(\"flex items-center gap-1 px-2 py-1 text-[10px] font-medium rounded transition-colors cursor-pointer\",y?\"bg-emerald-500/15 text-emerald-400\":\"text-[var(--text-tertiary)] hover:bg-[var(--bg-hover)]\"),title:y?\"Pause live updates\":\"Resume live updates\",children:y?g.jsxs(g.Fragment,{children:[g.jsx(E4,{className:\"h-3 w-3\"}),\" Live\"]}):g.jsxs(g.Fragment,{children:[g.jsx(MM,{className:\"h-3 w-3\"}),\" Paused\"]})}),g.jsx(\"button\",{onClick:()=>v(!h),className:je(\"p-1 rounded transition-colors cursor-pointer\",h?\"text-[var(--accent-color)] bg-[var(--accent-color)]/10\":\"text-[var(--text-tertiary)] hover:bg-[var(--bg-hover)]\"),title:h?\"Auto-scroll on\":\"Auto-scroll off\",children:g.jsx(s4,{className:\"h-3.5 w-3.5\"})}),g.jsx(\"button\",{onClick:q,className:\"p-1 rounded hover:bg-[var(--bg-hover)] text-[var(--text-tertiary)] hover:text-red-400 cursor-pointer\",title:\"Clear logs\",children:g.jsx(Ks,{className:\"h-3.5 w-3.5\"})})]})}),g.jsx(\"div\",{ref:R,className:\"flex-1 overflow-auto\",children:I?g.jsx(\"div\",{className:\"flex items-center justify-center py-16\",children:g.jsx(hi,{className:\"h-5 w-5 animate-spin text-[var(--text-tertiary)]\"})}):P.length===0?g.jsxs(\"div\",{className:\"flex flex-col items-center justify-center py-16 gap-2\",children:[g.jsx(\"div\",{className:\"h-10 w-10 rounded-full bg-[var(--bg-secondary)] flex items-center justify-center\",children:g.jsx(kb,{className:\"h-5 w-5 text-[var(--text-tertiary)]\"})}),g.jsx(\"p\",{className:\"text-sm text-[var(--text-secondary)]\",children:\"No logs yet\"}),g.jsx(\"p\",{className:\"text-xs text-[var(--text-tertiary)]\",children:\"Execute a function to see logs here\"})]}):g.jsx(\"div\",{className:\"bg-[var(--bg-primary)]\",children:P.map(U=>g.jsx(qW,{log:U,isExpanded:u.has(U.id),onToggle:()=>A(U.id),isCopied:S===U.id,onRowClick:()=>{const K=`${U.functionName}: ${U.logLines.join(\" \")}${U.error?` ERROR: ${U.error}`:\"\"}`;navigator.clipboard.writeText(K),N(U.id)}},U.id))})})]})}function $W(){const[e,t]=m.useState(\"24h\"),n=us(E6,{timeRange:e}),a=n===void 0,o=n,s=[{id:\"24h\",label:\"Last 24 Hours\",icon:SM},{id:\"7d\",label:\"Last 7 Days\",icon:N4},{id:\"30d\",label:\"Last 30 Days\",icon:o4}];return g.jsxs(rd,{direction:\"horizontal\",className:\"h-full\",children:[g.jsx(ai,{defaultSize:25,minSize:15,maxSize:50,children:g.jsxs(\"div\",{className:\"h-full border-r border-[var(--border-color)] bg-[var(--bg-primary)] flex flex-col\",children:[g.jsxs(\"div\",{className:\"p-4 border-b border-[var(--border-color)]\",children:[g.jsx(\"h3\",{className:\"text-sm font-semibold text-[var(--text-primary)]\",children:\"Time Range\"}),g.jsx(\"p\",{className:\"text-xs text-[var(--text-secondary)] mt-1\",children:\"Select time period for metrics\"})]}),g.jsx(\"div\",{className:\"flex-1 overflow-auto py-2\",children:s.map(c=>{const u=c.icon,f=e===c.id;return g.jsxs(\"button\",{onClick:()=>t(c.id),className:je(\"w-full flex items-center gap-2 px-4 py-2 text-left hover:bg-[var(--bg-hover)] transition-colors\",f&&\"bg-[var(--bg-selected)] hover:bg-[var(--bg-selected)]\"),children:[g.jsx(u,{className:je(\"h-4 w-4\",f?\"text-[var(--accent-color)]\":\"text-[var(--text-tertiary)]\")}),g.jsx(\"span\",{className:je(\"text-sm flex-1\",f?\"text-[var(--accent-color)] font-medium\":\"text-[var(--text-primary)]\"),children:c.label})]},c.id)})}),g.jsx(\"div\",{className:\"p-4 border-t border-[var(--border-color)]\",children:g.jsxs(\"div\",{className:\"flex items-center gap-2 text-xs text-[var(--text-secondary)]\",children:[g.jsx(kb,{className:\"h-4 w-4\"}),g.jsx(\"span\",{children:\"Real-time metrics\"})]})})]})}),g.jsx(ad,{withHandle:!0}),g.jsx(ai,{defaultSize:75,className:\"h-full\",children:g.jsx(\"div\",{className:\"flex-1 p-6 overflow-auto bg-[var(--bg-secondary)]\",children:g.jsx(\"div\",{className:\"mx-auto max-w-5xl space-y-3\",children:g.jsx(\"div\",{className:\"bg-[var(--bg-primary)] border border-[var(--border-color)] rounded p-4\",children:a?g.jsx(\"div\",{className:\"flex items-center justify-center py-8\",children:g.jsx(hi,{className:\"h-5 w-5 animate-spin text-[var(--text-tertiary)]\"})}):o?g.jsxs(\"div\",{className:\"grid grid-cols-2 gap-4\",children:[g.jsxs(\"div\",{className:\"text-center p-3 bg-[var(--bg-secondary)] rounded\",children:[g.jsx(\"div\",{className:\"text-2xl font-bold text-[var(--text-primary)]\",children:o.totalRequests}),g.jsx(\"div\",{className:\"text-xs text-[var(--text-secondary)] mt-1\",children:\"Total Requests\"})]}),g.jsxs(\"div\",{className:\"text-center p-3 bg-[var(--bg-secondary)] rounded\",children:[g.jsxs(\"div\",{className:\"text-2xl font-bold text-[var(--text-primary)]\",children:[o.errorRate.toFixed(1),\"%\"]}),g.jsx(\"div\",{className:\"text-xs text-[var(--text-secondary)] mt-1\",children:\"Error Rate\"})]}),g.jsxs(\"div\",{className:\"text-center p-3 bg-[var(--bg-secondary)] rounded\",children:[g.jsxs(\"div\",{className:\"text-2xl font-bold text-[var(--text-primary)]\",children:[o.p95Latency,\"ms\"]}),g.jsx(\"div\",{className:\"text-xs text-[var(--text-secondary)] mt-1\",children:\"P95 Latency\"})]}),g.jsxs(\"div\",{className:\"text-center p-3 bg-[var(--bg-secondary)] rounded\",children:[g.jsx(\"div\",{className:\"text-2xl font-bold text-[var(--text-primary)]\",children:o.activeConnections}),g.jsx(\"div\",{className:\"text-xs text-[var(--text-secondary)] mt-1\",children:\"Active Connections\"})]})]}):g.jsxs(\"div\",{className:\"flex flex-col items-center justify-center py-16 gap-2\",children:[g.jsx(\"div\",{className:\"h-10 w-10 rounded-full bg-[var(--bg-tertiary)] flex items-center justify-center\",children:g.jsx(wM,{className:\"h-5 w-5 text-[var(--text-tertiary)]\"})}),g.jsx(\"p\",{className:\"text-sm text-[var(--text-secondary)]\",children:\"No metrics available\"}),g.jsx(\"p\",{className:\"text-xs text-[var(--text-tertiary)]\",children:\"Analytics data will appear once functions are executed\"})]})})})})})]})}function BW(){const[e,t]=m.useState(\"\"),n=Id(),a=us(A6),o=es(N6),s=a===void 0,c=(a||[]).filter(f=>f.name.toLowerCase().includes(e.toLowerCase())||f._id.toLowerCase().includes(e.toLowerCase())),u=async f=>{if(confirm(\"Are you sure you want to cancel this scheduled job?\"))try{await o({id:f})}catch(h){console.error(\"Failed to cancel job:\",h),alert(\"Failed to cancel job\")}};return s?g.jsx(\"div\",{className:\"flex items-center justify-center h-full\",children:g.jsx(hi,{className:\"h-8 w-8 animate-spin text-[var(--accent-color)]\"})}):g.jsxs(\"div\",{className:\"flex h-full flex-col bg-[var(--bg-secondary)]\",children:[g.jsxs(\"div\",{className:\"flex items-center justify-between border-b border-[var(--border-color)] bg-[var(--bg-primary)] px-3 py-2\",children:[g.jsx(\"div\",{className:\"flex items-center gap-2\",children:g.jsxs(\"span\",{className:\"rounded-full bg-[var(--bg-tertiary)] px-2.5 py-0.5 text-xs font-medium text-[var(--text-secondary)]\",children:[c.length,\" schedules\"]})}),g.jsxs(\"div\",{className:\"relative w-64\",children:[g.jsx(wd,{className:\"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-[var(--text-tertiary)] z-10\"}),g.jsx(ls,{ref:n,type:\"text\",placeholder:\"Search schedules...\",value:e,onChange:f=>t(f.target.value),className:\"pl-9\"})]})]}),g.jsx(\"div\",{className:\"flex-1 overflow-y-auto p-6\",children:c.length===0?g.jsxs(\"div\",{className:\"flex flex-col items-center justify-center rounded-lg border border-dashed border-[var(--border-color)] bg-[var(--bg-primary)] p-12 text-center\",children:[g.jsx(c4,{className:\"mb-4 h-12 w-12 text-[var(--text-tertiary)]\"}),g.jsx(\"h3\",{className:\"text-lg font-medium text-[var(--text-primary)]\",children:\"No scheduled functions found\"}),g.jsx(\"p\",{className:\"mt-1 text-sm text-[var(--text-secondary)]\",children:\"Scheduled jobs (crons) will appear here once registered.\"})]}):g.jsxs(\"div\",{className:\"space-y-4\",children:[g.jsxs(\"div\",{className:\"space-y-3\",children:[g.jsx(\"h3\",{className:\"text-sm font-semibold text-[var(--text-secondary)] uppercase tracking-wide\",children:\"Pending\"}),c.filter(f=>f.state.kind===\"pending\").map(f=>g.jsx(eM,{job:f,onCancel:()=>u(f._id)},f._id)),c.filter(f=>f.state.kind===\"pending\").length===0&&g.jsx(\"p\",{className:\"text-sm text-[var(--text-tertiary)] italic\",children:\"No pending jobs.\"})]}),g.jsxs(\"div\",{className:\"space-y-3 pt-6\",children:[g.jsx(\"h3\",{className:\"text-sm font-semibold text-[var(--text-secondary)] uppercase tracking-wide\",children:\"History\"}),c.filter(f=>f.state.kind!==\"pending\").map(f=>g.jsx(eM,{job:f},f._id))]})]})})]})}function eM({job:e,onCancel:t}){const n=e.state.kind===\"pending\",a=e.state.kind===\"failed\",o=e.state.kind===\"success\",s=e.state.kind===\"inProgress\";return g.jsxs(\"div\",{className:\"flex items-center justify-between rounded-lg border border-[var(--border-color)] bg-[var(--bg-primary)] p-4 shadow-sm transition hover:border-[var(--text-tertiary)]\",children:[g.jsxs(\"div\",{className:\"flex items-start gap-4\",children:[g.jsxs(\"div\",{className:\"mt-1\",children:[n&&g.jsx(SM,{className:\"h-5 w-5 text-[var(--text-tertiary)]\"}),o&&g.jsx(Wh,{className:\"h-5 w-5 text-[var(--success-color)]\"}),a&&g.jsx(eb,{className:\"h-5 w-5 text-[var(--error-color)]\"}),s&&g.jsx(hi,{className:\"h-5 w-5 animate-spin text-[var(--accent-color)]\"})]}),g.jsxs(\"div\",{children:[g.jsx(\"h4\",{className:\"font-medium text-[var(--text-primary)] font-mono text-sm\",children:e.name}),g.jsxs(\"div\",{className:\"mt-1 flex items-center gap-3 text-xs text-[var(--text-secondary)]\",children:[g.jsx(\"span\",{className:\"font-mono text-[var(--text-tertiary)]\",children:e._id}),g.jsx(\"span\",{children:\"•\"}),g.jsx(\"span\",{children:n?`Scheduled for ${EW(new Date(e.scheduledTime),\"MMM d, h:mm a\")} (${Rb(new Date(e.scheduledTime),{addSuffix:!0})})`:`Completed ${e.completedTime?Rb(new Date(e.completedTime),{addSuffix:!0}):\"unknown\"}`})]}),a&&e.error&&g.jsx(\"div\",{className:\"mt-2 rounded bg-red-50 dark:bg-red-900/20 px-2 py-1 text-xs text-red-600 dark:text-red-400 font-mono\",children:e.error})]})]}),t&&g.jsx(Js,{variant:\"ghost\",size:\"sm\",onClick:t,className:\"text-red-600 hover:text-red-700 dark:text-red-400 dark:hover:text-red-300\",children:g.jsx(Ks,{className:\"h-4 w-4\"})})]})}function UW(){const[e,t]=m.useState(()=>{const o=window.location.hash.replace(\"#\",\"\");return[\"tables\",\"functions\",\"storage\",\"logs\",\"analytics\",\"schedules\"].includes(o)?o:\"tables\"}),n=o=>{t(o),window.location.hash=o};m.useEffect(()=>{const o=()=>{const s=window.location.hash.replace(\"#\",\"\");[\"tables\",\"functions\",\"storage\",\"logs\",\"analytics\",\"schedules\"].includes(s)&&t(s)};return window.addEventListener(\"hashchange\",o),()=>window.removeEventListener(\"hashchange\",o)},[]);const a=()=>{switch(e){case\"tables\":return g.jsx(IT,{});case\"functions\":return g.jsx(nV,{});case\"storage\":return g.jsx(DW,{});case\"logs\":return g.jsx(FW,{});case\"analytics\":return g.jsx($W,{});case\"schedules\":return g.jsx(BW,{});default:return g.jsx(IT,{})}};return g.jsx(LU,{activeTab:e,children:g.jsx(Qz,{activeTab:e,onTabChange:o=>n(o),children:a()})})}function VW(){return g.jsx(O6,{children:g.jsx(UW,{})})}const WW=()=>typeof window<\"u\"&&window.location.pathname.startsWith(\"/_dashboard\")?`${window.location.protocol===\"https:\"?\"https:\":\"http:\"}//${window.location.host}`:\"http://localhost:8799\",GW=()=>{};function YW(e={}){const t=e.url??WW(),n=e.adminToken??GW(),a=new G5(t);return a.setAdminAuth&&a.setAdminAuth(n||\"local-admin\"),a}const XW=YW(),W3=document.getElementById(\"root\");if(!W3)throw new Error(\"Root element not found\");MD.createRoot(W3).render(g.jsx(At.StrictMode,{children:g.jsx(X5,{client:XW,children:g.jsx(p6,{children:g.jsx(VW,{})})})}));const QW=()=>e=>e.targetX,KW=()=>e=>e.targetY,ZW=()=>e=>e.targetWidth,JW=()=>e=>e.targetHeight,eG=()=>e=>e.targetY+10,tG=()=>e=>Math.max(0,(e.targetHeight-28)/2),nG=kr(\"div\")({name:\"DataGridOverlayEditorStyle\",class:\"gdg-d19meir1\",propsAsIs:!1,vars:{\"d19meir1-0\":[KW(),\"px\"],\"d19meir1-1\":[QW(),\"px\"],\"d19meir1-2\":[ZW(),\"px\"],\"d19meir1-3\":[JW(),\"px\"],\"d19meir1-4\":[eG(),\"px\"],\"d19meir1-5\":[tG(),\"px\"]}});function rG(){const[e,t]=m.useState();return[e??void 0,t]}function aG(){const[e,t]=rG(),[n,a]=m.useState(0),[o,s]=m.useState(!0);m.useLayoutEffect(()=>{if(e===void 0||!(\"IntersectionObserver\"in window))return;const u=new IntersectionObserver(f=>{f.length!==0&&s(f[0].isIntersecting)},{threshold:1});return u.observe(e),()=>u.disconnect()},[e]),m.useEffect(()=>{if(o||e===void 0)return;let u;const f=()=>{const{right:h}=e.getBoundingClientRect();a(v=>Math.min(v+window.innerWidth-h-10,0)),u=requestAnimationFrame(f)};return u=requestAnimationFrame(f),()=>{u!==void 0&&cancelAnimationFrame(u)}},[e,o]);const c=m.useMemo(()=>({transform:`translateX(${n}px)`}),[n]);return{ref:t,style:c}}const iG=e=>{const{target:t,content:n,onFinishEditing:a,forceEditMode:o,initialValue:s,imageEditorOverride:c,markdownDivCreateNode:u,highlight:f,className:h,theme:v,id:y,cell:x,bloom:S,validateCell:w,getCellRenderer:C,provideEditor:R,isOutsideClick:k}=e,[T,M]=m.useState(o?n:void 0),j=m.useRef(T??n);j.current=T??n;const[I,P]=m.useState(()=>w===void 0?!0:!(Ki(n)&&w?.(x,n,j.current)===!1)),A=m.useCallback((ne,me)=>{a(I?ne:void 0,me)},[I,a]),q=m.useCallback(ne=>{if(w!==void 0&&ne!==void 0&&Ki(ne)){const me=w(x,ne,j.current);me===!1?P(!1):(typeof me==\"object\"&&(ne=me),P(!0))}M(ne)},[x,w]),B=m.useRef(!1),V=m.useRef(void 0),N=m.useCallback(()=>{A(T,[0,0]),B.current=!0},[T,A]),_=m.useCallback((ne,me)=>{A(ne,me??V.current??[0,0]),B.current=!0},[A]),z=m.useCallback(async ne=>{let me=!1;ne.key===\"Escape\"?(ne.stopPropagation(),ne.preventDefault(),V.current=[0,0]):ne.key===\"Enter\"&&!ne.shiftKey?(ne.stopPropagation(),ne.preventDefault(),V.current=[0,1],me=!0):ne.key===\"Tab\"&&(ne.stopPropagation(),ne.preventDefault(),V.current=[ne.shiftKey?-1:1,0],me=!0),window.setTimeout(()=>{!B.current&&V.current!==void 0&&(A(me?T:void 0,V.current),B.current=!0)},0)},[A,T]),F=T??n,[O,$]=m.useMemo(()=>{if(Zs(n))return[];const ne=R?.(n);return ne!==void 0?[ne,!1]:[C(n)?.provideEditor?.(n),!1]},[n,C,R]),{ref:W,style:U}=aG();let K=!0,ie,L=!0,X;if(O!==void 0){K=O.disablePadding!==!0,L=O.disableStyling!==!0;const ne=Xk(O);ne&&(X=O.styleOverride);const me=ne?O.editor:O;ie=m.createElement(me,{isHighlighted:f,onChange:q,value:F,initialValue:s,onFinishedEditing:_,validatedSelection:Ki(F)?F.selectionRange:void 0,forceEditMode:o,target:t,imageEditorOverride:c,markdownDivCreateNode:u,isValid:I,theme:v})}X={...X,...U};const Y=document.getElementById(\"portal\");if(Y===null)return console.error('Cannot open Data Grid overlay editor, because portal not found. Please add `<div id=\"portal\" />` as the last child of your `<body>`.'),null;let re=L?\"gdg-style\":\"gdg-unstyle\";I||(re+=\" gdg-invalid\"),K&&(re+=\" gdg-pad\");const Z=S?.[0]??1,oe=S?.[1]??1;return Sd.createPortal(m.createElement(A_.Provider,{value:v},m.createElement(nA,{style:M_(v),className:h,onClickOutside:N,isOutsideClick:k},m.createElement(nG,{ref:W,id:y,className:re,style:X,as:$===!0?\"label\":void 0,targetX:t.x-Z,targetY:t.y-oe,targetWidth:t.width+Z*2,targetHeight:t.height+oe*2},m.createElement(\"div\",{className:\"gdg-clip-region\",onKeyDown:z},ie)))),Y)},oG=Object.freeze(Object.defineProperty({__proto__:null,default:iG},Symbol.toStringTag,{value:\"Module\"})),sG=kr(\"div\")({name:\"NumberOverlayEditorStyle\",class:\"gdg-n15fjm3e\",propsAsIs:!1});function G3(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols==\"function\")for(var o=0,a=Object.getOwnPropertySymbols(e);o<a.length;o++)t.indexOf(a[o])<0&&Object.prototype.propertyIsEnumerable.call(e,a[o])&&(n[a[o]]=e[a[o]]);return n}var yd;(function(e){e.event=\"event\",e.props=\"prop\"})(yd||(yd={}));function Jo(){}function lG(e){var t,n=void 0;return function(){for(var a=[],o=arguments.length;o--;)a[o]=arguments[o];return t&&a.length===t.length&&a.every(function(s,c){return s===t[c]})||(t=a,n=e.apply(void 0,a)),n}}function bd(e){return!!(e||\"\").match(/\\d/)}function wc(e){return e==null}function cG(e){return typeof e==\"number\"&&isNaN(e)}function Y3(e){return wc(e)||cG(e)||typeof e==\"number\"&&!isFinite(e)}function X3(e){return e.replace(/[-[\\]/{}()*+?.\\\\^$|]/g,\"\\\\$&\")}function uG(e){switch(e){case\"lakh\":return/(\\d+?)(?=(\\d\\d)+(\\d)(?!\\d))(\\.\\d+)?/g;case\"wan\":return/(\\d)(?=(\\d{4})+(?!\\d))/g;default:return/(\\d)(?=(\\d{3})+(?!\\d))/g}}function dG(e,t,n){var a=uG(n),o=e.search(/[1-9]/);return o=o===-1?e.length:o,e.substring(0,o)+e.substring(o,e.length).replace(a,\"$1\"+t)}function fG(e){var t=m.useRef(e);t.current=e;var n=m.useRef(function(){for(var a=[],o=arguments.length;o--;)a[o]=arguments[o];return t.current.apply(t,a)});return n.current}function L1(e,t){t===void 0&&(t=!0);var n=e[0]===\"-\",a=n&&t;e=e.replace(\"-\",\"\");var o=e.split(\".\"),s=o[0],c=o[1]||\"\";return{beforeDecimal:s,afterDecimal:c,hasNegation:n,addNegation:a}}function hG(e){if(!e)return e;var t=e[0]===\"-\";t&&(e=e.substring(1,e.length));var n=e.split(\".\"),a=n[0].replace(/^0+/,\"\")||\"0\",o=n[1]||\"\";return(t?\"-\":\"\")+a+(o?\".\"+o:\"\")}function Q3(e,t,n){for(var a=\"\",o=n?\"0\":\"\",s=0;s<=t-1;s++)a+=e[s]||o;return a}function tM(e,t){return Array(t+1).join(e)}function K3(e){var t=e+\"\",n=t[0]===\"-\"?\"-\":\"\";n&&(t=t.substring(1));var a=t.split(/[eE]/g),o=a[0],s=a[1];if(s=Number(s),!s)return n+o;o=o.replace(\".\",\"\");var c=1+s,u=o.length;return c<0?o=\"0.\"+tM(\"0\",Math.abs(c))+o:c>=u?o=o+tM(\"0\",c-u):o=(o.substring(0,c)||\"0\")+\".\"+o.substring(c),n+o}function nM(e,t,n){if([\"\",\"-\"].indexOf(e)!==-1)return e;var a=(e.indexOf(\".\")!==-1||n)&&t,o=L1(e),s=o.beforeDecimal,c=o.afterDecimal,u=o.hasNegation,f=parseFloat(\"0.\"+(c||\"0\")),h=c.length<=t?\"0.\"+c:f.toFixed(t),v=h.split(\".\"),y=s;s&&Number(v[0])&&(y=s.split(\"\").reverse().reduce(function(C,R,k){return C.length>k?(Number(C[0])+Number(R)).toString()+C.substring(1,C.length):R+C},v[0]));var x=Q3(v[1]||\"\",t,n),S=u?\"-\":\"\",w=a?\".\":\"\";return\"\"+S+y+w+x}function Qs(e,t){if(e.value=e.value,e!==null){if(e.createTextRange){var n=e.createTextRange();return n.move(\"character\",t),n.select(),!0}return e.selectionStart||e.selectionStart===0?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}var Z3=lG(function(e,t){for(var n=0,a=0,o=e.length,s=t.length;e[n]===t[n]&&n<o;)n++;for(;e[o-1-a]===t[s-1-a]&&s-a>n&&o-a>n;)a++;return{from:{start:n,end:o-a},to:{start:n,end:s-a}}}),mG=function(e,t){var n=Math.min(e.selectionStart,t);return{from:{start:n,end:e.selectionEnd},to:{start:n,end:t}}};function pG(e,t,n){return Math.min(Math.max(e,t),n)}function X0(e){return Math.max(e.selectionStart,e.selectionEnd)}function gG(){return typeof navigator<\"u\"&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function vG(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:\"\"}}function yG(e){var t=e.currentValue,n=e.formattedValue,a=e.currentValueIndex,o=e.formattedValueIndex;return t[a]===n[o]}function bG(e,t,n,a,o,s,c){c===void 0&&(c=yG);var u=o.findIndex(function(j){return j}),f=e.slice(0,u);!t&&!n.startsWith(f)&&(t=f,n=f+n,a=a+f.length);for(var h=n.length,v=e.length,y={},x=new Array(h),S=0;S<h;S++){x[S]=-1;for(var w=0,C=v;w<C;w++){var R=c({currentValue:n,lastValue:t,formattedValue:e,currentValueIndex:S,formattedValueIndex:w});if(R&&y[w]!==!0){x[S]=w,y[w]=!0;break}}}for(var k=a;k<h&&(x[k]===-1||!s(n[k]));)k++;var T=k===h||x[k]===-1?v:x[k];for(k=a-1;k>0&&x[k]===-1;)k--;var M=k===-1||x[k]===-1?0:x[k]+1;return M>T?T:a-M<T-a?M:T}function rM(e,t,n,a){var o=e.length;if(t=pG(t,0,o),a===\"left\"){for(;t>=0&&!n[t];)t--;t===-1&&(t=n.indexOf(!0))}else{for(;t<=o&&!n[t];)t++;t>o&&(t=n.lastIndexOf(!0))}return t===-1&&(t=o),t}function xG(e){for(var t=Array.from({length:e.length+1}).map(function(){return!0}),n=0,a=t.length;n<a;n++)t[n]=!!(bd(e[n])||bd(e[n-1]));return t}function J3(e,t,n,a,o,s){s===void 0&&(s=Jo);var c=fG(function(w,C){var R,k;return Y3(w)?(k=\"\",R=\"\"):typeof w==\"number\"||C?(k=typeof w==\"number\"?K3(w):w,R=a(k)):(k=o(w,void 0),R=a(k)),{formattedValue:R,numAsString:k}}),u=m.useState(function(){return c(wc(e)?t:e,n)}),f=u[0],h=u[1],v=function(w,C){w.formattedValue!==f.formattedValue&&h({formattedValue:w.formattedValue,numAsString:w.value}),s(w,C)},y=e,x=n;wc(e)&&(y=f.numAsString,x=!0);var S=c(y,x);return m.useMemo(function(){h(S)},[S.formattedValue]),[f,v]}function wG(e){return e.replace(/[^0-9]/g,\"\")}function SG(e){return e}function CG(e){var t=e.type;t===void 0&&(t=\"text\");var n=e.displayType;n===void 0&&(n=\"input\");var a=e.customInput,o=e.renderText,s=e.getInputRef,c=e.format;c===void 0&&(c=SG);var u=e.removeFormatting;u===void 0&&(u=wG);var f=e.defaultValue,h=e.valueIsNumericString,v=e.onValueChange,y=e.isAllowed,x=e.onChange;x===void 0&&(x=Jo);var S=e.onKeyDown;S===void 0&&(S=Jo);var w=e.onMouseUp;w===void 0&&(w=Jo);var C=e.onFocus;C===void 0&&(C=Jo);var R=e.onBlur;R===void 0&&(R=Jo);var k=e.value,T=e.getCaretBoundary;T===void 0&&(T=xG);var M=e.isValidInputCharacter;M===void 0&&(M=bd);var j=e.isCharacterSame,I=G3(e,[\"type\",\"displayType\",\"customInput\",\"renderText\",\"getInputRef\",\"format\",\"removeFormatting\",\"defaultValue\",\"valueIsNumericString\",\"onValueChange\",\"isAllowed\",\"onChange\",\"onKeyDown\",\"onMouseUp\",\"onFocus\",\"onBlur\",\"value\",\"getCaretBoundary\",\"isValidInputCharacter\",\"isCharacterSame\"]),P=J3(k,f,!!h,c,u,v),A=P[0],q=A.formattedValue,B=A.numAsString,V=P[1],N=m.useRef(),_=m.useRef({formattedValue:q,numAsString:B}),z=function(xe,G){_.current={formattedValue:xe.formattedValue,numAsString:xe.value},V(xe,G)},F=m.useState(!1),O=F[0],$=F[1],W=m.useRef(null),U=m.useRef({setCaretTimeout:null,focusTimeout:null});m.useEffect(function(){return $(!0),function(){clearTimeout(U.current.setCaretTimeout),clearTimeout(U.current.focusTimeout)}},[]);var K=c,ie=function(xe,G){var se=parseFloat(G);return{formattedValue:xe,value:G,floatValue:isNaN(se)?void 0:se}},L=function(xe,G,se){xe.selectionStart===0&&xe.selectionEnd===xe.value.length||(Qs(xe,G),U.current.setCaretTimeout=setTimeout(function(){xe.value===se&&xe.selectionStart!==G&&Qs(xe,G)},0))},X=function(xe,G,se){return rM(xe,G,T(xe),se)},Y=function(xe,G,se){var ge=T(G),Ne=bG(G,q,xe,se,ge,M,j);return Ne=rM(G,Ne,ge),Ne},re=function(xe){var G=xe.formattedValue;G===void 0&&(G=\"\");var se=xe.input,ge=xe.source,Ne=xe.event,Re=xe.numAsString,ze;if(se){var Ge=xe.inputValue||se.value,Xe=X0(se);se.value=G,ze=Y(Ge,G,Xe),ze!==void 0&&L(se,ze,G)}G!==q&&z(ie(G,Re),{event:Ne,source:ge})};m.useEffect(function(){var xe=_.current,G=xe.formattedValue,se=xe.numAsString;(q!==G||B!==se)&&z(ie(q,B),{event:void 0,source:yd.props})},[q,B]);var Z=W.current?X0(W.current):void 0,oe=typeof window<\"u\"?m.useLayoutEffect:m.useEffect;oe(function(){var xe=W.current;if(q!==_.current.formattedValue&&xe){var G=Y(_.current.formattedValue,q,Z);xe.value=q,L(xe,G,q)}},[q]);var ne=function(xe,G,se){var ge=G.target,Ne=N.current?mG(N.current,ge.selectionEnd):Z3(q,xe),Re=Object.assign(Object.assign({},Ne),{lastValue:q}),ze=u(xe,Re),Ge=K(ze);if(ze=u(Ge,void 0),y&&!y(ie(Ge,ze))){var Xe=G.target,Pe=X0(Xe),Mt=Y(xe,q,Pe);return Xe.value=q,L(Xe,Mt,q),!1}return re({formattedValue:Ge,numAsString:ze,inputValue:xe,event:G,source:se,input:G.target}),!0},me=function(xe,G){G===void 0&&(G=0);var se=xe.selectionStart,ge=xe.selectionEnd;N.current={selectionStart:se,selectionEnd:ge+G}},Me=function(xe){var G=xe.target,se=G.value,ge=ne(se,xe,yd.event);ge&&x(xe),N.current=void 0},Fe=function(xe){var G=xe.target,se=xe.key,ge=G.selectionStart,Ne=G.selectionEnd,Re=G.value;Re===void 0&&(Re=\"\");var ze;se===\"ArrowLeft\"||se===\"Backspace\"?ze=Math.max(ge-1,0):se===\"ArrowRight\"?ze=Math.min(ge+1,Re.length):se===\"Delete\"&&(ze=ge);var Ge=0;se===\"Delete\"&&ge===Ne&&(Ge=1);var Xe=se===\"ArrowLeft\"||se===\"ArrowRight\";if(ze===void 0||ge!==Ne&&!Xe){S(xe),me(G,Ge);return}var Pe=ze;if(Xe){var Mt=se===\"ArrowLeft\"?\"left\":\"right\";Pe=X(Re,ze,Mt),Pe!==ze&&xe.preventDefault()}else se===\"Delete\"&&!M(Re[ze])?Pe=X(Re,ze,\"right\"):se===\"Backspace\"&&!M(Re[ze])&&(Pe=X(Re,ze,\"left\"));Pe!==ze&&L(G,Pe,Re),S(xe),me(G,Ge)},Ue=function(xe){var G=xe.target,se=function(){var ge=G.selectionStart,Ne=G.selectionEnd,Re=G.value;if(Re===void 0&&(Re=\"\"),ge===Ne){var ze=X(Re,ge);ze!==ge&&L(G,ze,Re)}};se(),requestAnimationFrame(function(){se()}),w(xe),me(G)},tt=function(xe){xe.persist&&xe.persist();var G=xe.target,se=xe.currentTarget;W.current=G,U.current.focusTimeout=setTimeout(function(){var ge=G.selectionStart,Ne=G.selectionEnd,Re=G.value;Re===void 0&&(Re=\"\");var ze=X(Re,ge);ze!==ge&&!(ge===0&&Ne===Re.length)&&L(G,ze,Re),C(Object.assign(Object.assign({},xe),{currentTarget:se}))},0)},Le=function(xe){W.current=null,clearTimeout(U.current.focusTimeout),clearTimeout(U.current.setCaretTimeout),R(xe)},Ve=O&&gG()?\"numeric\":void 0,Je=Object.assign({inputMode:Ve},I,{type:t,value:q,onChange:Me,onKeyDown:Fe,onMouseUp:Ue,onFocus:tt,onBlur:Le});if(n===\"text\")return o?At.createElement(At.Fragment,null,o(q,I)||null):At.createElement(\"span\",Object.assign({},I,{ref:s}),q);if(a){var jt=a;return At.createElement(jt,Object.assign({},Je,{ref:s}))}return At.createElement(\"input\",Object.assign({},Je,{ref:s}))}function aM(e,t){var n=t.decimalScale,a=t.fixedDecimalScale,o=t.prefix;o===void 0&&(o=\"\");var s=t.suffix;s===void 0&&(s=\"\");var c=t.allowNegative,u=t.thousandsGroupStyle;if(u===void 0&&(u=\"thousand\"),e===\"\"||e===\"-\")return e;var f=Mm(t),h=f.thousandSeparator,v=f.decimalSeparator,y=n!==0&&e.indexOf(\".\")!==-1||n&&a,x=L1(e,c),S=x.beforeDecimal,w=x.afterDecimal,C=x.addNegation;return n!==void 0&&(w=Q3(w,n,!!a)),h&&(S=dG(S,h,u)),o&&(S=o+S),s&&(w=w+s),C&&(S=\"-\"+S),e=S+(y&&v||\"\")+w,e}function Mm(e){var t=e.decimalSeparator;t===void 0&&(t=\".\");var n=e.thousandSeparator,a=e.allowedDecimalSeparators;return n===!0&&(n=\",\"),a||(a=[t,\".\"]),{decimalSeparator:t,thousandSeparator:n,allowedDecimalSeparators:a}}function RG(e,t){e===void 0&&(e=\"\");var n=new RegExp(\"(-)\"),a=new RegExp(\"(-)(.)*(-)\"),o=n.test(e),s=a.test(e);return e=e.replace(/-/g,\"\"),o&&!s&&t&&(e=\"-\"+e),e}function EG(e,t){return new RegExp(\"(^-)|[0-9]|\"+X3(e),\"g\")}function TG(e,t,n){return e===\"\"?!0:!t?.match(/\\d/)&&!n?.match(/\\d/)&&typeof e==\"string\"&&!isNaN(Number(e))}function MG(e,t,n){var a;t===void 0&&(t=vG(e));var o=n.allowNegative,s=n.prefix;s===void 0&&(s=\"\");var c=n.suffix;c===void 0&&(c=\"\");var u=n.decimalScale,f=t.from,h=t.to,v=h.start,y=h.end,x=Mm(n),S=x.allowedDecimalSeparators,w=x.decimalSeparator,C=e[y]===w;if(bd(e)&&(e===s||e===c)&&t.lastValue===\"\")return e;if(y-v===1&&S.indexOf(e[v])!==-1){var R=u===0?\"\":w;e=e.substring(0,v)+R+e.substring(v+1,e.length)}var k=function(W,U,K){var ie=!1,L=!1;s.startsWith(\"-\")?ie=!1:W.startsWith(\"--\")?(ie=!1,L=!0):c.startsWith(\"-\")&&W.length===c.length?ie=!1:W[0]===\"-\"&&(ie=!0);var X=ie?1:0;return L&&(X=2),X&&(W=W.substring(X),U-=X,K-=X),{value:W,start:U,end:K,hasNegation:ie}},T=k(e,v,y),M=T.hasNegation;a=T,e=a.value,v=a.start,y=a.end;var j=k(t.lastValue,f.start,f.end),I=j.start,P=j.end,A=j.value,q=e.substring(v,y);e.length&&A.length&&(I>A.length-c.length||P<s.length)&&!(q&&c.startsWith(q))&&(e=A);var B=0;e.startsWith(s)?B+=s.length:v<s.length&&(B=v),e=e.substring(B),y-=B;var V=e.length,N=e.length-c.length;e.endsWith(c)?V=N:(y>N||y>e.length-c.length)&&(V=y),e=e.substring(0,V),e=RG(M?\"-\"+e:e,o),e=(e.match(EG(w))||[]).join(\"\");var _=e.indexOf(w);e=e.replace(new RegExp(X3(w),\"g\"),function(W,U){return U===_?\".\":\"\"});var z=L1(e,o),F=z.beforeDecimal,O=z.afterDecimal,$=z.addNegation;return h.end-h.start<f.end-f.start&&F===\"\"&&C&&!parseFloat(O)&&(e=$?\"-\":\"\"),e}function kG(e,t){var n=t.prefix;n===void 0&&(n=\"\");var a=t.suffix;a===void 0&&(a=\"\");var o=Array.from({length:e.length+1}).map(function(){return!0}),s=e[0]===\"-\";o.fill(!1,0,n.length+(s?1:0));var c=e.length;return o.fill(!1,c-a.length+1,c+1),o}function _G(e){var t=Mm(e),n=t.thousandSeparator,a=t.decimalSeparator,o=e.prefix;o===void 0&&(o=\"\");var s=e.allowNegative;if(s===void 0&&(s=!0),n===a)throw new Error(`\n Decimal separator can't be same as thousand separator.\n thousandSeparator: `+n+` (thousandSeparator = {true} is same as thousandSeparator = \",\")\n decimalSeparator: `+a+` (default value for decimalSeparator is .)\n `);return o.startsWith(\"-\")&&s&&(console.error(`\n Prefix can't start with '-' when allowNegative is true.\n prefix: `+o+`\n allowNegative: `+s+`\n `),s=!1),Object.assign(Object.assign({},e),{allowNegative:s})}function AG(e){e=_G(e),e.decimalSeparator,e.allowedDecimalSeparators,e.thousandsGroupStyle;var t=e.suffix,n=e.allowNegative,a=e.allowLeadingZeros,o=e.onKeyDown;o===void 0&&(o=Jo);var s=e.onBlur;s===void 0&&(s=Jo);var c=e.thousandSeparator,u=e.decimalScale,f=e.fixedDecimalScale,h=e.prefix;h===void 0&&(h=\"\");var v=e.defaultValue,y=e.value,x=e.valueIsNumericString,S=e.onValueChange,w=G3(e,[\"decimalSeparator\",\"allowedDecimalSeparators\",\"thousandsGroupStyle\",\"suffix\",\"allowNegative\",\"allowLeadingZeros\",\"onKeyDown\",\"onBlur\",\"thousandSeparator\",\"decimalScale\",\"fixedDecimalScale\",\"prefix\",\"defaultValue\",\"value\",\"valueIsNumericString\",\"onValueChange\"]),C=Mm(e),R=C.decimalSeparator,k=C.allowedDecimalSeparators,T=function($){return aM($,e)},M=function($,W){return MG($,W,e)},j=wc(y)?v:y,I=x??TG(j,h,t);wc(y)?wc(v)||(I=I||typeof v==\"number\"):I=I||typeof y==\"number\";var P=function($){return Y3($)?$:(typeof $==\"number\"&&($=K3($)),I&&typeof u==\"number\"?nM($,u,!!f):$)},A=J3(P(y),P(v),!!I,T,M,S),q=A[0],B=q.numAsString,V=q.formattedValue,N=A[1],_=function($){var W=$.target,U=$.key,K=W.selectionStart,ie=W.selectionEnd,L=W.value;if(L===void 0&&(L=\"\"),(U===\"Backspace\"||U===\"Delete\")&&ie<h.length){$.preventDefault();return}if(K!==ie){o($);return}U===\"Backspace\"&&L[0]===\"-\"&&K===h.length+1&&n&&Qs(W,1),u&&f&&(U===\"Backspace\"&&L[K-1]===R?(Qs(W,K-1),$.preventDefault()):U===\"Delete\"&&L[K]===R&&$.preventDefault()),k?.includes(U)&&L[K]===R&&Qs(W,K+1);var X=c===!0?\",\":c;U===\"Backspace\"&&L[K-1]===X&&Qs(W,K-1),U===\"Delete\"&&L[K]===X&&Qs(W,K+1),o($)},z=function($){var W=B;if(W.match(/\\d/g)||(W=\"\"),a||(W=hG(W)),f&&u&&(W=nM(W,u,f)),W!==B){var U=aM(W,e);N({formattedValue:U,value:W,floatValue:parseFloat(W)},{event:$,source:yd.event})}s($)},F=function($){return $===R?!0:bd($)},O=function($){var W=$.currentValue,U=$.lastValue,K=$.formattedValue,ie=$.currentValueIndex,L=$.formattedValueIndex,X=W[ie],Y=K[L],re=Z3(U,W),Z=re.to,oe=function(ne){return M(ne).indexOf(\".\")+h.length};return y===0&&f&&u&&W[Z.start]===R&&oe(W)<ie&&oe(K)>L?!1:ie>=Z.start&&ie<Z.end&&k&&k.includes(X)&&Y===R?!0:X===Y};return Object.assign(Object.assign({},w),{value:V,valueIsNumericString:!1,isValidInputCharacter:F,isCharacterSame:O,onValueChange:N,format:T,removeFormatting:M,getCaretBoundary:function($){return kG($,e)},onKeyDown:_,onBlur:z})}function NG(e){var t=AG(e);return At.createElement(CG,Object.assign({},t))}function eO(){return Intl.NumberFormat()?.formatToParts(1.1)?.find(n=>n.type===\"decimal\")?.value??\".\"}function OG(){return eO()===\".\"?\",\":\".\"}const DG=e=>{const{value:t,onChange:n,disabled:a,highlight:o,validatedSelection:s,fixedDecimals:c,allowNegative:u,thousandSeparator:f,decimalSeparator:h}=e,v=m.useRef();return m.useLayoutEffect(()=>{if(s!==void 0){const y=typeof s==\"number\"?[s,null]:s;v.current?.setSelectionRange(y[0],y[1])}},[s]),m.createElement(sG,null,m.createElement(NG,{autoFocus:!0,getInputRef:v,className:\"gdg-input\",onFocus:y=>y.target.setSelectionRange(o?0:y.target.value.length,y.target.value.length),disabled:a===!0,decimalScale:c,allowNegative:u,thousandSeparator:f??OG(),decimalSeparator:h??eO(),value:Object.is(t,-0)?\"-\":t??\"\",onValueChange:n}))},jG=Object.freeze(Object.defineProperty({__proto__:null,default:DG},Symbol.toStringTag,{value:\"Module\"}));\n\n</script>\n <style>\n.gdg-mnuv029{word-break:break-word;-webkit-touch-callout:default;padding-top:6px}.gdg-mnuv029>*{margin:0}.gdg-mnuv029 *:last-child{margin-bottom:0}.gdg-mnuv029 p img{width:100%}.gdg-d19meir1{position:absolute;display:flex;flex-direction:column;overflow:hidden;box-sizing:border-box;--overlay-top:var(--d19meir1-0);left:var(--d19meir1-1);top:var(--d19meir1-0);min-width:var(--d19meir1-2);min-height:var(--d19meir1-3);width:-moz-max-content;width:max-content;max-width:400px;max-height:calc(100vh - var(--d19meir1-4));font-family:var(--gdg-font-family);font-size:var(--gdg-editor-font-size);text-align:start}@keyframes glide_fade_in-gdg-d19meir1{0%{opacity:0%}to{opacity:100%}}.gdg-d19meir1.gdg-style{border-radius:2px;background-color:var(--gdg-bg-cell);box-shadow:0 0 0 1px var(--gdg-accent-color),0 0 1px #3e415666,0 6px 12px #3e415626;animation:glide_fade_in-gdg-d19meir1 60ms 1}.gdg-d19meir1.gdg-pad{padding:var(--d19meir1-5) 8.5px 3px}.gdg-d19meir1 .gdg-clip-region{display:flex;flex-direction:column;overflow-y:auto;overflow-x:hidden;border-radius:2px;flex-grow:1}.gdg-d19meir1 .gdg-clip-region .gdg-growing-entry{height:100%}.gdg-d19meir1 .gdg-clip-region input.gdg-input{width:100%;border:none;border-width:0;outline:none}.gdg-d19meir1 .gdg-clip-region textarea.gdg-input{border:none;border-width:0;outline:none}.gdg-b1ygi5by{display:flex;flex-wrap:wrap;margin-top:auto;margin-bottom:auto}.gdg-b1ygi5by .boe-bubble{display:flex;justify-content:center;align-items:center;border-radius:var(--gdg-rounding-radius,10px);padding:0 8px;height:20px;background-color:var(--gdg-bg-bubble);color:var(--gdg-text-dark);margin:2px}.gdg-b1ygi5by textarea{position:absolute;top:0;left:0;width:0px;height:0px;opacity:0}.gdg-n15fjm3e{display:flex;margin:6px 0 3px;color:var(--gdg-text-dark)}.gdg-n15fjm3e>input{font-size:var(--gdg-editor-font-size);padding:0;font-family:var(--gdg-font-family);color:var(--gdg-text-dark);background-color:var(--gdg-bg-cell)}.gdg-d4zsq0x{display:flex;flex-wrap:wrap}.gdg-d4zsq0x .doe-bubble{display:flex;justify-content:center;align-items:center;padding:0 8px;height:24px;background-color:var(--gdg-bg-cell);color:var(--gdg-text-dark);margin:2px;border-radius:var(--gdg-rounding-radius,6px);box-shadow:0 0 1px #3e415666,0 1px 3px #3e415666}.gdg-d4zsq0x .doe-bubble img{height:16px;-o-object-fit:contain;object-fit:contain;margin-right:4px}.gdg-d4zsq0x textarea{position:absolute;top:0;left:0;width:0px;height:0px;opacity:0}.gdg-i2iowwq{display:flex;height:100%}.gdg-i2iowwq .gdg-centering-container{display:flex;justify-content:center;align-items:center;height:100%}.gdg-i2iowwq .gdg-centering-container img,.gdg-i2iowwq .gdg-centering-container canvas{max-height:calc(100vh - var(--overlay-top) - 20px);-o-object-fit:contain;object-fit:contain;-webkit-user-select:none;-moz-user-select:none;user-select:none}.gdg-i2iowwq .gdg-centering-container canvas{max-width:380px}.gdg-i2iowwq .gdg-edit-icon{position:absolute;top:12px;right:0;width:48px;height:48px;color:var(--gdg-accent-color);cursor:pointer;display:flex;justify-content:center;align-items:center}.gdg-i2iowwq .gdg-edit-icon>*{width:24px;height:24px}.gdg-i2iowwq textarea{position:absolute;top:0;left:0;width:0px;height:0px;opacity:0}.gdg-u1rrojo{display:flex;flex-grow:1;align-items:center;min-height:21px}.gdg-u1rrojo .gdg-link-area{flex-grow:1;flex-shrink:1;cursor:pointer;margin-right:8px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--gdg-link-color);-webkit-text-decoration:underline!important;text-decoration:underline!important}.gdg-u1rrojo .gdg-edit-icon{flex-shrink:0;width:32px;color:var(--gdg-accent-color);cursor:pointer;display:flex;justify-content:center;align-items:center}.gdg-u1rrojo .gdg-edit-icon>*{width:24px;height:24px}.gdg-u1rrojo textarea{position:absolute;top:0;left:0;width:0px;height:0px;opacity:0}.gdg-m1pnx84e{min-width:var(--m1pnx84e-0);width:100%;display:flex;align-items:flex-start;justify-content:space-between;position:relative;color:var(--gdg-text-dark)}.gdg-m1pnx84e .gdg-g1y0xocz{flex-shrink:1;min-width:0}.gdg-m1pnx84e .gdg-spacer{flex:1}.gdg-m1pnx84e .gdg-edit-icon{position:relative;cursor:pointer;display:flex;justify-content:center;align-items:center;color:var(--gdg-accent-color);padding:0;height:24px;width:24px;flex-shrink:0;transition:all \"0.125s ease\";border-radius:6px}.gdg-m1pnx84e .gdg-edit-icon>*{width:16px;height:16px}.gdg-m1pnx84e .gdg-edit-hover:hover{background-color:var(--gdg-accent-light);transition:background-color .15s}.gdg-m1pnx84e .gdg-checkmark-hover:hover{color:#fff;background-color:var(--gdg-accent-color)}.gdg-m1pnx84e .gdg-md-edit-textarea{position:relative;top:0;left:0;width:0px;height:0px;margin-top:25px;opacity:0;padding:0}.gdg-m1pnx84e .gdg-ml-6{margin-left:6px}.gdg-s1dgczr6 .dvn-scroller{overflow:var(--s1dgczr6-0);transform:translateZ(0)}.gdg-s1dgczr6 .dvn-hidden{visibility:hidden}.gdg-s1dgczr6 .dvn-scroll-inner{display:flex;pointer-events:none}.gdg-s1dgczr6 .dvn-scroll-inner>*{flex-shrink:0}.gdg-s1dgczr6 .dvn-scroll-inner .dvn-spacer{flex-grow:1}.gdg-s1dgczr6 .dvn-scroll-inner .dvn-stack{display:flex;flex-direction:column}.gdg-s1dgczr6 .dvn-underlay>*{position:absolute;left:0;top:0}.gdg-s1dgczr6 canvas{outline:none}.gdg-s1dgczr6 canvas *{height:0}.gdg-izpuzkl{position:absolute;inset:0;width:100%;height:100%;border-radius:0;resize:none;white-space:pre-wrap;min-width:100%;overflow:hidden;border:0;background-color:transparent;font-size:var(--gdg-editor-font-size);line-height:16px;font-family:var(--gdg-font-family);-webkit-text-fill-color:var(--gdg-text-dark);color:var(--gdg-text-dark);padding:0;margin:0}.gdg-izpuzkl::-moz-placeholder{color:var(--gdg-text-light)}.gdg-izpuzkl::placeholder{color:var(--gdg-text-light)}.gdg-invalid .gdg-izpuzkl{-webkit-text-decoration:underline;text-decoration:underline;text-decoration-color:#d60606}.gdg-s69h75o{visibility:hidden;white-space:pre-wrap;word-wrap:break-word;width:-moz-max-content;width:max-content;max-width:100%;min-width:100%;font-size:var(--gdg-editor-font-size);line-height:16px;font-family:var(--gdg-font-family);color:var(--gdg-text-dark);padding:0 0 2px;margin:0}.gdg-g1y0xocz{position:relative;margin-top:6px}.gdg-seveqep{position:absolute;top:4px;right:20px;background-color:var(--gdg-bg-cell);color:var(--gdg-text-dark);padding:8px;border:1px solid var(--gdg-border-color);border-radius:6px;font-size:var(--gdg-editor-font-size);animation:gdg-search-fadein-gdg-seveqep .15s forwards}.gdg-seveqep.out{animation:gdg-search-fadeout-gdg-seveqep .15s forwards}.gdg-seveqep .gdg-search-bar-inner{display:flex}.gdg-seveqep .gdg-search-status{padding-top:4px;font-size:11px}.gdg-seveqep .gdg-search-progress{position:absolute;height:4px;left:0;bottom:0;background-color:var(--gdg-text-light)}.gdg-seveqep input{width:220px;color:var(--gdg-textDark);background-color:var(--gdg-bg-cell);border:none;border-width:0;outline:none}.gdg-seveqep button{width:24px;height:24px;padding:0;border:none;outline:none;background:none;display:flex;justify-content:center;align-items:center;cursor:pointer;color:var(--gdg-text-medium)}.gdg-seveqep button:hover{color:var(--gdg-text-dark)}.gdg-seveqep button .button-icon{width:16px;height:16px}.gdg-seveqep button:disabled{opacity:.4;pointer-events:none}@keyframes gdg-search-fadeout-gdg-seveqep{0%{transform:translate(0)}to{transform:translate(400px)}}@keyframes gdg-search-fadein-gdg-seveqep{0%{transform:translate(400px)}to{transform:translate(0)}}.gdg-wmyidgi{position:relative;min-width:10px;min-height:10px;max-width:100%;max-height:100%;width:var(--wmyidgi-0);height:var(--wmyidgi-1);overflow:hidden;overflow:clip;direction:ltr}.gdg-wmyidgi>:first-child{position:absolute;left:0;top:0;width:100%;height:100%}.gdg-r17m35ur{flex-grow:1;border:none;outline:none;background-color:var(--gdg-bg-header-has-focus);border-radius:9px;padding:0 8px;box-shadow:0 0 0 1px var(--gdg-border-color);color:var(--gdg-text-group-header);min-height:var(--r17m35ur-0);font:var(--gdg-header-font-style) var(--gdg-font-family)}.gdg-c1tqibwd{padding:0 8px;display:flex;align-items:center;background-color:var(--gdg-bg-header)}@layer properties{@supports ((-webkit-hyphens:none) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-pan-x:initial;--tw-pan-y:initial;--tw-pinch-zoom:initial;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-divide-x-reverse:0;--tw-border-style:solid;--tw-divide-y-reverse:0;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-content:\"\"}}}@layer theme{:root,:host{--font-sans:ui-sans-serif, system-ui, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-100:oklch(93.6% .032 17.717);--color-red-200:oklch(88.5% .062 18.334);--color-red-300:oklch(80.8% .114 19.571);--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-red-900:oklch(39.6% .141 25.723);--color-orange-50:oklch(98% .016 73.684);--color-orange-100:oklch(95.4% .038 75.164);--color-orange-200:oklch(90.1% .076 70.697);--color-orange-400:oklch(75% .183 55.934);--color-orange-500:oklch(70.5% .213 47.604);--color-orange-600:oklch(64.6% .222 41.116);--color-orange-700:oklch(55.3% .195 38.402);--color-yellow-400:oklch(85.2% .199 91.936);--color-green-100:oklch(96.2% .044 156.743);--color-green-200:oklch(92.5% .084 155.995);--color-green-400:oklch(79.2% .209 151.711);--color-green-500:oklch(72.3% .219 149.579);--color-green-600:oklch(62.7% .194 149.214);--color-green-700:oklch(52.7% .154 150.069);--color-emerald-300:oklch(84.5% .143 164.978);--color-emerald-400:oklch(76.5% .177 163.223);--color-emerald-500:oklch(69.6% .17 162.48);--color-cyan-50:oklch(98.4% .019 200.873);--color-cyan-100:oklch(95.6% .045 203.388);--color-cyan-200:oklch(91.7% .08 205.041);--color-cyan-300:oklch(86.5% .127 207.078);--color-cyan-400:oklch(78.9% .154 211.53);--color-cyan-500:oklch(71.5% .143 215.221);--color-blue-50:oklch(97% .014 254.604);--color-blue-100:oklch(93.2% .032 255.585);--color-blue-400:oklch(70.7% .165 254.624);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--color-blue-700:oklch(48.8% .243 264.376);--color-purple-100:oklch(94.6% .033 307.174);--color-purple-400:oklch(71.4% .203 305.504);--color-purple-500:oklch(62.7% .265 303.9);--color-purple-600:oklch(55.8% .288 302.321);--color-purple-700:oklch(49.6% .265 301.924);--color-slate-50:oklch(98.4% .003 247.858);--color-stone-50:oklch(98.5% .001 106.423);--color-stone-100:oklch(97% .001 106.424);--color-stone-200:oklch(92.3% .003 48.717);--color-stone-300:oklch(86.9% .005 56.366);--color-stone-400:oklch(70.9% .01 56.259);--color-stone-500:oklch(55.3% .013 58.071);--color-stone-600:oklch(44.4% .011 73.639);--color-stone-700:oklch(37.4% .01 67.558);--color-stone-800:oklch(26.8% .007 34.298);--color-stone-900:oklch(21.6% .006 56.043);--color-stone-950:oklch(14.7% .004 49.25);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-xs:20rem;--container-sm:24rem;--container-lg:32rem;--container-5xl:64rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-tight:-.025em;--tracking-wide:.025em;--tracking-wider:.05em;--tracking-widest:.1em;--leading-relaxed:1.625;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--ease-in-out:cubic-bezier(.4, 0, .2, 1);--animate-spin:spin 1s linear infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::-moz-placeholder{opacity:1}::placeholder{opacity:1}@supports (not (-webkit-appearance:-apple-pay-button)) or (contain-intrinsic-size:1px){::-moz-placeholder{color:currentColor}::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::-moz-placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.not-sr-only{clip-path:none;white-space:normal;width:auto;height:auto;margin:0;padding:0;position:static;overflow:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:calc(var(--spacing) * 0)}.inset-x-0{inset-inline:calc(var(--spacing) * 0)}.inset-y-0{inset-block:calc(var(--spacing) * 0)}.start{inset-inline-start:var(--spacing)}.end{inset-inline-end:var(--spacing)}.top-0{top:calc(var(--spacing) * 0)}.top-1{top:calc(var(--spacing) * 1)}.top-1\\/2{top:50%}.top-4{top:calc(var(--spacing) * 4)}.top-\\[50\\%\\]{top:50%}.right-0{right:calc(var(--spacing) * 0)}.right-2{right:calc(var(--spacing) * 2)}.right-4{right:calc(var(--spacing) * 4)}.bottom-0{bottom:calc(var(--spacing) * 0)}.bottom-1{bottom:calc(var(--spacing) * 1)}.left-0{left:calc(var(--spacing) * 0)}.left-2{left:calc(var(--spacing) * 2)}.left-3{left:calc(var(--spacing) * 3)}.left-\\[50\\%\\]{left:50%}.isolate{isolation:isolate}.isolation-auto{isolation:auto}.z-10{z-index:10}.z-50{z-index:50}.z-\\[9998\\]{z-index:9998}.z-\\[9999\\]{z-index:9999}.col-span-2{grid-column:span 2/span 2}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.-mx-1{margin-inline:calc(var(--spacing) * -1)}.mx-auto{margin-inline:auto}.my-1{margin-block:calc(var(--spacing) * 1)}.mt-0{margin-top:calc(var(--spacing) * 0)}.mt-0\\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:calc(var(--spacing) * 1)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-6{margin-top:calc(var(--spacing) * 6)}.mr-1{margin-right:calc(var(--spacing) * 1)}.mr-2{margin-right:calc(var(--spacing) * 2)}.mb-1{margin-bottom:calc(var(--spacing) * 1)}.mb-1\\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.mb-6{margin-bottom:calc(var(--spacing) * 6)}.ml-1{margin-left:calc(var(--spacing) * 1)}.ml-2{margin-left:calc(var(--spacing) * 2)}.ml-auto{margin-left:auto}.block{display:block}.contents{display:contents}.flex{display:flex}.flow-root{display:flow-root}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.inline-grid{display:inline-grid}.inline-table{display:inline-table}.list-item{display:list-item}.table{display:table}.table-caption{display:table-caption}.table-cell{display:table-cell}.table-column{display:table-column}.table-column-group{display:table-column-group}.table-footer-group{display:table-footer-group}.table-header-group{display:table-header-group}.table-row{display:table-row}.table-row-group{display:table-row-group}.h-1{height:calc(var(--spacing) * 1)}.h-1\\.5{height:calc(var(--spacing) * 1.5)}.h-2{height:calc(var(--spacing) * 2)}.h-2\\.5{height:calc(var(--spacing) * 2.5)}.h-3{height:calc(var(--spacing) * 3)}.h-3\\.5{height:calc(var(--spacing) * 3.5)}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-6{height:calc(var(--spacing) * 6)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-10{height:calc(var(--spacing) * 10)}.h-12{height:calc(var(--spacing) * 12)}.h-16{height:calc(var(--spacing) * 16)}.h-20{height:calc(var(--spacing) * 20)}.h-32{height:calc(var(--spacing) * 32)}.h-\\[1px\\]{height:1px}.h-\\[400px\\]{height:400px}.h-\\[var\\(--radix-select-trigger-height\\)\\]{height:var(--radix-select-trigger-height)}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.max-h-24{max-height:calc(var(--spacing) * 24)}.max-h-48{max-height:calc(var(--spacing) * 48)}.max-h-56{max-height:calc(var(--spacing) * 56)}.max-h-80{max-height:calc(var(--spacing) * 80)}.max-h-96{max-height:calc(var(--spacing) * 96)}.max-h-\\[400px\\]{max-height:400px}.min-h-\\[36px\\]{min-height:36px}.min-h-\\[80px\\]{min-height:80px}.w-0{width:calc(var(--spacing) * 0)}.w-0\\.5{width:calc(var(--spacing) * .5)}.w-1{width:calc(var(--spacing) * 1)}.w-1\\.5{width:calc(var(--spacing) * 1.5)}.w-2{width:calc(var(--spacing) * 2)}.w-2\\.5{width:calc(var(--spacing) * 2.5)}.w-3{width:calc(var(--spacing) * 3)}.w-3\\.5{width:calc(var(--spacing) * 3.5)}.w-3\\/4{width:75%}.w-4{width:calc(var(--spacing) * 4)}.w-5{width:calc(var(--spacing) * 5)}.w-6{width:calc(var(--spacing) * 6)}.w-8{width:calc(var(--spacing) * 8)}.w-9{width:calc(var(--spacing) * 9)}.w-10{width:calc(var(--spacing) * 10)}.w-11{width:calc(var(--spacing) * 11)}.w-12{width:calc(var(--spacing) * 12)}.w-16{width:calc(var(--spacing) * 16)}.w-20{width:calc(var(--spacing) * 20)}.w-64{width:calc(var(--spacing) * 64)}.w-72{width:calc(var(--spacing) * 72)}.w-80{width:calc(var(--spacing) * 80)}.w-\\[1px\\]{width:1px}.w-\\[500px\\]{width:500px}.w-full{width:100%}.w-px{width:1px}.max-w-5xl{max-width:var(--container-5xl)}.max-w-\\[160px\\]{max-width:160px}.max-w-\\[200px\\]{max-width:200px}.max-w-lg{max-width:var(--container-lg)}.max-w-sm{max-width:var(--container-sm)}.max-w-xs{max-width:var(--container-xs)}.min-w-0{min-width:calc(var(--spacing) * 0)}.min-w-\\[8rem\\]{min-width:8rem}.min-w-\\[48px\\]{min-width:48px}.min-w-\\[80px\\]{min-width:80px}.min-w-\\[160px\\]{min-width:160px}.min-w-\\[180px\\]{min-width:180px}.min-w-\\[220px\\]{min-width:220px}.min-w-\\[320px\\]{min-width:320px}.min-w-\\[var\\(--radix-select-trigger-width\\)\\]{min-width:var(--radix-select-trigger-width)}.flex-1{flex:1}.flex-shrink-0{flex-shrink:0}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.grow\\!{flex-grow:1!important}.caption-bottom{caption-side:bottom}.border-collapse{border-collapse:collapse}.translate-x-\\[-50\\%\\]{--tw-translate-x:-50%;translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1{--tw-translate-y:calc(var(--spacing) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1\\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-\\[-50\\%\\]{--tw-translate-y:-50%;translate:var(--tw-translate-x) var(--tw-translate-y)}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.transform\\!{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)!important}.animate-spin{animation:var(--animate-spin)}.\\!cursor-default{cursor:default!important}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.touch-pinch-zoom{--tw-pinch-zoom:pinch-zoom;touch-action:var(--tw-pan-x,) var(--tw-pan-y,) var(--tw-pinch-zoom,)}.touch-none{touch-action:none}.resize{resize:both}.resize-none{resize:none}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-\\[minmax\\(0\\,1fr\\)_50px_52px_96px\\]{grid-template-columns:minmax(0,1fr) 50px 52px 96px}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.gap-1{gap:calc(var(--spacing) * 1)}.gap-1\\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}:where(.space-y-0>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 0) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 0) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-0\\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * .5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * .5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1\\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-reverse>:not(:last-child)){--tw-space-y-reverse:1}:where(.space-x-reverse>:not(:last-child)){--tw-space-x-reverse:1}:where(.divide-x>:not(:last-child)){--tw-divide-x-reverse:0;border-inline-style:var(--tw-border-style);border-inline-start-width:calc(1px * var(--tw-divide-x-reverse));border-inline-end-width:calc(1px * calc(1 - var(--tw-divide-x-reverse)))}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px * var(--tw-divide-y-reverse));border-bottom-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-y-reverse>:not(:last-child)){--tw-divide-y-reverse:1}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-\\[inherit\\]{border-radius:inherit}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-sm{border-radius:var(--radius-sm)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-s{border-start-start-radius:.25rem;border-end-start-radius:.25rem}.rounded-ss{border-start-start-radius:.25rem}.rounded-e{border-start-end-radius:.25rem;border-end-end-radius:.25rem}.rounded-se{border-start-end-radius:.25rem}.rounded-ee{border-end-end-radius:.25rem}.rounded-es{border-end-start-radius:.25rem}.rounded-t{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.rounded-l{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-tl{border-top-left-radius:.25rem}.rounded-r{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.rounded-tr{border-top-right-radius:.25rem}.rounded-b{border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-br{border-bottom-right-radius:.25rem}.rounded-bl{border-bottom-left-radius:.25rem}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-x{border-inline-style:var(--tw-border-style);border-inline-width:1px}.border-y{border-block-style:var(--tw-border-style);border-block-width:1px}.border-s{border-inline-start-style:var(--tw-border-style);border-inline-start-width:1px}.border-e{border-inline-end-style:var(--tw-border-style);border-inline-end-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-l-2{border-left-style:var(--tw-border-style);border-left-width:2px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-\\[var\\(--accent-color\\)\\]{border-color:var(--accent-color)}.border-\\[var\\(--border-color\\)\\]{border-color:var(--border-color)}.border-\\[var\\(--error-color\\)\\]{border-color:var(--error-color)}.border-blue-500{border-color:var(--color-blue-500)}.border-blue-500\\/30{border-color:#3080ff4d}@supports (color:color-mix(in lab,red,red)){.border-blue-500\\/30{border-color:color-mix(in oklab,var(--color-blue-500) 30%,transparent)}}.border-blue-600{border-color:var(--color-blue-600)}.border-cyan-500{border-color:var(--color-cyan-500)}.border-red-200{border-color:var(--color-red-200)}.border-red-500{border-color:var(--color-red-500)}.border-red-500\\/40{border-color:#fb2c3666}@supports (color:color-mix(in lab,red,red)){.border-red-500\\/40{border-color:color-mix(in oklab,var(--color-red-500) 40%,transparent)}}.border-stone-100{border-color:var(--color-stone-100)}.border-stone-200{border-color:var(--color-stone-200)}.border-transparent{border-color:#0000}.border-t-transparent{border-top-color:#0000}.border-l-transparent{border-left-color:#0000}.bg-\\[var\\(--accent-color\\)\\],.bg-\\[var\\(--accent-color\\)\\]\\/10{background-color:var(--accent-color)}@supports (color:color-mix(in lab,red,red)){.bg-\\[var\\(--accent-color\\)\\]\\/10{background-color:color-mix(in oklab,var(--accent-color) 10%,transparent)}}.bg-\\[var\\(--bg-primary\\)\\]{background-color:var(--bg-primary)}.bg-\\[var\\(--bg-secondary\\)\\]{background-color:var(--bg-secondary)}.bg-\\[var\\(--bg-selected\\)\\]{background-color:var(--bg-selected)}.bg-\\[var\\(--bg-tertiary\\)\\]{background-color:var(--bg-tertiary)}.bg-\\[var\\(--border-color\\)\\]{background-color:var(--border-color)}.bg-\\[var\\(--error-bg\\)\\]{background-color:var(--error-bg)}.bg-\\[var\\(--error-color\\)\\]{background-color:var(--error-color)}.bg-black{background-color:var(--color-black)}.bg-black\\/80{background-color:#000c}@supports (color:color-mix(in lab,red,red)){.bg-black\\/80{background-color:color-mix(in oklab,var(--color-black) 80%,transparent)}}.bg-blue-50{background-color:var(--color-blue-50)}.bg-blue-100{background-color:var(--color-blue-100)}.bg-blue-400{background-color:var(--color-blue-400)}.bg-blue-400\\/85{background-color:#54a2ffd9}@supports (color:color-mix(in lab,red,red)){.bg-blue-400\\/85{background-color:color-mix(in oklab,var(--color-blue-400) 85%,transparent)}}.bg-blue-500{background-color:var(--color-blue-500)}.bg-blue-500\\/10{background-color:#3080ff1a}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\\/10{background-color:color-mix(in oklab,var(--color-blue-500) 10%,transparent)}}.bg-blue-500\\/15{background-color:#3080ff26}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\\/15{background-color:color-mix(in oklab,var(--color-blue-500) 15%,transparent)}}.bg-blue-600{background-color:var(--color-blue-600)}.bg-cyan-300{background-color:var(--color-cyan-300)}.bg-cyan-500{background-color:var(--color-cyan-500)}.bg-emerald-400{background-color:var(--color-emerald-400)}.bg-emerald-500{background-color:var(--color-emerald-500)}.bg-emerald-500\\/10{background-color:#00bb7f1a}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\\/10{background-color:color-mix(in oklab,var(--color-emerald-500) 10%,transparent)}}.bg-emerald-500\\/15{background-color:#00bb7f26}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\\/15{background-color:color-mix(in oklab,var(--color-emerald-500) 15%,transparent)}}.bg-green-100{background-color:var(--color-green-100)}.bg-green-600{background-color:var(--color-green-600)}.bg-orange-50{background-color:var(--color-orange-50)}.bg-orange-100{background-color:var(--color-orange-100)}.bg-orange-500{background-color:var(--color-orange-500)}.bg-orange-500\\/15{background-color:#fe6e0026}@supports (color:color-mix(in lab,red,red)){.bg-orange-500\\/15{background-color:color-mix(in oklab,var(--color-orange-500) 15%,transparent)}}.bg-orange-600{background-color:var(--color-orange-600)}.bg-purple-100{background-color:var(--color-purple-100)}.bg-purple-500{background-color:var(--color-purple-500)}.bg-purple-500\\/15{background-color:#ac4bff26}@supports (color:color-mix(in lab,red,red)){.bg-purple-500\\/15{background-color:color-mix(in oklab,var(--color-purple-500) 15%,transparent)}}.bg-red-50{background-color:var(--color-red-50)}.bg-red-100{background-color:var(--color-red-100)}.bg-red-400{background-color:var(--color-red-400)}.bg-red-400\\/85{background-color:#ff6568d9}@supports (color:color-mix(in lab,red,red)){.bg-red-400\\/85{background-color:color-mix(in oklab,var(--color-red-400) 85%,transparent)}}.bg-red-500{background-color:var(--color-red-500)}.bg-red-500\\/10{background-color:#fb2c361a}@supports (color:color-mix(in lab,red,red)){.bg-red-500\\/10{background-color:color-mix(in oklab,var(--color-red-500) 10%,transparent)}}.bg-red-500\\/15{background-color:#fb2c3626}@supports (color:color-mix(in lab,red,red)){.bg-red-500\\/15{background-color:color-mix(in oklab,var(--color-red-500) 15%,transparent)}}.bg-red-500\\/\\[0\\.03\\]{background-color:#fb2c3608}@supports (color:color-mix(in lab,red,red)){.bg-red-500\\/\\[0\\.03\\]{background-color:color-mix(in oklab,var(--color-red-500) 3%,transparent)}}.bg-red-600{background-color:var(--color-red-600)}.bg-slate-50{background-color:var(--color-slate-50)}.bg-stone-50{background-color:var(--color-stone-50)}.bg-stone-100{background-color:var(--color-stone-100)}.bg-stone-200{background-color:var(--color-stone-200)}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-white\\/50{background-color:#ffffff80}@supports (color:color-mix(in lab,red,red)){.bg-white\\/50{background-color:color-mix(in oklab,var(--color-white) 50%,transparent)}}.bg-repeat{background-repeat:repeat}.fill-current{fill:currentColor}.object-contain{-o-object-fit:contain;object-fit:contain}.p-0{padding:calc(var(--spacing) * 0)}.p-0\\.5{padding:calc(var(--spacing) * .5)}.p-1{padding:calc(var(--spacing) * 1)}.p-2{padding:calc(var(--spacing) * 2)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-6{padding:calc(var(--spacing) * 6)}.p-8{padding:calc(var(--spacing) * 8)}.p-12{padding:calc(var(--spacing) * 12)}.p-\\[1px\\]{padding:1px}.px-0{padding-inline:calc(var(--spacing) * 0)}.px-0\\.5{padding-inline:calc(var(--spacing) * .5)}.px-1{padding-inline:calc(var(--spacing) * 1)}.px-1\\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-6{padding-inline:calc(var(--spacing) * 6)}.px-8{padding-inline:calc(var(--spacing) * 8)}.py-0{padding-block:calc(var(--spacing) * 0)}.py-0\\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:calc(var(--spacing) * 1)}.py-1\\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-8{padding-block:calc(var(--spacing) * 8)}.py-16{padding-block:calc(var(--spacing) * 16)}.pt-0{padding-top:calc(var(--spacing) * 0)}.pt-6{padding-top:calc(var(--spacing) * 6)}.pr-1{padding-right:calc(var(--spacing) * 1)}.pr-2{padding-right:calc(var(--spacing) * 2)}.pr-3{padding-right:calc(var(--spacing) * 3)}.pr-4{padding-right:calc(var(--spacing) * 4)}.pr-8{padding-right:calc(var(--spacing) * 8)}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.pl-2{padding-left:calc(var(--spacing) * 2)}.pl-7{padding-left:calc(var(--spacing) * 7)}.pl-8{padding-left:calc(var(--spacing) * 8)}.pl-9{padding-left:calc(var(--spacing) * 9)}.pl-\\[52px\\]{padding-left:52px}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.align-middle{vertical-align:middle}.font-mono{font-family:var(--font-mono)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\\[9px\\]{font-size:9px}.text-\\[10px\\]{font-size:10px}.text-\\[11px\\]{font-size:11px}.leading-none{--tw-leading:1;line-height:1}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.text-wrap{text-wrap:wrap}.break-all{word-break:break-all}.text-clip{text-overflow:clip}.text-ellipsis{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.text-\\[var\\(--accent-color\\)\\]{color:var(--accent-color)}.text-\\[var\\(--error-color\\)\\]{color:var(--error-color)}.text-\\[var\\(--success-color\\)\\]{color:var(--success-color)}.text-\\[var\\(--text-primary\\)\\]{color:var(--text-primary)}.text-\\[var\\(--text-secondary\\)\\]{color:var(--text-secondary)}.text-\\[var\\(--text-tertiary\\)\\],.text-\\[var\\(--text-tertiary\\)\\]\\/30{color:var(--text-tertiary)}@supports (color:color-mix(in lab,red,red)){.text-\\[var\\(--text-tertiary\\)\\]\\/30{color:color-mix(in oklab,var(--text-tertiary) 30%,transparent)}}.text-\\[var\\(--text-tertiary\\)\\]\\/40{color:var(--text-tertiary)}@supports (color:color-mix(in lab,red,red)){.text-\\[var\\(--text-tertiary\\)\\]\\/40{color:color-mix(in oklab,var(--text-tertiary) 40%,transparent)}}.text-\\[var\\(--text-tertiary\\)\\]\\/70{color:var(--text-tertiary)}@supports (color:color-mix(in lab,red,red)){.text-\\[var\\(--text-tertiary\\)\\]\\/70{color:color-mix(in oklab,var(--text-tertiary) 70%,transparent)}}.text-\\[var\\(--text-tertiary\\)\\]\\/80{color:var(--text-tertiary)}@supports (color:color-mix(in lab,red,red)){.text-\\[var\\(--text-tertiary\\)\\]\\/80{color:color-mix(in oklab,var(--text-tertiary) 80%,transparent)}}.text-blue-400{color:var(--color-blue-400)}.text-blue-600{color:var(--color-blue-600)}.text-blue-700{color:var(--color-blue-700)}.text-current{color:currentColor}.text-cyan-50{color:var(--color-cyan-50)}.text-cyan-100{color:var(--color-cyan-100)}.text-cyan-200{color:var(--color-cyan-200)}.text-cyan-300{color:var(--color-cyan-300)}.text-cyan-400{color:var(--color-cyan-400)}.text-emerald-300{color:var(--color-emerald-300)}.text-emerald-400{color:var(--color-emerald-400)}.text-emerald-500{color:var(--color-emerald-500)}.text-emerald-500\\/70{color:#00bb7fb3}@supports (color:color-mix(in lab,red,red)){.text-emerald-500\\/70{color:color-mix(in oklab,var(--color-emerald-500) 70%,transparent)}}.text-green-600{color:var(--color-green-600)}.text-green-700{color:var(--color-green-700)}.text-orange-400{color:var(--color-orange-400)}.text-orange-600{color:var(--color-orange-600)}.text-orange-700{color:var(--color-orange-700)}.text-purple-400{color:var(--color-purple-400)}.text-purple-600{color:var(--color-purple-600)}.text-purple-700{color:var(--color-purple-700)}.text-red-300{color:var(--color-red-300)}.text-red-400{color:var(--color-red-400)}.text-red-400\\/70{color:#ff6568b3}@supports (color:color-mix(in lab,red,red)){.text-red-400\\/70{color:color-mix(in oklab,var(--color-red-400) 70%,transparent)}}.text-red-600{color:var(--color-red-600)}.text-red-700{color:var(--color-red-700)}.text-red-900{color:var(--color-red-900)}.text-stone-300{color:var(--color-stone-300)}.text-stone-400{color:var(--color-stone-400)}.text-stone-500{color:var(--color-stone-500)}.text-stone-600{color:var(--color-stone-600)}.text-stone-700{color:var(--color-stone-700)}.text-stone-900{color:var(--color-stone-900)}.text-stone-950{color:var(--color-stone-950)}.text-white{color:var(--color-white)}.text-yellow-400{color:var(--color-yellow-400)}.capitalize{text-transform:capitalize}.lowercase{text-transform:lowercase}.normal-case{text-transform:none}.uppercase{text-transform:uppercase}.italic{font-style:italic}.not-italic{font-style:normal}.diagonal-fractions{--tw-numeric-fraction:diagonal-fractions;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.lining-nums{--tw-numeric-figure:lining-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.oldstyle-nums{--tw-numeric-figure:oldstyle-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.ordinal{--tw-ordinal:ordinal;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.proportional-nums{--tw-numeric-spacing:proportional-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.slashed-zero{--tw-slashed-zero:slashed-zero;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.stacked-fractions{--tw-numeric-fraction:stacked-fractions;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.normal-nums{font-variant-numeric:normal}.line-through{text-decoration-line:line-through}.no-underline{text-decoration-line:none}.overline{text-decoration-line:overline}.underline{text-decoration-line:underline}.underline-offset-4{text-underline-offset:4px}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.subpixel-antialiased{-webkit-font-smoothing:auto;-moz-osx-font-smoothing:auto}.opacity-0{opacity:0}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-0{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-offset-white{--tw-ring-offset-color:var(--color-white)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.drop-shadow{--tw-drop-shadow-size:drop-shadow(0 1px 2px var(--tw-drop-shadow-color,#0000001a)) drop-shadow(0 1px 1px var(--tw-drop-shadow-color,#0000000f));--tw-drop-shadow:drop-shadow(0 1px 2px #0000001a) drop-shadow(0 1px 1px #0000000f);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.grayscale{--tw-grayscale:grayscale(100%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.invert{--tw-invert:invert(100%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.sepia{--tw-sepia:sepia(100%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.filter\\!{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)!important}.backdrop-blur{--tw-backdrop-blur:blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-grayscale{--tw-backdrop-grayscale:grayscale(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-invert{--tw-backdrop-invert:invert(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-sepia{--tw-backdrop-sepia:sepia(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-75{--tw-duration:75ms;transition-duration:75ms}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.duration-500{--tw-duration:.5s;transition-duration:.5s}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}:where(.divide-x-reverse>:not(:last-child)){--tw-divide-x-reverse:1}.ring-inset{--tw-ring-inset:inset}@media(hover:hover){.group-hover\\:opacity-100:is(:where(.group):hover *){opacity:1}}.peer-disabled\\:cursor-not-allowed:is(:where(.peer):disabled~*){cursor:not-allowed}.peer-disabled\\:opacity-70:is(:where(.peer):disabled~*){opacity:.7}.file\\:border-0::file-selector-button{border-style:var(--tw-border-style);border-width:0}.file\\:bg-transparent::file-selector-button{background-color:#0000}.file\\:text-sm::file-selector-button{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.file\\:font-medium::file-selector-button{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.placeholder\\:text-\\[var\\(--text-tertiary\\)\\]::-moz-placeholder{color:var(--text-tertiary)}.placeholder\\:text-\\[var\\(--text-tertiary\\)\\]::placeholder{color:var(--text-tertiary)}.placeholder\\:text-stone-500::-moz-placeholder{color:var(--color-stone-500)}.placeholder\\:text-stone-500::placeholder{color:var(--color-stone-500)}.after\\:absolute:after{content:var(--tw-content);position:absolute}.after\\:inset-y-0:after{content:var(--tw-content);inset-block:calc(var(--spacing) * 0)}.after\\:left-1\\/2:after{content:var(--tw-content);left:50%}.after\\:w-1:after{content:var(--tw-content);width:calc(var(--spacing) * 1)}.after\\:-translate-x-1\\/2:after{content:var(--tw-content);--tw-translate-x: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.last\\:border-b-0:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}@media(hover:hover){.hover\\:border-\\[var\\(--text-tertiary\\)\\]:hover{border-color:var(--text-tertiary)}.hover\\:bg-\\[var\\(--bg-hover\\)\\]:hover{background-color:var(--bg-hover)}.hover\\:bg-\\[var\\(--bg-selected\\)\\]:hover{background-color:var(--bg-selected)}.hover\\:bg-\\[var\\(--error-bg\\)\\]:hover{background-color:var(--error-bg)}.hover\\:bg-blue-700:hover{background-color:var(--color-blue-700)}.hover\\:bg-green-200:hover{background-color:var(--color-green-200)}.hover\\:bg-green-700:hover{background-color:var(--color-green-700)}.hover\\:bg-orange-200:hover{background-color:var(--color-orange-200)}.hover\\:bg-orange-700:hover{background-color:var(--color-orange-700)}.hover\\:bg-red-200:hover{background-color:var(--color-red-200)}.hover\\:bg-red-500\\/10:hover{background-color:#fb2c361a}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-red-500\\/10:hover{background-color:color-mix(in oklab,var(--color-red-500) 10%,transparent)}}.hover\\:bg-red-700:hover{background-color:var(--color-red-700)}.hover\\:bg-stone-50:hover{background-color:var(--color-stone-50)}.hover\\:bg-stone-100:hover{background-color:var(--color-stone-100)}.hover\\:bg-stone-200:hover{background-color:var(--color-stone-200)}.hover\\:text-\\[var\\(--accent-color\\)\\]:hover{color:var(--accent-color)}.hover\\:text-\\[var\\(--error-color\\)\\]:hover{color:var(--error-color)}.hover\\:text-\\[var\\(--text-primary\\)\\]:hover{color:var(--text-primary)}.hover\\:text-\\[var\\(--text-secondary\\)\\]:hover{color:var(--text-secondary)}.hover\\:text-emerald-500:hover{color:var(--color-emerald-500)}.hover\\:text-red-400:hover{color:var(--color-red-400)}.hover\\:text-red-700:hover{color:var(--color-red-700)}.hover\\:text-stone-900:hover{color:var(--color-stone-900)}.hover\\:underline:hover{text-decoration-line:underline}.hover\\:opacity-90:hover{opacity:.9}.hover\\:opacity-100:hover{opacity:1}}.focus\\:border-blue-500\\/40:focus{border-color:#3080ff66}@supports (color:color-mix(in lab,red,red)){.focus\\:border-blue-500\\/40:focus{border-color:color-mix(in oklab,var(--color-blue-500) 40%,transparent)}}.focus\\:bg-stone-100:focus{background-color:var(--color-stone-100)}.focus\\:text-stone-900:focus{color:var(--color-stone-900)}.focus\\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\\:ring-blue-500:focus{--tw-ring-color:var(--color-blue-500)}.focus\\:ring-stone-950:focus{--tw-ring-color:var(--color-stone-950)}.focus\\:ring-offset-2:focus{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\\:ring-1:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\\:ring-\\[var\\(--accent-color\\)\\]:focus-visible{--tw-ring-color:var(--accent-color)}.focus-visible\\:ring-blue-500:focus-visible{--tw-ring-color:var(--color-blue-500)}.focus-visible\\:ring-stone-950:focus-visible{--tw-ring-color:var(--color-stone-950)}.focus-visible\\:ring-offset-0:focus-visible{--tw-ring-offset-width:0px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus-visible\\:ring-offset-1:focus-visible{--tw-ring-offset-width:1px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus-visible\\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus-visible\\:ring-offset-white:focus-visible{--tw-ring-offset-color:var(--color-white)}.focus-visible\\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.disabled\\:pointer-events-none:disabled{pointer-events:none}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:opacity-40:disabled{opacity:.4}.disabled\\:opacity-50:disabled{opacity:.5}.data-\\[disabled\\]\\:pointer-events-none[data-disabled]{pointer-events:none}.data-\\[disabled\\]\\:opacity-50[data-disabled]{opacity:.5}.data-\\[panel-group-direction\\=vertical\\]\\:h-px[data-panel-group-direction=vertical]{height:1px}.data-\\[panel-group-direction\\=vertical\\]\\:w-full[data-panel-group-direction=vertical]{width:100%}.data-\\[panel-group-direction\\=vertical\\]\\:flex-col[data-panel-group-direction=vertical]{flex-direction:column}.data-\\[panel-group-direction\\=vertical\\]\\:after\\:left-0[data-panel-group-direction=vertical]:after{content:var(--tw-content);left:calc(var(--spacing) * 0)}.data-\\[panel-group-direction\\=vertical\\]\\:after\\:h-1[data-panel-group-direction=vertical]:after{content:var(--tw-content);height:calc(var(--spacing) * 1)}.data-\\[panel-group-direction\\=vertical\\]\\:after\\:w-full[data-panel-group-direction=vertical]:after{content:var(--tw-content);width:100%}.data-\\[panel-group-direction\\=vertical\\]\\:after\\:translate-x-0[data-panel-group-direction=vertical]:after{content:var(--tw-content);--tw-translate-x:calc(var(--spacing) * 0);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\\[panel-group-direction\\=vertical\\]\\:after\\:-translate-y-1\\/2[data-panel-group-direction=vertical]:after{content:var(--tw-content);--tw-translate-y: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\\[side\\=bottom\\]\\:translate-y-1[data-side=bottom]{--tw-translate-y:calc(var(--spacing) * 1);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\\[side\\=left\\]\\:-translate-x-1[data-side=left]{--tw-translate-x:calc(var(--spacing) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\\[side\\=right\\]\\:translate-x-1[data-side=right]{--tw-translate-x:calc(var(--spacing) * 1);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\\[side\\=top\\]\\:-translate-y-1[data-side=top]{--tw-translate-y:calc(var(--spacing) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\\[state\\=active\\]\\:bg-white[data-state=active]{background-color:var(--color-white)}.data-\\[state\\=active\\]\\:text-stone-950[data-state=active]{color:var(--color-stone-950)}.data-\\[state\\=active\\]\\:shadow-sm[data-state=active]{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.data-\\[state\\=checked\\]\\:translate-x-5[data-state=checked]{--tw-translate-x:calc(var(--spacing) * 5);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\\[state\\=checked\\]\\:border-orange-600[data-state=checked]{border-color:var(--color-orange-600)}.data-\\[state\\=checked\\]\\:bg-orange-600[data-state=checked]{background-color:var(--color-orange-600)}.data-\\[state\\=checked\\]\\:text-white[data-state=checked]{color:var(--color-white)}.data-\\[state\\=closed\\]\\:duration-300[data-state=closed]{--tw-duration:.3s;transition-duration:.3s}.data-\\[state\\=open\\]\\:bg-stone-100[data-state=open]{background-color:var(--color-stone-100)}.data-\\[state\\=open\\]\\:text-stone-500[data-state=open]{color:var(--color-stone-500)}.data-\\[state\\=open\\]\\:duration-500[data-state=open]{--tw-duration:.5s;transition-duration:.5s}.data-\\[state\\=selected\\]\\:bg-stone-100[data-state=selected]{background-color:var(--color-stone-100)}.data-\\[state\\=unchecked\\]\\:translate-x-0[data-state=unchecked]{--tw-translate-x:calc(var(--spacing) * 0);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\\[state\\=unchecked\\]\\:bg-stone-200[data-state=unchecked]{background-color:var(--color-stone-200)}@media(min-width:40rem){.sm\\:mt-0{margin-top:calc(var(--spacing) * 0)}.sm\\:block{display:block}.sm\\:max-w-\\[500px\\]{max-width:500px}.sm\\:max-w-sm{max-width:var(--container-sm)}.sm\\:flex-row{flex-direction:row}.sm\\:justify-end{justify-content:flex-end}:where(.sm\\:space-x-2>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing) * 2) * var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-x-reverse)))}.sm\\:rounded-lg{border-radius:var(--radius-lg)}.sm\\:text-left{text-align:left}}.dark\\:border-\\[\\#3e3e42\\]:where(.dark,.dark *){border-color:#3e3e42}.dark\\:bg-\\[\\#1e1e1e\\]:where(.dark,.dark *){background-color:#1e1e1e}.dark\\:bg-\\[\\#2d2d30\\]:where(.dark,.dark *){background-color:#2d2d30}.dark\\:bg-\\[\\#3e3e42\\]:where(.dark,.dark *){background-color:#3e3e42}.dark\\:bg-\\[\\#569cd6\\]:where(.dark,.dark *){background-color:#569cd6}.dark\\:bg-\\[\\#252526\\]:where(.dark,.dark *){background-color:#252526}.dark\\:bg-\\[\\#f48771\\]:where(.dark,.dark *){background-color:#f48771}.dark\\:bg-blue-500\\/20:where(.dark,.dark *){background-color:#3080ff33}@supports (color:color-mix(in lab,red,red)){.dark\\:bg-blue-500\\/20:where(.dark,.dark *){background-color:color-mix(in oklab,var(--color-blue-500) 20%,transparent)}}.dark\\:bg-green-500\\/20:where(.dark,.dark *){background-color:#00c75833}@supports (color:color-mix(in lab,red,red)){.dark\\:bg-green-500\\/20:where(.dark,.dark *){background-color:color-mix(in oklab,var(--color-green-500) 20%,transparent)}}.dark\\:bg-orange-500\\/20:where(.dark,.dark *){background-color:#fe6e0033}@supports (color:color-mix(in lab,red,red)){.dark\\:bg-orange-500\\/20:where(.dark,.dark *){background-color:color-mix(in oklab,var(--color-orange-500) 20%,transparent)}}.dark\\:bg-purple-500\\/20:where(.dark,.dark *){background-color:#ac4bff33}@supports (color:color-mix(in lab,red,red)){.dark\\:bg-purple-500\\/20:where(.dark,.dark *){background-color:color-mix(in oklab,var(--color-purple-500) 20%,transparent)}}.dark\\:bg-red-500\\/20:where(.dark,.dark *){background-color:#fb2c3633}@supports (color:color-mix(in lab,red,red)){.dark\\:bg-red-500\\/20:where(.dark,.dark *){background-color:color-mix(in oklab,var(--color-red-500) 20%,transparent)}}.dark\\:bg-red-900\\/20:where(.dark,.dark *){background-color:#82181a33}@supports (color:color-mix(in lab,red,red)){.dark\\:bg-red-900\\/20:where(.dark,.dark *){background-color:color-mix(in oklab,var(--color-red-900) 20%,transparent)}}.dark\\:text-\\[\\#1e1e1e\\]:where(.dark,.dark *){color:#1e1e1e}.dark\\:text-\\[\\#4ec9b0\\]:where(.dark,.dark *){color:#4ec9b0}.dark\\:text-\\[\\#569cd6\\]:where(.dark,.dark *){color:#569cd6}.dark\\:text-\\[\\#969696\\]:where(.dark,.dark *){color:#969696}.dark\\:text-\\[\\#cccccc\\]:where(.dark,.dark *){color:#ccc}.dark\\:text-\\[\\#ce9178\\]:where(.dark,.dark *){color:#ce9178}.dark\\:text-\\[\\#f48771\\]:where(.dark,.dark *){color:#f48771}.dark\\:text-blue-400:where(.dark,.dark *){color:var(--color-blue-400)}.dark\\:text-green-400:where(.dark,.dark *){color:var(--color-green-400)}.dark\\:text-orange-400:where(.dark,.dark *){color:var(--color-orange-400)}.dark\\:text-purple-400:where(.dark,.dark *){color:var(--color-purple-400)}.dark\\:text-red-400:where(.dark,.dark *){color:var(--color-red-400)}.dark\\:text-stone-50:where(.dark,.dark *){color:var(--color-stone-50)}.dark\\:text-stone-400:where(.dark,.dark *){color:var(--color-stone-400)}.dark\\:ring-offset-\\[\\#1e1e1e\\]:where(.dark,.dark *){--tw-ring-offset-color:#1e1e1e}.dark\\:ring-offset-stone-950:where(.dark,.dark *){--tw-ring-offset-color:var(--color-stone-950)}.dark\\:placeholder\\:text-\\[\\#6a6a6a\\]:where(.dark,.dark *)::-moz-placeholder{color:#6a6a6a}.dark\\:placeholder\\:text-\\[\\#6a6a6a\\]:where(.dark,.dark *)::placeholder{color:#6a6a6a}@media(hover:hover){.dark\\:hover\\:bg-\\[\\#2a2a2b\\]:where(.dark,.dark *):hover{background-color:#2a2a2b}.dark\\:hover\\:bg-\\[\\#4a4a4e\\]:where(.dark,.dark *):hover{background-color:#4a4a4e}.dark\\:hover\\:bg-\\[\\#4a8cc7\\]:where(.dark,.dark *):hover{background-color:#4a8cc7}.dark\\:hover\\:bg-\\[\\#37373d\\]:where(.dark,.dark *):hover{background-color:#37373d}.dark\\:hover\\:bg-\\[\\#f5917e\\]:where(.dark,.dark *):hover{background-color:#f5917e}.dark\\:hover\\:text-\\[\\#cccccc\\]:where(.dark,.dark *):hover{color:#ccc}.dark\\:hover\\:text-red-300:where(.dark,.dark *):hover{color:var(--color-red-300)}}.dark\\:focus\\:bg-\\[\\#2a2a2b\\]:where(.dark,.dark *):focus{background-color:#2a2a2b}.dark\\:focus\\:text-\\[\\#cccccc\\]:where(.dark,.dark *):focus{color:#ccc}.dark\\:focus\\:ring-\\[\\#569cd6\\]:where(.dark,.dark *):focus{--tw-ring-color:#569cd6}.dark\\:focus\\:ring-stone-300:where(.dark,.dark *):focus{--tw-ring-color:var(--color-stone-300)}.dark\\:focus-visible\\:ring-\\[\\#569cd6\\]:where(.dark,.dark *):focus-visible{--tw-ring-color:#569cd6}.dark\\:focus-visible\\:ring-stone-300:where(.dark,.dark *):focus-visible{--tw-ring-color:var(--color-stone-300)}.dark\\:focus-visible\\:ring-offset-\\[\\#1e1e1e\\]:where(.dark,.dark *):focus-visible{--tw-ring-offset-color:#1e1e1e}.dark\\:data-\\[state\\=active\\]\\:bg-\\[\\#252526\\]:where(.dark,.dark *)[data-state=active]{background-color:#252526}.dark\\:data-\\[state\\=active\\]\\:text-\\[\\#cccccc\\]:where(.dark,.dark *)[data-state=active]{color:#ccc}.dark\\:data-\\[state\\=checked\\]\\:border-\\[\\#569cd6\\]:where(.dark,.dark *)[data-state=checked]{border-color:#569cd6}.dark\\:data-\\[state\\=checked\\]\\:bg-\\[\\#569cd6\\]:where(.dark,.dark *)[data-state=checked]{background-color:#569cd6}.dark\\:data-\\[state\\=open\\]\\:bg-\\[\\#2a2a2b\\]:where(.dark,.dark *)[data-state=open]{background-color:#2a2a2b}.dark\\:data-\\[state\\=open\\]\\:bg-\\[\\#3e3e42\\]:where(.dark,.dark *)[data-state=open]{background-color:#3e3e42}.dark\\:data-\\[state\\=open\\]\\:bg-stone-800:where(.dark,.dark *)[data-state=open]{background-color:var(--color-stone-800)}.dark\\:data-\\[state\\=open\\]\\:text-\\[\\#cccccc\\]:where(.dark,.dark *)[data-state=open]{color:#ccc}.dark\\:data-\\[state\\=unchecked\\]\\:bg-\\[\\#3e3e42\\]:where(.dark,.dark *)[data-state=unchecked]{background-color:#3e3e42}.\\[\\&_tr\\]\\:border-b tr{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.\\[\\&_tr\\:last-child\\]\\:border-0 tr:last-child{border-style:var(--tw-border-style);border-width:0}.\\[\\&\\:has\\(\\[role\\=checkbox\\]\\)\\]\\:pr-0:has([role=checkbox]){padding-right:calc(var(--spacing) * 0)}.\\[\\&\\>\\[role\\=checkbox\\]\\]\\:translate-y-\\[2px\\]>[role=checkbox]{--tw-translate-y:2px;translate:var(--tw-translate-x) var(--tw-translate-y)}.\\[\\&\\>div\\]\\:\\!min-w-full>div{min-width:100%!important}.\\[\\&\\>tr\\]\\:last\\:border-b-0>tr:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.\\[\\&\\[data-panel-group-direction\\=vertical\\]\\>div\\]\\:rotate-90[data-panel-group-direction=vertical]>div{rotate:90deg}}:root{color-scheme:light;--bg-primary:#fff;--bg-secondary:#f8f9fa;--bg-tertiary:#f3f4f6;--bg-hover:#f3f4f6;--bg-selected:#eff6ff;--border-color:#e5e7eb;--text-primary:#111827;--text-secondary:#6b7280;--text-tertiary:#9ca3af;--accent-color:#2563eb;--accent-bg:#eff6ff;--success-color:#16a34a;--success-bg:#f0fdf4;--error-color:#dc2626;--error-bg:#fef2f2;color:var(--text-primary);background-color:var(--bg-primary);font-synthesis:none;text-rendering:optimizelegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:Inter,system-ui,Avenir,Helvetica,Arial,sans-serif;font-weight:400;line-height:1.5}.dark{color-scheme:dark;--bg-primary:#1e1e1e;--bg-secondary:#252526;--bg-tertiary:#2d2d30;--bg-hover:#2a2a2b;--bg-selected:#37373d;--border-color:#3e3e42;--text-primary:#ccc;--text-secondary:#969696;--text-tertiary:#6a6a6a;--accent-color:#569cd6;--accent-bg:#37373d;--success-color:#4ade80;--success-bg:#14532d;--error-color:#f87171;--error-bg:#7f1d1d;background-color:var(--bg-primary);color:var(--text-primary)}body{background-color:var(--bg-secondary);min-width:320px;min-height:100vh;margin:0;display:flex}#root{width:100%}*{box-sizing:border-box}@property --tw-translate-x{syntax:\"*\";inherits:false;initial-value:0}@property --tw-translate-y{syntax:\"*\";inherits:false;initial-value:0}@property --tw-translate-z{syntax:\"*\";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:\"*\";inherits:false}@property --tw-rotate-y{syntax:\"*\";inherits:false}@property --tw-rotate-z{syntax:\"*\";inherits:false}@property --tw-skew-x{syntax:\"*\";inherits:false}@property --tw-skew-y{syntax:\"*\";inherits:false}@property --tw-pan-x{syntax:\"*\";inherits:false}@property --tw-pan-y{syntax:\"*\";inherits:false}@property --tw-pinch-zoom{syntax:\"*\";inherits:false}@property --tw-space-y-reverse{syntax:\"*\";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:\"*\";inherits:false;initial-value:0}@property --tw-divide-x-reverse{syntax:\"*\";inherits:false;initial-value:0}@property --tw-border-style{syntax:\"*\";inherits:false;initial-value:solid}@property --tw-divide-y-reverse{syntax:\"*\";inherits:false;initial-value:0}@property --tw-leading{syntax:\"*\";inherits:false}@property --tw-font-weight{syntax:\"*\";inherits:false}@property --tw-tracking{syntax:\"*\";inherits:false}@property --tw-ordinal{syntax:\"*\";inherits:false}@property --tw-slashed-zero{syntax:\"*\";inherits:false}@property --tw-numeric-figure{syntax:\"*\";inherits:false}@property --tw-numeric-spacing{syntax:\"*\";inherits:false}@property --tw-numeric-fraction{syntax:\"*\";inherits:false}@property --tw-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:\"*\";inherits:false}@property --tw-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:\"*\";inherits:false}@property --tw-inset-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:\"*\";inherits:false}@property --tw-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:\"*\";inherits:false}@property --tw-inset-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:\"*\";inherits:false}@property --tw-ring-offset-width{syntax:\"<length>\";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:\"*\";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:\"*\";inherits:false;initial-value:solid}@property --tw-blur{syntax:\"*\";inherits:false}@property --tw-brightness{syntax:\"*\";inherits:false}@property --tw-contrast{syntax:\"*\";inherits:false}@property --tw-grayscale{syntax:\"*\";inherits:false}@property --tw-hue-rotate{syntax:\"*\";inherits:false}@property --tw-invert{syntax:\"*\";inherits:false}@property --tw-opacity{syntax:\"*\";inherits:false}@property --tw-saturate{syntax:\"*\";inherits:false}@property --tw-sepia{syntax:\"*\";inherits:false}@property --tw-drop-shadow{syntax:\"*\";inherits:false}@property --tw-drop-shadow-color{syntax:\"*\";inherits:false}@property --tw-drop-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:\"*\";inherits:false}@property --tw-backdrop-blur{syntax:\"*\";inherits:false}@property --tw-backdrop-brightness{syntax:\"*\";inherits:false}@property --tw-backdrop-contrast{syntax:\"*\";inherits:false}@property --tw-backdrop-grayscale{syntax:\"*\";inherits:false}@property --tw-backdrop-hue-rotate{syntax:\"*\";inherits:false}@property --tw-backdrop-invert{syntax:\"*\";inherits:false}@property --tw-backdrop-opacity{syntax:\"*\";inherits:false}@property --tw-backdrop-saturate{syntax:\"*\";inherits:false}@property --tw-backdrop-sepia{syntax:\"*\";inherits:false}@property --tw-duration{syntax:\"*\";inherits:false}@property --tw-ease{syntax:\"*\";inherits:false}@property --tw-content{syntax:\"*\";inherits:false;initial-value:\"\"}@keyframes spin{to{transform:rotate(360deg)}}\n\n</style>\n </head>\n <body>\n <div id=\"root\"></div>\n <div id=\"portal\"></div>\n </body>\n</html>\n";
|