lone-format 0.13.0 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
- import { defineComponent as M, computed as _, resolveComponent as J, createElementBlock as q, openBlock as N, createElementVNode as I, createCommentVNode as Q, normalizeClass as B, Fragment as $, renderList as H, createBlock as P, useCssVars as G, ref as w, watch as U, toDisplayString as z } from "vue";
2
- import { format as W } from "sql-formatter";
3
- import { _ as D } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
- const Y = {
1
+ import { defineComponent as H, computed as q, resolveComponent as Q, createElementBlock as S, openBlock as N, createElementVNode as _, createCommentVNode as G, normalizeClass as $, Fragment as A, renderList as P, createBlock as W, useCssVars as z, ref as R, watch as V, toDisplayString as Y } from "vue";
2
+ import { format as D } from "sql-formatter";
3
+ import { _ as F } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
+ const X = {
5
5
  name: "github-light",
6
6
  colors: {
7
7
  // 背景色
@@ -51,7 +51,7 @@ const Y = {
51
51
  indentLine: "#d0d7de"
52
52
  // 对齐线 - 灰色
53
53
  }
54
- }, X = {
54
+ }, Z = {
55
55
  name: "github-dark",
56
56
  colors: {
57
57
  // 背景色
@@ -101,7 +101,7 @@ const Y = {
101
101
  indentLine: "#30363d"
102
102
  // 对齐线 - 灰色
103
103
  }
104
- }, Z = {
104
+ }, ee = {
105
105
  name: "min-light",
106
106
  colors: {
107
107
  // 背景色 - 纯白简洁
@@ -151,7 +151,7 @@ const Y = {
151
151
  indentLine: "#e5e7eb"
152
152
  // 对齐线 - 灰色
153
153
  }
154
- }, ee = {
154
+ }, te = {
155
155
  name: "slack-ochin",
156
156
  colors: {
157
157
  // 背景色
@@ -201,12 +201,12 @@ const Y = {
201
201
  indentLine: "#3e4348"
202
202
  // 对齐线 - 灰色
203
203
  }
204
- }, V = {
205
- "github-light": Y,
206
- "github-dark": X,
207
- "min-light": Z,
208
- "slack-ochin": ee
209
- }, te = (o) => V[o] || V["github-light"], F = [
204
+ }, M = {
205
+ "github-light": X,
206
+ "github-dark": Z,
207
+ "min-light": ee,
208
+ "slack-ochin": te
209
+ }, se = (o) => M[o] || M["github-light"], K = [
210
210
  "SELECT",
211
211
  "FROM",
212
212
  "WHERE",
@@ -254,7 +254,7 @@ const Y = {
254
254
  "THEN",
255
255
  "ELSE",
256
256
  "END"
257
- ], se = [
257
+ ], ne = [
258
258
  "WITH",
259
259
  "SELECT",
260
260
  "FROM",
@@ -281,23 +281,23 @@ const Y = {
281
281
  "UNION",
282
282
  "INTERSECT",
283
283
  "EXCEPT"
284
- ], ne = (o) => {
284
+ ], re = (o) => {
285
285
  try {
286
286
  if (!o || !o.trim())
287
287
  return { valid: !1, error: "SQL string is empty" };
288
288
  const s = o.toUpperCase().trim();
289
- if (!F.some((t) => new RegExp(`\\b${t}\\b`).test(s)))
289
+ if (!K.some((t) => new RegExp(`\\b${t}\\b`).test(s)))
290
290
  return { valid: !1, error: "No valid SQL keywords found" };
291
- let u = 0, n = !1, i = "";
291
+ let d = 0, n = !1, u = "";
292
292
  for (let t = 0; t < o.length; t++) {
293
- const c = o[t], m = t > 0 ? o[t - 1] : "";
294
- if ((c === "'" || c === '"') && m !== "\\" && (n ? c === i && (n = !1, i = "") : (n = !0, i = c)), !n && (c === "(" && u++, c === ")" && u--, u < 0))
293
+ const i = o[t], m = t > 0 ? o[t - 1] : "";
294
+ if ((i === "'" || i === '"') && m !== "\\" && (n ? i === u && (n = !1, u = "") : (n = !0, u = i)), !n && (i === "(" && d++, i === ")" && d--, d < 0))
295
295
  return { valid: !1, error: "Mismatched parentheses: unexpected closing parenthesis" };
296
296
  }
297
- if (u !== 0)
298
- return { valid: !1, error: `Mismatched parentheses: ${u} unclosed opening parenthesis` };
297
+ if (d !== 0)
298
+ return { valid: !1, error: `Mismatched parentheses: ${d} unclosed opening parenthesis` };
299
299
  try {
300
- return W(o, { language: "sql" }), { valid: !0 };
300
+ return D(o, { language: "sql" }), { valid: !0 };
301
301
  } catch (t) {
302
302
  return {
303
303
  valid: !1,
@@ -310,61 +310,61 @@ const Y = {
310
310
  error: s instanceof Error ? s.message : "Unknown validation error"
311
311
  };
312
312
  }
313
- }, re = (o, s) => {
313
+ }, le = (o, s) => {
314
314
  const e = o.match(/\bVALUES\s*/i);
315
315
  if (!e || e.index === void 0) return o;
316
- const u = o.slice(0, e.index + e[0].length), n = o.slice(e.index + e[0].length), i = [];
317
- let t = 0, c = "", m = !1, r = "", d = 0;
318
- for (; d < n.length; ) {
319
- const l = n[d], E = d > 0 ? n[d - 1] : "";
320
- if ((l === "'" || l === '"') && E !== "\\" && (m ? l === r && (m = !1) : (m = !0, r = l)), m)
321
- t > 0 && (c += l);
316
+ const d = o.slice(0, e.index + e[0].length), n = o.slice(e.index + e[0].length), u = [];
317
+ let t = 0, i = "", m = !1, r = "", f = 0;
318
+ for (; f < n.length; ) {
319
+ const l = n[f], y = f > 0 ? n[f - 1] : "";
320
+ if ((l === "'" || l === '"') && y !== "\\" && (m ? l === r && (m = !1) : (m = !0, r = l)), m)
321
+ t > 0 && (i += l);
322
322
  else if (l === "(")
323
- t === 0 ? c = l : c += l, t++;
323
+ t === 0 ? i = l : i += l, t++;
324
324
  else if (l === ")")
325
- c += l, t--, t === 0 && c.trim() && (i.push(c.trim()), c = "");
325
+ i += l, t--, t === 0 && i.trim() && (u.push(i.trim()), i = "");
326
326
  else {
327
327
  if (l === ";" && t === 0)
328
328
  break;
329
- t > 0 && (c += l);
329
+ t > 0 && (i += l);
330
330
  }
331
- d++;
331
+ f++;
332
332
  }
333
- if (i.length === 0)
333
+ if (u.length === 0)
334
334
  return o;
335
- const b = " ".repeat(s), y = i.map((l) => {
336
- const E = l.slice(1, -1), k = [];
337
- let T = "", O = 0, L = !1, x = "";
338
- for (let v = 0; v < E.length; v++) {
339
- const g = E[v], S = v > 0 ? E[v - 1] : "";
340
- if ((g === "'" || g === '"') && S !== "\\" && (L ? g === x && (L = !1) : (L = !0, x = g)), !L && (g === "(" && O++, g === ")" && O--, g === "," && O === 0)) {
341
- k.push(T.trim()), T = "";
335
+ const g = " ".repeat(s), v = u.map((l) => {
336
+ const y = l.slice(1, -1), E = [];
337
+ let T = "", I = 0, O = !1, x = "";
338
+ for (let c = 0; c < y.length; c++) {
339
+ const b = y[c], k = c > 0 ? y[c - 1] : "";
340
+ if ((b === "'" || b === '"') && k !== "\\" && (O ? b === x && (O = !1) : (O = !0, x = b)), !O && (b === "(" && I++, b === ")" && I--, b === "," && I === 0)) {
341
+ E.push(T.trim()), T = "";
342
342
  continue;
343
343
  }
344
- T += g;
344
+ T += b;
345
345
  }
346
- T.trim() && k.push(T.trim());
347
- const p = k.map((v, g) => {
348
- const S = g < k.length - 1 ? "," : "";
349
- return `${b}${b}${v}${S}`;
346
+ T.trim() && E.push(T.trim());
347
+ const L = E.map((c, b) => {
348
+ const k = b < E.length - 1 ? "," : "";
349
+ return `${g}${g}${c}${k}`;
350
350
  }).join(`
351
351
  `);
352
- return `${b}(
353
- ${p}
354
- ${b})`;
355
- }), h = y.map((l, E) => {
356
- const k = E < y.length - 1 ? "," : ";";
357
- return l + k;
352
+ return `${g}(
353
+ ${L}
354
+ ${g})`;
355
+ }), h = v.map((l, y) => {
356
+ const E = y < v.length - 1 ? "," : ";";
357
+ return l + E;
358
358
  }).join(`
359
359
  `);
360
- let a = d;
360
+ let a = f;
361
361
  a < n.length && n[a] === ";" && a++;
362
- const f = n.slice(a);
363
- return u.trimEnd() + `
364
- ` + h + f;
365
- }, A = (o, s) => {
362
+ const p = n.slice(a);
363
+ return d.trimEnd() + `
364
+ ` + h + p;
365
+ }, U = (o, s) => {
366
366
  try {
367
- const e = s?.dialect || "sql", u = s?.tabWidth || 2, n = s?.keywordCase || "upper", i = s?.useTabs || !1, t = s?.linesBetweenQueries || 1, m = {
367
+ const e = s?.dialect || "sql", d = s?.tabWidth || 2, n = s?.keywordCase || "upper", u = s?.useTabs || !1, t = s?.linesBetweenQueries || 1, m = {
368
368
  sql: "sql",
369
369
  mysql: "mysql",
370
370
  postgresql: "postgresql",
@@ -372,33 +372,33 @@ ${b})`;
372
372
  plsql: "plsql",
373
373
  tsql: "tsql"
374
374
  }[e] || "sql";
375
- let r = W(o, {
375
+ let r = D(o, {
376
376
  language: m,
377
- tabWidth: u,
377
+ tabWidth: d,
378
378
  keywordCase: n,
379
- useTabs: i,
379
+ useTabs: u,
380
380
  linesBetweenQueries: t,
381
381
  // 其他默认配置
382
382
  indentStyle: "standard"
383
383
  });
384
- return /\bINSERT\s+INTO\b/i.test(r) && /\bVALUES\b/i.test(r) && (r = re(r, u)), r;
384
+ return /\bINSERT\s+INTO\b/i.test(r) && /\bVALUES\b/i.test(r) && (r = le(r, d)), r;
385
385
  } catch (e) {
386
386
  return console.error("SQL formatting error:", e), o;
387
387
  }
388
- }, le = (o) => {
388
+ }, oe = (o) => {
389
389
  try {
390
390
  const s = [];
391
- let e = o.replace(/(["'])(?:(?=(\\?))\2.)*?\1/g, (u) => (s.push(u), `__STR_${s.length - 1}__`));
392
- return e = e.replace(/--[^\n]*/g, "").replace(/\/\*[\s\S]*?\*\//g, ""), e = e.replace(/\s+/g, " ").trim(), s.forEach((u, n) => {
393
- e = e.replace(`__STR_${n}__`, u);
391
+ let e = o.replace(/(["'])(?:(?=(\\?))\2.)*?\1/g, (d) => (s.push(d), `__STR_${s.length - 1}__`));
392
+ return e = e.replace(/--[^\n]*/g, "").replace(/\/\*[\s\S]*?\*\//g, ""), e = e.replace(/\s+/g, " ").trim(), s.forEach((d, n) => {
393
+ e = e.replace(`__STR_${n}__`, d);
394
394
  }), e;
395
395
  } catch (s) {
396
396
  return console.error("SQL compression error:", s), o;
397
397
  }
398
- }, oe = (o, s) => {
399
- const e = [], u = o.match(/^(.*?\bVALUES\b)/is);
400
- if (!u) return [];
401
- const n = u[1].trim();
398
+ }, ae = (o, s) => {
399
+ const e = [], d = o.match(/^(.*?\bVALUES\b)/is);
400
+ if (!d) return [];
401
+ const n = d[1].trim();
402
402
  e.push({
403
403
  type: "VALUES",
404
404
  content: n,
@@ -406,10 +406,10 @@ ${b})`;
406
406
  collapsible: !1,
407
407
  path: `clause-${s}`
408
408
  });
409
- let t = o.slice(u[1].length).trim(), c = 0, m = 0, r = "", d = !1, b = "";
410
- for (let y = 0; y < t.length; y++) {
411
- const h = t[y], a = y > 0 ? t[y - 1] : "";
412
- if ((h === "'" || h === '"') && a !== "\\" && (d ? h === b && (d = !1) : (d = !0, b = h)), d)
409
+ let t = o.slice(d[1].length).trim(), i = 0, m = 0, r = "", f = !1, g = "";
410
+ for (let v = 0; v < t.length; v++) {
411
+ const h = t[v], a = v > 0 ? t[v - 1] : "";
412
+ if ((h === "'" || h === '"') && a !== "\\" && (f ? h === g && (f = !1) : (f = !0, g = h)), f)
413
413
  m > 0 && (r += h);
414
414
  else if (h === "(" && m === 0)
415
415
  m++, r = h;
@@ -417,59 +417,59 @@ ${b})`;
417
417
  m++, r += h;
418
418
  else if (h === ")") {
419
419
  if (r += h, m--, m === 0) {
420
- let f = y + 1, l = "";
421
- for (; f < t.length; ) {
422
- const k = t[f];
423
- if (k === "," || k === ";") {
424
- l = k;
420
+ let p = v + 1, l = "";
421
+ for (; p < t.length; ) {
422
+ const E = t[p];
423
+ if (E === "," || E === ";") {
424
+ l = E;
425
425
  break;
426
- } else if (!/\s/.test(k))
426
+ } else if (!/\s/.test(E))
427
427
  break;
428
- f++;
428
+ p++;
429
429
  }
430
- const E = r.trim();
431
- E && (e.push({
430
+ const y = r.trim();
431
+ y && (e.push({
432
432
  type: "VALUE_TUPLE",
433
- content: E + l,
434
- raw: E + l,
433
+ content: y + l,
434
+ raw: y + l,
435
435
  collapsible: !0,
436
- path: `clause-${s}-value-${c}`
437
- }), c++), r = "", l && (y = f);
436
+ path: `clause-${s}-value-${i}`
437
+ }), i++), r = "", l && (v = p);
438
438
  }
439
439
  } else m > 0 && (r += h);
440
440
  }
441
441
  return e;
442
- }, ae = (o, s) => /\n\s*ON\b/i.test(s) ? s : s.replace(
442
+ }, ce = (o, s) => /\n\s*ON\b/i.test(s) ? s : s.replace(
443
443
  /^(\s*)((?:INNER|LEFT|RIGHT|FULL|CROSS|OUTER)?\s*JOIN\b[^\n]*?)\s+ON\b\s*/gim,
444
444
  `$1$2
445
445
  $1ON `
446
- ), ce = (o) => {
447
- let s = 0, e = !1, u = "";
446
+ ), ie = (o) => {
447
+ let s = 0, e = !1, d = "";
448
448
  for (let n = 0; n < o.length; n++) {
449
- const i = o[n], t = n > 0 ? o[n - 1] : "";
450
- if ((i === "'" || i === '"') && t !== "\\") {
451
- e ? i === u && (e = !1, u = "") : (e = !0, u = i);
449
+ const u = o[n], t = n > 0 ? o[n - 1] : "";
450
+ if ((u === "'" || u === '"') && t !== "\\") {
451
+ e ? u === d && (e = !1, d = "") : (e = !0, d = u);
452
452
  continue;
453
453
  }
454
- e || (i === "(" && s++, i === ")" && s--);
454
+ e || (u === "(" && s++, u === ")" && s--);
455
455
  }
456
456
  return s;
457
- }, ie = (o) => {
457
+ }, ue = (o) => {
458
458
  const s = [];
459
- let e = 0, u = -1, n = !1, i = "";
459
+ let e = 0, d = -1, n = !1, u = "";
460
460
  for (let t = 0; t < o.length; t++) {
461
- const c = o[t], m = t > 0 ? o[t - 1] : "";
462
- if ((c === "'" || c === '"') && m !== "\\") {
463
- n ? c === i && (n = !1, i = "") : (n = !0, i = c);
461
+ const i = o[t], m = t > 0 ? o[t - 1] : "";
462
+ if ((i === "'" || i === '"') && m !== "\\") {
463
+ n ? i === u && (n = !1, u = "") : (n = !0, u = i);
464
464
  continue;
465
465
  }
466
- n || (c === "(" ? (e === 0 && (u = t), e++) : c === ")" && (e--, e === 0 && u >= 0 && (s.push({ open: u, close: t }), u = -1)));
466
+ n || (i === "(" ? (e === 0 && (d = t), e++) : i === ")" && (e--, e === 0 && d >= 0 && (s.push({ open: d, close: t }), d = -1)));
467
467
  }
468
468
  return s;
469
- }, ue = (o) => {
469
+ }, de = (o) => {
470
470
  const s = o.trim();
471
471
  return s ? /^(SELECT|WITH)\b/i.test(s) ? !0 : /\n\s*(SELECT|FROM|WHERE|JOIN|UNION|INTERSECT|EXCEPT)\b/i.test(o) : !1;
472
- }, de = (o) => {
472
+ }, fe = (o) => {
473
473
  const s = o.content.split(`
474
474
  `);
475
475
  let e = -1;
@@ -479,67 +479,67 @@ $1ON `
479
479
  break;
480
480
  }
481
481
  if (e < 0) return;
482
- const u = s.slice(e + 1).join(`
482
+ const d = s.slice(e + 1).join(`
483
483
  `);
484
- if (!u) return;
485
- const i = ie(u).filter(
486
- (r) => ue(u.slice(r.open + 1, r.close))
484
+ if (!d) return;
485
+ const u = ue(d).filter(
486
+ (r) => de(d.slice(r.open + 1, r.close))
487
487
  );
488
- if (i.length === 0) return;
488
+ if (u.length === 0) return;
489
489
  const t = [];
490
- let c = 0;
490
+ let i = 0;
491
491
  const m = o.path || "clause";
492
- i.forEach((r, d) => {
493
- r.open + 1 > c && t.push({ kind: "text", text: u.slice(c, r.open + 1) });
494
- const b = u.lastIndexOf(`
495
- `, r.close - 1) + 1, y = b > r.open, h = y ? b - 1 : r.close, a = u.slice(r.open + 1, h), f = K(a, `${m}-sub${d}-`);
496
- for (const l of f)
492
+ u.forEach((r, f) => {
493
+ r.open + 1 > i && t.push({ kind: "text", text: d.slice(i, r.open + 1) });
494
+ const g = d.lastIndexOf(`
495
+ `, r.close - 1) + 1, v = g > r.open, h = v ? g - 1 : r.close, a = d.slice(r.open + 1, h), p = j(a, `${m}-sub${f}-`);
496
+ for (const l of p)
497
497
  t.push({ kind: "clause", clause: l });
498
- c = y ? b : r.close;
499
- }), c < u.length && t.push({ kind: "text", text: u.slice(c) }), o.body = t;
500
- }, K = (o, s) => {
501
- const e = [], u = o.split(`
498
+ i = v ? g : r.close;
499
+ }), i < d.length && t.push({ kind: "text", text: d.slice(i) }), o.body = t;
500
+ }, j = (o, s) => {
501
+ const e = [], d = o.split(`
502
502
  `);
503
- let n = null, i = [], t = [], c = 0;
504
- const m = [...se].sort((d, b) => b.length - d.length), r = () => {
505
- if (!n || i.length === 0) return;
506
- let d = i.join(`
503
+ let n = null, u = [], t = [], i = 0;
504
+ const m = [...ne].sort((f, g) => g.length - f.length), r = () => {
505
+ if (!n || u.length === 0) return;
506
+ let f = u.join(`
507
507
  `);
508
- if (d = ae(n.type, d), n.content = d, n.raw = d, n.type === "INSERT INTO" && /\bVALUES\b/i.test(d)) {
509
- const b = d.match(/^(.*?\bINSERT\s+INTO\s+[^(]+\s*\([^)]+\))/is);
510
- if (b) {
511
- const y = {
508
+ if (f = ce(n.type, f), n.content = f, n.raw = f, n.type === "INSERT INTO" && /\bVALUES\b/i.test(f)) {
509
+ const g = f.match(/^(.*?\bINSERT\s+INTO\s+[^(]+\s*\([^)]+\))/is);
510
+ if (g) {
511
+ const v = {
512
512
  type: "INSERT INTO",
513
- content: b[1].trim(),
514
- raw: b[1].trim(),
513
+ content: g[1].trim(),
514
+ raw: g[1].trim(),
515
515
  collapsible: !0,
516
516
  path: `${s}clause-${e.length}`
517
517
  };
518
- e.push(y);
519
- const h = d.slice(b[1].length).trim(), a = e.length, f = oe(h, a);
520
- for (let l = 0; l < f.length; l++)
521
- f[l].path = `${s}clause-${a + l}`;
522
- e.push(...f);
518
+ e.push(v);
519
+ const h = f.slice(g[1].length).trim(), a = e.length, p = ae(h, a);
520
+ for (let l = 0; l < p.length; l++)
521
+ p[l].path = `${s}clause-${a + l}`;
522
+ e.push(...p);
523
523
  return;
524
524
  }
525
525
  }
526
- de(n), e.push(n);
526
+ fe(n), e.push(n);
527
527
  };
528
- for (const d of u) {
529
- const b = d.trim();
530
- if (!b) {
531
- n && i.push(d);
528
+ for (const f of d) {
529
+ const g = f.trim();
530
+ if (!g) {
531
+ n && u.push(f);
532
532
  continue;
533
533
  }
534
- if (b.startsWith("--") || b.startsWith("/*")) {
535
- n ? i.push(d) : t.push(d);
534
+ if (g.startsWith("--") || g.startsWith("/*")) {
535
+ n ? u.push(f) : t.push(f);
536
536
  continue;
537
537
  }
538
538
  let h = !1, a = "UNKNOWN";
539
- if (c === 0) {
540
- for (const f of m)
541
- if (new RegExp(`^${f}\\b`, "i").test(b)) {
542
- h = !0, a = f.toUpperCase();
539
+ if (i === 0) {
540
+ for (const p of m)
541
+ if (new RegExp(`^${p}\\b`, "i").test(g)) {
542
+ h = !0, a = p.toUpperCase();
543
543
  break;
544
544
  }
545
545
  }
@@ -551,19 +551,19 @@ $1ON `
551
551
  `),
552
552
  collapsible: !1,
553
553
  path: `${s}clause-${e.length}`
554
- }), t = []), i = [d], n = {
554
+ }), t = []), u = [f], n = {
555
555
  type: a,
556
556
  content: "",
557
557
  raw: "",
558
558
  collapsible: !0,
559
559
  path: `${s}clause-${e.length}`
560
- }) : n ? i.push(d) : (i = [...t, d], t = [], n = {
560
+ }) : n ? u.push(f) : (u = [...t, f], t = [], n = {
561
561
  type: "UNKNOWN",
562
562
  content: "",
563
563
  raw: "",
564
564
  collapsible: !1,
565
565
  path: `${s}clause-${e.length}`
566
- }), c = Math.max(0, c + ce(d));
566
+ }), i = Math.max(0, i + ie(f));
567
567
  }
568
568
  return r(), t.length > 0 && e.push({
569
569
  type: "UNKNOWN",
@@ -574,10 +574,10 @@ $1ON `
574
574
  collapsible: !1,
575
575
  path: `${s}clause-${e.length}`
576
576
  }), e;
577
- }, fe = (o) => {
577
+ }, pe = (o) => {
578
578
  try {
579
- const s = A(o, { keywordCase: "upper" });
580
- return { clauses: K(s, ""), raw: o };
579
+ const s = U(o, { keywordCase: "upper" });
580
+ return { clauses: j(s, ""), raw: o };
581
581
  } catch {
582
582
  return {
583
583
  clauses: [
@@ -592,10 +592,10 @@ $1ON `
592
592
  raw: o
593
593
  };
594
594
  }
595
- }, j = (o) => {
595
+ }, J = (o) => {
596
596
  const s = [];
597
597
  let e = o;
598
- const u = [
598
+ const d = [
599
599
  "COUNT",
600
600
  "SUM",
601
601
  "AVG",
@@ -619,12 +619,12 @@ $1ON `
619
619
  "ABS",
620
620
  "FLOOR",
621
621
  "CEIL"
622
- ], n = ["=", "!=", "<>", "<", ">", "<=", ">=", "+", "-", "*", "/", "%", "||"], i = ["(", ")", ",", ";", "."];
622
+ ], n = ["=", "!=", "<>", "<", ">", "<=", ">=", "+", "-", "*", "/", "%", "||"], u = ["(", ")", ",", ";", "."];
623
623
  for (; e.length > 0; ) {
624
624
  let t = !1;
625
- const c = e.match(/^(\s+)/);
626
- if (c) {
627
- s.push({ type: "whitespace", value: c[1] }), e = e.slice(c[1].length);
625
+ const i = e.match(/^(\s+)/);
626
+ if (i) {
627
+ s.push({ type: "whitespace", value: i[1] }), e = e.slice(i[1].length);
628
628
  continue;
629
629
  }
630
630
  const m = e.match(/^(--[^\n]*)/);
@@ -637,14 +637,14 @@ $1ON `
637
637
  s.push({ type: "comment", value: r[1] }), e = e.slice(r[1].length);
638
638
  continue;
639
639
  }
640
- const d = e.match(/^(["'])(?:(?=(\\?))\2.)*?\1/);
641
- if (d) {
642
- s.push({ type: "string", value: d[0] }), e = e.slice(d[0].length);
640
+ const f = e.match(/^(["'])(?:(?=(\\?))\2.)*?\1/);
641
+ if (f) {
642
+ s.push({ type: "string", value: f[0] }), e = e.slice(f[0].length);
643
643
  continue;
644
644
  }
645
- const b = e.match(/^(\d+\.?\d*|\.\d+)/);
646
- if (b) {
647
- s.push({ type: "number", value: b[1] }), e = e.slice(b[1].length);
645
+ const g = e.match(/^(\d+\.?\d*|\.\d+)/);
646
+ if (g) {
647
+ s.push({ type: "number", value: g[1] }), e = e.slice(g[1].length);
648
648
  continue;
649
649
  }
650
650
  for (const h of n)
@@ -653,25 +653,25 @@ $1ON `
653
653
  break;
654
654
  }
655
655
  if (t) continue;
656
- for (const h of i)
656
+ for (const h of u)
657
657
  if (e.startsWith(h)) {
658
658
  s.push({ type: "punctuation", value: h }), e = e.slice(h.length), t = !0;
659
659
  break;
660
660
  }
661
661
  if (t) continue;
662
- const y = e.match(/^([a-zA-Z_][a-zA-Z0-9_]*)/);
663
- if (y) {
664
- const h = y[1], a = h.toUpperCase();
665
- F.includes(a) ? s.push({ type: "keyword", value: h }) : u.includes(a) ? s.push({ type: "function", value: h }) : s.push({ type: "identifier", value: h }), e = e.slice(h.length);
662
+ const v = e.match(/^([a-zA-Z_][a-zA-Z0-9_]*)/);
663
+ if (v) {
664
+ const h = v[1], a = h.toUpperCase();
665
+ K.includes(a) ? s.push({ type: "keyword", value: h }) : d.includes(a) ? s.push({ type: "function", value: h }) : s.push({ type: "identifier", value: h }), e = e.slice(h.length);
666
666
  continue;
667
667
  }
668
668
  s.push({ type: "punctuation", value: e[0] }), e = e.slice(1);
669
669
  }
670
670
  return s;
671
- }, pe = { class: "sql-clause-node" }, he = ["title"], me = { class: "sql-clause-node__code" }, ge = ["innerHTML"], be = {
671
+ }, he = { class: "sql-clause-node" }, me = ["title"], ge = { class: "sql-clause-node__code" }, be = ["innerHTML"], ve = {
672
672
  key: 0,
673
673
  class: "sql-clause-node__body"
674
- }, ve = ["title"], ye = ["innerHTML"], Ee = ["title"], ke = ["innerHTML"], Te = /* @__PURE__ */ M({
674
+ }, ye = ["title"], Ee = ["innerHTML"], ke = ["title"], Te = ["innerHTML"], Ce = /* @__PURE__ */ H({
675
675
  __name: "SqlClauseNode",
676
676
  props: {
677
677
  clause: {},
@@ -680,165 +680,165 @@ $1ON `
680
680
  },
681
681
  emits: ["toggle"],
682
682
  setup(o, { emit: s }) {
683
- const e = o, u = s, n = _(() => e.clause.path || ""), i = _(() => e.expandedClauses.has(n.value)), t = _(() => {
683
+ const e = o, d = s, n = q(() => e.clause.path || ""), u = q(() => e.expandedClauses.has(n.value)), t = q(() => {
684
684
  const a = e.clause.content.split(`
685
685
  `);
686
- for (const f of a)
687
- if (f.trim()) return f;
686
+ for (const p of a)
687
+ if (p.trim()) return p;
688
688
  return "";
689
- }), c = _(() => {
689
+ }), i = q(() => {
690
690
  const a = e.clause.content.split(`
691
691
  `);
692
692
  if (a.length <= 1) return "";
693
- let f = 0;
693
+ let p = 0;
694
694
  for (let l = 0; l < a.length; l++)
695
695
  if (a[l].trim()) {
696
- f = l;
696
+ p = l;
697
697
  break;
698
698
  }
699
- return a.slice(f + 1).join(`
699
+ return a.slice(p + 1).join(`
700
700
  `);
701
- }), m = _(() => e.clause.body && e.clause.body.length > 0 ? !0 : !!c.value), r = (a) => {
702
- const f = j(a), l = e.theme.colors;
703
- return f.map((E) => {
704
- let k = l.text;
705
- switch (E.type) {
701
+ }), m = q(() => e.clause.body && e.clause.body.length > 0 ? !0 : !!i.value), r = (a) => {
702
+ const p = J(a), l = e.theme.colors;
703
+ return p.map((y) => {
704
+ let E = l.text;
705
+ switch (y.type) {
706
706
  case "keyword":
707
- k = l.sqlKeyword;
707
+ E = l.sqlKeyword;
708
708
  break;
709
709
  case "function":
710
- k = l.sqlFunction;
710
+ E = l.sqlFunction;
711
711
  break;
712
712
  case "string":
713
- k = l.sqlString;
713
+ E = l.sqlString;
714
714
  break;
715
715
  case "number":
716
- k = l.sqlNumber;
716
+ E = l.sqlNumber;
717
717
  break;
718
718
  case "comment":
719
- k = l.sqlComment;
719
+ E = l.sqlComment;
720
720
  break;
721
721
  case "operator":
722
- k = l.sqlOperator;
722
+ E = l.sqlOperator;
723
723
  break;
724
724
  case "identifier":
725
- k = l.sqlIdentifier;
725
+ E = l.sqlIdentifier;
726
726
  break;
727
727
  case "punctuation":
728
- k = l.sqlPunctuation;
728
+ E = l.sqlPunctuation;
729
729
  break;
730
730
  case "whitespace":
731
- return E.value.replace(/ /g, "&nbsp;").replace(/\n/g, `
731
+ return y.value.replace(/ /g, "&nbsp;").replace(/\n/g, `
732
732
  `);
733
733
  }
734
- const T = E.value.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#039;");
735
- return `<span style="color: ${k}">${T}</span>`;
734
+ const T = y.value.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#039;");
735
+ return `<span style="color: ${E}">${T}</span>`;
736
736
  }).join("");
737
- }, d = _(() => {
737
+ }, f = q(() => {
738
738
  const a = e.clause.body;
739
739
  if (!a || a.length === 0) return null;
740
- let f = "", l = !1;
741
- for (const v of a)
742
- if (v.kind === "text") {
743
- const g = v.text.indexOf("(");
744
- if (g >= 0) {
745
- f += v.text.slice(0, g), l = !0;
740
+ let p = "", l = !1;
741
+ for (const c of a)
742
+ if (c.kind === "text") {
743
+ const b = c.text.indexOf("(");
744
+ if (b >= 0) {
745
+ p += c.text.slice(0, b), l = !0;
746
746
  break;
747
747
  }
748
- f += v.text;
748
+ p += c.text;
749
749
  } else
750
750
  return null;
751
751
  if (!l) return null;
752
- let E = "";
753
- for (let v = a.length - 1; v >= 0; v--) {
754
- const g = a[v];
755
- if (g.kind === "text") {
756
- const S = g.text.lastIndexOf(")");
757
- if (S >= 0) {
758
- E = g.text.slice(S + 1) + E;
752
+ let y = "";
753
+ for (let c = a.length - 1; c >= 0; c--) {
754
+ const b = a[c];
755
+ if (b.kind === "text") {
756
+ const k = b.text.lastIndexOf(")");
757
+ if (k >= 0) {
758
+ y = b.text.slice(k + 1) + y;
759
759
  break;
760
760
  }
761
- E = g.text + E;
761
+ y = b.text + y;
762
762
  } else
763
763
  break;
764
764
  }
765
- const k = f.replace(/\s+/g, " ").trim(), T = E.replace(/\s+/g, " ").trim(), O = t.value, L = (O.match(/^\s*/) || [""])[0], p = [O.trimStart()];
766
- return k && p.push(k), p.push("(...)"), T && p.push(T), `${L}${p.join(" ")}`;
767
- }), b = _(() => {
768
- if (e.clause.collapsible && !i.value && m.value) {
769
- const a = d.value;
765
+ const E = p.replace(/\s+/g, " ").trim(), T = y.replace(/\s+/g, " ").trim(), I = t.value, O = (I.match(/^\s*/) || [""])[0], L = [I.trimStart()];
766
+ return E && L.push(E), L.push("(...)"), T && L.push(T), `${O}${L.join(" ")}`;
767
+ }), g = q(() => {
768
+ if (e.clause.collapsible && !u.value && m.value) {
769
+ const a = f.value;
770
770
  if (a)
771
771
  return r(a);
772
- const f = r(t.value), l = e.theme.colors.textSecondary;
773
- return `${f}<span style="color: ${l}; opacity: 0.6; font-style: italic; margin-left: 4px;"> ...</span>`;
772
+ const p = r(t.value), l = e.theme.colors.textSecondary;
773
+ return `${p}<span style="color: ${l}; opacity: 0.6; font-style: italic; margin-left: 4px;"> ...</span>`;
774
774
  }
775
775
  return r(t.value);
776
- }), y = () => {
777
- e.clause.collapsible && u("toggle", n.value);
776
+ }), v = () => {
777
+ e.clause.collapsible && d("toggle", n.value);
778
778
  }, h = (a) => {
779
779
  if (!e.clause.collapsible) return;
780
- const f = a.target;
781
- if (!f) return;
782
- const l = (f.textContent || "").trim();
783
- (l === "(" || l === ")") && u("toggle", n.value);
780
+ const p = a.target;
781
+ if (!p) return;
782
+ const l = (p.textContent || "").trim();
783
+ (l === "(" || l === ")") && d("toggle", n.value);
784
784
  };
785
- return (a, f) => {
786
- const l = J("SqlClauseNode", !0);
787
- return N(), q("div", pe, [
788
- I("div", {
789
- class: B(["sql-clause-node__header", { "sql-clause-node__header--collapsible": a.clause.collapsible }]),
790
- title: a.clause.collapsible ? i.value ? "Click to collapse" : "Click to expand" : "",
791
- onClick: y
785
+ return (a, p) => {
786
+ const l = Q("SqlClauseNode", !0);
787
+ return N(), S("div", he, [
788
+ _("div", {
789
+ class: $(["sql-clause-node__header", { "sql-clause-node__header--collapsible": a.clause.collapsible }]),
790
+ title: a.clause.collapsible ? u.value ? "Click to collapse" : "Click to expand" : "",
791
+ onClick: v
792
792
  }, [
793
- I("pre", me, [
794
- I("code", { innerHTML: b.value }, null, 8, ge)
793
+ _("pre", ge, [
794
+ _("code", { innerHTML: g.value }, null, 8, be)
795
795
  ])
796
- ], 10, he),
797
- i.value && m.value ? (N(), q("div", be, [
798
- a.clause.body && a.clause.body.length > 0 ? (N(!0), q($, { key: 0 }, H(a.clause.body, (E, k) => (N(), q($, { key: k }, [
799
- E.kind === "text" ? (N(), q("pre", {
796
+ ], 10, me),
797
+ u.value && m.value ? (N(), S("div", ve, [
798
+ a.clause.body && a.clause.body.length > 0 ? (N(!0), S(A, { key: 0 }, P(a.clause.body, (y, E) => (N(), S(A, { key: E }, [
799
+ y.kind === "text" ? (N(), S("pre", {
800
800
  key: 0,
801
- class: B(["sql-clause-node__code sql-clause-node__text-segment", { "sql-clause-node__text-segment--clickable": a.clause.collapsible }]),
801
+ class: $(["sql-clause-node__code sql-clause-node__text-segment", { "sql-clause-node__text-segment--clickable": a.clause.collapsible }]),
802
802
  title: a.clause.collapsible ? "Click ( or ) to collapse" : "",
803
- onClick: f[0] || (f[0] = (T) => h(T))
803
+ onClick: p[0] || (p[0] = (T) => h(T))
804
804
  }, [
805
- I("code", {
806
- innerHTML: r(E.text)
807
- }, null, 8, ye)
808
- ], 10, ve)) : (N(), P(l, {
805
+ _("code", {
806
+ innerHTML: r(y.text)
807
+ }, null, 8, Ee)
808
+ ], 10, ye)) : (N(), W(l, {
809
809
  key: 1,
810
- clause: E.clause,
810
+ clause: y.clause,
811
811
  "expanded-clauses": a.expandedClauses,
812
812
  theme: a.theme,
813
- onToggle: f[1] || (f[1] = (T) => a.$emit("toggle", T))
813
+ onToggle: p[1] || (p[1] = (T) => a.$emit("toggle", T))
814
814
  }, null, 8, ["clause", "expanded-clauses", "theme"]))
815
- ], 64))), 128)) : (N(), q("pre", {
815
+ ], 64))), 128)) : (N(), S("pre", {
816
816
  key: 1,
817
- class: B(["sql-clause-node__code sql-clause-node__rest", { "sql-clause-node__rest--clickable": a.clause.collapsible }]),
817
+ class: $(["sql-clause-node__code sql-clause-node__rest", { "sql-clause-node__rest--clickable": a.clause.collapsible }]),
818
818
  title: a.clause.collapsible ? "Click ( or ) to collapse" : "",
819
- onClick: f[2] || (f[2] = (E) => h(E))
819
+ onClick: p[2] || (p[2] = (y) => h(y))
820
820
  }, [
821
- I("code", {
822
- innerHTML: r(c.value)
823
- }, null, 8, ke)
824
- ], 10, Ee))
825
- ])) : Q("", !0)
821
+ _("code", {
822
+ innerHTML: r(i.value)
823
+ }, null, 8, Te)
824
+ ], 10, ke))
825
+ ])) : G("", !0)
826
826
  ]);
827
827
  };
828
828
  }
829
- }), Ce = /* @__PURE__ */ D(Te, [["__scopeId", "data-v-8b9383dc"]]), Ne = { class: "sql-format__content" }, Se = {
829
+ }), Ne = /* @__PURE__ */ F(Ce, [["__scopeId", "data-v-8b9383dc"]]), Se = { class: "sql-format__content" }, qe = {
830
830
  key: 0,
831
831
  class: "sql-format__error"
832
- }, qe = {
832
+ }, _e = {
833
833
  key: 1,
834
834
  class: "sql-format__viewer"
835
- }, _e = {
835
+ }, Ie = {
836
836
  key: 0,
837
837
  class: "sql-format__clauses"
838
- }, Ie = {
838
+ }, Oe = {
839
839
  key: 1,
840
840
  class: "sql-format__code"
841
- }, Oe = ["innerHTML"], Le = /* @__PURE__ */ M({
841
+ }, Le = ["innerHTML"], xe = /* @__PURE__ */ H({
842
842
  __name: "index",
843
843
  props: {
844
844
  modelValue: { default: "" },
@@ -849,157 +849,158 @@ $1ON `
849
849
  },
850
850
  emits: ["update:modelValue", "copy-success", "copy-error", "expand-all", "collapse-all", "compress", "format"],
851
851
  setup(o, { expose: s, emit: e }) {
852
- G((p) => ({
853
- "175be318": y.value.colors.background,
854
- "6c8d0a97": y.value.colors.text,
855
- e09ea4a8: y.value.colors.errorBackground,
856
- "2446b9de": y.value.colors.error
852
+ z((c) => ({
853
+ "45d5acb0": v.value.colors.background,
854
+ "4623e62f": v.value.colors.text,
855
+ f365b9d8: v.value.colors.errorBackground,
856
+ "7d8b5146": v.value.colors.error
857
857
  }));
858
- const u = (p) => {
859
- const v = [], g = (S) => {
860
- for (const C of S)
861
- if (C.path && v.push(C.path), C.body)
862
- for (const R of C.body)
863
- R.kind === "clause" && g([R.clause]);
858
+ const d = (c) => {
859
+ const b = [], k = (w) => {
860
+ for (const C of w)
861
+ if (C.path && b.push(C.path), C.body)
862
+ for (const B of C.body)
863
+ B.kind === "clause" && k([B.clause]);
864
864
  };
865
- return g(p), v;
866
- }, n = o, i = e, t = w(""), c = w(n.dialect), m = w([]), r = w(/* @__PURE__ */ new Set()), d = w(""), b = _(() => t.value === ""), y = _(() => te(n.theme)), h = (p) => {
867
- if (!p || !p.trim()) {
865
+ return k(c), b;
866
+ }, n = o, u = e, t = R(""), i = R(n.dialect), m = R([]), r = R(/* @__PURE__ */ new Set()), f = R(""), g = q(() => t.value === ""), v = q(() => se(n.theme)), h = (c) => {
867
+ if (!c || !c.trim()) {
868
868
  t.value = "", m.value = [], r.value.clear();
869
869
  return;
870
870
  }
871
871
  try {
872
- const v = ne(p);
873
- if (!v.valid) {
874
- t.value = v.error || "Invalid SQL", m.value = [], d.value = "";
872
+ const b = re(c);
873
+ if (!b.valid) {
874
+ t.value = b.error || "Invalid SQL", m.value = [], f.value = "";
875
875
  return;
876
876
  }
877
- const g = fe(p);
878
- m.value = g.clauses, d.value = A(p, {
879
- dialect: c.value,
877
+ const k = pe(c);
878
+ m.value = k.clauses, f.value = U(c, {
879
+ dialect: i.value,
880
880
  tabWidth: n.tabWidth
881
- }), r.value = new Set(u(g.clauses)), t.value = "";
882
- } catch (v) {
883
- t.value = v instanceof Error ? v.message : "Unknown parse error", m.value = [], d.value = "";
881
+ }), r.value = new Set(d(k.clauses)), t.value = "";
882
+ } catch (b) {
883
+ t.value = b instanceof Error ? b.message : "Unknown parse error", m.value = [], f.value = "";
884
884
  }
885
- }, a = (p) => {
886
- const v = j(p), g = y.value.colors;
887
- return v.map((S) => {
888
- let C = g.text;
889
- switch (S.type) {
885
+ }, a = (c) => {
886
+ const b = J(c), k = v.value.colors;
887
+ return b.map((w) => {
888
+ let C = k.text;
889
+ switch (w.type) {
890
890
  case "keyword":
891
- C = g.sqlKeyword;
891
+ C = k.sqlKeyword;
892
892
  break;
893
893
  case "function":
894
- C = g.sqlFunction;
894
+ C = k.sqlFunction;
895
895
  break;
896
896
  case "string":
897
- C = g.sqlString;
897
+ C = k.sqlString;
898
898
  break;
899
899
  case "number":
900
- C = g.sqlNumber;
900
+ C = k.sqlNumber;
901
901
  break;
902
902
  case "comment":
903
- C = g.sqlComment;
903
+ C = k.sqlComment;
904
904
  break;
905
905
  case "operator":
906
- C = g.sqlOperator;
906
+ C = k.sqlOperator;
907
907
  break;
908
908
  case "identifier":
909
- C = g.sqlIdentifier;
909
+ C = k.sqlIdentifier;
910
910
  break;
911
911
  case "punctuation":
912
- C = g.sqlPunctuation;
912
+ C = k.sqlPunctuation;
913
913
  break;
914
914
  case "whitespace":
915
- return S.value.replace(/ /g, "&nbsp;").replace(/\n/g, `
915
+ return w.value.replace(/ /g, "&nbsp;").replace(/\n/g, `
916
916
  `);
917
917
  }
918
- const R = S.value.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#039;");
919
- return `<span style="color: ${C}">${R}</span>`;
918
+ const B = w.value.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#039;");
919
+ return `<span style="color: ${C}">${B}</span>`;
920
920
  }).join("");
921
- }, f = (p) => {
922
- r.value.has(p) ? r.value.delete(p) : r.value.add(p), r.value = new Set(r.value);
921
+ }, p = (c) => {
922
+ r.value.has(c) ? r.value.delete(c) : r.value.add(c), r.value = new Set(r.value);
923
923
  }, l = () => {
924
- r.value = new Set(u(m.value)), i("expand-all");
925
- }, E = () => {
926
- r.value = /* @__PURE__ */ new Set(), i("collapse-all");
927
- }, k = async () => {
928
- if (b.value)
924
+ r.value = new Set(d(m.value)), u("expand-all");
925
+ }, y = () => {
926
+ r.value = /* @__PURE__ */ new Set(), u("collapse-all");
927
+ }, E = () => f.value || n.modelValue, T = async () => {
928
+ if (g.value)
929
929
  try {
930
- const p = d.value || n.modelValue;
931
- await navigator.clipboard.writeText(p), i("copy-success", p);
932
- } catch (p) {
933
- const v = p instanceof Error ? p : new Error("Failed to copy");
934
- i("copy-error", v);
930
+ const c = E();
931
+ await navigator.clipboard.writeText(c), u("copy-success", c);
932
+ } catch (c) {
933
+ const b = c instanceof Error ? c : new Error("Failed to copy");
934
+ u("copy-error", b);
935
935
  }
936
- }, T = () => {
937
- if (b.value)
936
+ }, I = () => {
937
+ if (g.value)
938
938
  try {
939
- const p = A(n.modelValue, {
940
- dialect: c.value,
939
+ const c = U(n.modelValue, {
940
+ dialect: i.value,
941
941
  tabWidth: n.tabWidth
942
942
  });
943
- i("update:modelValue", p), i("format", p);
944
- } catch (p) {
945
- console.error("Format error:", p);
943
+ u("update:modelValue", c), u("format", c);
944
+ } catch (c) {
945
+ console.error("Format error:", c);
946
946
  }
947
947
  }, O = () => {
948
- if (b.value)
948
+ if (g.value)
949
949
  try {
950
- const p = le(n.modelValue);
951
- i("update:modelValue", p), i("compress", p);
952
- } catch (p) {
953
- console.error("Compress error:", p);
950
+ const c = oe(n.modelValue);
951
+ u("update:modelValue", c), u("compress", c);
952
+ } catch (c) {
953
+ console.error("Compress error:", c);
954
954
  }
955
- }, L = () => null, x = () => t.value;
956
- return U(
955
+ }, x = () => null, L = () => t.value;
956
+ return V(
957
957
  () => n.modelValue,
958
- (p) => {
959
- h(p);
958
+ (c) => {
959
+ h(c);
960
960
  },
961
961
  { immediate: !0 }
962
- ), U(
962
+ ), V(
963
963
  () => n.dialect,
964
- (p) => {
965
- c.value = p;
964
+ (c) => {
965
+ i.value = c;
966
966
  }
967
967
  ), s({
968
- copySql: k,
969
- formatSource: T,
968
+ copySql: T,
969
+ formatSource: I,
970
970
  compressSource: O,
971
971
  expandAll: l,
972
- collapseAll: E,
973
- toggleExpand: f,
974
- isValidSql: () => b.value,
975
- getParsedSql: L,
976
- getParseError: x
977
- }), (p, v) => (N(), q("div", {
978
- class: B(["sql-format", `sql-format--${y.value.name}`])
972
+ collapseAll: y,
973
+ toggleExpand: p,
974
+ isValidSql: () => g.value,
975
+ getParsedSql: x,
976
+ getParseError: L,
977
+ getValue: E
978
+ }), (c, b) => (N(), S("div", {
979
+ class: $(["sql-format", `sql-format--${v.value.name}`])
979
980
  }, [
980
- I("div", Ne, [
981
- b.value ? (N(), q("div", qe, [
982
- m.value.length > 0 ? (N(), q("div", _e, [
983
- (N(!0), q($, null, H(m.value, (g) => (N(), P(Ce, {
984
- key: g.path,
985
- clause: g,
981
+ _("div", Se, [
982
+ g.value ? (N(), S("div", _e, [
983
+ m.value.length > 0 ? (N(), S("div", Ie, [
984
+ (N(!0), S(A, null, P(m.value, (k) => (N(), W(Ne, {
985
+ key: k.path,
986
+ clause: k,
986
987
  "expanded-clauses": r.value,
987
- theme: y.value,
988
- onToggle: f
988
+ theme: v.value,
989
+ onToggle: p
989
990
  }, null, 8, ["clause", "expanded-clauses", "theme"]))), 128))
990
- ])) : (N(), q("pre", Ie, [
991
- I("code", {
991
+ ])) : (N(), S("pre", Oe, [
992
+ _("code", {
992
993
  innerHTML: a(n.modelValue)
993
- }, null, 8, Oe)
994
+ }, null, 8, Le)
994
995
  ]))
995
- ])) : (N(), q("div", Se, [
996
- v[0] || (v[0] = I("h4", null, "SQL Parse Error:", -1)),
997
- I("pre", null, z(t.value), 1)
996
+ ])) : (N(), S("div", qe, [
997
+ b[0] || (b[0] = _("h4", null, "SQL Parse Error:", -1)),
998
+ _("pre", null, Y(t.value), 1)
998
999
  ]))
999
1000
  ])
1000
1001
  ], 2));
1001
1002
  }
1002
- }), Be = /* @__PURE__ */ D(Le, [["__scopeId", "data-v-36f32aa6"]]);
1003
+ }), $e = /* @__PURE__ */ F(xe, [["__scopeId", "data-v-8445135b"]]);
1003
1004
  export {
1004
- Be as S
1005
+ $e as S
1005
1006
  };