artifactuse 0.2.0 → 0.2.3

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 N, createElementVNode as e, toDisplayString as l, withModifiers as me, onMounted as $e, watch as de, Fragment as R, createCommentVNode as v, renderList as ve, createTextVNode as K, h as se, normalizeStyle as Pe, createStaticVNode as It, createBlock as xe, resolveDynamicComponent as Ft, nextTick as be, onUnmounted as De, Teleport as Vt, createVNode as Be, Transition as Ae, withCtx as He, withKeys as Rt, onBeforeUnmount as qt, unref as g, withDirectives as at, vShow as st, reactive as lt, provide as Ot, inject as Ut } from "vue";
2
- import { g as Se, f as nt, a as Oe, b as Ue, n as Dt, i as it, c as jt, D as Nt, d as ot } from "../index-llShix6s.js";
3
- import { J as Wt } from "../jszip.min-CdmYyw5L.js";
4
- const Jt = { class: "artifactuse-card__icon" }, Xt = ["innerHTML"], Zt = { class: "artifactuse-card__content" }, Kt = { class: "artifactuse-card__title" }, Yt = { class: "artifactuse-card__meta" }, Qt = { class: "artifactuse-card__type" }, Gt = { class: "artifactuse-card__size" }, ea = { class: "artifactuse-card__actions" }, ta = ["title"], aa = {
1
+ import { ref as M, computed as C, createElementBlock as s, openBlock as a, normalizeClass as j, createElementVNode as e, toDisplayString as l, withModifiers as he, onMounted as Me, watch as de, Fragment as R, createCommentVNode as v, renderList as ve, createTextVNode as K, h as se, normalizeStyle as He, createStaticVNode as Ot, createBlock as $e, resolveDynamicComponent as Ut, nextTick as xe, onUnmounted as We, Teleport as Dt, createVNode as ze, Transition as Ee, withCtx as Be, withKeys as Nt, onBeforeUnmount as jt, unref as y, withDirectives as lt, vShow as nt, reactive as rt, provide as Wt, inject as Jt } from "vue";
2
+ import { g as Se, f as ct, a as Ne, b as je, n as Xt, i as ot, c as Zt, D as Kt, d as ut } from "../index-B4BEvWtI.js";
3
+ import { J as Yt } from "../jszip.min-CdmYyw5L.js";
4
+ const Qt = { class: "artifactuse-card__icon" }, Gt = ["innerHTML"], ea = { class: "artifactuse-card__content" }, ta = { class: "artifactuse-card__title" }, aa = { class: "artifactuse-card__meta" }, sa = { class: "artifactuse-card__type" }, ia = { class: "artifactuse-card__size" }, la = { class: "artifactuse-card__actions" }, na = ["title"], oa = {
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
- }, sa = {
10
+ }, ra = {
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
- }, ia = {
16
+ }, ca = {
17
17
  __name: "ArtifactuseCard",
18
18
  props: {
19
19
  artifact: {
@@ -26,58 +26,58 @@ const Jt = { class: "artifactuse-card__icon" }, Xt = ["innerHTML"], Zt = { class
26
26
  }
27
27
  },
28
28
  emits: ["open", "copy", "download"],
29
- setup(H, { emit: d }) {
30
- const _ = H, L = d, m = M(!1), r = b(() => Se(_.artifact.language)), V = b(() => {
29
+ setup(H, { emit: c }) {
30
+ const _ = H, T = c, f = M(!1), o = C(() => Se(_.artifact.language)), q = C(() => {
31
31
  var x;
32
- return nt(_.artifact.size || ((x = _.artifact.code) == null ? void 0 : x.length) || 0);
33
- }), S = b(() => Oe(_.artifact.language));
34
- function h(x) {
35
- x.stopPropagation(), L("open", _.artifact);
32
+ return ct(_.artifact.size || ((x = _.artifact.code) == null ? void 0 : x.length) || 0);
33
+ }), E = C(() => Ne(_.artifact.language));
34
+ function g(x) {
35
+ x.stopPropagation(), T("open", _.artifact);
36
36
  }
37
37
  async function n() {
38
38
  try {
39
- await navigator.clipboard.writeText(_.artifact.code), m.value = !0, setTimeout(() => {
40
- m.value = !1;
41
- }, 2e3), L("copy", _.artifact);
39
+ await navigator.clipboard.writeText(_.artifact.code), f.value = !0, setTimeout(() => {
40
+ f.value = !1;
41
+ }, 2e3), T("copy", _.artifact);
42
42
  } catch (x) {
43
43
  console.error("Failed to copy:", x);
44
44
  }
45
45
  }
46
- function p() {
46
+ function h() {
47
47
  var W;
48
- const x = new Blob([_.artifact.code], { type: "text/plain" }), F = URL.createObjectURL(x), $ = document.createElement("a"), j = Ue(_.artifact.language), q = ((W = _.artifact.title) == null ? void 0 : W.replace(/[^a-z0-9]/gi, "_").toLowerCase()) || "code";
49
- $.href = F, $.download = `${q}.${j}`, document.body.appendChild($), $.click(), document.body.removeChild($), URL.revokeObjectURL(F), L("download", _.artifact);
48
+ const x = new Blob([_.artifact.code], { type: "text/plain" }), I = URL.createObjectURL(x), $ = document.createElement("a"), N = je(_.artifact.language), O = ((W = _.artifact.title) == null ? void 0 : W.replace(/[^a-z0-9]/gi, "_").toLowerCase()) || "code";
49
+ $.href = I, $.download = `${O}.${N}`, document.body.appendChild($), $.click(), document.body.removeChild($), URL.revokeObjectURL(I), T("download", _.artifact);
50
50
  }
51
- return (x, F) => (a(), s("div", {
52
- class: N(["artifactuse-card", { "artifactuse-card--active": H.isActive }]),
53
- onClick: h
51
+ return (x, I) => (a(), s("div", {
52
+ class: j(["artifactuse-card", { "artifactuse-card--active": H.isActive }]),
53
+ onClick: g
54
54
  }, [
55
- e("div", Jt, [
55
+ e("div", Qt, [
56
56
  (a(), s("svg", {
57
57
  viewBox: "0 0 24 24",
58
58
  fill: "none",
59
59
  stroke: "currentColor",
60
60
  "stroke-width": "1.5",
61
- innerHTML: S.value
62
- }, null, 8, Xt))
61
+ innerHTML: E.value
62
+ }, null, 8, Gt))
63
63
  ]),
64
- e("div", Zt, [
65
- e("div", Kt, l(H.artifact.title), 1),
66
- e("div", Yt, [
67
- e("span", Qt, l(r.value), 1),
68
- F[0] || (F[0] = e("span", { class: "artifactuse-card__separator" }, "•", -1)),
69
- e("span", Gt, l(V.value), 1)
64
+ e("div", ea, [
65
+ e("div", ta, l(H.artifact.title), 1),
66
+ e("div", aa, [
67
+ e("span", sa, l(o.value), 1),
68
+ I[0] || (I[0] = e("span", { class: "artifactuse-card__separator" }, "•", -1)),
69
+ e("span", ia, l(q.value), 1)
70
70
  ])
71
71
  ]),
72
- e("div", ea, [
72
+ e("div", la, [
73
73
  e("button", {
74
74
  class: "artifactuse-card__action",
75
- onClick: me(n, ["stop"]),
76
- title: m.value ? "Copied!" : "Copy code"
75
+ onClick: he(n, ["stop"]),
76
+ title: f.value ? "Copied!" : "Copy code"
77
77
  }, [
78
- m.value ? (a(), s("svg", sa, [...F[2] || (F[2] = [
78
+ f.value ? (a(), s("svg", ra, [...I[2] || (I[2] = [
79
79
  e("polyline", { points: "20 6 9 17 4 12" }, null, -1)
80
- ])])) : (a(), s("svg", aa, [...F[1] || (F[1] = [
80
+ ])])) : (a(), s("svg", oa, [...I[1] || (I[1] = [
81
81
  e("rect", {
82
82
  x: "9",
83
83
  y: "9",
@@ -88,12 +88,12 @@ const Jt = { class: "artifactuse-card__icon" }, Xt = ["innerHTML"], Zt = { 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, ta),
91
+ ], 8, na),
92
92
  e("button", {
93
93
  class: "artifactuse-card__action",
94
- onClick: me(p, ["stop"]),
94
+ onClick: he(h, ["stop"]),
95
95
  title: "Download file"
96
- }, [...F[3] || (F[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 Jt = { class: "artifactuse-card__icon" }, Xt = ["innerHTML"], Zt = { class
111
111
  ], -1)
112
112
  ])])
113
113
  ]),
114
- F[4] || (F[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 Jt = { class: "artifactuse-card__icon" }, Xt = ["innerHTML"], Zt = { class
123
123
  ], -1))
124
124
  ], 2));
125
125
  }
126
- }, la = ["data-artifactuse-theme"], na = {
126
+ }, ua = ["data-artifactuse-theme"], da = {
127
127
  key: 0,
128
128
  class: "artifactuse-form-collapsed"
129
- }, oa = { class: "artifactuse-form-collapsed-icon" }, ra = {
129
+ }, va = { 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 Jt = { class: "artifactuse-card__icon" }, Xt = ["innerHTML"], Zt = { class
134
134
  "stroke-width": "2.5",
135
135
  "stroke-linecap": "round",
136
136
  "stroke-linejoin": "round"
137
- }, ca = {
137
+ }, pa = {
138
138
  key: 1,
139
139
  viewBox: "0 0 24 24",
140
140
  fill: "none",
@@ -142,7 +142,7 @@ const Jt = { class: "artifactuse-card__icon" }, Xt = ["innerHTML"], Zt = { class
142
142
  "stroke-width": "2.5",
143
143
  "stroke-linecap": "round",
144
144
  "stroke-linejoin": "round"
145
- }, ua = {
145
+ }, _a = {
146
146
  key: 2,
147
147
  viewBox: "0 0 24 24",
148
148
  fill: "none",
@@ -150,64 +150,64 @@ const Jt = { class: "artifactuse-card__icon" }, Xt = ["innerHTML"], Zt = { class
150
150
  "stroke-width": "2.5",
151
151
  "stroke-linecap": "round",
152
152
  "stroke-linejoin": "round"
153
- }, da = { class: "artifactuse-form-collapsed-title" }, va = {
153
+ }, ha = { class: "artifactuse-form-collapsed-title" }, ma = {
154
154
  key: 0,
155
155
  class: "artifactuse-form-header"
156
- }, fa = {
156
+ }, ya = {
157
157
  key: 0,
158
158
  class: "artifactuse-form-title"
159
- }, pa = {
159
+ }, ga = {
160
160
  key: 1,
161
161
  class: "artifactuse-form-description"
162
- }, ha = {
162
+ }, ka = {
163
163
  key: 1,
164
164
  class: "artifactuse-form-buttons"
165
- }, _a = ["disabled", "onClick"], ma = ["innerHTML"], ya = { class: "artifactuse-form-fields" }, ga = {
165
+ }, wa = ["disabled", "onClick"], ba = ["innerHTML"], Ca = { class: "artifactuse-form-fields" }, xa = {
166
166
  key: 0,
167
167
  class: "artifactuse-form-buttons"
168
- }, ka = ["type", "disabled", "onClick"], wa = {
168
+ }, $a = ["type", "disabled", "onClick"], Ma = {
169
169
  key: 0,
170
170
  class: "artifactuse-form-btn-spinner"
171
- }, Ca = ["innerHTML"], ba = {
171
+ }, Ta = ["innerHTML"], La = {
172
172
  key: 1,
173
173
  class: "artifactuse-form-divider"
174
- }, xa = {
174
+ }, Pa = {
175
175
  key: 2,
176
176
  class: "artifactuse-form-heading"
177
- }, $a = {
177
+ }, Aa = {
178
178
  key: 3,
179
179
  class: "artifactuse-form-field"
180
- }, Ma = { class: "artifactuse-checkbox-label" }, La = ["checked", "disabled", "onChange"], Ta = { class: "artifactuse-checkbox-text" }, Pa = {
180
+ }, Ha = { class: "artifactuse-checkbox-label" }, Ea = ["checked", "disabled", "onChange"], Ba = { class: "artifactuse-checkbox-text" }, Sa = {
181
181
  key: 0,
182
182
  class: "artifactuse-required"
183
- }, Aa = {
183
+ }, za = {
184
184
  key: 0,
185
185
  class: "artifactuse-help-text"
186
- }, Ha = {
186
+ }, Va = {
187
187
  key: 1,
188
188
  class: "artifactuse-error-text"
189
- }, Sa = {
189
+ }, Ia = {
190
190
  key: 4,
191
191
  class: "artifactuse-form-field"
192
- }, Ba = ["for"], Ea = {
192
+ }, Fa = ["for"], Ra = {
193
193
  key: 0,
194
194
  class: "artifactuse-required"
195
- }, za = ["id", "type", "value", "placeholder", "disabled", "required", "onInput"], Ia = ["id", "value", "placeholder", "disabled", "required", "rows", "onInput"], Fa = ["id", "value", "disabled", "required", "onChange"], Va = { value: "" }, Ra = ["value", "disabled"], qa = {
195
+ }, qa = ["id", "type", "value", "placeholder", "disabled", "required", "onInput"], Oa = ["id", "value", "placeholder", "disabled", "required", "rows", "onInput"], Ua = ["id", "value", "disabled", "required", "onChange"], Da = { value: "" }, Na = ["value", "disabled"], ja = {
196
196
  key: 3,
197
197
  class: "artifactuse-radio-group"
198
- }, Oa = ["name", "value", "checked", "disabled", "onChange"], Ua = {
198
+ }, Wa = ["name", "value", "checked", "disabled", "onChange"], Ja = {
199
199
  key: 4,
200
200
  class: "artifactuse-help-text"
201
- }, Da = {
201
+ }, Xa = {
202
202
  key: 5,
203
203
  class: "artifactuse-error-text"
204
- }, ja = {
204
+ }, Za = {
205
205
  key: 0,
206
206
  class: "artifactuse-form-buttons artifactuse-form-buttons-default"
207
- }, Na = ["disabled"], Wa = {
207
+ }, Ka = ["disabled"], Ya = {
208
208
  key: 0,
209
209
  class: "artifactuse-form-btn-spinner"
210
- }, Ja = {
210
+ }, Qa = {
211
211
  __name: "ArtifactuseInlineForm",
212
212
  props: {
213
213
  artifact: { type: Object, required: !0 },
@@ -220,133 +220,133 @@ const Jt = { class: "artifactuse-card__icon" }, Xt = ["innerHTML"], Zt = { class
220
220
  }
221
221
  },
222
222
  emits: ["submit", "cancel", "reset", "button-click"],
223
- setup(H, { emit: d }) {
224
- const _ = H, L = d, m = M(_.initialState), r = b(() => m.value !== "active"), V = b(() => m.value === "active" ? "" : `artifactuse-form--${m.value}`);
225
- function S(w) {
226
- m.value = w;
223
+ setup(H, { emit: c }) {
224
+ const _ = H, T = c, f = M(_.initialState), o = C(() => f.value !== "active"), q = C(() => f.value === "active" ? "" : `artifactuse-form--${f.value}`);
225
+ function E(w) {
226
+ f.value = w;
227
227
  }
228
- const h = b(() => {
228
+ const g = C(() => {
229
229
  try {
230
230
  return JSON.parse(_.artifact.code);
231
231
  } catch {
232
232
  return { title: "Invalid Form", variant: "fields", data: { fields: [] } };
233
233
  }
234
- }), n = M(null), p = b(() => _.artifact.id || h.value.id || `form-${Date.now()}`), x = b(() => `artifactuse-form-${h.value.variant || "fields"}`), F = b(() => h.value.title || "Form"), $ = M({}), j = M({}), q = M(!1), W = b(() => {
234
+ }), n = M(null), h = C(() => _.artifact.id || g.value.id || `form-${Date.now()}`), x = C(() => `artifactuse-form-${g.value.variant || "fields"}`), I = C(() => g.value.title || "Form"), $ = M({}), N = M({}), O = M(!1), W = C(() => {
235
235
  var w;
236
- return ((w = h.value.data) == null ? void 0 : w.fields) || [];
237
- }), Y = b(() => {
236
+ return ((w = g.value.data) == null ? void 0 : w.fields) || [];
237
+ }), Y = C(() => {
238
238
  var w;
239
- return h.value.variant === "buttons" ? ((w = h.value.data) == null ? void 0 : w.fields) || [] : [];
240
- }), E = b(() => W.value.some((w) => w.type === "buttons"));
239
+ return g.value.variant === "buttons" ? ((w = g.value.data) == null ? void 0 : w.fields) || [] : [];
240
+ }), S = C(() => W.value.some((w) => w.type === "buttons"));
241
241
  function ie(w) {
242
242
  if (!w) return null;
243
- const T = w.trim();
244
- if (T.startsWith("#")) {
245
- let c = T.slice(1);
246
- if (c.length === 3 && (c = c.split("").map((z) => z + z).join("")), c.length === 6) {
247
- const z = parseInt(c.slice(0, 2), 16), le = parseInt(c.slice(2, 4), 16), pe = parseInt(c.slice(4, 6), 16);
243
+ const L = w.trim();
244
+ if (L.startsWith("#")) {
245
+ let u = L.slice(1);
246
+ if (u.length === 3 && (u = u.split("").map((z) => z + z).join("")), u.length === 6) {
247
+ const z = parseInt(u.slice(0, 2), 16), le = parseInt(u.slice(2, 4), 16), pe = parseInt(u.slice(4, 6), 16);
248
248
  if (!isNaN(z) && !isNaN(le) && !isNaN(pe)) return `${z}, ${le}, ${pe}`;
249
249
  }
250
250
  }
251
- const o = T.match(/^rgba?\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)/i);
252
- if (o) return `${o[1]}, ${o[2]}, ${o[3]}`;
253
- const B = T.split(/[\s,]+/).map(Number).filter((c) => !isNaN(c));
251
+ const r = L.match(/^rgba?\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)/i);
252
+ if (r) return `${r[1]}, ${r[2]}, ${r[3]}`;
253
+ const B = L.split(/[\s,]+/).map(Number).filter((u) => !isNaN(u));
254
254
  return B.length >= 3 ? `${B[0]}, ${B[1]}, ${B[2]}` : null;
255
255
  }
256
- function X() {
256
+ function Z() {
257
257
  if (n.value && _.accent) {
258
258
  const w = ie(_.accent);
259
259
  w && n.value.style.setProperty("--artifactuse-primary", w);
260
260
  }
261
261
  }
262
- $e(() => {
263
- X(), m.value = _.initialState;
264
- }), de(() => _.accent, X), de(() => _.initialState, (w) => {
265
- m.value = w;
262
+ Me(() => {
263
+ Z(), f.value = _.initialState;
264
+ }), de(() => _.accent, Z), de(() => _.initialState, (w) => {
265
+ f.value = w;
266
266
  });
267
- function J() {
268
- var o;
267
+ function X() {
268
+ var r;
269
269
  const w = {};
270
270
  W.value.forEach((B) => {
271
271
  ["buttons", "divider", "heading"].includes(B.type) || (B.defaultValue !== void 0 ? w[B.name] = B.defaultValue : B.type === "checkbox" ? w[B.name] = !1 : w[B.name] = "");
272
- }), (o = h.value.data) != null && o.defaults && Object.assign(w, h.value.data.defaults), $.value = w;
272
+ }), (r = g.value.data) != null && r.defaults && Object.assign(w, g.value.data.defaults), $.value = w;
273
273
  }
274
- J(), de(() => _.artifact.code, J);
274
+ X(), de(() => _.artifact.code, X);
275
275
  function oe(w) {
276
276
  return ["text", "email", "password", "tel", "url", "number", "date", "time", "datetime-local"].includes(w);
277
277
  }
278
- function f(w) {
279
- return w ? w.map((T) => typeof T == "string" ? { label: T, value: T } : T) : [];
278
+ function m(w) {
279
+ return w ? w.map((L) => typeof L == "string" ? { label: L, value: L } : L) : [];
280
280
  }
281
- function k(w, T) {
282
- $.value[w] = T, j.value[w] && delete j.value[w];
281
+ function k(w, L) {
282
+ $.value[w] = L, N.value[w] && delete N.value[w];
283
283
  }
284
284
  function ee() {
285
285
  var B;
286
286
  const w = {};
287
- W.value.forEach((c) => {
288
- if (["buttons", "divider", "heading"].includes(c.type)) return;
289
- const z = $.value[c.name];
290
- if (c.required && !z && z !== 0 && z !== !1) {
291
- w[c.name] = `${c.label || "This field"} is required`;
287
+ W.value.forEach((u) => {
288
+ if (["buttons", "divider", "heading"].includes(u.type)) return;
289
+ const z = $.value[u.name];
290
+ if (u.required && !z && z !== 0 && z !== !1) {
291
+ w[u.name] = `${u.label || "This field"} is required`;
292
292
  return;
293
293
  }
294
- if (c.pattern && z && !new RegExp(c.pattern).test(z)) {
295
- w[c.name] = c.patternMessage || `${c.label || "This field"} is invalid`;
294
+ if (u.pattern && z && !new RegExp(u.pattern).test(z)) {
295
+ w[u.name] = u.patternMessage || `${u.label || "This field"} is invalid`;
296
296
  return;
297
297
  }
298
- if (c.type === "email" && z && !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(z)) {
299
- w[c.name] = "Please enter a valid email address";
298
+ if (u.type === "email" && z && !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(z)) {
299
+ w[u.name] = "Please enter a valid email address";
300
300
  return;
301
301
  }
302
- if (c.minLength && z && z.length < c.minLength) {
303
- w[c.name] = `Minimum ${c.minLength} characters required`;
302
+ if (u.minLength && z && z.length < u.minLength) {
303
+ w[u.name] = `Minimum ${u.minLength} characters required`;
304
304
  return;
305
305
  }
306
- if (c.maxLength && z && z.length > c.maxLength) {
307
- w[c.name] = `Maximum ${c.maxLength} characters allowed`;
306
+ if (u.maxLength && z && z.length > u.maxLength) {
307
+ w[u.name] = `Maximum ${u.maxLength} characters allowed`;
308
308
  return;
309
309
  }
310
310
  });
311
- const o = (B = h.value.data) == null ? void 0 : B.validation;
312
- return o && Object.entries(o).forEach(([c, z]) => {
313
- if (w[c]) return;
314
- const le = $.value[c];
315
- z.pattern && le && (new RegExp(z.pattern).test(le) || (w[c] = z.message || `${c} is invalid`));
316
- }), j.value = w, Object.keys(w).length === 0;
311
+ const r = (B = g.value.data) == null ? void 0 : B.validation;
312
+ return r && Object.entries(r).forEach(([u, z]) => {
313
+ if (w[u]) return;
314
+ const le = $.value[u];
315
+ z.pattern && le && (new RegExp(z.pattern).test(le) || (w[u] = z.message || `${u} is invalid`));
316
+ }), N.value = w, Object.keys(w).length === 0;
317
317
  }
318
318
  function re() {
319
- J(), j.value = {};
319
+ X(), N.value = {};
320
320
  }
321
321
  function P() {
322
- ee() && (q.value = !0, L("submit", {
323
- formId: p.value,
322
+ ee() && (O.value = !0, T("submit", {
323
+ formId: h.value,
324
324
  action: "submit",
325
325
  values: { ...$.value },
326
326
  timestamp: Date.now()
327
327
  }), setTimeout(() => {
328
- q.value = !1, S("submitted");
328
+ O.value = !1, E("submitted");
329
329
  }, 300));
330
330
  }
331
331
  function Q(w) {
332
- const T = w.action || "custom";
333
- switch (T) {
332
+ const L = w.action || "custom";
333
+ switch (L) {
334
334
  case "submit":
335
335
  P();
336
336
  break;
337
337
  case "cancel":
338
- L("cancel", {
339
- formId: p.value,
338
+ T("cancel", {
339
+ formId: h.value,
340
340
  action: "cancel",
341
341
  buttonName: w.name || "cancel",
342
342
  timestamp: Date.now()
343
343
  }), setTimeout(() => {
344
- S("cancelled");
344
+ E("cancelled");
345
345
  }, 150);
346
346
  break;
347
347
  case "reset":
348
- re(), L("reset", {
349
- formId: p.value,
348
+ re(), T("reset", {
349
+ formId: h.value,
350
350
  action: "reset",
351
351
  buttonName: w.name || "reset",
352
352
  timestamp: Date.now()
@@ -354,34 +354,34 @@ const Jt = { class: "artifactuse-card__icon" }, Xt = ["innerHTML"], Zt = { class
354
354
  break;
355
355
  case "custom":
356
356
  default:
357
- L("button-click", {
358
- formId: p.value,
359
- action: T,
357
+ T("button-click", {
358
+ formId: h.value,
359
+ action: L,
360
360
  buttonName: w.name || w.label,
361
361
  buttonLabel: w.label,
362
362
  values: { ...$.value },
363
363
  timestamp: Date.now()
364
364
  }), setTimeout(() => {
365
- S("submitted");
365
+ E("submitted");
366
366
  }, 150);
367
367
  break;
368
368
  }
369
369
  }
370
- return (w, T) => (a(), s("div", {
370
+ return (w, L) => (a(), s("div", {
371
371
  ref_key: "containerRef",
372
372
  ref: n,
373
- class: N([
373
+ class: j([
374
374
  "artifactuse-inline-form",
375
375
  x.value,
376
- V.value
376
+ q.value
377
377
  ]),
378
378
  "data-artifactuse-theme": H.theme
379
379
  }, [
380
- r.value ? (a(), s("div", na, [
381
- e("div", oa, [
382
- m.value === "submitted" ? (a(), s("svg", ra, [...T[1] || (T[1] = [
380
+ o.value ? (a(), s("div", da, [
381
+ e("div", va, [
382
+ f.value === "submitted" ? (a(), s("svg", fa, [...L[1] || (L[1] = [
383
383
  e("polyline", { points: "20 6 9 17 4 12" }, null, -1)
384
- ])])) : m.value === "cancelled" ? (a(), s("svg", ca, [...T[2] || (T[2] = [
384
+ ])])) : f.value === "cancelled" ? (a(), s("svg", pa, [...L[2] || (L[2] = [
385
385
  e("line", {
386
386
  x1: "18",
387
387
  y1: "6",
@@ -394,7 +394,7 @@ const Jt = { class: "artifactuse-card__icon" }, Xt = ["innerHTML"], Zt = { class
394
394
  x2: "18",
395
395
  y2: "18"
396
396
  }, null, -1)
397
- ])])) : (a(), s("svg", ua, [...T[3] || (T[3] = [
397
+ ])])) : (a(), s("svg", _a, [...L[3] || (L[3] = [
398
398
  e("line", {
399
399
  x1: "5",
400
400
  y1: "12",
@@ -403,216 +403,216 @@ const Jt = { class: "artifactuse-card__icon" }, Xt = ["innerHTML"], Zt = { class
403
403
  }, null, -1)
404
404
  ])]))
405
405
  ]),
406
- e("span", da, l(F.value), 1)
406
+ e("span", ha, l(I.value), 1)
407
407
  ])) : (a(), s(R, { key: 1 }, [
408
- h.value.title || h.value.description ? (a(), s("div", va, [
409
- h.value.title ? (a(), s("div", fa, l(h.value.title), 1)) : v("", !0),
410
- h.value.description ? (a(), s("p", pa, l(h.value.description), 1)) : v("", !0)
408
+ g.value.title || g.value.description ? (a(), s("div", ma, [
409
+ g.value.title ? (a(), s("div", ya, l(g.value.title), 1)) : v("", !0),
410
+ g.value.description ? (a(), s("p", ga, l(g.value.description), 1)) : v("", !0)
411
411
  ])) : v("", !0),
412
- h.value.variant === "buttons" ? (a(), s("div", ha, [
413
- (a(!0), s(R, null, ve(Y.value, (o) => (a(), s("button", {
414
- key: o.name || o.label,
412
+ g.value.variant === "buttons" ? (a(), s("div", ka, [
413
+ (a(!0), s(R, null, ve(Y.value, (r) => (a(), s("button", {
414
+ key: r.name || r.label,
415
415
  type: "button",
416
- class: N(["artifactuse-form-btn", `artifactuse-form-btn-${o.variant || "secondary"}`]),
417
- disabled: o.disabled || q.value,
418
- onClick: (B) => Q(o)
416
+ class: j(["artifactuse-form-btn", `artifactuse-form-btn-${r.variant || "secondary"}`]),
417
+ disabled: r.disabled || O.value,
418
+ onClick: (B) => Q(r)
419
419
  }, [
420
- o.icon ? (a(), s("span", {
420
+ r.icon ? (a(), s("span", {
421
421
  key: 0,
422
422
  class: "artifactuse-form-btn-icon",
423
- innerHTML: o.icon
424
- }, null, 8, ma)) : v("", !0),
425
- K(" " + l(o.label), 1)
426
- ], 10, _a))), 128))
423
+ innerHTML: r.icon
424
+ }, null, 8, ba)) : v("", !0),
425
+ K(" " + l(r.label), 1)
426
+ ], 10, wa))), 128))
427
427
  ])) : (a(), s("form", {
428
428
  key: 2,
429
429
  class: "artifactuse-form",
430
- onSubmit: me(P, ["prevent"])
430
+ onSubmit: he(P, ["prevent"])
431
431
  }, [
432
- e("div", ya, [
433
- (a(!0), s(R, null, ve(W.value, (o, B) => (a(), s(R, {
434
- key: o.name || B
432
+ e("div", Ca, [
433
+ (a(!0), s(R, null, ve(W.value, (r, B) => (a(), s(R, {
434
+ key: r.name || B
435
435
  }, [
436
- o.type === "buttons" ? (a(), s("div", ga, [
437
- (a(!0), s(R, null, ve(o.fields || [], (c) => (a(), s("button", {
438
- key: c.name || c.label,
439
- type: c.action === "submit" ? "submit" : "button",
440
- class: N(["artifactuse-form-btn", `artifactuse-form-btn-${c.variant || "secondary"}`]),
441
- disabled: c.disabled || c.action === "submit" && q.value,
442
- onClick: (z) => c.action !== "submit" ? Q(c) : null
436
+ r.type === "buttons" ? (a(), s("div", xa, [
437
+ (a(!0), s(R, null, ve(r.fields || [], (u) => (a(), s("button", {
438
+ key: u.name || u.label,
439
+ type: u.action === "submit" ? "submit" : "button",
440
+ class: j(["artifactuse-form-btn", `artifactuse-form-btn-${u.variant || "secondary"}`]),
441
+ disabled: u.disabled || u.action === "submit" && O.value,
442
+ onClick: (z) => u.action !== "submit" ? Q(u) : null
443
443
  }, [
444
- q.value && c.action === "submit" ? (a(), s("span", wa)) : c.icon ? (a(), s("span", {
444
+ O.value && u.action === "submit" ? (a(), s("span", Ma)) : u.icon ? (a(), s("span", {
445
445
  key: 1,
446
446
  class: "artifactuse-form-btn-icon",
447
- innerHTML: c.icon
448
- }, null, 8, Ca)) : v("", !0),
449
- K(" " + l(q.value && c.action === "submit" ? "Submitting..." : c.label), 1)
450
- ], 10, ka))), 128))
451
- ])) : o.type === "divider" ? (a(), s("div", ba)) : o.type === "heading" ? (a(), s("div", xa, l(o.label), 1)) : o.type === "checkbox" ? (a(), s("div", $a, [
452
- e("label", Ma, [
447
+ innerHTML: u.icon
448
+ }, null, 8, Ta)) : v("", !0),
449
+ K(" " + l(O.value && u.action === "submit" ? "Submitting..." : u.label), 1)
450
+ ], 10, $a))), 128))
451
+ ])) : r.type === "divider" ? (a(), s("div", La)) : r.type === "heading" ? (a(), s("div", Pa, l(r.label), 1)) : r.type === "checkbox" ? (a(), s("div", Aa, [
452
+ e("label", Ha, [
453
453
  e("input", {
454
454
  type: "checkbox",
455
- checked: $.value[o.name],
456
- disabled: o.disabled,
455
+ checked: $.value[r.name],
456
+ disabled: r.disabled,
457
457
  class: "artifactuse-checkbox",
458
- onChange: (c) => k(o.name, c.target.checked)
459
- }, null, 40, La),
460
- e("span", Ta, [
461
- K(l(o.label) + " ", 1),
462
- o.required ? (a(), s("span", Pa, "*")) : v("", !0)
458
+ onChange: (u) => k(r.name, u.target.checked)
459
+ }, null, 40, Ea),
460
+ e("span", Ba, [
461
+ K(l(r.label) + " ", 1),
462
+ r.required ? (a(), s("span", Sa, "*")) : v("", !0)
463
463
  ])
464
464
  ]),
465
- o.helpText ? (a(), s("span", Aa, l(o.helpText), 1)) : v("", !0),
466
- j.value[o.name] ? (a(), s("span", Ha, l(j.value[o.name]), 1)) : v("", !0)
467
- ])) : (a(), s("div", Sa, [
465
+ r.helpText ? (a(), s("span", za, l(r.helpText), 1)) : v("", !0),
466
+ N.value[r.name] ? (a(), s("span", Va, l(N.value[r.name]), 1)) : v("", !0)
467
+ ])) : (a(), s("div", Ia, [
468
468
  e("label", {
469
- for: `${p.value}-${o.name}`,
469
+ for: `${h.value}-${r.name}`,
470
470
  class: "artifactuse-label"
471
471
  }, [
472
- K(l(o.label) + " ", 1),
473
- o.required ? (a(), s("span", Ea, "*")) : v("", !0)
474
- ], 8, Ba),
475
- oe(o.type) ? (a(), s("input", {
472
+ K(l(r.label) + " ", 1),
473
+ r.required ? (a(), s("span", Ra, "*")) : v("", !0)
474
+ ], 8, Fa),
475
+ oe(r.type) ? (a(), s("input", {
476
476
  key: 0,
477
- id: `${p.value}-${o.name}`,
478
- type: o.type,
479
- value: $.value[o.name],
480
- placeholder: o.placeholder,
481
- disabled: o.disabled,
482
- required: o.required,
477
+ id: `${h.value}-${r.name}`,
478
+ type: r.type,
479
+ value: $.value[r.name],
480
+ placeholder: r.placeholder,
481
+ disabled: r.disabled,
482
+ required: r.required,
483
483
  class: "artifactuse-input",
484
- onInput: (c) => k(o.name, c.target.value)
485
- }, null, 40, za)) : o.type === "textarea" ? (a(), s("textarea", {
484
+ onInput: (u) => k(r.name, u.target.value)
485
+ }, null, 40, qa)) : r.type === "textarea" ? (a(), s("textarea", {
486
486
  key: 1,
487
- id: `${p.value}-${o.name}`,
488
- value: $.value[o.name],
489
- placeholder: o.placeholder,
490
- disabled: o.disabled,
491
- required: o.required,
492
- rows: o.rows || 3,
487
+ id: `${h.value}-${r.name}`,
488
+ value: $.value[r.name],
489
+ placeholder: r.placeholder,
490
+ disabled: r.disabled,
491
+ required: r.required,
492
+ rows: r.rows || 3,
493
493
  class: "artifactuse-textarea",
494
- onInput: (c) => k(o.name, c.target.value)
495
- }, null, 40, Ia)) : o.type === "select" ? (a(), s("select", {
494
+ onInput: (u) => k(r.name, u.target.value)
495
+ }, null, 40, Oa)) : r.type === "select" ? (a(), s("select", {
496
496
  key: 2,
497
- id: `${p.value}-${o.name}`,
498
- value: $.value[o.name],
499
- disabled: o.disabled,
500
- required: o.required,
497
+ id: `${h.value}-${r.name}`,
498
+ value: $.value[r.name],
499
+ disabled: r.disabled,
500
+ required: r.required,
501
501
  class: "artifactuse-select",
502
- onChange: (c) => k(o.name, c.target.value)
502
+ onChange: (u) => k(r.name, u.target.value)
503
503
  }, [
504
- e("option", Va, l(o.placeholder || "Select..."), 1),
505
- (a(!0), s(R, null, ve(f(o.options), (c) => (a(), s("option", {
506
- key: c.value,
507
- value: c.value,
508
- disabled: c.disabled
509
- }, l(c.label), 9, Ra))), 128))
510
- ], 40, Fa)) : o.type === "radio" ? (a(), s("div", qa, [
511
- (a(!0), s(R, null, ve(f(o.options), (c) => (a(), s("label", {
512
- key: c.value,
504
+ e("option", Da, l(r.placeholder || "Select..."), 1),
505
+ (a(!0), s(R, null, ve(m(r.options), (u) => (a(), s("option", {
506
+ key: u.value,
507
+ value: u.value,
508
+ disabled: u.disabled
509
+ }, l(u.label), 9, Na))), 128))
510
+ ], 40, Ua)) : r.type === "radio" ? (a(), s("div", ja, [
511
+ (a(!0), s(R, null, ve(m(r.options), (u) => (a(), s("label", {
512
+ key: u.value,
513
513
  class: "artifactuse-radio-label"
514
514
  }, [
515
515
  e("input", {
516
516
  type: "radio",
517
- name: o.name,
518
- value: c.value,
519
- checked: $.value[o.name] === c.value,
520
- disabled: c.disabled || o.disabled,
517
+ name: r.name,
518
+ value: u.value,
519
+ checked: $.value[r.name] === u.value,
520
+ disabled: u.disabled || r.disabled,
521
521
  class: "artifactuse-radio",
522
- onChange: (z) => k(o.name, c.value)
523
- }, null, 40, Oa),
524
- e("span", null, l(c.label), 1)
522
+ onChange: (z) => k(r.name, u.value)
523
+ }, null, 40, Wa),
524
+ e("span", null, l(u.label), 1)
525
525
  ]))), 128))
526
526
  ])) : v("", !0),
527
- o.helpText ? (a(), s("span", Ua, l(o.helpText), 1)) : v("", !0),
528
- j.value[o.name] ? (a(), s("span", Da, l(j.value[o.name]), 1)) : v("", !0)
527
+ r.helpText ? (a(), s("span", Ja, l(r.helpText), 1)) : v("", !0),
528
+ N.value[r.name] ? (a(), s("span", Xa, l(N.value[r.name]), 1)) : v("", !0)
529
529
  ]))
530
530
  ], 64))), 128))
531
531
  ]),
532
- E.value ? v("", !0) : (a(), s("div", ja, [
532
+ S.value ? v("", !0) : (a(), s("div", Za, [
533
533
  e("button", {
534
534
  type: "button",
535
535
  class: "artifactuse-form-btn artifactuse-form-btn-ghost",
536
- onClick: T[0] || (T[0] = (o) => Q({ action: "cancel", label: "Cancel" }))
536
+ onClick: L[0] || (L[0] = (r) => Q({ 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: q.value
541
+ disabled: O.value
542
542
  }, [
543
- q.value ? (a(), s("span", Wa)) : v("", !0),
544
- K(" " + l(q.value ? "Submitting..." : "Submit"), 1)
545
- ], 8, Na)
543
+ O.value ? (a(), s("span", Ya)) : v("", !0),
544
+ K(" " + l(O.value ? "Submitting..." : "Submit"), 1)
545
+ ], 8, Ka)
546
546
  ]))
547
547
  ], 32))
548
548
  ], 64))
549
- ], 10, la));
549
+ ], 10, ua));
550
550
  }
551
- }, Xa = ["data-artifactuse-theme"], Za = { class: "artifactuse-social-header" }, Ka = ["src", "alt"], Ya = { class: "artifactuse-social-author" }, Qa = { class: "artifactuse-social-author-name" }, Ga = { class: "artifactuse-social-author-meta" }, es = { class: "artifactuse-social-author-handle" }, ts = { class: "artifactuse-social-timestamp" }, as = { class: "artifactuse-social-content" }, ss = ["innerHTML"], is = {
551
+ }, Ga = ["data-artifactuse-theme"], es = { class: "artifactuse-social-header" }, ts = ["src", "alt"], as = { class: "artifactuse-social-author" }, ss = { class: "artifactuse-social-author-name" }, is = { class: "artifactuse-social-author-meta" }, ls = { class: "artifactuse-social-author-handle" }, ns = { class: "artifactuse-social-timestamp" }, os = { class: "artifactuse-social-content" }, rs = ["innerHTML"], cs = {
552
552
  key: 0,
553
553
  class: "artifactuse-social-media"
554
- }, ls = ["data-count"], ns = ["src", "alt"], os = {
554
+ }, us = ["data-count"], ds = ["src", "alt"], vs = {
555
555
  key: 1,
556
556
  class: "artifactuse-social-link-card"
557
- }, rs = ["src", "alt"], cs = { class: "artifactuse-social-link-info" }, us = { class: "artifactuse-social-link-domain" }, ds = { class: "artifactuse-social-link-title" }, vs = {
557
+ }, fs = ["src", "alt"], ps = { class: "artifactuse-social-link-info" }, _s = { class: "artifactuse-social-link-domain" }, hs = { class: "artifactuse-social-link-title" }, ms = {
558
558
  key: 0,
559
559
  class: "artifactuse-social-link-description"
560
- }, fs = {
560
+ }, ys = {
561
561
  key: 2,
562
562
  class: "artifactuse-social-poll"
563
- }, ps = { class: "artifactuse-social-poll-label" }, hs = { class: "artifactuse-social-poll-label-percent" }, _s = { class: "artifactuse-social-poll-meta" }, ms = {
563
+ }, gs = { class: "artifactuse-social-poll-label" }, ks = { class: "artifactuse-social-poll-label-percent" }, ws = { class: "artifactuse-social-poll-meta" }, bs = {
564
564
  key: 3,
565
565
  class: "artifactuse-social-quote"
566
- }, ys = { class: "artifactuse-social-quote-header" }, gs = ["src"], ks = { class: "artifactuse-social-quote-author" }, ws = { class: "artifactuse-social-quote-handle" }, Cs = { class: "artifactuse-social-quote-text" }, bs = {
566
+ }, Cs = { class: "artifactuse-social-quote-header" }, xs = ["src"], $s = { class: "artifactuse-social-quote-author" }, Ms = { class: "artifactuse-social-quote-handle" }, Ts = { class: "artifactuse-social-quote-text" }, Ls = {
567
567
  key: 0,
568
568
  class: "artifactuse-social-engagement"
569
- }, xs = { class: "artifactuse-social-stat" }, $s = { class: "artifactuse-social-stat" }, Ms = { class: "artifactuse-social-stat" }, Ls = { class: "artifactuse-social-stat" }, Ts = { class: "artifactuse-social-header" }, Ps = ["src", "alt"], As = { class: "artifactuse-social-author-info" }, Hs = { class: "artifactuse-social-author-name" }, Ss = {
569
+ }, Ps = { class: "artifactuse-social-stat" }, As = { class: "artifactuse-social-stat" }, Hs = { class: "artifactuse-social-stat" }, Es = { class: "artifactuse-social-stat" }, Bs = { class: "artifactuse-social-header" }, Ss = ["src", "alt"], zs = { class: "artifactuse-social-author-info" }, Vs = { class: "artifactuse-social-author-name" }, Is = {
570
570
  key: 0,
571
571
  class: "artifactuse-social-author-connection"
572
- }, Bs = { class: "artifactuse-social-author-headline" }, Es = { class: "artifactuse-social-timestamp" }, zs = { class: "artifactuse-social-content" }, Is = ["innerHTML"], Fs = {
572
+ }, Fs = { class: "artifactuse-social-author-headline" }, Rs = { class: "artifactuse-social-timestamp" }, qs = { class: "artifactuse-social-content" }, Os = ["innerHTML"], Us = {
573
573
  key: 0,
574
574
  class: "artifactuse-social-link-card"
575
- }, Vs = ["src", "alt"], Rs = { class: "artifactuse-social-link-info" }, qs = { class: "artifactuse-social-link-title" }, Os = { class: "artifactuse-social-link-domain" }, Us = {
575
+ }, Ds = ["src", "alt"], Ns = { class: "artifactuse-social-link-info" }, js = { class: "artifactuse-social-link-title" }, Ws = { class: "artifactuse-social-link-domain" }, Js = {
576
576
  key: 0,
577
577
  class: "artifactuse-social-engagement"
578
- }, Ds = { class: "artifactuse-social-reactions" }, js = { class: "artifactuse-social-header" }, Ns = ["src", "alt"], Ws = { class: "artifactuse-social-author-name" }, Js = {
578
+ }, Xs = { class: "artifactuse-social-reactions" }, Zs = { class: "artifactuse-social-header" }, Ks = ["src", "alt"], Ys = { class: "artifactuse-social-author-name" }, Qs = {
579
579
  key: 0,
580
580
  class: "artifactuse-social-verified",
581
581
  viewBox: "0 0 24 24",
582
582
  fill: "currentColor"
583
- }, Xs = {
583
+ }, Gs = {
584
584
  key: 0,
585
585
  class: "artifactuse-social-media"
586
- }, Zs = ["src", "alt"], Ks = { class: "artifactuse-social-likes" }, Ys = { class: "artifactuse-social-caption" }, Qs = { class: "artifactuse-social-caption-author" }, Gs = ["innerHTML"], ei = { class: "artifactuse-social-timestamp" }, ti = { class: "artifactuse-social-header" }, ai = ["src", "alt"], si = { class: "artifactuse-social-author-info" }, ii = { class: "artifactuse-social-author-name" }, li = { class: "artifactuse-social-timestamp" }, ni = { class: "artifactuse-social-content" }, oi = ["innerHTML"], ri = {
586
+ }, ei = ["src", "alt"], ti = { class: "artifactuse-social-likes" }, ai = { class: "artifactuse-social-caption" }, si = { class: "artifactuse-social-caption-author" }, ii = ["innerHTML"], li = { class: "artifactuse-social-timestamp" }, ni = { class: "artifactuse-social-header" }, oi = ["src", "alt"], ri = { class: "artifactuse-social-author-info" }, ci = { class: "artifactuse-social-author-name" }, ui = { class: "artifactuse-social-timestamp" }, di = { class: "artifactuse-social-content" }, vi = ["innerHTML"], fi = {
587
587
  key: 0,
588
588
  class: "artifactuse-social-link-card"
589
- }, ci = ["src", "alt"], ui = { class: "artifactuse-social-link-info" }, di = { class: "artifactuse-social-link-domain" }, vi = { class: "artifactuse-social-link-title" }, fi = {
589
+ }, pi = ["src", "alt"], _i = { class: "artifactuse-social-link-info" }, hi = { class: "artifactuse-social-link-domain" }, mi = { class: "artifactuse-social-link-title" }, yi = {
590
590
  key: 0,
591
591
  class: "artifactuse-social-link-description"
592
- }, pi = {
592
+ }, gi = {
593
593
  key: 0,
594
594
  class: "artifactuse-social-engagement"
595
- }, hi = { class: "artifactuse-social-reactions" }, _i = { class: "artifactuse-social-reaction-count" }, mi = { class: "artifactuse-social-comments-shares" }, yi = { class: "artifactuse-social-header" }, gi = ["src", "alt"], ki = { class: "artifactuse-social-author-info" }, wi = { class: "artifactuse-social-author-name" }, Ci = {
595
+ }, ki = { class: "artifactuse-social-reactions" }, wi = { class: "artifactuse-social-reaction-count" }, bi = { class: "artifactuse-social-comments-shares" }, Ci = { class: "artifactuse-social-header" }, xi = ["src", "alt"], $i = { class: "artifactuse-social-author-info" }, Mi = { class: "artifactuse-social-author-name" }, Ti = {
596
596
  key: 0,
597
597
  class: "artifactuse-social-verified",
598
598
  viewBox: "0 0 24 24",
599
599
  fill: "currentColor"
600
- }, bi = { class: "artifactuse-social-timestamp" }, xi = { class: "artifactuse-social-content" }, $i = ["innerHTML"], Mi = {
600
+ }, Li = { class: "artifactuse-social-timestamp" }, Pi = { class: "artifactuse-social-content" }, Ai = ["innerHTML"], Hi = {
601
601
  key: 0,
602
602
  class: "artifactuse-social-engagement"
603
- }, Li = { class: "artifactuse-social-stat" }, Ti = { class: "artifactuse-social-stat" }, Pi = { class: "artifactuse-social-stat" }, Ai = { class: "artifactuse-social-thumbnail" }, Hi = ["src", "alt"], Si = {
603
+ }, Ei = { class: "artifactuse-social-stat" }, Bi = { class: "artifactuse-social-stat" }, Si = { class: "artifactuse-social-stat" }, zi = { class: "artifactuse-social-thumbnail" }, Vi = ["src", "alt"], Ii = {
604
604
  key: 1,
605
605
  class: "artifactuse-social-duration"
606
- }, Bi = { class: "artifactuse-social-info" }, Ei = { class: "artifactuse-social-header" }, zi = ["src", "alt"], Ii = { class: "artifactuse-social-author-name" }, Fi = ["innerHTML"], Vi = {
606
+ }, Fi = { class: "artifactuse-social-info" }, Ri = { class: "artifactuse-social-header" }, qi = ["src", "alt"], Oi = { class: "artifactuse-social-author-name" }, Ui = ["innerHTML"], Di = {
607
607
  key: 0,
608
608
  class: "artifactuse-social-sound"
609
- }, Ri = {
609
+ }, Ni = {
610
610
  key: 1,
611
611
  class: "artifactuse-social-engagement"
612
- }, qi = { class: "artifactuse-social-thumbnail" }, Oi = ["src", "alt"], Ui = {
612
+ }, ji = { class: "artifactuse-social-thumbnail" }, Wi = ["src", "alt"], Ji = {
613
613
  key: 1,
614
614
  class: "artifactuse-social-duration"
615
- }, Di = { class: "artifactuse-social-info" }, ji = ["src", "alt"], Ni = { class: "artifactuse-social-title" }, Wi = { class: "artifactuse-social-channel" }, Ji = { class: "artifactuse-social-meta" }, Xi = { class: "artifactuse-social-actions-bar" }, Zi = { class: "artifactuse-social-platform-badge" }, he = '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>', Ki = {
615
+ }, Xi = { class: "artifactuse-social-info" }, Zi = ["src", "alt"], Ki = { class: "artifactuse-social-title" }, Yi = { class: "artifactuse-social-channel" }, Qi = { class: "artifactuse-social-meta" }, Gi = { class: "artifactuse-social-actions-bar" }, el = { class: "artifactuse-social-platform-badge" }, _e = '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>', tl = {
616
616
  __name: "ArtifactuseSocialPreview",
617
617
  props: {
618
618
  artifact: {
@@ -625,37 +625,37 @@ const Jt = { class: "artifactuse-card__icon" }, Xt = ["innerHTML"], Zt = { class
625
625
  }
626
626
  },
627
627
  emits: ["copy", "edit"],
628
- setup(H, { emit: d }) {
629
- const _ = H, L = d, m = M(null), r = M("Copy"), V = b(() => {
628
+ setup(H, { emit: c }) {
629
+ const _ = H, T = c, f = M(null), o = M("Copy"), q = C(() => {
630
630
  try {
631
631
  return JSON.parse(_.artifact.code);
632
632
  } catch {
633
633
  return { platform: "twitter", data: {} };
634
634
  }
635
- }), S = b(() => {
636
- var f;
637
- return ((f = V.value) == null ? void 0 : f.platform) || "twitter";
635
+ }), E = C(() => {
636
+ var m;
637
+ return ((m = q.value) == null ? void 0 : m.platform) || "twitter";
638
638
  });
639
- b(() => {
640
- var f;
641
- return ((f = V.value) == null ? void 0 : f.variant) || "post";
639
+ C(() => {
640
+ var m;
641
+ return ((m = q.value) == null ? void 0 : m.variant) || "post";
642
642
  });
643
- const h = b(() => {
644
- var f, k;
645
- return ((k = (f = V.value) == null ? void 0 : f.data) == null ? void 0 : k.author) || {};
646
- }), n = b(() => {
647
- var f, k;
648
- return ((k = (f = V.value) == null ? void 0 : f.data) == null ? void 0 : k.content) || {};
649
- }), p = b(() => {
650
- var f, k;
651
- return ((k = (f = V.value) == null ? void 0 : f.data) == null ? void 0 : k.engagement) || {};
652
- }), x = b(() => {
653
- var f, k;
654
- return ((k = (f = V.value) == null ? void 0 : f.data) == null ? void 0 : k.meta) || {};
655
- }), F = b(() => {
656
- const f = p.value;
657
- return f.likes || f.comments || f.shares || f.retweets || f.replies || f.views;
658
- }), $ = b(() => `artifactuse-social-verified-${h.value.verifiedType || "blue"}`), j = b(() => ({
643
+ const g = C(() => {
644
+ var m, k;
645
+ return ((k = (m = q.value) == null ? void 0 : m.data) == null ? void 0 : k.author) || {};
646
+ }), n = C(() => {
647
+ var m, k;
648
+ return ((k = (m = q.value) == null ? void 0 : m.data) == null ? void 0 : k.content) || {};
649
+ }), h = C(() => {
650
+ var m, k;
651
+ return ((k = (m = q.value) == null ? void 0 : m.data) == null ? void 0 : k.engagement) || {};
652
+ }), x = C(() => {
653
+ var m, k;
654
+ return ((k = (m = q.value) == null ? void 0 : m.data) == null ? void 0 : k.meta) || {};
655
+ }), I = C(() => {
656
+ const m = h.value;
657
+ return m.likes || m.comments || m.shares || m.retweets || m.replies || m.views;
658
+ }), $ = C(() => `artifactuse-social-verified-${g.value.verifiedType || "blue"}`), N = C(() => ({
659
659
  twitter: "X",
660
660
  linkedin: "LinkedIn",
661
661
  instagram: "Instagram",
@@ -663,8 +663,8 @@ const Jt = { class: "artifactuse-card__icon" }, Xt = ["innerHTML"], Zt = { class
663
663
  threads: "Threads",
664
664
  tiktok: "TikTok",
665
665
  youtube: "YouTube"
666
- })[S.value] || S.value), q = b(() => {
667
- const f = {
666
+ })[E.value] || E.value), O = C(() => {
667
+ const m = {
668
668
  twitter: () => se("svg", { viewBox: "0 0 24 24", fill: "currentColor" }, [
669
669
  se("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
  ]),
@@ -687,103 +687,103 @@ const Jt = { class: "artifactuse-card__icon" }, Xt = ["innerHTML"], Zt = { class
687
687
  se("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 f[S.value] || f.twitter;
691
- }), W = b(() => {
692
- let f = n.value.text || "";
693
- return f = f.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;"), f = f.replace(/#(\w+)/g, '<span class="artifactuse-social-hashtag">#$1</span>'), f = f.replace(/@(\w+)/g, '<span class="artifactuse-social-mention">@$1</span>'), f = f.replace(
690
+ return m[E.value] || m.twitter;
691
+ }), W = C(() => {
692
+ let m = n.value.text || "";
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
- ), f;
697
- }), Y = b(() => {
698
- const f = p.value.reactions || {};
699
- return Object.values(f).reduce((k, ee) => k + (ee || 0), 0) || p.value.likes || 0;
696
+ ), m;
697
+ }), Y = C(() => {
698
+ const m = h.value.reactions || {};
699
+ return Object.values(m).reduce((k, ee) => k + (ee || 0), 0) || h.value.likes || 0;
700
700
  });
701
- function E(f) {
702
- return f ? f >= 1e6 ? `${(f / 1e6).toFixed(1)}M` : f >= 1e3 ? `${(f / 1e3).toFixed(1)}K` : f.toString() : "0";
701
+ function S(m) {
702
+ return m ? m >= 1e6 ? `${(m / 1e6).toFixed(1)}M` : m >= 1e3 ? `${(m / 1e3).toFixed(1)}K` : m.toString() : "0";
703
703
  }
704
- function ie(f) {
704
+ function ie(m) {
705
705
  try {
706
- return new URL(f).hostname.replace("www.", "");
706
+ return new URL(m).hostname.replace("www.", "");
707
707
  } catch {
708
- return f;
708
+ return m;
709
709
  }
710
710
  }
711
- function X(f) {
712
- f.target.src = he;
711
+ function Z(m) {
712
+ m.target.src = _e;
713
713
  }
714
- function J(f) {
715
- f.target.style.display = "none";
714
+ function X(m) {
715
+ m.target.style.display = "none";
716
716
  }
717
717
  function oe() {
718
- const f = n.value.text || "";
719
- navigator.clipboard.writeText(f).then(() => {
720
- r.value = "Copied!", setTimeout(() => {
721
- r.value = "Copy";
722
- }, 2e3), L("copy", { platform: S.value, text: f });
718
+ const m = n.value.text || "";
719
+ navigator.clipboard.writeText(m).then(() => {
720
+ o.value = "Copied!", setTimeout(() => {
721
+ o.value = "Copy";
722
+ }, 2e3), T("copy", { platform: E.value, text: m });
723
723
  });
724
724
  }
725
- return (f, k) => {
726
- var ee, re, P, Q, w, T;
725
+ return (m, k) => {
726
+ var ee, re, P, Q, w, L;
727
727
  return a(), s("div", {
728
728
  ref_key: "containerRef",
729
- ref: m,
730
- class: N(["artifactuse-social", [`artifactuse-social-${S.value}`]]),
729
+ ref: f,
730
+ class: j(["artifactuse-social", [`artifactuse-social-${E.value}`]]),
731
731
  "data-artifactuse-theme": H.theme
732
732
  }, [
733
- S.value === "twitter" ? (a(), s(R, { key: 0 }, [
734
- e("div", Za, [
733
+ E.value === "twitter" ? (a(), s(R, { key: 0 }, [
734
+ e("div", es, [
735
735
  e("img", {
736
- src: h.value.avatar || he,
737
- alt: h.value.name,
736
+ src: g.value.avatar || _e,
737
+ alt: g.value.name,
738
738
  class: "artifactuse-social-avatar",
739
- onError: X
740
- }, null, 40, Ka),
741
- e("div", Ya, [
742
- e("div", Qa, [
743
- e("span", null, l(h.value.name), 1),
744
- h.value.verified ? (a(), s("svg", {
739
+ onError: Z
740
+ }, null, 40, ts),
741
+ e("div", as, [
742
+ e("div", ss, [
743
+ e("span", null, l(g.value.name), 1),
744
+ g.value.verified ? (a(), s("svg", {
745
745
  key: 0,
746
- class: N(["artifactuse-social-verified", $.value]),
746
+ class: j(["artifactuse-social-verified", $.value]),
747
747
  viewBox: "0 0 24 24",
748
748
  fill: "currentColor"
749
749
  }, [...k[0] || (k[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", Ga, [
754
- e("span", es, l(h.value.handle), 1),
755
- e("span", ts, "· " + l(x.value.timestamp || "Just now"), 1)
753
+ e("div", is, [
754
+ e("span", ls, l(g.value.handle), 1),
755
+ e("span", ns, "· " + l(x.value.timestamp || "Just now"), 1)
756
756
  ])
757
757
  ])
758
758
  ]),
759
- e("div", as, [
759
+ e("div", os, [
760
760
  e("p", {
761
761
  class: "artifactuse-social-text",
762
762
  innerHTML: W.value
763
- }, null, 8, ss),
764
- (ee = n.value.media) != null && ee.length ? (a(), s("div", is, [
763
+ }, null, 8, rs),
764
+ (ee = n.value.media) != null && ee.length ? (a(), s("div", cs, [
765
765
  e("div", {
766
- class: N(["artifactuse-social-media-grid", { "artifactuse-social-media-single": n.value.media.length === 1 }]),
766
+ class: j(["artifactuse-social-media-grid", { "artifactuse-social-media-single": n.value.media.length === 1 }]),
767
767
  "data-count": n.value.media.length
768
768
  }, [
769
- (a(!0), s(R, null, ve(n.value.media.slice(0, 4), (o, B) => (a(), s("img", {
769
+ (a(!0), s(R, null, ve(n.value.media.slice(0, 4), (r, B) => (a(), s("img", {
770
770
  key: B,
771
- src: o.url,
772
- alt: o.alt || "",
773
- onError: J
774
- }, null, 40, ns))), 128))
775
- ], 10, ls)
771
+ src: r.url,
772
+ alt: r.alt || "",
773
+ onError: X
774
+ }, null, 40, ds))), 128))
775
+ ], 10, us)
776
776
  ])) : v("", !0),
777
- n.value.link && !((re = n.value.media) != null && re.length) ? (a(), s("div", os, [
777
+ n.value.link && !((re = n.value.media) != null && re.length) ? (a(), s("div", vs, [
778
778
  n.value.link.image ? (a(), s("img", {
779
779
  key: 0,
780
780
  src: n.value.link.image,
781
781
  alt: n.value.link.title,
782
782
  class: "artifactuse-social-link-image",
783
- onError: J
784
- }, null, 40, rs)) : v("", !0),
785
- e("div", cs, [
786
- e("div", us, [
783
+ onError: X
784
+ }, null, 40, fs)) : v("", !0),
785
+ e("div", ps, [
786
+ e("div", _s, [
787
787
  k[1] || (k[1] = e("svg", {
788
788
  fill: "none",
789
789
  viewBox: "0 0 24 24",
@@ -798,43 +798,43 @@ const Jt = { class: "artifactuse-card__icon" }, Xt = ["innerHTML"], Zt = { class
798
798
  ], -1)),
799
799
  K(" " + l(n.value.link.domain || ie(n.value.link.url)), 1)
800
800
  ]),
801
- e("div", ds, l(n.value.link.title), 1),
802
- n.value.link.description ? (a(), s("div", vs, l(n.value.link.description), 1)) : v("", !0)
801
+ e("div", hs, l(n.value.link.title), 1),
802
+ n.value.link.description ? (a(), s("div", ms, l(n.value.link.description), 1)) : v("", !0)
803
803
  ])
804
804
  ])) : v("", !0),
805
- n.value.poll ? (a(), s("div", fs, [
806
- (a(!0), s(R, null, ve(n.value.poll.options, (o, B) => {
807
- var c, z;
805
+ n.value.poll ? (a(), s("div", ys, [
806
+ (a(!0), s(R, null, ve(n.value.poll.options, (r, B) => {
807
+ var u, z;
808
808
  return a(), s("div", {
809
809
  key: B,
810
810
  class: "artifactuse-social-poll-option"
811
811
  }, [
812
812
  e("div", {
813
813
  class: "artifactuse-social-poll-bar",
814
- style: Pe({ width: `${((c = n.value.poll.votes) == null ? void 0 : c[B]) || 0}%` })
814
+ style: He({ width: `${((u = n.value.poll.votes) == null ? void 0 : u[B]) || 0}%` })
815
815
  }, null, 4),
816
- e("div", ps, [
817
- e("span", null, l(o), 1),
818
- e("span", hs, l(((z = n.value.poll.votes) == null ? void 0 : z[B]) || 0) + "%", 1)
816
+ e("div", gs, [
817
+ e("span", null, l(r), 1),
818
+ e("span", ks, l(((z = n.value.poll.votes) == null ? void 0 : z[B]) || 0) + "%", 1)
819
819
  ])
820
820
  ]);
821
821
  }), 128)),
822
- e("div", _s, l(E(n.value.poll.totalVotes || 0)) + " votes · " + l(n.value.poll.duration || "Poll ended"), 1)
822
+ e("div", ws, l(S(n.value.poll.totalVotes || 0)) + " votes · " + l(n.value.poll.duration || "Poll ended"), 1)
823
823
  ])) : v("", !0),
824
- n.value.quote ? (a(), s("div", ms, [
825
- e("div", ys, [
824
+ n.value.quote ? (a(), s("div", bs, [
825
+ e("div", Cs, [
826
826
  e("img", {
827
- src: ((P = n.value.quote.author) == null ? void 0 : P.avatar) || he,
827
+ src: ((P = n.value.quote.author) == null ? void 0 : P.avatar) || _e,
828
828
  class: "artifactuse-social-quote-avatar"
829
- }, null, 8, gs),
830
- e("span", ks, l((Q = n.value.quote.author) == null ? void 0 : Q.name), 1),
831
- e("span", ws, l((w = n.value.quote.author) == null ? void 0 : w.handle), 1)
829
+ }, null, 8, xs),
830
+ e("span", $s, l((Q = n.value.quote.author) == null ? void 0 : Q.name), 1),
831
+ e("span", Ms, l((w = n.value.quote.author) == null ? void 0 : w.handle), 1)
832
832
  ]),
833
- e("p", Cs, l(n.value.quote.text), 1)
833
+ e("p", Ts, l(n.value.quote.text), 1)
834
834
  ])) : v("", !0)
835
835
  ]),
836
- F.value ? (a(), s("div", bs, [
837
- e("div", xs, [
836
+ I.value ? (a(), s("div", Ls, [
837
+ e("div", Ps, [
838
838
  k[2] || (k[2] = e("svg", {
839
839
  viewBox: "0 0 24 24",
840
840
  fill: "none",
@@ -843,9 +843,9 @@ const Jt = { class: "artifactuse-card__icon" }, Xt = ["innerHTML"], Zt = { 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, l(E(p.value.replies || 0)), 1)
846
+ e("span", null, l(S(h.value.replies || 0)), 1)
847
847
  ]),
848
- e("div", $s, [
848
+ e("div", As, [
849
849
  k[3] || (k[3] = e("svg", {
850
850
  viewBox: "0 0 24 24",
851
851
  fill: "none",
@@ -854,9 +854,9 @@ const Jt = { class: "artifactuse-card__icon" }, Xt = ["innerHTML"], Zt = { class
854
854
  }, [
855
855
  e("path", { d: "M7 17L17 7M17 7H8M17 7V16" })
856
856
  ], -1)),
857
- e("span", null, l(E(p.value.retweets || 0)), 1)
857
+ e("span", null, l(S(h.value.retweets || 0)), 1)
858
858
  ]),
859
- e("div", Ms, [
859
+ e("div", Hs, [
860
860
  k[4] || (k[4] = e("svg", {
861
861
  viewBox: "0 0 24 24",
862
862
  fill: "none",
@@ -865,9 +865,9 @@ const Jt = { class: "artifactuse-card__icon" }, Xt = ["innerHTML"], Zt = { 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, l(E(p.value.likes || 0)), 1)
868
+ e("span", null, l(S(h.value.likes || 0)), 1)
869
869
  ]),
870
- e("div", Ls, [
870
+ e("div", Es, [
871
871
  k[5] || (k[5] = e("svg", {
872
872
  viewBox: "0 0 24 24",
873
873
  fill: "none",
@@ -876,24 +876,24 @@ const Jt = { class: "artifactuse-card__icon" }, Xt = ["innerHTML"], Zt = { 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, l(E(p.value.views || 0)), 1)
879
+ e("span", null, l(S(h.value.views || 0)), 1)
880
880
  ])
881
881
  ])) : v("", !0)
882
- ], 64)) : S.value === "linkedin" ? (a(), s(R, { key: 1 }, [
883
- e("div", Ts, [
882
+ ], 64)) : E.value === "linkedin" ? (a(), s(R, { key: 1 }, [
883
+ e("div", Bs, [
884
884
  e("img", {
885
- src: h.value.avatar || he,
886
- alt: h.value.name,
885
+ src: g.value.avatar || _e,
886
+ alt: g.value.name,
887
887
  class: "artifactuse-social-avatar",
888
- onError: X
889
- }, null, 40, Ps),
890
- e("div", As, [
891
- e("div", Hs, [
892
- K(l(h.value.name) + " ", 1),
893
- h.value.connection ? (a(), s("span", Ss, "· " + l(h.value.connection), 1)) : v("", !0)
888
+ onError: Z
889
+ }, null, 40, Ss),
890
+ e("div", zs, [
891
+ e("div", Vs, [
892
+ K(l(g.value.name) + " ", 1),
893
+ g.value.connection ? (a(), s("span", Is, "· " + l(g.value.connection), 1)) : v("", !0)
894
894
  ]),
895
- e("div", Bs, l(h.value.headline), 1),
896
- e("div", Es, [
895
+ e("div", Fs, l(g.value.headline), 1),
896
+ e("div", Rs, [
897
897
  K(l(x.value.timestamp || "Just now") + " · ", 1),
898
898
  k[6] || (k[6] = e("svg", {
899
899
  viewBox: "0 0 24 24",
@@ -904,79 +904,79 @@ const Jt = { class: "artifactuse-card__icon" }, Xt = ["innerHTML"], Zt = { class
904
904
  ])
905
905
  ])
906
906
  ]),
907
- e("div", zs, [
907
+ e("div", qs, [
908
908
  e("p", {
909
909
  class: "artifactuse-social-text",
910
910
  innerHTML: W.value
911
- }, null, 8, Is),
912
- n.value.link ? (a(), s("div", Fs, [
911
+ }, null, 8, Os),
912
+ n.value.link ? (a(), s("div", Us, [
913
913
  n.value.link.image ? (a(), s("img", {
914
914
  key: 0,
915
915
  src: n.value.link.image,
916
916
  alt: n.value.link.title,
917
917
  class: "artifactuse-social-link-image",
918
- onError: J
919
- }, null, 40, Vs)) : v("", !0),
920
- e("div", Rs, [
921
- e("div", qs, l(n.value.link.title), 1),
922
- e("div", Os, l(n.value.link.domain || ie(n.value.link.url)), 1)
918
+ onError: X
919
+ }, null, 40, Ds)) : v("", !0),
920
+ e("div", Ns, [
921
+ e("div", js, l(n.value.link.title), 1),
922
+ e("div", Ws, l(n.value.link.domain || ie(n.value.link.url)), 1)
923
923
  ])
924
924
  ])) : v("", !0)
925
925
  ]),
926
- F.value ? (a(), s("div", Us, [
927
- e("div", Ds, [
926
+ I.value ? (a(), s("div", Js, [
927
+ e("div", Xs, [
928
928
  k[7] || (k[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, l(E(p.value.likes || 0)), 1)
933
+ e("span", null, l(S(h.value.likes || 0)), 1)
934
934
  ]),
935
- e("span", null, l(E(p.value.comments || 0)) + " comments · " + l(E(p.value.shares || 0)) + " shares", 1)
935
+ e("span", null, l(S(h.value.comments || 0)) + " comments · " + l(S(h.value.shares || 0)) + " shares", 1)
936
936
  ])) : v("", !0)
937
- ], 64)) : S.value === "instagram" ? (a(), s(R, { key: 2 }, [
938
- e("div", js, [
937
+ ], 64)) : E.value === "instagram" ? (a(), s(R, { key: 2 }, [
938
+ e("div", Zs, [
939
939
  e("img", {
940
- src: h.value.avatar || he,
941
- alt: h.value.name,
940
+ src: g.value.avatar || _e,
941
+ alt: g.value.name,
942
942
  class: "artifactuse-social-avatar",
943
- onError: X
944
- }, null, 40, Ns),
945
- e("div", Ws, [
946
- K(l(h.value.name) + " ", 1),
947
- h.value.verified ? (a(), s("svg", Js, [...k[8] || (k[8] = [
943
+ onError: Z
944
+ }, null, 40, Ks),
945
+ e("div", Ys, [
946
+ K(l(g.value.name) + " ", 1),
947
+ g.value.verified ? (a(), s("svg", Qs, [...k[8] || (k[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
- (T = n.value.media) != null && T.length ? (a(), s("div", Xs, [
952
+ (L = n.value.media) != null && L.length ? (a(), s("div", Gs, [
953
953
  e("img", {
954
954
  src: n.value.media[0].url,
955
955
  alt: n.value.media[0].alt || "",
956
- onError: J
957
- }, null, 40, Zs)
956
+ onError: X
957
+ }, null, 40, ei)
958
958
  ])) : v("", !0),
959
- k[9] || (k[9] = It('<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", Ks, l(E(p.value.likes || 0)) + " likes", 1),
961
- e("div", Ys, [
962
- e("span", Qs, l(h.value.name), 1),
959
+ k[9] || (k[9] = Ot('<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", ti, l(S(h.value.likes || 0)) + " likes", 1),
961
+ e("div", ai, [
962
+ e("span", si, l(g.value.name), 1),
963
963
  e("span", {
964
964
  class: "artifactuse-social-caption-text",
965
965
  innerHTML: W.value
966
- }, null, 8, Gs)
966
+ }, null, 8, ii)
967
967
  ]),
968
- e("div", ei, l(x.value.timestamp || "Just now"), 1)
969
- ], 64)) : S.value === "facebook" ? (a(), s(R, { key: 3 }, [
970
- e("div", ti, [
968
+ e("div", li, l(x.value.timestamp || "Just now"), 1)
969
+ ], 64)) : E.value === "facebook" ? (a(), s(R, { key: 3 }, [
970
+ e("div", ni, [
971
971
  e("img", {
972
- src: h.value.avatar || he,
973
- alt: h.value.name,
972
+ src: g.value.avatar || _e,
973
+ alt: g.value.name,
974
974
  class: "artifactuse-social-avatar",
975
- onError: X
976
- }, null, 40, ai),
977
- e("div", si, [
978
- e("div", ii, l(h.value.name), 1),
979
- e("div", li, [
975
+ onError: Z
976
+ }, null, 40, oi),
977
+ e("div", ri, [
978
+ e("div", ci, l(g.value.name), 1),
979
+ e("div", ui, [
980
980
  K(l(x.value.timestamp || "Just now") + " · ", 1),
981
981
  k[10] || (k[10] = e("svg", {
982
982
  viewBox: "0 0 24 24",
@@ -987,63 +987,63 @@ const Jt = { class: "artifactuse-card__icon" }, Xt = ["innerHTML"], Zt = { class
987
987
  ])
988
988
  ])
989
989
  ]),
990
- e("div", ni, [
990
+ e("div", di, [
991
991
  e("p", {
992
992
  class: "artifactuse-social-text",
993
993
  innerHTML: W.value
994
- }, null, 8, oi),
995
- n.value.link ? (a(), s("div", ri, [
994
+ }, null, 8, vi),
995
+ n.value.link ? (a(), s("div", fi, [
996
996
  n.value.link.image ? (a(), s("img", {
997
997
  key: 0,
998
998
  src: n.value.link.image,
999
999
  alt: n.value.link.title,
1000
1000
  class: "artifactuse-social-link-image",
1001
- onError: J
1002
- }, null, 40, ci)) : v("", !0),
1003
- e("div", ui, [
1004
- e("div", di, l(n.value.link.domain || ie(n.value.link.url)), 1),
1005
- e("div", vi, l(n.value.link.title), 1),
1006
- n.value.link.description ? (a(), s("div", fi, l(n.value.link.description), 1)) : v("", !0)
1001
+ onError: X
1002
+ }, null, 40, pi)) : v("", !0),
1003
+ e("div", _i, [
1004
+ e("div", hi, l(n.value.link.domain || ie(n.value.link.url)), 1),
1005
+ e("div", mi, l(n.value.link.title), 1),
1006
+ n.value.link.description ? (a(), s("div", yi, l(n.value.link.description), 1)) : v("", !0)
1007
1007
  ])
1008
1008
  ])) : v("", !0)
1009
1009
  ]),
1010
- F.value ? (a(), s("div", pi, [
1011
- e("div", hi, [
1010
+ I.value ? (a(), s("div", gi, [
1011
+ e("div", ki, [
1012
1012
  k[11] || (k[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", _i, l(E(Y.value)), 1)
1017
+ e("span", wi, l(S(Y.value)), 1)
1018
1018
  ]),
1019
- e("span", mi, l(E(p.value.comments || 0)) + " comments · " + l(E(p.value.shares || 0)) + " shares", 1)
1019
+ e("span", bi, l(S(h.value.comments || 0)) + " comments · " + l(S(h.value.shares || 0)) + " shares", 1)
1020
1020
  ])) : v("", !0)
1021
- ], 64)) : S.value === "threads" ? (a(), s(R, { key: 4 }, [
1022
- e("div", yi, [
1021
+ ], 64)) : E.value === "threads" ? (a(), s(R, { key: 4 }, [
1022
+ e("div", Ci, [
1023
1023
  e("img", {
1024
- src: h.value.avatar || he,
1025
- alt: h.value.name,
1024
+ src: g.value.avatar || _e,
1025
+ alt: g.value.name,
1026
1026
  class: "artifactuse-social-avatar",
1027
- onError: X
1028
- }, null, 40, gi),
1029
- e("div", ki, [
1030
- e("div", wi, [
1031
- K(l(h.value.name) + " ", 1),
1032
- h.value.verified ? (a(), s("svg", Ci, [...k[12] || (k[12] = [
1027
+ onError: Z
1028
+ }, null, 40, xi),
1029
+ e("div", $i, [
1030
+ e("div", Mi, [
1031
+ K(l(g.value.name) + " ", 1),
1032
+ g.value.verified ? (a(), s("svg", Ti, [...k[12] || (k[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", bi, l(x.value.timestamp || "Just now"), 1)
1036
+ e("span", Li, l(x.value.timestamp || "Just now"), 1)
1037
1037
  ])
1038
1038
  ]),
1039
- e("div", xi, [
1039
+ e("div", Pi, [
1040
1040
  e("p", {
1041
1041
  class: "artifactuse-social-text",
1042
1042
  innerHTML: W.value
1043
- }, null, 8, $i)
1043
+ }, null, 8, Ai)
1044
1044
  ]),
1045
- F.value ? (a(), s("div", Mi, [
1046
- e("div", Li, [
1045
+ I.value ? (a(), s("div", Hi, [
1046
+ e("div", Ei, [
1047
1047
  k[13] || (k[13] = e("svg", {
1048
1048
  viewBox: "0 0 24 24",
1049
1049
  fill: "none",
@@ -1052,9 +1052,9 @@ const Jt = { class: "artifactuse-card__icon" }, Xt = ["innerHTML"], Zt = { 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, l(E(p.value.likes || 0)), 1)
1055
+ e("span", null, l(S(h.value.likes || 0)), 1)
1056
1056
  ]),
1057
- e("div", Ti, [
1057
+ e("div", Bi, [
1058
1058
  k[14] || (k[14] = e("svg", {
1059
1059
  viewBox: "0 0 24 24",
1060
1060
  fill: "none",
@@ -1063,9 +1063,9 @@ const Jt = { class: "artifactuse-card__icon" }, Xt = ["innerHTML"], Zt = { 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, l(E(p.value.comments || 0)), 1)
1066
+ e("span", null, l(S(h.value.comments || 0)), 1)
1067
1067
  ]),
1068
- e("div", Pi, [
1068
+ e("div", Si, [
1069
1069
  k[15] || (k[15] = e("svg", {
1070
1070
  viewBox: "0 0 24 24",
1071
1071
  fill: "none",
@@ -1074,17 +1074,17 @@ const Jt = { class: "artifactuse-card__icon" }, Xt = ["innerHTML"], Zt = { class
1074
1074
  }, [
1075
1075
  e("path", { d: "M7 17L17 7M17 7H8M17 7V16" })
1076
1076
  ], -1)),
1077
- e("span", null, l(E(p.value.shares || 0)), 1)
1077
+ e("span", null, l(S(h.value.shares || 0)), 1)
1078
1078
  ])
1079
1079
  ])) : v("", !0)
1080
- ], 64)) : S.value === "tiktok" ? (a(), s(R, { key: 5 }, [
1081
- e("div", Ai, [
1080
+ ], 64)) : E.value === "tiktok" ? (a(), s(R, { key: 5 }, [
1081
+ e("div", zi, [
1082
1082
  n.value.thumbnail ? (a(), s("img", {
1083
1083
  key: 0,
1084
1084
  src: n.value.thumbnail,
1085
1085
  alt: n.value.text,
1086
- onError: J
1087
- }, null, 40, Hi)) : v("", !0),
1086
+ onError: X
1087
+ }, null, 40, Vi)) : v("", !0),
1088
1088
  k[16] || (k[16] = e("div", { class: "artifactuse-social-play-button" }, [
1089
1089
  e("div", { class: "artifactuse-social-play-icon" }, [
1090
1090
  e("svg", {
@@ -1095,23 +1095,23 @@ const Jt = { class: "artifactuse-card__icon" }, Xt = ["innerHTML"], Zt = { class
1095
1095
  ])
1096
1096
  ])
1097
1097
  ], -1)),
1098
- n.value.duration ? (a(), s("div", Si, l(n.value.duration), 1)) : v("", !0)
1098
+ n.value.duration ? (a(), s("div", Ii, l(n.value.duration), 1)) : v("", !0)
1099
1099
  ]),
1100
- e("div", Bi, [
1101
- e("div", Ei, [
1100
+ e("div", Fi, [
1101
+ e("div", Ri, [
1102
1102
  e("img", {
1103
- src: h.value.avatar || he,
1104
- alt: h.value.name,
1103
+ src: g.value.avatar || _e,
1104
+ alt: g.value.name,
1105
1105
  class: "artifactuse-social-avatar",
1106
- onError: X
1107
- }, null, 40, zi),
1108
- e("span", Ii, l(h.value.name), 1)
1106
+ onError: Z
1107
+ }, null, 40, qi),
1108
+ e("span", Oi, l(g.value.name), 1)
1109
1109
  ]),
1110
1110
  e("p", {
1111
1111
  class: "artifactuse-social-text",
1112
1112
  innerHTML: W.value
1113
- }, null, 8, Fi),
1114
- n.value.sound ? (a(), s("div", Vi, [
1113
+ }, null, 8, Ui),
1114
+ n.value.sound ? (a(), s("div", Di, [
1115
1115
  k[17] || (k[17] = e("svg", {
1116
1116
  viewBox: "0 0 24 24",
1117
1117
  fill: "currentColor"
@@ -1120,40 +1120,40 @@ const Jt = { class: "artifactuse-card__icon" }, Xt = ["innerHTML"], Zt = { class
1120
1120
  ], -1)),
1121
1121
  K(" " + l(n.value.sound), 1)
1122
1122
  ])) : v("", !0),
1123
- F.value ? (a(), s("div", Ri, [
1124
- e("span", null, l(E(p.value.likes || 0)) + " likes", 1),
1125
- e("span", null, l(E(p.value.comments || 0)) + " comments", 1),
1126
- e("span", null, l(E(p.value.shares || 0)) + " shares", 1)
1123
+ I.value ? (a(), s("div", Ni, [
1124
+ e("span", null, l(S(h.value.likes || 0)) + " likes", 1),
1125
+ e("span", null, l(S(h.value.comments || 0)) + " comments", 1),
1126
+ e("span", null, l(S(h.value.shares || 0)) + " shares", 1)
1127
1127
  ])) : v("", !0)
1128
1128
  ])
1129
- ], 64)) : S.value === "youtube" ? (a(), s(R, { key: 6 }, [
1130
- e("div", qi, [
1129
+ ], 64)) : E.value === "youtube" ? (a(), s(R, { key: 6 }, [
1130
+ e("div", ji, [
1131
1131
  n.value.thumbnail ? (a(), s("img", {
1132
1132
  key: 0,
1133
1133
  src: n.value.thumbnail,
1134
1134
  alt: n.value.title,
1135
- onError: J
1136
- }, null, 40, Oi)) : v("", !0),
1137
- n.value.duration ? (a(), s("div", Ui, l(n.value.duration), 1)) : v("", !0)
1135
+ onError: X
1136
+ }, null, 40, Wi)) : v("", !0),
1137
+ n.value.duration ? (a(), s("div", Ji, l(n.value.duration), 1)) : v("", !0)
1138
1138
  ]),
1139
- e("div", Di, [
1139
+ e("div", Xi, [
1140
1140
  e("img", {
1141
- src: h.value.avatar || he,
1142
- alt: h.value.name,
1141
+ src: g.value.avatar || _e,
1142
+ alt: g.value.name,
1143
1143
  class: "artifactuse-social-avatar",
1144
- onError: X
1145
- }, null, 40, ji),
1144
+ onError: Z
1145
+ }, null, 40, Zi),
1146
1146
  e("div", null, [
1147
- e("div", Ni, l(n.value.title || n.value.text), 1),
1148
- e("div", Wi, l(h.value.name), 1),
1149
- e("div", Ji, l(E(p.value.views || 0)) + " views · " + l(x.value.timestamp || "Just now"), 1)
1147
+ e("div", Ki, l(n.value.title || n.value.text), 1),
1148
+ e("div", Yi, l(g.value.name), 1),
1149
+ e("div", Qi, l(S(h.value.views || 0)) + " views · " + l(x.value.timestamp || "Just now"), 1)
1150
1150
  ])
1151
1151
  ])
1152
1152
  ], 64)) : v("", !0),
1153
- e("div", Xi, [
1154
- e("div", Zi, [
1155
- (a(), xe(Ft(q.value))),
1156
- e("span", null, l(j.value), 1)
1153
+ e("div", Gi, [
1154
+ e("div", el, [
1155
+ (a(), $e(Ut(O.value))),
1156
+ e("span", null, l(N.value), 1)
1157
1157
  ]),
1158
1158
  e("button", {
1159
1159
  class: "artifactuse-social-copy-btn",
@@ -1175,31 +1175,31 @@ const Jt = { class: "artifactuse-card__icon" }, Xt = ["innerHTML"], Zt = { 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
- K(" " + l(r.value), 1)
1178
+ K(" " + l(o.value), 1)
1179
1179
  ])
1180
1180
  ])
1181
- ], 10, Xa);
1181
+ ], 10, Ga);
1182
1182
  };
1183
1183
  }
1184
- }, Yi = ["src", "alt"], Qi = ["src"], Gi = {
1184
+ }, al = ["src", "alt"], sl = ["src"], il = {
1185
1185
  key: 2,
1186
1186
  class: "artifactuse-viewer-controls"
1187
- }, el = ["title"], tl = {
1187
+ }, ll = ["title"], nl = {
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
- }, al = {
1193
+ }, ol = {
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
- }, sl = {
1199
+ }, rl = {
1200
1200
  key: 3,
1201
1201
  class: "artifactuse-viewer-caption"
1202
- }, il = {
1202
+ }, cl = {
1203
1203
  __name: "ArtifactuseViewer",
1204
1204
  props: {
1205
1205
  // Whether the viewer is open
@@ -1229,61 +1229,61 @@ const Jt = { class: "artifactuse-card__icon" }, Xt = ["innerHTML"], Zt = { class
1229
1229
  }
1230
1230
  },
1231
1231
  emits: ["close"],
1232
- setup(H, { emit: d }) {
1233
- const _ = H, L = d, m = M(null), r = M(!1);
1234
- function V() {
1235
- r.value = !1, L("close");
1232
+ setup(H, { emit: c }) {
1233
+ const _ = H, T = c, f = M(null), o = M(!1);
1234
+ function q() {
1235
+ o.value = !1, T("close");
1236
1236
  }
1237
- function S() {
1238
- _.type === "image" && (r.value = !r.value);
1237
+ function E() {
1238
+ _.type === "image" && (o.value = !o.value);
1239
1239
  }
1240
- function h() {
1241
- const p = document.createElement("a");
1242
- p.href = _.src, p.download = _.alt || "download", document.body.appendChild(p), p.click(), document.body.removeChild(p);
1240
+ function g() {
1241
+ const h = document.createElement("a");
1242
+ h.href = _.src, h.download = _.alt || "download", document.body.appendChild(h), h.click(), document.body.removeChild(h);
1243
1243
  }
1244
- function n(p) {
1245
- p.key === "Escape" && _.isOpen && V();
1244
+ function n(h) {
1245
+ h.key === "Escape" && _.isOpen && q();
1246
1246
  }
1247
- return de(() => _.isOpen, (p) => {
1248
- p ? (be(() => {
1247
+ return de(() => _.isOpen, (h) => {
1248
+ h ? (xe(() => {
1249
1249
  var x;
1250
- (x = m.value) == null || x.focus();
1251
- }), document.body.style.overflow = "hidden") : (document.body.style.overflow = "", r.value = !1);
1252
- }), $e(() => {
1250
+ (x = f.value) == null || x.focus();
1251
+ }), document.body.style.overflow = "hidden") : (document.body.style.overflow = "", o.value = !1);
1252
+ }), Me(() => {
1253
1253
  document.addEventListener("keydown", n);
1254
- }), De(() => {
1254
+ }), We(() => {
1255
1255
  document.removeEventListener("keydown", n), document.body.style.overflow = "";
1256
- }), (p, x) => (a(), xe(Vt, { to: "body" }, [
1257
- Be(Ae, { name: "artifactuse-viewer" }, {
1258
- default: He(() => [
1256
+ }), (h, x) => (a(), $e(Dt, { to: "body" }, [
1257
+ ze(Ee, { name: "artifactuse-viewer" }, {
1258
+ default: Be(() => [
1259
1259
  H.isOpen ? (a(), s("div", {
1260
1260
  key: 0,
1261
1261
  class: "artifactuse-viewer-overlay",
1262
- onClick: V,
1263
- onKeydown: Rt(V, ["escape"]),
1262
+ onClick: q,
1263
+ onKeydown: Nt(q, ["escape"]),
1264
1264
  tabindex: "-1",
1265
1265
  ref_key: "overlayRef",
1266
- ref: m
1266
+ ref: f
1267
1267
  }, [
1268
1268
  e("div", {
1269
1269
  class: "artifactuse-viewer-content",
1270
- onClick: x[0] || (x[0] = me(() => {
1270
+ onClick: x[0] || (x[0] = he(() => {
1271
1271
  }, ["stop"]))
1272
1272
  }, [
1273
1273
  H.type === "image" ? (a(), s("img", {
1274
1274
  key: 0,
1275
1275
  src: H.src,
1276
1276
  alt: H.alt,
1277
- class: N(["artifactuse-viewer-image", { "artifactuse-viewer-image--zoomed": r.value }]),
1278
- onClick: S
1279
- }, null, 10, Yi)) : H.type === "pdf" ? (a(), s("iframe", {
1277
+ class: j(["artifactuse-viewer-image", { "artifactuse-viewer-image--zoomed": o.value }]),
1278
+ onClick: E
1279
+ }, null, 10, al)) : H.type === "pdf" ? (a(), s("iframe", {
1280
1280
  key: 1,
1281
1281
  src: H.src,
1282
1282
  class: "artifactuse-viewer-pdf"
1283
- }, null, 8, Qi)) : v("", !0),
1283
+ }, null, 8, sl)) : v("", !0),
1284
1284
  e("button", {
1285
1285
  class: "artifactuse-viewer-close",
1286
- onClick: V,
1286
+ onClick: q,
1287
1287
  title: "Close (Esc)"
1288
1288
  }, [...x[1] || (x[1] = [
1289
1289
  e("svg", {
@@ -1306,13 +1306,13 @@ const Jt = { class: "artifactuse-card__icon" }, Xt = ["innerHTML"], Zt = { class
1306
1306
  })
1307
1307
  ], -1)
1308
1308
  ])]),
1309
- H.type === "image" ? (a(), s("div", Gi, [
1309
+ H.type === "image" ? (a(), s("div", il, [
1310
1310
  e("button", {
1311
1311
  class: "artifactuse-viewer-control",
1312
- onClick: me(S, ["stop"]),
1313
- title: r.value ? "Zoom out" : "Zoom in"
1312
+ onClick: he(E, ["stop"]),
1313
+ title: o.value ? "Zoom out" : "Zoom in"
1314
1314
  }, [
1315
- r.value ? (a(), s("svg", al, [...x[3] || (x[3] = [
1315
+ o.value ? (a(), s("svg", ol, [...x[3] || (x[3] = [
1316
1316
  e("circle", {
1317
1317
  cx: "11",
1318
1318
  cy: "11",
@@ -1330,7 +1330,7 @@ const Jt = { class: "artifactuse-card__icon" }, Xt = ["innerHTML"], Zt = { class
1330
1330
  x2: "14",
1331
1331
  y2: "11"
1332
1332
  }, null, -1)
1333
- ])])) : (a(), s("svg", tl, [...x[2] || (x[2] = [
1333
+ ])])) : (a(), s("svg", nl, [...x[2] || (x[2] = [
1334
1334
  e("circle", {
1335
1335
  cx: "11",
1336
1336
  cy: "11",
@@ -1355,10 +1355,10 @@ const Jt = { class: "artifactuse-card__icon" }, Xt = ["innerHTML"], Zt = { class
1355
1355
  y2: "11"
1356
1356
  }, null, -1)
1357
1357
  ])]))
1358
- ], 8, el),
1358
+ ], 8, ll),
1359
1359
  e("button", {
1360
1360
  class: "artifactuse-viewer-control",
1361
- onClick: me(h, ["stop"]),
1361
+ onClick: he(g, ["stop"]),
1362
1362
  title: "Download"
1363
1363
  }, [...x[4] || (x[4] = [
1364
1364
  e("svg", {
@@ -1378,7 +1378,7 @@ const Jt = { class: "artifactuse-card__icon" }, Xt = ["innerHTML"], Zt = { class
1378
1378
  ], -1)
1379
1379
  ])])
1380
1380
  ])) : v("", !0),
1381
- H.caption ? (a(), s("div", sl, l(H.caption), 1)) : v("", !0)
1381
+ H.caption ? (a(), s("div", rl, l(H.caption), 1)) : v("", !0)
1382
1382
  ])
1383
1383
  ], 544)) : v("", !0)
1384
1384
  ]),
@@ -1386,7 +1386,7 @@ const Jt = { class: "artifactuse-card__icon" }, Xt = ["innerHTML"], Zt = { class
1386
1386
  })
1387
1387
  ]));
1388
1388
  }
1389
- }, ll = ["innerHTML"], Un = {
1389
+ }, ul = ["innerHTML"], co = {
1390
1390
  __name: "ArtifactuseAgentMessage",
1391
1391
  props: {
1392
1392
  // The raw message content (markdown/HTML from AI)
@@ -1447,33 +1447,33 @@ const Jt = { class: "artifactuse-card__icon" }, Xt = ["innerHTML"], Zt = { class
1447
1447
  "social-copy",
1448
1448
  "media-open"
1449
1449
  ],
1450
- setup(H, { expose: d, emit: _ }) {
1451
- const L = H, m = _, {
1452
- processMessage: r,
1453
- openArtifact: V,
1454
- state: S,
1455
- getTheme: h,
1450
+ setup(H, { expose: c, emit: _ }) {
1451
+ const T = H, f = _, {
1452
+ processMessage: o,
1453
+ openArtifact: q,
1454
+ state: E,
1455
+ getTheme: g,
1456
1456
  instance: n
1457
- } = Ee(), p = M(null), x = M(null), F = M(""), $ = M([]);
1458
- let j = null;
1459
- const q = M(!1), W = M("image"), Y = M(""), E = M(""), ie = M(""), X = b(() => (h == null ? void 0 : h()) || "dark"), J = b(() => S.activeArtifactId), oe = b(() => {
1460
- var C;
1461
- return L.inlineCards ?? ((C = n == null ? void 0 : n.config) == null ? void 0 : C.inlineCards) ?? !0;
1462
- }), f = M(!1);
1463
- $e(() => {
1464
- L.typing && (f.value = !0);
1465
- }), de(() => L.typing, (C) => {
1466
- C && (f.value = !0);
1457
+ } = Ve(), h = M(null), x = M(null), I = M(""), $ = M([]);
1458
+ let N = null;
1459
+ const O = M(!1), W = M("image"), Y = M(""), S = M(""), ie = M(""), Z = C(() => (g == null ? void 0 : g()) || "dark"), X = C(() => E.activeArtifactId), oe = C(() => {
1460
+ var b;
1461
+ return T.inlineCards ?? ((b = n == null ? void 0 : n.config) == null ? void 0 : b.inlineCards) ?? !0;
1462
+ }), m = M(!1);
1463
+ Me(() => {
1464
+ T.typing && (m.value = !0);
1465
+ }), de(() => T.typing, (b) => {
1466
+ b && (m.value = !0);
1467
1467
  });
1468
- const k = b(() => f.value || L.isLastMessage ? "active" : "inactive");
1469
- function ee(C) {
1470
- if (!C) return null;
1468
+ const k = C(() => m.value || T.isLastMessage ? "active" : "inactive");
1469
+ function ee(b) {
1470
+ if (!b) return null;
1471
1471
  try {
1472
- const I = decodeURIComponent(escape(atob(C)));
1473
- return JSON.parse(I);
1472
+ const V = decodeURIComponent(escape(atob(b)));
1473
+ return JSON.parse(V);
1474
1474
  } catch {
1475
1475
  try {
1476
- const D = C.replace(/&#10;/g, `
1476
+ const D = b.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
1478
  return JSON.parse(D);
1479
1479
  } catch (D) {
@@ -1481,94 +1481,94 @@ const Jt = { class: "artifactuse-card__icon" }, Xt = ["innerHTML"], Zt = { class
1481
1481
  }
1482
1482
  }
1483
1483
  }
1484
- const re = b(() => {
1485
- const C = [], I = F.value;
1486
- if (!I) return C;
1484
+ const re = C(() => {
1485
+ const b = [], V = I.value;
1486
+ if (!V) return b;
1487
1487
  const D = /<div\s+class="artifactuse-placeholder[^"]*"[^>]*data-artifact-id="([^"]+)"[^>]*data-artifact-type="([^"]+)"[^>]*data-artifact=["']([^"']*)["'][^>]*><\/div>/gi;
1488
1488
  let te = 0, A;
1489
- for (; (A = D.exec(I)) !== null; ) {
1489
+ for (; (A = D.exec(V)) !== null; ) {
1490
1490
  if (A.index > te) {
1491
- const O = I.slice(te, A.index);
1492
- O.trim() && C.push({ type: "html", content: O });
1491
+ const U = V.slice(te, A.index);
1492
+ U.trim() && b.push({ type: "html", content: U });
1493
1493
  }
1494
- const ae = ee(A[3]), u = A[2];
1495
- ae && (u === "form" && ae.isInline ? C.push({ type: "form", artifact: ae }) : u === "social" ? C.push({ type: "social", artifact: ae }) : C.push({ type: "panel", artifact: ae })), te = A.index + A[0].length;
1494
+ const ae = ee(A[3]), d = A[2];
1495
+ ae && (d === "form" && ae.isInline ? b.push({ type: "form", artifact: ae }) : d === "social" ? b.push({ type: "social", artifact: ae }) : b.push({ type: "panel", artifact: ae })), te = A.index + A[0].length;
1496
1496
  }
1497
- if (te < I.length) {
1498
- const ae = I.slice(te);
1499
- ae.trim() && C.push({ type: "html", content: ae });
1497
+ if (te < V.length) {
1498
+ const ae = V.slice(te);
1499
+ ae.trim() && b.push({ type: "html", content: ae });
1500
1500
  }
1501
- return C.length === 0 && I.trim() && C.push({ type: "html", content: I }), C;
1501
+ return b.length === 0 && V.trim() && b.push({ type: "html", content: V }), b;
1502
1502
  });
1503
- function P(C) {
1504
- W.value = C.type || "image", Y.value = C.src || "", E.value = C.alt || "", ie.value = C.caption || "", q.value = !0, m("media-open", C);
1503
+ function P(b) {
1504
+ W.value = b.type || "image", Y.value = b.src || "", S.value = b.alt || "", ie.value = b.caption || "", O.value = !0, f("media-open", b);
1505
1505
  }
1506
1506
  function Q() {
1507
- q.value = !1, Y.value = "", E.value = "", ie.value = "";
1507
+ O.value = !1, Y.value = "", S.value = "", ie.value = "";
1508
1508
  }
1509
1509
  function w() {
1510
1510
  if (!x.value) return;
1511
- x.value.querySelectorAll('img[data-lightbox="true"]').forEach((u) => {
1512
- u._lightboxHandler && u.removeEventListener("click", u._lightboxHandler), u._lightboxHandler = (O) => {
1513
- O.preventDefault(), O.stopPropagation(), P({
1511
+ x.value.querySelectorAll('img[data-lightbox="true"]').forEach((d) => {
1512
+ d._lightboxHandler && d.removeEventListener("click", d._lightboxHandler), d._lightboxHandler = (U) => {
1513
+ U.preventDefault(), U.stopPropagation(), P({
1514
1514
  type: "image",
1515
- src: u.src,
1516
- alt: u.alt || "",
1517
- caption: u.dataset.caption || u.alt || ""
1515
+ src: d.src,
1516
+ alt: d.alt || "",
1517
+ caption: d.dataset.caption || d.alt || ""
1518
1518
  });
1519
- }, u.addEventListener("click", u._lightboxHandler), u.style.cursor = "zoom-in";
1520
- }), x.value.querySelectorAll(".artifactuse-image-container img").forEach((u) => {
1521
- u._lightboxHandler || (u._lightboxHandler = (O) => {
1522
- O.preventDefault(), O.stopPropagation();
1523
- const G = u.closest(".artifactuse-image-container"), ce = G == null ? void 0 : G.querySelector(".artifactuse-image-caption"), ke = (ce == null ? void 0 : ce.textContent) || u.dataset.caption || u.alt || "";
1519
+ }, d.addEventListener("click", d._lightboxHandler), d.style.cursor = "zoom-in";
1520
+ }), x.value.querySelectorAll(".artifactuse-image-container img").forEach((d) => {
1521
+ d._lightboxHandler || (d._lightboxHandler = (U) => {
1522
+ U.preventDefault(), U.stopPropagation();
1523
+ const G = d.closest(".artifactuse-image-container"), ce = G == null ? void 0 : G.querySelector(".artifactuse-image-caption"), ke = (ce == null ? void 0 : ce.textContent) || d.dataset.caption || d.alt || "";
1524
1524
  P({
1525
1525
  type: "image",
1526
- src: u.src,
1527
- alt: u.alt || "",
1526
+ src: d.src,
1527
+ alt: d.alt || "",
1528
1528
  caption: ke
1529
1529
  });
1530
- }, u.addEventListener("click", u._lightboxHandler), u.style.cursor = "zoom-in");
1531
- }), x.value.querySelectorAll(".artifactuse-gallery-item img, .artifactuse-image-gallery img").forEach((u) => {
1532
- u._lightboxHandler || (u._lightboxHandler = (O) => {
1533
- O.preventDefault(), O.stopPropagation();
1534
- const G = u.closest(".artifactuse-gallery-item"), ce = G == null ? void 0 : G.querySelector(".artifactuse-gallery-caption"), ke = (ce == null ? void 0 : ce.textContent) || u.dataset.caption || u.alt || "";
1530
+ }, d.addEventListener("click", d._lightboxHandler), d.style.cursor = "zoom-in");
1531
+ }), x.value.querySelectorAll(".artifactuse-gallery-item img, .artifactuse-image-gallery img").forEach((d) => {
1532
+ d._lightboxHandler || (d._lightboxHandler = (U) => {
1533
+ U.preventDefault(), U.stopPropagation();
1534
+ const G = d.closest(".artifactuse-gallery-item"), ce = G == null ? void 0 : G.querySelector(".artifactuse-gallery-caption"), ke = (ce == null ? void 0 : ce.textContent) || d.dataset.caption || d.alt || "";
1535
1535
  P({
1536
1536
  type: "image",
1537
- src: u.src,
1538
- alt: u.alt || "",
1537
+ src: d.src,
1538
+ alt: d.alt || "",
1539
1539
  caption: ke
1540
1540
  });
1541
- }, u.addEventListener("click", u._lightboxHandler), u.style.cursor = "zoom-in");
1542
- }), x.value.querySelectorAll('a[href$=".pdf"], a[data-type="pdf"]').forEach((u) => {
1543
- u._pdfHandler && u.removeEventListener("click", u._pdfHandler), u._pdfHandler = (O) => {
1544
- O.preventDefault(), O.stopPropagation(), P({
1541
+ }, d.addEventListener("click", d._lightboxHandler), d.style.cursor = "zoom-in");
1542
+ }), x.value.querySelectorAll('a[href$=".pdf"], a[data-type="pdf"]').forEach((d) => {
1543
+ d._pdfHandler && d.removeEventListener("click", d._pdfHandler), d._pdfHandler = (U) => {
1544
+ U.preventDefault(), U.stopPropagation(), P({
1545
1545
  type: "pdf",
1546
- src: u.href,
1547
- alt: u.textContent || "PDF Document",
1548
- caption: u.title || u.textContent || ""
1546
+ src: d.href,
1547
+ alt: d.textContent || "PDF Document",
1548
+ caption: d.title || d.textContent || ""
1549
1549
  });
1550
- }, u.addEventListener("click", u._pdfHandler);
1551
- }), x.value.querySelectorAll(".artifactuse-pdf-container, [data-pdf-viewer]").forEach((u) => {
1550
+ }, d.addEventListener("click", d._pdfHandler);
1551
+ }), x.value.querySelectorAll(".artifactuse-pdf-container, [data-pdf-viewer]").forEach((d) => {
1552
1552
  var G;
1553
- u._pdfHandler && u.removeEventListener("click", u._pdfHandler);
1554
- const O = u.dataset.pdfSrc || ((G = u.querySelector("iframe")) == null ? void 0 : G.src) || "";
1555
- O && (u._pdfHandler = (ce) => {
1553
+ d._pdfHandler && d.removeEventListener("click", d._pdfHandler);
1554
+ const U = d.dataset.pdfSrc || ((G = d.querySelector("iframe")) == null ? void 0 : G.src) || "";
1555
+ U && (d._pdfHandler = (ce) => {
1556
1556
  ce.preventDefault(), ce.stopPropagation(), P({
1557
1557
  type: "pdf",
1558
- src: O,
1558
+ src: U,
1559
1559
  alt: "PDF Document",
1560
- caption: u.dataset.caption || ""
1560
+ caption: d.dataset.caption || ""
1561
1561
  });
1562
- }, u.addEventListener("click", u._pdfHandler), u.style.cursor = "pointer");
1563
- }), x.value.querySelectorAll(".artifactuse-video-preview-wrapper, .video-preview-wrapper").forEach((u) => {
1564
- u._clickHandler && u.removeEventListener("click", u._clickHandler), u._clickHandler = (O) => {
1565
- if (O.target.closest(".artifactuse-video-play-button")) return;
1566
- const G = u.dataset.videoUrl || u.dataset.url;
1562
+ }, d.addEventListener("click", d._pdfHandler), d.style.cursor = "pointer");
1563
+ }), x.value.querySelectorAll(".artifactuse-video-preview-wrapper, .video-preview-wrapper").forEach((d) => {
1564
+ d._clickHandler && d.removeEventListener("click", d._clickHandler), d._clickHandler = (U) => {
1565
+ if (U.target.closest(".artifactuse-video-play-button")) return;
1566
+ const G = d.dataset.videoUrl || d.dataset.url;
1567
1567
  G && window.open(G, "_blank", "noopener,noreferrer");
1568
- }, u.addEventListener("click", u._clickHandler);
1568
+ }, d.addEventListener("click", d._clickHandler);
1569
1569
  });
1570
1570
  }
1571
- function T() {
1571
+ function L() {
1572
1572
  if (!x.value) return;
1573
1573
  x.value.querySelectorAll("img").forEach((A) => {
1574
1574
  A._lightboxHandler && (A.removeEventListener("click", A._lightboxHandler), delete A._lightboxHandler);
@@ -1580,81 +1580,81 @@ const Jt = { class: "artifactuse-card__icon" }, Xt = ["innerHTML"], Zt = { class
1580
1580
  A._clickHandler && (A.removeEventListener("click", A._clickHandler), delete A._clickHandler);
1581
1581
  });
1582
1582
  }
1583
- function o() {
1584
- j && clearTimeout(j), j = setTimeout(async () => {
1585
- if (await be(), n != null && n.initializeContent && x.value)
1583
+ function r() {
1584
+ N && clearTimeout(N), N = setTimeout(async () => {
1585
+ if (await xe(), n != null && n.initializeContent && x.value)
1586
1586
  try {
1587
1587
  await n.initializeContent(x.value);
1588
- } catch (C) {
1589
- console.error("Failed to initialize content:", C);
1588
+ } catch (b) {
1589
+ console.error("Failed to initialize content:", b);
1590
1590
  }
1591
1591
  w();
1592
1592
  }, 100);
1593
1593
  }
1594
1594
  de(
1595
- () => L.content,
1596
- (C) => {
1597
- if (C) {
1598
- const I = r(C, L.messageId, {
1599
- inlinePreview: L.inlinePreview,
1600
- inlineCode: L.inlineCode,
1601
- tabs: L.tabs,
1602
- viewMode: L.viewMode
1595
+ () => T.content,
1596
+ (b) => {
1597
+ if (b) {
1598
+ const V = o(b, T.messageId, {
1599
+ inlinePreview: T.inlinePreview,
1600
+ inlineCode: T.inlineCode,
1601
+ tabs: T.tabs,
1602
+ viewMode: T.viewMode
1603
1603
  });
1604
- F.value = I.html, $.value = I.artifacts, I.artifacts.length > 0 && m("artifact-detected", I.artifacts), L.typing || o();
1604
+ I.value = V.html, $.value = V.artifacts, V.artifacts.length > 0 && f("artifact-detected", V.artifacts), T.typing || r();
1605
1605
  }
1606
1606
  },
1607
1607
  { immediate: !0 }
1608
1608
  ), de(
1609
- () => L.typing,
1610
- (C, I) => {
1611
- I === !0 && C === !1 && o();
1609
+ () => T.typing,
1610
+ (b, V) => {
1611
+ V === !0 && b === !1 && r();
1612
1612
  }
1613
- ), $e(() => {
1614
- L.typing || o();
1615
- }), qt(() => {
1616
- j && clearTimeout(j), T();
1613
+ ), Me(() => {
1614
+ T.typing || r();
1615
+ }), jt(() => {
1616
+ N && clearTimeout(N), L();
1617
1617
  });
1618
- function B(C) {
1619
- const I = C.target.closest(".artifactuse-inline-preview");
1620
- if (I) {
1621
- if (I.dataset.nonClickable) return;
1622
- const D = I.dataset.artifactId;
1618
+ function B(b) {
1619
+ const V = b.target.closest(".artifactuse-inline-preview");
1620
+ if (V) {
1621
+ if (V.dataset.nonClickable) return;
1622
+ const D = V.dataset.artifactId;
1623
1623
  if (D) {
1624
- const te = S.artifacts.find((A) => A.id === D);
1625
- te && c(te);
1624
+ const te = E.artifacts.find((A) => A.id === D);
1625
+ te && u(te);
1626
1626
  }
1627
1627
  }
1628
1628
  }
1629
- function c(C) {
1630
- V(C), m("artifact-open", C);
1629
+ function u(b) {
1630
+ q(b), f("artifact-open", b);
1631
1631
  }
1632
- function z(C) {
1633
- m("artifact-copy", C);
1632
+ function z(b) {
1633
+ f("artifact-copy", b);
1634
1634
  }
1635
- function le(C) {
1636
- m("artifact-download", C);
1635
+ function le(b) {
1636
+ f("artifact-download", b);
1637
1637
  }
1638
- function pe(C) {
1639
- m("form-submit", C);
1638
+ function pe(b) {
1639
+ f("form-submit", b);
1640
1640
  }
1641
- function ye(C) {
1642
- m("form-cancel", C);
1641
+ function ye(b) {
1642
+ f("form-cancel", b);
1643
1643
  }
1644
- function fe(C) {
1645
- m("form-button-click", C);
1644
+ function fe(b) {
1645
+ f("form-button-click", b);
1646
1646
  }
1647
- function Le(C) {
1648
- m("social-copy", C);
1647
+ function Pe(b) {
1648
+ f("social-copy", b);
1649
1649
  }
1650
- return b(() => S.artifacts.filter((C) => C.messageId === L.messageId)), d({
1650
+ return C(() => E.artifacts.filter((b) => b.messageId === T.messageId)), c({
1651
1651
  openViewer: P,
1652
1652
  closeViewer: Q,
1653
1653
  attachMediaListeners: w
1654
- }), (C, I) => (a(), s("div", {
1654
+ }), (b, V) => (a(), s("div", {
1655
1655
  class: "artifactuse-agent-message",
1656
1656
  ref_key: "messageRef",
1657
- ref: p
1657
+ ref: h
1658
1658
  }, [
1659
1659
  e("div", {
1660
1660
  class: "artifactuse-message-content",
@@ -1666,311 +1666,335 @@ const Jt = { class: "artifactuse-card__icon" }, Xt = ["innerHTML"], Zt = { class
1666
1666
  D.type === "html" ? (a(), s("div", {
1667
1667
  key: 0,
1668
1668
  innerHTML: D.content
1669
- }, null, 8, ll)) : D.type === "form" && D.artifact.isInline ? (a(), xe(Ja, {
1669
+ }, null, 8, ul)) : D.type === "form" && D.artifact.isInline ? (a(), $e(Qa, {
1670
1670
  key: 1,
1671
1671
  artifact: D.artifact,
1672
- theme: X.value,
1672
+ theme: Z.value,
1673
1673
  "initial-state": k.value,
1674
1674
  onSubmit: pe,
1675
1675
  onCancel: ye,
1676
1676
  onButtonClick: fe
1677
- }, null, 8, ["artifact", "theme", "initial-state"])) : D.type === "social" ? (a(), xe(Ki, {
1677
+ }, null, 8, ["artifact", "theme", "initial-state"])) : D.type === "social" ? (a(), $e(tl, {
1678
1678
  key: 2,
1679
1679
  artifact: D.artifact,
1680
- theme: X.value,
1681
- onCopy: Le
1682
- }, null, 8, ["artifact", "theme"])) : D.type === "panel" && oe.value ? (a(), xe(ia, {
1680
+ theme: Z.value,
1681
+ onCopy: Pe
1682
+ }, null, 8, ["artifact", "theme"])) : D.type === "panel" && oe.value ? (a(), $e(ca, {
1683
1683
  key: 3,
1684
1684
  artifact: D.artifact,
1685
- "is-active": J.value === D.artifact.id,
1686
- onOpen: c,
1685
+ "is-active": X.value === D.artifact.id,
1686
+ onOpen: u,
1687
1687
  onCopy: z,
1688
1688
  onDownload: le
1689
1689
  }, null, 8, ["artifact", "is-active"])) : v("", !0)
1690
1690
  ], 64))), 128))
1691
1691
  ], 512),
1692
- Be(il, {
1693
- "is-open": q.value,
1692
+ ze(cl, {
1693
+ "is-open": O.value,
1694
1694
  type: W.value,
1695
1695
  src: Y.value,
1696
- alt: E.value,
1696
+ alt: S.value,
1697
1697
  caption: ie.value,
1698
1698
  onClose: Q
1699
1699
  }, null, 8, ["is-open", "type", "src", "alt", "caption"])
1700
1700
  ], 512));
1701
1701
  }
1702
- }, nl = { class: "artifactuse-panel__header artifactuse-panel__header--simple" }, ol = { class: "artifactuse-panel__actions" }, rl = { class: "artifactuse-panel__footer artifactuse-panel__footer--simple" }, cl = {
1702
+ }, dl = { class: "artifactuse-panel__header artifactuse-panel__header--simple" }, vl = { class: "artifactuse-panel__title" }, fl = { class: "artifactuse-panel__icon" }, pl = {
1703
+ key: 0,
1704
+ viewBox: "0 0 24 24",
1705
+ fill: "none",
1706
+ stroke: "currentColor",
1707
+ "stroke-width": "2"
1708
+ }, _l = {
1709
+ key: 1,
1710
+ viewBox: "0 0 24 24",
1711
+ fill: "none",
1712
+ stroke: "currentColor",
1713
+ "stroke-width": "2"
1714
+ }, hl = { class: "artifactuse-panel__title-content" }, ml = { class: "artifactuse-panel__name" }, yl = { class: "artifactuse-panel__actions" }, gl = { class: "artifactuse-panel__empty" }, kl = { class: "artifactuse-panel__empty-title" }, wl = { class: "artifactuse-panel__empty-text" }, bl = { class: "artifactuse-panel__footer artifactuse-panel__footer--simple" }, Cl = {
1703
1715
  key: 0,
1704
1716
  href: "https://artifactuse.com",
1705
1717
  target: "_blank",
1706
1718
  rel: "noopener noreferrer",
1707
1719
  class: "artifactuse-panel__branding"
1708
- }, ul = { class: "artifactuse-panel__header artifactuse-panel__header--simple" }, dl = { class: "artifactuse-panel__title" }, vl = { class: "artifactuse-panel__title-content" }, fl = { class: "artifactuse-panel__meta" }, pl = { class: "artifactuse-panel__actions" }, hl = ["disabled"], _l = {
1720
+ }, xl = { class: "artifactuse-panel__header artifactuse-panel__header--simple" }, $l = { class: "artifactuse-panel__title" }, Ml = { class: "artifactuse-panel__title-content" }, Tl = { class: "artifactuse-panel__meta" }, Ll = { class: "artifactuse-panel__actions" }, Pl = ["disabled"], Al = {
1709
1721
  key: 0,
1710
1722
  viewBox: "0 0 24 24",
1711
1723
  fill: "none",
1712
1724
  stroke: "currentColor",
1713
1725
  "stroke-width": "2"
1714
- }, ml = {
1726
+ }, Hl = {
1715
1727
  key: 1,
1716
1728
  class: "artifactuse-panel__spinner-icon",
1717
1729
  viewBox: "0 0 24 24",
1718
1730
  fill: "none",
1719
1731
  stroke: "currentColor",
1720
1732
  "stroke-width": "2"
1721
- }, yl = { class: "artifactuse-panel__list" }, gl = { class: "artifactuse-panel__list-items" }, kl = ["onClick"], wl = ["innerHTML"], Cl = { class: "artifactuse-panel__list-item-content" }, bl = { class: "artifactuse-panel__list-item-title" }, xl = { class: "artifactuse-panel__list-item-meta" }, $l = { class: "artifactuse-panel__footer artifactuse-panel__footer--simple" }, Ml = {
1733
+ }, El = { class: "artifactuse-panel__list" }, Bl = { class: "artifactuse-panel__list-items" }, Sl = ["onClick"], zl = ["innerHTML"], Vl = { class: "artifactuse-panel__list-item-content" }, Il = { class: "artifactuse-panel__list-item-title" }, Fl = { class: "artifactuse-panel__list-item-meta" }, Rl = { class: "artifactuse-panel__footer artifactuse-panel__footer--simple" }, ql = {
1722
1734
  key: 0,
1723
1735
  href: "https://artifactuse.com",
1724
1736
  target: "_blank",
1725
1737
  rel: "noopener noreferrer",
1726
1738
  class: "artifactuse-panel__branding"
1727
- }, Ll = { class: "artifactuse-panel__header" }, Tl = { class: "artifactuse-panel__title" }, Pl = ["innerHTML"], Al = { class: "artifactuse-panel__title-content" }, Hl = { class: "artifactuse-panel__name" }, Sl = { class: "artifactuse-panel__meta" }, Bl = { class: "artifactuse-panel__tabs" }, El = ["disabled"], zl = ["disabled"], Il = { class: "artifactuse-panel__actions" }, Fl = ["title"], Vl = {
1739
+ }, Ol = { class: "artifactuse-panel__header" }, Ul = ["title"], Dl = { class: "artifactuse-panel__title" }, Nl = ["innerHTML"], jl = { class: "artifactuse-panel__title-content" }, Wl = { class: "artifactuse-panel__name" }, Jl = { class: "artifactuse-panel__meta" }, Xl = { class: "artifactuse-panel__tabs" }, Zl = ["disabled"], Kl = ["disabled"], Yl = { class: "artifactuse-panel__actions" }, Ql = ["title"], Gl = {
1728
1740
  key: 0,
1729
1741
  viewBox: "0 0 24 24",
1730
1742
  fill: "none",
1731
1743
  stroke: "currentColor",
1732
1744
  "stroke-width": "2"
1733
- }, Rl = {
1745
+ }, en = {
1734
1746
  key: 1,
1735
1747
  viewBox: "0 0 24 24",
1736
1748
  fill: "none",
1737
1749
  stroke: "currentColor",
1738
1750
  "stroke-width": "2"
1739
- }, ql = {
1751
+ }, tn = {
1752
+ key: 0,
1753
+ class: "artifactuse-panel__file-tabs"
1754
+ }, an = { class: "artifactuse-panel__file-tabs-scroll" }, sn = ["onClick"], ln = ["innerHTML"], nn = { class: "artifactuse-panel__file-tab-title" }, on = ["onClick"], rn = {
1740
1755
  key: 0,
1741
1756
  class: "artifactuse-panel__loading"
1742
- }, Ol = {
1757
+ }, cn = {
1743
1758
  key: 0,
1744
1759
  class: "artifactuse-panel__loading"
1745
- }, Ul = ["src"], Dl = {
1760
+ }, un = ["src"], dn = {
1746
1761
  key: 2,
1747
1762
  class: "artifactuse-panel__no-preview"
1748
- }, jl = { class: "artifactuse-panel__edit" }, Nl = { class: "artifactuse-panel__footer" }, Wl = { class: "artifactuse-panel__footer-left" }, Jl = {
1763
+ }, vn = { class: "artifactuse-panel__edit" }, fn = { class: "artifactuse-panel__footer" }, pn = { class: "artifactuse-panel__footer-left" }, _n = {
1749
1764
  key: 0,
1750
1765
  href: "https://artifactuse.com",
1751
1766
  target: "_blank",
1752
1767
  rel: "noopener noreferrer",
1753
1768
  class: "artifactuse-panel__branding"
1754
- }, Xl = {
1769
+ }, hn = {
1755
1770
  key: 1,
1756
1771
  class: "artifactuse-panel__badge"
1757
- }, Zl = { class: "artifactuse-panel__footer-right" }, Kl = ["title"], Yl = {
1772
+ }, mn = { class: "artifactuse-panel__footer-right" }, yn = ["title"], gn = {
1758
1773
  key: 0,
1759
1774
  viewBox: "0 0 24 24",
1760
1775
  fill: "none",
1761
1776
  stroke: "currentColor",
1762
1777
  "stroke-width": "2"
1763
- }, Ql = {
1778
+ }, kn = {
1764
1779
  key: 1,
1765
1780
  viewBox: "0 0 24 24",
1766
1781
  fill: "none",
1767
1782
  stroke: "currentColor",
1768
1783
  "stroke-width": "2"
1769
- }, Gl = {
1784
+ }, wn = {
1770
1785
  key: 0,
1771
1786
  style: { position: "relative" }
1772
- }, en = {
1787
+ }, bn = {
1773
1788
  key: 0,
1774
1789
  class: "artifactuse-share-popup"
1775
- }, tn = { class: "artifactuse-share-popup__header" }, an = { class: "artifactuse-share-popup__title" }, sn = { class: "artifactuse-share-popup__body" }, ln = {
1790
+ }, Cn = { class: "artifactuse-share-popup__header" }, xn = { class: "artifactuse-share-popup__title" }, $n = { class: "artifactuse-share-popup__body" }, Mn = {
1776
1791
  key: 0,
1777
1792
  class: "artifactuse-share-popup__loading"
1778
- }, nn = { key: 1 }, on = { class: "artifactuse-share-popup__error" }, rn = { class: "artifactuse-share-popup__error-text" }, cn = { class: "artifactuse-share-popup__actions" }, un = {
1793
+ }, Tn = { key: 1 }, Ln = { class: "artifactuse-share-popup__error" }, Pn = { class: "artifactuse-share-popup__error-text" }, An = { class: "artifactuse-share-popup__actions" }, Hn = {
1779
1794
  key: 2,
1780
1795
  class: "artifactuse-share-popup__options"
1781
- }, dn = { key: 3 }, vn = {
1796
+ }, En = { key: 3 }, Bn = {
1782
1797
  key: 0,
1783
1798
  class: "artifactuse-share-popup__loading"
1784
- }, fn = {
1799
+ }, Sn = {
1785
1800
  key: 1,
1786
1801
  class: "artifactuse-share-popup__empty"
1787
- }, pn = {
1802
+ }, zn = {
1788
1803
  key: 2,
1789
1804
  class: "artifactuse-share-popup__artifact-list"
1790
- }, hn = ["onClick"], _n = { class: "artifactuse-share-popup__artifact-name" }, mn = { class: "artifactuse-share-popup__artifact-date" }, yn = {
1805
+ }, Vn = ["onClick"], In = { class: "artifactuse-share-popup__artifact-name" }, Fn = { class: "artifactuse-share-popup__artifact-date" }, Rn = {
1791
1806
  key: 4,
1792
1807
  class: "artifactuse-share-popup__success"
1793
- }, gn = { class: "artifactuse-share-popup__link-wrapper" }, kn = ["value"], wn = {
1808
+ }, qn = { class: "artifactuse-share-popup__link-wrapper" }, On = ["value"], Un = {
1794
1809
  key: 0,
1795
1810
  class: "artifactuse-share-popup__expiry"
1796
- }, Cn = { class: "artifactuse-share-popup__expiry-text" }, bn = {
1811
+ }, Dn = { class: "artifactuse-share-popup__expiry-text" }, Nn = {
1797
1812
  key: 1,
1798
1813
  class: "artifactuse-share-popup__save-prompt"
1799
- }, xn = {
1814
+ }, jn = {
1800
1815
  key: 2,
1801
1816
  class: "artifactuse-panel__nav"
1802
- }, $n = ["disabled"], Mn = ["disabled"], Ln = {
1817
+ }, Wn = ["disabled"], Jn = ["disabled"], Xn = {
1803
1818
  key: 0,
1804
1819
  class: "artifactuse-panel__artifact-list"
1805
- }, Tn = { class: "artifactuse-panel__artifact-list-header" }, Pn = { class: "artifactuse-panel__artifact-list-items" }, An = ["onClick"], Hn = ["innerHTML"], Sn = { class: "artifactuse-panel__artifact-item-content" }, Bn = { class: "artifactuse-panel__artifact-item-title" }, En = { class: "artifactuse-panel__artifact-item-meta" }, zn = { class: "artifactuse-panel__artifact-item-index" }, Dn = {
1820
+ }, Zn = { class: "artifactuse-panel__artifact-list-header" }, Kn = { class: "artifactuse-panel__artifact-list-items" }, Yn = ["onClick"], Qn = ["innerHTML"], Gn = { class: "artifactuse-panel__artifact-item-content" }, eo = { class: "artifactuse-panel__artifact-item-title" }, to = { class: "artifactuse-panel__artifact-item-meta" }, ao = { class: "artifactuse-panel__artifact-item-index" }, uo = {
1806
1821
  __name: "ArtifactusePanel",
1807
1822
  props: {
1808
1823
  panelWidth: { type: Number, default: void 0 },
1809
1824
  splitPosition: { type: Number, default: void 0 }
1810
1825
  },
1811
1826
  emits: ["close", "ai-request", "save", "export", "resize"],
1812
- setup(H, { emit: d }) {
1813
- var et, tt;
1814
- const _ = d, L = H, {
1815
- state: m,
1816
- activeArtifact: r,
1817
- artifactCount: V,
1818
- hasArtifacts: S,
1819
- closePanel: h,
1827
+ setup(H, { emit: c }) {
1828
+ var st, it;
1829
+ const _ = c, T = H, {
1830
+ state: f,
1831
+ activeArtifact: o,
1832
+ artifactCount: q,
1833
+ hasArtifacts: E,
1834
+ closePanel: g,
1820
1835
  toggleFullscreen: n,
1821
- setViewMode: p,
1836
+ setViewMode: h,
1822
1837
  getPanelUrl: x,
1823
- openArtifact: F,
1838
+ openArtifact: I,
1824
1839
  instance: $
1825
- } = Ee(), j = M(null), q = M(null), W = M(null), Y = M(null), E = M(null), ie = M(null), X = M(!1), J = M(!1), oe = M(!0), f = M(!1), k = M(!1), ee = M(!1), re = M(!1), P = M("options"), Q = M(""), w = M(null), T = M(""), o = M(!1), B = M(!1), c = M([]), z = M(!1), le = M("");
1840
+ } = Ve(), N = M(null), O = M(null), W = M(null), Y = M(null), S = M(null), ie = M(null), Z = M(!1), X = M(!1), oe = M(!0), m = M(!1), k = M(!1), ee = M(!1), re = M(!1), P = M("options"), Q = M(""), w = M(null), L = M(""), r = M(!1), B = M(!1), u = M([]), z = M(!1), le = M("");
1826
1841
  let pe = null, ye = null, fe = null;
1827
- const Le = b(() => {
1842
+ const Pe = C(() => {
1828
1843
  var i;
1829
1844
  return ((i = $.editor) == null ? void 0 : i.isAvailable()) || !1;
1830
- }), C = M(
1831
- Math.min(Math.max(L.panelWidth ?? ((et = $.config) == null ? void 0 : et.panelWidth) ?? 65, 25), 75)
1832
- ), I = M(
1833
- Math.min(Math.max(L.splitPosition ?? ((tt = $.config) == null ? void 0 : tt.splitPosition) ?? 50, 20), 80)
1834
- ), D = b(() => r.value ? Se(r.value.language) : ""), te = b(() => r.value ? `<svg viewBox="0 0 24 24" fill="currentColor">${Oe(r.value.language)}</svg>` : ""), A = b(() => {
1835
- if (!r.value) return null;
1836
- let i = x(r.value);
1837
- return i && r.value._refreshToken && (i += (i.includes("?") ? "&" : "?") + "_t=" + r.value._refreshToken), i;
1845
+ }), b = M(
1846
+ Math.min(Math.max(T.panelWidth ?? ((st = $.config) == null ? void 0 : st.panelWidth) ?? 65, 25), 75)
1847
+ ), V = M(
1848
+ Math.min(Math.max(T.splitPosition ?? ((it = $.config) == null ? void 0 : it.splitPosition) ?? 50, 20), 80)
1849
+ ), D = C(() => o.value ? Se(o.value.language) : ""), te = C(() => o.value ? `<svg viewBox="0 0 24 24" fill="currentColor">${Ne(o.value.language)}</svg>` : ""), A = C(() => {
1850
+ if (!o.value) return null;
1851
+ let i = x(o.value);
1852
+ return i && o.value._refreshToken && (i += (i.includes("?") ? "&" : "?") + "_t=" + o.value._refreshToken), i;
1838
1853
  });
1839
- b(() => !r.value || !m.artifacts.length ? -1 : m.artifacts.findIndex((i) => i.id === r.value.id));
1840
- const ae = b(() => r.value ? Dt(r.value.language || "plaintext") : "plaintext"), u = b(() => m.artifacts.filter((i) => !i.isInline)), O = b(() => r.value ? u.value.findIndex((i) => i.id === r.value.id) : -1), G = b(() => {
1854
+ C(() => !o.value || !f.artifacts.length ? -1 : f.artifacts.findIndex((i) => i.id === o.value.id));
1855
+ const ae = C(() => o.value ? Xt(o.value.language || "plaintext") : "plaintext"), d = C(() => f.artifacts.filter((i) => !i.isInline)), U = C(() => o.value ? d.value.findIndex((i) => i.id === o.value.id) : -1), G = C(() => {
1841
1856
  var i;
1842
1857
  return ((i = $.config) == null ? void 0 : i.branding) !== !1;
1843
- }), ce = b(() => {
1858
+ }), ce = C(() => {
1844
1859
  var i;
1845
1860
  return ((i = $.share) == null ? void 0 : i.enabled) !== !1;
1846
- }), ke = b(() => {
1861
+ }), ke = C(() => {
1847
1862
  var i;
1848
1863
  return ((i = $.share) == null ? void 0 : i.isAuthenticated()) || !1;
1849
- }), ut = b(() => r.value ? C.value : Math.min(C.value, 30));
1850
- function je(i) {
1851
- return `<svg viewBox="0 0 24 24" fill="currentColor">${Oe(i)}</svg>`;
1864
+ }), ft = C(() => !o.value && !f.forceEmptyView ? Math.min(b.value, 30) : b.value), Te = C(() => {
1865
+ var i;
1866
+ return ((i = $.config) == null ? void 0 : i.multiTab) === !0;
1867
+ }), we = C(() => f.forceEmptyView), Je = C(() => Te.value ? f.openTabs.map((i) => f.artifacts.find((t) => t.id === i)).filter(Boolean) : []);
1868
+ function Ie(i) {
1869
+ return `<svg viewBox="0 0 24 24" fill="currentColor">${Ne(i)}</svg>`;
1870
+ }
1871
+ function pt(i) {
1872
+ I(i);
1852
1873
  }
1853
- function dt() {
1874
+ function _t(i) {
1875
+ $.closeTab(i), f.openTabs.length === 0 && (k.value = !1);
1876
+ }
1877
+ function ht() {
1854
1878
  k.value = !1, $.state.clearActiveArtifact();
1855
1879
  }
1856
- function Ne(i) {
1880
+ function Xe(i) {
1857
1881
  if (i.language !== "smartdiff") return null;
1858
1882
  try {
1859
1883
  const t = JSON.parse(i.code);
1860
1884
  if (t.oldCode === void 0 || t.newCode === void 0) return null;
1861
- const y = t.language || "plaintext", U = it() && window.Prism.languages[y], Z = jt(t.oldCode, t.newCode).split(`
1885
+ const p = t.language || "plaintext", F = ot() && window.Prism.languages[p], J = Zt(t.oldCode, t.newCode).split(`
1862
1886
  `);
1863
- return { html: Z.map((ue) => {
1864
- const ne = ue[0], Ce = ue.slice(1), ge = U ? window.Prism.highlight(Ce, U, y) : Ce;
1887
+ return { html: J.map((ue) => {
1888
+ const ne = ue[0], Ce = ue.slice(1), ge = F ? window.Prism.highlight(Ce, F, p) : Ce;
1865
1889
  return ne === "-" ? `<span class="token deleted">${ge}</span>` : ne === "+" ? `<span class="token inserted">${ge}</span>` : ge;
1866
1890
  }).join(`
1867
- `), lineCount: Z.length };
1891
+ `), lineCount: J.length };
1868
1892
  } catch {
1869
1893
  return null;
1870
1894
  }
1871
1895
  }
1872
- function vt() {
1896
+ function mt() {
1873
1897
  var i;
1874
- if (Y.value && ((i = r.value) != null && i.code)) {
1875
- const t = Ne(r.value), y = t ? t.lineCount : r.value.code.split(`
1898
+ if (Y.value && ((i = o.value) != null && i.code)) {
1899
+ const t = Xe(o.value), p = t ? t.lineCount : o.value.code.split(`
1876
1900
  `).length;
1877
- Y.value.innerHTML = Array.from({ length: y }, (U, Z) => `<div>${Z + 1}</div>`).join("");
1901
+ Y.value.innerHTML = Array.from({ length: p }, (F, J) => `<div>${J + 1}</div>`).join("");
1878
1902
  }
1879
1903
  }
1880
- function ft() {
1904
+ function yt() {
1881
1905
  var i;
1882
- if (q.value && it() && ((i = r.value) != null && i.code)) {
1883
- const t = Ne(r.value);
1906
+ if (O.value && ot() && ((i = o.value) != null && i.code)) {
1907
+ const t = Xe(o.value);
1884
1908
  if (t)
1885
- q.value.innerHTML = t.html;
1909
+ O.value.innerHTML = t.html;
1886
1910
  else {
1887
- const y = window.Prism.languages[ae.value];
1888
- y ? q.value.innerHTML = window.Prism.highlight(
1889
- r.value.code,
1890
- y,
1911
+ const p = window.Prism.languages[ae.value];
1912
+ p ? O.value.innerHTML = window.Prism.highlight(
1913
+ o.value.code,
1914
+ p,
1891
1915
  ae.value
1892
- ) : q.value.textContent = r.value.code;
1916
+ ) : O.value.textContent = o.value.code;
1893
1917
  }
1894
- q.value.dataset.highlighted = "true", be(() => {
1895
- pt();
1918
+ O.value.dataset.highlighted = "true", xe(() => {
1919
+ gt();
1896
1920
  });
1897
1921
  }
1898
1922
  }
1899
- function pt() {
1923
+ function gt() {
1900
1924
  var t;
1901
- const i = (t = q.value) == null ? void 0 : t.closest("pre");
1902
- if (i && E.value && Y.value) {
1903
- const U = window.getComputedStyle(i).backgroundColor;
1904
- U && U !== "rgba(0, 0, 0, 0)" && U !== "transparent" && (E.value.style.backgroundColor = U, Y.value.style.backgroundColor = U);
1925
+ const i = (t = O.value) == null ? void 0 : t.closest("pre");
1926
+ if (i && S.value && Y.value) {
1927
+ const F = window.getComputedStyle(i).backgroundColor;
1928
+ F && F !== "rgba(0, 0, 0, 0)" && F !== "transparent" && (S.value.style.backgroundColor = F, Y.value.style.backgroundColor = F);
1905
1929
  }
1906
1930
  }
1907
- function ht() {
1908
- E.value && (E.value.style.backgroundColor = ""), Y.value && (Y.value.style.backgroundColor = "");
1931
+ function kt() {
1932
+ S.value && (S.value.style.backgroundColor = ""), Y.value && (Y.value.style.backgroundColor = "");
1909
1933
  }
1910
- function Te() {
1911
- be(() => {
1912
- vt(), ft();
1934
+ function Ae() {
1935
+ xe(() => {
1936
+ mt(), yt();
1913
1937
  });
1914
1938
  }
1915
- function We() {
1916
- !Le.value || !ie.value || !r.value || (ze(), fe = $.editor.create(ie.value, {
1917
- code: r.value.code || "",
1918
- language: r.value.editorLanguage || r.value.language || "plaintext",
1939
+ function Ze() {
1940
+ !Pe.value || !ie.value || !o.value || (Fe(), fe = $.editor.create(ie.value, {
1941
+ code: o.value.code || "",
1942
+ language: o.value.editorLanguage || o.value.language || "plaintext",
1919
1943
  sdkTheme: $.getTheme()
1920
1944
  }));
1921
1945
  }
1922
- function ze() {
1946
+ function Fe() {
1923
1947
  fe && (fe.destroy(), fe = null);
1924
1948
  }
1925
- function _t() {
1926
- if (!fe || !r.value) return;
1949
+ function wt() {
1950
+ if (!fe || !o.value) return;
1927
1951
  const i = fe.getCode();
1928
1952
  $.emit("edit:save", {
1929
- artifactId: r.value.id,
1930
- artifact: r.value,
1953
+ artifactId: o.value.id,
1954
+ artifact: o.value,
1931
1955
  code: i
1932
1956
  });
1933
1957
  }
1934
- function mt() {
1935
- clearTimeout(ye), oe.value = !1, j.value && r.value && ($.bridge.setIframe(j.value), $.bridge.loadArtifact(r.value));
1958
+ function bt() {
1959
+ clearTimeout(ye), oe.value = !1, N.value && o.value && ($.bridge.setIframe(N.value), $.bridge.loadArtifact(o.value));
1936
1960
  }
1937
- function yt() {
1961
+ function Ct() {
1938
1962
  clearTimeout(ye), oe.value = !1;
1939
1963
  }
1940
- function gt() {
1964
+ function xt() {
1941
1965
  clearTimeout(ye), ye = setTimeout(() => {
1942
1966
  oe.value = !1;
1943
1967
  }, 1e3);
1944
1968
  }
1945
- async function kt() {
1946
- if (r.value)
1969
+ async function $t() {
1970
+ if (o.value)
1947
1971
  try {
1948
- await navigator.clipboard.writeText(r.value.code), X.value = !0, setTimeout(() => {
1949
- X.value = !1;
1972
+ await navigator.clipboard.writeText(o.value.code), Z.value = !0, setTimeout(() => {
1973
+ Z.value = !1;
1950
1974
  }, 2e3);
1951
1975
  } catch (i) {
1952
1976
  console.error("Failed to copy:", i);
1953
1977
  }
1954
1978
  }
1955
- function wt() {
1956
- if (!r.value) return;
1957
- const { code: i, language: t, title: y } = r.value, U = Ue(t), Z = `${y.toLowerCase().replace(/\s+/g, "-")}.${U}`, _e = new Blob([i], { type: "text/plain" }), ue = URL.createObjectURL(_e), ne = document.createElement("a");
1958
- ne.href = ue, ne.download = Z, document.body.appendChild(ne), ne.click(), document.body.removeChild(ne), URL.revokeObjectURL(ue);
1979
+ function Mt() {
1980
+ if (!o.value) return;
1981
+ const { code: i, language: t, title: p } = o.value, F = je(t), J = `${p.toLowerCase().replace(/\s+/g, "-")}.${F}`, me = new Blob([i], { type: "text/plain" }), ue = URL.createObjectURL(me), ne = document.createElement("a");
1982
+ ne.href = ue, ne.download = J, document.body.appendChild(ne), ne.click(), document.body.removeChild(ne), URL.revokeObjectURL(ue);
1959
1983
  }
1960
- async function Ct() {
1961
- if (!(ee.value || u.value.length === 0)) {
1984
+ async function Tt() {
1985
+ if (!(ee.value || d.value.length === 0)) {
1962
1986
  ee.value = !0;
1963
1987
  try {
1964
- const i = new Wt(), t = /* @__PURE__ */ new Map();
1965
- for (const ne of u.value) {
1988
+ const i = new Yt(), t = /* @__PURE__ */ new Map();
1989
+ for (const ne of d.value) {
1966
1990
  if (!ne.code) continue;
1967
- const Ce = Ue(ne.language);
1968
- let ge = (ne.title || "untitled").toLowerCase().replace(/\s+/g, "-").replace(/[^a-z0-9-_]/g, ""), Re = `${ge}.${Ce}`;
1969
- const qe = t.get(Re) || 0;
1970
- qe > 0 && (Re = `${ge}-${qe}.${Ce}`), t.set(`${ge}.${Ce}`, qe + 1), i.file(Re, ne.code);
1991
+ const Ce = je(ne.language);
1992
+ let ge = (ne.title || "untitled").toLowerCase().replace(/\s+/g, "-").replace(/[^a-z0-9-_]/g, ""), Ue = `${ge}.${Ce}`;
1993
+ const De = t.get(Ue) || 0;
1994
+ De > 0 && (Ue = `${ge}-${De}.${Ce}`), t.set(`${ge}.${Ce}`, De + 1), i.file(Ue, ne.code);
1971
1995
  }
1972
- const y = await i.generateAsync({ type: "blob" }), Z = `artifacts-${(/* @__PURE__ */ new Date()).toISOString().slice(0, 10)}.zip`, _e = URL.createObjectURL(y), ue = document.createElement("a");
1973
- ue.href = _e, ue.download = Z, document.body.appendChild(ue), ue.click(), document.body.removeChild(ue), URL.revokeObjectURL(_e);
1996
+ const p = await i.generateAsync({ type: "blob" }), J = `artifacts-${(/* @__PURE__ */ new Date()).toISOString().slice(0, 10)}.zip`, me = URL.createObjectURL(p), ue = document.createElement("a");
1997
+ ue.href = me, ue.download = J, document.body.appendChild(ue), ue.click(), document.body.removeChild(ue), URL.revokeObjectURL(me);
1974
1998
  } catch (i) {
1975
1999
  console.error("Failed to create ZIP:", i);
1976
2000
  } finally {
@@ -1978,57 +2002,57 @@ const Jt = { class: "artifactuse-card__icon" }, Xt = ["innerHTML"], Zt = { class
1978
2002
  }
1979
2003
  }
1980
2004
  }
1981
- function bt() {
2005
+ function Lt() {
1982
2006
  if (re.value) {
1983
2007
  re.value = !1;
1984
2008
  return;
1985
2009
  }
1986
- r.value && (P.value = "options", Q.value = "", w.value = null, T.value = "", o.value = !1, B.value = !1, c.value = [], z.value = !1, le.value = "", re.value = !0);
2010
+ o.value && (P.value = "options", Q.value = "", w.value = null, L.value = "", r.value = !1, B.value = !1, u.value = [], z.value = !1, le.value = "", re.value = !0);
1987
2011
  }
1988
- function xt() {
2012
+ function Pt() {
1989
2013
  re.value = !1;
1990
2014
  }
1991
- function Je(i) {
2015
+ function Ke(i) {
1992
2016
  return i ? new Date(i).toLocaleDateString("en-US", { month: "short", day: "numeric", year: "numeric" }) : "";
1993
2017
  }
1994
- async function Xe() {
1995
- if (!(!r.value || !$.share)) {
1996
- P.value = "loading", T.value = "";
2018
+ async function Ye() {
2019
+ if (!(!o.value || !$.share)) {
2020
+ P.value = "loading", L.value = "";
1997
2021
  try {
1998
- const i = await $.share.share(r.value);
2022
+ const i = await $.share.share(o.value);
1999
2023
  Q.value = i.url, w.value = i.expiresAt, B.value = !1, P.value = "success";
2000
2024
  } catch (i) {
2001
- T.value = i.message || "Failed to create share link", P.value = "error";
2025
+ L.value = i.message || "Failed to create share link", P.value = "error";
2002
2026
  }
2003
2027
  }
2004
2028
  }
2005
- async function Ze() {
2029
+ async function Qe() {
2006
2030
  if (ke.value)
2007
- Ie();
2031
+ Re();
2008
2032
  else {
2009
2033
  P.value = "loading";
2010
2034
  try {
2011
- await $.share.openAuthPopup(), Ie();
2035
+ await $.share.openAuthPopup(), Re();
2012
2036
  } catch (i) {
2013
- i.message === "Authentication cancelled" ? P.value = "options" : (T.value = i.message || "Authentication failed", P.value = "error");
2037
+ i.message === "Authentication cancelled" ? P.value = "options" : (L.value = i.message || "Authentication failed", P.value = "error");
2014
2038
  }
2015
2039
  }
2016
2040
  }
2017
- async function Ie() {
2018
- if (!(!r.value || !$.share)) {
2019
- P.value = "loading", T.value = "";
2041
+ async function Re() {
2042
+ if (!(!o.value || !$.share)) {
2043
+ P.value = "loading", L.value = "";
2020
2044
  try {
2021
- const i = await $.share.save(r.value);
2045
+ const i = await $.share.save(o.value);
2022
2046
  Q.value = i.url, w.value = null, B.value = !0, P.value = "success";
2023
2047
  } catch (i) {
2024
- T.value = i.message || "Failed to save artifact", P.value = "error";
2048
+ L.value = i.message || "Failed to save artifact", P.value = "error";
2025
2049
  }
2026
2050
  }
2027
2051
  }
2028
- function $t() {
2029
- B.value ? Ie() : Xe();
2052
+ function At() {
2053
+ B.value ? Re() : Ye();
2030
2054
  }
2031
- async function Mt() {
2055
+ async function Ht() {
2032
2056
  var i;
2033
2057
  if ($.share) {
2034
2058
  if (!ke.value) {
@@ -2036,148 +2060,354 @@ const Jt = { class: "artifactuse-card__icon" }, Xt = ["innerHTML"], Zt = { class
2036
2060
  try {
2037
2061
  await $.share.openAuthPopup();
2038
2062
  } catch (t) {
2039
- t.message === "Authentication cancelled" ? P.value = "options" : (T.value = t.message || "Authentication failed", P.value = "error");
2063
+ t.message === "Authentication cancelled" ? P.value = "options" : (L.value = t.message || "Authentication failed", P.value = "error");
2040
2064
  return;
2041
2065
  }
2042
2066
  }
2043
2067
  P.value = "update-list", z.value = !0;
2044
2068
  try {
2045
- const t = ((i = r.value) == null ? void 0 : i.language) || null, y = await $.share.listArtifacts(t);
2046
- c.value = y.projects || [];
2069
+ const t = ((i = o.value) == null ? void 0 : i.language) || null, p = await $.share.listArtifacts(t);
2070
+ u.value = p.projects || [];
2047
2071
  } catch (t) {
2048
- T.value = t.message || "Failed to load artifacts", P.value = "error";
2072
+ L.value = t.message || "Failed to load artifacts", P.value = "error";
2049
2073
  } finally {
2050
2074
  z.value = !1;
2051
2075
  }
2052
2076
  }
2053
2077
  }
2054
- async function Lt(i) {
2055
- var y, U;
2056
- if (!r.value || !$.share) return;
2057
- const t = (y = i.project) == null ? void 0 : y.uuid;
2078
+ async function Et(i) {
2079
+ var p, F;
2080
+ if (!o.value || !$.share) return;
2081
+ const t = (p = i.project) == null ? void 0 : p.uuid;
2058
2082
  if (t) {
2059
- P.value = "loading", T.value = "";
2083
+ P.value = "loading", L.value = "";
2060
2084
  try {
2061
- const Z = await $.share.updateArtifact(t, r.value);
2062
- Q.value = Z.url || "", w.value = null, B.value = !0, le.value = ((U = i.project) == null ? void 0 : U.name) || "Untitled", P.value = "success";
2063
- } catch (Z) {
2064
- T.value = Z.message || "Failed to update artifact", P.value = "error";
2085
+ const J = await $.share.updateArtifact(t, o.value);
2086
+ Q.value = J.url || "", w.value = null, B.value = !0, le.value = ((F = i.project) == null ? void 0 : F.name) || "Untitled", P.value = "success";
2087
+ } catch (J) {
2088
+ L.value = J.message || "Failed to update artifact", P.value = "error";
2065
2089
  }
2066
2090
  }
2067
2091
  }
2068
- async function Tt() {
2092
+ async function Bt() {
2069
2093
  if (Q.value)
2070
2094
  try {
2071
- await navigator.clipboard.writeText(Q.value), o.value = !0, setTimeout(() => {
2072
- o.value = !1;
2095
+ await navigator.clipboard.writeText(Q.value), r.value = !0, setTimeout(() => {
2096
+ r.value = !1;
2073
2097
  }, 2e3);
2074
2098
  } catch (i) {
2075
2099
  console.error("Failed to copy link:", i);
2076
2100
  }
2077
2101
  }
2078
- function Pt() {
2102
+ function St() {
2079
2103
  A.value && window.open(A.value, "_blank");
2080
2104
  }
2081
- function At() {
2082
- Y.value && E.value && (Y.value.style.transform = `translateY(-${E.value.scrollTop}px)`);
2105
+ function zt() {
2106
+ Y.value && S.value && (Y.value.style.transform = `translateY(-${S.value.scrollTop}px)`);
2083
2107
  }
2084
- function Ht() {
2085
- J.value = !J.value;
2108
+ function Vt() {
2109
+ X.value = !X.value;
2086
2110
  }
2087
- function Ke(i) {
2088
- k.value = !0, F(i), J.value = !1;
2111
+ function Ge(i) {
2112
+ k.value = !0, I(i), X.value = !1;
2089
2113
  }
2090
- function St() {
2091
- const i = O.value - 1;
2092
- i >= 0 && F(u.value[i]);
2114
+ function It() {
2115
+ const i = U.value - 1;
2116
+ i >= 0 && I(d.value[i]);
2093
2117
  }
2094
- function Bt() {
2095
- const i = O.value + 1;
2096
- i < u.value.length && F(u.value[i]);
2118
+ function Ft() {
2119
+ const i = U.value + 1;
2120
+ i < d.value.length && I(d.value[i]);
2097
2121
  }
2098
- function Ye(i) {
2122
+ function et(i) {
2099
2123
  const t = document.querySelector(".artifactuse-panel__nav");
2100
- t && !t.contains(i.target) && (J.value = !1);
2124
+ t && !t.contains(i.target) && (X.value = !1);
2101
2125
  }
2102
- let we = null;
2103
- function Et(i) {
2104
- we = {
2126
+ let be = null;
2127
+ function Rt(i) {
2128
+ be = {
2105
2129
  startX: i.clientX,
2106
- startWidth: C.value
2107
- }, document.addEventListener("mousemove", Qe), document.addEventListener("mouseup", Fe), document.body.style.cursor = "ew-resize", document.body.style.userSelect = "none", document.querySelectorAll("iframe").forEach((y) => y.style.pointerEvents = "none");
2130
+ startWidth: b.value
2131
+ }, document.addEventListener("mousemove", tt), document.addEventListener("mouseup", qe), document.body.style.cursor = "ew-resize", document.body.style.userSelect = "none", document.querySelectorAll("iframe").forEach((p) => p.style.pointerEvents = "none");
2108
2132
  }
2109
- function Qe(i) {
2110
- if (!we) return;
2111
- const t = window.innerWidth, U = (we.startX - i.clientX) / t * 100, Z = we.startWidth + U;
2112
- C.value = Math.min(Math.max(Z, 25), 75), _("resize", { width: C.value });
2133
+ function tt(i) {
2134
+ if (!be) return;
2135
+ const t = window.innerWidth, F = (be.startX - i.clientX) / t * 100, J = be.startWidth + F;
2136
+ b.value = Math.min(Math.max(J, 25), 75), _("resize", { width: b.value });
2113
2137
  }
2114
- function Fe() {
2115
- const i = we !== null;
2116
- we = null, document.removeEventListener("mousemove", Qe), document.removeEventListener("mouseup", Fe), document.body.style.cursor = "", document.body.style.userSelect = "", document.querySelectorAll("iframe").forEach((y) => y.style.pointerEvents = ""), i && _("resize", { width: C.value });
2138
+ function qe() {
2139
+ const i = be !== null;
2140
+ be = null, document.removeEventListener("mousemove", tt), document.removeEventListener("mouseup", qe), document.body.style.cursor = "", document.body.style.userSelect = "", document.querySelectorAll("iframe").forEach((p) => p.style.pointerEvents = ""), i && _("resize", { width: b.value });
2117
2141
  }
2118
- let Me = null;
2119
- function zt(i) {
2142
+ let Le = null;
2143
+ function qt(i) {
2120
2144
  if (!W.value) return;
2121
2145
  const t = W.value.getBoundingClientRect();
2122
- Me = {
2146
+ Le = {
2123
2147
  startX: i.clientX,
2124
- startPosition: I.value,
2148
+ startPosition: V.value,
2125
2149
  contentLeft: t.left,
2126
2150
  contentWidth: t.width
2127
- }, document.addEventListener("mousemove", Ge), document.addEventListener("mouseup", Ve), document.body.style.cursor = "col-resize", document.body.style.userSelect = "none", document.querySelectorAll("iframe").forEach((U) => U.style.pointerEvents = "none");
2151
+ }, document.addEventListener("mousemove", at), document.addEventListener("mouseup", Oe), document.body.style.cursor = "col-resize", document.body.style.userSelect = "none", document.querySelectorAll("iframe").forEach((F) => F.style.pointerEvents = "none");
2128
2152
  }
2129
- function Ge(i) {
2130
- if (!Me) return;
2131
- const y = (i.clientX - Me.contentLeft) / Me.contentWidth * 100;
2132
- I.value = Math.min(Math.max(y, 20), 80);
2133
- }
2134
- function Ve() {
2135
- Me = null, document.removeEventListener("mousemove", Ge), document.removeEventListener("mouseup", Ve), document.body.style.cursor = "", document.body.style.userSelect = "", document.querySelectorAll("iframe").forEach((t) => t.style.pointerEvents = "");
2136
- }
2137
- return de(r, (i, t) => {
2138
- i && (t && t.isPreviewable !== i.isPreviewable && (f.value = !0, setTimeout(() => {
2139
- f.value = !1;
2140
- }, 150)), (!t || i.id !== t.id) && (ht(), oe.value = !0, gt()), (!t || i.id !== t.id || i.code !== t.code) && (Te(), m.viewMode === "edit" && (!t || i.id !== t.id ? be(() => We()) : fe && fe.setCode(i.code || "")), clearTimeout(pe), pe = setTimeout(() => {
2141
- j.value && i.isPreviewable && $.bridge.loadArtifact(i);
2153
+ function at(i) {
2154
+ if (!Le) return;
2155
+ const p = (i.clientX - Le.contentLeft) / Le.contentWidth * 100;
2156
+ V.value = Math.min(Math.max(p, 20), 80);
2157
+ }
2158
+ function Oe() {
2159
+ Le = null, document.removeEventListener("mousemove", at), document.removeEventListener("mouseup", Oe), document.body.style.cursor = "", document.body.style.userSelect = "", document.querySelectorAll("iframe").forEach((t) => t.style.pointerEvents = "");
2160
+ }
2161
+ return de(o, (i, t) => {
2162
+ i && (t && t.isPreviewable !== i.isPreviewable && (m.value = !0, setTimeout(() => {
2163
+ m.value = !1;
2164
+ }, 150)), (!t || i.id !== t.id) && (kt(), oe.value = !0, xt()), (!t || i.id !== t.id || i.code !== t.code) && (Ae(), f.viewMode === "edit" && (!t || i.id !== t.id ? xe(() => Ze()) : fe && fe.setCode(i.code || "")), clearTimeout(pe), pe = setTimeout(() => {
2165
+ N.value && i.isPreviewable && $.bridge.loadArtifact(i);
2142
2166
  }, 500)));
2143
- }, { deep: !0 }), de(() => m.viewMode, (i) => {
2144
- (i === "code" || i === "split") && Te(), i === "edit" && be(() => We());
2145
- }), de(() => m.isPanelOpen, (i) => {
2146
- i && r.value && Te(), i || ze();
2147
- }), de(() => L.panelWidth, (i) => {
2148
- i !== void 0 && (C.value = Math.min(Math.max(i, 25), 75));
2149
- }), de(() => L.splitPosition, (i) => {
2150
- i !== void 0 && (I.value = Math.min(Math.max(i, 20), 80));
2151
- }), $e(() => {
2152
- $.on("ai:request", (i) => _("ai-request", i)), $.on("save:request", (i) => _("save", i)), $.on("export:complete", (i) => _("export", i)), document.addEventListener("click", Ye), m.isPanelOpen && r.value && Te();
2153
- }), De(() => {
2154
- Fe(), Ve(), ze(), document.removeEventListener("click", Ye), clearTimeout(pe), clearTimeout(ye);
2155
- }), (i, t) => (a(), xe(Ae, { name: "artifactuse-panel" }, {
2156
- default: He(() => [
2157
- g(m).isPanelOpen ? (a(), s("div", {
2167
+ }, { deep: !0 }), de(() => f.viewMode, (i) => {
2168
+ (i === "code" || i === "split") && Ae(), i === "edit" && xe(() => Ze());
2169
+ }), de(() => f.isPanelOpen, (i) => {
2170
+ i && o.value && Ae(), i || Fe();
2171
+ }), de(() => T.panelWidth, (i) => {
2172
+ i !== void 0 && (b.value = Math.min(Math.max(i, 25), 75));
2173
+ }), de(() => T.splitPosition, (i) => {
2174
+ i !== void 0 && (V.value = Math.min(Math.max(i, 20), 80));
2175
+ }), Me(() => {
2176
+ $.on("ai:request", (i) => _("ai-request", i)), $.on("save:request", (i) => _("save", i)), $.on("export:complete", (i) => _("export", i)), document.addEventListener("click", et), f.isPanelOpen && o.value && Ae();
2177
+ }), We(() => {
2178
+ qe(), Oe(), Fe(), document.removeEventListener("click", et), clearTimeout(pe), clearTimeout(ye);
2179
+ }), (i, t) => (a(), $e(Ee, { name: "artifactuse-panel" }, {
2180
+ default: Be(() => [
2181
+ y(f).isPanelOpen ? (a(), s("div", {
2158
2182
  key: 0,
2159
- class: N(["artifactuse-panel", {
2160
- "artifactuse-panel--fullscreen": g(m).isFullscreen,
2161
- "artifactuse-panel--list": !g(r) && g(S),
2162
- "artifactuse-panel--empty": !g(S)
2183
+ class: j(["artifactuse-panel", {
2184
+ "artifactuse-panel--fullscreen": y(f).isFullscreen,
2185
+ "artifactuse-panel--list": !y(o) && y(E) && !y(f).forceEmptyView,
2186
+ "artifactuse-panel--empty": !y(E) && !y(f).forceEmptyView
2163
2187
  }]),
2164
- style: Pe(g(m).isFullscreen ? void 0 : { width: `${ut.value}%` })
2188
+ style: He(y(f).isFullscreen ? void 0 : { width: `${ft.value}%` })
2165
2189
  }, [
2166
- g(m).isFullscreen ? v("", !0) : (a(), s("div", {
2190
+ y(f).isFullscreen ? v("", !0) : (a(), s("div", {
2167
2191
  key: 0,
2168
2192
  class: "artifactuse-panel__resize-handle",
2169
- onMousedown: me(Et, ["prevent"])
2193
+ onMousedown: he(Rt, ["prevent"])
2170
2194
  }, [...t[12] || (t[12] = [
2171
2195
  e("div", { class: "artifactuse-panel__resize-handle-line" }, null, -1)
2172
2196
  ])], 32)),
2173
- g(S) ? g(r) ? (a(), s(R, { key: 3 }, [
2174
- e("header", Ll, [
2175
- k.value ? (a(), s("button", {
2197
+ !y(E) || we.value ? (a(), s(R, { key: 1 }, [
2198
+ e("header", dl, [
2199
+ e("div", vl, [
2200
+ e("span", fl, [
2201
+ we.value ? (a(), s("svg", pl, [...t[13] || (t[13] = [
2202
+ 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),
2203
+ e("polyline", { points: "14 2 14 8 20 8" }, null, -1)
2204
+ ])])) : (a(), s("svg", _l, [...t[14] || (t[14] = [
2205
+ e("polyline", { points: "16 18 22 12 16 6" }, null, -1),
2206
+ e("polyline", { points: "8 6 2 12 8 18" }, null, -1)
2207
+ ])]))
2208
+ ]),
2209
+ e("div", hl, [
2210
+ e("span", ml, l(we.value ? "Artifact Viewer" : "Artifacts"), 1)
2211
+ ])
2212
+ ]),
2213
+ e("div", yl, [
2214
+ e("button", {
2215
+ class: "artifactuse-panel__action artifactuse-panel__action--close",
2216
+ title: "Close panel",
2217
+ onClick: t[0] || (t[0] = (...p) => y(g) && y(g)(...p))
2218
+ }, [...t[15] || (t[15] = [
2219
+ e("svg", {
2220
+ viewBox: "0 0 24 24",
2221
+ fill: "none",
2222
+ stroke: "currentColor",
2223
+ "stroke-width": "2"
2224
+ }, [
2225
+ e("line", {
2226
+ x1: "18",
2227
+ y1: "6",
2228
+ x2: "6",
2229
+ y2: "18"
2230
+ }),
2231
+ e("line", {
2232
+ x1: "6",
2233
+ y1: "6",
2234
+ x2: "18",
2235
+ y2: "18"
2236
+ })
2237
+ ], -1)
2238
+ ])])
2239
+ ])
2240
+ ]),
2241
+ e("div", gl, [
2242
+ t[16] || (t[16] = e("div", { class: "artifactuse-panel__empty-icon" }, [
2243
+ e("svg", {
2244
+ viewBox: "0 0 24 24",
2245
+ fill: "none",
2246
+ stroke: "currentColor",
2247
+ "stroke-width": "1.5"
2248
+ }, [
2249
+ 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" }),
2250
+ e("polyline", { points: "14 2 14 8 20 8" })
2251
+ ])
2252
+ ], -1)),
2253
+ e("h3", kl, l(we.value ? "No artifact selected" : "No artifacts yet"), 1),
2254
+ e("p", wl, l(we.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)
2255
+ ]),
2256
+ e("footer", bl, [
2257
+ G.value ? (a(), s("a", Cl, [...t[17] || (t[17] = [
2258
+ e("svg", {
2259
+ width: "16",
2260
+ height: "16",
2261
+ viewBox: "0 0 42 42",
2262
+ fill: "none",
2263
+ xmlns: "http://www.w3.org/2000/svg"
2264
+ }, [
2265
+ e("path", {
2266
+ d: "M16.6667 41.6673V10.4173C16.6667 9.86478 16.4472 9.33488 16.0565 8.94418C15.6658 8.55348 15.1359 8.33398 14.5833 8.33398H4.16667C3.0616 8.33398 2.00179 8.77297 1.22039 9.55437C0.438987 10.3358 0 11.3956 0 12.5007V37.5006C0 38.6057 0.438987 39.6655 1.22039 40.4469C2.00179 41.2283 3.0616 41.6673 4.16667 41.6673H29.1667C30.2717 41.6673 31.3315 41.2283 32.1129 40.4469C32.8943 39.6655 33.3333 38.6057 33.3333 37.5006V27.084C33.3333 26.5314 33.1138 26.0015 32.7231 25.6108C32.3324 25.2201 31.8025 25.0007 31.25 25.0007H0",
2267
+ fill: "#5F51C8"
2268
+ }),
2269
+ e("path", {
2270
+ d: "M39.5833 0H27.0833C25.9327 0 25 0.93274 25 2.08333V14.5833C25 15.7339 25.9327 16.6667 27.0833 16.6667H39.5833C40.7339 16.6667 41.6667 15.7339 41.6667 14.5833V2.08333C41.6667 0.93274 40.7339 0 39.5833 0Z",
2271
+ fill: "#695AE0"
2272
+ })
2273
+ ], -1),
2274
+ e("span", null, "Artifactuse", -1)
2275
+ ])])) : v("", !0)
2276
+ ])
2277
+ ], 64)) : !y(o) && !we.value ? (a(), s(R, { key: 2 }, [
2278
+ e("header", xl, [
2279
+ e("div", $l, [
2280
+ t[19] || (t[19] = e("span", { class: "artifactuse-panel__icon" }, [
2281
+ e("svg", {
2282
+ viewBox: "0 0 24 24",
2283
+ fill: "none",
2284
+ stroke: "currentColor",
2285
+ "stroke-width": "2"
2286
+ }, [
2287
+ e("polyline", { points: "16 18 22 12 16 6" }),
2288
+ e("polyline", { points: "8 6 2 12 8 18" })
2289
+ ])
2290
+ ], -1)),
2291
+ e("div", Ml, [
2292
+ t[18] || (t[18] = e("span", { class: "artifactuse-panel__name" }, "Artifacts", -1)),
2293
+ e("span", Tl, l(d.value.length) + " available", 1)
2294
+ ])
2295
+ ]),
2296
+ e("div", Ll, [
2297
+ e("button", {
2298
+ class: j(["artifactuse-panel__action", { "artifactuse-panel__action--loading": ee.value }]),
2299
+ disabled: ee.value,
2300
+ title: "Download all as ZIP",
2301
+ onClick: Tt
2302
+ }, [
2303
+ ee.value ? (a(), s("svg", Hl, [...t[21] || (t[21] = [
2304
+ e("circle", {
2305
+ cx: "12",
2306
+ cy: "12",
2307
+ r: "10",
2308
+ "stroke-dasharray": "32",
2309
+ "stroke-dashoffset": "32"
2310
+ }, null, -1)
2311
+ ])])) : (a(), s("svg", Al, [...t[20] || (t[20] = [
2312
+ e("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }, null, -1),
2313
+ e("polyline", { points: "7 10 12 15 17 10" }, null, -1),
2314
+ e("line", {
2315
+ x1: "12",
2316
+ y1: "15",
2317
+ x2: "12",
2318
+ y2: "3"
2319
+ }, null, -1)
2320
+ ])]))
2321
+ ], 10, Pl),
2322
+ e("button", {
2323
+ class: "artifactuse-panel__action artifactuse-panel__action--close",
2324
+ title: "Close panel",
2325
+ onClick: t[1] || (t[1] = (...p) => y(g) && y(g)(...p))
2326
+ }, [...t[22] || (t[22] = [
2327
+ e("svg", {
2328
+ viewBox: "0 0 24 24",
2329
+ fill: "none",
2330
+ stroke: "currentColor",
2331
+ "stroke-width": "2"
2332
+ }, [
2333
+ e("line", {
2334
+ x1: "18",
2335
+ y1: "6",
2336
+ x2: "6",
2337
+ y2: "18"
2338
+ }),
2339
+ e("line", {
2340
+ x1: "6",
2341
+ y1: "6",
2342
+ x2: "18",
2343
+ y2: "18"
2344
+ })
2345
+ ], -1)
2346
+ ])])
2347
+ ])
2348
+ ]),
2349
+ e("div", El, [
2350
+ e("div", Bl, [
2351
+ (a(!0), s(R, null, ve(d.value, (p, F) => (a(), s("button", {
2352
+ key: p.id,
2353
+ class: "artifactuse-panel__list-item",
2354
+ onClick: (J) => Ge(p)
2355
+ }, [
2356
+ e("span", {
2357
+ class: "artifactuse-panel__list-item-icon",
2358
+ innerHTML: Ie(p.language)
2359
+ }, null, 8, zl),
2360
+ e("div", Vl, [
2361
+ e("span", Il, l(p.title || "Untitled"), 1),
2362
+ e("span", Fl, [
2363
+ K(l(y(Se)(p.language)) + " ", 1),
2364
+ p.lineCount ? (a(), s(R, { key: 0 }, [
2365
+ K(" • " + l(p.lineCount) + " lines ", 1)
2366
+ ], 64)) : v("", !0)
2367
+ ])
2368
+ ]),
2369
+ t[23] || (t[23] = e("span", { class: "artifactuse-panel__list-item-arrow" }, [
2370
+ e("svg", {
2371
+ viewBox: "0 0 24 24",
2372
+ fill: "none",
2373
+ stroke: "currentColor",
2374
+ "stroke-width": "2"
2375
+ }, [
2376
+ e("polyline", { points: "9 18 15 12 9 6" })
2377
+ ])
2378
+ ], -1))
2379
+ ], 8, Sl))), 128))
2380
+ ])
2381
+ ]),
2382
+ e("footer", Rl, [
2383
+ G.value ? (a(), s("a", ql, [...t[24] || (t[24] = [
2384
+ e("svg", {
2385
+ width: "16",
2386
+ height: "16",
2387
+ viewBox: "0 0 42 42",
2388
+ fill: "none",
2389
+ xmlns: "http://www.w3.org/2000/svg"
2390
+ }, [
2391
+ e("path", {
2392
+ d: "M16.6667 41.6673V10.4173C16.6667 9.86478 16.4472 9.33488 16.0565 8.94418C15.6658 8.55348 15.1359 8.33398 14.5833 8.33398H4.16667C3.0616 8.33398 2.00179 8.77297 1.22039 9.55437C0.438987 10.3358 0 11.3956 0 12.5007V37.5006C0 38.6057 0.438987 39.6655 1.22039 40.4469C2.00179 41.2283 3.0616 41.6673 4.16667 41.6673H29.1667C30.2717 41.6673 31.3315 41.2283 32.1129 40.4469C32.8943 39.6655 33.3333 38.6057 33.3333 37.5006V27.084C33.3333 26.5314 33.1138 26.0015 32.7231 25.6108C32.3324 25.2201 31.8025 25.0007 31.25 25.0007H0",
2393
+ fill: "#5F51C8"
2394
+ }),
2395
+ e("path", {
2396
+ d: "M39.5833 0H27.0833C25.9327 0 25 0.93274 25 2.08333V14.5833C25 15.7339 25.9327 16.6667 27.0833 16.6667H39.5833C40.7339 16.6667 41.6667 15.7339 41.6667 14.5833V2.08333C41.6667 0.93274 40.7339 0 39.5833 0Z",
2397
+ fill: "#695AE0"
2398
+ })
2399
+ ], -1),
2400
+ e("span", null, "Artifactuse", -1)
2401
+ ])])) : v("", !0)
2402
+ ])
2403
+ ], 64)) : (a(), s(R, { key: 3 }, [
2404
+ e("header", Ol, [
2405
+ Te.value || k.value ? (a(), s("button", {
2176
2406
  key: 0,
2177
2407
  class: "artifactuse-panel__back",
2178
- title: "Back to list",
2179
- onClick: dt
2180
- }, [...t[24] || (t[24] = [
2408
+ title: Te.value ? "Browse artifacts" : "Back to list",
2409
+ onClick: ht
2410
+ }, [...t[25] || (t[25] = [
2181
2411
  e("svg", {
2182
2412
  viewBox: "0 0 24 24",
2183
2413
  fill: "none",
@@ -2186,30 +2416,30 @@ const Jt = { class: "artifactuse-card__icon" }, Xt = ["innerHTML"], Zt = { class
2186
2416
  }, [
2187
2417
  e("polyline", { points: "15 18 9 12 15 6" })
2188
2418
  ], -1)
2189
- ])])) : v("", !0),
2190
- e("div", Tl, [
2419
+ ])], 8, Ul)) : v("", !0),
2420
+ e("div", Dl, [
2191
2421
  e("span", {
2192
2422
  class: "artifactuse-panel__icon",
2193
2423
  innerHTML: te.value
2194
- }, null, 8, Pl),
2195
- e("div", Al, [
2196
- e("span", Hl, l(g(r).title || "Untitled"), 1),
2197
- e("span", Sl, [
2424
+ }, null, 8, Nl),
2425
+ e("div", jl, [
2426
+ e("span", Wl, l(y(o).title || "Untitled"), 1),
2427
+ e("span", Jl, [
2198
2428
  K(l(D.value) + " ", 1),
2199
- g(r).lineCount ? (a(), s(R, { key: 0 }, [
2200
- K(" • " + l(g(r).lineCount) + " lines ", 1)
2429
+ y(o).lineCount ? (a(), s(R, { key: 0 }, [
2430
+ K(" • " + l(y(o).lineCount) + " lines ", 1)
2201
2431
  ], 64)) : v("", !0)
2202
2432
  ])
2203
2433
  ])
2204
2434
  ]),
2205
- e("div", Bl, [
2206
- !g(r).tabs || g(r).tabs.includes("preview") ? (a(), s("button", {
2435
+ e("div", Xl, [
2436
+ !y(o).tabs || y(o).tabs.includes("preview") ? (a(), s("button", {
2207
2437
  key: 0,
2208
- class: N(["artifactuse-panel__tab", { "artifactuse-panel__tab--active": g(m).viewMode === "preview" }]),
2209
- disabled: !g(r).isPreviewable,
2438
+ class: j(["artifactuse-panel__tab", { "artifactuse-panel__tab--active": y(f).viewMode === "preview" }]),
2439
+ disabled: !y(o).isPreviewable,
2210
2440
  title: "Preview",
2211
- onClick: t[2] || (t[2] = (y) => g(p)("preview"))
2212
- }, [...t[25] || (t[25] = [
2441
+ onClick: t[2] || (t[2] = (p) => y(h)("preview"))
2442
+ }, [...t[26] || (t[26] = [
2213
2443
  e("svg", {
2214
2444
  viewBox: "0 0 24 24",
2215
2445
  fill: "none",
@@ -2223,13 +2453,13 @@ const Jt = { class: "artifactuse-card__icon" }, Xt = ["innerHTML"], Zt = { class
2223
2453
  r: "3"
2224
2454
  })
2225
2455
  ], -1)
2226
- ])], 10, El)) : v("", !0),
2227
- !g(r).tabs || g(r).tabs.includes("code") ? (a(), s("button", {
2456
+ ])], 10, Zl)) : v("", !0),
2457
+ !y(o).tabs || y(o).tabs.includes("code") ? (a(), s("button", {
2228
2458
  key: 1,
2229
- class: N(["artifactuse-panel__tab", { "artifactuse-panel__tab--active": g(m).viewMode === "code" }]),
2459
+ class: j(["artifactuse-panel__tab", { "artifactuse-panel__tab--active": y(f).viewMode === "code" }]),
2230
2460
  title: "Code",
2231
- onClick: t[3] || (t[3] = (y) => g(p)("code"))
2232
- }, [...t[26] || (t[26] = [
2461
+ onClick: t[3] || (t[3] = (p) => y(h)("code"))
2462
+ }, [...t[27] || (t[27] = [
2233
2463
  e("svg", {
2234
2464
  viewBox: "0 0 24 24",
2235
2465
  fill: "none",
@@ -2240,13 +2470,13 @@ const Jt = { class: "artifactuse-card__icon" }, Xt = ["innerHTML"], Zt = { class
2240
2470
  e("polyline", { points: "8 6 2 12 8 18" })
2241
2471
  ], -1)
2242
2472
  ])], 2)) : v("", !0),
2243
- !g(r).tabs || g(r).tabs.includes("split") ? (a(), s("button", {
2473
+ !y(o).tabs || y(o).tabs.includes("split") ? (a(), s("button", {
2244
2474
  key: 2,
2245
- class: N(["artifactuse-panel__tab", { "artifactuse-panel__tab--active": g(m).viewMode === "split" }]),
2246
- disabled: !g(r).isPreviewable,
2475
+ class: j(["artifactuse-panel__tab", { "artifactuse-panel__tab--active": y(f).viewMode === "split" }]),
2476
+ disabled: !y(o).isPreviewable,
2247
2477
  title: "Split view",
2248
- onClick: t[4] || (t[4] = (y) => g(p)("split"))
2249
- }, [...t[27] || (t[27] = [
2478
+ onClick: t[4] || (t[4] = (p) => y(h)("split"))
2479
+ }, [...t[28] || (t[28] = [
2250
2480
  e("svg", {
2251
2481
  viewBox: "0 0 24 24",
2252
2482
  fill: "none",
@@ -2268,13 +2498,13 @@ const Jt = { class: "artifactuse-card__icon" }, Xt = ["innerHTML"], Zt = { class
2268
2498
  y2: "21"
2269
2499
  })
2270
2500
  ], -1)
2271
- ])], 10, zl)) : v("", !0),
2272
- g(r).tabs && g(r).tabs.includes("edit") && Le.value ? (a(), s("button", {
2501
+ ])], 10, Kl)) : v("", !0),
2502
+ y(o).tabs && y(o).tabs.includes("edit") && Pe.value ? (a(), s("button", {
2273
2503
  key: 3,
2274
- class: N(["artifactuse-panel__tab", { "artifactuse-panel__tab--active": g(m).viewMode === "edit" }]),
2504
+ class: j(["artifactuse-panel__tab", { "artifactuse-panel__tab--active": y(f).viewMode === "edit" }]),
2275
2505
  title: "Edit",
2276
- onClick: t[5] || (t[5] = (y) => g(p)("edit"))
2277
- }, [...t[28] || (t[28] = [
2506
+ onClick: t[5] || (t[5] = (p) => y(h)("edit"))
2507
+ }, [...t[29] || (t[29] = [
2278
2508
  e("svg", {
2279
2509
  viewBox: "0 0 24 24",
2280
2510
  fill: "none",
@@ -2286,13 +2516,13 @@ const Jt = { class: "artifactuse-card__icon" }, Xt = ["innerHTML"], Zt = { class
2286
2516
  ], -1)
2287
2517
  ])], 2)) : v("", !0)
2288
2518
  ]),
2289
- e("div", Il, [
2290
- g(m).viewMode === "edit" ? (a(), s("button", {
2519
+ e("div", Yl, [
2520
+ y(f).viewMode === "edit" ? (a(), s("button", {
2291
2521
  key: 0,
2292
2522
  class: "artifactuse-panel__action artifactuse-panel__action--save",
2293
2523
  title: "Save",
2294
- onClick: _t
2295
- }, [...t[29] || (t[29] = [
2524
+ onClick: wt
2525
+ }, [...t[30] || (t[30] = [
2296
2526
  e("svg", {
2297
2527
  viewBox: "0 0 24 24",
2298
2528
  fill: "none",
@@ -2306,10 +2536,10 @@ const Jt = { class: "artifactuse-card__icon" }, Xt = ["innerHTML"], Zt = { class
2306
2536
  ])])) : v("", !0),
2307
2537
  e("button", {
2308
2538
  class: "artifactuse-panel__action",
2309
- title: g(m).isFullscreen ? "Exit fullscreen" : "Fullscreen",
2310
- onClick: t[6] || (t[6] = (...y) => g(n) && g(n)(...y))
2539
+ title: y(f).isFullscreen ? "Exit fullscreen" : "Fullscreen",
2540
+ onClick: t[6] || (t[6] = (...p) => y(n) && y(n)(...p))
2311
2541
  }, [
2312
- g(m).isFullscreen ? (a(), s("svg", Rl, [...t[31] || (t[31] = [
2542
+ y(f).isFullscreen ? (a(), s("svg", en, [...t[32] || (t[32] = [
2313
2543
  e("polyline", { points: "4 14 10 14 10 20" }, null, -1),
2314
2544
  e("polyline", { points: "20 10 14 10 14 4" }, null, -1),
2315
2545
  e("line", {
@@ -2324,7 +2554,7 @@ const Jt = { class: "artifactuse-card__icon" }, Xt = ["innerHTML"], Zt = { class
2324
2554
  x2: "10",
2325
2555
  y2: "14"
2326
2556
  }, null, -1)
2327
- ])])) : (a(), s("svg", Vl, [...t[30] || (t[30] = [
2557
+ ])])) : (a(), s("svg", Gl, [...t[31] || (t[31] = [
2328
2558
  e("polyline", { points: "15 3 21 3 21 9" }, null, -1),
2329
2559
  e("polyline", { points: "9 21 3 21 3 15" }, null, -1),
2330
2560
  e("line", {
@@ -2340,12 +2570,12 @@ const Jt = { class: "artifactuse-card__icon" }, Xt = ["innerHTML"], Zt = { class
2340
2570
  y2: "14"
2341
2571
  }, null, -1)
2342
2572
  ])]))
2343
- ], 8, Fl),
2573
+ ], 8, Ql),
2344
2574
  e("button", {
2345
2575
  class: "artifactuse-panel__action artifactuse-panel__action--close",
2346
2576
  title: "Close panel",
2347
- onClick: t[7] || (t[7] = (...y) => g(h) && g(h)(...y))
2348
- }, [...t[32] || (t[32] = [
2577
+ onClick: t[7] || (t[7] = (...p) => y(g) && y(g)(...p))
2578
+ }, [...t[33] || (t[33] = [
2349
2579
  e("svg", {
2350
2580
  viewBox: "0 0 24 24",
2351
2581
  fill: "none",
@@ -2368,37 +2598,80 @@ const Jt = { class: "artifactuse-card__icon" }, Xt = ["innerHTML"], Zt = { class
2368
2598
  ])])
2369
2599
  ])
2370
2600
  ]),
2601
+ Te.value && Je.value.length > 0 ? (a(), s("div", tn, [
2602
+ e("div", an, [
2603
+ (a(!0), s(R, null, ve(Je.value, (p) => {
2604
+ var F;
2605
+ return a(), s("button", {
2606
+ key: p.id,
2607
+ class: j(["artifactuse-panel__file-tab", { "artifactuse-panel__file-tab--active": p.id === ((F = y(o)) == null ? void 0 : F.id) }]),
2608
+ onClick: (J) => pt(p)
2609
+ }, [
2610
+ e("span", {
2611
+ class: "artifactuse-panel__file-tab-icon",
2612
+ innerHTML: Ie(p.language)
2613
+ }, null, 8, ln),
2614
+ e("span", nn, l(p.title || "Untitled"), 1),
2615
+ e("button", {
2616
+ class: "artifactuse-panel__file-tab-close",
2617
+ title: "Close tab",
2618
+ onClick: he((J) => _t(p.id), ["stop"])
2619
+ }, [...t[34] || (t[34] = [
2620
+ e("svg", {
2621
+ viewBox: "0 0 24 24",
2622
+ fill: "none",
2623
+ stroke: "currentColor",
2624
+ "stroke-width": "2"
2625
+ }, [
2626
+ e("line", {
2627
+ x1: "18",
2628
+ y1: "6",
2629
+ x2: "6",
2630
+ y2: "18"
2631
+ }),
2632
+ e("line", {
2633
+ x1: "6",
2634
+ y1: "6",
2635
+ x2: "18",
2636
+ y2: "18"
2637
+ })
2638
+ ], -1)
2639
+ ])], 8, on)
2640
+ ], 10, sn);
2641
+ }), 128))
2642
+ ])
2643
+ ])) : v("", !0),
2371
2644
  e("div", {
2372
2645
  ref_key: "contentRef",
2373
2646
  ref: W,
2374
- class: N(["artifactuse-panel__content", [
2375
- `artifactuse-panel__content--${g(m).viewMode}`,
2376
- { "artifactuse-panel__content--transitioning": f.value }
2647
+ class: j(["artifactuse-panel__content", [
2648
+ `artifactuse-panel__content--${y(f).viewMode}`,
2649
+ { "artifactuse-panel__content--transitioning": m.value }
2377
2650
  ]])
2378
2651
  }, [
2379
- f.value ? (a(), s("div", ql, [...t[33] || (t[33] = [
2652
+ m.value ? (a(), s("div", rn, [...t[35] || (t[35] = [
2380
2653
  e("div", { class: "artifactuse-panel__spinner" }, null, -1)
2381
2654
  ])])) : v("", !0),
2382
- g(m).viewMode === "preview" || g(m).viewMode === "split" ? (a(), s("div", {
2655
+ y(f).viewMode === "preview" || y(f).viewMode === "split" ? (a(), s("div", {
2383
2656
  key: 1,
2384
2657
  class: "artifactuse-panel__preview",
2385
- style: Pe(g(m).viewMode === "split" ? { width: `${I.value}%` } : void 0)
2658
+ style: He(y(f).viewMode === "split" ? { width: `${V.value}%` } : void 0)
2386
2659
  }, [
2387
- oe.value && A.value ? (a(), s("div", Ol, [...t[34] || (t[34] = [
2660
+ oe.value && A.value ? (a(), s("div", cn, [...t[36] || (t[36] = [
2388
2661
  e("div", { class: "artifactuse-panel__spinner" }, null, -1)
2389
2662
  ])])) : v("", !0),
2390
2663
  A.value ? (a(), s("iframe", {
2391
2664
  key: 1,
2392
2665
  ref_key: "iframeRef",
2393
- ref: j,
2666
+ ref: N,
2394
2667
  src: A.value,
2395
- class: N(["artifactuse-panel__iframe", { "artifactuse-panel__iframe--loading": oe.value }]),
2668
+ class: j(["artifactuse-panel__iframe", { "artifactuse-panel__iframe--loading": oe.value }]),
2396
2669
  sandbox: "allow-scripts allow-same-origin allow-forms allow-popups allow-modals allow-downloads allow-top-navigation-by-user-activation",
2397
2670
  allow: "camera; microphone; fullscreen; geolocation; display-capture; autoplay; clipboard-write",
2398
- onLoad: mt,
2399
- onError: yt
2400
- }, null, 42, Ul)) : (a(), s("div", Dl, [
2401
- t[35] || (t[35] = e("svg", {
2671
+ onLoad: bt,
2672
+ onError: Ct
2673
+ }, null, 42, un)) : (a(), s("div", dn, [
2674
+ t[37] || (t[37] = e("svg", {
2402
2675
  viewBox: "0 0 24 24",
2403
2676
  fill: "none",
2404
2677
  stroke: "currentColor",
@@ -2416,22 +2689,22 @@ const Jt = { class: "artifactuse-card__icon" }, Xt = ["innerHTML"], Zt = { class
2416
2689
  e("p", null, "Preview not available for " + l(D.value), 1)
2417
2690
  ]))
2418
2691
  ], 4)) : v("", !0),
2419
- at(e("div", {
2692
+ lt(e("div", {
2420
2693
  class: "artifactuse-panel__code",
2421
- style: Pe(g(m).viewMode === "split" ? { width: `${100 - I.value}%` } : void 0)
2694
+ style: He(y(f).viewMode === "split" ? { width: `${100 - V.value}%` } : void 0)
2422
2695
  }, [
2423
- g(m).viewMode === "split" ? (a(), s("div", {
2696
+ y(f).viewMode === "split" ? (a(), s("div", {
2424
2697
  key: 0,
2425
2698
  class: "artifactuse-panel__split-handle",
2426
- onMousedown: me(zt, ["prevent"])
2427
- }, [...t[36] || (t[36] = [
2699
+ onMousedown: he(qt, ["prevent"])
2700
+ }, [...t[38] || (t[38] = [
2428
2701
  e("div", { class: "artifactuse-panel__split-handle-line" }, null, -1)
2429
2702
  ])], 32)) : v("", !0),
2430
2703
  e("div", {
2431
2704
  class: "artifactuse-panel__code-scroll",
2432
2705
  ref_key: "codeScrollRef",
2433
- ref: E,
2434
- onScroll: At
2706
+ ref: S,
2707
+ onScroll: zt
2435
2708
  }, [
2436
2709
  e("div", {
2437
2710
  class: "artifactuse-panel__line-numbers",
@@ -2439,32 +2712,32 @@ const Jt = { class: "artifactuse-card__icon" }, Xt = ["innerHTML"], Zt = { class
2439
2712
  ref: Y
2440
2713
  }, null, 512),
2441
2714
  e("pre", {
2442
- class: N(["artifactuse-panel__code-block", `language-${ae.value}`])
2715
+ class: j(["artifactuse-panel__code-block", `language-${ae.value}`])
2443
2716
  }, [
2444
2717
  (a(), s("code", {
2445
2718
  ref_key: "codeRef",
2446
- ref: q,
2447
- key: g(r).id,
2448
- class: N(`language-${ae.value}`)
2719
+ ref: O,
2720
+ key: y(o).id,
2721
+ class: j(`language-${ae.value}`)
2449
2722
  }, null, 2))
2450
2723
  ], 2)
2451
2724
  ], 544)
2452
2725
  ], 4), [
2453
- [st, g(m).viewMode === "code" || g(m).viewMode === "split"]
2726
+ [nt, y(f).viewMode === "code" || y(f).viewMode === "split"]
2454
2727
  ]),
2455
- at(e("div", jl, [
2728
+ lt(e("div", vn, [
2456
2729
  e("div", {
2457
2730
  ref_key: "editorContainerRef",
2458
2731
  ref: ie,
2459
2732
  class: "artifactuse-panel__editor-container"
2460
2733
  }, null, 512)
2461
2734
  ], 512), [
2462
- [st, g(m).viewMode === "edit"]
2735
+ [nt, y(f).viewMode === "edit"]
2463
2736
  ])
2464
2737
  ], 2),
2465
- e("footer", Nl, [
2466
- e("div", Wl, [
2467
- G.value ? (a(), s("a", Jl, [...t[37] || (t[37] = [
2738
+ e("footer", fn, [
2739
+ e("div", pn, [
2740
+ G.value ? (a(), s("a", _n, [...t[39] || (t[39] = [
2468
2741
  e("svg", {
2469
2742
  width: "16",
2470
2743
  height: "16",
@@ -2483,17 +2756,17 @@ const Jt = { class: "artifactuse-card__icon" }, Xt = ["innerHTML"], Zt = { class
2483
2756
  ], -1),
2484
2757
  e("span", null, "Artifactuse", -1)
2485
2758
  ])])) : v("", !0),
2486
- g(r).size ? (a(), s("span", Xl, l(g(nt)(g(r).size)), 1)) : v("", !0)
2759
+ y(o).size ? (a(), s("span", hn, l(y(ct)(y(o).size)), 1)) : v("", !0)
2487
2760
  ]),
2488
- e("div", Zl, [
2761
+ e("div", mn, [
2489
2762
  e("button", {
2490
- class: N(["artifactuse-panel__footer-action", { "artifactuse-panel__footer-action--success": X.value }]),
2491
- title: X.value ? "Copied!" : "Copy code",
2492
- onClick: kt
2763
+ class: j(["artifactuse-panel__footer-action", { "artifactuse-panel__footer-action--success": Z.value }]),
2764
+ title: Z.value ? "Copied!" : "Copy code",
2765
+ onClick: $t
2493
2766
  }, [
2494
- X.value ? (a(), s("svg", Ql, [...t[39] || (t[39] = [
2767
+ Z.value ? (a(), s("svg", kn, [...t[41] || (t[41] = [
2495
2768
  e("polyline", { points: "20 6 9 17 4 12" }, null, -1)
2496
- ])])) : (a(), s("svg", Yl, [...t[38] || (t[38] = [
2769
+ ])])) : (a(), s("svg", gn, [...t[40] || (t[40] = [
2497
2770
  e("rect", {
2498
2771
  x: "9",
2499
2772
  y: "9",
@@ -2504,12 +2777,12 @@ const Jt = { class: "artifactuse-card__icon" }, Xt = ["innerHTML"], Zt = { class
2504
2777
  }, null, -1),
2505
2778
  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)
2506
2779
  ])]))
2507
- ], 10, Kl),
2780
+ ], 10, yn),
2508
2781
  e("button", {
2509
2782
  class: "artifactuse-panel__footer-action",
2510
2783
  title: "Download file",
2511
- onClick: wt
2512
- }, [...t[40] || (t[40] = [
2784
+ onClick: Mt
2785
+ }, [...t[42] || (t[42] = [
2513
2786
  e("svg", {
2514
2787
  viewBox: "0 0 24 24",
2515
2788
  fill: "none",
@@ -2526,12 +2799,12 @@ const Jt = { class: "artifactuse-card__icon" }, Xt = ["innerHTML"], Zt = { class
2526
2799
  })
2527
2800
  ], -1)
2528
2801
  ])]),
2529
- ce.value ? (a(), s("div", Gl, [
2802
+ ce.value ? (a(), s("div", wn, [
2530
2803
  e("button", {
2531
2804
  class: "artifactuse-panel__footer-action",
2532
2805
  title: "Share",
2533
- onClick: bt
2534
- }, [...t[41] || (t[41] = [
2806
+ onClick: Lt
2807
+ }, [...t[43] || (t[43] = [
2535
2808
  e("svg", {
2536
2809
  viewBox: "0 0 24 24",
2537
2810
  fill: "none",
@@ -2567,15 +2840,15 @@ const Jt = { class: "artifactuse-card__icon" }, Xt = ["innerHTML"], Zt = { class
2567
2840
  })
2568
2841
  ], -1)
2569
2842
  ])]),
2570
- Be(Ae, { name: "artifactuse-popup" }, {
2571
- default: He(() => [
2572
- re.value ? (a(), s("div", en, [
2573
- e("div", tn, [
2574
- e("span", an, l(P.value === "success" ? le.value ? "Artifact updated!" : "Link created!" : P.value === "update-list" ? "Update saved artifact" : "Share Artifact"), 1),
2843
+ ze(Ee, { name: "artifactuse-popup" }, {
2844
+ default: Be(() => [
2845
+ re.value ? (a(), s("div", bn, [
2846
+ e("div", Cn, [
2847
+ e("span", xn, l(P.value === "success" ? le.value ? "Artifact updated!" : "Link created!" : P.value === "update-list" ? "Update saved artifact" : "Share Artifact"), 1),
2575
2848
  e("button", {
2576
2849
  class: "artifactuse-share-popup__close",
2577
- onClick: xt
2578
- }, [...t[42] || (t[42] = [
2850
+ onClick: Pt
2851
+ }, [...t[44] || (t[44] = [
2579
2852
  e("svg", {
2580
2853
  viewBox: "0 0 24 24",
2581
2854
  fill: "none",
@@ -2597,29 +2870,29 @@ const Jt = { class: "artifactuse-card__icon" }, Xt = ["innerHTML"], Zt = { class
2597
2870
  ], -1)
2598
2871
  ])])
2599
2872
  ]),
2600
- e("div", sn, [
2601
- P.value === "loading" ? (a(), s("div", ln, [...t[43] || (t[43] = [
2873
+ e("div", $n, [
2874
+ P.value === "loading" ? (a(), s("div", Mn, [...t[45] || (t[45] = [
2602
2875
  e("div", { class: "artifactuse-share-popup__spinner" }, null, -1),
2603
2876
  e("p", { class: "artifactuse-share-popup__loading-text" }, "Creating link...", -1)
2604
- ])])) : P.value === "error" ? (a(), s("div", nn, [
2605
- e("div", on, [
2606
- e("p", rn, l(T.value), 1)
2877
+ ])])) : P.value === "error" ? (a(), s("div", Tn, [
2878
+ e("div", Ln, [
2879
+ e("p", Pn, l(L.value), 1)
2607
2880
  ]),
2608
- e("div", cn, [
2881
+ e("div", An, [
2609
2882
  e("button", {
2610
2883
  class: "artifactuse-share-popup__btn artifactuse-share-popup__btn--secondary",
2611
- onClick: t[8] || (t[8] = (y) => P.value = "options")
2884
+ onClick: t[8] || (t[8] = (p) => P.value = "options")
2612
2885
  }, " Back "),
2613
2886
  e("button", {
2614
2887
  class: "artifactuse-share-popup__btn artifactuse-share-popup__btn--primary",
2615
- onClick: $t
2888
+ onClick: At
2616
2889
  }, " Retry ")
2617
2890
  ])
2618
- ])) : P.value === "options" ? (a(), s("div", un, [
2891
+ ])) : P.value === "options" ? (a(), s("div", Hn, [
2619
2892
  e("button", {
2620
2893
  class: "artifactuse-share-popup__option",
2621
- onClick: Xe
2622
- }, [...t[44] || (t[44] = [
2894
+ onClick: Ye
2895
+ }, [...t[46] || (t[46] = [
2623
2896
  e("div", { class: "artifactuse-share-popup__option-icon" }, [
2624
2897
  e("svg", {
2625
2898
  viewBox: "0 0 24 24",
@@ -2638,8 +2911,8 @@ const Jt = { class: "artifactuse-card__icon" }, Xt = ["innerHTML"], Zt = { class
2638
2911
  ])]),
2639
2912
  e("button", {
2640
2913
  class: "artifactuse-share-popup__option",
2641
- onClick: Ze
2642
- }, [...t[45] || (t[45] = [
2914
+ onClick: Qe
2915
+ }, [...t[47] || (t[47] = [
2643
2916
  e("div", { class: "artifactuse-share-popup__option-icon" }, [
2644
2917
  e("svg", {
2645
2918
  viewBox: "0 0 24 24",
@@ -2659,8 +2932,8 @@ const Jt = { class: "artifactuse-card__icon" }, Xt = ["innerHTML"], Zt = { class
2659
2932
  ])]),
2660
2933
  e("button", {
2661
2934
  class: "artifactuse-share-popup__option",
2662
- onClick: Mt
2663
- }, [...t[46] || (t[46] = [
2935
+ onClick: Ht
2936
+ }, [...t[48] || (t[48] = [
2664
2937
  e("div", { class: "artifactuse-share-popup__option-icon" }, [
2665
2938
  e("svg", {
2666
2939
  viewBox: "0 0 24 24",
@@ -2678,29 +2951,29 @@ const Jt = { class: "artifactuse-card__icon" }, Xt = ["innerHTML"], Zt = { class
2678
2951
  e("p", { class: "artifactuse-share-popup__option-desc" }, "Replace an existing artifact")
2679
2952
  ], -1)
2680
2953
  ])])
2681
- ])) : P.value === "update-list" ? (a(), s("div", dn, [
2682
- z.value ? (a(), s("div", vn, [...t[47] || (t[47] = [
2954
+ ])) : P.value === "update-list" ? (a(), s("div", En, [
2955
+ z.value ? (a(), s("div", Bn, [...t[49] || (t[49] = [
2683
2956
  e("div", { class: "artifactuse-share-popup__spinner" }, null, -1),
2684
2957
  e("p", { class: "artifactuse-share-popup__loading-text" }, "Loading artifacts...", -1)
2685
- ])])) : c.value.length === 0 ? (a(), s("div", fn, " No saved artifacts of this type ")) : (a(), s("div", pn, [
2686
- (a(!0), s(R, null, ve(c.value, (y) => {
2687
- var U, Z, _e;
2958
+ ])])) : u.value.length === 0 ? (a(), s("div", Sn, " No saved artifacts of this type ")) : (a(), s("div", zn, [
2959
+ (a(!0), s(R, null, ve(u.value, (p) => {
2960
+ var F, J, me;
2688
2961
  return a(), s("button", {
2689
- key: ((U = y.project) == null ? void 0 : U.uuid) || y.id,
2962
+ key: ((F = p.project) == null ? void 0 : F.uuid) || p.id,
2690
2963
  class: "artifactuse-share-popup__artifact-item",
2691
- onClick: (ue) => Lt(y)
2964
+ onClick: (ue) => Et(p)
2692
2965
  }, [
2693
- e("span", _n, l(((Z = y.project) == null ? void 0 : Z.name) || "Untitled"), 1),
2694
- e("span", mn, l(Je((_e = y.project) == null ? void 0 : _e.created_at)), 1)
2695
- ], 8, hn);
2966
+ e("span", In, l(((J = p.project) == null ? void 0 : J.name) || "Untitled"), 1),
2967
+ e("span", Fn, l(Ke((me = p.project) == null ? void 0 : me.created_at)), 1)
2968
+ ], 8, Vn);
2696
2969
  }), 128))
2697
2970
  ])),
2698
2971
  e("button", {
2699
2972
  class: "artifactuse-share-popup__back-btn",
2700
- onClick: t[9] || (t[9] = (y) => P.value = "options")
2973
+ onClick: t[9] || (t[9] = (p) => P.value = "options")
2701
2974
  }, "Back")
2702
- ])) : P.value === "success" ? (a(), s("div", yn, [
2703
- t[50] || (t[50] = e("div", { class: "artifactuse-share-popup__success-icon" }, [
2975
+ ])) : P.value === "success" ? (a(), s("div", Rn, [
2976
+ t[52] || (t[52] = e("div", { class: "artifactuse-share-popup__success-icon" }, [
2704
2977
  e("svg", {
2705
2978
  viewBox: "0 0 24 24",
2706
2979
  fill: "none",
@@ -2710,21 +2983,21 @@ const Jt = { class: "artifactuse-card__icon" }, Xt = ["innerHTML"], Zt = { class
2710
2983
  e("polyline", { points: "20 6 9 17 4 12" })
2711
2984
  ])
2712
2985
  ], -1)),
2713
- e("div", gn, [
2986
+ e("div", qn, [
2714
2987
  e("input", {
2715
2988
  type: "text",
2716
2989
  class: "artifactuse-share-popup__link",
2717
2990
  value: Q.value,
2718
2991
  readonly: "",
2719
- onClick: t[10] || (t[10] = (y) => y.target.select())
2720
- }, null, 8, kn),
2992
+ onClick: t[10] || (t[10] = (p) => p.target.select())
2993
+ }, null, 8, On),
2721
2994
  e("button", {
2722
- class: N(["artifactuse-share-popup__copy-btn", { "artifactuse-share-popup__copy-btn--copied": o.value }]),
2723
- onClick: Tt
2724
- }, l(o.value ? "Copied!" : "Copy"), 3)
2995
+ class: j(["artifactuse-share-popup__copy-btn", { "artifactuse-share-popup__copy-btn--copied": r.value }]),
2996
+ onClick: Bt
2997
+ }, l(r.value ? "Copied!" : "Copy"), 3)
2725
2998
  ]),
2726
- w.value && !B.value ? (a(), s("div", wn, [
2727
- t[48] || (t[48] = e("span", { class: "artifactuse-share-popup__expiry-icon" }, [
2999
+ w.value && !B.value ? (a(), s("div", Un, [
3000
+ t[50] || (t[50] = e("span", { class: "artifactuse-share-popup__expiry-icon" }, [
2728
3001
  e("svg", {
2729
3002
  viewBox: "0 0 24 24",
2730
3003
  fill: "none",
@@ -2750,18 +3023,18 @@ const Jt = { class: "artifactuse-card__icon" }, Xt = ["innerHTML"], Zt = { class
2750
3023
  })
2751
3024
  ])
2752
3025
  ], -1)),
2753
- e("span", Cn, " Expires " + l(Je(w.value)), 1)
3026
+ e("span", Dn, " Expires " + l(Ke(w.value)), 1)
2754
3027
  ])) : v("", !0),
2755
- B.value ? v("", !0) : (a(), s("div", bn, [
2756
- t[49] || (t[49] = e("p", { class: "artifactuse-share-popup__save-prompt-text" }, "Keep it permanently?", -1)),
3028
+ B.value ? v("", !0) : (a(), s("div", Nn, [
3029
+ t[51] || (t[51] = e("p", { class: "artifactuse-share-popup__save-prompt-text" }, "Keep it permanently?", -1)),
2757
3030
  e("button", {
2758
3031
  class: "artifactuse-share-popup__save-prompt-btn",
2759
- onClick: Ze
3032
+ onClick: Qe
2760
3033
  }, " Save to account ")
2761
3034
  ]))
2762
3035
  ])) : v("", !0)
2763
3036
  ]),
2764
- t[51] || (t[51] = e("div", { class: "artifactuse-share-popup__footer" }, [
3037
+ t[53] || (t[53] = e("div", { class: "artifactuse-share-popup__footer" }, [
2765
3038
  e("a", {
2766
3039
  href: "https://artifactuse.com",
2767
3040
  target: "_blank",
@@ -2796,8 +3069,8 @@ const Jt = { class: "artifactuse-card__icon" }, Xt = ["innerHTML"], Zt = { class
2796
3069
  key: 1,
2797
3070
  class: "artifactuse-panel__footer-action",
2798
3071
  title: "Open in new tab",
2799
- onClick: Pt
2800
- }, [...t[52] || (t[52] = [
3072
+ onClick: St
3073
+ }, [...t[54] || (t[54] = [
2801
3074
  e("svg", {
2802
3075
  viewBox: "0 0 24 24",
2803
3076
  fill: "none",
@@ -2814,13 +3087,13 @@ const Jt = { class: "artifactuse-card__icon" }, Xt = ["innerHTML"], Zt = { class
2814
3087
  })
2815
3088
  ], -1)
2816
3089
  ])])) : v("", !0),
2817
- u.value.length > 1 ? (a(), s("div", xn, [
3090
+ !Te.value && d.value.length > 1 ? (a(), s("div", jn, [
2818
3091
  e("button", {
2819
3092
  class: "artifactuse-panel__nav-btn",
2820
- disabled: O.value <= 0,
3093
+ disabled: U.value <= 0,
2821
3094
  title: "Previous artifact",
2822
- onClick: St
2823
- }, [...t[53] || (t[53] = [
3095
+ onClick: It
3096
+ }, [...t[55] || (t[55] = [
2824
3097
  e("svg", {
2825
3098
  viewBox: "0 0 24 24",
2826
3099
  fill: "none",
@@ -2829,14 +3102,14 @@ const Jt = { class: "artifactuse-card__icon" }, Xt = ["innerHTML"], Zt = { class
2829
3102
  }, [
2830
3103
  e("polyline", { points: "15 18 9 12 15 6" })
2831
3104
  ], -1)
2832
- ])], 8, $n),
3105
+ ])], 8, Wn),
2833
3106
  e("button", {
2834
3107
  class: "artifactuse-panel__nav-trigger",
2835
3108
  title: "View all artifacts",
2836
- onClick: Ht
3109
+ onClick: Vt
2837
3110
  }, [
2838
- e("span", null, l(O.value + 1) + " / " + l(u.value.length), 1),
2839
- t[54] || (t[54] = e("svg", {
3111
+ e("span", null, l(U.value + 1) + " / " + l(d.value.length), 1),
3112
+ t[56] || (t[56] = e("svg", {
2840
3113
  viewBox: "0 0 24 24",
2841
3114
  fill: "none",
2842
3115
  stroke: "currentColor",
@@ -2847,10 +3120,10 @@ const Jt = { class: "artifactuse-card__icon" }, Xt = ["innerHTML"], Zt = { class
2847
3120
  ]),
2848
3121
  e("button", {
2849
3122
  class: "artifactuse-panel__nav-btn",
2850
- disabled: O.value >= u.value.length - 1,
3123
+ disabled: U.value >= d.value.length - 1,
2851
3124
  title: "Next artifact",
2852
- onClick: Bt
2853
- }, [...t[55] || (t[55] = [
3125
+ onClick: Ft
3126
+ }, [...t[57] || (t[57] = [
2854
3127
  e("svg", {
2855
3128
  viewBox: "0 0 24 24",
2856
3129
  fill: "none",
@@ -2859,16 +3132,16 @@ const Jt = { class: "artifactuse-card__icon" }, Xt = ["innerHTML"], Zt = { class
2859
3132
  }, [
2860
3133
  e("polyline", { points: "9 18 15 12 9 6" })
2861
3134
  ], -1)
2862
- ])], 8, Mn),
2863
- Be(Ae, { name: "artifactuse-popup" }, {
2864
- default: He(() => [
2865
- J.value ? (a(), s("div", Ln, [
2866
- e("div", Tn, [
2867
- t[57] || (t[57] = e("span", null, "Artifacts", -1)),
3135
+ ])], 8, Jn),
3136
+ ze(Ee, { name: "artifactuse-popup" }, {
3137
+ default: Be(() => [
3138
+ X.value ? (a(), s("div", Xn, [
3139
+ e("div", Zn, [
3140
+ t[59] || (t[59] = e("span", null, "Artifacts", -1)),
2868
3141
  e("button", {
2869
3142
  class: "artifactuse-panel__artifact-list-close",
2870
- onClick: t[11] || (t[11] = (y) => J.value = !1)
2871
- }, [...t[56] || (t[56] = [
3143
+ onClick: t[11] || (t[11] = (p) => X.value = !1)
3144
+ }, [...t[58] || (t[58] = [
2872
3145
  e("svg", {
2873
3146
  viewBox: "0 0 24 24",
2874
3147
  fill: "none",
@@ -2890,27 +3163,27 @@ const Jt = { class: "artifactuse-card__icon" }, Xt = ["innerHTML"], Zt = { class
2890
3163
  ], -1)
2891
3164
  ])])
2892
3165
  ]),
2893
- e("div", Pn, [
2894
- (a(!0), s(R, null, ve(u.value, (y, U) => (a(), s("button", {
2895
- key: y.id,
2896
- class: N(["artifactuse-panel__artifact-item", { "artifactuse-panel__artifact-item--active": y.id === g(r).id }]),
2897
- onClick: (Z) => Ke(y)
3166
+ e("div", Kn, [
3167
+ (a(!0), s(R, null, ve(d.value, (p, F) => (a(), s("button", {
3168
+ key: p.id,
3169
+ class: j(["artifactuse-panel__artifact-item", { "artifactuse-panel__artifact-item--active": p.id === y(o).id }]),
3170
+ onClick: (J) => Ge(p)
2898
3171
  }, [
2899
3172
  e("span", {
2900
3173
  class: "artifactuse-panel__artifact-item-icon",
2901
- innerHTML: je(y.language)
2902
- }, null, 8, Hn),
2903
- e("div", Sn, [
2904
- e("span", Bn, l(y.title || "Untitled"), 1),
2905
- e("span", En, [
2906
- K(l(g(Se)(y.language)) + " ", 1),
2907
- y.lineCount ? (a(), s(R, { key: 0 }, [
2908
- K(" • " + l(y.lineCount) + " lines ", 1)
3174
+ innerHTML: Ie(p.language)
3175
+ }, null, 8, Qn),
3176
+ e("div", Gn, [
3177
+ e("span", eo, l(p.title || "Untitled"), 1),
3178
+ e("span", to, [
3179
+ K(l(y(Se)(p.language)) + " ", 1),
3180
+ p.lineCount ? (a(), s(R, { key: 0 }, [
3181
+ K(" • " + l(p.lineCount) + " lines ", 1)
2909
3182
  ], 64)) : v("", !0)
2910
3183
  ])
2911
3184
  ]),
2912
- e("span", zn, l(U + 1), 1)
2913
- ], 10, An))), 128))
3185
+ e("span", ao, l(F + 1), 1)
3186
+ ], 10, Yn))), 128))
2914
3187
  ])
2915
3188
  ])) : v("", !0)
2916
3189
  ]),
@@ -2919,236 +3192,28 @@ const Jt = { class: "artifactuse-card__icon" }, Xt = ["innerHTML"], Zt = { class
2919
3192
  ])) : v("", !0)
2920
3193
  ])
2921
3194
  ])
2922
- ], 64)) : (a(), s(R, { key: 2 }, [
2923
- e("header", ul, [
2924
- e("div", dl, [
2925
- t[18] || (t[18] = e("span", { class: "artifactuse-panel__icon" }, [
2926
- e("svg", {
2927
- viewBox: "0 0 24 24",
2928
- fill: "none",
2929
- stroke: "currentColor",
2930
- "stroke-width": "2"
2931
- }, [
2932
- e("polyline", { points: "16 18 22 12 16 6" }),
2933
- e("polyline", { points: "8 6 2 12 8 18" })
2934
- ])
2935
- ], -1)),
2936
- e("div", vl, [
2937
- t[17] || (t[17] = e("span", { class: "artifactuse-panel__name" }, "Artifacts", -1)),
2938
- e("span", fl, l(u.value.length) + " available", 1)
2939
- ])
2940
- ]),
2941
- e("div", pl, [
2942
- e("button", {
2943
- class: N(["artifactuse-panel__action", { "artifactuse-panel__action--loading": ee.value }]),
2944
- disabled: ee.value,
2945
- title: "Download all as ZIP",
2946
- onClick: Ct
2947
- }, [
2948
- ee.value ? (a(), s("svg", ml, [...t[20] || (t[20] = [
2949
- e("circle", {
2950
- cx: "12",
2951
- cy: "12",
2952
- r: "10",
2953
- "stroke-dasharray": "32",
2954
- "stroke-dashoffset": "32"
2955
- }, null, -1)
2956
- ])])) : (a(), s("svg", _l, [...t[19] || (t[19] = [
2957
- e("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }, null, -1),
2958
- e("polyline", { points: "7 10 12 15 17 10" }, null, -1),
2959
- e("line", {
2960
- x1: "12",
2961
- y1: "15",
2962
- x2: "12",
2963
- y2: "3"
2964
- }, null, -1)
2965
- ])]))
2966
- ], 10, hl),
2967
- e("button", {
2968
- class: "artifactuse-panel__action artifactuse-panel__action--close",
2969
- title: "Close panel",
2970
- onClick: t[1] || (t[1] = (...y) => g(h) && g(h)(...y))
2971
- }, [...t[21] || (t[21] = [
2972
- e("svg", {
2973
- viewBox: "0 0 24 24",
2974
- fill: "none",
2975
- stroke: "currentColor",
2976
- "stroke-width": "2"
2977
- }, [
2978
- e("line", {
2979
- x1: "18",
2980
- y1: "6",
2981
- x2: "6",
2982
- y2: "18"
2983
- }),
2984
- e("line", {
2985
- x1: "6",
2986
- y1: "6",
2987
- x2: "18",
2988
- y2: "18"
2989
- })
2990
- ], -1)
2991
- ])])
2992
- ])
2993
- ]),
2994
- e("div", yl, [
2995
- e("div", gl, [
2996
- (a(!0), s(R, null, ve(u.value, (y, U) => (a(), s("button", {
2997
- key: y.id,
2998
- class: "artifactuse-panel__list-item",
2999
- onClick: (Z) => Ke(y)
3000
- }, [
3001
- e("span", {
3002
- class: "artifactuse-panel__list-item-icon",
3003
- innerHTML: je(y.language)
3004
- }, null, 8, wl),
3005
- e("div", Cl, [
3006
- e("span", bl, l(y.title || "Untitled"), 1),
3007
- e("span", xl, [
3008
- K(l(g(Se)(y.language)) + " ", 1),
3009
- y.lineCount ? (a(), s(R, { key: 0 }, [
3010
- K(" • " + l(y.lineCount) + " lines ", 1)
3011
- ], 64)) : v("", !0)
3012
- ])
3013
- ]),
3014
- t[22] || (t[22] = e("span", { class: "artifactuse-panel__list-item-arrow" }, [
3015
- e("svg", {
3016
- viewBox: "0 0 24 24",
3017
- fill: "none",
3018
- stroke: "currentColor",
3019
- "stroke-width": "2"
3020
- }, [
3021
- e("polyline", { points: "9 18 15 12 9 6" })
3022
- ])
3023
- ], -1))
3024
- ], 8, kl))), 128))
3025
- ])
3026
- ]),
3027
- e("footer", $l, [
3028
- G.value ? (a(), s("a", Ml, [...t[23] || (t[23] = [
3029
- e("svg", {
3030
- width: "16",
3031
- height: "16",
3032
- viewBox: "0 0 42 42",
3033
- fill: "none",
3034
- xmlns: "http://www.w3.org/2000/svg"
3035
- }, [
3036
- e("path", {
3037
- d: "M16.6667 41.6673V10.4173C16.6667 9.86478 16.4472 9.33488 16.0565 8.94418C15.6658 8.55348 15.1359 8.33398 14.5833 8.33398H4.16667C3.0616 8.33398 2.00179 8.77297 1.22039 9.55437C0.438987 10.3358 0 11.3956 0 12.5007V37.5006C0 38.6057 0.438987 39.6655 1.22039 40.4469C2.00179 41.2283 3.0616 41.6673 4.16667 41.6673H29.1667C30.2717 41.6673 31.3315 41.2283 32.1129 40.4469C32.8943 39.6655 33.3333 38.6057 33.3333 37.5006V27.084C33.3333 26.5314 33.1138 26.0015 32.7231 25.6108C32.3324 25.2201 31.8025 25.0007 31.25 25.0007H0",
3038
- fill: "#5F51C8"
3039
- }),
3040
- e("path", {
3041
- d: "M39.5833 0H27.0833C25.9327 0 25 0.93274 25 2.08333V14.5833C25 15.7339 25.9327 16.6667 27.0833 16.6667H39.5833C40.7339 16.6667 41.6667 15.7339 41.6667 14.5833V2.08333C41.6667 0.93274 40.7339 0 39.5833 0Z",
3042
- fill: "#695AE0"
3043
- })
3044
- ], -1),
3045
- e("span", null, "Artifactuse", -1)
3046
- ])])) : v("", !0)
3047
- ])
3048
- ], 64)) : (a(), s(R, { key: 1 }, [
3049
- e("header", nl, [
3050
- t[14] || (t[14] = e("div", { class: "artifactuse-panel__title" }, [
3051
- e("span", { class: "artifactuse-panel__icon" }, [
3052
- e("svg", {
3053
- viewBox: "0 0 24 24",
3054
- fill: "none",
3055
- stroke: "currentColor",
3056
- "stroke-width": "2"
3057
- }, [
3058
- e("polyline", { points: "16 18 22 12 16 6" }),
3059
- e("polyline", { points: "8 6 2 12 8 18" })
3060
- ])
3061
- ]),
3062
- e("div", { class: "artifactuse-panel__title-content" }, [
3063
- e("span", { class: "artifactuse-panel__name" }, "Artifacts")
3064
- ])
3065
- ], -1)),
3066
- e("div", ol, [
3067
- e("button", {
3068
- class: "artifactuse-panel__action artifactuse-panel__action--close",
3069
- title: "Close panel",
3070
- onClick: t[0] || (t[0] = (...y) => g(h) && g(h)(...y))
3071
- }, [...t[13] || (t[13] = [
3072
- e("svg", {
3073
- viewBox: "0 0 24 24",
3074
- fill: "none",
3075
- stroke: "currentColor",
3076
- "stroke-width": "2"
3077
- }, [
3078
- e("line", {
3079
- x1: "18",
3080
- y1: "6",
3081
- x2: "6",
3082
- y2: "18"
3083
- }),
3084
- e("line", {
3085
- x1: "6",
3086
- y1: "6",
3087
- x2: "18",
3088
- y2: "18"
3089
- })
3090
- ], -1)
3091
- ])])
3092
- ])
3093
- ]),
3094
- t[16] || (t[16] = e("div", { class: "artifactuse-panel__empty" }, [
3095
- e("div", { class: "artifactuse-panel__empty-icon" }, [
3096
- e("svg", {
3097
- viewBox: "0 0 24 24",
3098
- fill: "none",
3099
- stroke: "currentColor",
3100
- "stroke-width": "1.5"
3101
- }, [
3102
- 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" }),
3103
- e("polyline", { points: "14 2 14 8 20 8" })
3104
- ])
3105
- ]),
3106
- e("h3", { class: "artifactuse-panel__empty-title" }, "No artifacts yet"),
3107
- e("p", { class: "artifactuse-panel__empty-text" }, " Code blocks, forms, and other interactive content will appear here as the AI generates them. ")
3108
- ], -1)),
3109
- e("footer", rl, [
3110
- G.value ? (a(), s("a", cl, [...t[15] || (t[15] = [
3111
- e("svg", {
3112
- width: "16",
3113
- height: "16",
3114
- viewBox: "0 0 42 42",
3115
- fill: "none",
3116
- xmlns: "http://www.w3.org/2000/svg"
3117
- }, [
3118
- e("path", {
3119
- d: "M16.6667 41.6673V10.4173C16.6667 9.86478 16.4472 9.33488 16.0565 8.94418C15.6658 8.55348 15.1359 8.33398 14.5833 8.33398H4.16667C3.0616 8.33398 2.00179 8.77297 1.22039 9.55437C0.438987 10.3358 0 11.3956 0 12.5007V37.5006C0 38.6057 0.438987 39.6655 1.22039 40.4469C2.00179 41.2283 3.0616 41.6673 4.16667 41.6673H29.1667C30.2717 41.6673 31.3315 41.2283 32.1129 40.4469C32.8943 39.6655 33.3333 38.6057 33.3333 37.5006V27.084C33.3333 26.5314 33.1138 26.0015 32.7231 25.6108C32.3324 25.2201 31.8025 25.0007 31.25 25.0007H0",
3120
- fill: "#5F51C8"
3121
- }),
3122
- e("path", {
3123
- d: "M39.5833 0H27.0833C25.9327 0 25 0.93274 25 2.08333V14.5833C25 15.7339 25.9327 16.6667 27.0833 16.6667H39.5833C40.7339 16.6667 41.6667 15.7339 41.6667 14.5833V2.08333C41.6667 0.93274 40.7339 0 39.5833 0Z",
3124
- fill: "#695AE0"
3125
- })
3126
- ], -1),
3127
- e("span", null, "Artifactuse", -1)
3128
- ])])) : v("", !0)
3129
- ])
3130
3195
  ], 64))
3131
3196
  ], 6)) : v("", !0)
3132
3197
  ]),
3133
3198
  _: 1
3134
3199
  }));
3135
3200
  }
3136
- }, In = ["title"], Fn = {
3201
+ }, so = ["title"], io = {
3137
3202
  key: 0,
3138
3203
  class: "artifactuse-panel-toggle-badge"
3139
- }, jn = {
3204
+ }, vo = {
3140
3205
  __name: "ArtifactusePanelToggle",
3141
3206
  setup(H) {
3142
- const { state: d, artifactCount: _, hasArtifacts: L, togglePanel: m } = Ee();
3143
- return (r, V) => (a(), s("button", {
3144
- class: N(["artifactuse-panel-toggle", {
3145
- "artifactuse-panel-toggle--active": g(d).isPanelOpen,
3146
- "artifactuse-panel-toggle--has-artifacts": g(L)
3207
+ const { state: c, artifactCount: _, hasArtifacts: T, togglePanel: f } = Ve();
3208
+ return (o, q) => (a(), s("button", {
3209
+ class: j(["artifactuse-panel-toggle", {
3210
+ "artifactuse-panel-toggle--active": y(c).isPanelOpen,
3211
+ "artifactuse-panel-toggle--has-artifacts": y(T)
3147
3212
  }]),
3148
- onClick: V[0] || (V[0] = (...S) => g(m) && g(m)(...S)),
3149
- title: g(d).isPanelOpen ? "Close artifacts panel" : "Open artifacts panel"
3213
+ onClick: q[0] || (q[0] = (...E) => y(f) && y(f)(...E)),
3214
+ title: y(c).isPanelOpen ? "Close artifacts panel" : "Open artifacts panel"
3150
3215
  }, [
3151
- V[1] || (V[1] = e("svg", {
3216
+ q[1] || (q[1] = e("svg", {
3152
3217
  viewBox: "0 0 24 24",
3153
3218
  fill: "none",
3154
3219
  stroke: "currentColor",
@@ -3159,148 +3224,164 @@ const Jt = { class: "artifactuse-card__icon" }, Xt = ["innerHTML"], Zt = { class
3159
3224
  e("polyline", { points: "16 18 22 12 16 6" }),
3160
3225
  e("polyline", { points: "8 6 2 12 8 18" })
3161
3226
  ], -1)),
3162
- g(_) > 0 ? (a(), s("span", Fn, l(g(_) > 99 ? "99+" : g(_)), 1)) : v("", !0)
3163
- ], 10, In));
3227
+ y(_) > 0 ? (a(), s("span", io, l(y(_) > 99 ? "99+" : y(_)), 1)) : v("", !0)
3228
+ ], 10, so));
3164
3229
  }
3165
- }, rt = Symbol("artifactuse");
3166
- function ct(H = {}) {
3230
+ }, dt = Symbol("artifactuse");
3231
+ function vt(H = {}) {
3167
3232
  var n;
3168
- const d = ot(H), _ = lt({
3233
+ const c = ut(H), _ = rt({
3169
3234
  artifacts: [],
3170
3235
  activeArtifactId: null,
3171
3236
  isPanelOpen: !1,
3172
3237
  viewMode: "preview",
3173
- isFullscreen: !1
3238
+ isFullscreen: !1,
3239
+ openTabs: [],
3240
+ tabViewModes: {},
3241
+ forceEmptyView: !1
3174
3242
  });
3175
- d.state.subscribe((p) => {
3176
- _.artifacts = p.artifacts, _.activeArtifactId = p.activeArtifactId, _.isPanelOpen = p.isPanelOpen, _.viewMode = p.viewMode, _.isFullscreen = p.isFullscreen;
3243
+ c.state.subscribe((h) => {
3244
+ _.artifacts = h.artifacts, _.activeArtifactId = h.activeArtifactId, _.isPanelOpen = h.isPanelOpen, _.viewMode = h.viewMode, _.isFullscreen = h.isFullscreen, _.openTabs = h.openTabs, _.tabViewModes = h.tabViewModes, _.forceEmptyView = h.forceEmptyView;
3177
3245
  });
3178
- const L = b(() => _.activeArtifactId && _.artifacts.find((p) => p.id === _.activeArtifactId) || null), m = b(() => _.artifacts.filter((p) => !p.isInline).length), r = b(() => _.artifacts.some((p) => !p.isInline)), V = b(() => d.getPanelTypes()), S = b(() => L.value ? d.getPanelUrl(L.value) : null);
3179
- if (d.applyTheme(), H.theme === "auto" || !H.theme) {
3180
- const p = ((n = d.bridge) == null ? void 0 : n.theme) || d.theme;
3181
- p != null && p.watchSystemTheme && p.watchSystemTheme(() => {
3182
- d.applyTheme();
3246
+ const T = C(() => _.activeArtifactId && _.artifacts.find((h) => h.id === _.activeArtifactId) || null), f = C(() => _.artifacts.filter((h) => !h.isInline).length), o = C(() => _.artifacts.some((h) => !h.isInline)), q = C(() => c.getPanelTypes()), E = C(() => T.value ? c.getPanelUrl(T.value) : null);
3247
+ if (c.applyTheme(), H.theme === "auto" || !H.theme) {
3248
+ const h = ((n = c.bridge) == null ? void 0 : n.theme) || c.theme;
3249
+ h != null && h.watchSystemTheme && h.watchSystemTheme(() => {
3250
+ c.applyTheme();
3183
3251
  });
3184
3252
  }
3185
- const h = {
3186
- instance: d,
3253
+ const g = {
3254
+ instance: c,
3187
3255
  state: _,
3188
- activeArtifact: L,
3189
- artifactCount: m,
3190
- hasArtifacts: r,
3256
+ activeArtifact: T,
3257
+ artifactCount: f,
3258
+ hasArtifacts: o,
3191
3259
  // Panel computed
3192
- panelTypes: V,
3193
- activePanelUrl: S,
3260
+ panelTypes: q,
3261
+ activePanelUrl: E,
3194
3262
  // Methods
3195
- processMessage: d.processMessage,
3196
- initializeContent: d.initializeContent,
3197
- openArtifact: d.openArtifact,
3198
- openFile: d.openFile,
3199
- openCode: d.openCode,
3200
- updateFile: d.updateFile,
3201
- closePanel: d.closePanel,
3202
- togglePanel: d.togglePanel,
3203
- toggleFullscreen: d.toggleFullscreen,
3204
- setViewMode: d.setViewMode,
3205
- getPanelUrl: d.getPanelUrl,
3206
- sendToPanel: d.sendToPanel,
3263
+ processMessage: c.processMessage,
3264
+ initializeContent: c.initializeContent,
3265
+ openArtifact: c.openArtifact,
3266
+ openFile: c.openFile,
3267
+ openCode: c.openCode,
3268
+ updateFile: c.updateFile,
3269
+ openPanel: c.openPanel,
3270
+ closePanel: c.closePanel,
3271
+ togglePanel: c.togglePanel,
3272
+ toggleFullscreen: c.toggleFullscreen,
3273
+ setViewMode: c.setViewMode,
3274
+ getPanelUrl: c.getPanelUrl,
3275
+ sendToPanel: c.sendToPanel,
3207
3276
  // Panel management
3208
- hasPanel: d.hasPanel,
3209
- registerPanel: d.registerPanel,
3210
- unregisterPanel: d.unregisterPanel,
3211
- getPanelTypes: d.getPanelTypes,
3277
+ hasPanel: c.hasPanel,
3278
+ registerPanel: c.registerPanel,
3279
+ unregisterPanel: c.unregisterPanel,
3280
+ getPanelTypes: c.getPanelTypes,
3281
+ // Multi-tab
3282
+ closeTab: c.closeTab,
3283
+ closeOtherTabs: c.closeOtherTabs,
3284
+ closeAllTabs: c.closeAllTabs,
3212
3285
  // Events
3213
- on: d.on,
3214
- off: d.off,
3286
+ on: c.on,
3287
+ off: c.off,
3215
3288
  // State management
3216
- clearArtifacts: () => d.state.clear(),
3289
+ clearArtifacts: () => c.state.clear(),
3217
3290
  // Theme - wrap setTheme to also apply
3218
- applyTheme: d.applyTheme,
3219
- setTheme: (p) => {
3220
- d.setTheme(p), d.applyTheme();
3291
+ applyTheme: c.applyTheme,
3292
+ setTheme: (h) => {
3293
+ c.setTheme(h), c.applyTheme();
3221
3294
  },
3222
- getTheme: d.getTheme
3295
+ getTheme: c.getTheme
3223
3296
  };
3224
- return Ot(rt, h), h;
3297
+ return Wt(dt, g), g;
3225
3298
  }
3226
- function Ee() {
3227
- const H = Ut(rt);
3228
- return H || (console.warn("useArtifactuse() called without provideArtifactuse(). Creating standalone instance."), ct());
3299
+ function Ve() {
3300
+ const H = Jt(dt);
3301
+ return H || (console.warn("useArtifactuse() called without provideArtifactuse(). Creating standalone instance."), vt());
3229
3302
  }
3230
- function Vn(H = {}) {
3231
- const d = ot(H), _ = lt({
3303
+ function lo(H = {}) {
3304
+ const c = ut(H), _ = rt({
3232
3305
  artifacts: [],
3233
3306
  activeArtifactId: null,
3234
3307
  isPanelOpen: !1,
3235
3308
  viewMode: "preview",
3236
- isFullscreen: !1
3309
+ isFullscreen: !1,
3310
+ openTabs: [],
3311
+ tabViewModes: {},
3312
+ forceEmptyView: !1
3237
3313
  });
3238
- let L;
3239
- $e(() => {
3240
- L = d.state.subscribe((n) => {
3241
- _.artifacts = n.artifacts, _.activeArtifactId = n.activeArtifactId, _.isPanelOpen = n.isPanelOpen, _.viewMode = n.viewMode, _.isFullscreen = n.isFullscreen;
3242
- }), d.applyTheme();
3243
- }), De(() => {
3244
- L && L(), d.destroy();
3314
+ let T;
3315
+ Me(() => {
3316
+ T = c.state.subscribe((n) => {
3317
+ _.artifacts = n.artifacts, _.activeArtifactId = n.activeArtifactId, _.isPanelOpen = n.isPanelOpen, _.viewMode = n.viewMode, _.isFullscreen = n.isFullscreen, _.openTabs = n.openTabs, _.tabViewModes = n.tabViewModes, _.forceEmptyView = n.forceEmptyView;
3318
+ }), c.applyTheme();
3319
+ }), We(() => {
3320
+ T && T(), c.destroy();
3245
3321
  });
3246
- const m = b(() => _.activeArtifactId && _.artifacts.find((n) => n.id === _.activeArtifactId) || null), r = b(() => _.artifacts.filter((n) => !n.isInline).length), V = b(() => _.artifacts.some((n) => !n.isInline)), S = b(() => d.getPanelTypes()), h = b(() => m.value ? d.getPanelUrl(m.value) : null);
3322
+ const f = C(() => _.activeArtifactId && _.artifacts.find((n) => n.id === _.activeArtifactId) || null), o = C(() => _.artifacts.filter((n) => !n.isInline).length), q = C(() => _.artifacts.some((n) => !n.isInline)), E = C(() => c.getPanelTypes()), g = C(() => f.value ? c.getPanelUrl(f.value) : null);
3247
3323
  return {
3248
- instance: d,
3324
+ instance: c,
3249
3325
  state: _,
3250
- activeArtifact: m,
3251
- artifactCount: r,
3252
- hasArtifacts: V,
3326
+ activeArtifact: f,
3327
+ artifactCount: o,
3328
+ hasArtifacts: q,
3253
3329
  // Panel computed
3254
- panelTypes: S,
3255
- activePanelUrl: h,
3330
+ panelTypes: E,
3331
+ activePanelUrl: g,
3256
3332
  // Methods
3257
- processMessage: d.processMessage,
3258
- initializeContent: d.initializeContent,
3259
- openArtifact: d.openArtifact,
3260
- openFile: d.openFile,
3261
- openCode: d.openCode,
3262
- updateFile: d.updateFile,
3263
- closePanel: d.closePanel,
3264
- togglePanel: d.togglePanel,
3265
- toggleFullscreen: d.toggleFullscreen,
3266
- setViewMode: d.setViewMode,
3267
- getPanelUrl: d.getPanelUrl,
3268
- sendToPanel: d.sendToPanel,
3333
+ processMessage: c.processMessage,
3334
+ initializeContent: c.initializeContent,
3335
+ openArtifact: c.openArtifact,
3336
+ openFile: c.openFile,
3337
+ openCode: c.openCode,
3338
+ updateFile: c.updateFile,
3339
+ openPanel: c.openPanel,
3340
+ closePanel: c.closePanel,
3341
+ togglePanel: c.togglePanel,
3342
+ toggleFullscreen: c.toggleFullscreen,
3343
+ setViewMode: c.setViewMode,
3344
+ getPanelUrl: c.getPanelUrl,
3345
+ sendToPanel: c.sendToPanel,
3269
3346
  // Panel management
3270
- hasPanel: d.hasPanel,
3271
- registerPanel: d.registerPanel,
3272
- unregisterPanel: d.unregisterPanel,
3273
- getPanelTypes: d.getPanelTypes,
3347
+ hasPanel: c.hasPanel,
3348
+ registerPanel: c.registerPanel,
3349
+ unregisterPanel: c.unregisterPanel,
3350
+ getPanelTypes: c.getPanelTypes,
3351
+ // Multi-tab
3352
+ closeTab: c.closeTab,
3353
+ closeOtherTabs: c.closeOtherTabs,
3354
+ closeAllTabs: c.closeAllTabs,
3274
3355
  // Events
3275
- on: d.on,
3276
- off: d.off,
3356
+ on: c.on,
3357
+ off: c.off,
3277
3358
  // State management
3278
- clearArtifacts: () => d.state.clear(),
3359
+ clearArtifacts: () => c.state.clear(),
3279
3360
  // Theme - wrap setTheme to also apply
3280
- applyTheme: d.applyTheme,
3361
+ applyTheme: c.applyTheme,
3281
3362
  setTheme: (n) => {
3282
- d.setTheme(n), d.applyTheme();
3363
+ c.setTheme(n), c.applyTheme();
3283
3364
  },
3284
- getTheme: d.getTheme
3365
+ getTheme: c.getTheme
3285
3366
  };
3286
3367
  }
3287
- const Nn = {
3288
- provideArtifactuse: ct,
3289
- useArtifactuse: Ee,
3290
- createArtifactuseComposable: Vn,
3291
- DEFAULT_PANELS: Nt
3368
+ const fo = {
3369
+ provideArtifactuse: vt,
3370
+ useArtifactuse: Ve,
3371
+ createArtifactuseComposable: lo,
3372
+ DEFAULT_PANELS: Kt
3292
3373
  };
3293
3374
  export {
3294
- Un as ArtifactuseAgentMessage,
3295
- ia as ArtifactuseCard,
3296
- Ja as ArtifactuseInlineForm,
3297
- Dn as ArtifactusePanel,
3298
- jn as ArtifactusePanelToggle,
3299
- Ki as ArtifactuseSocialPreview,
3300
- il as ArtifactuseViewer,
3301
- Nt as DEFAULT_PANELS,
3302
- Vn as createArtifactuseComposable,
3303
- Nn as default,
3304
- ct as provideArtifactuse,
3305
- Ee as useArtifactuse
3375
+ co as ArtifactuseAgentMessage,
3376
+ ca as ArtifactuseCard,
3377
+ Qa as ArtifactuseInlineForm,
3378
+ uo as ArtifactusePanel,
3379
+ vo as ArtifactusePanelToggle,
3380
+ tl as ArtifactuseSocialPreview,
3381
+ cl as ArtifactuseViewer,
3382
+ Kt as DEFAULT_PANELS,
3383
+ lo as createArtifactuseComposable,
3384
+ fo as default,
3385
+ vt as provideArtifactuse,
3386
+ Ve as useArtifactuse
3306
3387
  };