@hep-code-runner/vue3 1.5.1 → 2.0.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.
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { defineComponent as ie, useCssVars as be, ref as N, computed as G, onMounted as pe, watch as le, openBlock as _, createElementBlock as R, normalizeClass as W, createElementVNode as E, withDirectives as Ee, createCommentVNode as U, Fragment as ve, renderList as ye, toDisplayString as H, vModelSelect as Ae, createTextVNode as Se, normalizeStyle as se, createVNode as oe, createBlock as ke, Teleport as we, Transition as Te, withCtx as Ie, normalizeProps as Fe, guardReactiveProps as _e, renderSlot as Re } from "vue";
2
- var xe = Object.defineProperty, Oe = (i, d, n) => d in i ? xe(i, d, { enumerable: !0, configurable: !0, writable: !0, value: n }) : i[d] = n, ce = (i, d, n) => Oe(i, typeof d != "symbol" ? d + "" : d, n);
1
+ import { defineComponent as ie, useCssVars as be, ref as O, computed as B, onMounted as pe, watch as le, openBlock as T, createElementBlock as x, normalizeClass as G, createElementVNode as E, withDirectives as Ee, createCommentVNode as M, Fragment as ve, renderList as ye, toDisplayString as H, vModelSelect as Ae, createTextVNode as ke, createStaticVNode as Se, normalizeStyle as oe, createVNode as se, createBlock as we, Teleport as Te, Transition as _e, withCtx as xe, normalizeProps as Ie, guardReactiveProps as Fe, renderSlot as Re } from "vue";
2
+ var Oe = Object.defineProperty, Ne = (i, d, n) => d in i ? Oe(i, d, { enumerable: !0, configurable: !0, writable: !0, value: n }) : i[d] = n, ce = (i, d, n) => Ne(i, typeof d != "symbol" ? d + "" : d, n);
3
3
  let ne = null;
4
4
  class Le {
5
5
  constructor(d = {}) {
@@ -27,17 +27,17 @@ class Le {
27
27
  const h = (await this.getRuntimes()).find(
28
28
  (f) => {
29
29
  var m;
30
- return f.language.toLowerCase() === d.toLowerCase() || ((m = f.aliases) == null ? void 0 : m.some((T) => T.toLowerCase() === d.toLowerCase()));
30
+ return f.language.toLowerCase() === d.toLowerCase() || ((m = f.aliases) == null ? void 0 : m.some((I) => I.toLowerCase() === d.toLowerCase()));
31
31
  }
32
32
  );
33
33
  if (!h)
34
34
  throw new Error(`Language '${d}' is not supported`);
35
- const y = this.getFileName(d), A = {
35
+ const A = this.getFileName(d), k = {
36
36
  language: h.language,
37
37
  version: l.version || h.version,
38
38
  files: [
39
39
  {
40
- name: y,
40
+ name: A,
41
41
  content: n
42
42
  }
43
43
  ],
@@ -45,24 +45,24 @@ class Le {
45
45
  args: l.args || [],
46
46
  run_timeout: l.runTimeout || this.timeout,
47
47
  compile_timeout: this.timeout
48
- }, s = Date.now();
48
+ }, o = Date.now();
49
49
  try {
50
50
  const f = await fetch(`${this.baseUrl}/execute`, {
51
51
  method: "POST",
52
52
  headers: {
53
53
  "Content-Type": "application/json"
54
54
  },
55
- body: JSON.stringify(A)
55
+ body: JSON.stringify(k)
56
56
  });
57
57
  if (!f.ok)
58
58
  throw new Error(`Execute failed: ${f.statusText}`);
59
- const m = await f.json(), T = Date.now() - s, L = m.run.stdout || "", I = m.run.stderr || "";
59
+ const m = await f.json(), I = Date.now() - o, N = m.run.stdout || "", R = m.run.stderr || "";
60
60
  return {
61
61
  success: m.run.code === 0,
62
- output: L,
63
- stderr: I,
62
+ output: N,
63
+ stderr: R,
64
64
  code: m.run.code,
65
- executionTime: T,
65
+ executionTime: I,
66
66
  compile: m.compile ? {
67
67
  stdout: m.compile.stdout || "",
68
68
  stderr: m.compile.stderr || "",
@@ -75,7 +75,7 @@ class Le {
75
75
  output: "",
76
76
  stderr: f instanceof Error ? f.message : "Unknown error",
77
77
  code: -1,
78
- executionTime: Date.now() - s
78
+ executionTime: Date.now() - o
79
79
  };
80
80
  }
81
81
  }
@@ -109,7 +109,7 @@ class Le {
109
109
  }[d.toLowerCase()] || `main.${d}`;
110
110
  }
111
111
  }
112
- const Ne = {
112
+ const Ce = {
113
113
  javascript: 'console.log("Hello, World!");',
114
114
  typescript: 'console.log("Hello, World!");',
115
115
  python: 'print("Hello, World!")',
@@ -209,11 +209,11 @@ This is a sample markdown document.`
209
209
  };
210
210
  function ae(i) {
211
211
  const d = i.toLowerCase();
212
- return Ne[d] || `// ${i}
212
+ return Ce[d] || `// ${i}
213
213
  // Write your code here`;
214
214
  }
215
215
  var de = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
216
- function Ce(i) {
216
+ function De(i) {
217
217
  return i && i.__esModule && Object.prototype.hasOwnProperty.call(i, "default") ? i.default : i;
218
218
  }
219
219
  var ge = { exports: {} };
@@ -228,7 +228,7 @@ var ge = { exports: {} };
228
228
  * @public
229
229
  */
230
230
  var n = function(l) {
231
- var h = /(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i, y = 0, A = {}, s = {
231
+ var h = /(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i, A = 0, k = {}, o = {
232
232
  /**
233
233
  * By default, Prism will attempt to highlight all code elements (by calling {@link Prism.highlightAll}) on the
234
234
  * current page after the page finished loading. This might be a problem if e.g. you wanted to asynchronously load
@@ -312,7 +312,7 @@ var ge = { exports: {} };
312
312
  * @returns {number}
313
313
  */
314
314
  objId: function(t) {
315
- return t.__id || Object.defineProperty(t, "__id", { value: ++y }), t.__id;
315
+ return t.__id || Object.defineProperty(t, "__id", { value: ++A }), t.__id;
316
316
  },
317
317
  /**
318
318
  * Creates a deep clone of the given object.
@@ -324,28 +324,28 @@ var ge = { exports: {} };
324
324
  * @returns {T}
325
325
  * @template T
326
326
  */
327
- clone: function t(e, a) {
328
- a = a || {};
329
- var r, o;
330
- switch (s.util.type(e)) {
327
+ clone: function t(e, r) {
328
+ r = r || {};
329
+ var s, a;
330
+ switch (o.util.type(e)) {
331
331
  case "Object":
332
- if (o = s.util.objId(e), a[o])
333
- return a[o];
334
- r = /** @type {Record<string, any>} */
335
- {}, a[o] = r;
336
- for (var c in e)
337
- e.hasOwnProperty(c) && (r[c] = t(e[c], a));
332
+ if (a = o.util.objId(e), r[a])
333
+ return r[a];
334
+ s = /** @type {Record<string, any>} */
335
+ {}, r[a] = s;
336
+ for (var u in e)
337
+ e.hasOwnProperty(u) && (s[u] = t(e[u], r));
338
338
  return (
339
339
  /** @type {any} */
340
- r
340
+ s
341
341
  );
342
342
  case "Array":
343
- return o = s.util.objId(e), a[o] ? a[o] : (r = [], a[o] = r, /** @type {Array} */
343
+ return a = o.util.objId(e), r[a] ? r[a] : (s = [], r[a] = s, /** @type {Array} */
344
344
  /** @type {any} */
345
- e.forEach(function(b, u) {
346
- r[u] = t(b, a);
345
+ e.forEach(function(b, c) {
346
+ s[c] = t(b, r);
347
347
  }), /** @type {any} */
348
- r);
348
+ s);
349
349
  default:
350
350
  return e;
351
351
  }
@@ -394,13 +394,13 @@ var ge = { exports: {} };
394
394
  );
395
395
  try {
396
396
  throw new Error();
397
- } catch (r) {
398
- var t = (/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(r.stack) || [])[1];
397
+ } catch (s) {
398
+ var t = (/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(s.stack) || [])[1];
399
399
  if (t) {
400
400
  var e = document.getElementsByTagName("script");
401
- for (var a in e)
402
- if (e[a].src == t)
403
- return e[a];
401
+ for (var r in e)
402
+ if (e[r].src == t)
403
+ return e[r];
404
404
  }
405
405
  return null;
406
406
  }
@@ -424,16 +424,16 @@ var ge = { exports: {} };
424
424
  * @param {boolean} [defaultActivation=false]
425
425
  * @returns {boolean}
426
426
  */
427
- isActive: function(t, e, a) {
428
- for (var r = "no-" + e; t; ) {
429
- var o = t.classList;
430
- if (o.contains(e))
427
+ isActive: function(t, e, r) {
428
+ for (var s = "no-" + e; t; ) {
429
+ var a = t.classList;
430
+ if (a.contains(e))
431
431
  return !0;
432
- if (o.contains(r))
432
+ if (a.contains(s))
433
433
  return !1;
434
434
  t = t.parentElement;
435
435
  }
436
- return !!a;
436
+ return !!r;
437
437
  }
438
438
  },
439
439
  /**
@@ -447,10 +447,10 @@ var ge = { exports: {} };
447
447
  /**
448
448
  * The grammar for plain, unformatted text.
449
449
  */
450
- plain: A,
451
- plaintext: A,
452
- text: A,
453
- txt: A,
450
+ plain: k,
451
+ plaintext: k,
452
+ text: k,
453
+ txt: k,
454
454
  /**
455
455
  * Creates a deep copy of the language with the given id and appends the given tokens.
456
456
  *
@@ -480,10 +480,10 @@ var ge = { exports: {} };
480
480
  * });
481
481
  */
482
482
  extend: function(t, e) {
483
- var a = s.util.clone(s.languages[t]);
484
- for (var r in e)
485
- a[r] = e[r];
486
- return a;
483
+ var r = o.util.clone(o.languages[t]);
484
+ for (var s in e)
485
+ r[s] = e[s];
486
+ return r;
487
487
  },
488
488
  /**
489
489
  * Inserts tokens _before_ another token in a language definition or any other grammar.
@@ -560,31 +560,31 @@ var ge = { exports: {} };
560
560
  * @returns {Grammar} The new grammar object.
561
561
  * @public
562
562
  */
563
- insertBefore: function(t, e, a, r) {
564
- r = r || /** @type {any} */
565
- s.languages;
566
- var o = r[t], c = {};
567
- for (var b in o)
568
- if (o.hasOwnProperty(b)) {
563
+ insertBefore: function(t, e, r, s) {
564
+ s = s || /** @type {any} */
565
+ o.languages;
566
+ var a = s[t], u = {};
567
+ for (var b in a)
568
+ if (a.hasOwnProperty(b)) {
569
569
  if (b == e)
570
- for (var u in a)
571
- a.hasOwnProperty(u) && (c[u] = a[u]);
572
- a.hasOwnProperty(b) || (c[b] = o[b]);
570
+ for (var c in r)
571
+ r.hasOwnProperty(c) && (u[c] = r[c]);
572
+ r.hasOwnProperty(b) || (u[b] = a[b]);
573
573
  }
574
- var k = r[t];
575
- return r[t] = c, s.languages.DFS(s.languages, function(F, P) {
576
- P === k && F != t && (this[F] = c);
577
- }), c;
574
+ var _ = s[t];
575
+ return s[t] = u, o.languages.DFS(o.languages, function(F, $) {
576
+ $ === _ && F != t && (this[F] = u);
577
+ }), u;
578
578
  },
579
579
  // Traverse a language definition with Depth First Search
580
- DFS: function t(e, a, r, o) {
581
- o = o || {};
582
- var c = s.util.objId;
580
+ DFS: function t(e, r, s, a) {
581
+ a = a || {};
582
+ var u = o.util.objId;
583
583
  for (var b in e)
584
584
  if (e.hasOwnProperty(b)) {
585
- a.call(e, b, e[b], r || b);
586
- var u = e[b], k = s.util.type(u);
587
- k === "Object" && !o[c(u)] ? (o[c(u)] = !0, t(u, a, null, o)) : k === "Array" && !o[c(u)] && (o[c(u)] = !0, t(u, a, b, o));
585
+ r.call(e, b, e[b], s || b);
586
+ var c = e[b], _ = o.util.type(c);
587
+ _ === "Object" && !a[u(c)] ? (a[u(c)] = !0, t(c, r, null, a)) : _ === "Array" && !a[u(c)] && (a[u(c)] = !0, t(c, r, b, a));
588
588
  }
589
589
  }
590
590
  },
@@ -602,7 +602,7 @@ var ge = { exports: {} };
602
602
  * @public
603
603
  */
604
604
  highlightAll: function(t, e) {
605
- s.highlightAllUnder(document, t, e);
605
+ o.highlightAllUnder(document, t, e);
606
606
  },
607
607
  /**
608
608
  * Fetches all the descendants of `container` that have a `.language-xxxx` class and then calls
@@ -619,15 +619,15 @@ var ge = { exports: {} };
619
619
  * @memberof Prism
620
620
  * @public
621
621
  */
622
- highlightAllUnder: function(t, e, a) {
623
- var r = {
624
- callback: a,
622
+ highlightAllUnder: function(t, e, r) {
623
+ var s = {
624
+ callback: r,
625
625
  container: t,
626
626
  selector: 'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'
627
627
  };
628
- s.hooks.run("before-highlightall", r), r.elements = Array.prototype.slice.apply(r.container.querySelectorAll(r.selector)), s.hooks.run("before-all-elements-highlight", r);
629
- for (var o = 0, c; c = r.elements[o++]; )
630
- s.highlightElement(c, e === !0, r.callback);
628
+ o.hooks.run("before-highlightall", s), s.elements = Array.prototype.slice.apply(s.container.querySelectorAll(s.selector)), o.hooks.run("before-all-elements-highlight", s);
629
+ for (var a = 0, u; u = s.elements[a++]; )
630
+ o.highlightElement(u, e === !0, s.callback);
631
631
  },
632
632
  /**
633
633
  * Highlights the code inside a single element.
@@ -657,39 +657,39 @@ var ge = { exports: {} };
657
657
  * @memberof Prism
658
658
  * @public
659
659
  */
660
- highlightElement: function(t, e, a) {
661
- var r = s.util.getLanguage(t), o = s.languages[r];
662
- s.util.setLanguage(t, r);
663
- var c = t.parentElement;
664
- c && c.nodeName.toLowerCase() === "pre" && s.util.setLanguage(c, r);
665
- var b = t.textContent, u = {
660
+ highlightElement: function(t, e, r) {
661
+ var s = o.util.getLanguage(t), a = o.languages[s];
662
+ o.util.setLanguage(t, s);
663
+ var u = t.parentElement;
664
+ u && u.nodeName.toLowerCase() === "pre" && o.util.setLanguage(u, s);
665
+ var b = t.textContent, c = {
666
666
  element: t,
667
- language: r,
668
- grammar: o,
667
+ language: s,
668
+ grammar: a,
669
669
  code: b
670
670
  };
671
- function k(P) {
672
- u.highlightedCode = P, s.hooks.run("before-insert", u), u.element.innerHTML = u.highlightedCode, s.hooks.run("after-highlight", u), s.hooks.run("complete", u), a && a.call(u.element);
671
+ function _($) {
672
+ c.highlightedCode = $, o.hooks.run("before-insert", c), c.element.innerHTML = c.highlightedCode, o.hooks.run("after-highlight", c), o.hooks.run("complete", c), r && r.call(c.element);
673
673
  }
674
- if (s.hooks.run("before-sanity-check", u), c = u.element.parentElement, c && c.nodeName.toLowerCase() === "pre" && !c.hasAttribute("tabindex") && c.setAttribute("tabindex", "0"), !u.code) {
675
- s.hooks.run("complete", u), a && a.call(u.element);
674
+ if (o.hooks.run("before-sanity-check", c), u = c.element.parentElement, u && u.nodeName.toLowerCase() === "pre" && !u.hasAttribute("tabindex") && u.setAttribute("tabindex", "0"), !c.code) {
675
+ o.hooks.run("complete", c), r && r.call(c.element);
676
676
  return;
677
677
  }
678
- if (s.hooks.run("before-highlight", u), !u.grammar) {
679
- k(s.util.encode(u.code));
678
+ if (o.hooks.run("before-highlight", c), !c.grammar) {
679
+ _(o.util.encode(c.code));
680
680
  return;
681
681
  }
682
682
  if (e && l.Worker) {
683
- var F = new Worker(s.filename);
684
- F.onmessage = function(P) {
685
- k(P.data);
683
+ var F = new Worker(o.filename);
684
+ F.onmessage = function($) {
685
+ _($.data);
686
686
  }, F.postMessage(JSON.stringify({
687
- language: u.language,
688
- code: u.code,
687
+ language: c.language,
688
+ code: c.code,
689
689
  immediateClose: !0
690
690
  }));
691
691
  } else
692
- k(s.highlight(u.code, u.grammar, u.language));
692
+ _(o.highlight(c.code, c.grammar, c.language));
693
693
  },
694
694
  /**
695
695
  * Low-level function, only use if you know what you’re doing. It accepts a string of text as input
@@ -711,15 +711,15 @@ var ge = { exports: {} };
711
711
  * @example
712
712
  * Prism.highlight('var foo = true;', Prism.languages.javascript, 'javascript');
713
713
  */
714
- highlight: function(t, e, a) {
715
- var r = {
714
+ highlight: function(t, e, r) {
715
+ var s = {
716
716
  code: t,
717
717
  grammar: e,
718
- language: a
718
+ language: r
719
719
  };
720
- if (s.hooks.run("before-tokenize", r), !r.grammar)
721
- throw new Error('The language "' + r.language + '" has no grammar.');
722
- return r.tokens = s.tokenize(r.code, r.grammar), s.hooks.run("after-tokenize", r), f.stringify(s.util.encode(r.tokens), r.language);
720
+ if (o.hooks.run("before-tokenize", s), !s.grammar)
721
+ throw new Error('The language "' + s.language + '" has no grammar.');
722
+ return s.tokens = o.tokenize(s.code, s.grammar), o.hooks.run("after-tokenize", s), f.stringify(o.util.encode(s.tokens), s.language);
723
723
  },
724
724
  /**
725
725
  * This is the heart of Prism, and the most low-level function you can use. It accepts a string of text as input
@@ -746,14 +746,14 @@ var ge = { exports: {} };
746
746
  * });
747
747
  */
748
748
  tokenize: function(t, e) {
749
- var a = e.rest;
750
- if (a) {
751
- for (var r in a)
752
- e[r] = a[r];
749
+ var r = e.rest;
750
+ if (r) {
751
+ for (var s in r)
752
+ e[s] = r[s];
753
753
  delete e.rest;
754
754
  }
755
- var o = new L();
756
- return I(o, o.head, t), T(t, o, e, o.head, 0), D(o);
755
+ var a = new N();
756
+ return R(a, a.head, t), I(t, a, e, a.head, 0), D(a);
757
757
  },
758
758
  /**
759
759
  * @namespace
@@ -775,8 +775,8 @@ var ge = { exports: {} };
775
775
  * @public
776
776
  */
777
777
  add: function(t, e) {
778
- var a = s.hooks.all;
779
- a[t] = a[t] || [], a[t].push(e);
778
+ var r = o.hooks.all;
779
+ r[t] = r[t] || [], r[t].push(e);
780
780
  },
781
781
  /**
782
782
  * Runs a hook invoking all registered callbacks with the given environment variables.
@@ -788,132 +788,132 @@ var ge = { exports: {} };
788
788
  * @public
789
789
  */
790
790
  run: function(t, e) {
791
- var a = s.hooks.all[t];
792
- if (!(!a || !a.length))
793
- for (var r = 0, o; o = a[r++]; )
794
- o(e);
791
+ var r = o.hooks.all[t];
792
+ if (!(!r || !r.length))
793
+ for (var s = 0, a; a = r[s++]; )
794
+ a(e);
795
795
  }
796
796
  },
797
797
  Token: f
798
798
  };
799
- l.Prism = s;
800
- function f(t, e, a, r) {
801
- this.type = t, this.content = e, this.alias = a, this.length = (r || "").length | 0;
799
+ l.Prism = o;
800
+ function f(t, e, r, s) {
801
+ this.type = t, this.content = e, this.alias = r, this.length = (s || "").length | 0;
802
802
  }
803
- f.stringify = function t(e, a) {
803
+ f.stringify = function t(e, r) {
804
804
  if (typeof e == "string")
805
805
  return e;
806
806
  if (Array.isArray(e)) {
807
- var r = "";
808
- return e.forEach(function(k) {
809
- r += t(k, a);
810
- }), r;
807
+ var s = "";
808
+ return e.forEach(function(_) {
809
+ s += t(_, r);
810
+ }), s;
811
811
  }
812
- var o = {
812
+ var a = {
813
813
  type: e.type,
814
- content: t(e.content, a),
814
+ content: t(e.content, r),
815
815
  tag: "span",
816
816
  classes: ["token", e.type],
817
817
  attributes: {},
818
- language: a
819
- }, c = e.alias;
820
- c && (Array.isArray(c) ? Array.prototype.push.apply(o.classes, c) : o.classes.push(c)), s.hooks.run("wrap", o);
818
+ language: r
819
+ }, u = e.alias;
820
+ u && (Array.isArray(u) ? Array.prototype.push.apply(a.classes, u) : a.classes.push(u)), o.hooks.run("wrap", a);
821
821
  var b = "";
822
- for (var u in o.attributes)
823
- b += " " + u + '="' + (o.attributes[u] || "").replace(/"/g, "&quot;") + '"';
824
- return "<" + o.tag + ' class="' + o.classes.join(" ") + '"' + b + ">" + o.content + "</" + o.tag + ">";
822
+ for (var c in a.attributes)
823
+ b += " " + c + '="' + (a.attributes[c] || "").replace(/"/g, "&quot;") + '"';
824
+ return "<" + a.tag + ' class="' + a.classes.join(" ") + '"' + b + ">" + a.content + "</" + a.tag + ">";
825
825
  };
826
- function m(t, e, a, r) {
826
+ function m(t, e, r, s) {
827
827
  t.lastIndex = e;
828
- var o = t.exec(a);
829
- if (o && r && o[1]) {
830
- var c = o[1].length;
831
- o.index += c, o[0] = o[0].slice(c);
828
+ var a = t.exec(r);
829
+ if (a && s && a[1]) {
830
+ var u = a[1].length;
831
+ a.index += u, a[0] = a[0].slice(u);
832
832
  }
833
- return o;
833
+ return a;
834
834
  }
835
- function T(t, e, a, r, o, c) {
836
- for (var b in a)
837
- if (!(!a.hasOwnProperty(b) || !a[b])) {
838
- var u = a[b];
839
- u = Array.isArray(u) ? u : [u];
840
- for (var k = 0; k < u.length; ++k) {
841
- if (c && c.cause == b + "," + k)
835
+ function I(t, e, r, s, a, u) {
836
+ for (var b in r)
837
+ if (!(!r.hasOwnProperty(b) || !r[b])) {
838
+ var c = r[b];
839
+ c = Array.isArray(c) ? c : [c];
840
+ for (var _ = 0; _ < c.length; ++_) {
841
+ if (u && u.cause == b + "," + _)
842
842
  return;
843
- var F = u[k], P = F.inside, V = !!F.lookbehind, v = !!F.greedy, w = F.alias;
844
- if (v && !F.pattern.global) {
845
- var x = F.pattern.toString().match(/[imsuy]*$/)[0];
846
- F.pattern = RegExp(F.pattern.source, x + "g");
843
+ var F = c[_], $ = F.inside, j = !!F.lookbehind, W = !!F.greedy, J = F.alias;
844
+ if (W && !F.pattern.global) {
845
+ var v = F.pattern.toString().match(/[imsuy]*$/)[0];
846
+ F.pattern = RegExp(F.pattern.source, v + "g");
847
847
  }
848
- for (var Y = F.pattern || F, O = r.next, M = o; O !== e.tail && !(c && M >= c.reach); M += O.value.length, O = O.next) {
849
- var z = O.value;
848
+ for (var S = F.pattern || F, y = s.next, C = a; y !== e.tail && !(u && C >= u.reach); C += y.value.length, y = y.next) {
849
+ var z = y.value;
850
850
  if (e.length > t.length)
851
851
  return;
852
852
  if (!(z instanceof f)) {
853
- var X = 1, $;
854
- if (v) {
855
- if ($ = m(Y, M, t, V), !$ || $.index >= t.length)
853
+ var Y = 1, P;
854
+ if (W) {
855
+ if (P = m(S, C, t, j), !P || P.index >= t.length)
856
856
  break;
857
- var Z = $.index, fe = $.index + $[0].length, B = M;
858
- for (B += O.value.length; Z >= B; )
859
- O = O.next, B += O.value.length;
860
- if (B -= O.value.length, M = B, O.value instanceof f)
857
+ var X = P.index, fe = P.index + P[0].length, U = C;
858
+ for (U += y.value.length; X >= U; )
859
+ y = y.next, U += y.value.length;
860
+ if (U -= y.value.length, C = U, y.value instanceof f)
861
861
  continue;
862
- for (var j = O; j !== e.tail && (B < fe || typeof j.value == "string"); j = j.next)
863
- X++, B += j.value.length;
864
- X--, z = t.slice(M, B), $.index -= M;
865
- } else if ($ = m(Y, 0, z, V), !$)
862
+ for (var V = y; V !== e.tail && (U < fe || typeof V.value == "string"); V = V.next)
863
+ Y++, U += V.value.length;
864
+ Y--, z = t.slice(C, U), P.index -= C;
865
+ } else if (P = m(S, 0, z, j), !P)
866
866
  continue;
867
- var Z = $.index, K = $[0], Q = z.slice(0, Z), ue = z.slice(Z + K.length), ee = M + z.length;
868
- c && ee > c.reach && (c.reach = ee);
869
- var q = O.prev;
870
- Q && (q = I(e, q, Q), M += Q.length), C(e, q, X);
871
- var me = new f(b, P ? s.tokenize(K, P) : K, w, K);
872
- if (O = I(e, q, me), ue && I(e, O, ue), X > 1) {
867
+ var X = P.index, Z = P[0], Q = z.slice(0, X), ue = z.slice(X + Z.length), ee = C + z.length;
868
+ u && ee > u.reach && (u.reach = ee);
869
+ var K = y.prev;
870
+ Q && (K = R(e, K, Q), C += Q.length), L(e, K, Y);
871
+ var me = new f(b, $ ? o.tokenize(Z, $) : Z, J, Z);
872
+ if (y = R(e, K, me), ue && R(e, y, ue), Y > 1) {
873
873
  var te = {
874
- cause: b + "," + k,
874
+ cause: b + "," + _,
875
875
  reach: ee
876
876
  };
877
- T(t, e, a, O.prev, M, te), c && te.reach > c.reach && (c.reach = te.reach);
877
+ I(t, e, r, y.prev, C, te), u && te.reach > u.reach && (u.reach = te.reach);
878
878
  }
879
879
  }
880
880
  }
881
881
  }
882
882
  }
883
883
  }
884
- function L() {
884
+ function N() {
885
885
  var t = { value: null, prev: null, next: null }, e = { value: null, prev: t, next: null };
886
886
  t.next = e, this.head = t, this.tail = e, this.length = 0;
887
887
  }
888
- function I(t, e, a) {
889
- var r = e.next, o = { value: a, prev: e, next: r };
890
- return e.next = o, r.prev = o, t.length++, o;
888
+ function R(t, e, r) {
889
+ var s = e.next, a = { value: r, prev: e, next: s };
890
+ return e.next = a, s.prev = a, t.length++, a;
891
891
  }
892
- function C(t, e, a) {
893
- for (var r = e.next, o = 0; o < a && r !== t.tail; o++)
894
- r = r.next;
895
- e.next = r, r.prev = e, t.length -= o;
892
+ function L(t, e, r) {
893
+ for (var s = e.next, a = 0; a < r && s !== t.tail; a++)
894
+ s = s.next;
895
+ e.next = s, s.prev = e, t.length -= a;
896
896
  }
897
897
  function D(t) {
898
- for (var e = [], a = t.head.next; a !== t.tail; )
899
- e.push(a.value), a = a.next;
898
+ for (var e = [], r = t.head.next; r !== t.tail; )
899
+ e.push(r.value), r = r.next;
900
900
  return e;
901
901
  }
902
902
  if (!l.document)
903
- return l.addEventListener && (s.disableWorkerMessageHandler || l.addEventListener("message", function(t) {
904
- var e = JSON.parse(t.data), a = e.language, r = e.code, o = e.immediateClose;
905
- l.postMessage(s.highlight(r, s.languages[a], a)), o && l.close();
906
- }, !1)), s;
907
- var g = s.util.currentScript();
908
- g && (s.filename = g.src, g.hasAttribute("data-manual") && (s.manual = !0));
903
+ return l.addEventListener && (o.disableWorkerMessageHandler || l.addEventListener("message", function(t) {
904
+ var e = JSON.parse(t.data), r = e.language, s = e.code, a = e.immediateClose;
905
+ l.postMessage(o.highlight(s, o.languages[r], r)), a && l.close();
906
+ }, !1)), o;
907
+ var g = o.util.currentScript();
908
+ g && (o.filename = g.src, g.hasAttribute("data-manual") && (o.manual = !0));
909
909
  function p() {
910
- s.manual || s.highlightAll();
910
+ o.manual || o.highlightAll();
911
911
  }
912
- if (!s.manual) {
913
- var S = document.readyState;
914
- S === "loading" || S === "interactive" && g && g.defer ? document.addEventListener("DOMContentLoaded", p) : window.requestAnimationFrame ? window.requestAnimationFrame(p) : window.setTimeout(p, 16);
912
+ if (!o.manual) {
913
+ var w = document.readyState;
914
+ w === "loading" || w === "interactive" && g && g.defer ? document.addEventListener("DOMContentLoaded", p) : window.requestAnimationFrame ? window.requestAnimationFrame(p) : window.setTimeout(p, 16);
915
915
  }
916
- return s;
916
+ return o;
917
917
  }(d);
918
918
  i.exports && (i.exports = n), typeof de < "u" && (de.Prism = n), n.languages.markup = {
919
919
  comment: {
@@ -1006,22 +1006,22 @@ var ge = { exports: {} };
1006
1006
  * @example
1007
1007
  * addInlined('style', 'css');
1008
1008
  */
1009
- value: function(h, y) {
1010
- var A = {};
1011
- A["language-" + y] = {
1009
+ value: function(h, A) {
1010
+ var k = {};
1011
+ k["language-" + A] = {
1012
1012
  pattern: /(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,
1013
1013
  lookbehind: !0,
1014
- inside: n.languages[y]
1015
- }, A.cdata = /^<!\[CDATA\[|\]\]>$/i;
1016
- var s = {
1014
+ inside: n.languages[A]
1015
+ }, k.cdata = /^<!\[CDATA\[|\]\]>$/i;
1016
+ var o = {
1017
1017
  "included-cdata": {
1018
1018
  pattern: /<!\[CDATA\[[\s\S]*?\]\]>/i,
1019
- inside: A
1019
+ inside: k
1020
1020
  }
1021
1021
  };
1022
- s["language-" + y] = {
1022
+ o["language-" + A] = {
1023
1023
  pattern: /[\s\S]+/,
1024
- inside: n.languages[y]
1024
+ inside: n.languages[A]
1025
1025
  };
1026
1026
  var f = {};
1027
1027
  f[h] = {
@@ -1030,7 +1030,7 @@ var ge = { exports: {} };
1030
1030
  }), "i"),
1031
1031
  lookbehind: !0,
1032
1032
  greedy: !0,
1033
- inside: s
1033
+ inside: o
1034
1034
  }, n.languages.insertBefore("markup", "cdata", f);
1035
1035
  }
1036
1036
  }), Object.defineProperty(n.languages.markup.tag, "addAttribute", {
@@ -1127,8 +1127,8 @@ var ge = { exports: {} };
1127
1127
  },
1128
1128
  punctuation: /[(){};:,]/
1129
1129
  }, l.languages.css.atrule.inside.rest = l.languages.css;
1130
- var y = l.languages.markup;
1131
- y && (y.tag.addInlined("style", "css"), y.tag.addAttribute("style", "css"));
1130
+ var A = l.languages.markup;
1131
+ A && (A.tag.addInlined("style", "css"), A.tag.addAttribute("style", "css"));
1132
1132
  }(n), n.languages.clike = {
1133
1133
  comment: [
1134
1134
  {
@@ -1295,7 +1295,7 @@ var ge = { exports: {} };
1295
1295
  Element.prototype.matches || (Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector);
1296
1296
  var l = "Loading…", h = function(g, p) {
1297
1297
  return "✖ Error " + g + " while fetching file: " + p;
1298
- }, y = "✖ Error: File does not exist or is empty", A = {
1298
+ }, A = "✖ Error: File does not exist or is empty", k = {
1299
1299
  js: "javascript",
1300
1300
  py: "python",
1301
1301
  rb: "ruby",
@@ -1305,52 +1305,52 @@ var ge = { exports: {} };
1305
1305
  bat: "batch",
1306
1306
  h: "c",
1307
1307
  tex: "latex"
1308
- }, s = "data-src-status", f = "loading", m = "loaded", T = "failed", L = "pre[data-src]:not([" + s + '="' + m + '"]):not([' + s + '="' + f + '"])';
1309
- function I(g, p, S) {
1308
+ }, o = "data-src-status", f = "loading", m = "loaded", I = "failed", N = "pre[data-src]:not([" + o + '="' + m + '"]):not([' + o + '="' + f + '"])';
1309
+ function R(g, p, w) {
1310
1310
  var t = new XMLHttpRequest();
1311
1311
  t.open("GET", g, !0), t.onreadystatechange = function() {
1312
- t.readyState == 4 && (t.status < 400 && t.responseText ? p(t.responseText) : t.status >= 400 ? S(h(t.status, t.statusText)) : S(y));
1312
+ t.readyState == 4 && (t.status < 400 && t.responseText ? p(t.responseText) : t.status >= 400 ? w(h(t.status, t.statusText)) : w(A));
1313
1313
  }, t.send(null);
1314
1314
  }
1315
- function C(g) {
1315
+ function L(g) {
1316
1316
  var p = /^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(g || "");
1317
1317
  if (p) {
1318
- var S = Number(p[1]), t = p[2], e = p[3];
1319
- return t ? e ? [S, Number(e)] : [S, void 0] : [S, S];
1318
+ var w = Number(p[1]), t = p[2], e = p[3];
1319
+ return t ? e ? [w, Number(e)] : [w, void 0] : [w, w];
1320
1320
  }
1321
1321
  }
1322
1322
  n.hooks.add("before-highlightall", function(g) {
1323
- g.selector += ", " + L;
1323
+ g.selector += ", " + N;
1324
1324
  }), n.hooks.add("before-sanity-check", function(g) {
1325
1325
  var p = (
1326
1326
  /** @type {HTMLPreElement} */
1327
1327
  g.element
1328
1328
  );
1329
- if (p.matches(L)) {
1330
- g.code = "", p.setAttribute(s, f);
1331
- var S = p.appendChild(document.createElement("CODE"));
1332
- S.textContent = l;
1329
+ if (p.matches(N)) {
1330
+ g.code = "", p.setAttribute(o, f);
1331
+ var w = p.appendChild(document.createElement("CODE"));
1332
+ w.textContent = l;
1333
1333
  var t = p.getAttribute("data-src"), e = g.language;
1334
1334
  if (e === "none") {
1335
- var a = (/\.(\w+)$/.exec(t) || [, "none"])[1];
1336
- e = A[a] || a;
1335
+ var r = (/\.(\w+)$/.exec(t) || [, "none"])[1];
1336
+ e = k[r] || r;
1337
1337
  }
1338
- n.util.setLanguage(S, e), n.util.setLanguage(p, e);
1339
- var r = n.plugins.autoloader;
1340
- r && r.loadLanguages(e), I(
1338
+ n.util.setLanguage(w, e), n.util.setLanguage(p, e);
1339
+ var s = n.plugins.autoloader;
1340
+ s && s.loadLanguages(e), R(
1341
1341
  t,
1342
- function(o) {
1343
- p.setAttribute(s, m);
1344
- var c = C(p.getAttribute("data-range"));
1345
- if (c) {
1346
- var b = o.split(/\r\n?|\n/g), u = c[0], k = c[1] == null ? b.length : c[1];
1347
- u < 0 && (u += b.length), u = Math.max(0, Math.min(u - 1, b.length)), k < 0 && (k += b.length), k = Math.max(0, Math.min(k, b.length)), o = b.slice(u, k).join(`
1348
- `), p.hasAttribute("data-start") || p.setAttribute("data-start", String(u + 1));
1342
+ function(a) {
1343
+ p.setAttribute(o, m);
1344
+ var u = L(p.getAttribute("data-range"));
1345
+ if (u) {
1346
+ var b = a.split(/\r\n?|\n/g), c = u[0], _ = u[1] == null ? b.length : u[1];
1347
+ c < 0 && (c += b.length), c = Math.max(0, Math.min(c - 1, b.length)), _ < 0 && (_ += b.length), _ = Math.max(0, Math.min(_, b.length)), a = b.slice(c, _).join(`
1348
+ `), p.hasAttribute("data-start") || p.setAttribute("data-start", String(c + 1));
1349
1349
  }
1350
- S.textContent = o, n.highlightElement(S);
1350
+ w.textContent = a, n.highlightElement(w);
1351
1351
  },
1352
- function(o) {
1353
- p.setAttribute(s, T), S.textContent = o;
1352
+ function(a) {
1353
+ p.setAttribute(o, I), w.textContent = a;
1354
1354
  }
1355
1355
  );
1356
1356
  }
@@ -1363,7 +1363,7 @@ var ge = { exports: {} };
1363
1363
  * @param {ParentNode} [container=document]
1364
1364
  */
1365
1365
  highlight: function(p) {
1366
- for (var S = (p || document).querySelectorAll(L), t = 0, e; e = S[t++]; )
1366
+ for (var w = (p || document).querySelectorAll(N), t = 0, e; e = w[t++]; )
1367
1367
  n.highlightElement(e);
1368
1368
  }
1369
1369
  };
@@ -1373,8 +1373,8 @@ var ge = { exports: {} };
1373
1373
  };
1374
1374
  }();
1375
1375
  })(ge);
1376
- var De = ge.exports;
1377
- const re = /* @__PURE__ */ Ce(De);
1376
+ var Pe = ge.exports;
1377
+ const re = /* @__PURE__ */ De(Pe);
1378
1378
  Prism.languages.clike = {
1379
1379
  comment: [
1380
1380
  {
@@ -2186,8 +2186,8 @@ Prism.languages.sql = {
2186
2186
  "operator",
2187
2187
  "punctuation",
2188
2188
  "number"
2189
- ], y = l.variable[1].inside, A = 0; A < h.length; A++)
2190
- y[h[A]] = i.languages.bash[h[A]];
2189
+ ], A = l.variable[1].inside, k = 0; k < h.length; k++)
2190
+ A[h[k]] = i.languages.bash[h[k]];
2191
2191
  i.languages.sh = i.languages.bash, i.languages.shell = i.languages.bash;
2192
2192
  })(Prism);
2193
2193
  Prism.languages.json = {
@@ -2215,7 +2215,13 @@ Prism.languages.json = {
2215
2215
  }
2216
2216
  };
2217
2217
  Prism.languages.webmanifest = Prism.languages.json;
2218
- const Pe = `
2218
+ const $e = `
2219
+ /* 默认代码颜色 */
2220
+ .hep-cr-editor .hep-cr-highlight code,
2221
+ .hep-cr-editor .hep-cr-highlight pre {
2222
+ color: #f8f8f2 !important;
2223
+ }
2224
+
2219
2225
  .hep-cr-editor .token.comment,
2220
2226
  .hep-cr-editor .token.prolog,
2221
2227
  .hep-cr-editor .token.doctype,
@@ -2235,6 +2241,12 @@ const Pe = `
2235
2241
  color: #f92672 !important;
2236
2242
  }
2237
2243
 
2244
+ /* console 单独处理 - 必须是白色 */
2245
+ .hep-cr-editor .token.property.console,
2246
+ .hep-cr-editor .token.console {
2247
+ color: #f8f8f2 !important;
2248
+ }
2249
+
2238
2250
  .hep-cr-editor .token.boolean,
2239
2251
  .hep-cr-editor .token.number {
2240
2252
  color: #ae81ff !important;
@@ -2274,7 +2286,28 @@ const Pe = `
2274
2286
  .hep-cr-editor .token.important {
2275
2287
  color: #fd971f !important;
2276
2288
  }
2277
- `, $e = `
2289
+
2290
+ /* 覆盖用户项目的 text-shadow 样式,避免白边 */
2291
+ .hep-cr-editor code[class*="language-"],
2292
+ .hep-cr-editor pre[class*="language-"],
2293
+ .hep-cr-editor .hep-cr-highlight code,
2294
+ .hep-cr-editor .hep-cr-highlight pre {
2295
+ text-shadow: none !important;
2296
+ }
2297
+
2298
+ /* 覆盖 console 等内置对象 - 使用最高特异性 */
2299
+ .hep-cr-editor .hep-cr-highlight .token.console,
2300
+ .hep-cr-editor code.token.console,
2301
+ .hep-cr-editor .token.console {
2302
+ color: #f8f8f2 !important;
2303
+ }
2304
+ `, Me = `
2305
+ /* 默认代码颜色 */
2306
+ .hep-cr-editor .hep-cr-highlight code,
2307
+ .hep-cr-editor .hep-cr-highlight pre {
2308
+ color: #333 !important;
2309
+ }
2310
+
2278
2311
  .hep-cr-editor .token.comment,
2279
2312
  .hep-cr-editor .token.prolog,
2280
2313
  .hep-cr-editor .token.doctype,
@@ -2332,7 +2365,20 @@ const Pe = `
2332
2365
  .hep-cr-editor .token.important {
2333
2366
  color: #e36209;
2334
2367
  }
2335
- `, Me = ["innerHTML"], Ue = ["value", "disabled"], He = /* @__PURE__ */ ie({
2368
+
2369
+ /* 覆盖用户项目的 text-shadow 样式,避免白边 */
2370
+ .hep-cr-editor code[class*="language-"],
2371
+ .hep-cr-editor pre[class*="language-"],
2372
+ .hep-cr-editor .hep-cr-highlight code,
2373
+ .hep-cr-editor .hep-cr-highlight pre {
2374
+ text-shadow: none !important;
2375
+ }
2376
+
2377
+ /* 覆盖 console 等内置对象 */
2378
+ .hep-cr-editor .token.console {
2379
+ color: #333 !important;
2380
+ }
2381
+ `, Ue = ["innerHTML"], He = ["value", "disabled"], Be = /* @__PURE__ */ ie({
2336
2382
  __name: "CodeEditor",
2337
2383
  props: {
2338
2384
  modelValue: {},
@@ -2347,12 +2393,12 @@ const Pe = `
2347
2393
  })), typeof window < "u" && (window.Prism = re);
2348
2394
  function n(g) {
2349
2395
  if (typeof document > "u") return;
2350
- const p = "hep-cr-prism-styles", S = document.getElementById(p), t = g === "dark" ? Pe : $e;
2351
- S && S.remove();
2396
+ const p = "hep-cr-prism-styles", w = document.getElementById(p), t = g === "dark" ? $e : Me;
2397
+ w && w.remove();
2352
2398
  const e = document.createElement("style");
2353
2399
  e.id = p, e.textContent = t, document.head.appendChild(e);
2354
2400
  }
2355
- const l = i, h = d, y = N(null), A = N(null), s = {
2401
+ const l = i, h = d, A = O(null), k = O(null), o = {
2356
2402
  javascript: "javascript",
2357
2403
  js: "javascript",
2358
2404
  typescript: "typescript",
@@ -2383,60 +2429,60 @@ const Pe = `
2383
2429
  yml: "yaml",
2384
2430
  markdown: "markdown",
2385
2431
  md: "markdown"
2386
- }, f = G(() => s[l.language.toLowerCase()] || "javascript"), m = G(() => l.theme === "dark" ? "#1e1e1e" : "#fafafa"), T = G(() => {
2432
+ }, f = B(() => o[l.language.toLowerCase()] || "javascript"), m = B(() => l.theme === "dark" ? "#1e1e1e" : "#fafafa"), I = B(() => {
2387
2433
  try {
2388
2434
  const g = re.languages[f.value];
2389
2435
  if (g)
2390
2436
  return re.highlight(l.modelValue || "", g, f.value);
2391
2437
  } catch {
2392
2438
  }
2393
- return L(l.modelValue || "");
2439
+ return N(l.modelValue || "");
2394
2440
  });
2395
- function L(g) {
2441
+ function N(g) {
2396
2442
  const p = document.createElement("div");
2397
2443
  return p.textContent = g, p.innerHTML;
2398
2444
  }
2399
- function I(g) {
2445
+ function R(g) {
2400
2446
  const p = g.target;
2401
2447
  h("update:modelValue", p.value);
2402
2448
  }
2403
- function C() {
2404
- y.value && A.value && (A.value.scrollTop = y.value.scrollTop, A.value.scrollLeft = y.value.scrollLeft);
2449
+ function L() {
2450
+ A.value && k.value && (k.value.scrollTop = A.value.scrollTop, k.value.scrollLeft = A.value.scrollLeft);
2405
2451
  }
2406
2452
  function D(g) {
2407
2453
  if (g.key === "Tab") {
2408
2454
  g.preventDefault();
2409
- const p = g.target, S = p.selectionStart, t = p.selectionEnd, e = p.value;
2410
- p.value = e.substring(0, S) + " " + e.substring(t), p.selectionStart = p.selectionEnd = S + 2, h("update:modelValue", p.value);
2455
+ const p = g.target, w = p.selectionStart, t = p.selectionEnd, e = p.value;
2456
+ p.value = e.substring(0, w) + " " + e.substring(t), p.selectionStart = p.selectionEnd = w + 2, h("update:modelValue", p.value);
2411
2457
  }
2412
2458
  }
2413
2459
  return pe(() => {
2414
2460
  n(l.theme);
2415
2461
  }), le(() => l.theme, (g) => {
2416
2462
  n(g);
2417
- }), (g, p) => (_(), R("div", {
2418
- class: W(["hep-cr-editor", `hep-cr-theme-${i.theme}`])
2463
+ }), (g, p) => (T(), x("div", {
2464
+ class: G(["hep-cr-editor", `hep-cr-theme-${i.theme}`])
2419
2465
  }, [
2420
2466
  E("pre", {
2421
2467
  ref_key: "highlightRef",
2422
- ref: A,
2423
- class: W(["hep-cr-highlight", [`language-${f.value}`, `hep-cr-prism-${i.theme}`]]),
2468
+ ref: k,
2469
+ class: G(["hep-cr-highlight", [`language-${f.value}`, `hep-cr-prism-${i.theme}`]]),
2424
2470
  "aria-hidden": "true"
2425
2471
  }, [
2426
- E("code", { innerHTML: T.value }, null, 8, Me)
2472
+ E("code", { innerHTML: I.value }, null, 8, Ue)
2427
2473
  ], 2),
2428
2474
  E("textarea", {
2429
2475
  ref_key: "codeRef",
2430
- ref: y,
2476
+ ref: A,
2431
2477
  class: "hep-cr-input",
2432
2478
  value: i.modelValue,
2433
2479
  disabled: i.disabled,
2434
- onInput: I,
2435
- onScroll: C,
2480
+ onInput: R,
2481
+ onScroll: L,
2436
2482
  onKeydown: D,
2437
2483
  spellcheck: "false",
2438
2484
  placeholder: "Write your code here..."
2439
- }, null, 40, Ue)
2485
+ }, null, 40, He)
2440
2486
  ], 2));
2441
2487
  }
2442
2488
  }), he = (i, d) => {
@@ -2444,25 +2490,63 @@ const Pe = `
2444
2490
  for (const [l, h] of d)
2445
2491
  n[l] = h;
2446
2492
  return n;
2447
- }, Be = /* @__PURE__ */ he(He, [["__scopeId", "data-v-bf752fa5"]]), Ge = { class: "hep-cr-header" }, ze = { class: "hep-cr-controls" }, je = ["disabled"], We = {
2493
+ }, Ge = /* @__PURE__ */ he(Be, [["__scopeId", "data-v-bf752fa5"]]), ze = { class: "hep-cr-header" }, je = { class: "hep-cr-controls" }, We = ["disabled"], Ve = {
2448
2494
  key: 0,
2449
2495
  value: ""
2450
- }, Ve = ["value"], Ye = { class: "hep-cr-actions" }, Xe = ["disabled"], Ze = {
2496
+ }, Ye = ["value"], Xe = { class: "hep-cr-actions" }, Ze = ["disabled"], Ke = {
2451
2497
  key: 0,
2452
2498
  class: "hep-cr-spinner"
2453
- }, Ke = {
2499
+ }, qe = {
2454
2500
  key: 1,
2455
2501
  class: "hep-cr-run-icon"
2456
- }, qe = ["title"], Je = {
2502
+ }, Je = ["title"], Qe = {
2503
+ key: 0,
2504
+ width: "16",
2505
+ height: "16",
2506
+ viewBox: "0 0 24 24",
2507
+ fill: "none",
2508
+ stroke: "currentColor",
2509
+ "stroke-width": "2"
2510
+ }, et = {
2511
+ key: 1,
2512
+ width: "16",
2513
+ height: "16",
2514
+ viewBox: "0 0 24 24",
2515
+ fill: "none",
2516
+ stroke: "currentColor",
2517
+ "stroke-width": "2"
2518
+ }, tt = {
2457
2519
  key: 0,
2458
2520
  class: "hep-cr-error"
2459
- }, Qe = { class: "hep-cr-main" }, et = { class: "hep-cr-panel-header" }, tt = { class: "hep-cr-language-badge" }, nt = { class: "hep-cr-panel-header" }, at = { class: "hep-cr-output-tabs" }, rt = { class: "hep-cr-output-actions" }, st = {
2521
+ }, nt = { class: "hep-cr-main" }, at = { class: "hep-cr-panel-header" }, rt = { class: "hep-cr-output-actions" }, ot = { class: "hep-cr-language-badge" }, st = ["disabled", "title"], it = {
2522
+ key: 0,
2523
+ width: "14",
2524
+ height: "14",
2525
+ viewBox: "0 0 24 24",
2526
+ fill: "none",
2527
+ stroke: "currentColor",
2528
+ "stroke-width": "2"
2529
+ }, lt = {
2530
+ key: 1,
2531
+ class: "hep-cr-copied-text"
2532
+ }, ut = { class: "hep-cr-panel-header" }, ct = { class: "hep-cr-output-tabs" }, dt = { class: "hep-cr-output-actions" }, pt = {
2460
2533
  key: 0,
2461
2534
  class: "hep-cr-execution-time"
2462
- }, ot = { class: "hep-cr-output-content" }, it = { key: 0 }, lt = {
2535
+ }, gt = ["disabled", "title"], ht = {
2536
+ key: 0,
2537
+ width: "14",
2538
+ height: "14",
2539
+ viewBox: "0 0 24 24",
2540
+ fill: "none",
2541
+ stroke: "currentColor",
2542
+ "stroke-width": "2"
2543
+ }, ft = {
2544
+ key: 1,
2545
+ class: "hep-cr-copied-text"
2546
+ }, mt = { class: "hep-cr-output-content" }, bt = { key: 0 }, Et = {
2463
2547
  key: 1,
2464
2548
  class: "hep-cr-stderr"
2465
- }, ut = /* @__PURE__ */ ie({
2549
+ }, vt = /* @__PURE__ */ ie({
2466
2550
  __name: "CodeRunner",
2467
2551
  props: {
2468
2552
  pistonUrl: { default: "/api/piston" },
@@ -2476,179 +2560,204 @@ const Pe = `
2476
2560
  },
2477
2561
  emits: ["execute-start", "execute-end", "language-change"],
2478
2562
  setup(i, { emit: d }) {
2479
- const n = i, l = d, h = N([]), y = N(n.language), A = N(n.theme), s = N(""), f = N(""), m = N(""), T = N(!1), L = N(null), I = N("stdout"), C = N(null), D = N(!1), g = N(60);
2563
+ const n = i, l = d, h = O([]), A = O(n.language), k = O(n.theme), o = O(""), f = O(""), m = O(""), I = O(!1), N = O(null), R = O("stdout"), L = O(null), D = O(!1), g = O(60);
2480
2564
  function p() {
2481
- A.value = A.value === "light" ? "dark" : "light";
2565
+ k.value = k.value === "light" ? "dark" : "light";
2482
2566
  }
2483
- const S = G(
2567
+ const w = B(
2484
2568
  () => new Le({ pistonUrl: n.pistonUrl })
2485
- ), t = G(() => h.value.map((v) => ({
2569
+ ), t = B(() => h.value.map((v) => ({
2486
2570
  value: `${v.language}:${v.version}`,
2487
2571
  label: `${v.language.charAt(0).toUpperCase() + v.language.slice(1)} ${v.version}`
2488
- }))), e = G(() => {
2489
- const v = y.value;
2572
+ }))), e = B(() => {
2573
+ const v = A.value;
2490
2574
  return v.includes(":") ? v.split(":")[0] : v;
2491
2575
  });
2492
- async function a() {
2493
- D.value = !0, C.value = null;
2576
+ async function r() {
2577
+ D.value = !0, L.value = null;
2494
2578
  try {
2495
- h.value = await S.value.getRuntimes();
2579
+ h.value = await w.value.getRuntimes();
2496
2580
  } catch (v) {
2497
- C.value = v instanceof Error ? v.message : "Failed to load runtimes";
2581
+ L.value = v instanceof Error ? v.message : "Failed to load runtimes";
2498
2582
  } finally {
2499
2583
  D.value = !1;
2500
2584
  }
2501
2585
  }
2502
- le(y, (v) => {
2503
- const w = v.includes(":") ? v.split(":")[0] : v, x = ae(w);
2504
- s.value = x, l("language-change", w, x);
2586
+ le(A, (v) => {
2587
+ const S = v.includes(":") ? v.split(":")[0] : v, y = ae(S);
2588
+ o.value = y, l("language-change", S, y);
2505
2589
  });
2506
- async function r() {
2507
- if (!T.value) {
2508
- T.value = !0, f.value = "", m.value = "", L.value = null, C.value = null, I.value = "stdout", l("execute-start");
2590
+ async function s() {
2591
+ if (!I.value) {
2592
+ I.value = !0, f.value = "", m.value = "", N.value = null, L.value = null, R.value = "stdout", l("execute-start");
2509
2593
  try {
2510
- const v = await S.value.execute(e.value, s.value);
2511
- f.value = v.output, m.value = v.stderr, L.value = v.executionTime || null, I.value = v.stderr ? "stderr" : "stdout", l("execute-end", v);
2594
+ const v = await w.value.execute(e.value, o.value);
2595
+ f.value = v.output, m.value = v.stderr, N.value = v.executionTime || null, R.value = v.stderr ? "stderr" : "stdout", l("execute-end", v);
2512
2596
  } catch (v) {
2513
- C.value = v instanceof Error ? v.message : "Execution failed", l("execute-end", {
2597
+ L.value = v instanceof Error ? v.message : "Execution failed", l("execute-end", {
2514
2598
  success: !1,
2515
2599
  output: "",
2516
- stderr: C.value,
2600
+ stderr: L.value,
2517
2601
  code: -1
2518
2602
  });
2519
2603
  } finally {
2520
- T.value = !1;
2604
+ I.value = !1;
2521
2605
  }
2522
2606
  }
2523
2607
  }
2524
- function o() {
2525
- f.value = "", m.value = "", L.value = null, C.value = null;
2608
+ const a = O(!1), u = O(!1);
2609
+ async function b() {
2610
+ await navigator.clipboard.writeText(o.value), a.value = !0, setTimeout(() => {
2611
+ a.value = !1;
2612
+ }, 2e3);
2526
2613
  }
2527
2614
  async function c() {
2528
- const v = I.value === "stdout" ? f.value : m.value;
2529
- await navigator.clipboard.writeText(v);
2615
+ const v = R.value === "stdout" ? f.value : m.value;
2616
+ await navigator.clipboard.writeText(v), u.value = !0, setTimeout(() => {
2617
+ u.value = !1;
2618
+ }, 2e3);
2530
2619
  }
2531
- function b() {
2532
- s.value = ae(e.value);
2620
+ function _() {
2621
+ o.value = ae(e.value);
2533
2622
  }
2534
- let u = !1;
2535
- function k(v) {
2536
- u = !0, document.addEventListener("mousemove", F), document.addEventListener("mouseup", P), document.body.style.cursor = "col-resize", document.body.style.userSelect = "none";
2623
+ let F = !1;
2624
+ function $(v) {
2625
+ F = !0, document.addEventListener("mousemove", j), document.addEventListener("mouseup", W), document.body.style.cursor = "col-resize", document.body.style.userSelect = "none";
2537
2626
  }
2538
- function F(v) {
2539
- if (!u) return;
2540
- const w = document.querySelector(
2627
+ function j(v) {
2628
+ if (!F) return;
2629
+ const S = document.querySelector(
2541
2630
  ".hep-cr-main"
2542
2631
  );
2543
- if (!w) return;
2544
- const x = w.getBoundingClientRect(), Y = (v.clientX - x.left) / x.width * 100;
2545
- g.value = Math.max(20, Math.min(80, Y));
2632
+ if (!S) return;
2633
+ const y = S.getBoundingClientRect(), C = (v.clientX - y.left) / y.width * 100;
2634
+ g.value = Math.max(20, Math.min(80, C));
2546
2635
  }
2547
- function P() {
2548
- u = !1, document.removeEventListener("mousemove", F), document.removeEventListener("mouseup", P), document.body.style.cursor = "", document.body.style.userSelect = "";
2636
+ function W() {
2637
+ F = !1, document.removeEventListener("mousemove", j), document.removeEventListener("mouseup", W), document.body.style.cursor = "", document.body.style.userSelect = "";
2549
2638
  }
2550
2639
  pe(async () => {
2551
- await a(), s.value || (s.value = n.defaultCode || ae(y.value));
2640
+ await r(), o.value || (o.value = n.defaultCode || ae(A.value));
2552
2641
  });
2553
- const V = G(() => `hep-cr-runner-${A.value}`);
2554
- return (v, w) => (_(), R("div", {
2555
- class: W(["hep-cr-runner", V.value])
2642
+ const J = B(() => `hep-cr-runner-${k.value}`);
2643
+ return (v, S) => (T(), x("div", {
2644
+ class: G(["hep-cr-runner", J.value])
2556
2645
  }, [
2557
- E("div", Ge, [
2558
- E("div", ze, [
2559
- i.showLanguageSelector ? Ee((_(), R("select", {
2646
+ E("div", ze, [
2647
+ E("div", je, [
2648
+ i.showLanguageSelector ? Ee((T(), x("select", {
2560
2649
  key: 0,
2561
- "onUpdate:modelValue": w[0] || (w[0] = (x) => y.value = x),
2650
+ "onUpdate:modelValue": S[0] || (S[0] = (y) => A.value = y),
2562
2651
  class: "hep-cr-language-select",
2563
- disabled: T.value
2652
+ disabled: I.value
2564
2653
  }, [
2565
- D.value ? (_(), R("option", We, "加载中...")) : U("", !0),
2566
- (_(!0), R(ve, null, ye(t.value, (x) => (_(), R("option", {
2567
- key: x.value,
2568
- value: x.value
2569
- }, H(x.label), 9, Ve))), 128))
2570
- ], 8, je)), [
2571
- [Ae, y.value]
2572
- ]) : U("", !0)
2654
+ D.value ? (T(), x("option", Ve, "加载中...")) : M("", !0),
2655
+ (T(!0), x(ve, null, ye(t.value, (y) => (T(), x("option", {
2656
+ key: y.value,
2657
+ value: y.value
2658
+ }, H(y.label), 9, Ye))), 128))
2659
+ ], 8, We)), [
2660
+ [Ae, A.value]
2661
+ ]) : M("", !0)
2573
2662
  ]),
2574
- E("div", Ye, [
2663
+ E("div", Xe, [
2575
2664
  E("button", {
2576
2665
  class: "hep-cr-btn hep-cr-btn-run",
2577
- disabled: T.value || D.value,
2578
- onClick: r
2666
+ disabled: I.value || D.value,
2667
+ onClick: s
2579
2668
  }, [
2580
- T.value ? (_(), R("span", Ze)) : (_(), R("span", Ke, "▶")),
2581
- Se(" " + H(T.value ? "运行中..." : i.executorLabel), 1)
2582
- ], 8, Xe),
2583
- i.showEditor && i.editable ? (_(), R("button", {
2669
+ I.value ? (T(), x("span", Ke)) : (T(), x("span", qe, "▶")),
2670
+ ke(" " + H(I.value ? "运行中..." : i.executorLabel), 1)
2671
+ ], 8, Ze),
2672
+ i.showEditor && i.editable ? (T(), x("button", {
2584
2673
  key: 0,
2585
2674
  class: "hep-cr-btn hep-cr-btn-reset",
2586
- onClick: b
2587
- }, " 重置 ")) : U("", !0),
2675
+ onClick: _
2676
+ }, " 重置 ")) : M("", !0),
2588
2677
  E("button", {
2589
2678
  class: "hep-cr-btn hep-cr-btn-theme",
2590
2679
  onClick: p,
2591
- title: A.value === "light" ? "Switch to dark mode" : "Switch to light mode"
2592
- }, H(A.value === "light" ? "🌙" : "☀️"), 9, qe)
2680
+ title: k.value === "light" ? "Switch to dark mode" : "Switch to light mode"
2681
+ }, [
2682
+ k.value === "light" ? (T(), x("svg", Qe, [...S[4] || (S[4] = [
2683
+ E("path", { d: "M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" }, null, -1)
2684
+ ])])) : (T(), x("svg", et, [...S[5] || (S[5] = [
2685
+ Se('<circle cx="12" cy="12" r="5" data-v-00f5b2e7></circle><line x1="12" y1="1" x2="12" y2="3" data-v-00f5b2e7></line><line x1="12" y1="21" x2="12" y2="23" data-v-00f5b2e7></line><line x1="4.22" y1="4.22" x2="5.64" y2="5.64" data-v-00f5b2e7></line><line x1="18.36" y1="18.36" x2="19.78" y2="19.78" data-v-00f5b2e7></line><line x1="1" y1="12" x2="3" y2="12" data-v-00f5b2e7></line><line x1="21" y1="12" x2="23" y2="12" data-v-00f5b2e7></line><line x1="4.22" y1="19.78" x2="5.64" y2="18.36" data-v-00f5b2e7></line><line x1="18.36" y1="5.64" x2="19.78" y2="4.22" data-v-00f5b2e7></line>', 9)
2686
+ ])]))
2687
+ ], 8, Je)
2593
2688
  ])
2594
2689
  ]),
2595
- C.value ? (_(), R("div", Je, H(C.value), 1)) : U("", !0),
2596
- E("div", Qe, [
2597
- i.showEditor ? (_(), R("div", {
2690
+ L.value ? (T(), x("div", tt, H(L.value), 1)) : M("", !0),
2691
+ E("div", nt, [
2692
+ i.showEditor ? (T(), x("div", {
2598
2693
  key: 0,
2599
2694
  class: "hep-cr-editor-panel",
2600
- style: se({ width: g.value + "%" })
2695
+ style: oe({ width: g.value + "%" })
2601
2696
  }, [
2602
- E("div", et, [
2603
- w[4] || (w[4] = E("span", { class: "hep-cr-panel-title" }, "编辑器", -1)),
2604
- E("span", tt, H(e.value), 1)
2697
+ E("div", at, [
2698
+ S[7] || (S[7] = E("span", { class: "hep-cr-panel-title" }, "编辑器", -1)),
2699
+ E("div", rt, [
2700
+ E("span", ot, H(e.value), 1),
2701
+ E("button", {
2702
+ class: G(["hep-cr-btn-icon", { "hep-cr-btn-copied": a.value }]),
2703
+ disabled: a.value,
2704
+ onClick: b,
2705
+ title: a.value ? "已复制" : "复制"
2706
+ }, [
2707
+ a.value ? (T(), x("span", lt, "已复制")) : (T(), x("svg", it, [...S[6] || (S[6] = [
2708
+ E("rect", {
2709
+ x: "9",
2710
+ y: "9",
2711
+ width: "13",
2712
+ height: "13",
2713
+ rx: "2",
2714
+ ry: "2"
2715
+ }, null, -1),
2716
+ E("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" }, null, -1)
2717
+ ])]))
2718
+ ], 10, st)
2719
+ ])
2605
2720
  ]),
2606
- oe(Be, {
2607
- modelValue: s.value,
2608
- "onUpdate:modelValue": w[1] || (w[1] = (x) => s.value = x),
2721
+ se(Ge, {
2722
+ modelValue: o.value,
2723
+ "onUpdate:modelValue": S[1] || (S[1] = (y) => o.value = y),
2609
2724
  language: e.value,
2610
- theme: A.value,
2611
- disabled: !i.editable || T.value
2725
+ theme: k.value,
2726
+ disabled: !i.editable || I.value
2612
2727
  }, null, 8, ["modelValue", "language", "theme", "disabled"])
2613
- ], 4)) : U("", !0),
2614
- i.showEditor ? (_(), R("div", {
2728
+ ], 4)) : M("", !0),
2729
+ i.showEditor ? (T(), x("div", {
2615
2730
  key: 1,
2616
2731
  class: "hep-cr-resize-handle",
2617
- onMousedown: k
2618
- }, [...w[5] || (w[5] = [
2732
+ onMousedown: $
2733
+ }, [...S[8] || (S[8] = [
2619
2734
  E("div", { class: "hep-cr-resize-line" }, null, -1)
2620
- ])], 32)) : U("", !0),
2735
+ ])], 32)) : M("", !0),
2621
2736
  E("div", {
2622
2737
  class: "hep-cr-output-panel",
2623
- style: se({ width: i.showEditor ? 100 - g.value + "%" : "100%" })
2738
+ style: oe({ width: i.showEditor ? 100 - g.value + "%" : "100%" })
2624
2739
  }, [
2625
- E("div", nt, [
2626
- E("div", at, [
2740
+ E("div", ut, [
2741
+ E("div", ct, [
2627
2742
  E("button", {
2628
- class: W(["hep-cr-tab", { active: I.value === "stdout" }]),
2629
- onClick: w[2] || (w[2] = (x) => I.value = "stdout")
2743
+ class: G(["hep-cr-tab", { active: R.value === "stdout" }]),
2744
+ onClick: S[2] || (S[2] = (y) => R.value = "stdout")
2630
2745
  }, " 输出 ", 2),
2631
- m.value ? (_(), R("button", {
2746
+ m.value ? (T(), x("button", {
2632
2747
  key: 0,
2633
- class: W(["hep-cr-tab", { active: I.value === "stderr" }]),
2634
- onClick: w[3] || (w[3] = (x) => I.value = "stderr")
2635
- }, " 错误 ", 2)) : U("", !0)
2748
+ class: G(["hep-cr-tab", "hep-cr-tab-error", { active: R.value === "stderr" }]),
2749
+ onClick: S[3] || (S[3] = (y) => R.value = "stderr")
2750
+ }, " 错误 ", 2)) : M("", !0)
2636
2751
  ]),
2637
- E("div", rt, [
2638
- L.value !== null ? (_(), R("span", st, H(L.value) + "ms ", 1)) : U("", !0),
2752
+ E("div", dt, [
2753
+ N.value !== null ? (T(), x("span", pt, H(N.value) + "ms ", 1)) : M("", !0),
2639
2754
  E("button", {
2640
- class: "hep-cr-btn-icon",
2755
+ class: G(["hep-cr-btn-icon", { "hep-cr-btn-copied": u.value }]),
2756
+ disabled: u.value,
2641
2757
  onClick: c,
2642
- title: "复制"
2643
- }, [...w[6] || (w[6] = [
2644
- E("svg", {
2645
- width: "14",
2646
- height: "14",
2647
- viewBox: "0 0 24 24",
2648
- fill: "none",
2649
- stroke: "currentColor",
2650
- "stroke-width": "2"
2651
- }, [
2758
+ title: u.value ? "已复制" : "复制"
2759
+ }, [
2760
+ u.value ? (T(), x("span", ft, "已复制")) : (T(), x("svg", ht, [...S[9] || (S[9] = [
2652
2761
  E("rect", {
2653
2762
  x: "9",
2654
2763
  y: "9",
@@ -2656,40 +2765,23 @@ const Pe = `
2656
2765
  height: "13",
2657
2766
  rx: "2",
2658
2767
  ry: "2"
2659
- }),
2660
- E("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })
2661
- ], -1)
2662
- ])]),
2663
- E("button", {
2664
- class: "hep-cr-btn-icon",
2665
- onClick: o,
2666
- title: "清除"
2667
- }, [...w[7] || (w[7] = [
2668
- E("svg", {
2669
- width: "14",
2670
- height: "14",
2671
- viewBox: "0 0 24 24",
2672
- fill: "none",
2673
- stroke: "currentColor",
2674
- "stroke-width": "2"
2675
- }, [
2676
- E("polyline", { points: "3 6 5 6 21 6" }),
2677
- E("path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" })
2678
- ], -1)
2679
- ])])
2768
+ }, null, -1),
2769
+ E("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" }, null, -1)
2770
+ ])]))
2771
+ ], 10, gt)
2680
2772
  ])
2681
2773
  ]),
2682
- E("div", ot, [
2683
- I.value === "stdout" ? (_(), R("pre", it, H(f.value || '点击"运行"执行代码'), 1)) : (_(), R("pre", lt, H(m.value), 1))
2774
+ E("div", mt, [
2775
+ R.value === "stdout" ? (T(), x("pre", bt, H(I.value ? "代码执行中..." : f.value || '点击"运行"执行代码'), 1)) : (T(), x("pre", Et, H(m.value), 1))
2684
2776
  ])
2685
2777
  ], 4)
2686
2778
  ])
2687
2779
  ], 2));
2688
2780
  }
2689
- }), J = /* @__PURE__ */ he(ut, [["__scopeId", "data-v-f4bf7f21"]]), ct = { class: "hep-cr-dialog-header" }, dt = { class: "hep-cr-dialog-title" }, pt = { class: "hep-cr-dialog-body" }, gt = {
2781
+ }), q = /* @__PURE__ */ he(vt, [["__scopeId", "data-v-00f5b2e7"]]), yt = { class: "hep-cr-dialog-header" }, At = { class: "hep-cr-dialog-title" }, kt = { class: "hep-cr-dialog-body" }, St = {
2690
2782
  key: 0,
2691
2783
  class: "hep-cr-dialog-footer"
2692
- }, ft = /* @__PURE__ */ ie({
2784
+ }, Tt = /* @__PURE__ */ ie({
2693
2785
  __name: "CodeRunnerDialog",
2694
2786
  props: {
2695
2787
  modelValue: { type: Boolean, default: !1 },
@@ -2706,39 +2798,39 @@ const Pe = `
2706
2798
  },
2707
2799
  emits: ["update:modelValue", "close"],
2708
2800
  setup(i, { expose: d, emit: n }) {
2709
- const l = i, h = n, y = N(l.modelValue), A = G(() => l.modelValue !== void 0 ? l.modelValue : y.value);
2801
+ const l = i, h = n, A = O(l.modelValue), k = B(() => l.modelValue !== void 0 ? l.modelValue : A.value);
2710
2802
  le(
2711
2803
  () => l.modelValue,
2712
2804
  (m) => {
2713
- m !== void 0 && (y.value = m);
2805
+ m !== void 0 && (A.value = m);
2714
2806
  }
2715
2807
  );
2716
- function s() {
2717
- y.value = !1, h("update:modelValue", !1), h("close");
2808
+ function o() {
2809
+ A.value = !1, h("update:modelValue", !1), h("close");
2718
2810
  }
2719
2811
  function f(m) {
2720
- m.target === m.currentTarget && s();
2812
+ m.target === m.currentTarget && o();
2721
2813
  }
2722
2814
  return d({
2723
- close: s
2724
- }), (m, T) => (_(), ke(we, { to: "body" }, [
2725
- oe(Te, { name: "hep-cr-dialog-fade" }, {
2726
- default: Ie(() => [
2727
- A.value ? (_(), R("div", {
2815
+ close: o
2816
+ }), (m, I) => (T(), we(Te, { to: "body" }, [
2817
+ se(_e, { name: "hep-cr-dialog-fade" }, {
2818
+ default: xe(() => [
2819
+ k.value ? (T(), x("div", {
2728
2820
  key: 0,
2729
2821
  class: "hep-cr-dialog-overlay",
2730
2822
  onClick: f
2731
2823
  }, [
2732
2824
  E("div", {
2733
2825
  class: "hep-cr-dialog-container",
2734
- style: se({ width: typeof i.width == "number" ? i.width + "px" : i.width })
2826
+ style: oe({ width: typeof i.width == "number" ? i.width + "px" : i.width })
2735
2827
  }, [
2736
- E("div", ct, [
2737
- E("h3", dt, H(i.title), 1),
2828
+ E("div", yt, [
2829
+ E("h3", At, H(i.title), 1),
2738
2830
  E("button", {
2739
2831
  class: "hep-cr-dialog-close",
2740
- onClick: s
2741
- }, [...T[0] || (T[0] = [
2832
+ onClick: o
2833
+ }, [...I[0] || (I[0] = [
2742
2834
  E("svg", {
2743
2835
  width: "16",
2744
2836
  height: "16",
@@ -2762,30 +2854,30 @@ const Pe = `
2762
2854
  ], -1)
2763
2855
  ])])
2764
2856
  ]),
2765
- E("div", pt, [
2766
- oe(J, Fe(_e(m.$attrs)), null, 16)
2857
+ E("div", kt, [
2858
+ se(q, Ie(Fe(m.$attrs)), null, 16)
2767
2859
  ]),
2768
- m.$slots.footer ? (_(), R("div", gt, [
2769
- Re(m.$slots, "footer", { close: s })
2770
- ])) : U("", !0)
2860
+ m.$slots.footer ? (T(), x("div", St, [
2861
+ Re(m.$slots, "footer", { close: o })
2862
+ ])) : M("", !0)
2771
2863
  ], 4)
2772
- ])) : U("", !0)
2864
+ ])) : M("", !0)
2773
2865
  ]),
2774
2866
  _: 3
2775
2867
  })
2776
2868
  ]));
2777
2869
  }
2778
2870
  });
2779
- J.install = (i) => {
2780
- i.component("CodeRunner", J);
2871
+ q.install = (i) => {
2872
+ i.component("CodeRunner", q);
2781
2873
  };
2782
- const mt = {
2874
+ const _t = {
2783
2875
  install(i) {
2784
- i.component("CodeRunner", J);
2876
+ i.component("CodeRunner", q);
2785
2877
  }
2786
2878
  };
2787
2879
  export {
2788
- J as CodeRunner,
2789
- ft as CodeRunnerDialog,
2790
- mt as default
2880
+ q as CodeRunner,
2881
+ Tt as CodeRunnerDialog,
2882
+ _t as default
2791
2883
  };