artifactuse 0.3.2 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/vue/index.js CHANGED
@@ -1,19 +1,19 @@
1
- import { ref as M, computed as b, createElementBlock as s, openBlock as a, normalizeClass as I, createElementVNode as e, toDisplayString as n, withModifiers as he, onMounted as Te, watch as oe, Fragment as F, createCommentVNode as v, renderList as ue, createTextVNode as Y, h as ne, normalizeStyle as Se, createStaticVNode as ea, createBlock as Me, resolveDynamicComponent as ta, nextTick as we, onUnmounted as Ye, Teleport as aa, createVNode as Fe, Transition as ze, withCtx as Ve, withKeys as sa, onBeforeUnmount as la, unref as y, withDirectives as _t, vShow as ht, reactive as yt, provide as ia, inject as na } from "vue";
2
- import { g as Ie, f as gt, a as Ze, b as Ke, n as oa, i as mt, c as ra, D as ca, d as kt } from "../index-ABusvYh9.js";
3
- import { J as ua } from "../jszip.min-CdmYyw5L.js";
4
- const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class: "artifactuse-card__content" }, pa = { class: "artifactuse-card__title" }, _a = { class: "artifactuse-card__meta" }, ha = { class: "artifactuse-card__type" }, ma = { class: "artifactuse-card__size" }, ya = { class: "artifactuse-card__actions" }, ga = ["title"], ka = {
1
+ import { ref as M, computed as k, createElementBlock as l, openBlock as s, normalizeClass as R, createElementVNode as e, toDisplayString as i, withModifiers as me, onMounted as Ee, watch as ne, Fragment as V, createCommentVNode as v, renderList as fe, createTextVNode as G, h as re, normalizeStyle as Le, createStaticVNode as ua, createBlock as Pe, resolveDynamicComponent as da, nextTick as xe, onUnmounted as st, Teleport as va, createVNode as De, Transition as qe, withCtx as Oe, withKeys as fa, onBeforeUnmount as pa, unref as p, withDirectives as Ct, vShow as xt, reactive as Tt, provide as _a, inject as ha } from "vue";
2
+ import { g as Ue, f as Lt, a as tt, b as at, n as ma, i as $t, c as ya, D as ga, d as Pt } from "../index-CBGheZYZ.js";
3
+ import { g as Mt, r as ka, J as wa, b as ba } from "../jszip.min-BdBnWAEK.js";
4
+ const Ca = { class: "artifactuse-card__icon" }, xa = ["innerHTML"], $a = { class: "artifactuse-card__content" }, Ma = { class: "artifactuse-card__title" }, Ta = { class: "artifactuse-card__meta" }, La = { class: "artifactuse-card__type" }, Pa = { class: "artifactuse-card__size" }, Ea = { class: "artifactuse-card__actions" }, Aa = ["title"], Ha = {
5
5
  key: 0,
6
6
  viewBox: "0 0 24 24",
7
7
  fill: "none",
8
8
  stroke: "currentColor",
9
9
  "stroke-width": "2"
10
- }, wa = {
10
+ }, Ba = {
11
11
  key: 1,
12
12
  viewBox: "0 0 24 24",
13
13
  fill: "none",
14
14
  stroke: "currentColor",
15
15
  "stroke-width": "2"
16
- }, ba = {
16
+ }, Sa = {
17
17
  __name: "ArtifactuseCard",
18
18
  props: {
19
19
  artifact: {
@@ -26,58 +26,58 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
26
26
  }
27
27
  },
28
28
  emits: ["open", "copy", "download"],
29
- setup(P, { emit: c }) {
30
- const p = P, T = c, _ = M(!1), r = b(() => Ie(p.artifact.language)), q = b(() => {
29
+ setup(L, { emit: d }) {
30
+ const _ = L, T = d, f = M(!1), n = k(() => Ue(_.artifact.language)), O = k(() => {
31
31
  var $;
32
- return gt(p.artifact.size || (($ = p.artifact.code) == null ? void 0 : $.length) || 0);
33
- }), A = b(() => Ze(p.artifact.language));
32
+ return Lt(_.artifact.size || (($ = _.artifact.code) == null ? void 0 : $.length) || 0);
33
+ }), H = k(() => tt(_.artifact.language));
34
34
  function g($) {
35
- $.stopPropagation(), T("open", p.artifact);
35
+ $.stopPropagation(), T("open", _.artifact);
36
36
  }
37
- async function o() {
37
+ async function r() {
38
38
  try {
39
- await navigator.clipboard.writeText(p.artifact.code), _.value = !0, setTimeout(() => {
40
- _.value = !1;
41
- }, 2e3), T("copy", p.artifact);
39
+ await navigator.clipboard.writeText(_.artifact.code), f.value = !0, setTimeout(() => {
40
+ f.value = !1;
41
+ }, 2e3), T("copy", _.artifact);
42
42
  } catch ($) {
43
43
  console.error("Failed to copy:", $);
44
44
  }
45
45
  }
46
46
  function h() {
47
- var N;
48
- const $ = new Blob([p.artifact.code], { type: "text/plain" }), V = URL.createObjectURL($), x = document.createElement("a"), D = Ke(p.artifact.editorLanguage || p.artifact.language), U = ((N = p.artifact.title) == null ? void 0 : N.replace(/[^a-z0-9]/gi, "_").toLowerCase()) || "code";
49
- x.href = V, x.download = `${U}.${D}`, document.body.appendChild(x), x.click(), document.body.removeChild(x), URL.revokeObjectURL(V), T("download", p.artifact);
47
+ var J;
48
+ const $ = new Blob([_.artifact.code], { type: "text/plain" }), I = URL.createObjectURL($), x = document.createElement("a"), N = at(_.artifact.editorLanguage || _.artifact.language), D = ((J = _.artifact.title) == null ? void 0 : J.replace(/[^a-z0-9]/gi, "_").toLowerCase()) || "code";
49
+ x.href = I, x.download = `${D}.${N}`, document.body.appendChild(x), x.click(), document.body.removeChild(x), URL.revokeObjectURL(I), T("download", _.artifact);
50
50
  }
51
- return ($, V) => (a(), s("div", {
52
- class: I(["artifactuse-card", { "artifactuse-card--active": P.isActive }]),
51
+ return ($, I) => (s(), l("div", {
52
+ class: R(["artifactuse-card", { "artifactuse-card--active": L.isActive }]),
53
53
  onClick: g
54
54
  }, [
55
- e("div", da, [
56
- (a(), s("svg", {
55
+ e("div", Ca, [
56
+ (s(), l("svg", {
57
57
  viewBox: "0 0 24 24",
58
58
  fill: "none",
59
59
  stroke: "currentColor",
60
60
  "stroke-width": "1.5",
61
- innerHTML: A.value
62
- }, null, 8, va))
61
+ innerHTML: H.value
62
+ }, null, 8, xa))
63
63
  ]),
64
- e("div", fa, [
65
- e("div", pa, n(P.artifact.title), 1),
66
- e("div", _a, [
67
- e("span", ha, n(r.value), 1),
68
- V[0] || (V[0] = e("span", { class: "artifactuse-card__separator" }, "•", -1)),
69
- e("span", ma, n(q.value), 1)
64
+ e("div", $a, [
65
+ e("div", Ma, i(L.artifact.title), 1),
66
+ e("div", Ta, [
67
+ e("span", La, i(n.value), 1),
68
+ I[0] || (I[0] = e("span", { class: "artifactuse-card__separator" }, "•", -1)),
69
+ e("span", Pa, i(O.value), 1)
70
70
  ])
71
71
  ]),
72
- e("div", ya, [
72
+ e("div", Ea, [
73
73
  e("button", {
74
74
  class: "artifactuse-card__action",
75
- onClick: he(o, ["stop"]),
76
- title: _.value ? "Copied!" : "Copy code"
75
+ onClick: me(r, ["stop"]),
76
+ title: f.value ? "Copied!" : "Copy code"
77
77
  }, [
78
- _.value ? (a(), s("svg", wa, [...V[2] || (V[2] = [
78
+ f.value ? (s(), l("svg", Ba, [...I[2] || (I[2] = [
79
79
  e("polyline", { points: "20 6 9 17 4 12" }, null, -1)
80
- ])])) : (a(), s("svg", ka, [...V[1] || (V[1] = [
80
+ ])])) : (s(), l("svg", Ha, [...I[1] || (I[1] = [
81
81
  e("rect", {
82
82
  x: "9",
83
83
  y: "9",
@@ -88,12 +88,12 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
88
88
  }, null, -1),
89
89
  e("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" }, null, -1)
90
90
  ])]))
91
- ], 8, ga),
91
+ ], 8, Aa),
92
92
  e("button", {
93
93
  class: "artifactuse-card__action",
94
- onClick: he(h, ["stop"]),
94
+ onClick: me(h, ["stop"]),
95
95
  title: "Download file"
96
- }, [...V[3] || (V[3] = [
96
+ }, [...I[3] || (I[3] = [
97
97
  e("svg", {
98
98
  viewBox: "0 0 24 24",
99
99
  fill: "none",
@@ -111,7 +111,7 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
111
111
  ], -1)
112
112
  ])])
113
113
  ]),
114
- V[4] || (V[4] = e("div", { class: "artifactuse-card__arrow" }, [
114
+ I[4] || (I[4] = e("div", { class: "artifactuse-card__arrow" }, [
115
115
  e("svg", {
116
116
  viewBox: "0 0 24 24",
117
117
  fill: "none",
@@ -123,10 +123,10 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
123
123
  ], -1))
124
124
  ], 2));
125
125
  }
126
- }, Ca = ["data-artifactuse-theme"], xa = {
126
+ }, za = ["data-artifactuse-theme"], Va = {
127
127
  key: 0,
128
128
  class: "artifactuse-form-collapsed"
129
- }, $a = { class: "artifactuse-form-collapsed-icon" }, Ma = {
129
+ }, Ia = { class: "artifactuse-form-collapsed-icon" }, Fa = {
130
130
  key: 0,
131
131
  viewBox: "0 0 24 24",
132
132
  fill: "none",
@@ -134,7 +134,7 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
134
134
  "stroke-width": "2.5",
135
135
  "stroke-linecap": "round",
136
136
  "stroke-linejoin": "round"
137
- }, Ta = {
137
+ }, Ra = {
138
138
  key: 1,
139
139
  viewBox: "0 0 24 24",
140
140
  fill: "none",
@@ -142,7 +142,7 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
142
142
  "stroke-width": "2.5",
143
143
  "stroke-linecap": "round",
144
144
  "stroke-linejoin": "round"
145
- }, La = {
145
+ }, qa = {
146
146
  key: 2,
147
147
  viewBox: "0 0 24 24",
148
148
  fill: "none",
@@ -150,64 +150,64 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
150
150
  "stroke-width": "2.5",
151
151
  "stroke-linecap": "round",
152
152
  "stroke-linejoin": "round"
153
- }, Pa = { class: "artifactuse-form-collapsed-title" }, Ea = {
153
+ }, Oa = { class: "artifactuse-form-collapsed-title" }, Ua = {
154
154
  key: 0,
155
155
  class: "artifactuse-form-header"
156
- }, Aa = {
156
+ }, Da = {
157
157
  key: 0,
158
158
  class: "artifactuse-form-title"
159
- }, Ha = {
159
+ }, ja = {
160
160
  key: 1,
161
161
  class: "artifactuse-form-description"
162
- }, Ba = {
162
+ }, Na = {
163
163
  key: 1,
164
164
  class: "artifactuse-form-buttons"
165
- }, Sa = ["disabled", "onClick"], za = ["innerHTML"], Va = { class: "artifactuse-form-fields" }, Ia = {
165
+ }, Wa = ["disabled", "onClick"], Ja = ["innerHTML"], Xa = { class: "artifactuse-form-fields" }, Za = {
166
166
  key: 0,
167
167
  class: "artifactuse-form-buttons"
168
- }, Fa = ["type", "disabled", "onClick"], Ra = {
168
+ }, Ka = ["type", "disabled", "onClick"], Ya = {
169
169
  key: 0,
170
170
  class: "artifactuse-form-btn-spinner"
171
- }, qa = ["innerHTML"], Oa = {
171
+ }, Ga = ["innerHTML"], Qa = {
172
172
  key: 1,
173
173
  class: "artifactuse-form-divider"
174
- }, Ua = {
174
+ }, es = {
175
175
  key: 2,
176
176
  class: "artifactuse-form-heading"
177
- }, Da = {
177
+ }, ts = {
178
178
  key: 3,
179
179
  class: "artifactuse-form-field"
180
- }, ja = { class: "artifactuse-checkbox-label" }, Na = ["checked", "disabled", "onChange"], Wa = { class: "artifactuse-checkbox-text" }, Ja = {
180
+ }, as = { class: "artifactuse-checkbox-label" }, ss = ["checked", "disabled", "onChange"], ls = { class: "artifactuse-checkbox-text" }, is = {
181
181
  key: 0,
182
182
  class: "artifactuse-required"
183
- }, Xa = {
183
+ }, ns = {
184
184
  key: 0,
185
185
  class: "artifactuse-help-text"
186
- }, Za = {
186
+ }, os = {
187
187
  key: 1,
188
188
  class: "artifactuse-error-text"
189
- }, Ka = {
189
+ }, rs = {
190
190
  key: 4,
191
191
  class: "artifactuse-form-field"
192
- }, Ya = ["for"], Qa = {
192
+ }, cs = ["for"], us = {
193
193
  key: 0,
194
194
  class: "artifactuse-required"
195
- }, Ga = ["id", "type", "value", "placeholder", "disabled", "required", "onInput"], es = ["id", "value", "placeholder", "disabled", "required", "rows", "onInput"], ts = ["id", "value", "disabled", "required", "onChange"], as = { value: "" }, ss = ["value", "disabled"], ls = {
195
+ }, ds = ["id", "type", "value", "placeholder", "disabled", "required", "onInput"], vs = ["id", "value", "placeholder", "disabled", "required", "rows", "onInput"], fs = ["id", "value", "disabled", "required", "onChange"], ps = { value: "" }, _s = ["value", "disabled"], hs = {
196
196
  key: 3,
197
197
  class: "artifactuse-radio-group"
198
- }, is = ["name", "value", "checked", "disabled", "onChange"], ns = {
198
+ }, ms = ["name", "value", "checked", "disabled", "onChange"], ys = {
199
199
  key: 4,
200
200
  class: "artifactuse-help-text"
201
- }, os = {
201
+ }, gs = {
202
202
  key: 5,
203
203
  class: "artifactuse-error-text"
204
- }, rs = {
204
+ }, ks = {
205
205
  key: 0,
206
206
  class: "artifactuse-form-buttons artifactuse-form-buttons-default"
207
- }, cs = ["disabled"], us = {
207
+ }, ws = ["disabled"], bs = {
208
208
  key: 0,
209
209
  class: "artifactuse-form-btn-spinner"
210
- }, ds = {
210
+ }, Cs = {
211
211
  __name: "ArtifactuseInlineForm",
212
212
  props: {
213
213
  artifact: { type: Object, required: !0 },
@@ -216,121 +216,121 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
216
216
  initialState: {
217
217
  type: String,
218
218
  default: "active",
219
- validator: (P) => ["active", "submitted", "cancelled", "inactive"].includes(P)
219
+ validator: (L) => ["active", "submitted", "cancelled", "inactive"].includes(L)
220
220
  }
221
221
  },
222
222
  emits: ["submit", "cancel", "reset", "button-click"],
223
- setup(P, { emit: c }) {
224
- const p = P, T = c, _ = M(p.initialState), r = b(() => _.value !== "active"), q = b(() => _.value === "active" ? "" : `artifactuse-form--${_.value}`);
225
- function A(w) {
226
- _.value = w;
223
+ setup(L, { emit: d }) {
224
+ const _ = L, T = d, f = M(_.initialState), n = k(() => f.value !== "active"), O = k(() => f.value === "active" ? "" : `artifactuse-form--${f.value}`);
225
+ function H(b) {
226
+ f.value = b;
227
227
  }
228
- const g = b(() => {
228
+ const g = k(() => {
229
229
  try {
230
- return JSON.parse(p.artifact.code);
230
+ return JSON.parse(_.artifact.code);
231
231
  } catch {
232
232
  return { title: "Invalid Form", variant: "fields", data: { fields: [] } };
233
233
  }
234
- }), o = M(null), h = b(() => p.artifact.id || g.value.id || `form-${Date.now()}`), $ = b(() => `artifactuse-form-${g.value.variant || "fields"}`), V = b(() => g.value.title || "Form"), x = M({}), D = M({}), U = M(!1), N = b(() => {
235
- var w;
236
- return ((w = g.value.data) == null ? void 0 : w.fields) || [];
237
- }), ee = b(() => {
238
- var w;
239
- return g.value.variant === "buttons" ? ((w = g.value.data) == null ? void 0 : w.fields) || [] : [];
240
- }), B = b(() => N.value.some((w) => w.type === "buttons"));
241
- function re(w) {
242
- if (!w) return null;
243
- const E = w.trim();
244
- if (E.startsWith("#")) {
245
- let d = E.slice(1);
246
- if (d.length === 3 && (d = d.split("").map((L) => L + L).join("")), d.length === 6) {
247
- const L = parseInt(d.slice(0, 2), 16), se = parseInt(d.slice(2, 4), 16), ce = parseInt(d.slice(4, 6), 16);
248
- if (!isNaN(L) && !isNaN(se) && !isNaN(ce)) return `${L}, ${se}, ${ce}`;
234
+ }), r = M(null), h = k(() => _.artifact.id || g.value.id || `form-${Date.now()}`), $ = k(() => `artifactuse-form-${g.value.variant || "fields"}`), I = k(() => g.value.title || "Form"), x = M({}), N = M({}), D = M(!1), J = k(() => {
235
+ var b;
236
+ return ((b = g.value.data) == null ? void 0 : b.fields) || [];
237
+ }), ee = k(() => {
238
+ var b;
239
+ return g.value.variant === "buttons" ? ((b = g.value.data) == null ? void 0 : b.fields) || [] : [];
240
+ }), S = k(() => J.value.some((b) => b.type === "buttons"));
241
+ function ce(b) {
242
+ if (!b) return null;
243
+ const B = b.trim();
244
+ if (B.startsWith("#")) {
245
+ let o = B.slice(1);
246
+ if (o.length === 3 && (o = o.split("").map((P) => P + P).join("")), o.length === 6) {
247
+ const P = parseInt(o.slice(0, 2), 16), se = parseInt(o.slice(2, 4), 16), te = parseInt(o.slice(4, 6), 16);
248
+ if (!isNaN(P) && !isNaN(se) && !isNaN(te)) return `${P}, ${se}, ${te}`;
249
249
  }
250
250
  }
251
- const i = E.match(/^rgba?\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)/i);
252
- if (i) return `${i[1]}, ${i[2]}, ${i[3]}`;
253
- const H = E.split(/[\s,]+/).map(Number).filter((d) => !isNaN(d));
254
- return H.length >= 3 ? `${H[0]}, ${H[1]}, ${H[2]}` : null;
251
+ const u = B.match(/^rgba?\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)/i);
252
+ if (u) return `${u[1]}, ${u[2]}, ${u[3]}`;
253
+ const z = B.split(/[\s,]+/).map(Number).filter((o) => !isNaN(o));
254
+ return z.length >= 3 ? `${z[0]}, ${z[1]}, ${z[2]}` : null;
255
255
  }
256
256
  function K() {
257
- if (o.value && p.accent) {
258
- const w = re(p.accent);
259
- w && o.value.style.setProperty("--artifactuse-primary", w);
257
+ if (r.value && _.accent) {
258
+ const b = ce(_.accent);
259
+ b && r.value.style.setProperty("--artifactuse-primary", b);
260
260
  }
261
261
  }
262
- Te(() => {
263
- K(), _.value = p.initialState;
264
- }), oe(() => p.accent, K), oe(() => p.initialState, (w) => {
265
- _.value = w;
262
+ Ee(() => {
263
+ K(), f.value = _.initialState;
264
+ }), ne(() => _.accent, K), ne(() => _.initialState, (b) => {
265
+ f.value = b;
266
266
  });
267
267
  function Z() {
268
- var i;
269
- const w = {};
270
- N.value.forEach((H) => {
271
- ["buttons", "divider", "heading"].includes(H.type) || (H.defaultValue !== void 0 ? w[H.name] = H.defaultValue : H.type === "checkbox" ? w[H.name] = !1 : w[H.name] = "");
272
- }), (i = g.value.data) != null && i.defaults && Object.assign(w, g.value.data.defaults), x.value = w;
273
- }
274
- Z(), oe(() => p.artifact.code, Z);
275
- function de(w) {
276
- return ["text", "email", "password", "tel", "url", "number", "date", "time", "datetime-local"].includes(w);
277
- }
278
- function m(w) {
279
- return w ? w.map((E) => typeof E == "string" ? { label: E, value: E } : E) : [];
280
- }
281
- function k(w, E) {
282
- x.value[w] = E, D.value[w] && delete D.value[w];
283
- }
284
- function ae() {
285
- var H;
286
- const w = {};
287
- N.value.forEach((d) => {
288
- if (["buttons", "divider", "heading"].includes(d.type)) return;
289
- const L = x.value[d.name];
290
- if (d.required && !L && L !== 0 && L !== !1) {
291
- w[d.name] = `${d.label || "This field"} is required`;
268
+ var u;
269
+ const b = {};
270
+ J.value.forEach((z) => {
271
+ ["buttons", "divider", "heading"].includes(z.type) || (z.defaultValue !== void 0 ? b[z.name] = z.defaultValue : z.type === "checkbox" ? b[z.name] = !1 : b[z.name] = "");
272
+ }), (u = g.value.data) != null && u.defaults && Object.assign(b, g.value.data.defaults), x.value = b;
273
+ }
274
+ Z(), ne(() => _.artifact.code, Z);
275
+ function pe(b) {
276
+ return ["text", "email", "password", "tel", "url", "number", "date", "time", "datetime-local"].includes(b);
277
+ }
278
+ function m(b) {
279
+ return b ? b.map((B) => typeof B == "string" ? { label: B, value: B } : B) : [];
280
+ }
281
+ function w(b, B) {
282
+ x.value[b] = B, N.value[b] && delete N.value[b];
283
+ }
284
+ function ie() {
285
+ var z;
286
+ const b = {};
287
+ J.value.forEach((o) => {
288
+ if (["buttons", "divider", "heading"].includes(o.type)) return;
289
+ const P = x.value[o.name];
290
+ if (o.required && !P && P !== 0 && P !== !1) {
291
+ b[o.name] = `${o.label || "This field"} is required`;
292
292
  return;
293
293
  }
294
- if (d.pattern && L && !new RegExp(d.pattern).test(L)) {
295
- w[d.name] = d.patternMessage || `${d.label || "This field"} is invalid`;
294
+ if (o.pattern && P && !new RegExp(o.pattern).test(P)) {
295
+ b[o.name] = o.patternMessage || `${o.label || "This field"} is invalid`;
296
296
  return;
297
297
  }
298
- if (d.type === "email" && L && !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(L)) {
299
- w[d.name] = "Please enter a valid email address";
298
+ if (o.type === "email" && P && !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(P)) {
299
+ b[o.name] = "Please enter a valid email address";
300
300
  return;
301
301
  }
302
- if (d.minLength && L && L.length < d.minLength) {
303
- w[d.name] = `Minimum ${d.minLength} characters required`;
302
+ if (o.minLength && P && P.length < o.minLength) {
303
+ b[o.name] = `Minimum ${o.minLength} characters required`;
304
304
  return;
305
305
  }
306
- if (d.maxLength && L && L.length > d.maxLength) {
307
- w[d.name] = `Maximum ${d.maxLength} characters allowed`;
306
+ if (o.maxLength && P && P.length > o.maxLength) {
307
+ b[o.name] = `Maximum ${o.maxLength} characters allowed`;
308
308
  return;
309
309
  }
310
310
  });
311
- const i = (H = g.value.data) == null ? void 0 : H.validation;
312
- return i && Object.entries(i).forEach(([d, L]) => {
313
- if (w[d]) return;
314
- const se = x.value[d];
315
- L.pattern && se && (new RegExp(L.pattern).test(se) || (w[d] = L.message || `${d} is invalid`));
316
- }), D.value = w, Object.keys(w).length === 0;
311
+ const u = (z = g.value.data) == null ? void 0 : z.validation;
312
+ return u && Object.entries(u).forEach(([o, P]) => {
313
+ if (b[o]) return;
314
+ const se = x.value[o];
315
+ P.pattern && se && (new RegExp(P.pattern).test(se) || (b[o] = P.message || `${o} is invalid`));
316
+ }), N.value = b, Object.keys(b).length === 0;
317
317
  }
318
- function Q() {
319
- Z(), D.value = {};
318
+ function oe() {
319
+ Z(), N.value = {};
320
320
  }
321
321
  function W() {
322
- ae() && (U.value = !0, T("submit", {
322
+ ie() && (D.value = !0, T("submit", {
323
323
  formId: h.value,
324
324
  action: "submit",
325
325
  values: { ...x.value },
326
326
  timestamp: Date.now()
327
327
  }), setTimeout(() => {
328
- U.value = !1, A("submitted");
328
+ D.value = !1, H("submitted");
329
329
  }, 300));
330
330
  }
331
- function ie(w) {
332
- const E = w.action || "custom";
333
- switch (E) {
331
+ function X(b) {
332
+ const B = b.action || "custom";
333
+ switch (B) {
334
334
  case "submit":
335
335
  W();
336
336
  break;
@@ -338,17 +338,17 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
338
338
  T("cancel", {
339
339
  formId: h.value,
340
340
  action: "cancel",
341
- buttonName: w.name || "cancel",
341
+ buttonName: b.name || "cancel",
342
342
  timestamp: Date.now()
343
343
  }), setTimeout(() => {
344
- A("cancelled");
344
+ H("cancelled");
345
345
  }, 150);
346
346
  break;
347
347
  case "reset":
348
- Q(), T("reset", {
348
+ oe(), T("reset", {
349
349
  formId: h.value,
350
350
  action: "reset",
351
- buttonName: w.name || "reset",
351
+ buttonName: b.name || "reset",
352
352
  timestamp: Date.now()
353
353
  });
354
354
  break;
@@ -356,32 +356,32 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
356
356
  default:
357
357
  T("button-click", {
358
358
  formId: h.value,
359
- action: E,
360
- buttonName: w.name || w.label,
361
- buttonLabel: w.label,
359
+ action: B,
360
+ buttonName: b.name || b.label,
361
+ buttonLabel: b.label,
362
362
  values: { ...x.value },
363
363
  timestamp: Date.now()
364
364
  }), setTimeout(() => {
365
- A("submitted");
365
+ H("submitted");
366
366
  }, 150);
367
367
  break;
368
368
  }
369
369
  }
370
- return (w, E) => (a(), s("div", {
370
+ return (b, B) => (s(), l("div", {
371
371
  ref_key: "containerRef",
372
- ref: o,
373
- class: I([
372
+ ref: r,
373
+ class: R([
374
374
  "artifactuse-inline-form",
375
375
  $.value,
376
- q.value
376
+ O.value
377
377
  ]),
378
- "data-artifactuse-theme": P.theme
378
+ "data-artifactuse-theme": L.theme
379
379
  }, [
380
- r.value ? (a(), s("div", xa, [
381
- e("div", $a, [
382
- _.value === "submitted" ? (a(), s("svg", Ma, [...E[1] || (E[1] = [
380
+ n.value ? (s(), l("div", Va, [
381
+ e("div", Ia, [
382
+ f.value === "submitted" ? (s(), l("svg", Fa, [...B[1] || (B[1] = [
383
383
  e("polyline", { points: "20 6 9 17 4 12" }, null, -1)
384
- ])])) : _.value === "cancelled" ? (a(), s("svg", Ta, [...E[2] || (E[2] = [
384
+ ])])) : f.value === "cancelled" ? (s(), l("svg", Ra, [...B[2] || (B[2] = [
385
385
  e("line", {
386
386
  x1: "18",
387
387
  y1: "6",
@@ -394,7 +394,7 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
394
394
  x2: "18",
395
395
  y2: "18"
396
396
  }, null, -1)
397
- ])])) : (a(), s("svg", La, [...E[3] || (E[3] = [
397
+ ])])) : (s(), l("svg", qa, [...B[3] || (B[3] = [
398
398
  e("line", {
399
399
  x1: "5",
400
400
  y1: "12",
@@ -403,216 +403,216 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
403
403
  }, null, -1)
404
404
  ])]))
405
405
  ]),
406
- e("span", Pa, n(V.value), 1)
407
- ])) : (a(), s(F, { key: 1 }, [
408
- g.value.title || g.value.description ? (a(), s("div", Ea, [
409
- g.value.title ? (a(), s("div", Aa, n(g.value.title), 1)) : v("", !0),
410
- g.value.description ? (a(), s("p", Ha, n(g.value.description), 1)) : v("", !0)
406
+ e("span", Oa, i(I.value), 1)
407
+ ])) : (s(), l(V, { key: 1 }, [
408
+ g.value.title || g.value.description ? (s(), l("div", Ua, [
409
+ g.value.title ? (s(), l("div", Da, i(g.value.title), 1)) : v("", !0),
410
+ g.value.description ? (s(), l("p", ja, i(g.value.description), 1)) : v("", !0)
411
411
  ])) : v("", !0),
412
- g.value.variant === "buttons" ? (a(), s("div", Ba, [
413
- (a(!0), s(F, null, ue(ee.value, (i) => (a(), s("button", {
414
- key: i.name || i.label,
412
+ g.value.variant === "buttons" ? (s(), l("div", Na, [
413
+ (s(!0), l(V, null, fe(ee.value, (u) => (s(), l("button", {
414
+ key: u.name || u.label,
415
415
  type: "button",
416
- class: I(["artifactuse-form-btn", `artifactuse-form-btn-${i.variant || "secondary"}`]),
417
- disabled: i.disabled || U.value,
418
- onClick: (H) => ie(i)
416
+ class: R(["artifactuse-form-btn", `artifactuse-form-btn-${u.variant || "secondary"}`]),
417
+ disabled: u.disabled || D.value,
418
+ onClick: (z) => X(u)
419
419
  }, [
420
- i.icon ? (a(), s("span", {
420
+ u.icon ? (s(), l("span", {
421
421
  key: 0,
422
422
  class: "artifactuse-form-btn-icon",
423
- innerHTML: i.icon
424
- }, null, 8, za)) : v("", !0),
425
- Y(" " + n(i.label), 1)
426
- ], 10, Sa))), 128))
427
- ])) : (a(), s("form", {
423
+ innerHTML: u.icon
424
+ }, null, 8, Ja)) : v("", !0),
425
+ G(" " + i(u.label), 1)
426
+ ], 10, Wa))), 128))
427
+ ])) : (s(), l("form", {
428
428
  key: 2,
429
429
  class: "artifactuse-form",
430
- onSubmit: he(W, ["prevent"])
430
+ onSubmit: me(W, ["prevent"])
431
431
  }, [
432
- e("div", Va, [
433
- (a(!0), s(F, null, ue(N.value, (i, H) => (a(), s(F, {
434
- key: i.name || H
432
+ e("div", Xa, [
433
+ (s(!0), l(V, null, fe(J.value, (u, z) => (s(), l(V, {
434
+ key: u.name || z
435
435
  }, [
436
- i.type === "buttons" ? (a(), s("div", Ia, [
437
- (a(!0), s(F, null, ue(i.fields || [], (d) => (a(), s("button", {
438
- key: d.name || d.label,
439
- type: d.action === "submit" ? "submit" : "button",
440
- class: I(["artifactuse-form-btn", `artifactuse-form-btn-${d.variant || "secondary"}`]),
441
- disabled: d.disabled || d.action === "submit" && U.value,
442
- onClick: (L) => d.action !== "submit" ? ie(d) : null
436
+ u.type === "buttons" ? (s(), l("div", Za, [
437
+ (s(!0), l(V, null, fe(u.fields || [], (o) => (s(), l("button", {
438
+ key: o.name || o.label,
439
+ type: o.action === "submit" ? "submit" : "button",
440
+ class: R(["artifactuse-form-btn", `artifactuse-form-btn-${o.variant || "secondary"}`]),
441
+ disabled: o.disabled || o.action === "submit" && D.value,
442
+ onClick: (P) => o.action !== "submit" ? X(o) : null
443
443
  }, [
444
- U.value && d.action === "submit" ? (a(), s("span", Ra)) : d.icon ? (a(), s("span", {
444
+ D.value && o.action === "submit" ? (s(), l("span", Ya)) : o.icon ? (s(), l("span", {
445
445
  key: 1,
446
446
  class: "artifactuse-form-btn-icon",
447
- innerHTML: d.icon
448
- }, null, 8, qa)) : v("", !0),
449
- Y(" " + n(U.value && d.action === "submit" ? "Submitting..." : d.label), 1)
450
- ], 10, Fa))), 128))
451
- ])) : i.type === "divider" ? (a(), s("div", Oa)) : i.type === "heading" ? (a(), s("div", Ua, n(i.label), 1)) : i.type === "checkbox" ? (a(), s("div", Da, [
452
- e("label", ja, [
447
+ innerHTML: o.icon
448
+ }, null, 8, Ga)) : v("", !0),
449
+ G(" " + i(D.value && o.action === "submit" ? "Submitting..." : o.label), 1)
450
+ ], 10, Ka))), 128))
451
+ ])) : u.type === "divider" ? (s(), l("div", Qa)) : u.type === "heading" ? (s(), l("div", es, i(u.label), 1)) : u.type === "checkbox" ? (s(), l("div", ts, [
452
+ e("label", as, [
453
453
  e("input", {
454
454
  type: "checkbox",
455
- checked: x.value[i.name],
456
- disabled: i.disabled,
455
+ checked: x.value[u.name],
456
+ disabled: u.disabled,
457
457
  class: "artifactuse-checkbox",
458
- onChange: (d) => k(i.name, d.target.checked)
459
- }, null, 40, Na),
460
- e("span", Wa, [
461
- Y(n(i.label) + " ", 1),
462
- i.required ? (a(), s("span", Ja, "*")) : v("", !0)
458
+ onChange: (o) => w(u.name, o.target.checked)
459
+ }, null, 40, ss),
460
+ e("span", ls, [
461
+ G(i(u.label) + " ", 1),
462
+ u.required ? (s(), l("span", is, "*")) : v("", !0)
463
463
  ])
464
464
  ]),
465
- i.helpText ? (a(), s("span", Xa, n(i.helpText), 1)) : v("", !0),
466
- D.value[i.name] ? (a(), s("span", Za, n(D.value[i.name]), 1)) : v("", !0)
467
- ])) : (a(), s("div", Ka, [
465
+ u.helpText ? (s(), l("span", ns, i(u.helpText), 1)) : v("", !0),
466
+ N.value[u.name] ? (s(), l("span", os, i(N.value[u.name]), 1)) : v("", !0)
467
+ ])) : (s(), l("div", rs, [
468
468
  e("label", {
469
- for: `${h.value}-${i.name}`,
469
+ for: `${h.value}-${u.name}`,
470
470
  class: "artifactuse-label"
471
471
  }, [
472
- Y(n(i.label) + " ", 1),
473
- i.required ? (a(), s("span", Qa, "*")) : v("", !0)
474
- ], 8, Ya),
475
- de(i.type) ? (a(), s("input", {
472
+ G(i(u.label) + " ", 1),
473
+ u.required ? (s(), l("span", us, "*")) : v("", !0)
474
+ ], 8, cs),
475
+ pe(u.type) ? (s(), l("input", {
476
476
  key: 0,
477
- id: `${h.value}-${i.name}`,
478
- type: i.type,
479
- value: x.value[i.name],
480
- placeholder: i.placeholder,
481
- disabled: i.disabled,
482
- required: i.required,
477
+ id: `${h.value}-${u.name}`,
478
+ type: u.type,
479
+ value: x.value[u.name],
480
+ placeholder: u.placeholder,
481
+ disabled: u.disabled,
482
+ required: u.required,
483
483
  class: "artifactuse-input",
484
- onInput: (d) => k(i.name, d.target.value)
485
- }, null, 40, Ga)) : i.type === "textarea" ? (a(), s("textarea", {
484
+ onInput: (o) => w(u.name, o.target.value)
485
+ }, null, 40, ds)) : u.type === "textarea" ? (s(), l("textarea", {
486
486
  key: 1,
487
- id: `${h.value}-${i.name}`,
488
- value: x.value[i.name],
489
- placeholder: i.placeholder,
490
- disabled: i.disabled,
491
- required: i.required,
492
- rows: i.rows || 3,
487
+ id: `${h.value}-${u.name}`,
488
+ value: x.value[u.name],
489
+ placeholder: u.placeholder,
490
+ disabled: u.disabled,
491
+ required: u.required,
492
+ rows: u.rows || 3,
493
493
  class: "artifactuse-textarea",
494
- onInput: (d) => k(i.name, d.target.value)
495
- }, null, 40, es)) : i.type === "select" ? (a(), s("select", {
494
+ onInput: (o) => w(u.name, o.target.value)
495
+ }, null, 40, vs)) : u.type === "select" ? (s(), l("select", {
496
496
  key: 2,
497
- id: `${h.value}-${i.name}`,
498
- value: x.value[i.name],
499
- disabled: i.disabled,
500
- required: i.required,
497
+ id: `${h.value}-${u.name}`,
498
+ value: x.value[u.name],
499
+ disabled: u.disabled,
500
+ required: u.required,
501
501
  class: "artifactuse-select",
502
- onChange: (d) => k(i.name, d.target.value)
502
+ onChange: (o) => w(u.name, o.target.value)
503
503
  }, [
504
- e("option", as, n(i.placeholder || "Select..."), 1),
505
- (a(!0), s(F, null, ue(m(i.options), (d) => (a(), s("option", {
506
- key: d.value,
507
- value: d.value,
508
- disabled: d.disabled
509
- }, n(d.label), 9, ss))), 128))
510
- ], 40, ts)) : i.type === "radio" ? (a(), s("div", ls, [
511
- (a(!0), s(F, null, ue(m(i.options), (d) => (a(), s("label", {
512
- key: d.value,
504
+ e("option", ps, i(u.placeholder || "Select..."), 1),
505
+ (s(!0), l(V, null, fe(m(u.options), (o) => (s(), l("option", {
506
+ key: o.value,
507
+ value: o.value,
508
+ disabled: o.disabled
509
+ }, i(o.label), 9, _s))), 128))
510
+ ], 40, fs)) : u.type === "radio" ? (s(), l("div", hs, [
511
+ (s(!0), l(V, null, fe(m(u.options), (o) => (s(), l("label", {
512
+ key: o.value,
513
513
  class: "artifactuse-radio-label"
514
514
  }, [
515
515
  e("input", {
516
516
  type: "radio",
517
- name: i.name,
518
- value: d.value,
519
- checked: x.value[i.name] === d.value,
520
- disabled: d.disabled || i.disabled,
517
+ name: u.name,
518
+ value: o.value,
519
+ checked: x.value[u.name] === o.value,
520
+ disabled: o.disabled || u.disabled,
521
521
  class: "artifactuse-radio",
522
- onChange: (L) => k(i.name, d.value)
523
- }, null, 40, is),
524
- e("span", null, n(d.label), 1)
522
+ onChange: (P) => w(u.name, o.value)
523
+ }, null, 40, ms),
524
+ e("span", null, i(o.label), 1)
525
525
  ]))), 128))
526
526
  ])) : v("", !0),
527
- i.helpText ? (a(), s("span", ns, n(i.helpText), 1)) : v("", !0),
528
- D.value[i.name] ? (a(), s("span", os, n(D.value[i.name]), 1)) : v("", !0)
527
+ u.helpText ? (s(), l("span", ys, i(u.helpText), 1)) : v("", !0),
528
+ N.value[u.name] ? (s(), l("span", gs, i(N.value[u.name]), 1)) : v("", !0)
529
529
  ]))
530
530
  ], 64))), 128))
531
531
  ]),
532
- B.value ? v("", !0) : (a(), s("div", rs, [
532
+ S.value ? v("", !0) : (s(), l("div", ks, [
533
533
  e("button", {
534
534
  type: "button",
535
535
  class: "artifactuse-form-btn artifactuse-form-btn-ghost",
536
- onClick: E[0] || (E[0] = (i) => ie({ action: "cancel", label: "Cancel" }))
536
+ onClick: B[0] || (B[0] = (u) => X({ action: "cancel", label: "Cancel" }))
537
537
  }, " Cancel "),
538
538
  e("button", {
539
539
  type: "submit",
540
540
  class: "artifactuse-form-btn artifactuse-form-btn-primary",
541
- disabled: U.value
541
+ disabled: D.value
542
542
  }, [
543
- U.value ? (a(), s("span", us)) : v("", !0),
544
- Y(" " + n(U.value ? "Submitting..." : "Submit"), 1)
545
- ], 8, cs)
543
+ D.value ? (s(), l("span", bs)) : v("", !0),
544
+ G(" " + i(D.value ? "Submitting..." : "Submit"), 1)
545
+ ], 8, ws)
546
546
  ]))
547
547
  ], 32))
548
548
  ], 64))
549
- ], 10, Ca));
549
+ ], 10, za));
550
550
  }
551
- }, vs = ["data-artifactuse-theme"], fs = { class: "artifactuse-social-header" }, ps = ["src", "alt"], _s = { class: "artifactuse-social-author" }, hs = { class: "artifactuse-social-author-name" }, ms = { class: "artifactuse-social-author-meta" }, ys = { class: "artifactuse-social-author-handle" }, gs = { class: "artifactuse-social-timestamp" }, ks = { class: "artifactuse-social-content" }, ws = ["innerHTML"], bs = {
551
+ }, xs = ["data-artifactuse-theme"], $s = { class: "artifactuse-social-header" }, Ms = ["src", "alt"], Ts = { class: "artifactuse-social-author" }, Ls = { class: "artifactuse-social-author-name" }, Ps = { class: "artifactuse-social-author-meta" }, Es = { class: "artifactuse-social-author-handle" }, As = { class: "artifactuse-social-timestamp" }, Hs = { class: "artifactuse-social-content" }, Bs = ["innerHTML"], Ss = {
552
552
  key: 0,
553
553
  class: "artifactuse-social-media"
554
- }, Cs = ["data-count"], xs = ["src", "alt"], $s = {
554
+ }, zs = ["data-count"], Vs = ["src", "alt"], Is = {
555
555
  key: 1,
556
556
  class: "artifactuse-social-link-card"
557
- }, Ms = ["src", "alt"], Ts = { class: "artifactuse-social-link-info" }, Ls = { class: "artifactuse-social-link-domain" }, Ps = { class: "artifactuse-social-link-title" }, Es = {
557
+ }, Fs = ["src", "alt"], Rs = { class: "artifactuse-social-link-info" }, qs = { class: "artifactuse-social-link-domain" }, Os = { class: "artifactuse-social-link-title" }, Us = {
558
558
  key: 0,
559
559
  class: "artifactuse-social-link-description"
560
- }, As = {
560
+ }, Ds = {
561
561
  key: 2,
562
562
  class: "artifactuse-social-poll"
563
- }, Hs = { class: "artifactuse-social-poll-label" }, Bs = { class: "artifactuse-social-poll-label-percent" }, Ss = { class: "artifactuse-social-poll-meta" }, zs = {
563
+ }, js = { class: "artifactuse-social-poll-label" }, Ns = { class: "artifactuse-social-poll-label-percent" }, Ws = { class: "artifactuse-social-poll-meta" }, Js = {
564
564
  key: 3,
565
565
  class: "artifactuse-social-quote"
566
- }, Vs = { class: "artifactuse-social-quote-header" }, Is = ["src"], Fs = { class: "artifactuse-social-quote-author" }, Rs = { class: "artifactuse-social-quote-handle" }, qs = { class: "artifactuse-social-quote-text" }, Os = {
566
+ }, Xs = { class: "artifactuse-social-quote-header" }, Zs = ["src"], Ks = { class: "artifactuse-social-quote-author" }, Ys = { class: "artifactuse-social-quote-handle" }, Gs = { class: "artifactuse-social-quote-text" }, Qs = {
567
567
  key: 0,
568
568
  class: "artifactuse-social-engagement"
569
- }, Us = { class: "artifactuse-social-stat" }, Ds = { class: "artifactuse-social-stat" }, js = { class: "artifactuse-social-stat" }, Ns = { class: "artifactuse-social-stat" }, Ws = { class: "artifactuse-social-header" }, Js = ["src", "alt"], Xs = { class: "artifactuse-social-author-info" }, Zs = { class: "artifactuse-social-author-name" }, Ks = {
569
+ }, el = { class: "artifactuse-social-stat" }, tl = { class: "artifactuse-social-stat" }, al = { class: "artifactuse-social-stat" }, sl = { class: "artifactuse-social-stat" }, ll = { class: "artifactuse-social-header" }, il = ["src", "alt"], nl = { class: "artifactuse-social-author-info" }, ol = { class: "artifactuse-social-author-name" }, rl = {
570
570
  key: 0,
571
571
  class: "artifactuse-social-author-connection"
572
- }, Ys = { class: "artifactuse-social-author-headline" }, Qs = { class: "artifactuse-social-timestamp" }, Gs = { class: "artifactuse-social-content" }, el = ["innerHTML"], tl = {
572
+ }, cl = { class: "artifactuse-social-author-headline" }, ul = { class: "artifactuse-social-timestamp" }, dl = { class: "artifactuse-social-content" }, vl = ["innerHTML"], fl = {
573
573
  key: 0,
574
574
  class: "artifactuse-social-link-card"
575
- }, al = ["src", "alt"], sl = { class: "artifactuse-social-link-info" }, ll = { class: "artifactuse-social-link-title" }, il = { class: "artifactuse-social-link-domain" }, nl = {
575
+ }, pl = ["src", "alt"], _l = { class: "artifactuse-social-link-info" }, hl = { class: "artifactuse-social-link-title" }, ml = { class: "artifactuse-social-link-domain" }, yl = {
576
576
  key: 0,
577
577
  class: "artifactuse-social-engagement"
578
- }, ol = { class: "artifactuse-social-reactions" }, rl = { class: "artifactuse-social-header" }, cl = ["src", "alt"], ul = { class: "artifactuse-social-author-name" }, dl = {
578
+ }, gl = { class: "artifactuse-social-reactions" }, kl = { class: "artifactuse-social-header" }, wl = ["src", "alt"], bl = { class: "artifactuse-social-author-name" }, Cl = {
579
579
  key: 0,
580
580
  class: "artifactuse-social-verified",
581
581
  viewBox: "0 0 24 24",
582
582
  fill: "currentColor"
583
- }, vl = {
583
+ }, xl = {
584
584
  key: 0,
585
585
  class: "artifactuse-social-media"
586
- }, fl = ["src", "alt"], pl = { class: "artifactuse-social-likes" }, _l = { class: "artifactuse-social-caption" }, hl = { class: "artifactuse-social-caption-author" }, ml = ["innerHTML"], yl = { class: "artifactuse-social-timestamp" }, gl = { class: "artifactuse-social-header" }, kl = ["src", "alt"], wl = { class: "artifactuse-social-author-info" }, bl = { class: "artifactuse-social-author-name" }, Cl = { class: "artifactuse-social-timestamp" }, xl = { class: "artifactuse-social-content" }, $l = ["innerHTML"], Ml = {
586
+ }, $l = ["src", "alt"], Ml = { class: "artifactuse-social-likes" }, Tl = { class: "artifactuse-social-caption" }, Ll = { class: "artifactuse-social-caption-author" }, Pl = ["innerHTML"], El = { class: "artifactuse-social-timestamp" }, Al = { class: "artifactuse-social-header" }, Hl = ["src", "alt"], Bl = { class: "artifactuse-social-author-info" }, Sl = { class: "artifactuse-social-author-name" }, zl = { class: "artifactuse-social-timestamp" }, Vl = { class: "artifactuse-social-content" }, Il = ["innerHTML"], Fl = {
587
587
  key: 0,
588
588
  class: "artifactuse-social-link-card"
589
- }, Tl = ["src", "alt"], Ll = { class: "artifactuse-social-link-info" }, Pl = { class: "artifactuse-social-link-domain" }, El = { class: "artifactuse-social-link-title" }, Al = {
589
+ }, Rl = ["src", "alt"], ql = { class: "artifactuse-social-link-info" }, Ol = { class: "artifactuse-social-link-domain" }, Ul = { class: "artifactuse-social-link-title" }, Dl = {
590
590
  key: 0,
591
591
  class: "artifactuse-social-link-description"
592
- }, Hl = {
592
+ }, jl = {
593
593
  key: 0,
594
594
  class: "artifactuse-social-engagement"
595
- }, Bl = { class: "artifactuse-social-reactions" }, Sl = { class: "artifactuse-social-reaction-count" }, zl = { class: "artifactuse-social-comments-shares" }, Vl = { class: "artifactuse-social-header" }, Il = ["src", "alt"], Fl = { class: "artifactuse-social-author-info" }, Rl = { class: "artifactuse-social-author-name" }, ql = {
595
+ }, Nl = { class: "artifactuse-social-reactions" }, Wl = { class: "artifactuse-social-reaction-count" }, Jl = { class: "artifactuse-social-comments-shares" }, Xl = { class: "artifactuse-social-header" }, Zl = ["src", "alt"], Kl = { class: "artifactuse-social-author-info" }, Yl = { class: "artifactuse-social-author-name" }, Gl = {
596
596
  key: 0,
597
597
  class: "artifactuse-social-verified",
598
598
  viewBox: "0 0 24 24",
599
599
  fill: "currentColor"
600
- }, Ol = { class: "artifactuse-social-timestamp" }, Ul = { class: "artifactuse-social-content" }, Dl = ["innerHTML"], jl = {
600
+ }, Ql = { class: "artifactuse-social-timestamp" }, ei = { class: "artifactuse-social-content" }, ti = ["innerHTML"], ai = {
601
601
  key: 0,
602
602
  class: "artifactuse-social-engagement"
603
- }, Nl = { class: "artifactuse-social-stat" }, Wl = { class: "artifactuse-social-stat" }, Jl = { class: "artifactuse-social-stat" }, Xl = { class: "artifactuse-social-thumbnail" }, Zl = ["src", "alt"], Kl = {
603
+ }, si = { class: "artifactuse-social-stat" }, li = { class: "artifactuse-social-stat" }, ii = { class: "artifactuse-social-stat" }, ni = { class: "artifactuse-social-thumbnail" }, oi = ["src", "alt"], ri = {
604
604
  key: 1,
605
605
  class: "artifactuse-social-duration"
606
- }, Yl = { class: "artifactuse-social-info" }, Ql = { class: "artifactuse-social-header" }, Gl = ["src", "alt"], ei = { class: "artifactuse-social-author-name" }, ti = ["innerHTML"], ai = {
606
+ }, ci = { class: "artifactuse-social-info" }, ui = { class: "artifactuse-social-header" }, di = ["src", "alt"], vi = { class: "artifactuse-social-author-name" }, fi = ["innerHTML"], pi = {
607
607
  key: 0,
608
608
  class: "artifactuse-social-sound"
609
- }, si = {
609
+ }, _i = {
610
610
  key: 1,
611
611
  class: "artifactuse-social-engagement"
612
- }, li = { class: "artifactuse-social-thumbnail" }, ii = ["src", "alt"], ni = {
612
+ }, hi = { class: "artifactuse-social-thumbnail" }, mi = ["src", "alt"], yi = {
613
613
  key: 1,
614
614
  class: "artifactuse-social-duration"
615
- }, oi = { class: "artifactuse-social-info" }, ri = ["src", "alt"], ci = { class: "artifactuse-social-title" }, ui = { class: "artifactuse-social-channel" }, di = { class: "artifactuse-social-meta" }, vi = { class: "artifactuse-social-actions-bar" }, fi = { class: "artifactuse-social-platform-badge" }, me = '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>', pi = {
615
+ }, gi = { class: "artifactuse-social-info" }, ki = ["src", "alt"], wi = { class: "artifactuse-social-title" }, bi = { class: "artifactuse-social-channel" }, Ci = { class: "artifactuse-social-meta" }, xi = { class: "artifactuse-social-actions-bar" }, $i = { class: "artifactuse-social-platform-badge" }, ke = '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>', Mi = {
616
616
  __name: "ArtifactuseSocialPreview",
617
617
  props: {
618
618
  artifact: {
@@ -625,37 +625,37 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
625
625
  }
626
626
  },
627
627
  emits: ["copy", "edit"],
628
- setup(P, { emit: c }) {
629
- const p = P, T = c, _ = M(null), r = M("Copy"), q = b(() => {
628
+ setup(L, { emit: d }) {
629
+ const _ = L, T = d, f = M(null), n = M("Copy"), O = k(() => {
630
630
  try {
631
- return JSON.parse(p.artifact.code);
631
+ return JSON.parse(_.artifact.code);
632
632
  } catch {
633
633
  return { platform: "twitter", data: {} };
634
634
  }
635
- }), A = b(() => {
635
+ }), H = k(() => {
636
636
  var m;
637
- return ((m = q.value) == null ? void 0 : m.platform) || "twitter";
637
+ return ((m = O.value) == null ? void 0 : m.platform) || "twitter";
638
638
  });
639
- b(() => {
639
+ k(() => {
640
640
  var m;
641
- return ((m = q.value) == null ? void 0 : m.variant) || "post";
641
+ return ((m = O.value) == null ? void 0 : m.variant) || "post";
642
642
  });
643
- const g = b(() => {
644
- var m, k;
645
- return ((k = (m = q.value) == null ? void 0 : m.data) == null ? void 0 : k.author) || {};
646
- }), o = b(() => {
647
- var m, k;
648
- return ((k = (m = q.value) == null ? void 0 : m.data) == null ? void 0 : k.content) || {};
649
- }), h = b(() => {
650
- var m, k;
651
- return ((k = (m = q.value) == null ? void 0 : m.data) == null ? void 0 : k.engagement) || {};
652
- }), $ = b(() => {
653
- var m, k;
654
- return ((k = (m = q.value) == null ? void 0 : m.data) == null ? void 0 : k.meta) || {};
655
- }), V = b(() => {
643
+ const g = k(() => {
644
+ var m, w;
645
+ return ((w = (m = O.value) == null ? void 0 : m.data) == null ? void 0 : w.author) || {};
646
+ }), r = k(() => {
647
+ var m, w;
648
+ return ((w = (m = O.value) == null ? void 0 : m.data) == null ? void 0 : w.content) || {};
649
+ }), h = k(() => {
650
+ var m, w;
651
+ return ((w = (m = O.value) == null ? void 0 : m.data) == null ? void 0 : w.engagement) || {};
652
+ }), $ = k(() => {
653
+ var m, w;
654
+ return ((w = (m = O.value) == null ? void 0 : m.data) == null ? void 0 : w.meta) || {};
655
+ }), I = k(() => {
656
656
  const m = h.value;
657
657
  return m.likes || m.comments || m.shares || m.retweets || m.replies || m.views;
658
- }), x = b(() => `artifactuse-social-verified-${g.value.verifiedType || "blue"}`), D = b(() => ({
658
+ }), x = k(() => `artifactuse-social-verified-${g.value.verifiedType || "blue"}`), N = k(() => ({
659
659
  twitter: "X",
660
660
  linkedin: "LinkedIn",
661
661
  instagram: "Instagram",
@@ -663,45 +663,45 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
663
663
  threads: "Threads",
664
664
  tiktok: "TikTok",
665
665
  youtube: "YouTube"
666
- })[A.value] || A.value), U = b(() => {
666
+ })[H.value] || H.value), D = k(() => {
667
667
  const m = {
668
- twitter: () => ne("svg", { viewBox: "0 0 24 24", fill: "currentColor" }, [
669
- ne("path", { d: "M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z" })
668
+ twitter: () => re("svg", { viewBox: "0 0 24 24", fill: "currentColor" }, [
669
+ re("path", { d: "M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z" })
670
670
  ]),
671
- linkedin: () => ne("svg", { viewBox: "0 0 24 24", fill: "currentColor" }, [
672
- ne("path", { d: "M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z" })
671
+ linkedin: () => re("svg", { viewBox: "0 0 24 24", fill: "currentColor" }, [
672
+ re("path", { d: "M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z" })
673
673
  ]),
674
- instagram: () => ne("svg", { viewBox: "0 0 24 24", fill: "currentColor" }, [
675
- ne("path", { d: "M12 2.163c3.204 0 3.584.012 4.85.07 3.252.148 4.771 1.691 4.919 4.919.058 1.265.069 1.645.069 4.849 0 3.205-.012 3.584-.069 4.849-.149 3.225-1.664 4.771-4.919 4.919-1.266.058-1.644.07-4.85.07-3.204 0-3.584-.012-4.849-.07-3.26-.149-4.771-1.699-4.919-4.92-.058-1.265-.07-1.644-.07-4.849 0-3.204.013-3.583.07-4.849.149-3.227 1.664-4.771 4.919-4.919 1.266-.057 1.645-.069 4.849-.069zM12 0C8.741 0 8.333.014 7.053.072 2.695.272.273 2.69.073 7.052.014 8.333 0 8.741 0 12c0 3.259.014 3.668.072 4.948.2 4.358 2.618 6.78 6.98 6.98C8.333 23.986 8.741 24 12 24c3.259 0 3.668-.014 4.948-.072 4.354-.2 6.782-2.618 6.979-6.98.059-1.28.073-1.689.073-4.948 0-3.259-.014-3.667-.072-4.947-.196-4.354-2.617-6.78-6.979-6.98C15.668.014 15.259 0 12 0zm0 5.838a6.162 6.162 0 100 12.324 6.162 6.162 0 000-12.324zM12 16a4 4 0 110-8 4 4 0 010 8zm6.406-11.845a1.44 1.44 0 100 2.881 1.44 1.44 0 000-2.881z" })
674
+ instagram: () => re("svg", { viewBox: "0 0 24 24", fill: "currentColor" }, [
675
+ re("path", { d: "M12 2.163c3.204 0 3.584.012 4.85.07 3.252.148 4.771 1.691 4.919 4.919.058 1.265.069 1.645.069 4.849 0 3.205-.012 3.584-.069 4.849-.149 3.225-1.664 4.771-4.919 4.919-1.266.058-1.644.07-4.85.07-3.204 0-3.584-.012-4.849-.07-3.26-.149-4.771-1.699-4.919-4.92-.058-1.265-.07-1.644-.07-4.849 0-3.204.013-3.583.07-4.849.149-3.227 1.664-4.771 4.919-4.919 1.266-.057 1.645-.069 4.849-.069zM12 0C8.741 0 8.333.014 7.053.072 2.695.272.273 2.69.073 7.052.014 8.333 0 8.741 0 12c0 3.259.014 3.668.072 4.948.2 4.358 2.618 6.78 6.98 6.98C8.333 23.986 8.741 24 12 24c3.259 0 3.668-.014 4.948-.072 4.354-.2 6.782-2.618 6.979-6.98.059-1.28.073-1.689.073-4.948 0-3.259-.014-3.667-.072-4.947-.196-4.354-2.617-6.78-6.979-6.98C15.668.014 15.259 0 12 0zm0 5.838a6.162 6.162 0 100 12.324 6.162 6.162 0 000-12.324zM12 16a4 4 0 110-8 4 4 0 010 8zm6.406-11.845a1.44 1.44 0 100 2.881 1.44 1.44 0 000-2.881z" })
676
676
  ]),
677
- facebook: () => ne("svg", { viewBox: "0 0 24 24", fill: "currentColor" }, [
678
- ne("path", { d: "M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z" })
677
+ facebook: () => re("svg", { viewBox: "0 0 24 24", fill: "currentColor" }, [
678
+ re("path", { d: "M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z" })
679
679
  ]),
680
- threads: () => ne("svg", { viewBox: "0 0 24 24", fill: "currentColor" }, [
681
- ne("path", { d: "M12.186 24h-.007c-3.581-.024-6.334-1.205-8.184-3.509C2.35 18.44 1.5 15.586 1.472 12.01v-.017c.03-3.579.879-6.43 2.525-8.482C5.845 1.205 8.6.024 12.18 0h.014c2.746.02 5.043.725 6.826 2.098 1.677 1.29 2.858 3.13 3.509 5.467l-2.04.569c-1.104-3.96-3.898-5.984-8.304-6.015-2.91.022-5.11.936-6.54 2.717C4.307 6.504 3.616 8.914 3.59 12c.025 3.086.718 5.496 2.057 7.164 1.43 1.783 3.631 2.698 6.54 2.717 2.623-.02 4.358-.631 5.8-2.045 1.647-1.613 1.618-3.593 1.09-4.798-.31-.71-.873-1.3-1.634-1.75-.192 1.352-.622 2.446-1.284 3.272-.886 1.102-2.14 1.704-3.73 1.79-1.202.065-2.361-.218-3.259-.801-1.063-.689-1.685-1.74-1.752-2.96-.065-1.182.408-2.256 1.33-3.022.88-.73 2.108-1.152 3.457-1.187 1.357-.035 2.573.283 3.58.89.034-.497.04-1.017.015-1.558-.083-1.792-.648-3.095-1.68-3.876-.99-.75-2.453-1.123-4.35-1.108-.987.008-1.866.09-2.613.246l-.464-2.086c.912-.19 1.965-.29 3.133-.298 2.467-.02 4.42.554 5.807 1.706 1.46 1.213 2.24 3.007 2.354 5.411.039.827.026 1.69-.04 2.576.962.681 1.735 1.542 2.268 2.553.846 1.6 1.026 3.639.508 5.622-.57 2.181-1.782 3.94-3.503 5.079C17.194 23.394 14.88 24 12.186 24zM9.15 13.476c-.927.037-1.628.282-2.085.728-.418.408-.618.945-.578 1.553.04.638.347 1.165.866 1.483.586.36 1.39.521 2.266.45 1.053-.085 1.86-.473 2.4-1.153.457-.576.763-1.39.884-2.356-.893-.41-1.944-.636-3.095-.705h-.009c-.216-.008-.436-.008-.65 0z" })
680
+ threads: () => re("svg", { viewBox: "0 0 24 24", fill: "currentColor" }, [
681
+ re("path", { d: "M12.186 24h-.007c-3.581-.024-6.334-1.205-8.184-3.509C2.35 18.44 1.5 15.586 1.472 12.01v-.017c.03-3.579.879-6.43 2.525-8.482C5.845 1.205 8.6.024 12.18 0h.014c2.746.02 5.043.725 6.826 2.098 1.677 1.29 2.858 3.13 3.509 5.467l-2.04.569c-1.104-3.96-3.898-5.984-8.304-6.015-2.91.022-5.11.936-6.54 2.717C4.307 6.504 3.616 8.914 3.59 12c.025 3.086.718 5.496 2.057 7.164 1.43 1.783 3.631 2.698 6.54 2.717 2.623-.02 4.358-.631 5.8-2.045 1.647-1.613 1.618-3.593 1.09-4.798-.31-.71-.873-1.3-1.634-1.75-.192 1.352-.622 2.446-1.284 3.272-.886 1.102-2.14 1.704-3.73 1.79-1.202.065-2.361-.218-3.259-.801-1.063-.689-1.685-1.74-1.752-2.96-.065-1.182.408-2.256 1.33-3.022.88-.73 2.108-1.152 3.457-1.187 1.357-.035 2.573.283 3.58.89.034-.497.04-1.017.015-1.558-.083-1.792-.648-3.095-1.68-3.876-.99-.75-2.453-1.123-4.35-1.108-.987.008-1.866.09-2.613.246l-.464-2.086c.912-.19 1.965-.29 3.133-.298 2.467-.02 4.42.554 5.807 1.706 1.46 1.213 2.24 3.007 2.354 5.411.039.827.026 1.69-.04 2.576.962.681 1.735 1.542 2.268 2.553.846 1.6 1.026 3.639.508 5.622-.57 2.181-1.782 3.94-3.503 5.079C17.194 23.394 14.88 24 12.186 24zM9.15 13.476c-.927.037-1.628.282-2.085.728-.418.408-.618.945-.578 1.553.04.638.347 1.165.866 1.483.586.36 1.39.521 2.266.45 1.053-.085 1.86-.473 2.4-1.153.457-.576.763-1.39.884-2.356-.893-.41-1.944-.636-3.095-.705h-.009c-.216-.008-.436-.008-.65 0z" })
682
682
  ]),
683
- tiktok: () => ne("svg", { viewBox: "0 0 24 24", fill: "currentColor" }, [
684
- ne("path", { d: "M12.525.02c1.31-.02 2.61-.01 3.91-.02.08 1.53.63 3.09 1.75 4.17 1.12 1.11 2.7 1.62 4.24 1.79v4.03c-1.44-.05-2.89-.35-4.2-.97-.57-.26-1.1-.59-1.62-.93-.01 2.92.01 5.84-.02 8.75-.08 1.4-.54 2.79-1.35 3.94-1.31 1.92-3.58 3.17-5.91 3.21-1.43.08-2.86-.31-4.08-1.03-2.02-1.19-3.44-3.37-3.65-5.71-.02-.5-.03-1-.01-1.49.18-1.9 1.12-3.72 2.58-4.96 1.66-1.44 3.98-2.13 6.15-1.72.02 1.48-.04 2.96-.04 4.44-.99-.32-2.15-.23-3.02.37-.63.41-1.11 1.04-1.36 1.75-.21.51-.15 1.07-.14 1.61.24 1.64 1.82 3.02 3.5 2.87 1.12-.01 2.19-.66 2.77-1.61.19-.33.4-.67.41-1.06.1-1.79.06-3.57.07-5.36.01-4.03-.01-8.05.02-12.07z" })
683
+ tiktok: () => re("svg", { viewBox: "0 0 24 24", fill: "currentColor" }, [
684
+ re("path", { d: "M12.525.02c1.31-.02 2.61-.01 3.91-.02.08 1.53.63 3.09 1.75 4.17 1.12 1.11 2.7 1.62 4.24 1.79v4.03c-1.44-.05-2.89-.35-4.2-.97-.57-.26-1.1-.59-1.62-.93-.01 2.92.01 5.84-.02 8.75-.08 1.4-.54 2.79-1.35 3.94-1.31 1.92-3.58 3.17-5.91 3.21-1.43.08-2.86-.31-4.08-1.03-2.02-1.19-3.44-3.37-3.65-5.71-.02-.5-.03-1-.01-1.49.18-1.9 1.12-3.72 2.58-4.96 1.66-1.44 3.98-2.13 6.15-1.72.02 1.48-.04 2.96-.04 4.44-.99-.32-2.15-.23-3.02.37-.63.41-1.11 1.04-1.36 1.75-.21.51-.15 1.07-.14 1.61.24 1.64 1.82 3.02 3.5 2.87 1.12-.01 2.19-.66 2.77-1.61.19-.33.4-.67.41-1.06.1-1.79.06-3.57.07-5.36.01-4.03-.01-8.05.02-12.07z" })
685
685
  ]),
686
- youtube: () => ne("svg", { viewBox: "0 0 24 24", fill: "currentColor" }, [
687
- ne("path", { d: "M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z" })
686
+ youtube: () => re("svg", { viewBox: "0 0 24 24", fill: "currentColor" }, [
687
+ re("path", { d: "M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z" })
688
688
  ])
689
689
  };
690
- return m[A.value] || m.twitter;
691
- }), N = b(() => {
692
- let m = o.value.text || "";
690
+ return m[H.value] || m.twitter;
691
+ }), J = k(() => {
692
+ let m = r.value.text || "";
693
693
  return m = m.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;"), m = m.replace(/#(\w+)/g, '<span class="artifactuse-social-hashtag">#$1</span>'), m = m.replace(/@(\w+)/g, '<span class="artifactuse-social-mention">@$1</span>'), m = m.replace(
694
694
  /(https?:\/\/[^\s]+)/g,
695
695
  '<a href="$1" target="_blank" rel="noopener">$1</a>'
696
696
  ), m;
697
- }), ee = b(() => {
697
+ }), ee = k(() => {
698
698
  const m = h.value.reactions || {};
699
- return Object.values(m).reduce((k, ae) => k + (ae || 0), 0) || h.value.likes || 0;
699
+ return Object.values(m).reduce((w, ie) => w + (ie || 0), 0) || h.value.likes || 0;
700
700
  });
701
- function B(m) {
701
+ function S(m) {
702
702
  return m ? m >= 1e6 ? `${(m / 1e6).toFixed(1)}M` : m >= 1e3 ? `${(m / 1e3).toFixed(1)}K` : m.toString() : "0";
703
703
  }
704
- function re(m) {
704
+ function ce(m) {
705
705
  try {
706
706
  return new URL(m).hostname.replace("www.", "");
707
707
  } catch {
@@ -709,82 +709,82 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
709
709
  }
710
710
  }
711
711
  function K(m) {
712
- m.target.src = me;
712
+ m.target.src = ke;
713
713
  }
714
714
  function Z(m) {
715
715
  m.target.style.display = "none";
716
716
  }
717
- function de() {
718
- const m = o.value.text || "";
717
+ function pe() {
718
+ const m = r.value.text || "";
719
719
  navigator.clipboard.writeText(m).then(() => {
720
- r.value = "Copied!", setTimeout(() => {
721
- r.value = "Copy";
722
- }, 2e3), T("copy", { platform: A.value, text: m });
720
+ n.value = "Copied!", setTimeout(() => {
721
+ n.value = "Copy";
722
+ }, 2e3), T("copy", { platform: H.value, text: m });
723
723
  });
724
724
  }
725
- return (m, k) => {
726
- var ae, Q, W, ie, w, E;
727
- return a(), s("div", {
725
+ return (m, w) => {
726
+ var ie, oe, W, X, b, B;
727
+ return s(), l("div", {
728
728
  ref_key: "containerRef",
729
- ref: _,
730
- class: I(["artifactuse-social", [`artifactuse-social-${A.value}`]]),
731
- "data-artifactuse-theme": P.theme
729
+ ref: f,
730
+ class: R(["artifactuse-social", [`artifactuse-social-${H.value}`]]),
731
+ "data-artifactuse-theme": L.theme
732
732
  }, [
733
- A.value === "twitter" ? (a(), s(F, { key: 0 }, [
734
- e("div", fs, [
733
+ H.value === "twitter" ? (s(), l(V, { key: 0 }, [
734
+ e("div", $s, [
735
735
  e("img", {
736
- src: g.value.avatar || me,
736
+ src: g.value.avatar || ke,
737
737
  alt: g.value.name,
738
738
  class: "artifactuse-social-avatar",
739
739
  onError: K
740
- }, null, 40, ps),
741
- e("div", _s, [
742
- e("div", hs, [
743
- e("span", null, n(g.value.name), 1),
744
- g.value.verified ? (a(), s("svg", {
740
+ }, null, 40, Ms),
741
+ e("div", Ts, [
742
+ e("div", Ls, [
743
+ e("span", null, i(g.value.name), 1),
744
+ g.value.verified ? (s(), l("svg", {
745
745
  key: 0,
746
- class: I(["artifactuse-social-verified", x.value]),
746
+ class: R(["artifactuse-social-verified", x.value]),
747
747
  viewBox: "0 0 24 24",
748
748
  fill: "currentColor"
749
- }, [...k[0] || (k[0] = [
749
+ }, [...w[0] || (w[0] = [
750
750
  e("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" }, null, -1)
751
751
  ])], 2)) : v("", !0)
752
752
  ]),
753
- e("div", ms, [
754
- e("span", ys, n(g.value.handle), 1),
755
- e("span", gs, "· " + n($.value.timestamp || "Just now"), 1)
753
+ e("div", Ps, [
754
+ e("span", Es, i(g.value.handle), 1),
755
+ e("span", As, "· " + i($.value.timestamp || "Just now"), 1)
756
756
  ])
757
757
  ])
758
758
  ]),
759
- e("div", ks, [
759
+ e("div", Hs, [
760
760
  e("p", {
761
761
  class: "artifactuse-social-text",
762
- innerHTML: N.value
763
- }, null, 8, ws),
764
- (ae = o.value.media) != null && ae.length ? (a(), s("div", bs, [
762
+ innerHTML: J.value
763
+ }, null, 8, Bs),
764
+ (ie = r.value.media) != null && ie.length ? (s(), l("div", Ss, [
765
765
  e("div", {
766
- class: I(["artifactuse-social-media-grid", { "artifactuse-social-media-single": o.value.media.length === 1 }]),
767
- "data-count": o.value.media.length
766
+ class: R(["artifactuse-social-media-grid", { "artifactuse-social-media-single": r.value.media.length === 1 }]),
767
+ "data-count": r.value.media.length
768
768
  }, [
769
- (a(!0), s(F, null, ue(o.value.media.slice(0, 4), (i, H) => (a(), s("img", {
770
- key: H,
771
- src: i.url,
772
- alt: i.alt || "",
769
+ (s(!0), l(V, null, fe(r.value.media.slice(0, 4), (u, z) => (s(), l("img", {
770
+ key: z,
771
+ src: u.url,
772
+ alt: u.alt || "",
773
773
  onError: Z
774
- }, null, 40, xs))), 128))
775
- ], 10, Cs)
774
+ }, null, 40, Vs))), 128))
775
+ ], 10, zs)
776
776
  ])) : v("", !0),
777
- o.value.link && !((Q = o.value.media) != null && Q.length) ? (a(), s("div", $s, [
778
- o.value.link.image ? (a(), s("img", {
777
+ r.value.link && !((oe = r.value.media) != null && oe.length) ? (s(), l("div", Is, [
778
+ r.value.link.image ? (s(), l("img", {
779
779
  key: 0,
780
- src: o.value.link.image,
781
- alt: o.value.link.title,
780
+ src: r.value.link.image,
781
+ alt: r.value.link.title,
782
782
  class: "artifactuse-social-link-image",
783
783
  onError: Z
784
- }, null, 40, Ms)) : v("", !0),
785
- e("div", Ts, [
786
- e("div", Ls, [
787
- k[1] || (k[1] = e("svg", {
784
+ }, null, 40, Fs)) : v("", !0),
785
+ e("div", Rs, [
786
+ e("div", qs, [
787
+ w[1] || (w[1] = e("svg", {
788
788
  fill: "none",
789
789
  viewBox: "0 0 24 24",
790
790
  stroke: "currentColor"
@@ -796,46 +796,46 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
796
796
  d: "M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"
797
797
  })
798
798
  ], -1)),
799
- Y(" " + n(o.value.link.domain || re(o.value.link.url)), 1)
799
+ G(" " + i(r.value.link.domain || ce(r.value.link.url)), 1)
800
800
  ]),
801
- e("div", Ps, n(o.value.link.title), 1),
802
- o.value.link.description ? (a(), s("div", Es, n(o.value.link.description), 1)) : v("", !0)
801
+ e("div", Os, i(r.value.link.title), 1),
802
+ r.value.link.description ? (s(), l("div", Us, i(r.value.link.description), 1)) : v("", !0)
803
803
  ])
804
804
  ])) : v("", !0),
805
- o.value.poll ? (a(), s("div", As, [
806
- (a(!0), s(F, null, ue(o.value.poll.options, (i, H) => {
807
- var d, L;
808
- return a(), s("div", {
809
- key: H,
805
+ r.value.poll ? (s(), l("div", Ds, [
806
+ (s(!0), l(V, null, fe(r.value.poll.options, (u, z) => {
807
+ var o, P;
808
+ return s(), l("div", {
809
+ key: z,
810
810
  class: "artifactuse-social-poll-option"
811
811
  }, [
812
812
  e("div", {
813
813
  class: "artifactuse-social-poll-bar",
814
- style: Se({ width: `${((d = o.value.poll.votes) == null ? void 0 : d[H]) || 0}%` })
814
+ style: Le({ width: `${((o = r.value.poll.votes) == null ? void 0 : o[z]) || 0}%` })
815
815
  }, null, 4),
816
- e("div", Hs, [
817
- e("span", null, n(i), 1),
818
- e("span", Bs, n(((L = o.value.poll.votes) == null ? void 0 : L[H]) || 0) + "%", 1)
816
+ e("div", js, [
817
+ e("span", null, i(u), 1),
818
+ e("span", Ns, i(((P = r.value.poll.votes) == null ? void 0 : P[z]) || 0) + "%", 1)
819
819
  ])
820
820
  ]);
821
821
  }), 128)),
822
- e("div", Ss, n(B(o.value.poll.totalVotes || 0)) + " votes · " + n(o.value.poll.duration || "Poll ended"), 1)
822
+ e("div", Ws, i(S(r.value.poll.totalVotes || 0)) + " votes · " + i(r.value.poll.duration || "Poll ended"), 1)
823
823
  ])) : v("", !0),
824
- o.value.quote ? (a(), s("div", zs, [
825
- e("div", Vs, [
824
+ r.value.quote ? (s(), l("div", Js, [
825
+ e("div", Xs, [
826
826
  e("img", {
827
- src: ((W = o.value.quote.author) == null ? void 0 : W.avatar) || me,
827
+ src: ((W = r.value.quote.author) == null ? void 0 : W.avatar) || ke,
828
828
  class: "artifactuse-social-quote-avatar"
829
- }, null, 8, Is),
830
- e("span", Fs, n((ie = o.value.quote.author) == null ? void 0 : ie.name), 1),
831
- e("span", Rs, n((w = o.value.quote.author) == null ? void 0 : w.handle), 1)
829
+ }, null, 8, Zs),
830
+ e("span", Ks, i((X = r.value.quote.author) == null ? void 0 : X.name), 1),
831
+ e("span", Ys, i((b = r.value.quote.author) == null ? void 0 : b.handle), 1)
832
832
  ]),
833
- e("p", qs, n(o.value.quote.text), 1)
833
+ e("p", Gs, i(r.value.quote.text), 1)
834
834
  ])) : v("", !0)
835
835
  ]),
836
- V.value ? (a(), s("div", Os, [
837
- e("div", Us, [
838
- k[2] || (k[2] = e("svg", {
836
+ I.value ? (s(), l("div", Qs, [
837
+ e("div", el, [
838
+ w[2] || (w[2] = e("svg", {
839
839
  viewBox: "0 0 24 24",
840
840
  fill: "none",
841
841
  stroke: "currentColor",
@@ -843,10 +843,10 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
843
843
  }, [
844
844
  e("path", { d: "M12 21C6.5 21 2 16.5 2 11V3l7 3 3-3 3 3 7-3v8c0 5.5-4.5 10-10 10z" })
845
845
  ], -1)),
846
- e("span", null, n(B(h.value.replies || 0)), 1)
846
+ e("span", null, i(S(h.value.replies || 0)), 1)
847
847
  ]),
848
- e("div", Ds, [
849
- k[3] || (k[3] = e("svg", {
848
+ e("div", tl, [
849
+ w[3] || (w[3] = e("svg", {
850
850
  viewBox: "0 0 24 24",
851
851
  fill: "none",
852
852
  stroke: "currentColor",
@@ -854,10 +854,10 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
854
854
  }, [
855
855
  e("path", { d: "M7 17L17 7M17 7H8M17 7V16" })
856
856
  ], -1)),
857
- e("span", null, n(B(h.value.retweets || 0)), 1)
857
+ e("span", null, i(S(h.value.retweets || 0)), 1)
858
858
  ]),
859
- e("div", js, [
860
- k[4] || (k[4] = e("svg", {
859
+ e("div", al, [
860
+ w[4] || (w[4] = e("svg", {
861
861
  viewBox: "0 0 24 24",
862
862
  fill: "none",
863
863
  stroke: "currentColor",
@@ -865,10 +865,10 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
865
865
  }, [
866
866
  e("path", { d: "M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z" })
867
867
  ], -1)),
868
- e("span", null, n(B(h.value.likes || 0)), 1)
868
+ e("span", null, i(S(h.value.likes || 0)), 1)
869
869
  ]),
870
- e("div", Ns, [
871
- k[5] || (k[5] = e("svg", {
870
+ e("div", sl, [
871
+ w[5] || (w[5] = e("svg", {
872
872
  viewBox: "0 0 24 24",
873
873
  fill: "none",
874
874
  stroke: "currentColor",
@@ -876,26 +876,26 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
876
876
  }, [
877
877
  e("path", { d: "M15 3h4a2 2 0 012 2v14a2 2 0 01-2 2h-4M10 17l5-5-5-5M13.8 12H3" })
878
878
  ], -1)),
879
- e("span", null, n(B(h.value.views || 0)), 1)
879
+ e("span", null, i(S(h.value.views || 0)), 1)
880
880
  ])
881
881
  ])) : v("", !0)
882
- ], 64)) : A.value === "linkedin" ? (a(), s(F, { key: 1 }, [
883
- e("div", Ws, [
882
+ ], 64)) : H.value === "linkedin" ? (s(), l(V, { key: 1 }, [
883
+ e("div", ll, [
884
884
  e("img", {
885
- src: g.value.avatar || me,
885
+ src: g.value.avatar || ke,
886
886
  alt: g.value.name,
887
887
  class: "artifactuse-social-avatar",
888
888
  onError: K
889
- }, null, 40, Js),
890
- e("div", Xs, [
891
- e("div", Zs, [
892
- Y(n(g.value.name) + " ", 1),
893
- g.value.connection ? (a(), s("span", Ks, "· " + n(g.value.connection), 1)) : v("", !0)
889
+ }, null, 40, il),
890
+ e("div", nl, [
891
+ e("div", ol, [
892
+ G(i(g.value.name) + " ", 1),
893
+ g.value.connection ? (s(), l("span", rl, "· " + i(g.value.connection), 1)) : v("", !0)
894
894
  ]),
895
- e("div", Ys, n(g.value.headline), 1),
896
- e("div", Qs, [
897
- Y(n($.value.timestamp || "Just now") + " · ", 1),
898
- k[6] || (k[6] = e("svg", {
895
+ e("div", cl, i(g.value.headline), 1),
896
+ e("div", ul, [
897
+ G(i($.value.timestamp || "Just now") + " · ", 1),
898
+ w[6] || (w[6] = e("svg", {
899
899
  viewBox: "0 0 24 24",
900
900
  fill: "currentColor"
901
901
  }, [
@@ -904,81 +904,81 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
904
904
  ])
905
905
  ])
906
906
  ]),
907
- e("div", Gs, [
907
+ e("div", dl, [
908
908
  e("p", {
909
909
  class: "artifactuse-social-text",
910
- innerHTML: N.value
911
- }, null, 8, el),
912
- o.value.link ? (a(), s("div", tl, [
913
- o.value.link.image ? (a(), s("img", {
910
+ innerHTML: J.value
911
+ }, null, 8, vl),
912
+ r.value.link ? (s(), l("div", fl, [
913
+ r.value.link.image ? (s(), l("img", {
914
914
  key: 0,
915
- src: o.value.link.image,
916
- alt: o.value.link.title,
915
+ src: r.value.link.image,
916
+ alt: r.value.link.title,
917
917
  class: "artifactuse-social-link-image",
918
918
  onError: Z
919
- }, null, 40, al)) : v("", !0),
920
- e("div", sl, [
921
- e("div", ll, n(o.value.link.title), 1),
922
- e("div", il, n(o.value.link.domain || re(o.value.link.url)), 1)
919
+ }, null, 40, pl)) : v("", !0),
920
+ e("div", _l, [
921
+ e("div", hl, i(r.value.link.title), 1),
922
+ e("div", ml, i(r.value.link.domain || ce(r.value.link.url)), 1)
923
923
  ])
924
924
  ])) : v("", !0)
925
925
  ]),
926
- V.value ? (a(), s("div", nl, [
927
- e("div", ol, [
928
- k[7] || (k[7] = e("div", { class: "artifactuse-social-reaction-icons" }, [
926
+ I.value ? (s(), l("div", yl, [
927
+ e("div", gl, [
928
+ w[7] || (w[7] = e("div", { class: "artifactuse-social-reaction-icons" }, [
929
929
  e("span", { class: "artifactuse-social-reaction-icon" }, "👍"),
930
930
  e("span", { class: "artifactuse-social-reaction-icon" }, "❤️"),
931
931
  e("span", { class: "artifactuse-social-reaction-icon" }, "👏")
932
932
  ], -1)),
933
- e("span", null, n(B(h.value.likes || 0)), 1)
933
+ e("span", null, i(S(h.value.likes || 0)), 1)
934
934
  ]),
935
- e("span", null, n(B(h.value.comments || 0)) + " comments · " + n(B(h.value.shares || 0)) + " shares", 1)
935
+ e("span", null, i(S(h.value.comments || 0)) + " comments · " + i(S(h.value.shares || 0)) + " shares", 1)
936
936
  ])) : v("", !0)
937
- ], 64)) : A.value === "instagram" ? (a(), s(F, { key: 2 }, [
938
- e("div", rl, [
937
+ ], 64)) : H.value === "instagram" ? (s(), l(V, { key: 2 }, [
938
+ e("div", kl, [
939
939
  e("img", {
940
- src: g.value.avatar || me,
940
+ src: g.value.avatar || ke,
941
941
  alt: g.value.name,
942
942
  class: "artifactuse-social-avatar",
943
943
  onError: K
944
- }, null, 40, cl),
945
- e("div", ul, [
946
- Y(n(g.value.name) + " ", 1),
947
- g.value.verified ? (a(), s("svg", dl, [...k[8] || (k[8] = [
944
+ }, null, 40, wl),
945
+ e("div", bl, [
946
+ G(i(g.value.name) + " ", 1),
947
+ g.value.verified ? (s(), l("svg", Cl, [...w[8] || (w[8] = [
948
948
  e("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" }, null, -1)
949
949
  ])])) : v("", !0)
950
950
  ])
951
951
  ]),
952
- (E = o.value.media) != null && E.length ? (a(), s("div", vl, [
952
+ (B = r.value.media) != null && B.length ? (s(), l("div", xl, [
953
953
  e("img", {
954
- src: o.value.media[0].url,
955
- alt: o.value.media[0].alt || "",
954
+ src: r.value.media[0].url,
955
+ alt: r.value.media[0].alt || "",
956
956
  onError: Z
957
- }, null, 40, fl)
957
+ }, null, 40, $l)
958
958
  ])) : v("", !0),
959
- k[9] || (k[9] = ea('<div class="artifactuse-social-actions"><div class="artifactuse-social-action"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z"></path></svg></div><div class="artifactuse-social-action"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M21 11.5a8.38 8.38 0 01-.9 3.8 8.5 8.5 0 01-7.6 4.7 8.38 8.38 0 01-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 01-.9-3.8 8.5 8.5 0 014.7-7.6 8.38 8.38 0 013.8-.9h.5a8.48 8.48 0 018 8v.5z"></path></svg></div><div class="artifactuse-social-action"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M22 2L11 13M22 2l-7 20-4-9-9-4 20-7z"></path></svg></div></div>', 1)),
960
- e("div", pl, n(B(h.value.likes || 0)) + " likes", 1),
961
- e("div", _l, [
962
- e("span", hl, n(g.value.name), 1),
959
+ w[9] || (w[9] = ua('<div class="artifactuse-social-actions"><div class="artifactuse-social-action"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z"></path></svg></div><div class="artifactuse-social-action"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M21 11.5a8.38 8.38 0 01-.9 3.8 8.5 8.5 0 01-7.6 4.7 8.38 8.38 0 01-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 01-.9-3.8 8.5 8.5 0 014.7-7.6 8.38 8.38 0 013.8-.9h.5a8.48 8.48 0 018 8v.5z"></path></svg></div><div class="artifactuse-social-action"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M22 2L11 13M22 2l-7 20-4-9-9-4 20-7z"></path></svg></div></div>', 1)),
960
+ e("div", Ml, i(S(h.value.likes || 0)) + " likes", 1),
961
+ e("div", Tl, [
962
+ e("span", Ll, i(g.value.name), 1),
963
963
  e("span", {
964
964
  class: "artifactuse-social-caption-text",
965
- innerHTML: N.value
966
- }, null, 8, ml)
965
+ innerHTML: J.value
966
+ }, null, 8, Pl)
967
967
  ]),
968
- e("div", yl, n($.value.timestamp || "Just now"), 1)
969
- ], 64)) : A.value === "facebook" ? (a(), s(F, { key: 3 }, [
970
- e("div", gl, [
968
+ e("div", El, i($.value.timestamp || "Just now"), 1)
969
+ ], 64)) : H.value === "facebook" ? (s(), l(V, { key: 3 }, [
970
+ e("div", Al, [
971
971
  e("img", {
972
- src: g.value.avatar || me,
972
+ src: g.value.avatar || ke,
973
973
  alt: g.value.name,
974
974
  class: "artifactuse-social-avatar",
975
975
  onError: K
976
- }, null, 40, kl),
977
- e("div", wl, [
978
- e("div", bl, n(g.value.name), 1),
979
- e("div", Cl, [
980
- Y(n($.value.timestamp || "Just now") + " · ", 1),
981
- k[10] || (k[10] = e("svg", {
976
+ }, null, 40, Hl),
977
+ e("div", Bl, [
978
+ e("div", Sl, i(g.value.name), 1),
979
+ e("div", zl, [
980
+ G(i($.value.timestamp || "Just now") + " · ", 1),
981
+ w[10] || (w[10] = e("svg", {
982
982
  viewBox: "0 0 24 24",
983
983
  fill: "currentColor"
984
984
  }, [
@@ -987,64 +987,64 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
987
987
  ])
988
988
  ])
989
989
  ]),
990
- e("div", xl, [
990
+ e("div", Vl, [
991
991
  e("p", {
992
992
  class: "artifactuse-social-text",
993
- innerHTML: N.value
994
- }, null, 8, $l),
995
- o.value.link ? (a(), s("div", Ml, [
996
- o.value.link.image ? (a(), s("img", {
993
+ innerHTML: J.value
994
+ }, null, 8, Il),
995
+ r.value.link ? (s(), l("div", Fl, [
996
+ r.value.link.image ? (s(), l("img", {
997
997
  key: 0,
998
- src: o.value.link.image,
999
- alt: o.value.link.title,
998
+ src: r.value.link.image,
999
+ alt: r.value.link.title,
1000
1000
  class: "artifactuse-social-link-image",
1001
1001
  onError: Z
1002
- }, null, 40, Tl)) : v("", !0),
1003
- e("div", Ll, [
1004
- e("div", Pl, n(o.value.link.domain || re(o.value.link.url)), 1),
1005
- e("div", El, n(o.value.link.title), 1),
1006
- o.value.link.description ? (a(), s("div", Al, n(o.value.link.description), 1)) : v("", !0)
1002
+ }, null, 40, Rl)) : v("", !0),
1003
+ e("div", ql, [
1004
+ e("div", Ol, i(r.value.link.domain || ce(r.value.link.url)), 1),
1005
+ e("div", Ul, i(r.value.link.title), 1),
1006
+ r.value.link.description ? (s(), l("div", Dl, i(r.value.link.description), 1)) : v("", !0)
1007
1007
  ])
1008
1008
  ])) : v("", !0)
1009
1009
  ]),
1010
- V.value ? (a(), s("div", Hl, [
1011
- e("div", Bl, [
1012
- k[11] || (k[11] = e("div", { class: "artifactuse-social-reaction-emojis" }, [
1010
+ I.value ? (s(), l("div", jl, [
1011
+ e("div", Nl, [
1012
+ w[11] || (w[11] = e("div", { class: "artifactuse-social-reaction-emojis" }, [
1013
1013
  e("span", { class: "artifactuse-social-reaction-emoji" }, "👍"),
1014
1014
  e("span", { class: "artifactuse-social-reaction-emoji" }, "❤️"),
1015
1015
  e("span", { class: "artifactuse-social-reaction-emoji" }, "😂")
1016
1016
  ], -1)),
1017
- e("span", Sl, n(B(ee.value)), 1)
1017
+ e("span", Wl, i(S(ee.value)), 1)
1018
1018
  ]),
1019
- e("span", zl, n(B(h.value.comments || 0)) + " comments · " + n(B(h.value.shares || 0)) + " shares", 1)
1019
+ e("span", Jl, i(S(h.value.comments || 0)) + " comments · " + i(S(h.value.shares || 0)) + " shares", 1)
1020
1020
  ])) : v("", !0)
1021
- ], 64)) : A.value === "threads" ? (a(), s(F, { key: 4 }, [
1022
- e("div", Vl, [
1021
+ ], 64)) : H.value === "threads" ? (s(), l(V, { key: 4 }, [
1022
+ e("div", Xl, [
1023
1023
  e("img", {
1024
- src: g.value.avatar || me,
1024
+ src: g.value.avatar || ke,
1025
1025
  alt: g.value.name,
1026
1026
  class: "artifactuse-social-avatar",
1027
1027
  onError: K
1028
- }, null, 40, Il),
1029
- e("div", Fl, [
1030
- e("div", Rl, [
1031
- Y(n(g.value.name) + " ", 1),
1032
- g.value.verified ? (a(), s("svg", ql, [...k[12] || (k[12] = [
1028
+ }, null, 40, Zl),
1029
+ e("div", Kl, [
1030
+ e("div", Yl, [
1031
+ G(i(g.value.name) + " ", 1),
1032
+ g.value.verified ? (s(), l("svg", Gl, [...w[12] || (w[12] = [
1033
1033
  e("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" }, null, -1)
1034
1034
  ])])) : v("", !0)
1035
1035
  ]),
1036
- e("span", Ol, n($.value.timestamp || "Just now"), 1)
1036
+ e("span", Ql, i($.value.timestamp || "Just now"), 1)
1037
1037
  ])
1038
1038
  ]),
1039
- e("div", Ul, [
1039
+ e("div", ei, [
1040
1040
  e("p", {
1041
1041
  class: "artifactuse-social-text",
1042
- innerHTML: N.value
1043
- }, null, 8, Dl)
1042
+ innerHTML: J.value
1043
+ }, null, 8, ti)
1044
1044
  ]),
1045
- V.value ? (a(), s("div", jl, [
1046
- e("div", Nl, [
1047
- k[13] || (k[13] = e("svg", {
1045
+ I.value ? (s(), l("div", ai, [
1046
+ e("div", si, [
1047
+ w[13] || (w[13] = e("svg", {
1048
1048
  viewBox: "0 0 24 24",
1049
1049
  fill: "none",
1050
1050
  stroke: "currentColor",
@@ -1052,10 +1052,10 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
1052
1052
  }, [
1053
1053
  e("path", { d: "M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z" })
1054
1054
  ], -1)),
1055
- e("span", null, n(B(h.value.likes || 0)), 1)
1055
+ e("span", null, i(S(h.value.likes || 0)), 1)
1056
1056
  ]),
1057
- e("div", Wl, [
1058
- k[14] || (k[14] = e("svg", {
1057
+ e("div", li, [
1058
+ w[14] || (w[14] = e("svg", {
1059
1059
  viewBox: "0 0 24 24",
1060
1060
  fill: "none",
1061
1061
  stroke: "currentColor",
@@ -1063,10 +1063,10 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
1063
1063
  }, [
1064
1064
  e("path", { d: "M21 11.5a8.38 8.38 0 01-.9 3.8 8.5 8.5 0 01-7.6 4.7 8.38 8.38 0 01-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 01-.9-3.8 8.5 8.5 0 014.7-7.6 8.38 8.38 0 013.8-.9h.5a8.48 8.48 0 018 8v.5z" })
1065
1065
  ], -1)),
1066
- e("span", null, n(B(h.value.comments || 0)), 1)
1066
+ e("span", null, i(S(h.value.comments || 0)), 1)
1067
1067
  ]),
1068
- e("div", Jl, [
1069
- k[15] || (k[15] = e("svg", {
1068
+ e("div", ii, [
1069
+ w[15] || (w[15] = e("svg", {
1070
1070
  viewBox: "0 0 24 24",
1071
1071
  fill: "none",
1072
1072
  stroke: "currentColor",
@@ -1074,18 +1074,18 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
1074
1074
  }, [
1075
1075
  e("path", { d: "M7 17L17 7M17 7H8M17 7V16" })
1076
1076
  ], -1)),
1077
- e("span", null, n(B(h.value.shares || 0)), 1)
1077
+ e("span", null, i(S(h.value.shares || 0)), 1)
1078
1078
  ])
1079
1079
  ])) : v("", !0)
1080
- ], 64)) : A.value === "tiktok" ? (a(), s(F, { key: 5 }, [
1081
- e("div", Xl, [
1082
- o.value.thumbnail ? (a(), s("img", {
1080
+ ], 64)) : H.value === "tiktok" ? (s(), l(V, { key: 5 }, [
1081
+ e("div", ni, [
1082
+ r.value.thumbnail ? (s(), l("img", {
1083
1083
  key: 0,
1084
- src: o.value.thumbnail,
1085
- alt: o.value.text,
1084
+ src: r.value.thumbnail,
1085
+ alt: r.value.text,
1086
1086
  onError: Z
1087
- }, null, 40, Zl)) : v("", !0),
1088
- k[16] || (k[16] = e("div", { class: "artifactuse-social-play-button" }, [
1087
+ }, null, 40, oi)) : v("", !0),
1088
+ w[16] || (w[16] = e("div", { class: "artifactuse-social-play-button" }, [
1089
1089
  e("div", { class: "artifactuse-social-play-icon" }, [
1090
1090
  e("svg", {
1091
1091
  viewBox: "0 0 24 24",
@@ -1095,71 +1095,71 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
1095
1095
  ])
1096
1096
  ])
1097
1097
  ], -1)),
1098
- o.value.duration ? (a(), s("div", Kl, n(o.value.duration), 1)) : v("", !0)
1098
+ r.value.duration ? (s(), l("div", ri, i(r.value.duration), 1)) : v("", !0)
1099
1099
  ]),
1100
- e("div", Yl, [
1101
- e("div", Ql, [
1100
+ e("div", ci, [
1101
+ e("div", ui, [
1102
1102
  e("img", {
1103
- src: g.value.avatar || me,
1103
+ src: g.value.avatar || ke,
1104
1104
  alt: g.value.name,
1105
1105
  class: "artifactuse-social-avatar",
1106
1106
  onError: K
1107
- }, null, 40, Gl),
1108
- e("span", ei, n(g.value.name), 1)
1107
+ }, null, 40, di),
1108
+ e("span", vi, i(g.value.name), 1)
1109
1109
  ]),
1110
1110
  e("p", {
1111
1111
  class: "artifactuse-social-text",
1112
- innerHTML: N.value
1113
- }, null, 8, ti),
1114
- o.value.sound ? (a(), s("div", ai, [
1115
- k[17] || (k[17] = e("svg", {
1112
+ innerHTML: J.value
1113
+ }, null, 8, fi),
1114
+ r.value.sound ? (s(), l("div", pi, [
1115
+ w[17] || (w[17] = e("svg", {
1116
1116
  viewBox: "0 0 24 24",
1117
1117
  fill: "currentColor"
1118
1118
  }, [
1119
1119
  e("path", { d: "M12 3v10.55c-.59-.34-1.27-.55-2-.55-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4V7h4V3h-6z" })
1120
1120
  ], -1)),
1121
- Y(" " + n(o.value.sound), 1)
1121
+ G(" " + i(r.value.sound), 1)
1122
1122
  ])) : v("", !0),
1123
- V.value ? (a(), s("div", si, [
1124
- e("span", null, n(B(h.value.likes || 0)) + " likes", 1),
1125
- e("span", null, n(B(h.value.comments || 0)) + " comments", 1),
1126
- e("span", null, n(B(h.value.shares || 0)) + " shares", 1)
1123
+ I.value ? (s(), l("div", _i, [
1124
+ e("span", null, i(S(h.value.likes || 0)) + " likes", 1),
1125
+ e("span", null, i(S(h.value.comments || 0)) + " comments", 1),
1126
+ e("span", null, i(S(h.value.shares || 0)) + " shares", 1)
1127
1127
  ])) : v("", !0)
1128
1128
  ])
1129
- ], 64)) : A.value === "youtube" ? (a(), s(F, { key: 6 }, [
1130
- e("div", li, [
1131
- o.value.thumbnail ? (a(), s("img", {
1129
+ ], 64)) : H.value === "youtube" ? (s(), l(V, { key: 6 }, [
1130
+ e("div", hi, [
1131
+ r.value.thumbnail ? (s(), l("img", {
1132
1132
  key: 0,
1133
- src: o.value.thumbnail,
1134
- alt: o.value.title,
1133
+ src: r.value.thumbnail,
1134
+ alt: r.value.title,
1135
1135
  onError: Z
1136
- }, null, 40, ii)) : v("", !0),
1137
- o.value.duration ? (a(), s("div", ni, n(o.value.duration), 1)) : v("", !0)
1136
+ }, null, 40, mi)) : v("", !0),
1137
+ r.value.duration ? (s(), l("div", yi, i(r.value.duration), 1)) : v("", !0)
1138
1138
  ]),
1139
- e("div", oi, [
1139
+ e("div", gi, [
1140
1140
  e("img", {
1141
- src: g.value.avatar || me,
1141
+ src: g.value.avatar || ke,
1142
1142
  alt: g.value.name,
1143
1143
  class: "artifactuse-social-avatar",
1144
1144
  onError: K
1145
- }, null, 40, ri),
1145
+ }, null, 40, ki),
1146
1146
  e("div", null, [
1147
- e("div", ci, n(o.value.title || o.value.text), 1),
1148
- e("div", ui, n(g.value.name), 1),
1149
- e("div", di, n(B(h.value.views || 0)) + " views · " + n($.value.timestamp || "Just now"), 1)
1147
+ e("div", wi, i(r.value.title || r.value.text), 1),
1148
+ e("div", bi, i(g.value.name), 1),
1149
+ e("div", Ci, i(S(h.value.views || 0)) + " views · " + i($.value.timestamp || "Just now"), 1)
1150
1150
  ])
1151
1151
  ])
1152
1152
  ], 64)) : v("", !0),
1153
- e("div", vi, [
1154
- e("div", fi, [
1155
- (a(), Me(ta(U.value))),
1156
- e("span", null, n(D.value), 1)
1153
+ e("div", xi, [
1154
+ e("div", $i, [
1155
+ (s(), Pe(da(D.value))),
1156
+ e("span", null, i(N.value), 1)
1157
1157
  ]),
1158
1158
  e("button", {
1159
1159
  class: "artifactuse-social-copy-btn",
1160
- onClick: de
1160
+ onClick: pe
1161
1161
  }, [
1162
- k[18] || (k[18] = e("svg", {
1162
+ w[18] || (w[18] = e("svg", {
1163
1163
  viewBox: "0 0 24 24",
1164
1164
  fill: "none",
1165
1165
  stroke: "currentColor",
@@ -1175,31 +1175,31 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
1175
1175
  }),
1176
1176
  e("path", { d: "M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1" })
1177
1177
  ], -1)),
1178
- Y(" " + n(r.value), 1)
1178
+ G(" " + i(n.value), 1)
1179
1179
  ])
1180
1180
  ])
1181
- ], 10, vs);
1181
+ ], 10, xs);
1182
1182
  };
1183
1183
  }
1184
- }, _i = ["src", "alt"], hi = ["src"], mi = {
1184
+ }, Ti = ["src", "alt"], Li = ["src"], Pi = {
1185
1185
  key: 2,
1186
1186
  class: "artifactuse-viewer-controls"
1187
- }, yi = ["title"], gi = {
1187
+ }, Ei = ["title"], Ai = {
1188
1188
  key: 0,
1189
1189
  viewBox: "0 0 24 24",
1190
1190
  fill: "none",
1191
1191
  stroke: "currentColor",
1192
1192
  "stroke-width": "2"
1193
- }, ki = {
1193
+ }, Hi = {
1194
1194
  key: 1,
1195
1195
  viewBox: "0 0 24 24",
1196
1196
  fill: "none",
1197
1197
  stroke: "currentColor",
1198
1198
  "stroke-width": "2"
1199
- }, wi = {
1199
+ }, Bi = {
1200
1200
  key: 3,
1201
1201
  class: "artifactuse-viewer-caption"
1202
- }, bi = {
1202
+ }, Si = {
1203
1203
  __name: "ArtifactuseViewer",
1204
1204
  props: {
1205
1205
  // Whether the viewer is open
@@ -1229,61 +1229,61 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
1229
1229
  }
1230
1230
  },
1231
1231
  emits: ["close"],
1232
- setup(P, { emit: c }) {
1233
- const p = P, T = c, _ = M(null), r = M(!1);
1234
- function q() {
1235
- r.value = !1, T("close");
1232
+ setup(L, { emit: d }) {
1233
+ const _ = L, T = d, f = M(null), n = M(!1);
1234
+ function O() {
1235
+ n.value = !1, T("close");
1236
1236
  }
1237
- function A() {
1238
- p.type === "image" && (r.value = !r.value);
1237
+ function H() {
1238
+ _.type === "image" && (n.value = !n.value);
1239
1239
  }
1240
1240
  function g() {
1241
1241
  const h = document.createElement("a");
1242
- h.href = p.src, h.download = p.alt || "download", document.body.appendChild(h), h.click(), document.body.removeChild(h);
1242
+ h.href = _.src, h.download = _.alt || "download", document.body.appendChild(h), h.click(), document.body.removeChild(h);
1243
1243
  }
1244
- function o(h) {
1245
- h.key === "Escape" && p.isOpen && q();
1244
+ function r(h) {
1245
+ h.key === "Escape" && _.isOpen && O();
1246
1246
  }
1247
- return oe(() => p.isOpen, (h) => {
1248
- h ? (we(() => {
1247
+ return ne(() => _.isOpen, (h) => {
1248
+ h ? (xe(() => {
1249
1249
  var $;
1250
- ($ = _.value) == null || $.focus();
1251
- }), document.body.style.overflow = "hidden") : (document.body.style.overflow = "", r.value = !1);
1252
- }), Te(() => {
1253
- document.addEventListener("keydown", o);
1254
- }), Ye(() => {
1255
- document.removeEventListener("keydown", o), document.body.style.overflow = "";
1256
- }), (h, $) => (a(), Me(aa, { to: "body" }, [
1257
- Fe(ze, { name: "artifactuse-viewer" }, {
1258
- default: Ve(() => [
1259
- P.isOpen ? (a(), s("div", {
1250
+ ($ = f.value) == null || $.focus();
1251
+ }), document.body.style.overflow = "hidden") : (document.body.style.overflow = "", n.value = !1);
1252
+ }), Ee(() => {
1253
+ document.addEventListener("keydown", r);
1254
+ }), st(() => {
1255
+ document.removeEventListener("keydown", r), document.body.style.overflow = "";
1256
+ }), (h, $) => (s(), Pe(va, { to: "body" }, [
1257
+ De(qe, { name: "artifactuse-viewer" }, {
1258
+ default: Oe(() => [
1259
+ L.isOpen ? (s(), l("div", {
1260
1260
  key: 0,
1261
1261
  class: "artifactuse-viewer-overlay",
1262
- onClick: q,
1263
- onKeydown: sa(q, ["escape"]),
1262
+ onClick: O,
1263
+ onKeydown: fa(O, ["escape"]),
1264
1264
  tabindex: "-1",
1265
1265
  ref_key: "overlayRef",
1266
- ref: _
1266
+ ref: f
1267
1267
  }, [
1268
1268
  e("div", {
1269
1269
  class: "artifactuse-viewer-content",
1270
- onClick: $[0] || ($[0] = he(() => {
1270
+ onClick: $[0] || ($[0] = me(() => {
1271
1271
  }, ["stop"]))
1272
1272
  }, [
1273
- P.type === "image" ? (a(), s("img", {
1273
+ L.type === "image" ? (s(), l("img", {
1274
1274
  key: 0,
1275
- src: P.src,
1276
- alt: P.alt,
1277
- class: I(["artifactuse-viewer-image", { "artifactuse-viewer-image--zoomed": r.value }]),
1278
- onClick: A
1279
- }, null, 10, _i)) : P.type === "pdf" ? (a(), s("iframe", {
1275
+ src: L.src,
1276
+ alt: L.alt,
1277
+ class: R(["artifactuse-viewer-image", { "artifactuse-viewer-image--zoomed": n.value }]),
1278
+ onClick: H
1279
+ }, null, 10, Ti)) : L.type === "pdf" ? (s(), l("iframe", {
1280
1280
  key: 1,
1281
- src: P.src,
1281
+ src: L.src,
1282
1282
  class: "artifactuse-viewer-pdf"
1283
- }, null, 8, hi)) : v("", !0),
1283
+ }, null, 8, Li)) : v("", !0),
1284
1284
  e("button", {
1285
1285
  class: "artifactuse-viewer-close",
1286
- onClick: q,
1286
+ onClick: O,
1287
1287
  title: "Close (Esc)"
1288
1288
  }, [...$[1] || ($[1] = [
1289
1289
  e("svg", {
@@ -1306,13 +1306,13 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
1306
1306
  })
1307
1307
  ], -1)
1308
1308
  ])]),
1309
- P.type === "image" ? (a(), s("div", mi, [
1309
+ L.type === "image" ? (s(), l("div", Pi, [
1310
1310
  e("button", {
1311
1311
  class: "artifactuse-viewer-control",
1312
- onClick: he(A, ["stop"]),
1313
- title: r.value ? "Zoom out" : "Zoom in"
1312
+ onClick: me(H, ["stop"]),
1313
+ title: n.value ? "Zoom out" : "Zoom in"
1314
1314
  }, [
1315
- r.value ? (a(), s("svg", ki, [...$[3] || ($[3] = [
1315
+ n.value ? (s(), l("svg", Hi, [...$[3] || ($[3] = [
1316
1316
  e("circle", {
1317
1317
  cx: "11",
1318
1318
  cy: "11",
@@ -1330,7 +1330,7 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
1330
1330
  x2: "14",
1331
1331
  y2: "11"
1332
1332
  }, null, -1)
1333
- ])])) : (a(), s("svg", gi, [...$[2] || ($[2] = [
1333
+ ])])) : (s(), l("svg", Ai, [...$[2] || ($[2] = [
1334
1334
  e("circle", {
1335
1335
  cx: "11",
1336
1336
  cy: "11",
@@ -1355,10 +1355,10 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
1355
1355
  y2: "11"
1356
1356
  }, null, -1)
1357
1357
  ])]))
1358
- ], 8, yi),
1358
+ ], 8, Ei),
1359
1359
  e("button", {
1360
1360
  class: "artifactuse-viewer-control",
1361
- onClick: he(g, ["stop"]),
1361
+ onClick: me(g, ["stop"]),
1362
1362
  title: "Download"
1363
1363
  }, [...$[4] || ($[4] = [
1364
1364
  e("svg", {
@@ -1378,7 +1378,7 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
1378
1378
  ], -1)
1379
1379
  ])])
1380
1380
  ])) : v("", !0),
1381
- P.caption ? (a(), s("div", wi, n(P.caption), 1)) : v("", !0)
1381
+ L.caption ? (s(), l("div", Bi, i(L.caption), 1)) : v("", !0)
1382
1382
  ])
1383
1383
  ], 544)) : v("", !0)
1384
1384
  ]),
@@ -1386,7 +1386,7 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
1386
1386
  })
1387
1387
  ]));
1388
1388
  }
1389
- }, Ci = ["innerHTML"], Mo = {
1389
+ }, zi = ["innerHTML"], Zo = {
1390
1390
  __name: "ArtifactuseAgentMessage",
1391
1391
  props: {
1392
1392
  // The raw message content (markdown/HTML from AI)
@@ -1447,211 +1447,211 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
1447
1447
  "social-copy",
1448
1448
  "media-open"
1449
1449
  ],
1450
- setup(P, { expose: c, emit: p }) {
1451
- const T = P, _ = p, {
1452
- processMessage: r,
1453
- openArtifact: q,
1454
- state: A,
1450
+ setup(L, { expose: d, emit: _ }) {
1451
+ const T = L, f = _, {
1452
+ processMessage: n,
1453
+ openArtifact: O,
1454
+ state: H,
1455
1455
  getTheme: g,
1456
- instance: o
1457
- } = Re(), h = M(null), $ = M(null), V = M(""), x = M([]);
1458
- let D = null;
1459
- const U = M(!1), N = M("image"), ee = M(""), B = M(""), re = M(""), K = b(() => (g == null ? void 0 : g()) || "dark"), Z = b(() => A.activeArtifactId), de = b(() => {
1456
+ instance: r
1457
+ } = je(), h = M(null), $ = M(null), I = M(""), x = M([]);
1458
+ let N = null;
1459
+ const D = M(!1), J = M("image"), ee = M(""), S = M(""), ce = M(""), K = k(() => (g == null ? void 0 : g()) || "dark"), Z = k(() => H.activeArtifactId), pe = k(() => {
1460
1460
  var C;
1461
- return T.inlineCards ?? ((C = o == null ? void 0 : o.config) == null ? void 0 : C.inlineCards) ?? !0;
1461
+ return T.inlineCards ?? ((C = r == null ? void 0 : r.config) == null ? void 0 : C.inlineCards) ?? !0;
1462
1462
  }), m = M(!1);
1463
- Te(() => {
1463
+ Ee(() => {
1464
1464
  T.typing && (m.value = !0);
1465
- }), oe(() => T.typing, (C) => {
1465
+ }), ne(() => T.typing, (C) => {
1466
1466
  C && (m.value = !0);
1467
1467
  });
1468
- const k = b(() => m.value || T.isLastMessage ? "active" : "inactive");
1469
- function ae(C) {
1468
+ const w = k(() => m.value || T.isLastMessage ? "active" : "inactive");
1469
+ function ie(C) {
1470
1470
  if (!C) return null;
1471
1471
  try {
1472
- const R = decodeURIComponent(escape(atob(C)));
1473
- return JSON.parse(R);
1472
+ const q = decodeURIComponent(escape(atob(C)));
1473
+ return JSON.parse(q);
1474
1474
  } catch {
1475
1475
  try {
1476
- const O = C.replace(/&#10;/g, `
1476
+ const j = C.replace(/&#10;/g, `
1477
1477
  `).replace(/&#13;/g, "\r").replace(/&#9;/g, " ").replace(/&quot;/g, '"').replace(/&#39;/g, "'").replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&amp;/g, "&");
1478
- return JSON.parse(O);
1479
- } catch (O) {
1480
- return console.error("Failed to parse artifact data:", O), null;
1478
+ return JSON.parse(j);
1479
+ } catch (j) {
1480
+ return console.error("Failed to parse artifact data:", j), null;
1481
1481
  }
1482
1482
  }
1483
1483
  }
1484
- const Q = b(() => {
1485
- const C = [], R = V.value;
1486
- if (!R) return C;
1487
- const O = /<div\s+class="artifactuse-placeholder[^"]*"[^>]*data-artifact-id="([^"]+)"[^>]*data-artifact-type="([^"]+)"[^>]*data-artifact=["']([^"']*)["'][^>]*><\/div>/gi;
1488
- let J = 0, S;
1489
- for (; (S = O.exec(R)) !== null; ) {
1490
- if (S.index > J) {
1491
- const j = R.slice(J, S.index);
1492
- j.trim() && C.push({ type: "html", content: j });
1484
+ const oe = k(() => {
1485
+ const C = [], q = I.value;
1486
+ if (!q) return C;
1487
+ const j = /<div\s+class="artifactuse-placeholder[^"]*"[^>]*data-artifact-id="([^"]+)"[^>]*data-artifact-type="([^"]+)"[^>]*data-artifact=["']([^"']*)["'][^>]*><\/div>/gi;
1488
+ let le = 0, E;
1489
+ for (; (E = j.exec(q)) !== null; ) {
1490
+ if (E.index > le) {
1491
+ const U = q.slice(le, E.index);
1492
+ U.trim() && C.push({ type: "html", content: U });
1493
1493
  }
1494
- const te = ae(S[3]), f = S[2];
1495
- te && (f === "form" && te.isInline ? C.push({ type: "form", artifact: te }) : f === "social" ? C.push({ type: "social", artifact: te }) : C.push({ type: "panel", artifact: te })), J = S.index + S[0].length;
1494
+ const Q = ie(E[3]), y = E[2];
1495
+ Q && (y === "form" && Q.isInline ? C.push({ type: "form", artifact: Q }) : y === "social" ? C.push({ type: "social", artifact: Q }) : C.push({ type: "panel", artifact: Q })), le = E.index + E[0].length;
1496
1496
  }
1497
- if (J < R.length) {
1498
- const te = R.slice(J);
1499
- te.trim() && C.push({ type: "html", content: te });
1497
+ if (le < q.length) {
1498
+ const Q = q.slice(le);
1499
+ Q.trim() && C.push({ type: "html", content: Q });
1500
1500
  }
1501
- return C.length === 0 && R.trim() && C.push({ type: "html", content: R }), C;
1501
+ return C.length === 0 && q.trim() && C.push({ type: "html", content: q }), C;
1502
1502
  });
1503
1503
  function W(C) {
1504
- N.value = C.type || "image", ee.value = C.src || "", B.value = C.alt || "", re.value = C.caption || "", U.value = !0, _("media-open", C);
1504
+ J.value = C.type || "image", ee.value = C.src || "", S.value = C.alt || "", ce.value = C.caption || "", D.value = !0, f("media-open", C);
1505
1505
  }
1506
- function ie() {
1507
- U.value = !1, ee.value = "", B.value = "", re.value = "";
1506
+ function X() {
1507
+ D.value = !1, ee.value = "", S.value = "", ce.value = "";
1508
1508
  }
1509
- function w() {
1509
+ function b() {
1510
1510
  if (!$.value) return;
1511
- $.value.querySelectorAll('img[data-lightbox="true"]').forEach((f) => {
1512
- f._lightboxHandler && f.removeEventListener("click", f._lightboxHandler), f._lightboxHandler = (j) => {
1513
- j.preventDefault(), j.stopPropagation(), W({
1511
+ $.value.querySelectorAll('img[data-lightbox="true"]').forEach((y) => {
1512
+ y._lightboxHandler && y.removeEventListener("click", y._lightboxHandler), y._lightboxHandler = (U) => {
1513
+ U.preventDefault(), U.stopPropagation(), W({
1514
1514
  type: "image",
1515
- src: f.src,
1516
- alt: f.alt || "",
1517
- caption: f.dataset.caption || f.alt || ""
1515
+ src: y.src,
1516
+ alt: y.alt || "",
1517
+ caption: y.dataset.caption || y.alt || ""
1518
1518
  });
1519
- }, f.addEventListener("click", f._lightboxHandler), f.style.cursor = "zoom-in";
1520
- }), $.value.querySelectorAll(".artifactuse-image-container img").forEach((f) => {
1521
- f._lightboxHandler || (f._lightboxHandler = (j) => {
1522
- j.preventDefault(), j.stopPropagation();
1523
- const le = f.closest(".artifactuse-image-container"), G = le == null ? void 0 : le.querySelector(".artifactuse-image-caption"), ye = (G == null ? void 0 : G.textContent) || f.dataset.caption || f.alt || "";
1519
+ }, y.addEventListener("click", y._lightboxHandler), y.style.cursor = "zoom-in";
1520
+ }), $.value.querySelectorAll(".artifactuse-image-container img").forEach((y) => {
1521
+ y._lightboxHandler || (y._lightboxHandler = (U) => {
1522
+ U.preventDefault(), U.stopPropagation();
1523
+ const Y = y.closest(".artifactuse-image-container"), ue = Y == null ? void 0 : Y.querySelector(".artifactuse-image-caption"), Ae = (ue == null ? void 0 : ue.textContent) || y.dataset.caption || y.alt || "";
1524
1524
  W({
1525
1525
  type: "image",
1526
- src: f.src,
1527
- alt: f.alt || "",
1528
- caption: ye
1526
+ src: y.src,
1527
+ alt: y.alt || "",
1528
+ caption: Ae
1529
1529
  });
1530
- }, f.addEventListener("click", f._lightboxHandler), f.style.cursor = "zoom-in");
1531
- }), $.value.querySelectorAll(".artifactuse-gallery-item img, .artifactuse-image-gallery img").forEach((f) => {
1532
- f._lightboxHandler || (f._lightboxHandler = (j) => {
1533
- j.preventDefault(), j.stopPropagation();
1534
- const le = f.closest(".artifactuse-gallery-item"), G = le == null ? void 0 : le.querySelector(".artifactuse-gallery-caption"), ye = (G == null ? void 0 : G.textContent) || f.dataset.caption || f.alt || "";
1530
+ }, y.addEventListener("click", y._lightboxHandler), y.style.cursor = "zoom-in");
1531
+ }), $.value.querySelectorAll(".artifactuse-gallery-item img, .artifactuse-image-gallery img").forEach((y) => {
1532
+ y._lightboxHandler || (y._lightboxHandler = (U) => {
1533
+ U.preventDefault(), U.stopPropagation();
1534
+ const Y = y.closest(".artifactuse-gallery-item"), ue = Y == null ? void 0 : Y.querySelector(".artifactuse-gallery-caption"), Ae = (ue == null ? void 0 : ue.textContent) || y.dataset.caption || y.alt || "";
1535
1535
  W({
1536
1536
  type: "image",
1537
- src: f.src,
1538
- alt: f.alt || "",
1539
- caption: ye
1537
+ src: y.src,
1538
+ alt: y.alt || "",
1539
+ caption: Ae
1540
1540
  });
1541
- }, f.addEventListener("click", f._lightboxHandler), f.style.cursor = "zoom-in");
1542
- }), $.value.querySelectorAll('a[href$=".pdf"], a[data-type="pdf"]').forEach((f) => {
1543
- f._pdfHandler && f.removeEventListener("click", f._pdfHandler), f._pdfHandler = (j) => {
1544
- j.preventDefault(), j.stopPropagation(), W({
1541
+ }, y.addEventListener("click", y._lightboxHandler), y.style.cursor = "zoom-in");
1542
+ }), $.value.querySelectorAll('a[href$=".pdf"], a[data-type="pdf"]').forEach((y) => {
1543
+ y._pdfHandler && y.removeEventListener("click", y._pdfHandler), y._pdfHandler = (U) => {
1544
+ U.preventDefault(), U.stopPropagation(), W({
1545
1545
  type: "pdf",
1546
- src: f.href,
1547
- alt: f.textContent || "PDF Document",
1548
- caption: f.title || f.textContent || ""
1546
+ src: y.href,
1547
+ alt: y.textContent || "PDF Document",
1548
+ caption: y.title || y.textContent || ""
1549
1549
  });
1550
- }, f.addEventListener("click", f._pdfHandler);
1551
- }), $.value.querySelectorAll(".artifactuse-pdf-container, [data-pdf-viewer]").forEach((f) => {
1552
- var le;
1553
- f._pdfHandler && f.removeEventListener("click", f._pdfHandler);
1554
- const j = f.dataset.pdfSrc || ((le = f.querySelector("iframe")) == null ? void 0 : le.src) || "";
1555
- j && (f._pdfHandler = (G) => {
1556
- G.preventDefault(), G.stopPropagation(), W({
1550
+ }, y.addEventListener("click", y._pdfHandler);
1551
+ }), $.value.querySelectorAll(".artifactuse-pdf-container, [data-pdf-viewer]").forEach((y) => {
1552
+ var Y;
1553
+ y._pdfHandler && y.removeEventListener("click", y._pdfHandler);
1554
+ const U = y.dataset.pdfSrc || ((Y = y.querySelector("iframe")) == null ? void 0 : Y.src) || "";
1555
+ U && (y._pdfHandler = (ue) => {
1556
+ ue.preventDefault(), ue.stopPropagation(), W({
1557
1557
  type: "pdf",
1558
- src: j,
1558
+ src: U,
1559
1559
  alt: "PDF Document",
1560
- caption: f.dataset.caption || ""
1560
+ caption: y.dataset.caption || ""
1561
1561
  });
1562
- }, f.addEventListener("click", f._pdfHandler), f.style.cursor = "pointer");
1563
- }), $.value.querySelectorAll(".artifactuse-video-preview-wrapper, .video-preview-wrapper").forEach((f) => {
1564
- f._clickHandler && f.removeEventListener("click", f._clickHandler), f._clickHandler = (j) => {
1565
- if (j.target.closest(".artifactuse-video-play-button")) return;
1566
- const le = f.dataset.videoUrl || f.dataset.url;
1567
- le && window.open(le, "_blank", "noopener,noreferrer");
1568
- }, f.addEventListener("click", f._clickHandler);
1562
+ }, y.addEventListener("click", y._pdfHandler), y.style.cursor = "pointer");
1563
+ }), $.value.querySelectorAll(".artifactuse-video-preview-wrapper, .video-preview-wrapper").forEach((y) => {
1564
+ y._clickHandler && y.removeEventListener("click", y._clickHandler), y._clickHandler = (U) => {
1565
+ if (U.target.closest(".artifactuse-video-play-button")) return;
1566
+ const Y = y.dataset.videoUrl || y.dataset.url;
1567
+ Y && window.open(Y, "_blank", "noopener,noreferrer");
1568
+ }, y.addEventListener("click", y._clickHandler);
1569
1569
  });
1570
1570
  }
1571
- function E() {
1571
+ function B() {
1572
1572
  if (!$.value) return;
1573
- $.value.querySelectorAll("img").forEach((S) => {
1574
- S._lightboxHandler && (S.removeEventListener("click", S._lightboxHandler), delete S._lightboxHandler);
1575
- }), $.value.querySelectorAll('a[href$=".pdf"], a[data-type="pdf"]').forEach((S) => {
1576
- S._pdfHandler && (S.removeEventListener("click", S._pdfHandler), delete S._pdfHandler);
1577
- }), $.value.querySelectorAll(".artifactuse-pdf-container, [data-pdf-viewer]").forEach((S) => {
1578
- S._pdfHandler && (S.removeEventListener("click", S._pdfHandler), delete S._pdfHandler);
1579
- }), $.value.querySelectorAll(".artifactuse-video-preview-wrapper, .video-preview-wrapper").forEach((S) => {
1580
- S._clickHandler && (S.removeEventListener("click", S._clickHandler), delete S._clickHandler);
1573
+ $.value.querySelectorAll("img").forEach((E) => {
1574
+ E._lightboxHandler && (E.removeEventListener("click", E._lightboxHandler), delete E._lightboxHandler);
1575
+ }), $.value.querySelectorAll('a[href$=".pdf"], a[data-type="pdf"]').forEach((E) => {
1576
+ E._pdfHandler && (E.removeEventListener("click", E._pdfHandler), delete E._pdfHandler);
1577
+ }), $.value.querySelectorAll(".artifactuse-pdf-container, [data-pdf-viewer]").forEach((E) => {
1578
+ E._pdfHandler && (E.removeEventListener("click", E._pdfHandler), delete E._pdfHandler);
1579
+ }), $.value.querySelectorAll(".artifactuse-video-preview-wrapper, .video-preview-wrapper").forEach((E) => {
1580
+ E._clickHandler && (E.removeEventListener("click", E._clickHandler), delete E._clickHandler);
1581
1581
  });
1582
1582
  }
1583
- function i() {
1584
- D && clearTimeout(D), D = setTimeout(async () => {
1585
- if (await we(), o != null && o.initializeContent && $.value)
1583
+ function u() {
1584
+ N && clearTimeout(N), N = setTimeout(async () => {
1585
+ if (await xe(), r != null && r.initializeContent && $.value)
1586
1586
  try {
1587
- await o.initializeContent($.value);
1587
+ await r.initializeContent($.value);
1588
1588
  } catch (C) {
1589
1589
  console.error("Failed to initialize content:", C);
1590
1590
  }
1591
- w();
1591
+ b();
1592
1592
  }, 100);
1593
1593
  }
1594
- oe(
1594
+ ne(
1595
1595
  () => T.content,
1596
1596
  (C) => {
1597
1597
  if (C) {
1598
- const R = r(C, T.messageId, {
1598
+ const q = n(C, T.messageId, {
1599
1599
  inlinePreview: T.inlinePreview,
1600
1600
  inlineCode: T.inlineCode,
1601
1601
  tabs: T.tabs,
1602
1602
  viewMode: T.viewMode
1603
1603
  });
1604
- V.value = R.html, x.value = R.artifacts, R.artifacts.length > 0 && _("artifact-detected", R.artifacts), T.typing || i();
1604
+ I.value = q.html, x.value = q.artifacts, q.artifacts.length > 0 && f("artifact-detected", q.artifacts), T.typing || u();
1605
1605
  }
1606
1606
  },
1607
1607
  { immediate: !0 }
1608
- ), oe(
1608
+ ), ne(
1609
1609
  () => T.typing,
1610
- (C, R) => {
1611
- R === !0 && C === !1 && i();
1610
+ (C, q) => {
1611
+ q === !0 && C === !1 && u();
1612
1612
  }
1613
- ), Te(() => {
1614
- T.typing || i();
1615
- }), la(() => {
1616
- D && clearTimeout(D), E();
1613
+ ), Ee(() => {
1614
+ T.typing || u();
1615
+ }), pa(() => {
1616
+ N && clearTimeout(N), B();
1617
1617
  });
1618
- function H(C) {
1619
- const R = C.target.closest(".artifactuse-inline-preview");
1620
- if (R) {
1621
- if (R.dataset.nonClickable) return;
1622
- const O = R.dataset.artifactId;
1623
- if (O) {
1624
- const J = A.artifacts.find((S) => S.id === O);
1625
- J && d(J);
1618
+ function z(C) {
1619
+ const q = C.target.closest(".artifactuse-inline-preview");
1620
+ if (q) {
1621
+ if (q.dataset.nonClickable) return;
1622
+ const j = q.dataset.artifactId;
1623
+ if (j) {
1624
+ const le = H.artifacts.find((E) => E.id === j);
1625
+ le && o(le);
1626
1626
  }
1627
1627
  }
1628
1628
  }
1629
- function d(C) {
1630
- q(C), _("artifact-open", C);
1629
+ function o(C) {
1630
+ O(C), f("artifact-open", C);
1631
1631
  }
1632
- function L(C) {
1633
- _("artifact-copy", C);
1632
+ function P(C) {
1633
+ f("artifact-copy", C);
1634
1634
  }
1635
1635
  function se(C) {
1636
- _("artifact-download", C);
1636
+ f("artifact-download", C);
1637
1637
  }
1638
- function ce(C) {
1639
- _("form-submit", C);
1638
+ function te(C) {
1639
+ f("form-submit", C);
1640
1640
  }
1641
1641
  function be(C) {
1642
- _("form-cancel", C);
1642
+ f("form-cancel", C);
1643
1643
  }
1644
- function Ce(C) {
1645
- _("form-button-click", C);
1644
+ function ge(C) {
1645
+ f("form-button-click", C);
1646
1646
  }
1647
- function Le(C) {
1648
- _("social-copy", C);
1647
+ function $e(C) {
1648
+ f("social-copy", C);
1649
1649
  }
1650
- return b(() => A.artifacts.filter((C) => C.messageId === T.messageId)), c({
1650
+ return k(() => H.artifacts.filter((C) => C.messageId === T.messageId)), d({
1651
1651
  openViewer: W,
1652
- closeViewer: ie,
1653
- attachMediaListeners: w
1654
- }), (C, R) => (a(), s("div", {
1652
+ closeViewer: X,
1653
+ attachMediaListeners: b
1654
+ }), (C, q) => (s(), l("div", {
1655
1655
  class: "artifactuse-agent-message",
1656
1656
  ref_key: "messageRef",
1657
1657
  ref: h
@@ -1660,164 +1660,182 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
1660
1660
  class: "artifactuse-message-content",
1661
1661
  ref_key: "contentRef",
1662
1662
  ref: $,
1663
- onClick: H
1663
+ onClick: z
1664
1664
  }, [
1665
- (a(!0), s(F, null, ue(Q.value, (O, J) => (a(), s(F, { key: J }, [
1666
- O.type === "html" ? (a(), s("div", {
1665
+ (s(!0), l(V, null, fe(oe.value, (j, le) => (s(), l(V, { key: le }, [
1666
+ j.type === "html" ? (s(), l("div", {
1667
1667
  key: 0,
1668
- innerHTML: O.content
1669
- }, null, 8, Ci)) : O.type === "form" && O.artifact.isInline ? (a(), Me(ds, {
1668
+ innerHTML: j.content
1669
+ }, null, 8, zi)) : j.type === "form" && j.artifact.isInline ? (s(), Pe(Cs, {
1670
1670
  key: 1,
1671
- artifact: O.artifact,
1671
+ artifact: j.artifact,
1672
1672
  theme: K.value,
1673
- "initial-state": k.value,
1674
- onSubmit: ce,
1673
+ "initial-state": w.value,
1674
+ onSubmit: te,
1675
1675
  onCancel: be,
1676
- onButtonClick: Ce
1677
- }, null, 8, ["artifact", "theme", "initial-state"])) : O.type === "social" ? (a(), Me(pi, {
1676
+ onButtonClick: ge
1677
+ }, null, 8, ["artifact", "theme", "initial-state"])) : j.type === "social" ? (s(), Pe(Mi, {
1678
1678
  key: 2,
1679
- artifact: O.artifact,
1679
+ artifact: j.artifact,
1680
1680
  theme: K.value,
1681
- onCopy: Le
1682
- }, null, 8, ["artifact", "theme"])) : O.type === "panel" && de.value ? (a(), Me(ba, {
1681
+ onCopy: $e
1682
+ }, null, 8, ["artifact", "theme"])) : j.type === "panel" && pe.value ? (s(), Pe(Sa, {
1683
1683
  key: 3,
1684
- artifact: O.artifact,
1685
- "is-active": Z.value === O.artifact.id,
1686
- onOpen: d,
1687
- onCopy: L,
1684
+ artifact: j.artifact,
1685
+ "is-active": Z.value === j.artifact.id,
1686
+ onOpen: o,
1687
+ onCopy: P,
1688
1688
  onDownload: se
1689
1689
  }, null, 8, ["artifact", "is-active"])) : v("", !0)
1690
1690
  ], 64))), 128))
1691
1691
  ], 512),
1692
- Fe(bi, {
1693
- "is-open": U.value,
1694
- type: N.value,
1692
+ De(Si, {
1693
+ "is-open": D.value,
1694
+ type: J.value,
1695
1695
  src: ee.value,
1696
- alt: B.value,
1697
- caption: re.value,
1698
- onClose: ie
1696
+ alt: S.value,
1697
+ caption: ce.value,
1698
+ onClose: X
1699
1699
  }, null, 8, ["is-open", "type", "src", "alt", "caption"])
1700
1700
  ], 512));
1701
1701
  }
1702
- }, xi = { class: "artifactuse-panel__header artifactuse-panel__header--simple" }, $i = { class: "artifactuse-panel__title" }, Mi = { class: "artifactuse-panel__icon" }, Ti = {
1702
+ }, Vi = { class: "artifactuse-panel__header artifactuse-panel__header--simple" }, Ii = { class: "artifactuse-panel__title" }, Fi = { class: "artifactuse-panel__icon" }, Ri = {
1703
1703
  key: 0,
1704
1704
  viewBox: "0 0 24 24",
1705
1705
  fill: "none",
1706
1706
  stroke: "currentColor",
1707
1707
  "stroke-width": "2"
1708
- }, Li = {
1708
+ }, qi = {
1709
1709
  key: 1,
1710
1710
  viewBox: "0 0 24 24",
1711
1711
  fill: "none",
1712
1712
  stroke: "currentColor",
1713
1713
  "stroke-width": "2"
1714
- }, Pi = { class: "artifactuse-panel__title-content" }, Ei = { class: "artifactuse-panel__name" }, Ai = { class: "artifactuse-panel__actions" }, Hi = { class: "artifactuse-panel__empty" }, Bi = { class: "artifactuse-panel__empty-title" }, Si = { class: "artifactuse-panel__empty-text" }, zi = { class: "artifactuse-panel__footer artifactuse-panel__footer--simple" }, Vi = {
1714
+ }, Oi = { class: "artifactuse-panel__title-content" }, Ui = { class: "artifactuse-panel__name" }, Di = { class: "artifactuse-panel__actions" }, ji = { class: "artifactuse-panel__empty" }, Ni = { class: "artifactuse-panel__empty-title" }, Wi = { class: "artifactuse-panel__empty-text" }, Ji = { class: "artifactuse-panel__footer artifactuse-panel__footer--simple" }, Xi = {
1715
1715
  key: 0,
1716
1716
  href: "https://artifactuse.com",
1717
1717
  target: "_blank",
1718
1718
  rel: "noopener noreferrer",
1719
1719
  class: "artifactuse-panel__branding"
1720
- }, Ii = { class: "artifactuse-panel__header artifactuse-panel__header--simple" }, Fi = { class: "artifactuse-panel__title" }, Ri = { class: "artifactuse-panel__title-content" }, qi = { class: "artifactuse-panel__meta" }, Oi = { class: "artifactuse-panel__actions" }, Ui = ["disabled"], Di = {
1720
+ }, Zi = { class: "artifactuse-panel__header artifactuse-panel__header--simple" }, Ki = { class: "artifactuse-panel__title" }, Yi = { class: "artifactuse-panel__title-content" }, Gi = { class: "artifactuse-panel__meta" }, Qi = { class: "artifactuse-panel__actions" }, en = ["disabled"], tn = {
1721
1721
  key: 0,
1722
1722
  viewBox: "0 0 24 24",
1723
1723
  fill: "none",
1724
1724
  stroke: "currentColor",
1725
1725
  "stroke-width": "2"
1726
- }, ji = {
1726
+ }, an = {
1727
1727
  key: 1,
1728
1728
  class: "artifactuse-panel__spinner-icon",
1729
1729
  viewBox: "0 0 24 24",
1730
1730
  fill: "none",
1731
1731
  stroke: "currentColor",
1732
1732
  "stroke-width": "2"
1733
- }, Ni = { class: "artifactuse-panel__list" }, Wi = { class: "artifactuse-panel__list-items" }, Ji = ["onClick"], Xi = ["innerHTML"], Zi = { class: "artifactuse-panel__list-item-content" }, Ki = { class: "artifactuse-panel__list-item-title" }, Yi = { class: "artifactuse-panel__list-item-meta" }, Qi = { class: "artifactuse-panel__footer artifactuse-panel__footer--simple" }, Gi = {
1733
+ }, sn = { class: "artifactuse-panel__list" }, ln = { class: "artifactuse-panel__list-items" }, nn = ["onClick"], on = ["innerHTML"], rn = { class: "artifactuse-panel__list-item-content" }, cn = { class: "artifactuse-panel__list-item-title" }, un = { class: "artifactuse-panel__list-item-meta" }, dn = { class: "artifactuse-panel__footer artifactuse-panel__footer--simple" }, vn = {
1734
1734
  key: 0,
1735
1735
  href: "https://artifactuse.com",
1736
1736
  target: "_blank",
1737
1737
  rel: "noopener noreferrer",
1738
1738
  class: "artifactuse-panel__branding"
1739
- }, en = { class: "artifactuse-panel__header" }, tn = ["title"], an = { class: "artifactuse-panel__title" }, sn = ["innerHTML"], ln = { class: "artifactuse-panel__title-content" }, nn = { class: "artifactuse-panel__name" }, on = { class: "artifactuse-panel__meta" }, rn = { class: "artifactuse-panel__tabs" }, cn = ["disabled"], un = ["disabled"], dn = { class: "artifactuse-panel__actions" }, vn = ["title"], fn = {
1739
+ }, fn = { class: "artifactuse-panel__header" }, pn = ["title"], _n = { class: "artifactuse-panel__title" }, hn = ["innerHTML"], mn = { class: "artifactuse-panel__title-content" }, yn = { class: "artifactuse-panel__name" }, gn = { class: "artifactuse-panel__meta" }, kn = { class: "artifactuse-panel__tabs" }, wn = ["disabled"], bn = ["disabled"], Cn = { class: "artifactuse-panel__actions" }, xn = ["title"], $n = {
1740
1740
  key: 0,
1741
1741
  viewBox: "0 0 24 24",
1742
1742
  fill: "none",
1743
1743
  stroke: "currentColor",
1744
1744
  "stroke-width": "2"
1745
- }, pn = {
1745
+ }, Mn = {
1746
1746
  key: 1,
1747
1747
  viewBox: "0 0 24 24",
1748
1748
  fill: "none",
1749
1749
  stroke: "currentColor",
1750
1750
  "stroke-width": "2"
1751
- }, _n = {
1751
+ }, Tn = {
1752
1752
  key: 0,
1753
1753
  class: "artifactuse-panel__file-tabs"
1754
- }, hn = { class: "artifactuse-panel__file-tabs-scroll" }, mn = ["onClick"], yn = ["innerHTML"], gn = { class: "artifactuse-panel__file-tab-title" }, kn = ["onClick"], wn = {
1754
+ }, Ln = { class: "artifactuse-panel__file-tabs-scroll" }, Pn = ["onClick"], En = ["innerHTML"], An = { class: "artifactuse-panel__file-tab-title" }, Hn = ["onClick"], Bn = {
1755
1755
  key: 0,
1756
1756
  class: "artifactuse-panel__loading"
1757
- }, bn = {
1757
+ }, Sn = {
1758
1758
  key: 0,
1759
1759
  class: "artifactuse-panel__loading"
1760
- }, Cn = ["src"], xn = {
1760
+ }, zn = {
1761
+ key: 0,
1762
+ class: "artifactuse-panel__binary artifactuse-panel__binary--image"
1763
+ }, Vn = ["src", "alt"], In = {
1764
+ key: 1,
1765
+ class: "artifactuse-panel__binary artifactuse-panel__binary--audio"
1766
+ }, Fn = ["src"], Rn = {
1761
1767
  key: 2,
1768
+ class: "artifactuse-panel__binary artifactuse-panel__binary--video"
1769
+ }, qn = ["src"], On = {
1770
+ key: 3,
1771
+ class: "artifactuse-panel__binary artifactuse-panel__binary--pdf"
1772
+ }, Un = ["src"], Dn = {
1773
+ key: 4,
1774
+ class: "artifactuse-panel__binary artifactuse-panel__binary--font"
1775
+ }, jn = {
1776
+ key: 5,
1777
+ class: "artifactuse-panel__binary artifactuse-panel__binary--hex"
1778
+ }, Nn = { class: "artifactuse-panel__hex-dump" }, Wn = ["src"], Jn = {
1779
+ key: 1,
1762
1780
  class: "artifactuse-panel__no-preview"
1763
- }, $n = { class: "artifactuse-panel__edit" }, Mn = { class: "artifactuse-panel__console-type" }, Tn = { class: "artifactuse-panel__console-content" }, Ln = { class: "artifactuse-panel__console-timestamp" }, Pn = { class: "artifactuse-panel__footer" }, En = { class: "artifactuse-panel__footer-left" }, An = {
1781
+ }, Xn = { class: "artifactuse-panel__edit" }, Zn = { class: "artifactuse-panel__console-type" }, Kn = { class: "artifactuse-panel__console-content" }, Yn = { class: "artifactuse-panel__console-timestamp" }, Gn = { class: "artifactuse-panel__footer" }, Qn = { class: "artifactuse-panel__footer-left" }, eo = {
1764
1782
  key: 0,
1765
1783
  href: "https://artifactuse.com",
1766
1784
  target: "_blank",
1767
1785
  rel: "noopener noreferrer",
1768
1786
  class: "artifactuse-panel__branding"
1769
- }, Hn = {
1787
+ }, to = {
1770
1788
  key: 1,
1771
1789
  class: "artifactuse-panel__badge"
1772
- }, Bn = { class: "artifactuse-panel__footer-right" }, Sn = ["title"], zn = {
1790
+ }, ao = { class: "artifactuse-panel__footer-right" }, so = ["title"], lo = {
1773
1791
  key: 0,
1774
1792
  viewBox: "0 0 24 24",
1775
1793
  fill: "none",
1776
1794
  stroke: "currentColor",
1777
1795
  "stroke-width": "2"
1778
- }, Vn = {
1796
+ }, io = {
1779
1797
  key: 1,
1780
1798
  viewBox: "0 0 24 24",
1781
1799
  fill: "none",
1782
1800
  stroke: "currentColor",
1783
1801
  "stroke-width": "2"
1784
- }, In = {
1802
+ }, no = {
1785
1803
  key: 0,
1786
1804
  style: { position: "relative" }
1787
- }, Fn = {
1805
+ }, oo = {
1788
1806
  key: 0,
1789
1807
  class: "artifactuse-share-popup"
1790
- }, Rn = { class: "artifactuse-share-popup__header" }, qn = { class: "artifactuse-share-popup__title" }, On = { class: "artifactuse-share-popup__body" }, Un = {
1808
+ }, ro = { class: "artifactuse-share-popup__header" }, co = { class: "artifactuse-share-popup__title" }, uo = { class: "artifactuse-share-popup__body" }, vo = {
1791
1809
  key: 0,
1792
1810
  class: "artifactuse-share-popup__loading"
1793
- }, Dn = { key: 1 }, jn = { class: "artifactuse-share-popup__error" }, Nn = { class: "artifactuse-share-popup__error-text" }, Wn = { class: "artifactuse-share-popup__actions" }, Jn = {
1811
+ }, fo = { key: 1 }, po = { class: "artifactuse-share-popup__error" }, _o = { class: "artifactuse-share-popup__error-text" }, ho = { class: "artifactuse-share-popup__actions" }, mo = {
1794
1812
  key: 2,
1795
1813
  class: "artifactuse-share-popup__options"
1796
- }, Xn = { key: 3 }, Zn = {
1814
+ }, yo = { key: 3 }, go = {
1797
1815
  key: 0,
1798
1816
  class: "artifactuse-share-popup__loading"
1799
- }, Kn = {
1817
+ }, ko = {
1800
1818
  key: 1,
1801
1819
  class: "artifactuse-share-popup__empty"
1802
- }, Yn = {
1820
+ }, wo = {
1803
1821
  key: 2,
1804
1822
  class: "artifactuse-share-popup__artifact-list"
1805
- }, Qn = ["onClick"], Gn = { class: "artifactuse-share-popup__artifact-name" }, eo = { class: "artifactuse-share-popup__artifact-date" }, to = {
1823
+ }, bo = ["onClick"], Co = { class: "artifactuse-share-popup__artifact-name" }, xo = { class: "artifactuse-share-popup__artifact-date" }, $o = {
1806
1824
  key: 4,
1807
1825
  class: "artifactuse-share-popup__success"
1808
- }, ao = { class: "artifactuse-share-popup__link-wrapper" }, so = ["value"], lo = {
1826
+ }, Mo = { class: "artifactuse-share-popup__link-wrapper" }, To = ["value"], Lo = {
1809
1827
  key: 0,
1810
1828
  class: "artifactuse-share-popup__expiry"
1811
- }, io = { class: "artifactuse-share-popup__expiry-text" }, no = {
1829
+ }, Po = { class: "artifactuse-share-popup__expiry-text" }, Eo = {
1812
1830
  key: 1,
1813
1831
  class: "artifactuse-share-popup__save-prompt"
1814
- }, oo = {
1832
+ }, Ao = {
1815
1833
  key: 2,
1816
1834
  class: "artifactuse-panel__nav"
1817
- }, ro = ["disabled"], co = ["disabled"], uo = {
1835
+ }, Ho = ["disabled"], Bo = ["disabled"], So = {
1818
1836
  key: 0,
1819
1837
  class: "artifactuse-panel__artifact-list"
1820
- }, vo = { class: "artifactuse-panel__artifact-list-header" }, fo = { class: "artifactuse-panel__artifact-list-items" }, po = ["onClick"], _o = ["innerHTML"], ho = { class: "artifactuse-panel__artifact-item-content" }, mo = { class: "artifactuse-panel__artifact-item-title" }, yo = { class: "artifactuse-panel__artifact-item-meta" }, go = { class: "artifactuse-panel__artifact-item-index" }, To = {
1838
+ }, zo = { class: "artifactuse-panel__artifact-list-header" }, Vo = { class: "artifactuse-panel__artifact-list-items" }, Io = ["onClick"], Fo = ["innerHTML"], Ro = { class: "artifactuse-panel__artifact-item-content" }, qo = { class: "artifactuse-panel__artifact-item-title" }, Oo = { class: "artifactuse-panel__artifact-item-meta" }, Uo = { class: "artifactuse-panel__artifact-item-index" }, Ko = {
1821
1839
  __name: "ArtifactusePanel",
1822
1840
  props: {
1823
1841
  panelWidth: { type: Number, default: void 0 },
@@ -1826,419 +1844,456 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
1826
1844
  consolePanel: { type: Boolean, default: void 0 }
1827
1845
  },
1828
1846
  emits: ["close", "ai-request", "save", "export", "resize"],
1829
- setup(P, { emit: c }) {
1830
- var ft, pt;
1831
- const p = c, T = P, {
1832
- state: _,
1833
- activeArtifact: r,
1834
- artifactCount: q,
1835
- hasArtifacts: A,
1847
+ setup(L, { emit: d }) {
1848
+ var wt, bt;
1849
+ const _ = d, T = L, {
1850
+ state: f,
1851
+ activeArtifact: n,
1852
+ artifactCount: O,
1853
+ hasArtifacts: H,
1836
1854
  closePanel: g,
1837
- toggleFullscreen: o,
1855
+ toggleFullscreen: r,
1838
1856
  setViewMode: h,
1839
1857
  getPanelUrl: $,
1840
- openArtifact: V,
1858
+ openArtifact: I,
1841
1859
  instance: x
1842
- } = Re(), D = M(null), U = M(null), N = M(null), ee = M(null), B = M(null), re = M(null), K = M(!1), Z = M(!1), de = M(!0), m = M(!1), k = M(!1), ae = M(!1), Q = M([]), W = M(!1), ie = M(null), w = M(/* @__PURE__ */ new Set(["log", "warn", "error", "info"])), E = M(!1), i = M("options"), H = M(""), d = M(null), L = M(""), se = M(!1), ce = M(!1), be = M([]), Ce = M(!1), Le = M("");
1843
- let C = null, R = null, O = null, J = null;
1844
- const S = b(() => {
1845
- var l;
1846
- return ((l = x.editor) == null ? void 0 : l.isAvailable()) || !1;
1847
- }), te = M(
1848
- Math.min(Math.max(T.panelWidth ?? ((ft = x.config) == null ? void 0 : ft.panelWidth) ?? 65, 25), 75)
1849
- ), f = M(
1850
- Math.min(Math.max(T.splitPosition ?? ((pt = x.config) == null ? void 0 : pt.splitPosition) ?? 50, 20), 80)
1851
- ), j = b(() => r.value ? Ie(r.value.language) : ""), le = b(() => r.value ? `<svg viewBox="0 0 24 24" fill="currentColor">${Ze(r.value.language)}</svg>` : ""), G = b(() => {
1852
- if (!r.value) return null;
1853
- let l = $(r.value);
1854
- return l && r.value._refreshToken && (l += (l.includes("?") ? "&" : "?") + "_t=" + r.value._refreshToken), l;
1860
+ } = je(), N = M(null), D = M(null), J = M(null), ee = M(null), S = M(null), ce = M(null), K = M(!1), Z = M(!1), pe = M(!0), m = M(!1), w = M(!1), ie = M(!1), oe = M({});
1861
+ let W = null;
1862
+ const X = M([]), b = M(!1), B = M(null), u = M(/* @__PURE__ */ new Set(["log", "warn", "error", "info"])), z = M(!1), o = M("options"), P = M(""), se = M(null), te = M(""), be = M(!1), ge = M(!1), $e = M([]), C = M(!1), q = M("");
1863
+ let j = null, le = null, E = null, Q = null;
1864
+ const y = k(() => {
1865
+ var a;
1866
+ return ((a = x.editor) == null ? void 0 : a.isAvailable()) || !1;
1867
+ }), U = M(
1868
+ Math.min(Math.max(T.panelWidth ?? ((wt = x.config) == null ? void 0 : wt.panelWidth) ?? 65, 25), 75)
1869
+ ), Y = M(
1870
+ Math.min(Math.max(T.splitPosition ?? ((bt = x.config) == null ? void 0 : bt.splitPosition) ?? 50, 20), 80)
1871
+ ), ue = k(() => n.value ? Ue(n.value.language) : ""), Ae = k(() => n.value ? `<svg viewBox="0 0 24 24" fill="currentColor">${tt(n.value.language)}</svg>` : ""), Ce = k(() => {
1872
+ if (!n.value) return null;
1873
+ let a = $(n.value);
1874
+ return a && n.value._refreshToken && (a += (a.includes("?") ? "&" : "?") + "_t=" + n.value._refreshToken), a;
1855
1875
  });
1856
- b(() => !r.value || !_.artifacts.length ? -1 : _.artifacts.findIndex((l) => l.id === r.value.id));
1857
- const ye = b(() => r.value ? oa(r.value.language || "plaintext") : "plaintext"), ve = b(() => _.artifacts.filter((l) => !l.isInline)), Pe = b(() => r.value ? ve.value.findIndex((l) => l.id === r.value.id) : -1), qe = b(() => {
1858
- var l;
1859
- return ((l = x.config) == null ? void 0 : l.branding) !== !1;
1860
- }), Ct = b(() => {
1861
- var l, t;
1862
- return G.value ? ((l = r.value) == null ? void 0 : l.externalPreview) !== void 0 ? r.value.externalPreview : T.externalPreview !== void 0 ? T.externalPreview : ((t = x.config) == null ? void 0 : t.externalPreview) ?? !1 : !1;
1863
- }), Oe = b(() => Q.value.filter((l) => l.type === "error").length), Qe = b(() => Q.value.filter((l) => l.type === "warn").length), Ge = b(() => Q.value.filter((l) => l.type === "info").length), et = b(() => Q.value.filter((l) => l.type === "log").length), xt = b(() => Q.value.filter((l) => w.value.has(l.type)));
1864
- function He(l) {
1865
- const t = new Set(w.value);
1866
- t.has(l) ? t.delete(l) : t.add(l), w.value = t;
1867
- }
1868
- const $t = b(() => {
1869
- var l;
1870
- return (T.consolePanel ?? ((l = x == null ? void 0 : x.config) == null ? void 0 : l.consolePanel)) !== !1 && Q.value.length > 0;
1871
- }), Mt = b(() => {
1872
- var l;
1873
- return ((l = x.share) == null ? void 0 : l.enabled) !== !1;
1874
- }), tt = b(() => {
1875
- var l;
1876
- return ((l = x.share) == null ? void 0 : l.isAuthenticated()) || !1;
1877
- }), Tt = b(() => !r.value && !_.forceEmptyView ? Math.min(te.value, 30) : te.value), Ee = b(() => {
1878
- var l;
1879
- return ((l = x.config) == null ? void 0 : l.multiTab) === !0;
1880
- }), xe = b(() => _.forceEmptyView), at = b(() => Ee.value ? _.openTabs.map((l) => _.artifacts.find((t) => t.id === l)).filter(Boolean) : []);
1881
- function Ue(l) {
1882
- return `<svg viewBox="0 0 24 24" fill="currentColor">${Ze(l)}</svg>`;
1883
- }
1884
- function Lt(l) {
1885
- V(l);
1886
- }
1887
- function Pt(l) {
1888
- x.closeTab(l), _.openTabs.length === 0 && (k.value = !1);
1889
- }
1890
- function Et() {
1891
- k.value = !1, x.state.clearActiveArtifact();
1892
- }
1893
- function st(l) {
1894
- if (l.language !== "smartdiff") return null;
1876
+ k(() => !n.value || !f.artifacts.length ? -1 : f.artifacts.findIndex((a) => a.id === n.value.id));
1877
+ const Ve = k(() => n.value ? ma(n.value.language || "plaintext") : "plaintext"), _e = k(() => f.artifacts.filter((a) => !a.isInline)), He = k(() => n.value ? _e.value.findIndex((a) => a.id === n.value.id) : -1), Ne = k(() => {
1878
+ var a;
1879
+ return ((a = x.config) == null ? void 0 : a.branding) !== !1;
1880
+ }), lt = ["image", "audio", "video", "pdf", "font", "binary"], Be = k(() => {
1881
+ var a;
1882
+ return lt.includes((a = n.value) == null ? void 0 : a.language);
1883
+ }), we = k(() => Be.value ? n.value.language : null), We = k(() => we.value !== "font" || !n.value ? "" : `apfont_${n.value.id.replace(/[^a-zA-Z0-9]/g, "_")}`), Ht = k(() => {
1884
+ var a;
1885
+ if (we.value !== "binary" || !((a = n.value) != null && a.code)) return "";
1895
1886
  try {
1896
- const t = JSON.parse(l.code);
1887
+ const t = atob(n.value.code.slice(0, 684)), c = Math.min(t.length, 512), A = [];
1888
+ for (let F = 0; F < c; F += 16) {
1889
+ const he = t.slice(F, F + 16), de = Array.from(he).map((ae) => ae.charCodeAt(0).toString(16).padStart(2, "0")).join(" "), ve = Array.from(he).map((ae) => {
1890
+ const ye = ae.charCodeAt(0);
1891
+ return ye >= 32 && ye < 127 ? ae : ".";
1892
+ }).join("");
1893
+ A.push(`${F.toString(16).padStart(8, "0")} ${de.padEnd(47, " ")} ${ve}`);
1894
+ }
1895
+ return (c < t.length || n.value.code.length > 684) && A.push("..."), A.join(`
1896
+ `);
1897
+ } catch {
1898
+ return "(unable to decode)";
1899
+ }
1900
+ }), Bt = k(() => {
1901
+ var a, t;
1902
+ return Ce.value ? ((a = n.value) == null ? void 0 : a.externalPreview) !== void 0 ? n.value.externalPreview : T.externalPreview !== void 0 ? T.externalPreview : ((t = x.config) == null ? void 0 : t.externalPreview) ?? !1 : !1;
1903
+ }), Je = k(() => X.value.filter((a) => a.type === "error").length), it = k(() => X.value.filter((a) => a.type === "warn").length), nt = k(() => X.value.filter((a) => a.type === "info").length), ot = k(() => X.value.filter((a) => a.type === "log").length), St = k(() => X.value.filter((a) => u.value.has(a.type)));
1904
+ function Ie(a) {
1905
+ const t = new Set(u.value);
1906
+ t.has(a) ? t.delete(a) : t.add(a), u.value = t;
1907
+ }
1908
+ const zt = k(() => {
1909
+ var a;
1910
+ return (T.consolePanel ?? ((a = x == null ? void 0 : x.config) == null ? void 0 : a.consolePanel)) !== !1 && X.value.length > 0;
1911
+ }), Vt = k(() => {
1912
+ var a;
1913
+ return ((a = x.share) == null ? void 0 : a.enabled) !== !1;
1914
+ }), rt = k(() => {
1915
+ var a;
1916
+ return ((a = x.share) == null ? void 0 : a.isAuthenticated()) || !1;
1917
+ }), It = k(() => !n.value && !f.forceEmptyView ? Math.min(U.value, 30) : U.value), Se = k(() => {
1918
+ var a;
1919
+ return ((a = x.config) == null ? void 0 : a.multiTab) === !0;
1920
+ }), Me = k(() => f.forceEmptyView), ct = k(() => Se.value ? f.openTabs.map((a) => f.artifacts.find((t) => t.id === a)).filter(Boolean) : []);
1921
+ function Xe(a) {
1922
+ return `<svg viewBox="0 0 24 24" fill="currentColor">${tt(a)}</svg>`;
1923
+ }
1924
+ function Ft(a) {
1925
+ I(a);
1926
+ }
1927
+ function Fe(a) {
1928
+ if (!(a != null && a.code)) return null;
1929
+ if (oe.value[a.id]) return oe.value[a.id];
1930
+ const t = a.fileExtension || a.language, c = ba(a.code, Mt(t));
1931
+ return oe.value[a.id] = c, c;
1932
+ }
1933
+ function ut(a) {
1934
+ oe.value[a] && (ka(oe.value[a]), delete oe.value[a]);
1935
+ }
1936
+ function Rt(a) {
1937
+ ut(a), x.closeTab(a), f.openTabs.length === 0 && (w.value = !1);
1938
+ }
1939
+ function qt() {
1940
+ w.value = !1, x.state.clearActiveArtifact();
1941
+ }
1942
+ function dt(a) {
1943
+ if (a.language !== "smartdiff") return null;
1944
+ try {
1945
+ const t = JSON.parse(a.code);
1897
1946
  if (t.oldCode === void 0 || t.newCode === void 0) return null;
1898
- const u = t.language || "plaintext", z = mt() && window.Prism.languages[u], X = ra(t.oldCode, t.newCode).split(`
1947
+ const c = t.language || "plaintext", A = $t() && window.Prism.languages[c], F = ya(t.oldCode, t.newCode).split(`
1899
1948
  `);
1900
- return { html: X.map((pe) => {
1901
- const _e = pe[0], fe = pe.slice(1), ke = z ? window.Prism.highlight(fe, z, u) : fe;
1902
- return _e === "-" ? `<span class="token deleted">${ke}</span>` : _e === "+" ? `<span class="token inserted">${ke}</span>` : ke;
1949
+ return { html: F.map((de) => {
1950
+ const ve = de[0], ae = de.slice(1), ye = A ? window.Prism.highlight(ae, A, c) : ae;
1951
+ return ve === "-" ? `<span class="token deleted">${ye}</span>` : ve === "+" ? `<span class="token inserted">${ye}</span>` : ye;
1903
1952
  }).join(`
1904
- `), lineCount: X.length };
1953
+ `), lineCount: F.length };
1905
1954
  } catch {
1906
1955
  return null;
1907
1956
  }
1908
1957
  }
1909
- function At() {
1910
- var l;
1911
- if (ee.value && ((l = r.value) != null && l.code)) {
1912
- const t = st(r.value), u = t ? t.lineCount : r.value.code.split(`
1958
+ function Ot() {
1959
+ var a;
1960
+ if (ee.value && ((a = n.value) != null && a.code)) {
1961
+ const t = dt(n.value), c = t ? t.lineCount : n.value.code.split(`
1913
1962
  `).length;
1914
- ee.value.innerHTML = Array.from({ length: u }, (z, X) => `<div>${X + 1}</div>`).join("");
1963
+ ee.value.innerHTML = Array.from({ length: c }, (A, F) => `<div>${F + 1}</div>`).join("");
1915
1964
  }
1916
1965
  }
1917
- function Ht() {
1918
- var l;
1919
- if (U.value && mt() && ((l = r.value) != null && l.code)) {
1920
- const t = st(r.value);
1966
+ function Ut() {
1967
+ var a;
1968
+ if (D.value && $t() && ((a = n.value) != null && a.code)) {
1969
+ const t = dt(n.value);
1921
1970
  if (t)
1922
- U.value.innerHTML = t.html;
1971
+ D.value.innerHTML = t.html;
1923
1972
  else {
1924
- const u = window.Prism.languages[ye.value];
1925
- u ? U.value.innerHTML = window.Prism.highlight(
1926
- r.value.code,
1927
- u,
1928
- ye.value
1929
- ) : U.value.textContent = r.value.code;
1973
+ const c = window.Prism.languages[Ve.value];
1974
+ c ? D.value.innerHTML = window.Prism.highlight(
1975
+ n.value.code,
1976
+ c,
1977
+ Ve.value
1978
+ ) : D.value.textContent = n.value.code;
1930
1979
  }
1931
- U.value.dataset.highlighted = "true", we(() => {
1932
- Bt();
1980
+ D.value.dataset.highlighted = "true", xe(() => {
1981
+ Dt();
1933
1982
  });
1934
1983
  }
1935
1984
  }
1936
- function Bt() {
1985
+ function Dt() {
1937
1986
  var t;
1938
- const l = (t = U.value) == null ? void 0 : t.closest("pre");
1939
- if (l && B.value && ee.value) {
1940
- const z = window.getComputedStyle(l).backgroundColor;
1941
- z && z !== "rgba(0, 0, 0, 0)" && z !== "transparent" && (B.value.style.backgroundColor = z, ee.value.style.backgroundColor = z);
1987
+ const a = (t = D.value) == null ? void 0 : t.closest("pre");
1988
+ if (a && S.value && ee.value) {
1989
+ const A = window.getComputedStyle(a).backgroundColor;
1990
+ A && A !== "rgba(0, 0, 0, 0)" && A !== "transparent" && (S.value.style.backgroundColor = A, ee.value.style.backgroundColor = A);
1942
1991
  }
1943
1992
  }
1944
- function St() {
1945
- B.value && (B.value.style.backgroundColor = ""), ee.value && (ee.value.style.backgroundColor = "");
1993
+ function jt() {
1994
+ S.value && (S.value.style.backgroundColor = ""), ee.value && (ee.value.style.backgroundColor = "");
1946
1995
  }
1947
- function Be() {
1948
- we(() => {
1949
- At(), Ht();
1996
+ function Re() {
1997
+ xe(() => {
1998
+ Ot(), Ut();
1950
1999
  });
1951
2000
  }
1952
- function lt() {
1953
- !S.value || !re.value || !r.value || (De(), J = x.editor.create(re.value, {
1954
- code: r.value.code || "",
1955
- language: r.value.editorLanguage || r.value.language || "plaintext",
2001
+ function vt() {
2002
+ !y.value || !ce.value || !n.value || (Ze(), Q = x.editor.create(ce.value, {
2003
+ code: n.value.code || "",
2004
+ language: n.value.editorLanguage || n.value.language || "plaintext",
1956
2005
  sdkTheme: x.getTheme()
1957
2006
  }));
1958
2007
  }
1959
- function De() {
1960
- J && (J.destroy(), J = null);
2008
+ function Ze() {
2009
+ Q && (Q.destroy(), Q = null);
1961
2010
  }
1962
- function zt() {
1963
- if (!J || !r.value) return;
1964
- const l = J.getCode();
2011
+ function Nt() {
2012
+ if (!Q || !n.value) return;
2013
+ const a = Q.getCode();
1965
2014
  x.emit("edit:save", {
1966
- artifactId: r.value.id,
1967
- artifact: r.value,
1968
- code: l
2015
+ artifactId: n.value.id,
2016
+ artifact: n.value,
2017
+ code: a
1969
2018
  });
1970
2019
  }
1971
- function Vt() {
1972
- clearTimeout(O), de.value = !1, D.value && r.value && (x.bridge.setIframe(D.value), x.bridge.loadArtifact(r.value));
2020
+ function Wt() {
2021
+ clearTimeout(E), pe.value = !1, N.value && n.value && (x.bridge.setIframe(N.value), x.bridge.loadArtifact(n.value));
1973
2022
  }
1974
- function It() {
1975
- clearTimeout(O), de.value = !1;
2023
+ function Jt() {
2024
+ clearTimeout(E), pe.value = !1;
1976
2025
  }
1977
- function Ft() {
1978
- clearTimeout(O), O = setTimeout(() => {
1979
- de.value = !1;
2026
+ function Xt() {
2027
+ clearTimeout(E), E = setTimeout(() => {
2028
+ pe.value = !1;
1980
2029
  }, 1e3);
1981
2030
  }
1982
- async function Rt() {
1983
- if (r.value)
2031
+ async function Zt() {
2032
+ if (n.value)
1984
2033
  try {
1985
- await navigator.clipboard.writeText(r.value.code), K.value = !0, setTimeout(() => {
2034
+ await navigator.clipboard.writeText(n.value.code), K.value = !0, setTimeout(() => {
1986
2035
  K.value = !1;
1987
2036
  }, 2e3);
1988
- } catch (l) {
1989
- console.error("Failed to copy:", l);
2037
+ } catch (a) {
2038
+ console.error("Failed to copy:", a);
1990
2039
  }
1991
2040
  }
1992
- function qt() {
1993
- if (!r.value) return;
1994
- const { code: l, language: t, editorLanguage: u, title: z } = r.value, X = Ke(u || t), ge = `${z.toLowerCase().replace(/\s+/g, "-")}.${X}`, pe = new Blob([l], { type: "text/plain" }), _e = URL.createObjectURL(pe), fe = document.createElement("a");
1995
- fe.href = _e, fe.download = ge, document.body.appendChild(fe), fe.click(), document.body.removeChild(fe), URL.revokeObjectURL(_e);
2041
+ function Kt() {
2042
+ if (!n.value) return;
2043
+ const { code: a, language: t, editorLanguage: c, title: A } = n.value, F = at(c || t), he = `${A.toLowerCase().replace(/\s+/g, "-")}.${F}`, de = new Blob([a], { type: "text/plain" }), ve = URL.createObjectURL(de), ae = document.createElement("a");
2044
+ ae.href = ve, ae.download = he, document.body.appendChild(ae), ae.click(), document.body.removeChild(ae), URL.revokeObjectURL(ve);
1996
2045
  }
1997
- async function Ot() {
1998
- if (!(ae.value || ve.value.length === 0)) {
1999
- ae.value = !0;
2046
+ async function Yt() {
2047
+ if (!(ie.value || _e.value.length === 0)) {
2048
+ ie.value = !0;
2000
2049
  try {
2001
- const l = new ua(), t = /* @__PURE__ */ new Map();
2002
- for (const _e of ve.value) {
2003
- if (!_e.code) continue;
2004
- const fe = Ke(_e.editorLanguage || _e.language);
2005
- let ke = (_e.title || "untitled").toLowerCase().replace(/\s+/g, "-").replace(/[^a-z0-9-_]/g, ""), Je = `${ke}.${fe}`;
2006
- const Xe = t.get(Je) || 0;
2007
- Xe > 0 && (Je = `${ke}-${Xe}.${fe}`), t.set(`${ke}.${fe}`, Xe + 1), l.file(Je, _e.code);
2050
+ const a = new wa(), t = /* @__PURE__ */ new Map();
2051
+ for (const ve of _e.value) {
2052
+ if (!ve.code) continue;
2053
+ const ae = at(ve.editorLanguage || ve.language);
2054
+ let ye = (ve.title || "untitled").toLowerCase().replace(/\s+/g, "-").replace(/[^a-z0-9-_]/g, ""), Qe = `${ye}.${ae}`;
2055
+ const et = t.get(Qe) || 0;
2056
+ et > 0 && (Qe = `${ye}-${et}.${ae}`), t.set(`${ye}.${ae}`, et + 1), a.file(Qe, ve.code);
2008
2057
  }
2009
- const u = await l.generateAsync({ type: "blob" }), X = `artifacts-${(/* @__PURE__ */ new Date()).toISOString().slice(0, 10)}.zip`, ge = URL.createObjectURL(u), pe = document.createElement("a");
2010
- pe.href = ge, pe.download = X, document.body.appendChild(pe), pe.click(), document.body.removeChild(pe), URL.revokeObjectURL(ge);
2011
- } catch (l) {
2012
- console.error("Failed to create ZIP:", l);
2058
+ const c = await a.generateAsync({ type: "blob" }), F = `artifacts-${(/* @__PURE__ */ new Date()).toISOString().slice(0, 10)}.zip`, he = URL.createObjectURL(c), de = document.createElement("a");
2059
+ de.href = he, de.download = F, document.body.appendChild(de), de.click(), document.body.removeChild(de), URL.revokeObjectURL(he);
2060
+ } catch (a) {
2061
+ console.error("Failed to create ZIP:", a);
2013
2062
  } finally {
2014
- ae.value = !1;
2063
+ ie.value = !1;
2015
2064
  }
2016
2065
  }
2017
2066
  }
2018
- function Ut() {
2019
- if (E.value) {
2020
- E.value = !1;
2067
+ function Gt() {
2068
+ if (z.value) {
2069
+ z.value = !1;
2021
2070
  return;
2022
2071
  }
2023
- r.value && (i.value = "options", H.value = "", d.value = null, L.value = "", se.value = !1, ce.value = !1, be.value = [], Ce.value = !1, Le.value = "", E.value = !0);
2072
+ n.value && (o.value = "options", P.value = "", se.value = null, te.value = "", be.value = !1, ge.value = !1, $e.value = [], C.value = !1, q.value = "", z.value = !0);
2024
2073
  }
2025
- function Dt() {
2026
- E.value = !1;
2074
+ function Qt() {
2075
+ z.value = !1;
2027
2076
  }
2028
- function it(l) {
2029
- return l ? new Date(l).toLocaleDateString("en-US", { month: "short", day: "numeric", year: "numeric" }) : "";
2077
+ function ft(a) {
2078
+ return a ? new Date(a).toLocaleDateString("en-US", { month: "short", day: "numeric", year: "numeric" }) : "";
2030
2079
  }
2031
- async function nt() {
2032
- if (!(!r.value || !x.share)) {
2033
- i.value = "loading", L.value = "";
2080
+ async function pt() {
2081
+ if (!(!n.value || !x.share)) {
2082
+ o.value = "loading", te.value = "";
2034
2083
  try {
2035
- const l = await x.share.share(r.value);
2036
- H.value = l.url, d.value = l.expiresAt, ce.value = !1, i.value = "success";
2037
- } catch (l) {
2038
- L.value = l.message || "Failed to create share link", i.value = "error";
2084
+ const a = await x.share.share(n.value);
2085
+ P.value = a.url, se.value = a.expiresAt, ge.value = !1, o.value = "success";
2086
+ } catch (a) {
2087
+ te.value = a.message || "Failed to create share link", o.value = "error";
2039
2088
  }
2040
2089
  }
2041
2090
  }
2042
- async function ot() {
2043
- if (tt.value)
2044
- je();
2091
+ async function _t() {
2092
+ if (rt.value)
2093
+ Ke();
2045
2094
  else {
2046
- i.value = "loading";
2095
+ o.value = "loading";
2047
2096
  try {
2048
- await x.share.openAuthPopup(), je();
2049
- } catch (l) {
2050
- l.message === "Authentication cancelled" ? i.value = "options" : (L.value = l.message || "Authentication failed", i.value = "error");
2097
+ await x.share.openAuthPopup(), Ke();
2098
+ } catch (a) {
2099
+ a.message === "Authentication cancelled" ? o.value = "options" : (te.value = a.message || "Authentication failed", o.value = "error");
2051
2100
  }
2052
2101
  }
2053
2102
  }
2054
- async function je() {
2055
- if (!(!r.value || !x.share)) {
2056
- i.value = "loading", L.value = "";
2103
+ async function Ke() {
2104
+ if (!(!n.value || !x.share)) {
2105
+ o.value = "loading", te.value = "";
2057
2106
  try {
2058
- const l = await x.share.save(r.value);
2059
- H.value = l.url, d.value = null, ce.value = !0, i.value = "success";
2060
- } catch (l) {
2061
- L.value = l.message || "Failed to save artifact", i.value = "error";
2107
+ const a = await x.share.save(n.value);
2108
+ P.value = a.url, se.value = null, ge.value = !0, o.value = "success";
2109
+ } catch (a) {
2110
+ te.value = a.message || "Failed to save artifact", o.value = "error";
2062
2111
  }
2063
2112
  }
2064
2113
  }
2065
- function jt() {
2066
- ce.value ? je() : nt();
2114
+ function ea() {
2115
+ ge.value ? Ke() : pt();
2067
2116
  }
2068
- async function Nt() {
2069
- var l;
2117
+ async function ta() {
2118
+ var a;
2070
2119
  if (x.share) {
2071
- if (!tt.value) {
2072
- i.value = "loading";
2120
+ if (!rt.value) {
2121
+ o.value = "loading";
2073
2122
  try {
2074
2123
  await x.share.openAuthPopup();
2075
2124
  } catch (t) {
2076
- t.message === "Authentication cancelled" ? i.value = "options" : (L.value = t.message || "Authentication failed", i.value = "error");
2125
+ t.message === "Authentication cancelled" ? o.value = "options" : (te.value = t.message || "Authentication failed", o.value = "error");
2077
2126
  return;
2078
2127
  }
2079
2128
  }
2080
- i.value = "update-list", Ce.value = !0;
2129
+ o.value = "update-list", C.value = !0;
2081
2130
  try {
2082
- const t = ((l = r.value) == null ? void 0 : l.language) || null, u = await x.share.listArtifacts(t);
2083
- be.value = u.projects || [];
2131
+ const t = ((a = n.value) == null ? void 0 : a.language) || null, c = await x.share.listArtifacts(t);
2132
+ $e.value = c.projects || [];
2084
2133
  } catch (t) {
2085
- L.value = t.message || "Failed to load artifacts", i.value = "error";
2134
+ te.value = t.message || "Failed to load artifacts", o.value = "error";
2086
2135
  } finally {
2087
- Ce.value = !1;
2136
+ C.value = !1;
2088
2137
  }
2089
2138
  }
2090
2139
  }
2091
- async function Wt(l) {
2092
- var u, z;
2093
- if (!r.value || !x.share) return;
2094
- const t = (u = l.project) == null ? void 0 : u.uuid;
2140
+ async function aa(a) {
2141
+ var c, A;
2142
+ if (!n.value || !x.share) return;
2143
+ const t = (c = a.project) == null ? void 0 : c.uuid;
2095
2144
  if (t) {
2096
- i.value = "loading", L.value = "";
2145
+ o.value = "loading", te.value = "";
2097
2146
  try {
2098
- const X = await x.share.updateArtifact(t, r.value);
2099
- H.value = X.url || "", d.value = null, ce.value = !0, Le.value = ((z = l.project) == null ? void 0 : z.name) || "Untitled", i.value = "success";
2100
- } catch (X) {
2101
- L.value = X.message || "Failed to update artifact", i.value = "error";
2147
+ const F = await x.share.updateArtifact(t, n.value);
2148
+ P.value = F.url || "", se.value = null, ge.value = !0, q.value = ((A = a.project) == null ? void 0 : A.name) || "Untitled", o.value = "success";
2149
+ } catch (F) {
2150
+ te.value = F.message || "Failed to update artifact", o.value = "error";
2102
2151
  }
2103
2152
  }
2104
2153
  }
2105
- async function Jt() {
2106
- if (H.value)
2154
+ async function sa() {
2155
+ if (P.value)
2107
2156
  try {
2108
- await navigator.clipboard.writeText(H.value), se.value = !0, setTimeout(() => {
2109
- se.value = !1;
2157
+ await navigator.clipboard.writeText(P.value), be.value = !0, setTimeout(() => {
2158
+ be.value = !1;
2110
2159
  }, 2e3);
2111
- } catch (l) {
2112
- console.error("Failed to copy link:", l);
2160
+ } catch (a) {
2161
+ console.error("Failed to copy link:", a);
2113
2162
  }
2114
2163
  }
2115
- function rt() {
2116
- G.value && window.open(G.value, "_blank", "noopener,noreferrer");
2164
+ function ht() {
2165
+ Ce.value && window.open(Ce.value, "_blank", "noopener,noreferrer");
2117
2166
  }
2118
- function Xt() {
2119
- ee.value && B.value && (ee.value.style.transform = `translateY(-${B.value.scrollTop}px)`);
2167
+ function la() {
2168
+ ee.value && S.value && (ee.value.style.transform = `translateY(-${S.value.scrollTop}px)`);
2120
2169
  }
2121
- function Zt() {
2170
+ function ia() {
2122
2171
  Z.value = !Z.value;
2123
2172
  }
2124
- function ct(l) {
2125
- k.value = !0, V(l), Z.value = !1;
2173
+ function mt(a) {
2174
+ w.value = !0, I(a), Z.value = !1;
2126
2175
  }
2127
- function Kt() {
2128
- const l = Pe.value - 1;
2129
- l >= 0 && V(ve.value[l]);
2176
+ function na() {
2177
+ const a = He.value - 1;
2178
+ a >= 0 && I(_e.value[a]);
2130
2179
  }
2131
- function Yt() {
2132
- const l = Pe.value + 1;
2133
- l < ve.value.length && V(ve.value[l]);
2180
+ function oa() {
2181
+ const a = He.value + 1;
2182
+ a < _e.value.length && I(_e.value[a]);
2134
2183
  }
2135
- function ut(l) {
2184
+ function yt(a) {
2136
2185
  const t = document.querySelector(".artifactuse-panel__nav");
2137
- t && !t.contains(l.target) && (Z.value = !1);
2138
- }
2139
- let $e = null;
2140
- function Qt(l) {
2141
- $e = {
2142
- startX: l.clientX,
2143
- startWidth: te.value
2144
- }, document.addEventListener("mousemove", dt), document.addEventListener("mouseup", Ne), document.body.style.cursor = "ew-resize", document.body.style.userSelect = "none", document.querySelectorAll("iframe").forEach((u) => u.style.pointerEvents = "none");
2145
- }
2146
- function dt(l) {
2147
- if (!$e) return;
2148
- const t = window.innerWidth, z = ($e.startX - l.clientX) / t * 100, X = $e.startWidth + z;
2149
- te.value = Math.min(Math.max(X, 25), 75), p("resize", { width: te.value });
2150
- }
2151
- function Ne() {
2152
- const l = $e !== null;
2153
- $e = null, document.removeEventListener("mousemove", dt), document.removeEventListener("mouseup", Ne), document.body.style.cursor = "", document.body.style.userSelect = "", document.querySelectorAll("iframe").forEach((u) => u.style.pointerEvents = ""), l && p("resize", { width: te.value });
2154
- }
2155
- let Ae = null;
2156
- function Gt(l) {
2157
- if (!N.value) return;
2158
- const t = N.value.getBoundingClientRect();
2159
- Ae = {
2160
- startX: l.clientX,
2161
- startPosition: f.value,
2186
+ t && !t.contains(a.target) && (Z.value = !1);
2187
+ }
2188
+ let Te = null;
2189
+ function ra(a) {
2190
+ Te = {
2191
+ startX: a.clientX,
2192
+ startWidth: U.value
2193
+ }, document.addEventListener("mousemove", gt), document.addEventListener("mouseup", Ye), document.body.style.cursor = "ew-resize", document.body.style.userSelect = "none", document.querySelectorAll("iframe").forEach((c) => c.style.pointerEvents = "none");
2194
+ }
2195
+ function gt(a) {
2196
+ if (!Te) return;
2197
+ const t = window.innerWidth, A = (Te.startX - a.clientX) / t * 100, F = Te.startWidth + A;
2198
+ U.value = Math.min(Math.max(F, 25), 75), _("resize", { width: U.value });
2199
+ }
2200
+ function Ye() {
2201
+ const a = Te !== null;
2202
+ Te = null, document.removeEventListener("mousemove", gt), document.removeEventListener("mouseup", Ye), document.body.style.cursor = "", document.body.style.userSelect = "", document.querySelectorAll("iframe").forEach((c) => c.style.pointerEvents = ""), a && _("resize", { width: U.value });
2203
+ }
2204
+ let ze = null;
2205
+ function ca(a) {
2206
+ if (!J.value) return;
2207
+ const t = J.value.getBoundingClientRect();
2208
+ ze = {
2209
+ startX: a.clientX,
2210
+ startPosition: Y.value,
2162
2211
  contentLeft: t.left,
2163
2212
  contentWidth: t.width
2164
- }, document.addEventListener("mousemove", vt), document.addEventListener("mouseup", We), document.body.style.cursor = "col-resize", document.body.style.userSelect = "none", document.querySelectorAll("iframe").forEach((z) => z.style.pointerEvents = "none");
2213
+ }, document.addEventListener("mousemove", kt), document.addEventListener("mouseup", Ge), document.body.style.cursor = "col-resize", document.body.style.userSelect = "none", document.querySelectorAll("iframe").forEach((A) => A.style.pointerEvents = "none");
2165
2214
  }
2166
- function vt(l) {
2167
- if (!Ae) return;
2168
- const u = (l.clientX - Ae.contentLeft) / Ae.contentWidth * 100;
2169
- f.value = Math.min(Math.max(u, 20), 80);
2215
+ function kt(a) {
2216
+ if (!ze) return;
2217
+ const c = (a.clientX - ze.contentLeft) / ze.contentWidth * 100;
2218
+ Y.value = Math.min(Math.max(c, 20), 80);
2170
2219
  }
2171
- function We() {
2172
- Ae = null, document.removeEventListener("mousemove", vt), document.removeEventListener("mouseup", We), document.body.style.cursor = "", document.body.style.userSelect = "", document.querySelectorAll("iframe").forEach((t) => t.style.pointerEvents = "");
2220
+ function Ge() {
2221
+ ze = null, document.removeEventListener("mousemove", kt), document.removeEventListener("mouseup", Ge), document.body.style.cursor = "", document.body.style.userSelect = "", document.querySelectorAll("iframe").forEach((t) => t.style.pointerEvents = "");
2173
2222
  }
2174
- return oe(r, (l, t) => {
2175
- l && (t && t.isPreviewable !== l.isPreviewable && (m.value = !0, setTimeout(() => {
2223
+ return ne(n, (a, t) => {
2224
+ a && (t && t.isPreviewable !== a.isPreviewable && (m.value = !0, setTimeout(() => {
2176
2225
  m.value = !1;
2177
- }, 150)), (!t || l.id !== t.id) && (St(), de.value = !0, Ft()), (!t || l.id !== t.id || l.code !== t.code) && (Be(), _.viewMode === "edit" && (!t || l.id !== t.id ? we(() => lt()) : J && J.setCode(l.code || "")), clearTimeout(R), R = setTimeout(() => {
2178
- D.value && l.isPreviewable && x.bridge.loadArtifact(l);
2226
+ }, 150)), (!t || a.id !== t.id) && (jt(), pe.value = !0, Xt(), lt.includes(a.language) && f.viewMode !== "preview" && h("preview")), (!t || a.id !== t.id || a.code !== t.code) && (Re(), f.viewMode === "edit" && (!t || a.id !== t.id ? xe(() => vt()) : Q && Q.setCode(a.code || "")), clearTimeout(le), le = setTimeout(() => {
2227
+ N.value && a.isPreviewable && x.bridge.loadArtifact(a);
2179
2228
  }, 500)));
2180
- }, { deep: !0 }), oe(() => _.viewMode, (l) => {
2181
- (l === "code" || l === "split") && Be(), l === "edit" && we(() => lt());
2182
- }), oe(() => _.isPanelOpen, (l) => {
2183
- l && r.value && Be(), l || De();
2184
- }), oe(() => {
2185
- var l;
2186
- return (l = r.value) == null ? void 0 : l.id;
2229
+ }, { deep: !0 }), ne(() => f.viewMode, (a) => {
2230
+ (a === "code" || a === "split") && Re(), a === "edit" && xe(() => vt());
2231
+ }), ne(() => f.isPanelOpen, (a) => {
2232
+ a && n.value && Re(), a || Ze();
2233
+ }), ne(() => {
2234
+ var a;
2235
+ return (a = n.value) == null ? void 0 : a.id;
2187
2236
  }, () => {
2188
- Q.value = [], W.value = !1;
2189
- }), oe([Q, W], () => {
2190
- ie.value && W.value && we(() => {
2191
- ie.value.scrollTop = ie.value.scrollHeight;
2237
+ X.value = [], b.value = !1;
2238
+ }), ne([X, b], () => {
2239
+ B.value && b.value && xe(() => {
2240
+ B.value.scrollTop = B.value.scrollHeight;
2192
2241
  });
2193
- }), oe(() => T.panelWidth, (l) => {
2194
- l !== void 0 && (te.value = Math.min(Math.max(l, 25), 75));
2195
- }), oe(() => T.splitPosition, (l) => {
2196
- l !== void 0 && (f.value = Math.min(Math.max(l, 20), 80));
2197
- }), Te(() => {
2198
- x.on("ai:request", (l) => p("ai-request", l)), x.on("save:request", (l) => p("save", l)), x.on("export:complete", (l) => p("export", l)), x && (C = x.on("console:log", ({ entry: l }) => {
2199
- Q.value = [...Q.value, l].slice(-500), l.type === "error" && (W.value = !0);
2200
- })), document.addEventListener("click", ut), _.isPanelOpen && r.value && Be();
2201
- }), Ye(() => {
2202
- Ne(), We(), De(), document.removeEventListener("click", ut), clearTimeout(R), clearTimeout(O), C && C();
2203
- }), (l, t) => (a(), Me(ze, { name: "artifactuse-panel" }, {
2204
- default: Ve(() => [
2205
- y(_).isPanelOpen ? (a(), s("div", {
2242
+ }), ne(() => T.panelWidth, (a) => {
2243
+ a !== void 0 && (U.value = Math.min(Math.max(a, 25), 75));
2244
+ }), ne(() => T.splitPosition, (a) => {
2245
+ a !== void 0 && (Y.value = Math.min(Math.max(a, 20), 80));
2246
+ }), Ee(() => {
2247
+ x.on("ai:request", (a) => _("ai-request", a)), x.on("save:request", (a) => _("save", a)), x.on("export:complete", (a) => _("export", a)), x && (j = x.on("console:log", ({ entry: a }) => {
2248
+ X.value = [...X.value, a].slice(-500), a.type === "error" && (b.value = !0);
2249
+ })), document.addEventListener("click", yt), f.isPanelOpen && n.value && Re();
2250
+ }), ne([we, We], ([a, t]) => {
2251
+ var c;
2252
+ if (W && (W.remove(), W = null), a === "font" && t && ((c = n.value) != null && c.code)) {
2253
+ const A = n.value.fileExtension || "ttf", F = Mt(A);
2254
+ W = document.createElement("style"), W.textContent = `@font-face { font-family: "${t}"; src: url("data:${F};base64,${n.value.code}"); }`, document.head.appendChild(W);
2255
+ }
2256
+ }), st(() => {
2257
+ Ye(), Ge(), Ze(), document.removeEventListener("click", yt), clearTimeout(le), clearTimeout(E), j && j(), W && (W.remove(), W = null), Object.keys(oe.value).forEach(ut);
2258
+ }), (a, t) => (s(), Pe(qe, { name: "artifactuse-panel" }, {
2259
+ default: Oe(() => [
2260
+ p(f).isPanelOpen ? (s(), l("div", {
2206
2261
  key: 0,
2207
- class: I(["artifactuse-panel", {
2208
- "artifactuse-panel--fullscreen": y(_).isFullscreen,
2209
- "artifactuse-panel--list": !y(r) && y(A) && !y(_).forceEmptyView,
2210
- "artifactuse-panel--empty": !y(A) && !y(_).forceEmptyView
2262
+ class: R(["artifactuse-panel", {
2263
+ "artifactuse-panel--fullscreen": p(f).isFullscreen,
2264
+ "artifactuse-panel--list": !p(n) && p(H) && !p(f).forceEmptyView,
2265
+ "artifactuse-panel--empty": !p(H) && !p(f).forceEmptyView
2211
2266
  }]),
2212
- style: Se(y(_).isFullscreen ? void 0 : { width: `${Tt.value}%` })
2267
+ style: Le(p(f).isFullscreen ? void 0 : { width: `${It.value}%` })
2213
2268
  }, [
2214
- y(_).isFullscreen ? v("", !0) : (a(), s("div", {
2269
+ p(f).isFullscreen ? v("", !0) : (s(), l("div", {
2215
2270
  key: 0,
2216
2271
  class: "artifactuse-panel__resize-handle",
2217
- onMousedown: he(Qt, ["prevent"])
2272
+ onMousedown: me(ra, ["prevent"])
2218
2273
  }, [...t[19] || (t[19] = [
2219
2274
  e("div", { class: "artifactuse-panel__resize-handle-line" }, null, -1)
2220
2275
  ])], 32)),
2221
- !y(A) || xe.value ? (a(), s(F, { key: 1 }, [
2222
- e("header", xi, [
2223
- e("div", $i, [
2224
- e("span", Mi, [
2225
- xe.value ? (a(), s("svg", Ti, [...t[20] || (t[20] = [
2276
+ !p(H) || Me.value ? (s(), l(V, { key: 1 }, [
2277
+ e("header", Vi, [
2278
+ e("div", Ii, [
2279
+ e("span", Fi, [
2280
+ Me.value ? (s(), l("svg", Ri, [...t[20] || (t[20] = [
2226
2281
  e("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" }, null, -1),
2227
2282
  e("polyline", { points: "14 2 14 8 20 8" }, null, -1)
2228
- ])])) : (a(), s("svg", Li, [...t[21] || (t[21] = [
2283
+ ])])) : (s(), l("svg", qi, [...t[21] || (t[21] = [
2229
2284
  e("polyline", { points: "16 18 22 12 16 6" }, null, -1),
2230
2285
  e("polyline", { points: "8 6 2 12 8 18" }, null, -1)
2231
2286
  ])]))
2232
2287
  ]),
2233
- e("div", Pi, [
2234
- e("span", Ei, n(xe.value ? "Artifact Viewer" : "Artifacts"), 1)
2288
+ e("div", Oi, [
2289
+ e("span", Ui, i(Me.value ? "Artifact Viewer" : "Artifacts"), 1)
2235
2290
  ])
2236
2291
  ]),
2237
- e("div", Ai, [
2292
+ e("div", Di, [
2238
2293
  e("button", {
2239
2294
  class: "artifactuse-panel__action artifactuse-panel__action--close",
2240
2295
  title: "Close panel",
2241
- onClick: t[0] || (t[0] = (...u) => y(g) && y(g)(...u))
2296
+ onClick: t[0] || (t[0] = (...c) => p(g) && p(g)(...c))
2242
2297
  }, [...t[22] || (t[22] = [
2243
2298
  e("svg", {
2244
2299
  viewBox: "0 0 24 24",
@@ -2262,7 +2317,7 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
2262
2317
  ])])
2263
2318
  ])
2264
2319
  ]),
2265
- e("div", Hi, [
2320
+ e("div", ji, [
2266
2321
  t[23] || (t[23] = e("div", { class: "artifactuse-panel__empty-icon" }, [
2267
2322
  e("svg", {
2268
2323
  viewBox: "0 0 24 24",
@@ -2274,11 +2329,11 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
2274
2329
  e("polyline", { points: "14 2 14 8 20 8" })
2275
2330
  ])
2276
2331
  ], -1)),
2277
- e("h3", Bi, n(xe.value ? "No artifact selected" : "No artifacts yet"), 1),
2278
- e("p", Si, n(xe.value ? "Open an artifact to have it appear here" : "Code blocks, forms, and other interactive content will appear here as the AI generates them."), 1)
2332
+ e("h3", Ni, i(Me.value ? "No artifact selected" : "No artifacts yet"), 1),
2333
+ e("p", Wi, i(Me.value ? "Open an artifact to have it appear here" : "Code blocks, forms, and other interactive content will appear here as the AI generates them."), 1)
2279
2334
  ]),
2280
- e("footer", zi, [
2281
- qe.value ? (a(), s("a", Vi, [...t[24] || (t[24] = [
2335
+ e("footer", Ji, [
2336
+ Ne.value ? (s(), l("a", Xi, [...t[24] || (t[24] = [
2282
2337
  e("svg", {
2283
2338
  width: "16",
2284
2339
  height: "16",
@@ -2298,9 +2353,9 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
2298
2353
  e("span", null, "Artifactuse", -1)
2299
2354
  ])])) : v("", !0)
2300
2355
  ])
2301
- ], 64)) : !y(r) && !xe.value ? (a(), s(F, { key: 2 }, [
2302
- e("header", Ii, [
2303
- e("div", Fi, [
2356
+ ], 64)) : !p(n) && !Me.value ? (s(), l(V, { key: 2 }, [
2357
+ e("header", Zi, [
2358
+ e("div", Ki, [
2304
2359
  t[26] || (t[26] = e("span", { class: "artifactuse-panel__icon" }, [
2305
2360
  e("svg", {
2306
2361
  viewBox: "0 0 24 24",
@@ -2312,19 +2367,19 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
2312
2367
  e("polyline", { points: "8 6 2 12 8 18" })
2313
2368
  ])
2314
2369
  ], -1)),
2315
- e("div", Ri, [
2370
+ e("div", Yi, [
2316
2371
  t[25] || (t[25] = e("span", { class: "artifactuse-panel__name" }, "Artifacts", -1)),
2317
- e("span", qi, n(ve.value.length) + " available", 1)
2372
+ e("span", Gi, i(_e.value.length) + " available", 1)
2318
2373
  ])
2319
2374
  ]),
2320
- e("div", Oi, [
2375
+ e("div", Qi, [
2321
2376
  e("button", {
2322
- class: I(["artifactuse-panel__action", { "artifactuse-panel__action--loading": ae.value }]),
2323
- disabled: ae.value,
2377
+ class: R(["artifactuse-panel__action", { "artifactuse-panel__action--loading": ie.value }]),
2378
+ disabled: ie.value,
2324
2379
  title: "Download all as ZIP",
2325
- onClick: Ot
2380
+ onClick: Yt
2326
2381
  }, [
2327
- ae.value ? (a(), s("svg", ji, [...t[28] || (t[28] = [
2382
+ ie.value ? (s(), l("svg", an, [...t[28] || (t[28] = [
2328
2383
  e("circle", {
2329
2384
  cx: "12",
2330
2385
  cy: "12",
@@ -2332,7 +2387,7 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
2332
2387
  "stroke-dasharray": "32",
2333
2388
  "stroke-dashoffset": "32"
2334
2389
  }, null, -1)
2335
- ])])) : (a(), s("svg", Di, [...t[27] || (t[27] = [
2390
+ ])])) : (s(), l("svg", tn, [...t[27] || (t[27] = [
2336
2391
  e("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }, null, -1),
2337
2392
  e("polyline", { points: "7 10 12 15 17 10" }, null, -1),
2338
2393
  e("line", {
@@ -2342,11 +2397,11 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
2342
2397
  y2: "3"
2343
2398
  }, null, -1)
2344
2399
  ])]))
2345
- ], 10, Ui),
2400
+ ], 10, en),
2346
2401
  e("button", {
2347
2402
  class: "artifactuse-panel__action artifactuse-panel__action--close",
2348
2403
  title: "Close panel",
2349
- onClick: t[1] || (t[1] = (...u) => y(g) && y(g)(...u))
2404
+ onClick: t[1] || (t[1] = (...c) => p(g) && p(g)(...c))
2350
2405
  }, [...t[29] || (t[29] = [
2351
2406
  e("svg", {
2352
2407
  viewBox: "0 0 24 24",
@@ -2370,23 +2425,23 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
2370
2425
  ])])
2371
2426
  ])
2372
2427
  ]),
2373
- e("div", Ni, [
2374
- e("div", Wi, [
2375
- (a(!0), s(F, null, ue(ve.value, (u, z) => (a(), s("button", {
2376
- key: u.id,
2428
+ e("div", sn, [
2429
+ e("div", ln, [
2430
+ (s(!0), l(V, null, fe(_e.value, (c, A) => (s(), l("button", {
2431
+ key: c.id,
2377
2432
  class: "artifactuse-panel__list-item",
2378
- onClick: (X) => ct(u)
2433
+ onClick: (F) => mt(c)
2379
2434
  }, [
2380
2435
  e("span", {
2381
2436
  class: "artifactuse-panel__list-item-icon",
2382
- innerHTML: Ue(u.language)
2383
- }, null, 8, Xi),
2384
- e("div", Zi, [
2385
- e("span", Ki, n(u.title || "Untitled"), 1),
2386
- e("span", Yi, [
2387
- Y(n(y(Ie)(u.language)) + " ", 1),
2388
- u.lineCount ? (a(), s(F, { key: 0 }, [
2389
- Y(" • " + n(u.lineCount) + " lines ", 1)
2437
+ innerHTML: Xe(c.language)
2438
+ }, null, 8, on),
2439
+ e("div", rn, [
2440
+ e("span", cn, i(c.title || "Untitled"), 1),
2441
+ e("span", un, [
2442
+ G(i(p(Ue)(c.language)) + " ", 1),
2443
+ c.lineCount ? (s(), l(V, { key: 0 }, [
2444
+ G(" • " + i(c.lineCount) + " lines ", 1)
2390
2445
  ], 64)) : v("", !0)
2391
2446
  ])
2392
2447
  ]),
@@ -2400,11 +2455,11 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
2400
2455
  e("polyline", { points: "9 18 15 12 9 6" })
2401
2456
  ])
2402
2457
  ], -1))
2403
- ], 8, Ji))), 128))
2458
+ ], 8, nn))), 128))
2404
2459
  ])
2405
2460
  ]),
2406
- e("footer", Qi, [
2407
- qe.value ? (a(), s("a", Gi, [...t[31] || (t[31] = [
2461
+ e("footer", dn, [
2462
+ Ne.value ? (s(), l("a", vn, [...t[31] || (t[31] = [
2408
2463
  e("svg", {
2409
2464
  width: "16",
2410
2465
  height: "16",
@@ -2424,13 +2479,13 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
2424
2479
  e("span", null, "Artifactuse", -1)
2425
2480
  ])])) : v("", !0)
2426
2481
  ])
2427
- ], 64)) : (a(), s(F, { key: 3 }, [
2428
- e("header", en, [
2429
- Ee.value || k.value ? (a(), s("button", {
2482
+ ], 64)) : (s(), l(V, { key: 3 }, [
2483
+ e("header", fn, [
2484
+ Se.value || w.value ? (s(), l("button", {
2430
2485
  key: 0,
2431
2486
  class: "artifactuse-panel__back",
2432
- title: Ee.value ? "Browse artifacts" : "Back to list",
2433
- onClick: Et
2487
+ title: Se.value ? "Browse artifacts" : "Back to list",
2488
+ onClick: qt
2434
2489
  }, [...t[32] || (t[32] = [
2435
2490
  e("svg", {
2436
2491
  viewBox: "0 0 24 24",
@@ -2440,29 +2495,29 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
2440
2495
  }, [
2441
2496
  e("polyline", { points: "15 18 9 12 15 6" })
2442
2497
  ], -1)
2443
- ])], 8, tn)) : v("", !0),
2444
- e("div", an, [
2498
+ ])], 8, pn)) : v("", !0),
2499
+ e("div", _n, [
2445
2500
  e("span", {
2446
2501
  class: "artifactuse-panel__icon",
2447
- innerHTML: le.value
2448
- }, null, 8, sn),
2449
- e("div", ln, [
2450
- e("span", nn, n(y(r).title || "Untitled"), 1),
2451
- e("span", on, [
2452
- Y(n(j.value) + " ", 1),
2453
- y(r).lineCount ? (a(), s(F, { key: 0 }, [
2454
- Y(" • " + n(y(r).lineCount) + " lines ", 1)
2502
+ innerHTML: Ae.value
2503
+ }, null, 8, hn),
2504
+ e("div", mn, [
2505
+ e("span", yn, i(p(n).title || "Untitled"), 1),
2506
+ e("span", gn, [
2507
+ G(i(ue.value) + " ", 1),
2508
+ p(n).lineCount ? (s(), l(V, { key: 0 }, [
2509
+ G(" • " + i(p(n).lineCount) + " lines ", 1)
2455
2510
  ], 64)) : v("", !0)
2456
2511
  ])
2457
2512
  ])
2458
2513
  ]),
2459
- e("div", rn, [
2460
- !y(r).tabs || y(r).tabs.includes("preview") ? (a(), s("button", {
2514
+ e("div", kn, [
2515
+ !p(n).tabs || p(n).tabs.includes("preview") ? (s(), l("button", {
2461
2516
  key: 0,
2462
- class: I(["artifactuse-panel__tab", { "artifactuse-panel__tab--active": y(_).viewMode === "preview" }]),
2463
- disabled: !y(r).isPreviewable,
2517
+ class: R(["artifactuse-panel__tab", { "artifactuse-panel__tab--active": p(f).viewMode === "preview" }]),
2518
+ disabled: !p(n).isPreviewable,
2464
2519
  title: "Preview",
2465
- onClick: t[2] || (t[2] = (u) => y(h)("preview"))
2520
+ onClick: t[2] || (t[2] = (c) => p(h)("preview"))
2466
2521
  }, [...t[33] || (t[33] = [
2467
2522
  e("svg", {
2468
2523
  viewBox: "0 0 24 24",
@@ -2477,12 +2532,12 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
2477
2532
  r: "3"
2478
2533
  })
2479
2534
  ], -1)
2480
- ])], 10, cn)) : v("", !0),
2481
- !y(r).tabs || y(r).tabs.includes("code") ? (a(), s("button", {
2535
+ ])], 10, wn)) : v("", !0),
2536
+ (!p(n).tabs || p(n).tabs.includes("code")) && !Be.value ? (s(), l("button", {
2482
2537
  key: 1,
2483
- class: I(["artifactuse-panel__tab", { "artifactuse-panel__tab--active": y(_).viewMode === "code" }]),
2538
+ class: R(["artifactuse-panel__tab", { "artifactuse-panel__tab--active": p(f).viewMode === "code" }]),
2484
2539
  title: "Code",
2485
- onClick: t[3] || (t[3] = (u) => y(h)("code"))
2540
+ onClick: t[3] || (t[3] = (c) => p(h)("code"))
2486
2541
  }, [...t[34] || (t[34] = [
2487
2542
  e("svg", {
2488
2543
  viewBox: "0 0 24 24",
@@ -2494,12 +2549,12 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
2494
2549
  e("polyline", { points: "8 6 2 12 8 18" })
2495
2550
  ], -1)
2496
2551
  ])], 2)) : v("", !0),
2497
- !y(r).tabs || y(r).tabs.includes("split") ? (a(), s("button", {
2552
+ (!p(n).tabs || p(n).tabs.includes("split")) && !Be.value ? (s(), l("button", {
2498
2553
  key: 2,
2499
- class: I(["artifactuse-panel__tab", { "artifactuse-panel__tab--active": y(_).viewMode === "split" }]),
2500
- disabled: !y(r).isPreviewable,
2554
+ class: R(["artifactuse-panel__tab", { "artifactuse-panel__tab--active": p(f).viewMode === "split" }]),
2555
+ disabled: !p(n).isPreviewable,
2501
2556
  title: "Split view",
2502
- onClick: t[4] || (t[4] = (u) => y(h)("split"))
2557
+ onClick: t[4] || (t[4] = (c) => p(h)("split"))
2503
2558
  }, [...t[35] || (t[35] = [
2504
2559
  e("svg", {
2505
2560
  viewBox: "0 0 24 24",
@@ -2522,12 +2577,12 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
2522
2577
  y2: "21"
2523
2578
  })
2524
2579
  ], -1)
2525
- ])], 10, un)) : v("", !0),
2526
- y(r).tabs && y(r).tabs.includes("edit") && S.value ? (a(), s("button", {
2580
+ ])], 10, bn)) : v("", !0),
2581
+ p(n).tabs && p(n).tabs.includes("edit") && y.value ? (s(), l("button", {
2527
2582
  key: 3,
2528
- class: I(["artifactuse-panel__tab", { "artifactuse-panel__tab--active": y(_).viewMode === "edit" }]),
2583
+ class: R(["artifactuse-panel__tab", { "artifactuse-panel__tab--active": p(f).viewMode === "edit" }]),
2529
2584
  title: "Edit",
2530
- onClick: t[5] || (t[5] = (u) => y(h)("edit"))
2585
+ onClick: t[5] || (t[5] = (c) => p(h)("edit"))
2531
2586
  }, [...t[36] || (t[36] = [
2532
2587
  e("svg", {
2533
2588
  viewBox: "0 0 24 24",
@@ -2540,12 +2595,12 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
2540
2595
  ], -1)
2541
2596
  ])], 2)) : v("", !0)
2542
2597
  ]),
2543
- e("div", dn, [
2544
- y(_).viewMode === "edit" ? (a(), s("button", {
2598
+ e("div", Cn, [
2599
+ p(f).viewMode === "edit" ? (s(), l("button", {
2545
2600
  key: 0,
2546
2601
  class: "artifactuse-panel__action artifactuse-panel__action--save",
2547
2602
  title: "Save",
2548
- onClick: zt
2603
+ onClick: Nt
2549
2604
  }, [...t[37] || (t[37] = [
2550
2605
  e("svg", {
2551
2606
  viewBox: "0 0 24 24",
@@ -2558,11 +2613,11 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
2558
2613
  e("polyline", { points: "7 3 7 8 15 8" })
2559
2614
  ], -1)
2560
2615
  ])])) : v("", !0),
2561
- Ct.value ? (a(), s("button", {
2616
+ Bt.value ? (s(), l("button", {
2562
2617
  key: 1,
2563
2618
  class: "artifactuse-panel__action",
2564
2619
  title: "Open in new tab",
2565
- onClick: rt
2620
+ onClick: ht
2566
2621
  }, [...t[38] || (t[38] = [
2567
2622
  e("svg", {
2568
2623
  viewBox: "0 0 24 24",
@@ -2582,10 +2637,10 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
2582
2637
  ])])) : v("", !0),
2583
2638
  e("button", {
2584
2639
  class: "artifactuse-panel__action",
2585
- title: y(_).isFullscreen ? "Exit fullscreen" : "Fullscreen",
2586
- onClick: t[6] || (t[6] = (...u) => y(o) && y(o)(...u))
2640
+ title: p(f).isFullscreen ? "Exit fullscreen" : "Fullscreen",
2641
+ onClick: t[6] || (t[6] = (...c) => p(r) && p(r)(...c))
2587
2642
  }, [
2588
- y(_).isFullscreen ? (a(), s("svg", pn, [...t[40] || (t[40] = [
2643
+ p(f).isFullscreen ? (s(), l("svg", Mn, [...t[40] || (t[40] = [
2589
2644
  e("polyline", { points: "4 14 10 14 10 20" }, null, -1),
2590
2645
  e("polyline", { points: "20 10 14 10 14 4" }, null, -1),
2591
2646
  e("line", {
@@ -2600,7 +2655,7 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
2600
2655
  x2: "10",
2601
2656
  y2: "14"
2602
2657
  }, null, -1)
2603
- ])])) : (a(), s("svg", fn, [...t[39] || (t[39] = [
2658
+ ])])) : (s(), l("svg", $n, [...t[39] || (t[39] = [
2604
2659
  e("polyline", { points: "15 3 21 3 21 9" }, null, -1),
2605
2660
  e("polyline", { points: "9 21 3 21 3 15" }, null, -1),
2606
2661
  e("line", {
@@ -2616,11 +2671,11 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
2616
2671
  y2: "14"
2617
2672
  }, null, -1)
2618
2673
  ])]))
2619
- ], 8, vn),
2674
+ ], 8, xn),
2620
2675
  e("button", {
2621
2676
  class: "artifactuse-panel__action artifactuse-panel__action--close",
2622
2677
  title: "Close panel",
2623
- onClick: t[7] || (t[7] = (...u) => y(g) && y(g)(...u))
2678
+ onClick: t[7] || (t[7] = (...c) => p(g) && p(g)(...c))
2624
2679
  }, [...t[41] || (t[41] = [
2625
2680
  e("svg", {
2626
2681
  viewBox: "0 0 24 24",
@@ -2644,24 +2699,24 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
2644
2699
  ])])
2645
2700
  ])
2646
2701
  ]),
2647
- Ee.value && at.value.length > 0 ? (a(), s("div", _n, [
2648
- e("div", hn, [
2649
- (a(!0), s(F, null, ue(at.value, (u) => {
2650
- var z;
2651
- return a(), s("button", {
2652
- key: u.id,
2653
- class: I(["artifactuse-panel__file-tab", { "artifactuse-panel__file-tab--active": u.id === ((z = y(r)) == null ? void 0 : z.id) }]),
2654
- onClick: (X) => Lt(u)
2702
+ Se.value && ct.value.length > 0 ? (s(), l("div", Tn, [
2703
+ e("div", Ln, [
2704
+ (s(!0), l(V, null, fe(ct.value, (c) => {
2705
+ var A;
2706
+ return s(), l("button", {
2707
+ key: c.id,
2708
+ class: R(["artifactuse-panel__file-tab", { "artifactuse-panel__file-tab--active": c.id === ((A = p(n)) == null ? void 0 : A.id) }]),
2709
+ onClick: (F) => Ft(c)
2655
2710
  }, [
2656
2711
  e("span", {
2657
2712
  class: "artifactuse-panel__file-tab-icon",
2658
- innerHTML: Ue(u.language)
2659
- }, null, 8, yn),
2660
- e("span", gn, n(u.title || "Untitled"), 1),
2713
+ innerHTML: Xe(c.language)
2714
+ }, null, 8, En),
2715
+ e("span", An, i(c.title || "Untitled"), 1),
2661
2716
  e("button", {
2662
2717
  class: "artifactuse-panel__file-tab-close",
2663
2718
  title: "Close tab",
2664
- onClick: he((X) => Pt(u.id), ["stop"])
2719
+ onClick: me((F) => Rt(c.id), ["stop"])
2665
2720
  }, [...t[42] || (t[42] = [
2666
2721
  e("svg", {
2667
2722
  viewBox: "0 0 24 24",
@@ -2682,75 +2737,110 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
2682
2737
  y2: "18"
2683
2738
  })
2684
2739
  ], -1)
2685
- ])], 8, kn)
2686
- ], 10, mn);
2740
+ ])], 8, Hn)
2741
+ ], 10, Pn);
2687
2742
  }), 128))
2688
2743
  ])
2689
2744
  ])) : v("", !0),
2690
2745
  e("div", {
2691
2746
  ref_key: "contentRef",
2692
- ref: N,
2693
- class: I(["artifactuse-panel__content", [
2694
- `artifactuse-panel__content--${y(_).viewMode}`,
2747
+ ref: J,
2748
+ class: R(["artifactuse-panel__content", [
2749
+ `artifactuse-panel__content--${p(f).viewMode}`,
2695
2750
  { "artifactuse-panel__content--transitioning": m.value }
2696
2751
  ]])
2697
2752
  }, [
2698
- m.value ? (a(), s("div", wn, [...t[43] || (t[43] = [
2753
+ m.value ? (s(), l("div", Bn, [...t[43] || (t[43] = [
2699
2754
  e("div", { class: "artifactuse-panel__spinner" }, null, -1)
2700
2755
  ])])) : v("", !0),
2701
- y(_).viewMode === "preview" || y(_).viewMode === "split" ? (a(), s("div", {
2756
+ p(f).viewMode === "preview" || p(f).viewMode === "split" ? (s(), l("div", {
2702
2757
  key: 1,
2703
2758
  class: "artifactuse-panel__preview",
2704
- style: Se(y(_).viewMode === "split" ? { width: `${f.value}%` } : void 0)
2759
+ style: Le(p(f).viewMode === "split" ? { width: `${Y.value}%` } : void 0)
2705
2760
  }, [
2706
- de.value && G.value ? (a(), s("div", bn, [...t[44] || (t[44] = [
2761
+ pe.value && Ce.value && !Be.value ? (s(), l("div", Sn, [...t[44] || (t[44] = [
2707
2762
  e("div", { class: "artifactuse-panel__spinner" }, null, -1)
2708
2763
  ])])) : v("", !0),
2709
- G.value ? (a(), s("iframe", {
2710
- key: 1,
2711
- ref_key: "iframeRef",
2712
- ref: D,
2713
- src: G.value,
2714
- class: I(["artifactuse-panel__iframe", { "artifactuse-panel__iframe--loading": de.value }]),
2715
- sandbox: "allow-scripts allow-same-origin allow-forms allow-popups allow-modals allow-downloads allow-top-navigation-by-user-activation",
2716
- allow: "camera; microphone; fullscreen; geolocation; display-capture; autoplay; clipboard-write; encrypted-media; gyroscope; accelerometer; picture-in-picture",
2717
- onLoad: Vt,
2718
- onError: It
2719
- }, null, 42, Cn)) : (a(), s("div", xn, [
2720
- t[45] || (t[45] = e("svg", {
2721
- viewBox: "0 0 24 24",
2722
- fill: "none",
2723
- stroke: "currentColor",
2724
- "stroke-width": "1.5"
2725
- }, [
2726
- e("path", { d: "M9 17H7A5 5 0 0 1 7 7h2" }),
2727
- e("path", { d: "M15 7h2a5 5 0 1 1 0 10h-2" }),
2728
- e("line", {
2729
- x1: "8",
2730
- y1: "12",
2731
- x2: "16",
2732
- y2: "12"
2733
- })
2734
- ], -1)),
2735
- e("p", null, "Preview not available for " + n(j.value), 1)
2736
- ]))
2764
+ Be.value ? (s(), l(V, { key: 1 }, [
2765
+ we.value === "image" ? (s(), l("div", zn, [
2766
+ e("img", {
2767
+ src: Fe(p(n)),
2768
+ alt: p(n).title
2769
+ }, null, 8, Vn)
2770
+ ])) : we.value === "audio" ? (s(), l("div", In, [
2771
+ e("audio", {
2772
+ controls: "",
2773
+ src: Fe(p(n))
2774
+ }, null, 8, Fn)
2775
+ ])) : we.value === "video" ? (s(), l("div", Rn, [
2776
+ e("video", {
2777
+ controls: "",
2778
+ src: Fe(p(n))
2779
+ }, null, 8, qn)
2780
+ ])) : we.value === "pdf" ? (s(), l("div", On, [
2781
+ e("iframe", {
2782
+ src: Fe(p(n)) + "#toolbar=1",
2783
+ frameborder: "0"
2784
+ }, null, 8, Un)
2785
+ ])) : we.value === "font" ? (s(), l("div", Dn, [
2786
+ e("div", {
2787
+ class: "artifactuse-panel__font-sample",
2788
+ style: Le({ fontFamily: We.value })
2789
+ }, " AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz ", 4),
2790
+ e("div", {
2791
+ class: "artifactuse-panel__font-sample artifactuse-panel__font-sample--sm",
2792
+ style: Le({ fontFamily: We.value })
2793
+ }, " 0123456789 !@#$%^&*() ", 4)
2794
+ ])) : (s(), l("div", jn, [
2795
+ e("pre", Nn, i(Ht.value), 1)
2796
+ ]))
2797
+ ], 64)) : (s(), l(V, { key: 2 }, [
2798
+ Ce.value ? (s(), l("iframe", {
2799
+ key: 0,
2800
+ ref_key: "iframeRef",
2801
+ ref: N,
2802
+ src: Ce.value,
2803
+ class: R(["artifactuse-panel__iframe", { "artifactuse-panel__iframe--loading": pe.value }]),
2804
+ sandbox: "allow-scripts allow-same-origin allow-forms allow-popups allow-modals allow-downloads allow-top-navigation-by-user-activation",
2805
+ allow: "camera; microphone; fullscreen; geolocation; display-capture; autoplay; clipboard-write; encrypted-media; gyroscope; accelerometer; picture-in-picture",
2806
+ onLoad: Wt,
2807
+ onError: Jt
2808
+ }, null, 42, Wn)) : (s(), l("div", Jn, [
2809
+ t[45] || (t[45] = e("svg", {
2810
+ viewBox: "0 0 24 24",
2811
+ fill: "none",
2812
+ stroke: "currentColor",
2813
+ "stroke-width": "1.5"
2814
+ }, [
2815
+ e("path", { d: "M9 17H7A5 5 0 0 1 7 7h2" }),
2816
+ e("path", { d: "M15 7h2a5 5 0 1 1 0 10h-2" }),
2817
+ e("line", {
2818
+ x1: "8",
2819
+ y1: "12",
2820
+ x2: "16",
2821
+ y2: "12"
2822
+ })
2823
+ ], -1)),
2824
+ e("p", null, "Preview not available for " + i(ue.value), 1)
2825
+ ]))
2826
+ ], 64))
2737
2827
  ], 4)) : v("", !0),
2738
- _t(e("div", {
2828
+ Ct(e("div", {
2739
2829
  class: "artifactuse-panel__code",
2740
- style: Se(y(_).viewMode === "split" ? { width: `${100 - f.value}%` } : void 0)
2830
+ style: Le(p(f).viewMode === "split" ? { width: `${100 - Y.value}%` } : void 0)
2741
2831
  }, [
2742
- y(_).viewMode === "split" ? (a(), s("div", {
2832
+ p(f).viewMode === "split" ? (s(), l("div", {
2743
2833
  key: 0,
2744
2834
  class: "artifactuse-panel__split-handle",
2745
- onMousedown: he(Gt, ["prevent"])
2835
+ onMousedown: me(ca, ["prevent"])
2746
2836
  }, [...t[46] || (t[46] = [
2747
2837
  e("div", { class: "artifactuse-panel__split-handle-line" }, null, -1)
2748
2838
  ])], 32)) : v("", !0),
2749
2839
  e("div", {
2750
2840
  class: "artifactuse-panel__code-scroll",
2751
2841
  ref_key: "codeScrollRef",
2752
- ref: B,
2753
- onScroll: Xt
2842
+ ref: S,
2843
+ onScroll: la
2754
2844
  }, [
2755
2845
  e("div", {
2756
2846
  class: "artifactuse-panel__line-numbers",
@@ -2758,36 +2848,36 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
2758
2848
  ref: ee
2759
2849
  }, null, 512),
2760
2850
  e("pre", {
2761
- class: I(["artifactuse-panel__code-block", `language-${ye.value}`])
2851
+ class: R(["artifactuse-panel__code-block", `language-${Ve.value}`])
2762
2852
  }, [
2763
- (a(), s("code", {
2853
+ (s(), l("code", {
2764
2854
  ref_key: "codeRef",
2765
- ref: U,
2766
- key: y(r).id,
2767
- class: I(`language-${ye.value}`)
2855
+ ref: D,
2856
+ key: p(n).id,
2857
+ class: R(`language-${Ve.value}`)
2768
2858
  }, null, 2))
2769
2859
  ], 2)
2770
2860
  ], 544)
2771
2861
  ], 4), [
2772
- [ht, y(_).viewMode === "code" || y(_).viewMode === "split"]
2862
+ [xt, p(f).viewMode === "code" || p(f).viewMode === "split"]
2773
2863
  ]),
2774
- _t(e("div", $n, [
2864
+ Ct(e("div", Xn, [
2775
2865
  e("div", {
2776
2866
  ref_key: "editorContainerRef",
2777
- ref: re,
2867
+ ref: ce,
2778
2868
  class: "artifactuse-panel__editor-container"
2779
2869
  }, null, 512)
2780
2870
  ], 512), [
2781
- [ht, y(_).viewMode === "edit"]
2871
+ [xt, p(f).viewMode === "edit"]
2782
2872
  ])
2783
2873
  ], 2),
2784
- $t.value ? (a(), s("div", {
2874
+ zt.value ? (s(), l("div", {
2785
2875
  key: 1,
2786
- class: I(["artifactuse-panel__console", { "artifactuse-panel__console--expanded": W.value }])
2876
+ class: R(["artifactuse-panel__console", { "artifactuse-panel__console--expanded": b.value }])
2787
2877
  }, [
2788
2878
  e("div", {
2789
2879
  class: "artifactuse-panel__console-header",
2790
- onClick: t[14] || (t[14] = (u) => W.value = !W.value)
2880
+ onClick: t[14] || (t[14] = (c) => b.value = !b.value)
2791
2881
  }, [
2792
2882
  t[47] || (t[47] = e("svg", {
2793
2883
  class: "artifactuse-panel__console-chevron",
@@ -2801,54 +2891,54 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
2801
2891
  t[48] || (t[48] = e("span", null, "Console", -1)),
2802
2892
  e("div", {
2803
2893
  class: "artifactuse-panel__console-filters",
2804
- onClick: t[12] || (t[12] = he(() => {
2894
+ onClick: t[12] || (t[12] = me(() => {
2805
2895
  }, ["stop"]))
2806
2896
  }, [
2807
- Oe.value > 0 ? (a(), s("button", {
2897
+ Je.value > 0 ? (s(), l("button", {
2808
2898
  key: 0,
2809
- class: I(["artifactuse-panel__console-filter", "artifactuse-panel__console-filter--error", { "artifactuse-panel__console-filter--inactive": !w.value.has("error") }]),
2810
- onClick: t[8] || (t[8] = (u) => He("error"))
2811
- }, n(Oe.value) + " error" + n(Oe.value !== 1 ? "s" : ""), 3)) : v("", !0),
2812
- Qe.value > 0 ? (a(), s("button", {
2899
+ class: R(["artifactuse-panel__console-filter", "artifactuse-panel__console-filter--error", { "artifactuse-panel__console-filter--inactive": !u.value.has("error") }]),
2900
+ onClick: t[8] || (t[8] = (c) => Ie("error"))
2901
+ }, i(Je.value) + " error" + i(Je.value !== 1 ? "s" : ""), 3)) : v("", !0),
2902
+ it.value > 0 ? (s(), l("button", {
2813
2903
  key: 1,
2814
- class: I(["artifactuse-panel__console-filter", "artifactuse-panel__console-filter--warn", { "artifactuse-panel__console-filter--inactive": !w.value.has("warn") }]),
2815
- onClick: t[9] || (t[9] = (u) => He("warn"))
2816
- }, n(Qe.value) + " warn", 3)) : v("", !0),
2817
- Ge.value > 0 ? (a(), s("button", {
2904
+ class: R(["artifactuse-panel__console-filter", "artifactuse-panel__console-filter--warn", { "artifactuse-panel__console-filter--inactive": !u.value.has("warn") }]),
2905
+ onClick: t[9] || (t[9] = (c) => Ie("warn"))
2906
+ }, i(it.value) + " warn", 3)) : v("", !0),
2907
+ nt.value > 0 ? (s(), l("button", {
2818
2908
  key: 2,
2819
- class: I(["artifactuse-panel__console-filter", "artifactuse-panel__console-filter--info", { "artifactuse-panel__console-filter--inactive": !w.value.has("info") }]),
2820
- onClick: t[10] || (t[10] = (u) => He("info"))
2821
- }, n(Ge.value) + " info", 3)) : v("", !0),
2822
- et.value > 0 ? (a(), s("button", {
2909
+ class: R(["artifactuse-panel__console-filter", "artifactuse-panel__console-filter--info", { "artifactuse-panel__console-filter--inactive": !u.value.has("info") }]),
2910
+ onClick: t[10] || (t[10] = (c) => Ie("info"))
2911
+ }, i(nt.value) + " info", 3)) : v("", !0),
2912
+ ot.value > 0 ? (s(), l("button", {
2823
2913
  key: 3,
2824
- class: I(["artifactuse-panel__console-filter", "artifactuse-panel__console-filter--log", { "artifactuse-panel__console-filter--inactive": !w.value.has("log") }]),
2825
- onClick: t[11] || (t[11] = (u) => He("log"))
2826
- }, n(et.value) + " log", 3)) : v("", !0)
2914
+ class: R(["artifactuse-panel__console-filter", "artifactuse-panel__console-filter--log", { "artifactuse-panel__console-filter--inactive": !u.value.has("log") }]),
2915
+ onClick: t[11] || (t[11] = (c) => Ie("log"))
2916
+ }, i(ot.value) + " log", 3)) : v("", !0)
2827
2917
  ]),
2828
2918
  e("button", {
2829
2919
  class: "artifactuse-panel__console-clear",
2830
- onClick: t[13] || (t[13] = he((u) => Q.value = [], ["stop"]))
2920
+ onClick: t[13] || (t[13] = me((c) => X.value = [], ["stop"]))
2831
2921
  }, "Clear")
2832
2922
  ]),
2833
- W.value ? (a(), s("div", {
2923
+ b.value ? (s(), l("div", {
2834
2924
  key: 0,
2835
2925
  ref_key: "consoleEntriesEl",
2836
- ref: ie,
2926
+ ref: B,
2837
2927
  class: "artifactuse-panel__console-entries"
2838
2928
  }, [
2839
- (a(!0), s(F, null, ue(xt.value, (u, z) => (a(), s("div", {
2840
- key: z,
2841
- class: I("artifactuse-panel__console-entry artifactuse-panel__console-entry--" + u.type)
2929
+ (s(!0), l(V, null, fe(St.value, (c, A) => (s(), l("div", {
2930
+ key: A,
2931
+ class: R("artifactuse-panel__console-entry artifactuse-panel__console-entry--" + c.type)
2842
2932
  }, [
2843
- e("span", Mn, "[" + n(u.type) + "]", 1),
2844
- e("span", Tn, n(u.content), 1),
2845
- e("span", Ln, n(new Date(u.timestamp).toLocaleTimeString()), 1)
2933
+ e("span", Zn, "[" + i(c.type) + "]", 1),
2934
+ e("span", Kn, i(c.content), 1),
2935
+ e("span", Yn, i(new Date(c.timestamp).toLocaleTimeString()), 1)
2846
2936
  ], 2))), 128))
2847
2937
  ], 512)) : v("", !0)
2848
2938
  ], 2)) : v("", !0),
2849
- e("footer", Pn, [
2850
- e("div", En, [
2851
- qe.value ? (a(), s("a", An, [...t[49] || (t[49] = [
2939
+ e("footer", Gn, [
2940
+ e("div", Qn, [
2941
+ Ne.value ? (s(), l("a", eo, [...t[49] || (t[49] = [
2852
2942
  e("svg", {
2853
2943
  width: "16",
2854
2944
  height: "16",
@@ -2867,17 +2957,17 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
2867
2957
  ], -1),
2868
2958
  e("span", null, "Artifactuse", -1)
2869
2959
  ])])) : v("", !0),
2870
- y(r).size ? (a(), s("span", Hn, n(y(gt)(y(r).size)), 1)) : v("", !0)
2960
+ p(n).size ? (s(), l("span", to, i(p(Lt)(p(n).size)), 1)) : v("", !0)
2871
2961
  ]),
2872
- e("div", Bn, [
2962
+ e("div", ao, [
2873
2963
  e("button", {
2874
- class: I(["artifactuse-panel__footer-action", { "artifactuse-panel__footer-action--success": K.value }]),
2964
+ class: R(["artifactuse-panel__footer-action", { "artifactuse-panel__footer-action--success": K.value }]),
2875
2965
  title: K.value ? "Copied!" : "Copy code",
2876
- onClick: Rt
2966
+ onClick: Zt
2877
2967
  }, [
2878
- K.value ? (a(), s("svg", Vn, [...t[51] || (t[51] = [
2968
+ K.value ? (s(), l("svg", io, [...t[51] || (t[51] = [
2879
2969
  e("polyline", { points: "20 6 9 17 4 12" }, null, -1)
2880
- ])])) : (a(), s("svg", zn, [...t[50] || (t[50] = [
2970
+ ])])) : (s(), l("svg", lo, [...t[50] || (t[50] = [
2881
2971
  e("rect", {
2882
2972
  x: "9",
2883
2973
  y: "9",
@@ -2888,11 +2978,11 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
2888
2978
  }, null, -1),
2889
2979
  e("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" }, null, -1)
2890
2980
  ])]))
2891
- ], 10, Sn),
2981
+ ], 10, so),
2892
2982
  e("button", {
2893
2983
  class: "artifactuse-panel__footer-action",
2894
2984
  title: "Download file",
2895
- onClick: qt
2985
+ onClick: Kt
2896
2986
  }, [...t[52] || (t[52] = [
2897
2987
  e("svg", {
2898
2988
  viewBox: "0 0 24 24",
@@ -2910,11 +3000,11 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
2910
3000
  })
2911
3001
  ], -1)
2912
3002
  ])]),
2913
- Mt.value ? (a(), s("div", In, [
3003
+ Vt.value ? (s(), l("div", no, [
2914
3004
  e("button", {
2915
3005
  class: "artifactuse-panel__footer-action",
2916
3006
  title: "Share",
2917
- onClick: Ut
3007
+ onClick: Gt
2918
3008
  }, [...t[53] || (t[53] = [
2919
3009
  e("svg", {
2920
3010
  viewBox: "0 0 24 24",
@@ -2951,14 +3041,14 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
2951
3041
  })
2952
3042
  ], -1)
2953
3043
  ])]),
2954
- Fe(ze, { name: "artifactuse-popup" }, {
2955
- default: Ve(() => [
2956
- E.value ? (a(), s("div", Fn, [
2957
- e("div", Rn, [
2958
- e("span", qn, n(i.value === "success" ? Le.value ? "Artifact updated!" : "Link created!" : i.value === "update-list" ? "Update saved artifact" : "Share Artifact"), 1),
3044
+ De(qe, { name: "artifactuse-popup" }, {
3045
+ default: Oe(() => [
3046
+ z.value ? (s(), l("div", oo, [
3047
+ e("div", ro, [
3048
+ e("span", co, i(o.value === "success" ? q.value ? "Artifact updated!" : "Link created!" : o.value === "update-list" ? "Update saved artifact" : "Share Artifact"), 1),
2959
3049
  e("button", {
2960
3050
  class: "artifactuse-share-popup__close",
2961
- onClick: Dt
3051
+ onClick: Qt
2962
3052
  }, [...t[54] || (t[54] = [
2963
3053
  e("svg", {
2964
3054
  viewBox: "0 0 24 24",
@@ -2981,28 +3071,28 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
2981
3071
  ], -1)
2982
3072
  ])])
2983
3073
  ]),
2984
- e("div", On, [
2985
- i.value === "loading" ? (a(), s("div", Un, [...t[55] || (t[55] = [
3074
+ e("div", uo, [
3075
+ o.value === "loading" ? (s(), l("div", vo, [...t[55] || (t[55] = [
2986
3076
  e("div", { class: "artifactuse-share-popup__spinner" }, null, -1),
2987
3077
  e("p", { class: "artifactuse-share-popup__loading-text" }, "Creating link...", -1)
2988
- ])])) : i.value === "error" ? (a(), s("div", Dn, [
2989
- e("div", jn, [
2990
- e("p", Nn, n(L.value), 1)
3078
+ ])])) : o.value === "error" ? (s(), l("div", fo, [
3079
+ e("div", po, [
3080
+ e("p", _o, i(te.value), 1)
2991
3081
  ]),
2992
- e("div", Wn, [
3082
+ e("div", ho, [
2993
3083
  e("button", {
2994
3084
  class: "artifactuse-share-popup__btn artifactuse-share-popup__btn--secondary",
2995
- onClick: t[15] || (t[15] = (u) => i.value = "options")
3085
+ onClick: t[15] || (t[15] = (c) => o.value = "options")
2996
3086
  }, " Back "),
2997
3087
  e("button", {
2998
3088
  class: "artifactuse-share-popup__btn artifactuse-share-popup__btn--primary",
2999
- onClick: jt
3089
+ onClick: ea
3000
3090
  }, " Retry ")
3001
3091
  ])
3002
- ])) : i.value === "options" ? (a(), s("div", Jn, [
3092
+ ])) : o.value === "options" ? (s(), l("div", mo, [
3003
3093
  e("button", {
3004
3094
  class: "artifactuse-share-popup__option",
3005
- onClick: nt
3095
+ onClick: pt
3006
3096
  }, [...t[56] || (t[56] = [
3007
3097
  e("div", { class: "artifactuse-share-popup__option-icon" }, [
3008
3098
  e("svg", {
@@ -3022,7 +3112,7 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
3022
3112
  ])]),
3023
3113
  e("button", {
3024
3114
  class: "artifactuse-share-popup__option",
3025
- onClick: ot
3115
+ onClick: _t
3026
3116
  }, [...t[57] || (t[57] = [
3027
3117
  e("div", { class: "artifactuse-share-popup__option-icon" }, [
3028
3118
  e("svg", {
@@ -3043,7 +3133,7 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
3043
3133
  ])]),
3044
3134
  e("button", {
3045
3135
  class: "artifactuse-share-popup__option",
3046
- onClick: Nt
3136
+ onClick: ta
3047
3137
  }, [...t[58] || (t[58] = [
3048
3138
  e("div", { class: "artifactuse-share-popup__option-icon" }, [
3049
3139
  e("svg", {
@@ -3062,28 +3152,28 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
3062
3152
  e("p", { class: "artifactuse-share-popup__option-desc" }, "Replace an existing artifact")
3063
3153
  ], -1)
3064
3154
  ])])
3065
- ])) : i.value === "update-list" ? (a(), s("div", Xn, [
3066
- Ce.value ? (a(), s("div", Zn, [...t[59] || (t[59] = [
3155
+ ])) : o.value === "update-list" ? (s(), l("div", yo, [
3156
+ C.value ? (s(), l("div", go, [...t[59] || (t[59] = [
3067
3157
  e("div", { class: "artifactuse-share-popup__spinner" }, null, -1),
3068
3158
  e("p", { class: "artifactuse-share-popup__loading-text" }, "Loading artifacts...", -1)
3069
- ])])) : be.value.length === 0 ? (a(), s("div", Kn, " No saved artifacts of this type ")) : (a(), s("div", Yn, [
3070
- (a(!0), s(F, null, ue(be.value, (u) => {
3071
- var z, X, ge;
3072
- return a(), s("button", {
3073
- key: ((z = u.project) == null ? void 0 : z.uuid) || u.id,
3159
+ ])])) : $e.value.length === 0 ? (s(), l("div", ko, " No saved artifacts of this type ")) : (s(), l("div", wo, [
3160
+ (s(!0), l(V, null, fe($e.value, (c) => {
3161
+ var A, F, he;
3162
+ return s(), l("button", {
3163
+ key: ((A = c.project) == null ? void 0 : A.uuid) || c.id,
3074
3164
  class: "artifactuse-share-popup__artifact-item",
3075
- onClick: (pe) => Wt(u)
3165
+ onClick: (de) => aa(c)
3076
3166
  }, [
3077
- e("span", Gn, n(((X = u.project) == null ? void 0 : X.name) || "Untitled"), 1),
3078
- e("span", eo, n(it((ge = u.project) == null ? void 0 : ge.created_at)), 1)
3079
- ], 8, Qn);
3167
+ e("span", Co, i(((F = c.project) == null ? void 0 : F.name) || "Untitled"), 1),
3168
+ e("span", xo, i(ft((he = c.project) == null ? void 0 : he.created_at)), 1)
3169
+ ], 8, bo);
3080
3170
  }), 128))
3081
3171
  ])),
3082
3172
  e("button", {
3083
3173
  class: "artifactuse-share-popup__back-btn",
3084
- onClick: t[16] || (t[16] = (u) => i.value = "options")
3174
+ onClick: t[16] || (t[16] = (c) => o.value = "options")
3085
3175
  }, "Back")
3086
- ])) : i.value === "success" ? (a(), s("div", to, [
3176
+ ])) : o.value === "success" ? (s(), l("div", $o, [
3087
3177
  t[62] || (t[62] = e("div", { class: "artifactuse-share-popup__success-icon" }, [
3088
3178
  e("svg", {
3089
3179
  viewBox: "0 0 24 24",
@@ -3094,20 +3184,20 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
3094
3184
  e("polyline", { points: "20 6 9 17 4 12" })
3095
3185
  ])
3096
3186
  ], -1)),
3097
- e("div", ao, [
3187
+ e("div", Mo, [
3098
3188
  e("input", {
3099
3189
  type: "text",
3100
3190
  class: "artifactuse-share-popup__link",
3101
- value: H.value,
3191
+ value: P.value,
3102
3192
  readonly: "",
3103
- onClick: t[17] || (t[17] = (u) => u.target.select())
3104
- }, null, 8, so),
3193
+ onClick: t[17] || (t[17] = (c) => c.target.select())
3194
+ }, null, 8, To),
3105
3195
  e("button", {
3106
- class: I(["artifactuse-share-popup__copy-btn", { "artifactuse-share-popup__copy-btn--copied": se.value }]),
3107
- onClick: Jt
3108
- }, n(se.value ? "Copied!" : "Copy"), 3)
3196
+ class: R(["artifactuse-share-popup__copy-btn", { "artifactuse-share-popup__copy-btn--copied": be.value }]),
3197
+ onClick: sa
3198
+ }, i(be.value ? "Copied!" : "Copy"), 3)
3109
3199
  ]),
3110
- d.value && !ce.value ? (a(), s("div", lo, [
3200
+ se.value && !ge.value ? (s(), l("div", Lo, [
3111
3201
  t[60] || (t[60] = e("span", { class: "artifactuse-share-popup__expiry-icon" }, [
3112
3202
  e("svg", {
3113
3203
  viewBox: "0 0 24 24",
@@ -3134,13 +3224,13 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
3134
3224
  })
3135
3225
  ])
3136
3226
  ], -1)),
3137
- e("span", io, " Expires " + n(it(d.value)), 1)
3227
+ e("span", Po, " Expires " + i(ft(se.value)), 1)
3138
3228
  ])) : v("", !0),
3139
- ce.value ? v("", !0) : (a(), s("div", no, [
3229
+ ge.value ? v("", !0) : (s(), l("div", Eo, [
3140
3230
  t[61] || (t[61] = e("p", { class: "artifactuse-share-popup__save-prompt-text" }, "Keep it permanently?", -1)),
3141
3231
  e("button", {
3142
3232
  class: "artifactuse-share-popup__save-prompt-btn",
3143
- onClick: ot
3233
+ onClick: _t
3144
3234
  }, " Save to account ")
3145
3235
  ]))
3146
3236
  ])) : v("", !0)
@@ -3176,11 +3266,11 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
3176
3266
  _: 1
3177
3267
  })
3178
3268
  ])) : v("", !0),
3179
- G.value ? (a(), s("button", {
3269
+ Ce.value ? (s(), l("button", {
3180
3270
  key: 1,
3181
3271
  class: "artifactuse-panel__footer-action",
3182
3272
  title: "Open in new tab",
3183
- onClick: rt
3273
+ onClick: ht
3184
3274
  }, [...t[64] || (t[64] = [
3185
3275
  e("svg", {
3186
3276
  viewBox: "0 0 24 24",
@@ -3198,12 +3288,12 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
3198
3288
  })
3199
3289
  ], -1)
3200
3290
  ])])) : v("", !0),
3201
- !Ee.value && ve.value.length > 1 ? (a(), s("div", oo, [
3291
+ !Se.value && _e.value.length > 1 ? (s(), l("div", Ao, [
3202
3292
  e("button", {
3203
3293
  class: "artifactuse-panel__nav-btn",
3204
- disabled: Pe.value <= 0,
3294
+ disabled: He.value <= 0,
3205
3295
  title: "Previous artifact",
3206
- onClick: Kt
3296
+ onClick: na
3207
3297
  }, [...t[65] || (t[65] = [
3208
3298
  e("svg", {
3209
3299
  viewBox: "0 0 24 24",
@@ -3213,13 +3303,13 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
3213
3303
  }, [
3214
3304
  e("polyline", { points: "15 18 9 12 15 6" })
3215
3305
  ], -1)
3216
- ])], 8, ro),
3306
+ ])], 8, Ho),
3217
3307
  e("button", {
3218
3308
  class: "artifactuse-panel__nav-trigger",
3219
3309
  title: "View all artifacts",
3220
- onClick: Zt
3310
+ onClick: ia
3221
3311
  }, [
3222
- e("span", null, n(Pe.value + 1) + " / " + n(ve.value.length), 1),
3312
+ e("span", null, i(He.value + 1) + " / " + i(_e.value.length), 1),
3223
3313
  t[66] || (t[66] = e("svg", {
3224
3314
  viewBox: "0 0 24 24",
3225
3315
  fill: "none",
@@ -3231,9 +3321,9 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
3231
3321
  ]),
3232
3322
  e("button", {
3233
3323
  class: "artifactuse-panel__nav-btn",
3234
- disabled: Pe.value >= ve.value.length - 1,
3324
+ disabled: He.value >= _e.value.length - 1,
3235
3325
  title: "Next artifact",
3236
- onClick: Yt
3326
+ onClick: oa
3237
3327
  }, [...t[67] || (t[67] = [
3238
3328
  e("svg", {
3239
3329
  viewBox: "0 0 24 24",
@@ -3243,15 +3333,15 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
3243
3333
  }, [
3244
3334
  e("polyline", { points: "9 18 15 12 9 6" })
3245
3335
  ], -1)
3246
- ])], 8, co),
3247
- Fe(ze, { name: "artifactuse-popup" }, {
3248
- default: Ve(() => [
3249
- Z.value ? (a(), s("div", uo, [
3250
- e("div", vo, [
3336
+ ])], 8, Bo),
3337
+ De(qe, { name: "artifactuse-popup" }, {
3338
+ default: Oe(() => [
3339
+ Z.value ? (s(), l("div", So, [
3340
+ e("div", zo, [
3251
3341
  t[69] || (t[69] = e("span", null, "Artifacts", -1)),
3252
3342
  e("button", {
3253
3343
  class: "artifactuse-panel__artifact-list-close",
3254
- onClick: t[18] || (t[18] = (u) => Z.value = !1)
3344
+ onClick: t[18] || (t[18] = (c) => Z.value = !1)
3255
3345
  }, [...t[68] || (t[68] = [
3256
3346
  e("svg", {
3257
3347
  viewBox: "0 0 24 24",
@@ -3274,27 +3364,27 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
3274
3364
  ], -1)
3275
3365
  ])])
3276
3366
  ]),
3277
- e("div", fo, [
3278
- (a(!0), s(F, null, ue(ve.value, (u, z) => (a(), s("button", {
3279
- key: u.id,
3280
- class: I(["artifactuse-panel__artifact-item", { "artifactuse-panel__artifact-item--active": u.id === y(r).id }]),
3281
- onClick: (X) => ct(u)
3367
+ e("div", Vo, [
3368
+ (s(!0), l(V, null, fe(_e.value, (c, A) => (s(), l("button", {
3369
+ key: c.id,
3370
+ class: R(["artifactuse-panel__artifact-item", { "artifactuse-panel__artifact-item--active": c.id === p(n).id }]),
3371
+ onClick: (F) => mt(c)
3282
3372
  }, [
3283
3373
  e("span", {
3284
3374
  class: "artifactuse-panel__artifact-item-icon",
3285
- innerHTML: Ue(u.language)
3286
- }, null, 8, _o),
3287
- e("div", ho, [
3288
- e("span", mo, n(u.title || "Untitled"), 1),
3289
- e("span", yo, [
3290
- Y(n(y(Ie)(u.language)) + " ", 1),
3291
- u.lineCount ? (a(), s(F, { key: 0 }, [
3292
- Y(" • " + n(u.lineCount) + " lines ", 1)
3375
+ innerHTML: Xe(c.language)
3376
+ }, null, 8, Fo),
3377
+ e("div", Ro, [
3378
+ e("span", qo, i(c.title || "Untitled"), 1),
3379
+ e("span", Oo, [
3380
+ G(i(p(Ue)(c.language)) + " ", 1),
3381
+ c.lineCount ? (s(), l(V, { key: 0 }, [
3382
+ G(" • " + i(c.lineCount) + " lines ", 1)
3293
3383
  ], 64)) : v("", !0)
3294
3384
  ])
3295
3385
  ]),
3296
- e("span", go, n(z + 1), 1)
3297
- ], 10, po))), 128))
3386
+ e("span", Uo, i(A + 1), 1)
3387
+ ], 10, Io))), 128))
3298
3388
  ])
3299
3389
  ])) : v("", !0)
3300
3390
  ]),
@@ -3309,22 +3399,22 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
3309
3399
  _: 1
3310
3400
  }));
3311
3401
  }
3312
- }, ko = ["title"], wo = {
3402
+ }, Do = ["title"], jo = {
3313
3403
  key: 0,
3314
3404
  class: "artifactuse-panel-toggle-badge"
3315
- }, Lo = {
3405
+ }, Yo = {
3316
3406
  __name: "ArtifactusePanelToggle",
3317
- setup(P) {
3318
- const { state: c, artifactCount: p, hasArtifacts: T, togglePanel: _ } = Re();
3319
- return (r, q) => (a(), s("button", {
3320
- class: I(["artifactuse-panel-toggle", {
3321
- "artifactuse-panel-toggle--active": y(c).isPanelOpen,
3322
- "artifactuse-panel-toggle--has-artifacts": y(T)
3407
+ setup(L) {
3408
+ const { state: d, artifactCount: _, hasArtifacts: T, togglePanel: f } = je();
3409
+ return (n, O) => (s(), l("button", {
3410
+ class: R(["artifactuse-panel-toggle", {
3411
+ "artifactuse-panel-toggle--active": p(d).isPanelOpen,
3412
+ "artifactuse-panel-toggle--has-artifacts": p(T)
3323
3413
  }]),
3324
- onClick: q[0] || (q[0] = (...A) => y(_) && y(_)(...A)),
3325
- title: y(c).isPanelOpen ? "Close artifacts panel" : "Open artifacts panel"
3414
+ onClick: O[0] || (O[0] = (...H) => p(f) && p(f)(...H)),
3415
+ title: p(d).isPanelOpen ? "Close artifacts panel" : "Open artifacts panel"
3326
3416
  }, [
3327
- q[1] || (q[1] = e("svg", {
3417
+ O[1] || (O[1] = e("svg", {
3328
3418
  viewBox: "0 0 24 24",
3329
3419
  fill: "none",
3330
3420
  stroke: "currentColor",
@@ -3335,13 +3425,13 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
3335
3425
  e("polyline", { points: "16 18 22 12 16 6" }),
3336
3426
  e("polyline", { points: "8 6 2 12 8 18" })
3337
3427
  ], -1)),
3338
- y(p) > 0 ? (a(), s("span", wo, n(y(p) > 99 ? "99+" : y(p)), 1)) : v("", !0)
3339
- ], 10, ko));
3428
+ p(_) > 0 ? (s(), l("span", jo, i(p(_) > 99 ? "99+" : p(_)), 1)) : v("", !0)
3429
+ ], 10, Do));
3340
3430
  }
3341
- }, wt = Symbol("artifactuse");
3342
- function bt(P = {}) {
3343
- var o;
3344
- const c = kt(P), p = yt({
3431
+ }, Et = Symbol("artifactuse");
3432
+ function At(L = {}) {
3433
+ var r;
3434
+ const d = Pt(L), _ = Tt({
3345
3435
  artifacts: [],
3346
3436
  activeArtifactId: null,
3347
3437
  isPanelOpen: !1,
@@ -3351,68 +3441,68 @@ function bt(P = {}) {
3351
3441
  tabViewModes: {},
3352
3442
  forceEmptyView: !1
3353
3443
  });
3354
- c.state.subscribe((h) => {
3355
- p.artifacts = h.artifacts, p.activeArtifactId = h.activeArtifactId, p.isPanelOpen = h.isPanelOpen, p.viewMode = h.viewMode, p.isFullscreen = h.isFullscreen, p.openTabs = h.openTabs, p.tabViewModes = h.tabViewModes, p.forceEmptyView = h.forceEmptyView;
3444
+ d.state.subscribe((h) => {
3445
+ _.artifacts = h.artifacts, _.activeArtifactId = h.activeArtifactId, _.isPanelOpen = h.isPanelOpen, _.viewMode = h.viewMode, _.isFullscreen = h.isFullscreen, _.openTabs = h.openTabs, _.tabViewModes = h.tabViewModes, _.forceEmptyView = h.forceEmptyView;
3356
3446
  });
3357
- const T = b(() => p.activeArtifactId && p.artifacts.find((h) => h.id === p.activeArtifactId) || null), _ = b(() => p.artifacts.filter((h) => !h.isInline).length), r = b(() => p.artifacts.some((h) => !h.isInline)), q = b(() => c.getPanelTypes()), A = b(() => T.value ? c.getPanelUrl(T.value) : null);
3358
- if (c.applyTheme(), P.theme === "auto" || !P.theme) {
3359
- const h = ((o = c.bridge) == null ? void 0 : o.theme) || c.theme;
3447
+ const T = k(() => _.activeArtifactId && _.artifacts.find((h) => h.id === _.activeArtifactId) || null), f = k(() => _.artifacts.filter((h) => !h.isInline).length), n = k(() => _.artifacts.some((h) => !h.isInline)), O = k(() => d.getPanelTypes()), H = k(() => T.value ? d.getPanelUrl(T.value) : null);
3448
+ if (d.applyTheme(), L.theme === "auto" || !L.theme) {
3449
+ const h = ((r = d.bridge) == null ? void 0 : r.theme) || d.theme;
3360
3450
  h != null && h.watchSystemTheme && h.watchSystemTheme(() => {
3361
- c.applyTheme();
3451
+ d.applyTheme();
3362
3452
  });
3363
3453
  }
3364
3454
  const g = {
3365
- instance: c,
3366
- state: p,
3455
+ instance: d,
3456
+ state: _,
3367
3457
  activeArtifact: T,
3368
- artifactCount: _,
3369
- hasArtifacts: r,
3458
+ artifactCount: f,
3459
+ hasArtifacts: n,
3370
3460
  // Panel computed
3371
- panelTypes: q,
3372
- activePanelUrl: A,
3461
+ panelTypes: O,
3462
+ activePanelUrl: H,
3373
3463
  // Methods
3374
- processMessage: c.processMessage,
3375
- initializeContent: c.initializeContent,
3376
- openArtifact: c.openArtifact,
3377
- openFile: c.openFile,
3378
- openCode: c.openCode,
3379
- updateFile: c.updateFile,
3380
- openPanel: c.openPanel,
3381
- closePanel: c.closePanel,
3382
- togglePanel: c.togglePanel,
3383
- toggleFullscreen: c.toggleFullscreen,
3384
- setViewMode: c.setViewMode,
3385
- getPanelUrl: c.getPanelUrl,
3386
- sendToPanel: c.sendToPanel,
3464
+ processMessage: d.processMessage,
3465
+ initializeContent: d.initializeContent,
3466
+ openArtifact: d.openArtifact,
3467
+ openFile: d.openFile,
3468
+ openCode: d.openCode,
3469
+ updateFile: d.updateFile,
3470
+ openPanel: d.openPanel,
3471
+ closePanel: d.closePanel,
3472
+ togglePanel: d.togglePanel,
3473
+ toggleFullscreen: d.toggleFullscreen,
3474
+ setViewMode: d.setViewMode,
3475
+ getPanelUrl: d.getPanelUrl,
3476
+ sendToPanel: d.sendToPanel,
3387
3477
  // Panel management
3388
- hasPanel: c.hasPanel,
3389
- registerPanel: c.registerPanel,
3390
- unregisterPanel: c.unregisterPanel,
3391
- getPanelTypes: c.getPanelTypes,
3478
+ hasPanel: d.hasPanel,
3479
+ registerPanel: d.registerPanel,
3480
+ unregisterPanel: d.unregisterPanel,
3481
+ getPanelTypes: d.getPanelTypes,
3392
3482
  // Multi-tab
3393
- closeTab: c.closeTab,
3394
- closeOtherTabs: c.closeOtherTabs,
3395
- closeAllTabs: c.closeAllTabs,
3483
+ closeTab: d.closeTab,
3484
+ closeOtherTabs: d.closeOtherTabs,
3485
+ closeAllTabs: d.closeAllTabs,
3396
3486
  // Events
3397
- on: c.on,
3398
- off: c.off,
3487
+ on: d.on,
3488
+ off: d.off,
3399
3489
  // State management
3400
- clearArtifacts: () => c.state.clear(),
3490
+ clearArtifacts: () => d.state.clear(),
3401
3491
  // Theme - wrap setTheme to also apply
3402
- applyTheme: c.applyTheme,
3492
+ applyTheme: d.applyTheme,
3403
3493
  setTheme: (h) => {
3404
- c.setTheme(h), c.applyTheme();
3494
+ d.setTheme(h), d.applyTheme();
3405
3495
  },
3406
- getTheme: c.getTheme
3496
+ getTheme: d.getTheme
3407
3497
  };
3408
- return ia(wt, g), g;
3498
+ return _a(Et, g), g;
3409
3499
  }
3410
- function Re() {
3411
- const P = na(wt);
3412
- return P || (console.warn("useArtifactuse() called without provideArtifactuse(). Creating standalone instance."), bt());
3500
+ function je() {
3501
+ const L = ha(Et);
3502
+ return L || (console.warn("useArtifactuse() called without provideArtifactuse(). Creating standalone instance."), At());
3413
3503
  }
3414
- function bo(P = {}) {
3415
- const c = kt(P), p = yt({
3504
+ function No(L = {}) {
3505
+ const d = Pt(L), _ = Tt({
3416
3506
  artifacts: [],
3417
3507
  activeArtifactId: null,
3418
3508
  isPanelOpen: !1,
@@ -3423,76 +3513,76 @@ function bo(P = {}) {
3423
3513
  forceEmptyView: !1
3424
3514
  });
3425
3515
  let T;
3426
- Te(() => {
3427
- T = c.state.subscribe((o) => {
3428
- p.artifacts = o.artifacts, p.activeArtifactId = o.activeArtifactId, p.isPanelOpen = o.isPanelOpen, p.viewMode = o.viewMode, p.isFullscreen = o.isFullscreen, p.openTabs = o.openTabs, p.tabViewModes = o.tabViewModes, p.forceEmptyView = o.forceEmptyView;
3429
- }), c.applyTheme();
3430
- }), Ye(() => {
3431
- T && T(), c.destroy();
3516
+ Ee(() => {
3517
+ T = d.state.subscribe((r) => {
3518
+ _.artifacts = r.artifacts, _.activeArtifactId = r.activeArtifactId, _.isPanelOpen = r.isPanelOpen, _.viewMode = r.viewMode, _.isFullscreen = r.isFullscreen, _.openTabs = r.openTabs, _.tabViewModes = r.tabViewModes, _.forceEmptyView = r.forceEmptyView;
3519
+ }), d.applyTheme();
3520
+ }), st(() => {
3521
+ T && T(), d.destroy();
3432
3522
  });
3433
- const _ = b(() => p.activeArtifactId && p.artifacts.find((o) => o.id === p.activeArtifactId) || null), r = b(() => p.artifacts.filter((o) => !o.isInline).length), q = b(() => p.artifacts.some((o) => !o.isInline)), A = b(() => c.getPanelTypes()), g = b(() => _.value ? c.getPanelUrl(_.value) : null);
3523
+ const f = k(() => _.activeArtifactId && _.artifacts.find((r) => r.id === _.activeArtifactId) || null), n = k(() => _.artifacts.filter((r) => !r.isInline).length), O = k(() => _.artifacts.some((r) => !r.isInline)), H = k(() => d.getPanelTypes()), g = k(() => f.value ? d.getPanelUrl(f.value) : null);
3434
3524
  return {
3435
- instance: c,
3436
- state: p,
3437
- activeArtifact: _,
3438
- artifactCount: r,
3439
- hasArtifacts: q,
3525
+ instance: d,
3526
+ state: _,
3527
+ activeArtifact: f,
3528
+ artifactCount: n,
3529
+ hasArtifacts: O,
3440
3530
  // Panel computed
3441
- panelTypes: A,
3531
+ panelTypes: H,
3442
3532
  activePanelUrl: g,
3443
3533
  // Methods
3444
- processMessage: c.processMessage,
3445
- initializeContent: c.initializeContent,
3446
- openArtifact: c.openArtifact,
3447
- openFile: c.openFile,
3448
- openCode: c.openCode,
3449
- updateFile: c.updateFile,
3450
- openPanel: c.openPanel,
3451
- closePanel: c.closePanel,
3452
- togglePanel: c.togglePanel,
3453
- toggleFullscreen: c.toggleFullscreen,
3454
- setViewMode: c.setViewMode,
3455
- getPanelUrl: c.getPanelUrl,
3456
- sendToPanel: c.sendToPanel,
3534
+ processMessage: d.processMessage,
3535
+ initializeContent: d.initializeContent,
3536
+ openArtifact: d.openArtifact,
3537
+ openFile: d.openFile,
3538
+ openCode: d.openCode,
3539
+ updateFile: d.updateFile,
3540
+ openPanel: d.openPanel,
3541
+ closePanel: d.closePanel,
3542
+ togglePanel: d.togglePanel,
3543
+ toggleFullscreen: d.toggleFullscreen,
3544
+ setViewMode: d.setViewMode,
3545
+ getPanelUrl: d.getPanelUrl,
3546
+ sendToPanel: d.sendToPanel,
3457
3547
  // Panel management
3458
- hasPanel: c.hasPanel,
3459
- registerPanel: c.registerPanel,
3460
- unregisterPanel: c.unregisterPanel,
3461
- getPanelTypes: c.getPanelTypes,
3548
+ hasPanel: d.hasPanel,
3549
+ registerPanel: d.registerPanel,
3550
+ unregisterPanel: d.unregisterPanel,
3551
+ getPanelTypes: d.getPanelTypes,
3462
3552
  // Multi-tab
3463
- closeTab: c.closeTab,
3464
- closeOtherTabs: c.closeOtherTabs,
3465
- closeAllTabs: c.closeAllTabs,
3553
+ closeTab: d.closeTab,
3554
+ closeOtherTabs: d.closeOtherTabs,
3555
+ closeAllTabs: d.closeAllTabs,
3466
3556
  // Events
3467
- on: c.on,
3468
- off: c.off,
3557
+ on: d.on,
3558
+ off: d.off,
3469
3559
  // State management
3470
- clearArtifacts: () => c.state.clear(),
3560
+ clearArtifacts: () => d.state.clear(),
3471
3561
  // Theme - wrap setTheme to also apply
3472
- applyTheme: c.applyTheme,
3473
- setTheme: (o) => {
3474
- c.setTheme(o), c.applyTheme();
3562
+ applyTheme: d.applyTheme,
3563
+ setTheme: (r) => {
3564
+ d.setTheme(r), d.applyTheme();
3475
3565
  },
3476
- getTheme: c.getTheme
3566
+ getTheme: d.getTheme
3477
3567
  };
3478
3568
  }
3479
- const Po = {
3480
- provideArtifactuse: bt,
3481
- useArtifactuse: Re,
3482
- createArtifactuseComposable: bo,
3483
- DEFAULT_PANELS: ca
3569
+ const Go = {
3570
+ provideArtifactuse: At,
3571
+ useArtifactuse: je,
3572
+ createArtifactuseComposable: No,
3573
+ DEFAULT_PANELS: ga
3484
3574
  };
3485
3575
  export {
3486
- Mo as ArtifactuseAgentMessage,
3487
- ba as ArtifactuseCard,
3488
- ds as ArtifactuseInlineForm,
3489
- To as ArtifactusePanel,
3490
- Lo as ArtifactusePanelToggle,
3491
- pi as ArtifactuseSocialPreview,
3492
- bi as ArtifactuseViewer,
3493
- ca as DEFAULT_PANELS,
3494
- bo as createArtifactuseComposable,
3495
- Po as default,
3496
- bt as provideArtifactuse,
3497
- Re as useArtifactuse
3576
+ Zo as ArtifactuseAgentMessage,
3577
+ Sa as ArtifactuseCard,
3578
+ Cs as ArtifactuseInlineForm,
3579
+ Ko as ArtifactusePanel,
3580
+ Yo as ArtifactusePanelToggle,
3581
+ Mi as ArtifactuseSocialPreview,
3582
+ Si as ArtifactuseViewer,
3583
+ ga as DEFAULT_PANELS,
3584
+ No as createArtifactuseComposable,
3585
+ Go as default,
3586
+ At as provideArtifactuse,
3587
+ je as useArtifactuse
3498
3588
  };