From 4ce1c757c4f894101c8ec5d7fd7477263624c0a8 Mon Sep 17 00:00:00 2001 From: vwh Date: Mon, 24 Jun 2024 16:55:09 +0300 Subject: [PATCH] Updates --- .../{index-rsC_u1OG.js => index-DctcNfcb.js} | 48 +++++++++---------- index.html | 2 +- 2 files changed, 25 insertions(+), 25 deletions(-) rename assets/{index-rsC_u1OG.js => index-DctcNfcb.js} (52%) diff --git a/assets/index-rsC_u1OG.js b/assets/index-DctcNfcb.js similarity index 52% rename from assets/index-rsC_u1OG.js rename to assets/index-DctcNfcb.js index ffdb35d..b3d523b 100644 --- a/assets/index-rsC_u1OG.js +++ b/assets/index-DctcNfcb.js @@ -1,4 +1,4 @@ -function e0(e,t){for(var n=0;nr[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"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();function Ri(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function t0(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var Bp={exports:{}},xs={},Wp={exports:{}},pe={};/** +function n0(e,t){for(var n=0;nr[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"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();function Ri(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function r0(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var Wp={exports:{}},xs={},Up={exports:{}},pe={};/** * @license React * react.production.min.js * @@ -6,7 +6,7 @@ function e0(e,t){for(var n=0;n>>1,ie=I[oe];if(0>>1;oeo(ot,ee))Eeo(Y,ot)?(I[oe]=Y,I[Ee]=ee,oe=Ee):(I[oe]=ot,I[he]=ee,oe=he);else if(Eeo(Y,ee))I[oe]=Y,I[Ee]=ee,oe=Ee;else break e}}return z}function o(I,z){var ee=I.sortIndex-z.sortIndex;return ee!==0?ee:I.id-z.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var s=Date,a=s.now();e.unstable_now=function(){return s.now()-a}}var f=[],u=[],m=1,h=null,w=3,_=!1,E=!1,x=!1,P=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,p=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function S(I){for(var z=n(u);z!==null;){if(z.callback===null)r(u);else if(z.startTime<=I)r(u),z.sortIndex=z.expirationTime,t(f,z);else break;z=n(u)}}function C(I){if(x=!1,S(I),!E)if(n(f)!==null)E=!0,se(T);else{var z=n(u);z!==null&&J(C,z.startTime-I)}}function T(I,z){E=!1,x&&(x=!1,g(D),D=-1),_=!0;var ee=w;try{for(S(z),h=n(f);h!==null&&(!(h.expirationTime>z)||I&&!V());){var oe=h.callback;if(typeof oe=="function"){h.callback=null,w=h.priorityLevel;var ie=oe(h.expirationTime<=z);z=e.unstable_now(),typeof ie=="function"?h.callback=ie:h===n(f)&&r(f),S(z)}else r(f);h=n(f)}if(h!==null)var Ve=!0;else{var he=n(u);he!==null&&J(C,he.startTime-z),Ve=!1}return Ve}finally{h=null,w=ee,_=!1}}var A=!1,N=null,D=-1,G=5,F=-1;function V(){return!(e.unstable_now()-FI||125oe?(I.sortIndex=ee,t(u,I),n(f)===null&&I===n(u)&&(x?(g(D),D=-1):x=!0,J(C,ee-oe))):(I.sortIndex=ie,t(f,I),E||_||(E=!0,se(T))),I},e.unstable_shouldYield=V,e.unstable_wrapCallback=function(I){var z=w;return function(){var ee=w;w=z;try{return I.apply(this,arguments)}finally{w=ee}}}})(tm);em.exports=tm;var b0=em.exports;/** + */(function(e){function t(I,z){var ee=I.length;I.push(z);e:for(;0>>1,ie=I[oe];if(0>>1;oeo(ot,ee))Eeo(Y,ot)?(I[oe]=Y,I[Ee]=ee,oe=Ee):(I[oe]=ot,I[he]=ee,oe=he);else if(Eeo(Y,ee))I[oe]=Y,I[Ee]=ee,oe=Ee;else break e}}return z}function o(I,z){var ee=I.sortIndex-z.sortIndex;return ee!==0?ee:I.id-z.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var s=Date,a=s.now();e.unstable_now=function(){return s.now()-a}}var f=[],u=[],p=1,h=null,y=3,_=!1,E=!1,x=!1,P=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,m=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function S(I){for(var z=n(u);z!==null;){if(z.callback===null)r(u);else if(z.startTime<=I)r(u),z.sortIndex=z.expirationTime,t(f,z);else break;z=n(u)}}function k(I){if(x=!1,S(I),!E)if(n(f)!==null)E=!0,se(R);else{var z=n(u);z!==null&&J(k,z.startTime-I)}}function R(I,z){E=!1,x&&(x=!1,v(M),M=-1),_=!0;var ee=y;try{for(S(z),h=n(f);h!==null&&(!(h.expirationTime>z)||I&&!V());){var oe=h.callback;if(typeof oe=="function"){h.callback=null,y=h.priorityLevel;var ie=oe(h.expirationTime<=z);z=e.unstable_now(),typeof ie=="function"?h.callback=ie:h===n(f)&&r(f),S(z)}else r(f);h=n(f)}if(h!==null)var Ve=!0;else{var he=n(u);he!==null&&J(k,he.startTime-z),Ve=!1}return Ve}finally{h=null,y=ee,_=!1}}var A=!1,N=null,M=-1,G=5,L=-1;function V(){return!(e.unstable_now()-LI||125oe?(I.sortIndex=ee,t(u,I),n(f)===null&&I===n(u)&&(x?(v(M),M=-1):x=!0,J(k,ee-oe))):(I.sortIndex=ie,t(f,I),E||_||(E=!0,se(R))),I},e.unstable_shouldYield=V,e.unstable_wrapCallback=function(I){var z=y;return function(){var ee=y;y=z;try{return I.apply(this,arguments)}finally{y=ee}}}})(nm);tm.exports=nm;var k0=tm.exports;/** * @license React * react-dom.production.min.js * @@ -30,14 +30,14 @@ function e0(e,t){for(var n=0;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Wa=Object.prototype.hasOwnProperty,k0=/^[: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]*$/,Qf={},Yf={};function P0(e){return Wa.call(Yf,e)?!0:Wa.call(Qf,e)?!1:k0.test(e)?Yf[e]=!0:(Qf[e]=!0,!1)}function R0(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function T0(e,t,n,r){if(t===null||typeof t>"u"||R0(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function mt(e,t,n,r,o,i,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=s}var rt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){rt[e]=new mt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];rt[t]=new mt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){rt[e]=new mt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){rt[e]=new mt(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){rt[e]=new mt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){rt[e]=new mt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){rt[e]=new mt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){rt[e]=new mt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){rt[e]=new mt(e,5,!1,e.toLowerCase(),null,!1,!1)});var ic=/[\-:]([a-z])/g;function lc(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(ic,lc);rt[t]=new mt(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(ic,lc);rt[t]=new mt(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(ic,lc);rt[t]=new mt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){rt[e]=new mt(e,1,!1,e.toLowerCase(),null,!1,!1)});rt.xlinkHref=new mt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){rt[e]=new mt(e,1,!1,e.toLowerCase(),null,!0,!0)});function sc(e,t,n,r){var o=rt.hasOwnProperty(t)?rt[t]:null;(o!==null?o.type!==0:r||!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Wa=Object.prototype.hasOwnProperty,R0=/^[: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]*$/,Yf={},Xf={};function T0(e){return Wa.call(Xf,e)?!0:Wa.call(Yf,e)?!1:R0.test(e)?Xf[e]=!0:(Yf[e]=!0,!1)}function N0(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function O0(e,t,n,r){if(t===null||typeof t>"u"||N0(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function mt(e,t,n,r,o,i,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=s}var rt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){rt[e]=new mt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];rt[t]=new mt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){rt[e]=new mt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){rt[e]=new mt(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){rt[e]=new mt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){rt[e]=new mt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){rt[e]=new mt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){rt[e]=new mt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){rt[e]=new mt(e,5,!1,e.toLowerCase(),null,!1,!1)});var ic=/[\-:]([a-z])/g;function lc(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(ic,lc);rt[t]=new mt(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(ic,lc);rt[t]=new mt(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(ic,lc);rt[t]=new mt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){rt[e]=new mt(e,1,!1,e.toLowerCase(),null,!1,!1)});rt.xlinkHref=new mt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){rt[e]=new mt(e,1,!1,e.toLowerCase(),null,!0,!0)});function sc(e,t,n,r){var o=rt.hasOwnProperty(t)?rt[t]:null;(o!==null?o.type!==0:r||!(2a||o[s]!==i[a]){var f=` -`+o[s].replace(" at new "," at ");return e.displayName&&f.includes("")&&(f=f.replace("",e.displayName)),f}while(1<=s&&0<=a);break}}}finally{la=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Ko(e):""}function N0(e){switch(e.tag){case 5:return Ko(e.type);case 16:return Ko("Lazy");case 13:return Ko("Suspense");case 19:return Ko("SuspenseList");case 0:case 2:case 15:return e=sa(e.type,!1),e;case 11:return e=sa(e.type.render,!1),e;case 1:return e=sa(e.type,!0),e;default:return""}}function Ga(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Br:return"Fragment";case Hr:return"Portal";case Ua:return"Profiler";case ac:return"StrictMode";case Va:return"Suspense";case qa:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case om:return(e.displayName||"Context")+".Consumer";case rm:return(e._context.displayName||"Context")+".Provider";case uc:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case cc:return t=e.displayName||null,t!==null?t:Ga(e.type)||"Memo";case Ln:t=e._payload,e=e._init;try{return Ga(e(t))}catch{}}return null}function O0(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Ga(t);case 8:return t===ac?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Xn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function lm(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function A0(e){var t=lm(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(s){r=""+s,i.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function tl(e){e._valueTracker||(e._valueTracker=A0(e))}function sm(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=lm(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function zl(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Ka(e,t){var n=t.checked;return Ie({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Zf(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Xn(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function am(e,t){t=t.checked,t!=null&&sc(e,"checked",t,!1)}function Qa(e,t){am(e,t);var n=Xn(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Ya(e,t.type,n):t.hasOwnProperty("defaultValue")&&Ya(e,t.type,Xn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Jf(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Ya(e,t,n){(t!=="number"||zl(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Qo=Array.isArray;function Jr(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=nl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ui(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Jo={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},M0=["Webkit","ms","Moz","O"];Object.keys(Jo).forEach(function(e){M0.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Jo[t]=Jo[e]})});function dm(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Jo.hasOwnProperty(e)&&Jo[e]?(""+t).trim():t+"px"}function pm(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=dm(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var D0=Ie({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Ja(e,t){if(t){if(D0[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(L(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(L(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(L(61))}if(t.style!=null&&typeof t.style!="object")throw Error(L(62))}}function eu(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var tu=null;function fc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var nu=null,eo=null,to=null;function nd(e){if(e=Ai(e)){if(typeof nu!="function")throw Error(L(280));var t=e.stateNode;t&&(t=Cs(t),nu(e.stateNode,e.type,t))}}function mm(e){eo?to?to.push(e):to=[e]:eo=e}function hm(){if(eo){var e=eo,t=to;if(to=eo=null,nd(e),t)for(e=0;e>>=0,e===0?32:31-(V0(e)/q0|0)|0}var rl=64,ol=4194304;function Yo(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64: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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Wl(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,s=n&268435455;if(s!==0){var a=s&~o;a!==0?r=Yo(a):(i&=s,i!==0&&(r=Yo(i)))}else s=n&~o,s!==0?r=Yo(s):i!==0&&(r=Yo(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Ni(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Qt(t),e[t]=n}function Y0(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=ti),fd=" ",dd=!1;function jm(e,t){switch(e){case"keyup":return bw.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Im(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Wr=!1;function kw(e,t){switch(e){case"compositionend":return Im(t);case"keypress":return t.which!==32?null:(dd=!0,fd);case"textInput":return e=t.data,e===fd&&dd?null:e;default:return null}}function Pw(e,t){if(Wr)return e==="compositionend"||!wc&&jm(e,t)?(e=Mm(),Pl=vc=Hn=null,Wr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=vd(n)}}function $m(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?$m(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Hm(){for(var e=window,t=zl();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=zl(e.document)}return t}function xc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Iw(e){var t=Hm(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&$m(n.ownerDocument.documentElement,n)){if(r!==null&&xc(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=gd(n,i);var s=gd(n,r);o&&s&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Ur=null,au=null,ri=null,uu=!1;function yd(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;uu||Ur==null||Ur!==zl(r)||(r=Ur,"selectionStart"in r&&xc(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),ri&&hi(ri,r)||(ri=r,r=ql(au,"onSelect"),0Gr||(e.current=hu[Gr],hu[Gr]=null,Gr--)}function ke(e,t){Gr++,hu[Gr]=e.current,e.current=t}var Zn={},at=nr(Zn),yt=nr(!1),wr=Zn;function ao(e,t){var n=e.type.contextTypes;if(!n)return Zn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function wt(e){return e=e.childContextTypes,e!=null}function Kl(){Ne(yt),Ne(at)}function Cd(e,t,n){if(at.current!==Zn)throw Error(L(168));ke(at,t),ke(yt,n)}function Ym(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(L(108,O0(e)||"Unknown",o));return Ie({},n,r)}function Ql(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Zn,wr=at.current,ke(at,e),ke(yt,yt.current),!0}function kd(e,t,n){var r=e.stateNode;if(!r)throw Error(L(169));n?(e=Ym(e,t,wr),r.__reactInternalMemoizedMergedChildContext=e,Ne(yt),Ne(at),ke(at,e)):Ne(yt),ke(yt,n)}var hn=null,ks=!1,Sa=!1;function Xm(e){hn===null?hn=[e]:hn.push(e)}function Kw(e){ks=!0,Xm(e)}function rr(){if(!Sa&&hn!==null){Sa=!0;var e=0,t=Se;try{var n=hn;for(Se=1;e>=s,o-=s,vn=1<<32-Qt(t)+o|n<D?(G=N,N=null):G=N.sibling;var F=w(g,N,S[D],C);if(F===null){N===null&&(N=G);break}e&&N&&F.alternate===null&&t(g,N),p=i(F,p,D),A===null?T=F:A.sibling=F,A=F,N=G}if(D===S.length)return n(g,N),Oe&&cr(g,D),T;if(N===null){for(;DD?(G=N,N=null):G=N.sibling;var V=w(g,N,F.value,C);if(V===null){N===null&&(N=G);break}e&&N&&V.alternate===null&&t(g,N),p=i(V,p,D),A===null?T=V:A.sibling=V,A=V,N=G}if(F.done)return n(g,N),Oe&&cr(g,D),T;if(N===null){for(;!F.done;D++,F=S.next())F=h(g,F.value,C),F!==null&&(p=i(F,p,D),A===null?T=F:A.sibling=F,A=F);return Oe&&cr(g,D),T}for(N=r(g,N);!F.done;D++,F=S.next())F=_(N,g,D,F.value,C),F!==null&&(e&&F.alternate!==null&&N.delete(F.key===null?D:F.key),p=i(F,p,D),A===null?T=F:A.sibling=F,A=F);return e&&N.forEach(function(U){return t(g,U)}),Oe&&cr(g,D),T}function P(g,p,S,C){if(typeof S=="object"&&S!==null&&S.type===Br&&S.key===null&&(S=S.props.children),typeof S=="object"&&S!==null){switch(S.$$typeof){case el:e:{for(var T=S.key,A=p;A!==null;){if(A.key===T){if(T=S.type,T===Br){if(A.tag===7){n(g,A.sibling),p=o(A,S.props.children),p.return=g,g=p;break e}}else if(A.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===Ln&&Td(T)===A.type){n(g,A.sibling),p=o(A,S.props),p.ref=Wo(g,A,S),p.return=g,g=p;break e}n(g,A);break}else t(g,A);A=A.sibling}S.type===Br?(p=yr(S.props.children,g.mode,C,S.key),p.return=g,g=p):(C=jl(S.type,S.key,S.props,null,g.mode,C),C.ref=Wo(g,p,S),C.return=g,g=C)}return s(g);case Hr:e:{for(A=S.key;p!==null;){if(p.key===A)if(p.tag===4&&p.stateNode.containerInfo===S.containerInfo&&p.stateNode.implementation===S.implementation){n(g,p.sibling),p=o(p,S.children||[]),p.return=g,g=p;break e}else{n(g,p);break}else t(g,p);p=p.sibling}p=Ta(S,g.mode,C),p.return=g,g=p}return s(g);case Ln:return A=S._init,P(g,p,A(S._payload),C)}if(Qo(S))return E(g,p,S,C);if(Fo(S))return x(g,p,S,C);fl(g,S)}return typeof S=="string"&&S!==""||typeof S=="number"?(S=""+S,p!==null&&p.tag===6?(n(g,p.sibling),p=o(p,S),p.return=g,g=p):(n(g,p),p=Ra(S,g.mode,C),p.return=g,g=p),s(g)):n(g,p)}return P}var co=th(!0),nh=th(!1),Zl=nr(null),Jl=null,Yr=null,bc=null;function Cc(){bc=Yr=Jl=null}function kc(e){var t=Zl.current;Ne(Zl),e._currentValue=t}function yu(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function ro(e,t){Jl=e,bc=Yr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(gt=!0),e.firstContext=null)}function zt(e){var t=e._currentValue;if(bc!==e)if(e={context:e,memoizedValue:t,next:null},Yr===null){if(Jl===null)throw Error(L(308));Yr=e,Jl.dependencies={lanes:0,firstContext:e}}else Yr=Yr.next=e;return t}var mr=null;function Pc(e){mr===null?mr=[e]:mr.push(e)}function rh(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,Pc(t)):(n.next=o.next,o.next=n),t.interleaved=n,Sn(e,r)}function Sn(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Fn=!1;function Rc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function oh(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function yn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Gn(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,ye&2){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,Sn(e,n)}return o=r.interleaved,o===null?(t.next=t,Pc(r)):(t.next=o.next,o.next=t),r.interleaved=t,Sn(e,n)}function Tl(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,pc(e,n)}}function Nd(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?o=i=s:i=i.next=s,n=n.next}while(n!==null);i===null?o=i=t:i=i.next=t}else o=i=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function es(e,t,n,r){var o=e.updateQueue;Fn=!1;var i=o.firstBaseUpdate,s=o.lastBaseUpdate,a=o.shared.pending;if(a!==null){o.shared.pending=null;var f=a,u=f.next;f.next=null,s===null?i=u:s.next=u,s=f;var m=e.alternate;m!==null&&(m=m.updateQueue,a=m.lastBaseUpdate,a!==s&&(a===null?m.firstBaseUpdate=u:a.next=u,m.lastBaseUpdate=f))}if(i!==null){var h=o.baseState;s=0,m=u=f=null,a=i;do{var w=a.lane,_=a.eventTime;if((r&w)===w){m!==null&&(m=m.next={eventTime:_,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var E=e,x=a;switch(w=t,_=n,x.tag){case 1:if(E=x.payload,typeof E=="function"){h=E.call(_,h,w);break e}h=E;break e;case 3:E.flags=E.flags&-65537|128;case 0:if(E=x.payload,w=typeof E=="function"?E.call(_,h,w):E,w==null)break e;h=Ie({},h,w);break e;case 2:Fn=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,w=o.effects,w===null?o.effects=[a]:w.push(a))}else _={eventTime:_,lane:w,tag:a.tag,payload:a.payload,callback:a.callback,next:null},m===null?(u=m=_,f=h):m=m.next=_,s|=w;if(a=a.next,a===null){if(a=o.shared.pending,a===null)break;w=a,a=w.next,w.next=null,o.lastBaseUpdate=w,o.shared.pending=null}}while(!0);if(m===null&&(f=h),o.baseState=f,o.firstBaseUpdate=u,o.lastBaseUpdate=m,t=o.shared.interleaved,t!==null){o=t;do s|=o.lane,o=o.next;while(o!==t)}else i===null&&(o.shared.lanes=0);Er|=s,e.lanes=s,e.memoizedState=h}}function Od(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=_a.transition;_a.transition={};try{e(!1),t()}finally{Se=n,_a.transition=r}}function Sh(){return $t().memoizedState}function Zw(e,t,n){var r=Qn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Eh(e))_h(t,n);else if(n=rh(e,t,n,r),n!==null){var o=ft();Yt(n,e,r,o),bh(n,t,r)}}function Jw(e,t,n){var r=Qn(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Eh(e))_h(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var s=t.lastRenderedState,a=i(s,n);if(o.hasEagerState=!0,o.eagerState=a,Xt(a,s)){var f=t.interleaved;f===null?(o.next=o,Pc(t)):(o.next=f.next,f.next=o),t.interleaved=o;return}}catch{}finally{}n=rh(e,t,o,r),n!==null&&(o=ft(),Yt(n,e,r,o),bh(n,t,r))}}function Eh(e){var t=e.alternate;return e===je||t!==null&&t===je}function _h(e,t){oi=ns=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function bh(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,pc(e,n)}}var rs={readContext:zt,useCallback:it,useContext:it,useEffect:it,useImperativeHandle:it,useInsertionEffect:it,useLayoutEffect:it,useMemo:it,useReducer:it,useRef:it,useState:it,useDebugValue:it,useDeferredValue:it,useTransition:it,useMutableSource:it,useSyncExternalStore:it,useId:it,unstable_isNewReconciler:!1},e1={readContext:zt,useCallback:function(e,t){return nn().memoizedState=[e,t===void 0?null:t],e},useContext:zt,useEffect:Md,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Ol(4194308,4,vh.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ol(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ol(4,2,e,t)},useMemo:function(e,t){var n=nn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=nn();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Zw.bind(null,je,e),[r.memoizedState,e]},useRef:function(e){var t=nn();return e={current:e},t.memoizedState=e},useState:Ad,useDebugValue:Ic,useDeferredValue:function(e){return nn().memoizedState=e},useTransition:function(){var e=Ad(!1),t=e[0];return e=Xw.bind(null,e[1]),nn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=je,o=nn();if(Oe){if(n===void 0)throw Error(L(407));n=n()}else{if(n=t(),Je===null)throw Error(L(349));Sr&30||ah(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,Md(ch.bind(null,r,i,e),[e]),r.flags|=2048,_i(9,uh.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=nn(),t=Je.identifierPrefix;if(Oe){var n=gn,r=vn;n=(r&~(1<<32-Qt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Si++,0")&&(f=f.replace("",e.displayName)),f}while(1<=s&&0<=a);break}}}finally{la=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Ko(e):""}function A0(e){switch(e.tag){case 5:return Ko(e.type);case 16:return Ko("Lazy");case 13:return Ko("Suspense");case 19:return Ko("SuspenseList");case 0:case 2:case 15:return e=sa(e.type,!1),e;case 11:return e=sa(e.type.render,!1),e;case 1:return e=sa(e.type,!0),e;default:return""}}function Ga(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Br:return"Fragment";case Hr:return"Portal";case Ua:return"Profiler";case ac:return"StrictMode";case Va:return"Suspense";case qa:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case im:return(e.displayName||"Context")+".Consumer";case om:return(e._context.displayName||"Context")+".Provider";case uc:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case cc:return t=e.displayName||null,t!==null?t:Ga(e.type)||"Memo";case Ln:t=e._payload,e=e._init;try{return Ga(e(t))}catch{}}return null}function M0(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Ga(t);case 8:return t===ac?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Xn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function sm(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function j0(e){var t=sm(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(s){r=""+s,i.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function tl(e){e._valueTracker||(e._valueTracker=j0(e))}function am(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=sm(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function zl(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Ka(e,t){var n=t.checked;return Ie({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Jf(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Xn(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function um(e,t){t=t.checked,t!=null&&sc(e,"checked",t,!1)}function Qa(e,t){um(e,t);var n=Xn(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Ya(e,t.type,n):t.hasOwnProperty("defaultValue")&&Ya(e,t.type,Xn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function ed(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Ya(e,t,n){(t!=="number"||zl(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Qo=Array.isArray;function Jr(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=nl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ui(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Jo={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},D0=["Webkit","ms","Moz","O"];Object.keys(Jo).forEach(function(e){D0.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Jo[t]=Jo[e]})});function pm(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Jo.hasOwnProperty(e)&&Jo[e]?(""+t).trim():t+"px"}function mm(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=pm(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var I0=Ie({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Ja(e,t){if(t){if(I0[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(F(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(F(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(F(61))}if(t.style!=null&&typeof t.style!="object")throw Error(F(62))}}function eu(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var tu=null;function fc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var nu=null,eo=null,to=null;function rd(e){if(e=Ai(e)){if(typeof nu!="function")throw Error(F(280));var t=e.stateNode;t&&(t=Cs(t),nu(e.stateNode,e.type,t))}}function hm(e){eo?to?to.push(e):to=[e]:eo=e}function vm(){if(eo){var e=eo,t=to;if(to=eo=null,rd(e),t)for(e=0;e>>=0,e===0?32:31-(G0(e)/K0|0)|0}var rl=64,ol=4194304;function Yo(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64: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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Wl(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,s=n&268435455;if(s!==0){var a=s&~o;a!==0?r=Yo(a):(i&=s,i!==0&&(r=Yo(i)))}else s=n&~o,s!==0?r=Yo(s):i!==0&&(r=Yo(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Ni(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Qt(t),e[t]=n}function Z0(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=ti),dd=" ",pd=!1;function Im(e,t){switch(e){case"keyup":return kw.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Lm(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Wr=!1;function Rw(e,t){switch(e){case"compositionend":return Lm(t);case"keypress":return t.which!==32?null:(pd=!0,dd);case"textInput":return e=t.data,e===dd&&pd?null:e;default:return null}}function Tw(e,t){if(Wr)return e==="compositionend"||!wc&&Im(e,t)?(e=jm(),Pl=vc=Hn=null,Wr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=gd(n)}}function Hm(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Hm(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Bm(){for(var e=window,t=zl();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=zl(e.document)}return t}function xc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Fw(e){var t=Bm(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Hm(n.ownerDocument.documentElement,n)){if(r!==null&&xc(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=yd(n,i);var s=yd(n,r);o&&s&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Ur=null,au=null,ri=null,uu=!1;function wd(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;uu||Ur==null||Ur!==zl(r)||(r=Ur,"selectionStart"in r&&xc(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),ri&&hi(ri,r)||(ri=r,r=ql(au,"onSelect"),0Gr||(e.current=hu[Gr],hu[Gr]=null,Gr--)}function ke(e,t){Gr++,hu[Gr]=e.current,e.current=t}var Zn={},at=nr(Zn),yt=nr(!1),wr=Zn;function ao(e,t){var n=e.type.contextTypes;if(!n)return Zn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function wt(e){return e=e.childContextTypes,e!=null}function Kl(){Ne(yt),Ne(at)}function kd(e,t,n){if(at.current!==Zn)throw Error(F(168));ke(at,t),ke(yt,n)}function Xm(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(F(108,M0(e)||"Unknown",o));return Ie({},n,r)}function Ql(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Zn,wr=at.current,ke(at,e),ke(yt,yt.current),!0}function Pd(e,t,n){var r=e.stateNode;if(!r)throw Error(F(169));n?(e=Xm(e,t,wr),r.__reactInternalMemoizedMergedChildContext=e,Ne(yt),Ne(at),ke(at,e)):Ne(yt),ke(yt,n)}var hn=null,ks=!1,Sa=!1;function Zm(e){hn===null?hn=[e]:hn.push(e)}function Yw(e){ks=!0,Zm(e)}function rr(){if(!Sa&&hn!==null){Sa=!0;var e=0,t=Se;try{var n=hn;for(Se=1;e>=s,o-=s,vn=1<<32-Qt(t)+o|n<M?(G=N,N=null):G=N.sibling;var L=y(v,N,S[M],k);if(L===null){N===null&&(N=G);break}e&&N&&L.alternate===null&&t(v,N),m=i(L,m,M),A===null?R=L:A.sibling=L,A=L,N=G}if(M===S.length)return n(v,N),Oe&&cr(v,M),R;if(N===null){for(;MM?(G=N,N=null):G=N.sibling;var V=y(v,N,L.value,k);if(V===null){N===null&&(N=G);break}e&&N&&V.alternate===null&&t(v,N),m=i(V,m,M),A===null?R=V:A.sibling=V,A=V,N=G}if(L.done)return n(v,N),Oe&&cr(v,M),R;if(N===null){for(;!L.done;M++,L=S.next())L=h(v,L.value,k),L!==null&&(m=i(L,m,M),A===null?R=L:A.sibling=L,A=L);return Oe&&cr(v,M),R}for(N=r(v,N);!L.done;M++,L=S.next())L=_(N,v,M,L.value,k),L!==null&&(e&&L.alternate!==null&&N.delete(L.key===null?M:L.key),m=i(L,m,M),A===null?R=L:A.sibling=L,A=L);return e&&N.forEach(function(U){return t(v,U)}),Oe&&cr(v,M),R}function P(v,m,S,k){if(typeof S=="object"&&S!==null&&S.type===Br&&S.key===null&&(S=S.props.children),typeof S=="object"&&S!==null){switch(S.$$typeof){case el:e:{for(var R=S.key,A=m;A!==null;){if(A.key===R){if(R=S.type,R===Br){if(A.tag===7){n(v,A.sibling),m=o(A,S.props.children),m.return=v,v=m;break e}}else if(A.elementType===R||typeof R=="object"&&R!==null&&R.$$typeof===Ln&&Nd(R)===A.type){n(v,A.sibling),m=o(A,S.props),m.ref=Wo(v,A,S),m.return=v,v=m;break e}n(v,A);break}else t(v,A);A=A.sibling}S.type===Br?(m=yr(S.props.children,v.mode,k,S.key),m.return=v,v=m):(k=Dl(S.type,S.key,S.props,null,v.mode,k),k.ref=Wo(v,m,S),k.return=v,v=k)}return s(v);case Hr:e:{for(A=S.key;m!==null;){if(m.key===A)if(m.tag===4&&m.stateNode.containerInfo===S.containerInfo&&m.stateNode.implementation===S.implementation){n(v,m.sibling),m=o(m,S.children||[]),m.return=v,v=m;break e}else{n(v,m);break}else t(v,m);m=m.sibling}m=Ta(S,v.mode,k),m.return=v,v=m}return s(v);case Ln:return A=S._init,P(v,m,A(S._payload),k)}if(Qo(S))return E(v,m,S,k);if(Fo(S))return x(v,m,S,k);fl(v,S)}return typeof S=="string"&&S!==""||typeof S=="number"?(S=""+S,m!==null&&m.tag===6?(n(v,m.sibling),m=o(m,S),m.return=v,v=m):(n(v,m),m=Ra(S,v.mode,k),m.return=v,v=m),s(v)):n(v,m)}return P}var co=nh(!0),rh=nh(!1),Zl=nr(null),Jl=null,Yr=null,bc=null;function Cc(){bc=Yr=Jl=null}function kc(e){var t=Zl.current;Ne(Zl),e._currentValue=t}function yu(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function ro(e,t){Jl=e,bc=Yr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(gt=!0),e.firstContext=null)}function zt(e){var t=e._currentValue;if(bc!==e)if(e={context:e,memoizedValue:t,next:null},Yr===null){if(Jl===null)throw Error(F(308));Yr=e,Jl.dependencies={lanes:0,firstContext:e}}else Yr=Yr.next=e;return t}var mr=null;function Pc(e){mr===null?mr=[e]:mr.push(e)}function oh(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,Pc(t)):(n.next=o.next,o.next=n),t.interleaved=n,Sn(e,r)}function Sn(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Fn=!1;function Rc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function ih(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function yn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Gn(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,ye&2){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,Sn(e,n)}return o=r.interleaved,o===null?(t.next=t,Pc(r)):(t.next=o.next,o.next=t),r.interleaved=t,Sn(e,n)}function Tl(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,pc(e,n)}}function Od(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?o=i=s:i=i.next=s,n=n.next}while(n!==null);i===null?o=i=t:i=i.next=t}else o=i=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function es(e,t,n,r){var o=e.updateQueue;Fn=!1;var i=o.firstBaseUpdate,s=o.lastBaseUpdate,a=o.shared.pending;if(a!==null){o.shared.pending=null;var f=a,u=f.next;f.next=null,s===null?i=u:s.next=u,s=f;var p=e.alternate;p!==null&&(p=p.updateQueue,a=p.lastBaseUpdate,a!==s&&(a===null?p.firstBaseUpdate=u:a.next=u,p.lastBaseUpdate=f))}if(i!==null){var h=o.baseState;s=0,p=u=f=null,a=i;do{var y=a.lane,_=a.eventTime;if((r&y)===y){p!==null&&(p=p.next={eventTime:_,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var E=e,x=a;switch(y=t,_=n,x.tag){case 1:if(E=x.payload,typeof E=="function"){h=E.call(_,h,y);break e}h=E;break e;case 3:E.flags=E.flags&-65537|128;case 0:if(E=x.payload,y=typeof E=="function"?E.call(_,h,y):E,y==null)break e;h=Ie({},h,y);break e;case 2:Fn=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,y=o.effects,y===null?o.effects=[a]:y.push(a))}else _={eventTime:_,lane:y,tag:a.tag,payload:a.payload,callback:a.callback,next:null},p===null?(u=p=_,f=h):p=p.next=_,s|=y;if(a=a.next,a===null){if(a=o.shared.pending,a===null)break;y=a,a=y.next,y.next=null,o.lastBaseUpdate=y,o.shared.pending=null}}while(!0);if(p===null&&(f=h),o.baseState=f,o.firstBaseUpdate=u,o.lastBaseUpdate=p,t=o.shared.interleaved,t!==null){o=t;do s|=o.lane,o=o.next;while(o!==t)}else i===null&&(o.shared.lanes=0);Er|=s,e.lanes=s,e.memoizedState=h}}function Ad(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=_a.transition;_a.transition={};try{e(!1),t()}finally{Se=n,_a.transition=r}}function Eh(){return $t().memoizedState}function e1(e,t,n){var r=Qn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},_h(e))bh(t,n);else if(n=oh(e,t,n,r),n!==null){var o=ft();Yt(n,e,r,o),Ch(n,t,r)}}function t1(e,t,n){var r=Qn(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(_h(e))bh(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var s=t.lastRenderedState,a=i(s,n);if(o.hasEagerState=!0,o.eagerState=a,Xt(a,s)){var f=t.interleaved;f===null?(o.next=o,Pc(t)):(o.next=f.next,f.next=o),t.interleaved=o;return}}catch{}finally{}n=oh(e,t,o,r),n!==null&&(o=ft(),Yt(n,e,r,o),Ch(n,t,r))}}function _h(e){var t=e.alternate;return e===De||t!==null&&t===De}function bh(e,t){oi=ns=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ch(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,pc(e,n)}}var rs={readContext:zt,useCallback:it,useContext:it,useEffect:it,useImperativeHandle:it,useInsertionEffect:it,useLayoutEffect:it,useMemo:it,useReducer:it,useRef:it,useState:it,useDebugValue:it,useDeferredValue:it,useTransition:it,useMutableSource:it,useSyncExternalStore:it,useId:it,unstable_isNewReconciler:!1},n1={readContext:zt,useCallback:function(e,t){return nn().memoizedState=[e,t===void 0?null:t],e},useContext:zt,useEffect:jd,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Ol(4194308,4,gh.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ol(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ol(4,2,e,t)},useMemo:function(e,t){var n=nn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=nn();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=e1.bind(null,De,e),[r.memoizedState,e]},useRef:function(e){var t=nn();return e={current:e},t.memoizedState=e},useState:Md,useDebugValue:Ic,useDeferredValue:function(e){return nn().memoizedState=e},useTransition:function(){var e=Md(!1),t=e[0];return e=Jw.bind(null,e[1]),nn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=De,o=nn();if(Oe){if(n===void 0)throw Error(F(407));n=n()}else{if(n=t(),Je===null)throw Error(F(349));Sr&30||uh(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,jd(fh.bind(null,r,i,e),[e]),r.flags|=2048,_i(9,ch.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=nn(),t=Je.identifierPrefix;if(Oe){var n=gn,r=vn;n=(r&~(1<<32-Qt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Si++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[rn]=t,e[yi]=r,Dh(e,t,!1,!1),t.stateNode=e;e:{switch(s=eu(n,r),n){case"dialog":Te("cancel",e),Te("close",e),o=r;break;case"iframe":case"object":case"embed":Te("load",e),o=r;break;case"video":case"audio":for(o=0;omo&&(t.flags|=128,r=!0,Uo(i,!1),t.lanes=4194304)}else{if(!r)if(e=ts(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Uo(i,!0),i.tail===null&&i.tailMode==="hidden"&&!s.alternate&&!Oe)return lt(t),null}else 2*He()-i.renderingStartTime>mo&&n!==1073741824&&(t.flags|=128,r=!0,Uo(i,!1),t.lanes=4194304);i.isBackwards?(s.sibling=t.child,t.child=s):(n=i.last,n!==null?n.sibling=s:t.child=s,i.last=s)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=He(),t.sibling=null,n=De.current,ke(De,r?n&1|2:n&1),t):(lt(t),null);case 22:case 23:return Bc(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?_t&1073741824&&(lt(t),t.subtreeFlags&6&&(t.flags|=8192)):lt(t),null;case 24:return null;case 25:return null}throw Error(L(156,t.tag))}function a1(e,t){switch(Ec(t),t.tag){case 1:return wt(t.type)&&Kl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return fo(),Ne(yt),Ne(at),Oc(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Nc(t),null;case 13:if(Ne(De),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(L(340));uo()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ne(De),null;case 4:return fo(),null;case 10:return kc(t.type._context),null;case 22:case 23:return Bc(),null;case 24:return null;default:return null}}var pl=!1,st=!1,u1=typeof WeakSet=="function"?WeakSet:Set,q=null;function Xr(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){ze(e,t,r)}else n.current=null}function Pu(e,t,n){try{n()}catch(r){ze(e,t,r)}}var Ud=!1;function c1(e,t){if(cu=Ul,e=Hm(),xc(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var s=0,a=-1,f=-1,u=0,m=0,h=e,w=null;t:for(;;){for(var _;h!==n||o!==0&&h.nodeType!==3||(a=s+o),h!==i||r!==0&&h.nodeType!==3||(f=s+r),h.nodeType===3&&(s+=h.nodeValue.length),(_=h.firstChild)!==null;)w=h,h=_;for(;;){if(h===e)break t;if(w===n&&++u===o&&(a=s),w===i&&++m===r&&(f=s),(_=h.nextSibling)!==null)break;h=w,w=h.parentNode}h=_}n=a===-1||f===-1?null:{start:a,end:f}}else n=null}n=n||{start:0,end:0}}else n=null;for(fu={focusedElem:e,selectionRange:n},Ul=!1,q=t;q!==null;)if(t=q,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,q=e;else for(;q!==null;){t=q;try{var E=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(E!==null){var x=E.memoizedProps,P=E.memoizedState,g=t.stateNode,p=g.getSnapshotBeforeUpdate(t.elementType===t.type?x:Vt(t.type,x),P);g.__reactInternalSnapshotBeforeUpdate=p}break;case 3:var S=t.stateNode.containerInfo;S.nodeType===1?S.textContent="":S.nodeType===9&&S.documentElement&&S.removeChild(S.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(L(163))}}catch(C){ze(t,t.return,C)}if(e=t.sibling,e!==null){e.return=t.return,q=e;break}q=t.return}return E=Ud,Ud=!1,E}function ii(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&Pu(t,n,i)}o=o.next}while(o!==r)}}function Ts(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Ru(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Lh(e){var t=e.alternate;t!==null&&(e.alternate=null,Lh(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[rn],delete t[yi],delete t[mu],delete t[qw],delete t[Gw])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Fh(e){return e.tag===5||e.tag===3||e.tag===4}function Vd(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Fh(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Tu(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Gl));else if(r!==4&&(e=e.child,e!==null))for(Tu(e,t,n),e=e.sibling;e!==null;)Tu(e,t,n),e=e.sibling}function Nu(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Nu(e,t,n),e=e.sibling;e!==null;)Nu(e,t,n),e=e.sibling}var tt=null,Gt=!1;function Mn(e,t,n){for(n=n.child;n!==null;)zh(e,t,n),n=n.sibling}function zh(e,t,n){if(sn&&typeof sn.onCommitFiberUnmount=="function")try{sn.onCommitFiberUnmount(Ss,n)}catch{}switch(n.tag){case 5:st||Xr(n,t);case 6:var r=tt,o=Gt;tt=null,Mn(e,t,n),tt=r,Gt=o,tt!==null&&(Gt?(e=tt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):tt.removeChild(n.stateNode));break;case 18:tt!==null&&(Gt?(e=tt,n=n.stateNode,e.nodeType===8?xa(e.parentNode,n):e.nodeType===1&&xa(e,n),pi(e)):xa(tt,n.stateNode));break;case 4:r=tt,o=Gt,tt=n.stateNode.containerInfo,Gt=!0,Mn(e,t,n),tt=r,Gt=o;break;case 0:case 11:case 14:case 15:if(!st&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,s=i.destroy;i=i.tag,s!==void 0&&(i&2||i&4)&&Pu(n,t,s),o=o.next}while(o!==r)}Mn(e,t,n);break;case 1:if(!st&&(Xr(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){ze(n,t,a)}Mn(e,t,n);break;case 21:Mn(e,t,n);break;case 22:n.mode&1?(st=(r=st)||n.memoizedState!==null,Mn(e,t,n),st=r):Mn(e,t,n);break;default:Mn(e,t,n)}}function qd(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new u1),t.forEach(function(r){var o=w1.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function Ut(e,t){var n=t.deletions;if(n!==null)for(var r=0;ro&&(o=s),r&=~i}if(r=o,r=He()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*d1(r/1960))-r,10e?16:e,Bn===null)var r=!1;else{if(e=Bn,Bn=null,ls=0,ye&6)throw Error(L(331));var o=ye;for(ye|=4,q=e.current;q!==null;){var i=q,s=i.child;if(q.flags&16){var a=i.deletions;if(a!==null){for(var f=0;fHe()-$c?gr(e,0):zc|=n),xt(e,t)}function Gh(e,t){t===0&&(e.mode&1?(t=ol,ol<<=1,!(ol&130023424)&&(ol=4194304)):t=1);var n=ft();e=Sn(e,t),e!==null&&(Ni(e,t,n),xt(e,n))}function y1(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Gh(e,n)}function w1(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(L(314))}r!==null&&r.delete(t),Gh(e,n)}var Kh;Kh=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||yt.current)gt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return gt=!1,l1(e,t,n);gt=!!(e.flags&131072)}else gt=!1,Oe&&t.flags&1048576&&Zm(t,Xl,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Al(e,t),e=t.pendingProps;var o=ao(t,at.current);ro(t,n),o=Mc(null,t,r,e,o,n);var i=Dc();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,wt(r)?(i=!0,Ql(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Rc(t),o.updater=Rs,t.stateNode=o,o._reactInternals=t,xu(t,r,e,n),t=_u(null,t,r,!0,i,n)):(t.tag=0,Oe&&i&&Sc(t),ct(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Al(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=S1(r),e=Vt(r,e),o){case 0:t=Eu(null,t,r,e,n);break e;case 1:t=Hd(null,t,r,e,n);break e;case 11:t=zd(null,t,r,e,n);break e;case 14:t=$d(null,t,r,Vt(r.type,e),n);break e}throw Error(L(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Vt(r,o),Eu(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Vt(r,o),Hd(e,t,r,o,n);case 3:e:{if(Oh(t),e===null)throw Error(L(387));r=t.pendingProps,i=t.memoizedState,o=i.element,oh(e,t),es(t,r,null,n);var s=t.memoizedState;if(r=s.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=po(Error(L(423)),t),t=Bd(e,t,r,n,o);break e}else if(r!==o){o=po(Error(L(424)),t),t=Bd(e,t,r,n,o);break e}else for(Ct=qn(t.stateNode.containerInfo.firstChild),kt=t,Oe=!0,Kt=null,n=nh(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(uo(),r===o){t=En(e,t,n);break e}ct(e,t,r,n)}t=t.child}return t;case 5:return ih(t),e===null&&gu(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,s=o.children,du(r,o)?s=null:i!==null&&du(r,i)&&(t.flags|=32),Nh(e,t),ct(e,t,s,n),t.child;case 6:return e===null&&gu(t),null;case 13:return Ah(e,t,n);case 4:return Tc(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=co(t,null,r,n):ct(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Vt(r,o),zd(e,t,r,o,n);case 7:return ct(e,t,t.pendingProps,n),t.child;case 8:return ct(e,t,t.pendingProps.children,n),t.child;case 12:return ct(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,s=o.value,ke(Zl,r._currentValue),r._currentValue=s,i!==null)if(Xt(i.value,s)){if(i.children===o.children&&!yt.current){t=En(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var a=i.dependencies;if(a!==null){s=i.child;for(var f=a.firstContext;f!==null;){if(f.context===r){if(i.tag===1){f=yn(-1,n&-n),f.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var m=u.pending;m===null?f.next=f:(f.next=m.next,m.next=f),u.pending=f}}i.lanes|=n,f=i.alternate,f!==null&&(f.lanes|=n),yu(i.return,n,t),a.lanes|=n;break}f=f.next}}else if(i.tag===10)s=i.type===t.type?null:i.child;else if(i.tag===18){if(s=i.return,s===null)throw Error(L(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),yu(s,n,t),s=i.sibling}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===t){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}ct(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,ro(t,n),o=zt(o),r=r(o),t.flags|=1,ct(e,t,r,n),t.child;case 14:return r=t.type,o=Vt(r,t.pendingProps),o=Vt(r.type,o),$d(e,t,r,o,n);case 15:return Rh(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Vt(r,o),Al(e,t),t.tag=1,wt(r)?(e=!0,Ql(t)):e=!1,ro(t,n),Ch(t,r,o),xu(t,r,o,n),_u(null,t,r,!0,e,n);case 19:return Mh(e,t,n);case 22:return Th(e,t,n)}throw Error(L(156,t.tag))};function Qh(e,t){return Em(e,t)}function x1(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Lt(e,t,n,r){return new x1(e,t,n,r)}function Uc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function S1(e){if(typeof e=="function")return Uc(e)?1:0;if(e!=null){if(e=e.$$typeof,e===uc)return 11;if(e===cc)return 14}return 2}function Yn(e,t){var n=e.alternate;return n===null?(n=Lt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function jl(e,t,n,r,o,i){var s=2;if(r=e,typeof e=="function")Uc(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Br:return yr(n.children,o,i,t);case ac:s=8,o|=8;break;case Ua:return e=Lt(12,n,t,o|2),e.elementType=Ua,e.lanes=i,e;case Va:return e=Lt(13,n,t,o),e.elementType=Va,e.lanes=i,e;case qa:return e=Lt(19,n,t,o),e.elementType=qa,e.lanes=i,e;case im:return Os(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case rm:s=10;break e;case om:s=9;break e;case uc:s=11;break e;case cc:s=14;break e;case Ln:s=16,r=null;break e}throw Error(L(130,e==null?e:typeof e,""))}return t=Lt(s,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function yr(e,t,n,r){return e=Lt(7,e,r,t),e.lanes=n,e}function Os(e,t,n,r){return e=Lt(22,e,r,t),e.elementType=im,e.lanes=n,e.stateNode={isHidden:!1},e}function Ra(e,t,n){return e=Lt(6,e,null,t),e.lanes=n,e}function Ta(e,t,n){return t=Lt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function E1(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ua(0),this.expirationTimes=ua(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ua(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Vc(e,t,n,r,o,i,s,a,f){return e=new E1(e,t,n,a,f),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Lt(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Rc(i),e}function _1(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Jh)}catch(e){console.error(e)}}Jh(),Jp.exports=Tt;var Rr=Jp.exports;const R1=Ri(Rr);var ep=Rr;Ba.createRoot=ep.createRoot,Ba.hydrateRoot=ep.hydrateRoot;var T1={BASE_URL:"/sqlite-viewer/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const tp=e=>{let t;const n=new Set,r=(m,h)=>{const w=typeof m=="function"?m(t):m;if(!Object.is(w,t)){const _=t;t=h??(typeof w!="object"||w===null)?w:Object.assign({},t,w),n.forEach(E=>E(t,_))}},o=()=>t,f={setState:r,getState:o,getInitialState:()=>u,subscribe:m=>(n.add(m),()=>n.delete(m)),destroy:()=>{(T1?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},u=t=e(r,o,f);return f},N1=e=>e?tp(e):tp;var ev={exports:{}},tv={},nv={exports:{}},rv={};/** +`+i.stack}return{value:e,source:t,stack:o,digest:null}}function ka(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Su(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var i1=typeof WeakMap=="function"?WeakMap:Map;function Ph(e,t,n){n=yn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){is||(is=!0,Ou=r),Su(e,t)},n}function Rh(e,t,n){n=yn(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){Su(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){Su(e,t),typeof r!="function"&&(Kn===null?Kn=new Set([this]):Kn.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}function Ld(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new i1;var o=new Set;r.set(t,o)}else o=r.get(t),o===void 0&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=w1.bind(null,e,t,n),t.then(e,e))}function Fd(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function zd(e,t,n,r,o){return e.mode&1?(e.flags|=65536,e.lanes=o,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=yn(-1,1),t.tag=2,Gn(n,t,1))),n.lanes|=1),e)}var l1=kn.ReactCurrentOwner,gt=!1;function ct(e,t,n,r){t.child=e===null?rh(t,null,n,r):co(t,e.child,n,r)}function $d(e,t,n,r,o){n=n.render;var i=t.ref;return ro(t,o),r=Mc(e,t,n,r,i,o),n=jc(),e!==null&&!gt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,En(e,t,o)):(Oe&&n&&Sc(t),t.flags|=1,ct(e,t,r,o),t.child)}function Hd(e,t,n,r,o){if(e===null){var i=n.type;return typeof i=="function"&&!Uc(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,Th(e,t,i,r,o)):(e=Dl(n.type,null,r,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&o)){var s=i.memoizedProps;if(n=n.compare,n=n!==null?n:hi,n(s,r)&&e.ref===t.ref)return En(e,t,o)}return t.flags|=1,e=Yn(i,r),e.ref=t.ref,e.return=t,t.child=e}function Th(e,t,n,r,o){if(e!==null){var i=e.memoizedProps;if(hi(i,r)&&e.ref===t.ref)if(gt=!1,t.pendingProps=r=i,(e.lanes&o)!==0)e.flags&131072&&(gt=!0);else return t.lanes=e.lanes,En(e,t,o)}return Eu(e,t,n,r,o)}function Nh(e,t,n){var r=t.pendingProps,o=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ke(Zr,_t),_t|=n;else{if(!(n&1073741824))return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ke(Zr,_t),_t|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,ke(Zr,_t),_t|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,ke(Zr,_t),_t|=r;return ct(e,t,o,n),t.child}function Oh(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Eu(e,t,n,r,o){var i=wt(n)?wr:at.current;return i=ao(t,i),ro(t,o),n=Mc(e,t,n,r,i,o),r=jc(),e!==null&&!gt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,En(e,t,o)):(Oe&&r&&Sc(t),t.flags|=1,ct(e,t,n,o),t.child)}function Bd(e,t,n,r,o){if(wt(n)){var i=!0;Ql(t)}else i=!1;if(ro(t,o),t.stateNode===null)Al(e,t),kh(t,n,r),xu(t,n,r,o),r=!0;else if(e===null){var s=t.stateNode,a=t.memoizedProps;s.props=a;var f=s.context,u=n.contextType;typeof u=="object"&&u!==null?u=zt(u):(u=wt(n)?wr:at.current,u=ao(t,u));var p=n.getDerivedStateFromProps,h=typeof p=="function"||typeof s.getSnapshotBeforeUpdate=="function";h||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==r||f!==u)&&Id(t,s,r,u),Fn=!1;var y=t.memoizedState;s.state=y,es(t,r,s,o),f=t.memoizedState,a!==r||y!==f||yt.current||Fn?(typeof p=="function"&&(wu(t,n,p,r),f=t.memoizedState),(a=Fn||Dd(t,n,a,r,y,f,u))?(h||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=f),s.props=r,s.state=f,s.context=u,r=a):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,ih(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:Vt(t.type,a),s.props=u,h=t.pendingProps,y=s.context,f=n.contextType,typeof f=="object"&&f!==null?f=zt(f):(f=wt(n)?wr:at.current,f=ao(t,f));var _=n.getDerivedStateFromProps;(p=typeof _=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==h||y!==f)&&Id(t,s,r,f),Fn=!1,y=t.memoizedState,s.state=y,es(t,r,s,o);var E=t.memoizedState;a!==h||y!==E||yt.current||Fn?(typeof _=="function"&&(wu(t,n,_,r),E=t.memoizedState),(u=Fn||Dd(t,n,u,r,y,E,f)||!1)?(p||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,E,f),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,E,f)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&y===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&y===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=E),s.props=r,s.state=E,s.context=f,r=u):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&y===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&y===e.memoizedState||(t.flags|=1024),r=!1)}return _u(e,t,n,r,i,o)}function _u(e,t,n,r,o,i){Oh(e,t);var s=(t.flags&128)!==0;if(!r&&!s)return o&&Pd(t,n,!1),En(e,t,i);r=t.stateNode,l1.current=t;var a=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=co(t,e.child,null,i),t.child=co(t,null,a,i)):ct(e,t,a,i),t.memoizedState=r.state,o&&Pd(t,n,!0),t.child}function Ah(e){var t=e.stateNode;t.pendingContext?kd(e,t.pendingContext,t.pendingContext!==t.context):t.context&&kd(e,t.context,!1),Tc(e,t.containerInfo)}function Wd(e,t,n,r,o){return uo(),_c(o),t.flags|=256,ct(e,t,n,r),t.child}var bu={dehydrated:null,treeContext:null,retryLane:0};function Cu(e){return{baseLanes:e,cachePool:null,transitions:null}}function Mh(e,t,n){var r=t.pendingProps,o=je.current,i=!1,s=(t.flags&128)!==0,a;if((a=s)||(a=e!==null&&e.memoizedState===null?!1:(o&2)!==0),a?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),ke(je,o&1),e===null)return gu(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(s=r.children,e=r.fallback,i?(r=t.mode,i=t.child,s={mode:"hidden",children:s},!(r&1)&&i!==null?(i.childLanes=0,i.pendingProps=s):i=Os(s,r,0,null),e=yr(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=Cu(n),t.memoizedState=bu,e):Lc(t,s));if(o=e.memoizedState,o!==null&&(a=o.dehydrated,a!==null))return s1(e,t,s,r,a,o,n);if(i){i=r.fallback,s=t.mode,o=e.child,a=o.sibling;var f={mode:"hidden",children:r.children};return!(s&1)&&t.child!==o?(r=t.child,r.childLanes=0,r.pendingProps=f,t.deletions=null):(r=Yn(o,f),r.subtreeFlags=o.subtreeFlags&14680064),a!==null?i=Yn(a,i):(i=yr(i,s,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,s=e.child.memoizedState,s=s===null?Cu(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},i.memoizedState=s,i.childLanes=e.childLanes&~n,t.memoizedState=bu,r}return i=e.child,e=i.sibling,r=Yn(i,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Lc(e,t){return t=Os({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function dl(e,t,n,r){return r!==null&&_c(r),co(t,e.child,null,n),e=Lc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function s1(e,t,n,r,o,i,s){if(n)return t.flags&256?(t.flags&=-257,r=ka(Error(F(422))),dl(e,t,s,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,o=t.mode,r=Os({mode:"visible",children:r.children},o,0,null),i=yr(i,o,s,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,t.mode&1&&co(t,e.child,null,s),t.child.memoizedState=Cu(s),t.memoizedState=bu,i);if(!(t.mode&1))return dl(e,t,s,null);if(o.data==="$!"){if(r=o.nextSibling&&o.nextSibling.dataset,r)var a=r.dgst;return r=a,i=Error(F(419)),r=ka(i,r,void 0),dl(e,t,s,r)}if(a=(s&e.childLanes)!==0,gt||a){if(r=Je,r!==null){switch(s&-s){case 4:o=2;break;case 16:o=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}o=o&(r.suspendedLanes|s)?0:o,o!==0&&o!==i.retryLane&&(i.retryLane=o,Sn(e,o),Yt(r,e,o,-1))}return Wc(),r=ka(Error(F(421))),dl(e,t,s,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=x1.bind(null,e),o._reactRetry=t,null):(e=i.treeContext,Ct=qn(o.nextSibling),kt=t,Oe=!0,Kt=null,e!==null&&(Dt[It++]=vn,Dt[It++]=gn,Dt[It++]=xr,vn=e.id,gn=e.overflow,xr=t),t=Lc(t,r.children),t.flags|=4096,t)}function Ud(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),yu(e.return,t,n)}function Pa(e,t,n,r,o){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=o)}function jh(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(ct(e,t,r.children,n),r=je.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Ud(e,n,t);else if(e.tag===19)Ud(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(ke(je,r),!(t.mode&1))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&ts(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),Pa(t,!1,o,n,i);break;case"backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&ts(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}Pa(t,!0,n,null,i);break;case"together":Pa(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Al(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function En(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Er|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(F(153));if(t.child!==null){for(e=t.child,n=Yn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Yn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function a1(e,t,n){switch(t.tag){case 3:Ah(t),uo();break;case 5:lh(t);break;case 1:wt(t.type)&&Ql(t);break;case 4:Tc(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;ke(Zl,r._currentValue),r._currentValue=o;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(ke(je,je.current&1),t.flags|=128,null):n&t.child.childLanes?Mh(e,t,n):(ke(je,je.current&1),e=En(e,t,n),e!==null?e.sibling:null);ke(je,je.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return jh(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),ke(je,je.current),r)break;return null;case 22:case 23:return t.lanes=0,Nh(e,t,n)}return En(e,t,n)}var Dh,ku,Ih,Lh;Dh=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};ku=function(){};Ih=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,hr(an.current);var i=null;switch(n){case"input":o=Ka(e,o),r=Ka(e,r),i=[];break;case"select":o=Ie({},o,{value:void 0}),r=Ie({},r,{value:void 0}),i=[];break;case"textarea":o=Xa(e,o),r=Xa(e,r),i=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Gl)}Ja(n,r);var s;n=null;for(u in o)if(!r.hasOwnProperty(u)&&o.hasOwnProperty(u)&&o[u]!=null)if(u==="style"){var a=o[u];for(s in a)a.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(ai.hasOwnProperty(u)?i||(i=[]):(i=i||[]).push(u,null));for(u in r){var f=r[u];if(a=o!=null?o[u]:void 0,r.hasOwnProperty(u)&&f!==a&&(f!=null||a!=null))if(u==="style")if(a){for(s in a)!a.hasOwnProperty(s)||f&&f.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in f)f.hasOwnProperty(s)&&a[s]!==f[s]&&(n||(n={}),n[s]=f[s])}else n||(i||(i=[]),i.push(u,n)),n=f;else u==="dangerouslySetInnerHTML"?(f=f?f.__html:void 0,a=a?a.__html:void 0,f!=null&&a!==f&&(i=i||[]).push(u,f)):u==="children"?typeof f!="string"&&typeof f!="number"||(i=i||[]).push(u,""+f):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(ai.hasOwnProperty(u)?(f!=null&&u==="onScroll"&&Te("scroll",e),i||a===f||(i=[])):(i=i||[]).push(u,f))}n&&(i=i||[]).push("style",n);var u=i;(t.updateQueue=u)&&(t.flags|=4)}};Lh=function(e,t,n,r){n!==r&&(t.flags|=4)};function Uo(e,t){if(!Oe)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function lt(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags&14680064,r|=o.flags&14680064,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function u1(e,t,n){var r=t.pendingProps;switch(Ec(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return lt(t),null;case 1:return wt(t.type)&&Kl(),lt(t),null;case 3:return r=t.stateNode,fo(),Ne(yt),Ne(at),Oc(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(cl(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Kt!==null&&(ju(Kt),Kt=null))),ku(e,t),lt(t),null;case 5:Nc(t);var o=hr(xi.current);if(n=t.type,e!==null&&t.stateNode!=null)Ih(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(F(166));return lt(t),null}if(e=hr(an.current),cl(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[rn]=t,r[yi]=i,e=(t.mode&1)!==0,n){case"dialog":Te("cancel",r),Te("close",r);break;case"iframe":case"object":case"embed":Te("load",r);break;case"video":case"audio":for(o=0;o<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[rn]=t,e[yi]=r,Dh(e,t,!1,!1),t.stateNode=e;e:{switch(s=eu(n,r),n){case"dialog":Te("cancel",e),Te("close",e),o=r;break;case"iframe":case"object":case"embed":Te("load",e),o=r;break;case"video":case"audio":for(o=0;omo&&(t.flags|=128,r=!0,Uo(i,!1),t.lanes=4194304)}else{if(!r)if(e=ts(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Uo(i,!0),i.tail===null&&i.tailMode==="hidden"&&!s.alternate&&!Oe)return lt(t),null}else 2*He()-i.renderingStartTime>mo&&n!==1073741824&&(t.flags|=128,r=!0,Uo(i,!1),t.lanes=4194304);i.isBackwards?(s.sibling=t.child,t.child=s):(n=i.last,n!==null?n.sibling=s:t.child=s,i.last=s)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=He(),t.sibling=null,n=je.current,ke(je,r?n&1|2:n&1),t):(lt(t),null);case 22:case 23:return Bc(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?_t&1073741824&&(lt(t),t.subtreeFlags&6&&(t.flags|=8192)):lt(t),null;case 24:return null;case 25:return null}throw Error(F(156,t.tag))}function c1(e,t){switch(Ec(t),t.tag){case 1:return wt(t.type)&&Kl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return fo(),Ne(yt),Ne(at),Oc(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Nc(t),null;case 13:if(Ne(je),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(F(340));uo()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ne(je),null;case 4:return fo(),null;case 10:return kc(t.type._context),null;case 22:case 23:return Bc(),null;case 24:return null;default:return null}}var pl=!1,st=!1,f1=typeof WeakSet=="function"?WeakSet:Set,q=null;function Xr(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){ze(e,t,r)}else n.current=null}function Pu(e,t,n){try{n()}catch(r){ze(e,t,r)}}var Vd=!1;function d1(e,t){if(cu=Ul,e=Bm(),xc(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var s=0,a=-1,f=-1,u=0,p=0,h=e,y=null;t:for(;;){for(var _;h!==n||o!==0&&h.nodeType!==3||(a=s+o),h!==i||r!==0&&h.nodeType!==3||(f=s+r),h.nodeType===3&&(s+=h.nodeValue.length),(_=h.firstChild)!==null;)y=h,h=_;for(;;){if(h===e)break t;if(y===n&&++u===o&&(a=s),y===i&&++p===r&&(f=s),(_=h.nextSibling)!==null)break;h=y,y=h.parentNode}h=_}n=a===-1||f===-1?null:{start:a,end:f}}else n=null}n=n||{start:0,end:0}}else n=null;for(fu={focusedElem:e,selectionRange:n},Ul=!1,q=t;q!==null;)if(t=q,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,q=e;else for(;q!==null;){t=q;try{var E=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(E!==null){var x=E.memoizedProps,P=E.memoizedState,v=t.stateNode,m=v.getSnapshotBeforeUpdate(t.elementType===t.type?x:Vt(t.type,x),P);v.__reactInternalSnapshotBeforeUpdate=m}break;case 3:var S=t.stateNode.containerInfo;S.nodeType===1?S.textContent="":S.nodeType===9&&S.documentElement&&S.removeChild(S.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(F(163))}}catch(k){ze(t,t.return,k)}if(e=t.sibling,e!==null){e.return=t.return,q=e;break}q=t.return}return E=Vd,Vd=!1,E}function ii(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&Pu(t,n,i)}o=o.next}while(o!==r)}}function Ts(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Ru(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Fh(e){var t=e.alternate;t!==null&&(e.alternate=null,Fh(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[rn],delete t[yi],delete t[mu],delete t[Kw],delete t[Qw])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function zh(e){return e.tag===5||e.tag===3||e.tag===4}function qd(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||zh(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Tu(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Gl));else if(r!==4&&(e=e.child,e!==null))for(Tu(e,t,n),e=e.sibling;e!==null;)Tu(e,t,n),e=e.sibling}function Nu(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Nu(e,t,n),e=e.sibling;e!==null;)Nu(e,t,n),e=e.sibling}var tt=null,Gt=!1;function Mn(e,t,n){for(n=n.child;n!==null;)$h(e,t,n),n=n.sibling}function $h(e,t,n){if(sn&&typeof sn.onCommitFiberUnmount=="function")try{sn.onCommitFiberUnmount(Ss,n)}catch{}switch(n.tag){case 5:st||Xr(n,t);case 6:var r=tt,o=Gt;tt=null,Mn(e,t,n),tt=r,Gt=o,tt!==null&&(Gt?(e=tt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):tt.removeChild(n.stateNode));break;case 18:tt!==null&&(Gt?(e=tt,n=n.stateNode,e.nodeType===8?xa(e.parentNode,n):e.nodeType===1&&xa(e,n),pi(e)):xa(tt,n.stateNode));break;case 4:r=tt,o=Gt,tt=n.stateNode.containerInfo,Gt=!0,Mn(e,t,n),tt=r,Gt=o;break;case 0:case 11:case 14:case 15:if(!st&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,s=i.destroy;i=i.tag,s!==void 0&&(i&2||i&4)&&Pu(n,t,s),o=o.next}while(o!==r)}Mn(e,t,n);break;case 1:if(!st&&(Xr(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){ze(n,t,a)}Mn(e,t,n);break;case 21:Mn(e,t,n);break;case 22:n.mode&1?(st=(r=st)||n.memoizedState!==null,Mn(e,t,n),st=r):Mn(e,t,n);break;default:Mn(e,t,n)}}function Gd(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new f1),t.forEach(function(r){var o=S1.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function Ut(e,t){var n=t.deletions;if(n!==null)for(var r=0;ro&&(o=s),r&=~i}if(r=o,r=He()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*m1(r/1960))-r,10e?16:e,Bn===null)var r=!1;else{if(e=Bn,Bn=null,ls=0,ye&6)throw Error(F(331));var o=ye;for(ye|=4,q=e.current;q!==null;){var i=q,s=i.child;if(q.flags&16){var a=i.deletions;if(a!==null){for(var f=0;fHe()-$c?gr(e,0):zc|=n),xt(e,t)}function Kh(e,t){t===0&&(e.mode&1?(t=ol,ol<<=1,!(ol&130023424)&&(ol=4194304)):t=1);var n=ft();e=Sn(e,t),e!==null&&(Ni(e,t,n),xt(e,n))}function x1(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Kh(e,n)}function S1(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(F(314))}r!==null&&r.delete(t),Kh(e,n)}var Qh;Qh=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||yt.current)gt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return gt=!1,a1(e,t,n);gt=!!(e.flags&131072)}else gt=!1,Oe&&t.flags&1048576&&Jm(t,Xl,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Al(e,t),e=t.pendingProps;var o=ao(t,at.current);ro(t,n),o=Mc(null,t,r,e,o,n);var i=jc();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,wt(r)?(i=!0,Ql(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Rc(t),o.updater=Rs,t.stateNode=o,o._reactInternals=t,xu(t,r,e,n),t=_u(null,t,r,!0,i,n)):(t.tag=0,Oe&&i&&Sc(t),ct(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Al(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=_1(r),e=Vt(r,e),o){case 0:t=Eu(null,t,r,e,n);break e;case 1:t=Bd(null,t,r,e,n);break e;case 11:t=$d(null,t,r,e,n);break e;case 14:t=Hd(null,t,r,Vt(r.type,e),n);break e}throw Error(F(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Vt(r,o),Eu(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Vt(r,o),Bd(e,t,r,o,n);case 3:e:{if(Ah(t),e===null)throw Error(F(387));r=t.pendingProps,i=t.memoizedState,o=i.element,ih(e,t),es(t,r,null,n);var s=t.memoizedState;if(r=s.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=po(Error(F(423)),t),t=Wd(e,t,r,n,o);break e}else if(r!==o){o=po(Error(F(424)),t),t=Wd(e,t,r,n,o);break e}else for(Ct=qn(t.stateNode.containerInfo.firstChild),kt=t,Oe=!0,Kt=null,n=rh(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(uo(),r===o){t=En(e,t,n);break e}ct(e,t,r,n)}t=t.child}return t;case 5:return lh(t),e===null&&gu(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,s=o.children,du(r,o)?s=null:i!==null&&du(r,i)&&(t.flags|=32),Oh(e,t),ct(e,t,s,n),t.child;case 6:return e===null&&gu(t),null;case 13:return Mh(e,t,n);case 4:return Tc(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=co(t,null,r,n):ct(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Vt(r,o),$d(e,t,r,o,n);case 7:return ct(e,t,t.pendingProps,n),t.child;case 8:return ct(e,t,t.pendingProps.children,n),t.child;case 12:return ct(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,s=o.value,ke(Zl,r._currentValue),r._currentValue=s,i!==null)if(Xt(i.value,s)){if(i.children===o.children&&!yt.current){t=En(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var a=i.dependencies;if(a!==null){s=i.child;for(var f=a.firstContext;f!==null;){if(f.context===r){if(i.tag===1){f=yn(-1,n&-n),f.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var p=u.pending;p===null?f.next=f:(f.next=p.next,p.next=f),u.pending=f}}i.lanes|=n,f=i.alternate,f!==null&&(f.lanes|=n),yu(i.return,n,t),a.lanes|=n;break}f=f.next}}else if(i.tag===10)s=i.type===t.type?null:i.child;else if(i.tag===18){if(s=i.return,s===null)throw Error(F(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),yu(s,n,t),s=i.sibling}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===t){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}ct(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,ro(t,n),o=zt(o),r=r(o),t.flags|=1,ct(e,t,r,n),t.child;case 14:return r=t.type,o=Vt(r,t.pendingProps),o=Vt(r.type,o),Hd(e,t,r,o,n);case 15:return Th(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Vt(r,o),Al(e,t),t.tag=1,wt(r)?(e=!0,Ql(t)):e=!1,ro(t,n),kh(t,r,o),xu(t,r,o,n),_u(null,t,r,!0,e,n);case 19:return jh(e,t,n);case 22:return Nh(e,t,n)}throw Error(F(156,t.tag))};function Yh(e,t){return _m(e,t)}function E1(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Lt(e,t,n,r){return new E1(e,t,n,r)}function Uc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function _1(e){if(typeof e=="function")return Uc(e)?1:0;if(e!=null){if(e=e.$$typeof,e===uc)return 11;if(e===cc)return 14}return 2}function Yn(e,t){var n=e.alternate;return n===null?(n=Lt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Dl(e,t,n,r,o,i){var s=2;if(r=e,typeof e=="function")Uc(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Br:return yr(n.children,o,i,t);case ac:s=8,o|=8;break;case Ua:return e=Lt(12,n,t,o|2),e.elementType=Ua,e.lanes=i,e;case Va:return e=Lt(13,n,t,o),e.elementType=Va,e.lanes=i,e;case qa:return e=Lt(19,n,t,o),e.elementType=qa,e.lanes=i,e;case lm:return Os(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case om:s=10;break e;case im:s=9;break e;case uc:s=11;break e;case cc:s=14;break e;case Ln:s=16,r=null;break e}throw Error(F(130,e==null?e:typeof e,""))}return t=Lt(s,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function yr(e,t,n,r){return e=Lt(7,e,r,t),e.lanes=n,e}function Os(e,t,n,r){return e=Lt(22,e,r,t),e.elementType=lm,e.lanes=n,e.stateNode={isHidden:!1},e}function Ra(e,t,n){return e=Lt(6,e,null,t),e.lanes=n,e}function Ta(e,t,n){return t=Lt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function b1(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ua(0),this.expirationTimes=ua(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ua(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Vc(e,t,n,r,o,i,s,a,f){return e=new b1(e,t,n,a,f),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Lt(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Rc(i),e}function C1(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(ev)}catch(e){console.error(e)}}ev(),em.exports=Tt;var Rr=em.exports;const N1=Ri(Rr);var tp=Rr;Ba.createRoot=tp.createRoot,Ba.hydrateRoot=tp.hydrateRoot;var O1={BASE_URL:"/sqlite-viewer/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const np=e=>{let t;const n=new Set,r=(p,h)=>{const y=typeof p=="function"?p(t):p;if(!Object.is(y,t)){const _=t;t=h??(typeof y!="object"||y===null)?y:Object.assign({},t,y),n.forEach(E=>E(t,_))}},o=()=>t,f={setState:r,getState:o,getInitialState:()=>u,subscribe:p=>(n.add(p),()=>n.delete(p)),destroy:()=>{(O1?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},u=t=e(r,o,f);return f},A1=e=>e?np(e):np;var tv={exports:{}},nv={},rv={exports:{}},ov={};/** * @license React * use-sync-external-store-shim.production.min.js * @@ -45,7 +45,7 @@ Error generating stack: `+i.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var ho=y;function O1(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var A1=typeof Object.is=="function"?Object.is:O1,M1=ho.useState,D1=ho.useEffect,j1=ho.useLayoutEffect,I1=ho.useDebugValue;function L1(e,t){var n=t(),r=M1({inst:{value:n,getSnapshot:t}}),o=r[0].inst,i=r[1];return j1(function(){o.value=n,o.getSnapshot=t,Na(o)&&i({inst:o})},[e,n,t]),D1(function(){return Na(o)&&i({inst:o}),e(function(){Na(o)&&i({inst:o})})},[e]),I1(n),n}function Na(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!A1(e,n)}catch{return!0}}function F1(e,t){return t()}var z1=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?F1:L1;rv.useSyncExternalStore=ho.useSyncExternalStore!==void 0?ho.useSyncExternalStore:z1;nv.exports=rv;var $1=nv.exports;/** + */var ho=w;function M1(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var j1=typeof Object.is=="function"?Object.is:M1,D1=ho.useState,I1=ho.useEffect,L1=ho.useLayoutEffect,F1=ho.useDebugValue;function z1(e,t){var n=t(),r=D1({inst:{value:n,getSnapshot:t}}),o=r[0].inst,i=r[1];return L1(function(){o.value=n,o.getSnapshot=t,Na(o)&&i({inst:o})},[e,n,t]),I1(function(){return Na(o)&&i({inst:o}),e(function(){Na(o)&&i({inst:o})})},[e]),F1(n),n}function Na(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!j1(e,n)}catch{return!0}}function $1(e,t){return t()}var H1=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?$1:z1;ov.useSyncExternalStore=ho.useSyncExternalStore!==void 0?ho.useSyncExternalStore:H1;rv.exports=ov;var B1=rv.exports;/** * @license React * use-sync-external-store-shim/with-selector.production.min.js * @@ -53,14 +53,14 @@ Error generating stack: `+i.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Is=y,H1=$1;function B1(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var W1=typeof Object.is=="function"?Object.is:B1,U1=H1.useSyncExternalStore,V1=Is.useRef,q1=Is.useEffect,G1=Is.useMemo,K1=Is.useDebugValue;tv.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var i=V1(null);if(i.current===null){var s={hasValue:!1,value:null};i.current=s}else s=i.current;i=G1(function(){function f(_){if(!u){if(u=!0,m=_,_=r(_),o!==void 0&&s.hasValue){var E=s.value;if(o(E,_))return h=E}return h=_}if(E=h,W1(m,_))return E;var x=r(_);return o!==void 0&&o(E,x)?E:(m=_,h=x)}var u=!1,m,h,w=n===void 0?null:n;return[function(){return f(t())},w===null?void 0:function(){return f(w())}]},[t,n,r,o]);var a=U1(e,i[0],i[1]);return q1(function(){s.hasValue=!0,s.value=a},[a]),K1(a),a};ev.exports=tv;var Q1=ev.exports;const Y1=Ri(Q1);var ov={BASE_URL:"/sqlite-viewer/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const{useDebugValue:X1}=qt,{useSyncExternalStoreWithSelector:Z1}=Y1;let np=!1;const J1=e=>e;function ex(e,t=J1,n){(ov?"production":void 0)!=="production"&&n&&!np&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),np=!0);const r=Z1(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return X1(r),r}const rp=e=>{(ov?"production":void 0)!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t=typeof e=="function"?N1(e):e,n=(r,o)=>ex(t,r,o);return Object.assign(n,t),n},tx=e=>e?rp(e):rp;var iv={exports:{}};const nx={},rx=Object.freeze(Object.defineProperty({__proto__:null,default:nx},Symbol.toStringTag,{value:"Module"})),Oa=t0(rx);(function(e,t){var n=void 0,r=function(o){return n||(n=new Promise(function(i,s){var a=typeof o<"u"?o:{},f=a.onAbort;a.onAbort=function(l){s(new Error(l)),f&&f(l)},a.postRun=a.postRun||[],a.postRun.push(function(){i(a)}),e=void 0;var u;u||(u=typeof a<"u"?a:{}),u.onRuntimeInitialized=function(){function l(R,j){switch(typeof j){case"boolean":Zy(R,j?1:0);break;case"number":Qy(R,j);break;case"string":Yy(R,j,-1,-1);break;case"object":if(j===null)Wf(R);else if(j.length!=null){var X=Gi(j,qi);Xy(R,X,j.length,-1),Yi(X)}else Zi(R,"Wrong API use : tried to return a value of an unknown type ("+j+").",-1);break;default:Wf(R)}}function c(R,j){for(var X=[],re=0;re>>0),R!=null){var j=this.filename,X="/",re=j;if(X&&(X=typeof X=="string"?X:Oo(X),re=j?Ht(X+"/"+j):X),j=zi(!0,!0),re=$i(re,(j!==void 0?j:438)&4095|32768,0),R){if(typeof R=="string"){X=Array(R.length);for(var fe=0,Ce=R.length;fe(l=Ee(l)?new URL(l):C.normalize(l),S.readFileSync(l,c?void 0:"utf8")),p=l=>(l=P(l,!0),l.buffer||(l=new Uint8Array(l)),l),g=(l,c,d,v=!0)=>{l=Ee(l)?new URL(l):C.normalize(l),S.readFile(l,v?void 0:"utf8",(b,O)=>{b?d(b):c(v?O.buffer:O)})},!u.thisProgram&&1"[Emscripten Module object]"}else(w||_)&&(_?x=self.location.href:typeof document<"u"&&document.currentScript&&(x=document.currentScript.src),x=x.indexOf("blob:")!==0?x.substr(0,x.replace(/[?#].*/,"").lastIndexOf("/")+1):"",P=l=>{var c=new XMLHttpRequest;return c.open("GET",l,!1),c.send(null),c.responseText},_&&(p=l=>{var c=new XMLHttpRequest;return c.open("GET",l,!1),c.responseType="arraybuffer",c.send(null),new Uint8Array(c.response)}),g=(l,c,d)=>{var v=new XMLHttpRequest;v.open("GET",l,!0),v.responseType="arraybuffer",v.onload=()=>{v.status==200||v.status==0&&v.response?c(v.response):d()},v.onerror=d,v.send(null)});var T=u.print||console.log.bind(console),A=u.printErr||console.error.bind(console);Object.assign(u,m),m=null,u.thisProgram&&(h=u.thisProgram);var N;u.wasmBinary&&(N=u.wasmBinary),typeof WebAssembly!="object"&&he("no native wasm support detected");var D,G=!1,F,V,U,H,B,Q,se;function J(){var l=D.buffer;u.HEAP8=F=new Int8Array(l),u.HEAP16=U=new Int16Array(l),u.HEAPU8=V=new Uint8Array(l),u.HEAPU16=new Uint16Array(l),u.HEAP32=H=new Int32Array(l),u.HEAPU32=B=new Uint32Array(l),u.HEAPF32=Q=new Float32Array(l),u.HEAPF64=se=new Float64Array(l)}var I=[],z=[],ee=[];function oe(){var l=u.preRun.shift();I.unshift(l)}var ie=0,Ve=null;function he(l){var c;throw(c=u.onAbort)==null||c.call(u,l),l="Aborted("+l+")",A(l),G=!0,new WebAssembly.RuntimeError(l+". Build with -sASSERTIONS for more info.")}var ot=l=>l.startsWith("data:application/octet-stream;base64,"),Ee=l=>l.startsWith("file://"),Y;if(Y="sql-wasm.wasm",!ot(Y)){var we=Y;Y=u.locateFile?u.locateFile(we,x):x+we}function Le(l){if(l==Y&&N)return new Uint8Array(N);if(p)return p(l);throw"both async and sync fetching of the wasm failed"}function ve(l){if(!N&&(w||_)){if(typeof fetch=="function"&&!Ee(l))return fetch(l,{credentials:"same-origin"}).then(c=>{if(!c.ok)throw"failed to load wasm binary file at '"+l+"'";return c.arrayBuffer()}).catch(()=>Le(l));if(g)return new Promise((c,d)=>{g(l,v=>c(new Uint8Array(v)),d)})}return Promise.resolve().then(()=>Le(l))}function me(l,c,d){return ve(l).then(v=>WebAssembly.instantiate(v,c)).then(v=>v).then(d,v=>{A(`failed to asynchronously prepare wasm: ${v}`),he(v)})}function de(l,c){var d=Y;N||typeof WebAssembly.instantiateStreaming!="function"||ot(d)||Ee(d)||E||typeof fetch!="function"?me(d,l,c):fetch(d,{credentials:"same-origin"}).then(v=>WebAssembly.instantiateStreaming(v,l).then(c,function(b){return A(`wasm streaming compile failed: ${b}`),A("falling back to ArrayBuffer instantiation"),me(d,l,c)}))}var K,ce,Ot=l=>{for(;0>0];case"i8":return F[l>>0];case"i16":return U[l>>1];case"i32":return H[l>>2];case"i64":he("to do getValue(i64) use WASM_BIGINT");case"float":return Q[l>>2];case"double":return se[l>>3];case"*":return B[l>>2];default:he(`invalid type for getValue: ${c}`)}}function Ye(l){var c="i32";switch(c.endsWith("*")&&(c="*"),c){case"i1":F[l>>0]=0;break;case"i8":F[l>>0]=0;break;case"i16":U[l>>1]=0;break;case"i32":H[l>>2]=0;break;case"i64":he("to do setValue(i64) use WASM_BIGINT");case"float":Q[l>>2]=0;break;case"double":se[l>>3]=0;break;case"*":B[l>>2]=0;break;default:he(`invalid type for setValue: ${c}`)}}var Tn=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,xe=(l,c,d)=>{var v=c+d;for(d=c;l[d]&&!(d>=v);)++d;if(16b?v+=String.fromCharCode(b):(b-=65536,v+=String.fromCharCode(55296|b>>10,56320|b&1023))}}else v+=String.fromCharCode(b)}return v},Nn=(l,c)=>l?xe(V,l,c):"",Fi=(l,c)=>{for(var d=0,v=l.length-1;0<=v;v--){var b=l[v];b==="."?l.splice(v,1):b===".."?(l.splice(v,1),d++):d&&(l.splice(v,1),d--)}if(c)for(;d;d--)l.unshift("..");return l},Ht=l=>{var c=l.charAt(0)==="/",d=l.substr(-1)==="/";return(l=Fi(l.split("/").filter(v=>!!v),!c).join("/"))||c||(l="."),l&&d&&(l+="/"),(c?"/":"")+l},Vs=l=>{var c=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(l).slice(1);return l=c[0],c=c[1],!l&&!c?".":(c&&(c=c.substr(0,c.length-1)),l+c)},W=l=>{if(l==="/")return"/";l=Ht(l),l=l.replace(/\/$/,"");var c=l.lastIndexOf("/");return c===-1?l:l.substr(c+1)},te=()=>{if(typeof crypto=="object"&&typeof crypto.getRandomValues=="function")return d=>crypto.getRandomValues(d);if(E)try{var l=Oa;if(l.randomFillSync)return d=>l.randomFillSync(d);var c=l.randomBytes;return d=>(d.set(c(d.byteLength)),d)}catch{}he("initRandomDevice")},Ae=l=>(Ae=te())(l);function Fe(){for(var l="",c=!1,d=arguments.length-1;-1<=d&&!c;d--){if(c=0<=d?arguments[d]:"/",typeof c!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!c)return"";l=c+"/"+l,c=c.charAt(0)==="/"}return l=Fi(l.split("/").filter(v=>!!v),!c).join("/"),(c?"/":"")+l||"."}var et=[],At=l=>{for(var c=0,d=0;d=v?c++:2047>=v?c+=2:55296<=v&&57343>=v?(c+=4,++d):c+=3}return c},St=(l,c,d,v)=>{if(!(0=M){var ne=l.charCodeAt(++O);M=65536+((M&1023)<<10)|ne&1023}if(127>=M){if(d>=v)break;c[d++]=M}else{if(2047>=M){if(d+1>=v)break;c[d++]=192|M>>6}else{if(65535>=M){if(d+2>=v)break;c[d++]=224|M>>12}else{if(d+3>=v)break;c[d++]=240|M>>18,c[d++]=128|M>>12&63}c[d++]=128|M>>6&63}c[d++]=128|M&63}}return c[d]=0,d-b};function Tr(l,c){var d=Array(At(l)+1);return l=St(l,d,0,d.length),c&&(d.length=l),d}var Nr=[];function Or(l,c){Nr[l]={input:[],output:[],Xa:c},Qs(l,Ar)}var Ar={open(l){var c=Nr[l.node.rdev];if(!c)throw new $(43);l.tty=c,l.seekable=!1},close(l){l.tty.Xa.fsync(l.tty)},fsync(l){l.tty.Xa.fsync(l.tty)},read(l,c,d,v){if(!l.tty||!l.tty.Xa.sb)throw new $(60);for(var b=0,O=0;Oe;function nx(e,t=tx,n){(iv?"production":void 0)!=="production"&&n&&!rp&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),rp=!0);const r=ex(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return J1(r),r}const op=e=>{(iv?"production":void 0)!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t=typeof e=="function"?A1(e):e,n=(r,o)=>nx(t,r,o);return Object.assign(n,t),n},rx=e=>e?op(e):op;var lv={exports:{}};const ox={},ix=Object.freeze(Object.defineProperty({__proto__:null,default:ox},Symbol.toStringTag,{value:"Module"})),Oa=r0(ix);(function(e,t){var n=void 0,r=function(o){return n||(n=new Promise(function(i,s){var a=typeof o<"u"?o:{},f=a.onAbort;a.onAbort=function(l){s(new Error(l)),f&&f(l)},a.postRun=a.postRun||[],a.postRun.push(function(){i(a)}),e=void 0;var u;u||(u=typeof a<"u"?a:{}),u.onRuntimeInitialized=function(){function l(T,D){switch(typeof D){case"boolean":e0(T,D?1:0);break;case"number":Xy(T,D);break;case"string":Zy(T,D,-1,-1);break;case"object":if(D===null)Uf(T);else if(D.length!=null){var X=Gi(D,qi);Jy(T,X,D.length,-1),Yi(X)}else Zi(T,"Wrong API use : tried to return a value of an unknown type ("+D+").",-1);break;default:Uf(T)}}function c(T,D){for(var X=[],re=0;re>>0),T!=null){var D=this.filename,X="/",re=D;if(X&&(X=typeof X=="string"?X:Oo(X),re=D?Ht(X+"/"+D):X),D=zi(!0,!0),re=$i(re,(D!==void 0?D:438)&4095|32768,0),T){if(typeof T=="string"){X=Array(T.length);for(var fe=0,Ce=T.length;fe(l=Ee(l)?new URL(l):k.normalize(l),S.readFileSync(l,c?void 0:"utf8")),m=l=>(l=P(l,!0),l.buffer||(l=new Uint8Array(l)),l),v=(l,c,d,g=!0)=>{l=Ee(l)?new URL(l):k.normalize(l),S.readFile(l,g?void 0:"utf8",(b,O)=>{b?d(b):c(g?O.buffer:O)})},!u.thisProgram&&1"[Emscripten Module object]"}else(y||_)&&(_?x=self.location.href:typeof document<"u"&&document.currentScript&&(x=document.currentScript.src),x=x.indexOf("blob:")!==0?x.substr(0,x.replace(/[?#].*/,"").lastIndexOf("/")+1):"",P=l=>{var c=new XMLHttpRequest;return c.open("GET",l,!1),c.send(null),c.responseText},_&&(m=l=>{var c=new XMLHttpRequest;return c.open("GET",l,!1),c.responseType="arraybuffer",c.send(null),new Uint8Array(c.response)}),v=(l,c,d)=>{var g=new XMLHttpRequest;g.open("GET",l,!0),g.responseType="arraybuffer",g.onload=()=>{g.status==200||g.status==0&&g.response?c(g.response):d()},g.onerror=d,g.send(null)});var R=u.print||console.log.bind(console),A=u.printErr||console.error.bind(console);Object.assign(u,p),p=null,u.thisProgram&&(h=u.thisProgram);var N;u.wasmBinary&&(N=u.wasmBinary),typeof WebAssembly!="object"&&he("no native wasm support detected");var M,G=!1,L,V,U,H,B,Q,se;function J(){var l=M.buffer;u.HEAP8=L=new Int8Array(l),u.HEAP16=U=new Int16Array(l),u.HEAPU8=V=new Uint8Array(l),u.HEAPU16=new Uint16Array(l),u.HEAP32=H=new Int32Array(l),u.HEAPU32=B=new Uint32Array(l),u.HEAPF32=Q=new Float32Array(l),u.HEAPF64=se=new Float64Array(l)}var I=[],z=[],ee=[];function oe(){var l=u.preRun.shift();I.unshift(l)}var ie=0,Ve=null;function he(l){var c;throw(c=u.onAbort)==null||c.call(u,l),l="Aborted("+l+")",A(l),G=!0,new WebAssembly.RuntimeError(l+". Build with -sASSERTIONS for more info.")}var ot=l=>l.startsWith("data:application/octet-stream;base64,"),Ee=l=>l.startsWith("file://"),Y;if(Y="sql-wasm.wasm",!ot(Y)){var we=Y;Y=u.locateFile?u.locateFile(we,x):x+we}function Le(l){if(l==Y&&N)return new Uint8Array(N);if(m)return m(l);throw"both async and sync fetching of the wasm failed"}function ve(l){if(!N&&(y||_)){if(typeof fetch=="function"&&!Ee(l))return fetch(l,{credentials:"same-origin"}).then(c=>{if(!c.ok)throw"failed to load wasm binary file at '"+l+"'";return c.arrayBuffer()}).catch(()=>Le(l));if(v)return new Promise((c,d)=>{v(l,g=>c(new Uint8Array(g)),d)})}return Promise.resolve().then(()=>Le(l))}function me(l,c,d){return ve(l).then(g=>WebAssembly.instantiate(g,c)).then(g=>g).then(d,g=>{A(`failed to asynchronously prepare wasm: ${g}`),he(g)})}function de(l,c){var d=Y;N||typeof WebAssembly.instantiateStreaming!="function"||ot(d)||Ee(d)||E||typeof fetch!="function"?me(d,l,c):fetch(d,{credentials:"same-origin"}).then(g=>WebAssembly.instantiateStreaming(g,l).then(c,function(b){return A(`wasm streaming compile failed: ${b}`),A("falling back to ArrayBuffer instantiation"),me(d,l,c)}))}var K,ce,Ot=l=>{for(;0>0];case"i8":return L[l>>0];case"i16":return U[l>>1];case"i32":return H[l>>2];case"i64":he("to do getValue(i64) use WASM_BIGINT");case"float":return Q[l>>2];case"double":return se[l>>3];case"*":return B[l>>2];default:he(`invalid type for getValue: ${c}`)}}function Ye(l){var c="i32";switch(c.endsWith("*")&&(c="*"),c){case"i1":L[l>>0]=0;break;case"i8":L[l>>0]=0;break;case"i16":U[l>>1]=0;break;case"i32":H[l>>2]=0;break;case"i64":he("to do setValue(i64) use WASM_BIGINT");case"float":Q[l>>2]=0;break;case"double":se[l>>3]=0;break;case"*":B[l>>2]=0;break;default:he(`invalid type for setValue: ${c}`)}}var Tn=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,xe=(l,c,d)=>{var g=c+d;for(d=c;l[d]&&!(d>=g);)++d;if(16b?g+=String.fromCharCode(b):(b-=65536,g+=String.fromCharCode(55296|b>>10,56320|b&1023))}}else g+=String.fromCharCode(b)}return g},Nn=(l,c)=>l?xe(V,l,c):"",Fi=(l,c)=>{for(var d=0,g=l.length-1;0<=g;g--){var b=l[g];b==="."?l.splice(g,1):b===".."?(l.splice(g,1),d++):d&&(l.splice(g,1),d--)}if(c)for(;d;d--)l.unshift("..");return l},Ht=l=>{var c=l.charAt(0)==="/",d=l.substr(-1)==="/";return(l=Fi(l.split("/").filter(g=>!!g),!c).join("/"))||c||(l="."),l&&d&&(l+="/"),(c?"/":"")+l},Vs=l=>{var c=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(l).slice(1);return l=c[0],c=c[1],!l&&!c?".":(c&&(c=c.substr(0,c.length-1)),l+c)},W=l=>{if(l==="/")return"/";l=Ht(l),l=l.replace(/\/$/,"");var c=l.lastIndexOf("/");return c===-1?l:l.substr(c+1)},te=()=>{if(typeof crypto=="object"&&typeof crypto.getRandomValues=="function")return d=>crypto.getRandomValues(d);if(E)try{var l=Oa;if(l.randomFillSync)return d=>l.randomFillSync(d);var c=l.randomBytes;return d=>(d.set(c(d.byteLength)),d)}catch{}he("initRandomDevice")},Ae=l=>(Ae=te())(l);function Fe(){for(var l="",c=!1,d=arguments.length-1;-1<=d&&!c;d--){if(c=0<=d?arguments[d]:"/",typeof c!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!c)return"";l=c+"/"+l,c=c.charAt(0)==="/"}return l=Fi(l.split("/").filter(g=>!!g),!c).join("/"),(c?"/":"")+l||"."}var et=[],At=l=>{for(var c=0,d=0;d=g?c++:2047>=g?c+=2:55296<=g&&57343>=g?(c+=4,++d):c+=3}return c},St=(l,c,d,g)=>{if(!(0=j){var ne=l.charCodeAt(++O);j=65536+((j&1023)<<10)|ne&1023}if(127>=j){if(d>=g)break;c[d++]=j}else{if(2047>=j){if(d+1>=g)break;c[d++]=192|j>>6}else{if(65535>=j){if(d+2>=g)break;c[d++]=224|j>>12}else{if(d+3>=g)break;c[d++]=240|j>>18,c[d++]=128|j>>12&63}c[d++]=128|j>>6&63}c[d++]=128|j&63}}return c[d]=0,d-b};function Tr(l,c){var d=Array(At(l)+1);return l=St(l,d,0,d.length),c&&(d.length=l),d}var Nr=[];function Or(l,c){Nr[l]={input:[],output:[],Xa:c},Qs(l,Ar)}var Ar={open(l){var c=Nr[l.node.rdev];if(!c)throw new $(43);l.tty=c,l.seekable=!1},close(l){l.tty.Xa.fsync(l.tty)},fsync(l){l.tty.Xa.fsync(l.tty)},read(l,c,d,g){if(!l.tty||!l.tty.Xa.sb)throw new $(60);for(var b=0,O=0;O=c||(c=Math.max(c,d*(1048576>d?2:1.125)>>>0),d!=0&&(c=Math.max(c,256)),d=l.Ia,l.Ia=new Uint8Array(c),0=l.node.Ma)return 0;if(l=Math.min(l.node.Ma-b,v),8c)throw new $(28);return c},lb(l,c,d){Mr(l.node,c+d),l.node.Ma=Math.max(l.node.Ma,c+d)},bb(l,c,d,v,b){if((l.node.mode&61440)!==32768)throw new $(43);if(l=l.node.Ia,b&2||l.buffer!==F.buffer){if((0{var d=0;return l&&(d|=365),c&&(d|=146),d},qs=null,df={},No=[],wy=1,On=null,pf=!0,$=null,Gs={};function ht(l,c={}){if(l=Fe(l),!l)return{path:"",node:null};if(c=Object.assign({qb:!0,kb:0},c),8!!M);for(var d=qs,v="/",b=0;b>>0)%On.length}function mf(l){var c=Ks(l.parent.id,l.name);if(On[c]===l)On[c]=l.Wa;else for(c=On[c];c;){if(c.Wa===l){c.Wa=l.Wa;break}c=c.Wa}}function lr(l,c){var d;if(d=(d=Dr(l,"x"))?d:l.Ga.lookup?0:2)throw new $(d,l);for(d=On[Ks(l.id,c)];d;d=d.Wa){var v=d.name;if(d.parent.id===l.id&&v===c)return d}return l.Ga.lookup(l,c)}function hf(l,c,d,v){return l=new Df(l,c,d,v),c=Ks(l.parent.id,l.name),l.Wa=On[c],On[c]=l}function Mt(l){return(l&61440)===16384}function vf(l){var c=["r","w","rw"][l&3];return l&512&&(c+="w"),c}function Dr(l,c){if(pf)return 0;if(!c.includes("r")||l.mode&292){if(c.includes("w")&&!(l.mode&146)||c.includes("x")&&!(l.mode&73))return 2}else return 2;return 0}function gf(l,c){try{return lr(l,c),20}catch{}return Dr(l,"wx")}function yf(l,c,d){try{var v=lr(l,c)}catch(b){return b.Ka}if(l=Dr(l,"wx"))return l;if(d){if(!Mt(v.mode))return 54;if(v===v.parent||Oo(v)==="/")return 10}else if(Mt(v.mode))return 31;return 0}function xy(){for(var l=0;4096>=l;l++)if(!No[l])return l;throw new $(33)}function ut(l){if(l=No[l],!l)throw new $(8);return l}function wf(l,c=-1){return Do||(Do=function(){this.$a={}},Do.prototype={},Object.defineProperties(Do.prototype,{object:{get(){return this.node},set(d){this.node=d}},flags:{get(){return this.$a.flags},set(d){this.$a.flags=d}},position:{get(){return this.$a.position},set(d){this.$a.position=d}}})),l=Object.assign(new Do,l),c==-1&&(c=xy()),l.fd=c,No[c]=l}var Sy={open(l){var c,d;l.Ha=df[l.node.rdev].Ha,(d=(c=l.Ha).open)==null||d.call(c,l)},Ta(){throw new $(70)}};function Qs(l,c){df[l]={Ha:c}}function xf(l,c){var d=c==="/",v=!c;if(d&&qs)throw new $(10);if(!d&&!v){var b=ht(c,{qb:!1});if(c=b.path,b=b.node,b.Va)throw new $(10);if(!Mt(b.mode))throw new $(54)}c={type:l,Pb:{},tb:c,Cb:[]},l=l.Ra(c),l.Ra=c,c.root=l,d?qs=l:b&&(b.Va=c,b.Ra&&b.Ra.Cb.push(c))}function $i(l,c,d){var v=ht(l,{parent:!0}).node;if(l=W(l),!l||l==="."||l==="..")throw new $(28);var b=gf(v,l);if(b)throw new $(b);if(!v.Ga.ab)throw new $(63);return v.Ga.ab(v,l,c,d)}function Jt(l,c){return $i(l,(c!==void 0?c:511)&1023|16384,0)}function Hi(l,c,d){typeof d>"u"&&(d=c,c=438),$i(l,c|8192,d)}function Ys(l,c){if(!Fe(l))throw new $(44);var d=ht(c,{parent:!0}).node;if(!d)throw new $(44);c=W(c);var v=gf(d,c);if(v)throw new $(v);if(!d.Ga.symlink)throw new $(63);d.Ga.symlink(d,c,l)}function Sf(l){var c=ht(l,{parent:!0}).node;l=W(l);var d=lr(c,l),v=yf(c,l,!0);if(v)throw new $(v);if(!c.Ga.rmdir)throw new $(63);if(d.Va)throw new $(10);c.Ga.rmdir(c,l),mf(d)}function Ef(l){var c=ht(l,{parent:!0}).node;if(!c)throw new $(44);l=W(l);var d=lr(c,l),v=yf(c,l,!1);if(v)throw new $(v);if(!c.Ga.unlink)throw new $(63);if(d.Va)throw new $(10);c.Ga.unlink(c,l),mf(d)}function _f(l){if(l=ht(l).node,!l)throw new $(44);if(!l.Ga.readlink)throw new $(28);return Fe(Oo(l.parent),l.Ga.readlink(l))}function Ao(l,c){if(l=ht(l,{Sa:!c}).node,!l)throw new $(44);if(!l.Ga.Pa)throw new $(63);return l.Ga.Pa(l)}function bf(l){return Ao(l,!0)}function Bi(l,c){if(l=typeof l=="string"?ht(l,{Sa:!0}).node:l,!l.Ga.Oa)throw new $(63);l.Ga.Oa(l,{mode:c&4095|l.mode&-4096,timestamp:Date.now()})}function Cf(l,c){if(0>c)throw new $(28);if(l=typeof l=="string"?ht(l,{Sa:!0}).node:l,!l.Ga.Oa)throw new $(63);if(Mt(l.mode))throw new $(31);if((l.mode&61440)!==32768)throw new $(28);var d=Dr(l,"w");if(d)throw new $(d);l.Ga.Oa(l,{size:c,timestamp:Date.now()})}function jr(l,c,d){if(l==="")throw new $(44);if(typeof c=="string"){var v={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[c];if(typeof v>"u")throw Error(`Unknown file open mode: ${c}`);c=v}if(d=c&64?(typeof d>"u"?438:d)&4095|32768:0,typeof l=="object")var b=l;else{l=Ht(l);try{b=ht(l,{Sa:!(c&131072)}).node}catch{}}if(v=!1,c&64)if(b){if(c&128)throw new $(20)}else b=$i(l,d,0),v=!0;if(!b)throw new $(44);if((b.mode&61440)===8192&&(c&=-513),c&65536&&!Mt(b.mode))throw new $(54);if(!v&&(d=b?(b.mode&61440)===40960?32:Mt(b.mode)&&(vf(c)!=="r"||c&512)?31:Dr(b,vf(c)):44))throw new $(d);return c&512&&!v&&Cf(b,0),c&=-131713,b=wf({node:b,path:Oo(b),flags:c,seekable:!0,position:0,Ha:b.Ha,Fb:[],error:!1}),b.Ha.open&&b.Ha.open(b),!u.logReadFiles||c&1||(Zs||(Zs={}),l in Zs||(Zs[l]=1)),b}function Xs(l){if(l.fd===null)throw new $(8);l.hb&&(l.hb=null);try{l.Ha.close&&l.Ha.close(l)}catch(c){throw c}finally{No[l.fd]=null}l.fd=null}function kf(l,c,d){if(l.fd===null)throw new $(8);if(!l.seekable||!l.Ha.Ta)throw new $(70);if(d!=0&&d!=1&&d!=2)throw new $(28);l.position=l.Ha.Ta(l,c,d),l.Fb=[]}function Pf(l,c,d,v,b){if(0>v||0>b)throw new $(28);if(l.fd===null)throw new $(8);if((l.flags&2097155)===1)throw new $(8);if(Mt(l.node.mode))throw new $(31);if(!l.Ha.read)throw new $(28);var O=typeof b<"u";if(!O)b=l.position;else if(!l.seekable)throw new $(70);return c=l.Ha.read(l,c,d,v,b),O||(l.position+=c),c}function Rf(l,c,d,v,b){if(0>v||0>b)throw new $(28);if(l.fd===null)throw new $(8);if(!(l.flags&2097155))throw new $(8);if(Mt(l.node.mode))throw new $(31);if(!l.Ha.write)throw new $(28);l.seekable&&l.flags&1024&&kf(l,0,2);var O=typeof b<"u";if(!O)b=l.position;else if(!l.seekable)throw new $(70);return c=l.Ha.write(l,c,d,v,b,void 0),O||(l.position+=c),c}function Ey(l){var c,d=jr(l,d||0);l=Ao(l).size;var v=new Uint8Array(l);return Pf(d,v,0,l,0),c=v,Xs(d),c}function Tf(){$||($=function(l,c){this.name="ErrnoError",this.node=c,this.Eb=function(d){this.Ka=d},this.Eb(l),this.message="FS error"},$.prototype=Error(),$.prototype.constructor=$,[44].forEach(l=>{Gs[l]=new $(l),Gs[l].stack=""}))}var Nf;function Mo(l,c,d){l=Ht("/dev/"+l);var v=zi(!!c,!!d);Of||(Of=64);var b=Of++<<8|0;Qs(b,{open(O){O.seekable=!1},close(){var O;(O=d==null?void 0:d.buffer)!=null&&O.length&&d(10)},read(O,M,ne,ge){for(var ue=0,We=0;We>2]=v.dev,H[d+4>>2]=v.mode,B[d+8>>2]=v.nlink,H[d+12>>2]=v.uid,H[d+16>>2]=v.gid,H[d+20>>2]=v.rdev,ce=[v.size>>>0,(K=v.size,1<=+Math.abs(K)?0>>0:~~+Math.ceil((K-+(~~K>>>0))/4294967296)>>>0:0)],H[d+24>>2]=ce[0],H[d+28>>2]=ce[1],H[d+32>>2]=4096,H[d+36>>2]=v.blocks,l=v.atime.getTime(),c=v.mtime.getTime();var b=v.ctime.getTime();return ce=[Math.floor(l/1e3)>>>0,(K=Math.floor(l/1e3),1<=+Math.abs(K)?0>>0:~~+Math.ceil((K-+(~~K>>>0))/4294967296)>>>0:0)],H[d+40>>2]=ce[0],H[d+44>>2]=ce[1],B[d+48>>2]=l%1e3*1e3,ce=[Math.floor(c/1e3)>>>0,(K=Math.floor(c/1e3),1<=+Math.abs(K)?0>>0:~~+Math.ceil((K-+(~~K>>>0))/4294967296)>>>0:0)],H[d+56>>2]=ce[0],H[d+60>>2]=ce[1],B[d+64>>2]=c%1e3*1e3,ce=[Math.floor(b/1e3)>>>0,(K=Math.floor(b/1e3),1<=+Math.abs(K)?0>>0:~~+Math.ceil((K-+(~~K>>>0))/4294967296)>>>0:0)],H[d+72>>2]=ce[0],H[d+76>>2]=ce[1],B[d+80>>2]=b%1e3*1e3,ce=[v.ino>>>0,(K=v.ino,1<=+Math.abs(K)?0>>0:~~+Math.ceil((K-+(~~K>>>0))/4294967296)>>>0:0)],H[d+88>>2]=ce[0],H[d+92>>2]=ce[1],0}var Ui=void 0;function Vi(){var l=H[+Ui>>2];return Ui+=4,l}var jo=(l,c)=>c+2097152>>>0<4194305-!!l?(l>>>0)+4294967296*c:NaN,_y=[0,31,60,91,121,152,182,213,244,274,305,335],by=[0,31,59,90,120,151,181,212,243,273,304,334],Af=l=>{var c=At(l)+1,d=Qi(c);return d&&St(l,V,d,c),d},Js={},Mf=()=>{if(!ea){var l={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:h||"./this.program"},c;for(c in Js)Js[c]===void 0?delete l[c]:l[c]=Js[c];var d=[];for(c in l)d.push(`${c}=${l[c]}`);ea=d}return ea},ea,ta=l=>{var c=At(l)+1,d=An(c);return St(l,V,d,c),d},Cy=(l,c,d,v)=>{var b={string:ue=>{var We=0;return ue!=null&&ue!==0&&(We=ta(ue)),We},array:ue=>{var We=An(ue.length);return F.set(ue,We),We}};l=u["_"+l];var O=[],M=0;if(v)for(var ne=0;ne(c=c==1?An(l.length):Qi(l.length),l.subarray||l.slice||(l=new Uint8Array(l)),V.set(l,c),c),ar,na=[],fn,Ir=l=>{ar.delete(fn.get(l)),fn.set(l,null),na.push(l)},Ki=(l,c)=>{if(!ar){ar=new WeakMap;var d=fn.length;if(ar)for(var v=0;v<0+d;v++){var b=fn.get(v);b&&ar.set(b,v)}}if(d=ar.get(l)||0)return d;if(na.length)d=na.pop();else{try{fn.grow(1)}catch(ne){throw ne instanceof RangeError?"Unable to grow wasm table. Set ALLOW_TABLE_GROWTH.":ne}d=fn.length-1}try{fn.set(d,l)}catch(ne){if(!(ne instanceof TypeError))throw ne;if(typeof WebAssembly.Function=="function"){v=WebAssembly.Function,b={i:"i32",j:"i64",f:"f32",d:"f64",e:"externref",p:"i32"};for(var O={parameters:[],results:c[0]=="v"?[]:[b[c[0]]]},M=1;MM?v.push(M):v.push(M%128|128,M>>7),M=0;Mb?c.push(b):c.push(b%128|128,b>>7),c.push.apply(c,v),c.push(2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0),c=new WebAssembly.Module(new Uint8Array(c)),c=new WebAssembly.Instance(c,{e:{f:l}}).exports.f}fn.set(d,c)}return ar.set(l,d),d};function Df(l,c,d,v){l||(l=this),this.parent=l,this.Ra=l.Ra,this.Va=null,this.id=wy++,this.name=c,this.mode=d,this.Ga={},this.Ha={},this.rdev=v}Object.defineProperties(Df.prototype,{read:{get:function(){return(this.mode&365)===365},set:function(l){l?this.mode|=365:this.mode&=-366}},write:{get:function(){return(this.mode&146)===146},set:function(l){l?this.mode|=146:this.mode&=-147}}}),Tf(),On=Array(4096),xf(le,"/"),Jt("/tmp"),Jt("/home"),Jt("/home/web_user"),function(){Jt("/dev"),Qs(259,{read:()=>0,write:(v,b,O,M)=>M}),Hi("/dev/null",259),Or(1280,Ro),Or(1536,To),Hi("/dev/tty",1280),Hi("/dev/tty1",1536);var l=new Uint8Array(1024),c=0,d=()=>(c===0&&(c=Ae(l).byteLength),l[--c]);Mo("random",d),Mo("urandom",d),Jt("/dev/shm"),Jt("/dev/shm/tmp")}(),function(){Jt("/proc");var l=Jt("/proc/self");Jt("/proc/self/fd"),xf({Ra(){var c=hf(l,"fd",16895,73);return c.Ga={lookup(d,v){var b=ut(+v);return d={parent:null,Ra:{tb:"fake"},Ga:{readlink:()=>b.path}},d.parent=d}},c}},"/proc/self/fd")}();var ky={a:(l,c,d,v)=>{he(`Assertion failed: ${l?xe(V,l):""}, at: `+[c?c?xe(V,c):"":"unknown filename",d,v?v?xe(V,v):"":"unknown function"])},h:function(l,c){try{return l=l?xe(V,l):"",Bi(l,c),0}catch(d){if(typeof Pe>"u"||d.name!=="ErrnoError")throw d;return-d.Ka}},H:function(l,c,d){try{if(c=c?xe(V,c):"",c=sr(l,c),d&-8)return-28;var v=ht(c,{Sa:!0}).node;return v?(l="",d&4&&(l+="r"),d&2&&(l+="w"),d&1&&(l+="x"),l&&Dr(v,l)?-2:0):-44}catch(b){if(typeof Pe>"u"||b.name!=="ErrnoError")throw b;return-b.Ka}},i:function(l,c){try{var d=ut(l);return Bi(d.node,c),0}catch(v){if(typeof Pe>"u"||v.name!=="ErrnoError")throw v;return-v.Ka}},g:function(l){try{var c=ut(l).node,d=typeof c=="string"?ht(c,{Sa:!0}).node:c;if(!d.Ga.Oa)throw new $(63);return d.Ga.Oa(d,{timestamp:Date.now()}),0}catch(v){if(typeof Pe>"u"||v.name!=="ErrnoError")throw v;return-v.Ka}},b:function(l,c,d){Ui=d;try{var v=ut(l);switch(c){case 0:var b=Vi();if(0>b)return-28;for(;No[b];)b++;return wf(v,b).fd;case 1:case 2:return 0;case 3:return v.flags;case 4:return b=Vi(),v.flags|=b,0;case 5:return b=Vi(),U[b+0>>1]=2,0;case 6:case 7:return 0;case 16:case 8:return-28;case 9:return H[jf()>>2]=28,-1;default:return-28}}catch(O){if(typeof Pe>"u"||O.name!=="ErrnoError")throw O;return-O.Ka}},f:function(l,c){try{var d=ut(l);return Wi(Ao,d.path,c)}catch(v){if(typeof Pe>"u"||v.name!=="ErrnoError")throw v;return-v.Ka}},n:function(l,c,d){c=jo(c,d);try{if(isNaN(c))return 61;var v=ut(l);if(!(v.flags&2097155))throw new $(28);return Cf(v.node,c),0}catch(b){if(typeof Pe>"u"||b.name!=="ErrnoError")throw b;return-b.Ka}},C:function(l,c){try{if(c===0)return-28;var d=At("/")+1;return c"u"||v.name!=="ErrnoError")throw v;return-v.Ka}},F:function(l,c){try{return l=l?xe(V,l):"",Wi(bf,l,c)}catch(d){if(typeof Pe>"u"||d.name!=="ErrnoError")throw d;return-d.Ka}},z:function(l,c,d){try{return c=c?xe(V,c):"",c=sr(l,c),c=Ht(c),c[c.length-1]==="/"&&(c=c.substr(0,c.length-1)),Jt(c,d),0}catch(v){if(typeof Pe>"u"||v.name!=="ErrnoError")throw v;return-v.Ka}},E:function(l,c,d,v){try{c=c?xe(V,c):"";var b=v&256;return c=sr(l,c,v&4096),Wi(b?bf:Ao,c,d)}catch(O){if(typeof Pe>"u"||O.name!=="ErrnoError")throw O;return-O.Ka}},y:function(l,c,d,v){Ui=v;try{c=c?xe(V,c):"",c=sr(l,c);var b=v?Vi():0;return jr(c,d,b).fd}catch(O){if(typeof Pe>"u"||O.name!=="ErrnoError")throw O;return-O.Ka}},w:function(l,c,d,v){try{if(c=c?xe(V,c):"",c=sr(l,c),0>=v)return-28;var b=_f(c),O=Math.min(v,At(b)),M=F[d+O];return St(b,V,d,v+1),F[d+O]=M,O}catch(ne){if(typeof Pe>"u"||ne.name!=="ErrnoError")throw ne;return-ne.Ka}},v:function(l){try{return l=l?xe(V,l):"",Sf(l),0}catch(c){if(typeof Pe>"u"||c.name!=="ErrnoError")throw c;return-c.Ka}},G:function(l,c){try{return l=l?xe(V,l):"",Wi(Ao,l,c)}catch(d){if(typeof Pe>"u"||d.name!=="ErrnoError")throw d;return-d.Ka}},r:function(l,c,d){try{return c=c?xe(V,c):"",c=sr(l,c),d===0?Ef(c):d===512?Sf(c):he("Invalid flags passed to unlinkat"),0}catch(v){if(typeof Pe>"u"||v.name!=="ErrnoError")throw v;return-v.Ka}},q:function(l,c,d){try{if(c=c?xe(V,c):"",c=sr(l,c,!0),d){var v=B[d>>2]+4294967296*H[d+4>>2],b=H[d+8>>2];O=1e3*v+b/1e6,d+=16,v=B[d>>2]+4294967296*H[d+4>>2],b=H[d+8>>2],M=1e3*v+b/1e6}else var O=Date.now(),M=O;l=O;var ne=ht(c,{Sa:!0}).node;return ne.Ga.Oa(ne,{timestamp:Math.max(l,M)}),0}catch(ge){if(typeof Pe>"u"||ge.name!=="ErrnoError")throw ge;return-ge.Ka}},l:function(l,c,d){l=new Date(1e3*jo(l,c)),H[d>>2]=l.getSeconds(),H[d+4>>2]=l.getMinutes(),H[d+8>>2]=l.getHours(),H[d+12>>2]=l.getDate(),H[d+16>>2]=l.getMonth(),H[d+20>>2]=l.getFullYear()-1900,H[d+24>>2]=l.getDay(),c=l.getFullYear(),H[d+28>>2]=(c%4!==0||c%100===0&&c%400!==0?by:_y)[l.getMonth()]+l.getDate()-1|0,H[d+36>>2]=-(60*l.getTimezoneOffset()),c=new Date(l.getFullYear(),6,1).getTimezoneOffset();var v=new Date(l.getFullYear(),0,1).getTimezoneOffset();H[d+32>>2]=(c!=v&&l.getTimezoneOffset()==Math.min(v,c))|0},j:function(l,c,d,v,b,O,M,ne){b=jo(b,O);try{if(isNaN(b))return 61;var ge=ut(v);if(c&2&&!(d&2)&&(ge.flags&2097155)!==2)throw new $(2);if((ge.flags&2097155)===1)throw new $(2);if(!ge.Ha.bb)throw new $(43);var ue=ge.Ha.bb(ge,l,b,c,d),We=ue.Db;return H[M>>2]=ue.ub,B[ne>>2]=We,0}catch(Xe){if(typeof Pe>"u"||Xe.name!=="ErrnoError")throw Xe;return-Xe.Ka}},k:function(l,c,d,v,b,O,M){O=jo(O,M);try{if(isNaN(O))return 61;var ne=ut(b);if(d&2){if((ne.node.mode&61440)!==32768)throw new $(43);if(!(v&2)){var ge=V.slice(l,l+c);ne.Ha.cb&&ne.Ha.cb(ne,ge,O,c,v)}}}catch(ue){if(typeof Pe>"u"||ue.name!=="ErrnoError")throw ue;return-ue.Ka}},s:(l,c,d)=>{function v(ge){return(ge=ge.toTimeString().match(/\(([A-Za-z ]+)\)$/))?ge[1]:"GMT"}var b=new Date().getFullYear(),O=new Date(b,0,1),M=new Date(b,6,1);b=O.getTimezoneOffset();var ne=M.getTimezoneOffset();B[l>>2]=60*Math.max(b,ne),H[c>>2]=+(b!=ne),l=v(O),c=v(M),l=Af(l),c=Af(c),ne>2]=l,B[d+4>>2]=c):(B[d>>2]=c,B[d+4>>2]=l)},d:()=>Date.now(),t:()=>2147483648,c:()=>performance.now(),o:l=>{var c=V.length;if(l>>>=0,2147483648=d;d*=2){var v=c*(1+.2/d);v=Math.min(v,l+100663296);var b=Math;v=Math.max(l,v);e:{b=(b.min.call(b,2147483648,v+(65536-v%65536)%65536)-D.buffer.byteLength+65535)/65536;try{D.grow(b),J();var O=1;break e}catch{}O=void 0}if(O)return!0}return!1},A:(l,c)=>{var d=0;return Mf().forEach((v,b)=>{var O=c+d;for(b=B[l+4*b>>2]=O,O=0;O>0]=v.charCodeAt(O);F[b>>0]=0,d+=v.length+1}),0},B:(l,c)=>{var d=Mf();B[l>>2]=d.length;var v=0;return d.forEach(b=>v+=b.length+1),B[c>>2]=v,0},e:function(l){try{var c=ut(l);return Xs(c),0}catch(d){if(typeof Pe>"u"||d.name!=="ErrnoError")throw d;return d.Ka}},p:function(l,c){try{var d=ut(l);return F[c>>0]=d.tty?2:Mt(d.mode)?3:(d.mode&61440)===40960?7:4,U[c+2>>1]=0,ce=[0,(K=0,1<=+Math.abs(K)?0>>0:~~+Math.ceil((K-+(~~K>>>0))/4294967296)>>>0:0)],H[c+8>>2]=ce[0],H[c+12>>2]=ce[1],ce=[0,(K=0,1<=+Math.abs(K)?0>>0:~~+Math.ceil((K-+(~~K>>>0))/4294967296)>>>0:0)],H[c+16>>2]=ce[0],H[c+20>>2]=ce[1],0}catch(v){if(typeof Pe>"u"||v.name!=="ErrnoError")throw v;return v.Ka}},x:function(l,c,d,v){try{e:{var b=ut(l);l=c;for(var O,M=c=0;M>2],ge=B[l+4>>2];l+=8;var ue=Pf(b,F,ne,ge,O);if(0>ue){var We=-1;break e}if(c+=ue,ue>2]=We,0}catch(Xe){if(typeof Pe>"u"||Xe.name!=="ErrnoError")throw Xe;return Xe.Ka}},m:function(l,c,d,v,b){c=jo(c,d);try{if(isNaN(c))return 61;var O=ut(l);return kf(O,c,v),ce=[O.position>>>0,(K=O.position,1<=+Math.abs(K)?0>>0:~~+Math.ceil((K-+(~~K>>>0))/4294967296)>>>0:0)],H[b>>2]=ce[0],H[b+4>>2]=ce[1],O.hb&&c===0&&v===0&&(O.hb=null),0}catch(M){if(typeof Pe>"u"||M.name!=="ErrnoError")throw M;return M.Ka}},D:function(l){var d;try{var c=ut(l);return(d=c.Ha)!=null&&d.fsync?c.Ha.fsync(c):0}catch(v){if(typeof Pe>"u"||v.name!=="ErrnoError")throw v;return v.Ka}},u:function(l,c,d,v){try{e:{var b=ut(l);l=c;for(var O,M=c=0;M>2],ge=B[l+4>>2];l+=8;var ue=Rf(b,F,ne,ge,O);if(0>ue){var We=-1;break e}c+=ue,typeof O<"u"&&(O+=ue)}We=c}return B[v>>2]=We,0}catch(Xe){if(typeof Pe>"u"||Xe.name!=="ErrnoError")throw Xe;return Xe.Ka}}},Z=function(){var d;function l(v){var b;return Z=v.exports,D=Z.I,J(),fn=Z.Aa,z.unshift(Z.J),ie--,(b=u.monitorRunDependencies)==null||b.call(u,ie),ie==0&&Ve&&(v=Ve,Ve=null,v()),Z}var c={a:ky};if(ie++,(d=u.monitorRunDependencies)==null||d.call(u,ie),u.instantiateWasm)try{return u.instantiateWasm(c,l)}catch(v){return A(`Module.instantiateWasm callback failed with error: ${v}`),!1}return de(c,function(v){l(v.instance)}),{}}();u._sqlite3_free=l=>(u._sqlite3_free=Z.K)(l),u._sqlite3_value_text=l=>(u._sqlite3_value_text=Z.L)(l);var jf=()=>(jf=Z.M)();u._sqlite3_prepare_v2=(l,c,d,v,b)=>(u._sqlite3_prepare_v2=Z.N)(l,c,d,v,b),u._sqlite3_step=l=>(u._sqlite3_step=Z.O)(l),u._sqlite3_reset=l=>(u._sqlite3_reset=Z.P)(l),u._sqlite3_exec=(l,c,d,v,b)=>(u._sqlite3_exec=Z.Q)(l,c,d,v,b),u._sqlite3_finalize=l=>(u._sqlite3_finalize=Z.R)(l),u._sqlite3_column_name=(l,c)=>(u._sqlite3_column_name=Z.S)(l,c),u._sqlite3_column_text=(l,c)=>(u._sqlite3_column_text=Z.T)(l,c),u._sqlite3_column_type=(l,c)=>(u._sqlite3_column_type=Z.U)(l,c),u._sqlite3_errmsg=l=>(u._sqlite3_errmsg=Z.V)(l),u._sqlite3_clear_bindings=l=>(u._sqlite3_clear_bindings=Z.W)(l),u._sqlite3_value_blob=l=>(u._sqlite3_value_blob=Z.X)(l),u._sqlite3_value_bytes=l=>(u._sqlite3_value_bytes=Z.Y)(l),u._sqlite3_value_double=l=>(u._sqlite3_value_double=Z.Z)(l),u._sqlite3_value_int=l=>(u._sqlite3_value_int=Z._)(l),u._sqlite3_value_type=l=>(u._sqlite3_value_type=Z.$)(l),u._sqlite3_result_blob=(l,c,d,v)=>(u._sqlite3_result_blob=Z.aa)(l,c,d,v),u._sqlite3_result_double=(l,c)=>(u._sqlite3_result_double=Z.ba)(l,c),u._sqlite3_result_error=(l,c,d)=>(u._sqlite3_result_error=Z.ca)(l,c,d),u._sqlite3_result_int=(l,c)=>(u._sqlite3_result_int=Z.da)(l,c),u._sqlite3_result_int64=(l,c,d)=>(u._sqlite3_result_int64=Z.ea)(l,c,d),u._sqlite3_result_null=l=>(u._sqlite3_result_null=Z.fa)(l),u._sqlite3_result_text=(l,c,d,v)=>(u._sqlite3_result_text=Z.ga)(l,c,d,v),u._sqlite3_aggregate_context=(l,c)=>(u._sqlite3_aggregate_context=Z.ha)(l,c),u._sqlite3_column_count=l=>(u._sqlite3_column_count=Z.ia)(l),u._sqlite3_data_count=l=>(u._sqlite3_data_count=Z.ja)(l),u._sqlite3_column_blob=(l,c)=>(u._sqlite3_column_blob=Z.ka)(l,c),u._sqlite3_column_bytes=(l,c)=>(u._sqlite3_column_bytes=Z.la)(l,c),u._sqlite3_column_double=(l,c)=>(u._sqlite3_column_double=Z.ma)(l,c),u._sqlite3_bind_blob=(l,c,d,v,b)=>(u._sqlite3_bind_blob=Z.na)(l,c,d,v,b),u._sqlite3_bind_double=(l,c,d)=>(u._sqlite3_bind_double=Z.oa)(l,c,d),u._sqlite3_bind_int=(l,c,d)=>(u._sqlite3_bind_int=Z.pa)(l,c,d),u._sqlite3_bind_text=(l,c,d,v,b)=>(u._sqlite3_bind_text=Z.qa)(l,c,d,v,b),u._sqlite3_bind_parameter_index=(l,c)=>(u._sqlite3_bind_parameter_index=Z.ra)(l,c),u._sqlite3_sql=l=>(u._sqlite3_sql=Z.sa)(l),u._sqlite3_normalized_sql=l=>(u._sqlite3_normalized_sql=Z.ta)(l),u._sqlite3_changes=l=>(u._sqlite3_changes=Z.ua)(l),u._sqlite3_close_v2=l=>(u._sqlite3_close_v2=Z.va)(l),u._sqlite3_create_function_v2=(l,c,d,v,b,O,M,ne,ge)=>(u._sqlite3_create_function_v2=Z.wa)(l,c,d,v,b,O,M,ne,ge),u._sqlite3_open=(l,c)=>(u._sqlite3_open=Z.xa)(l,c);var Qi=u._malloc=l=>(Qi=u._malloc=Z.ya)(l),Yi=u._free=l=>(Yi=u._free=Z.za)(l);u._RegisterExtensionFunctions=l=>(u._RegisterExtensionFunctions=Z.Ba)(l);var If=(l,c)=>(If=Z.Ca)(l,c),Io=()=>(Io=Z.Da)(),Lo=l=>(Lo=Z.Ea)(l),An=l=>(An=Z.Fa)(l);u.stackAlloc=An,u.stackSave=Io,u.stackRestore=Lo,u.cwrap=(l,c,d,v)=>{var b=!d||d.every(O=>O==="number"||O==="boolean");return c!=="string"&&b&&!v?u["_"+l]:function(){return Cy(l,c,d,arguments)}},u.addFunction=Ki,u.removeFunction=Ir,u.UTF8ToString=Nn,u.ALLOC_NORMAL=qi,u.allocate=Gi,u.allocateUTF8OnStack=ta;var Xi;Ve=function l(){Xi||Lf(),Xi||(Ve=l)};function Lf(){function l(){if(!Xi&&(Xi=!0,u.calledRun=!0,!G)){if(u.noFSInit||Nf||(Nf=!0,Tf(),u.stdin=u.stdin,u.stdout=u.stdout,u.stderr=u.stderr,u.stdin?Mo("stdin",u.stdin):Ys("/dev/tty","/dev/stdin"),u.stdout?Mo("stdout",null,u.stdout):Ys("/dev/tty","/dev/stdout"),u.stderr?Mo("stderr",null,u.stderr):Ys("/dev/tty1","/dev/stderr"),jr("/dev/stdin",0),jr("/dev/stdout",1),jr("/dev/stderr",1)),pf=!1,Ot(z),u.onRuntimeInitialized&&u.onRuntimeInitialized(),u.postRun)for(typeof u.postRun=="function"&&(u.postRun=[u.postRun]);u.postRun.length;){var c=u.postRun.shift();ee.unshift(c)}Ot(ee)}}if(!(0({db:null,isLoading:!1,loadDatabase:async n=>{e({isLoading:!0});const r=await n.arrayBuffer(),o=await ix({locateFile:s=>`https://sql.js.org/dist/${s}`}),i=new o.Database(new Uint8Array(r));e({db:i}),console.log("Database loaded successfully"),e({isLoading:!1})},query:n=>{const r=t().db;if(!r)return console.warn("Database is not loaded."),[];const o=r.exec(n);return console.log("Query executed:",n,o),o.length>0?o:[]},tables:[],setTables:n=>e({tables:n}),selectedTable:"0",setSelectedTable:n=>e({selectedTable:n})}));function be(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function Ls(e,t=[]){let n=[];function r(i,s){const a=y.createContext(s),f=n.length;n=[...n,s];function u(h){const{scope:w,children:_,...E}=h,x=(w==null?void 0:w[e][f])||a,P=y.useMemo(()=>E,Object.values(E));return k.jsx(x.Provider,{value:P,children:_})}function m(h,w){const _=(w==null?void 0:w[e][f])||a,E=y.useContext(_);if(E)return E;if(s!==void 0)return s;throw new Error(`\`${h}\` must be used within \`${i}\``)}return u.displayName=i+"Provider",[u,m]}const o=()=>{const i=n.map(s=>y.createContext(s));return function(a){const f=(a==null?void 0:a[e])||i;return y.useMemo(()=>({[`__scope${e}`]:{...a,[e]:f}}),[a,f])}};return o.scopeName=e,[r,lx(o,...t)]}function lx(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const s=r.reduce((a,{useScope:f,scopeName:u})=>{const h=f(i)[`__scope${u}`];return{...a,...h}},{});return y.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function _n(e){const t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function ju({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=sx({defaultProp:t,onChange:n}),i=e!==void 0,s=i?e:r,a=_n(n),f=y.useCallback(u=>{if(i){const h=typeof u=="function"?u(e):u;h!==e&&a(h)}else o(u)},[i,e,o,a]);return[s,f]}function sx({defaultProp:e,onChange:t}){const n=y.useState(e),[r]=n,o=y.useRef(r),i=_n(t);return y.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}function ax(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function lv(...e){return t=>e.forEach(n=>ax(n,t))}function Ke(...e){return y.useCallback(lv(...e),e)}const ux=["top","right","bottom","left"],ln=Math.min,bt=Math.max,us=Math.round,vl=Math.floor,Jn=e=>({x:e,y:e}),cx={left:"right",right:"left",bottom:"top",top:"bottom"},fx={start:"end",end:"start"};function Iu(e,t,n){return bt(e,ln(t,n))}function bn(e,t){return typeof e=="function"?e(t):e}function Cn(e){return e.split("-")[0]}function So(e){return e.split("-")[1]}function Qc(e){return e==="x"?"y":"x"}function Yc(e){return e==="y"?"height":"width"}function Eo(e){return["top","bottom"].includes(Cn(e))?"y":"x"}function Xc(e){return Qc(Eo(e))}function dx(e,t,n){n===void 0&&(n=!1);const r=So(e),o=Xc(e),i=Yc(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=cs(s)),[s,cs(s)]}function px(e){const t=cs(e);return[Lu(e),t,Lu(t)]}function Lu(e){return e.replace(/start|end/g,t=>fx[t])}function mx(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:s;default:return[]}}function hx(e,t,n,r){const o=So(e);let i=mx(Cn(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(Lu)))),i}function cs(e){return e.replace(/left|right|bottom|top/g,t=>cx[t])}function vx(e){return{top:0,right:0,bottom:0,left:0,...e}}function sv(e){return typeof e!="number"?vx(e):{top:e,right:e,bottom:e,left:e}}function fs(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function op(e,t,n){let{reference:r,floating:o}=e;const i=Eo(t),s=Xc(t),a=Yc(s),f=Cn(t),u=i==="y",m=r.x+r.width/2-o.width/2,h=r.y+r.height/2-o.height/2,w=r[a]/2-o[a]/2;let _;switch(f){case"top":_={x:m,y:r.y-o.height};break;case"bottom":_={x:m,y:r.y+r.height};break;case"right":_={x:r.x+r.width,y:h};break;case"left":_={x:r.x-o.width,y:h};break;default:_={x:r.x,y:r.y}}switch(So(t)){case"start":_[s]-=w*(n&&u?-1:1);break;case"end":_[s]+=w*(n&&u?-1:1);break}return _}const gx=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),f=await(s.isRTL==null?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:m,y:h}=op(u,r,f),w=r,_={},E=0;for(let x=0;x({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:f}=t,{element:u,padding:m=0}=bn(e,t)||{};if(u==null)return{};const h=sv(m),w={x:n,y:r},_=Xc(o),E=Yc(_),x=await s.getDimensions(u),P=_==="y",g=P?"top":"left",p=P?"bottom":"right",S=P?"clientHeight":"clientWidth",C=i.reference[E]+i.reference[_]-w[_]-i.floating[E],T=w[_]-i.reference[_],A=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u));let N=A?A[S]:0;(!N||!await(s.isElement==null?void 0:s.isElement(A)))&&(N=a.floating[S]||i.floating[E]);const D=C/2-T/2,G=N/2-x[E]/2-1,F=ln(h[g],G),V=ln(h[p],G),U=F,H=N-x[E]-V,B=N/2-x[E]/2+D,Q=Iu(U,B,H),se=!f.arrow&&So(o)!=null&&B!==Q&&i.reference[E]/2-(BU<=0)){var G,F;const U=(((G=i.flip)==null?void 0:G.index)||0)+1,H=T[U];if(H)return{data:{index:U,overflows:D},reset:{placement:H}};let B=(F=D.filter(Q=>Q.overflows[0]<=0).sort((Q,se)=>Q.overflows[1]-se.overflows[1])[0])==null?void 0:F.placement;if(!B)switch(_){case"bestFit":{var V;const Q=(V=D.map(se=>[se.placement,se.overflows.filter(J=>J>0).reduce((J,I)=>J+I,0)]).sort((se,J)=>se[1]-J[1])[0])==null?void 0:V[0];Q&&(B=Q);break}case"initialPlacement":B=a;break}if(o!==B)return{reset:{placement:B}}}return{}}}};function ip(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function lp(e){return ux.some(t=>e[t]>=0)}const xx=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=bn(e,t);switch(r){case"referenceHidden":{const i=await Ci(t,{...o,elementContext:"reference"}),s=ip(i,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:lp(s)}}}case"escaped":{const i=await Ci(t,{...o,altBoundary:!0}),s=ip(i,n.floating);return{data:{escapedOffsets:s,escaped:lp(s)}}}default:return{}}}}};async function Sx(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=Cn(n),a=So(n),f=Eo(n)==="y",u=["left","top"].includes(s)?-1:1,m=i&&f?-1:1,h=bn(t,e);let{mainAxis:w,crossAxis:_,alignmentAxis:E}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...h};return a&&typeof E=="number"&&(_=a==="end"?E*-1:E),f?{x:_*m,y:w*u}:{x:w*u,y:_*m}}const Ex=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=t,f=await Sx(t,e);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+f.x,y:i+f.y,data:{...f,placement:s}}}}},_x=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:P=>{let{x:g,y:p}=P;return{x:g,y:p}}},...f}=bn(e,t),u={x:n,y:r},m=await Ci(t,f),h=Eo(Cn(o)),w=Qc(h);let _=u[w],E=u[h];if(i){const P=w==="y"?"top":"left",g=w==="y"?"bottom":"right",p=_+m[P],S=_-m[g];_=Iu(p,_,S)}if(s){const P=h==="y"?"top":"left",g=h==="y"?"bottom":"right",p=E+m[P],S=E-m[g];E=Iu(p,E,S)}const x=a.fn({...t,[w]:_,[h]:E});return{...x,data:{x:x.x-n,y:x.y-r}}}}},bx=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:s}=t,{offset:a=0,mainAxis:f=!0,crossAxis:u=!0}=bn(e,t),m={x:n,y:r},h=Eo(o),w=Qc(h);let _=m[w],E=m[h];const x=bn(a,t),P=typeof x=="number"?{mainAxis:x,crossAxis:0}:{mainAxis:0,crossAxis:0,...x};if(f){const S=w==="y"?"height":"width",C=i.reference[w]-i.floating[S]+P.mainAxis,T=i.reference[w]+i.reference[S]-P.mainAxis;_T&&(_=T)}if(u){var g,p;const S=w==="y"?"width":"height",C=["top","left"].includes(Cn(o)),T=i.reference[h]-i.floating[S]+(C&&((g=s.offset)==null?void 0:g[h])||0)+(C?0:P.crossAxis),A=i.reference[h]+i.reference[S]+(C?0:((p=s.offset)==null?void 0:p[h])||0)-(C?P.crossAxis:0);EA&&(E=A)}return{[w]:_,[h]:E}}}},Cx=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:i}=t,{apply:s=()=>{},...a}=bn(e,t),f=await Ci(t,a),u=Cn(n),m=So(n),h=Eo(n)==="y",{width:w,height:_}=r.floating;let E,x;u==="top"||u==="bottom"?(E=u,x=m===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(x=u,E=m==="end"?"top":"bottom");const P=_-f.top-f.bottom,g=w-f.left-f.right,p=ln(_-f[E],P),S=ln(w-f[x],g),C=!t.middlewareData.shift;let T=p,A=S;if(h?A=m||C?ln(S,g):g:T=m||C?ln(p,P):P,C&&!m){const D=bt(f.left,0),G=bt(f.right,0),F=bt(f.top,0),V=bt(f.bottom,0);h?A=w-2*(D!==0||G!==0?D+G:bt(f.left,f.right)):T=_-2*(F!==0||V!==0?F+V:bt(f.top,f.bottom))}await s({...t,availableWidth:A,availableHeight:T});const N=await o.getDimensions(i.floating);return w!==N.width||_!==N.height?{reset:{rects:!0}}:{}}}};function _o(e){return av(e)?(e.nodeName||"").toLowerCase():"#document"}function Pt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Pn(e){var t;return(t=(av(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function av(e){return e instanceof Node||e instanceof Pt(e).Node}function un(e){return e instanceof Element||e instanceof Pt(e).Element}function cn(e){return e instanceof HTMLElement||e instanceof Pt(e).HTMLElement}function sp(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Pt(e).ShadowRoot}function ji(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Zt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function kx(e){return["table","td","th"].includes(_o(e))}function Zc(e){const t=Jc(),n=Zt(e);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function Px(e){let t=er(e);for(;cn(t)&&!vo(t);){if(Zc(t))return t;t=er(t)}return null}function Jc(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function vo(e){return["html","body","#document"].includes(_o(e))}function Zt(e){return Pt(e).getComputedStyle(e)}function Fs(e){return un(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function er(e){if(_o(e)==="html")return e;const t=e.assignedSlot||e.parentNode||sp(e)&&e.host||Pn(e);return sp(t)?t.host:t}function uv(e){const t=er(e);return vo(t)?e.ownerDocument?e.ownerDocument.body:e.body:cn(t)&&ji(t)?t:uv(t)}function ki(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=uv(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=Pt(o);return i?t.concat(s,s.visualViewport||[],ji(o)?o:[],s.frameElement&&n?ki(s.frameElement):[]):t.concat(o,ki(o,[],n))}function cv(e){const t=Zt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=cn(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=us(n)!==i||us(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function ef(e){return un(e)?e:e.contextElement}function io(e){const t=ef(e);if(!cn(t))return Jn(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=cv(t);let s=(i?us(n.width):n.width)/r,a=(i?us(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const Rx=Jn(0);function fv(e){const t=Pt(e);return!Jc()||!t.visualViewport?Rx:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Tx(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Pt(e)?!1:t}function br(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=ef(e);let s=Jn(1);t&&(r?un(r)&&(s=io(r)):s=io(e));const a=Tx(i,n,r)?fv(i):Jn(0);let f=(o.left+a.x)/s.x,u=(o.top+a.y)/s.y,m=o.width/s.x,h=o.height/s.y;if(i){const w=Pt(i),_=r&&un(r)?Pt(r):r;let E=w,x=E.frameElement;for(;x&&r&&_!==E;){const P=io(x),g=x.getBoundingClientRect(),p=Zt(x),S=g.left+(x.clientLeft+parseFloat(p.paddingLeft))*P.x,C=g.top+(x.clientTop+parseFloat(p.paddingTop))*P.y;f*=P.x,u*=P.y,m*=P.x,h*=P.y,f+=S,u+=C,E=Pt(x),x=E.frameElement}}return fs({width:m,height:h,x:f,y:u})}const Nx=[":popover-open",":modal"];function tf(e){return Nx.some(t=>{try{return e.matches(t)}catch{return!1}})}function Ox(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",s=Pn(r),a=t?tf(t.floating):!1;if(r===s||a&&i)return n;let f={scrollLeft:0,scrollTop:0},u=Jn(1);const m=Jn(0),h=cn(r);if((h||!h&&!i)&&((_o(r)!=="body"||ji(s))&&(f=Fs(r)),cn(r))){const w=br(r);u=io(r),m.x=w.x+r.clientLeft,m.y=w.y+r.clientTop}return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-f.scrollLeft*u.x+m.x,y:n.y*u.y-f.scrollTop*u.y+m.y}}function Ax(e){return Array.from(e.getClientRects())}function dv(e){return br(Pn(e)).left+Fs(e).scrollLeft}function Mx(e){const t=Pn(e),n=Fs(e),r=e.ownerDocument.body,o=bt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=bt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+dv(e);const a=-n.scrollTop;return Zt(r).direction==="rtl"&&(s+=bt(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}function Dx(e,t){const n=Pt(e),r=Pn(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,f=0;if(o){i=o.width,s=o.height;const u=Jc();(!u||u&&t==="fixed")&&(a=o.offsetLeft,f=o.offsetTop)}return{width:i,height:s,x:a,y:f}}function jx(e,t){const n=br(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=cn(e)?io(e):Jn(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,f=o*i.x,u=r*i.y;return{width:s,height:a,x:f,y:u}}function ap(e,t,n){let r;if(t==="viewport")r=Dx(e,n);else if(t==="document")r=Mx(Pn(e));else if(un(t))r=jx(t,n);else{const o=fv(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return fs(r)}function pv(e,t){const n=er(e);return n===t||!un(n)||vo(n)?!1:Zt(n).position==="fixed"||pv(n,t)}function Ix(e,t){const n=t.get(e);if(n)return n;let r=ki(e,[],!1).filter(a=>un(a)&&_o(a)!=="body"),o=null;const i=Zt(e).position==="fixed";let s=i?er(e):e;for(;un(s)&&!vo(s);){const a=Zt(s),f=Zc(s);!f&&a.position==="fixed"&&(o=null),(i?!f&&!o:!f&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||ji(s)&&!f&&pv(e,s))?r=r.filter(m=>m!==s):o=a,s=er(s)}return t.set(e,r),r}function Lx(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?tf(t)?[]:Ix(t,this._c):[].concat(n),r],a=s[0],f=s.reduce((u,m)=>{const h=ap(t,m,o);return u.top=bt(h.top,u.top),u.right=ln(h.right,u.right),u.bottom=ln(h.bottom,u.bottom),u.left=bt(h.left,u.left),u},ap(t,a,o));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}}function Fx(e){const{width:t,height:n}=cv(e);return{width:t,height:n}}function zx(e,t,n){const r=cn(t),o=Pn(t),i=n==="fixed",s=br(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const f=Jn(0);if(r||!r&&!i)if((_o(t)!=="body"||ji(o))&&(a=Fs(t)),r){const h=br(t,!0,i,t);f.x=h.x+t.clientLeft,f.y=h.y+t.clientTop}else o&&(f.x=dv(o));const u=s.left+a.scrollLeft-f.x,m=s.top+a.scrollTop-f.y;return{x:u,y:m,width:s.width,height:s.height}}function Aa(e){return Zt(e).position==="static"}function up(e,t){return!cn(e)||Zt(e).position==="fixed"?null:t?t(e):e.offsetParent}function mv(e,t){const n=Pt(e);if(tf(e))return n;if(!cn(e)){let o=er(e);for(;o&&!vo(o);){if(un(o)&&!Aa(o))return o;o=er(o)}return n}let r=up(e,t);for(;r&&kx(r)&&Aa(r);)r=up(r,t);return r&&vo(r)&&Aa(r)&&!Zc(r)?n:r||Px(e)||n}const $x=async function(e){const t=this.getOffsetParent||mv,n=this.getDimensions,r=await n(e.floating);return{reference:zx(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Hx(e){return Zt(e).direction==="rtl"}const Bx={convertOffsetParentRelativeRectToViewportRelativeRect:Ox,getDocumentElement:Pn,getClippingRect:Lx,getOffsetParent:mv,getElementRects:$x,getClientRects:Ax,getDimensions:Fx,getScale:io,isElement:un,isRTL:Hx};function Wx(e,t){let n=null,r;const o=Pn(e);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,f){a===void 0&&(a=!1),f===void 0&&(f=1),i();const{left:u,top:m,width:h,height:w}=e.getBoundingClientRect();if(a||t(),!h||!w)return;const _=vl(m),E=vl(o.clientWidth-(u+h)),x=vl(o.clientHeight-(m+w)),P=vl(u),p={rootMargin:-_+"px "+-E+"px "+-x+"px "+-P+"px",threshold:bt(0,ln(1,f))||1};let S=!0;function C(T){const A=T[0].intersectionRatio;if(A!==f){if(!S)return s();A?s(!1,A):r=setTimeout(()=>{s(!1,1e-7)},1e3)}S=!1}try{n=new IntersectionObserver(C,{...p,root:o.ownerDocument})}catch{n=new IntersectionObserver(C,p)}n.observe(e)}return s(!0),i}function Ux(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:f=!1}=r,u=ef(e),m=o||i?[...u?ki(u):[],...ki(t)]:[];m.forEach(g=>{o&&g.addEventListener("scroll",n,{passive:!0}),i&&g.addEventListener("resize",n)});const h=u&&a?Wx(u,n):null;let w=-1,_=null;s&&(_=new ResizeObserver(g=>{let[p]=g;p&&p.target===u&&_&&(_.unobserve(t),cancelAnimationFrame(w),w=requestAnimationFrame(()=>{var S;(S=_)==null||S.observe(t)})),n()}),u&&!f&&_.observe(u),_.observe(t));let E,x=f?br(e):null;f&&P();function P(){const g=br(e);x&&(g.x!==x.x||g.y!==x.y||g.width!==x.width||g.height!==x.height)&&n(),x=g,E=requestAnimationFrame(P)}return n(),()=>{var g;m.forEach(p=>{o&&p.removeEventListener("scroll",n),i&&p.removeEventListener("resize",n)}),h==null||h(),(g=_)==null||g.disconnect(),_=null,f&&cancelAnimationFrame(E)}}const Vx=Ex,qx=_x,Gx=wx,Kx=Cx,Qx=xx,cp=yx,Yx=bx,Xx=(e,t,n)=>{const r=new Map,o={platform:Bx,...n},i={...o.platform,_c:r};return gx(e,t,{...o,platform:i})};var Il=typeof document<"u"?y.useLayoutEffect:y.useEffect;function ds(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!ds(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!ds(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function hv(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function fp(e,t){const n=hv(e);return Math.round(t*n)/n}function dp(e){const t=y.useRef(e);return Il(()=>{t.current=e}),t}function Zx(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:f,open:u}=e,[m,h]=y.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[w,_]=y.useState(r);ds(w,r)||_(r);const[E,x]=y.useState(null),[P,g]=y.useState(null),p=y.useCallback(J=>{J!==A.current&&(A.current=J,x(J))},[]),S=y.useCallback(J=>{J!==N.current&&(N.current=J,g(J))},[]),C=i||E,T=s||P,A=y.useRef(null),N=y.useRef(null),D=y.useRef(m),G=f!=null,F=dp(f),V=dp(o),U=y.useCallback(()=>{if(!A.current||!N.current)return;const J={placement:t,strategy:n,middleware:w};V.current&&(J.platform=V.current),Xx(A.current,N.current,J).then(I=>{const z={...I,isPositioned:!0};H.current&&!ds(D.current,z)&&(D.current=z,Rr.flushSync(()=>{h(z)}))})},[w,t,n,V]);Il(()=>{u===!1&&D.current.isPositioned&&(D.current.isPositioned=!1,h(J=>({...J,isPositioned:!1})))},[u]);const H=y.useRef(!1);Il(()=>(H.current=!0,()=>{H.current=!1}),[]),Il(()=>{if(C&&(A.current=C),T&&(N.current=T),C&&T){if(F.current)return F.current(C,T,U);U()}},[C,T,U,F,G]);const B=y.useMemo(()=>({reference:A,floating:N,setReference:p,setFloating:S}),[p,S]),Q=y.useMemo(()=>({reference:C,floating:T}),[C,T]),se=y.useMemo(()=>{const J={position:n,left:0,top:0};if(!Q.floating)return J;const I=fp(Q.floating,m.x),z=fp(Q.floating,m.y);return a?{...J,transform:"translate("+I+"px, "+z+"px)",...hv(Q.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:I,top:z}},[n,a,Q.floating,m.x,m.y]);return y.useMemo(()=>({...m,update:U,refs:B,elements:Q,floatingStyles:se}),[m,U,B,Q,se])}const Jx=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?cp({element:r.current,padding:o}).fn(n):{}:r?cp({element:r,padding:o}).fn(n):{}}}},eS=(e,t)=>({...Vx(e),options:[e,t]}),tS=(e,t)=>({...qx(e),options:[e,t]}),nS=(e,t)=>({...Yx(e),options:[e,t]}),rS=(e,t)=>({...Gx(e),options:[e,t]}),oS=(e,t)=>({...Kx(e),options:[e,t]}),iS=(e,t)=>({...Qx(e),options:[e,t]}),lS=(e,t)=>({...Jx(e),options:[e,t]});var go=y.forwardRef((e,t)=>{const{children:n,...r}=e,o=y.Children.toArray(n),i=o.find(aS);if(i){const s=i.props.children,a=o.map(f=>f===i?y.Children.count(s)>1?y.Children.only(null):y.isValidElement(s)?s.props.children:null:f);return k.jsx(Fu,{...r,ref:t,children:y.isValidElement(s)?y.cloneElement(s,void 0,a):null})}return k.jsx(Fu,{...r,ref:t,children:n})});go.displayName="Slot";var Fu=y.forwardRef((e,t)=>{const{children:n,...r}=e;if(y.isValidElement(n)){const o=cS(n);return y.cloneElement(n,{...uS(r,n.props),ref:t?lv(t,o):o})}return y.Children.count(n)>1?y.Children.only(null):null});Fu.displayName="SlotClone";var sS=({children:e})=>k.jsx(k.Fragment,{children:e});function aS(e){return y.isValidElement(e)&&e.type===sS}function uS(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...a)=>{i(...a),o(...a)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function cS(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var fS=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],$e=fS.reduce((e,t)=>{const n=y.forwardRef((r,o)=>{const{asChild:i,...s}=r,a=i?go:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),k.jsx(a,{...s,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function dS(e,t){e&&Rr.flushSync(()=>e.dispatchEvent(t))}var pS="Arrow",vv=y.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return k.jsx($e.svg,{...i,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:k.jsx("polygon",{points:"0,0 30,0 15,10"})})});vv.displayName=pS;var mS=vv,dt=globalThis!=null&&globalThis.document?y.useLayoutEffect:()=>{};function hS(e){const[t,n]=y.useState(void 0);return dt(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let s,a;if("borderBoxSize"in i){const f=i.borderBoxSize,u=Array.isArray(f)?f[0]:f;s=u.inlineSize,a=u.blockSize}else s=e.offsetWidth,a=e.offsetHeight;n({width:s,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var nf="Popper",[gv,zs]=Ls(nf),[vS,yv]=gv(nf),wv=e=>{const{__scopePopper:t,children:n}=e,[r,o]=y.useState(null);return k.jsx(vS,{scope:t,anchor:r,onAnchorChange:o,children:n})};wv.displayName=nf;var xv="PopperAnchor",Sv=y.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=yv(xv,n),s=y.useRef(null),a=Ke(t,s);return y.useEffect(()=>{i.onAnchorChange((r==null?void 0:r.current)||s.current)}),r?null:k.jsx($e.div,{...o,ref:a})});Sv.displayName=xv;var rf="PopperContent",[gS,yS]=gv(rf),Ev=y.forwardRef((e,t)=>{var Y,we,Le,ve,me,de;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:i="center",alignOffset:s=0,arrowPadding:a=0,avoidCollisions:f=!0,collisionBoundary:u=[],collisionPadding:m=0,sticky:h="partial",hideWhenDetached:w=!1,updatePositionStrategy:_="optimized",onPlaced:E,...x}=e,P=yv(rf,n),[g,p]=y.useState(null),S=Ke(t,K=>p(K)),[C,T]=y.useState(null),A=hS(C),N=(A==null?void 0:A.width)??0,D=(A==null?void 0:A.height)??0,G=r+(i!=="center"?"-"+i:""),F=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},V=Array.isArray(u)?u:[u],U=V.length>0,H={padding:F,boundary:V.filter(xS),altBoundary:U},{refs:B,floatingStyles:Q,placement:se,isPositioned:J,middlewareData:I}=Zx({strategy:"fixed",placement:G,whileElementsMounted:(...K)=>Ux(...K,{animationFrame:_==="always"}),elements:{reference:P.anchor},middleware:[eS({mainAxis:o+D,alignmentAxis:s}),f&&tS({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?nS():void 0,...H}),f&&rS({...H}),oS({...H,apply:({elements:K,rects:ce,availableWidth:Ot,availableHeight:Qe})=>{const{width:Ye,height:Tn}=ce.reference,xe=K.floating.style;xe.setProperty("--radix-popper-available-width",`${Ot}px`),xe.setProperty("--radix-popper-available-height",`${Qe}px`),xe.setProperty("--radix-popper-anchor-width",`${Ye}px`),xe.setProperty("--radix-popper-anchor-height",`${Tn}px`)}}),C&&lS({element:C,padding:a}),SS({arrowWidth:N,arrowHeight:D}),w&&iS({strategy:"referenceHidden",...H})]}),[z,ee]=Cv(se),oe=_n(E);dt(()=>{J&&(oe==null||oe())},[J,oe]);const ie=(Y=I.arrow)==null?void 0:Y.x,Ve=(we=I.arrow)==null?void 0:we.y,he=((Le=I.arrow)==null?void 0:Le.centerOffset)!==0,[ot,Ee]=y.useState();return dt(()=>{g&&Ee(window.getComputedStyle(g).zIndex)},[g]),k.jsx("div",{ref:B.setFloating,"data-radix-popper-content-wrapper":"",style:{...Q,transform:J?Q.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ot,"--radix-popper-transform-origin":[(ve=I.transformOrigin)==null?void 0:ve.x,(me=I.transformOrigin)==null?void 0:me.y].join(" "),...((de=I.hide)==null?void 0:de.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:k.jsx(gS,{scope:n,placedSide:z,onArrowChange:T,arrowX:ie,arrowY:Ve,shouldHideArrow:he,children:k.jsx($e.div,{"data-side":z,"data-align":ee,...x,ref:S,style:{...x.style,animation:J?void 0:"none"}})})})});Ev.displayName=rf;var _v="PopperArrow",wS={top:"bottom",right:"left",bottom:"top",left:"right"},bv=y.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,i=yS(_v,r),s=wS[i.placedSide];return k.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:k.jsx(mS,{...o,ref:n,style:{...o.style,display:"block"}})})});bv.displayName=_v;function xS(e){return e!==null}var SS=e=>({name:"transformOrigin",options:e,fn(t){var P,g,p;const{placement:n,rects:r,middlewareData:o}=t,s=((P=o.arrow)==null?void 0:P.centerOffset)!==0,a=s?0:e.arrowWidth,f=s?0:e.arrowHeight,[u,m]=Cv(n),h={start:"0%",center:"50%",end:"100%"}[m],w=(((g=o.arrow)==null?void 0:g.x)??0)+a/2,_=(((p=o.arrow)==null?void 0:p.y)??0)+f/2;let E="",x="";return u==="bottom"?(E=s?h:`${w}px`,x=`${-f}px`):u==="top"?(E=s?h:`${w}px`,x=`${r.floating.height+f}px`):u==="right"?(E=`${-f}px`,x=s?h:`${_}px`):u==="left"&&(E=`${r.floating.width+f}px`,x=s?h:`${_}px`),{data:{x:E,y:x}}}});function Cv(e){const[t,n="center"]=e.split("-");return[t,n]}var kv=wv,Pv=Sv,Rv=Ev,Tv=bv,ES="Portal",Nv=y.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[o,i]=y.useState(!1);dt(()=>i(!0),[]);const s=n||o&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return s?R1.createPortal(k.jsx($e.div,{...r,ref:t}),s):null});Nv.displayName=ES;function _S(e,t){return y.useReducer((n,r)=>t[n][r]??n,e)}var Ov=e=>{const{present:t,children:n}=e,r=bS(t),o=typeof n=="function"?n({present:r.isPresent}):y.Children.only(n),i=Ke(r.ref,CS(o));return typeof n=="function"||r.isPresent?y.cloneElement(o,{ref:i}):null};Ov.displayName="Presence";function bS(e){const[t,n]=y.useState(),r=y.useRef({}),o=y.useRef(e),i=y.useRef("none"),s=e?"mounted":"unmounted",[a,f]=_S(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{const u=gl(r.current);i.current=a==="mounted"?u:"none"},[a]),dt(()=>{const u=r.current,m=o.current;if(m!==e){const w=i.current,_=gl(u);e?f("MOUNT"):_==="none"||(u==null?void 0:u.display)==="none"?f("UNMOUNT"):f(m&&w!==_?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,f]),dt(()=>{if(t){const u=h=>{const _=gl(r.current).includes(h.animationName);h.target===t&&_&&Rr.flushSync(()=>f("ANIMATION_END"))},m=h=>{h.target===t&&(i.current=gl(r.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else f("ANIMATION_END")},[t,f]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:y.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function gl(e){return(e==null?void 0:e.animationName)||"none"}function CS(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function kS(e,t=globalThis==null?void 0:globalThis.document){const n=_n(e);y.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var PS="DismissableLayer",zu="dismissableLayer.update",RS="dismissableLayer.pointerDownOutside",TS="dismissableLayer.focusOutside",pp,Av=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),of=y.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:s,onDismiss:a,...f}=e,u=y.useContext(Av),[m,h]=y.useState(null),w=(m==null?void 0:m.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,_]=y.useState({}),E=Ke(t,N=>h(N)),x=Array.from(u.layers),[P]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),g=x.indexOf(P),p=m?x.indexOf(m):-1,S=u.layersWithOutsidePointerEventsDisabled.size>0,C=p>=g,T=AS(N=>{const D=N.target,G=[...u.branches].some(F=>F.contains(D));!C||G||(o==null||o(N),s==null||s(N),N.defaultPrevented||a==null||a())},w),A=MS(N=>{const D=N.target;[...u.branches].some(F=>F.contains(D))||(i==null||i(N),s==null||s(N),N.defaultPrevented||a==null||a())},w);return kS(N=>{p===u.layers.size-1&&(r==null||r(N),!N.defaultPrevented&&a&&(N.preventDefault(),a()))},w),y.useEffect(()=>{if(m)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(pp=w.body.style.pointerEvents,w.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(m)),u.layers.add(m),mp(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(w.body.style.pointerEvents=pp)}},[m,w,n,u]),y.useEffect(()=>()=>{m&&(u.layers.delete(m),u.layersWithOutsidePointerEventsDisabled.delete(m),mp())},[m,u]),y.useEffect(()=>{const N=()=>_({});return document.addEventListener(zu,N),()=>document.removeEventListener(zu,N)},[]),k.jsx($e.div,{...f,ref:E,style:{pointerEvents:S?C?"auto":"none":void 0,...e.style},onFocusCapture:be(e.onFocusCapture,A.onFocusCapture),onBlurCapture:be(e.onBlurCapture,A.onBlurCapture),onPointerDownCapture:be(e.onPointerDownCapture,T.onPointerDownCapture)})});of.displayName=PS;var NS="DismissableLayerBranch",OS=y.forwardRef((e,t)=>{const n=y.useContext(Av),r=y.useRef(null),o=Ke(t,r);return y.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),k.jsx($e.div,{...e,ref:o})});OS.displayName=NS;function AS(e,t=globalThis==null?void 0:globalThis.document){const n=_n(e),r=y.useRef(!1),o=y.useRef(()=>{});return y.useEffect(()=>{const i=a=>{if(a.target&&!r.current){let f=function(){Mv(RS,n,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=f,t.addEventListener("click",o.current,{once:!0})):f()}else t.removeEventListener("click",o.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function MS(e,t=globalThis==null?void 0:globalThis.document){const n=_n(e),r=y.useRef(!1);return y.useEffect(()=>{const o=i=>{i.target&&!r.current&&Mv(TS,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function mp(){const e=new CustomEvent(zu);document.dispatchEvent(e)}function Mv(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?dS(o,i):o.dispatchEvent(i)}var Ma,lf="HoverCard",[Dv,Rb]=Ls(lf,[zs]),$s=zs(),[DS,sf]=Dv(lf),jv=e=>{const{__scopeHoverCard:t,children:n,open:r,defaultOpen:o,onOpenChange:i,openDelay:s=700,closeDelay:a=300}=e,f=$s(t),u=y.useRef(0),m=y.useRef(0),h=y.useRef(!1),w=y.useRef(!1),[_=!1,E]=ju({prop:r,defaultProp:o,onChange:i}),x=y.useCallback(()=>{clearTimeout(m.current),u.current=window.setTimeout(()=>E(!0),s)},[s,E]),P=y.useCallback(()=>{clearTimeout(u.current),!h.current&&!w.current&&(m.current=window.setTimeout(()=>E(!1),a))},[a,E]),g=y.useCallback(()=>E(!1),[E]);return y.useEffect(()=>()=>{clearTimeout(u.current),clearTimeout(m.current)},[]),k.jsx(DS,{scope:t,open:_,onOpenChange:E,onOpen:x,onClose:P,onDismiss:g,hasSelectionRef:h,isPointerDownOnContentRef:w,children:k.jsx(kv,{...f,children:n})})};jv.displayName=lf;var Iv="HoverCardTrigger",Lv=y.forwardRef((e,t)=>{const{__scopeHoverCard:n,...r}=e,o=sf(Iv,n),i=$s(n);return k.jsx(Pv,{asChild:!0,...i,children:k.jsx($e.a,{"data-state":o.open?"open":"closed",...r,ref:t,onPointerEnter:be(e.onPointerEnter,ms(o.onOpen)),onPointerLeave:be(e.onPointerLeave,ms(o.onClose)),onFocus:be(e.onFocus,o.onOpen),onBlur:be(e.onBlur,o.onClose),onTouchStart:be(e.onTouchStart,s=>s.preventDefault())})})});Lv.displayName=Iv;var jS="HoverCardPortal",[Tb,IS]=Dv(jS,{forceMount:void 0}),ps="HoverCardContent",Fv=y.forwardRef((e,t)=>{const n=IS(ps,e.__scopeHoverCard),{forceMount:r=n.forceMount,...o}=e,i=sf(ps,e.__scopeHoverCard);return k.jsx(Ov,{present:r||i.open,children:k.jsx(LS,{"data-state":i.open?"open":"closed",...o,onPointerEnter:be(e.onPointerEnter,ms(i.onOpen)),onPointerLeave:be(e.onPointerLeave,ms(i.onClose)),ref:t})})});Fv.displayName=ps;var LS=y.forwardRef((e,t)=>{const{__scopeHoverCard:n,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:s,...a}=e,f=sf(ps,n),u=$s(n),m=y.useRef(null),h=Ke(t,m),[w,_]=y.useState(!1);return y.useEffect(()=>{if(w){const E=document.body;return Ma=E.style.userSelect||E.style.webkitUserSelect,E.style.userSelect="none",E.style.webkitUserSelect="none",()=>{E.style.userSelect=Ma,E.style.webkitUserSelect=Ma}}},[w]),y.useEffect(()=>{if(m.current){const E=()=>{_(!1),f.isPointerDownOnContentRef.current=!1,setTimeout(()=>{var P;((P=document.getSelection())==null?void 0:P.toString())!==""&&(f.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",E),()=>{document.removeEventListener("pointerup",E),f.hasSelectionRef.current=!1,f.isPointerDownOnContentRef.current=!1}}},[f.isPointerDownOnContentRef,f.hasSelectionRef]),y.useEffect(()=>{m.current&&$S(m.current).forEach(x=>x.setAttribute("tabindex","-1"))}),k.jsx(of,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:s,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:be(i,E=>{E.preventDefault()}),onDismiss:f.onDismiss,children:k.jsx(Rv,{...u,...a,onPointerDown:be(a.onPointerDown,E=>{E.currentTarget.contains(E.target)&&_(!0),f.hasSelectionRef.current=!1,f.isPointerDownOnContentRef.current=!0}),ref:h,style:{...a.style,userSelect:w?"text":void 0,WebkitUserSelect:w?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})}),FS="HoverCardArrow",zS=y.forwardRef((e,t)=>{const{__scopeHoverCard:n,...r}=e,o=$s(n);return k.jsx(Tv,{...o,...r,ref:t})});zS.displayName=FS;function ms(e){return t=>t.pointerType==="touch"?void 0:e()}function $S(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;n.nextNode();)t.push(n.currentNode);return t}var HS=jv,BS=Lv,zv=Fv;function $v(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;ta(i)))==null?void 0:s.classGroupId}const hp=/^\[(.+)\]$/;function VS(e){if(hp.test(e)){const t=hp.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}function qS(e){const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return KS(Object.entries(e.classGroups),n).forEach(([i,s])=>{$u(s,r,i,t)}),r}function $u(e,t,n,r){e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:vp(t,o);i.classGroupId=n;return}if(typeof o=="function"){if(GS(o)){$u(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,s])=>{$u(s,vp(t,i),n,r)})})}function vp(e,t){let n=e;return t.split(af).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function GS(e){return e.isThemeGetter}function KS(e,t){return t?e.map(([n,r])=>{const o=r.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([s,a])=>[t+s,a])):i);return[n,o]}):e}function QS(e){if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;function o(i,s){n.set(i,s),t++,t>e&&(t=0,r=n,n=new Map)}return{get(i){let s=n.get(i);if(s!==void 0)return s;if((s=r.get(i))!==void 0)return o(i,s),s},set(i,s){n.has(i)?n.set(i,s):o(i,s)}}}const Bv="!";function YS(e){const t=e.separator,n=t.length===1,r=t[0],o=t.length;return function(s){const a=[];let f=0,u=0,m;for(let x=0;xu?m-u:void 0;return{modifiers:a,hasImportantModifier:w,baseClassName:_,maybePostfixModifierPosition:E}}}function XS(e){if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t}function ZS(e){return{cache:QS(e.cacheSize),splitModifiers:YS(e),...US(e)}}const JS=/\s+/;function eE(e,t){const{splitModifiers:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,i=new Set;return e.trim().split(JS).map(s=>{const{modifiers:a,hasImportantModifier:f,baseClassName:u,maybePostfixModifierPosition:m}=n(s);let h=r(m?u.substring(0,m):u),w=!!m;if(!h){if(!m)return{isTailwindClass:!1,originalClassName:s};if(h=r(u),!h)return{isTailwindClass:!1,originalClassName:s};w=!1}const _=XS(a).join(":");return{isTailwindClass:!0,modifierId:f?_+Bv:_,classGroupId:h,originalClassName:s,hasPostfixModifier:w}}).reverse().filter(s=>{if(!s.isTailwindClass)return!0;const{modifierId:a,classGroupId:f,hasPostfixModifier:u}=s,m=a+f;return i.has(m)?!1:(i.add(m),o(f,u).forEach(h=>i.add(a+h)),!0)}).reverse().map(s=>s.originalClassName).join(" ")}function tE(){let e=0,t,n,r="";for(;eh(m),e());return n=ZS(u),r=n.cache.get,o=n.cache.set,i=a,a(f)}function a(f){const u=r(f);if(u)return u;const m=eE(f,n);return o(f,m),m}return function(){return i(tE.apply(null,arguments))}}function Re(e){const t=n=>n[e]||[];return t.isThemeGetter=!0,t}const Uv=/^\[(?:([a-z-]+):)?(.+)\]$/i,rE=/^\d+\/\d+$/,oE=new Set(["px","full","screen"]),iE=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,lE=/\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$/,sE=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,aE=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,uE=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function dn(e){return vr(e)||oE.has(e)||rE.test(e)}function Dn(e){return bo(e,"length",gE)}function vr(e){return!!e&&!Number.isNaN(Number(e))}function yl(e){return bo(e,"number",vr)}function qo(e){return!!e&&Number.isInteger(Number(e))}function cE(e){return e.endsWith("%")&&vr(e.slice(0,-1))}function ae(e){return Uv.test(e)}function jn(e){return iE.test(e)}const fE=new Set(["length","size","percentage"]);function dE(e){return bo(e,fE,Vv)}function pE(e){return bo(e,"position",Vv)}const mE=new Set(["image","url"]);function hE(e){return bo(e,mE,wE)}function vE(e){return bo(e,"",yE)}function Go(){return!0}function bo(e,t,n){const r=Uv.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1}function gE(e){return lE.test(e)&&!sE.test(e)}function Vv(){return!1}function yE(e){return aE.test(e)}function wE(e){return uE.test(e)}function xE(){const e=Re("colors"),t=Re("spacing"),n=Re("blur"),r=Re("brightness"),o=Re("borderColor"),i=Re("borderRadius"),s=Re("borderSpacing"),a=Re("borderWidth"),f=Re("contrast"),u=Re("grayscale"),m=Re("hueRotate"),h=Re("invert"),w=Re("gap"),_=Re("gradientColorStops"),E=Re("gradientColorStopPositions"),x=Re("inset"),P=Re("margin"),g=Re("opacity"),p=Re("padding"),S=Re("saturate"),C=Re("scale"),T=Re("sepia"),A=Re("skew"),N=Re("space"),D=Re("translate"),G=()=>["auto","contain","none"],F=()=>["auto","hidden","clip","visible","scroll"],V=()=>["auto",ae,t],U=()=>[ae,t],H=()=>["",dn,Dn],B=()=>["auto",vr,ae],Q=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],se=()=>["solid","dashed","dotted","double","none"],J=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],I=()=>["start","end","center","between","around","evenly","stretch"],z=()=>["","0",ae],ee=()=>["auto","avoid","all","avoid-page","page","left","right","column"],oe=()=>[vr,yl],ie=()=>[vr,ae];return{cacheSize:500,separator:":",theme:{colors:[Go],spacing:[dn,Dn],blur:["none","",jn,ae],brightness:oe(),borderColor:[e],borderRadius:["none","","full",jn,ae],borderSpacing:U(),borderWidth:H(),contrast:oe(),grayscale:z(),hueRotate:ie(),invert:z(),gap:U(),gradientColorStops:[e],gradientColorStopPositions:[cE,Dn],inset:V(),margin:V(),opacity:oe(),padding:U(),saturate:oe(),scale:oe(),sepia:z(),skew:ie(),space:U(),translate:U()},classGroups:{aspect:[{aspect:["auto","square","video",ae]}],container:["container"],columns:[{columns:[jn]}],"break-after":[{"break-after":ee()}],"break-before":[{"break-before":ee()}],"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:[...Q(),ae]}],overflow:[{overflow:F()}],"overflow-x":[{"overflow-x":F()}],"overflow-y":[{"overflow-y":F()}],overscroll:[{overscroll:G()}],"overscroll-x":[{"overscroll-x":G()}],"overscroll-y":[{"overscroll-y":G()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[x]}],"inset-x":[{"inset-x":[x]}],"inset-y":[{"inset-y":[x]}],start:[{start:[x]}],end:[{end:[x]}],top:[{top:[x]}],right:[{right:[x]}],bottom:[{bottom:[x]}],left:[{left:[x]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",qo,ae]}],basis:[{basis:V()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ae]}],grow:[{grow:z()}],shrink:[{shrink:z()}],order:[{order:["first","last","none",qo,ae]}],"grid-cols":[{"grid-cols":[Go]}],"col-start-end":[{col:["auto",{span:["full",qo,ae]},ae]}],"col-start":[{"col-start":B()}],"col-end":[{"col-end":B()}],"grid-rows":[{"grid-rows":[Go]}],"row-start-end":[{row:["auto",{span:[qo,ae]},ae]}],"row-start":[{"row-start":B()}],"row-end":[{"row-end":B()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ae]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ae]}],gap:[{gap:[w]}],"gap-x":[{"gap-x":[w]}],"gap-y":[{"gap-y":[w]}],"justify-content":[{justify:["normal",...I()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...I(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...I(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[p]}],px:[{px:[p]}],py:[{py:[p]}],ps:[{ps:[p]}],pe:[{pe:[p]}],pt:[{pt:[p]}],pr:[{pr:[p]}],pb:[{pb:[p]}],pl:[{pl:[p]}],m:[{m:[P]}],mx:[{mx:[P]}],my:[{my:[P]}],ms:[{ms:[P]}],me:[{me:[P]}],mt:[{mt:[P]}],mr:[{mr:[P]}],mb:[{mb:[P]}],ml:[{ml:[P]}],"space-x":[{"space-x":[N]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[N]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ae,t]}],"min-w":[{"min-w":[ae,t,"min","max","fit"]}],"max-w":[{"max-w":[ae,t,"none","full","min","max","fit","prose",{screen:[jn]},jn]}],h:[{h:[ae,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ae,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ae,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ae,t,"auto","min","max","fit"]}],"font-size":[{text:["base",jn,Dn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",yl]}],"font-family":[{font:[Go]}],"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-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",ae]}],"line-clamp":[{"line-clamp":["none",vr,yl]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",dn,ae]}],"list-image":[{"list-image":["none",ae]}],"list-style-type":[{list:["none","disc","decimal",ae]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[g]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[g]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...se(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",dn,Dn]}],"underline-offset":[{"underline-offset":["auto",dn,ae]}],"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:U()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ae]}],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",ae]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[g]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Q(),pE]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",dE]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},hE]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[E]}],"gradient-via-pos":[{via:[E]}],"gradient-to-pos":[{to:[E]}],"gradient-from":[{from:[_]}],"gradient-via":[{via:[_]}],"gradient-to":[{to:[_]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[g]}],"border-style":[{border:[...se(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[g]}],"divide-style":[{divide:se()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[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:["",...se()]}],"outline-offset":[{"outline-offset":[dn,ae]}],"outline-w":[{outline:[dn,Dn]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:H()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[g]}],"ring-offset-w":[{"ring-offset":[dn,Dn]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",jn,vE]}],"shadow-color":[{shadow:[Go]}],opacity:[{opacity:[g]}],"mix-blend":[{"mix-blend":[...J(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":J()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[f]}],"drop-shadow":[{"drop-shadow":["","none",jn,ae]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[m]}],invert:[{invert:[h]}],saturate:[{saturate:[S]}],sepia:[{sepia:[T]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[f]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[m]}],"backdrop-invert":[{"backdrop-invert":[h]}],"backdrop-opacity":[{"backdrop-opacity":[g]}],"backdrop-saturate":[{"backdrop-saturate":[S]}],"backdrop-sepia":[{"backdrop-sepia":[T]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ae]}],duration:[{duration:ie()}],ease:[{ease:["linear","in","out","in-out",ae]}],delay:[{delay:ie()}],animate:[{animate:["none","spin","ping","pulse","bounce",ae]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[C]}],"scale-x":[{"scale-x":[C]}],"scale-y":[{"scale-y":[C]}],rotate:[{rotate:[qo,ae]}],"translate-x":[{"translate-x":[D]}],"translate-y":[{"translate-y":[D]}],"skew-x":[{"skew-x":[A]}],"skew-y":[{"skew-y":[A]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ae]}],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",ae]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":U()}],"scroll-mx":[{"scroll-mx":U()}],"scroll-my":[{"scroll-my":U()}],"scroll-ms":[{"scroll-ms":U()}],"scroll-me":[{"scroll-me":U()}],"scroll-mt":[{"scroll-mt":U()}],"scroll-mr":[{"scroll-mr":U()}],"scroll-mb":[{"scroll-mb":U()}],"scroll-ml":[{"scroll-ml":U()}],"scroll-p":[{"scroll-p":U()}],"scroll-px":[{"scroll-px":U()}],"scroll-py":[{"scroll-py":U()}],"scroll-ps":[{"scroll-ps":U()}],"scroll-pe":[{"scroll-pe":U()}],"scroll-pt":[{"scroll-pt":U()}],"scroll-pr":[{"scroll-pr":U()}],"scroll-pb":[{"scroll-pb":U()}],"scroll-pl":[{"scroll-pl":U()}],"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",ae]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[dn,Dn,yl]}],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-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"]}}}const SE=nE(xE);function Be(...e){return SE(WS(e))}const EE=HS,_E=BS,qv=y.forwardRef(({className:e,align:t="start",side:n="bottom",sideOffset:r=4,...o},i)=>k.jsx(zv,{ref:i,align:t,side:n,sideOffset:r,className:Be("z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground 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 text-balance break-words",e),...o}));qv.displayName=zv.displayName;const Gv=y.forwardRef(({className:e,...t},n)=>k.jsx("div",{className:"relative w-full overflow-auto",children:k.jsx("table",{ref:n,className:Be("w-full caption-bottom text-sm",e),...t})}));Gv.displayName="Table";const Kv=y.forwardRef(({className:e,...t},n)=>k.jsx("thead",{ref:n,className:Be("[&_tr]:border-b",e),...t}));Kv.displayName="TableHeader";const Qv=y.forwardRef(({className:e,...t},n)=>k.jsx("tbody",{ref:n,className:Be("[&_tr:last-child]:border-0",e),...t}));Qv.displayName="TableBody";const bE=y.forwardRef(({className:e,...t},n)=>k.jsx("tfoot",{ref:n,className:Be("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));bE.displayName="TableFooter";const Hu=y.forwardRef(({className:e,...t},n)=>k.jsx("tr",{ref:n,className:Be("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));Hu.displayName="TableRow";const Yv=y.forwardRef(({className:e,...t},n)=>k.jsx("th",{ref:n,className:Be("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...t}));Yv.displayName="TableHead";const Xv=y.forwardRef(({className:e,children:t,...n},r)=>k.jsx("td",{ref:r,className:Be("p-4 align-middle [&:has([role=checkbox])]:pr-0 truncate max-w-[200px] overflow-hidden text-ellipsis whitespace-nowrap",e),...n,children:k.jsxs(EE,{children:[k.jsx(_E,{asChild:!0,children:k.jsx("span",{className:"hover:underline cursor-pointer",children:t})}),k.jsx(qv,{side:"bottom",align:"start",children:t})]})}));Xv.displayName="TableCell";const CE=y.forwardRef(({className:e,...t},n)=>k.jsx("caption",{ref:n,className:Be("mt-4 text-sm text-muted-foreground",e),...t}));CE.displayName="TableCaption";var kE="Separator",gp="horizontal",PE=["horizontal","vertical"],Zv=y.forwardRef((e,t)=>{const{decorative:n,orientation:r=gp,...o}=e,i=RE(r)?r:gp,a=n?{role:"none"}:{"aria-orientation":i==="vertical"?i:void 0,role:"separator"};return k.jsx($e.div,{"data-orientation":i,...a,...o,ref:t})});Zv.displayName=kE;function RE(e){return PE.includes(e)}var Jv=Zv;const Bu=y.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},o)=>k.jsx(Jv,{ref:o,decorative:n,orientation:t,className:Be("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...r}));Bu.displayName=Jv.displayName;function eg(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;ttypeof e=="boolean"?"".concat(e):e===0?"0":e,wp=TE,tg=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return wp(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:i}=t,s=Object.keys(o).map(u=>{const m=n==null?void 0:n[u],h=i==null?void 0:i[u];if(m===null)return null;const w=yp(m)||yp(h);return o[u][w]}),a=n&&Object.entries(n).reduce((u,m)=>{let[h,w]=m;return w===void 0||(u[h]=w),u},{}),f=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,m)=>{let{class:h,className:w,..._}=m;return Object.entries(_).every(E=>{let[x,P]=E;return Array.isArray(P)?P.includes({...i,...a}[x]):{...i,...a}[x]===P})?[...u,h,w]:u},[]);return wp(e,s,f,n==null?void 0:n.class,n==null?void 0:n.className)},NE=tg("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),hs=y.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},i)=>{const s=r?go:"button";return k.jsx(s,{className:Be(NE({variant:t,size:n,className:e})),ref:i,...o})});hs.displayName="Button";/** +`));if(!l){l=null;break e}et=Tr(l,!0)}l=et.shift()}return l},jb(l,c){c===null||c===10?(R(xe(l.output,0)),l.output=[]):c!=0&&l.output.push(c)},fsync(l){l.output&&0=c||(c=Math.max(c,d*(1048576>d?2:1.125)>>>0),d!=0&&(c=Math.max(c,256)),d=l.Ia,l.Ia=new Uint8Array(c),0=l.node.Ma)return 0;if(l=Math.min(l.node.Ma-b,g),8c)throw new $(28);return c},lb(l,c,d){Mr(l.node,c+d),l.node.Ma=Math.max(l.node.Ma,c+d)},bb(l,c,d,g,b){if((l.node.mode&61440)!==32768)throw new $(43);if(l=l.node.Ia,b&2||l.buffer!==L.buffer){if((0{var d=0;return l&&(d|=365),c&&(d|=146),d},qs=null,pf={},No=[],Sy=1,On=null,mf=!0,$=null,Gs={};function ht(l,c={}){if(l=Fe(l),!l)return{path:"",node:null};if(c=Object.assign({qb:!0,kb:0},c),8!!j);for(var d=qs,g="/",b=0;b>>0)%On.length}function hf(l){var c=Ks(l.parent.id,l.name);if(On[c]===l)On[c]=l.Wa;else for(c=On[c];c;){if(c.Wa===l){c.Wa=l.Wa;break}c=c.Wa}}function lr(l,c){var d;if(d=(d=jr(l,"x"))?d:l.Ga.lookup?0:2)throw new $(d,l);for(d=On[Ks(l.id,c)];d;d=d.Wa){var g=d.name;if(d.parent.id===l.id&&g===c)return d}return l.Ga.lookup(l,c)}function vf(l,c,d,g){return l=new Df(l,c,d,g),c=Ks(l.parent.id,l.name),l.Wa=On[c],On[c]=l}function Mt(l){return(l&61440)===16384}function gf(l){var c=["r","w","rw"][l&3];return l&512&&(c+="w"),c}function jr(l,c){if(mf)return 0;if(!c.includes("r")||l.mode&292){if(c.includes("w")&&!(l.mode&146)||c.includes("x")&&!(l.mode&73))return 2}else return 2;return 0}function yf(l,c){try{return lr(l,c),20}catch{}return jr(l,"wx")}function wf(l,c,d){try{var g=lr(l,c)}catch(b){return b.Ka}if(l=jr(l,"wx"))return l;if(d){if(!Mt(g.mode))return 54;if(g===g.parent||Oo(g)==="/")return 10}else if(Mt(g.mode))return 31;return 0}function Ey(){for(var l=0;4096>=l;l++)if(!No[l])return l;throw new $(33)}function ut(l){if(l=No[l],!l)throw new $(8);return l}function xf(l,c=-1){return jo||(jo=function(){this.$a={}},jo.prototype={},Object.defineProperties(jo.prototype,{object:{get(){return this.node},set(d){this.node=d}},flags:{get(){return this.$a.flags},set(d){this.$a.flags=d}},position:{get(){return this.$a.position},set(d){this.$a.position=d}}})),l=Object.assign(new jo,l),c==-1&&(c=Ey()),l.fd=c,No[c]=l}var _y={open(l){var c,d;l.Ha=pf[l.node.rdev].Ha,(d=(c=l.Ha).open)==null||d.call(c,l)},Ta(){throw new $(70)}};function Qs(l,c){pf[l]={Ha:c}}function Sf(l,c){var d=c==="/",g=!c;if(d&&qs)throw new $(10);if(!d&&!g){var b=ht(c,{qb:!1});if(c=b.path,b=b.node,b.Va)throw new $(10);if(!Mt(b.mode))throw new $(54)}c={type:l,Pb:{},tb:c,Cb:[]},l=l.Ra(c),l.Ra=c,c.root=l,d?qs=l:b&&(b.Va=c,b.Ra&&b.Ra.Cb.push(c))}function $i(l,c,d){var g=ht(l,{parent:!0}).node;if(l=W(l),!l||l==="."||l==="..")throw new $(28);var b=yf(g,l);if(b)throw new $(b);if(!g.Ga.ab)throw new $(63);return g.Ga.ab(g,l,c,d)}function Jt(l,c){return $i(l,(c!==void 0?c:511)&1023|16384,0)}function Hi(l,c,d){typeof d>"u"&&(d=c,c=438),$i(l,c|8192,d)}function Ys(l,c){if(!Fe(l))throw new $(44);var d=ht(c,{parent:!0}).node;if(!d)throw new $(44);c=W(c);var g=yf(d,c);if(g)throw new $(g);if(!d.Ga.symlink)throw new $(63);d.Ga.symlink(d,c,l)}function Ef(l){var c=ht(l,{parent:!0}).node;l=W(l);var d=lr(c,l),g=wf(c,l,!0);if(g)throw new $(g);if(!c.Ga.rmdir)throw new $(63);if(d.Va)throw new $(10);c.Ga.rmdir(c,l),hf(d)}function _f(l){var c=ht(l,{parent:!0}).node;if(!c)throw new $(44);l=W(l);var d=lr(c,l),g=wf(c,l,!1);if(g)throw new $(g);if(!c.Ga.unlink)throw new $(63);if(d.Va)throw new $(10);c.Ga.unlink(c,l),hf(d)}function bf(l){if(l=ht(l).node,!l)throw new $(44);if(!l.Ga.readlink)throw new $(28);return Fe(Oo(l.parent),l.Ga.readlink(l))}function Ao(l,c){if(l=ht(l,{Sa:!c}).node,!l)throw new $(44);if(!l.Ga.Pa)throw new $(63);return l.Ga.Pa(l)}function Cf(l){return Ao(l,!0)}function Bi(l,c){if(l=typeof l=="string"?ht(l,{Sa:!0}).node:l,!l.Ga.Oa)throw new $(63);l.Ga.Oa(l,{mode:c&4095|l.mode&-4096,timestamp:Date.now()})}function kf(l,c){if(0>c)throw new $(28);if(l=typeof l=="string"?ht(l,{Sa:!0}).node:l,!l.Ga.Oa)throw new $(63);if(Mt(l.mode))throw new $(31);if((l.mode&61440)!==32768)throw new $(28);var d=jr(l,"w");if(d)throw new $(d);l.Ga.Oa(l,{size:c,timestamp:Date.now()})}function Dr(l,c,d){if(l==="")throw new $(44);if(typeof c=="string"){var g={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[c];if(typeof g>"u")throw Error(`Unknown file open mode: ${c}`);c=g}if(d=c&64?(typeof d>"u"?438:d)&4095|32768:0,typeof l=="object")var b=l;else{l=Ht(l);try{b=ht(l,{Sa:!(c&131072)}).node}catch{}}if(g=!1,c&64)if(b){if(c&128)throw new $(20)}else b=$i(l,d,0),g=!0;if(!b)throw new $(44);if((b.mode&61440)===8192&&(c&=-513),c&65536&&!Mt(b.mode))throw new $(54);if(!g&&(d=b?(b.mode&61440)===40960?32:Mt(b.mode)&&(gf(c)!=="r"||c&512)?31:jr(b,gf(c)):44))throw new $(d);return c&512&&!g&&kf(b,0),c&=-131713,b=xf({node:b,path:Oo(b),flags:c,seekable:!0,position:0,Ha:b.Ha,Fb:[],error:!1}),b.Ha.open&&b.Ha.open(b),!u.logReadFiles||c&1||(Zs||(Zs={}),l in Zs||(Zs[l]=1)),b}function Xs(l){if(l.fd===null)throw new $(8);l.hb&&(l.hb=null);try{l.Ha.close&&l.Ha.close(l)}catch(c){throw c}finally{No[l.fd]=null}l.fd=null}function Pf(l,c,d){if(l.fd===null)throw new $(8);if(!l.seekable||!l.Ha.Ta)throw new $(70);if(d!=0&&d!=1&&d!=2)throw new $(28);l.position=l.Ha.Ta(l,c,d),l.Fb=[]}function Rf(l,c,d,g,b){if(0>g||0>b)throw new $(28);if(l.fd===null)throw new $(8);if((l.flags&2097155)===1)throw new $(8);if(Mt(l.node.mode))throw new $(31);if(!l.Ha.read)throw new $(28);var O=typeof b<"u";if(!O)b=l.position;else if(!l.seekable)throw new $(70);return c=l.Ha.read(l,c,d,g,b),O||(l.position+=c),c}function Tf(l,c,d,g,b){if(0>g||0>b)throw new $(28);if(l.fd===null)throw new $(8);if(!(l.flags&2097155))throw new $(8);if(Mt(l.node.mode))throw new $(31);if(!l.Ha.write)throw new $(28);l.seekable&&l.flags&1024&&Pf(l,0,2);var O=typeof b<"u";if(!O)b=l.position;else if(!l.seekable)throw new $(70);return c=l.Ha.write(l,c,d,g,b,void 0),O||(l.position+=c),c}function by(l){var c,d=Dr(l,d||0);l=Ao(l).size;var g=new Uint8Array(l);return Rf(d,g,0,l,0),c=g,Xs(d),c}function Nf(){$||($=function(l,c){this.name="ErrnoError",this.node=c,this.Eb=function(d){this.Ka=d},this.Eb(l),this.message="FS error"},$.prototype=Error(),$.prototype.constructor=$,[44].forEach(l=>{Gs[l]=new $(l),Gs[l].stack=""}))}var Of;function Mo(l,c,d){l=Ht("/dev/"+l);var g=zi(!!c,!!d);Af||(Af=64);var b=Af++<<8|0;Qs(b,{open(O){O.seekable=!1},close(){var O;(O=d==null?void 0:d.buffer)!=null&&O.length&&d(10)},read(O,j,ne,ge){for(var ue=0,We=0;We>2]=g.dev,H[d+4>>2]=g.mode,B[d+8>>2]=g.nlink,H[d+12>>2]=g.uid,H[d+16>>2]=g.gid,H[d+20>>2]=g.rdev,ce=[g.size>>>0,(K=g.size,1<=+Math.abs(K)?0>>0:~~+Math.ceil((K-+(~~K>>>0))/4294967296)>>>0:0)],H[d+24>>2]=ce[0],H[d+28>>2]=ce[1],H[d+32>>2]=4096,H[d+36>>2]=g.blocks,l=g.atime.getTime(),c=g.mtime.getTime();var b=g.ctime.getTime();return ce=[Math.floor(l/1e3)>>>0,(K=Math.floor(l/1e3),1<=+Math.abs(K)?0>>0:~~+Math.ceil((K-+(~~K>>>0))/4294967296)>>>0:0)],H[d+40>>2]=ce[0],H[d+44>>2]=ce[1],B[d+48>>2]=l%1e3*1e3,ce=[Math.floor(c/1e3)>>>0,(K=Math.floor(c/1e3),1<=+Math.abs(K)?0>>0:~~+Math.ceil((K-+(~~K>>>0))/4294967296)>>>0:0)],H[d+56>>2]=ce[0],H[d+60>>2]=ce[1],B[d+64>>2]=c%1e3*1e3,ce=[Math.floor(b/1e3)>>>0,(K=Math.floor(b/1e3),1<=+Math.abs(K)?0>>0:~~+Math.ceil((K-+(~~K>>>0))/4294967296)>>>0:0)],H[d+72>>2]=ce[0],H[d+76>>2]=ce[1],B[d+80>>2]=b%1e3*1e3,ce=[g.ino>>>0,(K=g.ino,1<=+Math.abs(K)?0>>0:~~+Math.ceil((K-+(~~K>>>0))/4294967296)>>>0:0)],H[d+88>>2]=ce[0],H[d+92>>2]=ce[1],0}var Ui=void 0;function Vi(){var l=H[+Ui>>2];return Ui+=4,l}var Do=(l,c)=>c+2097152>>>0<4194305-!!l?(l>>>0)+4294967296*c:NaN,Cy=[0,31,60,91,121,152,182,213,244,274,305,335],ky=[0,31,59,90,120,151,181,212,243,273,304,334],Mf=l=>{var c=At(l)+1,d=Qi(c);return d&&St(l,V,d,c),d},Js={},jf=()=>{if(!ea){var l={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:h||"./this.program"},c;for(c in Js)Js[c]===void 0?delete l[c]:l[c]=Js[c];var d=[];for(c in l)d.push(`${c}=${l[c]}`);ea=d}return ea},ea,ta=l=>{var c=At(l)+1,d=An(c);return St(l,V,d,c),d},Py=(l,c,d,g)=>{var b={string:ue=>{var We=0;return ue!=null&&ue!==0&&(We=ta(ue)),We},array:ue=>{var We=An(ue.length);return L.set(ue,We),We}};l=u["_"+l];var O=[],j=0;if(g)for(var ne=0;ne(c=c==1?An(l.length):Qi(l.length),l.subarray||l.slice||(l=new Uint8Array(l)),V.set(l,c),c),ar,na=[],fn,Ir=l=>{ar.delete(fn.get(l)),fn.set(l,null),na.push(l)},Ki=(l,c)=>{if(!ar){ar=new WeakMap;var d=fn.length;if(ar)for(var g=0;g<0+d;g++){var b=fn.get(g);b&&ar.set(b,g)}}if(d=ar.get(l)||0)return d;if(na.length)d=na.pop();else{try{fn.grow(1)}catch(ne){throw ne instanceof RangeError?"Unable to grow wasm table. Set ALLOW_TABLE_GROWTH.":ne}d=fn.length-1}try{fn.set(d,l)}catch(ne){if(!(ne instanceof TypeError))throw ne;if(typeof WebAssembly.Function=="function"){g=WebAssembly.Function,b={i:"i32",j:"i64",f:"f32",d:"f64",e:"externref",p:"i32"};for(var O={parameters:[],results:c[0]=="v"?[]:[b[c[0]]]},j=1;jj?g.push(j):g.push(j%128|128,j>>7),j=0;jb?c.push(b):c.push(b%128|128,b>>7),c.push.apply(c,g),c.push(2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0),c=new WebAssembly.Module(new Uint8Array(c)),c=new WebAssembly.Instance(c,{e:{f:l}}).exports.f}fn.set(d,c)}return ar.set(l,d),d};function Df(l,c,d,g){l||(l=this),this.parent=l,this.Ra=l.Ra,this.Va=null,this.id=Sy++,this.name=c,this.mode=d,this.Ga={},this.Ha={},this.rdev=g}Object.defineProperties(Df.prototype,{read:{get:function(){return(this.mode&365)===365},set:function(l){l?this.mode|=365:this.mode&=-366}},write:{get:function(){return(this.mode&146)===146},set:function(l){l?this.mode|=146:this.mode&=-147}}}),Nf(),On=Array(4096),Sf(le,"/"),Jt("/tmp"),Jt("/home"),Jt("/home/web_user"),function(){Jt("/dev"),Qs(259,{read:()=>0,write:(g,b,O,j)=>j}),Hi("/dev/null",259),Or(1280,Ro),Or(1536,To),Hi("/dev/tty",1280),Hi("/dev/tty1",1536);var l=new Uint8Array(1024),c=0,d=()=>(c===0&&(c=Ae(l).byteLength),l[--c]);Mo("random",d),Mo("urandom",d),Jt("/dev/shm"),Jt("/dev/shm/tmp")}(),function(){Jt("/proc");var l=Jt("/proc/self");Jt("/proc/self/fd"),Sf({Ra(){var c=vf(l,"fd",16895,73);return c.Ga={lookup(d,g){var b=ut(+g);return d={parent:null,Ra:{tb:"fake"},Ga:{readlink:()=>b.path}},d.parent=d}},c}},"/proc/self/fd")}();var Ry={a:(l,c,d,g)=>{he(`Assertion failed: ${l?xe(V,l):""}, at: `+[c?c?xe(V,c):"":"unknown filename",d,g?g?xe(V,g):"":"unknown function"])},h:function(l,c){try{return l=l?xe(V,l):"",Bi(l,c),0}catch(d){if(typeof Pe>"u"||d.name!=="ErrnoError")throw d;return-d.Ka}},H:function(l,c,d){try{if(c=c?xe(V,c):"",c=sr(l,c),d&-8)return-28;var g=ht(c,{Sa:!0}).node;return g?(l="",d&4&&(l+="r"),d&2&&(l+="w"),d&1&&(l+="x"),l&&jr(g,l)?-2:0):-44}catch(b){if(typeof Pe>"u"||b.name!=="ErrnoError")throw b;return-b.Ka}},i:function(l,c){try{var d=ut(l);return Bi(d.node,c),0}catch(g){if(typeof Pe>"u"||g.name!=="ErrnoError")throw g;return-g.Ka}},g:function(l){try{var c=ut(l).node,d=typeof c=="string"?ht(c,{Sa:!0}).node:c;if(!d.Ga.Oa)throw new $(63);return d.Ga.Oa(d,{timestamp:Date.now()}),0}catch(g){if(typeof Pe>"u"||g.name!=="ErrnoError")throw g;return-g.Ka}},b:function(l,c,d){Ui=d;try{var g=ut(l);switch(c){case 0:var b=Vi();if(0>b)return-28;for(;No[b];)b++;return xf(g,b).fd;case 1:case 2:return 0;case 3:return g.flags;case 4:return b=Vi(),g.flags|=b,0;case 5:return b=Vi(),U[b+0>>1]=2,0;case 6:case 7:return 0;case 16:case 8:return-28;case 9:return H[If()>>2]=28,-1;default:return-28}}catch(O){if(typeof Pe>"u"||O.name!=="ErrnoError")throw O;return-O.Ka}},f:function(l,c){try{var d=ut(l);return Wi(Ao,d.path,c)}catch(g){if(typeof Pe>"u"||g.name!=="ErrnoError")throw g;return-g.Ka}},n:function(l,c,d){c=Do(c,d);try{if(isNaN(c))return 61;var g=ut(l);if(!(g.flags&2097155))throw new $(28);return kf(g.node,c),0}catch(b){if(typeof Pe>"u"||b.name!=="ErrnoError")throw b;return-b.Ka}},C:function(l,c){try{if(c===0)return-28;var d=At("/")+1;return c"u"||g.name!=="ErrnoError")throw g;return-g.Ka}},F:function(l,c){try{return l=l?xe(V,l):"",Wi(Cf,l,c)}catch(d){if(typeof Pe>"u"||d.name!=="ErrnoError")throw d;return-d.Ka}},z:function(l,c,d){try{return c=c?xe(V,c):"",c=sr(l,c),c=Ht(c),c[c.length-1]==="/"&&(c=c.substr(0,c.length-1)),Jt(c,d),0}catch(g){if(typeof Pe>"u"||g.name!=="ErrnoError")throw g;return-g.Ka}},E:function(l,c,d,g){try{c=c?xe(V,c):"";var b=g&256;return c=sr(l,c,g&4096),Wi(b?Cf:Ao,c,d)}catch(O){if(typeof Pe>"u"||O.name!=="ErrnoError")throw O;return-O.Ka}},y:function(l,c,d,g){Ui=g;try{c=c?xe(V,c):"",c=sr(l,c);var b=g?Vi():0;return Dr(c,d,b).fd}catch(O){if(typeof Pe>"u"||O.name!=="ErrnoError")throw O;return-O.Ka}},w:function(l,c,d,g){try{if(c=c?xe(V,c):"",c=sr(l,c),0>=g)return-28;var b=bf(c),O=Math.min(g,At(b)),j=L[d+O];return St(b,V,d,g+1),L[d+O]=j,O}catch(ne){if(typeof Pe>"u"||ne.name!=="ErrnoError")throw ne;return-ne.Ka}},v:function(l){try{return l=l?xe(V,l):"",Ef(l),0}catch(c){if(typeof Pe>"u"||c.name!=="ErrnoError")throw c;return-c.Ka}},G:function(l,c){try{return l=l?xe(V,l):"",Wi(Ao,l,c)}catch(d){if(typeof Pe>"u"||d.name!=="ErrnoError")throw d;return-d.Ka}},r:function(l,c,d){try{return c=c?xe(V,c):"",c=sr(l,c),d===0?_f(c):d===512?Ef(c):he("Invalid flags passed to unlinkat"),0}catch(g){if(typeof Pe>"u"||g.name!=="ErrnoError")throw g;return-g.Ka}},q:function(l,c,d){try{if(c=c?xe(V,c):"",c=sr(l,c,!0),d){var g=B[d>>2]+4294967296*H[d+4>>2],b=H[d+8>>2];O=1e3*g+b/1e6,d+=16,g=B[d>>2]+4294967296*H[d+4>>2],b=H[d+8>>2],j=1e3*g+b/1e6}else var O=Date.now(),j=O;l=O;var ne=ht(c,{Sa:!0}).node;return ne.Ga.Oa(ne,{timestamp:Math.max(l,j)}),0}catch(ge){if(typeof Pe>"u"||ge.name!=="ErrnoError")throw ge;return-ge.Ka}},l:function(l,c,d){l=new Date(1e3*Do(l,c)),H[d>>2]=l.getSeconds(),H[d+4>>2]=l.getMinutes(),H[d+8>>2]=l.getHours(),H[d+12>>2]=l.getDate(),H[d+16>>2]=l.getMonth(),H[d+20>>2]=l.getFullYear()-1900,H[d+24>>2]=l.getDay(),c=l.getFullYear(),H[d+28>>2]=(c%4!==0||c%100===0&&c%400!==0?ky:Cy)[l.getMonth()]+l.getDate()-1|0,H[d+36>>2]=-(60*l.getTimezoneOffset()),c=new Date(l.getFullYear(),6,1).getTimezoneOffset();var g=new Date(l.getFullYear(),0,1).getTimezoneOffset();H[d+32>>2]=(c!=g&&l.getTimezoneOffset()==Math.min(g,c))|0},j:function(l,c,d,g,b,O,j,ne){b=Do(b,O);try{if(isNaN(b))return 61;var ge=ut(g);if(c&2&&!(d&2)&&(ge.flags&2097155)!==2)throw new $(2);if((ge.flags&2097155)===1)throw new $(2);if(!ge.Ha.bb)throw new $(43);var ue=ge.Ha.bb(ge,l,b,c,d),We=ue.Db;return H[j>>2]=ue.ub,B[ne>>2]=We,0}catch(Xe){if(typeof Pe>"u"||Xe.name!=="ErrnoError")throw Xe;return-Xe.Ka}},k:function(l,c,d,g,b,O,j){O=Do(O,j);try{if(isNaN(O))return 61;var ne=ut(b);if(d&2){if((ne.node.mode&61440)!==32768)throw new $(43);if(!(g&2)){var ge=V.slice(l,l+c);ne.Ha.cb&&ne.Ha.cb(ne,ge,O,c,g)}}}catch(ue){if(typeof Pe>"u"||ue.name!=="ErrnoError")throw ue;return-ue.Ka}},s:(l,c,d)=>{function g(ge){return(ge=ge.toTimeString().match(/\(([A-Za-z ]+)\)$/))?ge[1]:"GMT"}var b=new Date().getFullYear(),O=new Date(b,0,1),j=new Date(b,6,1);b=O.getTimezoneOffset();var ne=j.getTimezoneOffset();B[l>>2]=60*Math.max(b,ne),H[c>>2]=+(b!=ne),l=g(O),c=g(j),l=Mf(l),c=Mf(c),ne>2]=l,B[d+4>>2]=c):(B[d>>2]=c,B[d+4>>2]=l)},d:()=>Date.now(),t:()=>2147483648,c:()=>performance.now(),o:l=>{var c=V.length;if(l>>>=0,2147483648=d;d*=2){var g=c*(1+.2/d);g=Math.min(g,l+100663296);var b=Math;g=Math.max(l,g);e:{b=(b.min.call(b,2147483648,g+(65536-g%65536)%65536)-M.buffer.byteLength+65535)/65536;try{M.grow(b),J();var O=1;break e}catch{}O=void 0}if(O)return!0}return!1},A:(l,c)=>{var d=0;return jf().forEach((g,b)=>{var O=c+d;for(b=B[l+4*b>>2]=O,O=0;O>0]=g.charCodeAt(O);L[b>>0]=0,d+=g.length+1}),0},B:(l,c)=>{var d=jf();B[l>>2]=d.length;var g=0;return d.forEach(b=>g+=b.length+1),B[c>>2]=g,0},e:function(l){try{var c=ut(l);return Xs(c),0}catch(d){if(typeof Pe>"u"||d.name!=="ErrnoError")throw d;return d.Ka}},p:function(l,c){try{var d=ut(l);return L[c>>0]=d.tty?2:Mt(d.mode)?3:(d.mode&61440)===40960?7:4,U[c+2>>1]=0,ce=[0,(K=0,1<=+Math.abs(K)?0>>0:~~+Math.ceil((K-+(~~K>>>0))/4294967296)>>>0:0)],H[c+8>>2]=ce[0],H[c+12>>2]=ce[1],ce=[0,(K=0,1<=+Math.abs(K)?0>>0:~~+Math.ceil((K-+(~~K>>>0))/4294967296)>>>0:0)],H[c+16>>2]=ce[0],H[c+20>>2]=ce[1],0}catch(g){if(typeof Pe>"u"||g.name!=="ErrnoError")throw g;return g.Ka}},x:function(l,c,d,g){try{e:{var b=ut(l);l=c;for(var O,j=c=0;j>2],ge=B[l+4>>2];l+=8;var ue=Rf(b,L,ne,ge,O);if(0>ue){var We=-1;break e}if(c+=ue,ue>2]=We,0}catch(Xe){if(typeof Pe>"u"||Xe.name!=="ErrnoError")throw Xe;return Xe.Ka}},m:function(l,c,d,g,b){c=Do(c,d);try{if(isNaN(c))return 61;var O=ut(l);return Pf(O,c,g),ce=[O.position>>>0,(K=O.position,1<=+Math.abs(K)?0>>0:~~+Math.ceil((K-+(~~K>>>0))/4294967296)>>>0:0)],H[b>>2]=ce[0],H[b+4>>2]=ce[1],O.hb&&c===0&&g===0&&(O.hb=null),0}catch(j){if(typeof Pe>"u"||j.name!=="ErrnoError")throw j;return j.Ka}},D:function(l){var d;try{var c=ut(l);return(d=c.Ha)!=null&&d.fsync?c.Ha.fsync(c):0}catch(g){if(typeof Pe>"u"||g.name!=="ErrnoError")throw g;return g.Ka}},u:function(l,c,d,g){try{e:{var b=ut(l);l=c;for(var O,j=c=0;j>2],ge=B[l+4>>2];l+=8;var ue=Tf(b,L,ne,ge,O);if(0>ue){var We=-1;break e}c+=ue,typeof O<"u"&&(O+=ue)}We=c}return B[g>>2]=We,0}catch(Xe){if(typeof Pe>"u"||Xe.name!=="ErrnoError")throw Xe;return Xe.Ka}}},Z=function(){var d;function l(g){var b;return Z=g.exports,M=Z.I,J(),fn=Z.Aa,z.unshift(Z.J),ie--,(b=u.monitorRunDependencies)==null||b.call(u,ie),ie==0&&Ve&&(g=Ve,Ve=null,g()),Z}var c={a:Ry};if(ie++,(d=u.monitorRunDependencies)==null||d.call(u,ie),u.instantiateWasm)try{return u.instantiateWasm(c,l)}catch(g){return A(`Module.instantiateWasm callback failed with error: ${g}`),!1}return de(c,function(g){l(g.instance)}),{}}();u._sqlite3_free=l=>(u._sqlite3_free=Z.K)(l),u._sqlite3_value_text=l=>(u._sqlite3_value_text=Z.L)(l);var If=()=>(If=Z.M)();u._sqlite3_prepare_v2=(l,c,d,g,b)=>(u._sqlite3_prepare_v2=Z.N)(l,c,d,g,b),u._sqlite3_step=l=>(u._sqlite3_step=Z.O)(l),u._sqlite3_reset=l=>(u._sqlite3_reset=Z.P)(l),u._sqlite3_exec=(l,c,d,g,b)=>(u._sqlite3_exec=Z.Q)(l,c,d,g,b),u._sqlite3_finalize=l=>(u._sqlite3_finalize=Z.R)(l),u._sqlite3_column_name=(l,c)=>(u._sqlite3_column_name=Z.S)(l,c),u._sqlite3_column_text=(l,c)=>(u._sqlite3_column_text=Z.T)(l,c),u._sqlite3_column_type=(l,c)=>(u._sqlite3_column_type=Z.U)(l,c),u._sqlite3_errmsg=l=>(u._sqlite3_errmsg=Z.V)(l),u._sqlite3_clear_bindings=l=>(u._sqlite3_clear_bindings=Z.W)(l),u._sqlite3_value_blob=l=>(u._sqlite3_value_blob=Z.X)(l),u._sqlite3_value_bytes=l=>(u._sqlite3_value_bytes=Z.Y)(l),u._sqlite3_value_double=l=>(u._sqlite3_value_double=Z.Z)(l),u._sqlite3_value_int=l=>(u._sqlite3_value_int=Z._)(l),u._sqlite3_value_type=l=>(u._sqlite3_value_type=Z.$)(l),u._sqlite3_result_blob=(l,c,d,g)=>(u._sqlite3_result_blob=Z.aa)(l,c,d,g),u._sqlite3_result_double=(l,c)=>(u._sqlite3_result_double=Z.ba)(l,c),u._sqlite3_result_error=(l,c,d)=>(u._sqlite3_result_error=Z.ca)(l,c,d),u._sqlite3_result_int=(l,c)=>(u._sqlite3_result_int=Z.da)(l,c),u._sqlite3_result_int64=(l,c,d)=>(u._sqlite3_result_int64=Z.ea)(l,c,d),u._sqlite3_result_null=l=>(u._sqlite3_result_null=Z.fa)(l),u._sqlite3_result_text=(l,c,d,g)=>(u._sqlite3_result_text=Z.ga)(l,c,d,g),u._sqlite3_aggregate_context=(l,c)=>(u._sqlite3_aggregate_context=Z.ha)(l,c),u._sqlite3_column_count=l=>(u._sqlite3_column_count=Z.ia)(l),u._sqlite3_data_count=l=>(u._sqlite3_data_count=Z.ja)(l),u._sqlite3_column_blob=(l,c)=>(u._sqlite3_column_blob=Z.ka)(l,c),u._sqlite3_column_bytes=(l,c)=>(u._sqlite3_column_bytes=Z.la)(l,c),u._sqlite3_column_double=(l,c)=>(u._sqlite3_column_double=Z.ma)(l,c),u._sqlite3_bind_blob=(l,c,d,g,b)=>(u._sqlite3_bind_blob=Z.na)(l,c,d,g,b),u._sqlite3_bind_double=(l,c,d)=>(u._sqlite3_bind_double=Z.oa)(l,c,d),u._sqlite3_bind_int=(l,c,d)=>(u._sqlite3_bind_int=Z.pa)(l,c,d),u._sqlite3_bind_text=(l,c,d,g,b)=>(u._sqlite3_bind_text=Z.qa)(l,c,d,g,b),u._sqlite3_bind_parameter_index=(l,c)=>(u._sqlite3_bind_parameter_index=Z.ra)(l,c),u._sqlite3_sql=l=>(u._sqlite3_sql=Z.sa)(l),u._sqlite3_normalized_sql=l=>(u._sqlite3_normalized_sql=Z.ta)(l),u._sqlite3_changes=l=>(u._sqlite3_changes=Z.ua)(l),u._sqlite3_close_v2=l=>(u._sqlite3_close_v2=Z.va)(l),u._sqlite3_create_function_v2=(l,c,d,g,b,O,j,ne,ge)=>(u._sqlite3_create_function_v2=Z.wa)(l,c,d,g,b,O,j,ne,ge),u._sqlite3_open=(l,c)=>(u._sqlite3_open=Z.xa)(l,c);var Qi=u._malloc=l=>(Qi=u._malloc=Z.ya)(l),Yi=u._free=l=>(Yi=u._free=Z.za)(l);u._RegisterExtensionFunctions=l=>(u._RegisterExtensionFunctions=Z.Ba)(l);var Lf=(l,c)=>(Lf=Z.Ca)(l,c),Io=()=>(Io=Z.Da)(),Lo=l=>(Lo=Z.Ea)(l),An=l=>(An=Z.Fa)(l);u.stackAlloc=An,u.stackSave=Io,u.stackRestore=Lo,u.cwrap=(l,c,d,g)=>{var b=!d||d.every(O=>O==="number"||O==="boolean");return c!=="string"&&b&&!g?u["_"+l]:function(){return Py(l,c,d,arguments)}},u.addFunction=Ki,u.removeFunction=Ir,u.UTF8ToString=Nn,u.ALLOC_NORMAL=qi,u.allocate=Gi,u.allocateUTF8OnStack=ta;var Xi;Ve=function l(){Xi||Ff(),Xi||(Ve=l)};function Ff(){function l(){if(!Xi&&(Xi=!0,u.calledRun=!0,!G)){if(u.noFSInit||Of||(Of=!0,Nf(),u.stdin=u.stdin,u.stdout=u.stdout,u.stderr=u.stderr,u.stdin?Mo("stdin",u.stdin):Ys("/dev/tty","/dev/stdin"),u.stdout?Mo("stdout",null,u.stdout):Ys("/dev/tty","/dev/stdout"),u.stderr?Mo("stderr",null,u.stderr):Ys("/dev/tty1","/dev/stderr"),Dr("/dev/stdin",0),Dr("/dev/stdout",1),Dr("/dev/stderr",1)),mf=!1,Ot(z),u.onRuntimeInitialized&&u.onRuntimeInitialized(),u.postRun)for(typeof u.postRun=="function"&&(u.postRun=[u.postRun]);u.postRun.length;){var c=u.postRun.shift();ee.unshift(c)}Ot(ee)}}if(!(0({db:null,isLoading:!1,loadDatabase:async n=>{e({isLoading:!0});const r=await n.arrayBuffer(),o=await sx({locateFile:a=>`https://sql.js.org/dist/${a}`}),i=new o.Database(new Uint8Array(r));e({db:i}),console.log("Database loaded successfully");const s=i.exec("SELECT name FROM sqlite_master WHERE type='table';");if(s.length>0){const f=s[0].values.map(p=>p[0]).map(async p=>{const h=i.exec(`SELECT COUNT(*) FROM "${p}"`),y=parseInt(h[0].values[0][0],10),E=i.exec(`PRAGMA table_info("${p}")`)[0].values.reduce((x,P)=>(x[P[1]]=P[2],x),{});return{name:p,count:y,schema:E}}),u=await Promise.all(f);console.log("Tables with row counts and schemas:",u),e({tables:u.map(({name:p,count:h})=>({name:p,count:h})),tableSchemas:u.reduce((p,{name:h,schema:y})=>(p[h]=y,p),{})})}e({isLoading:!1})},query:n=>{const r=t().db;if(!r)return console.warn("Database is not loaded."),[];const o=r.exec(n);return console.log("Query executed:",n,o),o.length>0?o:[]},tables:[],setTables:n=>e({tables:n}),selectedTable:"0",setSelectedTable:n=>e({selectedTable:n}),tableSchemas:{},setTableSchemas:n=>e({tableSchemas:n})}));function be(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function Ls(e,t=[]){let n=[];function r(i,s){const a=w.createContext(s),f=n.length;n=[...n,s];function u(h){const{scope:y,children:_,...E}=h,x=(y==null?void 0:y[e][f])||a,P=w.useMemo(()=>E,Object.values(E));return C.jsx(x.Provider,{value:P,children:_})}function p(h,y){const _=(y==null?void 0:y[e][f])||a,E=w.useContext(_);if(E)return E;if(s!==void 0)return s;throw new Error(`\`${h}\` must be used within \`${i}\``)}return u.displayName=i+"Provider",[u,p]}const o=()=>{const i=n.map(s=>w.createContext(s));return function(a){const f=(a==null?void 0:a[e])||i;return w.useMemo(()=>({[`__scope${e}`]:{...a,[e]:f}}),[a,f])}};return o.scopeName=e,[r,ax(o,...t)]}function ax(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const s=r.reduce((a,{useScope:f,scopeName:u})=>{const h=f(i)[`__scope${u}`];return{...a,...h}},{});return w.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function _n(e){const t=w.useRef(e);return w.useEffect(()=>{t.current=e}),w.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function Du({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=ux({defaultProp:t,onChange:n}),i=e!==void 0,s=i?e:r,a=_n(n),f=w.useCallback(u=>{if(i){const h=typeof u=="function"?u(e):u;h!==e&&a(h)}else o(u)},[i,e,o,a]);return[s,f]}function ux({defaultProp:e,onChange:t}){const n=w.useState(e),[r]=n,o=w.useRef(r),i=_n(t);return w.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}function cx(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function sv(...e){return t=>e.forEach(n=>cx(n,t))}function Ke(...e){return w.useCallback(sv(...e),e)}const fx=["top","right","bottom","left"],ln=Math.min,bt=Math.max,us=Math.round,vl=Math.floor,Jn=e=>({x:e,y:e}),dx={left:"right",right:"left",bottom:"top",top:"bottom"},px={start:"end",end:"start"};function Iu(e,t,n){return bt(e,ln(t,n))}function bn(e,t){return typeof e=="function"?e(t):e}function Cn(e){return e.split("-")[0]}function So(e){return e.split("-")[1]}function Qc(e){return e==="x"?"y":"x"}function Yc(e){return e==="y"?"height":"width"}function Eo(e){return["top","bottom"].includes(Cn(e))?"y":"x"}function Xc(e){return Qc(Eo(e))}function mx(e,t,n){n===void 0&&(n=!1);const r=So(e),o=Xc(e),i=Yc(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=cs(s)),[s,cs(s)]}function hx(e){const t=cs(e);return[Lu(e),t,Lu(t)]}function Lu(e){return e.replace(/start|end/g,t=>px[t])}function vx(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:s;default:return[]}}function gx(e,t,n,r){const o=So(e);let i=vx(Cn(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(Lu)))),i}function cs(e){return e.replace(/left|right|bottom|top/g,t=>dx[t])}function yx(e){return{top:0,right:0,bottom:0,left:0,...e}}function av(e){return typeof e!="number"?yx(e):{top:e,right:e,bottom:e,left:e}}function fs(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function ip(e,t,n){let{reference:r,floating:o}=e;const i=Eo(t),s=Xc(t),a=Yc(s),f=Cn(t),u=i==="y",p=r.x+r.width/2-o.width/2,h=r.y+r.height/2-o.height/2,y=r[a]/2-o[a]/2;let _;switch(f){case"top":_={x:p,y:r.y-o.height};break;case"bottom":_={x:p,y:r.y+r.height};break;case"right":_={x:r.x+r.width,y:h};break;case"left":_={x:r.x-o.width,y:h};break;default:_={x:r.x,y:r.y}}switch(So(t)){case"start":_[s]-=y*(n&&u?-1:1);break;case"end":_[s]+=y*(n&&u?-1:1);break}return _}const wx=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),f=await(s.isRTL==null?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:p,y:h}=ip(u,r,f),y=r,_={},E=0;for(let x=0;x({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:f}=t,{element:u,padding:p=0}=bn(e,t)||{};if(u==null)return{};const h=av(p),y={x:n,y:r},_=Xc(o),E=Yc(_),x=await s.getDimensions(u),P=_==="y",v=P?"top":"left",m=P?"bottom":"right",S=P?"clientHeight":"clientWidth",k=i.reference[E]+i.reference[_]-y[_]-i.floating[E],R=y[_]-i.reference[_],A=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u));let N=A?A[S]:0;(!N||!await(s.isElement==null?void 0:s.isElement(A)))&&(N=a.floating[S]||i.floating[E]);const M=k/2-R/2,G=N/2-x[E]/2-1,L=ln(h[v],G),V=ln(h[m],G),U=L,H=N-x[E]-V,B=N/2-x[E]/2+M,Q=Iu(U,B,H),se=!f.arrow&&So(o)!=null&&B!==Q&&i.reference[E]/2-(BU<=0)){var G,L;const U=(((G=i.flip)==null?void 0:G.index)||0)+1,H=R[U];if(H)return{data:{index:U,overflows:M},reset:{placement:H}};let B=(L=M.filter(Q=>Q.overflows[0]<=0).sort((Q,se)=>Q.overflows[1]-se.overflows[1])[0])==null?void 0:L.placement;if(!B)switch(_){case"bestFit":{var V;const Q=(V=M.map(se=>[se.placement,se.overflows.filter(J=>J>0).reduce((J,I)=>J+I,0)]).sort((se,J)=>se[1]-J[1])[0])==null?void 0:V[0];Q&&(B=Q);break}case"initialPlacement":B=a;break}if(o!==B)return{reset:{placement:B}}}return{}}}};function lp(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function sp(e){return fx.some(t=>e[t]>=0)}const Ex=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=bn(e,t);switch(r){case"referenceHidden":{const i=await Ci(t,{...o,elementContext:"reference"}),s=lp(i,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:sp(s)}}}case"escaped":{const i=await Ci(t,{...o,altBoundary:!0}),s=lp(i,n.floating);return{data:{escapedOffsets:s,escaped:sp(s)}}}default:return{}}}}};async function _x(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=Cn(n),a=So(n),f=Eo(n)==="y",u=["left","top"].includes(s)?-1:1,p=i&&f?-1:1,h=bn(t,e);let{mainAxis:y,crossAxis:_,alignmentAxis:E}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...h};return a&&typeof E=="number"&&(_=a==="end"?E*-1:E),f?{x:_*p,y:y*u}:{x:y*u,y:_*p}}const bx=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=t,f=await _x(t,e);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+f.x,y:i+f.y,data:{...f,placement:s}}}}},Cx=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:P=>{let{x:v,y:m}=P;return{x:v,y:m}}},...f}=bn(e,t),u={x:n,y:r},p=await Ci(t,f),h=Eo(Cn(o)),y=Qc(h);let _=u[y],E=u[h];if(i){const P=y==="y"?"top":"left",v=y==="y"?"bottom":"right",m=_+p[P],S=_-p[v];_=Iu(m,_,S)}if(s){const P=h==="y"?"top":"left",v=h==="y"?"bottom":"right",m=E+p[P],S=E-p[v];E=Iu(m,E,S)}const x=a.fn({...t,[y]:_,[h]:E});return{...x,data:{x:x.x-n,y:x.y-r}}}}},kx=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:s}=t,{offset:a=0,mainAxis:f=!0,crossAxis:u=!0}=bn(e,t),p={x:n,y:r},h=Eo(o),y=Qc(h);let _=p[y],E=p[h];const x=bn(a,t),P=typeof x=="number"?{mainAxis:x,crossAxis:0}:{mainAxis:0,crossAxis:0,...x};if(f){const S=y==="y"?"height":"width",k=i.reference[y]-i.floating[S]+P.mainAxis,R=i.reference[y]+i.reference[S]-P.mainAxis;_R&&(_=R)}if(u){var v,m;const S=y==="y"?"width":"height",k=["top","left"].includes(Cn(o)),R=i.reference[h]-i.floating[S]+(k&&((v=s.offset)==null?void 0:v[h])||0)+(k?0:P.crossAxis),A=i.reference[h]+i.reference[S]+(k?0:((m=s.offset)==null?void 0:m[h])||0)-(k?P.crossAxis:0);EA&&(E=A)}return{[y]:_,[h]:E}}}},Px=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:i}=t,{apply:s=()=>{},...a}=bn(e,t),f=await Ci(t,a),u=Cn(n),p=So(n),h=Eo(n)==="y",{width:y,height:_}=r.floating;let E,x;u==="top"||u==="bottom"?(E=u,x=p===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(x=u,E=p==="end"?"top":"bottom");const P=_-f.top-f.bottom,v=y-f.left-f.right,m=ln(_-f[E],P),S=ln(y-f[x],v),k=!t.middlewareData.shift;let R=m,A=S;if(h?A=p||k?ln(S,v):v:R=p||k?ln(m,P):P,k&&!p){const M=bt(f.left,0),G=bt(f.right,0),L=bt(f.top,0),V=bt(f.bottom,0);h?A=y-2*(M!==0||G!==0?M+G:bt(f.left,f.right)):R=_-2*(L!==0||V!==0?L+V:bt(f.top,f.bottom))}await s({...t,availableWidth:A,availableHeight:R});const N=await o.getDimensions(i.floating);return y!==N.width||_!==N.height?{reset:{rects:!0}}:{}}}};function _o(e){return uv(e)?(e.nodeName||"").toLowerCase():"#document"}function Pt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Pn(e){var t;return(t=(uv(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function uv(e){return e instanceof Node||e instanceof Pt(e).Node}function un(e){return e instanceof Element||e instanceof Pt(e).Element}function cn(e){return e instanceof HTMLElement||e instanceof Pt(e).HTMLElement}function ap(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Pt(e).ShadowRoot}function Di(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Zt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function Rx(e){return["table","td","th"].includes(_o(e))}function Zc(e){const t=Jc(),n=Zt(e);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function Tx(e){let t=er(e);for(;cn(t)&&!vo(t);){if(Zc(t))return t;t=er(t)}return null}function Jc(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function vo(e){return["html","body","#document"].includes(_o(e))}function Zt(e){return Pt(e).getComputedStyle(e)}function Fs(e){return un(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function er(e){if(_o(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ap(e)&&e.host||Pn(e);return ap(t)?t.host:t}function cv(e){const t=er(e);return vo(t)?e.ownerDocument?e.ownerDocument.body:e.body:cn(t)&&Di(t)?t:cv(t)}function ki(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=cv(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=Pt(o);return i?t.concat(s,s.visualViewport||[],Di(o)?o:[],s.frameElement&&n?ki(s.frameElement):[]):t.concat(o,ki(o,[],n))}function fv(e){const t=Zt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=cn(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=us(n)!==i||us(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function ef(e){return un(e)?e:e.contextElement}function io(e){const t=ef(e);if(!cn(t))return Jn(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=fv(t);let s=(i?us(n.width):n.width)/r,a=(i?us(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const Nx=Jn(0);function dv(e){const t=Pt(e);return!Jc()||!t.visualViewport?Nx:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Ox(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Pt(e)?!1:t}function br(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=ef(e);let s=Jn(1);t&&(r?un(r)&&(s=io(r)):s=io(e));const a=Ox(i,n,r)?dv(i):Jn(0);let f=(o.left+a.x)/s.x,u=(o.top+a.y)/s.y,p=o.width/s.x,h=o.height/s.y;if(i){const y=Pt(i),_=r&&un(r)?Pt(r):r;let E=y,x=E.frameElement;for(;x&&r&&_!==E;){const P=io(x),v=x.getBoundingClientRect(),m=Zt(x),S=v.left+(x.clientLeft+parseFloat(m.paddingLeft))*P.x,k=v.top+(x.clientTop+parseFloat(m.paddingTop))*P.y;f*=P.x,u*=P.y,p*=P.x,h*=P.y,f+=S,u+=k,E=Pt(x),x=E.frameElement}}return fs({width:p,height:h,x:f,y:u})}const Ax=[":popover-open",":modal"];function tf(e){return Ax.some(t=>{try{return e.matches(t)}catch{return!1}})}function Mx(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",s=Pn(r),a=t?tf(t.floating):!1;if(r===s||a&&i)return n;let f={scrollLeft:0,scrollTop:0},u=Jn(1);const p=Jn(0),h=cn(r);if((h||!h&&!i)&&((_o(r)!=="body"||Di(s))&&(f=Fs(r)),cn(r))){const y=br(r);u=io(r),p.x=y.x+r.clientLeft,p.y=y.y+r.clientTop}return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-f.scrollLeft*u.x+p.x,y:n.y*u.y-f.scrollTop*u.y+p.y}}function jx(e){return Array.from(e.getClientRects())}function pv(e){return br(Pn(e)).left+Fs(e).scrollLeft}function Dx(e){const t=Pn(e),n=Fs(e),r=e.ownerDocument.body,o=bt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=bt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+pv(e);const a=-n.scrollTop;return Zt(r).direction==="rtl"&&(s+=bt(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}function Ix(e,t){const n=Pt(e),r=Pn(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,f=0;if(o){i=o.width,s=o.height;const u=Jc();(!u||u&&t==="fixed")&&(a=o.offsetLeft,f=o.offsetTop)}return{width:i,height:s,x:a,y:f}}function Lx(e,t){const n=br(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=cn(e)?io(e):Jn(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,f=o*i.x,u=r*i.y;return{width:s,height:a,x:f,y:u}}function up(e,t,n){let r;if(t==="viewport")r=Ix(e,n);else if(t==="document")r=Dx(Pn(e));else if(un(t))r=Lx(t,n);else{const o=dv(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return fs(r)}function mv(e,t){const n=er(e);return n===t||!un(n)||vo(n)?!1:Zt(n).position==="fixed"||mv(n,t)}function Fx(e,t){const n=t.get(e);if(n)return n;let r=ki(e,[],!1).filter(a=>un(a)&&_o(a)!=="body"),o=null;const i=Zt(e).position==="fixed";let s=i?er(e):e;for(;un(s)&&!vo(s);){const a=Zt(s),f=Zc(s);!f&&a.position==="fixed"&&(o=null),(i?!f&&!o:!f&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Di(s)&&!f&&mv(e,s))?r=r.filter(p=>p!==s):o=a,s=er(s)}return t.set(e,r),r}function zx(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?tf(t)?[]:Fx(t,this._c):[].concat(n),r],a=s[0],f=s.reduce((u,p)=>{const h=up(t,p,o);return u.top=bt(h.top,u.top),u.right=ln(h.right,u.right),u.bottom=ln(h.bottom,u.bottom),u.left=bt(h.left,u.left),u},up(t,a,o));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}}function $x(e){const{width:t,height:n}=fv(e);return{width:t,height:n}}function Hx(e,t,n){const r=cn(t),o=Pn(t),i=n==="fixed",s=br(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const f=Jn(0);if(r||!r&&!i)if((_o(t)!=="body"||Di(o))&&(a=Fs(t)),r){const h=br(t,!0,i,t);f.x=h.x+t.clientLeft,f.y=h.y+t.clientTop}else o&&(f.x=pv(o));const u=s.left+a.scrollLeft-f.x,p=s.top+a.scrollTop-f.y;return{x:u,y:p,width:s.width,height:s.height}}function Aa(e){return Zt(e).position==="static"}function cp(e,t){return!cn(e)||Zt(e).position==="fixed"?null:t?t(e):e.offsetParent}function hv(e,t){const n=Pt(e);if(tf(e))return n;if(!cn(e)){let o=er(e);for(;o&&!vo(o);){if(un(o)&&!Aa(o))return o;o=er(o)}return n}let r=cp(e,t);for(;r&&Rx(r)&&Aa(r);)r=cp(r,t);return r&&vo(r)&&Aa(r)&&!Zc(r)?n:r||Tx(e)||n}const Bx=async function(e){const t=this.getOffsetParent||hv,n=this.getDimensions,r=await n(e.floating);return{reference:Hx(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Wx(e){return Zt(e).direction==="rtl"}const Ux={convertOffsetParentRelativeRectToViewportRelativeRect:Mx,getDocumentElement:Pn,getClippingRect:zx,getOffsetParent:hv,getElementRects:Bx,getClientRects:jx,getDimensions:$x,getScale:io,isElement:un,isRTL:Wx};function Vx(e,t){let n=null,r;const o=Pn(e);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,f){a===void 0&&(a=!1),f===void 0&&(f=1),i();const{left:u,top:p,width:h,height:y}=e.getBoundingClientRect();if(a||t(),!h||!y)return;const _=vl(p),E=vl(o.clientWidth-(u+h)),x=vl(o.clientHeight-(p+y)),P=vl(u),m={rootMargin:-_+"px "+-E+"px "+-x+"px "+-P+"px",threshold:bt(0,ln(1,f))||1};let S=!0;function k(R){const A=R[0].intersectionRatio;if(A!==f){if(!S)return s();A?s(!1,A):r=setTimeout(()=>{s(!1,1e-7)},1e3)}S=!1}try{n=new IntersectionObserver(k,{...m,root:o.ownerDocument})}catch{n=new IntersectionObserver(k,m)}n.observe(e)}return s(!0),i}function qx(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:f=!1}=r,u=ef(e),p=o||i?[...u?ki(u):[],...ki(t)]:[];p.forEach(v=>{o&&v.addEventListener("scroll",n,{passive:!0}),i&&v.addEventListener("resize",n)});const h=u&&a?Vx(u,n):null;let y=-1,_=null;s&&(_=new ResizeObserver(v=>{let[m]=v;m&&m.target===u&&_&&(_.unobserve(t),cancelAnimationFrame(y),y=requestAnimationFrame(()=>{var S;(S=_)==null||S.observe(t)})),n()}),u&&!f&&_.observe(u),_.observe(t));let E,x=f?br(e):null;f&&P();function P(){const v=br(e);x&&(v.x!==x.x||v.y!==x.y||v.width!==x.width||v.height!==x.height)&&n(),x=v,E=requestAnimationFrame(P)}return n(),()=>{var v;p.forEach(m=>{o&&m.removeEventListener("scroll",n),i&&m.removeEventListener("resize",n)}),h==null||h(),(v=_)==null||v.disconnect(),_=null,f&&cancelAnimationFrame(E)}}const Gx=bx,Kx=Cx,Qx=Sx,Yx=Px,Xx=Ex,fp=xx,Zx=kx,Jx=(e,t,n)=>{const r=new Map,o={platform:Ux,...n},i={...o.platform,_c:r};return wx(e,t,{...o,platform:i})};var Il=typeof document<"u"?w.useLayoutEffect:w.useEffect;function ds(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!ds(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!ds(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function vv(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function dp(e,t){const n=vv(e);return Math.round(t*n)/n}function pp(e){const t=w.useRef(e);return Il(()=>{t.current=e}),t}function eS(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:f,open:u}=e,[p,h]=w.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[y,_]=w.useState(r);ds(y,r)||_(r);const[E,x]=w.useState(null),[P,v]=w.useState(null),m=w.useCallback(J=>{J!==A.current&&(A.current=J,x(J))},[]),S=w.useCallback(J=>{J!==N.current&&(N.current=J,v(J))},[]),k=i||E,R=s||P,A=w.useRef(null),N=w.useRef(null),M=w.useRef(p),G=f!=null,L=pp(f),V=pp(o),U=w.useCallback(()=>{if(!A.current||!N.current)return;const J={placement:t,strategy:n,middleware:y};V.current&&(J.platform=V.current),Jx(A.current,N.current,J).then(I=>{const z={...I,isPositioned:!0};H.current&&!ds(M.current,z)&&(M.current=z,Rr.flushSync(()=>{h(z)}))})},[y,t,n,V]);Il(()=>{u===!1&&M.current.isPositioned&&(M.current.isPositioned=!1,h(J=>({...J,isPositioned:!1})))},[u]);const H=w.useRef(!1);Il(()=>(H.current=!0,()=>{H.current=!1}),[]),Il(()=>{if(k&&(A.current=k),R&&(N.current=R),k&&R){if(L.current)return L.current(k,R,U);U()}},[k,R,U,L,G]);const B=w.useMemo(()=>({reference:A,floating:N,setReference:m,setFloating:S}),[m,S]),Q=w.useMemo(()=>({reference:k,floating:R}),[k,R]),se=w.useMemo(()=>{const J={position:n,left:0,top:0};if(!Q.floating)return J;const I=dp(Q.floating,p.x),z=dp(Q.floating,p.y);return a?{...J,transform:"translate("+I+"px, "+z+"px)",...vv(Q.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:I,top:z}},[n,a,Q.floating,p.x,p.y]);return w.useMemo(()=>({...p,update:U,refs:B,elements:Q,floatingStyles:se}),[p,U,B,Q,se])}const tS=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?fp({element:r.current,padding:o}).fn(n):{}:r?fp({element:r,padding:o}).fn(n):{}}}},nS=(e,t)=>({...Gx(e),options:[e,t]}),rS=(e,t)=>({...Kx(e),options:[e,t]}),oS=(e,t)=>({...Zx(e),options:[e,t]}),iS=(e,t)=>({...Qx(e),options:[e,t]}),lS=(e,t)=>({...Yx(e),options:[e,t]}),sS=(e,t)=>({...Xx(e),options:[e,t]}),aS=(e,t)=>({...tS(e),options:[e,t]});var go=w.forwardRef((e,t)=>{const{children:n,...r}=e,o=w.Children.toArray(n),i=o.find(cS);if(i){const s=i.props.children,a=o.map(f=>f===i?w.Children.count(s)>1?w.Children.only(null):w.isValidElement(s)?s.props.children:null:f);return C.jsx(Fu,{...r,ref:t,children:w.isValidElement(s)?w.cloneElement(s,void 0,a):null})}return C.jsx(Fu,{...r,ref:t,children:n})});go.displayName="Slot";var Fu=w.forwardRef((e,t)=>{const{children:n,...r}=e;if(w.isValidElement(n)){const o=dS(n);return w.cloneElement(n,{...fS(r,n.props),ref:t?sv(t,o):o})}return w.Children.count(n)>1?w.Children.only(null):null});Fu.displayName="SlotClone";var uS=({children:e})=>C.jsx(C.Fragment,{children:e});function cS(e){return w.isValidElement(e)&&e.type===uS}function fS(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...a)=>{i(...a),o(...a)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function dS(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var pS=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],$e=pS.reduce((e,t)=>{const n=w.forwardRef((r,o)=>{const{asChild:i,...s}=r,a=i?go:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),C.jsx(a,{...s,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function mS(e,t){e&&Rr.flushSync(()=>e.dispatchEvent(t))}var hS="Arrow",gv=w.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return C.jsx($e.svg,{...i,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:C.jsx("polygon",{points:"0,0 30,0 15,10"})})});gv.displayName=hS;var vS=gv,dt=globalThis!=null&&globalThis.document?w.useLayoutEffect:()=>{};function gS(e){const[t,n]=w.useState(void 0);return dt(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let s,a;if("borderBoxSize"in i){const f=i.borderBoxSize,u=Array.isArray(f)?f[0]:f;s=u.inlineSize,a=u.blockSize}else s=e.offsetWidth,a=e.offsetHeight;n({width:s,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var nf="Popper",[yv,zs]=Ls(nf),[yS,wv]=yv(nf),xv=e=>{const{__scopePopper:t,children:n}=e,[r,o]=w.useState(null);return C.jsx(yS,{scope:t,anchor:r,onAnchorChange:o,children:n})};xv.displayName=nf;var Sv="PopperAnchor",Ev=w.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=wv(Sv,n),s=w.useRef(null),a=Ke(t,s);return w.useEffect(()=>{i.onAnchorChange((r==null?void 0:r.current)||s.current)}),r?null:C.jsx($e.div,{...o,ref:a})});Ev.displayName=Sv;var rf="PopperContent",[wS,xS]=yv(rf),_v=w.forwardRef((e,t)=>{var Y,we,Le,ve,me,de;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:i="center",alignOffset:s=0,arrowPadding:a=0,avoidCollisions:f=!0,collisionBoundary:u=[],collisionPadding:p=0,sticky:h="partial",hideWhenDetached:y=!1,updatePositionStrategy:_="optimized",onPlaced:E,...x}=e,P=wv(rf,n),[v,m]=w.useState(null),S=Ke(t,K=>m(K)),[k,R]=w.useState(null),A=gS(k),N=(A==null?void 0:A.width)??0,M=(A==null?void 0:A.height)??0,G=r+(i!=="center"?"-"+i:""),L=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},V=Array.isArray(u)?u:[u],U=V.length>0,H={padding:L,boundary:V.filter(ES),altBoundary:U},{refs:B,floatingStyles:Q,placement:se,isPositioned:J,middlewareData:I}=eS({strategy:"fixed",placement:G,whileElementsMounted:(...K)=>qx(...K,{animationFrame:_==="always"}),elements:{reference:P.anchor},middleware:[nS({mainAxis:o+M,alignmentAxis:s}),f&&rS({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?oS():void 0,...H}),f&&iS({...H}),lS({...H,apply:({elements:K,rects:ce,availableWidth:Ot,availableHeight:Qe})=>{const{width:Ye,height:Tn}=ce.reference,xe=K.floating.style;xe.setProperty("--radix-popper-available-width",`${Ot}px`),xe.setProperty("--radix-popper-available-height",`${Qe}px`),xe.setProperty("--radix-popper-anchor-width",`${Ye}px`),xe.setProperty("--radix-popper-anchor-height",`${Tn}px`)}}),k&&aS({element:k,padding:a}),_S({arrowWidth:N,arrowHeight:M}),y&&sS({strategy:"referenceHidden",...H})]}),[z,ee]=kv(se),oe=_n(E);dt(()=>{J&&(oe==null||oe())},[J,oe]);const ie=(Y=I.arrow)==null?void 0:Y.x,Ve=(we=I.arrow)==null?void 0:we.y,he=((Le=I.arrow)==null?void 0:Le.centerOffset)!==0,[ot,Ee]=w.useState();return dt(()=>{v&&Ee(window.getComputedStyle(v).zIndex)},[v]),C.jsx("div",{ref:B.setFloating,"data-radix-popper-content-wrapper":"",style:{...Q,transform:J?Q.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ot,"--radix-popper-transform-origin":[(ve=I.transformOrigin)==null?void 0:ve.x,(me=I.transformOrigin)==null?void 0:me.y].join(" "),...((de=I.hide)==null?void 0:de.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:C.jsx(wS,{scope:n,placedSide:z,onArrowChange:R,arrowX:ie,arrowY:Ve,shouldHideArrow:he,children:C.jsx($e.div,{"data-side":z,"data-align":ee,...x,ref:S,style:{...x.style,animation:J?void 0:"none"}})})})});_v.displayName=rf;var bv="PopperArrow",SS={top:"bottom",right:"left",bottom:"top",left:"right"},Cv=w.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,i=xS(bv,r),s=SS[i.placedSide];return C.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:C.jsx(vS,{...o,ref:n,style:{...o.style,display:"block"}})})});Cv.displayName=bv;function ES(e){return e!==null}var _S=e=>({name:"transformOrigin",options:e,fn(t){var P,v,m;const{placement:n,rects:r,middlewareData:o}=t,s=((P=o.arrow)==null?void 0:P.centerOffset)!==0,a=s?0:e.arrowWidth,f=s?0:e.arrowHeight,[u,p]=kv(n),h={start:"0%",center:"50%",end:"100%"}[p],y=(((v=o.arrow)==null?void 0:v.x)??0)+a/2,_=(((m=o.arrow)==null?void 0:m.y)??0)+f/2;let E="",x="";return u==="bottom"?(E=s?h:`${y}px`,x=`${-f}px`):u==="top"?(E=s?h:`${y}px`,x=`${r.floating.height+f}px`):u==="right"?(E=`${-f}px`,x=s?h:`${_}px`):u==="left"&&(E=`${r.floating.width+f}px`,x=s?h:`${_}px`),{data:{x:E,y:x}}}});function kv(e){const[t,n="center"]=e.split("-");return[t,n]}var Pv=xv,Rv=Ev,Tv=_v,Nv=Cv,bS="Portal",Ov=w.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[o,i]=w.useState(!1);dt(()=>i(!0),[]);const s=n||o&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return s?N1.createPortal(C.jsx($e.div,{...r,ref:t}),s):null});Ov.displayName=bS;function CS(e,t){return w.useReducer((n,r)=>t[n][r]??n,e)}var Av=e=>{const{present:t,children:n}=e,r=kS(t),o=typeof n=="function"?n({present:r.isPresent}):w.Children.only(n),i=Ke(r.ref,PS(o));return typeof n=="function"||r.isPresent?w.cloneElement(o,{ref:i}):null};Av.displayName="Presence";function kS(e){const[t,n]=w.useState(),r=w.useRef({}),o=w.useRef(e),i=w.useRef("none"),s=e?"mounted":"unmounted",[a,f]=CS(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return w.useEffect(()=>{const u=gl(r.current);i.current=a==="mounted"?u:"none"},[a]),dt(()=>{const u=r.current,p=o.current;if(p!==e){const y=i.current,_=gl(u);e?f("MOUNT"):_==="none"||(u==null?void 0:u.display)==="none"?f("UNMOUNT"):f(p&&y!==_?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,f]),dt(()=>{if(t){const u=h=>{const _=gl(r.current).includes(h.animationName);h.target===t&&_&&Rr.flushSync(()=>f("ANIMATION_END"))},p=h=>{h.target===t&&(i.current=gl(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else f("ANIMATION_END")},[t,f]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:w.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function gl(e){return(e==null?void 0:e.animationName)||"none"}function PS(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function RS(e,t=globalThis==null?void 0:globalThis.document){const n=_n(e);w.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var TS="DismissableLayer",zu="dismissableLayer.update",NS="dismissableLayer.pointerDownOutside",OS="dismissableLayer.focusOutside",mp,Mv=w.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),of=w.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:s,onDismiss:a,...f}=e,u=w.useContext(Mv),[p,h]=w.useState(null),y=(p==null?void 0:p.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,_]=w.useState({}),E=Ke(t,N=>h(N)),x=Array.from(u.layers),[P]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=x.indexOf(P),m=p?x.indexOf(p):-1,S=u.layersWithOutsidePointerEventsDisabled.size>0,k=m>=v,R=jS(N=>{const M=N.target,G=[...u.branches].some(L=>L.contains(M));!k||G||(o==null||o(N),s==null||s(N),N.defaultPrevented||a==null||a())},y),A=DS(N=>{const M=N.target;[...u.branches].some(L=>L.contains(M))||(i==null||i(N),s==null||s(N),N.defaultPrevented||a==null||a())},y);return RS(N=>{m===u.layers.size-1&&(r==null||r(N),!N.defaultPrevented&&a&&(N.preventDefault(),a()))},y),w.useEffect(()=>{if(p)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(mp=y.body.style.pointerEvents,y.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(p)),u.layers.add(p),hp(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(y.body.style.pointerEvents=mp)}},[p,y,n,u]),w.useEffect(()=>()=>{p&&(u.layers.delete(p),u.layersWithOutsidePointerEventsDisabled.delete(p),hp())},[p,u]),w.useEffect(()=>{const N=()=>_({});return document.addEventListener(zu,N),()=>document.removeEventListener(zu,N)},[]),C.jsx($e.div,{...f,ref:E,style:{pointerEvents:S?k?"auto":"none":void 0,...e.style},onFocusCapture:be(e.onFocusCapture,A.onFocusCapture),onBlurCapture:be(e.onBlurCapture,A.onBlurCapture),onPointerDownCapture:be(e.onPointerDownCapture,R.onPointerDownCapture)})});of.displayName=TS;var AS="DismissableLayerBranch",MS=w.forwardRef((e,t)=>{const n=w.useContext(Mv),r=w.useRef(null),o=Ke(t,r);return w.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),C.jsx($e.div,{...e,ref:o})});MS.displayName=AS;function jS(e,t=globalThis==null?void 0:globalThis.document){const n=_n(e),r=w.useRef(!1),o=w.useRef(()=>{});return w.useEffect(()=>{const i=a=>{if(a.target&&!r.current){let f=function(){jv(NS,n,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=f,t.addEventListener("click",o.current,{once:!0})):f()}else t.removeEventListener("click",o.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function DS(e,t=globalThis==null?void 0:globalThis.document){const n=_n(e),r=w.useRef(!1);return w.useEffect(()=>{const o=i=>{i.target&&!r.current&&jv(OS,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function hp(){const e=new CustomEvent(zu);document.dispatchEvent(e)}function jv(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?mS(o,i):o.dispatchEvent(i)}var Ma,lf="HoverCard",[Dv,Rb]=Ls(lf,[zs]),$s=zs(),[IS,sf]=Dv(lf),Iv=e=>{const{__scopeHoverCard:t,children:n,open:r,defaultOpen:o,onOpenChange:i,openDelay:s=700,closeDelay:a=300}=e,f=$s(t),u=w.useRef(0),p=w.useRef(0),h=w.useRef(!1),y=w.useRef(!1),[_=!1,E]=Du({prop:r,defaultProp:o,onChange:i}),x=w.useCallback(()=>{clearTimeout(p.current),u.current=window.setTimeout(()=>E(!0),s)},[s,E]),P=w.useCallback(()=>{clearTimeout(u.current),!h.current&&!y.current&&(p.current=window.setTimeout(()=>E(!1),a))},[a,E]),v=w.useCallback(()=>E(!1),[E]);return w.useEffect(()=>()=>{clearTimeout(u.current),clearTimeout(p.current)},[]),C.jsx(IS,{scope:t,open:_,onOpenChange:E,onOpen:x,onClose:P,onDismiss:v,hasSelectionRef:h,isPointerDownOnContentRef:y,children:C.jsx(Pv,{...f,children:n})})};Iv.displayName=lf;var Lv="HoverCardTrigger",Fv=w.forwardRef((e,t)=>{const{__scopeHoverCard:n,...r}=e,o=sf(Lv,n),i=$s(n);return C.jsx(Rv,{asChild:!0,...i,children:C.jsx($e.a,{"data-state":o.open?"open":"closed",...r,ref:t,onPointerEnter:be(e.onPointerEnter,ms(o.onOpen)),onPointerLeave:be(e.onPointerLeave,ms(o.onClose)),onFocus:be(e.onFocus,o.onOpen),onBlur:be(e.onBlur,o.onClose),onTouchStart:be(e.onTouchStart,s=>s.preventDefault())})})});Fv.displayName=Lv;var LS="HoverCardPortal",[Tb,FS]=Dv(LS,{forceMount:void 0}),ps="HoverCardContent",zv=w.forwardRef((e,t)=>{const n=FS(ps,e.__scopeHoverCard),{forceMount:r=n.forceMount,...o}=e,i=sf(ps,e.__scopeHoverCard);return C.jsx(Av,{present:r||i.open,children:C.jsx(zS,{"data-state":i.open?"open":"closed",...o,onPointerEnter:be(e.onPointerEnter,ms(i.onOpen)),onPointerLeave:be(e.onPointerLeave,ms(i.onClose)),ref:t})})});zv.displayName=ps;var zS=w.forwardRef((e,t)=>{const{__scopeHoverCard:n,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:s,...a}=e,f=sf(ps,n),u=$s(n),p=w.useRef(null),h=Ke(t,p),[y,_]=w.useState(!1);return w.useEffect(()=>{if(y){const E=document.body;return Ma=E.style.userSelect||E.style.webkitUserSelect,E.style.userSelect="none",E.style.webkitUserSelect="none",()=>{E.style.userSelect=Ma,E.style.webkitUserSelect=Ma}}},[y]),w.useEffect(()=>{if(p.current){const E=()=>{_(!1),f.isPointerDownOnContentRef.current=!1,setTimeout(()=>{var P;((P=document.getSelection())==null?void 0:P.toString())!==""&&(f.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",E),()=>{document.removeEventListener("pointerup",E),f.hasSelectionRef.current=!1,f.isPointerDownOnContentRef.current=!1}}},[f.isPointerDownOnContentRef,f.hasSelectionRef]),w.useEffect(()=>{p.current&&BS(p.current).forEach(x=>x.setAttribute("tabindex","-1"))}),C.jsx(of,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:s,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:be(i,E=>{E.preventDefault()}),onDismiss:f.onDismiss,children:C.jsx(Tv,{...u,...a,onPointerDown:be(a.onPointerDown,E=>{E.currentTarget.contains(E.target)&&_(!0),f.hasSelectionRef.current=!1,f.isPointerDownOnContentRef.current=!0}),ref:h,style:{...a.style,userSelect:y?"text":void 0,WebkitUserSelect:y?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})}),$S="HoverCardArrow",HS=w.forwardRef((e,t)=>{const{__scopeHoverCard:n,...r}=e,o=$s(n);return C.jsx(Nv,{...o,...r,ref:t})});HS.displayName=$S;function ms(e){return t=>t.pointerType==="touch"?void 0:e()}function BS(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;n.nextNode();)t.push(n.currentNode);return t}var WS=Iv,US=Fv,$v=zv;function Hv(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;ta(i)))==null?void 0:s.classGroupId}const vp=/^\[(.+)\]$/;function GS(e){if(vp.test(e)){const t=vp.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}function KS(e){const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return YS(Object.entries(e.classGroups),n).forEach(([i,s])=>{$u(s,r,i,t)}),r}function $u(e,t,n,r){e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:gp(t,o);i.classGroupId=n;return}if(typeof o=="function"){if(QS(o)){$u(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,s])=>{$u(s,gp(t,i),n,r)})})}function gp(e,t){let n=e;return t.split(af).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function QS(e){return e.isThemeGetter}function YS(e,t){return t?e.map(([n,r])=>{const o=r.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([s,a])=>[t+s,a])):i);return[n,o]}):e}function XS(e){if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;function o(i,s){n.set(i,s),t++,t>e&&(t=0,r=n,n=new Map)}return{get(i){let s=n.get(i);if(s!==void 0)return s;if((s=r.get(i))!==void 0)return o(i,s),s},set(i,s){n.has(i)?n.set(i,s):o(i,s)}}}const Wv="!";function ZS(e){const t=e.separator,n=t.length===1,r=t[0],o=t.length;return function(s){const a=[];let f=0,u=0,p;for(let x=0;xu?p-u:void 0;return{modifiers:a,hasImportantModifier:y,baseClassName:_,maybePostfixModifierPosition:E}}}function JS(e){if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t}function eE(e){return{cache:XS(e.cacheSize),splitModifiers:ZS(e),...qS(e)}}const tE=/\s+/;function nE(e,t){const{splitModifiers:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,i=new Set;return e.trim().split(tE).map(s=>{const{modifiers:a,hasImportantModifier:f,baseClassName:u,maybePostfixModifierPosition:p}=n(s);let h=r(p?u.substring(0,p):u),y=!!p;if(!h){if(!p)return{isTailwindClass:!1,originalClassName:s};if(h=r(u),!h)return{isTailwindClass:!1,originalClassName:s};y=!1}const _=JS(a).join(":");return{isTailwindClass:!0,modifierId:f?_+Wv:_,classGroupId:h,originalClassName:s,hasPostfixModifier:y}}).reverse().filter(s=>{if(!s.isTailwindClass)return!0;const{modifierId:a,classGroupId:f,hasPostfixModifier:u}=s,p=a+f;return i.has(p)?!1:(i.add(p),o(f,u).forEach(h=>i.add(a+h)),!0)}).reverse().map(s=>s.originalClassName).join(" ")}function rE(){let e=0,t,n,r="";for(;eh(p),e());return n=eE(u),r=n.cache.get,o=n.cache.set,i=a,a(f)}function a(f){const u=r(f);if(u)return u;const p=nE(f,n);return o(f,p),p}return function(){return i(rE.apply(null,arguments))}}function Re(e){const t=n=>n[e]||[];return t.isThemeGetter=!0,t}const Vv=/^\[(?:([a-z-]+):)?(.+)\]$/i,iE=/^\d+\/\d+$/,lE=new Set(["px","full","screen"]),sE=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,aE=/\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$/,uE=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,cE=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,fE=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function dn(e){return vr(e)||lE.has(e)||iE.test(e)}function jn(e){return bo(e,"length",wE)}function vr(e){return!!e&&!Number.isNaN(Number(e))}function yl(e){return bo(e,"number",vr)}function qo(e){return!!e&&Number.isInteger(Number(e))}function dE(e){return e.endsWith("%")&&vr(e.slice(0,-1))}function ae(e){return Vv.test(e)}function Dn(e){return sE.test(e)}const pE=new Set(["length","size","percentage"]);function mE(e){return bo(e,pE,qv)}function hE(e){return bo(e,"position",qv)}const vE=new Set(["image","url"]);function gE(e){return bo(e,vE,SE)}function yE(e){return bo(e,"",xE)}function Go(){return!0}function bo(e,t,n){const r=Vv.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1}function wE(e){return aE.test(e)&&!uE.test(e)}function qv(){return!1}function xE(e){return cE.test(e)}function SE(e){return fE.test(e)}function EE(){const e=Re("colors"),t=Re("spacing"),n=Re("blur"),r=Re("brightness"),o=Re("borderColor"),i=Re("borderRadius"),s=Re("borderSpacing"),a=Re("borderWidth"),f=Re("contrast"),u=Re("grayscale"),p=Re("hueRotate"),h=Re("invert"),y=Re("gap"),_=Re("gradientColorStops"),E=Re("gradientColorStopPositions"),x=Re("inset"),P=Re("margin"),v=Re("opacity"),m=Re("padding"),S=Re("saturate"),k=Re("scale"),R=Re("sepia"),A=Re("skew"),N=Re("space"),M=Re("translate"),G=()=>["auto","contain","none"],L=()=>["auto","hidden","clip","visible","scroll"],V=()=>["auto",ae,t],U=()=>[ae,t],H=()=>["",dn,jn],B=()=>["auto",vr,ae],Q=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],se=()=>["solid","dashed","dotted","double","none"],J=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],I=()=>["start","end","center","between","around","evenly","stretch"],z=()=>["","0",ae],ee=()=>["auto","avoid","all","avoid-page","page","left","right","column"],oe=()=>[vr,yl],ie=()=>[vr,ae];return{cacheSize:500,separator:":",theme:{colors:[Go],spacing:[dn,jn],blur:["none","",Dn,ae],brightness:oe(),borderColor:[e],borderRadius:["none","","full",Dn,ae],borderSpacing:U(),borderWidth:H(),contrast:oe(),grayscale:z(),hueRotate:ie(),invert:z(),gap:U(),gradientColorStops:[e],gradientColorStopPositions:[dE,jn],inset:V(),margin:V(),opacity:oe(),padding:U(),saturate:oe(),scale:oe(),sepia:z(),skew:ie(),space:U(),translate:U()},classGroups:{aspect:[{aspect:["auto","square","video",ae]}],container:["container"],columns:[{columns:[Dn]}],"break-after":[{"break-after":ee()}],"break-before":[{"break-before":ee()}],"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:[...Q(),ae]}],overflow:[{overflow:L()}],"overflow-x":[{"overflow-x":L()}],"overflow-y":[{"overflow-y":L()}],overscroll:[{overscroll:G()}],"overscroll-x":[{"overscroll-x":G()}],"overscroll-y":[{"overscroll-y":G()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[x]}],"inset-x":[{"inset-x":[x]}],"inset-y":[{"inset-y":[x]}],start:[{start:[x]}],end:[{end:[x]}],top:[{top:[x]}],right:[{right:[x]}],bottom:[{bottom:[x]}],left:[{left:[x]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",qo,ae]}],basis:[{basis:V()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ae]}],grow:[{grow:z()}],shrink:[{shrink:z()}],order:[{order:["first","last","none",qo,ae]}],"grid-cols":[{"grid-cols":[Go]}],"col-start-end":[{col:["auto",{span:["full",qo,ae]},ae]}],"col-start":[{"col-start":B()}],"col-end":[{"col-end":B()}],"grid-rows":[{"grid-rows":[Go]}],"row-start-end":[{row:["auto",{span:[qo,ae]},ae]}],"row-start":[{"row-start":B()}],"row-end":[{"row-end":B()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ae]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ae]}],gap:[{gap:[y]}],"gap-x":[{"gap-x":[y]}],"gap-y":[{"gap-y":[y]}],"justify-content":[{justify:["normal",...I()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...I(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...I(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[m]}],px:[{px:[m]}],py:[{py:[m]}],ps:[{ps:[m]}],pe:[{pe:[m]}],pt:[{pt:[m]}],pr:[{pr:[m]}],pb:[{pb:[m]}],pl:[{pl:[m]}],m:[{m:[P]}],mx:[{mx:[P]}],my:[{my:[P]}],ms:[{ms:[P]}],me:[{me:[P]}],mt:[{mt:[P]}],mr:[{mr:[P]}],mb:[{mb:[P]}],ml:[{ml:[P]}],"space-x":[{"space-x":[N]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[N]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ae,t]}],"min-w":[{"min-w":[ae,t,"min","max","fit"]}],"max-w":[{"max-w":[ae,t,"none","full","min","max","fit","prose",{screen:[Dn]},Dn]}],h:[{h:[ae,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ae,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ae,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ae,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Dn,jn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",yl]}],"font-family":[{font:[Go]}],"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-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",ae]}],"line-clamp":[{"line-clamp":["none",vr,yl]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",dn,ae]}],"list-image":[{"list-image":["none",ae]}],"list-style-type":[{list:["none","disc","decimal",ae]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...se(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",dn,jn]}],"underline-offset":[{"underline-offset":["auto",dn,ae]}],"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:U()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ae]}],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",ae]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Q(),hE]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",mE]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},gE]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[E]}],"gradient-via-pos":[{via:[E]}],"gradient-to-pos":[{to:[E]}],"gradient-from":[{from:[_]}],"gradient-via":[{via:[_]}],"gradient-to":[{to:[_]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:[...se(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[v]}],"divide-style":[{divide:se()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[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:["",...se()]}],"outline-offset":[{"outline-offset":[dn,ae]}],"outline-w":[{outline:[dn,jn]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:H()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[dn,jn]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Dn,yE]}],"shadow-color":[{shadow:[Go]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":[...J(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":J()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[f]}],"drop-shadow":[{"drop-shadow":["","none",Dn,ae]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[p]}],invert:[{invert:[h]}],saturate:[{saturate:[S]}],sepia:[{sepia:[R]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[f]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[p]}],"backdrop-invert":[{"backdrop-invert":[h]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[S]}],"backdrop-sepia":[{"backdrop-sepia":[R]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ae]}],duration:[{duration:ie()}],ease:[{ease:["linear","in","out","in-out",ae]}],delay:[{delay:ie()}],animate:[{animate:["none","spin","ping","pulse","bounce",ae]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[k]}],"scale-x":[{"scale-x":[k]}],"scale-y":[{"scale-y":[k]}],rotate:[{rotate:[qo,ae]}],"translate-x":[{"translate-x":[M]}],"translate-y":[{"translate-y":[M]}],"skew-x":[{"skew-x":[A]}],"skew-y":[{"skew-y":[A]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ae]}],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",ae]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":U()}],"scroll-mx":[{"scroll-mx":U()}],"scroll-my":[{"scroll-my":U()}],"scroll-ms":[{"scroll-ms":U()}],"scroll-me":[{"scroll-me":U()}],"scroll-mt":[{"scroll-mt":U()}],"scroll-mr":[{"scroll-mr":U()}],"scroll-mb":[{"scroll-mb":U()}],"scroll-ml":[{"scroll-ml":U()}],"scroll-p":[{"scroll-p":U()}],"scroll-px":[{"scroll-px":U()}],"scroll-py":[{"scroll-py":U()}],"scroll-ps":[{"scroll-ps":U()}],"scroll-pe":[{"scroll-pe":U()}],"scroll-pt":[{"scroll-pt":U()}],"scroll-pr":[{"scroll-pr":U()}],"scroll-pb":[{"scroll-pb":U()}],"scroll-pl":[{"scroll-pl":U()}],"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",ae]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[dn,jn,yl]}],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-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"]}}}const _E=oE(EE);function Be(...e){return _E(VS(e))}const Gv=WS,Kv=US,uf=w.forwardRef(({className:e,align:t="start",side:n="bottom",sideOffset:r=4,...o},i)=>C.jsx($v,{ref:i,align:t,side:n,sideOffset:r,className:Be("z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground 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 text-balance break-words",e),...o}));uf.displayName=$v.displayName;const Qv=w.forwardRef(({className:e,...t},n)=>C.jsx("div",{className:"relative w-full overflow-auto",children:C.jsx("table",{ref:n,className:Be("w-full caption-bottom text-sm",e),...t})}));Qv.displayName="Table";const Yv=w.forwardRef(({className:e,...t},n)=>C.jsx("thead",{ref:n,className:Be("[&_tr]:border-b",e),...t}));Yv.displayName="TableHeader";const Xv=w.forwardRef(({className:e,...t},n)=>C.jsx("tbody",{ref:n,className:Be("[&_tr:last-child]:border-0",e),...t}));Xv.displayName="TableBody";const bE=w.forwardRef(({className:e,...t},n)=>C.jsx("tfoot",{ref:n,className:Be("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));bE.displayName="TableFooter";const Hu=w.forwardRef(({className:e,...t},n)=>C.jsx("tr",{ref:n,className:Be("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));Hu.displayName="TableRow";const Zv=w.forwardRef(({className:e,...t},n)=>C.jsx("th",{ref:n,className:Be("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...t}));Zv.displayName="TableHead";const Jv=w.forwardRef(({className:e,children:t,...n},r)=>C.jsx("td",{ref:r,className:Be("p-4 align-middle [&:has([role=checkbox])]:pr-0 truncate max-w-[200px] overflow-hidden text-ellipsis whitespace-nowrap",e),...n,children:C.jsxs(Gv,{children:[C.jsx(Kv,{asChild:!0,children:C.jsx("span",{className:"hover:underline cursor-pointer",children:t})}),C.jsx(uf,{side:"bottom",align:"start",children:t})]})}));Jv.displayName="TableCell";const CE=w.forwardRef(({className:e,...t},n)=>C.jsx("caption",{ref:n,className:Be("mt-4 text-sm text-muted-foreground",e),...t}));CE.displayName="TableCaption";var kE="Separator",yp="horizontal",PE=["horizontal","vertical"],eg=w.forwardRef((e,t)=>{const{decorative:n,orientation:r=yp,...o}=e,i=RE(r)?r:yp,a=n?{role:"none"}:{"aria-orientation":i==="vertical"?i:void 0,role:"separator"};return C.jsx($e.div,{"data-orientation":i,...a,...o,ref:t})});eg.displayName=kE;function RE(e){return PE.includes(e)}var tg=eg;const Bu=w.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},o)=>C.jsx(tg,{ref:o,decorative:n,orientation:t,className:Be("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...r}));Bu.displayName=tg.displayName;function ng(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;ttypeof e=="boolean"?"".concat(e):e===0?"0":e,xp=TE,rg=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return xp(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:i}=t,s=Object.keys(o).map(u=>{const p=n==null?void 0:n[u],h=i==null?void 0:i[u];if(p===null)return null;const y=wp(p)||wp(h);return o[u][y]}),a=n&&Object.entries(n).reduce((u,p)=>{let[h,y]=p;return y===void 0||(u[h]=y),u},{}),f=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,p)=>{let{class:h,className:y,..._}=p;return Object.entries(_).every(E=>{let[x,P]=E;return Array.isArray(P)?P.includes({...i,...a}[x]):{...i,...a}[x]===P})?[...u,h,y]:u},[]);return xp(e,s,f,n==null?void 0:n.class,n==null?void 0:n.className)},NE=rg("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),hs=w.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},i)=>{const s=r?go:"button";return C.jsx(s,{className:Be(NE({variant:t,size:n,className:e})),ref:i,...o})});hs.displayName="Button";/** * @license lucide-react v0.396.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const OE=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),ng=(...e)=>e.filter((t,n,r)=>!!t&&r.indexOf(t)===n).join(" ");/** + */const OE=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),og=(...e)=>e.filter((t,n,r)=>!!t&&r.indexOf(t)===n).join(" ");/** * @license lucide-react v0.396.0 - ISC * * This source code is licensed under the ISC license. @@ -70,27 +70,27 @@ Error generating stack: `+i.message+` * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const ME=y.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:s,...a},f)=>y.createElement("svg",{ref:f,...AE,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:ng("lucide",o),...a},[...s.map(([u,m])=>y.createElement(u,m)),...Array.isArray(i)?i:[i]]));/** + */const ME=w.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:s,...a},f)=>w.createElement("svg",{ref:f,...AE,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:og("lucide",o),...a},[...s.map(([u,p])=>w.createElement(u,p)),...Array.isArray(i)?i:[i]]));/** * @license lucide-react v0.396.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Rn=(e,t)=>{const n=y.forwardRef(({className:r,...o},i)=>y.createElement(ME,{ref:i,iconNode:t,className:ng(`lucide-${OE(e)}`,r),...o}));return n.displayName=`${e}`,n};/** + */const Rn=(e,t)=>{const n=w.forwardRef(({className:r,...o},i)=>w.createElement(ME,{ref:i,iconNode:t,className:og(`lucide-${OE(e)}`,r),...o}));return n.displayName=`${e}`,n};/** * @license lucide-react v0.396.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const DE=Rn("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** + */const jE=Rn("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** * @license lucide-react v0.396.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const rg=Rn("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** + */const ig=Rn("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** * @license lucide-react v0.396.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const jE=Rn("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/** + */const DE=Rn("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/** * @license lucide-react v0.396.0 - ISC * * This source code is licensed under the ISC license. @@ -120,7 +120,7 @@ Error generating stack: `+i.message+` * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const HE=Rn("Loader",[["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m16.2 7.8 2.9-2.9",key:"r700ao"}],["path",{d:"M18 12h4",key:"wj9ykh"}],["path",{d:"m16.2 16.2 2.9 2.9",key:"1bxg5t"}],["path",{d:"M12 18v4",key:"jadmvz"}],["path",{d:"m4.9 19.1 2.9-2.9",key:"bwix9q"}],["path",{d:"M2 12h4",key:"j09sii"}],["path",{d:"m4.9 4.9 2.9 2.9",key:"giyufr"}]]);function BE({page:e,setPage:t,rowsPerPage:n,rowCount:r}){const o=()=>{t(a=>a+n{t(a=>a>0?a-n:0)},s=Math.ceil(r/n);return k.jsx("section",{className:"flex items-center justify-center fixed bottom-2 left-0 right-0",children:k.jsxs("div",{className:"flex justify-between gap-2 bg-secondary p-[6px] border rounded",children:[k.jsx(hs,{onClick:i,disabled:e===0,children:k.jsx(jE,{className:"h-4 w-4"})}),k.jsxs("span",{className:"text-sm flex items-center justify-center",children:["Page ",Math.floor(e/n)+1," of ",s]}),k.jsx(hs,{onClick:o,disabled:e+n>=r,children:k.jsx(IE,{className:"h-4 w-4"})})]})})}function xp(e,[t,n]){return Math.min(n,Math.max(t,e))}function WE(e){const t=e+"CollectionProvider",[n,r]=Ls(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=_=>{const{scope:E,children:x}=_,P=qt.useRef(null),g=qt.useRef(new Map).current;return k.jsx(o,{scope:E,itemMap:g,collectionRef:P,children:x})};s.displayName=t;const a=e+"CollectionSlot",f=qt.forwardRef((_,E)=>{const{scope:x,children:P}=_,g=i(a,x),p=Ke(E,g.collectionRef);return k.jsx(go,{ref:p,children:P})});f.displayName=a;const u=e+"CollectionItemSlot",m="data-radix-collection-item",h=qt.forwardRef((_,E)=>{const{scope:x,children:P,...g}=_,p=qt.useRef(null),S=Ke(E,p),C=i(u,x);return qt.useEffect(()=>(C.itemMap.set(p,{ref:p,...g}),()=>void C.itemMap.delete(p))),k.jsx(go,{[m]:"",ref:S,children:P})});h.displayName=u;function w(_){const E=i(e+"CollectionConsumer",_);return qt.useCallback(()=>{const P=E.collectionRef.current;if(!P)return[];const g=Array.from(P.querySelectorAll(`[${m}]`));return Array.from(E.itemMap.values()).sort((C,T)=>g.indexOf(C.ref.current)-g.indexOf(T.ref.current))},[E.collectionRef,E.itemMap])}return[{Provider:s,Slot:f,ItemSlot:h},w,r]}var UE=y.createContext(void 0);function VE(e){const t=y.useContext(UE);return e||t||"ltr"}var Da=0;function qE(){y.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Sp()),document.body.insertAdjacentElement("beforeend",e[1]??Sp()),Da++,()=>{Da===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Da--}},[])}function Sp(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var ja="focusScope.autoFocusOnMount",Ia="focusScope.autoFocusOnUnmount",Ep={bubbles:!1,cancelable:!0},GE="FocusScope",og=y.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...s}=e,[a,f]=y.useState(null),u=_n(o),m=_n(i),h=y.useRef(null),w=Ke(t,x=>f(x)),_=y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;y.useEffect(()=>{if(r){let x=function(S){if(_.paused||!a)return;const C=S.target;a.contains(C)?h.current=C:In(h.current,{select:!0})},P=function(S){if(_.paused||!a)return;const C=S.relatedTarget;C!==null&&(a.contains(C)||In(h.current,{select:!0}))},g=function(S){if(document.activeElement===document.body)for(const T of S)T.removedNodes.length>0&&In(a)};document.addEventListener("focusin",x),document.addEventListener("focusout",P);const p=new MutationObserver(g);return a&&p.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",x),document.removeEventListener("focusout",P),p.disconnect()}}},[r,a,_.paused]),y.useEffect(()=>{if(a){bp.add(_);const x=document.activeElement;if(!a.contains(x)){const g=new CustomEvent(ja,Ep);a.addEventListener(ja,u),a.dispatchEvent(g),g.defaultPrevented||(KE(JE(ig(a)),{select:!0}),document.activeElement===x&&In(a))}return()=>{a.removeEventListener(ja,u),setTimeout(()=>{const g=new CustomEvent(Ia,Ep);a.addEventListener(Ia,m),a.dispatchEvent(g),g.defaultPrevented||In(x??document.body,{select:!0}),a.removeEventListener(Ia,m),bp.remove(_)},0)}}},[a,u,m,_]);const E=y.useCallback(x=>{if(!n&&!r||_.paused)return;const P=x.key==="Tab"&&!x.altKey&&!x.ctrlKey&&!x.metaKey,g=document.activeElement;if(P&&g){const p=x.currentTarget,[S,C]=QE(p);S&&C?!x.shiftKey&&g===C?(x.preventDefault(),n&&In(S,{select:!0})):x.shiftKey&&g===S&&(x.preventDefault(),n&&In(C,{select:!0})):g===p&&x.preventDefault()}},[n,r,_.paused]);return k.jsx($e.div,{tabIndex:-1,...s,ref:w,onKeyDown:E})});og.displayName=GE;function KE(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(In(r,{select:t}),document.activeElement!==n)return}function QE(e){const t=ig(e),n=_p(t,e),r=_p(t.reverse(),e);return[n,r]}function ig(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function _p(e,t){for(const n of e)if(!YE(n,{upTo:t}))return n}function YE(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 XE(e){return e instanceof HTMLInputElement&&"select"in e}function In(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&XE(e)&&t&&e.select()}}var bp=ZE();function ZE(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Cp(e,t),e.unshift(t)},remove(t){var n;e=Cp(e,t),(n=e[0])==null||n.resume()}}}function Cp(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function JE(e){return e.filter(t=>t.tagName!=="A")}var e2=g0.useId||(()=>{}),t2=0;function uf(e){const[t,n]=y.useState(e2());return dt(()=>{n(r=>r??String(t2++))},[e]),t?`radix-${t}`:""}function n2(e){const t=y.useRef({value:e,previous:e});return y.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var r2="VisuallyHidden",lg=y.forwardRef((e,t)=>k.jsx($e.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));lg.displayName=r2;var o2=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Fr=new WeakMap,wl=new WeakMap,xl={},La=0,sg=function(e){return e&&(e.host||sg(e.parentNode))},i2=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=sg(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},l2=function(e,t,n,r){var o=i2(t,Array.isArray(e)?e:[e]);xl[n]||(xl[n]=new WeakMap);var i=xl[n],s=[],a=new Set,f=new Set(o),u=function(h){!h||a.has(h)||(a.add(h),u(h.parentNode))};o.forEach(u);var m=function(h){!h||f.has(h)||Array.prototype.forEach.call(h.children,function(w){if(a.has(w))m(w);else try{var _=w.getAttribute(r),E=_!==null&&_!=="false",x=(Fr.get(w)||0)+1,P=(i.get(w)||0)+1;Fr.set(w,x),i.set(w,P),s.push(w),x===1&&E&&wl.set(w,!0),P===1&&w.setAttribute(n,"true"),E||w.setAttribute(r,"true")}catch(g){console.error("aria-hidden: cannot operate on ",w,g)}})};return m(t),a.clear(),La++,function(){s.forEach(function(h){var w=Fr.get(h)-1,_=i.get(h)-1;Fr.set(h,w),i.set(h,_),w||(wl.has(h)||h.removeAttribute(r),wl.delete(h)),_||h.removeAttribute(n)}),La--,La||(Fr=new WeakMap,Fr=new WeakMap,wl=new WeakMap,xl={})}},s2=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=o2(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),l2(r,o,n,"aria-hidden")):function(){return null}},on=function(){return on=Object.assign||function(t){for(var n,r=1,o=arguments.length;r0&&i[i.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return i}function Wu(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r"u")return _2;var t=b2(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},k2=fg(),lo="data-scroll-locked",P2=function(e,t,n,r){var o=e.left,i=e.top,s=e.right,a=e.gap;return n===void 0&&(n="margin"),` + */const HE=Rn("Loader",[["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m16.2 7.8 2.9-2.9",key:"r700ao"}],["path",{d:"M18 12h4",key:"wj9ykh"}],["path",{d:"m16.2 16.2 2.9 2.9",key:"1bxg5t"}],["path",{d:"M12 18v4",key:"jadmvz"}],["path",{d:"m4.9 19.1 2.9-2.9",key:"bwix9q"}],["path",{d:"M2 12h4",key:"j09sii"}],["path",{d:"m4.9 4.9 2.9 2.9",key:"giyufr"}]]);function BE({page:e,setPage:t,rowsPerPage:n,rowCount:r}){const o=()=>{t(a=>a+n{t(a=>a>0?a-n:0)},s=Math.ceil(r/n);return C.jsx("section",{className:"flex items-center justify-center fixed bottom-2 left-0 right-0",children:C.jsxs("div",{className:"flex justify-between gap-2 bg-secondary p-[6px] border rounded",children:[C.jsx(hs,{onClick:i,disabled:e===0,children:C.jsx(DE,{className:"h-4 w-4"})}),C.jsxs("span",{className:"text-sm flex items-center justify-center",children:["Page ",Math.floor(e/n)+1," of ",s]}),C.jsx(hs,{onClick:o,disabled:e+n>=r,children:C.jsx(IE,{className:"h-4 w-4"})})]})})}function Sp(e,[t,n]){return Math.min(n,Math.max(t,e))}function WE(e){const t=e+"CollectionProvider",[n,r]=Ls(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=_=>{const{scope:E,children:x}=_,P=qt.useRef(null),v=qt.useRef(new Map).current;return C.jsx(o,{scope:E,itemMap:v,collectionRef:P,children:x})};s.displayName=t;const a=e+"CollectionSlot",f=qt.forwardRef((_,E)=>{const{scope:x,children:P}=_,v=i(a,x),m=Ke(E,v.collectionRef);return C.jsx(go,{ref:m,children:P})});f.displayName=a;const u=e+"CollectionItemSlot",p="data-radix-collection-item",h=qt.forwardRef((_,E)=>{const{scope:x,children:P,...v}=_,m=qt.useRef(null),S=Ke(E,m),k=i(u,x);return qt.useEffect(()=>(k.itemMap.set(m,{ref:m,...v}),()=>void k.itemMap.delete(m))),C.jsx(go,{[p]:"",ref:S,children:P})});h.displayName=u;function y(_){const E=i(e+"CollectionConsumer",_);return qt.useCallback(()=>{const P=E.collectionRef.current;if(!P)return[];const v=Array.from(P.querySelectorAll(`[${p}]`));return Array.from(E.itemMap.values()).sort((k,R)=>v.indexOf(k.ref.current)-v.indexOf(R.ref.current))},[E.collectionRef,E.itemMap])}return[{Provider:s,Slot:f,ItemSlot:h},y,r]}var UE=w.createContext(void 0);function VE(e){const t=w.useContext(UE);return e||t||"ltr"}var ja=0;function qE(){w.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Ep()),document.body.insertAdjacentElement("beforeend",e[1]??Ep()),ja++,()=>{ja===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),ja--}},[])}function Ep(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var Da="focusScope.autoFocusOnMount",Ia="focusScope.autoFocusOnUnmount",_p={bubbles:!1,cancelable:!0},GE="FocusScope",lg=w.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...s}=e,[a,f]=w.useState(null),u=_n(o),p=_n(i),h=w.useRef(null),y=Ke(t,x=>f(x)),_=w.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;w.useEffect(()=>{if(r){let x=function(S){if(_.paused||!a)return;const k=S.target;a.contains(k)?h.current=k:In(h.current,{select:!0})},P=function(S){if(_.paused||!a)return;const k=S.relatedTarget;k!==null&&(a.contains(k)||In(h.current,{select:!0}))},v=function(S){if(document.activeElement===document.body)for(const R of S)R.removedNodes.length>0&&In(a)};document.addEventListener("focusin",x),document.addEventListener("focusout",P);const m=new MutationObserver(v);return a&&m.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",x),document.removeEventListener("focusout",P),m.disconnect()}}},[r,a,_.paused]),w.useEffect(()=>{if(a){Cp.add(_);const x=document.activeElement;if(!a.contains(x)){const v=new CustomEvent(Da,_p);a.addEventListener(Da,u),a.dispatchEvent(v),v.defaultPrevented||(KE(JE(sg(a)),{select:!0}),document.activeElement===x&&In(a))}return()=>{a.removeEventListener(Da,u),setTimeout(()=>{const v=new CustomEvent(Ia,_p);a.addEventListener(Ia,p),a.dispatchEvent(v),v.defaultPrevented||In(x??document.body,{select:!0}),a.removeEventListener(Ia,p),Cp.remove(_)},0)}}},[a,u,p,_]);const E=w.useCallback(x=>{if(!n&&!r||_.paused)return;const P=x.key==="Tab"&&!x.altKey&&!x.ctrlKey&&!x.metaKey,v=document.activeElement;if(P&&v){const m=x.currentTarget,[S,k]=QE(m);S&&k?!x.shiftKey&&v===k?(x.preventDefault(),n&&In(S,{select:!0})):x.shiftKey&&v===S&&(x.preventDefault(),n&&In(k,{select:!0})):v===m&&x.preventDefault()}},[n,r,_.paused]);return C.jsx($e.div,{tabIndex:-1,...s,ref:y,onKeyDown:E})});lg.displayName=GE;function KE(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(In(r,{select:t}),document.activeElement!==n)return}function QE(e){const t=sg(e),n=bp(t,e),r=bp(t.reverse(),e);return[n,r]}function sg(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function bp(e,t){for(const n of e)if(!YE(n,{upTo:t}))return n}function YE(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 XE(e){return e instanceof HTMLInputElement&&"select"in e}function In(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&XE(e)&&t&&e.select()}}var Cp=ZE();function ZE(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=kp(e,t),e.unshift(t)},remove(t){var n;e=kp(e,t),(n=e[0])==null||n.resume()}}}function kp(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function JE(e){return e.filter(t=>t.tagName!=="A")}var e2=w0.useId||(()=>{}),t2=0;function cf(e){const[t,n]=w.useState(e2());return dt(()=>{n(r=>r??String(t2++))},[e]),t?`radix-${t}`:""}function n2(e){const t=w.useRef({value:e,previous:e});return w.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var r2="VisuallyHidden",ag=w.forwardRef((e,t)=>C.jsx($e.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));ag.displayName=r2;var o2=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Fr=new WeakMap,wl=new WeakMap,xl={},La=0,ug=function(e){return e&&(e.host||ug(e.parentNode))},i2=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=ug(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},l2=function(e,t,n,r){var o=i2(t,Array.isArray(e)?e:[e]);xl[n]||(xl[n]=new WeakMap);var i=xl[n],s=[],a=new Set,f=new Set(o),u=function(h){!h||a.has(h)||(a.add(h),u(h.parentNode))};o.forEach(u);var p=function(h){!h||f.has(h)||Array.prototype.forEach.call(h.children,function(y){if(a.has(y))p(y);else try{var _=y.getAttribute(r),E=_!==null&&_!=="false",x=(Fr.get(y)||0)+1,P=(i.get(y)||0)+1;Fr.set(y,x),i.set(y,P),s.push(y),x===1&&E&&wl.set(y,!0),P===1&&y.setAttribute(n,"true"),E||y.setAttribute(r,"true")}catch(v){console.error("aria-hidden: cannot operate on ",y,v)}})};return p(t),a.clear(),La++,function(){s.forEach(function(h){var y=Fr.get(h)-1,_=i.get(h)-1;Fr.set(h,y),i.set(h,_),y||(wl.has(h)||h.removeAttribute(r),wl.delete(h)),_||h.removeAttribute(n)}),La--,La||(Fr=new WeakMap,Fr=new WeakMap,wl=new WeakMap,xl={})}},s2=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=o2(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),l2(r,o,n,"aria-hidden")):function(){return null}},on=function(){return on=Object.assign||function(t){for(var n,r=1,o=arguments.length;r0&&i[i.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return i}function Wu(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r"u")return _2;var t=b2(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},k2=pg(),lo="data-scroll-locked",P2=function(e,t,n,r){var o=e.left,i=e.top,s=e.right,a=e.gap;return n===void 0&&(n="margin"),` .`.concat(a2,` { overflow: hidden `).concat(r,`; padding-right: `).concat(a,"px ").concat(r,`; @@ -157,11 +157,11 @@ Error generating stack: `+i.message+` body[`).concat(lo,`] { `).concat(u2,": ").concat(a,`px; } -`)},Rp=function(){var e=parseInt(document.body.getAttribute(lo)||"0",10);return isFinite(e)?e:0},R2=function(){y.useEffect(function(){return document.body.setAttribute(lo,(Rp()+1).toString()),function(){var e=Rp()-1;e<=0?document.body.removeAttribute(lo):document.body.setAttribute(lo,e.toString())}},[])},T2=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;R2();var i=y.useMemo(function(){return C2(o)},[o]);return y.createElement(k2,{styles:P2(i,!t,o,n?"":"!important")})},Uu=!1;if(typeof window<"u")try{var Sl=Object.defineProperty({},"passive",{get:function(){return Uu=!0,!0}});window.addEventListener("test",Sl,Sl),window.removeEventListener("test",Sl,Sl)}catch{Uu=!1}var zr=Uu?{passive:!1}:!1,N2=function(e){return e.tagName==="TEXTAREA"},dg=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!N2(e)&&n[t]==="visible")},O2=function(e){return dg(e,"overflowY")},A2=function(e){return dg(e,"overflowX")},Tp=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=pg(e,r);if(o){var i=mg(e,r),s=i[1],a=i[2];if(s>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},M2=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},D2=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},pg=function(e,t){return e==="v"?O2(t):A2(t)},mg=function(e,t){return e==="v"?M2(t):D2(t)},j2=function(e,t){return e==="h"&&t==="rtl"?-1:1},I2=function(e,t,n,r,o){var i=j2(e,window.getComputedStyle(t).direction),s=i*r,a=n.target,f=t.contains(a),u=!1,m=s>0,h=0,w=0;do{var _=mg(e,a),E=_[0],x=_[1],P=_[2],g=x-P-i*E;(E||g)&&pg(e,a)&&(h+=g,w+=E),a instanceof ShadowRoot?a=a.host:a=a.parentNode}while(!f&&a!==document.body||f&&(t.contains(a)||t===a));return(m&&(Math.abs(h)<1||!o)||!m&&(Math.abs(w)<1||!o))&&(u=!0),u},El=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Np=function(e){return[e.deltaX,e.deltaY]},Op=function(e){return e&&"current"in e?e.current:e},L2=function(e,t){return e[0]===t[0]&&e[1]===t[1]},F2=function(e){return` +`)},Tp=function(){var e=parseInt(document.body.getAttribute(lo)||"0",10);return isFinite(e)?e:0},R2=function(){w.useEffect(function(){return document.body.setAttribute(lo,(Tp()+1).toString()),function(){var e=Tp()-1;e<=0?document.body.removeAttribute(lo):document.body.setAttribute(lo,e.toString())}},[])},T2=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;R2();var i=w.useMemo(function(){return C2(o)},[o]);return w.createElement(k2,{styles:P2(i,!t,o,n?"":"!important")})},Uu=!1;if(typeof window<"u")try{var Sl=Object.defineProperty({},"passive",{get:function(){return Uu=!0,!0}});window.addEventListener("test",Sl,Sl),window.removeEventListener("test",Sl,Sl)}catch{Uu=!1}var zr=Uu?{passive:!1}:!1,N2=function(e){return e.tagName==="TEXTAREA"},mg=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!N2(e)&&n[t]==="visible")},O2=function(e){return mg(e,"overflowY")},A2=function(e){return mg(e,"overflowX")},Np=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=hg(e,r);if(o){var i=vg(e,r),s=i[1],a=i[2];if(s>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},M2=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},j2=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},hg=function(e,t){return e==="v"?O2(t):A2(t)},vg=function(e,t){return e==="v"?M2(t):j2(t)},D2=function(e,t){return e==="h"&&t==="rtl"?-1:1},I2=function(e,t,n,r,o){var i=D2(e,window.getComputedStyle(t).direction),s=i*r,a=n.target,f=t.contains(a),u=!1,p=s>0,h=0,y=0;do{var _=vg(e,a),E=_[0],x=_[1],P=_[2],v=x-P-i*E;(E||v)&&hg(e,a)&&(h+=v,y+=E),a instanceof ShadowRoot?a=a.host:a=a.parentNode}while(!f&&a!==document.body||f&&(t.contains(a)||t===a));return(p&&(Math.abs(h)<1||!o)||!p&&(Math.abs(y)<1||!o))&&(u=!0),u},El=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Op=function(e){return[e.deltaX,e.deltaY]},Ap=function(e){return e&&"current"in e?e.current:e},L2=function(e,t){return e[0]===t[0]&&e[1]===t[1]},F2=function(e){return` .block-interactivity-`.concat(e,` {pointer-events: none;} .allow-interactivity-`).concat(e,` {pointer-events: all;} -`)},z2=0,$r=[];function $2(e){var t=y.useRef([]),n=y.useRef([0,0]),r=y.useRef(),o=y.useState(z2++)[0],i=y.useState(fg)[0],s=y.useRef(e);y.useEffect(function(){s.current=e},[e]),y.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var x=Wu([e.lockRef.current],(e.shards||[]).map(Op),!0).filter(Boolean);return x.forEach(function(P){return P.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),x.forEach(function(P){return P.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=y.useCallback(function(x,P){if("touches"in x&&x.touches.length===2)return!s.current.allowPinchZoom;var g=El(x),p=n.current,S="deltaX"in x?x.deltaX:p[0]-g[0],C="deltaY"in x?x.deltaY:p[1]-g[1],T,A=x.target,N=Math.abs(S)>Math.abs(C)?"h":"v";if("touches"in x&&N==="h"&&A.type==="range")return!1;var D=Tp(N,A);if(!D)return!0;if(D?T=N:(T=N==="v"?"h":"v",D=Tp(N,A)),!D)return!1;if(!r.current&&"changedTouches"in x&&(S||C)&&(r.current=T),!T)return!0;var G=r.current||T;return I2(G,P,x,G==="h"?S:C,!0)},[]),f=y.useCallback(function(x){var P=x;if(!(!$r.length||$r[$r.length-1]!==i)){var g="deltaY"in P?Np(P):El(P),p=t.current.filter(function(T){return T.name===P.type&&(T.target===P.target||P.target===T.shadowParent)&&L2(T.delta,g)})[0];if(p&&p.should){P.cancelable&&P.preventDefault();return}if(!p){var S=(s.current.shards||[]).map(Op).filter(Boolean).filter(function(T){return T.contains(P.target)}),C=S.length>0?a(P,S[0]):!s.current.noIsolation;C&&P.cancelable&&P.preventDefault()}}},[]),u=y.useCallback(function(x,P,g,p){var S={name:x,delta:P,target:g,should:p,shadowParent:H2(g)};t.current.push(S),setTimeout(function(){t.current=t.current.filter(function(C){return C!==S})},1)},[]),m=y.useCallback(function(x){n.current=El(x),r.current=void 0},[]),h=y.useCallback(function(x){u(x.type,Np(x),x.target,a(x,e.lockRef.current))},[]),w=y.useCallback(function(x){u(x.type,El(x),x.target,a(x,e.lockRef.current))},[]);y.useEffect(function(){return $r.push(i),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:w}),document.addEventListener("wheel",f,zr),document.addEventListener("touchmove",f,zr),document.addEventListener("touchstart",m,zr),function(){$r=$r.filter(function(x){return x!==i}),document.removeEventListener("wheel",f,zr),document.removeEventListener("touchmove",f,zr),document.removeEventListener("touchstart",m,zr)}},[]);var _=e.removeScrollBar,E=e.inert;return y.createElement(y.Fragment,null,E?y.createElement(i,{styles:F2(o)}):null,_?y.createElement(T2,{gapMode:e.gapMode}):null)}function H2(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const B2=v2(cg,$2);var hg=y.forwardRef(function(e,t){return y.createElement(Hs,on({},e,{ref:t,sideCar:B2}))});hg.classNames=Hs.classNames;var W2=[" ","Enter","ArrowUp","ArrowDown"],U2=[" ","Enter"],Ii="Select",[Bs,Ws,V2]=WE(Ii),[Po,Nb]=Ls(Ii,[V2,zs]),Us=zs(),[q2,or]=Po(Ii),[G2,K2]=Po(Ii),vg=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:i,value:s,defaultValue:a,onValueChange:f,dir:u,name:m,autoComplete:h,disabled:w,required:_}=e,E=Us(t),[x,P]=y.useState(null),[g,p]=y.useState(null),[S,C]=y.useState(!1),T=VE(u),[A=!1,N]=ju({prop:r,defaultProp:o,onChange:i}),[D,G]=ju({prop:s,defaultProp:a,onChange:f}),F=y.useRef(null),V=x?!!x.closest("form"):!0,[U,H]=y.useState(new Set),B=Array.from(U).map(Q=>Q.props.value).join(";");return k.jsx(kv,{...E,children:k.jsxs(q2,{required:_,scope:t,trigger:x,onTriggerChange:P,valueNode:g,onValueNodeChange:p,valueNodeHasChildren:S,onValueNodeHasChildrenChange:C,contentId:uf(),value:D,onValueChange:G,open:A,onOpenChange:N,dir:T,triggerPointerDownPosRef:F,disabled:w,children:[k.jsx(Bs.Provider,{scope:t,children:k.jsx(G2,{scope:e.__scopeSelect,onNativeOptionAdd:y.useCallback(Q=>{H(se=>new Set(se).add(Q))},[]),onNativeOptionRemove:y.useCallback(Q=>{H(se=>{const J=new Set(se);return J.delete(Q),J})},[]),children:n})}),V?k.jsxs(Bg,{"aria-hidden":!0,required:_,tabIndex:-1,name:m,autoComplete:h,value:D,onChange:Q=>G(Q.target.value),disabled:w,children:[D===void 0?k.jsx("option",{value:""}):null,Array.from(U)]},B):null]})})};vg.displayName=Ii;var gg="SelectTrigger",yg=y.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,i=Us(n),s=or(gg,n),a=s.disabled||r,f=Ke(t,s.onTriggerChange),u=Ws(n),[m,h,w]=Wg(E=>{const x=u().filter(p=>!p.disabled),P=x.find(p=>p.value===s.value),g=Ug(x,E,P);g!==void 0&&s.onValueChange(g.value)}),_=()=>{a||(s.onOpenChange(!0),w())};return k.jsx(Pv,{asChild:!0,...i,children:k.jsx($e.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":Hg(s.value)?"":void 0,...o,ref:f,onClick:be(o.onClick,E=>{E.currentTarget.focus()}),onPointerDown:be(o.onPointerDown,E=>{const x=E.target;x.hasPointerCapture(E.pointerId)&&x.releasePointerCapture(E.pointerId),E.button===0&&E.ctrlKey===!1&&(_(),s.triggerPointerDownPosRef.current={x:Math.round(E.pageX),y:Math.round(E.pageY)},E.preventDefault())}),onKeyDown:be(o.onKeyDown,E=>{const x=m.current!=="";!(E.ctrlKey||E.altKey||E.metaKey)&&E.key.length===1&&h(E.key),!(x&&E.key===" ")&&W2.includes(E.key)&&(_(),E.preventDefault())})})})});yg.displayName=gg;var wg="SelectValue",xg=y.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:i,placeholder:s="",...a}=e,f=or(wg,n),{onValueNodeHasChildrenChange:u}=f,m=i!==void 0,h=Ke(t,f.onValueNodeChange);return dt(()=>{u(m)},[u,m]),k.jsx($e.span,{...a,ref:h,style:{pointerEvents:"none"},children:Hg(f.value)?k.jsx(k.Fragment,{children:s}):i})});xg.displayName=wg;var Q2="SelectIcon",Sg=y.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return k.jsx($e.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});Sg.displayName=Q2;var Y2="SelectPortal",Eg=e=>k.jsx(Nv,{asChild:!0,...e});Eg.displayName=Y2;var Cr="SelectContent",_g=y.forwardRef((e,t)=>{const n=or(Cr,e.__scopeSelect),[r,o]=y.useState();if(dt(()=>{o(new DocumentFragment)},[]),!n.open){const i=r;return i?Rr.createPortal(k.jsx(bg,{scope:e.__scopeSelect,children:k.jsx(Bs.Slot,{scope:e.__scopeSelect,children:k.jsx("div",{children:e.children})})}),i):null}return k.jsx(Cg,{...e,ref:t})});_g.displayName=Cr;var mn=10,[bg,ir]=Po(Cr),X2="SelectContentImpl",Cg=y.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:i,onPointerDownOutside:s,side:a,sideOffset:f,align:u,alignOffset:m,arrowPadding:h,collisionBoundary:w,collisionPadding:_,sticky:E,hideWhenDetached:x,avoidCollisions:P,...g}=e,p=or(Cr,n),[S,C]=y.useState(null),[T,A]=y.useState(null),N=Ke(t,Y=>C(Y)),[D,G]=y.useState(null),[F,V]=y.useState(null),U=Ws(n),[H,B]=y.useState(!1),Q=y.useRef(!1);y.useEffect(()=>{if(S)return s2(S)},[S]),qE();const se=y.useCallback(Y=>{const[we,...Le]=U().map(de=>de.ref.current),[ve]=Le.slice(-1),me=document.activeElement;for(const de of Y)if(de===me||(de==null||de.scrollIntoView({block:"nearest"}),de===we&&T&&(T.scrollTop=0),de===ve&&T&&(T.scrollTop=T.scrollHeight),de==null||de.focus(),document.activeElement!==me))return},[U,T]),J=y.useCallback(()=>se([D,S]),[se,D,S]);y.useEffect(()=>{H&&J()},[H,J]);const{onOpenChange:I,triggerPointerDownPosRef:z}=p;y.useEffect(()=>{if(S){let Y={x:0,y:0};const we=ve=>{var me,de;Y={x:Math.abs(Math.round(ve.pageX)-(((me=z.current)==null?void 0:me.x)??0)),y:Math.abs(Math.round(ve.pageY)-(((de=z.current)==null?void 0:de.y)??0))}},Le=ve=>{Y.x<=10&&Y.y<=10?ve.preventDefault():S.contains(ve.target)||I(!1),document.removeEventListener("pointermove",we),z.current=null};return z.current!==null&&(document.addEventListener("pointermove",we),document.addEventListener("pointerup",Le,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",we),document.removeEventListener("pointerup",Le,{capture:!0})}}},[S,I,z]),y.useEffect(()=>{const Y=()=>I(!1);return window.addEventListener("blur",Y),window.addEventListener("resize",Y),()=>{window.removeEventListener("blur",Y),window.removeEventListener("resize",Y)}},[I]);const[ee,oe]=Wg(Y=>{const we=U().filter(me=>!me.disabled),Le=we.find(me=>me.ref.current===document.activeElement),ve=Ug(we,Y,Le);ve&&setTimeout(()=>ve.ref.current.focus())}),ie=y.useCallback((Y,we,Le)=>{const ve=!Q.current&&!Le;(p.value!==void 0&&p.value===we||ve)&&(G(Y),ve&&(Q.current=!0))},[p.value]),Ve=y.useCallback(()=>S==null?void 0:S.focus(),[S]),he=y.useCallback((Y,we,Le)=>{const ve=!Q.current&&!Le;(p.value!==void 0&&p.value===we||ve)&&V(Y)},[p.value]),ot=r==="popper"?Vu:kg,Ee=ot===Vu?{side:a,sideOffset:f,align:u,alignOffset:m,arrowPadding:h,collisionBoundary:w,collisionPadding:_,sticky:E,hideWhenDetached:x,avoidCollisions:P}:{};return k.jsx(bg,{scope:n,content:S,viewport:T,onViewportChange:A,itemRefCallback:ie,selectedItem:D,onItemLeave:Ve,itemTextRefCallback:he,focusSelectedItem:J,selectedItemText:F,position:r,isPositioned:H,searchRef:ee,children:k.jsx(hg,{as:go,allowPinchZoom:!0,children:k.jsx(og,{asChild:!0,trapped:p.open,onMountAutoFocus:Y=>{Y.preventDefault()},onUnmountAutoFocus:be(o,Y=>{var we;(we=p.trigger)==null||we.focus({preventScroll:!0}),Y.preventDefault()}),children:k.jsx(of,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:Y=>Y.preventDefault(),onDismiss:()=>p.onOpenChange(!1),children:k.jsx(ot,{role:"listbox",id:p.contentId,"data-state":p.open?"open":"closed",dir:p.dir,onContextMenu:Y=>Y.preventDefault(),...g,...Ee,onPlaced:()=>B(!0),ref:N,style:{display:"flex",flexDirection:"column",outline:"none",...g.style},onKeyDown:be(g.onKeyDown,Y=>{const we=Y.ctrlKey||Y.altKey||Y.metaKey;if(Y.key==="Tab"&&Y.preventDefault(),!we&&Y.key.length===1&&oe(Y.key),["ArrowUp","ArrowDown","Home","End"].includes(Y.key)){let ve=U().filter(me=>!me.disabled).map(me=>me.ref.current);if(["ArrowUp","End"].includes(Y.key)&&(ve=ve.slice().reverse()),["ArrowUp","ArrowDown"].includes(Y.key)){const me=Y.target,de=ve.indexOf(me);ve=ve.slice(de+1)}setTimeout(()=>se(ve)),Y.preventDefault()}})})})})})})});Cg.displayName=X2;var Z2="SelectItemAlignedPosition",kg=y.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,i=or(Cr,n),s=ir(Cr,n),[a,f]=y.useState(null),[u,m]=y.useState(null),h=Ke(t,N=>m(N)),w=Ws(n),_=y.useRef(!1),E=y.useRef(!0),{viewport:x,selectedItem:P,selectedItemText:g,focusSelectedItem:p}=s,S=y.useCallback(()=>{if(i.trigger&&i.valueNode&&a&&u&&x&&P&&g){const N=i.trigger.getBoundingClientRect(),D=u.getBoundingClientRect(),G=i.valueNode.getBoundingClientRect(),F=g.getBoundingClientRect();if(i.dir!=="rtl"){const me=F.left-D.left,de=G.left-me,K=N.left-de,ce=N.width+K,Ot=Math.max(ce,D.width),Qe=window.innerWidth-mn,Ye=xp(de,[mn,Qe-Ot]);a.style.minWidth=ce+"px",a.style.left=Ye+"px"}else{const me=D.right-F.right,de=window.innerWidth-G.right-me,K=window.innerWidth-N.right-de,ce=N.width+K,Ot=Math.max(ce,D.width),Qe=window.innerWidth-mn,Ye=xp(de,[mn,Qe-Ot]);a.style.minWidth=ce+"px",a.style.right=Ye+"px"}const V=w(),U=window.innerHeight-mn*2,H=x.scrollHeight,B=window.getComputedStyle(u),Q=parseInt(B.borderTopWidth,10),se=parseInt(B.paddingTop,10),J=parseInt(B.borderBottomWidth,10),I=parseInt(B.paddingBottom,10),z=Q+se+H+I+J,ee=Math.min(P.offsetHeight*5,z),oe=window.getComputedStyle(x),ie=parseInt(oe.paddingTop,10),Ve=parseInt(oe.paddingBottom,10),he=N.top+N.height/2-mn,ot=U-he,Ee=P.offsetHeight/2,Y=P.offsetTop+Ee,we=Q+se+Y,Le=z-we;if(we<=he){const me=P===V[V.length-1].ref.current;a.style.bottom="0px";const de=u.clientHeight-x.offsetTop-x.offsetHeight,K=Math.max(ot,Ee+(me?Ve:0)+de+J),ce=we+K;a.style.height=ce+"px"}else{const me=P===V[0].ref.current;a.style.top="0px";const K=Math.max(he,Q+x.offsetTop+(me?ie:0)+Ee)+Le;a.style.height=K+"px",x.scrollTop=we-he+x.offsetTop}a.style.margin=`${mn}px 0`,a.style.minHeight=ee+"px",a.style.maxHeight=U+"px",r==null||r(),requestAnimationFrame(()=>_.current=!0)}},[w,i.trigger,i.valueNode,a,u,x,P,g,i.dir,r]);dt(()=>S(),[S]);const[C,T]=y.useState();dt(()=>{u&&T(window.getComputedStyle(u).zIndex)},[u]);const A=y.useCallback(N=>{N&&E.current===!0&&(S(),p==null||p(),E.current=!1)},[S,p]);return k.jsx(e_,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:_,onScrollButtonChange:A,children:k.jsx("div",{ref:f,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:C},children:k.jsx($e.div,{...o,ref:h,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});kg.displayName=Z2;var J2="SelectPopperPosition",Vu=y.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=mn,...i}=e,s=Us(n);return k.jsx(Rv,{...s,...i,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Vu.displayName=J2;var[e_,cf]=Po(Cr,{}),qu="SelectViewport",Pg=y.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,i=ir(qu,n),s=cf(qu,n),a=Ke(t,i.onViewportChange),f=y.useRef(0);return k.jsxs(k.Fragment,{children:[k.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),k.jsx(Bs.Slot,{scope:n,children:k.jsx($e.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:a,style:{position:"relative",flex:1,overflow:"auto",...o.style},onScroll:be(o.onScroll,u=>{const m=u.currentTarget,{contentWrapper:h,shouldExpandOnScrollRef:w}=s;if(w!=null&&w.current&&h){const _=Math.abs(f.current-m.scrollTop);if(_>0){const E=window.innerHeight-mn*2,x=parseFloat(h.style.minHeight),P=parseFloat(h.style.height),g=Math.max(x,P);if(g0?C:0,h.style.justifyContent="flex-end")}}}f.current=m.scrollTop})})})]})});Pg.displayName=qu;var Rg="SelectGroup",[t_,n_]=Po(Rg),Tg=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=uf();return k.jsx(t_,{scope:n,id:o,children:k.jsx($e.div,{role:"group","aria-labelledby":o,...r,ref:t})})});Tg.displayName=Rg;var Ng="SelectLabel",Og=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=n_(Ng,n);return k.jsx($e.div,{id:o.id,...r,ref:t})});Og.displayName=Ng;var vs="SelectItem",[r_,Ag]=Po(vs),Mg=y.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:i,...s}=e,a=or(vs,n),f=ir(vs,n),u=a.value===r,[m,h]=y.useState(i??""),[w,_]=y.useState(!1),E=Ke(t,g=>{var p;return(p=f.itemRefCallback)==null?void 0:p.call(f,g,r,o)}),x=uf(),P=()=>{o||(a.onValueChange(r),a.onOpenChange(!1))};if(r==="")throw new Error("A must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return k.jsx(r_,{scope:n,value:r,disabled:o,textId:x,isSelected:u,onItemTextChange:y.useCallback(g=>{h(p=>p||((g==null?void 0:g.textContent)??"").trim())},[]),children:k.jsx(Bs.ItemSlot,{scope:n,value:r,disabled:o,textValue:m,children:k.jsx($e.div,{role:"option","aria-labelledby":x,"data-highlighted":w?"":void 0,"aria-selected":u&&w,"data-state":u?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...s,ref:E,onFocus:be(s.onFocus,()=>_(!0)),onBlur:be(s.onBlur,()=>_(!1)),onPointerUp:be(s.onPointerUp,P),onPointerMove:be(s.onPointerMove,g=>{var p;o?(p=f.onItemLeave)==null||p.call(f):g.currentTarget.focus({preventScroll:!0})}),onPointerLeave:be(s.onPointerLeave,g=>{var p;g.currentTarget===document.activeElement&&((p=f.onItemLeave)==null||p.call(f))}),onKeyDown:be(s.onKeyDown,g=>{var S;((S=f.searchRef)==null?void 0:S.current)!==""&&g.key===" "||(U2.includes(g.key)&&P(),g.key===" "&&g.preventDefault())})})})})});Mg.displayName=vs;var Zo="SelectItemText",Dg=y.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...i}=e,s=or(Zo,n),a=ir(Zo,n),f=Ag(Zo,n),u=K2(Zo,n),[m,h]=y.useState(null),w=Ke(t,g=>h(g),f.onItemTextChange,g=>{var p;return(p=a.itemTextRefCallback)==null?void 0:p.call(a,g,f.value,f.disabled)}),_=m==null?void 0:m.textContent,E=y.useMemo(()=>k.jsx("option",{value:f.value,disabled:f.disabled,children:_},f.value),[f.disabled,f.value,_]),{onNativeOptionAdd:x,onNativeOptionRemove:P}=u;return dt(()=>(x(E),()=>P(E)),[x,P,E]),k.jsxs(k.Fragment,{children:[k.jsx($e.span,{id:f.textId,...i,ref:w}),f.isSelected&&s.valueNode&&!s.valueNodeHasChildren?Rr.createPortal(i.children,s.valueNode):null]})});Dg.displayName=Zo;var jg="SelectItemIndicator",Ig=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return Ag(jg,n).isSelected?k.jsx($e.span,{"aria-hidden":!0,...r,ref:t}):null});Ig.displayName=jg;var Gu="SelectScrollUpButton",Lg=y.forwardRef((e,t)=>{const n=ir(Gu,e.__scopeSelect),r=cf(Gu,e.__scopeSelect),[o,i]=y.useState(!1),s=Ke(t,r.onScrollButtonChange);return dt(()=>{if(n.viewport&&n.isPositioned){let a=function(){const u=f.scrollTop>0;i(u)};const f=n.viewport;return a(),f.addEventListener("scroll",a),()=>f.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?k.jsx(zg,{...e,ref:s,onAutoScroll:()=>{const{viewport:a,selectedItem:f}=n;a&&f&&(a.scrollTop=a.scrollTop-f.offsetHeight)}}):null});Lg.displayName=Gu;var Ku="SelectScrollDownButton",Fg=y.forwardRef((e,t)=>{const n=ir(Ku,e.__scopeSelect),r=cf(Ku,e.__scopeSelect),[o,i]=y.useState(!1),s=Ke(t,r.onScrollButtonChange);return dt(()=>{if(n.viewport&&n.isPositioned){let a=function(){const u=f.scrollHeight-f.clientHeight,m=Math.ceil(f.scrollTop)f.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?k.jsx(zg,{...e,ref:s,onAutoScroll:()=>{const{viewport:a,selectedItem:f}=n;a&&f&&(a.scrollTop=a.scrollTop+f.offsetHeight)}}):null});Fg.displayName=Ku;var zg=y.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,i=ir("SelectScrollButton",n),s=y.useRef(null),a=Ws(n),f=y.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return y.useEffect(()=>()=>f(),[f]),dt(()=>{var m;const u=a().find(h=>h.ref.current===document.activeElement);(m=u==null?void 0:u.ref.current)==null||m.scrollIntoView({block:"nearest"})},[a]),k.jsx($e.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:be(o.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(r,50))}),onPointerMove:be(o.onPointerMove,()=>{var u;(u=i.onItemLeave)==null||u.call(i),s.current===null&&(s.current=window.setInterval(r,50))}),onPointerLeave:be(o.onPointerLeave,()=>{f()})})}),o_="SelectSeparator",$g=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return k.jsx($e.div,{"aria-hidden":!0,...r,ref:t})});$g.displayName=o_;var Qu="SelectArrow",i_=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Us(n),i=or(Qu,n),s=ir(Qu,n);return i.open&&s.position==="popper"?k.jsx(Tv,{...o,...r,ref:t}):null});i_.displayName=Qu;function Hg(e){return e===""||e===void 0}var Bg=y.forwardRef((e,t)=>{const{value:n,...r}=e,o=y.useRef(null),i=Ke(t,o),s=n2(n);return y.useEffect(()=>{const a=o.current,f=window.HTMLSelectElement.prototype,m=Object.getOwnPropertyDescriptor(f,"value").set;if(s!==n&&m){const h=new Event("change",{bubbles:!0});m.call(a,n),a.dispatchEvent(h)}},[s,n]),k.jsx(lg,{asChild:!0,children:k.jsx("select",{...r,ref:i,defaultValue:n})})});Bg.displayName="BubbleSelect";function Wg(e){const t=_n(e),n=y.useRef(""),r=y.useRef(0),o=y.useCallback(s=>{const a=n.current+s;t(a),function f(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>f(""),1e3))}(a)},[t]),i=y.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return y.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,i]}function Ug(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let s=l_(e,Math.max(i,0));o.length===1&&(s=s.filter(u=>u!==n));const f=s.find(u=>u.textValue.toLowerCase().startsWith(o.toLowerCase()));return f!==n?f:void 0}function l_(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var s_=vg,Vg=yg,a_=xg,u_=Sg,c_=Eg,qg=_g,f_=Pg,d_=Tg,Gg=Og,Kg=Mg,p_=Dg,m_=Ig,Qg=Lg,Yg=Fg,Xg=$g;const h_=s_,v_=d_,g_=a_,Zg=y.forwardRef(({className:e,children:t,...n},r)=>k.jsxs(Vg,{ref:r,className:Be("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,k.jsx(u_,{asChild:!0,children:k.jsx(rg,{className:"h-4 w-4 opacity-50"})})]}));Zg.displayName=Vg.displayName;const Jg=y.forwardRef(({className:e,...t},n)=>k.jsx(Qg,{ref:n,className:Be("flex cursor-default items-center justify-center py-1",e),...t,children:k.jsx(LE,{className:"h-4 w-4"})}));Jg.displayName=Qg.displayName;const ey=y.forwardRef(({className:e,...t},n)=>k.jsx(Yg,{ref:n,className:Be("flex cursor-default items-center justify-center py-1",e),...t,children:k.jsx(rg,{className:"h-4 w-4"})}));ey.displayName=Yg.displayName;const ty=y.forwardRef(({className:e,children:t,position:n="popper",...r},o)=>k.jsx(c_,{children:k.jsxs(qg,{ref:o,className:Be("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground 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",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[k.jsx(Jg,{}),k.jsx(f_,{className:Be("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),k.jsx(ey,{})]})}));ty.displayName=qg.displayName;const ny=y.forwardRef(({className:e,...t},n)=>k.jsx(Gg,{ref:n,className:Be("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));ny.displayName=Gg.displayName;const ry=y.forwardRef(({className:e,children:t,...n},r)=>k.jsxs(Kg,{ref:r,className:Be("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[k.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:k.jsx(m_,{children:k.jsx(DE,{className:"h-4 w-4"})})}),k.jsx(p_,{children:t})]}));ry.displayName=Kg.displayName;const y_=y.forwardRef(({className:e,...t},n)=>k.jsx(Xg,{ref:n,className:Be("-mx-1 my-1 h-px bg-muted",e),...t}));y_.displayName=Xg.displayName;const w_=tg("inline-flex items-center rounded border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function x_({className:e,variant:t,...n}){return k.jsx("div",{className:Be(w_({variant:t}),e),...n})}function S_(){const{tables:e,selectedTable:t,setSelectedTable:n}=Di();return k.jsxs("section",{className:"flex justify-center items-center gap-2",children:[k.jsxs(h_,{value:t,onValueChange:n,children:[k.jsx(Zg,{className:"w-[200px] md:w-[300px]",children:k.jsx(g_,{placeholder:"Select a table"})}),k.jsx(ty,{children:k.jsxs(v_,{children:[k.jsx(ny,{children:"Tables"}),e.map((r,o)=>k.jsx(ry,{value:`${o}`,children:r.name},r.name))]})})]}),k.jsxs(x_,{className:"text-sm",children:[e[parseInt(t)].count," rows"]})]})}const oy=y.forwardRef(({className:e,type:t,...n},r)=>k.jsx("input",{type:t,className:Be("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...n}));oy.displayName="Input";function E_(){var p,S;const{query:e,db:t,tables:n,selectedTable:r}=Di(),[o,i]=y.useState([]),[s,a]=y.useState([]),[f,u]=y.useState(0),[m,h]=y.useState(""),[w,_]=y.useState(!1),E=(p=n[parseInt(r)])==null?void 0:p.name,x=((S=n[parseInt(r)])==null?void 0:S.count)||0,P=30;y.useEffect(()=>{u(0),_(!1)},[E]),y.useEffect(()=>{if(t&&E&&!w){const C=e(`SELECT * FROM "${E}" LIMIT ${P} OFFSET ${f};`);if(C.length>0){const T=C[0].values.map(A=>C[0].columns.reduce((N,D,G)=>(N[D]=A[G],N),{}));a(C[0].columns),i(T),console.log(T)}}},[t,e,E,f,w]);const g=()=>{if(t&&m.trim()!==""){const C=e(m);if(C.length>0){const T=C[0].values.map(A=>C[0].columns.reduce((N,D,G)=>(N[D]=A[G],N),{}));a(C[0].columns),i(T),_(!0),console.log(T)}}};return k.jsxs("div",{children:[k.jsx(S_,{}),k.jsxs("div",{className:"flex gap-2 mt-2",children:[k.jsx(oy,{type:"text",value:m,onChange:C=>h(C.target.value),placeholder:"Enter your custom query",className:"w-full"}),k.jsx(hs,{onClick:g,children:"Run Query"})]}),k.jsx(Bu,{className:"mt-2"}),o.length>0&&k.jsxs(Gv,{children:[k.jsx(Kv,{children:k.jsx(Hu,{children:s.map((C,T)=>k.jsx(Yv,{children:C},T))})}),k.jsx(Qv,{children:o.map((C,T)=>k.jsx(Hu,{children:s.map((A,N)=>k.jsx(Xv,{children:C[A]},N))},T))})]}),k.jsx(Bu,{}),!w&&k.jsx(BE,{page:f,setPage:u,rowsPerPage:P,rowCount:x})]})}var iy={exports:{}},__="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",b_=__,C_=b_;function ly(){}function sy(){}sy.resetWarningCache=ly;var k_=function(){function e(r,o,i,s,a,f){if(f!==C_){var u=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 u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:sy,resetWarningCache:ly};return n.PropTypes=n,n};iy.exports=k_();var P_=iy.exports;const _e=Ri(P_);var R_=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function Li(e,t){var n=T_(e);if(typeof n.path!="string"){var r=e.webkitRelativePath;Object.defineProperty(n,"path",{value:typeof t=="string"?t:typeof r=="string"&&r.length>0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}function T_(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),o=R_.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}var N_=[".DS_Store","Thumbs.db"];function O_(e){return Co(this,void 0,void 0,function(){return ko(this,function(t){return gs(e)&&A_(e.dataTransfer)?[2,I_(e.dataTransfer,e.type)]:M_(e)?[2,D_(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,j_(e)]:[2,[]]})})}function A_(e){return gs(e)}function M_(e){return gs(e)&&gs(e.target)}function gs(e){return typeof e=="object"&&e!==null}function D_(e){return Yu(e.target.files).map(function(t){return Li(t)})}function j_(e){return Co(this,void 0,void 0,function(){var t;return ko(this,function(n){switch(n.label){case 0:return[4,Promise.all(e.map(function(r){return r.getFile()}))];case 1:return t=n.sent(),[2,t.map(function(r){return Li(r)})]}})})}function I_(e,t){return Co(this,void 0,void 0,function(){var n,r;return ko(this,function(o){switch(o.label){case 0:return e.items?(n=Yu(e.items).filter(function(i){return i.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(L_))]):[3,2];case 1:return r=o.sent(),[2,Ap(ay(r))];case 2:return[2,Ap(Yu(e.files).map(function(i){return Li(i)}))]}})})}function Ap(e){return e.filter(function(t){return N_.indexOf(t.name)===-1})}function Yu(e){if(e===null)return[];for(var t=[],n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);nn)return[!1,Lp(n)];if(e.sizen)return[!1,Lp(n)]}return[!0,null]}function dr(e){return e!=null}function J_(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize,i=e.multiple,s=e.maxFiles,a=e.validator;return!i&&t.length>1||i&&s>=1&&t.length>s?!1:t.every(function(f){var u=dy(f,n),m=Pi(u,1),h=m[0],w=py(f,r,o),_=Pi(w,1),E=_[0],x=a?a(f):null;return h&&E&&!x})}function ys(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function _l(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function zp(e){e.preventDefault()}function eb(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function tb(e){return e.indexOf("Edge/")!==-1}function nb(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return eb(e)||tb(e)}function tn(){for(var e=arguments.length,t=new Array(e),n=0;n1?o-1:0),s=1;se.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function wb(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i=0)&&(n[o]=e[o]);return n}var ff=y.forwardRef(function(e,t){var n=e.children,r=ws(e,ab),o=yy(r),i=o.open,s=ws(o,ub);return y.useImperativeHandle(t,function(){return{open:i}},[i]),qt.createElement(y.Fragment,null,n(Me(Me({},s),{},{open:i})))});ff.displayName="Dropzone";var gy={disabled:!1,getFilesFromEvent:O_,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};ff.defaultProps=gy;ff.propTypes={children:_e.func,accept:_e.objectOf(_e.arrayOf(_e.string)),multiple:_e.bool,preventDropOnDocument:_e.bool,noClick:_e.bool,noKeyboard:_e.bool,noDrag:_e.bool,noDragEventsBubbling:_e.bool,minSize:_e.number,maxSize:_e.number,maxFiles:_e.number,disabled:_e.bool,getFilesFromEvent:_e.func,onFileDialogCancel:_e.func,onFileDialogOpen:_e.func,useFsAccessApi:_e.bool,autoFocus:_e.bool,onDragEnter:_e.func,onDragLeave:_e.func,onDragOver:_e.func,onDrop:_e.func,onDropAccepted:_e.func,onDropRejected:_e.func,onError:_e.func,validator:_e.func};var ec={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function yy(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=Me(Me({},gy),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,i=t.maxSize,s=t.minSize,a=t.multiple,f=t.maxFiles,u=t.onDragEnter,m=t.onDragLeave,h=t.onDragOver,w=t.onDrop,_=t.onDropAccepted,E=t.onDropRejected,x=t.onFileDialogCancel,P=t.onFileDialogOpen,g=t.useFsAccessApi,p=t.autoFocus,S=t.preventDropOnDocument,C=t.noClick,T=t.noKeyboard,A=t.noDrag,N=t.noDragEventsBubbling,D=t.onError,G=t.validator,F=y.useMemo(function(){return ib(n)},[n]),V=y.useMemo(function(){return ob(n)},[n]),U=y.useMemo(function(){return typeof P=="function"?P:Hp},[P]),H=y.useMemo(function(){return typeof x=="function"?x:Hp},[x]),B=y.useRef(null),Q=y.useRef(null),se=y.useReducer(xb,ec),J=Ha(se,2),I=J[0],z=J[1],ee=I.isFocused,oe=I.isFileDialogActive,ie=y.useRef(typeof window<"u"&&window.isSecureContext&&g&&rb()),Ve=function(){!ie.current&&oe&&setTimeout(function(){if(Q.current){var te=Q.current.files;te.length||(z({type:"closeDialog"}),H())}},300)};y.useEffect(function(){return window.addEventListener("focus",Ve,!1),function(){window.removeEventListener("focus",Ve,!1)}},[Q,oe,H,ie]);var he=y.useRef([]),ot=function(te){B.current&&B.current.contains(te.target)||(te.preventDefault(),he.current=[])};y.useEffect(function(){return S&&(document.addEventListener("dragover",zp,!1),document.addEventListener("drop",ot,!1)),function(){S&&(document.removeEventListener("dragover",zp),document.removeEventListener("drop",ot))}},[B,S]),y.useEffect(function(){return!r&&p&&B.current&&B.current.focus(),function(){}},[B,p,r]);var Ee=y.useCallback(function(W){D?D(W):console.error(W)},[D]),Y=y.useCallback(function(W){W.preventDefault(),W.persist(),Nn(W),he.current=[].concat(db(he.current),[W.target]),_l(W)&&Promise.resolve(o(W)).then(function(te){if(!(ys(W)&&!N)){var Ae=te.length,Fe=Ae>0&&J_({files:te,accept:F,minSize:s,maxSize:i,multiple:a,maxFiles:f,validator:G}),et=Ae>0&&!Fe;z({isDragAccept:Fe,isDragReject:et,isDragActive:!0,type:"setDraggedFiles"}),u&&u(W)}}).catch(function(te){return Ee(te)})},[o,u,Ee,N,F,s,i,a,f,G]),we=y.useCallback(function(W){W.preventDefault(),W.persist(),Nn(W);var te=_l(W);if(te&&W.dataTransfer)try{W.dataTransfer.dropEffect="copy"}catch{}return te&&h&&h(W),!1},[h,N]),Le=y.useCallback(function(W){W.preventDefault(),W.persist(),Nn(W);var te=he.current.filter(function(Fe){return B.current&&B.current.contains(Fe)}),Ae=te.indexOf(W.target);Ae!==-1&&te.splice(Ae,1),he.current=te,!(te.length>0)&&(z({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),_l(W)&&m&&m(W))},[B,m,N]),ve=y.useCallback(function(W,te){var Ae=[],Fe=[];W.forEach(function(et){var At=dy(et,F),St=Ha(At,2),Tr=St[0],Nr=St[1],Or=py(et,s,i),Ar=Ha(Or,2),Ro=Ar[0],To=Ar[1],Mr=G?G(et):null;if(Tr&&Ro&&!Mr)Ae.push(et);else{var le=[Nr,To];Mr&&(le=le.concat(Mr)),Fe.push({file:et,errors:le.filter(function(zi){return zi})})}}),(!a&&Ae.length>1||a&&f>=1&&Ae.length>f)&&(Ae.forEach(function(et){Fe.push({file:et,errors:[Z_]})}),Ae.splice(0)),z({acceptedFiles:Ae,fileRejections:Fe,type:"setFiles"}),w&&w(Ae,Fe,te),Fe.length>0&&E&&E(Fe,te),Ae.length>0&&_&&_(Ae,te)},[z,a,F,s,i,f,w,_,E,G]),me=y.useCallback(function(W){W.preventDefault(),W.persist(),Nn(W),he.current=[],_l(W)&&Promise.resolve(o(W)).then(function(te){ys(W)&&!N||ve(te,W)}).catch(function(te){return Ee(te)}),z({type:"reset"})},[o,ve,Ee,N]),de=y.useCallback(function(){if(ie.current){z({type:"openDialog"}),U();var W={multiple:a,types:V};window.showOpenFilePicker(W).then(function(te){return o(te)}).then(function(te){ve(te,null),z({type:"closeDialog"})}).catch(function(te){lb(te)?(H(te),z({type:"closeDialog"})):sb(te)?(ie.current=!1,Q.current?(Q.current.value=null,Q.current.click()):Ee(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no was provided."))):Ee(te)});return}Q.current&&(z({type:"openDialog"}),U(),Q.current.value=null,Q.current.click())},[z,U,H,g,ve,Ee,V,a]),K=y.useCallback(function(W){!B.current||!B.current.isEqualNode(W.target)||(W.key===" "||W.key==="Enter"||W.keyCode===32||W.keyCode===13)&&(W.preventDefault(),de())},[B,de]),ce=y.useCallback(function(){z({type:"focus"})},[]),Ot=y.useCallback(function(){z({type:"blur"})},[]),Qe=y.useCallback(function(){C||(nb()?setTimeout(de,0):de())},[C,de]),Ye=function(te){return r?null:te},Tn=function(te){return T?null:Ye(te)},xe=function(te){return A?null:Ye(te)},Nn=function(te){N&&te.stopPropagation()},Fi=y.useMemo(function(){return function(){var W=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},te=W.refKey,Ae=te===void 0?"ref":te,Fe=W.role,et=W.onKeyDown,At=W.onFocus,St=W.onBlur,Tr=W.onClick,Nr=W.onDragEnter,Or=W.onDragOver,Ar=W.onDragLeave,Ro=W.onDrop,To=ws(W,cb);return Me(Me(Ju({onKeyDown:Tn(tn(et,K)),onFocus:Tn(tn(At,ce)),onBlur:Tn(tn(St,Ot)),onClick:Ye(tn(Tr,Qe)),onDragEnter:xe(tn(Nr,Y)),onDragOver:xe(tn(Or,we)),onDragLeave:xe(tn(Ar,Le)),onDrop:xe(tn(Ro,me)),role:typeof Fe=="string"&&Fe!==""?Fe:"presentation"},Ae,B),!r&&!T?{tabIndex:0}:{}),To)}},[B,K,ce,Ot,Qe,Y,we,Le,me,T,A,r]),Ht=y.useCallback(function(W){W.stopPropagation()},[]),Vs=y.useMemo(function(){return function(){var W=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},te=W.refKey,Ae=te===void 0?"ref":te,Fe=W.onChange,et=W.onClick,At=ws(W,fb),St=Ju({accept:F,multiple:a,type:"file",style:{display:"none"},onChange:Ye(tn(Fe,me)),onClick:Ye(tn(et,Ht)),tabIndex:-1},Ae,Q);return Me(Me({},St),At)}},[Q,n,a,me,r]);return Me(Me({},I),{},{isFocused:ee&&!r,getRootProps:Fi,getInputProps:Vs,rootRef:B,inputRef:Q,open:Ye(de)})}function xb(e,t){switch(t.type){case"focus":return Me(Me({},e),{},{isFocused:!0});case"blur":return Me(Me({},e),{},{isFocused:!1});case"openDialog":return Me(Me({},ec),{},{isFileDialogActive:!0});case"closeDialog":return Me(Me({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return Me(Me({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return Me(Me({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return Me({},ec);default:return e}}function Hp(){}const Sb=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"];function Eb(e){if(e===0)return"0 Byte";const t=Math.floor(Math.log(e)/Math.log(1024)),n=Sb[t];return`${(e/Math.pow(1024,t)).toFixed(2)} ${n}`}function _b({file:e}){return k.jsx(k.Fragment,{children:k.jsxs("li",{className:"flex w-full items-center justify-center gap-2 font-mono text-sm",title:e.name,children:[k.jsx("p",{className:"max-w-[250px] truncate",children:e.name}),k.jsx("span",{className:"text-xs font-semibold",children:Eb(e.size)})]})})}function bb({errors:e}){return e?k.jsx(k.Fragment,{children:e.map(t=>{if(t.code!=="file-too-large")return k.jsxs("li",{className:"flex w-full items-center justify-center text-sm text-red-600",children:[k.jsx(zE,{className:"mr-2"}),t.message]},t.code)})}):k.jsxs("li",{className:"flex w-full items-center justify-center text-sm text-green-600",children:[k.jsx(FE,{className:"mr-2"}),"Uploaded successfully"]})}function Cb(){const{loadDatabase:e,setTables:t,setSelectedTable:n,db:r}=Di(),[o,i]=y.useState(null),[s,a]=y.useState([]),f=y.useCallback(async(h,w)=>{if(a([]),t([]),n("0"),h.length>0){const _=h[0];i(_),await e(_)}if(w.length>0){const _=w.flatMap(E=>E.errors);a(_)}},[e,t,n]),{getRootProps:u,getInputProps:m}=yy({onDrop:f,multiple:!1,accept:{"application/vnd.sqlite3":[".sqlite",".sqlite3"],"application/x-sqlite3":[".sqlite",".sqlite3"],"application/octet-stream":[".db"],"application/sql":[".sql"]}});return k.jsxs("section",{children:[r?k.jsxs("div",{...u(),className:"border p-6 rounded cursor-pointer text-center",children:[k.jsx("input",{...m()}),k.jsx("p",{children:"Drag drop a SQLite file here, or click to select one"})]}):k.jsxs("div",{...u(),className:"border p-6 py-24 rounded cursor-pointer text-center",children:[k.jsx("input",{...m()}),k.jsx("p",{children:"Drag drop a file here, or click to select"}),k.jsx("a",{href:"https://github.com/vwh/sqlite-viewer/raw/main/examples/chinook.db",className:"text-sm text-[#003B57] hover:underline",title:"Download sample file",children:"Or download & try this sample file"})]}),k.jsxs("div",{className:"my-2",children:[o&&k.jsx(_b,{file:o}),k.jsx(bb,{errors:s})]})]})}function kb(){const{isLoading:e}=Di();return k.jsx(k.Fragment,{children:e&&k.jsxs("div",{className:"flex items-center justify-center mb-4",children:[k.jsx(HE,{className:"w-5 h-5 animate-spin"}),k.jsx("span",{className:"ml-2",children:"Reading SQLite file"})]})})}function Pb(){const{db:e,query:t,tables:n,setTables:r}=Di();return y.useEffect(()=>{if(e){const o=t("SELECT name FROM sqlite_master WHERE type='table';");if(o.length>0){const s=o[0].values.map(a=>a[0]).map(async a=>{const f=t(`SELECT COUNT(*) FROM "${a}"`),u=parseInt(f[0].values[0][0],10);return{name:a,count:u}});Promise.all(s).then(a=>{console.log("Tables with row counts:",a),r(a)})}}},[e,t,r]),k.jsxs("div",{className:"flex flex-col gap-2",children:[!e&&k.jsx(k.Fragment,{children:k.jsx("section",{className:"flex justify-center border rounded py-2",children:k.jsxs("div",{className:"flex flex-col items-center gap-2",children:[k.jsx("img",{title:"SQLite Logo",src:"https://raw.githubusercontent.com/vwh/sqlite-viewer/main/public/logo.webp",alt:"SQLite Logo",className:"h-20"}),k.jsx("p",{className:"text-sm",children:"View SQLite file online"})]})})}),k.jsx(Cb,{}),k.jsx(kb,{}),n.length>0&&k.jsx(E_,{})]})}Ba.createRoot(document.getElementById("root")).render(k.jsx(qt.StrictMode,{children:k.jsxs("main",{className:"container mx-auto p-4",children:[k.jsx(Pb,{}),k.jsxs("section",{className:"z-[100]",children:[k.jsx("p",{className:"text-xs mt-2",children:"No file will be uploaded to server. using JavaScript, sql.js"}),k.jsxs("a",{href:"https://github.com/vwh/sqlite-viewer",target:"_blank",className:"text-sm text-[#003B57] hover:underline flex gap-1 items-center",title:"Star on GitHub",children:[k.jsx($E,{className:"h-4 w-4 mt-1"}),k.jsx("span",{children:"Star this project on GitHub"})]})]})]})})); +`)},z2=0,$r=[];function $2(e){var t=w.useRef([]),n=w.useRef([0,0]),r=w.useRef(),o=w.useState(z2++)[0],i=w.useState(pg)[0],s=w.useRef(e);w.useEffect(function(){s.current=e},[e]),w.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var x=Wu([e.lockRef.current],(e.shards||[]).map(Ap),!0).filter(Boolean);return x.forEach(function(P){return P.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),x.forEach(function(P){return P.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=w.useCallback(function(x,P){if("touches"in x&&x.touches.length===2)return!s.current.allowPinchZoom;var v=El(x),m=n.current,S="deltaX"in x?x.deltaX:m[0]-v[0],k="deltaY"in x?x.deltaY:m[1]-v[1],R,A=x.target,N=Math.abs(S)>Math.abs(k)?"h":"v";if("touches"in x&&N==="h"&&A.type==="range")return!1;var M=Np(N,A);if(!M)return!0;if(M?R=N:(R=N==="v"?"h":"v",M=Np(N,A)),!M)return!1;if(!r.current&&"changedTouches"in x&&(S||k)&&(r.current=R),!R)return!0;var G=r.current||R;return I2(G,P,x,G==="h"?S:k,!0)},[]),f=w.useCallback(function(x){var P=x;if(!(!$r.length||$r[$r.length-1]!==i)){var v="deltaY"in P?Op(P):El(P),m=t.current.filter(function(R){return R.name===P.type&&(R.target===P.target||P.target===R.shadowParent)&&L2(R.delta,v)})[0];if(m&&m.should){P.cancelable&&P.preventDefault();return}if(!m){var S=(s.current.shards||[]).map(Ap).filter(Boolean).filter(function(R){return R.contains(P.target)}),k=S.length>0?a(P,S[0]):!s.current.noIsolation;k&&P.cancelable&&P.preventDefault()}}},[]),u=w.useCallback(function(x,P,v,m){var S={name:x,delta:P,target:v,should:m,shadowParent:H2(v)};t.current.push(S),setTimeout(function(){t.current=t.current.filter(function(k){return k!==S})},1)},[]),p=w.useCallback(function(x){n.current=El(x),r.current=void 0},[]),h=w.useCallback(function(x){u(x.type,Op(x),x.target,a(x,e.lockRef.current))},[]),y=w.useCallback(function(x){u(x.type,El(x),x.target,a(x,e.lockRef.current))},[]);w.useEffect(function(){return $r.push(i),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:y}),document.addEventListener("wheel",f,zr),document.addEventListener("touchmove",f,zr),document.addEventListener("touchstart",p,zr),function(){$r=$r.filter(function(x){return x!==i}),document.removeEventListener("wheel",f,zr),document.removeEventListener("touchmove",f,zr),document.removeEventListener("touchstart",p,zr)}},[]);var _=e.removeScrollBar,E=e.inert;return w.createElement(w.Fragment,null,E?w.createElement(i,{styles:F2(o)}):null,_?w.createElement(T2,{gapMode:e.gapMode}):null)}function H2(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const B2=v2(dg,$2);var gg=w.forwardRef(function(e,t){return w.createElement(Hs,on({},e,{ref:t,sideCar:B2}))});gg.classNames=Hs.classNames;var W2=[" ","Enter","ArrowUp","ArrowDown"],U2=[" ","Enter"],Ii="Select",[Bs,Ws,V2]=WE(Ii),[Po,Nb]=Ls(Ii,[V2,zs]),Us=zs(),[q2,or]=Po(Ii),[G2,K2]=Po(Ii),yg=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:i,value:s,defaultValue:a,onValueChange:f,dir:u,name:p,autoComplete:h,disabled:y,required:_}=e,E=Us(t),[x,P]=w.useState(null),[v,m]=w.useState(null),[S,k]=w.useState(!1),R=VE(u),[A=!1,N]=Du({prop:r,defaultProp:o,onChange:i}),[M,G]=Du({prop:s,defaultProp:a,onChange:f}),L=w.useRef(null),V=x?!!x.closest("form"):!0,[U,H]=w.useState(new Set),B=Array.from(U).map(Q=>Q.props.value).join(";");return C.jsx(Pv,{...E,children:C.jsxs(q2,{required:_,scope:t,trigger:x,onTriggerChange:P,valueNode:v,onValueNodeChange:m,valueNodeHasChildren:S,onValueNodeHasChildrenChange:k,contentId:cf(),value:M,onValueChange:G,open:A,onOpenChange:N,dir:R,triggerPointerDownPosRef:L,disabled:y,children:[C.jsx(Bs.Provider,{scope:t,children:C.jsx(G2,{scope:e.__scopeSelect,onNativeOptionAdd:w.useCallback(Q=>{H(se=>new Set(se).add(Q))},[]),onNativeOptionRemove:w.useCallback(Q=>{H(se=>{const J=new Set(se);return J.delete(Q),J})},[]),children:n})}),V?C.jsxs(Ug,{"aria-hidden":!0,required:_,tabIndex:-1,name:p,autoComplete:h,value:M,onChange:Q=>G(Q.target.value),disabled:y,children:[M===void 0?C.jsx("option",{value:""}):null,Array.from(U)]},B):null]})})};yg.displayName=Ii;var wg="SelectTrigger",xg=w.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,i=Us(n),s=or(wg,n),a=s.disabled||r,f=Ke(t,s.onTriggerChange),u=Ws(n),[p,h,y]=Vg(E=>{const x=u().filter(m=>!m.disabled),P=x.find(m=>m.value===s.value),v=qg(x,E,P);v!==void 0&&s.onValueChange(v.value)}),_=()=>{a||(s.onOpenChange(!0),y())};return C.jsx(Rv,{asChild:!0,...i,children:C.jsx($e.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":Wg(s.value)?"":void 0,...o,ref:f,onClick:be(o.onClick,E=>{E.currentTarget.focus()}),onPointerDown:be(o.onPointerDown,E=>{const x=E.target;x.hasPointerCapture(E.pointerId)&&x.releasePointerCapture(E.pointerId),E.button===0&&E.ctrlKey===!1&&(_(),s.triggerPointerDownPosRef.current={x:Math.round(E.pageX),y:Math.round(E.pageY)},E.preventDefault())}),onKeyDown:be(o.onKeyDown,E=>{const x=p.current!=="";!(E.ctrlKey||E.altKey||E.metaKey)&&E.key.length===1&&h(E.key),!(x&&E.key===" ")&&W2.includes(E.key)&&(_(),E.preventDefault())})})})});xg.displayName=wg;var Sg="SelectValue",Eg=w.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:i,placeholder:s="",...a}=e,f=or(Sg,n),{onValueNodeHasChildrenChange:u}=f,p=i!==void 0,h=Ke(t,f.onValueNodeChange);return dt(()=>{u(p)},[u,p]),C.jsx($e.span,{...a,ref:h,style:{pointerEvents:"none"},children:Wg(f.value)?C.jsx(C.Fragment,{children:s}):i})});Eg.displayName=Sg;var Q2="SelectIcon",_g=w.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return C.jsx($e.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});_g.displayName=Q2;var Y2="SelectPortal",bg=e=>C.jsx(Ov,{asChild:!0,...e});bg.displayName=Y2;var Cr="SelectContent",Cg=w.forwardRef((e,t)=>{const n=or(Cr,e.__scopeSelect),[r,o]=w.useState();if(dt(()=>{o(new DocumentFragment)},[]),!n.open){const i=r;return i?Rr.createPortal(C.jsx(kg,{scope:e.__scopeSelect,children:C.jsx(Bs.Slot,{scope:e.__scopeSelect,children:C.jsx("div",{children:e.children})})}),i):null}return C.jsx(Pg,{...e,ref:t})});Cg.displayName=Cr;var mn=10,[kg,ir]=Po(Cr),X2="SelectContentImpl",Pg=w.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:i,onPointerDownOutside:s,side:a,sideOffset:f,align:u,alignOffset:p,arrowPadding:h,collisionBoundary:y,collisionPadding:_,sticky:E,hideWhenDetached:x,avoidCollisions:P,...v}=e,m=or(Cr,n),[S,k]=w.useState(null),[R,A]=w.useState(null),N=Ke(t,Y=>k(Y)),[M,G]=w.useState(null),[L,V]=w.useState(null),U=Ws(n),[H,B]=w.useState(!1),Q=w.useRef(!1);w.useEffect(()=>{if(S)return s2(S)},[S]),qE();const se=w.useCallback(Y=>{const[we,...Le]=U().map(de=>de.ref.current),[ve]=Le.slice(-1),me=document.activeElement;for(const de of Y)if(de===me||(de==null||de.scrollIntoView({block:"nearest"}),de===we&&R&&(R.scrollTop=0),de===ve&&R&&(R.scrollTop=R.scrollHeight),de==null||de.focus(),document.activeElement!==me))return},[U,R]),J=w.useCallback(()=>se([M,S]),[se,M,S]);w.useEffect(()=>{H&&J()},[H,J]);const{onOpenChange:I,triggerPointerDownPosRef:z}=m;w.useEffect(()=>{if(S){let Y={x:0,y:0};const we=ve=>{var me,de;Y={x:Math.abs(Math.round(ve.pageX)-(((me=z.current)==null?void 0:me.x)??0)),y:Math.abs(Math.round(ve.pageY)-(((de=z.current)==null?void 0:de.y)??0))}},Le=ve=>{Y.x<=10&&Y.y<=10?ve.preventDefault():S.contains(ve.target)||I(!1),document.removeEventListener("pointermove",we),z.current=null};return z.current!==null&&(document.addEventListener("pointermove",we),document.addEventListener("pointerup",Le,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",we),document.removeEventListener("pointerup",Le,{capture:!0})}}},[S,I,z]),w.useEffect(()=>{const Y=()=>I(!1);return window.addEventListener("blur",Y),window.addEventListener("resize",Y),()=>{window.removeEventListener("blur",Y),window.removeEventListener("resize",Y)}},[I]);const[ee,oe]=Vg(Y=>{const we=U().filter(me=>!me.disabled),Le=we.find(me=>me.ref.current===document.activeElement),ve=qg(we,Y,Le);ve&&setTimeout(()=>ve.ref.current.focus())}),ie=w.useCallback((Y,we,Le)=>{const ve=!Q.current&&!Le;(m.value!==void 0&&m.value===we||ve)&&(G(Y),ve&&(Q.current=!0))},[m.value]),Ve=w.useCallback(()=>S==null?void 0:S.focus(),[S]),he=w.useCallback((Y,we,Le)=>{const ve=!Q.current&&!Le;(m.value!==void 0&&m.value===we||ve)&&V(Y)},[m.value]),ot=r==="popper"?Vu:Rg,Ee=ot===Vu?{side:a,sideOffset:f,align:u,alignOffset:p,arrowPadding:h,collisionBoundary:y,collisionPadding:_,sticky:E,hideWhenDetached:x,avoidCollisions:P}:{};return C.jsx(kg,{scope:n,content:S,viewport:R,onViewportChange:A,itemRefCallback:ie,selectedItem:M,onItemLeave:Ve,itemTextRefCallback:he,focusSelectedItem:J,selectedItemText:L,position:r,isPositioned:H,searchRef:ee,children:C.jsx(gg,{as:go,allowPinchZoom:!0,children:C.jsx(lg,{asChild:!0,trapped:m.open,onMountAutoFocus:Y=>{Y.preventDefault()},onUnmountAutoFocus:be(o,Y=>{var we;(we=m.trigger)==null||we.focus({preventScroll:!0}),Y.preventDefault()}),children:C.jsx(of,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:Y=>Y.preventDefault(),onDismiss:()=>m.onOpenChange(!1),children:C.jsx(ot,{role:"listbox",id:m.contentId,"data-state":m.open?"open":"closed",dir:m.dir,onContextMenu:Y=>Y.preventDefault(),...v,...Ee,onPlaced:()=>B(!0),ref:N,style:{display:"flex",flexDirection:"column",outline:"none",...v.style},onKeyDown:be(v.onKeyDown,Y=>{const we=Y.ctrlKey||Y.altKey||Y.metaKey;if(Y.key==="Tab"&&Y.preventDefault(),!we&&Y.key.length===1&&oe(Y.key),["ArrowUp","ArrowDown","Home","End"].includes(Y.key)){let ve=U().filter(me=>!me.disabled).map(me=>me.ref.current);if(["ArrowUp","End"].includes(Y.key)&&(ve=ve.slice().reverse()),["ArrowUp","ArrowDown"].includes(Y.key)){const me=Y.target,de=ve.indexOf(me);ve=ve.slice(de+1)}setTimeout(()=>se(ve)),Y.preventDefault()}})})})})})})});Pg.displayName=X2;var Z2="SelectItemAlignedPosition",Rg=w.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,i=or(Cr,n),s=ir(Cr,n),[a,f]=w.useState(null),[u,p]=w.useState(null),h=Ke(t,N=>p(N)),y=Ws(n),_=w.useRef(!1),E=w.useRef(!0),{viewport:x,selectedItem:P,selectedItemText:v,focusSelectedItem:m}=s,S=w.useCallback(()=>{if(i.trigger&&i.valueNode&&a&&u&&x&&P&&v){const N=i.trigger.getBoundingClientRect(),M=u.getBoundingClientRect(),G=i.valueNode.getBoundingClientRect(),L=v.getBoundingClientRect();if(i.dir!=="rtl"){const me=L.left-M.left,de=G.left-me,K=N.left-de,ce=N.width+K,Ot=Math.max(ce,M.width),Qe=window.innerWidth-mn,Ye=Sp(de,[mn,Qe-Ot]);a.style.minWidth=ce+"px",a.style.left=Ye+"px"}else{const me=M.right-L.right,de=window.innerWidth-G.right-me,K=window.innerWidth-N.right-de,ce=N.width+K,Ot=Math.max(ce,M.width),Qe=window.innerWidth-mn,Ye=Sp(de,[mn,Qe-Ot]);a.style.minWidth=ce+"px",a.style.right=Ye+"px"}const V=y(),U=window.innerHeight-mn*2,H=x.scrollHeight,B=window.getComputedStyle(u),Q=parseInt(B.borderTopWidth,10),se=parseInt(B.paddingTop,10),J=parseInt(B.borderBottomWidth,10),I=parseInt(B.paddingBottom,10),z=Q+se+H+I+J,ee=Math.min(P.offsetHeight*5,z),oe=window.getComputedStyle(x),ie=parseInt(oe.paddingTop,10),Ve=parseInt(oe.paddingBottom,10),he=N.top+N.height/2-mn,ot=U-he,Ee=P.offsetHeight/2,Y=P.offsetTop+Ee,we=Q+se+Y,Le=z-we;if(we<=he){const me=P===V[V.length-1].ref.current;a.style.bottom="0px";const de=u.clientHeight-x.offsetTop-x.offsetHeight,K=Math.max(ot,Ee+(me?Ve:0)+de+J),ce=we+K;a.style.height=ce+"px"}else{const me=P===V[0].ref.current;a.style.top="0px";const K=Math.max(he,Q+x.offsetTop+(me?ie:0)+Ee)+Le;a.style.height=K+"px",x.scrollTop=we-he+x.offsetTop}a.style.margin=`${mn}px 0`,a.style.minHeight=ee+"px",a.style.maxHeight=U+"px",r==null||r(),requestAnimationFrame(()=>_.current=!0)}},[y,i.trigger,i.valueNode,a,u,x,P,v,i.dir,r]);dt(()=>S(),[S]);const[k,R]=w.useState();dt(()=>{u&&R(window.getComputedStyle(u).zIndex)},[u]);const A=w.useCallback(N=>{N&&E.current===!0&&(S(),m==null||m(),E.current=!1)},[S,m]);return C.jsx(e_,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:_,onScrollButtonChange:A,children:C.jsx("div",{ref:f,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:k},children:C.jsx($e.div,{...o,ref:h,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});Rg.displayName=Z2;var J2="SelectPopperPosition",Vu=w.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=mn,...i}=e,s=Us(n);return C.jsx(Tv,{...s,...i,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Vu.displayName=J2;var[e_,ff]=Po(Cr,{}),qu="SelectViewport",Tg=w.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,i=ir(qu,n),s=ff(qu,n),a=Ke(t,i.onViewportChange),f=w.useRef(0);return C.jsxs(C.Fragment,{children:[C.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),C.jsx(Bs.Slot,{scope:n,children:C.jsx($e.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:a,style:{position:"relative",flex:1,overflow:"auto",...o.style},onScroll:be(o.onScroll,u=>{const p=u.currentTarget,{contentWrapper:h,shouldExpandOnScrollRef:y}=s;if(y!=null&&y.current&&h){const _=Math.abs(f.current-p.scrollTop);if(_>0){const E=window.innerHeight-mn*2,x=parseFloat(h.style.minHeight),P=parseFloat(h.style.height),v=Math.max(x,P);if(v0?k:0,h.style.justifyContent="flex-end")}}}f.current=p.scrollTop})})})]})});Tg.displayName=qu;var Ng="SelectGroup",[t_,n_]=Po(Ng),Og=w.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=cf();return C.jsx(t_,{scope:n,id:o,children:C.jsx($e.div,{role:"group","aria-labelledby":o,...r,ref:t})})});Og.displayName=Ng;var Ag="SelectLabel",Mg=w.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=n_(Ag,n);return C.jsx($e.div,{id:o.id,...r,ref:t})});Mg.displayName=Ag;var vs="SelectItem",[r_,jg]=Po(vs),Dg=w.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:i,...s}=e,a=or(vs,n),f=ir(vs,n),u=a.value===r,[p,h]=w.useState(i??""),[y,_]=w.useState(!1),E=Ke(t,v=>{var m;return(m=f.itemRefCallback)==null?void 0:m.call(f,v,r,o)}),x=cf(),P=()=>{o||(a.onValueChange(r),a.onOpenChange(!1))};if(r==="")throw new Error("A must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return C.jsx(r_,{scope:n,value:r,disabled:o,textId:x,isSelected:u,onItemTextChange:w.useCallback(v=>{h(m=>m||((v==null?void 0:v.textContent)??"").trim())},[]),children:C.jsx(Bs.ItemSlot,{scope:n,value:r,disabled:o,textValue:p,children:C.jsx($e.div,{role:"option","aria-labelledby":x,"data-highlighted":y?"":void 0,"aria-selected":u&&y,"data-state":u?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...s,ref:E,onFocus:be(s.onFocus,()=>_(!0)),onBlur:be(s.onBlur,()=>_(!1)),onPointerUp:be(s.onPointerUp,P),onPointerMove:be(s.onPointerMove,v=>{var m;o?(m=f.onItemLeave)==null||m.call(f):v.currentTarget.focus({preventScroll:!0})}),onPointerLeave:be(s.onPointerLeave,v=>{var m;v.currentTarget===document.activeElement&&((m=f.onItemLeave)==null||m.call(f))}),onKeyDown:be(s.onKeyDown,v=>{var S;((S=f.searchRef)==null?void 0:S.current)!==""&&v.key===" "||(U2.includes(v.key)&&P(),v.key===" "&&v.preventDefault())})})})})});Dg.displayName=vs;var Zo="SelectItemText",Ig=w.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...i}=e,s=or(Zo,n),a=ir(Zo,n),f=jg(Zo,n),u=K2(Zo,n),[p,h]=w.useState(null),y=Ke(t,v=>h(v),f.onItemTextChange,v=>{var m;return(m=a.itemTextRefCallback)==null?void 0:m.call(a,v,f.value,f.disabled)}),_=p==null?void 0:p.textContent,E=w.useMemo(()=>C.jsx("option",{value:f.value,disabled:f.disabled,children:_},f.value),[f.disabled,f.value,_]),{onNativeOptionAdd:x,onNativeOptionRemove:P}=u;return dt(()=>(x(E),()=>P(E)),[x,P,E]),C.jsxs(C.Fragment,{children:[C.jsx($e.span,{id:f.textId,...i,ref:y}),f.isSelected&&s.valueNode&&!s.valueNodeHasChildren?Rr.createPortal(i.children,s.valueNode):null]})});Ig.displayName=Zo;var Lg="SelectItemIndicator",Fg=w.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return jg(Lg,n).isSelected?C.jsx($e.span,{"aria-hidden":!0,...r,ref:t}):null});Fg.displayName=Lg;var Gu="SelectScrollUpButton",zg=w.forwardRef((e,t)=>{const n=ir(Gu,e.__scopeSelect),r=ff(Gu,e.__scopeSelect),[o,i]=w.useState(!1),s=Ke(t,r.onScrollButtonChange);return dt(()=>{if(n.viewport&&n.isPositioned){let a=function(){const u=f.scrollTop>0;i(u)};const f=n.viewport;return a(),f.addEventListener("scroll",a),()=>f.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?C.jsx(Hg,{...e,ref:s,onAutoScroll:()=>{const{viewport:a,selectedItem:f}=n;a&&f&&(a.scrollTop=a.scrollTop-f.offsetHeight)}}):null});zg.displayName=Gu;var Ku="SelectScrollDownButton",$g=w.forwardRef((e,t)=>{const n=ir(Ku,e.__scopeSelect),r=ff(Ku,e.__scopeSelect),[o,i]=w.useState(!1),s=Ke(t,r.onScrollButtonChange);return dt(()=>{if(n.viewport&&n.isPositioned){let a=function(){const u=f.scrollHeight-f.clientHeight,p=Math.ceil(f.scrollTop)f.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?C.jsx(Hg,{...e,ref:s,onAutoScroll:()=>{const{viewport:a,selectedItem:f}=n;a&&f&&(a.scrollTop=a.scrollTop+f.offsetHeight)}}):null});$g.displayName=Ku;var Hg=w.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,i=ir("SelectScrollButton",n),s=w.useRef(null),a=Ws(n),f=w.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return w.useEffect(()=>()=>f(),[f]),dt(()=>{var p;const u=a().find(h=>h.ref.current===document.activeElement);(p=u==null?void 0:u.ref.current)==null||p.scrollIntoView({block:"nearest"})},[a]),C.jsx($e.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:be(o.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(r,50))}),onPointerMove:be(o.onPointerMove,()=>{var u;(u=i.onItemLeave)==null||u.call(i),s.current===null&&(s.current=window.setInterval(r,50))}),onPointerLeave:be(o.onPointerLeave,()=>{f()})})}),o_="SelectSeparator",Bg=w.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return C.jsx($e.div,{"aria-hidden":!0,...r,ref:t})});Bg.displayName=o_;var Qu="SelectArrow",i_=w.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Us(n),i=or(Qu,n),s=ir(Qu,n);return i.open&&s.position==="popper"?C.jsx(Nv,{...o,...r,ref:t}):null});i_.displayName=Qu;function Wg(e){return e===""||e===void 0}var Ug=w.forwardRef((e,t)=>{const{value:n,...r}=e,o=w.useRef(null),i=Ke(t,o),s=n2(n);return w.useEffect(()=>{const a=o.current,f=window.HTMLSelectElement.prototype,p=Object.getOwnPropertyDescriptor(f,"value").set;if(s!==n&&p){const h=new Event("change",{bubbles:!0});p.call(a,n),a.dispatchEvent(h)}},[s,n]),C.jsx(ag,{asChild:!0,children:C.jsx("select",{...r,ref:i,defaultValue:n})})});Ug.displayName="BubbleSelect";function Vg(e){const t=_n(e),n=w.useRef(""),r=w.useRef(0),o=w.useCallback(s=>{const a=n.current+s;t(a),function f(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>f(""),1e3))}(a)},[t]),i=w.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return w.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,i]}function qg(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let s=l_(e,Math.max(i,0));o.length===1&&(s=s.filter(u=>u!==n));const f=s.find(u=>u.textValue.toLowerCase().startsWith(o.toLowerCase()));return f!==n?f:void 0}function l_(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var s_=yg,Gg=xg,a_=Eg,u_=_g,c_=bg,Kg=Cg,f_=Tg,d_=Og,Qg=Mg,Yg=Dg,p_=Ig,m_=Fg,Xg=zg,Zg=$g,Jg=Bg;const h_=s_,v_=d_,g_=a_,ey=w.forwardRef(({className:e,children:t,...n},r)=>C.jsxs(Gg,{ref:r,className:Be("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,C.jsx(u_,{asChild:!0,children:C.jsx(ig,{className:"h-4 w-4 opacity-50"})})]}));ey.displayName=Gg.displayName;const ty=w.forwardRef(({className:e,...t},n)=>C.jsx(Xg,{ref:n,className:Be("flex cursor-default items-center justify-center py-1",e),...t,children:C.jsx(LE,{className:"h-4 w-4"})}));ty.displayName=Xg.displayName;const ny=w.forwardRef(({className:e,...t},n)=>C.jsx(Zg,{ref:n,className:Be("flex cursor-default items-center justify-center py-1",e),...t,children:C.jsx(ig,{className:"h-4 w-4"})}));ny.displayName=Zg.displayName;const ry=w.forwardRef(({className:e,children:t,position:n="popper",...r},o)=>C.jsx(c_,{children:C.jsxs(Kg,{ref:o,className:Be("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground 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",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[C.jsx(ty,{}),C.jsx(f_,{className:Be("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),C.jsx(ny,{})]})}));ry.displayName=Kg.displayName;const oy=w.forwardRef(({className:e,...t},n)=>C.jsx(Qg,{ref:n,className:Be("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));oy.displayName=Qg.displayName;const iy=w.forwardRef(({className:e,children:t,...n},r)=>C.jsxs(Yg,{ref:r,className:Be("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[C.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:C.jsx(m_,{children:C.jsx(jE,{className:"h-4 w-4"})})}),C.jsx(p_,{children:t})]}));iy.displayName=Yg.displayName;const y_=w.forwardRef(({className:e,...t},n)=>C.jsx(Jg,{ref:n,className:Be("-mx-1 my-1 h-px bg-muted",e),...t}));y_.displayName=Jg.displayName;const w_=rg("inline-flex items-center rounded border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function x_({className:e,variant:t,...n}){return C.jsx("div",{className:Be(w_({variant:t}),e),...n})}function S_(){const{tables:e,selectedTable:t,setSelectedTable:n}=ji();return C.jsxs("section",{className:"flex justify-center items-center gap-2",children:[C.jsxs(h_,{value:t,onValueChange:n,children:[C.jsx(ey,{className:"w-[200px] md:w-[300px]",children:C.jsx(g_,{placeholder:"Select a table"})}),C.jsx(ry,{children:C.jsxs(v_,{children:[C.jsx(oy,{children:"Tables"}),e.map((r,o)=>C.jsx(iy,{value:`${o}`,children:r.name},r.name))]})})]}),C.jsxs(x_,{className:"text-sm",children:[e[parseInt(t)].count," rows"]})]})}const ly=w.forwardRef(({className:e,type:t,...n},r)=>C.jsx("input",{type:t,className:Be("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...n}));ly.displayName="Input";function E_(){var S,k;const{query:e,db:t,tables:n,selectedTable:r,tableSchemas:o}=ji(),[i,s]=w.useState([]),[a,f]=w.useState([]),[u,p]=w.useState(0),[h,y]=w.useState(""),[_,E]=w.useState(!1),x=(S=n[parseInt(r)])==null?void 0:S.name,P=((k=n[parseInt(r)])==null?void 0:k.count)||0,v=30;w.useEffect(()=>{p(0),E(!1)},[x]),w.useEffect(()=>{if(t&&x&&!_){const R=e(`SELECT * FROM "${x}" LIMIT ${v} OFFSET ${u};`);if(R.length>0){const A=R[0].values.map(N=>R[0].columns.reduce((M,G,L)=>(M[G]=N[L],M),{}));f(R[0].columns),s(A),console.log(A)}}},[t,e,x,u,_]);const m=()=>{if(t&&h.trim()!==""){const R=e(h);if(R.length>0){const A=R[0].values.map(N=>R[0].columns.reduce((M,G,L)=>(M[G]=N[L],M),{}));f(R[0].columns),s(A),E(!0),console.log(A)}}};return C.jsxs("div",{children:[C.jsx(S_,{}),C.jsxs("div",{className:"flex gap-2 mt-2",children:[C.jsx(ly,{type:"text",value:h,onChange:R=>y(R.target.value),placeholder:"Enter your custom query",className:"w-full"}),C.jsx(hs,{onClick:m,children:"Run Query"})]}),C.jsx(Bu,{className:"mt-2"}),i.length>0&&C.jsxs(Qv,{children:[C.jsx(Yv,{children:C.jsx(Hu,{children:a.map((R,A)=>C.jsx(Zv,{children:C.jsxs(Gv,{children:[C.jsx(Kv,{asChild:!0,children:C.jsx("span",{className:"hover:underline cursor-pointer",children:R})}),C.jsx(uf,{side:"bottom",align:"start",children:o[x][R]})]})},A))})}),C.jsx(Xv,{children:i.map((R,A)=>C.jsx(Hu,{children:a.map((N,M)=>C.jsx(Jv,{children:R[N]},M))},A))})]}),C.jsx(Bu,{}),!_&&C.jsx(BE,{page:u,setPage:p,rowsPerPage:v,rowCount:P})]})}var sy={exports:{}},__="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",b_=__,C_=b_;function ay(){}function uy(){}uy.resetWarningCache=ay;var k_=function(){function e(r,o,i,s,a,f){if(f!==C_){var u=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 u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:uy,resetWarningCache:ay};return n.PropTypes=n,n};sy.exports=k_();var P_=sy.exports;const _e=Ri(P_);var R_=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function Li(e,t){var n=T_(e);if(typeof n.path!="string"){var r=e.webkitRelativePath;Object.defineProperty(n,"path",{value:typeof t=="string"?t:typeof r=="string"&&r.length>0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}function T_(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),o=R_.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}var N_=[".DS_Store","Thumbs.db"];function O_(e){return Co(this,void 0,void 0,function(){return ko(this,function(t){return gs(e)&&A_(e.dataTransfer)?[2,I_(e.dataTransfer,e.type)]:M_(e)?[2,j_(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,D_(e)]:[2,[]]})})}function A_(e){return gs(e)}function M_(e){return gs(e)&&gs(e.target)}function gs(e){return typeof e=="object"&&e!==null}function j_(e){return Yu(e.target.files).map(function(t){return Li(t)})}function D_(e){return Co(this,void 0,void 0,function(){var t;return ko(this,function(n){switch(n.label){case 0:return[4,Promise.all(e.map(function(r){return r.getFile()}))];case 1:return t=n.sent(),[2,t.map(function(r){return Li(r)})]}})})}function I_(e,t){return Co(this,void 0,void 0,function(){var n,r;return ko(this,function(o){switch(o.label){case 0:return e.items?(n=Yu(e.items).filter(function(i){return i.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(L_))]):[3,2];case 1:return r=o.sent(),[2,Mp(cy(r))];case 2:return[2,Mp(Yu(e.files).map(function(i){return Li(i)}))]}})})}function Mp(e){return e.filter(function(t){return N_.indexOf(t.name)===-1})}function Yu(e){if(e===null)return[];for(var t=[],n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);nn)return[!1,Fp(n)];if(e.sizen)return[!1,Fp(n)]}return[!0,null]}function dr(e){return e!=null}function J_(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize,i=e.multiple,s=e.maxFiles,a=e.validator;return!i&&t.length>1||i&&s>=1&&t.length>s?!1:t.every(function(f){var u=my(f,n),p=Pi(u,1),h=p[0],y=hy(f,r,o),_=Pi(y,1),E=_[0],x=a?a(f):null;return h&&E&&!x})}function ys(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function _l(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function $p(e){e.preventDefault()}function eb(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function tb(e){return e.indexOf("Edge/")!==-1}function nb(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return eb(e)||tb(e)}function tn(){for(var e=arguments.length,t=new Array(e),n=0;n1?o-1:0),s=1;se.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function wb(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i=0)&&(n[o]=e[o]);return n}var df=w.forwardRef(function(e,t){var n=e.children,r=ws(e,ab),o=xy(r),i=o.open,s=ws(o,ub);return w.useImperativeHandle(t,function(){return{open:i}},[i]),qt.createElement(w.Fragment,null,n(Me(Me({},s),{},{open:i})))});df.displayName="Dropzone";var wy={disabled:!1,getFilesFromEvent:O_,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};df.defaultProps=wy;df.propTypes={children:_e.func,accept:_e.objectOf(_e.arrayOf(_e.string)),multiple:_e.bool,preventDropOnDocument:_e.bool,noClick:_e.bool,noKeyboard:_e.bool,noDrag:_e.bool,noDragEventsBubbling:_e.bool,minSize:_e.number,maxSize:_e.number,maxFiles:_e.number,disabled:_e.bool,getFilesFromEvent:_e.func,onFileDialogCancel:_e.func,onFileDialogOpen:_e.func,useFsAccessApi:_e.bool,autoFocus:_e.bool,onDragEnter:_e.func,onDragLeave:_e.func,onDragOver:_e.func,onDrop:_e.func,onDropAccepted:_e.func,onDropRejected:_e.func,onError:_e.func,validator:_e.func};var ec={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function xy(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=Me(Me({},wy),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,i=t.maxSize,s=t.minSize,a=t.multiple,f=t.maxFiles,u=t.onDragEnter,p=t.onDragLeave,h=t.onDragOver,y=t.onDrop,_=t.onDropAccepted,E=t.onDropRejected,x=t.onFileDialogCancel,P=t.onFileDialogOpen,v=t.useFsAccessApi,m=t.autoFocus,S=t.preventDropOnDocument,k=t.noClick,R=t.noKeyboard,A=t.noDrag,N=t.noDragEventsBubbling,M=t.onError,G=t.validator,L=w.useMemo(function(){return ib(n)},[n]),V=w.useMemo(function(){return ob(n)},[n]),U=w.useMemo(function(){return typeof P=="function"?P:Bp},[P]),H=w.useMemo(function(){return typeof x=="function"?x:Bp},[x]),B=w.useRef(null),Q=w.useRef(null),se=w.useReducer(xb,ec),J=Ha(se,2),I=J[0],z=J[1],ee=I.isFocused,oe=I.isFileDialogActive,ie=w.useRef(typeof window<"u"&&window.isSecureContext&&v&&rb()),Ve=function(){!ie.current&&oe&&setTimeout(function(){if(Q.current){var te=Q.current.files;te.length||(z({type:"closeDialog"}),H())}},300)};w.useEffect(function(){return window.addEventListener("focus",Ve,!1),function(){window.removeEventListener("focus",Ve,!1)}},[Q,oe,H,ie]);var he=w.useRef([]),ot=function(te){B.current&&B.current.contains(te.target)||(te.preventDefault(),he.current=[])};w.useEffect(function(){return S&&(document.addEventListener("dragover",$p,!1),document.addEventListener("drop",ot,!1)),function(){S&&(document.removeEventListener("dragover",$p),document.removeEventListener("drop",ot))}},[B,S]),w.useEffect(function(){return!r&&m&&B.current&&B.current.focus(),function(){}},[B,m,r]);var Ee=w.useCallback(function(W){M?M(W):console.error(W)},[M]),Y=w.useCallback(function(W){W.preventDefault(),W.persist(),Nn(W),he.current=[].concat(db(he.current),[W.target]),_l(W)&&Promise.resolve(o(W)).then(function(te){if(!(ys(W)&&!N)){var Ae=te.length,Fe=Ae>0&&J_({files:te,accept:L,minSize:s,maxSize:i,multiple:a,maxFiles:f,validator:G}),et=Ae>0&&!Fe;z({isDragAccept:Fe,isDragReject:et,isDragActive:!0,type:"setDraggedFiles"}),u&&u(W)}}).catch(function(te){return Ee(te)})},[o,u,Ee,N,L,s,i,a,f,G]),we=w.useCallback(function(W){W.preventDefault(),W.persist(),Nn(W);var te=_l(W);if(te&&W.dataTransfer)try{W.dataTransfer.dropEffect="copy"}catch{}return te&&h&&h(W),!1},[h,N]),Le=w.useCallback(function(W){W.preventDefault(),W.persist(),Nn(W);var te=he.current.filter(function(Fe){return B.current&&B.current.contains(Fe)}),Ae=te.indexOf(W.target);Ae!==-1&&te.splice(Ae,1),he.current=te,!(te.length>0)&&(z({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),_l(W)&&p&&p(W))},[B,p,N]),ve=w.useCallback(function(W,te){var Ae=[],Fe=[];W.forEach(function(et){var At=my(et,L),St=Ha(At,2),Tr=St[0],Nr=St[1],Or=hy(et,s,i),Ar=Ha(Or,2),Ro=Ar[0],To=Ar[1],Mr=G?G(et):null;if(Tr&&Ro&&!Mr)Ae.push(et);else{var le=[Nr,To];Mr&&(le=le.concat(Mr)),Fe.push({file:et,errors:le.filter(function(zi){return zi})})}}),(!a&&Ae.length>1||a&&f>=1&&Ae.length>f)&&(Ae.forEach(function(et){Fe.push({file:et,errors:[Z_]})}),Ae.splice(0)),z({acceptedFiles:Ae,fileRejections:Fe,type:"setFiles"}),y&&y(Ae,Fe,te),Fe.length>0&&E&&E(Fe,te),Ae.length>0&&_&&_(Ae,te)},[z,a,L,s,i,f,y,_,E,G]),me=w.useCallback(function(W){W.preventDefault(),W.persist(),Nn(W),he.current=[],_l(W)&&Promise.resolve(o(W)).then(function(te){ys(W)&&!N||ve(te,W)}).catch(function(te){return Ee(te)}),z({type:"reset"})},[o,ve,Ee,N]),de=w.useCallback(function(){if(ie.current){z({type:"openDialog"}),U();var W={multiple:a,types:V};window.showOpenFilePicker(W).then(function(te){return o(te)}).then(function(te){ve(te,null),z({type:"closeDialog"})}).catch(function(te){lb(te)?(H(te),z({type:"closeDialog"})):sb(te)?(ie.current=!1,Q.current?(Q.current.value=null,Q.current.click()):Ee(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no was provided."))):Ee(te)});return}Q.current&&(z({type:"openDialog"}),U(),Q.current.value=null,Q.current.click())},[z,U,H,v,ve,Ee,V,a]),K=w.useCallback(function(W){!B.current||!B.current.isEqualNode(W.target)||(W.key===" "||W.key==="Enter"||W.keyCode===32||W.keyCode===13)&&(W.preventDefault(),de())},[B,de]),ce=w.useCallback(function(){z({type:"focus"})},[]),Ot=w.useCallback(function(){z({type:"blur"})},[]),Qe=w.useCallback(function(){k||(nb()?setTimeout(de,0):de())},[k,de]),Ye=function(te){return r?null:te},Tn=function(te){return R?null:Ye(te)},xe=function(te){return A?null:Ye(te)},Nn=function(te){N&&te.stopPropagation()},Fi=w.useMemo(function(){return function(){var W=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},te=W.refKey,Ae=te===void 0?"ref":te,Fe=W.role,et=W.onKeyDown,At=W.onFocus,St=W.onBlur,Tr=W.onClick,Nr=W.onDragEnter,Or=W.onDragOver,Ar=W.onDragLeave,Ro=W.onDrop,To=ws(W,cb);return Me(Me(Ju({onKeyDown:Tn(tn(et,K)),onFocus:Tn(tn(At,ce)),onBlur:Tn(tn(St,Ot)),onClick:Ye(tn(Tr,Qe)),onDragEnter:xe(tn(Nr,Y)),onDragOver:xe(tn(Or,we)),onDragLeave:xe(tn(Ar,Le)),onDrop:xe(tn(Ro,me)),role:typeof Fe=="string"&&Fe!==""?Fe:"presentation"},Ae,B),!r&&!R?{tabIndex:0}:{}),To)}},[B,K,ce,Ot,Qe,Y,we,Le,me,R,A,r]),Ht=w.useCallback(function(W){W.stopPropagation()},[]),Vs=w.useMemo(function(){return function(){var W=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},te=W.refKey,Ae=te===void 0?"ref":te,Fe=W.onChange,et=W.onClick,At=ws(W,fb),St=Ju({accept:L,multiple:a,type:"file",style:{display:"none"},onChange:Ye(tn(Fe,me)),onClick:Ye(tn(et,Ht)),tabIndex:-1},Ae,Q);return Me(Me({},St),At)}},[Q,n,a,me,r]);return Me(Me({},I),{},{isFocused:ee&&!r,getRootProps:Fi,getInputProps:Vs,rootRef:B,inputRef:Q,open:Ye(de)})}function xb(e,t){switch(t.type){case"focus":return Me(Me({},e),{},{isFocused:!0});case"blur":return Me(Me({},e),{},{isFocused:!1});case"openDialog":return Me(Me({},ec),{},{isFileDialogActive:!0});case"closeDialog":return Me(Me({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return Me(Me({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return Me(Me({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return Me({},ec);default:return e}}function Bp(){}const Sb=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"];function Eb(e){if(e===0)return"0 Byte";const t=Math.floor(Math.log(e)/Math.log(1024)),n=Sb[t];return`${(e/Math.pow(1024,t)).toFixed(2)} ${n}`}function _b({file:e}){return C.jsx(C.Fragment,{children:C.jsxs("li",{className:"flex w-full items-center justify-center gap-2 font-mono text-sm",title:e.name,children:[C.jsx("p",{className:"max-w-[250px] truncate",children:e.name}),C.jsx("span",{className:"text-xs font-semibold",children:Eb(e.size)})]})})}function bb({errors:e}){return e?C.jsx(C.Fragment,{children:e.map(t=>{if(t.code!=="file-too-large")return C.jsxs("li",{className:"flex w-full items-center justify-center text-sm text-red-600",children:[C.jsx(zE,{className:"mr-2"}),t.message]},t.code)})}):C.jsxs("li",{className:"flex w-full items-center justify-center text-sm text-green-600",children:[C.jsx(FE,{className:"mr-2"}),"Uploaded successfully"]})}function Cb(){const{loadDatabase:e,setTables:t,setSelectedTable:n,db:r}=ji(),[o,i]=w.useState(null),[s,a]=w.useState([]),f=w.useCallback(async(h,y)=>{if(a([]),t([]),n("0"),h.length>0){const _=h[0];i(_),await e(_)}if(y.length>0){const _=y.flatMap(E=>E.errors);a(_)}},[e,t,n]),{getRootProps:u,getInputProps:p}=xy({onDrop:f,multiple:!1,accept:{"application/vnd.sqlite3":[".sqlite",".sqlite3"],"application/x-sqlite3":[".sqlite",".sqlite3"],"application/octet-stream":[".db"],"application/sql":[".sql"]}});return C.jsxs("section",{children:[r?C.jsxs("div",{...u(),className:"border p-6 rounded cursor-pointer text-center",children:[C.jsx("input",{...p()}),C.jsx("p",{children:"Drag drop a SQLite file here, or click to select one"})]}):C.jsxs("div",{...u(),className:"border p-6 py-24 rounded cursor-pointer text-center",children:[C.jsx("input",{...p()}),C.jsx("p",{children:"Drag drop a file here, or click to select"}),C.jsx("a",{href:"https://github.com/vwh/sqlite-viewer/raw/main/examples/chinook.db",className:"text-sm text-[#003B57] hover:underline",title:"Download sample file",children:"Or download & try this sample file"})]}),C.jsxs("div",{className:"my-2",children:[o&&C.jsx(_b,{file:o}),C.jsx(bb,{errors:s})]})]})}function kb(){const{isLoading:e}=ji();return C.jsx(C.Fragment,{children:e&&C.jsxs("div",{className:"flex items-center justify-center mb-4",children:[C.jsx(HE,{className:"w-5 h-5 animate-spin"}),C.jsx("span",{className:"ml-2",children:"Reading SQLite file"})]})})}function Pb(){const{db:e,tables:t,isLoading:n}=ji();return C.jsxs("div",{className:"flex flex-col gap-2",children:[!e&&C.jsx("section",{className:"flex justify-center border rounded py-2",children:C.jsxs("div",{className:"flex flex-col items-center gap-2",children:[C.jsx("img",{title:"SQLite Logo",src:"https://raw.githubusercontent.com/vwh/sqlite-viewer/main/public/logo.webp",alt:"SQLite Logo",className:"h-20"}),C.jsx("p",{className:"text-sm",children:"View SQLite file online"})]})}),C.jsx(Cb,{}),C.jsx(kb,{}),!n&&t.length>0&&C.jsx(E_,{})]})}Ba.createRoot(document.getElementById("root")).render(C.jsx(qt.StrictMode,{children:C.jsxs("main",{className:"container mx-auto p-4",children:[C.jsx(Pb,{}),C.jsxs("section",{className:"z-[100]",children:[C.jsx("p",{className:"text-xs mt-2",children:"No file will be uploaded to server. using JavaScript, sql.js"}),C.jsxs("a",{href:"https://github.com/vwh/sqlite-viewer",target:"_blank",className:"text-sm text-[#003B57] hover:underline flex gap-1 items-center",title:"Star on GitHub",children:[C.jsx($E,{className:"h-4 w-4 mt-1"}),C.jsx("span",{children:"Star this project on GitHub"})]})]})]})})); diff --git a/index.html b/index.html index 166efe3..ebf1b33 100644 --- a/index.html +++ b/index.html @@ -47,7 +47,7 @@ href="https://fonts.googleapis.com/css2?family=Fira+Mono:wght@400;500;700&family=Space+Mono:ital,wght@0,400;0,700;1,400;1,700&display=swap" rel="stylesheet" /> - +