@orchidui/dashboard 1.21.1-32 → 1.21.1-34

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.
Files changed (2) hide show
  1. package/dist/index.js +467 -467
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,14 +1,14 @@
1
1
  var pt = Object.defineProperty;
2
- var gt = (n, V, r) => V in n ? pt(n, V, { enumerable: !0, configurable: !0, writable: !0, value: r }) : n[V] = r;
3
- var We = (n, V, r) => gt(n, typeof V != "symbol" ? V + "" : V, r);
4
- import { ref as v, computed as $e, createBlock as P, openBlock as m, unref as w, normalizeClass as Q, withCtx as W, createVNode as L, createElementBlock as U, createSlots as vt, renderSlot as je, normalizeStyle as te, createCommentVNode as H, onMounted as Je, watch as fe, createElementVNode as h, Teleport as mt, Fragment as ge, createTextVNode as ve, toDisplayString as Ne, renderList as Ke, withKeys as ot, inject as Re, reactive as _e, provide as Be, nextTick as ft, withDirectives as ht, vShow as yt, defineAsyncComponent as it } from "vue";
2
+ var gt = (o, V, r) => V in o ? pt(o, V, { enumerable: !0, configurable: !0, writable: !0, value: r }) : o[V] = r;
3
+ var We = (o, V, r) => gt(o, typeof V != "symbol" ? V + "" : V, r);
4
+ import { ref as v, computed as $e, createBlock as N, openBlock as m, unref as w, normalizeClass as Q, withCtx as W, createVNode as L, createElementBlock as E, createSlots as vt, renderSlot as je, normalizeStyle as te, createCommentVNode as H, onMounted as Je, watch as fe, createElementVNode as y, Teleport as mt, Fragment as ge, createTextVNode as ve, toDisplayString as Pe, renderList as Ke, withKeys as ot, inject as Re, reactive as _e, provide as Be, nextTick as ft, withDirectives as yt, vShow as ht, defineAsyncComponent as it } from "vue";
5
5
  import { Q as Y, a as bt } from "./QuillEditor-DwCbpq2d.js";
6
6
  import { BaseInput as st, Dropdown as rt, Input as we, Icon as A, Modal as xt, Select as Ze, Slider as Ae } from "@orchidui/core";
7
7
  import { rgbToHsl as et, rgb2Hex as tt, rgbaToHex8 as kt, hsl2Hex as lt, hexToRgb as ze, rgbToHue as Qe, hslToRgb as at, hex8ToRgba as $t, parseRgba as wt, parseRgb as St } from "./Dashboard/ColorPicker/components/converters.js";
8
8
  import { PieChart as Ct } from "./Dashboard/Charts/PieChart/OcPieChart.js";
9
9
  import { LineChart as Ml } from "./Dashboard/Charts/LineChart/OcLineChart.js";
10
10
  import { BarChart as Al } from "./Dashboard/Charts/BarChart/OcBarChart.js";
11
- import { BarRaceChart as Pl } from "./Dashboard/Charts/BarRaceChart/OcBarRaceChart.js";
11
+ import { BarRaceChart as Xl } from "./Dashboard/Charts/BarRaceChart/OcBarRaceChart.js";
12
12
  import { _ as ql } from "./OcCard-D3be6IMj.js";
13
13
  const It = { key: 1 }, Vt = {
14
14
  __name: "OcColorPicker",
@@ -32,9 +32,9 @@ const It = { key: 1 }, Vt = {
32
32
  }
33
33
  },
34
34
  emits: ["update:model-value"],
35
- setup(n, { emit: V }) {
36
- const r = n, y = V, u = v(!1), f = v(r.modelValue), C = (E) => {
37
- E && (f.value = E, y("update:model-value", E));
35
+ setup(o, { emit: V }) {
36
+ const r = o, h = V, d = v(!1), f = v(r.modelValue), C = (U) => {
37
+ U && (f.value = U, h("update:model-value", U));
38
38
  }, p = $e(() => r.variant === "gradient" ? {
39
39
  class: "w-[20px] h-[20px] hide-svg-icon",
40
40
  style: {
@@ -45,12 +45,12 @@ const It = { key: 1 }, Vt = {
45
45
  color: f.value
46
46
  }
47
47
  }), a = v(), O = v([]), Z = () => {
48
- O.value.length > 8 && (O.value = O.value.filter((E, N) => N < 8)), localStorage.setItem("ck-cp-local-color-list", JSON.stringify(O.value));
48
+ O.value.length > 8 && (O.value = O.value.filter((U, X) => X < 8)), localStorage.setItem("ck-cp-local-color-list", JSON.stringify(O.value));
49
49
  };
50
50
  let M = localStorage.getItem("ck-cp-local-color-list");
51
51
  M && (O.value = [...new Set(JSON.parse(M))], Z());
52
- const T = (E) => {
53
- if (!E && f.value)
52
+ const T = (U) => {
53
+ if (!U && f.value)
54
54
  if (O.value.find((D) => D === f.value))
55
55
  O.value = [
56
56
  f.value,
@@ -61,12 +61,12 @@ const It = { key: 1 }, Vt = {
61
61
  let D = f.value;
62
62
  O.value.unshift(D), Z();
63
63
  }
64
- }, B = v(!1), z = (E) => {
65
- f.value = E, y("update:model-value", E), u.value = !1;
64
+ }, B = v(!1), z = (U) => {
65
+ f.value = U, h("update:model-value", U), d.value = !1;
66
66
  };
67
- return (E, N) => (m(), P(w(st), {
68
- class: Q(n.hideInputColor ? "w-[40px]" : ""),
69
- onClick: N[1] || (N[1] = () => {
67
+ return (U, X) => (m(), N(w(st), {
68
+ class: Q(o.hideInputColor ? "w-[40px]" : ""),
69
+ onClick: X[1] || (X[1] = () => {
70
70
  var D;
71
71
  return (D = a.value) == null ? void 0 : D.toggleDropdown();
72
72
  })
@@ -75,40 +75,40 @@ const It = { key: 1 }, Vt = {
75
75
  L(w(rt), {
76
76
  ref_key: "dropdownRef",
77
77
  ref: a,
78
- modelValue: u.value,
78
+ modelValue: d.value,
79
79
  "onUpdate:modelValue": [
80
- N[0] || (N[0] = (D) => u.value = D),
80
+ X[0] || (X[0] = (D) => d.value = D),
81
81
  T
82
82
  ],
83
83
  "max-menu-height": 800,
84
- placement: n.placement,
84
+ placement: o.placement,
85
85
  "popper-options": {
86
86
  strategy: "fixed"
87
87
  }
88
88
  }, {
89
89
  menu: W(() => [
90
- B.value ? H("", !0) : (m(), P(w(xl), {
90
+ B.value ? H("", !0) : (m(), N(w(xl), {
91
91
  key: 0,
92
- variant: n.variant,
93
- "show-alpha": !n.hideOpacity,
94
- type: n.hideOpacity ? "HEX" : "HEX8",
95
- "model-value": n.modelValue,
92
+ variant: o.variant,
93
+ "show-alpha": !o.hideOpacity,
94
+ type: o.hideOpacity ? "HEX" : "HEX8",
95
+ "model-value": o.modelValue,
96
96
  "last-used-colors": O.value,
97
- "preset-colors": n.presetColors,
97
+ "preset-colors": o.presetColors,
98
98
  "onUpdate:modelValue": C,
99
99
  onLastUsedPick: z
100
100
  }, null, 8, ["variant", "show-alpha", "type", "model-value", "last-used-colors", "preset-colors"]))
101
101
  ]),
102
102
  default: W(() => [
103
- n.hideInputColor ? (m(), U("div", It, [
104
- je(E.$slots, "picker-icon", {}, () => [
103
+ o.hideInputColor ? (m(), E("div", It, [
104
+ je(U.$slots, "picker-icon", {}, () => [
105
105
  L(w(A), {
106
106
  class: "cursor-pointer",
107
107
  style: te(`color: ${f.value}`),
108
108
  name: "drop"
109
109
  }, null, 8, ["style"])
110
110
  ])
111
- ])) : (m(), P(w(we), {
111
+ ])) : (m(), N(w(we), {
112
112
  key: 0,
113
113
  "model-value": f.value,
114
114
  icon: "drop",
@@ -116,10 +116,10 @@ const It = { key: 1 }, Vt = {
116
116
  placeholder: "",
117
117
  "onUpdate:modelValue": C
118
118
  }, vt({ _: 2 }, [
119
- E.$slots.leading ? {
119
+ U.$slots.leading ? {
120
120
  name: "leading",
121
121
  fn: W(() => [
122
- je(E.$slots, "leading")
122
+ je(U.$slots, "leading")
123
123
  ]),
124
124
  key: "0"
125
125
  } : void 0
@@ -131,10 +131,10 @@ const It = { key: 1 }, Vt = {
131
131
  _: 3
132
132
  }, 8, ["class"]));
133
133
  }
134
- }, Tt = ["id"], Lt = { class: "flex items-center gap-x-3 px-5" }, Bt = { class: "flex items-center gap-x-5 cursor-pointer" }, Rt = { class: "flex flex-col py-2 overflow-hidden" }, Ut = ["onClick"], Et = { class: "flex gap-x-3 items-center px-5" }, Dt = { class: "flex items-center gap-x-3 px-5" }, Ht = { class: "flex gap-x-3 items-center px-5" }, Ot = { class: "flex gap-x-3 items-center px-5" }, Mt = { class: "flex items-center" }, Qt = { class: "grid cursor-pointer px-5" }, At = {
134
+ }, Tt = ["id"], Lt = { class: "flex items-center gap-x-3 px-5" }, Bt = { class: "flex items-center gap-x-5 cursor-pointer" }, Rt = { class: "flex flex-col py-2 overflow-hidden" }, Et = ["onClick"], Ut = { class: "flex gap-x-3 items-center px-5" }, Dt = { class: "flex items-center gap-x-3 px-5" }, Ht = { class: "flex gap-x-3 items-center px-5" }, Ot = { class: "flex gap-x-3 items-center px-5" }, Mt = { class: "flex items-center" }, Qt = { class: "grid cursor-pointer px-5" }, At = {
135
135
  key: 5,
136
136
  class: "flex gap-x-3 items-center px-5"
137
- }, Nt = { class: "flex" }, Pt = { class: "mt-1 mx-2 cursor-pointer" }, Rl = {
137
+ }, Pt = { class: "flex" }, Xt = { class: "mt-1 mx-2 cursor-pointer" }, Rl = {
138
138
  __name: "OcTextEditor",
139
139
  props: {
140
140
  /**
@@ -177,7 +177,7 @@ const It = { key: 1 }, Vt = {
177
177
  },
178
178
  variant: {
179
179
  type: String,
180
- validator: (n) => ["default", "text-only"].includes(n),
180
+ validator: (o) => ["default", "text-only"].includes(o),
181
181
  default: "default"
182
182
  },
183
183
  placeholder: {
@@ -187,8 +187,8 @@ const It = { key: 1 }, Vt = {
187
187
  isCustomImageUpload: Boolean
188
188
  },
189
189
  emits: ["update:modelValue", "update:image", "uploadImage"],
190
- setup(n, { emit: V }) {
191
- const r = n, y = V, u = {
190
+ setup(o, { emit: V }) {
191
+ const r = o, h = V, d = {
192
192
  default: [
193
193
  "changes",
194
194
  "font-size",
@@ -201,8 +201,8 @@ const It = { key: 1 }, Vt = {
201
201
  "alignment"
202
202
  ],
203
203
  "text-only": ["changes", "font-size", "font-style", "link", "quote", "list", "alignment"]
204
- }, f = $e(() => u[r.variant]), C = Y.import("attributors/style/size");
205
- C.whitelist = r.fontSizes.map((c) => c.value), Y.register(C, !0);
204
+ }, f = $e(() => d[r.variant]), C = Y.import("attributors/style/size");
205
+ C.whitelist = r.fontSizes.map((u) => u.value), Y.register(C, !0);
206
206
  const p = Y.import("attributors/style/align");
207
207
  Y.register(p, !0);
208
208
  const a = Y.import("attributors/style/background");
@@ -219,137 +219,137 @@ const It = { key: 1 }, Vt = {
219
219
  We(B, "blotName", "divider"), We(B, "tagName", "hr"), Y.register(B);
220
220
  const z = v(
221
221
  Math.random().toString(36).replace(/[^a-zA-Z]+/g, "")
222
- ), E = v(!1), N = v(!1), D = v(!1), le = v(!1), J = v(!1), j = v(!1), R = v(!1), X = v(""), ae = v(""), ee = v(""), b = v(), Se = v(!1), ue = v(r.image), ie = (c) => {
223
- E.value = b.value.getQuill().history.stack.undo.length > 0, N.value = b.value.getQuill().history.stack.redo.length > 0, D.value = b.value.getQuill().getFormat().bold, le.value = b.value.getQuill().getFormat().italic, J.value = b.value.getQuill().getFormat().underline, R.value = b.value.getQuill().getFormat().blockquote, ae.value = b.value.getQuill().getFormat().list, ee.value = b.value.getQuill().getFormat().align;
224
- let o = document.createElement("div");
225
- o.innerHTML = c, Se.value && (o.innerText ? y("update:modelValue", c || "") : y("update:modelValue", ""), o.remove());
226
- }, Pe = () => {
227
- if (b.value.getQuill().getSelection(!0)) {
228
- const o = b.value.getQuill().getSelection(!0);
229
- b.value.getQuill().insertText(o.index, `
230
- `, Y.sources.USER), b.value.getQuill().insertEmbed(o.index + 1, "divider", !0, Y.sources.USER), b.value.getQuill().setSelection(o.index + 2, Y.sources.SILENT);
222
+ ), U = v(!1), X = v(!1), D = v(!1), le = v(!1), J = v(!1), j = v(!1), R = v(!1), q = v(""), ae = v(""), ee = v(""), x = v(), Se = v(!1), ue = v(r.image), ie = (u) => {
223
+ U.value = x.value.getQuill().history.stack.undo.length > 0, X.value = x.value.getQuill().history.stack.redo.length > 0, D.value = x.value.getQuill().getFormat().bold, le.value = x.value.getQuill().getFormat().italic, J.value = x.value.getQuill().getFormat().underline, R.value = x.value.getQuill().getFormat().blockquote, ae.value = x.value.getQuill().getFormat().list, ee.value = x.value.getQuill().getFormat().align;
224
+ let n = document.createElement("div");
225
+ n.innerHTML = u, Se.value && (n.innerText ? h("update:modelValue", u || "") : h("update:modelValue", ""), n.remove());
226
+ }, Xe = () => {
227
+ if (x.value.getQuill().getSelection(!0)) {
228
+ const n = x.value.getQuill().getSelection(!0);
229
+ x.value.getQuill().insertText(n.index, `
230
+ `, Y.sources.USER), x.value.getQuill().insertEmbed(n.index + 1, "divider", !0, Y.sources.USER), x.value.getQuill().setSelection(n.index + 2, Y.sources.SILENT);
231
231
  }
232
- }, Ue = () => {
233
- b.value.getQuill().history.undo(), ie(r.modelValue);
234
232
  }, Ee = () => {
235
- b.value.getQuill().history.redo(), ie(r.modelValue);
233
+ x.value.getQuill().history.undo(), ie(r.modelValue);
234
+ }, Ue = () => {
235
+ x.value.getQuill().history.redo(), ie(r.modelValue);
236
236
  }, Ce = () => {
237
- var c;
238
- b.value.getQuill().format("bold", !D.value), (c = b.value.getQuill().getSelection()) != null && c.length || (D.value = !D.value);
237
+ var u;
238
+ x.value.getQuill().format("bold", !D.value), (u = x.value.getQuill().getSelection()) != null && u.length || (D.value = !D.value);
239
239
  }, ne = () => {
240
- var c;
241
- b.value.getQuill().format("italic", !le.value), (c = b.value.getQuill().getSelection()) != null && c.length || (le.value = !le.value);
240
+ var u;
241
+ x.value.getQuill().format("italic", !le.value), (u = x.value.getQuill().getSelection()) != null && u.length || (le.value = !le.value);
242
242
  }, Ie = () => {
243
- var c;
244
- b.value.getQuill().format("underline", !J.value), (c = b.value.getQuill().getSelection()) != null && c.length || (J.value = !J.value);
245
- }, De = (c) => {
246
- b.value.getQuill().format("size", c), X.value = c, j.value = !1;
243
+ var u;
244
+ x.value.getQuill().format("underline", !J.value), (u = x.value.getQuill().getSelection()) != null && u.length || (J.value = !J.value);
245
+ }, De = (u) => {
246
+ x.value.getQuill().format("size", u), q.value = u, j.value = !1;
247
247
  }, me = () => {
248
- const c = b.value.getQuill().getSelection();
249
- c && c.length > 0 && b.value.getQuill().theme.tooltip.edit();
250
- }, Xe = () => {
251
- b.value.getQuill().format("blockquote", !R.value);
252
- }, oe = (c) => {
253
- const o = b.value.getQuill().getSelection();
254
- o && (b.value.getQuill().clipboard.dangerouslyPasteHTML(o.index, `<img src="${c}" />`), ue.value = c, y("update:image", ue.value));
248
+ const u = x.value.getQuill().getSelection();
249
+ u && u.length > 0 && x.value.getQuill().theme.tooltip.edit();
250
+ }, Ne = () => {
251
+ x.value.getQuill().format("blockquote", !R.value);
252
+ }, oe = (u) => {
253
+ const n = x.value.getQuill().getSelection();
254
+ n && (x.value.getQuill().clipboard.dangerouslyPasteHTML(n.index, `<img src="${u}" />`), ue.value = u, h("update:image", ue.value));
255
255
  }, He = () => {
256
- if (b.value.getQuill().getSelection() || b.value.getQuill().setSelection(b.value.getQuill().getLength() - 1), r.isCustomImageUpload) {
257
- if (!b.value.getQuill().getSelection()) return;
258
- y("upload-image", b.value);
256
+ if (x.value.getQuill().getSelection() || x.value.getQuill().setSelection(x.value.getQuill().getLength() - 1), r.isCustomImageUpload) {
257
+ if (!x.value.getQuill().getSelection()) return;
258
+ h("upload-image", x.value);
259
259
  return;
260
260
  }
261
- const c = document.createElement("input");
262
- c.type = "file", c.accept = "jpg,.jpeg,.png,.webp,.gif", c.onchange = () => {
263
- const o = c.files[0], x = new FileReader();
264
- x.onload = () => oe(x.result), x.readAsDataURL(o);
265
- }, c.click();
266
- }, Oe = (c) => /^data:image\/(png|jpg|jpeg|gif);base64,/.test(c), q = (c) => {
261
+ const u = document.createElement("input");
262
+ u.type = "file", u.accept = "jpg,.jpeg,.png,.webp,.gif", u.onchange = () => {
263
+ const n = u.files[0], b = new FileReader();
264
+ b.onload = () => oe(b.result), b.readAsDataURL(n);
265
+ }, u.click();
266
+ }, Oe = (u) => /^data:image\/(png|jpg|jpeg|gif);base64,/.test(u), F = (u) => {
267
267
  setTimeout(() => {
268
- var x;
269
- if (c) {
270
- const G = b.value.getHTML(), se = document.createElement("div");
271
- se.innerHTML = G;
268
+ var b;
269
+ if (u) {
270
+ const P = x.value.getHTML(), se = document.createElement("div");
271
+ se.innerHTML = P;
272
272
  let xe = se.getElementsByTagName("img");
273
273
  if (xe && xe.length > 0)
274
274
  for (let pe = 0; pe < xe.length; pe++) {
275
- const ke = (x = xe[pe]) == null ? void 0 : x.getAttribute("src");
276
- Oe(ke) && y("update:image", ke);
275
+ const ke = (b = xe[pe]) == null ? void 0 : b.getAttribute("src");
276
+ Oe(ke) && h("update:image", ke);
277
277
  }
278
278
  }
279
279
  }, 100);
280
- const { items: o } = c.clipboardData;
281
- o.length && o[0].getAsString((x) => {
282
- Oe(x) && (b.value.getQuill().getSelection() || b.value.getQuill().setSelection(b.value.getQuill().getLength() - 1));
280
+ const { items: n } = u.clipboardData;
281
+ n.length && n[0].getAsString((b) => {
282
+ Oe(b) && (x.value.getQuill().getSelection() || x.value.getQuill().setSelection(x.value.getQuill().getLength() - 1));
283
283
  });
284
284
  }, _ = () => {
285
- b.value.getQuill().theme.tooltip.edit("video");
286
- }, Ve = (c) => {
287
- b.value.getQuill().format("list", c), ae.value = c;
288
- }, he = (c = void 0) => {
289
- b.value.getQuill().format("align", c), ee.value = c;
285
+ x.value.getQuill().theme.tooltip.edit("video");
286
+ }, Ve = (u) => {
287
+ x.value.getQuill().format("list", u), ae.value = u;
288
+ }, ye = (u = void 0) => {
289
+ x.value.getQuill().format("align", u), ee.value = u;
290
290
  }, de = v(""), qe = () => {
291
- b.value.getQuill().format("color", de.value);
291
+ x.value.getQuill().format("color", de.value);
292
292
  };
293
293
  Je(() => {
294
294
  De(r.initialFontSize || r.fontSizes[0].value), Se.value = !0;
295
295
  });
296
- const ye = v(100), ce = v(!1), Te = (c) => {
297
- var x, G;
298
- ye.value = c;
299
- const o = (x = window.getSelection()) == null ? void 0 : x.focusNode;
300
- o && o.nodeName !== "#text" && (b.value.getQuill().format("width", `${ye.value}%`), (G = o == null ? void 0 : o.querySelector("img")) == null || G.setAttribute("style", "margin:auto;display:block;"));
301
- }, be = (c = "left") => {
302
- var x, G;
303
- const o = (x = window.getSelection()) == null ? void 0 : x.focusNode;
304
- if (o && o.nodeName !== "#text") {
296
+ const he = v(100), ce = v(!1), Te = (u) => {
297
+ var b, P;
298
+ he.value = u;
299
+ const n = (b = window.getSelection()) == null ? void 0 : b.focusNode;
300
+ n && n.nodeName !== "#text" && (x.value.getQuill().format("width", `${he.value}%`), (P = n == null ? void 0 : n.querySelector("img")) == null || P.setAttribute("style", "margin:auto;display:block;"));
301
+ }, be = (u = "left") => {
302
+ var b, P;
303
+ const n = (b = window.getSelection()) == null ? void 0 : b.focusNode;
304
+ if (n && n.nodeName !== "#text") {
305
305
  let se = "float:left";
306
- c == "center" ? se = "" : c == "right" && (se = "float:right"), (G = o == null ? void 0 : o.querySelector("img")) == null || G.setAttribute("style", `margin:auto;display:block;${se}`);
306
+ u == "center" ? se = "" : u == "right" && (se = "float:right"), (P = n == null ? void 0 : n.querySelector("img")) == null || P.setAttribute("style", `margin:auto;display:block;${se}`);
307
307
  }
308
308
  }, Me = () => {
309
- var o;
310
- const c = (o = window.getSelection()) == null ? void 0 : o.focusNode;
311
- ce.value = c.innerHTML && c.innerHTML.includes("<img");
312
- }, K = v(!1), F = v(3), Le = v(3), Fe = $e(() => {
313
- let c = [];
314
- for (let o = 1; o < 30; o++)
315
- c.push({
316
- label: o.toString(),
317
- value: o.toString()
309
+ var b, P;
310
+ const u = (b = window.getSelection()) == null ? void 0 : b.focusNode, n = (u == null ? void 0 : u.nodeType) === Node.ELEMENT_NODE ? u == null ? void 0 : u.innerHTML : (P = u == null ? void 0 : u.parentElement) == null ? void 0 : P.innerHTML;
311
+ ce.value = typeof n == "string" && (n == null ? void 0 : n.includes("<img"));
312
+ }, K = v(!1), G = v(3), Le = v(3), Fe = $e(() => {
313
+ let u = [];
314
+ for (let n = 1; n < 30; n++)
315
+ u.push({
316
+ label: n.toString(),
317
+ value: n.toString()
318
318
  });
319
- return c;
319
+ return u;
320
320
  }), Ge = $e(() => {
321
- let c = [];
322
- for (let o = 1; o < 12; o++)
323
- c.push({
324
- label: o.toString(),
325
- value: o.toString()
321
+ let u = [];
322
+ for (let n = 1; n < 12; n++)
323
+ u.push({
324
+ label: n.toString(),
325
+ value: n.toString()
326
326
  });
327
- return c;
327
+ return u;
328
328
  }), Ye = () => {
329
- let c = b.value.getQuill().getModule("better-table");
330
- c == null || c.insertTable(parseInt(F.value), parseInt(Le.value)), K.value = !1;
329
+ let u = x.value.getQuill().getModule("better-table");
330
+ u == null || u.insertTable(parseInt(G.value), parseInt(Le.value)), K.value = !1;
331
331
  };
332
332
  return fe(
333
333
  () => r.modelValue,
334
- (c) => {
335
- c || b.value.getQuill().setContents([], "silent");
334
+ (u) => {
335
+ u || x.value.getQuill().setContents([], "silent");
336
336
  }
337
- ), (c, o) => (m(), P(w(st), {
338
- label: n.label,
339
- hint: n.hint,
340
- "error-message": n.errorMessage,
341
- "is-required": n.isRequired,
342
- "label-icon": n.labelIcon,
343
- "tooltip-text": n.tooltipText,
344
- "tooltip-options": n.tooltipOptions
337
+ ), (u, n) => (m(), N(w(st), {
338
+ label: o.label,
339
+ hint: o.hint,
340
+ "error-message": o.errorMessage,
341
+ "is-required": o.isRequired,
342
+ "label-icon": o.labelIcon,
343
+ "tooltip-text": o.tooltipText,
344
+ "tooltip-options": o.tooltipOptions
345
345
  }, {
346
346
  default: W(() => [
347
- (m(), P(mt, { to: "body" }, [
347
+ (m(), N(mt, { to: "body" }, [
348
348
  L(w(xt), {
349
349
  size: "small",
350
350
  title: "Insert table",
351
351
  modelValue: K.value,
352
- "onUpdate:modelValue": o[2] || (o[2] = (x) => K.value = x),
352
+ "onUpdate:modelValue": n[2] || (n[2] = (b) => K.value = b),
353
353
  class: "!w-full !h-full",
354
354
  confirmButtonProps: {
355
355
  label: "Save",
@@ -359,14 +359,14 @@ const It = { key: 1 }, Vt = {
359
359
  default: W(() => [
360
360
  L(w(Ze), {
361
361
  modelValue: Le.value,
362
- "onUpdate:modelValue": o[0] || (o[0] = (x) => Le.value = x),
362
+ "onUpdate:modelValue": n[0] || (n[0] = (b) => Le.value = b),
363
363
  options: Ge.value,
364
364
  label: "Table cell",
365
365
  class: "mb-3"
366
366
  }, null, 8, ["modelValue", "options"]),
367
367
  L(w(Ze), {
368
- modelValue: F.value,
369
- "onUpdate:modelValue": o[1] || (o[1] = (x) => F.value = x),
368
+ modelValue: G.value,
369
+ "onUpdate:modelValue": n[1] || (n[1] = (b) => G.value = b),
370
370
  options: Fe.value,
371
371
  label: "Table rows"
372
372
  }, null, 8, ["modelValue", "options"])
@@ -374,16 +374,16 @@ const It = { key: 1 }, Vt = {
374
374
  _: 1
375
375
  }, 8, ["modelValue", "confirmButtonProps"])
376
376
  ])),
377
- h("div", {
378
- class: Q(["grid", { "has-error": n.errorMessage }]),
377
+ y("div", {
378
+ class: Q(["grid", { "has-error": o.errorMessage }]),
379
379
  onClick: Me
380
380
  }, [
381
- z.value ? (m(), P(w(bt), {
381
+ z.value ? (m(), N(w(bt), {
382
382
  key: 0,
383
383
  id: `#${z.value}`,
384
384
  ref_key: "quill",
385
- ref: b,
386
- content: n.modelValue,
385
+ ref: x,
386
+ content: o.modelValue,
387
387
  options: {
388
388
  bounds: `#${z.value}`
389
389
  },
@@ -391,54 +391,54 @@ const It = { key: 1 }, Vt = {
391
391
  theme: "snow",
392
392
  "content-type": "html",
393
393
  class: "min-h-[200px]",
394
- placeholder: n.placeholder,
394
+ placeholder: o.placeholder,
395
395
  "onUpdate:content": ie,
396
- onPaste: q
396
+ onPaste: F
397
397
  }, {
398
398
  toolbar: W(() => [
399
- h("div", {
399
+ y("div", {
400
400
  id: z.value,
401
401
  class: "flex min-h-[36px] flex-wrap !py-2 !px-3 gap-y-2 rounded-t"
402
402
  }, [
403
- f.value.includes("changes") ? (m(), U(ge, { key: 0 }, [
404
- h("div", Lt, [
403
+ f.value.includes("changes") ? (m(), E(ge, { key: 0 }, [
404
+ y("div", Lt, [
405
405
  L(w(A), {
406
- class: Q(E.value ? "text-oc-text cursor-pointer" : "text-oc-text-300"),
406
+ class: Q(U.value ? "text-oc-text cursor-pointer" : "text-oc-text-300"),
407
407
  width: "20",
408
408
  height: "20",
409
409
  name: "text-editor/undo",
410
- onClick: Ue
410
+ onClick: Ee
411
411
  }, null, 8, ["class"]),
412
412
  L(w(A), {
413
- class: Q(N.value ? "text-oc-text cursor-pointer" : "text-oc-text-300"),
413
+ class: Q(X.value ? "text-oc-text cursor-pointer" : "text-oc-text-300"),
414
414
  width: "20",
415
415
  height: "20",
416
416
  name: "text-editor/redo",
417
- onClick: Ee
417
+ onClick: Ue
418
418
  }, null, 8, ["class"])
419
419
  ]),
420
- o[16] || (o[16] = h("div", { class: "border-l border-oc-gray-200" }, null, -1))
420
+ n[16] || (n[16] = y("div", { class: "border-l border-oc-gray-200" }, null, -1))
421
421
  ], 64)) : H("", !0),
422
- f.value.includes("font-size") ? (m(), U(ge, { key: 1 }, [
422
+ f.value.includes("font-size") ? (m(), E(ge, { key: 1 }, [
423
423
  L(w(rt), {
424
424
  modelValue: j.value,
425
- "onUpdate:modelValue": o[3] || (o[3] = (x) => j.value = x),
425
+ "onUpdate:modelValue": n[3] || (n[3] = (b) => j.value = b),
426
426
  class: "px-5"
427
427
  }, {
428
428
  menu: W(() => [
429
- h("div", Rt, [
430
- (m(!0), U(ge, null, Ke(n.fontSizes, (x) => (m(), U("div", {
431
- key: x.value,
432
- class: Q(["min-w-[120px] cursor-pointer py-2 px-3 hover:bg-oc-gray-50", X.value === x.value ? "font-medium" : ""]),
433
- onClick: (G) => De(x.value)
434
- }, Ne(x.label), 11, Ut))), 128))
429
+ y("div", Rt, [
430
+ (m(!0), E(ge, null, Ke(o.fontSizes, (b) => (m(), E("div", {
431
+ key: b.value,
432
+ class: Q(["min-w-[120px] cursor-pointer py-2 px-3 hover:bg-oc-gray-50", q.value === b.value ? "font-medium" : ""]),
433
+ onClick: (P) => De(b.value)
434
+ }, Pe(b.label), 11, Et))), 128))
435
435
  ])
436
436
  ]),
437
437
  default: W(() => {
438
- var x;
438
+ var b;
439
439
  return [
440
- h("div", Bt, [
441
- ve(Ne((x = n.fontSizes.find((G) => G.value === X.value)) == null ? void 0 : x.label) + " ", 1),
440
+ y("div", Bt, [
441
+ ve(Pe((b = o.fontSizes.find((P) => P.value === q.value)) == null ? void 0 : b.label) + " ", 1),
442
442
  L(w(A), {
443
443
  width: "20",
444
444
  height: "20",
@@ -450,10 +450,10 @@ const It = { key: 1 }, Vt = {
450
450
  }),
451
451
  _: 1
452
452
  }, 8, ["modelValue"]),
453
- o[17] || (o[17] = h("div", { class: "border-l border-oc-gray-200" }, null, -1))
453
+ n[17] || (n[17] = y("div", { class: "border-l border-oc-gray-200" }, null, -1))
454
454
  ], 64)) : H("", !0),
455
- f.value.includes("font-style") ? (m(), U(ge, { key: 2 }, [
456
- h("div", Et, [
455
+ f.value.includes("font-style") ? (m(), E(ge, { key: 2 }, [
456
+ y("div", Ut, [
457
457
  L(w(A), {
458
458
  class: Q(["cursor-pointer", D.value ? "text-oc-text" : "text-oc-text-300"]),
459
459
  width: "20",
@@ -476,10 +476,10 @@ const It = { key: 1 }, Vt = {
476
476
  onClick: Ie
477
477
  }, null, 8, ["class"])
478
478
  ]),
479
- o[18] || (o[18] = h("div", { class: "border-l border-oc-gray-200" }, null, -1))
479
+ n[18] || (n[18] = y("div", { class: "border-l border-oc-gray-200" }, null, -1))
480
480
  ], 64)) : H("", !0),
481
- h("div", Dt, [
482
- f.value.includes("link") ? (m(), P(w(A), {
481
+ y("div", Dt, [
482
+ f.value.includes("link") ? (m(), N(w(A), {
483
483
  key: 0,
484
484
  class: "cursor-pointer",
485
485
  width: "20",
@@ -487,7 +487,7 @@ const It = { key: 1 }, Vt = {
487
487
  name: "text-editor/link",
488
488
  onClick: me
489
489
  })) : H("", !0),
490
- f.value.includes("image") ? (m(), P(w(A), {
490
+ f.value.includes("image") ? (m(), N(w(A), {
491
491
  key: 1,
492
492
  class: "cursor-pointer",
493
493
  width: "20",
@@ -495,15 +495,15 @@ const It = { key: 1 }, Vt = {
495
495
  name: "text-editor/image",
496
496
  onClick: He
497
497
  })) : H("", !0),
498
- f.value.includes("quote") ? (m(), P(w(A), {
498
+ f.value.includes("quote") ? (m(), N(w(A), {
499
499
  key: 2,
500
500
  class: Q(["cursor-pointer", R.value ? "text-oc-text" : "text-oc-text-300"]),
501
501
  width: "20",
502
502
  height: "20",
503
503
  name: "text-editor/quote",
504
- onClick: Xe
504
+ onClick: Ne
505
505
  }, null, 8, ["class"])) : H("", !0),
506
- f.value.includes("media") ? (m(), P(w(A), {
506
+ f.value.includes("media") ? (m(), N(w(A), {
507
507
  key: 3,
508
508
  class: "cursor-pointer",
509
509
  width: "20",
@@ -516,77 +516,77 @@ const It = { key: 1 }, Vt = {
516
516
  width: "20",
517
517
  height: "20",
518
518
  name: "table",
519
- onClick: o[4] || (o[4] = (x) => K.value = !K.value)
519
+ onClick: n[4] || (n[4] = (b) => K.value = !K.value)
520
520
  })
521
521
  ]),
522
- f.value.includes("list") ? (m(), U(ge, { key: 3 }, [
523
- o[19] || (o[19] = h("div", { class: "border-l border-oc-gray-200" }, null, -1)),
524
- h("div", Ht, [
522
+ f.value.includes("list") ? (m(), E(ge, { key: 3 }, [
523
+ n[19] || (n[19] = y("div", { class: "border-l border-oc-gray-200" }, null, -1)),
524
+ y("div", Ht, [
525
525
  L(w(A), {
526
526
  class: Q(["cursor-pointer", ae.value === "bullet" ? "text-oc-text" : "text-oc-text-300"]),
527
527
  width: "20",
528
528
  height: "20",
529
529
  name: "text-editor/bullet",
530
- onClick: o[5] || (o[5] = (x) => Ve("bullet"))
530
+ onClick: n[5] || (n[5] = (b) => Ve("bullet"))
531
531
  }, null, 8, ["class"]),
532
532
  L(w(A), {
533
533
  class: Q(["cursor-pointer", ae.value === "ordered" ? "text-oc-text" : "text-oc-text-300"]),
534
534
  width: "20",
535
535
  height: "20",
536
536
  name: "text-editor/number",
537
- onClick: o[6] || (o[6] = (x) => Ve("ordered"))
537
+ onClick: n[6] || (n[6] = (b) => Ve("ordered"))
538
538
  }, null, 8, ["class"])
539
539
  ])
540
540
  ], 64)) : H("", !0),
541
- f.value.includes("alignment") ? (m(), U(ge, { key: 4 }, [
542
- o[20] || (o[20] = h("div", { class: "border-l border-oc-gray-200" }, null, -1)),
543
- h("div", Ot, [
541
+ f.value.includes("alignment") ? (m(), E(ge, { key: 4 }, [
542
+ n[20] || (n[20] = y("div", { class: "border-l border-oc-gray-200" }, null, -1)),
543
+ y("div", Ot, [
544
544
  L(w(A), {
545
545
  class: Q(["cursor-pointer", ee.value ? "text-oc-text-300" : "text-oc-text"]),
546
546
  width: "20",
547
547
  height: "20",
548
548
  name: "text-editor/left",
549
- onClick: o[7] || (o[7] = (x) => he())
549
+ onClick: n[7] || (n[7] = (b) => ye())
550
550
  }, null, 8, ["class"]),
551
551
  L(w(A), {
552
552
  class: Q(["cursor-pointer", ee.value === "center" ? "text-oc-text" : "text-oc-text-300"]),
553
553
  width: "20",
554
554
  height: "20",
555
555
  name: "text-editor/center",
556
- onClick: o[8] || (o[8] = (x) => he("center"))
556
+ onClick: n[8] || (n[8] = (b) => ye("center"))
557
557
  }, null, 8, ["class"]),
558
558
  L(w(A), {
559
559
  class: Q(["cursor-pointer", ee.value === "right" ? "text-oc-text" : "text-oc-text-300"]),
560
560
  width: "20",
561
561
  height: "20",
562
562
  name: "text-editor/right",
563
- onClick: o[9] || (o[9] = (x) => he("right"))
563
+ onClick: n[9] || (n[9] = (b) => ye("right"))
564
564
  }, null, 8, ["class"]),
565
565
  L(w(A), {
566
566
  class: Q(["cursor-pointer", ee.value === "justify" ? "text-oc-text" : "text-oc-text-300"]),
567
567
  width: "20",
568
568
  height: "20",
569
569
  name: "text-editor/justify",
570
- onClick: o[10] || (o[10] = (x) => he("justify"))
570
+ onClick: n[10] || (n[10] = (b) => ye("justify"))
571
571
  }, null, 8, ["class"])
572
572
  ])
573
573
  ], 64)) : H("", !0),
574
- o[22] || (o[22] = h("div", { class: "border-l border-oc-gray-200" }, null, -1)),
575
- h("div", Mt, [
574
+ n[22] || (n[22] = y("div", { class: "border-l border-oc-gray-200" }, null, -1)),
575
+ y("div", Mt, [
576
576
  L(w(Vt), {
577
577
  modelValue: de.value,
578
578
  "onUpdate:modelValue": [
579
- o[11] || (o[11] = (x) => de.value = x),
579
+ n[11] || (n[11] = (b) => de.value = b),
580
580
  qe
581
581
  ],
582
582
  "hide-input-color": ""
583
583
  }, {
584
584
  "picker-icon": W(() => [
585
- h("div", Qt, [
586
- h("div", {
585
+ y("div", Qt, [
586
+ y("div", {
587
587
  style: te(`color:${de.value}`)
588
588
  }, "A", 4),
589
- h("div", {
589
+ y("div", {
590
590
  class: "h-[5px] w-full rounded border",
591
591
  style: te(`background:${de.value}`)
592
592
  }, null, 4)
@@ -595,50 +595,50 @@ const It = { key: 1 }, Vt = {
595
595
  _: 1
596
596
  }, 8, ["modelValue"])
597
597
  ]),
598
- o[23] || (o[23] = h("div", { class: "border-l border-oc-gray-200" }, null, -1)),
599
- ce.value ? (m(), U("div", At, [
598
+ n[23] || (n[23] = y("div", { class: "border-l border-oc-gray-200" }, null, -1)),
599
+ ce.value ? (m(), E("div", At, [
600
600
  L(w(Ae), {
601
601
  label: "Image width",
602
602
  class: "w-[120px]",
603
- "model-value": ye.value,
603
+ "model-value": he.value,
604
604
  "min-limit": 0,
605
605
  "max-limit": 100,
606
606
  "onUpdate:modelValue": Te
607
607
  }, null, 8, ["model-value"]),
608
- h("div", Nt, [
608
+ y("div", Pt, [
609
609
  L(w(A), {
610
610
  class: "cursor-pointer",
611
611
  width: "20",
612
612
  height: "20",
613
613
  name: "text-editor/left",
614
- onClick: o[12] || (o[12] = (x) => be())
614
+ onClick: n[12] || (n[12] = (b) => be())
615
615
  }),
616
616
  L(w(A), {
617
617
  class: "cursor-pointer",
618
618
  width: "20",
619
619
  height: "20",
620
620
  name: "text-editor/center",
621
- onClick: o[13] || (o[13] = (x) => be("center"))
621
+ onClick: n[13] || (n[13] = (b) => be("center"))
622
622
  }),
623
623
  L(w(A), {
624
624
  class: "cursor-pointer",
625
625
  width: "20",
626
626
  height: "20",
627
627
  name: "text-editor/right",
628
- onClick: o[14] || (o[14] = (x) => be("right"))
628
+ onClick: n[14] || (n[14] = (b) => be("right"))
629
629
  })
630
630
  ])
631
631
  ])) : H("", !0),
632
- h("div", Pt, [
633
- (m(), U("svg", {
632
+ y("div", Xt, [
633
+ (m(), E("svg", {
634
634
  width: "20",
635
635
  height: "20",
636
636
  viewBox: "0 0 15 15",
637
637
  fill: "none",
638
638
  xmlns: "http://www.w3.org/2000/svg",
639
- onClick: o[15] || (o[15] = (x) => Pe())
640
- }, o[21] || (o[21] = [
641
- h("path", {
639
+ onClick: n[15] || (n[15] = (b) => Xe())
640
+ }, n[21] || (n[21] = [
641
+ y("path", {
642
642
  "fill-rule": "evenodd",
643
643
  "clip-rule": "evenodd",
644
644
  d: "M2 7.5C2 7.22386 2.22386 7 2.5 7H12.5C12.7761 7 13 7.22386 13 7.5C13 7.77614 12.7761 8 12.5 8H2.5C2.22386 8 2 7.77614 2 7.5Z",
@@ -655,7 +655,7 @@ const It = { key: 1 }, Vt = {
655
655
  _: 1
656
656
  }, 8, ["label", "hint", "error-message", "is-required", "label-icon", "tooltip-text", "tooltip-options"]));
657
657
  }
658
- }, Xt = {
658
+ }, Nt = {
659
659
  __name: "InputHex",
660
660
  props: {
661
661
  modelValue: {
@@ -665,14 +665,14 @@ const It = { key: 1 }, Vt = {
665
665
  emits: {
666
666
  "update:modelValue": []
667
667
  },
668
- setup(n, { emit: V }) {
669
- const r = n, y = V, u = v(""), f = (p) => {
670
- u.value = p, u.value = `#${p.replace(/#/g, "")}`;
668
+ setup(o, { emit: V }) {
669
+ const r = o, h = V, d = v(""), f = (p) => {
670
+ d.value = p, d.value = `#${p.replace(/#/g, "")}`;
671
671
  }, C = () => {
672
- let p = u.value;
672
+ let p = d.value;
673
673
  if (p === r.modelValue) return;
674
674
  if (!/^#[0-9a-fA-F]+$/.test(p)) {
675
- u.value = r.modelValue;
675
+ d.value = r.modelValue;
676
676
  return;
677
677
  }
678
678
  let a = p.replace(/#/g, "");
@@ -694,18 +694,18 @@ const It = { key: 1 }, Vt = {
694
694
  default:
695
695
  a = a.slice(0, 6);
696
696
  }
697
- u.value = `#${a.toUpperCase()}`, y("update:modelValue", u.value);
697
+ d.value = `#${a.toUpperCase()}`, h("update:modelValue", d.value);
698
698
  };
699
699
  return fe(
700
700
  () => r.modelValue,
701
701
  (p, a) => {
702
- p !== a && (u.value = p);
702
+ p !== a && (d.value = p);
703
703
  },
704
704
  { immediate: !0 }
705
- ), (p, a) => (m(), P(w(we), {
705
+ ), (p, a) => (m(), N(w(we), {
706
706
  class: "w-[158px]",
707
707
  placeholder: "#FFFFFF",
708
- "model-value": u.value,
708
+ "model-value": d.value,
709
709
  "onUpdate:modelValue": f,
710
710
  onBlur: C,
711
711
  onKeyup: ot(C, ["enter"])
@@ -729,77 +729,77 @@ const It = { key: 1 }, Vt = {
729
729
  "update-rgb-value": [],
730
730
  "update-hsl-value": []
731
731
  },
732
- setup(n, { emit: V }) {
733
- const r = n, y = V, u = v({
732
+ setup(o, { emit: V }) {
733
+ const r = o, h = V, d = v({
734
734
  r: 0,
735
735
  g: 0,
736
736
  b: 0
737
737
  }), f = v(), C = v(), p = v(), a = (M, T) => {
738
- var z, E, N;
738
+ var z, U, X;
739
739
  let B = 255;
740
740
  if (r.inputType == "HSL" && (B = 100, M == "r" && (B = 360)), !isNaN(parseInt(T))) {
741
741
  if (M == "r") {
742
742
  let D = parseInt(T);
743
- D <= B && (u.value.r = D, r.inputType == "RGB" ? O("r") : Z()), (z = f.value) == null || z.focus();
743
+ D <= B && (d.value.r = D, r.inputType == "RGB" ? O("r") : Z()), (z = f.value) == null || z.focus();
744
744
  } else if (M == "g") {
745
745
  let D = parseInt(T);
746
- D <= B && (u.value.g = D, r.inputType == "RGB" ? O("g") : Z()), (E = C.value) == null || E.focus();
746
+ D <= B && (d.value.g = D, r.inputType == "RGB" ? O("g") : Z()), (U = C.value) == null || U.focus();
747
747
  } else if (M == "b") {
748
748
  let D = parseInt(T);
749
- D <= B && (u.value.b = D, r.inputType == "RGB" ? O("b") : Z()), (N = p.value) == null || N.focus();
749
+ D <= B && (d.value.b = D, r.inputType == "RGB" ? O("b") : Z()), (X = p.value) == null || X.focus();
750
750
  }
751
751
  }
752
752
  }, O = (M) => {
753
- y("update-rgb-value", {
753
+ h("update-rgb-value", {
754
754
  type: M,
755
755
  value: {
756
- r: parseInt(u.value.r),
757
- g: parseInt(u.value.g),
758
- b: parseInt(u.value.b)
756
+ r: parseInt(d.value.r),
757
+ g: parseInt(d.value.g),
758
+ b: parseInt(d.value.b)
759
759
  }
760
760
  });
761
761
  }, Z = () => {
762
- y("update-hsl-value", {
763
- h: parseInt(u.value.r),
764
- s: parseInt(u.value.g),
765
- l: parseInt(u.value.b)
762
+ h("update-hsl-value", {
763
+ h: parseInt(d.value.r),
764
+ s: parseInt(d.value.g),
765
+ l: parseInt(d.value.b)
766
766
  });
767
767
  };
768
768
  return r.inputType === "RGB" ? fe(
769
769
  () => r.rgbValue,
770
770
  (M, T) => {
771
- M !== T && (u.value = M);
771
+ M !== T && (d.value = M);
772
772
  },
773
773
  { immediate: !0, deep: !0 }
774
774
  ) : fe(
775
775
  () => r.hslValue,
776
776
  (M) => {
777
- u.value = {
777
+ d.value = {
778
778
  r: M.h,
779
779
  g: M.s,
780
780
  b: M.l
781
781
  };
782
782
  },
783
783
  { immediate: !0, deep: !0 }
784
- ), (M, T) => (m(), U("div", qt, [
784
+ ), (M, T) => (m(), E("div", qt, [
785
785
  L(w(we), {
786
786
  ref_key: "rInputEl",
787
787
  ref: f,
788
- "model-value": u.value.r,
788
+ "model-value": d.value.r,
789
789
  placeholder: "100",
790
790
  "onUpdate:modelValue": T[0] || (T[0] = (B) => a("r", B))
791
791
  }, null, 8, ["model-value"]),
792
792
  L(w(we), {
793
793
  ref_key: "gInputEl",
794
794
  ref: C,
795
- "model-value": u.value.g,
795
+ "model-value": d.value.g,
796
796
  placeholder: "100",
797
797
  "onUpdate:modelValue": T[1] || (T[1] = (B) => a("g", B))
798
798
  }, null, 8, ["model-value"]),
799
799
  L(w(we), {
800
800
  ref_key: "bInputEl",
801
801
  ref: p,
802
- "model-value": u.value.b,
802
+ "model-value": d.value.b,
803
803
  placeholder: "100",
804
804
  "onUpdate:modelValue": T[2] || (T[2] = (B) => a("b", B))
805
805
  }, null, 8, ["model-value"])
@@ -815,23 +815,23 @@ const It = { key: 1 }, Vt = {
815
815
  emits: {
816
816
  "update:modelValue": []
817
817
  },
818
- setup(n, { emit: V }) {
819
- const r = n, y = V, u = v(""), f = (p) => {
820
- u.value = p;
818
+ setup(o, { emit: V }) {
819
+ const r = o, h = V, d = v(""), f = (p) => {
820
+ d.value = p;
821
821
  }, C = () => {
822
- let p = parseInt(u.value);
823
- p && p <= 100 ? y("update:modelValue", p) : u.value = r.modelValue;
822
+ let p = parseInt(d.value);
823
+ p && p <= 100 ? h("update:modelValue", p) : d.value = r.modelValue;
824
824
  };
825
825
  return fe(
826
826
  () => r.modelValue,
827
827
  (p, a) => {
828
- p !== a && (u.value = p);
828
+ p !== a && (d.value = p);
829
829
  },
830
830
  { immediate: !0 }
831
- ), (p, a) => (m(), P(w(we), {
831
+ ), (p, a) => (m(), N(w(we), {
832
832
  class: "w-[75px]",
833
833
  placeholder: "100",
834
- "model-value": u.value,
834
+ "model-value": d.value,
835
835
  "onUpdate:modelValue": f,
836
836
  onBlur: C,
837
837
  onKeyup: ot(C, ["enter"])
@@ -848,13 +848,13 @@ const It = { key: 1 }, Vt = {
848
848
  modelValue: { default: "RGB", type: String }
849
849
  },
850
850
  emits: ["update:model-value"],
851
- setup(n, { emit: V }) {
852
- const y = v(n.modelValue), u = V, f = (C) => {
853
- y.value = C, u("update:model-value", C);
851
+ setup(o, { emit: V }) {
852
+ const h = v(o.modelValue), d = V, f = (C) => {
853
+ h.value = C, d("update:model-value", C);
854
854
  };
855
- return (C, p) => (m(), P(w(Ze), {
855
+ return (C, p) => (m(), N(w(Ze), {
856
856
  class: "!w-[80px]",
857
- "model-value": y.value,
857
+ "model-value": h.value,
858
858
  options: [
859
859
  {
860
860
  label: "HEX",
@@ -878,21 +878,21 @@ const It = { key: 1 }, Vt = {
878
878
  modelValue: { default: 0, type: Number }
879
879
  },
880
880
  emits: ["update:modelValue", "onInput"],
881
- setup(n, { emit: V }) {
882
- const r = Re("opacitySlider"), y = V, u = (f) => {
883
- y("update:modelValue", parseInt(f.target.value)), y("onInput", f);
881
+ setup(o, { emit: V }) {
882
+ const r = Re("opacitySlider"), h = V, d = (f) => {
883
+ h("update:modelValue", parseInt(f.target.value)), h("onInput", f);
884
884
  };
885
- return (f, C) => (m(), U("div", Yt, [
886
- h("div", Wt, [
887
- h("input", {
885
+ return (f, C) => (m(), E("div", Yt, [
886
+ y("div", Wt, [
887
+ y("input", {
888
888
  ref_key: "opacitySlider",
889
889
  ref: r,
890
- value: n.modelValue,
890
+ value: o.modelValue,
891
891
  class: "opacity__slider",
892
892
  type: "range",
893
893
  min: "0",
894
894
  max: "100",
895
- onInput: u
895
+ onInput: d
896
896
  }, null, 40, zt)
897
897
  ])
898
898
  ]));
@@ -903,27 +903,27 @@ const It = { key: 1 }, Vt = {
903
903
  gradientType: String
904
904
  },
905
905
  emits: ["onAddColor", "onMouseDown", "onDeleteColor"],
906
- setup(n, { emit: V }) {
907
- const r = Re("gradientBar"), y = v(), u = V, f = (T) => {
906
+ setup(o, { emit: V }) {
907
+ const r = Re("gradientBar"), h = v(), d = V, f = (T) => {
908
908
  T.preventDefault();
909
909
  }, C = v("left:0"), p = v(!1), a = (T) => {
910
- u("onMouseDown", T);
910
+ d("onMouseDown", T);
911
911
  }, O = () => {
912
- let T = y.value.querySelector(".select");
912
+ let T = h.value.querySelector(".select");
913
913
  C.value = T == null ? void 0 : T.getAttribute("style");
914
914
  }, Z = () => {
915
915
  var B;
916
- O(), (((B = y.value.querySelectorAll(".gradient-handle")) == null ? void 0 : B.length) ?? 2) > 2 ? p.value = !0 : p.value = !1;
916
+ O(), (((B = h.value.querySelectorAll(".gradient-handle")) == null ? void 0 : B.length) ?? 2) > 2 ? p.value = !0 : p.value = !1;
917
917
  }, M = (T) => {
918
- p.value = !1, u("onAddColor", T);
918
+ p.value = !1, d("onAddColor", T);
919
919
  };
920
- return (T, B) => (m(), U("div", {
920
+ return (T, B) => (m(), E("div", {
921
921
  ref_key: "gradientSlider",
922
- ref: y,
922
+ ref: h,
923
923
  class: "relative h-[40px]",
924
924
  onClick: Z
925
925
  }, [
926
- h("button", {
926
+ y("button", {
927
927
  type: "button",
928
928
  class: Q(["absolute top-[-18px] text-oc-accent-3 rounded-[4px] border-2 border-oc-gray-200 p-2 bg-oc-bg-light", p.value ? "" : "!hidden"]),
929
929
  style: te(C.value),
@@ -935,15 +935,15 @@ const It = { key: 1 }, Vt = {
935
935
  height: "14"
936
936
  })
937
937
  ], 6),
938
- h("div", {
938
+ y("div", {
939
939
  class: Q(["gradient-bar", {
940
- "mt-[20px]": n.gradientType === "linear",
941
- "mt-[12px]": n.gradientType === "radial"
940
+ "mt-[20px]": o.gradientType === "linear",
941
+ "mt-[12px]": o.gradientType === "radial"
942
942
  }]),
943
943
  onMousedown: a,
944
944
  onDragstart: f
945
945
  }, [
946
- h("div", {
946
+ y("div", {
947
947
  ref_key: "gradientBar",
948
948
  ref: r,
949
949
  class: "gradient-container",
@@ -958,20 +958,20 @@ const It = { key: 1 }, Vt = {
958
958
  modelValue: { default: 0, type: Number }
959
959
  },
960
960
  emits: ["update:modelValue", "onInput", "onChange"],
961
- setup(n, { emit: V }) {
962
- const r = V, y = (u) => {
963
- r("update:modelValue", parseFloat(u.target.value)), r("onInput", u);
961
+ setup(o, { emit: V }) {
962
+ const r = V, h = (d) => {
963
+ r("update:modelValue", parseFloat(d.target.value)), r("onInput", d);
964
964
  };
965
- return (u, f) => (m(), U("div", Zt, [
966
- h("input", {
967
- value: n.modelValue,
965
+ return (d, f) => (m(), E("div", Zt, [
966
+ y("input", {
967
+ value: o.modelValue,
968
968
  class: "picker-hue-range-slider",
969
969
  type: "range",
970
970
  min: "0",
971
971
  max: "360",
972
972
  step: "0.1",
973
- onInput: y,
974
- onChange: f[0] || (f[0] = (C) => u.$emit("onChange", C))
973
+ onInput: h,
974
+ onChange: f[0] || (f[0] = (C) => d.$emit("onChange", C))
975
975
  }, null, 40, Jt)
976
976
  ]));
977
977
  }
@@ -991,30 +991,30 @@ const It = { key: 1 }, Vt = {
991
991
  percentageY: { default: 50, type: Number }
992
992
  },
993
993
  emits: ["update:angle", "update:percentageX", "update:percentageY", "onInput"],
994
- setup(n, { emit: V }) {
995
- const r = v(!1), y = v(!1);
994
+ setup(o, { emit: V }) {
995
+ const r = v(!1), h = v(!1);
996
996
  Je(() => {
997
- r.value = !0, y.value = !0;
997
+ r.value = !0, h.value = !0;
998
998
  });
999
- const u = V, f = (C, p) => {
999
+ const d = V, f = (C, p) => {
1000
1000
  let a = parseInt(C);
1001
1001
  switch (p) {
1002
1002
  case "angle":
1003
- C > 360 ? a = 360 : C < 0 && (a = 0), u("update:angle", a), u("onInput");
1003
+ C > 360 ? a = 360 : C < 0 && (a = 0), d("update:angle", a), d("onInput");
1004
1004
  break;
1005
1005
  case "percentageX":
1006
- C > 100 ? a = 100 : C < 0 && (a = 0), u("update:percentageX", a), u("onInput");
1006
+ C > 100 ? a = 100 : C < 0 && (a = 0), d("update:percentageX", a), d("onInput");
1007
1007
  break;
1008
1008
  case "percentageY":
1009
- C > 100 ? a = 100 : C < 0 && (a = 0), u("update:percentageY", a), u("onInput");
1009
+ C > 100 ? a = 100 : C < 0 && (a = 0), d("update:percentageY", a), d("onInput");
1010
1010
  break;
1011
1011
  }
1012
1012
  };
1013
- return (C, p) => (m(), U("div", el, [
1014
- n.gradientType == "linear" && r.value ? (m(), P(w(Ae), {
1013
+ return (C, p) => (m(), E("div", el, [
1014
+ o.gradientType == "linear" && r.value ? (m(), N(w(Ae), {
1015
1015
  key: 0,
1016
1016
  label: "Angle",
1017
- "model-value": n.angle,
1017
+ "model-value": o.angle,
1018
1018
  "min-limit": 0,
1019
1019
  "max-limit": 360,
1020
1020
  "onUpdate:modelValue": p[0] || (p[0] = (a) => f(a, "angle"))
@@ -1024,14 +1024,14 @@ const It = { key: 1 }, Vt = {
1024
1024
  ])),
1025
1025
  "max-limit-label": W(() => p[4] || (p[4] = [
1026
1026
  ve("360"),
1027
- h("span", null, "°", -1)
1027
+ y("span", null, "°", -1)
1028
1028
  ])),
1029
1029
  _: 1
1030
1030
  }, 8, ["model-value"])) : H("", !0),
1031
- n.gradientType == "radial" && y.value ? (m(), U("div", tl, [
1031
+ o.gradientType == "radial" && h.value ? (m(), E("div", tl, [
1032
1032
  L(w(Ae), {
1033
1033
  label: "Position X",
1034
- "model-value": n.percentageX,
1034
+ "model-value": o.percentageX,
1035
1035
  "min-limit": 0,
1036
1036
  "max-limit": 100,
1037
1037
  "onUpdate:modelValue": p[1] || (p[1] = (a) => f(a, "percentageX"))
@@ -1046,7 +1046,7 @@ const It = { key: 1 }, Vt = {
1046
1046
  }, 8, ["model-value"]),
1047
1047
  L(w(Ae), {
1048
1048
  label: "Position Y",
1049
- "model-value": n.percentageY,
1049
+ "model-value": o.percentageY,
1050
1050
  "min-limit": 0,
1051
1051
  "max-limit": 100,
1052
1052
  "onUpdate:modelValue": p[2] || (p[2] = (a) => f(a, "percentageY"))
@@ -1065,26 +1065,26 @@ const It = { key: 1 }, Vt = {
1065
1065
  }, al = {
1066
1066
  __name: "PickerWrap",
1067
1067
  emits: ["onMouseDown"],
1068
- setup(n) {
1069
- const V = Re("canvas"), r = Re("pickerWrap"), y = Re("pickerPointer"), u = (f) => {
1068
+ setup(o) {
1069
+ const V = Re("canvas"), r = Re("pickerWrap"), h = Re("pickerPointer"), d = (f) => {
1070
1070
  f.preventDefault();
1071
1071
  };
1072
- return (f, C) => (m(), U("div", {
1072
+ return (f, C) => (m(), E("div", {
1073
1073
  ref_key: "pickerWrap",
1074
1074
  ref: r,
1075
1075
  class: "cp-picker-wrap",
1076
1076
  onMousedown: C[0] || (C[0] = (p) => f.$emit("onMouseDown", p)),
1077
- onDragstart: u
1077
+ onDragstart: d
1078
1078
  }, [
1079
- h("canvas", {
1079
+ y("canvas", {
1080
1080
  ref_key: "canvas",
1081
1081
  ref: V,
1082
1082
  class: "colour-area"
1083
1083
  }, null, 512),
1084
- C[1] || (C[1] = h("div", { class: "colour-area-mask" }, null, -1)),
1085
- h("div", {
1084
+ C[1] || (C[1] = y("div", { class: "colour-area-mask" }, null, -1)),
1085
+ y("div", {
1086
1086
  ref_key: "pickerPointer",
1087
- ref: y,
1087
+ ref: h,
1088
1088
  class: "colour-area-point-circle"
1089
1089
  }, null, 512)
1090
1090
  ], 544));
@@ -1115,37 +1115,37 @@ const It = { key: 1 }, Vt = {
1115
1115
  modelValue: String
1116
1116
  },
1117
1117
  emits: ["onChangeMode"],
1118
- setup(n) {
1119
- return (V, r) => (m(), U("div", nl, [
1120
- h("button", {
1118
+ setup(o) {
1119
+ return (V, r) => (m(), E("div", nl, [
1120
+ y("button", {
1121
1121
  type: "button",
1122
- class: Q(n.mode == "solid" ? "active" : ""),
1122
+ class: Q(o.mode == "solid" ? "active" : ""),
1123
1123
  style: { padding: "7px" },
1124
- onClick: r[0] || (r[0] = (y) => V.$emit("onChangeMode", "solid"))
1124
+ onClick: r[0] || (r[0] = (h) => V.$emit("onChangeMode", "solid"))
1125
1125
  }, [
1126
- n.modelValue && n.mode == "solid" ? (m(), U("div", {
1126
+ o.modelValue && o.mode == "solid" ? (m(), E("div", {
1127
1127
  key: 0,
1128
1128
  class: "w-[28px] h-[28px] rounded-full border",
1129
- style: te(`background:${n.modelValue}`)
1130
- }, null, 4)) : (m(), U("svg", ol, r[3] || (r[3] = [
1131
- h("g", { opacity: "0.5" }, [
1132
- h("path", {
1129
+ style: te(`background:${o.modelValue}`)
1130
+ }, null, 4)) : (m(), E("svg", ol, r[3] || (r[3] = [
1131
+ y("g", { opacity: "0.5" }, [
1132
+ y("path", {
1133
1133
  d: "M0 14C0 6.26801 6.26801 0 14 0C21.732 0 28 6.26801 28 14C28 21.732 21.732 28 14 28C6.26801 28 0 21.732 0 14Z",
1134
1134
  fill: "#03102F"
1135
1135
  })
1136
1136
  ], -1)
1137
1137
  ])))
1138
1138
  ], 2),
1139
- h("button", {
1139
+ y("button", {
1140
1140
  type: "button",
1141
- class: Q(n.gradientType == "linear" && n.mode != "solid" ? "active" : ""),
1142
- style: te(`${n.iconClasses.linear ? "" : "padding: 7px;"}`),
1143
- onClick: r[1] || (r[1] = (y) => V.$emit("onChangeMode", "linear"))
1141
+ class: Q(o.gradientType == "linear" && o.mode != "solid" ? "active" : ""),
1142
+ style: te(`${o.iconClasses.linear ? "" : "padding: 7px;"}`),
1143
+ onClick: r[1] || (r[1] = (h) => V.$emit("onChangeMode", "linear"))
1144
1144
  }, [
1145
- h("div", {
1145
+ y("div", {
1146
1146
  class: "w-[28px] h-[28px] rounded-full border",
1147
1147
  style: te(
1148
- n.modelValue && n.gradientType == "linear" && n.mode != "solid" ? `background:${n.modelValue}` : `
1148
+ o.modelValue && o.gradientType == "linear" && o.mode != "solid" ? `background:${o.modelValue}` : `
1149
1149
  background: linear-gradient(
1150
1150
  180deg,
1151
1151
  #03102f 0%,
@@ -1155,16 +1155,16 @@ const It = { key: 1 }, Vt = {
1155
1155
  )
1156
1156
  }, null, 4)
1157
1157
  ], 6),
1158
- h("button", {
1158
+ y("button", {
1159
1159
  type: "button",
1160
- class: Q(n.gradientType == "radial" && n.mode != "solid" ? "active" : ""),
1161
- style: te(`${n.iconClasses.radial ? "" : "padding: 6px;"}`),
1162
- onClick: r[2] || (r[2] = (y) => V.$emit("onChangeMode", "radial"))
1160
+ class: Q(o.gradientType == "radial" && o.mode != "solid" ? "active" : ""),
1161
+ style: te(`${o.iconClasses.radial ? "" : "padding: 6px;"}`),
1162
+ onClick: r[2] || (r[2] = (h) => V.$emit("onChangeMode", "radial"))
1163
1163
  }, [
1164
- h("div", {
1164
+ y("div", {
1165
1165
  class: "w-[28px] h-[28px] rounded-full border",
1166
1166
  style: te(
1167
- n.modelValue && n.gradientType == "radial" && n.mode != "solid" ? `background:${n.modelValue}` : "background: radial-gradient(circle at 50% 50%, rgb(255, 255, 255) 0%, rgb(3, 16, 47) 100%);"
1167
+ o.modelValue && o.gradientType == "radial" && o.mode != "solid" ? `background:${o.modelValue}` : "background: radial-gradient(circle at 50% 50%, rgb(255, 255, 255) 0%, rgb(3, 16, 47) 100%);"
1168
1168
  )
1169
1169
  }, null, 4)
1170
1170
  ], 6)
@@ -1176,10 +1176,10 @@ const It = { key: 1 }, Vt = {
1176
1176
  }, ul = {
1177
1177
  key: 1,
1178
1178
  class: "grid items-center mb-5"
1179
- }, dl = { key: 2 }, cl = { key: 0 }, pl = { class: "ck-cp-local-color-conatiner" }, gl = ["onClick"], vl = { class: "flex items-center gap-2" }, ml = { id: "ck-cp-target-background" }, fl = { class: "flex gap-3" }, hl = {
1179
+ }, dl = { key: 2 }, cl = { key: 0 }, pl = { class: "ck-cp-local-color-conatiner" }, gl = ["onClick"], vl = { class: "flex items-center gap-2" }, ml = { id: "ck-cp-target-background" }, fl = { class: "flex gap-3" }, yl = {
1180
1180
  key: 0,
1181
1181
  class: "w-full flex gap-3"
1182
- }, yl = {
1182
+ }, hl = {
1183
1183
  key: 4,
1184
1184
  class: "ck-cp-local-color-conatiner"
1185
1185
  }, bl = ["onClick"], xl = {
@@ -1218,9 +1218,9 @@ const It = { key: 1 }, Vt = {
1218
1218
  lastUsedColors: Array
1219
1219
  },
1220
1220
  emits: ["update:modelValue", "last-used-pick"],
1221
- setup(n, { emit: V }) {
1222
- const r = n, y = v(r.variant == "gradient" ? "gradient" : "solid"), u = v(null), f = V, C = v(r.modelValue), p = (t) => {
1223
- C.value = t, N.value && f("update:modelValue", t);
1221
+ setup(o, { emit: V }) {
1222
+ const r = o, h = v(r.variant == "gradient" ? "gradient" : "solid"), d = v(null), f = V, C = v(r.modelValue), p = (t) => {
1223
+ C.value = t, X.value && f("update:modelValue", t);
1224
1224
  }, a = v([
1225
1225
  { id: 1, r: 68, g: 71, b: 119, a: 100, percent: 0, hue: 0, select: !0 },
1226
1226
  { id: 2, r: 0, g: 0, b: 255, a: 100, percent: 100, hue: 0, select: !1 }
@@ -1238,48 +1238,48 @@ const It = { key: 1 }, Vt = {
1238
1238
  angle: 90,
1239
1239
  percentageX: 50,
1240
1240
  percentageY: 50
1241
- }), z = v(""), E = v(r.inputType), N = v(!1), D = v(), le = v(), J = v(), j = v(), R = v(), X = _e({
1241
+ }), z = v(""), U = v(r.inputType), X = v(!1), D = v(), le = v(), J = v(), j = v(), R = v(), q = _e({
1242
1242
  h: 0,
1243
1243
  s: 0,
1244
1244
  l: 0
1245
1245
  });
1246
1246
  Be("gradientBar", le), Be("canvas", J), Be("pickerWrap", j), Be("pickerPointer", R), Be("opacitySlider", D);
1247
- let ae = 0, ee = 0, b = 0, Se = 0, ue = 0, ie = 0;
1248
- const Pe = (t) => {
1249
- !j.value || !R.value || (ue = j.value.offsetHeight - R.value.offsetHeight, ie = j.value.offsetWidth - R.value.offsetWidth, b = t.clientX - t.target.getBoundingClientRect().left, Se = t.clientY - t.target.getBoundingClientRect().top, ae = b - R.value.offsetWidth / 2, ee = Se - R.value.offsetHeight / 2, R.value.style.left = `${ae}px`, R.value.style.top = `${ee}px`, Ce(!1), G(), window.addEventListener("mousemove", Ue), window.addEventListener("mouseup", Ee));
1250
- }, Ue = (t) => {
1247
+ let ae = 0, ee = 0, x = 0, Se = 0, ue = 0, ie = 0;
1248
+ const Xe = (t) => {
1249
+ !j.value || !R.value || (ue = j.value.offsetHeight - R.value.offsetHeight, ie = j.value.offsetWidth - R.value.offsetWidth, x = t.clientX - t.target.getBoundingClientRect().left, Se = t.clientY - t.target.getBoundingClientRect().top, ae = x - R.value.offsetWidth / 2, ee = Se - R.value.offsetHeight / 2, R.value.style.left = `${ae}px`, R.value.style.top = `${ee}px`, Ce(!1), P(), window.addEventListener("mousemove", Ee), window.addEventListener("mouseup", Ue));
1250
+ }, Ee = (t) => {
1251
1251
  t.preventDefault();
1252
1252
  const e = j.value.getBoundingClientRect(), l = t.clientX - e.left - R.value.offsetWidth / 2, i = t.clientY - e.top - R.value.offsetHeight / 2;
1253
- l >= 0 && l <= ie ? (ae = l, R.value.style.left = `${l}px`) : 0 > l ? (ae = 0, R.value.style.left = "0px") : l > ie && (ae = ie, R.value.style.left = `${ie}px`), i >= 0 && i <= ue ? (ee = i, R.value.style.top = `${i}px`) : 0 > i ? (ee = 0, R.value.style.top = "0px") : i > ue && (ee = ue, R.value.style.top = `${ue}px`), Ce(!1), G();
1254
- }, Ee = () => {
1255
- window.removeEventListener("mousemove", Ue), window.removeEventListener("mouseup", Ee);
1253
+ l >= 0 && l <= ie ? (ae = l, R.value.style.left = `${l}px`) : 0 > l ? (ae = 0, R.value.style.left = "0px") : l > ie && (ae = ie, R.value.style.left = `${ie}px`), i >= 0 && i <= ue ? (ee = i, R.value.style.top = `${i}px`) : 0 > i ? (ee = 0, R.value.style.top = "0px") : i > ue && (ee = ue, R.value.style.top = `${ue}px`), Ce(!1), P();
1254
+ }, Ue = () => {
1255
+ window.removeEventListener("mousemove", Ee), window.removeEventListener("mouseup", Ue);
1256
1256
  }, Ce = (t) => {
1257
1257
  if (!t) {
1258
1258
  let e = De();
1259
1259
  const l = at(ne.value, e.s, e.l);
1260
1260
  if (l) {
1261
- if (N.value) {
1261
+ if (X.value) {
1262
1262
  let i = a.value.find((s) => s.select == !0);
1263
1263
  i && (i.r = l.r, i.g = l.g, i.b = l.b);
1264
1264
  }
1265
- K(), F();
1265
+ K(), G();
1266
1266
  }
1267
1267
  }
1268
1268
  }, ne = v(0), Ie = async (t) => {
1269
1269
  const { rgb: e } = lt(ne.value, 100, 50);
1270
1270
  Me(e), setTimeout(() => {
1271
- Ce(t), G();
1271
+ Ce(t), P();
1272
1272
  }, 0);
1273
1273
  }, De = () => {
1274
- let t = { s: 0, l: 0 }, e = j.value.offsetWidth - R.value.offsetWidth, l = j.value.offsetHeight - R.value.offsetHeight, i = parseInt(R.value.style.left), d = 1 - parseInt(R.value.style.top) / l, k = i / e;
1275
- return t.l = d / 2 * (2 - k), t.s = d * k / (1 - Math.abs(2 * t.l - 1)), Number.isNaN(t.s) && (t.s = t.l), t.l = t.l > 1 ? 1 : t.l, t.s = t.s > 1 ? 1 : t.s, t;
1274
+ let t = { s: 0, l: 0 }, e = j.value.offsetWidth - R.value.offsetWidth, l = j.value.offsetHeight - R.value.offsetHeight, i = parseInt(R.value.style.left), c = 1 - parseInt(R.value.style.top) / l, k = i / e;
1275
+ return t.l = c / 2 * (2 - k), t.s = c * k / (1 - Math.abs(2 * t.l - 1)), Number.isNaN(t.s) && (t.s = t.l), t.l = t.l > 1 ? 1 : t.l, t.s = t.s > 1 ? 1 : t.s, t;
1276
1276
  }, me = () => {
1277
1277
  const t = a.value.find((e) => e.select == !0);
1278
1278
  if (t) {
1279
1279
  const { l: e, s: l } = et(t.r, t.g, t.b);
1280
1280
  let i = e, s = l;
1281
1281
  Number.isNaN(s) && (s = i);
1282
- let d = { x: 0, y: 0 }, k = j.value.offsetWidth - R.value.offsetWidth, I = j.value.offsetHeight - R.value.offsetHeight;
1282
+ let c = { x: 0, y: 0 }, k = j.value.offsetWidth - R.value.offsetWidth, I = j.value.offsetHeight - R.value.offsetHeight;
1283
1283
  const [$, g] = 2 * i - 1 < 0 ? [
1284
1284
  k * 2 * s / (1 + s),
1285
1285
  I * (1 - i * (1 + s))
@@ -1287,61 +1287,61 @@ const It = { key: 1 }, Vt = {
1287
1287
  -k * 2 * (i - 1) * s / (i + s - i * s),
1288
1288
  I * (i - 1) * (s - 1)
1289
1289
  ];
1290
- return d.x = $, d.y = g, d;
1290
+ return c.x = $, c.y = g, c;
1291
1291
  } else
1292
1292
  return null;
1293
- }, Xe = () => {
1293
+ }, Ne = () => {
1294
1294
  const t = a.value.find((e) => e.select == !0);
1295
1295
  t && (t.hue = ne.value);
1296
1296
  }, oe = v(100), He = (t) => {
1297
1297
  if (r.showAlpha) {
1298
1298
  const e = a.value.find((l) => l.select == !0);
1299
- e && (e.a = parseInt(t), F());
1299
+ e && (e.a = parseInt(t), G());
1300
1300
  }
1301
1301
  }, Oe = (t) => {
1302
- var l, i, s, d;
1303
- const e = (i = (l = u.value) == null ? void 0 : l.querySelector(".gradient-handle-content")) == null ? void 0 : i.getBoundingClientRect();
1304
- return t === 0 ? "0px" : t === 100 && e ? `${(((s = le.value) == null ? void 0 : s.offsetWidth) || 0) - (e.width || 0)}px` : `${(((d = le.value) == null ? void 0 : d.offsetWidth) || 0) * (t / 100) - ((e == null ? void 0 : e.width) || 0) / 2}px`;
1302
+ var l, i, s, c;
1303
+ const e = (i = (l = d.value) == null ? void 0 : l.querySelector(".gradient-handle-content")) == null ? void 0 : i.getBoundingClientRect();
1304
+ return t === 0 ? "0px" : t === 100 && e ? `${(((s = le.value) == null ? void 0 : s.offsetWidth) || 0) - (e.width || 0)}px` : `${(((c = le.value) == null ? void 0 : c.offsetWidth) || 0) * (t / 100) - ((e == null ? void 0 : e.width) || 0) / 2}px`;
1305
1305
  };
1306
- let q = null, _ = null;
1306
+ let F = null, _ = null;
1307
1307
  const Ve = (t) => {
1308
1308
  var i, s;
1309
1309
  const l = t.target.offsetParent;
1310
1310
  if ((i = l == null ? void 0 : l.id) != null && i.includes("clr-gb-")) {
1311
- const d = l.id.replace("clr-gb-", "");
1311
+ const c = l.id.replace("clr-gb-", "");
1312
1312
  _ = l;
1313
1313
  const k = a.value.find((I) => I.select == !0);
1314
- if (k && k.id != d) {
1315
- const I = (s = u.value) == null ? void 0 : s.querySelector(".gradient-handle.select");
1314
+ if (k && k.id != c) {
1315
+ const I = (s = d.value) == null ? void 0 : s.querySelector(".gradient-handle.select");
1316
1316
  I == null || I.classList.remove("select"), l.classList.add("select");
1317
1317
  const $ = a.value.findIndex((g) => g.select == !0);
1318
1318
  for (let g = 0; g < a.value.length; g++) {
1319
1319
  const S = a.value[g];
1320
- if (S.id == d) {
1321
- $ != -1 && (a.value[$].select = !1), a.value[g].select = !0, oe.value = S.a, ce(S.r, S.g, S.b, S.hue, !0), K(), G();
1320
+ if (S.id == c) {
1321
+ $ != -1 && (a.value[$].select = !1), a.value[g].select = !0, oe.value = S.a, ce(S.r, S.g, S.b, S.hue, !0), K(), P();
1322
1322
  break;
1323
1323
  }
1324
1324
  }
1325
1325
  }
1326
- window.addEventListener("mousemove", de), window.addEventListener("mouseup", he);
1326
+ window.addEventListener("mousemove", de), window.addEventListener("mouseup", ye);
1327
1327
  }
1328
- }, he = () => {
1328
+ }, ye = () => {
1329
1329
  window.removeEventListener("mousemove", de), window.removeEventListener("mouseup", Ve);
1330
1330
  }, de = (t) => {
1331
- var d, k;
1331
+ var c, k;
1332
1332
  t.preventDefault();
1333
- const e = (k = (d = u.value) == null ? void 0 : d.querySelector(".gradient-handle-content")) == null ? void 0 : k.getBoundingClientRect(), l = q == null ? void 0 : q.getBoundingClientRect(), i = l.width - (e == null ? void 0 : e.width);
1333
+ const e = (k = (c = d.value) == null ? void 0 : c.querySelector(".gradient-handle-content")) == null ? void 0 : k.getBoundingClientRect(), l = F == null ? void 0 : F.getBoundingClientRect(), i = l.width - (e == null ? void 0 : e.width);
1334
1334
  let s = t.clientX - (l.left || 0) - ((e == null ? void 0 : e.width) || 0) / 2;
1335
1335
  if (s < 0 ? s = 0 : s > i && (s = i), _) {
1336
1336
  _.style.left = `${s}px`;
1337
1337
  const I = parseFloat((s / ((l == null ? void 0 : l.width) - (e == null ? void 0 : e.width)) * 100).toFixed(0)), $ = a.value.find(
1338
1338
  (g) => g.id == (_ == null ? void 0 : _.id.replace("clr-gb-", ""))
1339
1339
  );
1340
- $ && ($.percent = I), F();
1340
+ $ && ($.percent = I), G();
1341
1341
  }
1342
1342
  }, qe = (t) => {
1343
1343
  var I, $;
1344
- const e = q == null ? void 0 : q.getBoundingClientRect(), l = Math.round((t.clientX - ((e == null ? void 0 : e.left) || 0)) / ((e == null ? void 0 : e.width) || 1) * 100), i = a.value.findIndex((g) => g.select == !0), s = a.value[i], d = {
1344
+ const e = F == null ? void 0 : F.getBoundingClientRect(), l = Math.round((t.clientX - ((e == null ? void 0 : e.left) || 0)) / ((e == null ? void 0 : e.width) || 1) * 100), i = a.value.findIndex((g) => g.select == !0), s = a.value[i], c = {
1345
1345
  id: Date.now(),
1346
1346
  r: s.r,
1347
1347
  g: s.g,
@@ -1352,31 +1352,31 @@ const It = { key: 1 }, Vt = {
1352
1352
  select: !0
1353
1353
  };
1354
1354
  a.value[i].select = !1;
1355
- const k = (I = u.value) == null ? void 0 : I.querySelector(".gradient-handle.select");
1356
- k == null || k.classList.remove("select"), a.value = [...a.value, d], be(d), _ = ($ = u.value) == null ? void 0 : $.querySelector(`#clr-gb-${d.id}`), F();
1357
- }, ye = (t) => {
1355
+ const k = (I = d.value) == null ? void 0 : I.querySelector(".gradient-handle.select");
1356
+ k == null || k.classList.remove("select"), a.value = [...a.value, c], be(c), _ = ($ = d.value) == null ? void 0 : $.querySelector(`#clr-gb-${c.id}`), G();
1357
+ }, he = (t) => {
1358
1358
  if (t.r == 0 && t.g == 0 && t.b == 0)
1359
1359
  return !0;
1360
1360
  if (t.r == 255 && t.g == 255 && t.b == 255)
1361
1361
  return !0;
1362
1362
  {
1363
- const e = J.value.getContext("2d", { willReadFrequently: !0 }), l = J.value.width, i = J.value.height, s = e.getImageData(0, 0, l, i).data, d = t.r, k = t.g, I = t.b;
1363
+ const e = J.value.getContext("2d", { willReadFrequently: !0 }), l = J.value.width, i = J.value.height, s = e.getImageData(0, 0, l, i).data, c = t.r, k = t.g, I = t.b;
1364
1364
  for (let $ = 0; $ < i; $++)
1365
1365
  for (let g = 0; g < l; g++) {
1366
1366
  const S = ($ * l + g) * 4, re = s[S], dt = s[S + 1], ct = s[S + 2];
1367
- if (re === d && dt === k && ct === I)
1367
+ if (re === c && dt === k && ct === I)
1368
1368
  return !0;
1369
1369
  }
1370
1370
  return !1;
1371
1371
  }
1372
1372
  }, ce = (t, e, l, i, s) => {
1373
1373
  setTimeout(() => {
1374
- if (ye({ r: t, g: e, b: l })) {
1375
- let d = me();
1376
- d && (R.value.style.left = `${d.x}px`, R.value.style.top = `${d.y}px`);
1374
+ if (he({ r: t, g: e, b: l })) {
1375
+ let c = me();
1376
+ c && (R.value.style.left = `${c.x}px`, R.value.style.top = `${c.y}px`);
1377
1377
  } else {
1378
- let d = me();
1379
- d && (R.value.style.left = `${d.x}px`, R.value.style.top = `${d.y}px`), ne.value = i, Ie(s);
1378
+ let c = me();
1379
+ c && (R.value.style.left = `${c.x}px`, R.value.style.top = `${c.y}px`), ne.value = i, Ie(s);
1380
1380
  }
1381
1381
  }, 0);
1382
1382
  }, Te = () => {
@@ -1384,72 +1384,72 @@ const It = { key: 1 }, Vt = {
1384
1384
  const t = a.value[0];
1385
1385
  ne.value = t.hue, Ie(!0);
1386
1386
  let e = me();
1387
- e && (R.value.style.left = `${e.x}px`, R.value.style.top = `${e.y}px`), K(), F();
1387
+ e && (R.value.style.left = `${e.x}px`, R.value.style.top = `${e.y}px`), K(), G();
1388
1388
  }, be = (t) => {
1389
- if (y.value == "gradient") {
1389
+ if (h.value == "gradient") {
1390
1390
  let e = document.createElement("div");
1391
1391
  e.id = `clr-gb-${t.id}`, e.classList.add("gradient-handle"), e.style.left = Oe(t.percent);
1392
1392
  let l = document.createElement("div");
1393
- l.classList.add("gradient-handle-content"), t.select == !0 && e.classList.add("select"), e.appendChild(l), q && q.appendChild(e);
1393
+ l.classList.add("gradient-handle-content"), t.select == !0 && e.classList.add("select"), e.appendChild(l), F && F.appendChild(e);
1394
1394
  }
1395
1395
  }, Me = (t) => {
1396
1396
  const e = J.value.getContext("2d", { willReadFrequently: !0 }), l = J.value.width, i = J.value.height;
1397
1397
  e.fillStyle = `rgb(${t[0]},${t[1]},${t[2]})`, e.fillRect(0, 0, l, i);
1398
1398
  let s = e.createLinearGradient(0, 0, l - 12, 0);
1399
1399
  s.addColorStop(0, "rgb(255,255,255)"), s.addColorStop(1, "rgba(255,255,255,0)"), e.fillStyle = s, e.fillRect(0, 0, l, i);
1400
- let d = e.createLinearGradient(0, 0, 0, i);
1401
- d.addColorStop(0, "rgba(0,0,0,0)"), d.addColorStop(1, "rgb(0,0,0)"), e.fillStyle = d, e.fillRect(0, 0, l, i);
1400
+ let c = e.createLinearGradient(0, 0, 0, i);
1401
+ c.addColorStop(0, "rgba(0,0,0,0)"), c.addColorStop(1, "rgb(0,0,0)"), e.fillStyle = c, e.fillRect(0, 0, l, i);
1402
1402
  }, K = () => {
1403
1403
  if (r.showAlpha) {
1404
1404
  let t = a.value.find((e) => e.select == !0);
1405
1405
  t && (D.value.style.background = ` linear-gradient(90deg,rgba(255, 255, 255, 0) 0%, rgba(${t.r}, ${t.g}, ${t.b}, 100) 97%)`);
1406
1406
  }
1407
- }, F = () => {
1407
+ }, G = () => {
1408
1408
  var t;
1409
- if (y.value == "gradient") {
1410
- a.value.sort((s, d) => s.percent - d.percent);
1409
+ if (h.value == "gradient") {
1410
+ a.value.sort((s, c) => s.percent - c.percent);
1411
1411
  let e = "linear-gradient(90deg, ", l;
1412
1412
  if (T.value == "linear") {
1413
1413
  l = `linear-gradient(${B.angle}deg, `;
1414
1414
  for (let s = 0; s < a.value.length; s++) {
1415
- const { r: d, g: k, b: I, a: $, percent: g } = a.value[s];
1416
- a.value.length - 1 == s ? (e = e + `rgba(${d},${k},${I},${$ / 100}) ${g}%)`, l = l + `rgba(${d},${k},${I},${$ / 100}) ${g}%)`) : (e = e + `rgba(${d},${k},${I},${$ / 100}) ${g}%, `, l = l + `rgba(${d},${k},${I},${$ / 100}) ${g}%, `);
1415
+ const { r: c, g: k, b: I, a: $, percent: g } = a.value[s];
1416
+ a.value.length - 1 == s ? (e = e + `rgba(${c},${k},${I},${$ / 100}) ${g}%)`, l = l + `rgba(${c},${k},${I},${$ / 100}) ${g}%)`) : (e = e + `rgba(${c},${k},${I},${$ / 100}) ${g}%, `, l = l + `rgba(${c},${k},${I},${$ / 100}) ${g}%, `);
1417
1417
  }
1418
1418
  } else {
1419
1419
  l = `radial-gradient(circle at ${B.percentageX}% ${B.percentageY}%, `;
1420
1420
  for (let s = 0; s < a.value.length; s++) {
1421
- const { r: d, g: k, b: I, a: $, percent: g } = a.value[s];
1422
- a.value.length - 1 == s ? (e = e + `rgba(${d},${k},${I},${$ / 100}) ${g}%)`, l = l + `rgba(${d},${k},${I},${$ / 100}) ${g}%)`) : (e = e + `rgba(${d},${k},${I},${$ / 100}) ${g}%, `, l = l + `rgba(${d},${k},${I},${$ / 100}) ${g}%, `);
1421
+ const { r: c, g: k, b: I, a: $, percent: g } = a.value[s];
1422
+ a.value.length - 1 == s ? (e = e + `rgba(${c},${k},${I},${$ / 100}) ${g}%)`, l = l + `rgba(${c},${k},${I},${$ / 100}) ${g}%)`) : (e = e + `rgba(${c},${k},${I},${$ / 100}) ${g}%, `, l = l + `rgba(${c},${k},${I},${$ / 100}) ${g}%, `);
1423
1423
  }
1424
1424
  }
1425
1425
  le.value.style.backgroundImage = e;
1426
- let i = (t = u.value) == null ? void 0 : t.querySelector("#ck-cp-target-background");
1427
- i && (i.style.backgroundImage = l, N.value && p(i.style.backgroundImage));
1426
+ let i = (t = d.value) == null ? void 0 : t.querySelector("#ck-cp-target-background");
1427
+ i && (i.style.backgroundImage = l, X.value && p(i.style.backgroundImage));
1428
1428
  } else {
1429
1429
  const { r: e, g: l, b: i, a: s } = a.value[0];
1430
- let d = "";
1430
+ let c = "";
1431
1431
  switch (r.type) {
1432
1432
  case "HEX8":
1433
- d = kt(e, l, i, s / 100);
1433
+ c = kt(e, l, i, s / 100);
1434
1434
  break;
1435
1435
  case "RGBA":
1436
- d = `rgba(${e},${l},${i},${s / 100})`;
1436
+ c = `rgba(${e},${l},${i},${s / 100})`;
1437
1437
  break;
1438
1438
  case "RGB":
1439
- d = `rgb(${e},${l},${i})`;
1439
+ c = `rgb(${e},${l},${i})`;
1440
1440
  break;
1441
1441
  case "HEX":
1442
- d = tt(e, l, i);
1442
+ c = tt(e, l, i);
1443
1443
  break;
1444
1444
  }
1445
- p(d);
1445
+ p(c);
1446
1446
  }
1447
1447
  }, Le = () => {
1448
1448
  a.value.forEach((t) => {
1449
1449
  t.hue = Qe(t.r, t.g, t.b);
1450
1450
  });
1451
1451
  }, Fe = (t) => {
1452
- T.value = t, F();
1452
+ T.value = t, G();
1453
1453
  }, Ge = () => {
1454
1454
  var t, e;
1455
1455
  if (a.value.length > 2) {
@@ -1457,20 +1457,20 @@ const It = { key: 1 }, Vt = {
1457
1457
  if (l !== -1) {
1458
1458
  const i = a.value[l].id;
1459
1459
  a.value.splice(l, 1);
1460
- const s = (t = u.value) == null ? void 0 : t.querySelector(`#clr-gb-${i}`);
1460
+ const s = (t = d.value) == null ? void 0 : t.querySelector(`#clr-gb-${i}`);
1461
1461
  s == null || s.remove();
1462
- const d = a.value[0];
1463
- d && (d.select = !0, _ = (e = u.value) == null ? void 0 : e.querySelector(`#clr-gb-${d.id}`), _ == null || _.classList.add("select"), ce(d.r, d.g, d.b, d.hue, !1), G(), F());
1462
+ const c = a.value[0];
1463
+ c && (c.select = !0, _ = (e = d.value) == null ? void 0 : e.querySelector(`#clr-gb-${c.id}`), _ == null || _.classList.add("select"), ce(c.r, c.g, c.b, c.hue, !1), P(), G());
1464
1464
  }
1465
1465
  }
1466
1466
  }, Ye = () => {
1467
1467
  var l;
1468
- const t = (l = u.value) == null ? void 0 : l.querySelector("#cp-btn-eyedropper");
1468
+ const t = (l = d.value) == null ? void 0 : l.querySelector("#cp-btn-eyedropper");
1469
1469
  t == null || t.classList.add("active"), new EyeDropper().open().then((i) => {
1470
- const { sRGBHex: s } = i, d = a.value.find((I) => I.select == !0), k = ze(s);
1470
+ const { sRGBHex: s } = i, c = a.value.find((I) => I.select == !0), k = ze(s);
1471
1471
  if (k) {
1472
1472
  const I = Qe(k.r, k.g, k.b);
1473
- if (d && (d.hue = I, d.r = k.r, d.g = k.g, d.b = k.b), ye(k)) {
1473
+ if (c && (c.hue = I, c.r = k.r, c.g = k.g, c.b = k.b), he(k)) {
1474
1474
  const $ = me();
1475
1475
  $ && (R.value.style.left = `${$.x}px`, R.value.style.top = `${$.y}px`);
1476
1476
  } else {
@@ -1480,51 +1480,51 @@ const It = { key: 1 }, Vt = {
1480
1480
  const g = me();
1481
1481
  g && (R.value.style.left = `${g.x}px`, R.value.style.top = `${g.y}px`);
1482
1482
  }
1483
- G(), K(), F(), t == null || t.classList.remove("active");
1483
+ P(), K(), G(), t == null || t.classList.remove("active");
1484
1484
  }
1485
1485
  }).catch(() => {
1486
1486
  t == null || t.classList.remove("active");
1487
1487
  });
1488
- }, c = (t) => {
1488
+ }, u = (t) => {
1489
1489
  const { value: e, type: l } = t;
1490
1490
  if (l != "a") {
1491
1491
  const i = a.value.find((s) => s.select == !0);
1492
1492
  if (i) {
1493
1493
  i.r = parseInt(e.r), i.g = parseInt(e.g), i.b = parseInt(e.b);
1494
1494
  const s = Qe(i.r, i.g, i.b);
1495
- i.hue = s, ce(i.r, i.g, i.b, i.hue, !0), F(), K();
1495
+ i.hue = s, ce(i.r, i.g, i.b, i.hue, !0), G(), K();
1496
1496
  }
1497
1497
  } else
1498
- oe.value = e, F(), K();
1499
- }, o = (t) => {
1500
- X.h = t.h, X.s = t.s, X.l = t.l;
1498
+ oe.value = e, G(), K();
1499
+ }, n = (t) => {
1500
+ q.h = t.h, q.s = t.s, q.l = t.l;
1501
1501
  const e = a.value.find((l) => l.select == !0);
1502
- if (e && !Number.isNaN(X.h) && !Number.isNaN(X.s) && !Number.isNaN(X.l)) {
1503
- const { r: l, g: i, b: s } = at(X.h, X.s / 100, X.l / 100);
1504
- e.hue = X.h, e.r = l, e.g = i, e.b = s, ce(e.r, e.g, e.b, e.hue, !0), F(), K();
1502
+ if (e && !Number.isNaN(q.h) && !Number.isNaN(q.s) && !Number.isNaN(q.l)) {
1503
+ const { r: l, g: i, b: s } = at(q.h, q.s / 100, q.l / 100);
1504
+ e.hue = q.h, e.r = l, e.g = i, e.b = s, ce(e.r, e.g, e.b, e.hue, !0), G(), K();
1505
1505
  }
1506
- }, x = () => {
1506
+ }, b = () => {
1507
1507
  if (z.value) {
1508
1508
  const t = ze(z.value);
1509
1509
  if (t) {
1510
1510
  const e = Qe(t.r, t.g, t.b), l = a.value.find((i) => i.select == !0);
1511
- l && (l.r = t.r, l.g = t.g, l.b = t.b, l.hue = e, ce(t.r, t.g, t.b, l.hue, !0), F(), K(), pe(E.value));
1511
+ l && (l.r = t.r, l.g = t.g, l.b = t.b, l.hue = e, ce(t.r, t.g, t.b, l.hue, !0), G(), K(), pe(U.value));
1512
1512
  }
1513
1513
  }
1514
- }, G = () => {
1514
+ }, P = () => {
1515
1515
  const t = a.value.find((e) => e.select == !0);
1516
- t && (z.value = tt(t.r, t.g, t.b).toUpperCase()), pe(E.value);
1516
+ t && (z.value = tt(t.r, t.g, t.b).toUpperCase()), pe(U.value);
1517
1517
  }, se = (t) => {
1518
1518
  f("last-used-pick", t);
1519
1519
  };
1520
1520
  window.EyeDropper && (M.value = !0);
1521
1521
  const xe = (t = "") => {
1522
- if (y.value == "gradient") {
1522
+ if (h.value == "gradient") {
1523
1523
  let e = t.includes("linear") ? "linear" : "radial", l = [];
1524
1524
  if (T.value = e, e == "linear") {
1525
- let i = /^linear-gradient\((.*)\)$/, s = t.replace(";", "").trim().match(i), d = /,\s*(?![^()]*\))/;
1525
+ let i = /^linear-gradient\((.*)\)$/, s = t.replace(";", "").trim().match(i), c = /,\s*(?![^()]*\))/;
1526
1526
  if (s) {
1527
- let k = s[1].split(d);
1527
+ let k = s[1].split(c);
1528
1528
  for (let I = 0; I < k.length; I++) {
1529
1529
  const $ = k[I];
1530
1530
  let g = {
@@ -1549,9 +1549,9 @@ const It = { key: 1 }, Vt = {
1549
1549
  }
1550
1550
  }
1551
1551
  } else {
1552
- let i = /^radial-gradient\((.*)\)$/, s = t.replace(";", "").trim().match(i), d = /,\s*(?![^()]*\))/;
1552
+ let i = /^radial-gradient\((.*)\)$/, s = t.replace(";", "").trim().match(i), c = /,\s*(?![^()]*\))/;
1553
1553
  if (s) {
1554
- let k = s[1].split(d);
1554
+ let k = s[1].split(c);
1555
1555
  for (let I = 0; I < k.length; I++) {
1556
1556
  const $ = k[I];
1557
1557
  let g = {
@@ -1609,11 +1609,11 @@ const It = { key: 1 }, Vt = {
1609
1609
  break;
1610
1610
  case "HSL": {
1611
1611
  const { h: l, s: i, l: s } = et(e.r, e.g, e.b);
1612
- X.h = Math.round(l), X.s = Math.round(i * 100), X.l = Math.round(s * 100);
1612
+ q.h = Math.round(l), q.s = Math.round(i * 100), q.l = Math.round(s * 100);
1613
1613
  break;
1614
1614
  }
1615
1615
  }
1616
- E.value = t;
1616
+ U.value = t;
1617
1617
  }
1618
1618
  }, ke = (t) => {
1619
1619
  t && xe(t), Te();
@@ -1622,45 +1622,45 @@ const It = { key: 1 }, Vt = {
1622
1622
  () => r.modelValue,
1623
1623
  (t, e) => {
1624
1624
  t !== e && t !== C.value && (a.value.forEach((l) => {
1625
- const i = q == null ? void 0 : q.querySelector(`#clr-gb-${l.id}`);
1625
+ const i = F == null ? void 0 : F.querySelector(`#clr-gb-${l.id}`);
1626
1626
  i == null || i.remove();
1627
1627
  }), ke(t));
1628
1628
  }
1629
1629
  );
1630
1630
  const ut = (t) => {
1631
1631
  a.value.forEach((e) => {
1632
- const l = q == null ? void 0 : q.querySelector(`#clr-gb-${e.id}`);
1632
+ const l = F == null ? void 0 : F.querySelector(`#clr-gb-${e.id}`);
1633
1633
  l == null || l.remove();
1634
- }), t !== "solid" ? (y.value = "gradient", setTimeout(() => {
1634
+ }), t !== "solid" ? (h.value = "gradient", setTimeout(() => {
1635
1635
  var e;
1636
- q = (e = u.value) == null ? void 0 : e.querySelector(".gradient-bar"), Fe(t), Te();
1637
- }, 200)) : t === "solid" && (y.value = "solid", a.value = a.value.map((e) => (e.select = !1, e)), a.value[0].select = !0, setTimeout(() => {
1636
+ F = (e = d.value) == null ? void 0 : e.querySelector(".gradient-bar"), Fe(t), Te();
1637
+ }, 200)) : t === "solid" && (h.value = "solid", a.value = a.value.map((e) => (e.select = !1, e)), a.value[0].select = !0, setTimeout(() => {
1638
1638
  ke(r.modelValue);
1639
1639
  }, 200));
1640
1640
  };
1641
1641
  return Je(() => {
1642
1642
  var t;
1643
- y.value = r.modelValue.includes("linear") || r.modelValue.includes("radial") ? "gradient" : "solid", y.value == "gradient" && (q = (t = u.value) == null ? void 0 : t.querySelector(".gradient-bar")), ke(r.modelValue), pe(E.value), ft(() => {
1644
- N.value = !0;
1643
+ h.value = r.modelValue.includes("linear") || r.modelValue.includes("radial") ? "gradient" : "solid", h.value == "gradient" && (F = (t = d.value) == null ? void 0 : t.querySelector(".gradient-bar")), ke(r.modelValue), pe(U.value), ft(() => {
1644
+ X.value = !0;
1645
1645
  });
1646
- }), (t, e) => (m(), U("div", {
1646
+ }), (t, e) => (m(), E("div", {
1647
1647
  ref_key: "pickerTemplateRef",
1648
- ref: u,
1649
- class: Q(["ck-cp-container", n.disabled ? "ck-cp-disabled " : ""]),
1650
- "cp-theme": n.theme
1648
+ ref: d,
1649
+ class: Q(["ck-cp-container", o.disabled ? "ck-cp-disabled " : ""]),
1650
+ "cp-theme": o.theme
1651
1651
  }, [
1652
- n.variant == "gradient" ? (m(), U("div", rl, [
1652
+ o.variant == "gradient" ? (m(), E("div", rl, [
1653
1653
  L(il, {
1654
1654
  class: "mr-auto",
1655
- variant: n.variant,
1656
- mode: y.value,
1657
- "model-value": n.modelValue,
1658
- iconClasses: n.iconClasses,
1655
+ variant: o.variant,
1656
+ mode: h.value,
1657
+ "model-value": o.modelValue,
1658
+ iconClasses: o.iconClasses,
1659
1659
  gradientType: T.value,
1660
1660
  onOnChangeMode: ut
1661
1661
  }, null, 8, ["variant", "mode", "model-value", "iconClasses", "gradientType"])
1662
1662
  ])) : H("", !0),
1663
- y.value == "gradient" && n.variant == "gradient" ? (m(), U("div", ul, [
1663
+ h.value == "gradient" && o.variant == "gradient" ? (m(), E("div", ul, [
1664
1664
  L(Kt, {
1665
1665
  gradientType: T.value,
1666
1666
  onOnAddColor: qe,
@@ -1674,16 +1674,16 @@ const It = { key: 1 }, Vt = {
1674
1674
  "onUpdate:angle": e[1] || (e[1] = (l) => B.angle = l),
1675
1675
  percentageX: B.percentageX,
1676
1676
  "onUpdate:percentageX": e[2] || (e[2] = (l) => B.percentageX = l),
1677
- inputType: E.value,
1678
- mode: y.value,
1677
+ inputType: U.value,
1678
+ mode: h.value,
1679
1679
  gradientType: T.value,
1680
- onOnInput: F
1680
+ onOnInput: G
1681
1681
  }, null, 8, ["percentageY", "angle", "percentageX", "inputType", "mode", "gradientType"])
1682
- ])) : (m(), U("div", dl, [
1683
- n.presetColors ? (m(), U("div", cl, [
1684
- e[10] || (e[10] = h("div", { class: "text-oc-text-400 text-sm my-3 font-medium" }, "Choose color", -1)),
1685
- h("div", pl, [
1686
- (m(!0), U(ge, null, Ke(n.presetColors, (l) => (m(), U("div", {
1682
+ ])) : (m(), E("div", dl, [
1683
+ o.presetColors ? (m(), E("div", cl, [
1684
+ e[10] || (e[10] = y("div", { class: "text-oc-text-400 text-sm my-3 font-medium" }, "Choose color", -1)),
1685
+ y("div", pl, [
1686
+ (m(!0), E(ge, null, Ke(o.presetColors, (l) => (m(), E("div", {
1687
1687
  key: `color-${l}`,
1688
1688
  class: "ck-cp-color-item !w-[32px] !h-[32px]",
1689
1689
  style: te(`background:${l}`),
@@ -1692,16 +1692,16 @@ const It = { key: 1 }, Vt = {
1692
1692
  ])
1693
1693
  ])) : H("", !0)
1694
1694
  ])),
1695
- L(al, { onOnMouseDown: Pe }),
1696
- h("div", vl, [
1695
+ L(al, { onOnMouseDown: Xe }),
1696
+ y("div", vl, [
1697
1697
  L(_t, {
1698
1698
  class: Q(M.value ? "max-w-[90%]" : ""),
1699
1699
  modelValue: ne.value,
1700
1700
  "onUpdate:modelValue": e[3] || (e[3] = (l) => ne.value = l),
1701
1701
  onOnInput: e[4] || (e[4] = (l) => Ie(!1)),
1702
- onOnChange: Xe
1702
+ onOnChange: Ne
1703
1703
  }, null, 8, ["class", "modelValue"]),
1704
- M.value ? (m(), U("button", {
1704
+ M.value ? (m(), E("button", {
1705
1705
  key: 0,
1706
1706
  id: "cp-btn-eyedropper",
1707
1707
  type: "button",
@@ -1709,52 +1709,52 @@ const It = { key: 1 }, Vt = {
1709
1709
  style: { padding: "7px" },
1710
1710
  onClick: Ye
1711
1711
  }, e[11] || (e[11] = [
1712
- h("svg", {
1712
+ y("svg", {
1713
1713
  version: "1.1",
1714
1714
  xmlns: "http://www.w3.org/2000/svg",
1715
1715
  width: "32",
1716
1716
  height: "32",
1717
1717
  viewBox: "0 0 32 32"
1718
1718
  }, [
1719
- h("path", { d: "M21.35 1.825l-6.344 6.35-0.588-0.588c-0.781-0.781-2.050-0.781-2.831 0s-0.781 2.050 0 2.831l10 10c0.781 0.781 2.050 0.781 2.831 0s0.781-2.050 0-2.831l-0.587-0.587 6.344-6.35c2.438-2.438 2.438-6.388 0-8.819s-6.387-2.438-8.819 0zM3.462 20.206c-0.938 0.938-1.462 2.212-1.462 3.538v2.65l-1.663 2.494c-0.531 0.794-0.425 1.85 0.25 2.525s1.731 0.781 2.525 0.25l2.494-1.663h2.65c1.325 0 2.6-0.525 3.537-1.462l7.544-7.544-2.831-2.831-7.544 7.544c-0.188 0.188-0.444 0.294-0.706 0.294h-2.256v-2.256c0-0.262 0.106-0.519 0.294-0.706l7.544-7.544-2.831-2.831-7.544 7.544z" })
1719
+ y("path", { d: "M21.35 1.825l-6.344 6.35-0.588-0.588c-0.781-0.781-2.050-0.781-2.831 0s-0.781 2.050 0 2.831l10 10c0.781 0.781 2.050 0.781 2.831 0s0.781-2.050 0-2.831l-0.587-0.587 6.344-6.35c2.438-2.438 2.438-6.388 0-8.819s-6.387-2.438-8.819 0zM3.462 20.206c-0.938 0.938-1.462 2.212-1.462 3.538v2.65l-1.663 2.494c-0.531 0.794-0.425 1.85 0.25 2.525s1.731 0.781 2.525 0.25l2.494-1.663h2.65c1.325 0 2.6-0.525 3.537-1.462l7.544-7.544-2.831-2.831-7.544 7.544c-0.188 0.188-0.444 0.294-0.706 0.294h-2.256v-2.256c0-0.262 0.106-0.519 0.294-0.706l7.544-7.544-2.831-2.831-7.544 7.544z" })
1720
1720
  ], -1)
1721
1721
  ]))) : H("", !0)
1722
1722
  ]),
1723
- n.showAlpha ? (m(), P(jt, {
1723
+ o.showAlpha ? (m(), N(jt, {
1724
1724
  key: 3,
1725
1725
  modelValue: oe.value,
1726
1726
  "onUpdate:modelValue": e[5] || (e[5] = (l) => oe.value = l),
1727
1727
  onOnInput: e[6] || (e[6] = (l) => He(l.target.value))
1728
1728
  }, null, 8, ["modelValue"])) : H("", !0),
1729
- ht(h("div", ml, null, 512), [
1730
- [yt, !1]
1729
+ yt(y("div", ml, null, 512), [
1730
+ [ht, !1]
1731
1731
  ]),
1732
- h("div", fl, [
1732
+ y("div", fl, [
1733
1733
  L(Gt, {
1734
- "model-value": E.value,
1734
+ "model-value": U.value,
1735
1735
  "onUpdate:modelValue": pe
1736
1736
  }, null, 8, ["model-value"]),
1737
- N.value && n.showInputSet ? (m(), U("div", hl, [
1738
- E.value == "HEX" ? (m(), P(Xt, {
1737
+ X.value && o.showInputSet ? (m(), E("div", yl, [
1738
+ U.value == "HEX" ? (m(), N(Nt, {
1739
1739
  key: 0,
1740
1740
  modelValue: z.value,
1741
1741
  "onUpdate:modelValue": [
1742
1742
  e[7] || (e[7] = (l) => z.value = l),
1743
- x
1743
+ b
1744
1744
  ]
1745
1745
  }, null, 8, ["modelValue"])) : H("", !0),
1746
- E.value == "RGB" ? (m(), P(nt, {
1746
+ U.value == "RGB" ? (m(), N(nt, {
1747
1747
  key: 1,
1748
1748
  "rgb-value": a.value.find((l) => l.select == !0),
1749
- onUpdateRgbValue: c
1749
+ onUpdateRgbValue: u
1750
1750
  }, null, 8, ["rgb-value"])) : H("", !0),
1751
- E.value == "HSL" ? (m(), P(nt, {
1751
+ U.value == "HSL" ? (m(), N(nt, {
1752
1752
  key: 2,
1753
1753
  "input-type": "HSL",
1754
- "hsl-value": X,
1755
- onUpdateHslValue: o
1754
+ "hsl-value": q,
1755
+ onUpdateHslValue: n
1756
1756
  }, null, 8, ["hsl-value"])) : H("", !0),
1757
- n.showAlpha ? (m(), P(Ft, {
1757
+ o.showAlpha ? (m(), N(Ft, {
1758
1758
  key: 3,
1759
1759
  modelValue: oe.value,
1760
1760
  "onUpdate:modelValue": [
@@ -1764,9 +1764,9 @@ const It = { key: 1 }, Vt = {
1764
1764
  }, null, 8, ["modelValue"])) : H("", !0)
1765
1765
  ])) : H("", !0)
1766
1766
  ]),
1767
- e[12] || (e[12] = h("div", { class: "text-oc-text-400 text-sm my-3 font-medium font-inter" }, "Last used", -1)),
1768
- O.value.length > 0 && n.showColorList ? (m(), U("div", yl, [
1769
- (m(!0), U(ge, null, Ke(Z.value, (l) => (m(), U("div", {
1767
+ e[12] || (e[12] = y("div", { class: "text-oc-text-400 text-sm my-3 font-medium font-inter" }, "Last used", -1)),
1768
+ O.value.length > 0 && o.showColorList ? (m(), E("div", hl, [
1769
+ (m(!0), E(ge, null, Ke(Z.value, (l) => (m(), E("div", {
1770
1770
  key: `color-${l}`,
1771
1771
  class: "ck-cp-color-item !w-[32px] !h-[32px]",
1772
1772
  style: te(`background:${l}`),
@@ -1781,7 +1781,7 @@ const It = { key: 1 }, Vt = {
1781
1781
  }, Sl = {
1782
1782
  key: 0,
1783
1783
  class: "text-sm text-oc-text-400"
1784
- }, Ul = {
1784
+ }, El = {
1785
1785
  __name: "OcOnboardingProgressbar",
1786
1786
  props: {
1787
1787
  title: {
@@ -1801,8 +1801,8 @@ const It = { key: 1 }, Vt = {
1801
1801
  default: () => []
1802
1802
  }
1803
1803
  },
1804
- setup(n) {
1805
- const V = n, r = $e(() => ({
1804
+ setup(o) {
1805
+ const V = o, r = $e(() => ({
1806
1806
  grid: {
1807
1807
  containLabel: !1
1808
1808
  },
@@ -1830,36 +1830,36 @@ const It = { key: 1 }, Vt = {
1830
1830
  }
1831
1831
  ]
1832
1832
  }));
1833
- return (y, u) => (m(), U("div", kl, [
1833
+ return (h, d) => (m(), E("div", kl, [
1834
1834
  L(w(Ct), {
1835
1835
  class: "w-[140px] bg-white rounded-full h-[140px]",
1836
1836
  "additional-options": r.value,
1837
1837
  "tooltip-formatter": () => null,
1838
1838
  "tooltip-value-formatter": () => null
1839
1839
  }, null, 8, ["additional-options"]),
1840
- h("div", $l, [
1841
- n.title ? (m(), U("span", wl, Ne(n.title), 1)) : H("", !0),
1842
- je(y.$slots, "description", {}, () => [
1843
- n.description ? (m(), U("span", Sl, Ne(n.description), 1)) : H("", !0)
1840
+ y("div", $l, [
1841
+ o.title ? (m(), E("span", wl, Pe(o.title), 1)) : H("", !0),
1842
+ je(h.$slots, "description", {}, () => [
1843
+ o.description ? (m(), E("span", Sl, Pe(o.description), 1)) : H("", !0)
1844
1844
  ])
1845
1845
  ])
1846
1846
  ]));
1847
1847
  }
1848
- }, El = it(
1848
+ }, Ul = it(
1849
1849
  () => import("./OcCodeBlock-B_LpoG2V.js")
1850
1850
  ), Dl = it(
1851
1851
  () => import("./OcLottieAnimation-BjY3rCjS.js")
1852
1852
  );
1853
1853
  export {
1854
1854
  Al as BarChart,
1855
- Pl as BarRaceChart,
1855
+ Xl as BarRaceChart,
1856
1856
  ql as Card,
1857
- El as CodeBlock,
1857
+ Ul as CodeBlock,
1858
1858
  Vt as ColorPicker,
1859
1859
  xl as ColorPickerPopup,
1860
1860
  Ml as LineChart,
1861
1861
  Dl as LottieAnimation,
1862
- Ul as OnboardingProgressbar,
1862
+ El as OnboardingProgressbar,
1863
1863
  Ct as PieChart,
1864
1864
  Rl as TextEditor
1865
1865
  };