db-studio 1.13.0 → 1.14.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +105 -84
- package/dist/index.js.map +1 -1
- package/dist/web-dist/assets/{_pathlessLayout-zxU06-pr.js → _pathlessLayout-BYQmoqT2.js} +61 -61
- package/dist/web-dist/assets/_pathlessLayout-CdSIARYp.js +1 -0
- package/dist/web-dist/assets/_queryId-IoOxUaz6.js +1 -0
- package/dist/web-dist/assets/_table-BI9E6-Je.js +1 -0
- package/dist/web-dist/assets/_table-ClkqBjYZ.js +1 -0
- package/dist/web-dist/assets/badge-SEQODpjR.js +1 -0
- package/dist/web-dist/assets/browser-CHG4p052.js +1 -0
- package/dist/web-dist/assets/{bundle-mjs-uZfDJfiH.js → bundle-mjs-BZOM22--.js} +1 -1
- package/dist/web-dist/assets/code-editor-BIfiMFMb.js +9 -0
- package/dist/web-dist/assets/database.store-OsasuLJl.js +1 -0
- package/dist/web-dist/assets/{dist-BeZAMt_p.js → dist-D_0esNxp.js} +1 -1
- package/dist/web-dist/assets/{format-cell-value-wHw1lD8Z.js → format-cell-value-D41tFXxV.js} +1 -1
- package/dist/web-dist/assets/highlighted-body-OFNGDK62-DBl3trdK.js +1 -0
- package/dist/web-dist/assets/icons-rRDRsZcq.js +1 -0
- package/dist/web-dist/assets/index-Be5YdcX5.css +2 -0
- package/dist/web-dist/assets/index-CJ2YPwW4.js +36 -0
- package/dist/web-dist/assets/indexes-DMAVA8iJ.js +1 -0
- package/dist/web-dist/assets/logs-DCMuv22K.js +1 -0
- package/dist/web-dist/assets/mermaid-GHXKKRXX-DJ7TvQxw.js +1 -0
- package/dist/web-dist/assets/{middleware-CPy2Suyk.js → middleware-Y6OdmOWR.js} +1 -1
- package/dist/web-dist/assets/{monaco-editor-VzUhCCqE.js → monaco-editor-BO3WVEVM.js} +280 -280
- package/dist/web-dist/assets/monaco-editor-IL9D_L0g.css +1 -0
- package/dist/web-dist/assets/monitoring-BtlIcl3k.js +22 -0
- package/dist/web-dist/assets/overlay.store-DjYsesE7.js +11 -0
- package/dist/web-dist/assets/{queries.store-DFbzjjlv.js → queries.store-CxkLh1ra.js} +1 -1
- package/dist/web-dist/assets/query-runner-keHo7IiI.js +17 -0
- package/dist/web-dist/assets/radix-ui-C1Z_SoKk.js +51 -0
- package/dist/web-dist/assets/react-1gU4DcpZ.js +1 -0
- package/dist/web-dist/assets/{react-dom-t511kH7T.js → react-dom-DkH0eaTq.js} +1 -1
- package/dist/web-dist/assets/redis-value-BmLGJf9X.js +1 -0
- package/dist/web-dist/assets/{rolldown-runtime-Bc_uOZR3.js → rolldown-runtime-DY1mqKjv.js} +1 -1
- package/dist/web-dist/assets/runner-CvUPs6q4.js +1 -0
- package/dist/web-dist/assets/schema-9nf0q_01.js +57 -0
- package/dist/web-dist/assets/schema-C-10JjXl.js +1 -0
- package/dist/web-dist/assets/table-C75Kr4aI.js +1 -0
- package/dist/web-dist/assets/tanstack-C3XvOIUf.js +11 -0
- package/dist/web-dist/assets/visualizer-CiiH2acP.js +1 -0
- package/dist/web-dist/index.html +19 -19
- package/package.json +4 -4
- package/dist/web-dist/assets/_pathlessLayout-GynxlRL_.js +0 -1
- package/dist/web-dist/assets/_queryId-BRuHa3fh.js +0 -1
- package/dist/web-dist/assets/_table-8IAksPyY.js +0 -1
- package/dist/web-dist/assets/_table-CtfVc03T.js +0 -1
- package/dist/web-dist/assets/ai-assistant-CpA6z3NH.js +0 -1
- package/dist/web-dist/assets/browser-BGLz7ANr.js +0 -1
- package/dist/web-dist/assets/code-editor-CuKFGk5C.js +0 -9
- package/dist/web-dist/assets/database.store-B5cSp4MJ.js +0 -1
- package/dist/web-dist/assets/highlighted-body-OFNGDK62-BQA5yQZx.js +0 -1
- package/dist/web-dist/assets/icons-DMY0-Mbl.js +0 -1
- package/dist/web-dist/assets/index-BsliTpNZ.js +0 -35
- package/dist/web-dist/assets/index-Cyl_0l9I.css +0 -2
- package/dist/web-dist/assets/indexes-CNKwQMi3.js +0 -1
- package/dist/web-dist/assets/logs-BYKvN4gr.js +0 -1
- package/dist/web-dist/assets/mermaid-GHXKKRXX-BKNFWsy1.js +0 -1
- package/dist/web-dist/assets/monaco-editor-DcHpHuJd.css +0 -1
- package/dist/web-dist/assets/monitoring-B3eHd8rg.js +0 -22
- package/dist/web-dist/assets/popover-C6AOV9WB.js +0 -1
- package/dist/web-dist/assets/query-runner-RUXGiIf2.js +0 -17
- package/dist/web-dist/assets/radix-ui-CCBRgLy1.js +0 -51
- package/dist/web-dist/assets/react-frqLVtia.js +0 -1
- package/dist/web-dist/assets/redis-value-Lhzkhu4Q.js +0 -1
- package/dist/web-dist/assets/runner-lxnLCgPi.js +0 -1
- package/dist/web-dist/assets/schema-Bv15Fk7L.js +0 -1
- package/dist/web-dist/assets/schema-By474UiK.js +0 -64
- package/dist/web-dist/assets/table-B-C0yxvL.js +0 -1
- package/dist/web-dist/assets/tanstack-BfT_e-Qv.js +0 -10
- package/dist/web-dist/assets/tooltip-Dd1J4hNt.js +0 -9
- package/dist/web-dist/assets/visualizer-DOCDtIMq.js +0 -1
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import{n as kt}from"./rolldown-runtime-DY1mqKjv.js";import{B as jt,G as qt,H as zt,U as Mt,V as Ht,W as $t,gt as Vt,kt as Wt}from"./radix-ui-C1Z_SoKk.js";import{n as ft,t as Jt}from"./bundle-mjs-BZOM22--.js";import{t as Kt}from"./react-1gU4DcpZ.js";import{c as Xt,l as Gt}from"./monitoring-BtlIcl3k.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"db-studio@1.14.1"};var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="5f15f963-94b6-4c1c-abfa-bf4cea50f38c",e._sentryDebugIdIdentifier="sentry-dbid-5f15f963-94b6-4c1c-abfa-bf4cea50f38c")}catch{}})();function ee(...e){return Jt(ft(e))}var L=Wt();function Xn({size:e="size-6",color:t="bg-primary",className:r,...n}){const s=Array(12).fill(0);return(0,L.jsx)("div",{className:ee(e),children:(0,L.jsx)("div",{className:ee("relative top-1/2 left-1/2 h-[inherit] w-[inherit]"),children:s.map((o,a)=>(0,L.jsx)("div",{className:ee("-left-[10%] -top-[3.9%] absolute h-[8%] w-[24%] animate-spinner rounded-md",t,`bar:nth-child(${a+1})`,r),style:{animationDelay:`-${1.3-a*.1}s`,transform:`rotate(${30*a}deg) translate(146%)`},...n},`spinner-bar-${String(a)}`))})})}var Je=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Ke=ft,Yt=(e,t)=>r=>{var n;if(t?.variants==null)return Ke(e,r?.class,r?.className);const{variants:s,defaultVariants:o}=t,a=Object.keys(s).map(c=>{const u=r?.[c],h=o?.[c];if(u===null)return null;const y=Je(u)||Je(h);return s[c][y]}),l=r&&Object.entries(r).reduce((c,u)=>{let[h,y]=u;return y===void 0||(c[h]=y),c},{}),d=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((c,u)=>{let{class:h,className:y,...v}=u;return Object.entries(v).every(R=>{let[b,f]=R;return Array.isArray(f)?f.includes({...o,...l}[b]):{...o,...l}[b]===f})?[...c,h,y]:c},[]);return Ke(e,a,d,r?.class,r?.className)},Qt=Yt("focus-visible:border-ring cursor-pointer focus-visible:ring-ring/30 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 rounded-sm border border-transparent bg-clip-padding text-xs/relaxed font-medium focus-visible:ring-[2px] aria-invalid:ring-[2px] [&_svg:not([class*='size-'])]:size-4 inline-flex items-center justify-center whitespace-nowrap transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none shrink-0 [&_svg]:shrink-0 outline-none group/button select-none",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/80",outline:"border-border dark:bg-input/20 dark:bg-input/30 hover:bg-input/50 hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"text-muted-foreground hover:bg-muted hover:text-foreground dark:hover:bg-muted/50 aria-expanded:bg-muted aria-expanded:text-foreground",destructive:"bg-destructive/10 hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/20 text-destructive focus-visible:border-destructive/40 dark:hover:bg-destructive/30",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-7 gap-1 px-2 text-xs/relaxed has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",xs:"h-5 gap-1 rounded-sm px-2 text-[0.625rem] has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-2.5",sm:"h-6 gap-1 px-2 text-xs/relaxed has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",lg:"h-8 gap-1 px-2.5 text-xs/relaxed has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2 [&_svg:not([class*='size-'])]:size-4",icon:"size-7 [&_svg:not([class*='size-'])]:size-3.5","icon-xs":"size-5 rounded-sm [&_svg:not([class*='size-'])]:size-2.5","icon-sm":"size-6 [&_svg:not([class*='size-'])]:size-3","icon-lg":"size-8 [&_svg:not([class*='size-'])]:size-4"}},defaultVariants:{variant:"default",size:"default"}});function Gn({className:e,variant:t="default",size:r="default",asChild:n=!1,...s}){return(0,L.jsx)(n?Vt:"button",{"data-slot":"button","data-variant":t,"data-size":r,className:ee(Qt({variant:t,size:r,className:e})),...s})}var pt={},Xe=pt?.NODE_ENV,Ne={PORT:3333,ENV:".env",VAR_NAME:"DATABASE_URL",BASE_URL:"https://api.db-studio.localhost",API_PREFIX:"/api",IS_DEV:Xe==="development",PROXY_URL:pt?.DB_STUDIO_PROXY_URL??(Xe==="development"?"https://proxy.db-studio.localhost":"https://db-studio-proxy.husamql3.workers.dev")};function ht(e,t){return function(){return e.apply(t,arguments)}}var{toString:Zt}=Object.prototype,{getPrototypeOf:he}=Object,{iterator:me,toStringTag:mt}=Symbol,be=(e=>t=>{const r=Zt.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),U=e=>(e=e.toLowerCase(),t=>be(t)===e),ye=e=>t=>typeof t===e,{isArray:G}=Array,X=ye("undefined");function te(e){return e!==null&&!X(e)&&e.constructor!==null&&!X(e.constructor)&&C(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var bt=U("ArrayBuffer");function er(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&bt(e.buffer),t}var tr=ye("string"),C=ye("function"),yt=ye("number"),re=e=>e!==null&&typeof e=="object",rr=e=>e===!0||e===!1,ue=e=>{if(be(e)!=="object")return!1;const t=he(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(mt in e)&&!(me in e)},nr=e=>{if(!re(e)||te(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},sr=U("Date"),or=U("File"),ar=e=>!!(e&&typeof e.uri<"u"),ir=e=>e&&typeof e.getParts<"u",lr=U("Blob"),cr=U("FileList"),ur=e=>re(e)&&C(e.pipe);function dr(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}var Ge=dr(),Ye=typeof Ge.FormData<"u"?Ge.FormData:void 0,fr=e=>{if(!e)return!1;if(Ye&&e instanceof Ye)return!0;const t=he(e);if(!t||t===Object.prototype||!C(e.append))return!1;const r=be(e);return r==="formdata"||r==="object"&&C(e.toString)&&e.toString()==="[object FormData]"},pr=U("URLSearchParams"),[hr,mr,br,yr]=["ReadableStream","Request","Response","Headers"].map(U),vr=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ne(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,s;if(typeof e!="object"&&(e=[e]),G(e))for(n=0,s=e.length;n<s;n++)t.call(null,e[n],n,e);else{if(te(e))return;const o=r?Object.getOwnPropertyNames(e):Object.keys(e),a=o.length;let l;for(n=0;n<a;n++)l=o[n],t.call(null,e[l],l,e)}}function vt(e,t){if(te(e))return null;t=t.toLowerCase();const r=Object.keys(e);let n=r.length,s;for(;n-- >0;)if(s=r[n],t===s.toLowerCase())return s;return null}var $=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Et=e=>!X(e)&&e!==$;function De(...e){const{caseless:t,skipUndefined:r}=Et(this)&&this||{},n={},s=(o,a)=>{if(a==="__proto__"||a==="constructor"||a==="prototype")return;const l=t&&vt(n,a)||a,d=Pe(n,l)?n[l]:void 0;ue(d)&&ue(o)?n[l]=De(d,o):ue(o)?n[l]=De({},o):G(o)?n[l]=o.slice():(!r||!X(o))&&(n[l]=o)};for(let o=0,a=e.length;o<a;o++)e[o]&&ne(e[o],s);return n}var Er=(e,t,r,{allOwnKeys:n}={})=>(ne(t,(s,o)=>{r&&C(s)?Object.defineProperty(e,o,{__proto__:null,value:ht(s,r),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,o,{__proto__:null,value:s,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:n}),e),gr=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Rr=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),r&&Object.assign(e.prototype,r)},wr=(e,t,r,n)=>{let s,o,a;const l={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),o=s.length;o-- >0;)a=s[o],(!n||n(a,e,t))&&!l[a]&&(t[a]=e[a],l[a]=!0);e=r!==!1&&he(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},Or=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r},_r=e=>{if(!e)return null;if(G(e))return e;let t=e.length;if(!yt(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},Tr=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&he(Uint8Array)),Sr=(e,t)=>{const r=(e&&e[me]).call(e);let n;for(;(n=r.next())&&!n.done;){const s=n.value;t.call(e,s[0],s[1])}},Ar=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},xr=U("HTMLFormElement"),Cr=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,s){return n.toUpperCase()+s}),Pe=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),Nr=U("RegExp"),gt=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};ne(r,(s,o)=>{let a;(a=t(s,o,e))!==!1&&(n[o]=a||s)}),Object.defineProperties(e,n)},Dr=e=>{gt(e,(t,r)=>{if(C(e)&&["arguments","caller","callee"].includes(r))return!1;const n=e[r];if(C(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},Pr=(e,t)=>{const r={},n=s=>{s.forEach(o=>{r[o]=!0})};return G(e)?n(e):n(String(e).split(t)),r},Lr=()=>{},Ur=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Br(e){return!!(e&&C(e.append)&&e[mt]==="FormData"&&e[me])}var Fr=e=>{const t=new Array(10),r=(n,s)=>{if(re(n)){if(t.indexOf(n)>=0)return;if(te(n))return n;if(!("toJSON"in n)){t[s]=n;const o=G(n)?[]:{};return ne(n,(a,l)=>{const d=r(a,s+1);!X(d)&&(o[l]=d)}),t[s]=void 0,o}}return n};return r(e,0)},Ir=U("AsyncFunction"),kr=e=>e&&(re(e)||C(e))&&C(e.then)&&C(e.catch),Rt=((e,t)=>e?setImmediate:t?((r,n)=>($.addEventListener("message",({source:s,data:o})=>{s===$&&o===r&&n.length&&n.shift()()},!1),s=>{n.push(s),$.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",C($.postMessage)),jr=typeof queueMicrotask<"u"?queueMicrotask.bind($):typeof process<"u"&&process.nextTick||Rt,qr=e=>e!=null&&C(e[me]),i={isArray:G,isArrayBuffer:bt,isBuffer:te,isFormData:fr,isArrayBufferView:er,isString:tr,isNumber:yt,isBoolean:rr,isObject:re,isPlainObject:ue,isEmptyObject:nr,isReadableStream:hr,isRequest:mr,isResponse:br,isHeaders:yr,isUndefined:X,isDate:sr,isFile:or,isReactNativeBlob:ar,isReactNative:ir,isBlob:lr,isRegExp:Nr,isFunction:C,isStream:ur,isURLSearchParams:pr,isTypedArray:Tr,isFileList:cr,forEach:ne,merge:De,extend:Er,trim:vr,stripBOM:gr,inherits:Rr,toFlatObject:wr,kindOf:be,kindOfTest:U,endsWith:Or,toArray:_r,forEachEntry:Sr,matchAll:Ar,isHTMLForm:xr,hasOwnProperty:Pe,hasOwnProp:Pe,reduceDescriptors:gt,freezeMethods:Dr,toObjectSet:Pr,toCamelCase:Cr,noop:Lr,toFiniteNumber:Ur,findKey:vt,global:$,isContextDefined:Et,isSpecCompliantForm:Br,toJSONObject:Fr,isAsyncFn:Ir,isThenable:kr,setImmediate:Rt,asap:jr,isIterable:qr},zr=i.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Mr=e=>{const t={};let r,n,s;return e&&e.split(`
|
|
2
|
+
`).forEach(function(a){s=a.indexOf(":"),r=a.substring(0,s).trim().toLowerCase(),n=a.substring(s+1).trim(),!(!r||t[r]&&zr[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t},Qe=Symbol("internals"),Hr=/[^\x09\x20-\x7E\x80-\xFF]/g;function $r(e){let t=0,r=e.length;for(;t<r;){const n=e.charCodeAt(t);if(n!==9&&n!==32)break;t+=1}for(;r>t;){const n=e.charCodeAt(r-1);if(n!==9&&n!==32)break;r-=1}return t===0&&r===e.length?e:e.slice(t,r)}function Z(e){return e&&String(e).trim().toLowerCase()}function Vr(e){return $r(e.replace(Hr,""))}function de(e){return e===!1||e==null?e:i.isArray(e)?e.map(de):Vr(String(e))}function Wr(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}var Jr=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Te(e,t,r,n,s){if(i.isFunction(n))return n.call(this,t,r);if(s&&(t=r),!!i.isString(t)){if(i.isString(n))return t.indexOf(n)!==-1;if(i.isRegExp(n))return n.test(t)}}function Kr(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function Xr(e,t){const r=i.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{__proto__:null,value:function(s,o,a){return this[n].call(this,t,s,o,a)},configurable:!0})})}var x=class{constructor(e){e&&this.set(e)}set(e,t,r){const n=this;function s(a,l,d){const c=Z(l);if(!c)throw new Error("header name must be a non-empty string");const u=i.findKey(n,c);(!u||n[u]===void 0||d===!0||d===void 0&&n[u]!==!1)&&(n[u||l]=de(a))}const o=(a,l)=>i.forEach(a,(d,c)=>s(d,c,l));if(i.isPlainObject(e)||e instanceof this.constructor)o(e,t);else if(i.isString(e)&&(e=e.trim())&&!Jr(e))o(Mr(e),t);else if(i.isObject(e)&&i.isIterable(e)){let a={},l,d;for(const c of e){if(!i.isArray(c))throw TypeError("Object iterator must return a key-value pair");a[d=c[0]]=(l=a[d])?i.isArray(l)?[...l,c[1]]:[l,c[1]]:c[1]}o(a,t)}else e!=null&&s(t,e,r);return this}get(e,t){if(e=Z(e),e){const r=i.findKey(this,e);if(r){const n=this[r];if(!t)return n;if(t===!0)return Wr(n);if(i.isFunction(t))return t.call(this,n,r);if(i.isRegExp(t))return t.exec(n);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Z(e),e){const r=i.findKey(this,e);return!!(r&&this[r]!==void 0&&(!t||Te(this,this[r],r,t)))}return!1}delete(e,t){const r=this;let n=!1;function s(o){if(o=Z(o),o){const a=i.findKey(r,o);a&&(!t||Te(r,r[a],a,t))&&(delete r[a],n=!0)}}return i.isArray(e)?e.forEach(s):s(e),n}clear(e){const t=Object.keys(this);let r=t.length,n=!1;for(;r--;){const s=t[r];(!e||Te(this,this[s],s,e,!0))&&(delete this[s],n=!0)}return n}normalize(e){const t=this,r={};return i.forEach(this,(n,s)=>{const o=i.findKey(r,s);if(o){t[o]=de(n),delete t[s];return}const a=e?Kr(s):String(s).trim();a!==s&&delete t[s],t[a]=de(n),r[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return i.forEach(this,(r,n)=>{r!=null&&r!==!1&&(t[n]=e&&i.isArray(r)?r.join(", "):r)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join(`
|
|
3
|
+
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const r=new this(e);return t.forEach(n=>r.set(n)),r}static accessor(e){const t=(this[Qe]=this[Qe]={accessors:{}}).accessors,r=this.prototype;function n(s){const o=Z(s);t[o]||(Xr(r,s),t[o]=!0)}return i.isArray(e)?e.forEach(n):n(e),this}};x.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);i.reduceDescriptors(x.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}});i.freezeMethods(x);var Gr="[REDACTED ****]";function Yr(e){if(i.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(i.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function Qr(e,t){const r=new Set(t.map(o=>String(o).toLowerCase())),n=[],s=o=>{if(o===null||typeof o!="object"||i.isBuffer(o))return o;if(n.indexOf(o)!==-1)return;o instanceof x&&(o=o.toJSON()),n.push(o);let a;if(i.isArray(o))a=[],o.forEach((l,d)=>{const c=s(l);i.isUndefined(c)||(a[d]=c)});else{if(!i.isPlainObject(o)&&Yr(o))return n.pop(),o;a=Object.create(null);for(const[l,d]of Object.entries(o)){const c=r.has(l.toLowerCase())?Gr:s(d);i.isUndefined(c)||(a[l]=c)}}return n.pop(),a};return s(e)}var p=class wt extends Error{static from(t,r,n,s,o,a){const l=new wt(t.message,r||t.code,n,s,o);return l.cause=t,l.name=t.name,t.status!=null&&l.status==null&&(l.status=t.status),a&&Object.assign(l,a),l}constructor(t,r,n,s,o){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,r&&(this.code=r),n&&(this.config=n),s&&(this.request=s),o&&(this.response=o,this.status=o.status)}toJSON(){const t=this.config,r=t&&i.hasOwnProp(t,"redact")?t.redact:void 0,n=i.isArray(r)&&r.length>0?Qr(t,r):i.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:n,code:this.code,status:this.status}}};p.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";p.ERR_BAD_OPTION="ERR_BAD_OPTION";p.ECONNABORTED="ECONNABORTED";p.ETIMEDOUT="ETIMEDOUT";p.ECONNREFUSED="ECONNREFUSED";p.ERR_NETWORK="ERR_NETWORK";p.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";p.ERR_DEPRECATED="ERR_DEPRECATED";p.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";p.ERR_BAD_REQUEST="ERR_BAD_REQUEST";p.ERR_CANCELED="ERR_CANCELED";p.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";p.ERR_INVALID_URL="ERR_INVALID_URL";p.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";function Le(e){return i.isPlainObject(e)||i.isArray(e)}function Ot(e){return i.endsWith(e,"[]")?e.slice(0,-2):e}function Se(e,t,r){return e?e.concat(t).map(function(s,o){return s=Ot(s),!r&&o?"["+s+"]":s}).join(r?".":""):t}function Zr(e){return i.isArray(e)&&!e.some(Le)}var en=i.toFlatObject(i,{},null,function(t){return/^is[A-Z]/.test(t)});function ve(e,t,r){if(!i.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=i.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(f,m){return!i.isUndefined(m[f])});const n=r.metaTokens,s=r.visitor||h,o=r.dots,a=r.indexes,l=r.Blob||typeof Blob<"u"&&Blob,d=r.maxDepth===void 0?100:r.maxDepth,c=l&&i.isSpecCompliantForm(t);if(!i.isFunction(s))throw new TypeError("visitor must be a function");function u(b){if(b===null)return"";if(i.isDate(b))return b.toISOString();if(i.isBoolean(b))return b.toString();if(!c&&i.isBlob(b))throw new p("Blob is not supported. Use a Buffer instead.");return i.isArrayBuffer(b)||i.isTypedArray(b)?c&&typeof Blob=="function"?new Blob([b]):Buffer.from(b):b}function h(b,f,m){let w=b;if(i.isReactNative(t)&&i.isReactNativeBlob(b))return t.append(Se(m,f,o),u(b)),!1;if(b&&!m&&typeof b=="object"){if(i.endsWith(f,"{}"))f=n?f:f.slice(0,-2),b=JSON.stringify(b);else if(i.isArray(b)&&Zr(b)||(i.isFileList(b)||i.endsWith(f,"[]"))&&(w=i.toArray(b)))return f=Ot(f),w.forEach(function(E,P){!(i.isUndefined(E)||E===null)&&t.append(a===!0?Se([f],P,o):a===null?f:f+"[]",u(E))}),!1}return Le(b)?!0:(t.append(Se(m,f,o),u(b)),!1)}const y=[],v=Object.assign(en,{defaultVisitor:h,convertValue:u,isVisitable:Le});function R(b,f,m=0){if(!i.isUndefined(b)){if(m>d)throw new p("Object is too deeply nested ("+m+" levels). Max depth: "+d,p.ERR_FORM_DATA_DEPTH_EXCEEDED);if(y.indexOf(b)!==-1)throw Error("Circular reference detected in "+f.join("."));y.push(b),i.forEach(b,function(g,E){(!(i.isUndefined(g)||g===null)&&s.call(t,g,i.isString(E)?E.trim():E,f,v))===!0&&R(g,f?f.concat(E):[E],m+1)}),y.pop()}}if(!i.isObject(e))throw new TypeError("data must be an object");return R(e),t}function Ze(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(n){return t[n]})}function Fe(e,t){this._pairs=[],e&&ve(e,this,t)}var _t=Fe.prototype;_t.append=function(t,r){this._pairs.push([t,r])};_t.toString=function(t){const r=t?function(n){return t.call(this,n,Ze)}:Ze;return this._pairs.map(function(s){return r(s[0])+"="+r(s[1])},"").join("&")};function tn(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Tt(e,t,r){if(!t)return e;const n=r&&r.encode||tn,s=i.isFunction(r)?{serialize:r}:r,o=s&&s.serialize;let a;if(o?a=o(t,s):a=i.isURLSearchParams(t)?t.toString():new Fe(t,s).toString(n),a){const l=e.indexOf("#");l!==-1&&(e=e.slice(0,l)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}var et=class{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){i.forEach(this.handlers,function(r){r!==null&&e(r)})}},Ie={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},rn=typeof URLSearchParams<"u"?URLSearchParams:Fe,nn=typeof FormData<"u"?FormData:null,sn=typeof Blob<"u"?Blob:null,on={isBrowser:!0,classes:{URLSearchParams:rn,FormData:nn,Blob:sn},protocols:["http","https","file","blob","url","data"]},an=kt({hasBrowserEnv:()=>ke,hasStandardBrowserEnv:()=>ln,hasStandardBrowserWebWorkerEnv:()=>cn,navigator:()=>Ue,origin:()=>un}),ke=typeof window<"u"&&typeof document<"u",Ue=typeof navigator=="object"&&navigator||void 0,ln=ke&&(!Ue||["ReactNative","NativeScript","NS"].indexOf(Ue.product)<0),cn=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",un=ke&&window.location.href||"http://localhost",A={...an,...on};function dn(e,t){return ve(e,new A.classes.URLSearchParams,{visitor:function(r,n,s,o){return A.isNode&&i.isBuffer(r)?(this.append(n,r.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...t})}function fn(e){return i.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function pn(e){const t={},r=Object.keys(e);let n;const s=r.length;let o;for(n=0;n<s;n++)o=r[n],t[o]=e[o];return t}function St(e){function t(r,n,s,o){let a=r[o++];if(a==="__proto__")return!0;const l=Number.isFinite(+a),d=o>=r.length;return a=!a&&i.isArray(s)?s.length:a,d?(i.hasOwnProp(s,a)?s[a]=i.isArray(s[a])?s[a].concat(n):[s[a],n]:s[a]=n,!l):((!s[a]||!i.isObject(s[a]))&&(s[a]=[]),t(r,n,s[a],o)&&i.isArray(s[a])&&(s[a]=pn(s[a])),!l)}if(i.isFormData(e)&&i.isFunction(e.entries)){const r={};return i.forEachEntry(e,(n,s)=>{t(fn(n),s,r,0)}),r}return null}var K=(e,t)=>e!=null&&i.hasOwnProp(e,t)?e[t]:void 0;function hn(e,t,r){if(i.isString(e))try{return(t||JSON.parse)(e),i.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}var se={transitional:Ie,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const n=r.getContentType()||"",s=n.indexOf("application/json")>-1,o=i.isObject(t);if(o&&i.isHTMLForm(t)&&(t=new FormData(t)),i.isFormData(t))return s?JSON.stringify(St(t)):t;if(i.isArrayBuffer(t)||i.isBuffer(t)||i.isStream(t)||i.isFile(t)||i.isBlob(t)||i.isReadableStream(t))return t;if(i.isArrayBufferView(t))return t.buffer;if(i.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(o){const l=K(this,"formSerializer");if(n.indexOf("application/x-www-form-urlencoded")>-1)return dn(t,l).toString();if((a=i.isFileList(t))||n.indexOf("multipart/form-data")>-1){const d=K(this,"env"),c=d&&d.FormData;return ve(a?{"files[]":t}:t,c&&new c,l)}}return o||s?(r.setContentType("application/json",!1),hn(t)):t}],transformResponse:[function(t){const r=K(this,"transitional")||se.transitional,n=r&&r.forcedJSONParsing,s=K(this,"responseType"),o=s==="json";if(i.isResponse(t)||i.isReadableStream(t))return t;if(t&&i.isString(t)&&(n&&!s||o)){const a=!(r&&r.silentJSONParsing)&&o;try{return JSON.parse(t,K(this,"parseReviver"))}catch(l){if(a)throw l.name==="SyntaxError"?p.from(l,p.ERR_BAD_RESPONSE,this,null,K(this,"response")):l}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:A.classes.FormData,Blob:A.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};i.forEach(["delete","get","head","post","put","patch","query"],e=>{se.headers[e]={}});function Ae(e,t){const r=this||se,n=t||r,s=x.from(n.headers);let o=n.data;return i.forEach(e,function(l){o=l.call(r,o,s.normalize(),t?t.status:void 0)}),s.normalize(),o}function At(e){return!!(e&&e.__CANCEL__)}var oe=class extends p{constructor(e,t,r){super(e??"canceled",p.ERR_CANCELED,t,r),this.name="CanceledError",this.__CANCEL__=!0}};function xt(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new p("Request failed with status code "+r.status,r.status>=400&&r.status<500?p.ERR_BAD_REQUEST:p.ERR_BAD_RESPONSE,r.config,r.request,r))}function mn(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function bn(e,t){e=e||10;const r=new Array(e),n=new Array(e);let s=0,o=0,a;return t=t!==void 0?t:1e3,function(d){const c=Date.now(),u=n[o];a||(a=c),r[s]=d,n[s]=c;let h=o,y=0;for(;h!==s;)y+=r[h++],h=h%e;if(s=(s+1)%e,s===o&&(o=(o+1)%e),c-a<t)return;const v=u&&c-u;return v?Math.round(y*1e3/v):void 0}}function yn(e,t){let r=0,n=1e3/t,s,o;const a=(c,u=Date.now())=>{r=u,s=null,o&&(clearTimeout(o),o=null),e(...c)};return[(...c)=>{const u=Date.now(),h=u-r;h>=n?a(c,u):(s=c,o||(o=setTimeout(()=>{o=null,a(s)},n-h)))},()=>s&&a(s)]}var pe=(e,t,r=3)=>{let n=0;const s=bn(50,250);return yn(o=>{const a=o.loaded,l=o.lengthComputable?o.total:void 0,d=l!=null?Math.min(a,l):a,c=Math.max(0,d-n),u=s(c);n=Math.max(n,d),e({loaded:d,total:l,progress:l?d/l:void 0,bytes:c,rate:u||void 0,estimated:u&&l?(l-d)/u:void 0,event:o,lengthComputable:l!=null,[t?"download":"upload"]:!0})},r)},tt=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},rt=e=>(...t)=>i.asap(()=>e(...t)),vn=A.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,A.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(A.origin),A.navigator&&/(msie|trident)/i.test(A.navigator.userAgent)):()=>!0,En=A.hasStandardBrowserEnv?{write(e,t,r,n,s,o,a){if(typeof document>"u")return;const l=[`${e}=${encodeURIComponent(t)}`];i.isNumber(r)&&l.push(`expires=${new Date(r).toUTCString()}`),i.isString(n)&&l.push(`path=${n}`),i.isString(s)&&l.push(`domain=${s}`),o===!0&&l.push("secure"),i.isString(a)&&l.push(`SameSite=${a}`),document.cookie=l.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.split(";");for(let r=0;r<t.length;r++){const n=t[r].replace(/^\s+/,""),s=n.indexOf("=");if(s!==-1&&n.slice(0,s)===e)return decodeURIComponent(n.slice(s+1))}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function gn(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Rn(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Ct(e,t,r){let n=!gn(t);return e&&(n||r===!1)?Rn(e,t):t}var nt=e=>e instanceof x?{...e}:e;function W(e,t){t=t||{};const r=Object.create(null);Object.defineProperty(r,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function n(c,u,h,y){return i.isPlainObject(c)&&i.isPlainObject(u)?i.merge.call({caseless:y},c,u):i.isPlainObject(u)?i.merge({},u):i.isArray(u)?u.slice():u}function s(c,u,h,y){if(i.isUndefined(u)){if(!i.isUndefined(c))return n(void 0,c,h,y)}else return n(c,u,h,y)}function o(c,u){if(!i.isUndefined(u))return n(void 0,u)}function a(c,u){if(i.isUndefined(u)){if(!i.isUndefined(c))return n(void 0,c)}else return n(void 0,u)}function l(c,u,h){if(i.hasOwnProp(t,h))return n(c,u);if(i.hasOwnProp(e,h))return n(void 0,c)}const d={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,allowedSocketPaths:a,responseEncoding:a,validateStatus:l,headers:(c,u,h)=>s(nt(c),nt(u),h,!0)};return i.forEach(Object.keys({...e,...t}),function(u){if(u==="__proto__"||u==="constructor"||u==="prototype")return;const h=i.hasOwnProp(d,u)?d[u]:s,y=h(i.hasOwnProp(e,u)?e[u]:void 0,i.hasOwnProp(t,u)?t[u]:void 0,u);i.isUndefined(y)&&h!==l||(r[u]=y)}),r}var wn=["content-type","content-length"];function On(e,t,r){if(r!=="content-only"){e.set(t);return}Object.entries(t).forEach(([n,s])=>{wn.includes(n.toLowerCase())&&e.set(n,s)})}var _n=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,r)=>String.fromCharCode(parseInt(r,16))),Nt=e=>{const t=W({},e),r=y=>i.hasOwnProp(t,y)?t[y]:void 0,n=r("data");let s=r("withXSRFToken");const o=r("xsrfHeaderName"),a=r("xsrfCookieName");let l=r("headers");const d=r("auth"),c=r("baseURL"),u=r("allowAbsoluteUrls"),h=r("url");if(t.headers=l=x.from(l),t.url=Tt(Ct(c,h,u),e.params,e.paramsSerializer),d&&l.set("Authorization","Basic "+btoa((d.username||"")+":"+(d.password?_n(d.password):""))),i.isFormData(n)&&(A.hasStandardBrowserEnv||A.hasStandardBrowserWebWorkerEnv?l.setContentType(void 0):i.isFunction(n.getHeaders)&&On(l,n.getHeaders(),r("formDataHeaderPolicy"))),A.hasStandardBrowserEnv&&(i.isFunction(s)&&(s=s(t)),s===!0||s==null&&vn(t.url))){const y=o&&a&&En.read(a);y&&l.set(o,y)}return t},Tn=typeof XMLHttpRequest<"u",Sn=Tn&&function(e){return new Promise(function(r,n){const s=Nt(e);let o=s.data;const a=x.from(s.headers).normalize();let{responseType:l,onUploadProgress:d,onDownloadProgress:c}=s,u,h,y,v,R;function b(){v&&v(),R&&R(),s.cancelToken&&s.cancelToken.unsubscribe(u),s.signal&&s.signal.removeEventListener("abort",u)}let f=new XMLHttpRequest;f.open(s.method.toUpperCase(),s.url,!0),f.timeout=s.timeout;function m(){if(!f)return;const g=x.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders()),E={data:!l||l==="text"||l==="json"?f.responseText:f.response,status:f.status,statusText:f.statusText,headers:g,config:e,request:f};xt(function(I){r(I),b()},function(I){n(I),b()},E),f=null}"onloadend"in f?f.onloadend=m:f.onreadystatechange=function(){!f||f.readyState!==4||f.status===0&&!(f.responseURL&&f.responseURL.startsWith("file:"))||setTimeout(m)},f.onabort=function(){f&&(n(new p("Request aborted",p.ECONNABORTED,e,f)),b(),f=null)},f.onerror=function(E){const P=E&&E.message?E.message:"Network Error",I=new p(P,p.ERR_NETWORK,e,f);I.event=E||null,n(I),b(),f=null},f.ontimeout=function(){let E=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const P=s.transitional||Ie;s.timeoutErrorMessage&&(E=s.timeoutErrorMessage),n(new p(E,P.clarifyTimeoutError?p.ETIMEDOUT:p.ECONNABORTED,e,f)),b(),f=null},o===void 0&&a.setContentType(null),"setRequestHeader"in f&&i.forEach(a.toJSON(),function(E,P){f.setRequestHeader(P,E)}),i.isUndefined(s.withCredentials)||(f.withCredentials=!!s.withCredentials),l&&l!=="json"&&(f.responseType=s.responseType),c&&([y,R]=pe(c,!0),f.addEventListener("progress",y)),d&&f.upload&&([h,v]=pe(d),f.upload.addEventListener("progress",h),f.upload.addEventListener("loadend",v)),(s.cancelToken||s.signal)&&(u=g=>{f&&(n(!g||g.type?new oe(null,e,f):g),f.abort(),b(),f=null)},s.cancelToken&&s.cancelToken.subscribe(u),s.signal&&(s.signal.aborted?u():s.signal.addEventListener("abort",u)));const w=mn(s.url);if(w&&!A.protocols.includes(w)){n(new p("Unsupported protocol "+w+":",p.ERR_BAD_REQUEST,e));return}f.send(o||null)})},An=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let n=new AbortController,s;const o=function(c){if(!s){s=!0,l();const u=c instanceof Error?c:this.reason;n.abort(u instanceof p?u:new oe(u instanceof Error?u.message:u))}};let a=t&&setTimeout(()=>{a=null,o(new p(`timeout of ${t}ms exceeded`,p.ETIMEDOUT))},t);const l=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(o):c.removeEventListener("abort",o)}),e=null)};e.forEach(c=>c.addEventListener("abort",o));const{signal:d}=n;return d.unsubscribe=()=>i.asap(l),d}},xn=function*(e,t){let r=e.byteLength;if(!t||r<t){yield e;return}let n=0,s;for(;n<r;)s=n+t,yield e.slice(n,s),n=s},Cn=async function*(e,t){for await(const r of Nn(e))yield*xn(r,t)},Nn=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:r,value:n}=await t.read();if(r)break;yield n}}finally{await t.cancel()}},st=(e,t,r,n)=>{const s=Cn(e,t);let o=0,a,l=d=>{a||(a=!0,n&&n(d))};return new ReadableStream({async pull(d){try{const{done:c,value:u}=await s.next();if(c){l(),d.close();return}let h=u.byteLength;r&&r(o+=h),d.enqueue(new Uint8Array(u))}catch(c){throw l(c),c}},cancel(d){return l(d),s.return()}},{highWaterMark:2})};function Dn(e){if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;const t=e.indexOf(",");if(t<0)return 0;const r=e.slice(5,t),n=e.slice(t+1);if(/;base64/i.test(r)){let o=n.length;const a=n.length;for(let h=0;h<a;h++)if(n.charCodeAt(h)===37&&h+2<a){const y=n.charCodeAt(h+1),v=n.charCodeAt(h+2);(y>=48&&y<=57||y>=65&&y<=70||y>=97&&y<=102)&&(v>=48&&v<=57||v>=65&&v<=70||v>=97&&v<=102)&&(o-=2,h+=2)}let l=0,d=a-1;const c=h=>h>=2&&n.charCodeAt(h-2)===37&&n.charCodeAt(h-1)===51&&(n.charCodeAt(h)===68||n.charCodeAt(h)===100);d>=0&&(n.charCodeAt(d)===61?(l++,d--):c(d)&&(l++,d-=3)),l===1&&d>=0&&(n.charCodeAt(d)===61||c(d))&&l++;const u=Math.floor(o/4)*3-(l||0);return u>0?u:0}if(typeof Buffer<"u"&&typeof Buffer.byteLength=="function")return Buffer.byteLength(n,"utf8");let s=0;for(let o=0,a=n.length;o<a;o++){const l=n.charCodeAt(o);if(l<128)s+=1;else if(l<2048)s+=2;else if(l>=55296&&l<=56319&&o+1<a){const d=n.charCodeAt(o+1);d>=56320&&d<=57343?(s+=4,o++):s+=3}else s+=3}return s}var je="1.16.0",ot=65536,{isFunction:ce}=i,at=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Pn=e=>{const t=i.global??globalThis,{ReadableStream:r,TextEncoder:n}=t;e=i.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:s,Request:o,Response:a}=e,l=s?ce(s):typeof fetch=="function",d=ce(o),c=ce(a);if(!l)return!1;const u=l&&ce(r),h=l&&(typeof n=="function"?(m=>w=>m.encode(w))(new n):async m=>new Uint8Array(await new o(m).arrayBuffer())),y=d&&u&&at(()=>{let m=!1;const w=new o(A.origin,{body:new r,method:"POST",get duplex(){return m=!0,"half"}}),g=w.headers.has("Content-Type");return w.body!=null&&w.body.cancel(),m&&!g}),v=c&&u&&at(()=>i.isReadableStream(new a("").body)),R={stream:v&&(m=>m.body)};l&&["text","arrayBuffer","blob","formData","stream"].forEach(m=>{!R[m]&&(R[m]=(w,g)=>{let E=w&&w[m];if(E)return E.call(w);throw new p(`Response type '${m}' is not supported`,p.ERR_NOT_SUPPORT,g)})});const b=async m=>{if(m==null)return 0;if(i.isBlob(m))return m.size;if(i.isSpecCompliantForm(m))return(await new o(A.origin,{method:"POST",body:m}).arrayBuffer()).byteLength;if(i.isArrayBufferView(m)||i.isArrayBuffer(m))return m.byteLength;if(i.isURLSearchParams(m)&&(m=m+""),i.isString(m))return(await h(m)).byteLength},f=async(m,w)=>{const g=i.toFiniteNumber(m.getContentLength());return g??b(w)};return async m=>{let{url:w,method:g,data:E,signal:P,cancelToken:I,timeout:Bt,onDownloadProgress:we,onUploadProgress:Me,responseType:j,headers:M,withCredentials:ae="same-origin",fetchOptions:He,maxContentLength:B,maxBodyLength:Oe}=Nt(m);const Y=i.isNumber(B)&&B>-1,Ft=i.isNumber(Oe)&&Oe>-1;let $e=s||fetch;j=j?(j+"").toLowerCase():"text";let q=An([P,I&&I.toAbortSignal()],Bt),N=null;const H=q&&q.unsubscribe&&(()=>{q.unsubscribe()});let Ve;try{if(Y&&typeof w=="string"&&w.startsWith("data:")&&Dn(w)>B)throw new p("maxContentLength size of "+B+" exceeded",p.ERR_BAD_RESPONSE,m,N);if(Ft&&g!=="get"&&g!=="head"){const O=await f(M,E);if(typeof O=="number"&&isFinite(O)&&O>Oe)throw new p("Request body larger than maxBodyLength limit",p.ERR_BAD_REQUEST,m,N)}if(Me&&y&&g!=="get"&&g!=="head"&&(Ve=await f(M,E))!==0){let O=new o(w,{method:"POST",body:E,duplex:"half"}),J;if(i.isFormData(E)&&(J=O.headers.get("content-type"))&&M.setContentType(J),O.body){const[ie,le]=tt(Ve,pe(rt(Me)));E=st(O.body,ot,ie,le)}}i.isString(ae)||(ae=ae?"include":"omit");const S=d&&"credentials"in o.prototype;if(i.isFormData(E)){const O=M.getContentType();O&&/^multipart\/form-data/i.test(O)&&!/boundary=/i.test(O)&&M.delete("content-type")}M.set("User-Agent","axios/"+je,!1);const z={...He,signal:q,method:g.toUpperCase(),headers:M.normalize().toJSON(),body:E,duplex:"half",credentials:S?ae:void 0};N=d&&new o(w,z);let F=await(d?$e(N,He):$e(w,z));if(Y){const O=i.toFiniteNumber(F.headers.get("content-length"));if(O!=null&&O>B)throw new p("maxContentLength size of "+B+" exceeded",p.ERR_BAD_RESPONSE,m,N)}const _e=v&&(j==="stream"||j==="response");if(v&&F.body&&(we||Y||_e&&H)){const O={};["status","statusText","headers"].forEach(Q=>{O[Q]=F[Q]});const J=i.toFiniteNumber(F.headers.get("content-length")),[ie,le]=we&&tt(J,pe(rt(we),!0))||[];let We=0;const It=Q=>{if(Y&&(We=Q,We>B))throw new p("maxContentLength size of "+B+" exceeded",p.ERR_BAD_RESPONSE,m,N);ie&&ie(Q)};F=new a(st(F.body,ot,It,()=>{le&&le(),H&&H()}),O)}j=j||"text";let k=await R[i.findKey(R,j)||"text"](F,m);if(Y&&!v&&!_e){let O;if(k!=null&&(typeof k.byteLength=="number"?O=k.byteLength:typeof k.size=="number"?O=k.size:typeof k=="string"&&(O=typeof n=="function"?new n().encode(k).byteLength:k.length)),typeof O=="number"&&O>B)throw new p("maxContentLength size of "+B+" exceeded",p.ERR_BAD_RESPONSE,m,N)}return!_e&&H&&H(),await new Promise((O,J)=>{xt(O,J,{data:k,headers:x.from(F.headers),status:F.status,statusText:F.statusText,config:m,request:N})})}catch(S){if(H&&H(),q&&q.aborted&&q.reason instanceof p){const z=q.reason;throw z.config=m,N&&(z.request=N),S!==z&&(z.cause=S),z}throw S&&S.name==="TypeError"&&/Load failed|fetch/i.test(S.message)?Object.assign(new p("Network Error",p.ERR_NETWORK,m,N,S&&S.response),{cause:S.cause||S}):p.from(S,S&&S.code,m,N,S&&S.response)}}},Ln=new Map,Dt=e=>{let t=e&&e.env||{};const{fetch:r,Request:n,Response:s}=t,o=[n,s,r];let a=o.length,l,d,c=Ln;for(;a--;)l=o[a],d=c.get(l),d===void 0&&c.set(l,d=a?new Map:Pn(t)),c=d;return d},Yn=Dt(),qe={http:null,xhr:Sn,fetch:{get:Dt}};i.forEach(qe,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});var it=e=>`- ${e}`,Un=e=>i.isFunction(e)||e===null||e===!1;function Bn(e,t){e=i.isArray(e)?e:[e];const{length:r}=e;let n,s;const o={};for(let a=0;a<r;a++){n=e[a];let l;if(s=n,!Un(n)&&(s=qe[(l=String(n)).toLowerCase()],s===void 0))throw new p(`Unknown adapter '${l}'`);if(s&&(i.isFunction(s)||(s=s.get(t))))break;o[l||"#"+a]=s}if(!s){const a=Object.entries(o).map(([d,c])=>`adapter ${d} `+(c===!1?"is not supported by the environment":"is not available in the build"));let l=r?a.length>1?`since :
|
|
4
|
+
`+a.map(it).join(`
|
|
5
|
+
`):" "+it(a[0]):"as no adapter specified";throw new p("There is no suitable adapter to dispatch the request "+l,"ERR_NOT_SUPPORT")}return s}var Pt={getAdapter:Bn,adapters:qe};function xe(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new oe(null,e)}function lt(e){return xe(e),e.headers=x.from(e.headers),e.data=Ae.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Pt.getAdapter(e.adapter||se.adapter,e)(e).then(function(r){xe(e),e.response=r;try{r.data=Ae.call(e,e.transformResponse,r)}finally{delete e.response}return r.headers=x.from(r.headers),r},function(r){if(!At(r)&&(xe(e),r&&r.response)){e.response=r.response;try{r.response.data=Ae.call(e,e.transformResponse,r.response)}finally{delete e.response}r.response.headers=x.from(r.response.headers)}return Promise.reject(r)})}var Ee={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Ee[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});var ct={};Ee.transitional=function(t,r,n){function s(o,a){return"[Axios v"+je+"] Transitional option '"+o+"'"+a+(n?". "+n:"")}return(o,a,l)=>{if(t===!1)throw new p(s(a," has been removed"+(r?" in "+r:"")),p.ERR_DEPRECATED);return r&&!ct[a]&&(ct[a]=!0,console.warn(s(a," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(o,a,l):!0}};Ee.spelling=function(t){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function Fn(e,t,r){if(typeof e!="object")throw new p("options must be an object",p.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let s=n.length;for(;s-- >0;){const o=n[s],a=Object.prototype.hasOwnProperty.call(t,o)?t[o]:void 0;if(a){const l=e[o],d=l===void 0||a(l,o,e);if(d!==!0)throw new p("option "+o+" must be "+d,p.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new p("Unknown option "+o,p.ERR_BAD_OPTION)}}var fe={assertOptions:Fn,validators:Ee},D=fe.validators,V=class{constructor(e){this.defaults=e||{},this.interceptors={request:new et,response:new et}}async request(e,t){try{return await this._request(e,t)}catch(r){if(r instanceof Error){let n={};Error.captureStackTrace?Error.captureStackTrace(n):n=new Error;const s=(()=>{if(!n.stack)return"";const o=n.stack.indexOf(`
|
|
6
|
+
`);return o===-1?"":n.stack.slice(o+1)})();try{if(!r.stack)r.stack=s;else if(s){const o=s.indexOf(`
|
|
7
|
+
`),a=o===-1?-1:s.indexOf(`
|
|
8
|
+
`,o+1),l=a===-1?"":s.slice(a+1);String(r.stack).endsWith(l)||(r.stack+=`
|
|
9
|
+
`+s)}}catch{}}throw r}}_request(e,t){typeof e=="string"?(t=t||{},t.url=e):t=e||{},t=W(this.defaults,t);const{transitional:r,paramsSerializer:n,headers:s}=t;r!==void 0&&fe.assertOptions(r,{silentJSONParsing:D.transitional(D.boolean),forcedJSONParsing:D.transitional(D.boolean),clarifyTimeoutError:D.transitional(D.boolean),legacyInterceptorReqResOrdering:D.transitional(D.boolean)},!1),n!=null&&(i.isFunction(n)?t.paramsSerializer={serialize:n}:fe.assertOptions(n,{encode:D.function,serialize:D.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),fe.assertOptions(t,{baseUrl:D.spelling("baseURL"),withXsrfToken:D.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let o=s&&i.merge(s.common,s[t.method]);s&&i.forEach(["delete","get","head","post","put","patch","query","common"],v=>{delete s[v]}),t.headers=x.concat(o,s);const a=[];let l=!0;this.interceptors.request.forEach(function(R){if(typeof R.runWhen=="function"&&R.runWhen(t)===!1)return;l=l&&R.synchronous;const b=t.transitional||Ie;b&&b.legacyInterceptorReqResOrdering?a.unshift(R.fulfilled,R.rejected):a.push(R.fulfilled,R.rejected)});const d=[];this.interceptors.response.forEach(function(R){d.push(R.fulfilled,R.rejected)});let c,u=0,h;if(!l){const v=[lt.bind(this),void 0];for(v.unshift(...a),v.push(...d),h=v.length,c=Promise.resolve(t);u<h;)c=c.then(v[u++],v[u++]);return c}h=a.length;let y=t;for(;u<h;){const v=a[u++],R=a[u++];try{y=v(y)}catch(b){R.call(this,b);break}}try{c=lt.call(this,y)}catch(v){return Promise.reject(v)}for(u=0,h=d.length;u<h;)c=c.then(d[u++],d[u++]);return c}getUri(e){e=W(this.defaults,e);const t=Ct(e.baseURL,e.url,e.allowAbsoluteUrls);return Tt(t,e.params,e.paramsSerializer)}};i.forEach(["delete","get","head","options"],function(t){V.prototype[t]=function(r,n){return this.request(W(n||{},{method:t,url:r,data:(n||{}).data}))}});i.forEach(["post","put","patch","query"],function(t){function r(n){return function(o,a,l){return this.request(W(l||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:o,data:a}))}}V.prototype[t]=r(),t!=="query"&&(V.prototype[t+"Form"]=r(!0))});var In=class Lt{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(o){r=o});const n=this;this.promise.then(s=>{if(!n._listeners)return;let o=n._listeners.length;for(;o-- >0;)n._listeners[o](s);n._listeners=null}),this.promise.then=s=>{let o;const a=new Promise(l=>{n.subscribe(l),o=l}).then(s);return a.cancel=function(){n.unsubscribe(o)},a},t(function(o,a,l){n.reason||(n.reason=new oe(o,a,l),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const t=new AbortController,r=n=>{t.abort(n)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new Lt(function(n){t=n}),cancel:t}}};function kn(e){return function(r){return e.apply(null,r)}}function jn(e){return i.isObject(e)&&e.isAxiosError===!0}var Be={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Be).forEach(([e,t])=>{Be[t]=e});function Ut(e){const t=new V(e),r=ht(V.prototype.request,t);return i.extend(r,V.prototype,t,{allOwnKeys:!0}),i.extend(r,t,null,{allOwnKeys:!0}),r.create=function(s){return Ut(W(e,s))},r}var T=Ut(se);T.Axios=V;T.CanceledError=oe;T.CancelToken=In;T.isCancel=At;T.VERSION=je;T.toFormData=ve;T.AxiosError=p;T.Cancel=T.CanceledError;T.all=function(t){return Promise.all(t)};T.spread=kn;T.isAxiosError=jn;T.mergeConfig=W;T.AxiosHeaders=x;T.formToJSON=e=>St(i.isHTMLForm(e)?new FormData(e):e);T.getAdapter=Pt.getAdapter;T.HttpStatusCode=Be;T.default=T;var Ce={getTimestamp(){return new Date().toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit",fractionalSecondDigits:3})},request(e){},response(e,t){},error(e,t){}},ut=e=>(e.interceptors.request.use(t=>(t.metadata={startTime:performance.now()},Ce.request(t),Xt({category:"db_studio.http",data:{operation:dt(t.method,t.url),method:t.method?.toUpperCase()},level:"info"}),t),t=>Promise.reject(t)),e.interceptors.response.use(t=>{const r=t.config.metadata?.startTime??0,n=Math.round(performance.now()-r);return Ce.response(t,n),t},t=>{const r=t.config?.metadata?.startTime??0,n=Math.round(performance.now()-r);Ce.error(t,n);const s=t.response?.status??500,o=t.response?.data,a=o?.error??t.message??"An error occurred",l=o?.details,d=new Error(a);if(d.status=s,d.details=l,!t.response){const c=dt(t.config?.method,t.config?.url),u=typeof t.code=="string"&&/^[A-Z0-9_]{2,32}$/.test(t.code)?t.code:"unknown",h=new Error("Network request failed");h.name="AxiosError",t.stack&&(h.stack=["AxiosError: Network request failed",...t.stack.split(`
|
|
10
|
+
`).slice(1).filter(qn)].join(`
|
|
11
|
+
`)),Gt(h,{tags:{source:"client",error_kind:"network",operation:c,error_code:u},fingerprint:["network",c,u]})}return Promise.reject(d)}),e),qn=e=>/^\s*at\s/.test(e),dt=(e,t)=>{const r=t?.replace(/[?#].*$/,"").match(/\/(databases|tables|records|query|keys|chat)(?:\/|$)/)?.[1];return`${e?.toLowerCase()??"unknown"}_${r??"other"}`},zn=()=>globalThis.location?.origin??Ne.BASE_URL,Mn=class{rootApi;api;dbType=null;resolveBaseUrl;constructor(e=zn){this.resolveBaseUrl=e;const t=`${this.resolveBaseUrl()}${Ne.API_PREFIX}`;this.rootApi=ut(T.create({baseURL:t})),this.api=ut(T.create({baseURL:t}))}setDbType(e){this.dbType!==e&&(this.dbType=e,this.api.defaults.baseURL=`${this.resolveBaseUrl()}${Ne.API_PREFIX}/${e}`)}getDbType(){return this.dbType}},ze=new Mn,ge=ze.rootApi,_=ze.api,Qn=e=>ze.setDbType(e),Zn=()=>ge.get("/chat/limit"),es=()=>ge.get("/databases"),ts=()=>ge.get("/databases/current"),rs=()=>ge.get("/databases/connection"),ns=({query:e,db:t})=>_.post("/query",{query:e},{params:{db:t??""}}),ss=({tableName:e,data:t,db:r})=>_.post("/records",{tableName:e,data:t},{params:{db:r??""}}),os=({tableName:e,updates:t,primaryKey:r,primaryKeys:n,db:s})=>_.patch("/records",{tableName:e,updates:t,...r?{primaryKey:r}:{},...n?.length?{primaryKeys:n}:{}},{params:{db:s??""}}),as=({tableName:e,records:t,db:r})=>_.post("/records/bulk",{tableName:e,records:t},{params:{db:r??""}}),is=({tableName:e,primaryKeys:t,force:r,db:n})=>_.delete(r?"/records/force":"/records",{data:{tableName:e,primaryKeys:t},params:{db:n??""}}),Re=e=>e||"-",ls=e=>_.get("/keys",{params:e}),cs=({db:e,key:t,cursor:r,limit:n=100,full:s=!1,direction:o="forward"})=>_.get(`/keys/${Re(t)}`,{params:{db:e,cursor:r,limit:n,full:s,direction:o}}),us=({db:e,key:t,offset:r,expectedRevision:n})=>_.get(`/keys/${Re(t)}/raw`,{params:{db:e,offset:r,limit:1048576,expectedRevision:n}}),ds=({db:e,data:t})=>_.post("/keys",t,{params:{db:e}}),fs=({db:e,key:t,data:r})=>_.post(`/keys/${Re(t)}/actions`,r,{params:{db:e}}),ps=({db:e,key:t,expectedRevision:r,force:n=!1})=>_.delete(`/keys/${Re(t)}`,{params:{db:e,expectedRevision:r,force:n}}),hs=e=>_.get("/tables",{params:{db:e??""}}),ms=(e,t)=>_.get(`/tables/${encodeURIComponent(e)}/columns`,{params:{db:t??""}}),bs=({tableName:e,db:t,limit:r,cursor:n,direction:s,sort:o,order:a,filters:l})=>_.get(`/tables/${encodeURIComponent(e)}/data`,{params:{db:t,limit:r,cursor:n??void 0,direction:s??void 0,sort:o,order:a??void 0,filters:l}}),ys=(e,t)=>_.post("/tables",e,{params:{db:t??""}}),vs=({tableName:e,db:t,cascade:r=!1})=>_.delete(`/tables/${encodeURIComponent(e)}`,{params:{db:t??"",cascade:r?"true":"false"}}),Es=({tableName:e,data:t,db:r})=>_.patch(`/tables/${encodeURIComponent(e)}/rename`,t,{params:{db:r??""}}),gs=({tableName:e,data:t,db:r})=>_.post(`/tables/${encodeURIComponent(e)}/columns`,t,{params:{db:r??""}}),Rs=({tableName:e,columnName:t,data:r,db:n})=>_.patch(`/tables/${encodeURIComponent(e)}/columns/${encodeURIComponent(t)}`,r,{params:{db:n??""}}),ws=({tableName:e,columnName:t,data:r,db:n})=>_.patch(`/tables/${encodeURIComponent(e)}/columns/${encodeURIComponent(t)}/rename`,r,{params:{db:n??""}}),Os=({tableName:e,columnName:t,cascade:r,db:n})=>_.delete(`/tables/${encodeURIComponent(e)}/columns/${encodeURIComponent(t)}`,{params:{db:n??"",cascade:r?"true":"false"}}),_s=(e,t)=>_.get(`/tables/${encodeURIComponent(e)}/schema`,{params:{db:t??""}}),Ts=({tableName:e,format:t,db:r})=>_.get(`/tables/${encodeURIComponent(e)}/export`,{params:{db:r??"",format:t},responseType:"blob"}),Ss=["table","runner","schema","indexes","logs","visualizer"],As={SIDEBAR_SEARCH:"search",ACTIVE_TABLE:"table",ACTIVE_SCHEMA:"schema",ACTIVE_TAB:"t",COLUMN_NAME:"columnName",CACHE_KEYS:{TABLES_LIST:"tablesList",TABLE_COLUMNS:"tableColumns",TABLE_DATA:"tableData",TABLE_DEFAULT_PAGE:1,TABLE_DEFAULT_LIMIT:50,DATABASES_LIST:"databasesList",CURRENT_DATABASE:"currentDatabase",DATABASE_CONNECTION_INFO:"databaseConnectionInfo"},RUNNER_STATE_KEYS:{SHOW_AS:"view"},TABLE_STATE_KEYS:{SORT:"sort",ORDER:"order",CURSOR:"cursor",DIRECTION:"dir",LIMIT:"limit",FILTERS:"filters"},REFERENCED_TABLE_STATE_KEYS:{ACTIVE_TABLE:"rTable",CURSOR:"rCursor",DIRECTION:"rDir",DEFAULT_PAGE:1,LIMIT:"rLimit",DEFAULT_LIMIT:30,FILTERS:"rFilters",SORT:"rSort",ORDER:"rOrder"},HOVER_ZONE:20,HOVER_DELAY:100},xs=[5,10,25,50,100,500];function Hn({delayDuration:e=0,...t}){return(0,L.jsx)(Mt,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function Cs({...e}){return(0,L.jsx)(Hn,{children:(0,L.jsx)($t,{"data-slot":"tooltip",...e})})}function Ns({...e}){return(0,L.jsx)(qt,{"data-slot":"tooltip-trigger",...e})}function Ds({className:e,sideOffset:t=0,children:r,...n}){return(0,L.jsx)(zt,{children:(0,L.jsxs)(Ht,{"data-slot":"tooltip-content",sideOffset:t,className:ee("data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 rounded-md px-3 py-1.5 text-xs **:data-[slot=kbd]:rounded-md bg-foreground text-background z-50 w-fit max-w-xs origin-(--radix-tooltip-content-transform-origin)",e),...n,children:[r,(0,L.jsx)(jt,{className:"size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground z-50 translate-y-[calc(-50%_-_2px)]"})]})})}var Ps=Kt()((e,t)=>({openOverlays:[],openOverlay:r=>e(n=>n.openOverlays.includes(r)?{openOverlays:[...n.openOverlays.filter(s=>s!==r),r]}:{openOverlays:[...n.openOverlays,r]}),closeOverlay:r=>e(n=>r?{openOverlays:n.openOverlays.filter(s=>s!==r)}:{openOverlays:n.openOverlays.slice(0,-1)}),closeAllOverlays:()=>e({openOverlays:[]}),toggleOverlay:r=>e(n=>n.openOverlays.includes(r)?{openOverlays:n.openOverlays.filter(s=>s!==r)}:{openOverlays:[...n.openOverlays,r]}),isOverlayOpen:r=>t().openOverlays.includes(r),getOverlayIndex:r=>t().openOverlays.indexOf(r)}));export{os as A,Gn as B,ps as C,as as D,ls as E,Zn as F,Yt as H,_ as I,zn as L,ts as M,rs as N,ss as O,es as P,Qn as R,ds as S,us as T,Xn as U,Qt as V,ee as W,_s as _,Ns as a,Es as b,Ss as c,ys as d,Os as f,bs as g,ms as h,Hn as i,ns as j,is as k,gs as l,Ts as m,Cs as n,As as o,vs as p,Ds as r,xs as s,Ps as t,Rs as u,hs as v,cs as w,fs as x,ws as y,Ne as z};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as l}from"./react-
|
|
1
|
+
import{t as l}from"./react-1gU4DcpZ.js";import{t as a}from"./middleware-Y6OdmOWR.js";(function(){try{var d=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};d.SENTRY_RELEASE={id:"db-studio@1.14.1"};var o=new d.Error().stack;o&&(d._sentryDebugIds=d._sentryDebugIds||{},d._sentryDebugIds[o]="59035353-545c-4e5b-a09d-c9cecc575fa0",d._sentryDebugIdIdentifier="sentry-dbid-59035353-545c-4e5b-a09d-c9cecc575fa0")}catch{}})();var f=l()(a((d,o)=>({folders:[],queries:[],addFolder:e=>d(i=>({folders:[...i.folders,e]})),updateFolder:(e,i)=>d(r=>({folders:r.folders.map(s=>s.id===e?{...s,...i}:s)})),deleteFolder:e=>d(i=>({folders:i.folders.filter(r=>r.id!==e),queries:i.queries.filter(r=>r.folderId!==e)})),toggleFolder:e=>d(i=>({folders:i.folders.map(r=>r.id===e?{...r,isExpanded:!r.isExpanded}:r)})),toggleFavoriteFolder:e=>d(i=>({folders:i.folders.map(r=>r.id===e?{...r,isFavorite:!r.isFavorite}:r)})),addQuery:(e,i)=>{const r=Math.random().toString(36).substring(2,15),s={id:r,name:e??"Untitled Query",query:"",isFavorite:!1,isSelected:!1,folderId:i??void 0};return d(t=>({queries:[...t.queries,s]})),r},updateQuery:(e,i)=>d(r=>({queries:r.queries.map(s=>s.id===e?{...s,...i}:s)})),deleteQuery:e=>d(i=>({queries:i.queries.filter(r=>r.id!==e)})),moveQuery:(e,i)=>d(r=>({queries:r.queries.map(s=>s.id===e?{...s,folderId:i}:s)})),toggleFavorite:e=>d(i=>({queries:i.queries.map(r=>r.id===e?{...r,isFavorite:!r.isFavorite}:r)})),getQueriesByFolder:e=>o().queries.filter(i=>i.folderId===e&&!i.isFavorite).sort((i,r)=>i.name.localeCompare(r.name)),getFavoriteQueries:()=>o().queries.filter(e=>e.isFavorite).sort((e,i)=>e.name.localeCompare(i.name)),getFavoriteFolders:()=>o().folders.filter(e=>e.isFavorite),getQuery:e=>o().queries.find(i=>i.id===e),setSelectedQuery:e=>d(i=>({queries:i.queries.map(r=>r.id===e?{...r,isSelected:!0}:{...r,isSelected:!1})})),getSelectedQuery:()=>o().queries.find(e=>e.isSelected)}),{name:"dbstudio-queries"}));export{f as t};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/code-editor-BIfiMFMb.js","assets/rolldown-runtime-DY1mqKjv.js","assets/icons-rRDRsZcq.js","assets/radix-ui-C1Z_SoKk.js","assets/dist-D_0esNxp.js","assets/monaco-editor-BO3WVEVM.js","assets/monaco-editor-IL9D_L0g.css","assets/index-CJ2YPwW4.js","assets/tanstack-C3XvOIUf.js","assets/react-dom-DkH0eaTq.js","assets/overlay.store-DjYsesE7.js","assets/bundle-mjs-BZOM22--.js","assets/react-1gU4DcpZ.js","assets/monitoring-BtlIcl3k.js","assets/schema-9nf0q_01.js","assets/badge-SEQODpjR.js","assets/database.store-OsasuLJl.js","assets/format-cell-value-D41tFXxV.js","assets/middleware-Y6OdmOWR.js","assets/index-Be5YdcX5.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{r as Y}from"./rolldown-runtime-DY1mqKjv.js";import{c as G,l as P,o as W,s as k,w as B,x as K}from"./tanstack-C3XvOIUf.js";import{L as T,Y as J,Z,ht as X,l as ee,m as re,s as se,t as te,v as ae,xt as oe}from"./icons-rRDRsZcq.js";import{kt as ne}from"./radix-ui-C1Z_SoKk.js";import{n as N}from"./dist-D_0esNxp.js";import{B as g,U as le,a as S,j as ie,n as w,o as L,r as C,t as q}from"./overlay.store-DjYsesE7.js";import{r as de}from"./monitoring-BtlIcl3k.js";import{t as D}from"./database.store-OsasuLJl.js";import{t as ce}from"./format-cell-value-D41tFXxV.js";import{a as ue}from"./monaco-editor-BO3WVEVM.js";import{G as O,Y as $,b as he,d as me,f as A,x as xe}from"./index-CJ2YPwW4.js";import{t as be}from"./queries.store-CxkLh1ra.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};r.SENTRY_RELEASE={id:"db-studio@1.14.1"};var o=new r.Error().stack;o&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[o]="0de973e3-aeb9-4d34-8ccb-ffa53152d2f6",r._sentryDebugIdIdentifier="sentry-dbid-0de973e3-aeb9-4d34-8ccb-ffa53152d2f6")}catch{}})();var n=Y(oe(),1),fe=`-- Your query here...
|
|
3
|
+
`,ge=`{
|
|
4
|
+
"collection": "your_collection",
|
|
5
|
+
"operation": "find",
|
|
6
|
+
"filter": {},
|
|
7
|
+
"sort": { "_id": 1 },
|
|
8
|
+
"limit": 50
|
|
9
|
+
}`,pe="PING",e=ne(),ye=({results:r})=>{const o=(0,n.useMemo)(()=>r?.columns?r.columns.map(t=>({id:t,accessorKey:t,header:t,cell:({row:s})=>(0,e.jsx)("div",{className:"font-medium truncate text-foreground",children:ce(s.getValue(t))})})):[],[r?.columns]),a=G({columns:o,data:r?.rows??[],getCoreRowModel:P(),columnResizeMode:"onChange",enableColumnResizing:!0}),{rows:l}=a.getRowModel(),c=(0,n.useRef)(null),m=W({count:l.length,getScrollElement:()=>c.current,estimateSize:()=>35,overscan:10}),i=m.getVirtualItems(),u=a.getAllColumns().reduce((t,s)=>t+s.getSize(),0);return(0,e.jsxs)("div",{ref:c,className:"relative h-full overflow-auto w-full bg-background text-foreground",children:[(0,e.jsx)("div",{className:"sticky top-0 z-20 bg-muted/40 border-b border-border supports-backdrop-filter:backdrop-blur-sm",style:{width:`${u}px`,minWidth:"100%"},children:a.getHeaderGroups().map(t=>(0,e.jsx)("div",{className:"flex text-xs",children:t.headers.map(s=>(0,e.jsxs)("div",{className:"shrink-0 p-2 font-semibold text-muted-foreground border-r border-border relative",style:{width:`${s.getSize()}px`},children:[s.isPlaceholder?null:k(s.column.columnDef.header,s.getContext()),(0,e.jsx)("div",{role:"presentation",onMouseDown:s.getResizeHandler(),onTouchStart:s.getResizeHandler(),className:`absolute top-0 right-0 h-full w-1 cursor-col-resize select-none touch-none hover:bg-blue-500 ${s.column.getIsResizing()?"bg-blue-500":""}`})]},s.id))},t.id))}),(0,e.jsx)("div",{style:{height:`${m.getTotalSize()}px`,width:`${u}px`,minWidth:"100%",position:"relative"},children:i.map(t=>{const s=l[t.index];return(0,e.jsx)("div",{style:{position:"absolute",top:0,left:0,width:`${u}px`,minWidth:"100%",height:`${t.size}px`,transform:`translateY(${t.start}px)`},className:"flex text-xs border-b border-border hover:bg-accent/20",children:s.getVisibleCells().map(d=>(0,e.jsx)("div",{className:"shrink-0 p-2 border-r border-border",style:{width:`${d.column.getSize()}px`},children:k(d.column.columnDef.cell,d.getContext())},d.id))},s.id)})}),l.length===0&&(0,e.jsx)("div",{className:"flex items-center justify-center h-24 text-muted-foreground",children:"No results."})]})},ve=({results:r,isLoading:o,error:a,lastExecutedQuery:l})=>{const[c]=O(L.RUNNER_STATE_KEYS.SHOW_AS),{requestAssistant:m}=$(),{openOverlay:i}=q(),u=s=>{m(s),i("chat.assistant")},t=(0,n.useMemo)(()=>a?(0,e.jsx)("div",{className:"flex h-full p-2",children:(0,e.jsxs)("div",{className:"space-y-2 text-sm",children:[(0,e.jsxs)("div",{children:["Error: ",a.message]}),(0,e.jsx)(g,{type:"button",variant:"outline",size:"sm",disabled:!l.trim(),onClick:()=>u(`Fix this failing query. Explain the cause and return the complete corrected query in a fenced code block.
|
|
10
|
+
|
|
11
|
+
Query:
|
|
12
|
+
${l}
|
|
13
|
+
|
|
14
|
+
Error:
|
|
15
|
+
${a.message}`),children:"Suggest fix"})]})}):r?.message?(0,e.jsx)("div",{className:"flex h-full p-2",children:(0,e.jsx)("p",{children:r.message})}):!r||r.rows.length===0?(0,e.jsx)("div",{className:"flex h-full p-2",children:(0,e.jsx)("p",{children:"Run the query to see the results"})}):c==="json"?(0,e.jsx)("div",{className:"p-2",children:(0,e.jsx)(xe,{value:r?.rows??[],objectSortKeys:!0,displayObjectSize:!1,displayDataTypes:!1,indentWidth:14,collapsed:2,shortenTextAfterLength:100,highlightUpdates:!1,style:he,enableClipboard:!1,className:"size-full"})}):(0,e.jsx)(ye,{results:r}),[c,r,a,l]);return(0,e.jsx)("div",{className:"absolute bottom-0 left-0 right-0 border-t border-border flex flex-col bg-background text-foreground w-full",style:{height:"calc(100vh - 400px)"},children:(0,e.jsx)("div",{className:"flex-1 overflow-auto w-full",children:o?(0,e.jsx)("div",{className:"flex items-center justify-center h-full overflow-auto",children:(0,e.jsx)(le,{size:"size-8",color:"bg-[#d4d4d4]"})}):t})})},je=({isExecutingQuery:r,handleButtonClick:o,handleFormatQuery:a,handleSaveQuery:l,handleFavorite:c,isFavorite:m,queryId:i,hasUnsavedChanges:u,queryResult:t,currentQuery:s})=>{const[d,p]=O(L.RUNNER_STATE_KEYS.SHOW_AS),{requestAssistant:y}=$(),{openOverlay:E}=q(),v=b=>{y(b),E("chat.assistant")};return(0,e.jsxs)("header",{className:"max-h-8 overflow-hidden border-b border-border w-full flex items-center justify-between bg-background text-foreground sticky top-0 left-0 right-0 z-0",children:[(0,e.jsxs)("div",{className:"flex items-center",children:[(0,e.jsxs)(g,{type:"button",variant:"default",className:"h-8! border-l-0 border-y-0 border-r border-border rounded-none bg-green-700 text-white hover:bg-green-800 gap-1 disabled:opacity-50",onClick:o,disabled:r,"aria-label":"Run the query",children:["Run",(0,e.jsx)(Z,{className:"size-3"}),(0,e.jsx)(J,{className:"size-3"})]}),(0,e.jsxs)(w,{children:[(0,e.jsx)(S,{asChild:!0,children:(0,e.jsx)(g,{type:"button",variant:"ghost",className:"h-8! border-l-0 border-y-0 border-r border-zinc-800 rounded-none","aria-label":"Generate a query with AI",onClick:()=>v("Generate a query for this database. Ask me for the goal if it is unclear."),children:(0,e.jsx)(re,{className:"size-3"})})}),(0,e.jsx)(C,{children:"Generate with AI"})]}),(0,e.jsxs)(w,{children:[(0,e.jsx)(S,{asChild:!0,children:(0,e.jsx)(g,{type:"button",variant:"ghost",className:"h-8! border-l-0 border-y-0 border-r border-zinc-800 rounded-none","aria-label":"Optimize the query with AI",disabled:!s.trim()||r,onClick:()=>v(`Suggest a faster, clearer version of this query. Explain the tradeoffs and return the complete query in a fenced code block.
|
|
16
|
+
|
|
17
|
+
${s}`),children:(0,e.jsx)(te,{className:"size-3"})})}),(0,e.jsx)(C,{children:"Optimize with AI"})]}),(0,e.jsxs)(g,{type:"button",variant:"ghost",className:"h-8! border-l-0 border-y-0 border-r border-border rounded-none text-muted-foreground hover:text-foreground hover:bg-muted/60 transition-colors","aria-label":"Format the query",onClick:a,children:["Format ",(0,e.jsx)(se,{className:"size-3"})]}),(0,e.jsxs)(g,{type:"button",variant:"ghost",className:"h-8! border-l-0 border-y-0 border-r border-border rounded-none text-muted-foreground hover:text-foreground hover:bg-muted/60 transition-colors","aria-label":"Save the query",onClick:l,children:["Save ",(0,e.jsx)(ae,{className:"size-3"})]}),(0,e.jsx)(g,{type:"button",variant:"ghost",className:"h-8! border-l-0 border-y-0 border-r border-border rounded-none text-muted-foreground hover:text-foreground hover:bg-muted/60 transition-colors","aria-label":"Favorite the query",onClick:c,children:m?(0,e.jsx)(T,{className:"size-3 fill-current"}):(0,e.jsx)(T,{className:"size-3"})}),i&&u&&(0,e.jsx)("span",{className:"text-xs px-2 text-muted-foreground",children:"Unsaved changes"})]}),(0,e.jsxs)("div",{className:"flex items-center",children:[t&&(0,e.jsxs)("div",{className:"flex items-center gap-1 px-2",children:[(0,e.jsxs)("span",{className:"text-xs text-muted-foreground",children:[t.data?.duration?.toFixed(2),"ms"]}),(0,e.jsx)("span",{className:"text-xs text-muted-foreground",children:"•"}),(0,e.jsxs)("span",{className:"text-xs text-muted-foreground",children:[t.data?.rowCount??0," rows"]})]}),(0,e.jsxs)(me,{type:"single",variant:"ghost",onValueChange:b=>{b!==d&&p(b)},value:d??void 0,className:"h-8! rounded-none! border-l! border-border!",children:[(0,e.jsxs)(w,{children:[(0,e.jsx)(S,{asChild:!0,children:(0,e.jsx)(A,{value:"table","aria-label":"Toggle table",className:"rounded-none! h-8! aspect-square!","data-selected":d==="table",children:(0,e.jsx)(ee,{})})}),(0,e.jsx)(C,{children:(0,e.jsx)("p",{children:"View as a table"})})]}),(0,e.jsxs)(w,{children:[(0,e.jsx)(S,{asChild:!0,children:(0,e.jsx)(A,{value:"json","aria-label":"Toggle JSON",className:"rounded-none! h-8! aspect-square!","data-selected":d==="json",children:(0,e.jsx)(X,{})})}),(0,e.jsx)(C,{children:(0,e.jsx)("p",{children:"View as a JSON"})})]})]})]})]})},Ne=()=>{const{selectedDatabase:r,dbType:o}=D(),{mutateAsync:a,isPending:l,error:c}=B({mutationFn:async({query:i})=>(await ie({query:i,db:r})).data.data,onSuccess:()=>{o&&de.capture("query_executed",{db_type:o})}});return{executeQuery:async({query:i})=>{try{return await a({query:i})}catch{return}},isExecutingQuery:l,executeQueryError:c}},Se=(0,n.lazy)(()=>ue(()=>import("./code-editor-BIfiMFMb.js").then(r=>({default:r.CodeEditor})),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19]))),De=({queryId:r,initialQuery:o})=>{const a=K(),[l,c]=(0,n.useState)(void 0),{getQuery:m,updateQuery:i,toggleFavorite:u,addQuery:t}=be(),s=r?m(r):null,d=s?.isFavorite??!1,{executeQuery:p,isExecutingQuery:y,executeQueryError:E}=Ne(),[v,b]=(0,n.useState)(!1),[x,F]=(0,n.useState)(""),[U,H]=(0,n.useState)(""),{dbType:f}=D(),M=(0,n.useCallback)(()=>{if(o)return o;const h=f==="mongodb"?ge:f==="redis"?pe:fe;return s?s?.query??h:h},[s,f,o]),Q=(0,n.useCallback)(async h=>{if(!h.trim()){N.error("Query is empty!");return}const j=h.trim().match(/^\S+/)?.[0]?.toUpperCase();if(f==="redis"&&(j==="FLUSHDB"||j==="FLUSHALL")&&window.prompt(`This permanently deletes Redis data. Type ${j} to continue.`)!==j)return;H(h);const R=await p({query:h});R&&c({data:R,queryId:r??""})},[f,p,r]),V=(0,n.useCallback)(()=>{if(!x.trim()){N.error("Query is empty!");return}Q(x)},[Q,x]),I=(0,n.useCallback)(()=>{r&&(u(r),N.success(d?"Query unfavorited":"Query favorited"))},[u,r,d]),_=(0,n.useCallback)(()=>{},[]),z=(0,n.useCallback)(()=>{if(x){if(r)i(r,{query:x});else{const h=t();i(h,{query:x}),a({to:"/runner/$queryId",params:{queryId:h}})}b(!1),N.success("Query saved")}},[x,r,i,t,a]);return(0,e.jsxs)("div",{className:"flex-1 relative w-full flex flex-col",children:[(0,e.jsx)(je,{isExecutingQuery:y,handleButtonClick:V,handleFormatQuery:_,handleSaveQuery:z,handleFavorite:I,isFavorite:d,queryId:r??"",hasUnsavedChanges:v,queryResult:l??null,currentQuery:x}),(0,e.jsx)(n.Suspense,{fallback:(0,e.jsx)("div",{className:"flex-1 bg-background size-full"}),children:(0,e.jsx)(Se,{initialQuery:M(),queryId:r,savedQuery:s?.query??"",language:f==="mongodb"?"json":f==="redis"?"plaintext":"pgsql",onQueryChange:F,onUnsavedChanges:b,onExecuteQuery:Q,onFormatQuery:_,onSaveQuery:z})}),(0,e.jsx)(ve,{results:l?.data??null,isLoading:y,error:E,lastExecutedQuery:U})]})};export{De as t};
|