diff --git a/assets/index-CdfIWGO4.js b/assets/index-CPvICklA.js similarity index 60% rename from assets/index-CdfIWGO4.js rename to assets/index-CPvICklA.js index 49d873c..aa20845 100644 --- a/assets/index-CdfIWGO4.js +++ b/assets/index-CPvICklA.js @@ -1,5 +1,5 @@ -import{r as n,j as e,R as k}from"./react-DmpIMwDM.js";import{c as Ct}from"./react-dom-tIxIBQuZ.js";import{c as Et}from"./zustand-BpWCCnYR.js";import{i as vt}from"./sql.js-Ch_tM77n.js";import{F as ce}from"./file-saver-DhbZvGod.js";import{S as Rt,c as de,I as Tt,d as me,e as ue,f as St,g as fe,V as At,L as xe,h as pe,i as Dt,j as Lt,k as he,l as It,G as Ft,m as kt,n as ge,o as Ot,p as Pt,q as Mt,r as be,s as Bt,t as Ut,u as ye,v as Qt,w as $t,x as je,y as Ht,z as Ne,A as we,B as Ce,E as Ee,F as qt,H as ve,J as Re,K as Te,M as Se,N as Ae,Q as De,U as Vt,W as zt}from"./@radix-ui-E10elJI3.js";import{c as Y}from"./class-variance-authority-Bb4qSo10.js";import{c as Gt}from"./clsx-B-dksMZM.js";import{t as _t}from"./tailwind-merge-BkWO730n.js";import{C as Wt,a as Kt,b as Le,c as Yt,d as Xt,A as Jt,e as Zt,f as es,K as ts,g as ss,h as as,i as Ie,T as rs,H as os,j as ns,k as ls,I as is,l as cs,L as ds,m as ms,F as us,P as fs,n as xs,o as ps,M as hs,p as gs,q as bs,R as ys,r as js,s as Ns,S as Fe,t as ws,u as Cs,G as Es,v as vs,Z as Rs,w as Ts,x as Ss,y as As}from"./lucide-react-C1VID-M1.js";import{f as Ds,a as X}from"./date-fns-fqmN70Xj.js";import{f as Ls}from"./sql-formatter-BoZ82dp4.js";import{G as Is,I as Fs,t as ks}from"./@codemirror-CCjSF3Vf.js";import{R as Os,n as Ps}from"./@uiw-CvcbIrPa.js";import{u as Ms}from"./react-dropzone-D-IBOhIS.js";import{J as $,T as Bs}from"./sonner-BJG0sXho.js";import{D as T}from"./vaul-LE4MEETp.js";import"./attr-accept-BWI1aNlo.js";import"./scheduler-CzFDRTuY.js";import"./use-sync-external-store-ByYeed7R.js";import"./aria-hidden-DQ5UC2Eg.js";import"./react-remove-scroll-BOyN_WUU.js";import"./tslib-CuZy2iRz.js";import"./react-remove-scroll-bar-DZjhPxUV.js";import"./react-style-singleton-CpxBwIWS.js";import"./get-nonce-C-Z93AgS.js";import"./use-sidecar-D8_hMcUG.js";import"./use-callback-ref-DRzK4jWO.js";import"./@floating-ui-DdUjdMBw.js";import"./nearley-CG12bGQB.js";import"./@lezer-DgLl1T_N.js";import"./crelt-C8TCjufn.js";import"./style-mod-Bc2inJdb.js";import"./w3c-keyname-Vcq4gwWv.js";import"./@babel-BjXSgPXB.js";import"./prop-types-psm7UO16.js";import"./file-selector-CBHVlu32.js";(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const l of o)if(l.type==="childList")for(const i of l.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function a(o){const l={};return o.integrity&&(l.integrity=o.integrity),o.referrerPolicy&&(l.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?l.credentials="include":o.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function r(o){if(o.ep)return;o.ep=!0;const l=a(o);fetch(o.href,l)}})();const Us="/sql.wasm",Qs=async t=>{try{const[s,a]=await Promise.all([t.arrayBuffer(),vt({locateFile:()=>Us})]);return new a.Database(new Uint8Array(s))}catch(s){throw console.error("Failed to load database:",s),s}},J=t=>{var s;try{return((s=t.exec("SELECT name FROM sqlite_master WHERE type='table';")[0])==null?void 0:s.values.flat())||[]}catch(a){return console.error("Failed to get table names:",a),[]}},$s=async(t,s)=>{try{const[a,r]=t.exec(` +import{r as l,j as e,R as k}from"./react-DmpIMwDM.js";import{c as Ct}from"./react-dom-tIxIBQuZ.js";import{c as Et}from"./zustand-BpWCCnYR.js";import{i as vt}from"./sql.js-Ch_tM77n.js";import{F as ce}from"./file-saver-DhbZvGod.js";import{S as Rt,c as de,I as Tt,d as ue,e as me,f as St,g as fe,V as At,L as xe,h as pe,i as Dt,j as Lt,k as he,l as It,G as Ft,m as kt,n as ge,o as Ot,p as Pt,q as Mt,r as be,s as Bt,t as Ut,u as ye,v as Qt,w as $t,x as je,y as Ht,z as Ne,A as we,B as Ce,E as Ee,F as qt,H as ve,J as Re,K as Te,M as Se,N as Ae,Q as De,U as Vt,W as zt}from"./@radix-ui-E10elJI3.js";import{c as Y}from"./class-variance-authority-Bb4qSo10.js";import{c as Gt}from"./clsx-B-dksMZM.js";import{t as Wt}from"./tailwind-merge-BkWO730n.js";import{C as _t,a as Kt,b as Le,c as Yt,d as Xt,A as Jt,e as Zt,f as es,K as ts,g as ss,h as as,i as Ie,T as rs,H as os,j as ls,k as ns,I as is,l as cs,L as ds,m as us,F as ms,P as fs,n as xs,o as ps,M as hs,p as gs,q as bs,R as ys,r as js,s as Ns,S as Fe,t as ws,u as Cs,G as Es,v as vs,Z as Rs,w as Ts,x as Ss,y as As}from"./lucide-react-C1VID-M1.js";import{f as Ds,a as X}from"./date-fns-fqmN70Xj.js";import{f as Ls}from"./sql-formatter-BoZ82dp4.js";import{G as Is,I as Fs,t as ks}from"./@codemirror-CCjSF3Vf.js";import{R as Os,n as Ps}from"./@uiw-CvcbIrPa.js";import{u as Ms}from"./react-dropzone-D-IBOhIS.js";import{J as $,T as Bs}from"./sonner-BJG0sXho.js";import{D as T}from"./vaul-LE4MEETp.js";import"./attr-accept-BWI1aNlo.js";import"./scheduler-CzFDRTuY.js";import"./use-sync-external-store-ByYeed7R.js";import"./aria-hidden-DQ5UC2Eg.js";import"./react-remove-scroll-BOyN_WUU.js";import"./tslib-CuZy2iRz.js";import"./react-remove-scroll-bar-DZjhPxUV.js";import"./react-style-singleton-CpxBwIWS.js";import"./get-nonce-C-Z93AgS.js";import"./use-sidecar-D8_hMcUG.js";import"./use-callback-ref-DRzK4jWO.js";import"./@floating-ui-DdUjdMBw.js";import"./nearley-CG12bGQB.js";import"./@lezer-DgLl1T_N.js";import"./crelt-C8TCjufn.js";import"./style-mod-Bc2inJdb.js";import"./w3c-keyname-Vcq4gwWv.js";import"./@babel-BjXSgPXB.js";import"./prop-types-psm7UO16.js";import"./file-selector-CBHVlu32.js";(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const n of o)if(n.type==="childList")for(const i of n.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function a(o){const n={};return o.integrity&&(n.integrity=o.integrity),o.referrerPolicy&&(n.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?n.credentials="include":o.crossOrigin==="anonymous"?n.credentials="omit":n.credentials="same-origin",n}function r(o){if(o.ep)return;o.ep=!0;const n=a(o);fetch(o.href,n)}})();const Us="/sql.wasm",Qs=async t=>{try{const[s,a]=await Promise.all([t.arrayBuffer(),vt({locateFile:()=>Us})]);return new a.Database(new Uint8Array(s))}catch(s){throw console.error("Failed to load database:",s),s}},J=t=>{var s;try{return((s=t.exec("SELECT name FROM sqlite_master WHERE type='table';")[0])==null?void 0:s.values.flat())||[]}catch(a){return console.error("Failed to get table names:",a),[]}},$s=async(t,s)=>{try{const[a,r]=t.exec(` PRAGMA table_info("${s}"); PRAGMA foreign_key_list("${s}"); - `),o=a.values.reduce((l,i)=>(l[i[1]]={type:i[2]?i[2].toUpperCase():i[2],isPrimaryKey:i[5]===1,isForeignKey:!1,nullable:i[3]===0},l),{});return r==null||r.values.forEach(l=>{const i=l[3];o[i]&&(o[i].isForeignKey=!0)}),o}catch(a){throw console.error(`Failed to get schema for table "${s}":`,a),a}},_=t=>{if(t.length===0)return{data:[],columns:[]};const{columns:s,values:a}=t[0];return{data:a.map(o=>Object.fromEntries(s.map((l,i)=>[l,o[i]]))),columns:s}},Hs=t=>{try{const s=t.export(),a=new Blob([s],{type:"application/x-sqlite3"});ce.saveAs(a,"database.sqlite")}catch(s){throw console.error("Failed to export database:",s),s}},qs=(t,s)=>{const a=t.map(o=>`"${o}"`).join(","),r=s.map(o=>t.map(l=>`"${o[l]??""}"`).join(","));return[a,...r].join(` -`)},Z=(t,s,a)=>{try{const r=s.exec(t);if(r.length===0)throw new Error(`Query "${t}" returned no results.`);const{data:o,columns:l}=_(r),i=qs(l,o),m=new Blob([i],{type:"text/csv;charset=utf-8;"});ce.saveAs(m,`${a}.csv`)}catch(r){throw console.error(`Failed to get CSV for query "${t}":`,r),r}},Vs=(t,s)=>{const r=J(t)[s],o=`SELECT * FROM "${r}"`;Z(o,t,r)},zs=t=>{J(t).forEach(s=>{const a=`SELECT * FROM "${s}"`;Z(a,t,s)})},Gs=(t,s)=>{Z(s,t,"custom_query")},j=Et((t,s)=>({db:null,isLoading:!1,loadDatabase:async a=>{t({isLoading:!0,queryError:null});try{const r=await Qs(a),o=J(r),l=await Promise.all(o.map(async c=>{const f=r.exec(`SELECT COUNT(*) FROM "${c}"`),x=parseInt(f[0].values[0][0],10),p=await $s(r,c);return{name:c,count:x,schema:p}})),i=l.map(({name:c,count:f})=>({name:c,count:f})),m=l.reduce((c,{name:f,schema:x})=>(c[f]=x,c),{});t({db:r,tables:i,tableSchemas:m,isLoading:!1})}catch(r){throw console.error("Failed to load database:",r),t({isLoading:!1,queryError:"Failed to load database"}),r}},tables:[],setTables:a=>t({tables:a}),selectedTable:"0",setSelectedTable:a=>t({selectedTable:a}),tableSchemas:{},customQuery:"",setIsCustomQuery:a=>t({isCustomQuery:a}),setCustomQuery:a=>t({customQuery:a}),isCustomQuery:!1,queryError:null,setQueryError:a=>t({queryError:a}),query:a=>{const{db:r}=s();return r?r.exec(a):(console.warn("Database is not loaded."),[])},rowPerPageOrAuto:"auto",setRowPerPageOrAuto:a=>t({rowPerPageOrAuto:a}),queryHistory:[],unShiftToQueryHistory:a=>t(r=>({queryHistory:[a,...r.queryHistory]})),expandPage:!1,setExpandPage:a=>t({expandPage:a}),dateFormatValue:"formatDateFormatted",setDateFormatValue:a=>t({dateFormatValue:a}),filters:{},setFilters:a=>t({filters:a}),appendToFilters:(a,r)=>t(o=>({filters:{...o.filters,[a]:r}})),filtersNeedClear:!1,setFiltersNeedClear:a=>t({filtersNeedClear:a}),totalRows:0,setTotalRows:a=>t({totalRows:a}),orderBy:null,setOrderBy:a=>t({orderBy:a}),orderByDirection:"ASC",setOrderByDirection:a=>t({orderByDirection:a})}));function _s(t,s,a){const{db:r,setQueryError:o,setIsCustomQuery:l,query:i,unShiftToQueryHistory:m,customQuery:c,setCustomQuery:f,filters:x,totalRows:p,setTotalRows:g,orderBy:u,orderByDirection:h,selectedTable:w,tables:C}=j(),[N,E]=n.useState([]),[L,v]=n.useState([]),[S,D]=n.useState(!0),I=n.useMemo(()=>Object.fromEntries(Object.entries(x).filter(([,b])=>b!=="")),[x]),A=n.useMemo(()=>Object.entries(I).map(([b,R])=>`LOWER(${b}) LIKE LOWER('%${R}%')`).join(" AND "),[I]);n.useEffect(()=>{if(!r||!t)return;(async()=>{D(!0);try{const R=`PRAGMA table_info("${t}");`,U=i(R)[0].values.map(F=>({name:F[1],type:F[2]})).map(F=>F.type.toUpperCase()==="BLOB"?`hex(${F.name}) as ${F.name}`:F.name).join(", "),bt=`SELECT COUNT(*) as count FROM "${t}"${A?` WHERE ${A}`:""}`,yt=i(bt)[0].values[0][0];g(yt);let O=`SELECT ${U} FROM "${t}"`;A&&(O+=` WHERE ${A}`),u&&(O+=` ORDER BY "${u}" ${h}`),O+=` LIMIT ${s} OFFSET ${a};`;const jt=i(O),{data:Nt,columns:wt}=_(jt);v(wt),E(Nt),o(null),f(O),m(O)}catch(R){R instanceof Error&&o(R.message)}finally{D(!1)}})()},[r,t,a,s,A,h]);const z=n.useCallback(()=>{if(c.trim()===""){o(null);return}D(!0);try{const b=C[parseInt(w)].name,R=i(c.replace("@",`"${b}"`)),{data:M,columns:B}=_(R);v(B),E(M),l(!0),o(null)}catch(b){b instanceof Error&&o(b.message)}finally{D(!1)}},[c,i,o,l,C,w]);return{data:N,columns:L,customQuery:c,setCustomQuery:f,isQueryLoading:S,handleCustomQuery:z,totalRows:p}}function Ws(t){const{setIsCustomQuery:s}=j(),[a,r]=n.useState(0);n.useEffect(()=>{r(0),s(!1)},[s]);const o=n.useMemo(()=>{if(t!=="auto")return t;const l=window.innerHeight,f=Math.min(2e3,40+l*.03),x=Math.max(1,Math.floor(l/f));return Math.min(Math.max(x,5),50)},[t]);return{page:a,setPage:r,rowsPerPage:o}}const ee=Y("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"}});function d(...t){return _t(Gt(t))}const y=n.forwardRef(({className:t,variant:s,size:a,asChild:r=!1,...o},l)=>{const i=r?Rt:"button";return e.jsx(i,{className:d(ee({variant:s,size:a,className:t})),ref:l,...o})});y.displayName="Button";function Ks({page:t,setPage:s,rowsPerPage:a}){const{totalRows:r}=j(),o=n.useMemo(()=>Math.ceil(r/a),[r,a]),l=n.useMemo(()=>Math.ceil(t/a)+1,[t,a]),i=l1,c=n.useCallback(()=>{i&&s(x=>x+a)},[i,a,s]),f=n.useCallback(()=>{m&&s(x=>x-a)},[m,a,s]);return e.jsx("section",{className:"fixed bottom-2 left-1/2 z-10 w-[270px] -translate-x-1/2 transform",children:e.jsxs("div",{className:"flex justify-between gap-2 rounded border bg-secondary p-[6px]",children:[e.jsx(y,{onClick:f,title:"Previous page",disabled:!m,children:e.jsx(Wt,{className:"h-4 w-4"})}),e.jsxs("span",{className:"flex items-center justify-center text-sm",children:["Page ",l," of ",o]}),e.jsx(y,{onClick:c,title:"Next page",disabled:!i,children:e.jsx(Kt,{className:"h-4 w-4"})})]})})}const Ys=It,Xs=Ft,Js=kt,ke=n.forwardRef(({className:t,children:s,...a},r)=>e.jsxs(de,{ref:r,className:d("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",t),...a,children:[s,e.jsx(Tt,{asChild:!0,children:e.jsx(Le,{className:"h-4 w-4 opacity-50"})})]}));ke.displayName=de.displayName;const Oe=n.forwardRef(({className:t,...s},a)=>e.jsx(me,{ref:a,className:d("flex cursor-default items-center justify-center py-1",t),...s,children:e.jsx(Yt,{className:"h-4 w-4"})}));Oe.displayName=me.displayName;const Pe=n.forwardRef(({className:t,...s},a)=>e.jsx(ue,{ref:a,className:d("flex cursor-default items-center justify-center py-1",t),...s,children:e.jsx(Le,{className:"h-4 w-4"})}));Pe.displayName=ue.displayName;const Me=n.forwardRef(({className:t,children:s,position:a="popper",...r},o)=>e.jsx(St,{children:e.jsxs(fe,{ref:o,className:d("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",a==="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",t),position:a,...r,children:[e.jsx(Oe,{}),e.jsx(At,{className:d("p-1",a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:s}),e.jsx(Pe,{})]})}));Me.displayName=fe.displayName;const Be=n.forwardRef(({className:t,...s},a)=>e.jsx(xe,{ref:a,className:d("py-1.5 pl-8 pr-2 text-sm font-semibold",t),...s}));Be.displayName=xe.displayName;const Ue=n.forwardRef(({className:t,children:s,...a},r)=>e.jsxs(pe,{ref:r,className:d("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",t),...a,children:[e.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:e.jsx(Dt,{children:e.jsx(Xt,{className:"h-4 w-4"})})}),e.jsx(Lt,{children:s})]}));Ue.displayName=pe.displayName;const Zs=n.forwardRef(({className:t,...s},a)=>e.jsx(he,{ref:a,className:d("-mx-1 my-1 h-px bg-muted",t),...s}));Zs.displayName=he.displayName;const ea=Y("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 H({className:t,variant:s,...a}){return e.jsx("div",{className:d(ea({variant:s}),t),...a,children:e.jsx("span",{className:"w-full",children:a.children})})}function ta(){const{tables:t,selectedTable:s,setSelectedTable:a,setIsCustomQuery:r}=j(),o=n.useMemo(()=>{var c;const m=parseInt(s);return isNaN(m)?0:((c=t[m])==null?void 0:c.count)||0},[t,s]),l=n.useMemo(()=>t.map((m,c)=>e.jsx(Ue,{value:`${c}`,children:m.name[0].toUpperCase()+m.name.slice(1)},m.name)),[t]);function i(m){r(!1),a(m)}return e.jsxs("section",{className:"flex grow items-center justify-center gap-1",children:[e.jsxs(Ys,{value:s,onValueChange:i,children:[e.jsx(ke,{className:"grow",children:e.jsx(Js,{placeholder:"Select a table"})}),e.jsx(Me,{children:e.jsxs(Xs,{children:[e.jsx(Be,{children:"Tables"}),l]})})]}),e.jsx(H,{title:"Rows",className:"hidden min-w-[100px] grow bg-background py-2 text-center text-sm md:block md:min-w-[200px]",variant:"outline",children:e.jsx("span",{className:"w-full text-center",children:o})})]})}const V=t=>t instanceof Date&&!isNaN(t.getTime()),sa=t=>{const s=new Date(t);return V(s)?Ds(s,{addSuffix:!0}):t},aa=t=>{const s=new Date(t);return V(s)?X(s,"MMMM do, yyyy"):t},ra=t=>{const s=new Date(t);return V(s)?X(s,"MM/dd/yyyy"):t},oa=t=>{const s=new Date(t);return V(s)?X(s,"yyyy/dd/MM"):t},W={formatDateRelative:{label:"Over 56 years ago",func:sa},formatDateFormatted:{label:"January 9th, 1968",func:aa},formatDateLong:{label:"1968/09/01",func:oa},formatDateShort:{label:"01/09/1968",func:ra}},Qe=t=>t.includes("DATE")||t==="TIMESTAMP",na=t=>t==="BLOB",la=t=>t.includes("CHAR")||t.includes("TEXT")||t==="CLOB"||t.includes("VARCHAR"),ia=t=>t.includes("INT"),ca=t=>t.includes("REAL")||t.includes("FLOAT")||t.includes("DOUBLE")||t.includes("DECIMAL"),da=t=>t.includes("NUMERIC"),ma=t=>ia(t)||ca(t)||da(t),ua=t=>t.includes("BOOL"),$e=Ot,He=Pt,te=n.forwardRef(({className:t,align:s="start",side:a="bottom",sideOffset:r=4,...o},l)=>e.jsx(ge,{ref:l,align:s,side:a,sideOffset:r,className:d("z-50 w-64 text-balance break-words 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",t),...o}));te.displayName=ge.displayName;const qe=n.forwardRef(({className:t,...s},a)=>e.jsx("div",{className:"relative w-full overflow-auto",children:e.jsx("table",{ref:a,className:d("w-full caption-bottom text-sm",t),...s})}));qe.displayName="Table";const Ve=n.forwardRef(({className:t,...s},a)=>e.jsx("thead",{ref:a,className:d("[&_tr]:border-b",t),...s}));Ve.displayName="TableHeader";const ze=n.forwardRef(({className:t,...s},a)=>e.jsx("tbody",{ref:a,className:d("[&_tr:last-child]:border-0",t),...s}));ze.displayName="TableBody";const fa=n.forwardRef(({className:t,...s},a)=>e.jsx("tfoot",{ref:a,className:d("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",t),...s}));fa.displayName="TableFooter";const K=n.forwardRef(({className:t,...s},a)=>e.jsx("tr",{ref:a,className:d("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",t),...s}));K.displayName="TableRow";const Ge=n.forwardRef(({className:t,...s},a)=>e.jsx("th",{ref:a,className:d("h-12 min-w-[150px] px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",t),...s}));Ge.displayName="TableHead";const xa=t=>{const s=new Uint8Array(t.match(/.{1,2}/g).map(r=>parseInt(r,16))),a=new Blob([s],{type:"image/jpeg"});return URL.createObjectURL(a)},_e=n.forwardRef(({className:t,children:s,dataType:a,...r},o)=>{const l=(a==null?void 0:a.toUpperCase())==="BLOB",i=n.useMemo(()=>typeof s=="string"&&s.length>40?s.slice(0,40)+"...":s,[s]);return e.jsx("td",{ref:o,className:d("max-w-[200px] overflow-hidden truncate text-ellipsis whitespace-nowrap p-4 align-middle [&:has([role=checkbox])]:pr-0",t),...r,children:e.jsxs($e,{children:[e.jsx(He,{asChild:!0,children:e.jsx("span",{className:"cursor-pointer hover:underline",children:l?e.jsx("span",{className:"italic opacity-40",children:"BLOB"}):i})}),e.jsx(te,{side:"bottom",align:"start",children:e.jsxs("div",{className:"flex flex-col justify-center gap-1",children:[l&&typeof s=="string"?e.jsxs(e.Fragment,{children:[e.jsx("img",{src:xa(s),alt:"BLOB content",className:"flex max-h-40 flex-col items-center justify-center gap-2 rounded object-contain",onError:m=>{m.currentTarget.style.display="none"}}),e.jsxs("span",{className:"text-sm text-muted-foreground",children:["Blob length: ",s.length]})]}):e.jsx("span",{className:"max-w-full break-words",children:s}),e.jsx(H,{className:"w-full self-start text-center text-xs font-semibold",children:a||"Unknown"})]})})]})})});_e.displayName="TableCell";const pa=n.forwardRef(({className:t,...s},a)=>e.jsx("caption",{ref:a,className:d("mt-4 text-sm text-muted-foreground",t),...s}));pa.displayName="TableCaption";const se=n.forwardRef(({className:t,type:s,...a},r)=>e.jsx("input",{type:s,className:d("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",t),ref:r,...a}));se.displayName="Input";function ha({columnName:t}){const{appendToFilters:s,selectedTable:a,filtersNeedClear:r,setFiltersNeedClear:o}=j(),[l,i]=n.useState("");n.useEffect(()=>{i("")},[a]),n.useEffect(()=>{r&&(i(""),o(!1))},[r]);const m=n.useCallback(c=>{const f=c.target.value;i(f),s(t,f)},[s,t]);return e.jsx(se,{value:l,onChange:m,className:"mt-[2px] max-h-7 w-full text-xs",placeholder:"Filter"})}function ga({columnName:t}){const{orderBy:s,setOrderBy:a,orderByDirection:r,setOrderByDirection:o}=j(),l=n.useCallback(()=>{s===t?r==="ASC"?o("DESC"):r==="DESC"?(a(null),o("ASC")):(a(t),o("ASC")):(a(t),o("ASC"))},[s,r,t,a,o]);return e.jsx("div",{onClick:l,className:"flex items-center",children:s===t?r==="ASC"?e.jsx("button",{title:"Descending",children:e.jsx(Jt,{className:"h-4 w-4"})}):e.jsx("button",{title:"Ascending",children:e.jsx(Zt,{className:"h-4 w-4"})}):e.jsx("button",{title:"Sort column",children:e.jsx(es,{className:"h-4 w-4"})})})}const ba=k.memo(({columnSchema:t})=>e.jsxs(e.Fragment,{children:[(t==null?void 0:t.isPrimaryKey)&&e.jsx("p",{className:"text-sm font-semibold text-yellow-600",children:"(Primary)"}),(t==null?void 0:t.isForeignKey)&&e.jsx("p",{className:"text-sm font-semibold text-purple-600",children:"(Foreign)"})]})),ya=k.memo(({columnSchema:t})=>{const{type:s,isPrimaryKey:a,isForeignKey:r}=t;if(a)return e.jsx(ts,{className:"h-4 w-4 text-yellow-500"});if(r)return e.jsx(ss,{className:"h-4 w-4 text-purple-500"});if(s){if(na(s))return e.jsx(as,{className:"h-4 w-4 text-green-500"});if(Qe(s))return e.jsx(Ie,{className:"h-4 w-4 text-blue-500"});if(la(s))return e.jsx(rs,{className:"h-4 w-4 text-indigo-500"});if(ma(s))return e.jsx(os,{className:"h-4 w-4 text-red-500"});if(ua(s))return e.jsx(ns,{className:"h-4 w-4 text-pink-500"})}return e.jsx(ls,{className:"h-4 w-4 text-gray-500"})}),ja=k.memo(({columnName:t,columnSchema:s})=>e.jsxs(Ge,{className:"bg-gray-100 py-2 dark:bg-gray-700",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(ga,{columnName:t}),e.jsxs($e,{children:[e.jsx(He,{asChild:!0,children:e.jsxs("div",{className:"flex cursor-pointer items-center space-x-1",children:[e.jsx("span",{className:"max-w-[200px] overflow-hidden truncate text-ellipsis whitespace-nowrap",children:t}),s&&e.jsx(ya,{columnSchema:s})]})}),e.jsxs(te,{className:"w-64",children:[e.jsxs("div",{className:"mb-1 flex items-center space-x-1",children:[e.jsx("p",{className:"text-sm font-medium",children:t}),e.jsx(ba,{columnSchema:s})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(H,{className:"w-full self-start text-center text-xs font-semibold",children:(s==null?void 0:s.type)||"Unknown"}),(s==null?void 0:s.nullable)&&e.jsx(H,{className:"w-full self-start text-center text-xs font-semibold",children:"NULLABLE"})]})]})]})]}),e.jsx(ha,{columnName:t})]})),Na=k.memo(({value:t,dataType:s})=>{const{dateFormatValue:a}=j(),r=()=>t?s&&Qe(s)&&W[a]?W[a].func(t):t:e.jsx("span",{className:"italic text-gray-400",children:"NULL"});return e.jsx(_e,{dataType:s,className:"px-5 py-[11px] text-sm",children:r()})});function wa({data:t,columns:s,tableName:a,tableSchemas:r}){const{filters:o,setFiltersNeedClear:l,setFilters:i}=j(),m=n.useMemo(()=>e.jsx(Ve,{children:e.jsx(K,{children:s.map((x,p)=>e.jsx(ja,{columnName:x,columnSchema:r[a][x]},p))})}),[s,r,a]),c=n.useMemo(()=>e.jsx(ze,{children:t.map((x,p)=>e.jsx(K,{children:s.map((g,u)=>{var h;return e.jsx(Na,{value:x[g],dataType:(h=r[a][g])==null?void 0:h.type},u)})},p))}),[t,s,r,a]),f=n.useCallback(()=>{l(!0),i({})},[l,i]);return e.jsxs("div",{className:"overflow-x-auto",children:[e.jsxs(qe,{children:[m,t.length>0&&c]}),t.length===0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"w-full p-4 text-center font-medium",children:["No data available for ",a]}),Object.keys(o).length>0&&e.jsx(y,{className:"w-full rounded-none",variant:"outline",onClick:f,children:"Clear filters"})]})]})}function Q({type:t,children:s,className:a=""}){const r="flex items-center p-4 rounded-lg shadow-md";let o,l;switch(t){case"error":o=e.jsx(ms,{className:"mr-3 h-6 w-6 text-red-500"}),l="bg-red-100 text-red-800 border-l-4 border-red-500";break;case"loading":o=e.jsx(ds,{className:"mr-3 h-6 w-6 animate-spin text-blue-500"}),l="bg-blue-100 text-blue-800 border-l-4 border-blue-500";break;case"success":o=e.jsx(cs,{className:"mr-3 h-6 w-6 text-green-500"}),l="bg-green-100 text-green-800 border-l-4 border-green-500";break;case"info":o=e.jsx(is,{className:"mr-3 h-6 w-6 text-yellow-500"}),l="bg-yellow-100 text-yellow-800 border-l-4 border-yellow-500";break;default:o=null,l=""}return e.jsxs("div",{className:`${r} ${l} ${a}`,children:[o,e.jsx("span",{className:"font-medium",children:s})]})}const Ca=Bt,Ea=Ut,We=n.forwardRef(({className:t,align:s="center",sideOffset:a=4,...r},o)=>e.jsx(Mt,{children:e.jsx(be,{ref:o,align:s,sideOffset:a,className:d("z-50 w-72 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",t),...r})}));We.displayName=be.displayName;function va(){const{selectedTable:t,tables:s,customQuery:a,db:r}=j(),o=n.useCallback((i,m,c,f)=>e.jsx(y,{className:f,onClick:i,title:c,children:e.jsx("span",{className:"ml-2",children:m})}),[]),l=n.useMemo(()=>{var i;return r&&e.jsxs("div",{className:"flex flex-col gap-1",children:[o(()=>Hs(r),"Export as SQLite","Download database as SQLite"),o(()=>Vs(r,parseInt(t)),`Export ${((i=s[parseInt(t)])==null?void 0:i.name)||"selected"} table as CSV`,"Export selected table as CSV"),o(()=>zs(r),"Export all tables as CSV","Export all tables as CSV"),o(()=>Gs(r,a),"Export custom query as CSV","Export the result of the custom query as CSV")]})},[r,o,t,s,a]);return e.jsxs(Ca,{children:[e.jsx(Ea,{asChild:!0,children:e.jsx(y,{title:"Open export options",children:e.jsx(us,{className:"h-5 w-5"})})}),e.jsx(We,{align:"end",className:"w-80",children:l})]})}function Ra(){const[t,s]=n.useState(()=>document.body.classList.contains("dark"));return n.useEffect(()=>{const a=new MutationObserver(()=>{s(document.body.classList.contains("dark"))});return a.observe(document.body,{attributes:!0,attributeFilter:["class"]}),()=>a.disconnect()},[]),t}const Ta=["ABORT","ACTION","ADD","AFTER","ALL","ALTER","ANALYZE","AND","AS","ASC","ATTACH","AUTOINCREMENT","BEFORE","BEGIN","BETWEEN","BY","CASCADE","CASE","CAST","CHECK","COLLATE","COLUMN","COMMIT","CONFLICT","CONSTRAINT","CREATE","CROSS","CURRENT_DATE","CURRENT_TIME","CURRENT_TIMESTAMP","DATABASE","DEFAULT","DEFERRABLE","DEFERRED","DELETE","DESC","DETACH","DISTINCT","DROP","EACH","ELSE","END","ESCAPE","EXCEPT","EXCLUSIVE","EXISTS","EXPLAIN","FAIL","FOR","FOREIGN","FROM","FULL","GLOB","GROUP","HAVING","IF","IGNORE","IMMEDIATE","IN","INDEX","INDEXED","INITIALLY","INNER","INSERT","INSTEAD","INTERSECT","INTO","IS","ISNULL","JOIN","KEY","LEFT","LIKE","LIMIT","MATCH","NATURAL","NO","NOT","NOTNULL","NULL","OF","OFFSET","ON","OR","ORDER","OUTER","PLAN","PRAGMA","PRIMARY","QUERY","RAISE","RECURSIVE","REFERENCES","REGEXP","REINDEX","RELEASE","RENAME","REPLACE","RESTRICT","RIGHT","ROLLBACK","ROW","SAVEPOINT","SELECT","SET","TABLE","TEMP","TEMPORARY","THEN","TO","TRANSACTION","TRIGGER","UNION","UNIQUE","UPDATE","USING","VACUUM","VALUES","VIEW","VIRTUAL","WHEN","WHERE","WITH","WITHOUT"];function Sa({columnNames:t}){const{customQuery:s,setCustomQuery:a,queryHistory:r,tables:o}=j(),l=Ra();n.useEffect(()=>{a(re(s))},[r]);const i=n.useCallback(x=>{const p=x.matchBefore(/\w*/);if(!p||p.from===p.to&&!x.explicit)return null;const g=[...Ta.map(u=>({label:u,type:"keyword"})),...o.map(u=>({label:u.name,type:"table"})),...t.map(u=>({label:u,type:"column"}))];return{from:p.from,to:p.to,options:g}},[o,t]),m=n.useCallback(()=>{a(re(s))},[s,a]),c=n.useCallback(x=>{a(x)},[a]),f=n.useMemo(()=>[Is,Fs(),ks({override:[i]})],[i]);return e.jsx(Os,{value:s,height:"126px",extensions:f,onChange:c,onBlur:m,className:"rounded-md border",theme:l?Ps:"light"})}function re(t){return Ls(t,{language:"sqlite",useTabs:!1,keywordCase:"upper",tabWidth:2,expressionWidth:100,linesBetweenQueries:1})}function Aa(){const{tables:t,selectedTable:s,tableSchemas:a,queryError:r,setQueryError:o,rowPerPageOrAuto:l,isCustomQuery:i,setIsCustomQuery:m,customQuery:c,setCustomQuery:f,expandPage:x,setExpandPage:p,filters:g,setFilters:u,setOrderBy:h,setFiltersNeedClear:w}=j(),{page:C,setPage:N,rowsPerPage:E}=Ws(l),L=n.useMemo(()=>{var U;return(U=t[parseInt(s)])==null?void 0:U.name},[t,s]),{data:v,columns:S,isQueryLoading:D,handleCustomQuery:I}=_s(L,E,C),[A,z]=n.useState([]);n.useEffect(()=>{S.length>0&&z(S)},[L,S]);const b=n.useCallback(()=>{o(null),f(""),m(!1),u({}),w(!0)},[m,o,f]),R=n.useCallback(()=>{N(0),b()},[b,N]);n.useEffect(()=>{N(0),u({}),h(null)},[s]),n.useEffect(()=>{N(0)},[g]);const M=n.useMemo(()=>e.jsxs("div",{className:"flex flex-col gap-1 md:flex-row",children:[e.jsx("div",{className:"flex-grow",children:e.jsx(Sa,{columnNames:A})}),e.jsxs("div",{className:"flex flex-row gap-1 md:flex-col",children:[e.jsx(y,{className:"grow",onClick:I,title:"Run custom query",children:e.jsx(fs,{className:"h-5 w-5"})}),e.jsx(y,{className:"grow",onClick:b,title:"Remove query",children:e.jsx(xs,{className:"h-5 w-5"})}),e.jsx(y,{className:"grow",onClick:R,title:"Reset to first page",disabled:C===0,children:e.jsx(ps,{className:"h-5 w-5"})})]})]}),[c,I,b,R,C]),B=n.useMemo(()=>D?e.jsxs(Q,{type:"loading",children:["Loading ",L]}):e.jsx("div",{className:"mb-[40px] overflow-hidden rounded-lg border border-gray-200 dark:border dark:border-gray-700",children:e.jsx(wa,{data:v,columns:A.length>0?A:S,tableName:L,tableSchemas:a})}),[D,v,S,L,a,g,A]);return e.jsxs("div",{className:"flex flex-col gap-3 pb-8",children:[e.jsxs("section",{className:"rounded-lg bg-gray-100 p-4 shadow-sm dark:bg-gray-700",children:[e.jsxs("div",{className:"mb-[5px] flex items-center justify-between gap-1",children:[e.jsx(ta,{}),e.jsxs("div",{className:"flex items-center justify-center gap-1",children:[e.jsx(va,{}),e.jsx(y,{className:"hidden expand:block",onClick:()=>p(!x),title:"Toggle page size",children:x?e.jsx(hs,{className:"h-5 w-5"}):e.jsx(gs,{className:"h-5 w-5"})})]})]}),M,r&&e.jsx("p",{className:"mt-2 text-center text-sm text-red-500 dark:text-red-400",children:r})]}),B,!i&&e.jsx(Ks,{page:C,setPage:N,rowsPerPage:E})]})}const Ke=(t,s)=>localStorage.getItem(t)||s,Ye=(t,s)=>localStorage.setItem(t,s),oe=(t,s)=>{const[a,r]=n.useState(()=>Ke(t,s));return n.useEffect(()=>{Ye(t,a)},[t,a]),[a,r]},Xe=({shouldScaleBackground:t=!0,...s})=>e.jsx(T.Root,{shouldScaleBackground:t,...s});Xe.displayName="Drawer";const Da=T.Trigger,La=T.Portal,Ia=T.Close,Je=n.forwardRef(({className:t,...s},a)=>e.jsx(T.Overlay,{ref:a,className:d("fixed inset-0 z-50 bg-black/80",t),...s}));Je.displayName=T.Overlay.displayName;const Ze=n.forwardRef(({className:t,children:s,...a},r)=>e.jsxs(La,{children:[e.jsx(Je,{}),e.jsxs(T.Content,{ref:r,className:d("fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background",t),...a,children:[e.jsx("div",{className:"mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted"}),s]})]}));Ze.displayName="DrawerContent";const et=({className:t,...s})=>e.jsx("div",{className:d("grid gap-1.5 p-4 text-center sm:text-left",t),...s});et.displayName="DrawerHeader";const tt=({className:t,...s})=>e.jsx("div",{className:d("mt-auto flex flex-col gap-2 pb-4",t),...s});tt.displayName="DrawerFooter";const st=n.forwardRef(({className:t,...s},a)=>e.jsx(T.Title,{ref:a,className:d("text-lg font-semibold leading-none tracking-tight",t),...s}));st.displayName=T.Title.displayName;const at=n.forwardRef(({className:t,...s},a)=>e.jsx(T.Description,{ref:a,className:d("text-sm text-muted-foreground",t),...s}));at.displayName=T.Description.displayName;const rt=n.forwardRef(({className:t,children:s,...a},r)=>e.jsxs(ye,{ref:r,className:d("relative overflow-hidden",t),...a,children:[e.jsx(Qt,{className:"h-full w-full rounded-[inherit]",children:s}),e.jsx(ot,{}),e.jsx($t,{})]}));rt.displayName=ye.displayName;const ot=n.forwardRef(({className:t,orientation:s="vertical",...a},r)=>e.jsx(je,{ref:r,orientation:s,className:d("flex touch-none select-none transition-colors",s==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",s==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",t),...a,children:e.jsx(Ht,{className:"relative flex-1 rounded-full bg-border"})}));ot.displayName=je.displayName;const nt=n.forwardRef(({className:t,orientation:s="horizontal",decorative:a=!0,...r},o)=>e.jsx(Ne,{ref:o,decorative:a,orientation:s,className:d("shrink-0 bg-border",s==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",t),...r}));nt.displayName=Ne.displayName;const Fa=Y("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),lt=n.forwardRef(({className:t,...s},a)=>e.jsx(we,{ref:a,className:d(Fa(),t),...s}));lt.displayName=we.displayName;const ae=n.forwardRef(({className:t,...s},a)=>e.jsx(Ce,{className:d("grid gap-2",t),...s,ref:a}));ae.displayName=Ce.displayName;const it=n.forwardRef(({className:t,...s},a)=>e.jsx(Ee,{ref:a,className:d("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t),...s,children:e.jsx(qt,{className:"flex items-center justify-center",children:e.jsx(bs,{className:"h-2.5 w-2.5 fill-current text-current"})})}));it.displayName=Ee.displayName;const q=({value:t,label:s})=>e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(it,{value:t,id:`r-${t}`}),e.jsx(lt,{htmlFor:`r-${t}`,children:s})]}),ka=({rowsPerPage:t,onRowsPerPageChange:s})=>{const a=t==="auto";return e.jsxs("div",{className:"flex h-full grow flex-col gap-1",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(ys,{className:"h-4 w-4"}),e.jsx("p",{className:"text-sm font-medium",children:"Rows Per Page"})]}),e.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-1 rounded border p-2",children:[e.jsx(se,{id:"rowsPerPage",value:a?"":t,onChange:r=>s(r.target.value),placeholder:"Number of rows",type:"number",className:"w-full",autoFocus:!1}),e.jsx(y,{variant:a?"secondary":"outline",onClick:()=>s("auto"),className:"w-full whitespace-nowrap",children:"Auto Calculate"})]})]})},Oa=({dateFormatValue:t,onDateFormatChange:s})=>e.jsxs("div",{className:"flex h-full grow flex-col gap-1",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(Ie,{className:"h-4 w-4"}),e.jsx("p",{className:"text-sm font-medium",children:"Date Format"})]}),e.jsx("div",{className:"h-full rounded border p-2",children:e.jsxs(ae,{className:"flex h-full flex-col gap-2",name:"dateType",value:t,onValueChange:s,children:[e.jsx(q,{value:"default",label:"Default"}),Object.entries(W).map(([a,{label:r}])=>e.jsx(q,{value:a,label:r},a))]})})]}),Pa=({themeColor:t,onThemeColorChange:s,themeColors:a})=>e.jsxs("div",{className:"flex grow flex-col gap-1",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(js,{className:"h-4 w-4"}),e.jsx("p",{className:"text-sm font-medium",children:"Theme Color"})]}),e.jsxs(ae,{className:"flex flex-col gap-2 rounded border p-2",name:"themeColor",value:t,onValueChange:s,children:[e.jsx(q,{value:"default",label:"Default"}),a.map(r=>e.jsx(q,{value:r,label:r[0].toUpperCase()+r.slice(1)},r))]})]}),Ma=({queryHistory:t})=>e.jsxs("div",{className:"flex grow flex-col gap-1",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(Ns,{className:"h-4 w-4"}),e.jsxs("p",{className:"text-sm font-medium",children:["Query History (",t.length,")"]})]}),e.jsx(rt,{className:"h-[155px] rounded-md border font-medium",children:e.jsx("div",{className:"p-4",children:t.map((s,a)=>e.jsxs("div",{children:[e.jsx("div",{className:"text-sm font-normal",children:s}),e.jsx(nt,{className:"my-2"})]},a))})})]}),Ba="rowsPerPage",ne="dateFormat",Ua="theme-color",le=["nord","zinc"];function Qa(){const{setRowPerPageOrAuto:t,setIsCustomQuery:s,queryHistory:a,dateFormatValue:r,setDateFormatValue:o}=j(),[l,i]=oe(Ba,"auto"),[m,c]=oe(Ua,"default"),f=l==="auto";n.useEffect(()=>{t(f?"auto":Number(l))},[l,t]),n.useEffect(()=>{o(Ke(ne,"default"))},[o]),n.useEffect(()=>{le.forEach(u=>{var h;return(h=document.body)==null?void 0:h.classList.toggle(u,u===m)})},[m]);const x=n.useCallback(u=>{s(!1),u==="auto"||Number(u)>0?i(u):$.error("Please provide a positive number of rows per page or set it to auto.")},[s,i]),p=n.useCallback(u=>{o(u),Ye(ne,u)},[o]),g=n.useCallback(u=>{c(u)},[c]);return e.jsxs(Xe,{children:[e.jsx(Da,{asChild:!0,children:e.jsx(y,{className:"grow",title:"Open settings drawer",children:e.jsx(Fe,{className:"h-5 w-5"})})}),e.jsxs(Ze,{children:[e.jsxs(et,{className:"hidden",children:[e.jsx(st,{children:"Settings"}),e.jsx(at,{children:"Change settings."})]}),e.jsxs("div",{className:"mx-auto flex w-full max-w-sm flex-col gap-3",children:[e.jsx(ka,{rowsPerPage:l,onRowsPerPageChange:x}),e.jsx(Pa,{themeColor:m,onThemeColorChange:g,themeColors:le}),e.jsx(Oa,{dateFormatValue:r,onDateFormatChange:p}),e.jsx(Ma,{queryHistory:a}),e.jsx(tt,{children:e.jsx(Ia,{asChild:!0,children:e.jsx(y,{variant:"outline",children:"Cancel"})})})]})]})]})}const G="theme-mode",ie="animate-circular-reveal";function ct(){const[t,s]=n.useState(()=>{const o=localStorage.getItem(G),l=window.matchMedia("(prefers-color-scheme: dark)").matches;return o||(l?"dark":"light")}),a=n.useCallback(o=>{s(o),document.body.classList.remove("light","dark"),document.body.classList.add(o),localStorage.setItem(G,o),document.body.classList.add(ie),setTimeout(()=>{document.body.classList.remove(ie)},500)},[]);n.useEffect(()=>{const o=i=>{localStorage.getItem(G)||a(i.matches?"dark":"light")},l=window.matchMedia("(prefers-color-scheme: dark)");return l.addEventListener("change",o),a(t),()=>{l.removeEventListener("change",o)}},[a,t]);const r=n.useCallback(()=>{a(t==="light"?"dark":"light")},[t,a]);return e.jsx(y,{className:"relative grow",onClick:r,title:t==="dark"?"Enable light mode":"Enable dark mode",children:t==="dark"?e.jsx(ws,{className:"h-5 w-5"}):e.jsx(Cs,{className:"h-5 w-5"})})}const $a={"application/vnd.sqlite3":[".sqlite",".sqlite3"],"application/x-sqlite3":[".sqlite",".sqlite3"],"application/octet-stream":[".db"],"application/sql":[".sql"]};function Ha(){const{loadDatabase:t,setTables:s,setSelectedTable:a,db:r,setCustomQuery:o}=j(),[l,i]=n.useState([]),m=n.useCallback(async(u,h)=>{if(h.length>0){const w=h.flatMap(C=>C.errors);i(w);return}if(i([]),s([]),o(""),a("0"),u.length>0)try{await t(u[0])}catch(w){return w instanceof Error?$(w.message,{position:"bottom-right"}):$("Failed to load database",{position:"bottom-right"})}},[t,s,a]),{getRootProps:c,getInputProps:f,isDragActive:x}=Ms({onDrop:m,multiple:!1,accept:$a}),p=n.useCallback(u=>e.jsxs("div",{className:"flex w-full items-center justify-between gap-2",children:[e.jsxs("div",{...c(),className:`flex w-full grow transform cursor-pointer flex-col items-center justify-center rounded-lg border-2 border-dashed p-6 transition-colors duration-300 ease-in-out hover:bg-secondary ${x?"border-blue-500 bg-blue-50 dark:bg-blue-900/20":"border-primary dark:border-gray-700"} ${u?"py-7":"py-12"}`,children:[e.jsx("input",{id:"file-upload",...f()}),e.jsx("label",{htmlFor:"file-upload",className:"sr-only",children:"Upload SQLite File"}),e.jsxs("div",{className:"text-center text-sm md:text-base",children:[e.jsx("span",{className:"hidden sm:block lg:text-lg",children:"Drag and drop file here, or click to select one"}),e.jsx("div",{className:"block sm:hidden",children:u?e.jsx("span",{className:"font-medium",children:"Click to select a file"}):e.jsx("span",{className:"font-medium",children:"Click to select a SQLite file"})})]})]}),u&&e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx(ct,{}),e.jsx(Qa,{})]})]}),[c,f,x,r]),g=n.useMemo(()=>p(!!r),[p,r]);return e.jsxs("section",{className:"mx-auto w-full",children:[g,e.jsx(qa,{errors:l})]})}const qa=k.memo(({errors:t})=>(k.useEffect(()=>{t==null||t.forEach(s=>$(s.message,{position:"bottom-right"}))},[t]),null));function Va(){return e.jsx("header",{className:"rounded bg-gradient-to-r shadow-md dark:from-gray-800 dark:to-indigo-900",children:e.jsx("div",{className:"mx-auto max-w-4xl px-4 py-8 sm:py-12",children:e.jsxs("div",{className:"flex flex-col items-center text-center",children:[e.jsx("h1",{className:"mb-2 text-2xl font-bold sm:text-3xl",children:"SQLite Viewer"}),e.jsx("p",{className:"max-w-md text-sm sm:text-base",children:"Explore and analyze your SQLite databases directly in your browser"})]})})})}const za=zt,Ga=Vt,dt=n.forwardRef(({className:t,...s},a)=>e.jsx(ve,{className:d("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),...s,ref:a}));dt.displayName=ve.displayName;const mt=n.forwardRef(({className:t,...s},a)=>e.jsxs(Ga,{children:[e.jsx(dt,{}),e.jsx(Re,{ref:a,className:d("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",t),...s})]}));mt.displayName=Re.displayName;const ut=({className:t,...s})=>e.jsx("div",{className:d("flex flex-col space-y-2 text-center sm:text-left",t),...s});ut.displayName="AlertDialogHeader";const ft=({className:t,...s})=>e.jsx("div",{className:d("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...s});ft.displayName="AlertDialogFooter";const xt=n.forwardRef(({className:t,...s},a)=>e.jsx(Te,{ref:a,className:d("text-lg font-semibold",t),...s}));xt.displayName=Te.displayName;const pt=n.forwardRef(({className:t,...s},a)=>e.jsx(Se,{ref:a,className:d("text-sm text-muted-foreground",t),...s}));pt.displayName=Se.displayName;const ht=n.forwardRef(({className:t,...s},a)=>e.jsx(Ae,{ref:a,className:d(ee(),t),...s}));ht.displayName=Ae.displayName;const gt=n.forwardRef(({className:t,...s},a)=>e.jsx(De,{ref:a,className:d(ee({variant:"outline"}),"mt-2 sm:mt-0",t),...s}));gt.displayName=De.displayName;function _a({showDialog:t,setShowDialog:s,fn:a}){const r=n.useCallback(()=>{s(!1)},[s]);return e.jsx(za,{open:t,onOpenChange:s,children:e.jsxs(mt,{children:[e.jsxs(ut,{children:[e.jsx(xt,{children:"Retry using a proxy?"}),e.jsx(pt,{children:"Failed to load the database from the provided URL due to possible CORS restrictions."})]}),e.jsx("div",{className:"text-sm font-semibold",children:"Using the proxy may expose your database to corsproxy.io services."}),e.jsxs(ft,{children:[e.jsx(gt,{onClick:r,children:"Cancel"}),e.jsx(ht,{onClick:a,children:"Confirm"})]})]})})}function Wa(){return e.jsx("footer",{className:"fixed bottom-0 left-0 right-0 border-t bg-background shadow-md",children:e.jsx("div",{className:"mx-auto max-w-7xl px-4 sm:px-6 lg:px-8",children:e.jsxs("div",{className:"flex items-center justify-between py-4 md:py-6",children:[e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sms hidden sm:block",children:"No file will be uploaded to server. Using JavaScript, sql.js"}),e.jsx("p",{className:"text-sm sm:hidden",children:"No file uploads to server."})]}),e.jsxs("a",{href:"https://github.com/vwh/sqlite-viewer",target:"_blank",rel:"noopener noreferrer",className:"flex items-center space-x-2 text-blue-500",title:"Star on GitHub",children:[e.jsx(Es,{className:"h-5 w-5"}),e.jsx("span",{className:"text-sm font-medium hover:underline",children:"Star us on GitHub"})]})]}),e.jsx("div",{className:"flex items-center space-x-4",children:e.jsx(ct,{})})]})})})}function P({icon:t,title:s,description:a}){return e.jsxs("div",{className:"flex items-start space-x-3",children:[e.jsx("div",{className:"flex-shrink-0",children:e.jsx(t,{className:"h-6 w-6 text-blue-500"})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg font-medium",children:s}),e.jsx("p",{className:"mt-1 text-sm",children:a})]})]})}function Ka(){return e.jsxs(e.Fragment,{children:[e.jsx("section",{className:"rounded bg-gradient-to-r py-6 shadow-md dark:from-gray-800 dark:to-indigo-900 md:py-10",children:e.jsx("div",{className:"mx-auto max-w-7xl px-4 sm:px-6 lg:px-8",children:e.jsx("div",{children:e.jsxs("div",{className:"grid grid-cols-1 gap-8 sm:grid-cols-2 lg:grid-cols-3",children:[e.jsx(P,{icon:vs,title:"Browser Based",description:"No installation required. Access and analyze your SQLite databases directly in your web browser."}),e.jsx(P,{icon:Rs,title:"Lightning Fast",description:"Powered by WebAssembly (WASM) for near-native performance, even with large databases."}),e.jsx(P,{icon:Ts,title:"100% Secure",description:"Your data never leaves your device. All processing happens client-side, ensuring complete privacy."}),e.jsx(P,{icon:Fe,title:"Customizable Interface",description:"Different themes and settings. Adjust the look and feel of your interface to suit your preferences and workflow."}),e.jsx(P,{icon:Ss,title:"Offline Capable",description:"Work on your databases without an internet connection. Perfect for sensitive data or remote work."}),e.jsx(P,{icon:As,title:"PWA Support",description:"Install the app on your desktop or mobile device for a genuine native experience. Enjoy robust offline functionality."})]})})})}),e.jsx("div",{className:"pb-[72px] md:pb-0"})]})}function Ya(){const{db:t,tables:s,isLoading:a,loadDatabase:r,expandPage:o}=j(),[l,i]=n.useState(null),[m,c]=n.useState(!1),[f,x]=n.useState(null),[p,g]=n.useState(!1),u=n.useRef(!1),h=n.useCallback(async(N,E=!1)=>{if(!/^(https?:\/\/(?:www\.)?[a-zA-Z0-9-]{1,256}\.[a-zA-Z]{2,6}(?:\/[^\s]*)?)$/i.test(N)){i("Invalid URL");return}try{g(!0);const v=E?`https://cors.eu.org/${encodeURIComponent(N)}`:N,S=await fetch(v);if(!S.ok)throw new Error("URL not found or invalid");const D=await S.blob(),I=new File([D],"database.sqlite");await r(I),i(null)}catch(v){E?i(`Error whilefetching, ${v instanceof Error?v.message:String(v)}`):(x(N),c(!0))}finally{g(!1)}},[r]);n.useEffect(()=>{if(u.current)return;const E=new URLSearchParams(window.location.search).get("url");E&&(h(decodeURIComponent(E)),u.current=!0)},[h]);const w=n.useCallback(()=>{f&&(h(f,!0),c(!1))},[f,h]),C=()=>a||p?e.jsxs(Q,{type:"loading",children:[p?"Fetching":"Loading"," SQLite file"]}):l&&!t?e.jsx(Q,{type:"error",children:l}):t?s.length>0?e.jsx(Aa,{}):e.jsx(Q,{type:"info",children:"Your database is empty, no tables found"}):null;return e.jsxs("main",{id:"main",className:`mx-auto flex h-screen flex-col ${t?"gap-3":"gap-4"} p-4 ${o?"w-full":"container"}`,children:[!t&&e.jsx(Va,{}),e.jsx(Ha,{}),C(),!t&&e.jsxs(e.Fragment,{children:[e.jsx(Ka,{})," ",e.jsx(Wa,{})]}),e.jsx(_a,{showDialog:m,setShowDialog:c,fn:w})]})}const Xa=({...t})=>e.jsx(Bs,{className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-primary group-[.toaster]:text-background group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...t});Ct.createRoot(document.getElementById("root")).render(e.jsxs(k.StrictMode,{children:[e.jsx(Ya,{}),e.jsx(Xa,{})]})); + `),o=a.values.reduce((n,i)=>(n[i[1]]={type:i[2]?i[2].toUpperCase():i[2],isPrimaryKey:i[5]===1,isForeignKey:!1,nullable:i[3]===0},n),{});return r==null||r.values.forEach(n=>{const i=n[3];o[i]&&(o[i].isForeignKey=!0)}),o}catch(a){throw console.error(`Failed to get schema for table "${s}":`,a),a}},W=t=>{if(t.length===0)return{data:[],columns:[]};const{columns:s,values:a}=t[0];return{data:a.map(o=>Object.fromEntries(s.map((n,i)=>[n,o[i]]))),columns:s}},Hs=t=>{try{const s=t.export(),a=new Blob([s],{type:"application/x-sqlite3"});ce.saveAs(a,"database.sqlite")}catch(s){throw console.error("Failed to export database:",s),s}},qs=(t,s)=>{const a=t.map(o=>`"${o}"`).join(","),r=s.map(o=>t.map(n=>`"${o[n]??""}"`).join(","));return[a,...r].join(` +`)},Z=(t,s,a)=>{try{const r=s.exec(t);if(r.length===0)throw new Error(`Query "${t}" returned no results.`);const{data:o,columns:n}=W(r),i=qs(n,o),u=new Blob([i],{type:"text/csv;charset=utf-8;"});ce.saveAs(u,`${a}.csv`)}catch(r){throw console.error(`Failed to get CSV for query "${t}":`,r),r}},Vs=(t,s)=>{const r=J(t)[s],o=`SELECT * FROM "${r}"`;Z(o,t,r)},zs=t=>{J(t).forEach(s=>{const a=`SELECT * FROM "${s}"`;Z(a,t,s)})},Gs=(t,s)=>{Z(s,t,"custom_query")},j=Et((t,s)=>({db:null,isLoading:!1,loadDatabase:async a=>{t({isLoading:!0,queryError:null});try{const r=await Qs(a),o=J(r),n=await Promise.all(o.map(async c=>{const f=r.exec(`SELECT COUNT(*) FROM "${c}"`),x=parseInt(f[0].values[0][0],10),p=await $s(r,c);return{name:c,count:x,schema:p}})),i=n.map(({name:c,count:f})=>({name:c,count:f})),u=n.reduce((c,{name:f,schema:x})=>(c[f]=x,c),{});t({db:r,tables:i,tableSchemas:u,isLoading:!1})}catch(r){throw console.error("Failed to load database:",r),t({isLoading:!1,queryError:"Failed to load database"}),r}},tables:[],setTables:a=>t({tables:a}),selectedTable:"0",setSelectedTable:a=>t({selectedTable:a}),tableSchemas:{},customQuery:"",setIsCustomQuery:a=>t({isCustomQuery:a}),setCustomQuery:a=>t({customQuery:a}),isCustomQuery:!1,queryError:null,setQueryError:a=>t({queryError:a}),query:a=>{const{db:r}=s();return r?r.exec(a):(console.warn("Database is not loaded."),[])},rowPerPageOrAuto:"auto",setRowPerPageOrAuto:a=>t({rowPerPageOrAuto:a}),queryHistory:[],unShiftToQueryHistory:a=>t(r=>({queryHistory:[a,...r.queryHistory]})),expandPage:!1,setExpandPage:a=>t({expandPage:a}),dateFormatValue:"formatDateFormatted",setDateFormatValue:a=>t({dateFormatValue:a}),filters:{},setFilters:a=>t({filters:a}),appendToFilters:(a,r)=>t(o=>({filters:{...o.filters,[a]:r}})),filtersNeedClear:!1,setFiltersNeedClear:a=>t({filtersNeedClear:a}),totalRows:0,setTotalRows:a=>t({totalRows:a}),orderBy:null,setOrderBy:a=>t({orderBy:a}),orderByDirection:"ASC",setOrderByDirection:a=>t({orderByDirection:a})}));function Ws(t,s,a){const{db:r,setQueryError:o,setIsCustomQuery:n,query:i,unShiftToQueryHistory:u,customQuery:c,setCustomQuery:f,filters:x,totalRows:p,setTotalRows:g,orderBy:m,orderByDirection:h,selectedTable:w,tables:C}=j(),[N,E]=l.useState([]),[L,v]=l.useState([]),[S,D]=l.useState(!0),I=l.useMemo(()=>Object.fromEntries(Object.entries(x).filter(([,b])=>b!=="")),[x]),A=l.useMemo(()=>Object.entries(I).map(([b,R])=>`LOWER(${b}) LIKE LOWER('%${R}%')`).join(" AND "),[I]);l.useEffect(()=>{if(!r||!t)return;(async()=>{D(!0);try{const R=`PRAGMA table_info("${t}");`,U=i(R)[0].values.map(F=>({name:F[1],type:F[2]})).map(F=>F.type.toUpperCase()==="BLOB"?`hex(${F.name}) as ${F.name}`:F.name).join(", "),bt=`SELECT COUNT(*) as count FROM "${t}"${A?` WHERE ${A}`:""}`,yt=i(bt)[0].values[0][0];g(yt);let O=`SELECT ${U} FROM "${t}"`;A&&(O+=` WHERE ${A}`),m&&(O+=` ORDER BY "${m}" ${h}`),O+=` LIMIT ${s} OFFSET ${a};`;const jt=i(O),{data:Nt,columns:wt}=W(jt);v(wt),E(Nt),o(null),f(O),u(O)}catch(R){R instanceof Error&&o(R.message)}finally{D(!1)}})()},[r,t,a,s,A,h]);const z=l.useCallback(()=>{if(c.trim()===""){o(null);return}D(!0);try{const b=C[parseInt(w)].name,R=i(c.replace("@",`"${b}"`)),{data:M,columns:B}=W(R);v(B),E(M),n(!0),o(null)}catch(b){b instanceof Error&&o(b.message)}finally{D(!1)}},[c,i,o,n,C,w]);return{data:N,columns:L,customQuery:c,setCustomQuery:f,isQueryLoading:S,handleCustomQuery:z,totalRows:p}}function _s(t){const{setIsCustomQuery:s}=j(),[a,r]=l.useState(0);l.useEffect(()=>{r(0),s(!1)},[s]);const o=l.useMemo(()=>{if(t!=="auto")return t;const n=window.innerHeight,f=Math.min(2e3,40+n*.03),x=Math.max(1,Math.floor(n/f));return Math.min(Math.max(x,5),50)},[t]);return{page:a,setPage:r,rowsPerPage:o}}const ee=Y("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"}});function d(...t){return Wt(Gt(t))}const y=l.forwardRef(({className:t,variant:s,size:a,asChild:r=!1,...o},n)=>{const i=r?Rt:"button";return e.jsx(i,{className:d(ee({variant:s,size:a,className:t})),ref:n,...o})});y.displayName="Button";function Ks({page:t,setPage:s,rowsPerPage:a}){const{totalRows:r}=j(),o=l.useMemo(()=>Math.ceil(r/a),[r,a]),n=l.useMemo(()=>Math.ceil(t/a)+1,[t,a]),i=n1,c=l.useCallback(()=>{i&&s(x=>x+a)},[i,a,s]),f=l.useCallback(()=>{u&&s(x=>x-a)},[u,a,s]);return e.jsx("section",{className:"fixed bottom-2 left-1/2 z-10 w-[270px] -translate-x-1/2 transform",children:e.jsxs("div",{className:"flex justify-between gap-2 rounded border bg-secondary p-[6px]",children:[e.jsx(y,{onClick:f,title:"Previous page",disabled:!u,children:e.jsx(_t,{className:"h-4 w-4"})}),e.jsxs("span",{className:"flex items-center justify-center text-sm",children:["Page ",n," of ",o]}),e.jsx(y,{onClick:c,title:"Next page",disabled:!i,children:e.jsx(Kt,{className:"h-4 w-4"})})]})})}const Ys=It,Xs=Ft,Js=kt,ke=l.forwardRef(({className:t,children:s,...a},r)=>e.jsxs(de,{ref:r,className:d("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",t),...a,children:[s,e.jsx(Tt,{asChild:!0,children:e.jsx(Le,{className:"h-4 w-4 opacity-50"})})]}));ke.displayName=de.displayName;const Oe=l.forwardRef(({className:t,...s},a)=>e.jsx(ue,{ref:a,className:d("flex cursor-default items-center justify-center py-1",t),...s,children:e.jsx(Yt,{className:"h-4 w-4"})}));Oe.displayName=ue.displayName;const Pe=l.forwardRef(({className:t,...s},a)=>e.jsx(me,{ref:a,className:d("flex cursor-default items-center justify-center py-1",t),...s,children:e.jsx(Le,{className:"h-4 w-4"})}));Pe.displayName=me.displayName;const Me=l.forwardRef(({className:t,children:s,position:a="popper",...r},o)=>e.jsx(St,{children:e.jsxs(fe,{ref:o,className:d("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",a==="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",t),position:a,...r,children:[e.jsx(Oe,{}),e.jsx(At,{className:d("p-1",a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:s}),e.jsx(Pe,{})]})}));Me.displayName=fe.displayName;const Be=l.forwardRef(({className:t,...s},a)=>e.jsx(xe,{ref:a,className:d("py-1.5 pl-8 pr-2 text-sm font-semibold",t),...s}));Be.displayName=xe.displayName;const Ue=l.forwardRef(({className:t,children:s,...a},r)=>e.jsxs(pe,{ref:r,className:d("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",t),...a,children:[e.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:e.jsx(Dt,{children:e.jsx(Xt,{className:"h-4 w-4"})})}),e.jsx(Lt,{children:s})]}));Ue.displayName=pe.displayName;const Zs=l.forwardRef(({className:t,...s},a)=>e.jsx(he,{ref:a,className:d("-mx-1 my-1 h-px bg-muted",t),...s}));Zs.displayName=he.displayName;const ea=Y("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 H({className:t,variant:s,...a}){return e.jsx("div",{className:d(ea({variant:s}),t),...a,children:e.jsx("span",{className:"w-full",children:a.children})})}function ta(){const{tables:t,selectedTable:s,setSelectedTable:a,setIsCustomQuery:r}=j(),o=l.useMemo(()=>{var c;const u=parseInt(s);return isNaN(u)?0:((c=t[u])==null?void 0:c.count)||0},[t,s]),n=l.useMemo(()=>t.map((u,c)=>e.jsx(Ue,{value:`${c}`,children:u.name[0].toUpperCase()+u.name.slice(1)},u.name)),[t]);function i(u){r(!1),a(u)}return e.jsxs("section",{className:"flex grow items-center justify-center gap-1",children:[e.jsxs(Ys,{value:s,onValueChange:i,children:[e.jsx(ke,{className:"grow",children:e.jsx(Js,{placeholder:"Select a table"})}),e.jsx(Me,{children:e.jsxs(Xs,{children:[e.jsx(Be,{children:"Tables"}),n]})})]}),e.jsx(H,{title:"Rows",className:"hidden min-w-[100px] grow bg-background py-2 text-center text-sm md:block md:min-w-[200px]",variant:"outline",children:e.jsx("span",{className:"w-full text-center",children:o})})]})}const V=t=>t instanceof Date&&!isNaN(t.getTime()),sa=t=>{const s=new Date(t);return V(s)?Ds(s,{addSuffix:!0}):t},aa=t=>{const s=new Date(t);return V(s)?X(s,"MMMM do, yyyy"):t},ra=t=>{const s=new Date(t);return V(s)?X(s,"MM/dd/yyyy"):t},oa=t=>{const s=new Date(t);return V(s)?X(s,"yyyy/dd/MM"):t},_={formatDateRelative:{label:"Over 56 years ago",func:sa},formatDateFormatted:{label:"January 9th, 1968",func:aa},formatDateLong:{label:"1968/09/01",func:oa},formatDateShort:{label:"01/09/1968",func:ra}},Qe=t=>t.includes("DATE")||t==="TIMESTAMP",la=t=>t==="BLOB",na=t=>t.includes("CHAR")||t.includes("TEXT")||t==="CLOB"||t.includes("VARCHAR"),ia=t=>t.includes("INT"),ca=t=>t.includes("REAL")||t.includes("FLOAT")||t.includes("DOUBLE")||t.includes("DECIMAL"),da=t=>t.includes("NUMERIC"),ua=t=>ia(t)||ca(t)||da(t),ma=t=>t.includes("BOOL"),$e=Ot,He=Pt,te=l.forwardRef(({className:t,align:s="start",side:a="bottom",sideOffset:r=4,...o},n)=>e.jsx(ge,{ref:n,align:s,side:a,sideOffset:r,className:d("z-50 w-64 text-balance break-words 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",t),...o}));te.displayName=ge.displayName;const qe=l.forwardRef(({className:t,...s},a)=>e.jsx("div",{className:"relative w-full overflow-auto",children:e.jsx("table",{ref:a,className:d("w-full caption-bottom text-sm",t),...s})}));qe.displayName="Table";const Ve=l.forwardRef(({className:t,...s},a)=>e.jsx("thead",{ref:a,className:d("[&_tr]:border-b",t),...s}));Ve.displayName="TableHeader";const ze=l.forwardRef(({className:t,...s},a)=>e.jsx("tbody",{ref:a,className:d("[&_tr:last-child]:border-0",t),...s}));ze.displayName="TableBody";const fa=l.forwardRef(({className:t,...s},a)=>e.jsx("tfoot",{ref:a,className:d("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",t),...s}));fa.displayName="TableFooter";const K=l.forwardRef(({className:t,...s},a)=>e.jsx("tr",{ref:a,className:d("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",t),...s}));K.displayName="TableRow";const Ge=l.forwardRef(({className:t,...s},a)=>e.jsx("th",{ref:a,className:d("h-12 min-w-[150px] px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",t),...s}));Ge.displayName="TableHead";const xa=t=>{const s=new Uint8Array(t.match(/.{1,2}/g).map(r=>parseInt(r,16))),a=new Blob([s],{type:"image/jpeg"});return URL.createObjectURL(a)},We=l.forwardRef(({className:t,children:s,dataType:a,...r},o)=>{const n=(a==null?void 0:a.toUpperCase())==="BLOB",i=l.useMemo(()=>typeof s=="string"&&s.length>40?s.slice(0,40)+"...":s,[s]);return e.jsx("td",{ref:o,className:d("max-w-[200px] overflow-hidden truncate text-ellipsis whitespace-nowrap p-4 align-middle [&:has([role=checkbox])]:pr-0",t),...r,children:e.jsxs($e,{children:[e.jsx(He,{asChild:!0,children:e.jsx("span",{className:"cursor-pointer hover:underline",children:n?e.jsx("span",{className:"italic opacity-40",children:"BLOB"}):i})}),e.jsx(te,{side:"bottom",align:"start",children:e.jsxs("div",{className:"flex flex-col justify-center gap-1",children:[n&&typeof s=="string"?e.jsxs(e.Fragment,{children:[e.jsx("img",{src:xa(s),alt:"BLOB content",className:"flex max-h-40 flex-col items-center justify-center gap-2 rounded object-contain",onError:u=>{u.currentTarget.style.display="none"}}),e.jsxs("span",{className:"text-sm text-muted-foreground",children:["Blob length: ",s.length]})]}):e.jsx("span",{className:"max-w-full break-words",children:s}),e.jsx(H,{className:"w-full self-start text-center text-xs font-semibold",children:a||"Unknown"})]})})]})})});We.displayName="TableCell";const pa=l.forwardRef(({className:t,...s},a)=>e.jsx("caption",{ref:a,className:d("mt-4 text-sm text-muted-foreground",t),...s}));pa.displayName="TableCaption";const se=l.forwardRef(({className:t,type:s,...a},r)=>e.jsx("input",{type:s,className:d("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",t),ref:r,...a}));se.displayName="Input";function ha({columnName:t}){const{appendToFilters:s,selectedTable:a,filtersNeedClear:r,setFiltersNeedClear:o}=j(),[n,i]=l.useState("");l.useEffect(()=>{i("")},[a]),l.useEffect(()=>{r&&(i(""),o(!1))},[r]);const u=l.useCallback(c=>{const f=c.target.value;i(f),s(t,f)},[s,t]);return e.jsx(se,{value:n,onChange:u,className:"mt-[2px] max-h-7 w-full text-xs",placeholder:"Filter"})}function ga({columnName:t}){const{orderBy:s,setOrderBy:a,orderByDirection:r,setOrderByDirection:o}=j(),n=l.useCallback(()=>{s===t?r==="ASC"?o("DESC"):r==="DESC"?(a(null),o("ASC")):(a(t),o("ASC")):(a(t),o("ASC"))},[s,r,t,a,o]);return e.jsx("div",{onClick:n,className:"flex items-center",children:s===t?r==="ASC"?e.jsx("button",{title:"Descending",children:e.jsx(Jt,{className:"h-4 w-4"})}):e.jsx("button",{title:"Ascending",children:e.jsx(Zt,{className:"h-4 w-4"})}):e.jsx("button",{title:"Sort column",children:e.jsx(es,{className:"h-4 w-4"})})})}const ba=k.memo(({columnSchema:t})=>e.jsxs(e.Fragment,{children:[(t==null?void 0:t.isPrimaryKey)&&e.jsx("p",{className:"text-sm font-semibold text-yellow-600",children:"(Primary)"}),(t==null?void 0:t.isForeignKey)&&e.jsx("p",{className:"text-sm font-semibold text-purple-600",children:"(Foreign)"})]})),ya=k.memo(({columnSchema:t})=>{const{type:s,isPrimaryKey:a,isForeignKey:r}=t;if(a)return e.jsx(ts,{className:"h-4 w-4 text-yellow-500"});if(r)return e.jsx(ss,{className:"h-4 w-4 text-purple-500"});if(s){if(la(s))return e.jsx(as,{className:"h-4 w-4 text-green-500"});if(Qe(s))return e.jsx(Ie,{className:"h-4 w-4 text-blue-500"});if(na(s))return e.jsx(rs,{className:"h-4 w-4 text-indigo-500"});if(ua(s))return e.jsx(os,{className:"h-4 w-4 text-red-500"});if(ma(s))return e.jsx(ls,{className:"h-4 w-4 text-pink-500"})}return e.jsx(ns,{className:"h-4 w-4 text-gray-500"})}),ja=k.memo(({columnName:t,columnSchema:s})=>e.jsxs(Ge,{className:"bg-gray-100 py-2 dark:bg-gray-700",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(ga,{columnName:t}),e.jsxs($e,{children:[e.jsx(He,{asChild:!0,children:e.jsxs("div",{className:"flex cursor-pointer items-center space-x-1",children:[e.jsx("span",{className:"max-w-[200px] overflow-hidden truncate text-ellipsis whitespace-nowrap",children:t}),s&&e.jsx(ya,{columnSchema:s})]})}),e.jsxs(te,{className:"w-64",children:[e.jsxs("div",{className:"mb-1 flex items-center space-x-1",children:[e.jsx("p",{className:"text-sm font-medium",children:t}),e.jsx(ba,{columnSchema:s})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(H,{className:"w-full self-start text-center text-xs font-semibold",children:(s==null?void 0:s.type)||"Unknown"}),(s==null?void 0:s.nullable)&&e.jsx(H,{className:"w-full self-start text-center text-xs font-semibold",children:"NULLABLE"})]})]})]})]}),e.jsx(ha,{columnName:t})]})),Na=k.memo(({value:t,dataType:s})=>{const{dateFormatValue:a}=j(),r=()=>t?s&&Qe(s)&&_[a]?_[a].func(t):t:e.jsx("span",{className:"italic text-gray-400",children:"NULL"});return e.jsx(We,{dataType:s,className:"px-5 py-[11px] text-sm",children:r()})});function wa({data:t,columns:s,tableName:a,tableSchemas:r}){const{filters:o,setFiltersNeedClear:n,setFilters:i}=j(),u=l.useMemo(()=>e.jsx(Ve,{children:e.jsx(K,{children:s.map((x,p)=>e.jsx(ja,{columnName:x,columnSchema:r[a][x]},p))})}),[s,r,a]),c=l.useMemo(()=>e.jsx(ze,{children:t.map((x,p)=>e.jsx(K,{children:s.map((g,m)=>{var h;return e.jsx(Na,{value:x[g],dataType:(h=r[a][g])==null?void 0:h.type},m)})},p))}),[t,s,r,a]),f=l.useCallback(()=>{n(!0),i({})},[n,i]);return e.jsxs("div",{className:"overflow-x-auto",children:[e.jsxs(qe,{children:[u,t.length>0&&c]}),t.length===0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"w-full p-4 text-center font-medium",children:["No data available for ",a]}),Object.keys(o).length>0&&e.jsx(y,{className:"w-full rounded-none",variant:"outline",onClick:f,children:"Clear filters"})]})]})}function Q({type:t,children:s,className:a=""}){const r="flex items-center p-4 rounded-lg shadow-md";let o,n;switch(t){case"error":o=e.jsx(us,{className:"mr-3 h-6 w-6 text-red-500"}),n="bg-red-100 text-red-800 border-l-4 border-red-500";break;case"loading":o=e.jsx(ds,{className:"mr-3 h-6 w-6 animate-spin text-blue-500"}),n="bg-blue-100 text-blue-800 border-l-4 border-blue-500";break;case"success":o=e.jsx(cs,{className:"mr-3 h-6 w-6 text-green-500"}),n="bg-green-100 text-green-800 border-l-4 border-green-500";break;case"info":o=e.jsx(is,{className:"mr-3 h-6 w-6 text-yellow-500"}),n="bg-yellow-100 text-yellow-800 border-l-4 border-yellow-500";break;default:o=null,n=""}return e.jsxs("div",{className:`${r} ${n} ${a}`,children:[o,e.jsx("span",{className:"font-medium",children:s})]})}const Ca=Bt,Ea=Ut,_e=l.forwardRef(({className:t,align:s="center",sideOffset:a=4,...r},o)=>e.jsx(Mt,{children:e.jsx(be,{ref:o,align:s,sideOffset:a,className:d("z-50 w-72 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",t),...r})}));_e.displayName=be.displayName;function va(){const{selectedTable:t,tables:s,customQuery:a,db:r}=j(),o=l.useCallback((i,u,c,f)=>e.jsx(y,{className:f,onClick:i,title:c,children:e.jsx("span",{className:"ml-2",children:u})}),[]),n=l.useMemo(()=>{var i;return r&&e.jsxs("div",{className:"flex flex-col gap-1",children:[o(()=>Hs(r),"Export as SQLite","Download database as SQLite"),o(()=>Vs(r,parseInt(t)),`Export ${((i=s[parseInt(t)])==null?void 0:i.name)||"selected"} table as CSV`,"Export selected table as CSV"),o(()=>zs(r),"Export all tables as CSV","Export all tables as CSV"),o(()=>Gs(r,a),"Export custom query as CSV","Export the result of the custom query as CSV")]})},[r,o,t,s,a]);return e.jsxs(Ca,{children:[e.jsx(Ea,{asChild:!0,children:e.jsx(y,{title:"Open export options",children:e.jsx(ms,{className:"h-5 w-5"})})}),e.jsx(_e,{align:"end",className:"w-80",children:n})]})}function Ra(){const[t,s]=l.useState(()=>document.body.classList.contains("dark"));return l.useEffect(()=>{const a=new MutationObserver(()=>{s(document.body.classList.contains("dark"))});return a.observe(document.body,{attributes:!0,attributeFilter:["class"]}),()=>a.disconnect()},[]),t}const Ta=["ABORT","ACTION","ADD","AFTER","ALL","ALTER","ANALYZE","AND","AS","ASC","ATTACH","AUTOINCREMENT","BEFORE","BEGIN","BETWEEN","BY","CASCADE","CASE","CAST","CHECK","COLLATE","COLUMN","COMMIT","CONFLICT","CONSTRAINT","CREATE","CROSS","CURRENT_DATE","CURRENT_TIME","CURRENT_TIMESTAMP","DATABASE","DEFAULT","DEFERRABLE","DEFERRED","DELETE","DESC","DETACH","DISTINCT","DROP","EACH","ELSE","END","ESCAPE","EXCEPT","EXCLUSIVE","EXISTS","EXPLAIN","FAIL","FOR","FOREIGN","FROM","FULL","GLOB","GROUP","HAVING","IF","IGNORE","IMMEDIATE","IN","INDEX","INDEXED","INITIALLY","INNER","INSERT","INSTEAD","INTERSECT","INTO","IS","ISNULL","JOIN","KEY","LEFT","LIKE","LIMIT","MATCH","NATURAL","NO","NOT","NOTNULL","NULL","OF","OFFSET","ON","OR","ORDER","OUTER","PLAN","PRAGMA","PRIMARY","QUERY","RAISE","RECURSIVE","REFERENCES","REGEXP","REINDEX","RELEASE","RENAME","REPLACE","RESTRICT","RIGHT","ROLLBACK","ROW","SAVEPOINT","SELECT","SET","TABLE","TEMP","TEMPORARY","THEN","TO","TRANSACTION","TRIGGER","UNION","UNIQUE","UPDATE","USING","VACUUM","VALUES","VIEW","VIRTUAL","WHEN","WHERE","WITH","WITHOUT"];function Sa({columnNames:t}){const{customQuery:s,setCustomQuery:a,queryHistory:r,tables:o}=j(),n=Ra();l.useEffect(()=>{a(re(s))},[r]);const i=l.useCallback(x=>{const p=x.matchBefore(/\w*/);if(!p||p.from===p.to&&!x.explicit)return null;const g=[...Ta.map(m=>({label:m,type:"keyword"})),...o.map(m=>({label:m.name,type:"table"})),...t.map(m=>({label:m,type:"column"}))];return{from:p.from,to:p.to,options:g}},[o,t]),u=l.useCallback(()=>{a(re(s))},[s,a]),c=l.useCallback(x=>{a(x)},[a]),f=l.useMemo(()=>[Is,Fs(),ks({override:[i]})],[i]);return e.jsx(Os,{value:s,height:"126px",extensions:f,onChange:c,onBlur:u,className:"rounded-md border",theme:n?Ps:"light"})}function re(t){return Ls(t,{language:"sqlite",useTabs:!1,keywordCase:"upper",tabWidth:2,expressionWidth:100,linesBetweenQueries:1})}function Aa(){const{tables:t,selectedTable:s,tableSchemas:a,queryError:r,setQueryError:o,rowPerPageOrAuto:n,isCustomQuery:i,setIsCustomQuery:u,customQuery:c,setCustomQuery:f,expandPage:x,setExpandPage:p,filters:g,setFilters:m,setOrderBy:h,setFiltersNeedClear:w}=j(),{page:C,setPage:N,rowsPerPage:E}=_s(n),L=l.useMemo(()=>{var U;return(U=t[parseInt(s)])==null?void 0:U.name},[t,s]),{data:v,columns:S,isQueryLoading:D,handleCustomQuery:I}=Ws(L,E,C),[A,z]=l.useState([]);l.useEffect(()=>{S.length>0&&z(S)},[L,S]);const b=l.useCallback(()=>{o(null),f(""),u(!1),m({}),w(!0)},[u,o,f]),R=l.useCallback(()=>{N(0),b()},[b,N]);l.useEffect(()=>{N(0),m({}),h(null)},[s]),l.useEffect(()=>{N(0)},[g]);const M=l.useMemo(()=>e.jsxs("div",{className:"flex flex-col gap-1 md:flex-row",children:[e.jsx("div",{className:"flex-grow",children:e.jsx(Sa,{columnNames:A})}),e.jsxs("div",{className:"flex flex-row gap-1 md:flex-col",children:[e.jsx(y,{className:"grow",onClick:I,title:"Run custom query",children:e.jsx(fs,{className:"h-5 w-5"})}),e.jsx(y,{className:"grow",onClick:b,title:"Remove query",children:e.jsx(xs,{className:"h-5 w-5"})}),e.jsx(y,{className:"grow",onClick:R,title:"Reset to first page",disabled:C===0,children:e.jsx(ps,{className:"h-5 w-5"})})]})]}),[c,I,b,R,C]),B=l.useMemo(()=>D?e.jsxs(Q,{type:"loading",children:["Loading ",L]}):e.jsx("div",{className:"mb-[40px] overflow-hidden rounded-lg border border-gray-200 dark:border dark:border-gray-700",children:e.jsx(wa,{data:v,columns:A.length>0?A:S,tableName:L,tableSchemas:a})}),[D,v,S,L,a,g,A]);return e.jsxs("div",{className:"flex flex-col gap-3 pb-8",children:[e.jsxs("section",{className:"rounded-lg bg-gray-100 p-4 shadow-sm dark:bg-gray-700",children:[e.jsxs("div",{className:"mb-[5px] flex items-center justify-between gap-1",children:[e.jsx(ta,{}),e.jsxs("div",{className:"flex items-center justify-center gap-1",children:[e.jsx(va,{}),e.jsx(y,{className:"hidden expand:block",onClick:()=>p(!x),title:"Toggle page size",children:x?e.jsx(hs,{className:"h-5 w-5"}):e.jsx(gs,{className:"h-5 w-5"})})]})]}),M,r&&e.jsx("p",{className:"mt-2 text-center text-sm text-red-500 dark:text-red-400",children:r})]}),B,!i&&e.jsx(Ks,{page:C,setPage:N,rowsPerPage:E})]})}const Ke=(t,s)=>localStorage.getItem(t)||s,Ye=(t,s)=>localStorage.setItem(t,s),oe=(t,s)=>{const[a,r]=l.useState(()=>Ke(t,s));return l.useEffect(()=>{Ye(t,a)},[t,a]),[a,r]},Xe=({shouldScaleBackground:t=!0,...s})=>e.jsx(T.Root,{shouldScaleBackground:t,...s});Xe.displayName="Drawer";const Da=T.Trigger,La=T.Portal,Ia=T.Close,Je=l.forwardRef(({className:t,...s},a)=>e.jsx(T.Overlay,{ref:a,className:d("fixed inset-0 z-50 bg-black/80",t),...s}));Je.displayName=T.Overlay.displayName;const Ze=l.forwardRef(({className:t,children:s,...a},r)=>e.jsxs(La,{children:[e.jsx(Je,{}),e.jsxs(T.Content,{ref:r,className:d("fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background",t),...a,children:[e.jsx("div",{className:"mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted"}),s]})]}));Ze.displayName="DrawerContent";const et=({className:t,...s})=>e.jsx("div",{className:d("grid gap-1.5 p-4 text-center sm:text-left",t),...s});et.displayName="DrawerHeader";const tt=({className:t,...s})=>e.jsx("div",{className:d("mt-auto flex flex-col gap-2 pb-4",t),...s});tt.displayName="DrawerFooter";const st=l.forwardRef(({className:t,...s},a)=>e.jsx(T.Title,{ref:a,className:d("text-lg font-semibold leading-none tracking-tight",t),...s}));st.displayName=T.Title.displayName;const at=l.forwardRef(({className:t,...s},a)=>e.jsx(T.Description,{ref:a,className:d("text-sm text-muted-foreground",t),...s}));at.displayName=T.Description.displayName;const rt=l.forwardRef(({className:t,children:s,...a},r)=>e.jsxs(ye,{ref:r,className:d("relative overflow-hidden",t),...a,children:[e.jsx(Qt,{className:"h-full w-full rounded-[inherit]",children:s}),e.jsx(ot,{}),e.jsx($t,{})]}));rt.displayName=ye.displayName;const ot=l.forwardRef(({className:t,orientation:s="vertical",...a},r)=>e.jsx(je,{ref:r,orientation:s,className:d("flex touch-none select-none transition-colors",s==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",s==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",t),...a,children:e.jsx(Ht,{className:"relative flex-1 rounded-full bg-border"})}));ot.displayName=je.displayName;const lt=l.forwardRef(({className:t,orientation:s="horizontal",decorative:a=!0,...r},o)=>e.jsx(Ne,{ref:o,decorative:a,orientation:s,className:d("shrink-0 bg-border",s==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",t),...r}));lt.displayName=Ne.displayName;const Fa=Y("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),nt=l.forwardRef(({className:t,...s},a)=>e.jsx(we,{ref:a,className:d(Fa(),t),...s}));nt.displayName=we.displayName;const ae=l.forwardRef(({className:t,...s},a)=>e.jsx(Ce,{className:d("grid gap-2",t),...s,ref:a}));ae.displayName=Ce.displayName;const it=l.forwardRef(({className:t,...s},a)=>e.jsx(Ee,{ref:a,className:d("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t),...s,children:e.jsx(qt,{className:"flex items-center justify-center",children:e.jsx(bs,{className:"h-2.5 w-2.5 fill-current text-current"})})}));it.displayName=Ee.displayName;const q=({value:t,label:s})=>e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(it,{value:t,id:`r-${t}`}),e.jsx(nt,{htmlFor:`r-${t}`,children:s})]}),ka=({rowsPerPage:t,onRowsPerPageChange:s})=>{const a=t==="auto";return e.jsxs("div",{className:"flex h-full grow flex-col gap-1",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(ys,{className:"h-4 w-4"}),e.jsx("p",{className:"text-sm font-medium",children:"Rows Per Page"})]}),e.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-1 rounded border p-2",children:[e.jsx(se,{id:"rowsPerPage",value:a?"":t,onChange:r=>s(r.target.value),placeholder:"Number of rows",type:"number",className:"w-full",autoFocus:!1}),e.jsx(y,{variant:a?"secondary":"outline",onClick:()=>s("auto"),className:"w-full whitespace-nowrap",children:"Auto Calculate"})]})]})},Oa=({dateFormatValue:t,onDateFormatChange:s})=>e.jsxs("div",{className:"flex h-full grow flex-col gap-1",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(Ie,{className:"h-4 w-4"}),e.jsx("p",{className:"text-sm font-medium",children:"Date Format"})]}),e.jsx("div",{className:"h-full rounded border p-2",children:e.jsxs(ae,{className:"flex h-full flex-col gap-2",name:"dateType",value:t,onValueChange:s,children:[e.jsx(q,{value:"default",label:"Default"}),Object.entries(_).map(([a,{label:r}])=>e.jsx(q,{value:a,label:r},a))]})})]}),Pa=({themeColor:t,onThemeColorChange:s,themeColors:a})=>e.jsxs("div",{className:"flex grow flex-col gap-1",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(js,{className:"h-4 w-4"}),e.jsx("p",{className:"text-sm font-medium",children:"Theme Color"})]}),e.jsxs(ae,{className:"flex flex-col gap-2 rounded border p-2",name:"themeColor",value:t,onValueChange:s,children:[e.jsx(q,{value:"default",label:"Default"}),a.map(r=>e.jsx(q,{value:r,label:r[0].toUpperCase()+r.slice(1)},r))]})]}),Ma=({queryHistory:t})=>e.jsxs("div",{className:"flex grow flex-col gap-1",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(Ns,{className:"h-4 w-4"}),e.jsxs("p",{className:"text-sm font-medium",children:["Query History (",t.length,")"]})]}),e.jsx(rt,{className:"h-[155px] rounded-md border font-medium",children:e.jsx("div",{className:"p-4",children:t.map((s,a)=>e.jsxs("div",{children:[e.jsx("div",{className:"text-sm font-normal",children:s}),e.jsx(lt,{className:"my-2"})]},a))})})]}),Ba="rowsPerPage",le="dateFormat",Ua="theme-color",ne=["nord","zinc"];function Qa(){const{setRowPerPageOrAuto:t,setIsCustomQuery:s,queryHistory:a,dateFormatValue:r,setDateFormatValue:o}=j(),[n,i]=oe(Ba,"auto"),[u,c]=oe(Ua,"default"),f=n==="auto";l.useEffect(()=>{t(f?"auto":Number(n))},[n,t]),l.useEffect(()=>{o(Ke(le,"default"))},[o]),l.useEffect(()=>{ne.forEach(m=>{var h;return(h=document.body)==null?void 0:h.classList.toggle(m,m===u)})},[u]);const x=l.useCallback(m=>{s(!1),m==="auto"||Number(m)>0?i(m):$.error("Please provide a positive number of rows per page or set it to auto.")},[s,i]),p=l.useCallback(m=>{o(m),Ye(le,m)},[o]),g=l.useCallback(m=>{c(m)},[c]);return e.jsxs(Xe,{children:[e.jsx(Da,{asChild:!0,children:e.jsx(y,{className:"grow",title:"Open settings drawer",children:e.jsx(Fe,{className:"h-5 w-5"})})}),e.jsxs(Ze,{children:[e.jsxs(et,{className:"hidden",children:[e.jsx(st,{children:"Settings"}),e.jsx(at,{children:"Change settings."})]}),e.jsxs("div",{className:"mx-auto flex w-full max-w-sm flex-col gap-3",children:[e.jsx(ka,{rowsPerPage:n,onRowsPerPageChange:x}),e.jsx(Pa,{themeColor:u,onThemeColorChange:g,themeColors:ne}),e.jsx(Oa,{dateFormatValue:r,onDateFormatChange:p}),e.jsx(Ma,{queryHistory:a}),e.jsx(tt,{children:e.jsx(Ia,{asChild:!0,children:e.jsx(y,{variant:"outline",children:"Cancel"})})})]})]})]})}const G="theme-mode",ie="animate-circular-reveal";function ct(){const[t,s]=l.useState(()=>{const o=localStorage.getItem(G),n=window.matchMedia("(prefers-color-scheme: dark)").matches;return o||(n?"dark":"light")}),a=l.useCallback(o=>{s(o),document.body.classList.remove("light","dark"),document.body.classList.add(o),localStorage.setItem(G,o),document.body.classList.add(ie),setTimeout(()=>{document.body.classList.remove(ie)},500)},[]);l.useEffect(()=>{const o=i=>{localStorage.getItem(G)||a(i.matches?"dark":"light")},n=window.matchMedia("(prefers-color-scheme: dark)");return n.addEventListener("change",o),a(t),()=>{n.removeEventListener("change",o)}},[a,t]);const r=l.useCallback(()=>{a(t==="light"?"dark":"light")},[t,a]);return e.jsx(y,{className:"relative grow",onClick:r,title:t==="dark"?"Enable light mode":"Enable dark mode",children:t==="dark"?e.jsx(ws,{className:"h-5 w-5"}):e.jsx(Cs,{className:"h-5 w-5"})})}const $a={"application/vnd.sqlite3":[".sqlite",".sqlite3"],"application/x-sqlite3":[".sqlite",".sqlite3"],"application/octet-stream":[".db"],"application/sql":[".sql"]};function Ha(){const{loadDatabase:t,setTables:s,setSelectedTable:a,db:r,setCustomQuery:o}=j(),[n,i]=l.useState([]),u=l.useCallback(async(m,h)=>{if(h.length>0){const w=h.flatMap(C=>C.errors);i(w);return}if(i([]),s([]),o(""),a("0"),m.length>0)try{await t(m[0])}catch(w){return w instanceof Error?$(w.message,{position:"bottom-right"}):$("Failed to load database",{position:"bottom-right"})}},[t,s,a]),{getRootProps:c,getInputProps:f,isDragActive:x}=Ms({onDrop:u,multiple:!1,accept:$a}),p=l.useCallback(m=>e.jsxs("div",{className:"flex w-full items-center justify-between gap-2",children:[e.jsxs("div",{...c(),className:`flex w-full grow transform cursor-pointer flex-col items-center justify-center rounded-lg border-2 border-dashed p-6 transition-colors duration-300 ease-in-out hover:bg-secondary ${x?"border-blue-500 bg-blue-50 dark:bg-blue-900/20":"border-primary dark:border-gray-700"} ${m?"py-7":"py-12"}`,children:[e.jsx("input",{id:"file-upload",...f()}),e.jsx("label",{htmlFor:"file-upload",className:"sr-only",children:"Upload SQLite File"}),e.jsxs("div",{className:"text-center text-sm md:text-base",children:[e.jsx("span",{className:"hidden sm:block lg:text-lg",children:"Drag and drop file here, or click to select one"}),e.jsx("div",{className:"block sm:hidden",children:m?e.jsx("span",{className:"font-medium",children:"Click to select a file"}):e.jsx("span",{className:"font-medium",children:"Click to select a SQLite file"})})]})]}),m&&e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx(ct,{}),e.jsx(Qa,{})]})]}),[c,f,x,r]),g=l.useMemo(()=>p(!!r),[p,r]);return e.jsxs("section",{className:"mx-auto w-full",children:[g,e.jsx(qa,{errors:n})]})}const qa=k.memo(({errors:t})=>(k.useEffect(()=>{t==null||t.forEach(s=>$(s.message,{position:"bottom-right"}))},[t]),null));function Va(){return e.jsx("header",{className:"rounded bg-gradient-to-r shadow-md dark:from-gray-800 dark:to-indigo-900",children:e.jsx("div",{className:"mx-auto max-w-4xl px-4 py-8 sm:py-12",children:e.jsxs("div",{className:"flex flex-col items-center text-center",children:[e.jsx("h1",{className:"mb-2 text-2xl font-bold sm:text-3xl",children:"SQLite Viewer"}),e.jsx("p",{className:"max-w-md text-sm sm:text-base",children:"Explore and analyze your SQLite databases directly in your browser"})]})})})}const za=zt,Ga=Vt,dt=l.forwardRef(({className:t,...s},a)=>e.jsx(ve,{className:d("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),...s,ref:a}));dt.displayName=ve.displayName;const ut=l.forwardRef(({className:t,...s},a)=>e.jsxs(Ga,{children:[e.jsx(dt,{}),e.jsx(Re,{ref:a,className:d("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",t),...s})]}));ut.displayName=Re.displayName;const mt=({className:t,...s})=>e.jsx("div",{className:d("flex flex-col space-y-2",t),...s});mt.displayName="AlertDialogHeader";const ft=({className:t,...s})=>e.jsx("div",{className:d("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...s});ft.displayName="AlertDialogFooter";const xt=l.forwardRef(({className:t,...s},a)=>e.jsx(Te,{ref:a,className:d("text-lg font-semibold",t),...s}));xt.displayName=Te.displayName;const pt=l.forwardRef(({className:t,...s},a)=>e.jsx(Se,{ref:a,className:d("text-sm text-muted-foreground",t),...s}));pt.displayName=Se.displayName;const ht=l.forwardRef(({className:t,...s},a)=>e.jsx(Ae,{ref:a,className:d(ee(),t),...s}));ht.displayName=Ae.displayName;const gt=l.forwardRef(({className:t,...s},a)=>e.jsx(De,{ref:a,className:d(ee({variant:"outline"}),"mt-2 sm:mt-0",t),...s}));gt.displayName=De.displayName;function Wa({showDialog:t,setShowDialog:s,onConfirm:a}){const r=l.useCallback(()=>{s(!1)},[s]);return e.jsx(za,{open:t,onOpenChange:s,children:e.jsxs(ut,{children:[e.jsxs(mt,{children:[e.jsx(xt,{children:"Use Proxy to Load Database?"}),e.jsx(pt,{children:"We couldn't load the database from the provided URL due to CORS restrictions. Would you like to try using a proxy?"})]}),e.jsx("div",{className:"font-semibold text-yellow-600 md:text-left",children:"Warning: Using the proxy will route your database traffic through cors.eu.org."}),e.jsxs(ft,{children:[e.jsx(gt,{onClick:r,children:"Cancel"}),e.jsx(ht,{onClick:a,children:"Use Proxy"})]})]})})}function _a(){return e.jsx("footer",{className:"fixed bottom-0 left-0 right-0 border-t bg-background shadow-md",children:e.jsx("div",{className:"mx-auto max-w-7xl px-4 sm:px-6 lg:px-8",children:e.jsxs("div",{className:"flex items-center justify-between py-4 md:py-6",children:[e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sms hidden sm:block",children:"No file will be uploaded to server. Using JavaScript, sql.js"}),e.jsx("p",{className:"text-sm sm:hidden",children:"No file uploads to server."})]}),e.jsxs("a",{href:"https://github.com/vwh/sqlite-viewer",target:"_blank",rel:"noopener noreferrer",className:"flex items-center space-x-2 text-blue-500",title:"Star on GitHub",children:[e.jsx(Es,{className:"h-5 w-5"}),e.jsx("span",{className:"text-sm font-medium hover:underline",children:"Star us on GitHub"})]})]}),e.jsx("div",{className:"flex items-center space-x-4",children:e.jsx(ct,{})})]})})})}function P({icon:t,title:s,description:a}){return e.jsxs("div",{className:"flex items-start space-x-3",children:[e.jsx("div",{className:"flex-shrink-0",children:e.jsx(t,{className:"h-6 w-6 text-blue-500"})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg font-medium",children:s}),e.jsx("p",{className:"mt-1 text-sm",children:a})]})]})}function Ka(){return e.jsxs(e.Fragment,{children:[e.jsx("section",{className:"rounded bg-gradient-to-r py-6 shadow-md dark:from-gray-800 dark:to-indigo-900 md:py-10",children:e.jsx("div",{className:"mx-auto max-w-7xl px-4 sm:px-6 lg:px-8",children:e.jsx("div",{children:e.jsxs("div",{className:"grid grid-cols-1 gap-8 sm:grid-cols-2 lg:grid-cols-3",children:[e.jsx(P,{icon:vs,title:"Browser Based",description:"No installation required. Access and analyze your SQLite databases directly in your web browser."}),e.jsx(P,{icon:Rs,title:"Lightning Fast",description:"Powered by WebAssembly (WASM) for near-native performance, even with large databases."}),e.jsx(P,{icon:Ts,title:"100% Secure",description:"Your data never leaves your device. All processing happens client-side, ensuring complete privacy."}),e.jsx(P,{icon:Fe,title:"Customizable Interface",description:"Different themes and settings. Adjust the look and feel of your interface to suit your preferences and workflow."}),e.jsx(P,{icon:Ss,title:"Offline Capable",description:"Work on your databases without an internet connection. Perfect for sensitive data or remote work."}),e.jsx(P,{icon:As,title:"PWA Support",description:"Install the app on your desktop or mobile device for a genuine native experience. Enjoy robust offline functionality."})]})})})}),e.jsx("div",{className:"pb-[72px] md:pb-0"})]})}function Ya(){const{db:t,tables:s,isLoading:a,loadDatabase:r,expandPage:o}=j(),[n,i]=l.useState(null),[u,c]=l.useState(!1),[f,x]=l.useState(null),[p,g]=l.useState(!1),m=l.useRef(!1),h=l.useCallback(async(N,E=!1)=>{if(!/^(https?:\/\/(?:www\.)?[a-zA-Z0-9-]{1,256}\.[a-zA-Z]{2,6}(?:\/[^\s]*)?)$/i.test(N)){i("Invalid URL");return}try{g(!0);const v=E?`https://cors.eu.org/${encodeURIComponent(N)}`:N,S=await fetch(v);if(!S.ok)throw new Error("URL not found or invalid");const D=await S.blob(),I=new File([D],"database.sqlite");await r(I),i(null)}catch(v){E?i(`Error whilefetching, ${v instanceof Error?v.message:String(v)}`):(x(N),c(!0))}finally{g(!1)}},[r]);l.useEffect(()=>{if(m.current)return;const E=new URLSearchParams(window.location.search).get("url");E&&(h(decodeURIComponent(E)),m.current=!0)},[h]);const w=l.useCallback(()=>{f&&(h(f,!0),c(!1))},[f,h]),C=()=>a||p?e.jsxs(Q,{type:"loading",children:[p?"Fetching":"Loading"," SQLite file"]}):n&&!t?e.jsx(Q,{type:"error",children:n}):t?s.length>0?e.jsx(Aa,{}):e.jsx(Q,{type:"info",children:"Your database is empty, no tables found"}):null;return e.jsxs("main",{id:"main",className:`mx-auto flex h-screen flex-col ${t?"gap-3":"gap-4"} p-4 ${o?"w-full":"container"}`,children:[!t&&e.jsx(Va,{}),e.jsx(Ha,{}),C(),!t&&e.jsxs(e.Fragment,{children:[e.jsx(Ka,{})," ",e.jsx(_a,{})]}),e.jsx(Wa,{showDialog:u,setShowDialog:c,onConfirm:w})]})}const Xa=({...t})=>e.jsx(Bs,{className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-primary group-[.toaster]:text-background group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...t});Ct.createRoot(document.getElementById("root")).render(e.jsxs(k.StrictMode,{children:[e.jsx(Ya,{}),e.jsx(Xa,{})]})); diff --git a/assets/index-CPvICklA.js.gz b/assets/index-CPvICklA.js.gz new file mode 100644 index 0000000..207bb63 Binary files /dev/null and b/assets/index-CPvICklA.js.gz differ diff --git a/assets/index-CdfIWGO4.js.gz b/assets/index-CdfIWGO4.js.gz deleted file mode 100644 index 3c485e7..0000000 Binary files a/assets/index-CdfIWGO4.js.gz and /dev/null differ diff --git a/assets/index-3WB_jjc1.css b/assets/index-z8HxNPN9.css similarity index 97% rename from assets/index-3WB_jjc1.css rename to assets/index-z8HxNPN9.css index 50976a1..e96ac00 100644 --- a/assets/index-3WB_jjc1.css +++ b/assets/index-z8HxNPN9.css @@ -1 +1 @@ -.nord.light{--background: 208 36% 100%;--foreground: 208 51% 1%;--muted: 208 40% 85%;--muted-foreground: 208 10% 35%;--popover: 208 36% 100%;--popover-foreground: 208 51% 1%;--card: 0 0% 99%;--card-foreground: 208 51% 0%;--border: 220 13% 91%;--input: 220 13% 91%;--primary: 208 67% 75%;--primary-foreground: 208 67% 30%;--secondary: 208 15% 91%;--secondary-foreground: 208 15% 31%;--accent: 208 15% 91%;--accent-foreground: 208 15% 31%;--destructive: 4 99% 32%;--destructive-foreground: 4 99% 92%;--ring: 208 67% 90%}.nord.dark{--background: 208 57% 0%;--foreground: 208 21% 99%;--muted: 208 40% 15%;--muted-foreground: 208 10% 65%;--popover: 208 57% 0%;--popover-foreground: 208 21% 99%;--card: 0 0% 1%;--card-foreground: 0 0% 100%;--border: 215 27.9% 16.9%;--input: 215 27.9% 16.9%;--primary: 208 67% 90%;--primary-foreground: 208 67% 30%;--secondary: 208 6% 10%;--secondary-foreground: 208 6% 70%;--accent: 208 6% 10%;--accent-foreground: 208 6% 70%;--destructive: 4 99% 46%;--destructive-foreground: 0 0% 100%;--ring: 208 67% 90%}.old.light{--background: 116 35% 99%;--foreground: 116 62% 1%;--muted: 116 10% 85%;--muted-foreground: 116 14% 28%;--popover: 116 35% 99%;--popover-foreground: 116 62% 1%;--card: 116 35% 98%;--card-foreground: 116 62% 0%;--border: 220 13% 91%;--input: 220 13% 91%;--primary: 116 21% 73%;--primary-foreground: 116 21% 13%;--secondary: 116 9% 80%;--secondary-foreground: 116 9% 20%;--accent: 116 18% 72%;--accent-foreground: 116 18% 12%;--destructive: 7 98% 22%;--destructive-foreground: 7 98% 82%;--ring: 116 21% 73%;--radius: .5rem}.old.dark{--background: 116 52% 3%;--foreground: 116 39% 98%;--muted: 116 10% 15%;--muted-foreground: 116 14% 72%;--popover: 116 52% 3%;--popover-foreground: 116 39% 98%;--card: 116 52% 4%;--card-foreground: 116 39% 99%;--border: 215 27.9% 16.9%;--input: 215 27.9% 16.9%;--primary: 116 21% 73%;--primary-foreground: 116 21% 13%;--secondary: 116 3% 19%;--secondary-foreground: 116 3% 79%;--accent: 116 11% 24%;--accent-foreground: 116 11% 84%;--destructive: 7 98% 46%;--destructive-foreground: 0 0% 100%;--ring: 116 21% 73%}.zinc.light{--background: 0 0% 100%;--foreground: 240 10% 3.9%;--card: 0 0% 100%;--card-foreground: 240 10% 3.9%;--popover: 0 0% 100%;--popover-foreground: 240 10% 3.9%;--primary: 240 5.9% 10%;--primary-foreground: 0 0% 98%;--secondary: 240 4.8% 95.9%;--secondary-foreground: 240 5.9% 10%;--muted: 240 4.8% 95.9%;--muted-foreground: 240 3.8% 46.1%;--accent: 240 4.8% 95.9%;--accent-foreground: 240 5.9% 10%;--destructive: 0 84.2% 60.2%;--destructive-foreground: 0 0% 98%;--border: 240 5.9% 90%;--input: 240 5.9% 90%;--ring: 240 5.9% 10%}.zinc.dark{--background: 240 10% 3.9%;--foreground: 0 0% 98%;--card: 240 10% 3.9%;--card-foreground: 0 0% 98%;--popover: 240 10% 3.9%;--popover-foreground: 0 0% 98%;--primary: 0 0% 98%;--primary-foreground: 240 5.9% 10%;--secondary: 240 3.7% 15.9%;--secondary-foreground: 0 0% 98%;--muted: 240 3.7% 15.9%;--muted-foreground: 240 5% 64.9%;--accent: 240 3.7% 15.9%;--accent-foreground: 0 0% 98%;--destructive: 0 62.8% 30.6%;--destructive-foreground: 0 0% 98%;--border: 240 3.7% 15.9%;--input: 240 3.7% 15.9%;--ring: 240 4.9% 83.9%}*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}:root{--background: 0 0% 100%;--foreground: 222.2 84% 4.9%;--card: 0 0% 100%;--card-foreground: 222.2 84% 4.9%;--popover: 0 0% 100%;--popover-foreground: 222.2 84% 4.9%;--primary: 222.2 47.4% 11.2%;--primary-foreground: 210 40% 98%;--secondary: 210 40% 96.1%;--secondary-foreground: 222.2 47.4% 11.2%;--muted: 210 40% 96.1%;--muted-foreground: 215.4 16.3% 46.9%;--accent: 210 40% 96.1%;--accent-foreground: 222.2 47.4% 11.2%;--destructive: 0 84.2% 60.2%;--destructive-foreground: 210 40% 98%;--border: 214.3 31.8% 91.4%;--input: 214.3 31.8% 91.4%;--ring: 222.2 84% 4.9%;--radius: .5rem}.dark{--background: 222.2 84% 4.9%;--foreground: 210 40% 98%;--card: 222.2 84% 4.9%;--card-foreground: 210 40% 98%;--popover: 222.2 84% 4.9%;--popover-foreground: 210 40% 98%;--primary: 210 40% 98%;--primary-foreground: 222.2 47.4% 11.2%;--secondary: 217.2 32.6% 17.5%;--secondary-foreground: 210 40% 98%;--muted: 217.2 32.6% 17.5%;--muted-foreground: 215 20.2% 65.1%;--accent: 217.2 32.6% 17.5%;--accent-foreground: 210 40% 98%;--destructive: 0 62.8% 30.6%;--destructive-foreground: 210 40% 98%;--border: 217.2 32.6% 17.5%;--input: 217.2 32.6% 17.5%;--ring: 212.7 26.8% 83.9}*{border-color:hsl(var(--border))}body{background-color:hsl(var(--background));color:hsl(var(--foreground));font-feature-settings:"rlig" 1,"calt" 1}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-track{background:var(--scrollbar-track);border-radius:4px}::-webkit-scrollbar-thumb{background:var(--scrollbar-thumb);border-radius:4px;-webkit-transition:background .2s ease-in-out;transition:background .2s ease-in-out}::-webkit-scrollbar-thumb:hover{background:var(--scrollbar-thumb-hover)}:root{--scrollbar-track: hsl(var(--secondary));--scrollbar-thumb: hsl(var(--muted-foreground) / .5);--scrollbar-thumb-hover: hsl(var(--muted-foreground) / .7)}.dark{--scrollbar-track: hsl(var(--secondary));--scrollbar-thumb: hsl(var(--muted-foreground) / .5);--scrollbar-thumb-hover: hsl(var(--muted-foreground) / .7)}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.container{width:100%;margin-right:auto;margin-left:auto;padding-right:2rem;padding-left:2rem}@media (min-width: 1400px){.container{max-width:1400px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.inset-x-0{left:0;right:0}.bottom-0{bottom:0}.bottom-2{bottom:.5rem}.left-0{left:0}.left-1\/2{left:50%}.left-2{left:.5rem}.left-\[50\%\]{left:50%}.right-0{right:0}.top-\[50\%\]{top:50%}.z-10{z-index:10}.z-50{z-index:50}.-mx-1{margin-left:-.25rem;margin-right:-.25rem}.mx-auto{margin-left:auto;margin-right:auto}.my-1{margin-top:.25rem;margin-bottom:.25rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-\[40px\]{margin-bottom:40px}.mb-\[5px\]{margin-bottom:5px}.ml-2{margin-left:.5rem}.mr-3{margin-right:.75rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-24{margin-top:6rem}.mt-4{margin-top:1rem}.mt-\[2px\]{margin-top:2px}.mt-auto{margin-top:auto}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.aspect-square{aspect-ratio:1 / 1}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-12{height:3rem}.h-2{height:.5rem}.h-2\.5{height:.625rem}.h-3\.5{height:.875rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-9{height:2.25rem}.h-\[155px\]{height:155px}.h-\[1px\]{height:1px}.h-\[var\(--radix-select-trigger-height\)\]{height:var(--radix-select-trigger-height)}.h-auto{height:auto}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.max-h-40{max-height:10rem}.max-h-7{max-height:1.75rem}.max-h-96{max-height:24rem}.w-10{width:2.5rem}.w-2\.5{width:.625rem}.w-3\.5{width:.875rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-72{width:18rem}.w-80{width:20rem}.w-\[100px\]{width:100px}.w-\[1px\]{width:1px}.w-\[270px\]{width:270px}.w-full{width:100%}.min-w-\[100px\]{min-width:100px}.min-w-\[150px\]{min-width:150px}.min-w-\[8rem\]{min-width:8rem}.min-w-\[var\(--radix-select-trigger-width\)\]{min-width:var(--radix-select-trigger-width)}.max-w-4xl{max-width:56rem}.max-w-7xl{max-width:80rem}.max-w-\[200px\]{max-width:200px}.max-w-full{max-width:100%}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.max-w-sm{max-width:24rem}.flex-1{flex:1 1 0%}.flex-shrink-0,.shrink-0{flex-shrink:0}.flex-grow,.grow{flex-grow:1}.caption-bottom{caption-side:bottom}.-translate-x-1\/2,.translate-x-\[-50\%\]{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-\[-50\%\]{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes circular-reveal{0%{clip-path:circle(0% at 50% 50%)}to{clip-path:circle(150% at 50% 50%)}}.animate-circular-reveal{animation:circular-reveal .3s ease-in-out}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-8{gap:2rem}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.25rem * var(--tw-space-x-reverse));margin-left:calc(.25rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.75rem * var(--tw-space-x-reverse));margin-left:calc(.75rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.self-start{align-self:flex-start}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text-ellipsis{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.text-balance{text-wrap:balance}.break-words{overflow-wrap:break-word}.rounded{border-radius:.25rem}.rounded-\[inherit\]{border-radius:inherit}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-none{border-radius:0}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.rounded-t-\[10px\]{border-top-left-radius:10px;border-top-right-radius:10px}.border{border-width:1px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-l{border-left-width:1px}.border-l-4{border-left-width:4px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-blue-500{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity))}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.border-green-500{--tw-border-opacity: 1;border-color:rgb(34 197 94 / var(--tw-border-opacity))}.border-input{border-color:hsl(var(--input))}.border-primary{border-color:hsl(var(--primary))}.border-red-500{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity))}.border-transparent{border-color:transparent}.border-yellow-500{--tw-border-opacity: 1;border-color:rgb(234 179 8 / var(--tw-border-opacity))}.border-l-transparent{border-left-color:transparent}.border-t-transparent{border-top-color:transparent}.bg-background{background-color:hsl(var(--background))}.bg-black\/80{background-color:#000c}.bg-blue-100{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity))}.bg-blue-50{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity))}.bg-border{background-color:hsl(var(--border))}.bg-destructive{background-color:hsl(var(--destructive))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.bg-green-100{--tw-bg-opacity: 1;background-color:rgb(220 252 231 / var(--tw-bg-opacity))}.bg-muted{background-color:hsl(var(--muted))}.bg-muted\/50{background-color:hsl(var(--muted) / .5)}.bg-popover{background-color:hsl(var(--popover))}.bg-primary{background-color:hsl(var(--primary))}.bg-red-100{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity))}.bg-secondary{background-color:hsl(var(--secondary))}.bg-yellow-100{--tw-bg-opacity: 1;background-color:rgb(254 249 195 / var(--tw-bg-opacity))}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.fill-current{fill:currentColor}.object-contain{-o-object-fit:contain;object-fit:contain}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-\[1px\]{padding:1px}.p-\[6px\]{padding:6px}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-8{padding-left:2rem;padding-right:2rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-7{padding-top:1.75rem;padding-bottom:1.75rem}.py-8{padding-top:2rem;padding-bottom:2rem}.py-\[11px\]{padding-top:11px;padding-bottom:11px}.pb-4{padding-bottom:1rem}.pb-8{padding-bottom:2rem}.pb-\[72px\]{padding-bottom:72px}.pl-8{padding-left:2rem}.pr-2{padding-right:.5rem}.text-left{text-align:left}.text-center{text-align:center}.align-middle{vertical-align:middle}.text-2xl{font-size:1.5rem;line-height:2rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.italic{font-style:italic}.leading-none{line-height:1}.tracking-tight{letter-spacing:-.025em}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.text-blue-800{--tw-text-opacity: 1;color:rgb(30 64 175 / var(--tw-text-opacity))}.text-current{color:currentColor}.text-destructive-foreground{color:hsl(var(--destructive-foreground))}.text-foreground{color:hsl(var(--foreground))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.text-green-500{--tw-text-opacity: 1;color:rgb(34 197 94 / var(--tw-text-opacity))}.text-green-800{--tw-text-opacity: 1;color:rgb(22 101 52 / var(--tw-text-opacity))}.text-indigo-500{--tw-text-opacity: 1;color:rgb(99 102 241 / var(--tw-text-opacity))}.text-muted-foreground{color:hsl(var(--muted-foreground))}.text-pink-500{--tw-text-opacity: 1;color:rgb(236 72 153 / var(--tw-text-opacity))}.text-popover-foreground{color:hsl(var(--popover-foreground))}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-purple-500{--tw-text-opacity: 1;color:rgb(168 85 247 / var(--tw-text-opacity))}.text-purple-600{--tw-text-opacity: 1;color:rgb(147 51 234 / var(--tw-text-opacity))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity))}.text-red-800{--tw-text-opacity: 1;color:rgb(153 27 27 / var(--tw-text-opacity))}.text-secondary-foreground{color:hsl(var(--secondary-foreground))}.text-yellow-500{--tw-text-opacity: 1;color:rgb(234 179 8 / var(--tw-text-opacity))}.text-yellow-600{--tw-text-opacity: 1;color:rgb(202 138 4 / var(--tw-text-opacity))}.text-yellow-800{--tw-text-opacity: 1;color:rgb(133 77 14 / var(--tw-text-opacity))}.underline-offset-4{text-underline-offset:4px}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring-offset-background{--tw-ring-offset-color: hsl(var(--background))}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity, 1);transform:translate3d(var(--tw-enter-translate-x, 0),var(--tw-enter-translate-y, 0),0) scale3d(var(--tw-enter-scale, 1),var(--tw-enter-scale, 1),var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity, 1);transform:translate3d(var(--tw-exit-translate-x, 0),var(--tw-exit-translate-y, 0),0) scale3d(var(--tw-exit-scale, 1),var(--tw-exit-scale, 1),var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))}}.duration-200{animation-duration:.2s}.duration-300{animation-duration:.3s}.ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}.cm-focused{outline:none!important}.file\:border-0::file-selector-button{border-width:0px}.file\:bg-transparent::file-selector-button{background-color:transparent}.file\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\:font-medium::file-selector-button{font-weight:500}.placeholder\:text-muted-foreground::-moz-placeholder{color:hsl(var(--muted-foreground))}.placeholder\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.hover\:bg-accent:hover{background-color:hsl(var(--accent))}.hover\:bg-destructive\/80:hover{background-color:hsl(var(--destructive) / .8)}.hover\:bg-destructive\/90:hover{background-color:hsl(var(--destructive) / .9)}.hover\:bg-muted\/50:hover{background-color:hsl(var(--muted) / .5)}.hover\:bg-primary\/80:hover{background-color:hsl(var(--primary) / .8)}.hover\:bg-primary\/90:hover{background-color:hsl(var(--primary) / .9)}.hover\:bg-secondary:hover{background-color:hsl(var(--secondary))}.hover\:bg-secondary\/80:hover{background-color:hsl(var(--secondary) / .8)}.hover\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\:underline:hover{text-decoration-line:underline}.focus\:bg-accent:focus{background-color:hsl(var(--accent))}.focus\:text-accent-foreground:focus{color:hsl(var(--accent-foreground))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-ring:focus{--tw-ring-color: hsl(var(--ring))}.focus\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-ring:focus-visible{--tw-ring-color: hsl(var(--ring))}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.group.toaster .group-\[\.toaster\]\:border-border{border-color:hsl(var(--border))}.group.toast .group-\[\.toast\]\:bg-muted{background-color:hsl(var(--muted))}.group.toast .group-\[\.toast\]\:bg-primary,.group.toaster .group-\[\.toaster\]\:bg-primary{background-color:hsl(var(--primary))}.group.toast .group-\[\.toast\]\:text-muted-foreground{color:hsl(var(--muted-foreground))}.group.toast .group-\[\.toast\]\:text-primary-foreground{color:hsl(var(--primary-foreground))}.group.toaster .group-\[\.toaster\]\:text-background{color:hsl(var(--background))}.group.toaster .group-\[\.toaster\]\:shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.peer:disabled~.peer-disabled\:cursor-not-allowed{cursor:not-allowed}.peer:disabled~.peer-disabled\:opacity-70{opacity:.7}.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[side\=bottom\]\:translate-y-1[data-side=bottom]{--tw-translate-y: .25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=left\]\:-translate-x-1[data-side=left]{--tw-translate-x: -.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=right\]\:translate-x-1[data-side=right]{--tw-translate-x: .25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=top\]\:-translate-y-1[data-side=top]{--tw-translate-y: -.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[state\=selected\]\:bg-muted[data-state=selected]{background-color:hsl(var(--muted))}.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.data-\[state\=open\]\:animate-in[data-state=open]{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.data-\[state\=closed\]\:animate-out[data-state=closed]{animation-name:exit;animation-duration:.15s;--tw-exit-opacity: initial;--tw-exit-scale: initial;--tw-exit-rotate: initial;--tw-exit-translate-x: initial;--tw-exit-translate-y: initial}.data-\[state\=closed\]\:fade-out-0[data-state=closed]{--tw-exit-opacity: 0}.data-\[state\=open\]\:fade-in-0[data-state=open]{--tw-enter-opacity: 0}.data-\[state\=closed\]\:zoom-out-95[data-state=closed]{--tw-exit-scale: .95}.data-\[state\=open\]\:zoom-in-95[data-state=open]{--tw-enter-scale: .95}.data-\[side\=bottom\]\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y: -.5rem}.data-\[side\=left\]\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x: .5rem}.data-\[side\=right\]\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x: -.5rem}.data-\[side\=top\]\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y: .5rem}.data-\[state\=closed\]\:slide-out-to-left-1\/2[data-state=closed]{--tw-exit-translate-x: -50%}.data-\[state\=closed\]\:slide-out-to-top-\[48\%\][data-state=closed]{--tw-exit-translate-y: -48%}.data-\[state\=open\]\:slide-in-from-left-1\/2[data-state=open]{--tw-enter-translate-x: -50%}.data-\[state\=open\]\:slide-in-from-top-\[48\%\][data-state=open]{--tw-enter-translate-y: -48%}.dark\:border:is(.dark *){border-width:1px}.dark\:border-gray-700:is(.dark *){--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity))}.dark\:bg-blue-900\/20:is(.dark *){background-color:#1e3a8a33}.dark\:bg-gray-700:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}.dark\:from-gray-800:is(.dark *){--tw-gradient-from: #1f2937 var(--tw-gradient-from-position);--tw-gradient-to: rgb(31 41 55 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.dark\:to-indigo-900:is(.dark *){--tw-gradient-to: #312e81 var(--tw-gradient-to-position)}.dark\:text-red-400:is(.dark *){--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity))}@media (min-width: 640px){.sm\:mt-0{margin-top:0}.sm\:block{display:block}.sm\:hidden{display:none}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:justify-end{justify-content:flex-end}.sm\:space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.sm\:rounded-lg{border-radius:var(--radius)}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\:py-12{padding-top:3rem;padding-bottom:3rem}.sm\:text-left{text-align:left}.sm\:text-3xl{font-size:1.875rem;line-height:2.25rem}.sm\:text-base{font-size:1rem;line-height:1.5rem}}@media (min-width: 768px){.md\:block{display:block}.md\:min-w-\[200px\]{min-width:200px}.md\:flex-row{flex-direction:row}.md\:flex-col{flex-direction:column}.md\:py-10{padding-top:2.5rem;padding-bottom:2.5rem}.md\:py-6{padding-top:1.5rem;padding-bottom:1.5rem}.md\:pb-0{padding-bottom:0}.md\:text-base{font-size:1rem;line-height:1.5rem}}@media (min-width: 1024px){.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:px-8{padding-left:2rem;padding-right:2rem}.lg\:text-lg{font-size:1.125rem;line-height:1.75rem}}@media (min-width: 1430px){.expand\:block{display:block}}.\[\&\:has\(\[role\=checkbox\]\)\]\:pr-0:has([role=checkbox]){padding-right:0}.\[\&\>span\]\:line-clamp-1>span{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.\[\&\>tr\]\:last\:border-b-0:last-child>tr{border-bottom-width:0px}.\[\&_tr\:last-child\]\:border-0 tr:last-child{border-width:0px}.\[\&_tr\]\:border-b tr{border-bottom-width:1px} +.nord.light{--background: 208 36% 100%;--foreground: 208 51% 1%;--muted: 208 40% 85%;--muted-foreground: 208 10% 35%;--popover: 208 36% 100%;--popover-foreground: 208 51% 1%;--card: 0 0% 99%;--card-foreground: 208 51% 0%;--border: 220 13% 91%;--input: 220 13% 91%;--primary: 208 67% 75%;--primary-foreground: 208 67% 30%;--secondary: 208 15% 91%;--secondary-foreground: 208 15% 31%;--accent: 208 15% 91%;--accent-foreground: 208 15% 31%;--destructive: 4 99% 32%;--destructive-foreground: 4 99% 92%;--ring: 208 67% 90%}.nord.dark{--background: 208 57% 0%;--foreground: 208 21% 99%;--muted: 208 40% 15%;--muted-foreground: 208 10% 65%;--popover: 208 57% 0%;--popover-foreground: 208 21% 99%;--card: 0 0% 1%;--card-foreground: 0 0% 100%;--border: 215 27.9% 16.9%;--input: 215 27.9% 16.9%;--primary: 208 67% 90%;--primary-foreground: 208 67% 30%;--secondary: 208 6% 10%;--secondary-foreground: 208 6% 70%;--accent: 208 6% 10%;--accent-foreground: 208 6% 70%;--destructive: 4 99% 46%;--destructive-foreground: 0 0% 100%;--ring: 208 67% 90%}.old.light{--background: 116 35% 99%;--foreground: 116 62% 1%;--muted: 116 10% 85%;--muted-foreground: 116 14% 28%;--popover: 116 35% 99%;--popover-foreground: 116 62% 1%;--card: 116 35% 98%;--card-foreground: 116 62% 0%;--border: 220 13% 91%;--input: 220 13% 91%;--primary: 116 21% 73%;--primary-foreground: 116 21% 13%;--secondary: 116 9% 80%;--secondary-foreground: 116 9% 20%;--accent: 116 18% 72%;--accent-foreground: 116 18% 12%;--destructive: 7 98% 22%;--destructive-foreground: 7 98% 82%;--ring: 116 21% 73%;--radius: .5rem}.old.dark{--background: 116 52% 3%;--foreground: 116 39% 98%;--muted: 116 10% 15%;--muted-foreground: 116 14% 72%;--popover: 116 52% 3%;--popover-foreground: 116 39% 98%;--card: 116 52% 4%;--card-foreground: 116 39% 99%;--border: 215 27.9% 16.9%;--input: 215 27.9% 16.9%;--primary: 116 21% 73%;--primary-foreground: 116 21% 13%;--secondary: 116 3% 19%;--secondary-foreground: 116 3% 79%;--accent: 116 11% 24%;--accent-foreground: 116 11% 84%;--destructive: 7 98% 46%;--destructive-foreground: 0 0% 100%;--ring: 116 21% 73%}.zinc.light{--background: 0 0% 100%;--foreground: 240 10% 3.9%;--card: 0 0% 100%;--card-foreground: 240 10% 3.9%;--popover: 0 0% 100%;--popover-foreground: 240 10% 3.9%;--primary: 240 5.9% 10%;--primary-foreground: 0 0% 98%;--secondary: 240 4.8% 95.9%;--secondary-foreground: 240 5.9% 10%;--muted: 240 4.8% 95.9%;--muted-foreground: 240 3.8% 46.1%;--accent: 240 4.8% 95.9%;--accent-foreground: 240 5.9% 10%;--destructive: 0 84.2% 60.2%;--destructive-foreground: 0 0% 98%;--border: 240 5.9% 90%;--input: 240 5.9% 90%;--ring: 240 5.9% 10%}.zinc.dark{--background: 240 10% 3.9%;--foreground: 0 0% 98%;--card: 240 10% 3.9%;--card-foreground: 0 0% 98%;--popover: 240 10% 3.9%;--popover-foreground: 0 0% 98%;--primary: 0 0% 98%;--primary-foreground: 240 5.9% 10%;--secondary: 240 3.7% 15.9%;--secondary-foreground: 0 0% 98%;--muted: 240 3.7% 15.9%;--muted-foreground: 240 5% 64.9%;--accent: 240 3.7% 15.9%;--accent-foreground: 0 0% 98%;--destructive: 0 62.8% 30.6%;--destructive-foreground: 0 0% 98%;--border: 240 3.7% 15.9%;--input: 240 3.7% 15.9%;--ring: 240 4.9% 83.9%}*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}:root{--background: 0 0% 100%;--foreground: 222.2 84% 4.9%;--card: 0 0% 100%;--card-foreground: 222.2 84% 4.9%;--popover: 0 0% 100%;--popover-foreground: 222.2 84% 4.9%;--primary: 222.2 47.4% 11.2%;--primary-foreground: 210 40% 98%;--secondary: 210 40% 96.1%;--secondary-foreground: 222.2 47.4% 11.2%;--muted: 210 40% 96.1%;--muted-foreground: 215.4 16.3% 46.9%;--accent: 210 40% 96.1%;--accent-foreground: 222.2 47.4% 11.2%;--destructive: 0 84.2% 60.2%;--destructive-foreground: 210 40% 98%;--border: 214.3 31.8% 91.4%;--input: 214.3 31.8% 91.4%;--ring: 222.2 84% 4.9%;--radius: .5rem}.dark{--background: 222.2 84% 4.9%;--foreground: 210 40% 98%;--card: 222.2 84% 4.9%;--card-foreground: 210 40% 98%;--popover: 222.2 84% 4.9%;--popover-foreground: 210 40% 98%;--primary: 210 40% 98%;--primary-foreground: 222.2 47.4% 11.2%;--secondary: 217.2 32.6% 17.5%;--secondary-foreground: 210 40% 98%;--muted: 217.2 32.6% 17.5%;--muted-foreground: 215 20.2% 65.1%;--accent: 217.2 32.6% 17.5%;--accent-foreground: 210 40% 98%;--destructive: 0 62.8% 30.6%;--destructive-foreground: 210 40% 98%;--border: 217.2 32.6% 17.5%;--input: 217.2 32.6% 17.5%;--ring: 212.7 26.8% 83.9}*{border-color:hsl(var(--border))}body{background-color:hsl(var(--background));color:hsl(var(--foreground));font-feature-settings:"rlig" 1,"calt" 1}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-track{background:var(--scrollbar-track);border-radius:4px}::-webkit-scrollbar-thumb{background:var(--scrollbar-thumb);border-radius:4px;-webkit-transition:background .2s ease-in-out;transition:background .2s ease-in-out}::-webkit-scrollbar-thumb:hover{background:var(--scrollbar-thumb-hover)}:root{--scrollbar-track: hsl(var(--secondary));--scrollbar-thumb: hsl(var(--muted-foreground) / .5);--scrollbar-thumb-hover: hsl(var(--muted-foreground) / .7)}.dark{--scrollbar-track: hsl(var(--secondary));--scrollbar-thumb: hsl(var(--muted-foreground) / .5);--scrollbar-thumb-hover: hsl(var(--muted-foreground) / .7)}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.container{width:100%;margin-right:auto;margin-left:auto;padding-right:2rem;padding-left:2rem}@media (min-width: 1400px){.container{max-width:1400px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.inset-x-0{left:0;right:0}.bottom-0{bottom:0}.bottom-2{bottom:.5rem}.left-0{left:0}.left-1\/2{left:50%}.left-2{left:.5rem}.left-\[50\%\]{left:50%}.right-0{right:0}.top-\[50\%\]{top:50%}.z-10{z-index:10}.z-50{z-index:50}.-mx-1{margin-left:-.25rem;margin-right:-.25rem}.mx-auto{margin-left:auto;margin-right:auto}.my-1{margin-top:.25rem;margin-bottom:.25rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-\[40px\]{margin-bottom:40px}.mb-\[5px\]{margin-bottom:5px}.ml-2{margin-left:.5rem}.mr-3{margin-right:.75rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-24{margin-top:6rem}.mt-4{margin-top:1rem}.mt-\[2px\]{margin-top:2px}.mt-auto{margin-top:auto}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.aspect-square{aspect-ratio:1 / 1}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-12{height:3rem}.h-2{height:.5rem}.h-2\.5{height:.625rem}.h-3\.5{height:.875rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-9{height:2.25rem}.h-\[155px\]{height:155px}.h-\[1px\]{height:1px}.h-\[var\(--radix-select-trigger-height\)\]{height:var(--radix-select-trigger-height)}.h-auto{height:auto}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.max-h-40{max-height:10rem}.max-h-7{max-height:1.75rem}.max-h-96{max-height:24rem}.w-10{width:2.5rem}.w-2\.5{width:.625rem}.w-3\.5{width:.875rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-72{width:18rem}.w-80{width:20rem}.w-\[100px\]{width:100px}.w-\[1px\]{width:1px}.w-\[270px\]{width:270px}.w-full{width:100%}.min-w-\[100px\]{min-width:100px}.min-w-\[150px\]{min-width:150px}.min-w-\[8rem\]{min-width:8rem}.min-w-\[var\(--radix-select-trigger-width\)\]{min-width:var(--radix-select-trigger-width)}.max-w-4xl{max-width:56rem}.max-w-7xl{max-width:80rem}.max-w-\[200px\]{max-width:200px}.max-w-full{max-width:100%}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.max-w-sm{max-width:24rem}.flex-1{flex:1 1 0%}.flex-shrink-0,.shrink-0{flex-shrink:0}.flex-grow,.grow{flex-grow:1}.caption-bottom{caption-side:bottom}.-translate-x-1\/2,.translate-x-\[-50\%\]{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-\[-50\%\]{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes circular-reveal{0%{clip-path:circle(0% at 50% 50%)}to{clip-path:circle(150% at 50% 50%)}}.animate-circular-reveal{animation:circular-reveal .3s ease-in-out}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-8{gap:2rem}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.25rem * var(--tw-space-x-reverse));margin-left:calc(.25rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.75rem * var(--tw-space-x-reverse));margin-left:calc(.75rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.self-start{align-self:flex-start}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text-ellipsis{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.text-balance{text-wrap:balance}.break-words{overflow-wrap:break-word}.rounded{border-radius:.25rem}.rounded-\[inherit\]{border-radius:inherit}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-none{border-radius:0}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.rounded-t-\[10px\]{border-top-left-radius:10px;border-top-right-radius:10px}.border{border-width:1px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-l{border-left-width:1px}.border-l-4{border-left-width:4px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-blue-500{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity))}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.border-green-500{--tw-border-opacity: 1;border-color:rgb(34 197 94 / var(--tw-border-opacity))}.border-input{border-color:hsl(var(--input))}.border-primary{border-color:hsl(var(--primary))}.border-red-500{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity))}.border-transparent{border-color:transparent}.border-yellow-500{--tw-border-opacity: 1;border-color:rgb(234 179 8 / var(--tw-border-opacity))}.border-l-transparent{border-left-color:transparent}.border-t-transparent{border-top-color:transparent}.bg-background{background-color:hsl(var(--background))}.bg-black\/80{background-color:#000c}.bg-blue-100{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity))}.bg-blue-50{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity))}.bg-border{background-color:hsl(var(--border))}.bg-destructive{background-color:hsl(var(--destructive))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.bg-green-100{--tw-bg-opacity: 1;background-color:rgb(220 252 231 / var(--tw-bg-opacity))}.bg-muted{background-color:hsl(var(--muted))}.bg-muted\/50{background-color:hsl(var(--muted) / .5)}.bg-popover{background-color:hsl(var(--popover))}.bg-primary{background-color:hsl(var(--primary))}.bg-red-100{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity))}.bg-secondary{background-color:hsl(var(--secondary))}.bg-yellow-100{--tw-bg-opacity: 1;background-color:rgb(254 249 195 / var(--tw-bg-opacity))}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.fill-current{fill:currentColor}.object-contain{-o-object-fit:contain;object-fit:contain}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-\[1px\]{padding:1px}.p-\[6px\]{padding:6px}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-8{padding-left:2rem;padding-right:2rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-7{padding-top:1.75rem;padding-bottom:1.75rem}.py-8{padding-top:2rem;padding-bottom:2rem}.py-\[11px\]{padding-top:11px;padding-bottom:11px}.pb-4{padding-bottom:1rem}.pb-8{padding-bottom:2rem}.pb-\[72px\]{padding-bottom:72px}.pl-8{padding-left:2rem}.pr-2{padding-right:.5rem}.text-left{text-align:left}.text-center{text-align:center}.align-middle{vertical-align:middle}.text-2xl{font-size:1.5rem;line-height:2rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.italic{font-style:italic}.leading-none{line-height:1}.tracking-tight{letter-spacing:-.025em}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.text-blue-800{--tw-text-opacity: 1;color:rgb(30 64 175 / var(--tw-text-opacity))}.text-current{color:currentColor}.text-destructive-foreground{color:hsl(var(--destructive-foreground))}.text-foreground{color:hsl(var(--foreground))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.text-green-500{--tw-text-opacity: 1;color:rgb(34 197 94 / var(--tw-text-opacity))}.text-green-800{--tw-text-opacity: 1;color:rgb(22 101 52 / var(--tw-text-opacity))}.text-indigo-500{--tw-text-opacity: 1;color:rgb(99 102 241 / var(--tw-text-opacity))}.text-muted-foreground{color:hsl(var(--muted-foreground))}.text-pink-500{--tw-text-opacity: 1;color:rgb(236 72 153 / var(--tw-text-opacity))}.text-popover-foreground{color:hsl(var(--popover-foreground))}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-purple-500{--tw-text-opacity: 1;color:rgb(168 85 247 / var(--tw-text-opacity))}.text-purple-600{--tw-text-opacity: 1;color:rgb(147 51 234 / var(--tw-text-opacity))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity))}.text-red-800{--tw-text-opacity: 1;color:rgb(153 27 27 / var(--tw-text-opacity))}.text-secondary-foreground{color:hsl(var(--secondary-foreground))}.text-yellow-500{--tw-text-opacity: 1;color:rgb(234 179 8 / var(--tw-text-opacity))}.text-yellow-600{--tw-text-opacity: 1;color:rgb(202 138 4 / var(--tw-text-opacity))}.text-yellow-800{--tw-text-opacity: 1;color:rgb(133 77 14 / var(--tw-text-opacity))}.underline-offset-4{text-underline-offset:4px}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring-offset-background{--tw-ring-offset-color: hsl(var(--background))}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity, 1);transform:translate3d(var(--tw-enter-translate-x, 0),var(--tw-enter-translate-y, 0),0) scale3d(var(--tw-enter-scale, 1),var(--tw-enter-scale, 1),var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity, 1);transform:translate3d(var(--tw-exit-translate-x, 0),var(--tw-exit-translate-y, 0),0) scale3d(var(--tw-exit-scale, 1),var(--tw-exit-scale, 1),var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))}}.duration-200{animation-duration:.2s}.duration-300{animation-duration:.3s}.ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}.cm-focused{outline:none!important}.file\:border-0::file-selector-button{border-width:0px}.file\:bg-transparent::file-selector-button{background-color:transparent}.file\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\:font-medium::file-selector-button{font-weight:500}.placeholder\:text-muted-foreground::-moz-placeholder{color:hsl(var(--muted-foreground))}.placeholder\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.hover\:bg-accent:hover{background-color:hsl(var(--accent))}.hover\:bg-destructive\/80:hover{background-color:hsl(var(--destructive) / .8)}.hover\:bg-destructive\/90:hover{background-color:hsl(var(--destructive) / .9)}.hover\:bg-muted\/50:hover{background-color:hsl(var(--muted) / .5)}.hover\:bg-primary\/80:hover{background-color:hsl(var(--primary) / .8)}.hover\:bg-primary\/90:hover{background-color:hsl(var(--primary) / .9)}.hover\:bg-secondary:hover{background-color:hsl(var(--secondary))}.hover\:bg-secondary\/80:hover{background-color:hsl(var(--secondary) / .8)}.hover\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\:underline:hover{text-decoration-line:underline}.focus\:bg-accent:focus{background-color:hsl(var(--accent))}.focus\:text-accent-foreground:focus{color:hsl(var(--accent-foreground))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-ring:focus{--tw-ring-color: hsl(var(--ring))}.focus\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-ring:focus-visible{--tw-ring-color: hsl(var(--ring))}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.group.toaster .group-\[\.toaster\]\:border-border{border-color:hsl(var(--border))}.group.toast .group-\[\.toast\]\:bg-muted{background-color:hsl(var(--muted))}.group.toast .group-\[\.toast\]\:bg-primary,.group.toaster .group-\[\.toaster\]\:bg-primary{background-color:hsl(var(--primary))}.group.toast .group-\[\.toast\]\:text-muted-foreground{color:hsl(var(--muted-foreground))}.group.toast .group-\[\.toast\]\:text-primary-foreground{color:hsl(var(--primary-foreground))}.group.toaster .group-\[\.toaster\]\:text-background{color:hsl(var(--background))}.group.toaster .group-\[\.toaster\]\:shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.peer:disabled~.peer-disabled\:cursor-not-allowed{cursor:not-allowed}.peer:disabled~.peer-disabled\:opacity-70{opacity:.7}.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[side\=bottom\]\:translate-y-1[data-side=bottom]{--tw-translate-y: .25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=left\]\:-translate-x-1[data-side=left]{--tw-translate-x: -.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=right\]\:translate-x-1[data-side=right]{--tw-translate-x: .25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=top\]\:-translate-y-1[data-side=top]{--tw-translate-y: -.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[state\=selected\]\:bg-muted[data-state=selected]{background-color:hsl(var(--muted))}.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.data-\[state\=open\]\:animate-in[data-state=open]{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.data-\[state\=closed\]\:animate-out[data-state=closed]{animation-name:exit;animation-duration:.15s;--tw-exit-opacity: initial;--tw-exit-scale: initial;--tw-exit-rotate: initial;--tw-exit-translate-x: initial;--tw-exit-translate-y: initial}.data-\[state\=closed\]\:fade-out-0[data-state=closed]{--tw-exit-opacity: 0}.data-\[state\=open\]\:fade-in-0[data-state=open]{--tw-enter-opacity: 0}.data-\[state\=closed\]\:zoom-out-95[data-state=closed]{--tw-exit-scale: .95}.data-\[state\=open\]\:zoom-in-95[data-state=open]{--tw-enter-scale: .95}.data-\[side\=bottom\]\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y: -.5rem}.data-\[side\=left\]\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x: .5rem}.data-\[side\=right\]\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x: -.5rem}.data-\[side\=top\]\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y: .5rem}.data-\[state\=closed\]\:slide-out-to-left-1\/2[data-state=closed]{--tw-exit-translate-x: -50%}.data-\[state\=closed\]\:slide-out-to-top-\[48\%\][data-state=closed]{--tw-exit-translate-y: -48%}.data-\[state\=open\]\:slide-in-from-left-1\/2[data-state=open]{--tw-enter-translate-x: -50%}.data-\[state\=open\]\:slide-in-from-top-\[48\%\][data-state=open]{--tw-enter-translate-y: -48%}.dark\:border:is(.dark *){border-width:1px}.dark\:border-gray-700:is(.dark *){--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity))}.dark\:bg-blue-900\/20:is(.dark *){background-color:#1e3a8a33}.dark\:bg-gray-700:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}.dark\:from-gray-800:is(.dark *){--tw-gradient-from: #1f2937 var(--tw-gradient-from-position);--tw-gradient-to: rgb(31 41 55 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.dark\:to-indigo-900:is(.dark *){--tw-gradient-to: #312e81 var(--tw-gradient-to-position)}.dark\:text-red-400:is(.dark *){--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity))}@media (min-width: 640px){.sm\:mt-0{margin-top:0}.sm\:block{display:block}.sm\:hidden{display:none}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:justify-end{justify-content:flex-end}.sm\:space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.sm\:rounded-lg{border-radius:var(--radius)}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\:py-12{padding-top:3rem;padding-bottom:3rem}.sm\:text-left{text-align:left}.sm\:text-3xl{font-size:1.875rem;line-height:2.25rem}.sm\:text-base{font-size:1rem;line-height:1.5rem}}@media (min-width: 768px){.md\:block{display:block}.md\:min-w-\[200px\]{min-width:200px}.md\:flex-row{flex-direction:row}.md\:flex-col{flex-direction:column}.md\:py-10{padding-top:2.5rem;padding-bottom:2.5rem}.md\:py-6{padding-top:1.5rem;padding-bottom:1.5rem}.md\:pb-0{padding-bottom:0}.md\:text-left{text-align:left}.md\:text-base{font-size:1rem;line-height:1.5rem}}@media (min-width: 1024px){.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:px-8{padding-left:2rem;padding-right:2rem}.lg\:text-lg{font-size:1.125rem;line-height:1.75rem}}@media (min-width: 1430px){.expand\:block{display:block}}.\[\&\:has\(\[role\=checkbox\]\)\]\:pr-0:has([role=checkbox]){padding-right:0}.\[\&\>span\]\:line-clamp-1>span{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.\[\&\>tr\]\:last\:border-b-0:last-child>tr{border-bottom-width:0px}.\[\&_tr\:last-child\]\:border-0 tr:last-child{border-width:0px}.\[\&_tr\]\:border-b tr{border-bottom-width:1px} diff --git a/assets/index-3WB_jjc1.css.gz b/assets/index-z8HxNPN9.css.gz similarity index 96% rename from assets/index-3WB_jjc1.css.gz rename to assets/index-z8HxNPN9.css.gz index 63ab9b4..e26fbf3 100644 Binary files a/assets/index-3WB_jjc1.css.gz and b/assets/index-z8HxNPN9.css.gz differ diff --git a/index.html b/index.html index 91c0ff2..6c3edab 100644 --- a/index.html +++ b/index.html @@ -93,7 +93,7 @@ font-size: 2rem; } - + @@ -131,7 +131,7 @@ - +
diff --git a/index.html.gz b/index.html.gz index 0390049..9b2619e 100644 Binary files a/index.html.gz and b/index.html.gz differ diff --git a/sw.js b/sw.js index eb20380..734adfd 100644 --- a/sw.js +++ b/sw.js @@ -1 +1 @@ -if(!self.define){let s,e={};const l=(l,r)=>(l=new URL(l+".js",r).href,e[l]||new Promise((e=>{if("document"in self){const s=document.createElement("script");s.src=l,s.onload=e,document.head.appendChild(s)}else s=l,importScripts(l),e()})).then((()=>{let s=e[l];if(!s)throw new Error(`Module ${l} didn’t register its module`);return s})));self.define=(r,i)=>{const n=s||("document"in self?document.currentScript.src:"")||location.href;if(e[n])return;let u={};const t=s=>l(s,n),o={module:{uri:n},exports:u,require:t};e[n]=Promise.all(r.map((s=>o[s]||t(s)))).then((s=>(i(...s),u)))}}define(["./workbox-3e911b1d"],(function(s){"use strict";self.skipWaiting(),s.clientsClaim(),s.precacheAndRoute([{url:"assets/@babel-BjXSgPXB.js",revision:null},{url:"assets/@codemirror-CCjSF3Vf.js",revision:null},{url:"assets/@floating-ui-DdUjdMBw.js",revision:null},{url:"assets/@lezer-DgLl1T_N.js",revision:null},{url:"assets/@radix-ui-E10elJI3.js",revision:null},{url:"assets/@uiw-CvcbIrPa.js",revision:null},{url:"assets/aria-hidden-DQ5UC2Eg.js",revision:null},{url:"assets/attr-accept-BWI1aNlo.js",revision:null},{url:"assets/class-variance-authority-Bb4qSo10.js",revision:null},{url:"assets/clsx-B-dksMZM.js",revision:null},{url:"assets/crelt-C8TCjufn.js",revision:null},{url:"assets/date-fns-fqmN70Xj.js",revision:null},{url:"assets/detect-node-es-l0sNRNKZ.js",revision:null},{url:"assets/file-saver-DhbZvGod.js",revision:null},{url:"assets/file-selector-CBHVlu32.js",revision:null},{url:"assets/get-nonce-C-Z93AgS.js",revision:null},{url:"assets/index-3WB_jjc1.css",revision:null},{url:"assets/index-CdfIWGO4.js",revision:null},{url:"assets/lucide-react-C1VID-M1.js",revision:null},{url:"assets/nearley-CG12bGQB.js",revision:null},{url:"assets/prop-types-psm7UO16.js",revision:null},{url:"assets/react-DmpIMwDM.js",revision:null},{url:"assets/react-dom-tIxIBQuZ.js",revision:null},{url:"assets/react-dropzone-D-IBOhIS.js",revision:null},{url:"assets/react-remove-scroll-bar-DZjhPxUV.js",revision:null},{url:"assets/react-remove-scroll-BOyN_WUU.js",revision:null},{url:"assets/react-style-singleton-CpxBwIWS.js",revision:null},{url:"assets/scheduler-CzFDRTuY.js",revision:null},{url:"assets/sonner-BJG0sXho.js",revision:null},{url:"assets/sql-formatter-BoZ82dp4.js",revision:null},{url:"assets/sql.js-Ch_tM77n.js",revision:null},{url:"assets/style-mod-Bc2inJdb.js",revision:null},{url:"assets/tailwind-merge-BkWO730n.js",revision:null},{url:"assets/tslib-CuZy2iRz.js",revision:null},{url:"assets/use-callback-ref-DRzK4jWO.js",revision:null},{url:"assets/use-sidecar-D8_hMcUG.js",revision:null},{url:"assets/use-sync-external-store-ByYeed7R.js",revision:null},{url:"assets/vaul-LE4MEETp.js",revision:null},{url:"assets/w3c-keyname-Vcq4gwWv.js",revision:null},{url:"assets/zustand-BpWCCnYR.js",revision:null},{url:"index.html",revision:"251220cf68196e42073ab407ba510e72"},{url:"registerSW.js",revision:"1872c500de691dce40960bb85481de07"},{url:"sql.wasm",revision:"f6ad6454f4630b310eb8473858eb33bb"},{url:"manifest.webmanifest",revision:"662c9ac5fe5300a257a596b0ad6130ea"}],{}),s.cleanupOutdatedCaches(),s.registerRoute(new s.NavigationRoute(s.createHandlerBoundToURL("index.html")))})); +if(!self.define){let s,e={};const l=(l,r)=>(l=new URL(l+".js",r).href,e[l]||new Promise((e=>{if("document"in self){const s=document.createElement("script");s.src=l,s.onload=e,document.head.appendChild(s)}else s=l,importScripts(l),e()})).then((()=>{let s=e[l];if(!s)throw new Error(`Module ${l} didn’t register its module`);return s})));self.define=(r,i)=>{const n=s||("document"in self?document.currentScript.src:"")||location.href;if(e[n])return;let u={};const t=s=>l(s,n),o={module:{uri:n},exports:u,require:t};e[n]=Promise.all(r.map((s=>o[s]||t(s)))).then((s=>(i(...s),u)))}}define(["./workbox-3e911b1d"],(function(s){"use strict";self.skipWaiting(),s.clientsClaim(),s.precacheAndRoute([{url:"assets/@babel-BjXSgPXB.js",revision:null},{url:"assets/@codemirror-CCjSF3Vf.js",revision:null},{url:"assets/@floating-ui-DdUjdMBw.js",revision:null},{url:"assets/@lezer-DgLl1T_N.js",revision:null},{url:"assets/@radix-ui-E10elJI3.js",revision:null},{url:"assets/@uiw-CvcbIrPa.js",revision:null},{url:"assets/aria-hidden-DQ5UC2Eg.js",revision:null},{url:"assets/attr-accept-BWI1aNlo.js",revision:null},{url:"assets/class-variance-authority-Bb4qSo10.js",revision:null},{url:"assets/clsx-B-dksMZM.js",revision:null},{url:"assets/crelt-C8TCjufn.js",revision:null},{url:"assets/date-fns-fqmN70Xj.js",revision:null},{url:"assets/detect-node-es-l0sNRNKZ.js",revision:null},{url:"assets/file-saver-DhbZvGod.js",revision:null},{url:"assets/file-selector-CBHVlu32.js",revision:null},{url:"assets/get-nonce-C-Z93AgS.js",revision:null},{url:"assets/index-CPvICklA.js",revision:null},{url:"assets/index-z8HxNPN9.css",revision:null},{url:"assets/lucide-react-C1VID-M1.js",revision:null},{url:"assets/nearley-CG12bGQB.js",revision:null},{url:"assets/prop-types-psm7UO16.js",revision:null},{url:"assets/react-DmpIMwDM.js",revision:null},{url:"assets/react-dom-tIxIBQuZ.js",revision:null},{url:"assets/react-dropzone-D-IBOhIS.js",revision:null},{url:"assets/react-remove-scroll-bar-DZjhPxUV.js",revision:null},{url:"assets/react-remove-scroll-BOyN_WUU.js",revision:null},{url:"assets/react-style-singleton-CpxBwIWS.js",revision:null},{url:"assets/scheduler-CzFDRTuY.js",revision:null},{url:"assets/sonner-BJG0sXho.js",revision:null},{url:"assets/sql-formatter-BoZ82dp4.js",revision:null},{url:"assets/sql.js-Ch_tM77n.js",revision:null},{url:"assets/style-mod-Bc2inJdb.js",revision:null},{url:"assets/tailwind-merge-BkWO730n.js",revision:null},{url:"assets/tslib-CuZy2iRz.js",revision:null},{url:"assets/use-callback-ref-DRzK4jWO.js",revision:null},{url:"assets/use-sidecar-D8_hMcUG.js",revision:null},{url:"assets/use-sync-external-store-ByYeed7R.js",revision:null},{url:"assets/vaul-LE4MEETp.js",revision:null},{url:"assets/w3c-keyname-Vcq4gwWv.js",revision:null},{url:"assets/zustand-BpWCCnYR.js",revision:null},{url:"index.html",revision:"3eddf0f41f7ec2d87dd6d878479a2de5"},{url:"registerSW.js",revision:"1872c500de691dce40960bb85481de07"},{url:"sql.wasm",revision:"f6ad6454f4630b310eb8473858eb33bb"},{url:"manifest.webmanifest",revision:"662c9ac5fe5300a257a596b0ad6130ea"}],{}),s.cleanupOutdatedCaches(),s.registerRoute(new s.NavigationRoute(s.createHandlerBoundToURL("index.html")))}));