@hep-code-runner/vue2 1.0.0 → 1.1.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,12 +1,12 @@
1
- var se = Object.defineProperty, ie = (r, e, t) => e in r ? se(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, V = (r, e, t) => ie(r, typeof e != "symbol" ? e + "" : e, t);
2
- let G = null;
1
+ var se = Object.defineProperty, ie = (a, e, t) => e in a ? se(a, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : a[e] = t, q = (a, e, t) => ie(a, typeof e != "symbol" ? e + "" : e, t);
2
+ let W = null;
3
3
  class oe {
4
4
  constructor(e = {}) {
5
- V(this, "baseUrl"), V(this, "timeout"), this.baseUrl = e.pistonUrl || "/api/piston", this.timeout = e.timeout || 3e3;
5
+ q(this, "baseUrl"), q(this, "timeout"), this.baseUrl = e.pistonUrl || "/api/piston", this.timeout = e.timeout || 3e3;
6
6
  }
7
7
  async getRuntimes(e = !1) {
8
- if (G && !e)
9
- return G;
8
+ if (W && !e)
9
+ return W;
10
10
  try {
11
11
  const t = await fetch(`${this.baseUrl}/runtimes`, {
12
12
  method: "GET",
@@ -17,7 +17,7 @@ class oe {
17
17
  if (!t.ok)
18
18
  throw new Error(`Failed to fetch runtimes: ${t.statusText}`);
19
19
  const l = await t.json();
20
- return G = l, l;
20
+ return W = l, l;
21
21
  } catch (t) {
22
22
  throw console.error("Failed to fetch runtimes:", t), t;
23
23
  }
@@ -25,8 +25,8 @@ class oe {
25
25
  async execute(e, t, l = {}) {
26
26
  const p = (await this.getRuntimes()).find(
27
27
  (h) => {
28
- var S;
29
- return h.language.toLowerCase() === e.toLowerCase() || ((S = h.aliases) == null ? void 0 : S.some((I) => I.toLowerCase() === e.toLowerCase()));
28
+ var A;
29
+ return h.language.toLowerCase() === e.toLowerCase() || ((A = h.aliases) == null ? void 0 : A.some((I) => I.toLowerCase() === e.toLowerCase()));
30
30
  }
31
31
  );
32
32
  if (!p)
@@ -55,17 +55,17 @@ class oe {
55
55
  });
56
56
  if (!h.ok)
57
57
  throw new Error(`Execute failed: ${h.statusText}`);
58
- const S = await h.json(), I = Date.now() - u, L = S.run.stdout || "", F = S.run.stderr || "";
58
+ const A = await h.json(), I = Date.now() - u, x = A.run.stdout || "", F = A.run.stderr || "";
59
59
  return {
60
- success: S.run.code === 0,
61
- output: L,
60
+ success: A.run.code === 0,
61
+ output: x,
62
62
  stderr: F,
63
- code: S.run.code,
63
+ code: A.run.code,
64
64
  executionTime: I,
65
- compile: S.compile ? {
66
- stdout: S.compile.stdout || "",
67
- stderr: S.compile.stderr || "",
68
- code: S.compile.code
65
+ compile: A.compile ? {
66
+ stdout: A.compile.stdout || "",
67
+ stderr: A.compile.stderr || "",
68
+ code: A.compile.code
69
69
  } : void 0
70
70
  };
71
71
  } catch (h) {
@@ -206,17 +206,17 @@ h1 {
206
206
 
207
207
  This is a sample markdown document.`
208
208
  };
209
- function z(r) {
210
- const e = r.toLowerCase();
211
- return le[e] || `// ${r}
209
+ function z(a) {
210
+ const e = a.toLowerCase();
211
+ return le[e] || `// ${a}
212
212
  // Write your code here`;
213
213
  }
214
- var q = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
215
- function ue(r) {
216
- return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
214
+ var J = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
215
+ function ue(a) {
216
+ return a && a.__esModule && Object.prototype.hasOwnProperty.call(a, "default") ? a.default : a;
217
217
  }
218
- var Q = { exports: {} };
219
- (function(r) {
218
+ var ee = { exports: {} };
219
+ (function(a) {
220
220
  var e = typeof window < "u" ? window : typeof WorkerGlobalScope < "u" && self instanceof WorkerGlobalScope ? self : {};
221
221
  /**
222
222
  * Prism: Lightweight, robust, elegant syntax highlighting
@@ -282,8 +282,8 @@ var Q = { exports: {} };
282
282
  * @memberof Prism
283
283
  */
284
284
  util: {
285
- encode: function a(n) {
286
- return n instanceof h ? new h(n.type, a(n.content), n.alias) : Array.isArray(n) ? n.map(a) : n.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/\u00a0/g, " ");
285
+ encode: function r(n) {
286
+ return n instanceof h ? new h(n.type, r(n.content), n.alias) : Array.isArray(n) ? n.map(r) : n.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/\u00a0/g, " ");
287
287
  },
288
288
  /**
289
289
  * Returns the name of the type of the given value.
@@ -301,8 +301,8 @@ var Q = { exports: {} };
301
301
  * type(String) === 'Function'
302
302
  * type(/abc+/) === 'RegExp'
303
303
  */
304
- type: function(a) {
305
- return Object.prototype.toString.call(a).slice(8, -1);
304
+ type: function(r) {
305
+ return Object.prototype.toString.call(r).slice(8, -1);
306
306
  },
307
307
  /**
308
308
  * Returns a unique number for the given object. Later calls will still return the same number.
@@ -310,8 +310,8 @@ var Q = { exports: {} };
310
310
  * @param {Object} obj
311
311
  * @returns {number}
312
312
  */
313
- objId: function(a) {
314
- return a.__id || Object.defineProperty(a, "__id", { value: ++f }), a.__id;
313
+ objId: function(r) {
314
+ return r.__id || Object.defineProperty(r, "__id", { value: ++f }), r.__id;
315
315
  },
316
316
  /**
317
317
  * Creates a deep clone of the given object.
@@ -323,7 +323,7 @@ var Q = { exports: {} };
323
323
  * @returns {T}
324
324
  * @template T
325
325
  */
326
- clone: function a(n, s) {
326
+ clone: function r(n, s) {
327
327
  s = s || {};
328
328
  var i, o;
329
329
  switch (u.util.type(n)) {
@@ -333,7 +333,7 @@ var Q = { exports: {} };
333
333
  i = /** @type {Record<string, any>} */
334
334
  {}, s[o] = i;
335
335
  for (var d in n)
336
- n.hasOwnProperty(d) && (i[d] = a(n[d], s));
336
+ n.hasOwnProperty(d) && (i[d] = r(n[d], s));
337
337
  return (
338
338
  /** @type {any} */
339
339
  i
@@ -342,7 +342,7 @@ var Q = { exports: {} };
342
342
  return o = u.util.objId(n), s[o] ? s[o] : (i = [], s[o] = i, /** @type {Array} */
343
343
  /** @type {any} */
344
344
  n.forEach(function(g, c) {
345
- i[c] = a(g, s);
345
+ i[c] = r(g, s);
346
346
  }), /** @type {any} */
347
347
  i);
348
348
  default:
@@ -357,12 +357,12 @@ var Q = { exports: {} };
357
357
  * @param {Element} element
358
358
  * @returns {string}
359
359
  */
360
- getLanguage: function(a) {
361
- for (; a; ) {
362
- var n = p.exec(a.className);
360
+ getLanguage: function(r) {
361
+ for (; r; ) {
362
+ var n = p.exec(r.className);
363
363
  if (n)
364
364
  return n[1].toLowerCase();
365
- a = a.parentElement;
365
+ r = r.parentElement;
366
366
  }
367
367
  return "none";
368
368
  },
@@ -373,8 +373,8 @@ var Q = { exports: {} };
373
373
  * @param {string} language
374
374
  * @returns {void}
375
375
  */
376
- setLanguage: function(a, n) {
377
- a.className = a.className.replace(RegExp(p, "gi"), ""), a.classList.add("language-" + n);
376
+ setLanguage: function(r, n) {
377
+ r.className = r.className.replace(RegExp(p, "gi"), ""), r.classList.add("language-" + n);
378
378
  },
379
379
  /**
380
380
  * Returns the script element that is currently executing.
@@ -394,11 +394,11 @@ var Q = { exports: {} };
394
394
  try {
395
395
  throw new Error();
396
396
  } catch (i) {
397
- var a = (/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(i.stack) || [])[1];
398
- if (a) {
397
+ var r = (/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(i.stack) || [])[1];
398
+ if (r) {
399
399
  var n = document.getElementsByTagName("script");
400
400
  for (var s in n)
401
- if (n[s].src == a)
401
+ if (n[s].src == r)
402
402
  return n[s];
403
403
  }
404
404
  return null;
@@ -423,14 +423,14 @@ var Q = { exports: {} };
423
423
  * @param {boolean} [defaultActivation=false]
424
424
  * @returns {boolean}
425
425
  */
426
- isActive: function(a, n, s) {
427
- for (var i = "no-" + n; a; ) {
428
- var o = a.classList;
426
+ isActive: function(r, n, s) {
427
+ for (var i = "no-" + n; r; ) {
428
+ var o = r.classList;
429
429
  if (o.contains(n))
430
430
  return !0;
431
431
  if (o.contains(i))
432
432
  return !1;
433
- a = a.parentElement;
433
+ r = r.parentElement;
434
434
  }
435
435
  return !!s;
436
436
  }
@@ -478,8 +478,8 @@ var Q = { exports: {} };
478
478
  * 'color': /\b(?:red|green|blue)\b/
479
479
  * });
480
480
  */
481
- extend: function(a, n) {
482
- var s = u.util.clone(u.languages[a]);
481
+ extend: function(r, n) {
482
+ var s = u.util.clone(u.languages[r]);
483
483
  for (var i in n)
484
484
  s[i] = n[i];
485
485
  return s;
@@ -559,10 +559,10 @@ var Q = { exports: {} };
559
559
  * @returns {Grammar} The new grammar object.
560
560
  * @public
561
561
  */
562
- insertBefore: function(a, n, s, i) {
562
+ insertBefore: function(r, n, s, i) {
563
563
  i = i || /** @type {any} */
564
564
  u.languages;
565
- var o = i[a], d = {};
565
+ var o = i[r], d = {};
566
566
  for (var g in o)
567
567
  if (o.hasOwnProperty(g)) {
568
568
  if (g == n)
@@ -570,20 +570,20 @@ var Q = { exports: {} };
570
570
  s.hasOwnProperty(c) && (d[c] = s[c]);
571
571
  s.hasOwnProperty(g) || (d[g] = o[g]);
572
572
  }
573
- var E = i[a];
574
- return i[a] = d, u.languages.DFS(u.languages, function(y, R) {
575
- R === E && y != a && (this[y] = d);
573
+ var E = i[r];
574
+ return i[r] = d, u.languages.DFS(u.languages, function(S, R) {
575
+ R === E && S != r && (this[S] = d);
576
576
  }), d;
577
577
  },
578
578
  // Traverse a language definition with Depth First Search
579
- DFS: function a(n, s, i, o) {
579
+ DFS: function r(n, s, i, o) {
580
580
  o = o || {};
581
581
  var d = u.util.objId;
582
582
  for (var g in n)
583
583
  if (n.hasOwnProperty(g)) {
584
584
  s.call(n, g, n[g], i || g);
585
585
  var c = n[g], E = u.util.type(c);
586
- E === "Object" && !o[d(c)] ? (o[d(c)] = !0, a(c, s, null, o)) : E === "Array" && !o[d(c)] && (o[d(c)] = !0, a(c, s, g, o));
586
+ E === "Object" && !o[d(c)] ? (o[d(c)] = !0, r(c, s, null, o)) : E === "Array" && !o[d(c)] && (o[d(c)] = !0, r(c, s, g, o));
587
587
  }
588
588
  }
589
589
  },
@@ -600,8 +600,8 @@ var Q = { exports: {} };
600
600
  * @memberof Prism
601
601
  * @public
602
602
  */
603
- highlightAll: function(a, n) {
604
- u.highlightAllUnder(document, a, n);
603
+ highlightAll: function(r, n) {
604
+ u.highlightAllUnder(document, r, n);
605
605
  },
606
606
  /**
607
607
  * Fetches all the descendants of `container` that have a `.language-xxxx` class and then calls
@@ -618,10 +618,10 @@ var Q = { exports: {} };
618
618
  * @memberof Prism
619
619
  * @public
620
620
  */
621
- highlightAllUnder: function(a, n, s) {
621
+ highlightAllUnder: function(r, n, s) {
622
622
  var i = {
623
623
  callback: s,
624
- container: a,
624
+ container: r,
625
625
  selector: 'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'
626
626
  };
627
627
  u.hooks.run("before-highlightall", i), i.elements = Array.prototype.slice.apply(i.container.querySelectorAll(i.selector)), u.hooks.run("before-all-elements-highlight", i);
@@ -656,13 +656,13 @@ var Q = { exports: {} };
656
656
  * @memberof Prism
657
657
  * @public
658
658
  */
659
- highlightElement: function(a, n, s) {
660
- var i = u.util.getLanguage(a), o = u.languages[i];
661
- u.util.setLanguage(a, i);
662
- var d = a.parentElement;
659
+ highlightElement: function(r, n, s) {
660
+ var i = u.util.getLanguage(r), o = u.languages[i];
661
+ u.util.setLanguage(r, i);
662
+ var d = r.parentElement;
663
663
  d && d.nodeName.toLowerCase() === "pre" && u.util.setLanguage(d, i);
664
- var g = a.textContent, c = {
665
- element: a,
664
+ var g = r.textContent, c = {
665
+ element: r,
666
666
  language: i,
667
667
  grammar: o,
668
668
  code: g
@@ -679,10 +679,10 @@ var Q = { exports: {} };
679
679
  return;
680
680
  }
681
681
  if (n && l.Worker) {
682
- var y = new Worker(u.filename);
683
- y.onmessage = function(R) {
682
+ var S = new Worker(u.filename);
683
+ S.onmessage = function(R) {
684
684
  E(R.data);
685
- }, y.postMessage(JSON.stringify({
685
+ }, S.postMessage(JSON.stringify({
686
686
  language: c.language,
687
687
  code: c.code,
688
688
  immediateClose: !0
@@ -710,9 +710,9 @@ var Q = { exports: {} };
710
710
  * @example
711
711
  * Prism.highlight('var foo = true;', Prism.languages.javascript, 'javascript');
712
712
  */
713
- highlight: function(a, n, s) {
713
+ highlight: function(r, n, s) {
714
714
  var i = {
715
- code: a,
715
+ code: r,
716
716
  grammar: n,
717
717
  language: s
718
718
  };
@@ -744,15 +744,15 @@ var Q = { exports: {} };
744
744
  * }
745
745
  * });
746
746
  */
747
- tokenize: function(a, n) {
747
+ tokenize: function(r, n) {
748
748
  var s = n.rest;
749
749
  if (s) {
750
750
  for (var i in s)
751
751
  n[i] = s[i];
752
752
  delete n.rest;
753
753
  }
754
- var o = new L();
755
- return F(o, o.head, a), I(a, o, n, o.head, 0), N(o);
754
+ var o = new x();
755
+ return F(o, o.head, r), I(r, o, n, o.head, 0), O(o);
756
756
  },
757
757
  /**
758
758
  * @namespace
@@ -773,9 +773,9 @@ var Q = { exports: {} };
773
773
  * @param {HookCallback} callback The callback function which is given environment variables.
774
774
  * @public
775
775
  */
776
- add: function(a, n) {
776
+ add: function(r, n) {
777
777
  var s = u.hooks.all;
778
- s[a] = s[a] || [], s[a].push(n);
778
+ s[r] = s[r] || [], s[r].push(n);
779
779
  },
780
780
  /**
781
781
  * Runs a hook invoking all registered callbacks with the given environment variables.
@@ -786,8 +786,8 @@ var Q = { exports: {} };
786
786
  * @param {Object<string, any>} env The environment variables of the hook passed to all callbacks registered.
787
787
  * @public
788
788
  */
789
- run: function(a, n) {
790
- var s = u.hooks.all[a];
789
+ run: function(r, n) {
790
+ var s = u.hooks.all[r];
791
791
  if (!(!s || !s.length))
792
792
  for (var i = 0, o; o = s[i++]; )
793
793
  o(n);
@@ -796,21 +796,21 @@ var Q = { exports: {} };
796
796
  Token: h
797
797
  };
798
798
  l.Prism = u;
799
- function h(a, n, s, i) {
800
- this.type = a, this.content = n, this.alias = s, this.length = (i || "").length | 0;
799
+ function h(r, n, s, i) {
800
+ this.type = r, this.content = n, this.alias = s, this.length = (i || "").length | 0;
801
801
  }
802
- h.stringify = function a(n, s) {
802
+ h.stringify = function r(n, s) {
803
803
  if (typeof n == "string")
804
804
  return n;
805
805
  if (Array.isArray(n)) {
806
806
  var i = "";
807
807
  return n.forEach(function(E) {
808
- i += a(E, s);
808
+ i += r(E, s);
809
809
  }), i;
810
810
  }
811
811
  var o = {
812
812
  type: n.type,
813
- content: a(n.content, s),
813
+ content: r(n.content, s),
814
814
  tag: "span",
815
815
  classes: ["token", n.type],
816
816
  attributes: {},
@@ -822,16 +822,16 @@ var Q = { exports: {} };
822
822
  g += " " + c + '="' + (o.attributes[c] || "").replace(/"/g, "&quot;") + '"';
823
823
  return "<" + o.tag + ' class="' + o.classes.join(" ") + '"' + g + ">" + o.content + "</" + o.tag + ">";
824
824
  };
825
- function S(a, n, s, i) {
826
- a.lastIndex = n;
827
- var o = a.exec(s);
825
+ function A(r, n, s, i) {
826
+ r.lastIndex = n;
827
+ var o = r.exec(s);
828
828
  if (o && i && o[1]) {
829
829
  var d = o[1].length;
830
830
  o.index += d, o[0] = o[0].slice(d);
831
831
  }
832
832
  return o;
833
833
  }
834
- function I(a, n, s, i, o, d) {
834
+ function I(r, n, s, i, o, d) {
835
835
  for (var g in s)
836
836
  if (!(!s.hasOwnProperty(g) || !s[g])) {
837
837
  var c = s[g];
@@ -839,68 +839,68 @@ var Q = { exports: {} };
839
839
  for (var E = 0; E < c.length; ++E) {
840
840
  if (d && d.cause == g + "," + E)
841
841
  return;
842
- var y = c[E], R = y.inside, Y = !!y.lookbehind, X = !!y.greedy, te = y.alias;
843
- if (X && !y.pattern.global) {
844
- var ne = y.pattern.toString().match(/[imsuy]*$/)[0];
845
- y.pattern = RegExp(y.pattern.source, ne + "g");
842
+ var S = c[E], R = S.inside, X = !!S.lookbehind, Z = !!S.greedy, te = S.alias;
843
+ if (Z && !S.pattern.global) {
844
+ var ne = S.pattern.toString().match(/[imsuy]*$/)[0];
845
+ S.pattern = RegExp(S.pattern.source, ne + "g");
846
846
  }
847
- for (var Z = y.pattern || y, T = i.next, _ = o; T !== n.tail && !(d && _ >= d.reach); _ += T.value.length, T = T.next) {
848
- var x = T.value;
849
- if (n.length > a.length)
847
+ for (var K = S.pattern || S, T = i.next, _ = o; T !== n.tail && !(d && _ >= d.reach); _ += T.value.length, T = T.next) {
848
+ var C = T.value;
849
+ if (n.length > r.length)
850
850
  return;
851
- if (!(x instanceof h)) {
852
- var C = 1, w;
853
- if (X) {
854
- if (w = S(Z, _, a, Y), !w || w.index >= a.length)
851
+ if (!(C instanceof h)) {
852
+ var N = 1, w;
853
+ if (Z) {
854
+ if (w = A(K, _, r, X), !w || w.index >= r.length)
855
855
  break;
856
856
  var D = w.index, ae = w.index + w[0].length, k = _;
857
857
  for (k += T.value.length; D >= k; )
858
858
  T = T.next, k += T.value.length;
859
859
  if (k -= T.value.length, _ = k, T.value instanceof h)
860
860
  continue;
861
- for (var O = T; O !== n.tail && (k < ae || typeof O.value == "string"); O = O.next)
862
- C++, k += O.value.length;
863
- C--, x = a.slice(_, k), w.index -= _;
864
- } else if (w = S(Z, 0, x, Y), !w)
861
+ for (var L = T; L !== n.tail && (k < ae || typeof L.value == "string"); L = L.next)
862
+ N++, k += L.value.length;
863
+ N--, C = r.slice(_, k), w.index -= _;
864
+ } else if (w = A(K, 0, C, X), !w)
865
865
  continue;
866
- var D = w.index, P = w[0], U = x.slice(0, D), K = x.slice(D + P.length), H = _ + x.length;
867
- d && H > d.reach && (d.reach = H);
866
+ var D = w.index, P = w[0], H = C.slice(0, D), V = C.slice(D + P.length), B = _ + C.length;
867
+ d && B > d.reach && (d.reach = B);
868
868
  var $ = T.prev;
869
- U && ($ = F(n, $, U), _ += U.length), M(n, $, C);
869
+ H && ($ = F(n, $, H), _ += H.length), U(n, $, N);
870
870
  var re = new h(g, R ? u.tokenize(P, R) : P, te, P);
871
- if (T = F(n, $, re), K && F(n, T, K), C > 1) {
872
- var B = {
871
+ if (T = F(n, $, re), V && F(n, T, V), N > 1) {
872
+ var G = {
873
873
  cause: g + "," + E,
874
- reach: H
874
+ reach: B
875
875
  };
876
- I(a, n, s, T.prev, _, B), d && B.reach > d.reach && (d.reach = B.reach);
876
+ I(r, n, s, T.prev, _, G), d && G.reach > d.reach && (d.reach = G.reach);
877
877
  }
878
878
  }
879
879
  }
880
880
  }
881
881
  }
882
882
  }
883
- function L() {
884
- var a = { value: null, prev: null, next: null }, n = { value: null, prev: a, next: null };
885
- a.next = n, this.head = a, this.tail = n, this.length = 0;
883
+ function x() {
884
+ var r = { value: null, prev: null, next: null }, n = { value: null, prev: r, next: null };
885
+ r.next = n, this.head = r, this.tail = n, this.length = 0;
886
886
  }
887
- function F(a, n, s) {
887
+ function F(r, n, s) {
888
888
  var i = n.next, o = { value: s, prev: n, next: i };
889
- return n.next = o, i.prev = o, a.length++, o;
889
+ return n.next = o, i.prev = o, r.length++, o;
890
890
  }
891
- function M(a, n, s) {
892
- for (var i = n.next, o = 0; o < s && i !== a.tail; o++)
891
+ function U(r, n, s) {
892
+ for (var i = n.next, o = 0; o < s && i !== r.tail; o++)
893
893
  i = i.next;
894
- n.next = i, i.prev = n, a.length -= o;
894
+ n.next = i, i.prev = n, r.length -= o;
895
895
  }
896
- function N(a) {
897
- for (var n = [], s = a.head.next; s !== a.tail; )
896
+ function O(r) {
897
+ for (var n = [], s = r.head.next; s !== r.tail; )
898
898
  n.push(s.value), s = s.next;
899
899
  return n;
900
900
  }
901
901
  if (!l.document)
902
- return l.addEventListener && (u.disableWorkerMessageHandler || l.addEventListener("message", function(a) {
903
- var n = JSON.parse(a.data), s = n.language, i = n.code, o = n.immediateClose;
902
+ return l.addEventListener && (u.disableWorkerMessageHandler || l.addEventListener("message", function(r) {
903
+ var n = JSON.parse(r.data), s = n.language, i = n.code, o = n.immediateClose;
904
904
  l.postMessage(u.highlight(i, u.languages[s], s)), o && l.close();
905
905
  }, !1)), u;
906
906
  var v = u.util.currentScript();
@@ -909,12 +909,12 @@ var Q = { exports: {} };
909
909
  u.manual || u.highlightAll();
910
910
  }
911
911
  if (!u.manual) {
912
- var A = document.readyState;
913
- A === "loading" || A === "interactive" && v && v.defer ? document.addEventListener("DOMContentLoaded", m) : window.requestAnimationFrame ? window.requestAnimationFrame(m) : window.setTimeout(m, 16);
912
+ var y = document.readyState;
913
+ y === "loading" || y === "interactive" && v && v.defer ? document.addEventListener("DOMContentLoaded", m) : window.requestAnimationFrame ? window.requestAnimationFrame(m) : window.setTimeout(m, 16);
914
914
  }
915
915
  return u;
916
916
  }(e);
917
- r.exports && (r.exports = t), typeof q < "u" && (q.Prism = t), t.languages.markup = {
917
+ a.exports && (a.exports = t), typeof J < "u" && (J.Prism = t), t.languages.markup = {
918
918
  comment: {
919
919
  pattern: /<!--(?:(?!<!--)[\s\S])*?-->/,
920
920
  greedy: !0
@@ -1304,52 +1304,52 @@ var Q = { exports: {} };
1304
1304
  bat: "batch",
1305
1305
  h: "c",
1306
1306
  tex: "latex"
1307
- }, u = "data-src-status", h = "loading", S = "loaded", I = "failed", L = "pre[data-src]:not([" + u + '="' + S + '"]):not([' + u + '="' + h + '"])';
1308
- function F(v, m, A) {
1309
- var a = new XMLHttpRequest();
1310
- a.open("GET", v, !0), a.onreadystatechange = function() {
1311
- a.readyState == 4 && (a.status < 400 && a.responseText ? m(a.responseText) : a.status >= 400 ? A(p(a.status, a.statusText)) : A(f));
1312
- }, a.send(null);
1307
+ }, u = "data-src-status", h = "loading", A = "loaded", I = "failed", x = "pre[data-src]:not([" + u + '="' + A + '"]):not([' + u + '="' + h + '"])';
1308
+ function F(v, m, y) {
1309
+ var r = new XMLHttpRequest();
1310
+ r.open("GET", v, !0), r.onreadystatechange = function() {
1311
+ r.readyState == 4 && (r.status < 400 && r.responseText ? m(r.responseText) : r.status >= 400 ? y(p(r.status, r.statusText)) : y(f));
1312
+ }, r.send(null);
1313
1313
  }
1314
- function M(v) {
1314
+ function U(v) {
1315
1315
  var m = /^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(v || "");
1316
1316
  if (m) {
1317
- var A = Number(m[1]), a = m[2], n = m[3];
1318
- return a ? n ? [A, Number(n)] : [A, void 0] : [A, A];
1317
+ var y = Number(m[1]), r = m[2], n = m[3];
1318
+ return r ? n ? [y, Number(n)] : [y, void 0] : [y, y];
1319
1319
  }
1320
1320
  }
1321
1321
  t.hooks.add("before-highlightall", function(v) {
1322
- v.selector += ", " + L;
1322
+ v.selector += ", " + x;
1323
1323
  }), t.hooks.add("before-sanity-check", function(v) {
1324
1324
  var m = (
1325
1325
  /** @type {HTMLPreElement} */
1326
1326
  v.element
1327
1327
  );
1328
- if (m.matches(L)) {
1328
+ if (m.matches(x)) {
1329
1329
  v.code = "", m.setAttribute(u, h);
1330
- var A = m.appendChild(document.createElement("CODE"));
1331
- A.textContent = l;
1332
- var a = m.getAttribute("data-src"), n = v.language;
1330
+ var y = m.appendChild(document.createElement("CODE"));
1331
+ y.textContent = l;
1332
+ var r = m.getAttribute("data-src"), n = v.language;
1333
1333
  if (n === "none") {
1334
- var s = (/\.(\w+)$/.exec(a) || [, "none"])[1];
1334
+ var s = (/\.(\w+)$/.exec(r) || [, "none"])[1];
1335
1335
  n = b[s] || s;
1336
1336
  }
1337
- t.util.setLanguage(A, n), t.util.setLanguage(m, n);
1337
+ t.util.setLanguage(y, n), t.util.setLanguage(m, n);
1338
1338
  var i = t.plugins.autoloader;
1339
1339
  i && i.loadLanguages(n), F(
1340
- a,
1340
+ r,
1341
1341
  function(o) {
1342
- m.setAttribute(u, S);
1343
- var d = M(m.getAttribute("data-range"));
1342
+ m.setAttribute(u, A);
1343
+ var d = U(m.getAttribute("data-range"));
1344
1344
  if (d) {
1345
1345
  var g = o.split(/\r\n?|\n/g), c = d[0], E = d[1] == null ? g.length : d[1];
1346
1346
  c < 0 && (c += g.length), c = Math.max(0, Math.min(c - 1, g.length)), E < 0 && (E += g.length), E = Math.max(0, Math.min(E, g.length)), o = g.slice(c, E).join(`
1347
1347
  `), m.hasAttribute("data-start") || m.setAttribute("data-start", String(c + 1));
1348
1348
  }
1349
- A.textContent = o, t.highlightElement(A);
1349
+ y.textContent = o, t.highlightElement(y);
1350
1350
  },
1351
1351
  function(o) {
1352
- m.setAttribute(u, I), A.textContent = o;
1352
+ m.setAttribute(u, I), y.textContent = o;
1353
1353
  }
1354
1354
  );
1355
1355
  }
@@ -1362,17 +1362,17 @@ var Q = { exports: {} };
1362
1362
  * @param {ParentNode} [container=document]
1363
1363
  */
1364
1364
  highlight: function(m) {
1365
- for (var A = (m || document).querySelectorAll(L), a = 0, n; n = A[a++]; )
1365
+ for (var y = (m || document).querySelectorAll(x), r = 0, n; n = y[r++]; )
1366
1366
  t.highlightElement(n);
1367
1367
  }
1368
1368
  };
1369
- var N = !1;
1369
+ var O = !1;
1370
1370
  t.fileHighlight = function() {
1371
- N || (console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."), N = !0), t.plugins.fileHighlight.highlight.apply(this, arguments);
1371
+ O || (console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."), O = !0), t.plugins.fileHighlight.highlight.apply(this, arguments);
1372
1372
  };
1373
1373
  }();
1374
- })(Q);
1375
- var ce = Q.exports;
1374
+ })(ee);
1375
+ var ce = ee.exports;
1376
1376
  const j = /* @__PURE__ */ ue(ce);
1377
1377
  Prism.languages.clike = {
1378
1378
  comment: [
@@ -1631,7 +1631,7 @@ Prism.languages.insertBefore("go", "string", {
1631
1631
  }
1632
1632
  });
1633
1633
  delete Prism.languages.go["class-name"];
1634
- (function(r) {
1634
+ (function(a) {
1635
1635
  var e = /\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/, t = /(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source, l = {
1636
1636
  pattern: RegExp(/(^|[^\w.])/.source + t + /[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),
1637
1637
  lookbehind: !0,
@@ -1645,7 +1645,7 @@ delete Prism.languages.go["class-name"];
1645
1645
  punctuation: /\./
1646
1646
  }
1647
1647
  };
1648
- r.languages.java = r.languages.extend("clike", {
1648
+ a.languages.java = a.languages.extend("clike", {
1649
1649
  string: {
1650
1650
  pattern: /(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,
1651
1651
  lookbehind: !0,
@@ -1670,7 +1670,7 @@ delete Prism.languages.go["class-name"];
1670
1670
  ],
1671
1671
  keyword: e,
1672
1672
  function: [
1673
- r.languages.clike.function,
1673
+ a.languages.clike.function,
1674
1674
  {
1675
1675
  pattern: /(::\s*)[a-z_]\w*/,
1676
1676
  lookbehind: !0
@@ -1682,7 +1682,7 @@ delete Prism.languages.go["class-name"];
1682
1682
  lookbehind: !0
1683
1683
  },
1684
1684
  constant: /\b[A-Z][A-Z_\d]+\b/
1685
- }), r.languages.insertBefore("java", "string", {
1685
+ }), a.languages.insertBefore("java", "string", {
1686
1686
  "triple-quoted-string": {
1687
1687
  // http://openjdk.java.net/jeps/355#Description
1688
1688
  pattern: /"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,
@@ -1693,7 +1693,7 @@ delete Prism.languages.go["class-name"];
1693
1693
  pattern: /'(?:\\.|[^'\\\r\n]){1,6}'/,
1694
1694
  greedy: !0
1695
1695
  }
1696
- }), r.languages.insertBefore("java", "class-name", {
1696
+ }), a.languages.insertBefore("java", "class-name", {
1697
1697
  annotation: {
1698
1698
  pattern: /(^|[^.])@\w+(?:\s*\.\s*\w+)*/,
1699
1699
  lookbehind: !0,
@@ -1821,14 +1821,14 @@ Prism.languages.insertBefore("c", "function", {
1821
1821
  constant: /\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/
1822
1822
  });
1823
1823
  delete Prism.languages.c.boolean;
1824
- (function(r) {
1824
+ (function(a) {
1825
1825
  for (var e = /\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source, t = 0; t < 2; t++)
1826
1826
  e = e.replace(/<self>/g, function() {
1827
1827
  return e;
1828
1828
  });
1829
1829
  e = e.replace(/<self>/g, function() {
1830
1830
  return /[^\s\S]/.source;
1831
- }), r.languages.rust = {
1831
+ }), a.languages.rust = {
1832
1832
  comment: [
1833
1833
  {
1834
1834
  pattern: RegExp(/(^|[^\\])/.source + e),
@@ -1935,7 +1935,7 @@ delete Prism.languages.c.boolean;
1935
1935
  boolean: /\b(?:false|true)\b/,
1936
1936
  punctuation: /->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,
1937
1937
  operator: /[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/
1938
- }, r.languages.rust["closure-params"].inside.rest = r.languages.rust, r.languages.rust.attribute.inside.string = r.languages.rust.string;
1938
+ }, a.languages.rust["closure-params"].inside.rest = a.languages.rust, a.languages.rust.attribute.inside.string = a.languages.rust.string;
1939
1939
  })(Prism);
1940
1940
  Prism.languages.sql = {
1941
1941
  comment: {
@@ -1970,7 +1970,7 @@ Prism.languages.sql = {
1970
1970
  operator: /[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,
1971
1971
  punctuation: /[;[\]()`,.]/
1972
1972
  };
1973
- (function(r) {
1973
+ (function(a) {
1974
1974
  var e = "\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b", t = {
1975
1975
  pattern: /(^(["']?)\w+\2)[ \t]+\S.*/,
1976
1976
  lookbehind: !0,
@@ -2032,7 +2032,7 @@ Prism.languages.sql = {
2032
2032
  // Escape sequences from echo and printf's manuals, and escaped quotes.
2033
2033
  entity: /\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/
2034
2034
  };
2035
- r.languages.bash = {
2035
+ a.languages.bash = {
2036
2036
  shebang: {
2037
2037
  pattern: /^#!\s*\/.*/,
2038
2038
  alias: "important"
@@ -2168,7 +2168,7 @@ Prism.languages.sql = {
2168
2168
  pattern: /(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,
2169
2169
  lookbehind: !0
2170
2170
  }
2171
- }, t.inside = r.languages.bash;
2171
+ }, t.inside = a.languages.bash;
2172
2172
  for (var p = [
2173
2173
  "comment",
2174
2174
  "function-name",
@@ -2186,8 +2186,8 @@ Prism.languages.sql = {
2186
2186
  "punctuation",
2187
2187
  "number"
2188
2188
  ], f = l.variable[1].inside, b = 0; b < p.length; b++)
2189
- f[p[b]] = r.languages.bash[p[b]];
2190
- r.languages.sh = r.languages.bash, r.languages.shell = r.languages.bash;
2189
+ f[p[b]] = a.languages.bash[p[b]];
2190
+ a.languages.sh = a.languages.bash, a.languages.shell = a.languages.bash;
2191
2191
  })(Prism);
2192
2192
  Prism.languages.json = {
2193
2193
  property: {
@@ -2214,16 +2214,16 @@ Prism.languages.json = {
2214
2214
  }
2215
2215
  };
2216
2216
  Prism.languages.webmanifest = Prism.languages.json;
2217
- function ee(r, e, t, l, p, f, b, u) {
2218
- var h = typeof r == "function" ? r.options : r;
2217
+ function Y(a, e, t, l, p, f, b, u) {
2218
+ var h = typeof a == "function" ? a.options : a;
2219
2219
  return e && (h.render = e, h.staticRenderFns = t, h._compiled = !0), f && (h._scopeId = "data-v-" + f), {
2220
- exports: r,
2220
+ exports: a,
2221
2221
  options: h
2222
2222
  };
2223
2223
  }
2224
- function J(r) {
2224
+ function Q(a) {
2225
2225
  if (!(typeof document > "u")) {
2226
- var e = r === "dark" ? "prism-okaidia" : "prism", t = document.getElementById("prism-theme-style"), l = "https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/themes/" + e + ".min.css";
2226
+ var e = a === "dark" ? "prism-okaidia" : "prism", t = document.getElementById("prism-theme-style"), l = "https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/themes/" + e + ".min.css";
2227
2227
  if (t)
2228
2228
  t.setAttribute("href", l);
2229
2229
  else {
@@ -2301,11 +2301,11 @@ const de = {
2301
2301
  },
2302
2302
  highlightedCode: function() {
2303
2303
  try {
2304
- var r = j.languages[this.prismLanguage];
2305
- if (r)
2304
+ var a = j.languages[this.prismLanguage];
2305
+ if (a)
2306
2306
  return j.highlight(
2307
2307
  this.value || "",
2308
- r,
2308
+ a,
2309
2309
  this.prismLanguage
2310
2310
  );
2311
2311
  } catch {
@@ -2314,29 +2314,29 @@ const de = {
2314
2314
  }
2315
2315
  },
2316
2316
  watch: {
2317
- theme: function(r) {
2318
- J(r);
2317
+ theme: function(a) {
2318
+ Q(a);
2319
2319
  }
2320
2320
  },
2321
2321
  mounted: function() {
2322
- J(this.theme);
2322
+ Q(this.theme);
2323
2323
  },
2324
2324
  methods: {
2325
- escapeHtml: function(r) {
2325
+ escapeHtml: function(a) {
2326
2326
  var e = document.createElement("div");
2327
- return e.textContent = r, e.innerHTML;
2327
+ return e.textContent = a, e.innerHTML;
2328
2328
  },
2329
- handleInput: function(r) {
2330
- this.$emit("input", r.target.value), this.$emit("update:value", r.target.value);
2329
+ handleInput: function(a) {
2330
+ this.$emit("input", a.target.value), this.$emit("update:value", a.target.value);
2331
2331
  },
2332
- handleScroll: function(r) {
2332
+ handleScroll: function(a) {
2333
2333
  var e = this.$refs.highlightRef;
2334
- e && (e.scrollTop = r.target.scrollTop, e.scrollLeft = r.target.scrollLeft);
2334
+ e && (e.scrollTop = a.target.scrollTop, e.scrollLeft = a.target.scrollLeft);
2335
2335
  },
2336
- handleKeydown: function(r) {
2337
- if (r.key === "Tab") {
2338
- r.preventDefault();
2339
- var e = r.target, t = e.selectionStart, l = e.selectionEnd, p = e.value;
2336
+ handleKeydown: function(a) {
2337
+ if (a.key === "Tab") {
2338
+ a.preventDefault();
2339
+ var e = a.target, t = e.selectionStart, l = e.selectionEnd, p = e.value;
2340
2340
  e.value = p.substring(0, t) + " " + p.substring(l), e.selectionStart = e.selectionEnd = t + 2, this.$emit("input", e.value), this.$emit("update:value", e.value);
2341
2341
  }
2342
2342
  }
@@ -2345,7 +2345,7 @@ const de = {
2345
2345
  var pe = function() {
2346
2346
  var e = this, t = e._self._c;
2347
2347
  return t("div", { staticClass: "code-editor", class: "theme-" + e.theme, style: { background: e.editorBackground } }, [t("pre", { ref: "highlightRef", staticClass: "code-highlight", class: "language-" + e.prismLanguage, attrs: { "aria-hidden": "true" } }, [t("code", { domProps: { innerHTML: e._s(e.highlightedCode) } })]), t("textarea", { staticClass: "code-input", attrs: { disabled: e.disabled, spellcheck: "false", placeholder: "Write your code here..." }, domProps: { value: e.value }, on: { input: e.handleInput, scroll: e.handleScroll, keydown: e.handleKeydown } })]);
2348
- }, ge = [], he = /* @__PURE__ */ ee(
2348
+ }, ge = [], he = /* @__PURE__ */ Y(
2349
2349
  de,
2350
2350
  pe,
2351
2351
  ge,
@@ -2370,8 +2370,8 @@ const fe = he.exports, me = {
2370
2370
  theme: {
2371
2371
  type: String,
2372
2372
  default: "light",
2373
- validator: function(r) {
2374
- return ["light", "dark"].indexOf(r) !== -1;
2373
+ validator: function(a) {
2374
+ return ["light", "dark"].indexOf(a) !== -1;
2375
2375
  }
2376
2376
  },
2377
2377
  showLanguageSelector: {
@@ -2417,21 +2417,21 @@ const fe = he.exports, me = {
2417
2417
  return "code-runner-" + this.currentTheme;
2418
2418
  },
2419
2419
  languageOptions: function() {
2420
- return this.runtimes.map(function(r) {
2420
+ return this.runtimes.map(function(a) {
2421
2421
  return {
2422
- value: r.language + ":" + r.version,
2423
- label: r.language.charAt(0).toUpperCase() + r.language.slice(1) + " " + r.version
2422
+ value: a.language + ":" + a.version,
2423
+ label: a.language.charAt(0).toUpperCase() + a.language.slice(1) + " " + a.version
2424
2424
  };
2425
2425
  });
2426
2426
  },
2427
2427
  languageName: function() {
2428
- var r = this.currentLanguage;
2429
- return r.includes(":") ? r.split(":")[0] : r;
2428
+ var a = this.currentLanguage;
2429
+ return a.includes(":") ? a.split(":")[0] : a;
2430
2430
  }
2431
2431
  },
2432
2432
  watch: {
2433
- currentLanguage: function(r) {
2434
- var e = r.includes(":") ? r.split(":")[0] : r;
2433
+ currentLanguage: function(a) {
2434
+ var e = a.includes(":") ? a.split(":")[0] : a;
2435
2435
  this.code = z(e), this.$emit("language-change", e, this.code);
2436
2436
  }
2437
2437
  },
@@ -2440,36 +2440,36 @@ const fe = he.exports, me = {
2440
2440
  },
2441
2441
  methods: {
2442
2442
  loadRuntimes: function() {
2443
- var r = this;
2443
+ var a = this;
2444
2444
  this.runtimesLoading = !0, this.error = null, this.client.getRuntimes().then(function(e) {
2445
- r.runtimes = e;
2445
+ a.runtimes = e;
2446
2446
  }).catch(function(e) {
2447
- r.error = e.message || "Failed to load runtimes";
2447
+ a.error = e.message || "Failed to load runtimes";
2448
2448
  }).finally(function() {
2449
- r.runtimesLoading = !1;
2449
+ a.runtimesLoading = !1;
2450
2450
  });
2451
2451
  },
2452
2452
  execute: function() {
2453
- var r = this;
2453
+ var a = this;
2454
2454
  this.isRunning || (this.isRunning = !0, this.output = "", this.stderr = "", this.executionTime = null, this.error = null, this.activeTab = "stdout", this.$emit("execute-start"), this.client.execute(this.languageName, this.code).then(function(e) {
2455
- r.output = e.output, r.stderr = e.stderr, r.executionTime = e.executionTime || null, r.activeTab = e.stderr ? "stderr" : "stdout", r.$emit("execute-end", e);
2455
+ a.output = e.output, a.stderr = e.stderr, a.executionTime = e.executionTime || null, a.activeTab = e.stderr ? "stderr" : "stdout", a.$emit("execute-end", e);
2456
2456
  }).catch(function(e) {
2457
- r.error = e.message || "Execution failed", r.$emit("execute-end", {
2457
+ a.error = e.message || "Execution failed", a.$emit("execute-end", {
2458
2458
  success: !1,
2459
2459
  output: "",
2460
- stderr: r.error,
2460
+ stderr: a.error,
2461
2461
  code: -1
2462
2462
  });
2463
2463
  }).finally(function() {
2464
- r.isRunning = !1;
2464
+ a.isRunning = !1;
2465
2465
  }));
2466
2466
  },
2467
2467
  clearOutput: function() {
2468
2468
  this.output = "", this.stderr = "", this.executionTime = null, this.error = null;
2469
2469
  },
2470
2470
  copyOutput: function() {
2471
- var r = this.activeTab === "stdout" ? this.output : this.stderr;
2472
- navigator.clipboard.writeText(r);
2471
+ var a = this.activeTab === "stdout" ? this.output : this.stderr;
2472
+ navigator.clipboard.writeText(a);
2473
2473
  },
2474
2474
  resetCode: function() {
2475
2475
  this.code = z(this.languageName);
@@ -2477,7 +2477,7 @@ const fe = he.exports, me = {
2477
2477
  toggleTheme: function() {
2478
2478
  this.currentTheme = this.currentTheme === "light" ? "dark" : "light";
2479
2479
  },
2480
- startDrag: function(r) {
2480
+ startDrag: function(a) {
2481
2481
  var e = this, t = document.querySelector(".code-runner-main");
2482
2482
  if (t) {
2483
2483
  var l = function(f) {
@@ -2510,7 +2510,7 @@ var be = function() {
2510
2510
  } } }, [e._v(" 输出 ")]), e.stderr ? t("button", { class: ["tab", { active: e.activeTab === "stderr" }], on: { click: function(l) {
2511
2511
  e.activeTab = "stderr";
2512
2512
  } } }, [e._v(" 错误 ")]) : e._e()]), t("div", { staticClass: "output-actions" }, [e.executionTime !== null ? t("span", { staticClass: "execution-time" }, [e._v(" " + e._s(e.executionTime) + "ms ")]) : e._e(), t("button", { staticClass: "btn-icon", attrs: { title: "复制" }, on: { click: e.copyOutput } }, [t("svg", { attrs: { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" } }, [t("rect", { attrs: { x: "9", y: "9", width: "13", height: "13", rx: "2", ry: "2" } }), t("path", { attrs: { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" } })])]), t("button", { staticClass: "btn-icon", attrs: { title: "清除" }, on: { click: e.clearOutput } }, [t("svg", { attrs: { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" } }, [t("polyline", { attrs: { points: "3 6 5 6 21 6" } }), t("path", { attrs: { 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" } })])])])]), t("div", { staticClass: "output-content" }, [e.activeTab === "stdout" ? t("pre", [e._v(e._s(e.output || '点击"运行"执行代码'))]) : t("pre", { staticClass: "stderr" }, [e._v(e._s(e.stderr))])])])])]);
2513
- }, Ee = [], ve = /* @__PURE__ */ ee(
2513
+ }, Ee = [], ve = /* @__PURE__ */ Y(
2514
2514
  me,
2515
2515
  be,
2516
2516
  Ee,
@@ -2518,16 +2518,76 @@ var be = function() {
2518
2518
  null,
2519
2519
  "95eacecd"
2520
2520
  );
2521
- const W = ve.exports;
2522
- W.install = (r) => {
2523
- r.component("CodeRunner", W);
2521
+ const M = ve.exports, ye = {
2522
+ name: "CodeRunnerDialog",
2523
+ components: {
2524
+ CodeRunner: M
2525
+ },
2526
+ props: {
2527
+ value: {
2528
+ type: Boolean,
2529
+ default: !1
2530
+ },
2531
+ title: {
2532
+ type: String,
2533
+ default: "代码执行器"
2534
+ },
2535
+ width: {
2536
+ type: [String, Number],
2537
+ default: 800
2538
+ }
2539
+ },
2540
+ model: {
2541
+ prop: "value",
2542
+ event: "input"
2543
+ },
2544
+ data() {
2545
+ return {
2546
+ localVisible: this.value
2547
+ };
2548
+ },
2549
+ computed: {
2550
+ dialogWidth() {
2551
+ return typeof this.width == "number" ? this.width + "px" : this.width;
2552
+ }
2553
+ },
2554
+ watch: {
2555
+ value(a) {
2556
+ this.localVisible = a;
2557
+ }
2558
+ },
2559
+ methods: {
2560
+ close() {
2561
+ this.localVisible = !1, this.$emit("input", !1), this.$emit("update:value", !1), this.$emit("close");
2562
+ },
2563
+ handleOverlayClick(a) {
2564
+ a.target === a.currentTarget && this.close();
2565
+ }
2566
+ },
2567
+ expose: ["close"]
2568
+ };
2569
+ var Ae = function() {
2570
+ var e = this, t = e._self._c;
2571
+ return t("Teleport", { attrs: { to: "body" } }, [t("Transition", { attrs: { name: "dialog-fade" } }, [e.localVisible ? t("div", { staticClass: "dialog-overlay", on: { click: e.handleOverlayClick } }, [t("div", { staticClass: "dialog-container", style: { width: e.dialogWidth } }, [t("div", { staticClass: "dialog-header" }, [t("h3", { staticClass: "dialog-title" }, [e._v(e._s(e.title))]), t("button", { staticClass: "dialog-close", on: { click: e.close } }, [t("svg", { attrs: { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" } }, [t("line", { attrs: { x1: "18", y1: "6", x2: "6", y2: "18" } }), t("line", { attrs: { x1: "6", y1: "6", x2: "18", y2: "18" } })])])]), t("div", { staticClass: "dialog-body" }, [t("CodeRunner", e._b({}, "CodeRunner", e.$attrs, !1))], 1), e.$slots.footer ? t("div", { staticClass: "dialog-footer" }, [e._t("footer", null, { close: e.close })], 2) : e._e()])]) : e._e()])], 1);
2572
+ }, Se = [], Te = /* @__PURE__ */ Y(
2573
+ ye,
2574
+ Ae,
2575
+ Se,
2576
+ !1,
2577
+ null,
2578
+ "206b41af"
2579
+ );
2580
+ const we = Te.exports;
2581
+ M.install = (a) => {
2582
+ a.component("CodeRunner", M);
2524
2583
  };
2525
- const Ae = {
2526
- install(r) {
2527
- r.component("CodeRunner", W);
2584
+ const _e = {
2585
+ install(a) {
2586
+ a.component("CodeRunner", M);
2528
2587
  }
2529
2588
  };
2530
2589
  export {
2531
- W as CodeRunner,
2532
- Ae as default
2590
+ M as CodeRunner,
2591
+ we as CodeRunnerDialog,
2592
+ _e as default
2533
2593
  };