artifactuse 0.1.23 → 0.1.25
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/README.md +48 -3
- package/dist/core/index.d.ts +1 -0
- package/dist/{index-BR2-i8NP.js → index-Bzk5VnG1.js} +1411 -1368
- package/dist/index.js +1 -1
- package/dist/react/index.js +151 -146
- package/dist/svelte/index.d.ts +6 -0
- package/dist/svelte/index.js +397 -392
- package/dist/vue/index.d.ts +4 -0
- package/dist/vue/index.js +9 -3
- package/dist/vue2/composables.d.ts +4 -0
- package/dist/vue2/index.js +72 -11
- package/package.json +1 -1
package/dist/svelte/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { writable as ca, derived as Da } from "svelte/store";
|
|
2
|
-
import { createEventDispatcher as oa, onMount as
|
|
3
|
-
import { g as Wt, f as ir, a as Va, b as nr, n as yr, i as Vr, D as Ur, c as Or } from "../index-
|
|
2
|
+
import { createEventDispatcher as oa, onMount as ua, onDestroy as Aa, tick as Xt, setContext as Rr, getContext as Dr } from "svelte";
|
|
3
|
+
import { g as Wt, f as ir, a as Va, b as nr, n as yr, i as Vr, D as Ur, c as Or } from "../index-Bzk5VnG1.js";
|
|
4
4
|
import "svelte/internal/disclose-version";
|
|
5
5
|
import "svelte/internal/flags/legacy";
|
|
6
6
|
import * as e from "svelte/internal/client";
|
|
@@ -11,15 +11,15 @@ function Zr(Be, d) {
|
|
|
11
11
|
e.push(d, !1);
|
|
12
12
|
const fe = e.mutable_source(), H = e.mutable_source(), x = e.mutable_source();
|
|
13
13
|
let s = e.prop(d, "artifact", 8), r = e.prop(d, "isActive", 8, !1);
|
|
14
|
-
const
|
|
14
|
+
const u = oa();
|
|
15
15
|
let y = e.mutable_source(!1);
|
|
16
16
|
function a(T) {
|
|
17
|
-
T.stopPropagation(),
|
|
17
|
+
T.stopPropagation(), u("open", s());
|
|
18
18
|
}
|
|
19
19
|
async function pe(T) {
|
|
20
20
|
T.stopPropagation();
|
|
21
21
|
try {
|
|
22
|
-
await navigator.clipboard.writeText(s().code), e.set(y, !0),
|
|
22
|
+
await navigator.clipboard.writeText(s().code), e.set(y, !0), u("copy", s()), setTimeout(
|
|
23
23
|
() => {
|
|
24
24
|
e.set(y, !1);
|
|
25
25
|
},
|
|
@@ -29,14 +29,14 @@ function Zr(Be, d) {
|
|
|
29
29
|
const $e = document.createElement("textarea");
|
|
30
30
|
$e.value = s().code, $e.style.position = "fixed", $e.style.opacity = "0", document.body.appendChild($e), $e.select();
|
|
31
31
|
try {
|
|
32
|
-
document.execCommand("copy"), e.set(y, !0),
|
|
32
|
+
document.execCommand("copy"), e.set(y, !0), u("copy", s()), setTimeout(
|
|
33
33
|
() => {
|
|
34
34
|
e.set(y, !1);
|
|
35
35
|
},
|
|
36
36
|
2e3
|
|
37
37
|
);
|
|
38
|
-
} catch (
|
|
39
|
-
console.error("Failed to copy:",
|
|
38
|
+
} catch (Fe) {
|
|
39
|
+
console.error("Failed to copy:", Fe);
|
|
40
40
|
}
|
|
41
41
|
document.body.removeChild($e);
|
|
42
42
|
}
|
|
@@ -44,8 +44,8 @@ function Zr(Be, d) {
|
|
|
44
44
|
function ke(T) {
|
|
45
45
|
var l;
|
|
46
46
|
T.stopPropagation();
|
|
47
|
-
const Ce = new Blob([s().code], { type: "text/plain" }), $e = URL.createObjectURL(Ce),
|
|
48
|
-
|
|
47
|
+
const Ce = new Blob([s().code], { type: "text/plain" }), $e = URL.createObjectURL(Ce), Fe = document.createElement("a"), Ye = nr(s().language), Qe = ((l = s().title) == null ? void 0 : l.replace(/[^a-z0-9]/gi, "_").toLowerCase()) || "code";
|
|
48
|
+
Fe.href = $e, Fe.download = `${Qe}.${Ye}`, document.body.appendChild(Fe), Fe.click(), document.body.removeChild(Fe), URL.revokeObjectURL($e), u("download", s());
|
|
49
49
|
}
|
|
50
50
|
e.legacy_pre_effect(() => e.deep_read_state(s()), () => {
|
|
51
51
|
e.set(fe, Wt(s().language));
|
|
@@ -67,7 +67,7 @@ function Zr(Be, d) {
|
|
|
67
67
|
e.reset(ce), e.reset(P), e.reset(_);
|
|
68
68
|
var He = e.sibling(_, 2), xe = e.child(He), ze = e.child(xe);
|
|
69
69
|
{
|
|
70
|
-
var
|
|
70
|
+
var qe = (T) => {
|
|
71
71
|
var Ce = Jr();
|
|
72
72
|
e.append(T, Ce);
|
|
73
73
|
}, Xe = (T) => {
|
|
@@ -75,7 +75,7 @@ function Zr(Be, d) {
|
|
|
75
75
|
e.append(T, Ce);
|
|
76
76
|
};
|
|
77
77
|
e.if(ze, (T) => {
|
|
78
|
-
e.get(y) ? T(Xe, !1) : T(
|
|
78
|
+
e.get(y) ? T(Xe, !1) : T(qe);
|
|
79
79
|
});
|
|
80
80
|
}
|
|
81
81
|
e.reset(xe);
|
|
@@ -84,10 +84,10 @@ function Zr(Be, d) {
|
|
|
84
84
|
ae = e.set_class(j, 1, "artifactuse-card", null, ae, { "artifactuse-card--active": r() }), e.set_text(Y, (e.deep_read_state(s()), e.untrack(() => s().title))), e.set_text(De, e.get(fe)), e.set_text(Ve, e.get(H)), e.set_attribute(xe, "title", e.get(y) ? "Copied!" : "Copy code");
|
|
85
85
|
}), e.event("click", xe, pe), e.event("click", we, ke), e.event("click", j, a), e.event("keypress", j, (T) => T.key === "Enter" && a(T)), e.append(Be, j), e.pop();
|
|
86
86
|
}
|
|
87
|
-
var Kr = e.from_svg('<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg>'), Yr = e.from_svg('<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>'), Qr = e.from_svg('<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><line x1="5" y1="12" x2="19" y2="12"></line></svg>'), Gr = e.from_html('<div class="artifactuse-form-collapsed"><div class="artifactuse-form-collapsed-icon"><!></div> <span class="artifactuse-form-collapsed-title"> </span></div>'), es = e.from_html('<div class="artifactuse-form-title"> </div>'), ts = e.from_html('<p class="artifactuse-form-description"> </p>'), as = e.from_html('<div class="artifactuse-form-header"><!> <!></div>'), rs = e.from_html('<span class="artifactuse-form-btn-icon"><!></span>'), ss = e.from_html('<button type="button"><!> </button>'), is = e.from_html('<div class="artifactuse-form-buttons"></div>'), ns = e.from_html('<span class="artifactuse-form-btn-spinner"></span>'), ls = e.from_html('<span class="artifactuse-form-btn-icon"><!></span>'), cs = e.from_html("<button><!> </button>"), os = e.from_html('<div class="artifactuse-form-buttons"></div>'),
|
|
87
|
+
var Kr = e.from_svg('<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg>'), Yr = e.from_svg('<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>'), Qr = e.from_svg('<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><line x1="5" y1="12" x2="19" y2="12"></line></svg>'), Gr = e.from_html('<div class="artifactuse-form-collapsed"><div class="artifactuse-form-collapsed-icon"><!></div> <span class="artifactuse-form-collapsed-title"> </span></div>'), es = e.from_html('<div class="artifactuse-form-title"> </div>'), ts = e.from_html('<p class="artifactuse-form-description"> </p>'), as = e.from_html('<div class="artifactuse-form-header"><!> <!></div>'), rs = e.from_html('<span class="artifactuse-form-btn-icon"><!></span>'), ss = e.from_html('<button type="button"><!> </button>'), is = e.from_html('<div class="artifactuse-form-buttons"></div>'), ns = e.from_html('<span class="artifactuse-form-btn-spinner"></span>'), ls = e.from_html('<span class="artifactuse-form-btn-icon"><!></span>'), cs = e.from_html("<button><!> </button>"), os = e.from_html('<div class="artifactuse-form-buttons"></div>'), us = e.from_html('<div class="artifactuse-form-divider"></div>'), vs = e.from_html('<div class="artifactuse-form-heading"> </div>'), ds = e.from_html('<span class="artifactuse-required">*</span>'), ps = e.from_html('<span class="artifactuse-help-text"> </span>'), _s = e.from_html('<span class="artifactuse-error-text"> </span>'), fs = e.from_html('<div class="artifactuse-form-field"><label class="artifactuse-checkbox-label"><input type="checkbox" class="artifactuse-checkbox"/> <span class="artifactuse-checkbox-text"> <!></span></label> <!> <!></div>'), gs = e.from_html('<span class="artifactuse-required">*</span>'), ms = e.from_html('<label class="artifactuse-label"> <!></label>'), hs = e.from_html('<label class="artifactuse-radio-label"><input type="radio" class="artifactuse-radio"/> <span> </span></label>'), bs = e.from_html('<span class="artifactuse-help-text"> </span>'), ks = e.from_html('<span class="artifactuse-error-text"> </span>'), ys = e.from_html('<div class="artifactuse-form-field"><!> <div class="artifactuse-radio-group"></div> <!> <!></div>'), xs = e.from_html('<span class="artifactuse-required">*</span>'), ws = e.from_html('<input class="artifactuse-input"/>'), Cs = e.from_html('<textarea class="artifactuse-textarea"></textarea>'), $s = e.from_html("<option> </option>"), As = e.from_html('<select class="artifactuse-select"><option> </option><!></select>'), Ls = e.from_html('<span class="artifactuse-help-text"> </span>'), Ss = e.from_html('<span class="artifactuse-error-text"> </span>'), Ps = e.from_html('<div class="artifactuse-form-field"><label class="artifactuse-label"> <!></label> <!> <!> <!></div>'), Es = e.from_html('<span class="artifactuse-form-btn-spinner"></span>'), Ts = e.from_html('<div class="artifactuse-form-buttons artifactuse-form-buttons-default"><button type="button" class="artifactuse-form-btn artifactuse-form-btn-ghost">Cancel</button> <button type="submit" class="artifactuse-form-btn artifactuse-form-btn-primary"><!> </button></div>'), Bs = e.from_html('<form class="artifactuse-form"><div class="artifactuse-form-fields"></div> <!></form>'), Hs = e.from_html("<!> <!>", 1), Ms = e.from_html("<div><!></div>");
|
|
88
88
|
function zs(Be, d) {
|
|
89
89
|
e.push(d, !1);
|
|
90
|
-
const fe = e.mutable_source(), H = e.mutable_source(), x = e.mutable_source(), s = e.mutable_source(), r = e.mutable_source(),
|
|
90
|
+
const fe = e.mutable_source(), H = e.mutable_source(), x = e.mutable_source(), s = e.mutable_source(), r = e.mutable_source(), u = e.mutable_source(), y = e.mutable_source(), a = e.mutable_source(), pe = e.mutable_source();
|
|
91
91
|
let ke = e.prop(d, "artifact", 8), j = e.prop(d, "theme", 8, "dark"), ae = e.prop(d, "accent", 8, null), Se = e.prop(
|
|
92
92
|
d,
|
|
93
93
|
"initialState",
|
|
@@ -135,13 +135,13 @@ function zs(Be, d) {
|
|
|
135
135
|
l && e.get(Ae).style.setProperty("--artifactuse-primary", l);
|
|
136
136
|
}
|
|
137
137
|
}
|
|
138
|
-
|
|
138
|
+
ua(() => {
|
|
139
139
|
He(), e.set(P, Se());
|
|
140
140
|
});
|
|
141
141
|
function xe() {
|
|
142
142
|
var U;
|
|
143
143
|
const l = {};
|
|
144
|
-
e.get(
|
|
144
|
+
e.get(u).forEach((m) => {
|
|
145
145
|
["buttons", "divider", "heading"].includes(m.type) || (m.defaultValue !== void 0 ? l[m.name] = m.defaultValue : m.type === "checkbox" ? l[m.name] = !1 : l[m.name] = "");
|
|
146
146
|
}), (U = e.get(x).data) != null && U.defaults && Object.assign(l, e.get(x).data.defaults), e.set(_, l), e.set(g, {});
|
|
147
147
|
}
|
|
@@ -158,13 +158,13 @@ function zs(Be, d) {
|
|
|
158
158
|
"datetime-local"
|
|
159
159
|
].includes(l);
|
|
160
160
|
}
|
|
161
|
-
function
|
|
161
|
+
function qe(l, U) {
|
|
162
162
|
e.mutate(_, e.get(_)[l] = U), e.get(g)[l] && (delete e.get(g)[l], e.set(g, e.get(g)));
|
|
163
163
|
}
|
|
164
164
|
function Xe() {
|
|
165
165
|
var m;
|
|
166
166
|
const l = {};
|
|
167
|
-
e.get(
|
|
167
|
+
e.get(u).forEach((A) => {
|
|
168
168
|
if (["buttons", "divider", "heading"].includes(A.type)) return;
|
|
169
169
|
const z = e.get(_)[A.name];
|
|
170
170
|
if (A.required && !z && z !== 0 && z !== !1) {
|
|
@@ -274,11 +274,11 @@ function zs(Be, d) {
|
|
|
274
274
|
e.set(r, `artifactuse-form-${e.get(x).variant || "fields"}`);
|
|
275
275
|
}), e.legacy_pre_effect(() => e.get(x), () => {
|
|
276
276
|
var l;
|
|
277
|
-
e.set(
|
|
278
|
-
}), e.legacy_pre_effect(() => (e.get(x), e.get(
|
|
279
|
-
e.set(y, e.get(x).variant === "buttons" ? e.get(
|
|
280
|
-
}), e.legacy_pre_effect(() => e.get(
|
|
281
|
-
e.set(a, e.get(
|
|
277
|
+
e.set(u, ((l = e.get(x).data) == null ? void 0 : l.fields) || []);
|
|
278
|
+
}), e.legacy_pre_effect(() => (e.get(x), e.get(u)), () => {
|
|
279
|
+
e.set(y, e.get(x).variant === "buttons" ? e.get(u) : []);
|
|
280
|
+
}), e.legacy_pre_effect(() => e.get(u), () => {
|
|
281
|
+
e.set(a, e.get(u).some((l) => l.type === "buttons"));
|
|
282
282
|
}), e.legacy_pre_effect(() => e.get(x), () => {
|
|
283
283
|
e.set(pe, e.get(x).title || "Form");
|
|
284
284
|
}), e.legacy_pre_effect(() => e.deep_read_state(ae()), () => {
|
|
@@ -287,7 +287,7 @@ function zs(Be, d) {
|
|
|
287
287
|
var l;
|
|
288
288
|
(l = ke()) != null && l.code && xe();
|
|
289
289
|
}), e.legacy_pre_effect_reset(), e.init();
|
|
290
|
-
var $e = Ms(),
|
|
290
|
+
var $e = Ms(), Fe = e.child($e);
|
|
291
291
|
{
|
|
292
292
|
var Ye = (l) => {
|
|
293
293
|
var U = Gr(), m = e.child(U), A = e.child(m);
|
|
@@ -298,17 +298,17 @@ function zs(Be, d) {
|
|
|
298
298
|
}, b = (_e) => {
|
|
299
299
|
var o = e.comment(), p = e.first_child(o);
|
|
300
300
|
{
|
|
301
|
-
var
|
|
302
|
-
var
|
|
303
|
-
e.append(t,
|
|
301
|
+
var q = (t) => {
|
|
302
|
+
var F = Yr();
|
|
303
|
+
e.append(t, F);
|
|
304
304
|
}, ne = (t) => {
|
|
305
|
-
var
|
|
306
|
-
e.append(t,
|
|
305
|
+
var F = Qr();
|
|
306
|
+
e.append(t, F);
|
|
307
307
|
};
|
|
308
308
|
e.if(
|
|
309
309
|
p,
|
|
310
310
|
(t) => {
|
|
311
|
-
e.get(P) === "cancelled" ? t(
|
|
311
|
+
e.get(P) === "cancelled" ? t(q) : t(ne, !1);
|
|
312
312
|
},
|
|
313
313
|
!0
|
|
314
314
|
);
|
|
@@ -329,20 +329,20 @@ function zs(Be, d) {
|
|
|
329
329
|
var _e = as(), o = e.child(_e);
|
|
330
330
|
{
|
|
331
331
|
var p = (t) => {
|
|
332
|
-
var
|
|
333
|
-
e.reset(
|
|
332
|
+
var F = es(), i = e.child(F, !0);
|
|
333
|
+
e.reset(F), e.template_effect(() => e.set_text(i, (e.get(x), e.untrack(() => e.get(x).title)))), e.append(t, F);
|
|
334
334
|
};
|
|
335
335
|
e.if(o, (t) => {
|
|
336
336
|
e.get(x), e.untrack(() => e.get(x).title) && t(p);
|
|
337
337
|
});
|
|
338
338
|
}
|
|
339
|
-
var
|
|
339
|
+
var q = e.sibling(o, 2);
|
|
340
340
|
{
|
|
341
341
|
var ne = (t) => {
|
|
342
|
-
var
|
|
343
|
-
e.reset(
|
|
342
|
+
var F = ts(), i = e.child(F, !0);
|
|
343
|
+
e.reset(F), e.template_effect(() => e.set_text(i, (e.get(x), e.untrack(() => e.get(x).description)))), e.append(t, F);
|
|
344
344
|
};
|
|
345
|
-
e.if(
|
|
345
|
+
e.if(q, (t) => {
|
|
346
346
|
e.get(x), e.untrack(() => e.get(x).description) && t(ne);
|
|
347
347
|
});
|
|
348
348
|
}
|
|
@@ -357,27 +357,27 @@ function zs(Be, d) {
|
|
|
357
357
|
var b = (re) => {
|
|
358
358
|
var _e = is();
|
|
359
359
|
e.each(_e, 7, () => e.get(y), (o, p) => o.name || o.label || p, (o, p) => {
|
|
360
|
-
var
|
|
360
|
+
var q = ss(), ne = e.child(q);
|
|
361
361
|
{
|
|
362
362
|
var t = (i) => {
|
|
363
|
-
var
|
|
364
|
-
e.html(X, () => (e.get(p), e.untrack(() => e.get(p).icon))), e.reset(
|
|
363
|
+
var v = rs(), X = e.child(v);
|
|
364
|
+
e.html(X, () => (e.get(p), e.untrack(() => e.get(p).icon))), e.reset(v), e.append(i, v);
|
|
365
365
|
};
|
|
366
366
|
e.if(ne, (i) => {
|
|
367
367
|
e.get(p), e.untrack(() => e.get(p).icon) && i(t);
|
|
368
368
|
});
|
|
369
369
|
}
|
|
370
|
-
var
|
|
371
|
-
e.reset(
|
|
372
|
-
e.set_class(
|
|
373
|
-
}), e.event("click",
|
|
370
|
+
var F = e.sibling(ne);
|
|
371
|
+
e.reset(q), e.template_effect(() => {
|
|
372
|
+
e.set_class(q, 1, `artifactuse-form-btn artifactuse-form-btn-${e.get(p), e.untrack(() => e.get(p).variant || "secondary") ?? ""}`), q.disabled = (e.get(p), e.get(Y), e.untrack(() => e.get(p).disabled || e.get(Y))), e.set_text(F, ` ${e.get(p), e.untrack(() => e.get(p).label) ?? ""}`);
|
|
373
|
+
}), e.event("click", q, () => Ce(e.get(p))), e.append(o, q);
|
|
374
374
|
}), e.reset(_e), e.append(re, _e);
|
|
375
375
|
}, J = (re) => {
|
|
376
376
|
var _e = Bs(), o = e.child(_e);
|
|
377
|
-
e.each(o, 7, () => e.get(
|
|
378
|
-
var
|
|
377
|
+
e.each(o, 7, () => e.get(u), (ne, t) => ne.name || t, (ne, t) => {
|
|
378
|
+
var F = e.comment(), i = e.first_child(F);
|
|
379
379
|
{
|
|
380
|
-
var
|
|
380
|
+
var v = (W) => {
|
|
381
381
|
var Q = os();
|
|
382
382
|
e.each(Q, 7, () => (e.get(t), e.untrack(() => e.get(t).fields || [])), (ee, L) => ee.name || ee.label || L, (ee, L) => {
|
|
383
383
|
var ye = cs(), ge = e.child(ye);
|
|
@@ -418,19 +418,19 @@ function zs(Be, d) {
|
|
|
418
418
|
var Q = e.comment(), ee = e.first_child(Q);
|
|
419
419
|
{
|
|
420
420
|
var L = (ge) => {
|
|
421
|
-
var Ee =
|
|
421
|
+
var Ee = us();
|
|
422
422
|
e.append(ge, Ee);
|
|
423
423
|
}, ye = (ge) => {
|
|
424
424
|
var Ee = e.comment(), oe = e.first_child(Ee);
|
|
425
425
|
{
|
|
426
426
|
var Le = (se) => {
|
|
427
|
-
var me =
|
|
427
|
+
var me = vs(), M = e.child(me, !0);
|
|
428
428
|
e.reset(me), e.template_effect(() => e.set_text(M, (e.get(t), e.untrack(() => e.get(t).label)))), e.append(se, me);
|
|
429
429
|
}, de = (se) => {
|
|
430
430
|
var me = e.comment(), M = e.first_child(me);
|
|
431
431
|
{
|
|
432
432
|
var R = ($) => {
|
|
433
|
-
var C = fs(),
|
|
433
|
+
var C = fs(), I = e.child(C), O = e.child(I);
|
|
434
434
|
e.remove_input_defaults(O);
|
|
435
435
|
var G = e.sibling(O, 2), w = e.child(G), f = e.sibling(w);
|
|
436
436
|
{
|
|
@@ -442,8 +442,8 @@ function zs(Be, d) {
|
|
|
442
442
|
e.get(t), e.untrack(() => e.get(t).required) && B(h);
|
|
443
443
|
});
|
|
444
444
|
}
|
|
445
|
-
e.reset(G), e.reset(
|
|
446
|
-
var N = e.sibling(
|
|
445
|
+
e.reset(G), e.reset(I);
|
|
446
|
+
var N = e.sibling(I, 2);
|
|
447
447
|
{
|
|
448
448
|
var Z = (B) => {
|
|
449
449
|
var he = ps(), K = e.child(he, !0);
|
|
@@ -465,21 +465,21 @@ function zs(Be, d) {
|
|
|
465
465
|
}
|
|
466
466
|
e.reset(C), e.template_effect(() => {
|
|
467
467
|
e.set_checked(O, (e.get(_), e.get(t), e.untrack(() => e.get(_)[e.get(t).name]))), O.disabled = (e.get(t), e.untrack(() => e.get(t).disabled)), e.set_text(w, `${e.get(t), e.untrack(() => e.get(t).label) ?? ""} `);
|
|
468
|
-
}), e.event("change", O, (B) =>
|
|
468
|
+
}), e.event("change", O, (B) => qe(e.get(t).name, B.target.checked)), e.append($, C);
|
|
469
469
|
}, le = ($) => {
|
|
470
|
-
var C = e.comment(),
|
|
470
|
+
var C = e.comment(), I = e.first_child(C);
|
|
471
471
|
{
|
|
472
472
|
var O = (w) => {
|
|
473
473
|
var f = ys(), h = e.child(f);
|
|
474
474
|
{
|
|
475
475
|
var N = (K) => {
|
|
476
|
-
var D = ms(), te = e.child(D),
|
|
476
|
+
var D = ms(), te = e.child(D), ue = e.sibling(te);
|
|
477
477
|
{
|
|
478
478
|
var E = (V) => {
|
|
479
479
|
var Ne = gs();
|
|
480
480
|
e.append(V, Ne);
|
|
481
481
|
};
|
|
482
|
-
e.if(
|
|
482
|
+
e.if(ue, (V) => {
|
|
483
483
|
e.get(t), e.untrack(() => e.get(t).required) && V(E);
|
|
484
484
|
});
|
|
485
485
|
}
|
|
@@ -498,12 +498,12 @@ function zs(Be, d) {
|
|
|
498
498
|
() => (e.get(t), e.untrack(() => Ve(e.get(t).options))),
|
|
499
499
|
(K) => K.value,
|
|
500
500
|
(K, D) => {
|
|
501
|
-
var te = hs(),
|
|
502
|
-
e.remove_input_defaults(
|
|
503
|
-
var E = e.sibling(
|
|
501
|
+
var te = hs(), ue = e.child(te);
|
|
502
|
+
e.remove_input_defaults(ue);
|
|
503
|
+
var E = e.sibling(ue, 2), V = e.child(E, !0);
|
|
504
504
|
e.reset(E), e.reset(te), e.template_effect(() => {
|
|
505
|
-
e.set_attribute(
|
|
506
|
-
}), e.event("change",
|
|
505
|
+
e.set_attribute(ue, "name", (e.get(t), e.untrack(() => e.get(t).name))), e.set_value(ue, (e.get(D), e.untrack(() => e.get(D).value))), e.set_checked(ue, (e.get(_), e.get(t), e.get(D), e.untrack(() => e.get(_)[e.get(t).name] === e.get(D).value))), ue.disabled = (e.get(D), e.get(t), e.untrack(() => e.get(D).disabled || e.get(t).disabled)), e.set_text(V, (e.get(D), e.untrack(() => e.get(D).label)));
|
|
506
|
+
}), e.event("change", ue, () => qe(e.get(t).name, e.get(D).value)), e.append(K, te);
|
|
507
507
|
}
|
|
508
508
|
), e.reset(Z);
|
|
509
509
|
var S = e.sibling(Z, 2);
|
|
@@ -545,17 +545,17 @@ function zs(Be, d) {
|
|
|
545
545
|
var V = ws();
|
|
546
546
|
e.remove_input_defaults(V), e.template_effect(() => {
|
|
547
547
|
e.set_attribute(V, "id", `${e.get(s) ?? ""}-${e.get(t), e.untrack(() => e.get(t).name) ?? ""}`), e.set_attribute(V, "type", (e.get(t), e.untrack(() => e.get(t).type))), e.set_value(V, (e.get(_), e.get(t), e.untrack(() => e.get(_)[e.get(t).name] || ""))), e.set_attribute(V, "placeholder", (e.get(t), e.untrack(() => e.get(t).placeholder))), V.disabled = (e.get(t), e.untrack(() => e.get(t).disabled)), V.required = (e.get(t), e.untrack(() => e.get(t).required));
|
|
548
|
-
}), e.event("input", V, (Ne) =>
|
|
548
|
+
}), e.event("input", V, (Ne) => qe(e.get(t).name, Ne.target.value)), e.append(E, V);
|
|
549
549
|
}, he = (E) => {
|
|
550
550
|
var V = e.comment(), Ne = e.first_child(V);
|
|
551
551
|
{
|
|
552
|
-
var
|
|
552
|
+
var va = (lt) => {
|
|
553
553
|
var Ue = Cs();
|
|
554
554
|
e.remove_textarea_child(Ue), e.template_effect(() => {
|
|
555
555
|
e.set_attribute(Ue, "id", `${e.get(s) ?? ""}-${e.get(t), e.untrack(() => e.get(t).name) ?? ""}`), e.set_value(Ue, (e.get(_), e.get(t), e.untrack(() => e.get(_)[e.get(t).name] || ""))), e.set_attribute(Ue, "placeholder", (e.get(t), e.untrack(() => e.get(t).placeholder))), Ue.disabled = (e.get(t), e.untrack(() => e.get(t).disabled)), Ue.required = (e.get(t), e.untrack(() => e.get(t).required)), e.set_attribute(Ue, "rows", (e.get(t), e.untrack(() => e.get(t).rows || 3)));
|
|
556
|
-
}), e.event("input", Ue, (
|
|
557
|
-
},
|
|
558
|
-
var Ue = e.comment(),
|
|
556
|
+
}), e.event("input", Ue, (qt) => qe(e.get(t).name, qt.target.value)), e.append(lt, Ue);
|
|
557
|
+
}, It = (lt) => {
|
|
558
|
+
var Ue = e.comment(), qt = e.first_child(Ue);
|
|
559
559
|
{
|
|
560
560
|
var da = (pa) => {
|
|
561
561
|
var at = As(), St = e.child(at), Oa = e.child(St, !0);
|
|
@@ -578,10 +578,10 @@ function zs(Be, d) {
|
|
|
578
578
|
var Zt;
|
|
579
579
|
e.init_select(at), e.template_effect(() => {
|
|
580
580
|
e.set_attribute(at, "id", `${e.get(s) ?? ""}-${e.get(t), e.untrack(() => e.get(t).name) ?? ""}`), at.disabled = (e.get(t), e.untrack(() => e.get(t).disabled)), at.required = (e.get(t), e.untrack(() => e.get(t).required)), e.set_text(Oa, (e.get(t), e.untrack(() => e.get(t).placeholder || "Select..."))), Zt !== (Zt = (e.get(_), e.get(t), e.untrack(() => e.get(_)[e.get(t).name] || ""))) && (at.value = (at.__value = (e.get(_), e.get(t), e.untrack(() => e.get(_)[e.get(t).name] || ""))) ?? "", e.select_option(at, (e.get(_), e.get(t), e.untrack(() => e.get(_)[e.get(t).name] || ""))));
|
|
581
|
-
}), e.event("change", at, (Pt) =>
|
|
581
|
+
}), e.event("change", at, (Pt) => qe(e.get(t).name, Pt.target.value)), e.append(pa, at);
|
|
582
582
|
};
|
|
583
583
|
e.if(
|
|
584
|
-
|
|
584
|
+
qt,
|
|
585
585
|
(pa) => {
|
|
586
586
|
e.get(t), e.untrack(() => e.get(t).type === "select") && pa(da);
|
|
587
587
|
},
|
|
@@ -593,7 +593,7 @@ function zs(Be, d) {
|
|
|
593
593
|
e.if(
|
|
594
594
|
Ne,
|
|
595
595
|
(lt) => {
|
|
596
|
-
e.get(t), e.untrack(() => e.get(t).type === "textarea") ? lt(
|
|
596
|
+
e.get(t), e.untrack(() => e.get(t).type === "textarea") ? lt(va) : lt(It, !1);
|
|
597
597
|
},
|
|
598
598
|
!0
|
|
599
599
|
);
|
|
@@ -616,12 +616,12 @@ function zs(Be, d) {
|
|
|
616
616
|
}
|
|
617
617
|
var te = e.sibling(K, 2);
|
|
618
618
|
{
|
|
619
|
-
var
|
|
619
|
+
var ue = (E) => {
|
|
620
620
|
var V = Ss(), Ne = e.child(V, !0);
|
|
621
621
|
e.reset(V), e.template_effect(() => e.set_text(Ne, (e.get(g), e.get(t), e.untrack(() => e.get(g)[e.get(t).name])))), e.append(E, V);
|
|
622
622
|
};
|
|
623
623
|
e.if(te, (E) => {
|
|
624
|
-
e.get(g), e.get(t), e.untrack(() => e.get(g)[e.get(t).name]) && E(
|
|
624
|
+
e.get(g), e.get(t), e.untrack(() => e.get(g)[e.get(t).name]) && E(ue);
|
|
625
625
|
});
|
|
626
626
|
}
|
|
627
627
|
e.reset(f), e.template_effect(() => {
|
|
@@ -629,7 +629,7 @@ function zs(Be, d) {
|
|
|
629
629
|
}), e.append(w, f);
|
|
630
630
|
};
|
|
631
631
|
e.if(
|
|
632
|
-
|
|
632
|
+
I,
|
|
633
633
|
(w) => {
|
|
634
634
|
e.get(t), e.untrack(() => e.get(t).type === "radio") ? w(O) : w(G, !1);
|
|
635
635
|
},
|
|
@@ -669,31 +669,31 @@ function zs(Be, d) {
|
|
|
669
669
|
e.append(W, Q);
|
|
670
670
|
};
|
|
671
671
|
e.if(i, (W) => {
|
|
672
|
-
e.get(t), e.untrack(() => e.get(t).type === "buttons") ? W(
|
|
672
|
+
e.get(t), e.untrack(() => e.get(t).type === "buttons") ? W(v) : W(X, !1);
|
|
673
673
|
});
|
|
674
674
|
}
|
|
675
|
-
e.append(ne,
|
|
675
|
+
e.append(ne, F);
|
|
676
676
|
}), e.reset(o);
|
|
677
677
|
var p = e.sibling(o, 2);
|
|
678
678
|
{
|
|
679
|
-
var
|
|
680
|
-
var t = Ts(),
|
|
679
|
+
var q = (ne) => {
|
|
680
|
+
var t = Ts(), F = e.child(t), i = e.sibling(F, 2), v = e.child(i);
|
|
681
681
|
{
|
|
682
682
|
var X = (Q) => {
|
|
683
683
|
var ee = Es();
|
|
684
684
|
e.append(Q, ee);
|
|
685
685
|
};
|
|
686
|
-
e.if(
|
|
686
|
+
e.if(v, (Q) => {
|
|
687
687
|
e.get(Y) && Q(X);
|
|
688
688
|
});
|
|
689
689
|
}
|
|
690
|
-
var W = e.sibling(
|
|
690
|
+
var W = e.sibling(v);
|
|
691
691
|
e.reset(i), e.reset(t), e.template_effect(() => {
|
|
692
692
|
i.disabled = e.get(Y), e.set_text(W, ` ${e.get(Y) ? "Submitting..." : "Submit"}`);
|
|
693
|
-
}), e.event("click",
|
|
693
|
+
}), e.event("click", F, () => Ce({ action: "cancel", label: "Cancel" })), e.append(ne, t);
|
|
694
694
|
};
|
|
695
695
|
e.if(p, (ne) => {
|
|
696
|
-
e.get(a) || ne(
|
|
696
|
+
e.get(a) || ne(q);
|
|
697
697
|
});
|
|
698
698
|
}
|
|
699
699
|
e.reset(_e), e.event("submit", _e, T), e.append(re, _e);
|
|
@@ -704,7 +704,7 @@ function zs(Be, d) {
|
|
|
704
704
|
}
|
|
705
705
|
e.append(l, U);
|
|
706
706
|
};
|
|
707
|
-
e.if(
|
|
707
|
+
e.if(Fe, (l) => {
|
|
708
708
|
e.get(fe) ? l(Ye) : l(Qe, !1);
|
|
709
709
|
});
|
|
710
710
|
}
|
|
@@ -712,10 +712,10 @@ function zs(Be, d) {
|
|
|
712
712
|
e.set_class($e, 1, `artifactuse-inline-form ${e.get(r) ?? ""} ${e.get(H) ?? ""}`), e.set_attribute($e, "data-artifactuse-theme", j());
|
|
713
713
|
}), e.append(Be, $e), e.pop();
|
|
714
714
|
}
|
|
715
|
-
var
|
|
715
|
+
var Fs = e.from_svg('<svg viewBox="0 0 24 24" fill="currentColor"><path d="M22.25 12c0-1.43-.88-2.67-2.19-3.34.46-1.39.2-2.9-.81-3.91s-2.52-1.27-3.91-.81c-.66-1.31-1.91-2.19-3.34-2.19s-2.67.88-3.34 2.19c-1.39-.46-2.9-.2-3.91.81s-1.27 2.52-.81 3.91C2.63 9.33 1.75 10.57 1.75 12s.88 2.67 2.19 3.34c-.46 1.39-.2 2.9.81 3.91s2.52 1.27 3.91.81c.66 1.31 1.91 2.19 3.34 2.19s2.67-.88 3.34-2.19c1.39.46 2.9.2 3.91-.81s1.27-2.52.81-3.91c1.31-.67 2.19-1.91 2.19-3.34zm-11.71 4.2L6.8 12.46l1.41-1.42 2.26 2.26 4.8-5.23 1.47 1.36-6.2 6.77z"></path></svg>'), Is = e.from_html("<img/>"), qs = e.from_html('<div class="artifactuse-social-media"><div></div></div>'), Rs = e.from_html('<img class="artifactuse-social-link-image"/>'), Ds = e.from_html('<div class="artifactuse-social-link-description"> </div>'), Vs = e.from_html('<div class="artifactuse-social-link-card"><!> <div class="artifactuse-social-link-info"><div class="artifactuse-social-link-domain"> </div> <div class="artifactuse-social-link-title"> </div> <!></div></div>'), Us = e.from_html('<div class="artifactuse-social-poll-option"><div class="artifactuse-social-poll-bar"></div> <div class="artifactuse-social-poll-label"><span> </span> <span class="artifactuse-social-poll-percent"> </span></div></div>'), Os = e.from_html('<div class="artifactuse-social-poll"><!> <div class="artifactuse-social-poll-meta"> </div></div>'), Ns = e.from_html('<div class="artifactuse-social-quote"><div class="artifactuse-social-quote-header"><img class="artifactuse-social-quote-avatar" alt=""/> <span class="artifactuse-social-quote-author"> </span> <span class="artifactuse-social-quote-handle"> </span></div> <p class="artifactuse-social-quote-text"> </p></div>'), js = e.from_html('<div class="artifactuse-social-engagement"><span> </span> <span> </span> <span> </span> <span> </span></div>'), Js = e.from_html('<div class="artifactuse-social-header"><img class="artifactuse-social-avatar"/> <div class="artifactuse-social-author"><div class="artifactuse-social-author-name"><span> </span> <!></div> <div class="artifactuse-social-author-meta"><span class="artifactuse-social-author-handle"> </span> <span class="artifactuse-social-timestamp"> </span></div></div></div> <div class="artifactuse-social-content"><p class="artifactuse-social-text"><!></p> <!> <!> <!> <!></div> <!>', 1), Xs = e.from_html('<span class="artifactuse-social-author-connection"> </span>'), Ws = e.from_html('<img class="artifactuse-social-link-image"/>'), Zs = e.from_html('<div class="artifactuse-social-link-card"><!> <div class="artifactuse-social-link-info"><div class="artifactuse-social-link-title"> </div> <div class="artifactuse-social-link-domain"> </div></div></div>'), Ks = e.from_html('<div class="artifactuse-social-engagement"><span> </span> <span> </span> <span> </span></div>'), Ys = e.from_html('<div class="artifactuse-social-header"><img class="artifactuse-social-avatar"/> <div class="artifactuse-social-author-info"><div class="artifactuse-social-author-name"> <!></div> <div class="artifactuse-social-author-headline"> </div> <div class="artifactuse-social-timestamp"> </div></div></div> <div class="artifactuse-social-content"><p class="artifactuse-social-text"><!></p> <!></div> <!>', 1), Qs = e.from_svg('<svg class="artifactuse-social-verified" viewBox="0 0 24 24" fill="currentColor"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"></path></svg>'), Gs = e.from_html('<div class="artifactuse-social-location"> </div>'), ei = e.from_html("<img/>"), ti = e.from_html('<div class="artifactuse-social-media-placeholder"></div>'), ai = e.from_html('<div class="artifactuse-social-header"><img class="artifactuse-social-avatar"/> <div class="artifactuse-social-author"><div class="artifactuse-social-author-name"> <!></div> <!></div></div> <div class="artifactuse-social-media"><!></div> <div class="artifactuse-social-likes"> </div> <div class="artifactuse-social-caption"><span class="artifactuse-social-caption-author"> </span> <span class="artifactuse-social-caption-text"><!></span></div> <div class="artifactuse-social-timestamp"> </div>', 1), ri = e.from_html("<img/>"), si = e.from_html('<div class="artifactuse-social-media"><div class="artifactuse-social-media-grid"></div></div>'), ii = e.from_html('<img class="artifactuse-social-link-image"/>'), ni = e.from_html('<div class="artifactuse-social-link-card"><!> <div class="artifactuse-social-link-info"><div class="artifactuse-social-link-domain"> </div> <div class="artifactuse-social-link-title"> </div></div></div>'), li = e.from_html('<div class="artifactuse-social-engagement"><span> </span> <span> </span></div>'), ci = e.from_html('<div class="artifactuse-social-header"><img class="artifactuse-social-avatar"/> <div class="artifactuse-social-author"><div class="artifactuse-social-author-name"> </div> <div class="artifactuse-social-timestamp"> </div></div></div> <div class="artifactuse-social-content"><p class="artifactuse-social-text"><!></p> <!> <!></div> <!>', 1), oi = e.from_svg('<svg class="artifactuse-social-verified" viewBox="0 0 24 24" fill="currentColor"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"></path></svg>'), ui = e.from_html('<div class="artifactuse-social-engagement"><span> </span> <span> </span> <span> </span></div>'), vi = e.from_html('<div class="artifactuse-social-header"><img class="artifactuse-social-avatar"/> <div class="artifactuse-social-author"><div class="artifactuse-social-author-name"> <!></div></div> <span class="artifactuse-social-timestamp"> </span></div> <div class="artifactuse-social-content"><p class="artifactuse-social-text"><!></p></div> <!>', 1), di = e.from_html('<img alt="Video thumbnail"/>'), pi = e.from_html('<div class="artifactuse-social-thumbnail-placeholder"></div>'), _i = e.from_html('<div class="artifactuse-social-duration"> </div>'), fi = e.from_html('<div class="artifactuse-social-sound"> </div>'), gi = e.from_html('<div class="artifactuse-social-engagement"><span> </span> <span> </span> <span> </span></div>'), mi = e.from_html('<div class="artifactuse-social-thumbnail"><!> <!></div> <div class="artifactuse-social-info"><div class="artifactuse-social-header"><img class="artifactuse-social-avatar"/> <span class="artifactuse-social-author-name"> </span></div> <p class="artifactuse-social-text"><!></p> <!></div> <!>', 1), hi = e.from_html('<img alt="Video thumbnail"/>'), bi = e.from_html('<div class="artifactuse-social-thumbnail-placeholder"></div>'), ki = e.from_html('<div class="artifactuse-social-duration"> </div>'), yi = e.from_html('<div class="artifactuse-social-thumbnail"><!> <!></div> <div class="artifactuse-social-info"><img class="artifactuse-social-avatar"/> <div class="artifactuse-social-details"><div class="artifactuse-social-title"> </div> <div class="artifactuse-social-channel"> </div> <div class="artifactuse-social-meta"> </div></div></div>', 1), xi = e.from_html('<div><!> <div class="artifactuse-social-actions-bar"><div class="artifactuse-social-platform-badge"><span> </span></div> <div class="artifactuse-social-actions-right"><span> </span> <button class="artifactuse-social-copy-btn"> </button></div></div></div>');
|
|
716
716
|
function wi(Be, d) {
|
|
717
717
|
e.push(d, !1);
|
|
718
|
-
const fe = e.mutable_source(), H = e.mutable_source(), x = e.mutable_source(), s = e.mutable_source(), r = e.mutable_source(),
|
|
718
|
+
const fe = e.mutable_source(), H = e.mutable_source(), x = e.mutable_source(), s = e.mutable_source(), r = e.mutable_source(), u = e.mutable_source(), y = e.mutable_source(), a = e.mutable_source(), pe = e.mutable_source(), ke = e.mutable_source(), j = e.mutable_source(), ae = e.mutable_source(), Se = e.mutable_source();
|
|
719
719
|
let Pe = e.prop(d, "artifact", 8), Ae = e.prop(d, "theme", 8, "dark");
|
|
720
720
|
const _ = oa(), g = 'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23888"><circle cx="12" cy="8" r="4"/><path d="M12 14c-6 0-8 3-8 6v2h16v-2c0-3-2-6-8-6z"/></svg>', Y = {
|
|
721
721
|
twitter: 280,
|
|
@@ -763,7 +763,7 @@ function wi(Be, d) {
|
|
|
763
763
|
function ze(b) {
|
|
764
764
|
b.target.style.display = "none";
|
|
765
765
|
}
|
|
766
|
-
function
|
|
766
|
+
function qe() {
|
|
767
767
|
const b = e.get(r).text || "";
|
|
768
768
|
navigator.clipboard.writeText(b).then(() => {
|
|
769
769
|
e.set(be, "Copied!"), setTimeout(
|
|
@@ -788,7 +788,7 @@ function wi(Be, d) {
|
|
|
788
788
|
}), e.legacy_pre_effect(() => e.get(x), () => {
|
|
789
789
|
e.set(r, e.get(x).content || {});
|
|
790
790
|
}), e.legacy_pre_effect(() => e.get(x), () => {
|
|
791
|
-
e.set(
|
|
791
|
+
e.set(u, e.get(x).engagement || {});
|
|
792
792
|
}), e.legacy_pre_effect(() => e.get(x), () => {
|
|
793
793
|
e.set(y, e.get(x).meta || {});
|
|
794
794
|
}), e.legacy_pre_effect(() => e.get(r), () => {
|
|
@@ -799,56 +799,56 @@ function wi(Be, d) {
|
|
|
799
799
|
e.set(ke, (e.get(r).text || "").length);
|
|
800
800
|
}), e.legacy_pre_effect(() => (e.get(ke), e.get(pe)), () => {
|
|
801
801
|
e.set(j, e.get(ke) > e.get(pe) ? "error" : e.get(ke) > e.get(pe) * 0.9 ? "warning" : "");
|
|
802
|
-
}), e.legacy_pre_effect(() => e.get(
|
|
803
|
-
e.set(ae, e.get(
|
|
804
|
-
}), e.legacy_pre_effect(() => e.get(
|
|
802
|
+
}), e.legacy_pre_effect(() => e.get(u), () => {
|
|
803
|
+
e.set(ae, e.get(u).likes || e.get(u).comments || e.get(u).shares || e.get(u).retweets || e.get(u).replies || e.get(u).views || e.get(u).reposts);
|
|
804
|
+
}), e.legacy_pre_effect(() => e.get(u), () => {
|
|
805
805
|
e.set(Se, (() => {
|
|
806
|
-
const b = e.get(
|
|
807
|
-
return Object.values(b).reduce((J, re) => J + (re || 0), 0) || e.get(
|
|
806
|
+
const b = e.get(u).reactions || {};
|
|
807
|
+
return Object.values(b).reduce((J, re) => J + (re || 0), 0) || e.get(u).likes || 0;
|
|
808
808
|
})());
|
|
809
809
|
}), e.legacy_pre_effect_reset(), e.init();
|
|
810
810
|
var Xe = xi(), we = e.child(Xe);
|
|
811
811
|
{
|
|
812
812
|
var T = (b) => {
|
|
813
|
-
var J = Js(), re = e.first_child(J), _e = e.child(re), o = e.sibling(_e, 2), p = e.child(o),
|
|
814
|
-
e.reset(
|
|
815
|
-
var t = e.sibling(
|
|
813
|
+
var J = Js(), re = e.first_child(J), _e = e.child(re), o = e.sibling(_e, 2), p = e.child(o), q = e.child(p), ne = e.child(q, !0);
|
|
814
|
+
e.reset(q);
|
|
815
|
+
var t = e.sibling(q, 2);
|
|
816
816
|
{
|
|
817
|
-
var
|
|
818
|
-
var C =
|
|
817
|
+
var F = ($) => {
|
|
818
|
+
var C = Fs();
|
|
819
819
|
e.template_effect(() => e.set_class(C, 0, `artifactuse-social-verified artifactuse-social-verified-${e.get(s), e.untrack(() => e.get(s).verifiedType || "blue") ?? ""}`)), e.append($, C);
|
|
820
820
|
};
|
|
821
821
|
e.if(t, ($) => {
|
|
822
|
-
e.get(s), e.untrack(() => e.get(s).verified) && $(
|
|
822
|
+
e.get(s), e.untrack(() => e.get(s).verified) && $(F);
|
|
823
823
|
});
|
|
824
824
|
}
|
|
825
825
|
e.reset(p);
|
|
826
|
-
var i = e.sibling(p, 2),
|
|
827
|
-
e.reset(
|
|
828
|
-
var W = e.sibling(
|
|
826
|
+
var i = e.sibling(p, 2), v = e.child(i), X = e.child(v, !0);
|
|
827
|
+
e.reset(v);
|
|
828
|
+
var W = e.sibling(v, 2), Q = e.child(W);
|
|
829
829
|
e.reset(W), e.reset(i), e.reset(o), e.reset(re);
|
|
830
830
|
var ee = e.sibling(re, 2), L = e.child(ee), ye = e.child(L);
|
|
831
831
|
e.html(ye, () => (e.get(r), e.untrack(() => He(e.get(r).text)))), e.reset(L);
|
|
832
832
|
var ge = e.sibling(L, 2);
|
|
833
833
|
{
|
|
834
834
|
var Ee = ($) => {
|
|
835
|
-
var C =
|
|
835
|
+
var C = qs(), I = e.child(C);
|
|
836
836
|
let O;
|
|
837
837
|
e.each(
|
|
838
|
-
|
|
838
|
+
I,
|
|
839
839
|
5,
|
|
840
840
|
() => (e.get(a), e.untrack(() => e.get(a).slice(0, 4))),
|
|
841
841
|
e.index,
|
|
842
842
|
(G, w) => {
|
|
843
|
-
var f =
|
|
843
|
+
var f = Is();
|
|
844
844
|
e.template_effect(() => {
|
|
845
845
|
e.set_attribute(f, "src", (e.get(w), e.untrack(() => e.get(w).url))), e.set_attribute(f, "alt", (e.get(w), e.untrack(() => e.get(w).alt || "")));
|
|
846
846
|
}), e.event("error", f, ze), e.append(G, f);
|
|
847
847
|
}
|
|
848
|
-
), e.reset(
|
|
849
|
-
O = e.set_class(
|
|
848
|
+
), e.reset(I), e.reset(C), e.template_effect(() => {
|
|
849
|
+
O = e.set_class(I, 1, "artifactuse-social-media-grid", null, O, {
|
|
850
850
|
"artifactuse-social-media-single": e.get(a).length === 1
|
|
851
|
-
}), e.set_attribute(
|
|
851
|
+
}), e.set_attribute(I, "data-count", (e.get(a), e.untrack(() => e.get(a).length)));
|
|
852
852
|
}), e.append($, C);
|
|
853
853
|
};
|
|
854
854
|
e.if(ge, ($) => {
|
|
@@ -858,7 +858,7 @@ function wi(Be, d) {
|
|
|
858
858
|
var oe = e.sibling(ge, 2);
|
|
859
859
|
{
|
|
860
860
|
var Le = ($) => {
|
|
861
|
-
var C = Vs(),
|
|
861
|
+
var C = Vs(), I = e.child(C);
|
|
862
862
|
{
|
|
863
863
|
var O = (ie) => {
|
|
864
864
|
var B = Rs();
|
|
@@ -866,11 +866,11 @@ function wi(Be, d) {
|
|
|
866
866
|
e.set_attribute(B, "src", (e.get(r), e.untrack(() => e.get(r).link.image))), e.set_attribute(B, "alt", (e.get(r), e.untrack(() => e.get(r).link.title)));
|
|
867
867
|
}), e.event("error", B, ze), e.append(ie, B);
|
|
868
868
|
};
|
|
869
|
-
e.if(
|
|
869
|
+
e.if(I, (ie) => {
|
|
870
870
|
e.get(r), e.untrack(() => e.get(r).link.image) && ie(O);
|
|
871
871
|
});
|
|
872
872
|
}
|
|
873
|
-
var G = e.sibling(
|
|
873
|
+
var G = e.sibling(I, 2), w = e.child(G), f = e.child(w, !0);
|
|
874
874
|
e.reset(w);
|
|
875
875
|
var h = e.sibling(w, 2), N = e.child(h, !0);
|
|
876
876
|
e.reset(h);
|
|
@@ -900,8 +900,8 @@ function wi(Be, d) {
|
|
|
900
900
|
var de = e.sibling(oe, 2);
|
|
901
901
|
{
|
|
902
902
|
var se = ($) => {
|
|
903
|
-
var C = Os(),
|
|
904
|
-
e.each(
|
|
903
|
+
var C = Os(), I = e.child(C);
|
|
904
|
+
e.each(I, 1, () => (e.get(r), e.untrack(() => e.get(r).poll.options)), e.index, (w, f, h) => {
|
|
905
905
|
var N = Us(), Z = e.child(N), S = e.sibling(Z, 2), ie = e.child(S), B = e.child(ie, !0);
|
|
906
906
|
e.reset(ie);
|
|
907
907
|
var he = e.sibling(ie, 2), K = e.child(he);
|
|
@@ -915,7 +915,7 @@ function wi(Be, d) {
|
|
|
915
915
|
}) ?? ""}%`);
|
|
916
916
|
}), e.append(w, N);
|
|
917
917
|
});
|
|
918
|
-
var O = e.sibling(
|
|
918
|
+
var O = e.sibling(I, 2), G = e.child(O);
|
|
919
919
|
e.reset(O), e.reset(C), e.template_effect(
|
|
920
920
|
(w) => e.set_text(G, `${w ?? ""} votes · ${e.get(r), e.untrack(() => e.get(r).poll.duration || "Poll ended") ?? ""}`),
|
|
921
921
|
[
|
|
@@ -930,11 +930,11 @@ function wi(Be, d) {
|
|
|
930
930
|
var me = e.sibling(de, 2);
|
|
931
931
|
{
|
|
932
932
|
var M = ($) => {
|
|
933
|
-
var C = Ns(),
|
|
933
|
+
var C = Ns(), I = e.child(C), O = e.child(I), G = e.sibling(O, 2), w = e.child(G, !0);
|
|
934
934
|
e.reset(G);
|
|
935
935
|
var f = e.sibling(G, 2), h = e.child(f, !0);
|
|
936
|
-
e.reset(f), e.reset(
|
|
937
|
-
var N = e.sibling(
|
|
936
|
+
e.reset(f), e.reset(I);
|
|
937
|
+
var N = e.sibling(I, 2), Z = e.child(N, !0);
|
|
938
938
|
e.reset(N), e.reset(C), e.template_effect(() => {
|
|
939
939
|
e.set_attribute(O, "src", (e.get(r), e.untrack(() => {
|
|
940
940
|
var S;
|
|
@@ -956,9 +956,9 @@ function wi(Be, d) {
|
|
|
956
956
|
var R = e.sibling(ee, 2);
|
|
957
957
|
{
|
|
958
958
|
var le = ($) => {
|
|
959
|
-
var C = js(),
|
|
960
|
-
e.reset(
|
|
961
|
-
var G = e.sibling(
|
|
959
|
+
var C = js(), I = e.child(C), O = e.child(I);
|
|
960
|
+
e.reset(I);
|
|
961
|
+
var G = e.sibling(I, 2), w = e.child(G);
|
|
962
962
|
e.reset(G);
|
|
963
963
|
var f = e.sibling(G, 2), h = e.child(f);
|
|
964
964
|
e.reset(f);
|
|
@@ -968,10 +968,10 @@ function wi(Be, d) {
|
|
|
968
968
|
e.set_text(O, `${S ?? ""} replies`), e.set_text(w, `${ie ?? ""} reposts`), e.set_text(h, `${B ?? ""} likes`), e.set_text(Z, `${he ?? ""} views`);
|
|
969
969
|
},
|
|
970
970
|
[
|
|
971
|
-
() => (e.get(
|
|
972
|
-
() => (e.get(
|
|
973
|
-
() => (e.get(
|
|
974
|
-
() => (e.get(
|
|
971
|
+
() => (e.get(u), e.untrack(() => ce(e.get(u).replies || 0))),
|
|
972
|
+
() => (e.get(u), e.untrack(() => ce(e.get(u).retweets || 0))),
|
|
973
|
+
() => (e.get(u), e.untrack(() => ce(e.get(u).likes || 0))),
|
|
974
|
+
() => (e.get(u), e.untrack(() => ce(e.get(u).views || 0)))
|
|
975
975
|
]
|
|
976
976
|
), e.append($, C);
|
|
977
977
|
};
|
|
@@ -986,7 +986,7 @@ function wi(Be, d) {
|
|
|
986
986
|
var J = e.comment(), re = e.first_child(J);
|
|
987
987
|
{
|
|
988
988
|
var _e = (p) => {
|
|
989
|
-
var
|
|
989
|
+
var q = Ys(), ne = e.first_child(q), t = e.child(ne), F = e.sibling(t, 2), i = e.child(F), v = e.child(i), X = e.sibling(v);
|
|
990
990
|
{
|
|
991
991
|
var W = (M) => {
|
|
992
992
|
var R = Xs(), le = e.child(R);
|
|
@@ -1000,7 +1000,7 @@ function wi(Be, d) {
|
|
|
1000
1000
|
var Q = e.sibling(i, 2), ee = e.child(Q, !0);
|
|
1001
1001
|
e.reset(Q);
|
|
1002
1002
|
var L = e.sibling(Q, 2), ye = e.child(L);
|
|
1003
|
-
e.reset(L), e.reset(
|
|
1003
|
+
e.reset(L), e.reset(F), e.reset(ne);
|
|
1004
1004
|
var ge = e.sibling(ne, 2), Ee = e.child(ge), oe = e.child(Ee);
|
|
1005
1005
|
e.html(oe, () => (e.get(r), e.untrack(() => He(e.get(r).text)))), e.reset(Ee);
|
|
1006
1006
|
var Le = e.sibling(Ee, 2);
|
|
@@ -1018,9 +1018,9 @@ function wi(Be, d) {
|
|
|
1018
1018
|
e.get(r), e.untrack(() => e.get(r).link.image) && f($);
|
|
1019
1019
|
});
|
|
1020
1020
|
}
|
|
1021
|
-
var C = e.sibling(le, 2),
|
|
1022
|
-
e.reset(
|
|
1023
|
-
var G = e.sibling(
|
|
1021
|
+
var C = e.sibling(le, 2), I = e.child(C), O = e.child(I, !0);
|
|
1022
|
+
e.reset(I);
|
|
1023
|
+
var G = e.sibling(I, 2), w = e.child(G, !0);
|
|
1024
1024
|
e.reset(G), e.reset(C), e.reset(R), e.template_effect(
|
|
1025
1025
|
(f) => {
|
|
1026
1026
|
e.set_text(O, (e.get(r), e.untrack(() => e.get(r).link.title))), e.set_text(w, f);
|
|
@@ -1040,17 +1040,17 @@ function wi(Be, d) {
|
|
|
1040
1040
|
var me = (M) => {
|
|
1041
1041
|
var R = Ks(), le = e.child(R), $ = e.child(le);
|
|
1042
1042
|
e.reset(le);
|
|
1043
|
-
var C = e.sibling(le, 2),
|
|
1043
|
+
var C = e.sibling(le, 2), I = e.child(C);
|
|
1044
1044
|
e.reset(C);
|
|
1045
1045
|
var O = e.sibling(C, 2), G = e.child(O);
|
|
1046
1046
|
e.reset(O), e.reset(R), e.template_effect(
|
|
1047
1047
|
(w, f, h) => {
|
|
1048
|
-
e.set_text($, `${w ?? ""} reactions`), e.set_text(
|
|
1048
|
+
e.set_text($, `${w ?? ""} reactions`), e.set_text(I, `${f ?? ""} comments`), e.set_text(G, `${h ?? ""} reposts`);
|
|
1049
1049
|
},
|
|
1050
1050
|
[
|
|
1051
|
-
() => (e.get(
|
|
1052
|
-
() => (e.get(
|
|
1053
|
-
() => (e.get(
|
|
1051
|
+
() => (e.get(u), e.untrack(() => ce(e.get(u).likes || 0))),
|
|
1052
|
+
() => (e.get(u), e.untrack(() => ce(e.get(u).comments || 0))),
|
|
1053
|
+
() => (e.get(u), e.untrack(() => ce(e.get(u).shares || e.get(u).reposts || 0)))
|
|
1054
1054
|
]
|
|
1055
1055
|
), e.append(M, R);
|
|
1056
1056
|
};
|
|
@@ -1059,13 +1059,13 @@ function wi(Be, d) {
|
|
|
1059
1059
|
});
|
|
1060
1060
|
}
|
|
1061
1061
|
e.template_effect(() => {
|
|
1062
|
-
e.set_attribute(t, "src", (e.get(s), e.untrack(() => e.get(s).avatar || g))), e.set_attribute(t, "alt", (e.get(s), e.untrack(() => e.get(s).name))), e.set_text(
|
|
1063
|
-
}), e.event("error", t, xe), e.append(p,
|
|
1062
|
+
e.set_attribute(t, "src", (e.get(s), e.untrack(() => e.get(s).avatar || g))), e.set_attribute(t, "alt", (e.get(s), e.untrack(() => e.get(s).name))), e.set_text(v, `${e.get(s), e.untrack(() => e.get(s).name) ?? ""} `), e.set_text(ee, (e.get(s), e.untrack(() => e.get(s).headline))), e.set_text(ye, `${e.get(y), e.untrack(() => e.get(y).timestamp || "Just now") ?? ""} · 🌐`);
|
|
1063
|
+
}), e.event("error", t, xe), e.append(p, q);
|
|
1064
1064
|
}, o = (p) => {
|
|
1065
|
-
var
|
|
1065
|
+
var q = e.comment(), ne = e.first_child(q);
|
|
1066
1066
|
{
|
|
1067
1067
|
var t = (i) => {
|
|
1068
|
-
var
|
|
1068
|
+
var v = ai(), X = e.first_child(v), W = e.child(X), Q = e.sibling(W, 2), ee = e.child(Q), L = e.child(ee), ye = e.sibling(L);
|
|
1069
1069
|
{
|
|
1070
1070
|
var ge = (f) => {
|
|
1071
1071
|
var h = Qs();
|
|
@@ -1107,19 +1107,19 @@ function wi(Be, d) {
|
|
|
1107
1107
|
e.reset(M);
|
|
1108
1108
|
var le = e.sibling(M, 2), $ = e.child(le), C = e.child($, !0);
|
|
1109
1109
|
e.reset($);
|
|
1110
|
-
var
|
|
1111
|
-
e.html(O, () => (e.get(r), e.untrack(() => He(e.get(r).text)))), e.reset(
|
|
1110
|
+
var I = e.sibling($, 2), O = e.child(I);
|
|
1111
|
+
e.html(O, () => (e.get(r), e.untrack(() => He(e.get(r).text)))), e.reset(I), e.reset(le);
|
|
1112
1112
|
var G = e.sibling(le, 2), w = e.child(G, !0);
|
|
1113
1113
|
e.reset(G), e.template_effect(
|
|
1114
1114
|
(f) => {
|
|
1115
1115
|
e.set_attribute(W, "src", (e.get(s), e.untrack(() => e.get(s).avatar || g))), e.set_attribute(W, "alt", (e.get(s), e.untrack(() => e.get(s).name))), e.set_text(L, `${e.get(s), e.untrack(() => e.get(s).name) ?? ""} `), e.set_text(R, `${f ?? ""} likes`), e.set_text(C, (e.get(s), e.untrack(() => e.get(s).name))), e.set_text(w, (e.get(y), e.untrack(() => e.get(y).timestamp || "JUST NOW")));
|
|
1116
1116
|
},
|
|
1117
1117
|
[
|
|
1118
|
-
() => (e.get(
|
|
1118
|
+
() => (e.get(u), e.untrack(() => ce(e.get(u).likes || 0)))
|
|
1119
1119
|
]
|
|
1120
|
-
), e.event("error", W, xe), e.append(i,
|
|
1121
|
-
},
|
|
1122
|
-
var
|
|
1120
|
+
), e.event("error", W, xe), e.append(i, v);
|
|
1121
|
+
}, F = (i) => {
|
|
1122
|
+
var v = e.comment(), X = e.first_child(v);
|
|
1123
1123
|
{
|
|
1124
1124
|
var W = (ee) => {
|
|
1125
1125
|
var L = ci(), ye = e.first_child(L), ge = e.child(ye), Ee = e.sibling(ge, 2), oe = e.child(Ee), Le = e.child(oe, !0);
|
|
@@ -1151,7 +1151,7 @@ function wi(Be, d) {
|
|
|
1151
1151
|
}
|
|
1152
1152
|
var C = e.sibling(le, 2);
|
|
1153
1153
|
{
|
|
1154
|
-
var
|
|
1154
|
+
var I = (w) => {
|
|
1155
1155
|
var f = ni(), h = e.child(f);
|
|
1156
1156
|
{
|
|
1157
1157
|
var N = (K) => {
|
|
@@ -1177,7 +1177,7 @@ function wi(Be, d) {
|
|
|
1177
1177
|
), e.append(w, f);
|
|
1178
1178
|
};
|
|
1179
1179
|
e.if(C, (w) => {
|
|
1180
|
-
e.get(r), e.get(a), e.untrack(() => e.get(r).link && !e.get(a).length) && w(
|
|
1180
|
+
e.get(r), e.get(a), e.untrack(() => e.get(r).link && !e.get(a).length) && w(I);
|
|
1181
1181
|
});
|
|
1182
1182
|
}
|
|
1183
1183
|
e.reset(me);
|
|
@@ -1193,8 +1193,8 @@ function wi(Be, d) {
|
|
|
1193
1193
|
},
|
|
1194
1194
|
[
|
|
1195
1195
|
() => (e.get(Se), e.untrack(() => ce(e.get(Se)))),
|
|
1196
|
-
() => (e.get(
|
|
1197
|
-
() => (e.get(
|
|
1196
|
+
() => (e.get(u), e.untrack(() => ce(e.get(u).comments || 0))),
|
|
1197
|
+
() => (e.get(u), e.untrack(() => ce(e.get(u).shares || 0)))
|
|
1198
1198
|
]
|
|
1199
1199
|
), e.append(w, f);
|
|
1200
1200
|
};
|
|
@@ -1209,7 +1209,7 @@ function wi(Be, d) {
|
|
|
1209
1209
|
var L = e.comment(), ye = e.first_child(L);
|
|
1210
1210
|
{
|
|
1211
1211
|
var ge = (oe) => {
|
|
1212
|
-
var Le =
|
|
1212
|
+
var Le = vi(), de = e.first_child(Le), se = e.child(de), me = e.sibling(se, 2), M = e.child(me), R = e.child(M), le = e.sibling(R);
|
|
1213
1213
|
{
|
|
1214
1214
|
var $ = (N) => {
|
|
1215
1215
|
var Z = oi();
|
|
@@ -1220,26 +1220,26 @@ function wi(Be, d) {
|
|
|
1220
1220
|
});
|
|
1221
1221
|
}
|
|
1222
1222
|
e.reset(M), e.reset(me);
|
|
1223
|
-
var C = e.sibling(me, 2),
|
|
1223
|
+
var C = e.sibling(me, 2), I = e.child(C, !0);
|
|
1224
1224
|
e.reset(C), e.reset(de);
|
|
1225
1225
|
var O = e.sibling(de, 2), G = e.child(O), w = e.child(G);
|
|
1226
1226
|
e.html(w, () => (e.get(r), e.untrack(() => He(e.get(r).text)))), e.reset(G), e.reset(O);
|
|
1227
1227
|
var f = e.sibling(O, 2);
|
|
1228
1228
|
{
|
|
1229
1229
|
var h = (N) => {
|
|
1230
|
-
var Z =
|
|
1230
|
+
var Z = ui(), S = e.child(Z), ie = e.child(S);
|
|
1231
1231
|
e.reset(S);
|
|
1232
1232
|
var B = e.sibling(S, 2), he = e.child(B);
|
|
1233
1233
|
e.reset(B);
|
|
1234
1234
|
var K = e.sibling(B, 2), D = e.child(K);
|
|
1235
1235
|
e.reset(K), e.reset(Z), e.template_effect(
|
|
1236
|
-
(te,
|
|
1237
|
-
e.set_text(ie, `${te ?? ""} likes`), e.set_text(he, `${
|
|
1236
|
+
(te, ue, E) => {
|
|
1237
|
+
e.set_text(ie, `${te ?? ""} likes`), e.set_text(he, `${ue ?? ""} replies`), e.set_text(D, `${E ?? ""} reposts`);
|
|
1238
1238
|
},
|
|
1239
1239
|
[
|
|
1240
|
-
() => (e.get(
|
|
1241
|
-
() => (e.get(
|
|
1242
|
-
() => (e.get(
|
|
1240
|
+
() => (e.get(u), e.untrack(() => ce(e.get(u).likes || 0))),
|
|
1241
|
+
() => (e.get(u), e.untrack(() => ce(e.get(u).replies || 0))),
|
|
1242
|
+
() => (e.get(u), e.untrack(() => ce(e.get(u).reposts || 0)))
|
|
1243
1243
|
]
|
|
1244
1244
|
), e.append(N, Z);
|
|
1245
1245
|
};
|
|
@@ -1248,7 +1248,7 @@ function wi(Be, d) {
|
|
|
1248
1248
|
});
|
|
1249
1249
|
}
|
|
1250
1250
|
e.template_effect(() => {
|
|
1251
|
-
e.set_attribute(se, "src", (e.get(s), e.untrack(() => e.get(s).avatar || g))), e.set_attribute(se, "alt", (e.get(s), e.untrack(() => e.get(s).name))), e.set_text(R, `${e.get(s), e.untrack(() => e.get(s).name) ?? ""} `), e.set_text(
|
|
1251
|
+
e.set_attribute(se, "src", (e.get(s), e.untrack(() => e.get(s).avatar || g))), e.set_attribute(se, "alt", (e.get(s), e.untrack(() => e.get(s).name))), e.set_text(R, `${e.get(s), e.untrack(() => e.get(s).name) ?? ""} `), e.set_text(I, (e.get(y), e.untrack(() => e.get(y).timestamp || "Just now")));
|
|
1252
1252
|
}), e.event("error", se, xe), e.append(oe, Le);
|
|
1253
1253
|
}, Ee = (oe) => {
|
|
1254
1254
|
var Le = e.comment(), de = e.first_child(Le);
|
|
@@ -1257,21 +1257,21 @@ function wi(Be, d) {
|
|
|
1257
1257
|
var R = mi(), le = e.first_child(R), $ = e.child(le);
|
|
1258
1258
|
{
|
|
1259
1259
|
var C = (te) => {
|
|
1260
|
-
var
|
|
1261
|
-
e.template_effect(() => e.set_attribute(
|
|
1262
|
-
},
|
|
1263
|
-
var
|
|
1264
|
-
e.append(te,
|
|
1260
|
+
var ue = di();
|
|
1261
|
+
e.template_effect(() => e.set_attribute(ue, "src", (e.get(a), e.untrack(() => e.get(a)[0].url)))), e.event("error", ue, ze), e.append(te, ue);
|
|
1262
|
+
}, I = (te) => {
|
|
1263
|
+
var ue = pi();
|
|
1264
|
+
e.append(te, ue);
|
|
1265
1265
|
};
|
|
1266
1266
|
e.if($, (te) => {
|
|
1267
|
-
e.get(a), e.untrack(() => e.get(a)[0]) ? te(C) : te(
|
|
1267
|
+
e.get(a), e.untrack(() => e.get(a)[0]) ? te(C) : te(I, !1);
|
|
1268
1268
|
});
|
|
1269
1269
|
}
|
|
1270
1270
|
var O = e.sibling($, 2);
|
|
1271
1271
|
{
|
|
1272
1272
|
var G = (te) => {
|
|
1273
|
-
var
|
|
1274
|
-
e.reset(
|
|
1273
|
+
var ue = _i(), E = e.child(ue, !0);
|
|
1274
|
+
e.reset(ue), e.template_effect(() => e.set_text(E, (e.get(r), e.untrack(() => e.get(r).duration)))), e.append(te, ue);
|
|
1275
1275
|
};
|
|
1276
1276
|
e.if(O, (te) => {
|
|
1277
1277
|
e.get(r), e.untrack(() => e.get(r).duration) && te(G);
|
|
@@ -1285,8 +1285,8 @@ function wi(Be, d) {
|
|
|
1285
1285
|
var B = e.sibling(S, 2);
|
|
1286
1286
|
{
|
|
1287
1287
|
var he = (te) => {
|
|
1288
|
-
var
|
|
1289
|
-
e.reset(
|
|
1288
|
+
var ue = fi(), E = e.child(ue);
|
|
1289
|
+
e.reset(ue), e.template_effect(() => e.set_text(E, `🎵 ${e.get(r), e.untrack(() => e.get(r).sound) ?? ""}`)), e.append(te, ue);
|
|
1290
1290
|
};
|
|
1291
1291
|
e.if(B, (te) => {
|
|
1292
1292
|
e.get(r), e.untrack(() => e.get(r).sound) && te(he);
|
|
@@ -1296,21 +1296,21 @@ function wi(Be, d) {
|
|
|
1296
1296
|
var K = e.sibling(w, 2);
|
|
1297
1297
|
{
|
|
1298
1298
|
var D = (te) => {
|
|
1299
|
-
var
|
|
1299
|
+
var ue = gi(), E = e.child(ue), V = e.child(E);
|
|
1300
1300
|
e.reset(E);
|
|
1301
|
-
var Ne = e.sibling(E, 2),
|
|
1301
|
+
var Ne = e.sibling(E, 2), va = e.child(Ne);
|
|
1302
1302
|
e.reset(Ne);
|
|
1303
|
-
var
|
|
1304
|
-
e.reset(
|
|
1305
|
-
(Ue,
|
|
1306
|
-
e.set_text(V, `${Ue ?? ""} likes`), e.set_text(
|
|
1303
|
+
var It = e.sibling(Ne, 2), lt = e.child(It);
|
|
1304
|
+
e.reset(It), e.reset(ue), e.template_effect(
|
|
1305
|
+
(Ue, qt, da) => {
|
|
1306
|
+
e.set_text(V, `${Ue ?? ""} likes`), e.set_text(va, `${qt ?? ""} comments`), e.set_text(lt, `${da ?? ""} shares`);
|
|
1307
1307
|
},
|
|
1308
1308
|
[
|
|
1309
|
-
() => (e.get(
|
|
1310
|
-
() => (e.get(
|
|
1311
|
-
() => (e.get(
|
|
1309
|
+
() => (e.get(u), e.untrack(() => ce(e.get(u).likes || 0))),
|
|
1310
|
+
() => (e.get(u), e.untrack(() => ce(e.get(u).comments || 0))),
|
|
1311
|
+
() => (e.get(u), e.untrack(() => ce(e.get(u).shares || 0)))
|
|
1312
1312
|
]
|
|
1313
|
-
), e.append(te,
|
|
1313
|
+
), e.append(te, ue);
|
|
1314
1314
|
};
|
|
1315
1315
|
e.if(K, (te) => {
|
|
1316
1316
|
e.get(ae) && te(D);
|
|
@@ -1323,7 +1323,7 @@ function wi(Be, d) {
|
|
|
1323
1323
|
var R = e.comment(), le = e.first_child(R);
|
|
1324
1324
|
{
|
|
1325
1325
|
var $ = (C) => {
|
|
1326
|
-
var
|
|
1326
|
+
var I = yi(), O = e.first_child(I), G = e.child(O);
|
|
1327
1327
|
{
|
|
1328
1328
|
var w = (E) => {
|
|
1329
1329
|
var V = hi();
|
|
@@ -1351,15 +1351,15 @@ function wi(Be, d) {
|
|
|
1351
1351
|
e.reset(B);
|
|
1352
1352
|
var K = e.sibling(B, 2), D = e.child(K, !0);
|
|
1353
1353
|
e.reset(K);
|
|
1354
|
-
var te = e.sibling(K, 2),
|
|
1354
|
+
var te = e.sibling(K, 2), ue = e.child(te);
|
|
1355
1355
|
e.reset(te), e.reset(ie), e.reset(Z), e.template_effect(
|
|
1356
1356
|
(E) => {
|
|
1357
|
-
e.set_attribute(S, "src", (e.get(s), e.untrack(() => e.get(s).avatar || g))), e.set_attribute(S, "alt", (e.get(s), e.untrack(() => e.get(s).name))), e.set_text(he, (e.get(r), e.untrack(() => e.get(r).title))), e.set_text(D, (e.get(s), e.untrack(() => e.get(s).name))), e.set_text(
|
|
1357
|
+
e.set_attribute(S, "src", (e.get(s), e.untrack(() => e.get(s).avatar || g))), e.set_attribute(S, "alt", (e.get(s), e.untrack(() => e.get(s).name))), e.set_text(he, (e.get(r), e.untrack(() => e.get(r).title))), e.set_text(D, (e.get(s), e.untrack(() => e.get(s).name))), e.set_text(ue, `${E ?? ""} views · ${e.get(y), e.untrack(() => e.get(y).timestamp || "Just now") ?? ""}`);
|
|
1358
1358
|
},
|
|
1359
1359
|
[
|
|
1360
|
-
() => (e.get(
|
|
1360
|
+
() => (e.get(u), e.untrack(() => ce(e.get(u).views || 0)))
|
|
1361
1361
|
]
|
|
1362
|
-
), e.event("error", S, xe), e.append(C,
|
|
1362
|
+
), e.event("error", S, xe), e.append(C, I);
|
|
1363
1363
|
};
|
|
1364
1364
|
e.if(
|
|
1365
1365
|
le,
|
|
@@ -1399,17 +1399,17 @@ function wi(Be, d) {
|
|
|
1399
1399
|
!0
|
|
1400
1400
|
);
|
|
1401
1401
|
}
|
|
1402
|
-
e.append(i,
|
|
1402
|
+
e.append(i, v);
|
|
1403
1403
|
};
|
|
1404
1404
|
e.if(
|
|
1405
1405
|
ne,
|
|
1406
1406
|
(i) => {
|
|
1407
|
-
e.get(H) === "instagram" ? i(t) : i(
|
|
1407
|
+
e.get(H) === "instagram" ? i(t) : i(F, !1);
|
|
1408
1408
|
},
|
|
1409
1409
|
!0
|
|
1410
1410
|
);
|
|
1411
1411
|
}
|
|
1412
|
-
e.append(p,
|
|
1412
|
+
e.append(p, q);
|
|
1413
1413
|
};
|
|
1414
1414
|
e.if(
|
|
1415
1415
|
re,
|
|
@@ -1425,23 +1425,23 @@ function wi(Be, d) {
|
|
|
1425
1425
|
e.get(H) === "twitter" ? b(T) : b(Ce, !1);
|
|
1426
1426
|
});
|
|
1427
1427
|
}
|
|
1428
|
-
var $e = e.sibling(we, 2),
|
|
1429
|
-
e.reset(Ye), e.reset(
|
|
1430
|
-
var l = e.sibling(
|
|
1428
|
+
var $e = e.sibling(we, 2), Fe = e.child($e), Ye = e.child(Fe), Qe = e.child(Ye, !0);
|
|
1429
|
+
e.reset(Ye), e.reset(Fe);
|
|
1430
|
+
var l = e.sibling(Fe, 2), U = e.child(l), m = e.child(U);
|
|
1431
1431
|
e.reset(U);
|
|
1432
1432
|
var A = e.sibling(U, 2), z = e.child(A, !0);
|
|
1433
1433
|
e.reset(A), e.reset(l), e.reset($e), e.reset(Xe), e.template_effect(() => {
|
|
1434
1434
|
e.set_class(Xe, 1, `artifactuse-social artifactuse-social-${e.get(H) ?? ""}`), e.set_attribute(Xe, "data-artifactuse-theme", Ae()), e.set_text(Qe, (e.get(H), e.untrack(() => P[e.get(H)] || e.get(H)))), e.set_class(U, 1, `artifactuse-social-char-counter ${e.get(j) ?? ""}`), e.set_text(m, `${e.get(ke) ?? ""}/${e.get(pe) ?? ""}`), e.set_text(z, e.get(be));
|
|
1435
|
-
}), e.event("click", A,
|
|
1435
|
+
}), e.event("click", A, qe), e.append(Be, Xe), e.pop();
|
|
1436
1436
|
}
|
|
1437
1437
|
var Ci = e.from_html('<button type="button" class="artifactuse-viewer-image-button"><img/></button>'), $i = e.from_html('<iframe class="artifactuse-viewer-pdf"></iframe>'), Ai = e.from_svg('<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line><line x1="11" y1="8" x2="11" y2="14"></line><line x1="8" y1="11" x2="14" y2="11"></line></svg>'), Li = e.from_svg('<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line><line x1="8" y1="11" x2="14" y2="11"></line></svg>'), Si = e.from_html('<div class="artifactuse-viewer-controls"><button class="artifactuse-viewer-control"><!></button> <button class="artifactuse-viewer-control" title="Download"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><polyline points="7 10 12 15 17 10"></polyline><line x1="12" y1="15" x2="12" y2="3"></line></svg></button></div>'), Pi = e.from_html('<div class="artifactuse-viewer-caption"> </div>'), Ei = e.from_html('<div class="artifactuse-viewer-overlay" tabindex="-1" role="dialog" aria-modal="true"><div class="artifactuse-viewer-content"><!> <!> <button class="artifactuse-viewer-close" title="Close (Esc)"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg></button> <!> <!></div></div>');
|
|
1438
1438
|
function Ti(Be, d) {
|
|
1439
1439
|
e.push(d, !1);
|
|
1440
1440
|
let fe = e.prop(d, "isOpen", 8, !1), H = e.prop(d, "type", 8, "image"), x = e.prop(d, "src", 8, ""), s = e.prop(d, "alt", 8, ""), r = e.prop(d, "caption", 8, "");
|
|
1441
|
-
const
|
|
1441
|
+
const u = oa();
|
|
1442
1442
|
let y = e.mutable_source(), a = e.mutable_source(!1);
|
|
1443
1443
|
function pe() {
|
|
1444
|
-
e.set(a, !1),
|
|
1444
|
+
e.set(a, !1), u("close");
|
|
1445
1445
|
}
|
|
1446
1446
|
function ke() {
|
|
1447
1447
|
H() === "image" && e.set(a, !e.get(a));
|
|
@@ -1456,7 +1456,7 @@ function Ti(Be, d) {
|
|
|
1456
1456
|
function Se(g) {
|
|
1457
1457
|
g.target === e.get(y) && pe();
|
|
1458
1458
|
}
|
|
1459
|
-
|
|
1459
|
+
ua(() => {
|
|
1460
1460
|
document.addEventListener("keydown", ae);
|
|
1461
1461
|
}), Aa(() => {
|
|
1462
1462
|
document.removeEventListener("keydown", ae), document.body.style.overflow = "";
|
|
@@ -1499,7 +1499,7 @@ function Ti(Be, d) {
|
|
|
1499
1499
|
var ze = (we) => {
|
|
1500
1500
|
var T = Si(), Ce = e.child(T), $e = e.child(Ce);
|
|
1501
1501
|
{
|
|
1502
|
-
var
|
|
1502
|
+
var Fe = (l) => {
|
|
1503
1503
|
var U = Ai();
|
|
1504
1504
|
e.append(l, U);
|
|
1505
1505
|
}, Ye = (l) => {
|
|
@@ -1507,7 +1507,7 @@ function Ti(Be, d) {
|
|
|
1507
1507
|
e.append(l, U);
|
|
1508
1508
|
};
|
|
1509
1509
|
e.if($e, (l) => {
|
|
1510
|
-
e.get(a) ? l(Ye, !1) : l(
|
|
1510
|
+
e.get(a) ? l(Ye, !1) : l(Fe);
|
|
1511
1511
|
});
|
|
1512
1512
|
}
|
|
1513
1513
|
e.reset(Ce);
|
|
@@ -1518,13 +1518,13 @@ function Ti(Be, d) {
|
|
|
1518
1518
|
H() === "image" && we(ze);
|
|
1519
1519
|
});
|
|
1520
1520
|
}
|
|
1521
|
-
var
|
|
1521
|
+
var qe = e.sibling(xe, 2);
|
|
1522
1522
|
{
|
|
1523
1523
|
var Xe = (we) => {
|
|
1524
1524
|
var T = Pi(), Ce = e.child(T, !0);
|
|
1525
1525
|
e.reset(T), e.template_effect(() => e.set_text(Ce, r())), e.append(we, T);
|
|
1526
1526
|
};
|
|
1527
|
-
e.if(
|
|
1527
|
+
e.if(qe, (we) => {
|
|
1528
1528
|
r() && we(Xe);
|
|
1529
1529
|
});
|
|
1530
1530
|
}
|
|
@@ -1537,10 +1537,10 @@ function Ti(Be, d) {
|
|
|
1537
1537
|
e.append(Be, Pe), e.pop();
|
|
1538
1538
|
}
|
|
1539
1539
|
var Bi = e.from_html("<div><!></div>"), Hi = e.from_html('<div class="artifactuse-agent-message"><div class="artifactuse-message-content"></div> <!></div>');
|
|
1540
|
-
function
|
|
1540
|
+
function In(Be, d) {
|
|
1541
1541
|
e.push(d, !1);
|
|
1542
1542
|
const fe = e.mutable_source(), H = e.mutable_source(), x = e.mutable_source();
|
|
1543
|
-
let s = e.prop(d, "content", 8, ""), r = e.prop(d, "messageId", 24, () => `msg-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`),
|
|
1543
|
+
let s = e.prop(d, "content", 8, ""), r = e.prop(d, "messageId", 24, () => `msg-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`), u = e.prop(d, "inlineCards", 8, !0), y = e.prop(d, "typing", 8, !1), a = e.prop(
|
|
1544
1544
|
d,
|
|
1545
1545
|
"isLastMessage",
|
|
1546
1546
|
8,
|
|
@@ -1554,7 +1554,7 @@ function qn(Be, d) {
|
|
|
1554
1554
|
instance: Se,
|
|
1555
1555
|
activeArtifactId: Pe
|
|
1556
1556
|
} = Ua();
|
|
1557
|
-
let Ae = e.mutable_source(), _ = e.mutable_source(), g = e.mutable_source(""), Y = e.mutable_source([]), P = e.mutable_source([]), be = null, De = e.mutable_source(y()), ce = e.mutable_source(!1), Ve = e.mutable_source(!1), He = e.mutable_source("image"), xe = e.mutable_source(""), ze = e.mutable_source(""),
|
|
1557
|
+
let Ae = e.mutable_source(), _ = e.mutable_source(), g = e.mutable_source(""), Y = e.mutable_source([]), P = e.mutable_source([]), be = null, De = e.mutable_source(y()), ce = e.mutable_source(!1), Ve = e.mutable_source(!1), He = e.mutable_source("image"), xe = e.mutable_source(""), ze = e.mutable_source(""), qe = e.mutable_source("");
|
|
1558
1558
|
function Xe(o) {
|
|
1559
1559
|
if (!o) return null;
|
|
1560
1560
|
try {
|
|
@@ -1562,44 +1562,44 @@ function qn(Be, d) {
|
|
|
1562
1562
|
return JSON.parse(p);
|
|
1563
1563
|
} catch {
|
|
1564
1564
|
try {
|
|
1565
|
-
const
|
|
1565
|
+
const q = o.replace(/ /g, `
|
|
1566
1566
|
`).replace(/ /g, "\r").replace(/	/g, " ").replace(/"/g, '"').replace(/'/g, "'").replace(/</g, "<").replace(/>/g, ">").replace(/&/g, "&");
|
|
1567
|
-
return JSON.parse(
|
|
1568
|
-
} catch (
|
|
1569
|
-
return console.error("Failed to parse artifact data:",
|
|
1567
|
+
return JSON.parse(q);
|
|
1568
|
+
} catch (q) {
|
|
1569
|
+
return console.error("Failed to parse artifact data:", q), null;
|
|
1570
1570
|
}
|
|
1571
1571
|
}
|
|
1572
1572
|
}
|
|
1573
1573
|
function we(o) {
|
|
1574
1574
|
const p = [];
|
|
1575
1575
|
if (!o) return p;
|
|
1576
|
-
const
|
|
1576
|
+
const q = /<div\s+class="artifactuse-placeholder[^"]*"[^>]*data-artifact-id="([^"]+)"[^>]*data-artifact-type="([^"]+)"[^>]*data-artifact=["']([^"']*)["'][^>]*><\/div>/gi;
|
|
1577
1577
|
let ne = 0, t;
|
|
1578
|
-
for (; (t =
|
|
1578
|
+
for (; (t = q.exec(o)) !== null; ) {
|
|
1579
1579
|
if (t.index > ne) {
|
|
1580
|
-
const
|
|
1581
|
-
|
|
1580
|
+
const v = o.slice(ne, t.index);
|
|
1581
|
+
v.trim() && p.push({ type: "html", content: v });
|
|
1582
1582
|
}
|
|
1583
|
-
const
|
|
1584
|
-
|
|
1583
|
+
const F = Xe(t[3]), i = t[2];
|
|
1584
|
+
F && (i === "form" && F.isInline ? p.push({ type: "form", artifact: F }) : i === "social" ? p.push({ type: "social", artifact: F }) : p.push({ type: "panel", artifact: F })), ne = t.index + t[0].length;
|
|
1585
1585
|
}
|
|
1586
1586
|
if (ne < o.length) {
|
|
1587
|
-
const
|
|
1588
|
-
|
|
1587
|
+
const F = o.slice(ne);
|
|
1588
|
+
F.trim() && p.push({ type: "html", content: F });
|
|
1589
1589
|
}
|
|
1590
1590
|
return p.length === 0 && o.trim() && p.push({ type: "html", content: o }), p;
|
|
1591
1591
|
}
|
|
1592
1592
|
function T(o) {
|
|
1593
|
-
e.set(He, o.type || "image"), e.set(xe, o.src || ""), e.set(ze, o.alt || ""), e.set(
|
|
1593
|
+
e.set(He, o.type || "image"), e.set(xe, o.src || ""), e.set(ze, o.alt || ""), e.set(qe, o.caption || ""), e.set(Ve, !0), pe("media-open", o);
|
|
1594
1594
|
}
|
|
1595
1595
|
function Ce() {
|
|
1596
|
-
e.set(Ve, !1), e.set(xe, ""), e.set(ze, ""), e.set(
|
|
1596
|
+
e.set(Ve, !1), e.set(xe, ""), e.set(ze, ""), e.set(qe, "");
|
|
1597
1597
|
}
|
|
1598
1598
|
function $e() {
|
|
1599
1599
|
if (!e.get(_)) return;
|
|
1600
1600
|
e.get(_).querySelectorAll('img[data-lightbox="true"]').forEach((i) => {
|
|
1601
|
-
i._lightboxHandler && i.removeEventListener("click", i._lightboxHandler), i._lightboxHandler = (
|
|
1602
|
-
|
|
1601
|
+
i._lightboxHandler && i.removeEventListener("click", i._lightboxHandler), i._lightboxHandler = (v) => {
|
|
1602
|
+
v.preventDefault(), v.stopPropagation(), T({
|
|
1603
1603
|
type: "image",
|
|
1604
1604
|
src: i.src,
|
|
1605
1605
|
alt: i.alt || "",
|
|
@@ -1607,20 +1607,20 @@ function qn(Be, d) {
|
|
|
1607
1607
|
});
|
|
1608
1608
|
}, i.addEventListener("click", i._lightboxHandler), i.style.cursor = "zoom-in";
|
|
1609
1609
|
}), e.get(_).querySelectorAll(".artifactuse-image-container img").forEach((i) => {
|
|
1610
|
-
i._lightboxHandler || (i._lightboxHandler = (
|
|
1611
|
-
|
|
1610
|
+
i._lightboxHandler || (i._lightboxHandler = (v) => {
|
|
1611
|
+
v.preventDefault(), v.stopPropagation();
|
|
1612
1612
|
const X = i.closest(".artifactuse-image-container"), W = X == null ? void 0 : X.querySelector(".artifactuse-image-caption"), Q = (W == null ? void 0 : W.textContent) || i.dataset.caption || i.alt || "";
|
|
1613
1613
|
T({ type: "image", src: i.src, alt: i.alt || "", caption: Q });
|
|
1614
1614
|
}, i.addEventListener("click", i._lightboxHandler), i.style.cursor = "zoom-in");
|
|
1615
1615
|
}), e.get(_).querySelectorAll(".artifactuse-gallery-item img, .artifactuse-image-gallery img").forEach((i) => {
|
|
1616
|
-
i._lightboxHandler || (i._lightboxHandler = (
|
|
1617
|
-
|
|
1616
|
+
i._lightboxHandler || (i._lightboxHandler = (v) => {
|
|
1617
|
+
v.preventDefault(), v.stopPropagation();
|
|
1618
1618
|
const X = i.closest(".artifactuse-gallery-item"), W = X == null ? void 0 : X.querySelector(".artifactuse-gallery-caption"), Q = (W == null ? void 0 : W.textContent) || i.dataset.caption || i.alt || "";
|
|
1619
1619
|
T({ type: "image", src: i.src, alt: i.alt || "", caption: Q });
|
|
1620
1620
|
}, i.addEventListener("click", i._lightboxHandler), i.style.cursor = "zoom-in");
|
|
1621
1621
|
}), e.get(_).querySelectorAll('a[href$=".pdf"], a[data-type="pdf"]').forEach((i) => {
|
|
1622
|
-
i._pdfHandler && i.removeEventListener("click", i._pdfHandler), i._pdfHandler = (
|
|
1623
|
-
|
|
1622
|
+
i._pdfHandler && i.removeEventListener("click", i._pdfHandler), i._pdfHandler = (v) => {
|
|
1623
|
+
v.preventDefault(), v.stopPropagation(), T({
|
|
1624
1624
|
type: "pdf",
|
|
1625
1625
|
src: i.href,
|
|
1626
1626
|
alt: i.textContent || "PDF Document",
|
|
@@ -1630,24 +1630,24 @@ function qn(Be, d) {
|
|
|
1630
1630
|
}), e.get(_).querySelectorAll(".artifactuse-pdf-container, [data-pdf-viewer]").forEach((i) => {
|
|
1631
1631
|
var X;
|
|
1632
1632
|
i._pdfHandler && i.removeEventListener("click", i._pdfHandler);
|
|
1633
|
-
const
|
|
1634
|
-
|
|
1633
|
+
const v = i.dataset.pdfSrc || ((X = i.querySelector("iframe")) == null ? void 0 : X.src) || "";
|
|
1634
|
+
v && (i._pdfHandler = (W) => {
|
|
1635
1635
|
W.preventDefault(), W.stopPropagation(), T({
|
|
1636
1636
|
type: "pdf",
|
|
1637
|
-
src:
|
|
1637
|
+
src: v,
|
|
1638
1638
|
alt: "PDF Document",
|
|
1639
1639
|
caption: i.dataset.caption || ""
|
|
1640
1640
|
});
|
|
1641
1641
|
}, i.addEventListener("click", i._pdfHandler), i.style.cursor = "pointer");
|
|
1642
1642
|
}), e.get(_).querySelectorAll(".artifactuse-video-preview-wrapper, .video-preview-wrapper").forEach((i) => {
|
|
1643
|
-
i._clickHandler && i.removeEventListener("click", i._clickHandler), i._clickHandler = (
|
|
1644
|
-
if (
|
|
1643
|
+
i._clickHandler && i.removeEventListener("click", i._clickHandler), i._clickHandler = (v) => {
|
|
1644
|
+
if (v.target.closest(".artifactuse-video-play-button")) return;
|
|
1645
1645
|
const X = i.dataset.videoUrl || i.dataset.url;
|
|
1646
1646
|
X && window.open(X, "_blank", "noopener,noreferrer");
|
|
1647
1647
|
}, i.addEventListener("click", i._clickHandler);
|
|
1648
1648
|
});
|
|
1649
1649
|
}
|
|
1650
|
-
function
|
|
1650
|
+
function Fe() {
|
|
1651
1651
|
if (!e.get(_)) return;
|
|
1652
1652
|
e.get(_).querySelectorAll("img").forEach((t) => {
|
|
1653
1653
|
t._lightboxHandler && (t.removeEventListener("click", t._lightboxHandler), delete t._lightboxHandler);
|
|
@@ -1694,10 +1694,10 @@ function qn(Be, d) {
|
|
|
1694
1694
|
function b(o) {
|
|
1695
1695
|
pe("social-copy", o.detail);
|
|
1696
1696
|
}
|
|
1697
|
-
|
|
1697
|
+
ua(() => {
|
|
1698
1698
|
y() && e.set(ce, !0), y() || Ye();
|
|
1699
1699
|
}), Aa(() => {
|
|
1700
|
-
be && clearTimeout(be),
|
|
1700
|
+
be && clearTimeout(be), Fe();
|
|
1701
1701
|
}), e.legacy_pre_effect(() => {
|
|
1702
1702
|
}, () => {
|
|
1703
1703
|
e.set(fe, typeof ae == "function" ? ae() : "dark");
|
|
@@ -1725,17 +1725,17 @@ function qn(Be, d) {
|
|
|
1725
1725
|
7,
|
|
1726
1726
|
() => e.get(P),
|
|
1727
1727
|
(o, p) => {
|
|
1728
|
-
var
|
|
1729
|
-
return o.type === "html" ? `html-${p}` : `${o.type}-${(
|
|
1728
|
+
var q;
|
|
1729
|
+
return o.type === "html" ? `html-${p}` : `${o.type}-${(q = o.artifact) == null ? void 0 : q.id}`;
|
|
1730
1730
|
},
|
|
1731
1731
|
(o, p) => {
|
|
1732
|
-
var
|
|
1732
|
+
var q = e.comment(), ne = e.first_child(q);
|
|
1733
1733
|
{
|
|
1734
1734
|
var t = (i) => {
|
|
1735
|
-
var
|
|
1736
|
-
e.html(X, () => (e.get(p), e.untrack(() => e.get(p).content))), e.reset(
|
|
1737
|
-
},
|
|
1738
|
-
var
|
|
1735
|
+
var v = Bi(), X = e.child(v);
|
|
1736
|
+
e.html(X, () => (e.get(p), e.untrack(() => e.get(p).content))), e.reset(v), e.append(i, v);
|
|
1737
|
+
}, F = (i) => {
|
|
1738
|
+
var v = e.comment(), X = e.first_child(v);
|
|
1739
1739
|
{
|
|
1740
1740
|
var W = (ee) => {
|
|
1741
1741
|
zs(ee, {
|
|
@@ -1791,7 +1791,7 @@ function qn(Be, d) {
|
|
|
1791
1791
|
e.if(
|
|
1792
1792
|
de,
|
|
1793
1793
|
(me) => {
|
|
1794
|
-
e.get(p), e.deep_read_state(
|
|
1794
|
+
e.get(p), e.deep_read_state(u()), e.untrack(() => e.get(p).type === "panel" && u()) && me(se);
|
|
1795
1795
|
},
|
|
1796
1796
|
!0
|
|
1797
1797
|
);
|
|
@@ -1816,13 +1816,13 @@ function qn(Be, d) {
|
|
|
1816
1816
|
!0
|
|
1817
1817
|
);
|
|
1818
1818
|
}
|
|
1819
|
-
e.append(i,
|
|
1819
|
+
e.append(i, v);
|
|
1820
1820
|
};
|
|
1821
1821
|
e.if(ne, (i) => {
|
|
1822
|
-
e.get(p), e.untrack(() => e.get(p).type === "html") ? i(t) : i(
|
|
1822
|
+
e.get(p), e.untrack(() => e.get(p).type === "html") ? i(t) : i(F, !1);
|
|
1823
1823
|
});
|
|
1824
1824
|
}
|
|
1825
|
-
e.append(o,
|
|
1825
|
+
e.append(o, q);
|
|
1826
1826
|
}
|
|
1827
1827
|
), e.reset(re), e.bind_this(re, (o) => e.set(_, o), () => e.get(_));
|
|
1828
1828
|
var _e = e.sibling(re, 2);
|
|
@@ -1840,39 +1840,39 @@ function qn(Be, d) {
|
|
|
1840
1840
|
return e.get(ze);
|
|
1841
1841
|
},
|
|
1842
1842
|
get caption() {
|
|
1843
|
-
return e.get(
|
|
1843
|
+
return e.get(qe);
|
|
1844
1844
|
},
|
|
1845
1845
|
$$events: { close: Ce }
|
|
1846
1846
|
}), e.reset(J), e.bind_this(J, (o) => e.set(Ae, o), () => e.get(Ae)), e.append(Be, J), e.pop();
|
|
1847
1847
|
}
|
|
1848
|
-
var Mi = e.from_html('<button class="artifactuse-panel__resize-handle" aria-label="Resize panel"><div class="artifactuse-panel__resize-handle-line"></div></button>'), zi = e.from_html('<a href="https://artifactuse.com" target="_blank" rel="noopener noreferrer" class="artifactuse-panel__branding"><svg width="16" height="16" viewBox="0 0 42 42" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M16.6667 41.6673V10.4173C16.6667 9.86478 16.4472 9.33488 16.0565 8.94418C15.6658 8.55348 15.1359 8.33398 14.5833 8.33398H4.16667C3.0616 8.33398 2.00179 8.77297 1.22039 9.55437C0.438987 10.3358 0 11.3956 0 12.5007V37.5006C0 38.6057 0.438987 39.6655 1.22039 40.4469C2.00179 41.2283 3.0616 41.6673 4.16667 41.6673H29.1667C30.2717 41.6673 31.3315 41.2283 32.1129 40.4469C32.8943 39.6655 33.3333 38.6057 33.3333 37.5006V27.084C33.3333 26.5314 33.1138 26.0015 32.7231 25.6108C32.3324 25.2201 31.8025 25.0007 31.25 25.0007H0" fill="#5F51C8"></path><path d="M39.5833 0H27.0833C25.9327 0 25 0.93274 25 2.08333V14.5833C25 15.7339 25.9327 16.6667 27.0833 16.6667H39.5833C40.7339 16.6667 41.6667 15.7339 41.6667 14.5833V2.08333C41.6667 0.93274 40.7339 0 39.5833 0Z" fill="#695AE0"></path></svg> <span>Artifactuse</span></a>'), Ii = e.from_html('<div><!> <header class="artifactuse-panel__header artifactuse-panel__header--simple"><div class="artifactuse-panel__title"><span class="artifactuse-panel__icon"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="16 18 22 12 16 6"></polyline><polyline points="8 6 2 12 8 18"></polyline></svg></span> <div class="artifactuse-panel__title-content"><span class="artifactuse-panel__name">Artifacts</span></div></div> <div class="artifactuse-panel__actions"><button class="artifactuse-panel__action artifactuse-panel__action--close" title="Close panel"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg></button></div></header> <div class="artifactuse-panel__empty"><div class="artifactuse-panel__empty-icon"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z"></path><polyline points="14 2 14 8 20 8"></polyline></svg></div> <h3 class="artifactuse-panel__empty-title">No artifacts yet</h3> <p class="artifactuse-panel__empty-text">Code blocks, forms, and other interactive content will appear here as the AI generates them.</p></div> <footer class="artifactuse-panel__footer artifactuse-panel__footer--simple"><!></footer></div>'), qi = e.from_html('<button class="artifactuse-panel__resize-handle" aria-label="Resize panel"><div class="artifactuse-panel__resize-handle-line"></div></button>'), Fi = e.from_svg('<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><polyline points="7 10 12 15 17 10"></polyline><line x1="12" y1="15" x2="12" y2="3"></line></svg>'), Ri = e.from_svg('<svg class="artifactuse-panel__spinner-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="10" stroke-dasharray="32" stroke-dashoffset="32"></circle></svg>'), Di = e.from_html('<button class="artifactuse-panel__list-item"><span class="artifactuse-panel__list-item-icon"><!></span> <div class="artifactuse-panel__list-item-content"><span class="artifactuse-panel__list-item-title"> </span> <span class="artifactuse-panel__list-item-meta"> <!></span></div> <span class="artifactuse-panel__list-item-arrow"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="9 18 15 12 9 6"></polyline></svg></span></button>'), Vi = e.from_html('<a href="https://artifactuse.com" target="_blank" rel="noopener noreferrer" class="artifactuse-panel__branding"><svg width="16" height="16" viewBox="0 0 42 42" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M16.6667 41.6673V10.4173C16.6667 9.86478 16.4472 9.33488 16.0565 8.94418C15.6658 8.55348 15.1359 8.33398 14.5833 8.33398H4.16667C3.0616 8.33398 2.00179 8.77297 1.22039 9.55437C0.438987 10.3358 0 11.3956 0 12.5007V37.5006C0 38.6057 0.438987 39.6655 1.22039 40.4469C2.00179 41.2283 3.0616 41.6673 4.16667 41.6673H29.1667C30.2717 41.6673 31.3315 41.2283 32.1129 40.4469C32.8943 39.6655 33.3333 38.6057 33.3333 37.5006V27.084C33.3333 26.5314 33.1138 26.0015 32.7231 25.6108C32.3324 25.2201 31.8025 25.0007 31.25 25.0007H0" fill="#5F51C8"></path><path d="M39.5833 0H27.0833C25.9327 0 25 0.93274 25 2.08333V14.5833C25 15.7339 25.9327 16.6667 27.0833 16.6667H39.5833C40.7339 16.6667 41.6667 15.7339 41.6667 14.5833V2.08333C41.6667 0.93274 40.7339 0 39.5833 0Z" fill="#695AE0"></path></svg> <span>Artifactuse</span></a>'), Ui = e.from_html('<div><!> <header class="artifactuse-panel__header artifactuse-panel__header--simple"><div class="artifactuse-panel__title"><span class="artifactuse-panel__icon"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="16 18 22 12 16 6"></polyline><polyline points="8 6 2 12 8 18"></polyline></svg></span> <div class="artifactuse-panel__title-content"><span class="artifactuse-panel__name">Artifacts</span> <span class="artifactuse-panel__meta"> </span></div></div> <div class="artifactuse-panel__actions"><button title="Download all as ZIP"><!></button> <button class="artifactuse-panel__action artifactuse-panel__action--close" title="Close panel"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg></button></div></header> <div class="artifactuse-panel__list"><div class="artifactuse-panel__list-items"></div></div> <footer class="artifactuse-panel__footer artifactuse-panel__footer--simple"><!></footer></div>'), Oi = e.from_html('<button class="artifactuse-panel__resize-handle" aria-label="Resize panel"><div class="artifactuse-panel__resize-handle-line"></div></button>'), Ni = e.from_html('<button class="artifactuse-panel__back" title="Back to list"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="15 18 9 12 15 6"></polyline></svg></button>'), ji = e.from_html('<button title="Preview"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"></path><circle cx="12" cy="12" r="3"></circle></svg></button>'), Ji = e.from_html('<button title="Code"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="16 18 22 12 16 6"></polyline><polyline points="8 6 2 12 8 18"></polyline></svg></button>'), Xi = e.from_html('<button title="Split view"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><line x1="12" y1="3" x2="12" y2="21"></line></svg></button>'), Wi = e.from_html('<button title="Edit"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"></path><path d="M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"></path></svg></button>'), Zi = e.from_html('<button class="artifactuse-panel__action artifactuse-panel__action--save" title="Save"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z"></path><polyline points="17 21 17 13 7 13 7 21"></polyline><polyline points="7 3 7 8 15 8"></polyline></svg></button>'), Ki = e.from_svg('<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" y1="3" x2="14" y2="10"></line><line x1="3" y1="21" x2="10" y2="14"></line></svg>'), Yi = e.from_svg('<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="4 14 10 14 10 20"></polyline><polyline points="20 10 14 10 14 4"></polyline><line x1="14" y1="10" x2="21" y2="3"></line><line x1="3" y1="21" x2="10" y2="14"></line></svg>'), Qi = e.from_html('<div class="artifactuse-panel__loading"><div class="artifactuse-panel__spinner"></div></div>'), Gi = e.from_html('<div class="artifactuse-panel__loading"><div class="artifactuse-panel__spinner"></div></div>'), en = e.from_html('<iframe sandbox="allow-scripts allow-same-origin allow-forms allow-popups allow-modals allow-downloads allow-top-navigation-by-user-activation" allow="camera; microphone; fullscreen; geolocation; display-capture; autoplay; clipboard-write" title="Artifact Preview"></iframe>'), tn = e.from_html('<div class="artifactuse-panel__no-preview"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M9 17H7A5 5 0 0 1 7 7h2"></path><path d="M15 7h2a5 5 0 1 1 0 10h-2"></path><line x1="8" y1="12" x2="16" y2="12"></line></svg> <p> </p></div>'), an = e.from_html('<div class="artifactuse-panel__preview"><!> <!></div>'), rn = e.from_html('<button class="artifactuse-panel__split-handle" aria-label="Split Resize"><div class="artifactuse-panel__split-handle-line"></div></button>'), sn = e.from_html('<a href="https://artifactuse.com" target="_blank" rel="noopener noreferrer" class="artifactuse-panel__branding" title="Powered by Artifactuse"><svg width="16" height="16" viewBox="0 0 42 42" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M16.6667 41.6673V10.4173C16.6667 9.86478 16.4472 9.33488 16.0565 8.94418C15.6658 8.55348 15.1359 8.33398 14.5833 8.33398H4.16667C3.0616 8.33398 2.00179 8.77297 1.22039 9.55437C0.438987 10.3358 0 11.3956 0 12.5007V37.5006C0 38.6057 0.438987 39.6655 1.22039 40.4469C2.00179 41.2283 3.0616 41.6673 4.16667 41.6673H29.1667C30.2717 41.6673 31.3315 41.2283 32.1129 40.4469C32.8943 39.6655 33.3333 38.6057 33.3333 37.5006V27.084C33.3333 26.5314 33.1138 26.0015 32.7231 25.6108C32.3324 25.2201 31.8025 25.0007 31.25 25.0007H0" fill="#5F51C8"></path><path d="M39.5833 0H27.0833C25.9327 0 25 0.93274 25 2.08333V14.5833C25 15.7339 25.9327 16.6667 27.0833 16.6667H39.5833C40.7339 16.6667 41.6667 15.7339 41.6667 14.5833V2.08333C41.6667 0.93274 40.7339 0 39.5833 0Z" fill="#695AE0"></path></svg> <span>Artifactuse</span></a>'), nn = e.from_html('<span class="artifactuse-panel__badge artifactuse-panel__badge--secondary"> </span>'), ln = e.from_svg('<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path></svg>'), cn = e.from_svg('<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="20 6 9 17 4 12"></polyline></svg>'), on = e.from_html('<div class="artifactuse-share-popup__loading"><div class="artifactuse-share-popup__spinner"></div> <p class="artifactuse-share-popup__loading-text">Creating link...</p></div>'), vn = e.from_html('<div><div class="artifactuse-share-popup__error"><p class="artifactuse-share-popup__error-text"> </p></div> <div class="artifactuse-share-popup__actions"><button class="artifactuse-share-popup__btn artifactuse-share-popup__btn--secondary">Back</button> <button class="artifactuse-share-popup__btn artifactuse-share-popup__btn--primary">Retry</button></div></div>'), un = e.from_html('<div class="artifactuse-share-popup__options"><button class="artifactuse-share-popup__option"><div class="artifactuse-share-popup__option-icon"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg></div> <div class="artifactuse-share-popup__option-content"><p class="artifactuse-share-popup__option-title">Share link</p> <p class="artifactuse-share-popup__option-desc">Expires in 30 days</p></div></button> <button class="artifactuse-share-popup__option"><div class="artifactuse-share-popup__option-icon"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z"></path><polyline points="17 21 17 13 7 13 7 21"></polyline><polyline points="7 3 7 8 15 8"></polyline></svg></div> <div class="artifactuse-share-popup__option-content"><p class="artifactuse-share-popup__option-title">Save to account</p> <p class="artifactuse-share-popup__option-desc">Permanent, manageable</p></div></button> <button class="artifactuse-share-popup__option"><div class="artifactuse-share-popup__option-icon"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="23 4 23 10 17 10"></polyline><polyline points="1 20 1 14 7 14"></polyline><path d="M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"></path></svg></div> <div class="artifactuse-share-popup__option-content"><p class="artifactuse-share-popup__option-title">Update saved</p> <p class="artifactuse-share-popup__option-desc">Replace an existing artifact</p></div></button></div>'), dn = e.from_html('<div class="artifactuse-share-popup__loading"><div class="artifactuse-share-popup__spinner"></div> <p class="artifactuse-share-popup__loading-text">Loading artifacts...</p></div>'), pn = e.from_html('<div class="artifactuse-share-popup__empty">No saved artifacts of this type</div>'), _n = e.from_html('<button class="artifactuse-share-popup__artifact-item"><span class="artifactuse-share-popup__artifact-name"> </span> <span class="artifactuse-share-popup__artifact-date"> </span></button>'), fn = e.from_html('<div class="artifactuse-share-popup__artifact-list"></div>'), gn = e.from_html('<div><!> <button class="artifactuse-share-popup__back-btn">Back</button></div>'), mn = e.from_html('<div class="artifactuse-share-popup__expiry"><span class="artifactuse-share-popup__expiry-icon"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="8" x2="12" y2="12"></line><line x1="12" y1="16" x2="12.01" y2="16"></line></svg></span> <span class="artifactuse-share-popup__expiry-text"> </span></div>'), hn = e.from_html('<div class="artifactuse-share-popup__save-prompt"><p class="artifactuse-share-popup__save-prompt-text">Keep it permanently?</p> <button class="artifactuse-share-popup__save-prompt-btn">Save to account</button></div>'), bn = e.from_html('<div class="artifactuse-share-popup__success"><div class="artifactuse-share-popup__success-icon"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="20 6 9 17 4 12"></polyline></svg></div> <div class="artifactuse-share-popup__link-wrapper"><input type="text" class="artifactuse-share-popup__link" readonly=""/> <button> </button></div> <!> <!></div>'), kn = e.from_html('<div class="artifactuse-share-popup"><div class="artifactuse-share-popup__header"><span class="artifactuse-share-popup__title"> </span> <button aria-label="share" class="artifactuse-share-popup__close"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg></button></div> <div class="artifactuse-share-popup__body"><!></div> <div class="artifactuse-share-popup__footer"><a href="https://artifactuse.com" target="_blank" rel="noopener noreferrer" class="artifactuse-share-popup__branding"><svg width="12" height="12" viewBox="0 0 42 42" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M16.6667 41.6673V10.4173C16.6667 9.86478 16.4472 9.33488 16.0565 8.94418C15.6658 8.55348 15.1359 8.33398 14.5833 8.33398H4.16667C3.0616 8.33398 2.00179 8.77297 1.22039 9.55437C0.438987 10.3358 0 11.3956 0 12.5007V37.5006C0 38.6057 0.438987 39.6655 1.22039 40.4469C2.00179 41.2283 3.0616 41.6673 4.16667 41.6673H29.1667C30.2717 41.6673 31.3315 41.2283 32.1129 40.4469C32.8943 39.6655 33.3333 38.6057 33.3333 37.5006V27.084C33.3333 26.5314 33.1138 26.0015 32.7231 25.6108C32.3324 25.2201 31.8025 25.0007 31.25 25.0007H0" fill="#5F51C8"></path><path d="M39.5833 0H27.0833C25.9327 0 25 0.93274 25 2.08333V14.5833C25 15.7339 25.9327 16.6667 27.0833 16.6667H39.5833C40.7339 16.6667 41.6667 15.7339 41.6667 14.5833V2.08333C41.6667 0.93274 40.7339 0 39.5833 0Z" fill="#695AE0"></path></svg> <span>Powered by Artifactuse</span></a></div></div>'), yn = e.from_html('<div style="position: relative;"><button class="artifactuse-panel__footer-action" title="Share"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="18" cy="5" r="3"></circle><circle cx="6" cy="12" r="3"></circle><circle cx="18" cy="19" r="3"></circle><line x1="8.59" y1="13.51" x2="15.42" y2="17.49"></line><line x1="15.41" y1="6.51" x2="8.59" y2="10.49"></line></svg></button> <!></div>'), xn = e.from_html('<button><span class="artifactuse-panel__artifact-item-icon"><!></span> <div class="artifactuse-panel__artifact-item-content"><span class="artifactuse-panel__artifact-item-title"> </span> <span class="artifactuse-panel__artifact-item-meta"> <!></span></div> <span class="artifactuse-panel__artifact-item-index"> </span></button>'), wn = e.from_html('<div class="artifactuse-panel__artifact-list"><div class="artifactuse-panel__artifact-list-header"><span> </span> <button class="artifactuse-panel__artifact-list-close" aria-label="Close artifact list"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg></button></div> <div class="artifactuse-panel__artifact-list-items"></div></div>'), Cn = e.from_html('<div class="artifactuse-panel__nav"><button class="artifactuse-panel__nav-btn" title="Previous artifact"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="15 18 9 12 15 6"></polyline></svg></button> <button class="artifactuse-panel__nav-trigger"><span> </span> <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="6 9 12 15 18 9"></polyline></svg></button> <button class="artifactuse-panel__nav-btn" title="Next artifact"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="9 18 15 12 9 6"></polyline></svg></button> <!></div>'), $n = e.from_html('<div><!> <header class="artifactuse-panel__header"><!> <div class="artifactuse-panel__title"><span class="artifactuse-panel__icon"><svg viewBox="0 0 24 24" fill="currentColor"><!></svg></span> <div class="artifactuse-panel__title-content"><span class="artifactuse-panel__name"> </span> <span class="artifactuse-panel__meta"> <!></span></div></div> <div class="artifactuse-panel__tabs"><!> <!> <!> <!></div> <div class="artifactuse-panel__actions"><!> <button class="artifactuse-panel__action"><!></button> <button class="artifactuse-panel__action artifactuse-panel__action--close" title="Close"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg></button></div></header> <div><!> <!> <div class="artifactuse-panel__code"><!> <div class="artifactuse-panel__code-scroll"><div class="artifactuse-panel__line-numbers"></div> <pre><code></code></pre></div></div> <div class="artifactuse-panel__edit"><div class="artifactuse-panel__editor-container"></div></div></div> <footer class="artifactuse-panel__footer"><div class="artifactuse-panel__footer-left"><!> <!></div> <div class="artifactuse-panel__footer-right"><button><!></button> <button class="artifactuse-panel__footer-action" title="Download"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><polyline points="7 10 12 15 17 10"></polyline><line x1="12" y1="15" x2="12" y2="3"></line></svg></button> <!> <!></div></footer></div>');
|
|
1849
|
-
function
|
|
1848
|
+
var Mi = e.from_html('<button class="artifactuse-panel__resize-handle" aria-label="Resize panel"><div class="artifactuse-panel__resize-handle-line"></div></button>'), zi = e.from_html('<a href="https://artifactuse.com" target="_blank" rel="noopener noreferrer" class="artifactuse-panel__branding"><svg width="16" height="16" viewBox="0 0 42 42" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M16.6667 41.6673V10.4173C16.6667 9.86478 16.4472 9.33488 16.0565 8.94418C15.6658 8.55348 15.1359 8.33398 14.5833 8.33398H4.16667C3.0616 8.33398 2.00179 8.77297 1.22039 9.55437C0.438987 10.3358 0 11.3956 0 12.5007V37.5006C0 38.6057 0.438987 39.6655 1.22039 40.4469C2.00179 41.2283 3.0616 41.6673 4.16667 41.6673H29.1667C30.2717 41.6673 31.3315 41.2283 32.1129 40.4469C32.8943 39.6655 33.3333 38.6057 33.3333 37.5006V27.084C33.3333 26.5314 33.1138 26.0015 32.7231 25.6108C32.3324 25.2201 31.8025 25.0007 31.25 25.0007H0" fill="#5F51C8"></path><path d="M39.5833 0H27.0833C25.9327 0 25 0.93274 25 2.08333V14.5833C25 15.7339 25.9327 16.6667 27.0833 16.6667H39.5833C40.7339 16.6667 41.6667 15.7339 41.6667 14.5833V2.08333C41.6667 0.93274 40.7339 0 39.5833 0Z" fill="#695AE0"></path></svg> <span>Artifactuse</span></a>'), Fi = e.from_html('<div><!> <header class="artifactuse-panel__header artifactuse-panel__header--simple"><div class="artifactuse-panel__title"><span class="artifactuse-panel__icon"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="16 18 22 12 16 6"></polyline><polyline points="8 6 2 12 8 18"></polyline></svg></span> <div class="artifactuse-panel__title-content"><span class="artifactuse-panel__name">Artifacts</span></div></div> <div class="artifactuse-panel__actions"><button class="artifactuse-panel__action artifactuse-panel__action--close" title="Close panel"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg></button></div></header> <div class="artifactuse-panel__empty"><div class="artifactuse-panel__empty-icon"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z"></path><polyline points="14 2 14 8 20 8"></polyline></svg></div> <h3 class="artifactuse-panel__empty-title">No artifacts yet</h3> <p class="artifactuse-panel__empty-text">Code blocks, forms, and other interactive content will appear here as the AI generates them.</p></div> <footer class="artifactuse-panel__footer artifactuse-panel__footer--simple"><!></footer></div>'), Ii = e.from_html('<button class="artifactuse-panel__resize-handle" aria-label="Resize panel"><div class="artifactuse-panel__resize-handle-line"></div></button>'), qi = e.from_svg('<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><polyline points="7 10 12 15 17 10"></polyline><line x1="12" y1="15" x2="12" y2="3"></line></svg>'), Ri = e.from_svg('<svg class="artifactuse-panel__spinner-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="10" stroke-dasharray="32" stroke-dashoffset="32"></circle></svg>'), Di = e.from_html('<button class="artifactuse-panel__list-item"><span class="artifactuse-panel__list-item-icon"><!></span> <div class="artifactuse-panel__list-item-content"><span class="artifactuse-panel__list-item-title"> </span> <span class="artifactuse-panel__list-item-meta"> <!></span></div> <span class="artifactuse-panel__list-item-arrow"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="9 18 15 12 9 6"></polyline></svg></span></button>'), Vi = e.from_html('<a href="https://artifactuse.com" target="_blank" rel="noopener noreferrer" class="artifactuse-panel__branding"><svg width="16" height="16" viewBox="0 0 42 42" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M16.6667 41.6673V10.4173C16.6667 9.86478 16.4472 9.33488 16.0565 8.94418C15.6658 8.55348 15.1359 8.33398 14.5833 8.33398H4.16667C3.0616 8.33398 2.00179 8.77297 1.22039 9.55437C0.438987 10.3358 0 11.3956 0 12.5007V37.5006C0 38.6057 0.438987 39.6655 1.22039 40.4469C2.00179 41.2283 3.0616 41.6673 4.16667 41.6673H29.1667C30.2717 41.6673 31.3315 41.2283 32.1129 40.4469C32.8943 39.6655 33.3333 38.6057 33.3333 37.5006V27.084C33.3333 26.5314 33.1138 26.0015 32.7231 25.6108C32.3324 25.2201 31.8025 25.0007 31.25 25.0007H0" fill="#5F51C8"></path><path d="M39.5833 0H27.0833C25.9327 0 25 0.93274 25 2.08333V14.5833C25 15.7339 25.9327 16.6667 27.0833 16.6667H39.5833C40.7339 16.6667 41.6667 15.7339 41.6667 14.5833V2.08333C41.6667 0.93274 40.7339 0 39.5833 0Z" fill="#695AE0"></path></svg> <span>Artifactuse</span></a>'), Ui = e.from_html('<div><!> <header class="artifactuse-panel__header artifactuse-panel__header--simple"><div class="artifactuse-panel__title"><span class="artifactuse-panel__icon"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="16 18 22 12 16 6"></polyline><polyline points="8 6 2 12 8 18"></polyline></svg></span> <div class="artifactuse-panel__title-content"><span class="artifactuse-panel__name">Artifacts</span> <span class="artifactuse-panel__meta"> </span></div></div> <div class="artifactuse-panel__actions"><button title="Download all as ZIP"><!></button> <button class="artifactuse-panel__action artifactuse-panel__action--close" title="Close panel"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg></button></div></header> <div class="artifactuse-panel__list"><div class="artifactuse-panel__list-items"></div></div> <footer class="artifactuse-panel__footer artifactuse-panel__footer--simple"><!></footer></div>'), Oi = e.from_html('<button class="artifactuse-panel__resize-handle" aria-label="Resize panel"><div class="artifactuse-panel__resize-handle-line"></div></button>'), Ni = e.from_html('<button class="artifactuse-panel__back" title="Back to list"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="15 18 9 12 15 6"></polyline></svg></button>'), ji = e.from_html('<button title="Preview"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"></path><circle cx="12" cy="12" r="3"></circle></svg></button>'), Ji = e.from_html('<button title="Code"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="16 18 22 12 16 6"></polyline><polyline points="8 6 2 12 8 18"></polyline></svg></button>'), Xi = e.from_html('<button title="Split view"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><line x1="12" y1="3" x2="12" y2="21"></line></svg></button>'), Wi = e.from_html('<button title="Edit"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"></path><path d="M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"></path></svg></button>'), Zi = e.from_html('<button class="artifactuse-panel__action artifactuse-panel__action--save" title="Save"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z"></path><polyline points="17 21 17 13 7 13 7 21"></polyline><polyline points="7 3 7 8 15 8"></polyline></svg></button>'), Ki = e.from_svg('<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" y1="3" x2="14" y2="10"></line><line x1="3" y1="21" x2="10" y2="14"></line></svg>'), Yi = e.from_svg('<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="4 14 10 14 10 20"></polyline><polyline points="20 10 14 10 14 4"></polyline><line x1="14" y1="10" x2="21" y2="3"></line><line x1="3" y1="21" x2="10" y2="14"></line></svg>'), Qi = e.from_html('<div class="artifactuse-panel__loading"><div class="artifactuse-panel__spinner"></div></div>'), Gi = e.from_html('<div class="artifactuse-panel__loading"><div class="artifactuse-panel__spinner"></div></div>'), en = e.from_html('<iframe sandbox="allow-scripts allow-same-origin allow-forms allow-popups allow-modals allow-downloads allow-top-navigation-by-user-activation" allow="camera; microphone; fullscreen; geolocation; display-capture; autoplay; clipboard-write" title="Artifact Preview"></iframe>'), tn = e.from_html('<div class="artifactuse-panel__no-preview"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M9 17H7A5 5 0 0 1 7 7h2"></path><path d="M15 7h2a5 5 0 1 1 0 10h-2"></path><line x1="8" y1="12" x2="16" y2="12"></line></svg> <p> </p></div>'), an = e.from_html('<div class="artifactuse-panel__preview"><!> <!></div>'), rn = e.from_html('<button class="artifactuse-panel__split-handle" aria-label="Split Resize"><div class="artifactuse-panel__split-handle-line"></div></button>'), sn = e.from_html('<a href="https://artifactuse.com" target="_blank" rel="noopener noreferrer" class="artifactuse-panel__branding" title="Powered by Artifactuse"><svg width="16" height="16" viewBox="0 0 42 42" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M16.6667 41.6673V10.4173C16.6667 9.86478 16.4472 9.33488 16.0565 8.94418C15.6658 8.55348 15.1359 8.33398 14.5833 8.33398H4.16667C3.0616 8.33398 2.00179 8.77297 1.22039 9.55437C0.438987 10.3358 0 11.3956 0 12.5007V37.5006C0 38.6057 0.438987 39.6655 1.22039 40.4469C2.00179 41.2283 3.0616 41.6673 4.16667 41.6673H29.1667C30.2717 41.6673 31.3315 41.2283 32.1129 40.4469C32.8943 39.6655 33.3333 38.6057 33.3333 37.5006V27.084C33.3333 26.5314 33.1138 26.0015 32.7231 25.6108C32.3324 25.2201 31.8025 25.0007 31.25 25.0007H0" fill="#5F51C8"></path><path d="M39.5833 0H27.0833C25.9327 0 25 0.93274 25 2.08333V14.5833C25 15.7339 25.9327 16.6667 27.0833 16.6667H39.5833C40.7339 16.6667 41.6667 15.7339 41.6667 14.5833V2.08333C41.6667 0.93274 40.7339 0 39.5833 0Z" fill="#695AE0"></path></svg> <span>Artifactuse</span></a>'), nn = e.from_html('<span class="artifactuse-panel__badge artifactuse-panel__badge--secondary"> </span>'), ln = e.from_svg('<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path></svg>'), cn = e.from_svg('<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="20 6 9 17 4 12"></polyline></svg>'), on = e.from_html('<div class="artifactuse-share-popup__loading"><div class="artifactuse-share-popup__spinner"></div> <p class="artifactuse-share-popup__loading-text">Creating link...</p></div>'), un = e.from_html('<div><div class="artifactuse-share-popup__error"><p class="artifactuse-share-popup__error-text"> </p></div> <div class="artifactuse-share-popup__actions"><button class="artifactuse-share-popup__btn artifactuse-share-popup__btn--secondary">Back</button> <button class="artifactuse-share-popup__btn artifactuse-share-popup__btn--primary">Retry</button></div></div>'), vn = e.from_html('<div class="artifactuse-share-popup__options"><button class="artifactuse-share-popup__option"><div class="artifactuse-share-popup__option-icon"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg></div> <div class="artifactuse-share-popup__option-content"><p class="artifactuse-share-popup__option-title">Share link</p> <p class="artifactuse-share-popup__option-desc">Expires in 30 days</p></div></button> <button class="artifactuse-share-popup__option"><div class="artifactuse-share-popup__option-icon"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z"></path><polyline points="17 21 17 13 7 13 7 21"></polyline><polyline points="7 3 7 8 15 8"></polyline></svg></div> <div class="artifactuse-share-popup__option-content"><p class="artifactuse-share-popup__option-title">Save to account</p> <p class="artifactuse-share-popup__option-desc">Permanent, manageable</p></div></button> <button class="artifactuse-share-popup__option"><div class="artifactuse-share-popup__option-icon"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="23 4 23 10 17 10"></polyline><polyline points="1 20 1 14 7 14"></polyline><path d="M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"></path></svg></div> <div class="artifactuse-share-popup__option-content"><p class="artifactuse-share-popup__option-title">Update saved</p> <p class="artifactuse-share-popup__option-desc">Replace an existing artifact</p></div></button></div>'), dn = e.from_html('<div class="artifactuse-share-popup__loading"><div class="artifactuse-share-popup__spinner"></div> <p class="artifactuse-share-popup__loading-text">Loading artifacts...</p></div>'), pn = e.from_html('<div class="artifactuse-share-popup__empty">No saved artifacts of this type</div>'), _n = e.from_html('<button class="artifactuse-share-popup__artifact-item"><span class="artifactuse-share-popup__artifact-name"> </span> <span class="artifactuse-share-popup__artifact-date"> </span></button>'), fn = e.from_html('<div class="artifactuse-share-popup__artifact-list"></div>'), gn = e.from_html('<div><!> <button class="artifactuse-share-popup__back-btn">Back</button></div>'), mn = e.from_html('<div class="artifactuse-share-popup__expiry"><span class="artifactuse-share-popup__expiry-icon"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="8" x2="12" y2="12"></line><line x1="12" y1="16" x2="12.01" y2="16"></line></svg></span> <span class="artifactuse-share-popup__expiry-text"> </span></div>'), hn = e.from_html('<div class="artifactuse-share-popup__save-prompt"><p class="artifactuse-share-popup__save-prompt-text">Keep it permanently?</p> <button class="artifactuse-share-popup__save-prompt-btn">Save to account</button></div>'), bn = e.from_html('<div class="artifactuse-share-popup__success"><div class="artifactuse-share-popup__success-icon"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="20 6 9 17 4 12"></polyline></svg></div> <div class="artifactuse-share-popup__link-wrapper"><input type="text" class="artifactuse-share-popup__link" readonly=""/> <button> </button></div> <!> <!></div>'), kn = e.from_html('<div class="artifactuse-share-popup"><div class="artifactuse-share-popup__header"><span class="artifactuse-share-popup__title"> </span> <button aria-label="share" class="artifactuse-share-popup__close"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg></button></div> <div class="artifactuse-share-popup__body"><!></div> <div class="artifactuse-share-popup__footer"><a href="https://artifactuse.com" target="_blank" rel="noopener noreferrer" class="artifactuse-share-popup__branding"><svg width="12" height="12" viewBox="0 0 42 42" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M16.6667 41.6673V10.4173C16.6667 9.86478 16.4472 9.33488 16.0565 8.94418C15.6658 8.55348 15.1359 8.33398 14.5833 8.33398H4.16667C3.0616 8.33398 2.00179 8.77297 1.22039 9.55437C0.438987 10.3358 0 11.3956 0 12.5007V37.5006C0 38.6057 0.438987 39.6655 1.22039 40.4469C2.00179 41.2283 3.0616 41.6673 4.16667 41.6673H29.1667C30.2717 41.6673 31.3315 41.2283 32.1129 40.4469C32.8943 39.6655 33.3333 38.6057 33.3333 37.5006V27.084C33.3333 26.5314 33.1138 26.0015 32.7231 25.6108C32.3324 25.2201 31.8025 25.0007 31.25 25.0007H0" fill="#5F51C8"></path><path d="M39.5833 0H27.0833C25.9327 0 25 0.93274 25 2.08333V14.5833C25 15.7339 25.9327 16.6667 27.0833 16.6667H39.5833C40.7339 16.6667 41.6667 15.7339 41.6667 14.5833V2.08333C41.6667 0.93274 40.7339 0 39.5833 0Z" fill="#695AE0"></path></svg> <span>Powered by Artifactuse</span></a></div></div>'), yn = e.from_html('<div style="position: relative;"><button class="artifactuse-panel__footer-action" title="Share"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="18" cy="5" r="3"></circle><circle cx="6" cy="12" r="3"></circle><circle cx="18" cy="19" r="3"></circle><line x1="8.59" y1="13.51" x2="15.42" y2="17.49"></line><line x1="15.41" y1="6.51" x2="8.59" y2="10.49"></line></svg></button> <!></div>'), xn = e.from_html('<button><span class="artifactuse-panel__artifact-item-icon"><!></span> <div class="artifactuse-panel__artifact-item-content"><span class="artifactuse-panel__artifact-item-title"> </span> <span class="artifactuse-panel__artifact-item-meta"> <!></span></div> <span class="artifactuse-panel__artifact-item-index"> </span></button>'), wn = e.from_html('<div class="artifactuse-panel__artifact-list"><div class="artifactuse-panel__artifact-list-header"><span> </span> <button class="artifactuse-panel__artifact-list-close" aria-label="Close artifact list"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg></button></div> <div class="artifactuse-panel__artifact-list-items"></div></div>'), Cn = e.from_html('<div class="artifactuse-panel__nav"><button class="artifactuse-panel__nav-btn" title="Previous artifact"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="15 18 9 12 15 6"></polyline></svg></button> <button class="artifactuse-panel__nav-trigger"><span> </span> <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="6 9 12 15 18 9"></polyline></svg></button> <button class="artifactuse-panel__nav-btn" title="Next artifact"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="9 18 15 12 9 6"></polyline></svg></button> <!></div>'), $n = e.from_html('<div><!> <header class="artifactuse-panel__header"><!> <div class="artifactuse-panel__title"><span class="artifactuse-panel__icon"><svg viewBox="0 0 24 24" fill="currentColor"><!></svg></span> <div class="artifactuse-panel__title-content"><span class="artifactuse-panel__name"> </span> <span class="artifactuse-panel__meta"> <!></span></div></div> <div class="artifactuse-panel__tabs"><!> <!> <!> <!></div> <div class="artifactuse-panel__actions"><!> <button class="artifactuse-panel__action"><!></button> <button class="artifactuse-panel__action artifactuse-panel__action--close" title="Close"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg></button></div></header> <div><!> <!> <div class="artifactuse-panel__code"><!> <div class="artifactuse-panel__code-scroll"><div class="artifactuse-panel__line-numbers"></div> <pre><code></code></pre></div></div> <div class="artifactuse-panel__edit"><div class="artifactuse-panel__editor-container"></div></div></div> <footer class="artifactuse-panel__footer"><div class="artifactuse-panel__footer-left"><!> <!></div> <div class="artifactuse-panel__footer-right"><button><!></button> <button class="artifactuse-panel__footer-action" title="Download"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><polyline points="7 10 12 15 17 10"></polyline><line x1="12" y1="15" x2="12" y2="3"></line></svg></button> <!> <!></div></footer></div>');
|
|
1849
|
+
function qn(Be, d) {
|
|
1850
1850
|
e.push(d, !1);
|
|
1851
|
-
const fe = () => e.store_get(T, "$activeArtifact", r), H = () => e.store_get(we, "$state", r), x = () => e.store_get(Ce, "$artifactCount", r), s = () => e.store_get($e, "$hasArtifacts", r), [r,
|
|
1851
|
+
const fe = () => e.store_get(T, "$activeArtifact", r), H = () => e.store_get(we, "$state", r), x = () => e.store_get(Ce, "$artifactCount", r), s = () => e.store_get($e, "$hasArtifacts", r), [r, u] = e.setup_stores(), y = e.mutable_source(), a = e.mutable_source(), pe = e.mutable_source(), ke = e.mutable_source(), j = e.mutable_source(), ae = e.mutable_source(), Se = e.mutable_source(), Pe = e.mutable_source(), Ae = e.mutable_source(), _ = e.mutable_source(), g = e.mutable_source(), Y = e.mutable_source(), P = e.mutable_source(), be = e.mutable_source(), De = e.mutable_source(), ce = e.mutable_source(), Ve = e.mutable_source(), He = e.mutable_source(), xe = e.mutable_source(), ze = e.mutable_source(), qe = oa();
|
|
1852
1852
|
let Xe = e.prop(d, "className", 8, "");
|
|
1853
1853
|
const {
|
|
1854
1854
|
state: we,
|
|
1855
1855
|
activeArtifact: T,
|
|
1856
1856
|
artifactCount: Ce,
|
|
1857
1857
|
hasArtifacts: $e,
|
|
1858
|
-
closePanel:
|
|
1858
|
+
closePanel: Fe,
|
|
1859
1859
|
toggleFullscreen: Ye,
|
|
1860
1860
|
setViewMode: Qe,
|
|
1861
1861
|
getPanelUrl: l,
|
|
1862
1862
|
openArtifact: U,
|
|
1863
1863
|
instance: m
|
|
1864
1864
|
} = Ua();
|
|
1865
|
-
let A = e.mutable_source(), z = e.mutable_source(), b = e.mutable_source(), J = e.mutable_source(), re = e.mutable_source(), _e = e.mutable_source(), o = e.mutable_source(!1), p = e.mutable_source(!1),
|
|
1865
|
+
let A = e.mutable_source(), z = e.mutable_source(), b = e.mutable_source(), J = e.mutable_source(), re = e.mutable_source(), _e = e.mutable_source(), o = e.mutable_source(!1), p = e.mutable_source(!1), q = e.mutable_source(!0), ne = e.mutable_source(!1), t = e.mutable_source(!1), F = e.mutable_source(!1), i = e.mutable_source(!1), v = e.mutable_source(
|
|
1866
1866
|
"options"
|
|
1867
1867
|
// 'options' | 'email' | 'loading' | 'success' | 'verify' | 'error'
|
|
1868
1868
|
), X = e.mutable_source(""), W = e.mutable_source(null), Q = e.mutable_source(""), ee = e.mutable_source(!1), L = e.mutable_source(!1), ye = e.mutable_source([]), ge = e.mutable_source(!1), Ee = e.mutable_source(""), oe = e.mutable_source(65), Le = e.mutable_source(50), de = null, se = null, me = null, M = null, R = null, le = null, $ = null, C = null;
|
|
1869
|
-
function
|
|
1870
|
-
n && (C !== null && C !== n.isPreviewable && (e.set(
|
|
1869
|
+
function I(n) {
|
|
1870
|
+
n && (C !== null && C !== n.isPreviewable && (e.set(F, !0), setTimeout(
|
|
1871
1871
|
() => {
|
|
1872
|
-
e.set(
|
|
1872
|
+
e.set(F, !1);
|
|
1873
1873
|
},
|
|
1874
1874
|
150
|
|
1875
|
-
)), C = n.isPreviewable, le !== n.id && (N(), e.set(
|
|
1875
|
+
)), C = n.isPreviewable, le !== n.id && (N(), e.set(q, !0), D()), (le !== n.id || $ !== n.code) && (Xt().then(() => Z()), e.get(j) === "edit" && (le !== n.id ? Xt().then(() => S()) : R && R.setCode(n.code || "")), clearTimeout(me), me = setTimeout(
|
|
1876
1876
|
() => {
|
|
1877
1877
|
e.get(A) && n.isPreviewable && m.bridge.loadArtifact(n);
|
|
1878
1878
|
},
|
|
@@ -1889,21 +1889,21 @@ function Fn(Be, d) {
|
|
|
1889
1889
|
var Re;
|
|
1890
1890
|
if (!e.get(J) || !((Re = e.get(a)) != null && Re.code)) return;
|
|
1891
1891
|
const n = e.get(a).code.split(`
|
|
1892
|
-
`).length,
|
|
1893
|
-
e.mutate(J, e.get(J).innerHTML =
|
|
1892
|
+
`).length, ve = Array.from({ length: n }, (We, rt) => `<div>${rt + 1}</div>`).join("");
|
|
1893
|
+
e.mutate(J, e.get(J).innerHTML = ve);
|
|
1894
1894
|
}
|
|
1895
1895
|
function f() {
|
|
1896
1896
|
var n;
|
|
1897
1897
|
if (e.get(z) && Vr() && ((n = e.get(a)) != null && n.code)) {
|
|
1898
|
-
const
|
|
1899
|
-
|
|
1898
|
+
const ve = window.Prism.languages[e.get(Y)];
|
|
1899
|
+
ve ? e.mutate(z, e.get(z).innerHTML = window.Prism.highlight(e.get(a).code, ve, e.get(Y))) : e.mutate(z, e.get(z).textContent = e.get(a).code), e.mutate(z, e.get(z).dataset.highlighted = "true"), Xt().then(() => {
|
|
1900
1900
|
h();
|
|
1901
1901
|
});
|
|
1902
1902
|
}
|
|
1903
1903
|
}
|
|
1904
1904
|
function h() {
|
|
1905
|
-
var
|
|
1906
|
-
const n = (
|
|
1905
|
+
var ve;
|
|
1906
|
+
const n = (ve = e.get(z)) == null ? void 0 : ve.closest("pre");
|
|
1907
1907
|
if (n && e.get(re) && e.get(J)) {
|
|
1908
1908
|
const We = window.getComputedStyle(n).backgroundColor;
|
|
1909
1909
|
We && We !== "rgba(0, 0, 0, 0)" && We !== "transparent" && (e.mutate(re, e.get(re).style.backgroundColor = We), e.mutate(J, e.get(J).style.backgroundColor = We));
|
|
@@ -1918,7 +1918,7 @@ function Fn(Be, d) {
|
|
|
1918
1918
|
function S() {
|
|
1919
1919
|
!e.get(y) || !e.get(_e) || !e.get(a) || (ie(), R = m.editor.create(e.get(_e), {
|
|
1920
1920
|
code: e.get(a).code || "",
|
|
1921
|
-
language: e.get(a).language || "plaintext",
|
|
1921
|
+
language: e.get(a).editorLanguage || e.get(a).language || "plaintext",
|
|
1922
1922
|
sdkTheme: m.getTheme()
|
|
1923
1923
|
}));
|
|
1924
1924
|
}
|
|
@@ -1935,15 +1935,15 @@ function Fn(Be, d) {
|
|
|
1935
1935
|
});
|
|
1936
1936
|
}
|
|
1937
1937
|
function he() {
|
|
1938
|
-
clearTimeout(M), e.set(
|
|
1938
|
+
clearTimeout(M), e.set(q, !1), e.get(A) && e.get(a) && (m.bridge.setIframe(e.get(A)), m.bridge.loadArtifact(e.get(a)));
|
|
1939
1939
|
}
|
|
1940
1940
|
function K() {
|
|
1941
|
-
clearTimeout(M), e.set(
|
|
1941
|
+
clearTimeout(M), e.set(q, !1);
|
|
1942
1942
|
}
|
|
1943
1943
|
function D() {
|
|
1944
1944
|
clearTimeout(M), M = setTimeout(
|
|
1945
1945
|
() => {
|
|
1946
|
-
e.set(
|
|
1946
|
+
e.set(q, !1);
|
|
1947
1947
|
},
|
|
1948
1948
|
1e3
|
|
1949
1949
|
);
|
|
@@ -1961,22 +1961,22 @@ function Fn(Be, d) {
|
|
|
1961
1961
|
console.error("Failed to copy:", n);
|
|
1962
1962
|
}
|
|
1963
1963
|
}
|
|
1964
|
-
function
|
|
1964
|
+
function ue() {
|
|
1965
1965
|
if (!e.get(a)) return;
|
|
1966
|
-
const { code: n, language:
|
|
1966
|
+
const { code: n, language: ve, title: Re } = e.get(a), We = nr(ve), rt = `${Re.toLowerCase().replace(/\s+/g, "-")}.${We}`, ct = new Blob([n], { type: "text/plain" }), je = URL.createObjectURL(ct), Ke = document.createElement("a");
|
|
1967
1967
|
Ke.href = je, Ke.download = rt, document.body.appendChild(Ke), Ke.click(), document.body.removeChild(Ke), URL.revokeObjectURL(je);
|
|
1968
1968
|
}
|
|
1969
1969
|
async function E() {
|
|
1970
1970
|
if (!(e.get(t) || e.get(P).length === 0)) {
|
|
1971
1971
|
e.set(t, !0);
|
|
1972
1972
|
try {
|
|
1973
|
-
const n = new jr(),
|
|
1973
|
+
const n = new jr(), ve = /* @__PURE__ */ new Map();
|
|
1974
1974
|
for (const Ke of e.get(P)) {
|
|
1975
1975
|
if (!Ke.code) continue;
|
|
1976
1976
|
const Rt = nr(Ke.language);
|
|
1977
1977
|
let ht = (Ke.title || "untitled").toLowerCase().replace(/\s+/g, "-").replace(/[^a-z0-9-_]/g, ""), st = `${ht}.${Rt}`;
|
|
1978
|
-
const Je =
|
|
1979
|
-
Je > 0 && (st = `${ht}-${Je}.${Rt}`),
|
|
1978
|
+
const Je = ve.get(st) || 0;
|
|
1979
|
+
Je > 0 && (st = `${ht}-${Je}.${Rt}`), ve.set(`${ht}.${Rt}`, Je + 1), n.file(st, Ke.code);
|
|
1980
1980
|
}
|
|
1981
1981
|
const Re = await n.generateAsync({ type: "blob" }), rt = `artifacts-${(/* @__PURE__ */ new Date()).toISOString().slice(0, 10)}.zip`, ct = URL.createObjectURL(Re), je = document.createElement("a");
|
|
1982
1982
|
je.href = ct, je.download = rt, document.body.appendChild(je), je.click(), document.body.removeChild(je), URL.revokeObjectURL(ct);
|
|
@@ -1995,19 +1995,19 @@ function Fn(Be, d) {
|
|
|
1995
1995
|
e.set(i, !1);
|
|
1996
1996
|
return;
|
|
1997
1997
|
}
|
|
1998
|
-
e.get(a) && (e.set(
|
|
1998
|
+
e.get(a) && (e.set(v, "options"), e.set(X, ""), e.set(W, null), e.set(Q, ""), e.set(ee, !1), e.set(L, !1), e.set(ye, []), e.set(ge, !1), e.set(Ee, ""), e.set(i, !0));
|
|
1999
1999
|
}
|
|
2000
|
-
function
|
|
2000
|
+
function va() {
|
|
2001
2001
|
e.set(i, !1);
|
|
2002
2002
|
}
|
|
2003
|
-
async function
|
|
2003
|
+
async function It() {
|
|
2004
2004
|
if (!(!e.get(a) || !(m != null && m.share))) {
|
|
2005
|
-
e.set(
|
|
2005
|
+
e.set(v, "loading"), e.set(Q, "");
|
|
2006
2006
|
try {
|
|
2007
2007
|
const n = await m.share.share(e.get(a));
|
|
2008
|
-
e.set(X, n.url), e.set(W, n.expiresAt), e.set(L, !1), e.set(
|
|
2008
|
+
e.set(X, n.url), e.set(W, n.expiresAt), e.set(L, !1), e.set(v, "success");
|
|
2009
2009
|
} catch (n) {
|
|
2010
|
-
e.set(Q, n.message || "Failed to create share link"), e.set(
|
|
2010
|
+
e.set(Q, n.message || "Failed to create share link"), e.set(v, "error");
|
|
2011
2011
|
}
|
|
2012
2012
|
}
|
|
2013
2013
|
}
|
|
@@ -2015,46 +2015,46 @@ function Fn(Be, d) {
|
|
|
2015
2015
|
if (e.get(Ve))
|
|
2016
2016
|
Ue();
|
|
2017
2017
|
else {
|
|
2018
|
-
e.set(
|
|
2018
|
+
e.set(v, "loading");
|
|
2019
2019
|
try {
|
|
2020
2020
|
await m.share.openAuthPopup(), Ue();
|
|
2021
2021
|
} catch (n) {
|
|
2022
|
-
n.message === "Authentication cancelled" ? e.set(
|
|
2022
|
+
n.message === "Authentication cancelled" ? e.set(v, "options") : (e.set(Q, n.message || "Authentication failed"), e.set(v, "error"));
|
|
2023
2023
|
}
|
|
2024
2024
|
}
|
|
2025
2025
|
}
|
|
2026
2026
|
async function Ue() {
|
|
2027
2027
|
if (!(!e.get(a) || !(m != null && m.share))) {
|
|
2028
|
-
e.set(
|
|
2028
|
+
e.set(v, "loading"), e.set(Q, "");
|
|
2029
2029
|
try {
|
|
2030
2030
|
const n = await m.share.save(e.get(a));
|
|
2031
|
-
e.set(X, n.url), e.set(W, null), e.set(L, !0), e.set(
|
|
2031
|
+
e.set(X, n.url), e.set(W, null), e.set(L, !0), e.set(v, "success");
|
|
2032
2032
|
} catch (n) {
|
|
2033
|
-
e.set(Q, n.message || "Failed to save artifact"), e.set(
|
|
2033
|
+
e.set(Q, n.message || "Failed to save artifact"), e.set(v, "error");
|
|
2034
2034
|
}
|
|
2035
2035
|
}
|
|
2036
2036
|
}
|
|
2037
|
-
function
|
|
2038
|
-
e.get(L) ? Ue() :
|
|
2037
|
+
function qt() {
|
|
2038
|
+
e.get(L) ? Ue() : It();
|
|
2039
2039
|
}
|
|
2040
2040
|
async function da() {
|
|
2041
2041
|
var n;
|
|
2042
2042
|
if (m != null && m.share) {
|
|
2043
2043
|
if (!e.get(Ve)) {
|
|
2044
|
-
e.set(
|
|
2044
|
+
e.set(v, "loading");
|
|
2045
2045
|
try {
|
|
2046
2046
|
await m.share.openAuthPopup();
|
|
2047
|
-
} catch (
|
|
2048
|
-
|
|
2047
|
+
} catch (ve) {
|
|
2048
|
+
ve.message === "Authentication cancelled" ? e.set(v, "options") : (e.set(Q, ve.message || "Authentication failed"), e.set(v, "error"));
|
|
2049
2049
|
return;
|
|
2050
2050
|
}
|
|
2051
2051
|
}
|
|
2052
|
-
e.set(
|
|
2052
|
+
e.set(v, "update-list"), e.set(ge, !0);
|
|
2053
2053
|
try {
|
|
2054
|
-
const
|
|
2054
|
+
const ve = ((n = e.get(a)) == null ? void 0 : n.language) || null, Re = await m.share.listArtifacts(ve);
|
|
2055
2055
|
e.set(ye, Re.projects || []);
|
|
2056
|
-
} catch (
|
|
2057
|
-
e.set(Q,
|
|
2056
|
+
} catch (ve) {
|
|
2057
|
+
e.set(Q, ve.message || "Failed to load artifacts"), e.set(v, "error");
|
|
2058
2058
|
} finally {
|
|
2059
2059
|
e.set(ge, !1);
|
|
2060
2060
|
}
|
|
@@ -2063,14 +2063,14 @@ function Fn(Be, d) {
|
|
|
2063
2063
|
async function pa(n) {
|
|
2064
2064
|
var Re, We;
|
|
2065
2065
|
if (!e.get(a) || !(m != null && m.share)) return;
|
|
2066
|
-
const
|
|
2067
|
-
if (
|
|
2068
|
-
e.set(
|
|
2066
|
+
const ve = (Re = n.project) == null ? void 0 : Re.uuid;
|
|
2067
|
+
if (ve) {
|
|
2068
|
+
e.set(v, "loading"), e.set(Q, "");
|
|
2069
2069
|
try {
|
|
2070
|
-
const rt = await m.share.updateArtifact(
|
|
2071
|
-
e.set(X, rt.url || ""), e.set(W, null), e.set(L, !0), e.set(Ee, ((We = n.project) == null ? void 0 : We.name) || "Untitled"), e.set(
|
|
2070
|
+
const rt = await m.share.updateArtifact(ve, e.get(a));
|
|
2071
|
+
e.set(X, rt.url || ""), e.set(W, null), e.set(L, !0), e.set(Ee, ((We = n.project) == null ? void 0 : We.name) || "Untitled"), e.set(v, "success");
|
|
2072
2072
|
} catch (rt) {
|
|
2073
|
-
e.set(Q, rt.message || "Failed to update artifact"), e.set(
|
|
2073
|
+
e.set(Q, rt.message || "Failed to update artifact"), e.set(v, "error");
|
|
2074
2074
|
}
|
|
2075
2075
|
}
|
|
2076
2076
|
}
|
|
@@ -2097,13 +2097,13 @@ function Fn(Be, d) {
|
|
|
2097
2097
|
e.get(be) < e.get(P).length - 1 && U(e.get(P)[e.get(be) + 1]);
|
|
2098
2098
|
}
|
|
2099
2099
|
function Zt(n) {
|
|
2100
|
-
de = { startX: n.clientX, startWidth: e.get(oe) }, document.addEventListener("mousemove", Pt), document.addEventListener("mouseup", it), document.body.style.cursor = "ew-resize", document.body.style.userSelect = "none", document.querySelectorAll("iframe").forEach((
|
|
2101
|
-
|
|
2100
|
+
de = { startX: n.clientX, startWidth: e.get(oe) }, document.addEventListener("mousemove", Pt), document.addEventListener("mouseup", it), document.body.style.cursor = "ew-resize", document.body.style.userSelect = "none", document.querySelectorAll("iframe").forEach((ve) => {
|
|
2101
|
+
ve.style.pointerEvents = "none";
|
|
2102
2102
|
});
|
|
2103
2103
|
}
|
|
2104
2104
|
function Pt(n) {
|
|
2105
2105
|
if (!de) return;
|
|
2106
|
-
const
|
|
2106
|
+
const ve = window.innerWidth, We = (de.startX - n.clientX) / ve * 100, rt = de.startWidth + We;
|
|
2107
2107
|
e.set(oe, Math.min(Math.max(rt, 25), 75));
|
|
2108
2108
|
}
|
|
2109
2109
|
function it() {
|
|
@@ -2113,12 +2113,12 @@ function Fn(Be, d) {
|
|
|
2113
2113
|
}
|
|
2114
2114
|
function Et(n) {
|
|
2115
2115
|
if (!e.get(b)) return;
|
|
2116
|
-
const
|
|
2116
|
+
const ve = e.get(b).getBoundingClientRect();
|
|
2117
2117
|
se = {
|
|
2118
2118
|
startX: n.clientX,
|
|
2119
2119
|
startPosition: e.get(Le),
|
|
2120
|
-
contentLeft:
|
|
2121
|
-
contentWidth:
|
|
2120
|
+
contentLeft: ve.left,
|
|
2121
|
+
contentWidth: ve.width
|
|
2122
2122
|
}, document.addEventListener("mousemove", La), document.addEventListener("mouseup", Kt), document.body.style.cursor = "col-resize", document.body.style.userSelect = "none", document.querySelectorAll("iframe").forEach((Re) => {
|
|
2123
2123
|
Re.style.pointerEvents = "none";
|
|
2124
2124
|
});
|
|
@@ -2133,8 +2133,8 @@ function Fn(Be, d) {
|
|
|
2133
2133
|
n.style.pointerEvents = "";
|
|
2134
2134
|
});
|
|
2135
2135
|
}
|
|
2136
|
-
|
|
2137
|
-
m.on("ai:request", (n) =>
|
|
2136
|
+
ua(() => {
|
|
2137
|
+
m.on("ai:request", (n) => qe("ai-request", n)), m.on("save:request", (n) => qe("save", n)), m.on("export:complete", (n) => qe("export", n));
|
|
2138
2138
|
}), Aa(() => {
|
|
2139
2139
|
it(), Kt(), ie(), clearTimeout(me), clearTimeout(M);
|
|
2140
2140
|
}), e.legacy_pre_effect(() => {
|
|
@@ -2160,7 +2160,11 @@ function Fn(Be, d) {
|
|
|
2160
2160
|
}), e.legacy_pre_effect(() => (e.get(a), Va), () => {
|
|
2161
2161
|
e.set(_, e.get(a) ? Va(e.get(a).language) : "");
|
|
2162
2162
|
}), e.legacy_pre_effect(() => e.get(a), () => {
|
|
2163
|
-
e.set(g,
|
|
2163
|
+
e.set(g, (() => {
|
|
2164
|
+
if (!e.get(a)) return null;
|
|
2165
|
+
let n = l(e.get(a));
|
|
2166
|
+
return n && e.get(a)._refreshToken && (n += (n.includes("?") ? "&" : "?") + "_t=" + e.get(a)._refreshToken), n;
|
|
2167
|
+
})());
|
|
2164
2168
|
}), e.legacy_pre_effect(() => (e.get(a), yr), () => {
|
|
2165
2169
|
e.set(Y, e.get(a) ? yr(e.get(a).language) : "plaintext");
|
|
2166
2170
|
}), e.legacy_pre_effect(() => e.get(pe), () => {
|
|
@@ -2192,10 +2196,10 @@ function Fn(Be, d) {
|
|
|
2192
2196
|
Xe()
|
|
2193
2197
|
].filter(Boolean).join(" "));
|
|
2194
2198
|
}
|
|
2195
|
-
), e.legacy_pre_effect(() => (e.get(j), e.get(
|
|
2196
|
-
e.set(ze, `artifactuse-panel__content artifactuse-panel__content--${e.get(j)}${e.get(
|
|
2199
|
+
), e.legacy_pre_effect(() => (e.get(j), e.get(F)), () => {
|
|
2200
|
+
e.set(ze, `artifactuse-panel__content artifactuse-panel__content--${e.get(j)}${e.get(F) ? " artifactuse-panel__content--transitioning" : ""}`);
|
|
2197
2201
|
}), e.legacy_pre_effect(() => e.get(a), () => {
|
|
2198
|
-
e.get(a) &&
|
|
2202
|
+
e.get(a) && I(e.get(a));
|
|
2199
2203
|
}), e.legacy_pre_effect(() => (e.get(j), Xt), () => {
|
|
2200
2204
|
(e.get(j) === "code" || e.get(j) === "split") && Xt().then(() => Z());
|
|
2201
2205
|
}), e.legacy_pre_effect(() => (e.get(j), Xt), () => {
|
|
@@ -2206,10 +2210,10 @@ function Fn(Be, d) {
|
|
|
2206
2210
|
var cr = e.comment(), Cr = e.first_child(cr);
|
|
2207
2211
|
{
|
|
2208
2212
|
var $r = (n) => {
|
|
2209
|
-
var
|
|
2213
|
+
var ve = e.comment(), Re = e.first_child(ve);
|
|
2210
2214
|
{
|
|
2211
2215
|
var We = (ct) => {
|
|
2212
|
-
var je =
|
|
2216
|
+
var je = Fi(), Ke = e.child(je);
|
|
2213
2217
|
{
|
|
2214
2218
|
var Rt = (Ge) => {
|
|
2215
2219
|
var kt = Mi();
|
|
@@ -2233,19 +2237,19 @@ function Fn(Be, d) {
|
|
|
2233
2237
|
}
|
|
2234
2238
|
e.reset(Tt), e.reset(je), e.template_effect(() => {
|
|
2235
2239
|
e.set_class(je, 1, e.clsx(e.get(xe))), e.set_style(je, e.get(ae) ? void 0 : `width: ${e.get(He)}%`);
|
|
2236
|
-
}), e.event("click", Je,
|
|
2240
|
+
}), e.event("click", Je, Fe), e.append(ct, je);
|
|
2237
2241
|
}, rt = (ct) => {
|
|
2238
2242
|
var je = e.comment(), Ke = e.first_child(je);
|
|
2239
2243
|
{
|
|
2240
2244
|
var Rt = (st) => {
|
|
2241
2245
|
var Je = Ui(), Tt = e.child(Je);
|
|
2242
2246
|
{
|
|
2243
|
-
var _a = (
|
|
2244
|
-
var Me =
|
|
2245
|
-
e.event("mousedown", Me, e.preventDefault(Zt)), e.append(
|
|
2247
|
+
var _a = (Ie) => {
|
|
2248
|
+
var Me = Ii();
|
|
2249
|
+
e.event("mousedown", Me, e.preventDefault(Zt)), e.append(Ie, Me);
|
|
2246
2250
|
};
|
|
2247
|
-
e.if(Tt, (
|
|
2248
|
-
e.get(ae) ||
|
|
2251
|
+
e.if(Tt, (Ie) => {
|
|
2252
|
+
e.get(ae) || Ie(_a);
|
|
2249
2253
|
});
|
|
2250
2254
|
}
|
|
2251
2255
|
var bt = e.sibling(Tt, 2), Ge = e.child(bt), kt = e.sibling(e.child(Ge), 2), Yt = e.sibling(e.child(kt), 2), fa = e.child(Yt);
|
|
@@ -2254,22 +2258,22 @@ function Fn(Be, d) {
|
|
|
2254
2258
|
let ma;
|
|
2255
2259
|
var ha = e.child(Bt);
|
|
2256
2260
|
{
|
|
2257
|
-
var ja = (
|
|
2258
|
-
var Me =
|
|
2259
|
-
e.append(
|
|
2260
|
-
}, Sa = (
|
|
2261
|
+
var ja = (Ie) => {
|
|
2262
|
+
var Me = qi();
|
|
2263
|
+
e.append(Ie, Me);
|
|
2264
|
+
}, Sa = (Ie) => {
|
|
2261
2265
|
var Me = Ri();
|
|
2262
|
-
e.append(
|
|
2266
|
+
e.append(Ie, Me);
|
|
2263
2267
|
};
|
|
2264
|
-
e.if(ha, (
|
|
2265
|
-
e.get(t) ?
|
|
2268
|
+
e.if(ha, (Ie) => {
|
|
2269
|
+
e.get(t) ? Ie(Sa, !1) : Ie(ja);
|
|
2266
2270
|
});
|
|
2267
2271
|
}
|
|
2268
2272
|
e.reset(Bt);
|
|
2269
2273
|
var Pa = e.sibling(Bt, 2);
|
|
2270
2274
|
e.reset(ga), e.reset(bt);
|
|
2271
2275
|
var ba = e.sibling(bt, 2), Ea = e.child(ba);
|
|
2272
|
-
e.each(Ea, 7, () => e.get(P), (
|
|
2276
|
+
e.each(Ea, 7, () => e.get(P), (Ie) => Ie.id, (Ie, Me) => {
|
|
2273
2277
|
var Dt = Di(), ka = e.child(Dt), Xa = e.child(ka);
|
|
2274
2278
|
e.html(Xa, () => (e.get(Me), e.untrack(() => O(e.get(Me).language)))), e.reset(ka);
|
|
2275
2279
|
var Ba = e.sibling(ka, 2), Gt = e.child(Ba), Ha = e.child(Gt, !0);
|
|
@@ -2291,23 +2295,23 @@ function Fn(Be, d) {
|
|
|
2291
2295
|
[
|
|
2292
2296
|
() => (e.deep_read_state(Wt), e.get(Me), e.untrack(() => Wt(e.get(Me).language)))
|
|
2293
2297
|
]
|
|
2294
|
-
), e.event("click", Dt, () => St(e.get(Me))), e.append(
|
|
2298
|
+
), e.event("click", Dt, () => St(e.get(Me))), e.append(Ie, Dt);
|
|
2295
2299
|
}), e.reset(Ea), e.reset(ba);
|
|
2296
2300
|
var Qt = e.sibling(ba, 2), Ta = e.child(Qt);
|
|
2297
2301
|
{
|
|
2298
|
-
var Ja = (
|
|
2302
|
+
var Ja = (Ie) => {
|
|
2299
2303
|
var Me = Vi();
|
|
2300
|
-
e.append(
|
|
2304
|
+
e.append(Ie, Me);
|
|
2301
2305
|
};
|
|
2302
|
-
e.if(Ta, (
|
|
2303
|
-
e.get(De) &&
|
|
2306
|
+
e.if(Ta, (Ie) => {
|
|
2307
|
+
e.get(De) && Ie(Ja);
|
|
2304
2308
|
});
|
|
2305
2309
|
}
|
|
2306
2310
|
e.reset(Qt), e.reset(Je), e.template_effect(() => {
|
|
2307
2311
|
e.set_class(Je, 1, e.clsx(e.get(xe))), e.set_style(Je, e.get(ae) ? void 0 : `width: ${e.get(He)}%`), e.set_text(fa, `${e.get(P), e.untrack(() => e.get(P).length) ?? ""} available`), ma = e.set_class(Bt, 1, "artifactuse-panel__action", null, ma, {
|
|
2308
2312
|
"artifactuse-panel__action--loading": e.get(t)
|
|
2309
2313
|
}), Bt.disabled = e.get(t);
|
|
2310
|
-
}), e.event("click", Bt, E), e.event("click", Pa,
|
|
2314
|
+
}), e.event("click", Bt, E), e.event("click", Pa, Fe), e.append(st, Je);
|
|
2311
2315
|
}, ht = (st) => {
|
|
2312
2316
|
var Je = $n(), Tt = e.child(Je);
|
|
2313
2317
|
{
|
|
@@ -2359,18 +2363,18 @@ function Fn(Be, d) {
|
|
|
2359
2363
|
e.get(a), e.untrack(() => !e.get(a).tabs || e.get(a).tabs.includes("preview")) && c(Ja);
|
|
2360
2364
|
});
|
|
2361
2365
|
}
|
|
2362
|
-
var
|
|
2366
|
+
var Ie = e.sibling(Ta, 2);
|
|
2363
2367
|
{
|
|
2364
2368
|
var Me = (c) => {
|
|
2365
2369
|
var k = Ji();
|
|
2366
2370
|
let Te;
|
|
2367
2371
|
e.template_effect(() => Te = e.set_class(k, 1, "artifactuse-panel__tab", null, Te, { "artifactuse-panel__tab--active": e.get(j) === "code" })), e.event("click", k, () => Qe("code")), e.append(c, k);
|
|
2368
2372
|
};
|
|
2369
|
-
e.if(
|
|
2373
|
+
e.if(Ie, (c) => {
|
|
2370
2374
|
e.get(a), e.untrack(() => !e.get(a).tabs || e.get(a).tabs.includes("code")) && c(Me);
|
|
2371
2375
|
});
|
|
2372
2376
|
}
|
|
2373
|
-
var Dt = e.sibling(
|
|
2377
|
+
var Dt = e.sibling(Ie, 2);
|
|
2374
2378
|
{
|
|
2375
2379
|
var ka = (c) => {
|
|
2376
2380
|
var k = Xi();
|
|
@@ -2430,10 +2434,10 @@ function Fn(Be, d) {
|
|
|
2430
2434
|
e.append(c, k);
|
|
2431
2435
|
};
|
|
2432
2436
|
e.if(or, (c) => {
|
|
2433
|
-
e.get(
|
|
2437
|
+
e.get(F) && c(Ar);
|
|
2434
2438
|
});
|
|
2435
2439
|
}
|
|
2436
|
-
var
|
|
2440
|
+
var ur = e.sibling(or, 2);
|
|
2437
2441
|
{
|
|
2438
2442
|
var Lr = (c) => {
|
|
2439
2443
|
var k = an(), Te = e.child(k);
|
|
@@ -2443,7 +2447,7 @@ function Fn(Be, d) {
|
|
|
2443
2447
|
e.append(Ze, Oe);
|
|
2444
2448
|
};
|
|
2445
2449
|
e.if(Te, (Ze) => {
|
|
2446
|
-
e.get(
|
|
2450
|
+
e.get(q) && e.get(g) && Ze(dt);
|
|
2447
2451
|
});
|
|
2448
2452
|
}
|
|
2449
2453
|
var ta = e.sibling(Te, 2);
|
|
@@ -2452,7 +2456,7 @@ function Fn(Be, d) {
|
|
|
2452
2456
|
var Oe = en();
|
|
2453
2457
|
let ot;
|
|
2454
2458
|
e.bind_this(Oe, (yt) => e.set(A, yt), () => e.get(A)), e.template_effect(() => {
|
|
2455
|
-
e.set_attribute(Oe, "src", e.get(g)), ot = e.set_class(Oe, 1, "artifactuse-panel__iframe", null, ot, { "artifactuse-panel__iframe--loading": e.get(
|
|
2459
|
+
e.set_attribute(Oe, "src", e.get(g)), ot = e.set_class(Oe, 1, "artifactuse-panel__iframe", null, ot, { "artifactuse-panel__iframe--loading": e.get(q) });
|
|
2456
2460
|
}), e.event("load", Oe, he), e.event("error", Oe, K), e.append(Ze, Oe);
|
|
2457
2461
|
}, pt = (Ze) => {
|
|
2458
2462
|
var Oe = tn(), ot = e.sibling(e.child(Oe), 2), yt = e.child(ot);
|
|
@@ -2464,25 +2468,25 @@ function Fn(Be, d) {
|
|
|
2464
2468
|
}
|
|
2465
2469
|
e.reset(k), e.template_effect(() => e.set_style(k, e.get(j) === "split" ? `width: ${e.get(Le)}%` : void 0)), e.append(c, k);
|
|
2466
2470
|
};
|
|
2467
|
-
e.if(
|
|
2471
|
+
e.if(ur, (c) => {
|
|
2468
2472
|
(e.get(j) === "preview" || e.get(j) === "split") && c(Lr);
|
|
2469
2473
|
});
|
|
2470
2474
|
}
|
|
2471
|
-
var
|
|
2475
|
+
var Fa = e.sibling(ur, 2), vr = e.child(Fa);
|
|
2472
2476
|
{
|
|
2473
2477
|
var Sr = (c) => {
|
|
2474
2478
|
var k = rn();
|
|
2475
2479
|
e.event("mousedown", k, e.preventDefault(Et)), e.append(c, k);
|
|
2476
2480
|
};
|
|
2477
|
-
e.if(
|
|
2481
|
+
e.if(vr, (c) => {
|
|
2478
2482
|
e.get(j) === "split" && c(Sr);
|
|
2479
2483
|
});
|
|
2480
2484
|
}
|
|
2481
|
-
var Ka = e.sibling(
|
|
2485
|
+
var Ka = e.sibling(vr, 2), dr = e.child(Ka);
|
|
2482
2486
|
e.bind_this(dr, (c) => e.set(J, c), () => e.get(J));
|
|
2483
2487
|
var Ya = e.sibling(dr, 2), pr = e.child(Ya);
|
|
2484
|
-
e.bind_this(pr, (c) => e.set(z, c), () => e.get(z)), e.reset(Ya), e.reset(Ka), e.bind_this(Ka, (c) => e.set(re, c), () => e.get(re)), e.reset(
|
|
2485
|
-
var Qa = e.sibling(
|
|
2488
|
+
e.bind_this(pr, (c) => e.set(z, c), () => e.get(z)), e.reset(Ya), e.reset(Ka), e.bind_this(Ka, (c) => e.set(re, c), () => e.get(re)), e.reset(Fa);
|
|
2489
|
+
var Qa = e.sibling(Fa, 2), Pr = e.child(Qa);
|
|
2486
2490
|
e.bind_this(Pr, (c) => e.set(_e, c), () => e.get(_e)), e.reset(Qa), e.reset(ya), e.bind_this(ya, (c) => e.set(b, c), () => e.get(b));
|
|
2487
2491
|
var _r = e.sibling(ya, 2), Ga = e.child(_r), fr = e.child(Ga);
|
|
2488
2492
|
{
|
|
@@ -2525,7 +2529,7 @@ function Fn(Be, d) {
|
|
|
2525
2529
|
e.reset(ea);
|
|
2526
2530
|
var hr = e.sibling(ea, 2), br = e.sibling(hr, 2);
|
|
2527
2531
|
{
|
|
2528
|
-
var
|
|
2532
|
+
var Fr = (c) => {
|
|
2529
2533
|
var k = yn(), Te = e.child(k), dt = e.sibling(Te, 2);
|
|
2530
2534
|
{
|
|
2531
2535
|
var ta = (Ut) => {
|
|
@@ -2542,21 +2546,21 @@ function Fn(Be, d) {
|
|
|
2542
2546
|
var Mt = e.comment(), et = e.first_child(Mt);
|
|
2543
2547
|
{
|
|
2544
2548
|
var ar = (wt) => {
|
|
2545
|
-
var _t =
|
|
2549
|
+
var _t = un(), Nt = e.child(_t), zt = e.child(Nt), jt = e.child(zt, !0);
|
|
2546
2550
|
e.reset(zt), e.reset(Nt);
|
|
2547
|
-
var
|
|
2548
|
-
e.reset(
|
|
2551
|
+
var ut = e.sibling(Nt, 2), nt = e.child(ut), Ct = e.sibling(nt, 2);
|
|
2552
|
+
e.reset(ut), e.reset(_t), e.template_effect(() => e.set_text(jt, e.get(Q))), e.event("click", nt, () => e.set(v, "options")), e.event("click", Ct, qt), e.append(wt, _t);
|
|
2549
2553
|
}, Ot = (wt) => {
|
|
2550
2554
|
var _t = e.comment(), Nt = e.first_child(_t);
|
|
2551
2555
|
{
|
|
2552
|
-
var zt = (
|
|
2553
|
-
var nt =
|
|
2554
|
-
e.reset(nt), e.event("click", Ct,
|
|
2555
|
-
}, jt = (
|
|
2556
|
+
var zt = (ut) => {
|
|
2557
|
+
var nt = vn(), Ct = e.child(nt), ra = e.sibling(Ct, 2), wa = e.sibling(ra, 2);
|
|
2558
|
+
e.reset(nt), e.event("click", Ct, It), e.event("click", ra, lt), e.event("click", wa, da), e.append(ut, nt);
|
|
2559
|
+
}, jt = (ut) => {
|
|
2556
2560
|
var nt = e.comment(), Ct = e.first_child(nt);
|
|
2557
2561
|
{
|
|
2558
2562
|
var ra = ($t) => {
|
|
2559
|
-
var
|
|
2563
|
+
var Ft = gn(), ft = e.child(Ft);
|
|
2560
2564
|
{
|
|
2561
2565
|
var sa = (gt) => {
|
|
2562
2566
|
var At = dn();
|
|
@@ -2564,7 +2568,7 @@ function Fn(Be, d) {
|
|
|
2564
2568
|
}, Ca = (gt) => {
|
|
2565
2569
|
var At = e.comment(), ia = e.first_child(At);
|
|
2566
2570
|
{
|
|
2567
|
-
var
|
|
2571
|
+
var Ia = (Lt) => {
|
|
2568
2572
|
var Jt = pn();
|
|
2569
2573
|
e.append(Lt, Jt);
|
|
2570
2574
|
}, rr = (Lt) => {
|
|
@@ -2573,10 +2577,10 @@ function Fn(Be, d) {
|
|
|
2573
2577
|
var mt;
|
|
2574
2578
|
return ((mt = na.project) == null ? void 0 : mt.uuid) || na.id;
|
|
2575
2579
|
}, (na, mt) => {
|
|
2576
|
-
var tt = _n(),
|
|
2577
|
-
e.reset(
|
|
2578
|
-
var
|
|
2579
|
-
e.reset(
|
|
2580
|
+
var tt = _n(), vt = e.child(tt), la = e.child(vt, !0);
|
|
2581
|
+
e.reset(vt);
|
|
2582
|
+
var qa = e.sibling(vt, 2), sr = e.child(qa, !0);
|
|
2583
|
+
e.reset(qa), e.reset(tt), e.template_effect(
|
|
2580
2584
|
(Ra) => {
|
|
2581
2585
|
e.set_text(la, (e.get(mt), e.untrack(() => {
|
|
2582
2586
|
var kr;
|
|
@@ -2595,7 +2599,7 @@ function Fn(Be, d) {
|
|
|
2595
2599
|
e.if(
|
|
2596
2600
|
ia,
|
|
2597
2601
|
(Lt) => {
|
|
2598
|
-
e.get(ye), e.untrack(() => e.get(ye).length === 0) ? Lt(
|
|
2602
|
+
e.get(ye), e.untrack(() => e.get(ye).length === 0) ? Lt(Ia) : Lt(rr, !1);
|
|
2599
2603
|
},
|
|
2600
2604
|
!0
|
|
2601
2605
|
);
|
|
@@ -2607,24 +2611,24 @@ function Fn(Be, d) {
|
|
|
2607
2611
|
});
|
|
2608
2612
|
}
|
|
2609
2613
|
var $a = e.sibling(ft, 2);
|
|
2610
|
-
e.reset(
|
|
2614
|
+
e.reset(Ft), e.event("click", $a, () => e.set(v, "options")), e.append($t, Ft);
|
|
2611
2615
|
}, wa = ($t) => {
|
|
2612
|
-
var
|
|
2616
|
+
var Ft = e.comment(), ft = e.first_child(Ft);
|
|
2613
2617
|
{
|
|
2614
2618
|
var sa = (Ca) => {
|
|
2615
2619
|
var $a = bn(), gt = e.sibling(e.child($a), 2), At = e.child(gt);
|
|
2616
2620
|
e.remove_input_defaults(At);
|
|
2617
2621
|
var ia = e.sibling(At, 2);
|
|
2618
|
-
let
|
|
2622
|
+
let Ia;
|
|
2619
2623
|
var rr = e.child(ia, !0);
|
|
2620
2624
|
e.reset(ia), e.reset(gt);
|
|
2621
2625
|
var Lt = e.sibling(gt, 2);
|
|
2622
2626
|
{
|
|
2623
2627
|
var Jt = (tt) => {
|
|
2624
|
-
var
|
|
2625
|
-
e.reset(la), e.reset(
|
|
2628
|
+
var vt = mn(), la = e.sibling(e.child(vt), 2), qa = e.child(la);
|
|
2629
|
+
e.reset(la), e.reset(vt), e.template_effect((sr) => e.set_text(qa, `Expires ${sr ?? ""}`), [
|
|
2626
2630
|
() => (e.get(W), e.untrack(() => V(e.get(W))))
|
|
2627
|
-
]), e.append(tt,
|
|
2631
|
+
]), e.append(tt, vt);
|
|
2628
2632
|
};
|
|
2629
2633
|
e.if(Lt, (tt) => {
|
|
2630
2634
|
e.get(W) && !e.get(L) && tt(Jt);
|
|
@@ -2633,15 +2637,15 @@ function Fn(Be, d) {
|
|
|
2633
2637
|
var na = e.sibling(Lt, 2);
|
|
2634
2638
|
{
|
|
2635
2639
|
var mt = (tt) => {
|
|
2636
|
-
var
|
|
2637
|
-
e.reset(
|
|
2640
|
+
var vt = hn(), la = e.sibling(e.child(vt), 2);
|
|
2641
|
+
e.reset(vt), e.event("click", la, lt), e.append(tt, vt);
|
|
2638
2642
|
};
|
|
2639
2643
|
e.if(na, (tt) => {
|
|
2640
2644
|
e.get(L) || tt(mt);
|
|
2641
2645
|
});
|
|
2642
2646
|
}
|
|
2643
2647
|
e.reset($a), e.template_effect(() => {
|
|
2644
|
-
e.set_value(At, e.get(X)),
|
|
2648
|
+
e.set_value(At, e.get(X)), Ia = e.set_class(ia, 1, "artifactuse-share-popup__copy-btn", null, Ia, {
|
|
2645
2649
|
"artifactuse-share-popup__copy-btn--copied": e.get(ee)
|
|
2646
2650
|
}), e.set_text(rr, e.get(ee) ? "Copied!" : "Copy");
|
|
2647
2651
|
}), e.event("click", At, (tt) => tt.target.select()), e.event("click", ia, at), e.append(Ca, $a);
|
|
@@ -2649,27 +2653,27 @@ function Fn(Be, d) {
|
|
|
2649
2653
|
e.if(
|
|
2650
2654
|
ft,
|
|
2651
2655
|
(Ca) => {
|
|
2652
|
-
e.get(
|
|
2656
|
+
e.get(v) === "success" && Ca(sa);
|
|
2653
2657
|
},
|
|
2654
2658
|
!0
|
|
2655
2659
|
);
|
|
2656
2660
|
}
|
|
2657
|
-
e.append($t,
|
|
2661
|
+
e.append($t, Ft);
|
|
2658
2662
|
};
|
|
2659
2663
|
e.if(
|
|
2660
2664
|
Ct,
|
|
2661
2665
|
($t) => {
|
|
2662
|
-
e.get(
|
|
2666
|
+
e.get(v) === "update-list" ? $t(ra) : $t(wa, !1);
|
|
2663
2667
|
},
|
|
2664
2668
|
!0
|
|
2665
2669
|
);
|
|
2666
2670
|
}
|
|
2667
|
-
e.append(
|
|
2671
|
+
e.append(ut, nt);
|
|
2668
2672
|
};
|
|
2669
2673
|
e.if(
|
|
2670
2674
|
Nt,
|
|
2671
|
-
(
|
|
2672
|
-
e.get(
|
|
2675
|
+
(ut) => {
|
|
2676
|
+
e.get(v) === "options" ? ut(zt) : ut(jt, !1);
|
|
2673
2677
|
},
|
|
2674
2678
|
!0
|
|
2675
2679
|
);
|
|
@@ -2679,7 +2683,7 @@ function Fn(Be, d) {
|
|
|
2679
2683
|
e.if(
|
|
2680
2684
|
et,
|
|
2681
2685
|
(wt) => {
|
|
2682
|
-
e.get(
|
|
2686
|
+
e.get(v) === "error" ? wt(ar) : wt(Ot, !1);
|
|
2683
2687
|
},
|
|
2684
2688
|
!0
|
|
2685
2689
|
);
|
|
@@ -2687,10 +2691,10 @@ function Fn(Be, d) {
|
|
|
2687
2691
|
e.append(xt, Mt);
|
|
2688
2692
|
};
|
|
2689
2693
|
e.if(xa, (xt) => {
|
|
2690
|
-
e.get(
|
|
2694
|
+
e.get(v) === "loading" ? xt(er) : xt(tr, !1);
|
|
2691
2695
|
});
|
|
2692
2696
|
}
|
|
2693
|
-
e.reset(aa), e.next(2), e.reset(pt), e.template_effect(() => e.set_text(ot, e.get(
|
|
2697
|
+
e.reset(aa), e.next(2), e.reset(pt), e.template_effect(() => e.set_text(ot, e.get(v) === "success" ? e.get(Ee) ? "Artifact updated!" : "Link created!" : e.get(v) === "update-list" ? "Update saved artifact" : "Share Artifact")), e.event("click", yt, va), e.transition(3, pt, () => xr, () => ({ duration: 150 })), e.append(Ut, pt);
|
|
2694
2698
|
};
|
|
2695
2699
|
e.if(dt, (Ut) => {
|
|
2696
2700
|
e.get(i) && Ut(ta);
|
|
@@ -2699,12 +2703,12 @@ function Fn(Be, d) {
|
|
|
2699
2703
|
e.reset(k), e.event("click", Te, Ne), e.append(c, k);
|
|
2700
2704
|
};
|
|
2701
2705
|
e.if(br, (c) => {
|
|
2702
|
-
e.get(ce) && c(
|
|
2706
|
+
e.get(ce) && c(Fr);
|
|
2703
2707
|
});
|
|
2704
2708
|
}
|
|
2705
|
-
var
|
|
2709
|
+
var Ir = e.sibling(br, 2);
|
|
2706
2710
|
{
|
|
2707
|
-
var
|
|
2711
|
+
var qr = (c) => {
|
|
2708
2712
|
var k = Cn(), Te = e.child(k), dt = e.sibling(Te, 2), ta = e.child(dt), Ut = e.child(ta);
|
|
2709
2713
|
e.reset(ta), e.next(2), e.reset(dt);
|
|
2710
2714
|
var pt = e.sibling(dt, 2), Ze = e.sibling(pt, 2);
|
|
@@ -2720,7 +2724,7 @@ function Fn(Be, d) {
|
|
|
2720
2724
|
let wt;
|
|
2721
2725
|
var _t = e.child(Ot), Nt = e.child(_t);
|
|
2722
2726
|
e.html(Nt, () => (e.get(et), e.untrack(() => O(e.get(et).language)))), e.reset(_t);
|
|
2723
|
-
var zt = e.sibling(_t, 2), jt = e.child(zt),
|
|
2727
|
+
var zt = e.sibling(_t, 2), jt = e.child(zt), ut = e.child(jt, !0);
|
|
2724
2728
|
e.reset(jt);
|
|
2725
2729
|
var nt = e.sibling(jt, 2), Ct = e.child(nt), ra = e.sibling(Ct);
|
|
2726
2730
|
{
|
|
@@ -2733,12 +2737,12 @@ function Fn(Be, d) {
|
|
|
2733
2737
|
});
|
|
2734
2738
|
}
|
|
2735
2739
|
e.reset(nt), e.reset(zt);
|
|
2736
|
-
var $t = e.sibling(zt, 2),
|
|
2740
|
+
var $t = e.sibling(zt, 2), Ft = e.child($t, !0);
|
|
2737
2741
|
e.reset($t), e.reset(Ot), e.template_effect(
|
|
2738
2742
|
(ft) => {
|
|
2739
2743
|
wt = e.set_class(Ot, 1, "artifactuse-panel__artifact-item", null, wt, {
|
|
2740
2744
|
"artifactuse-panel__artifact-item--active": e.get(et).id === e.get(a).id
|
|
2741
|
-
}), e.set_text(
|
|
2745
|
+
}), e.set_text(ut, (e.get(et), e.untrack(() => e.get(et).title || "Untitled"))), e.set_text(Ct, `${ft ?? ""} `), e.set_text(Ft, e.get(ar) + 1);
|
|
2742
2746
|
},
|
|
2743
2747
|
[
|
|
2744
2748
|
() => (e.deep_read_state(Wt), e.get(et), e.untrack(() => Wt(e.get(et).language)))
|
|
@@ -2754,13 +2758,13 @@ function Fn(Be, d) {
|
|
|
2754
2758
|
Te.disabled = e.get(be) <= 0, e.set_text(Ut, `${e.get(be) + 1} / ${e.get(P), e.untrack(() => e.get(P).length) ?? ""}`), pt.disabled = (e.get(be), e.get(P), e.untrack(() => e.get(be) >= e.get(P).length - 1));
|
|
2755
2759
|
}), e.event("click", Te, Oa), e.event("click", dt, () => e.set(p, !e.get(p))), e.event("click", pt, Na), e.append(c, k);
|
|
2756
2760
|
};
|
|
2757
|
-
e.if(
|
|
2758
|
-
e.get(P), e.untrack(() => e.get(P).length > 1) && c(
|
|
2761
|
+
e.if(Ir, (c) => {
|
|
2762
|
+
e.get(P), e.untrack(() => e.get(P).length > 1) && c(qr);
|
|
2759
2763
|
});
|
|
2760
2764
|
}
|
|
2761
2765
|
e.reset(gr), e.reset(_r), e.reset(Je), e.template_effect(() => {
|
|
2762
|
-
e.set_class(Je, 1, e.clsx(e.get(xe))), e.set_style(Je, e.get(ae) ? void 0 : `width: ${e.get(oe)}%`), e.set_text(ja, (e.get(a), e.untrack(() => e.get(a).title || "Untitled"))), e.set_text(Pa, `${e.get(Ae) ?? ""} `), e.set_attribute(Ht, "title", e.get(ae) ? "Exit fullscreen" : "Fullscreen"), e.set_class(ya, 1, e.clsx(e.get(ze))), e.set_style(
|
|
2763
|
-
}), e.event("click", Ht, Ye), e.event("click", za,
|
|
2766
|
+
e.set_class(Je, 1, e.clsx(e.get(xe))), e.set_style(Je, e.get(ae) ? void 0 : `width: ${e.get(oe)}%`), e.set_text(ja, (e.get(a), e.untrack(() => e.get(a).title || "Untitled"))), e.set_text(Pa, `${e.get(Ae) ?? ""} `), e.set_attribute(Ht, "title", e.get(ae) ? "Exit fullscreen" : "Fullscreen"), e.set_class(ya, 1, e.clsx(e.get(ze))), e.set_style(Fa, e.get(j) === "split" ? `width: ${100 - e.get(Le)}%` : e.get(j) === "code" ? "" : "display: none"), e.set_class(Ya, 1, `artifactuse-panel__code-block language-${e.get(Y) ?? ""}`), e.set_class(pr, 1, `language-${e.get(Y) ?? ""}`), e.set_style(Qa, e.get(j) === "edit" ? "" : "display: none"), mr = e.set_class(ea, 1, "artifactuse-panel__footer-action", null, mr, { "artifactuse-panel__footer-action--success": e.get(o) }), e.set_attribute(ea, "title", e.get(o) ? "Copied!" : "Copy code");
|
|
2767
|
+
}), e.event("click", Ht, Ye), e.event("click", za, Fe), e.event("click", ea, te), e.event("click", hr, ue), e.append(st, Je);
|
|
2764
2768
|
};
|
|
2765
2769
|
e.if(
|
|
2766
2770
|
Ke,
|
|
@@ -2776,30 +2780,30 @@ function Fn(Be, d) {
|
|
|
2776
2780
|
e.get(Pe) ? ct(rt, !1) : ct(We);
|
|
2777
2781
|
});
|
|
2778
2782
|
}
|
|
2779
|
-
e.append(n,
|
|
2783
|
+
e.append(n, ve);
|
|
2780
2784
|
};
|
|
2781
2785
|
e.if(Cr, (n) => {
|
|
2782
2786
|
e.get(ke) && n($r);
|
|
2783
2787
|
});
|
|
2784
2788
|
}
|
|
2785
|
-
e.append(Be, cr), e.pop(),
|
|
2789
|
+
e.append(Be, cr), e.pop(), u();
|
|
2786
2790
|
}
|
|
2787
2791
|
var An = e.from_html('<span class="artifactuse-panel-toggle-badge"> </span>'), Ln = e.from_html('<button><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="16 18 22 12 16 6"></polyline><polyline points="8 6 2 12 8 18"></polyline></svg> <!></button>');
|
|
2788
2792
|
function Rn(Be, d) {
|
|
2789
2793
|
e.push(d, !1);
|
|
2790
|
-
const fe = () => e.store_get(j, "$isPanelOpen", s), H = () => e.store_get(ae, "$artifactCount", s), x = () => e.store_get(Se, "$hasArtifacts", s), [s, r] = e.setup_stores(),
|
|
2794
|
+
const fe = () => e.store_get(j, "$isPanelOpen", s), H = () => e.store_get(ae, "$artifactCount", s), x = () => e.store_get(Se, "$hasArtifacts", s), [s, r] = e.setup_stores(), u = e.mutable_source(), y = e.mutable_source(), a = e.mutable_source(), pe = e.mutable_source(), ke = e.mutable_source(), { isPanelOpen: j, artifactCount: ae, hasArtifacts: Se, togglePanel: Pe } = Ua();
|
|
2791
2795
|
e.legacy_pre_effect(() => fe(), () => {
|
|
2792
|
-
e.set(
|
|
2796
|
+
e.set(u, fe());
|
|
2793
2797
|
}), e.legacy_pre_effect(() => H(), () => {
|
|
2794
2798
|
e.set(y, H());
|
|
2795
2799
|
}), e.legacy_pre_effect(() => x(), () => {
|
|
2796
2800
|
e.set(a, x());
|
|
2797
2801
|
}), e.legacy_pre_effect(() => e.get(y), () => {
|
|
2798
2802
|
e.set(pe, e.get(y) > 99 ? "99+" : String(e.get(y)));
|
|
2799
|
-
}), e.legacy_pre_effect(() => (e.get(
|
|
2803
|
+
}), e.legacy_pre_effect(() => (e.get(u), e.get(a)), () => {
|
|
2800
2804
|
e.set(ke, [
|
|
2801
2805
|
"artifactuse-panel-toggle",
|
|
2802
|
-
e.get(
|
|
2806
|
+
e.get(u) && "artifactuse-panel-toggle--active",
|
|
2803
2807
|
e.get(a) && "artifactuse-panel-toggle--has-artifacts"
|
|
2804
2808
|
].filter(Boolean).join(" "));
|
|
2805
2809
|
}), e.legacy_pre_effect_reset(), e.init();
|
|
@@ -2814,12 +2818,12 @@ function Rn(Be, d) {
|
|
|
2814
2818
|
});
|
|
2815
2819
|
}
|
|
2816
2820
|
e.reset(Ae), e.template_effect(() => {
|
|
2817
|
-
e.set_class(Ae, 1, e.clsx(e.get(ke))), e.set_attribute(Ae, "title", e.get(
|
|
2821
|
+
e.set_class(Ae, 1, e.clsx(e.get(ke))), e.set_attribute(Ae, "title", e.get(u) ? "Close artifacts panel" : "Open artifacts panel");
|
|
2818
2822
|
}), e.event("click", Ae, Pe), e.append(Be, Ae), e.pop(), r();
|
|
2819
2823
|
}
|
|
2820
2824
|
const wr = "artifactuse";
|
|
2821
2825
|
function lr(Be = {}) {
|
|
2822
|
-
const d = Or(Be), fe = ca([]), H = ca(null), x = ca(!1), s = ca("preview"), r = ca(!1),
|
|
2826
|
+
const d = Or(Be), fe = ca([]), H = ca(null), x = ca(!1), s = ca("preview"), r = ca(!1), u = ca(d.getPanelTypes()), y = d.state.subscribe((_) => {
|
|
2823
2827
|
fe.set(_.artifacts), H.set(_.activeArtifactId), x.set(_.isPanelOpen), s.set(_.viewMode), r.set(_.isFullscreen);
|
|
2824
2828
|
}), a = Da(
|
|
2825
2829
|
[fe, H],
|
|
@@ -2829,9 +2833,9 @@ function lr(Be = {}) {
|
|
|
2829
2833
|
}, Se = (_) => {
|
|
2830
2834
|
d.setTheme(_), d.applyTheme();
|
|
2831
2835
|
}, Pe = (_, g) => {
|
|
2832
|
-
d.registerPanel(_, g),
|
|
2836
|
+
d.registerPanel(_, g), u.set(d.getPanelTypes());
|
|
2833
2837
|
}, Ae = (_) => {
|
|
2834
|
-
d.unregisterPanel(_),
|
|
2838
|
+
d.unregisterPanel(_), u.set(d.getPanelTypes());
|
|
2835
2839
|
};
|
|
2836
2840
|
return {
|
|
2837
2841
|
// Instance
|
|
@@ -2846,7 +2850,7 @@ function lr(Be = {}) {
|
|
|
2846
2850
|
artifactCount: pe,
|
|
2847
2851
|
hasArtifacts: ke,
|
|
2848
2852
|
// Panel stores
|
|
2849
|
-
panelTypes:
|
|
2853
|
+
panelTypes: u,
|
|
2850
2854
|
activePanelUrl: j,
|
|
2851
2855
|
// Methods
|
|
2852
2856
|
processMessage: d.processMessage,
|
|
@@ -2854,6 +2858,7 @@ function lr(Be = {}) {
|
|
|
2854
2858
|
openArtifact: d.openArtifact,
|
|
2855
2859
|
openFile: d.openFile,
|
|
2856
2860
|
openCode: d.openCode,
|
|
2861
|
+
updateFile: d.updateFile,
|
|
2857
2862
|
closePanel: d.closePanel,
|
|
2858
2863
|
togglePanel: d.togglePanel,
|
|
2859
2864
|
toggleFullscreen: d.toggleFullscreen,
|
|
@@ -2880,7 +2885,7 @@ function lr(Be = {}) {
|
|
|
2880
2885
|
}
|
|
2881
2886
|
function Sn(Be = {}) {
|
|
2882
2887
|
const d = lr(Be);
|
|
2883
|
-
return Rr(wr, d), typeof window < "u" && d.applyTheme(),
|
|
2888
|
+
return Rr(wr, d), typeof window < "u" && d.applyTheme(), ua(() => {
|
|
2884
2889
|
d.applyTheme();
|
|
2885
2890
|
}), Aa(() => {
|
|
2886
2891
|
d.destroy();
|
|
@@ -2894,7 +2899,7 @@ function Ua() {
|
|
|
2894
2899
|
}
|
|
2895
2900
|
function Pn(Be = {}) {
|
|
2896
2901
|
const d = lr(Be);
|
|
2897
|
-
return typeof window < "u" && d.applyTheme(),
|
|
2902
|
+
return typeof window < "u" && d.applyTheme(), ua(() => {
|
|
2898
2903
|
d.applyTheme();
|
|
2899
2904
|
}), Aa(() => {
|
|
2900
2905
|
d.destroy();
|
|
@@ -2908,10 +2913,10 @@ const Dn = {
|
|
|
2908
2913
|
DEFAULT_PANELS: Ur
|
|
2909
2914
|
};
|
|
2910
2915
|
export {
|
|
2911
|
-
|
|
2916
|
+
In as ArtifactuseAgentMessage,
|
|
2912
2917
|
Zr as ArtifactuseCard,
|
|
2913
2918
|
zs as ArtifactuseInlineForm,
|
|
2914
|
-
|
|
2919
|
+
qn as ArtifactusePanel,
|
|
2915
2920
|
Rn as ArtifactusePanelToggle,
|
|
2916
2921
|
wi as ArtifactuseSocialPreview,
|
|
2917
2922
|
Ti as ArtifactuseViewer,
|