builder-settings-types 0.0.314 → 0.0.315

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.
@@ -1,35 +1,35 @@
1
- const yt = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
2
- let pt = (c = 21) => {
3
- let t = "", e = crypto.getRandomValues(new Uint8Array(c |= 0));
4
- for (; c--; )
5
- t += yt[e[c] & 63];
1
+ const Et = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
2
+ let mt = (h = 21) => {
3
+ let t = "", e = crypto.getRandomValues(new Uint8Array(h |= 0));
4
+ for (; h--; )
5
+ t += Et[e[h] & 63];
6
6
  return t;
7
7
  };
8
- function bt(c) {
9
- let t = 0, e = c.parentElement;
8
+ function wt(h) {
9
+ let t = 0, e = h.parentElement;
10
10
  for (; e; )
11
- e.classList.contains("setting-group") && e !== c && t++, e = e.parentElement;
11
+ e.classList.contains("setting-group") && e !== h && t++, e = e.parentElement;
12
12
  return t;
13
13
  }
14
- function _(c, t) {
14
+ function _(h, t) {
15
15
  const e = Math.min(Math.max(t, 0), 5);
16
- c.setAttribute("data-nesting-level", e.toString()), e > 0 ? c.style.setProperty("--visual-indent", `${e * 2}px`) : (c.style.removeProperty("--visual-indent"), c.style.marginLeft = "");
16
+ h.setAttribute("data-nesting-level", e.toString()), e > 0 ? h.style.setProperty("--visual-indent", `${e * 2}px`) : (h.style.removeProperty("--visual-indent"), h.style.marginLeft = "");
17
17
  }
18
- function tt(c, t = 0) {
19
- c.querySelectorAll(":scope > .setting-group-content > .setting-group").forEach((i) => {
18
+ function et(h, t = 0) {
19
+ h.querySelectorAll(":scope > .setting-group-content > .setting-group").forEach((i) => {
20
20
  const s = i, n = t + 1;
21
- _(s, n), tt(s, n);
21
+ _(s, n), et(s, n);
22
22
  });
23
23
  }
24
- const Et = {
24
+ const xt = {
25
25
  maxLevel: 5,
26
26
  spacingMultiplier: 1,
27
27
  visualIndentMultiplier: 2,
28
28
  enableAutoDetection: !0
29
29
  };
30
- class wt {
30
+ class Lt {
31
31
  constructor(t = {}) {
32
- this.observedElements = /* @__PURE__ */ new Set(), this.config = { ...Et, ...t }, this.config.enableAutoDetection && this.setupAutoDetection();
32
+ this.observedElements = /* @__PURE__ */ new Set(), this.config = { ...xt, ...t }, this.config.enableAutoDetection && this.setupAutoDetection();
33
33
  }
34
34
  /**
35
35
  * Setup automatic detection using MutationObserver
@@ -63,7 +63,7 @@ class wt {
63
63
  * Update nesting for a specific element
64
64
  */
65
65
  updateElementNesting(t) {
66
- const e = bt(t);
66
+ const e = wt(t);
67
67
  this.applyNestingWithConfig(t, e);
68
68
  }
69
69
  /**
@@ -111,21 +111,21 @@ class wt {
111
111
  this.observer && (this.observer.disconnect(), this.observer = void 0), this.observedElements.clear();
112
112
  }
113
113
  }
114
- const at = new wt();
115
- function X(c) {
116
- if (c === null || typeof c != "object") return c;
117
- if (c instanceof Date) return new Date(c.getTime());
118
- if (c instanceof Array) return c.map((t) => X(t));
119
- if (typeof c == "object") {
114
+ const rt = new Lt();
115
+ function K(h) {
116
+ if (h === null || typeof h != "object") return h;
117
+ if (h instanceof Date) return new Date(h.getTime());
118
+ if (h instanceof Array) return h.map((t) => K(t));
119
+ if (typeof h == "object") {
120
120
  const t = {};
121
- for (const e in c)
122
- Object.prototype.hasOwnProperty.call(c, e) && (t[e] = X(c[e]));
121
+ for (const e in h)
122
+ Object.prototype.hasOwnProperty.call(h, e) && (t[e] = K(h[e]));
123
123
  return t;
124
124
  }
125
- return c;
125
+ return h;
126
126
  }
127
- function xt(c) {
128
- switch (c) {
127
+ function kt(h) {
128
+ switch (h) {
129
129
  case "number":
130
130
  return 0;
131
131
  case "text":
@@ -144,7 +144,7 @@ function xt(c) {
144
144
  }
145
145
  const G = class G {
146
146
  constructor(t = {}) {
147
- this.props = t, this.dataPropsPath = "", this.id = t.id || pt(), this.value = this.props.default, this.desktop = this.props.default, this.title = t.title || "", this.includeGetJson = t.includeGetJson !== void 0 ? t.includeGetJson : !0;
147
+ this.props = t, this.dataPropsPath = "", this.id = t.id || mt(), this.value = this.props.default, this.desktop = this.props.default, this.title = t.title || "", this.includeGetJson = t.includeGetJson !== void 0 ? t.includeGetJson : !0;
148
148
  }
149
149
  static SetUploadUrl(t) {
150
150
  globalThis.DefaultUploadUrl = t, G.DefaultUploadUrl = t;
@@ -174,8 +174,8 @@ const G = class G {
174
174
  this.value = t, this.inputEl && (this.inputEl.value = String(t)), this.onChange && this.onChange(t), this.props.detectChange && this.props.detectChange(t);
175
175
  }
176
176
  clone() {
177
- const t = this.constructor, e = X(this.props), i = new t(e);
178
- return i.value = X(this.value), i;
177
+ const t = this.constructor, e = K(this.props), i = new t(e);
178
+ return i.value = K(this.value), i;
179
179
  }
180
180
  createInput(t) {
181
181
  t = { ...this.props.inputProps, ...t };
@@ -195,7 +195,7 @@ const G = class G {
195
195
  const i = document.createElement("div");
196
196
  i.className = t.wrapperClassName || "";
197
197
  const s = document.createElement("input");
198
- this.inputEl = s, s.value = String(t.value || xt(t.inputType)), s.type = t.inputType, s.placeholder = t.placeholder || "", s.className = t.inputClassName || "", this.dataPropsPath && s.setAttribute("data-test-id", this.dataPropsPath);
198
+ this.inputEl = s, s.value = String(t.value || kt(t.inputType)), s.type = t.inputType, s.placeholder = t.placeholder || "", s.className = t.inputClassName || "", this.dataPropsPath && s.setAttribute("data-test-id", this.dataPropsPath);
199
199
  const n = (a) => {
200
200
  const l = a.target;
201
201
  let r = l.value;
@@ -247,30 +247,30 @@ G.GlobalVariables = {
247
247
  "text-light": "#00141E"
248
248
  };
249
249
  let x = G;
250
- function A(c) {
251
- return c instanceof x;
250
+ function D(h) {
251
+ return h instanceof x;
252
252
  }
253
- function L(c) {
254
- return c instanceof T;
253
+ function L(h) {
254
+ return h instanceof T;
255
255
  }
256
- function lt(c) {
257
- return A(c) || L(c);
256
+ function ct(h) {
257
+ return D(h) || L(h);
258
258
  }
259
- function j(c, t) {
260
- for (const e in c)
261
- if (Object.prototype.hasOwnProperty.call(c, e)) {
262
- const i = c[e];
259
+ function q(h, t) {
260
+ for (const e in h)
261
+ if (Object.prototype.hasOwnProperty.call(h, e)) {
262
+ const i = h[e];
263
263
  t(e, i);
264
264
  }
265
265
  }
266
- const Y = class Y {
266
+ const Q = class Q {
267
267
  constructor(t) {
268
268
  this.elementRef = null, this.isHidden = !1, this.custom = !1, this.initialValues = {}, this.changeTimeout = null, this.isHandlingChange = !1, this.changeHandlers = /* @__PURE__ */ new Set(), this.blurTimeout = null, this.lastChangeTime = 0, this.handleBlur = () => {
269
- }, this.pendingBlurHandler = null, this.originalDefaultValues = {}, this.nestingLevel = 0, this.dataPropsPath = "", this.hide = !1, this.id = t.id || pt(), this.title = t.title, this.settings = t.settings, this.isCollapsed = t.collapsed ?? !1, this.isMain = t.main ?? !1, this.custom = t.custom ?? !1, this.nestingLevel = 0, this.includeGetJson = t.includeGetJson ?? !0, this.addItemCfg = t.addItem, this.deleteItemCfg = t.deleteItem, this.dataProps = t.dataProps, this.dataPropsPath = t.dataProps || "", this.hide = t.hide ?? !1, Object.assign(this, t.settings), this.initialValues = this.getValues(), this.originalDefaultValues = this.getDefaultValues(), this.propagateNestingLevel(), this.propagateDataPropsPath();
269
+ }, this.pendingBlurHandler = null, this.originalDefaultValues = {}, this.nestingLevel = 0, this.dataPropsPath = "", this.hide = !1, this.id = t.id || mt(), this.title = t.title, this.settings = t.settings, this.isCollapsed = t.collapsed ?? !1, this.isMain = t.main ?? !1, this.custom = t.custom ?? !1, this.nestingLevel = 0, this.includeGetJson = t.includeGetJson ?? !0, this.addItemCfg = t.addItem, this.deleteItemCfg = t.deleteItem, this.dataProps = t.dataProps, this.dataPropsPath = t.dataProps || "", this.hide = t.hide ?? !1, Object.assign(this, t.settings), this.initialValues = this.getValues(), this.originalDefaultValues = this.getDefaultValues(), this.propagateNestingLevel(), this.propagateDataPropsPath();
270
270
  }
271
271
  propagateNestingLevel() {
272
272
  const t = this.nestingLevel + 1;
273
- j(this.settings, (e, i) => {
273
+ q(this.settings, (e, i) => {
274
274
  L(i) && (i.nestingLevel = t, i.propagateNestingLevel());
275
275
  });
276
276
  }
@@ -287,13 +287,13 @@ const Y = class Y {
287
287
  this.dataPropsPath = t, this.propagateDataPropsPath();
288
288
  }
289
289
  propagateDataPropsPath() {
290
- j(this.settings, (t, e) => {
290
+ q(this.settings, (t, e) => {
291
291
  const i = String(t), s = this.dataPropsPath ? `${this.dataPropsPath}_${i}` : i;
292
- (L(e) || A(e) && typeof e.setDataPropsPath == "function") && e.setDataPropsPath(s);
292
+ (L(e) || D(e) && typeof e.setDataPropsPath == "function") && e.setDataPropsPath(s);
293
293
  });
294
294
  }
295
295
  updateNestingStyles() {
296
- this.elementRef && (_(this.elementRef, this.nestingLevel), tt(this.elementRef, this.nestingLevel));
296
+ this.elementRef && (_(this.elementRef, this.nestingLevel), et(this.elementRef, this.nestingLevel));
297
297
  }
298
298
  forceChildUIRefresh() {
299
299
  Object.entries(this.settings).forEach(([t, e]) => {
@@ -352,21 +352,21 @@ const Y = class Y {
352
352
  var l;
353
353
  const i = (e == null ? void 0 : e.preserveValues) ?? !0, s = new Set(Object.keys(this.settings)), n = Object.keys(t), o = {};
354
354
  i && n.forEach((r) => {
355
- const h = this.settings[r];
356
- h && (L(h) ? o[r] = h.getValues() : A(h) ? o[r] = h.value : typeof h.getValues == "function" ? o[r] = h.getValues() : h.value !== void 0 && (o[r] = h.value));
355
+ const c = this.settings[r];
356
+ c && (L(c) ? o[r] = c.getValues() : D(c) ? o[r] = c.value : typeof c.getValues == "function" ? o[r] = c.getValues() : c.value !== void 0 && (o[r] = c.value));
357
357
  }), s.forEach((r) => {
358
358
  n.includes(r) || this.removeSetting(r);
359
359
  }), n.forEach((r) => {
360
360
  var p;
361
- const h = t[r], d = this.settings[r];
362
- if (d !== h && (d && this.removeSetting(r), this.addSetting(r, h), i && r in o)) {
361
+ const c = t[r], d = this.settings[r];
362
+ if (d !== c && (d && this.removeSetting(r), this.addSetting(r, c), i && r in o)) {
363
363
  const g = o[r];
364
364
  try {
365
- L(h) ? h.setValue(
365
+ L(c) ? c.setValue(
366
366
  g
367
- ) : A(h) ? (p = h.setValue) == null || p.call(h, g) : h.setValue && h.setValue(g);
368
- } catch (v) {
369
- console.warn(`Could not preserve value for setting ${r}:`, v);
367
+ ) : D(c) ? (p = c.setValue) == null || p.call(c, g) : c.setValue && c.setValue(g);
368
+ } catch (f) {
369
+ console.warn(`Could not preserve value for setting ${r}:`, f);
370
370
  }
371
371
  }
372
372
  }), this.settings = t, this.propagateNestingLevel(), this.propagateDataPropsPath();
@@ -375,7 +375,7 @@ const Y = class Y {
375
375
  }
376
376
  clone() {
377
377
  const t = {};
378
- j(this.settings, (s, n) => {
378
+ q(this.settings, (s, n) => {
379
379
  const o = String(s);
380
380
  typeof n.clone == "function" ? t[o] = n.clone() : (console.warn(
381
381
  `Setting with key '${o}' does not have a clone method. Copying reference.`
@@ -392,7 +392,7 @@ const Y = class Y {
392
392
  deleteItem: this.deleteItemCfg,
393
393
  dataProps: this.dataProps,
394
394
  hide: this.hide
395
- }, i = kt(e);
395
+ }, i = It(e);
396
396
  return i.initialValues = this.getValues(), i;
397
397
  }
398
398
  resetDefault() {
@@ -402,7 +402,7 @@ const Y = class Y {
402
402
  setMobileValues(t) {
403
403
  !t || typeof t != "object" || (Object.entries(t).forEach(([e, i]) => {
404
404
  const s = this.settings[e];
405
- s && (L(s) || A(s)) && typeof s.setMobileValue == "function" && s.setMobileValue(i);
405
+ s && (L(s) || D(s)) && typeof s.setMobileValue == "function" && s.setMobileValue(i);
406
406
  }), this.setValue(t), this.onChange && this.onChange(this.getValues()));
407
407
  }
408
408
  getMobileValues(t) {
@@ -438,14 +438,14 @@ const Y = class Y {
438
438
  Object.keys(s).length > 0 && (this.lastChangeTime = Date.now(), this.initialValues = i, t(i), this.updateVisibility()), this.isHandlingChange = !1;
439
439
  }, 50));
440
440
  };
441
- return this.changeHandlers.clear(), j(this.settings, (i, s) => {
441
+ return this.changeHandlers.clear(), q(this.settings, (i, s) => {
442
442
  var n;
443
443
  if (L(s))
444
444
  s.setOnChange(() => {
445
445
  const o = this.getValues();
446
446
  this.initialValues = o, t(o);
447
447
  }), this.changeHandlers.add(() => t(this.getValues()));
448
- else if (A(s)) {
448
+ else if (D(s)) {
449
449
  const o = () => e();
450
450
  this.changeHandlers.add(o), s.setOnChange(o);
451
451
  } else {
@@ -468,10 +468,10 @@ const Y = class Y {
468
468
  const o = i.slice(this.addItemCfg.keyPrefix.length), a = Number(o);
469
469
  if (Number.isFinite(a)) {
470
470
  const l = this.addItemCfg.createItem(a);
471
- lt(l) && (this.addSetting(i, l), n = l);
471
+ ct(l) && (this.addSetting(i, l), n = l);
472
472
  }
473
473
  }
474
- n && (L(n) || A(n)) && typeof n.setValue == "function" && n.setValue(s);
474
+ n && (L(n) || D(n)) && typeof n.setValue == "function" && n.setValue(s);
475
475
  }), setTimeout(() => {
476
476
  this.forceChildUIRefresh();
477
477
  }, 0);
@@ -485,7 +485,7 @@ const Y = class Y {
485
485
  const s = this.getValues();
486
486
  this.initialValues = s, (n = this.onChange) == null || n.call(this, s), this.updateVisibility();
487
487
  };
488
- L(t) ? t.setOnChange(() => e()) : A(t) ? t.setOnChange(() => e()) : (i = t.setOnChange) == null || i.call(t, () => e());
488
+ L(t) ? t.setOnChange(() => e()) : D(t) ? t.setOnChange(() => e()) : (i = t.setOnChange) == null || i.call(t, () => e());
489
489
  }
490
490
  addSetting(t, e) {
491
491
  var s, n;
@@ -501,9 +501,9 @@ const Y = class Y {
501
501
  d && t.startsWith(d) && this.addDeleteButtonToElement(a, t);
502
502
  }
503
503
  const r = o.querySelector(".sg-add-button-bottom");
504
- r ? o.insertBefore(a, r) : o.appendChild(a), at.trackElement(a), _(a, this.nestingLevel + 1), tt(a, this.nestingLevel + 1);
505
- const h = a.style.display;
506
- a.style.display = "none", a.offsetHeight, a.style.display = h, this.updateNestingStyles();
504
+ r ? o.insertBefore(a, r) : o.appendChild(a), rt.trackElement(a), _(a, this.nestingLevel + 1), et(a, this.nestingLevel + 1);
505
+ const c = a.style.display;
506
+ a.style.display = "none", a.offsetHeight, a.style.display = c, this.updateNestingStyles();
507
507
  }
508
508
  }
509
509
  const i = this.getValues();
@@ -520,9 +520,9 @@ const Y = class Y {
520
520
  const r = Array.from(
521
521
  t.querySelectorAll(".setting-group-title")
522
522
  );
523
- for (const h of r)
524
- if (h.closest(".setting-group") === t) {
525
- s = h;
523
+ for (const c of r)
524
+ if (c.closest(".setting-group") === t) {
525
+ s = c;
526
526
  break;
527
527
  }
528
528
  s || (s = r[0] ?? null);
@@ -555,8 +555,8 @@ const Y = class Y {
555
555
  }), o.addEventListener("mouseleave", () => {
556
556
  o.style.backgroundColor = "transparent";
557
557
  }), o.addEventListener("click", (r) => {
558
- r.stopPropagation(), r.preventDefault(), this.showDeleteConfirmation().then((h) => {
559
- h && (i && i.deleteItemCfg ? this.removeSetting(e) : this.removeSetting(e));
558
+ r.stopPropagation(), r.preventDefault(), this.showDeleteConfirmation().then((c) => {
559
+ c && (i && i.deleteItemCfg ? this.removeSetting(e) : this.removeSetting(e));
560
560
  });
561
561
  });
562
562
  const l = n.querySelector(".setting-group-arrow");
@@ -653,10 +653,10 @@ const Y = class Y {
653
653
  }), e.addEventListener("click", (d) => {
654
654
  d.target === e && (r(), t(!1));
655
655
  });
656
- const h = (d) => {
657
- d.key === "Escape" && (r(), t(!1), document.removeEventListener("keydown", h));
656
+ const c = (d) => {
657
+ d.key === "Escape" && (r(), t(!1), document.removeEventListener("keydown", c));
658
658
  };
659
- document.addEventListener("keydown", h), o.appendChild(a), o.appendChild(l), i.appendChild(s), i.appendChild(n), i.appendChild(o), e.appendChild(i), document.body.appendChild(e), requestAnimationFrame(() => {
659
+ document.addEventListener("keydown", c), o.appendChild(a), o.appendChild(l), i.appendChild(s), i.appendChild(n), i.appendChild(o), e.appendChild(i), document.body.appendChild(e), requestAnimationFrame(() => {
660
660
  e.style.opacity = "1", i.style.transform = "scale(1)";
661
661
  }), setTimeout(() => l.focus(), 100);
662
662
  });
@@ -752,7 +752,7 @@ const Y = class Y {
752
752
  }
753
753
  draw() {
754
754
  const t = document.createElement("div");
755
- t.className = "setting-group", t.id = `setting-group-${this.id}`, Y.hiddenElements.add(t), this.hide && (t.style.display = "none"), this.isMain && t.classList.add("main-group"), this.custom && t.classList.add("custom_class"), _(t, this.nestingLevel);
755
+ t.className = "setting-group", t.id = `setting-group-${this.id}`, Q.hiddenElements.add(t), this.hide && (t.style.display = "none"), this.isMain && t.classList.add("main-group"), this.custom && t.classList.add("custom_class"), _(t, this.nestingLevel);
756
756
  const e = document.createElement("div");
757
757
  e.className = "setting-group-title", this.isCollapsed && e.classList.add("collapsed-view"), e.setAttribute("role", "button"), e.setAttribute(
758
758
  "aria-expanded",
@@ -778,43 +778,43 @@ const Y = class Y {
778
778
  (!this.isCollapsed).toString()
779
779
  );
780
780
  };
781
- if (e.onclick = l, e.onkeydown = (h) => {
782
- (h.key === "Enter" || h.key === " ") && (h.preventDefault(), l());
781
+ if (e.onclick = l, e.onkeydown = (c) => {
782
+ (c.key === "Enter" || c.key === " ") && (c.preventDefault(), l());
783
783
  }, Object.keys(this.settings).length > 0) {
784
- for (const h in this.settings)
785
- if (Object.prototype.hasOwnProperty.call(this.settings, h)) {
786
- const d = this.settings[h];
784
+ for (const c in this.settings)
785
+ if (Object.prototype.hasOwnProperty.call(this.settings, c)) {
786
+ const d = this.settings[c];
787
787
  L(d) && typeof d.setNestingLevel == "function" && d.setNestingLevel(this.nestingLevel + 1);
788
788
  const p = d.draw();
789
789
  L(d) && d.deleteItemCfg && this.addDeleteButtonToElement(
790
790
  p,
791
- h,
791
+ c,
792
792
  d
793
793
  ), a.appendChild(p);
794
794
  }
795
795
  } else {
796
- const h = document.createElement("div");
797
- h.className = "setting-group-empty", h.textContent = "No settings in this group", a.appendChild(h);
796
+ const c = document.createElement("div");
797
+ c.className = "setting-group-empty", c.textContent = "No settings in this group", a.appendChild(c);
798
798
  }
799
799
  if (this.addItemCfg) {
800
- const h = document.createElement("button");
801
- h.type = "button", h.className = "sg-add-button-bottom", h.style.marginTop = "8px";
800
+ const c = document.createElement("button");
801
+ c.type = "button", c.className = "sg-add-button-bottom", c.style.marginTop = "8px";
802
802
  const d = `
803
803
  <svg width="16" height="16" viewBox="0 0 16 16" fill="none"
804
804
  xmlns="http://www.w3.org/2000/svg">
805
805
  <path d="M8 3.333v9.334M3.333 8h9.334" stroke="currentColor"
806
806
  stroke-width="1.5" stroke-linecap="round"/>
807
807
  </svg>`;
808
- h.innerHTML = `${d}<span style="margin-left:4px;">${this.addItemCfg.buttonLabel ?? "Add"}</span>`, h.addEventListener("click", (p) => {
808
+ c.innerHTML = `${d}<span style="margin-left:4px;">${this.addItemCfg.buttonLabel ?? "Add"}</span>`, c.addEventListener("click", (p) => {
809
809
  p.stopPropagation(), p.preventDefault();
810
- const g = this.getNextIndexFromPrefix(this.addItemCfg.keyPrefix), v = this.addItemCfg.createItem(g);
811
- if (lt(v)) {
810
+ const g = this.getNextIndexFromPrefix(this.addItemCfg.keyPrefix), f = this.addItemCfg.createItem(g);
811
+ if (ct(f)) {
812
812
  const m = `${this.addItemCfg.keyPrefix}${g}`;
813
- this.addSetting(m, v);
813
+ this.addSetting(m, f);
814
814
  }
815
- }), a.appendChild(h);
815
+ }), a.appendChild(c);
816
816
  }
817
- return e.appendChild(i), e.appendChild(n), t.appendChild(e), t.appendChild(a), this.elementRef = t, at.trackElement(t), setTimeout(() => {
817
+ return e.appendChild(i), e.appendChild(n), t.appendChild(e), t.appendChild(a), this.elementRef = t, rt.trackElement(t), setTimeout(() => {
818
818
  this.updateNestingStyles();
819
819
  }, 0), this.pendingBlurHandler && (this.pendingBlurHandler = null), t;
820
820
  }
@@ -856,12 +856,12 @@ const Y = class Y {
856
856
  }
857
857
  }
858
858
  };
859
- Y.hiddenElements = /* @__PURE__ */ new Set();
860
- let T = Y;
861
- function pe(c) {
862
- return new Lt(c);
859
+ Q.hiddenElements = /* @__PURE__ */ new Set();
860
+ let T = Q;
861
+ function ye(h) {
862
+ return new Mt(h);
863
863
  }
864
- class Lt extends T {
864
+ class Mt extends T {
865
865
  constructor(t) {
866
866
  super(t);
867
867
  const e = Object.keys(this.settings)[0];
@@ -909,12 +909,12 @@ class Lt extends T {
909
909
  if (o.className = "tab-content", this.contentContainers = {}, Object.keys(this.settings).forEach((a, l) => {
910
910
  const r = document.createElement("button");
911
911
  r.className = "tab-button", r.type = "button", r.setAttribute("data-tab-id", a), r.textContent = a, r.addEventListener("click", () => this.switchToTab(a)), n.appendChild(r);
912
- const h = document.createElement("div");
913
- h.className = "tab-panel", this.contentContainers[a] = h;
912
+ const c = document.createElement("div");
913
+ c.className = "tab-panel", this.contentContainers[a] = c;
914
914
  const d = this.settings[a];
915
- d && (L(d) && typeof d.setNestingLevel == "function" && d.setNestingLevel(this.getNestingLevel() + 1), h.appendChild(
915
+ d && (L(d) && typeof d.setNestingLevel == "function" && d.setNestingLevel(this.getNestingLevel() + 1), c.appendChild(
916
916
  d.draw()
917
- )), o.appendChild(h), l === 0 && !this.activeTabId && (this.activeTabId = a);
917
+ )), o.appendChild(c), l === 0 && !this.activeTabId && (this.activeTabId = a);
918
918
  }), e.appendChild(i), e.appendChild(n), e.appendChild(o), !this.activeTabId) {
919
919
  const a = Object.keys(this.settings)[0];
920
920
  this.activeTabId = a || "";
@@ -922,13 +922,13 @@ class Lt extends T {
922
922
  return this.updateTabUI(), t;
923
923
  }
924
924
  }
925
- function kt(c) {
926
- return new T(c);
925
+ function It(h) {
926
+ return new T(h);
927
927
  }
928
- function ue(c) {
929
- return c;
928
+ function be(h) {
929
+ return h;
930
930
  }
931
- class Mt extends x {
931
+ class Nt extends x {
932
932
  constructor(t = {}) {
933
933
  super(t), this.inputType = "text", t.onChange && this.setOnChange(t.onChange);
934
934
  }
@@ -949,7 +949,7 @@ class Mt extends x {
949
949
  }
950
950
  }
951
951
  const St = "<svg xmlns='http://www.w3.org/2000/svg' width='18' height='19' viewBox='0 0 18 19' fill='none'><path d='M8.99999 15.8542C9.79613 16.5667 10.8475 17 12 17C14.4853 17 16.5 14.9853 16.5 12.5C16.5 10.4248 15.0953 8.67769 13.1849 8.15763M4.81513 8.15762C2.9047 8.67768 1.5 10.4248 1.5 12.5C1.5 14.9853 3.51472 17 6 17C8.48528 17 10.5 14.9853 10.5 12.5C10.5 11.9146 10.3882 11.3554 10.1849 10.8424M13.5 6.5C13.5 8.98528 11.4853 11 9 11C6.51472 11 4.5 8.98528 4.5 6.5C4.5 4.01472 6.51472 2 9 2C11.4853 2 13.5 4.01472 13.5 6.5Z' stroke='#667085' stroke-linecap='round' stroke-linejoin='round'/></svg>";
952
- class V extends Mt {
952
+ class V extends Nt {
953
953
  constructor(t) {
954
954
  super({
955
955
  ...t,
@@ -965,11 +965,11 @@ class V extends Mt {
965
965
  return t = t.replace("#", ""), t.length === 3 && (t = t.split("").map((e) => e + e).join("")), t.length !== 6 ? (console.warn(`Invalid hex value "${t}", using default "#000000"`), "#000000") : /^[0-9A-Fa-f]{6}$/.test(t) ? `#${t.toLowerCase()}` : (console.warn(`Invalid hex value "${t}", using default "#000000"`), "#000000");
966
966
  }
967
967
  static rgbToHexStatic(t) {
968
- const e = t.split(",").map((h) => parseInt(h.trim()));
968
+ const e = t.split(",").map((c) => parseInt(c.trim()));
969
969
  if (e.length !== 3 || e.some(isNaN))
970
970
  return console.warn(`Invalid RGB value "${t}", using default "#000000"`), "#000000";
971
- const [i, s, n] = e, o = Math.max(0, Math.min(255, i)), a = Math.max(0, Math.min(255, s)), l = Math.max(0, Math.min(255, n)), r = (h) => {
972
- const d = h.toString(16);
971
+ const [i, s, n] = e, o = Math.max(0, Math.min(255, i)), a = Math.max(0, Math.min(255, s)), l = Math.max(0, Math.min(255, n)), r = (c) => {
972
+ const d = c.toString(16);
973
973
  return d.length === 1 ? "0" + d : d;
974
974
  };
975
975
  return `#${r(o)}${r(a)}${r(l)}`;
@@ -1030,15 +1030,15 @@ class V extends Mt {
1030
1030
  u.textContent = "No global colors defined", u.style.gridColumn = "1 / -1", u.style.fontSize = "12px", u.style.color = "#666", a.appendChild(u);
1031
1031
  return;
1032
1032
  }
1033
- Object.entries(m).forEach(([u, f]) => {
1033
+ Object.entries(m).forEach(([u, v]) => {
1034
1034
  const C = document.createElement("button");
1035
- C.className = "global-color-btn", C.title = u, C.style.width = "30px", C.style.height = "30px", C.style.borderRadius = "50%", C.style.border = "1px solid #ddd", C.style.backgroundColor = f, C.style.cursor = "pointer", this.value === `var(--${u})` && (C.style.border = "2px solid #2196f3"), C.addEventListener("click", (y) => {
1036
- var k, S;
1035
+ C.className = "global-color-btn", C.title = u, C.style.width = "30px", C.style.height = "30px", C.style.borderRadius = "50%", C.style.border = "1px solid #ddd", C.style.backgroundColor = v, C.style.cursor = "pointer", this.value === `var(--${u})` && (C.style.border = "2px solid #2196f3"), C.addEventListener("click", (y) => {
1036
+ var k, I;
1037
1037
  y.preventDefault();
1038
1038
  const w = `var(--${u})`;
1039
- this.value = w, (k = this.onChange) == null || k.call(this, w), (S = this.detectChange) == null || S.call(this, w), Array.from(a.children).forEach((b) => {
1039
+ this.value = w, (k = this.onChange) == null || k.call(this, w), (I = this.detectChange) == null || I.call(this, w), Array.from(a.children).forEach((b) => {
1040
1040
  b.style.border = "1px solid #ddd";
1041
- }), C.style.border = "2px solid #2196f3", d.style.backgroundColor = f;
1041
+ }), C.style.border = "2px solid #2196f3", d.style.backgroundColor = v;
1042
1042
  }), a.appendChild(C);
1043
1043
  });
1044
1044
  } catch (m) {
@@ -1056,8 +1056,8 @@ class V extends Mt {
1056
1056
  return e.classList.remove("error"), !0;
1057
1057
  const C = /^#([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6})$/.test(u);
1058
1058
  return C ? e.classList.remove("error") : e.classList.add("error"), C;
1059
- }, h = document.createElement("input");
1060
- h.type = "color", h.className = "color-picker", h.value = this.value && !this.value.startsWith("var(--") ? this.value : "#000000", h.setAttribute("aria-label", "Choose color"), h.setAttribute("title", "Click to open color picker"), this.getDataPropsPath() && h.setAttribute("data-test-id", this.getDataPropsPath()), this.colorInputEl = h;
1059
+ }, c = document.createElement("input");
1060
+ c.type = "color", c.className = "color-picker", c.value = this.value && !this.value.startsWith("var(--") ? this.value : "#000000", c.setAttribute("aria-label", "Choose color"), c.setAttribute("title", "Click to open color picker"), this.getDataPropsPath() && c.setAttribute("data-test-id", this.getDataPropsPath()), this.colorInputEl = c;
1061
1061
  const d = document.createElement("div");
1062
1062
  d.className = "color-preview";
1063
1063
  let p = this.value || "#000000";
@@ -1068,34 +1068,34 @@ class V extends Mt {
1068
1068
  d.style.backgroundColor = p;
1069
1069
  const g = document.createElement("input");
1070
1070
  g.type = "text", g.className = "color-text-input", g.value = this.value || "", g.placeholder = "#000000", g.setAttribute("pattern", "#[0-9A-Fa-f]{6}"), g.setAttribute("title", "Enter a hex color value (e.g., #ff0000)"), g.setAttribute("aria-label", "Hex color value"), g.setAttribute("maxlength", "7"), this.getDataPropsPath() && g.setAttribute("data-test-id", `${this.getDataPropsPath()}_text`), this.textInputEl = g;
1071
- const v = (m) => {
1072
- var f, C;
1071
+ const f = (m) => {
1072
+ var v, C;
1073
1073
  let u = m.trim();
1074
1074
  if (u && !u.startsWith("#") && !u.startsWith("var(") && /^[0-9A-Fa-f]{3}$|^[0-9A-Fa-f]{6}$/.test(u) && (u = "#" + u, this.textInputEl && (this.textInputEl.value = u)), this.textInputEl && r(this.textInputEl)) {
1075
1075
  const y = V.normalizeColorValue(u);
1076
- this.value = y, (f = this.onChange) == null || f.call(this, y), (C = this.detectChange) == null || C.call(this, y), this.colorInputEl && (this.colorInputEl.value = y), d.style.backgroundColor = y;
1076
+ this.value = y, (v = this.onChange) == null || v.call(this, y), (C = this.detectChange) == null || C.call(this, y), this.colorInputEl && (this.colorInputEl.value = y), d.style.backgroundColor = y;
1077
1077
  }
1078
1078
  };
1079
1079
  return this.textInputEl.addEventListener("input", (m) => {
1080
1080
  const u = m.target.value;
1081
- v(u);
1081
+ f(u);
1082
1082
  }), this.textInputEl.addEventListener("paste", (m) => {
1083
- var f;
1083
+ var v;
1084
1084
  m.preventDefault();
1085
- const u = ((f = m.clipboardData) == null ? void 0 : f.getData("text")) || "";
1086
- this.textInputEl && (this.textInputEl.value = u.trim(), v(u));
1085
+ const u = ((v = m.clipboardData) == null ? void 0 : v.getData("text")) || "";
1086
+ this.textInputEl && (this.textInputEl.value = u.trim(), f(u));
1087
1087
  }), this.textInputEl.addEventListener("keydown", (m) => {
1088
- var u, f, C;
1089
- m.key === "Enter" && (m.preventDefault(), v(((u = this.textInputEl) == null ? void 0 : u.value) || ""), (f = this.textInputEl) == null || f.blur()), m.key === "Escape" && (this.textInputEl && this.value && (this.textInputEl.value = this.value), (C = this.textInputEl) == null || C.blur(), e.classList.remove("error"));
1088
+ var u, v, C;
1089
+ m.key === "Enter" && (m.preventDefault(), f(((u = this.textInputEl) == null ? void 0 : u.value) || ""), (v = this.textInputEl) == null || v.blur()), m.key === "Escape" && (this.textInputEl && this.value && (this.textInputEl.value = this.value), (C = this.textInputEl) == null || C.blur(), e.classList.remove("error"));
1090
1090
  }), this.colorInputEl.addEventListener("input", (m) => {
1091
1091
  var C, y;
1092
- const u = m.target.value, f = V.normalizeColorValue(u);
1093
- this.value = f, (C = this.onChange) == null || C.call(this, f), (y = this.detectChange) == null || y.call(this, f), this.textInputEl && (this.textInputEl.value = f), d.style.backgroundColor = f, e.classList.remove("error");
1092
+ const u = m.target.value, v = V.normalizeColorValue(u);
1093
+ this.value = v, (C = this.onChange) == null || C.call(this, v), (y = this.detectChange) == null || y.call(this, v), this.textInputEl && (this.textInputEl.value = v), d.style.backgroundColor = v, e.classList.remove("error");
1094
1094
  }), this.colorInputEl.addEventListener("change", (m) => {
1095
1095
  var C, y;
1096
- const u = m.target.value, f = V.normalizeColorValue(u);
1097
- this.value = f, (C = this.onChange) == null || C.call(this, f), (y = this.detectChange) == null || y.call(this, f), this.textInputEl && (this.textInputEl.value = f), d.style.backgroundColor = f;
1098
- }), o.appendChild(h), o.appendChild(d), o.appendChild(g), e.appendChild(i), e.appendChild(o), e.appendChild(a), t.appendChild(e), this.element = t, t;
1096
+ const u = m.target.value, v = V.normalizeColorValue(u);
1097
+ this.value = v, (C = this.onChange) == null || C.call(this, v), (y = this.detectChange) == null || y.call(this, v), this.textInputEl && (this.textInputEl.value = v), d.style.backgroundColor = v;
1098
+ }), o.appendChild(c), o.appendChild(d), o.appendChild(g), e.appendChild(i), e.appendChild(o), e.appendChild(a), t.appendChild(e), this.element = t, t;
1099
1099
  }
1100
1100
  getElement() {
1101
1101
  return this.element;
@@ -1113,7 +1113,7 @@ class V extends Mt {
1113
1113
  return this.isValidHex() ? this.hexToRgb(this.value) : "0, 0, 0";
1114
1114
  }
1115
1115
  }
1116
- const It = `
1116
+ const Vt = `
1117
1117
  <svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
1118
1118
  <path d="M8.99999 15.8542C9.79613 16.5667 10.8475 17 12 17C14.4853 17 16.5 14.9853 16.5 12.5C16.5 10.4248 15.0953 8.67769 13.1849 8.15763M4.81513 8.15762C2.9047 8.67768 1.5 10.4248 1.5 12.5C1.5 14.9853 3.51472 17 6 17C8.48528 17 10.5 14.9853 10.5 12.5C10.5 11.9146 10.3882 11.3554 10.1849 10.8424M13.5 6.5C13.5 8.98528 11.4853 11 9 11C6.51472 11 4.5 8.98528 4.5 6.5C4.5 4.01472 6.51472 2 9 2C11.4853 2 13.5 4.01472 13.5 6.5Z" stroke="#667085" stroke-linecap="round" stroke-linejoin="round"/>
1119
1119
  <path d="M9 17C13.4183 17 17 13.4183 17 9C17 4.58172 13.4183 1 9 1C4.58172 1 1 4.58172 1 9C1 13.4183 4.58172 17 9 17Z" stroke="#667085" stroke-width="0.5" stroke-linecap="round" stroke-linejoin="round" opacity="0.5"/>
@@ -1123,7 +1123,7 @@ class F extends x {
1123
1123
  constructor(t = {}) {
1124
1124
  super({
1125
1125
  ...t,
1126
- icon: t.icon || It,
1126
+ icon: t.icon || Vt,
1127
1127
  title: t.title || "Color & Opacity",
1128
1128
  default: t.default || "#000000FF"
1129
1129
  }), this.inputType = "color", this.element = null, this.colorInputEl = null, this.textInputEl = null, this.opacityInputEl = null, this.colorPreviewEl = null, this.detectChange = t.detectChange, this.value && (this.value = F.normalizeHexWithOpacity(this.value));
@@ -1212,8 +1212,8 @@ class F extends x {
1212
1212
  const l = ((r = a.clipboardData) == null ? void 0 : r.getData("text")) || "";
1213
1213
  this.textInputEl && (this.textInputEl.value = l.trim(), i(l));
1214
1214
  }), this.textInputEl.addEventListener("keydown", (a) => {
1215
- var l, r, h;
1216
- a.key === "Enter" && (a.preventDefault(), i(((l = this.textInputEl) == null ? void 0 : l.value) || ""), (r = this.textInputEl) == null || r.blur()), a.key === "Escape" && (this.textInputEl && this.value && (this.textInputEl.value = this.value), (h = this.textInputEl) == null || h.blur(), e.classList.remove("error"));
1215
+ var l, r, c;
1216
+ a.key === "Enter" && (a.preventDefault(), i(((l = this.textInputEl) == null ? void 0 : l.value) || ""), (r = this.textInputEl) == null || r.blur()), a.key === "Escape" && (this.textInputEl && this.value && (this.textInputEl.value = this.value), (c = this.textInputEl) == null || c.blur(), e.classList.remove("error"));
1217
1217
  }), this.textInputEl.addEventListener("blur", (a) => {
1218
1218
  const l = a.target;
1219
1219
  l.value.trim() === "" && (l.value = this.value || "#000000FF", e.classList.remove("error"));
@@ -1256,7 +1256,7 @@ class F extends x {
1256
1256
  };
1257
1257
  }
1258
1258
  }
1259
- class ge extends x {
1259
+ class Ee extends x {
1260
1260
  constructor(t = {}) {
1261
1261
  super(t), this.inputType = "text", t.onChange && this.setOnChange(t.onChange);
1262
1262
  }
@@ -1347,12 +1347,12 @@ class P extends x {
1347
1347
  );
1348
1348
  }
1349
1349
  }
1350
- const Nt = `
1350
+ const Tt = `
1351
1351
  <svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
1352
1352
  <path d="M9 17C13.4183 17 17 13.4183 17 9C17 4.58172 13.4183 1 9 1C4.58172 1 1 4.58172 1 9C1 13.4183 4.58172 17 9 17Z" stroke="#667085" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
1353
1353
  <path d="M9 1V17C4.58172 17 1 13.4183 1 9C1 4.58172 4.58172 1 9 1Z" fill="#667085" stroke="#667085" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
1354
1354
  </svg>`;
1355
- class Vt extends P {
1355
+ class Pt extends P {
1356
1356
  constructor(t = {}) {
1357
1357
  const e = {
1358
1358
  title: "Opacity",
@@ -1361,7 +1361,7 @@ class Vt extends P {
1361
1361
  maxValue: 100,
1362
1362
  step: 1,
1363
1363
  default: t.default ?? 100,
1364
- icon: Nt,
1364
+ icon: Tt,
1365
1365
  ...t
1366
1366
  };
1367
1367
  super(e), this.inputType = "number", this.mobileValue = t.mobile;
@@ -1373,12 +1373,12 @@ class Vt extends P {
1373
1373
  this.mobileValue = t, t !== void 0 && this.setValue(t);
1374
1374
  }
1375
1375
  }
1376
- const Tt = `
1376
+ const Ot = `
1377
1377
  <svg xmlns="http://www.w3.org/2000/svg" class="svg-select" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-down">
1378
1378
  <polyline points="6 9 12 15 18 9"></polyline>
1379
1379
  </svg>
1380
1380
  `;
1381
- class et extends x {
1381
+ class it extends x {
1382
1382
  constructor(t = {}) {
1383
1383
  if (super(t), this.inputType = "select", this._options = [], this.isOpen = !1, this.selectedOptionIndex = null, this.optionsListEl = null, this.svgContainer = null, this.buttonEl = null, this.isLoading = !1, this.container = null, this.clickOutsideListener = null, this.resizeListener = null, t.options && (this._options = [...t.options]), t.getOptions && this._options.push(...t.getOptions()), t.getOptionsAsync && (this.isLoading = !0), this.value !== void 0) {
1384
1384
  const e = this._options.findIndex((i) => i.value === this.value);
@@ -1422,7 +1422,7 @@ class et extends x {
1422
1422
  a.onclick = (l) => this.selectOption(l, o, e), i.appendChild(a);
1423
1423
  }), document.body.appendChild(i);
1424
1424
  const s = document.createElement("div");
1425
- return s.classList.add("svg-container"), s.innerHTML = Tt, t.appendChild(s), this.optionsListEl = i, this.svgContainer = s, this.props.getOptionsAsync && (this.isLoading = !0, this.updateButtonText(), this.props.getOptionsAsync().then((n) => {
1425
+ return s.classList.add("svg-container"), s.innerHTML = Ot, t.appendChild(s), this.optionsListEl = i, this.svgContainer = s, this.props.getOptionsAsync && (this.isLoading = !0, this.updateButtonText(), this.props.getOptionsAsync().then((n) => {
1426
1426
  this._options.push(...n), this.isLoading = !1, this.updateOptionsList(), this.updateButtonText();
1427
1427
  }).catch((n) => {
1428
1428
  console.error("Failed to fetch async options:", n), this.isLoading = !1, this.updateButtonText("Failed to load options");
@@ -1485,7 +1485,7 @@ class et extends x {
1485
1485
  this.clickOutsideListener && (document.removeEventListener("click", this.clickOutsideListener), this.clickOutsideListener = null), this.resizeListener && (window.removeEventListener("resize", this.resizeListener), this.resizeListener = null), this.cleanupDropdownPosition(), this.optionsListEl && this.optionsListEl.parentNode && this.optionsListEl.parentNode.removeChild(this.optionsListEl), super.destroy();
1486
1486
  }
1487
1487
  }
1488
- class Pt extends x {
1488
+ class $t extends x {
1489
1489
  constructor(t = {}) {
1490
1490
  super(t), this.inputType = "button", this.value || (this.value = "center");
1491
1491
  }
@@ -1541,7 +1541,7 @@ class Pt extends x {
1541
1541
  }), t.appendChild(i), t;
1542
1542
  }
1543
1543
  }
1544
- class me extends x {
1544
+ class we extends x {
1545
1545
  constructor(t) {
1546
1546
  super(t), this.inputType = "button", this.bgWithAlpha = "rgba(145, 158, 171, 0.08)";
1547
1547
  }
@@ -1555,8 +1555,8 @@ class me extends x {
1555
1555
  /^rgba\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)$/i
1556
1556
  );
1557
1557
  if (n) {
1558
- let a = +n[1], l = +n[2], r = +n[3], h = +n[4];
1559
- h >= 1 ? (a = Math.round(a * 0.9), l = Math.round(l * 0.9), r = Math.round(r * 0.9)) : h = Math.min(1, h + 0.12), s = `rgba(${a},${l},${r},${h})`;
1558
+ let a = +n[1], l = +n[2], r = +n[3], c = +n[4];
1559
+ c >= 1 ? (a = Math.round(a * 0.9), l = Math.round(l * 0.9), r = Math.round(r * 0.9)) : c = Math.min(1, c + 0.12), s = `rgba(${a},${l},${r},${c})`;
1560
1560
  }
1561
1561
  t.addEventListener("mouseenter", () => {
1562
1562
  console.log("hoverBg", s), t.style.setProperty("background-color", s, "important");
@@ -1570,7 +1570,7 @@ class me extends x {
1570
1570
  return o.className = "button-setting-wrapper " + (this.props.wrapperClassName || ""), o.appendChild(t), o;
1571
1571
  }
1572
1572
  }
1573
- class fe extends x {
1573
+ class xe extends x {
1574
1574
  constructor(t = {}) {
1575
1575
  super(t), this.inputType = { width: "number", height: "number" }, this.aspectRatio = 1, this.isUpdating = !1;
1576
1576
  const e = t.width || 0, i = t.height || 0;
@@ -1583,14 +1583,14 @@ class fe extends x {
1583
1583
  suffix: "px",
1584
1584
  minValue: this.minWidth,
1585
1585
  maxValue: this.maxWidth,
1586
- icon: Ot
1586
+ icon: Ht
1587
1587
  }), this.heightSetting = new P({
1588
1588
  title: "Height",
1589
1589
  default: this.value.height,
1590
1590
  suffix: "px",
1591
1591
  minValue: this.minHeight,
1592
1592
  maxValue: this.maxHeight,
1593
- icon: $t
1593
+ icon: Bt
1594
1594
  }), this.widthSetting.setOnChange(this.handleWidthChange.bind(this)), this.heightSetting.setOnChange(this.handleHeightChange.bind(this));
1595
1595
  }
1596
1596
  handleWidthChange(t) {
@@ -1684,24 +1684,24 @@ class fe extends x {
1684
1684
  }
1685
1685
  }
1686
1686
  }
1687
- const Ot = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
1687
+ const Ht = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
1688
1688
  <path d="M4.5 9.5H13.5M4.5 9.5L6 7.25M4.5 9.5L6 11.75M13.5 9.5L12 7.25M13.5 9.5L12 11.75M15.75 16.25V2.75M2.25 16.25V2.75" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
1689
- </svg>`, $t = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
1689
+ </svg>`, Bt = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
1690
1690
  <path d="M9 14L9 5M9 14L6.75 12.5M9 14L11.25 12.5M9 5L6.75 6.5M9 5L11.25 6.5M15.75 2.75H2.25M15.75 16.25H2.25" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
1691
- </svg>`, Q = `
1691
+ </svg>`, tt = `
1692
1692
  <svg xmlns="http://www.w3.org/2000/svg" width="15" height="16" viewBox="0 0 15 16" fill="none">
1693
1693
  <path d="M5 10.5L7.5 8M7.5 8L10 10.5M7.5 8V13.625M12.5 10.9643C13.2634 10.3338 13.75 9.37996 13.75 8.3125C13.75 6.41402 12.211 4.875 10.3125 4.875C10.1759 4.875 10.0482 4.80375 9.97882 4.68609C9.16379 3.30302 7.65902 2.375 5.9375 2.375C3.34867 2.375 1.25 4.47367 1.25 7.0625C1.25 8.35381 1.77215 9.52317 2.61684 10.371" stroke="#475467" stroke-linecap="round" stroke-linejoin="round"/>
1694
1694
  </svg>
1695
- `, Ht = `
1695
+ `, At = `
1696
1696
  <svg width="91" height="71" viewBox="0 0 91 71" fill="none" xmlns="http://www.w3.org/2000/svg">
1697
1697
  <rect width="91" height="71" rx="4" fill="#F2F4F7"/>
1698
1698
  <path d="M37 31.5L39.5 29M39.5 29L42 31.5M39.5 29V34.625M44.5 31.9643C45.2634 31.3338 45.75 30.38 45.75 29.3125C45.75 27.414 44.211 25.875 42.3125 25.875C42.1759 25.875 42.0482 25.8037 41.9788 25.6861C41.1638 24.303 39.659 23.375 37.9375 23.375C35.3487 23.375 33.25 25.4737 33.25 28.0625C33.25 29.3538 33.7721 30.5232 34.6168 31.371" stroke="#475467" stroke-linecap="round" stroke-linejoin="round"/>
1699
1699
  </svg>
1700
- `, Bt = `
1700
+ `, Dt = `
1701
1701
  <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 12 12" fill="none">
1702
1702
  <path d="M8 3V2.6C8 2.03995 8 1.75992 7.89101 1.54601C7.79513 1.35785 7.64215 1.20487 7.45399 1.10899C7.24008 1 6.96005 1 6.4 1H5.6C5.03995 1 4.75992 1 4.54601 1.10899C4.35785 1.20487 4.20487 1.35785 4.10899 1.54601C4 1.75992 4 2.03995 4 2.6V3M5 5.75V8.25M7 5.75V8.25M1.5 3H10.5M9.5 3V8.6C9.5 9.44008 9.5 9.86012 9.33651 10.181C9.1927 10.4632 8.96323 10.6927 8.68099 10.8365C8.36012 11 7.94008 11 7.1 11H4.9C4.05992 11 3.63988 11 3.31901 10.8365C3.03677 10.6927 2.8073 10.4632 2.66349 10.181C2.5 9.86012 2.5 9.44008 2.5 8.6V3" stroke="#667085" stroke-linecap="round" stroke-linejoin="round"/>
1703
1703
  </svg>
1704
- `, At = `
1704
+ `, Gt = `
1705
1705
  <svg xmlns="http://www.w3.org/2000/svg" width="29" height="29" viewBox="0 0 29 29" fill="none">
1706
1706
  <!-- Top dot -->
1707
1707
  <circle cx="14.5" cy="3" r="1.5" fill="#02CC59" opacity="1"/>
@@ -1721,7 +1721,7 @@ const Ot = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewB
1721
1721
  <circle cx="6.7" cy="6.7" r="1.5" fill="#02CC59" opacity="0.3"/>
1722
1722
  </svg>
1723
1723
  `;
1724
- class nt extends x {
1724
+ class ot extends x {
1725
1725
  constructor(t = {}) {
1726
1726
  super(t), this.inputType = "button", this.previewWrapper = null, this.previewEl = null, this.emptyStateEl = null, this.errorContainer = null, this.messageListener = null, this.loadingSpinner = null, this.props.delete === void 0 && (this.props.delete = !0), this.props.maxFileSizeMB === void 0 && (this.props.maxFileSizeMB = 5), !this.value && t.defaultUrl && t.defaultUrl !== "" && (this.value = t.defaultUrl), this.setupMessageListener();
1727
1727
  }
@@ -1774,7 +1774,7 @@ class nt extends x {
1774
1774
  );
1775
1775
  if (t && t !== "") {
1776
1776
  this.showLoading(), s && s instanceof HTMLElement && (s.style.display = "none"), e && e.classList.remove("no-image"), i && (i.innerHTML = `
1777
- <span class="upload-icon">${Q}</span>
1777
+ <span class="upload-icon">${tt}</span>
1778
1778
  <span class="upload-label">Replace</span>
1779
1779
  `);
1780
1780
  const n = () => {
@@ -1785,7 +1785,7 @@ class nt extends x {
1785
1785
  this.previewEl.addEventListener("load", n), this.previewEl.addEventListener("error", o), this.previewEl.src = t;
1786
1786
  } else
1787
1787
  this.hideLoading(), this.previewWrapper.classList.remove("has-image"), this.previewEl.src = "", this.previewEl.style.display = "none", this.previewWrapper.style.display = "none", s && s instanceof HTMLElement && (s.style.display = "block"), e && e.classList.add("no-image"), i && (i.innerHTML = `
1788
- <span class="upload-icon">${Q}</span>
1788
+ <span class="upload-icon">${tt}</span>
1789
1789
  <span class="upload-label">Upload</span>
1790
1790
  `);
1791
1791
  }
@@ -1818,9 +1818,9 @@ class nt extends x {
1818
1818
  const s = this.value && this.value !== "";
1819
1819
  s || i.classList.add("no-image");
1820
1820
  const n = document.createElement("div");
1821
- if (n.className = "preview-placeholder", n.innerHTML = Ht, this.previewWrapper = document.createElement("div"), this.previewWrapper.className = "preview-wrapper", this.loadingSpinner = document.createElement("div"), this.loadingSpinner.className = "loading-spinner", this.loadingSpinner.innerHTML = At, this.loadingSpinner.style.display = "none", this.previewWrapper.appendChild(this.loadingSpinner), this.previewEl = document.createElement("img"), this.previewEl.className = "upload-preview", this.props.delete) {
1821
+ if (n.className = "preview-placeholder", n.innerHTML = At, this.previewWrapper = document.createElement("div"), this.previewWrapper.className = "preview-wrapper", this.loadingSpinner = document.createElement("div"), this.loadingSpinner.className = "loading-spinner", this.loadingSpinner.innerHTML = Gt, this.loadingSpinner.style.display = "none", this.previewWrapper.appendChild(this.loadingSpinner), this.previewEl = document.createElement("img"), this.previewEl.className = "upload-preview", this.props.delete) {
1822
1822
  const a = document.createElement("button");
1823
- a.className = "delete-button", a.type = "button", a.title = "Delete image", a.innerHTML = Bt, this.previewWrapper.appendChild(a), a.onclick = (l) => {
1823
+ a.className = "delete-button", a.type = "button", a.title = "Delete image", a.innerHTML = Dt, this.previewWrapper.appendChild(a), a.onclick = (l) => {
1824
1824
  var r;
1825
1825
  l.stopPropagation(), this.value = "", this.updatePreviewState(null), (r = this.onChange) == null || r.call(this, ""), this.hideError();
1826
1826
  };
@@ -1828,7 +1828,7 @@ class nt extends x {
1828
1828
  this.previewWrapper.appendChild(this.previewEl);
1829
1829
  const o = document.createElement("button");
1830
1830
  return o.className = "upload-button", this.getDataPropsPath() && o.setAttribute("data-test-id", this.getDataPropsPath()), o.innerHTML = `
1831
- <span class="upload-icon">${Q}</span>
1831
+ <span class="upload-icon">${tt}</span>
1832
1832
  <span class="upload-label">Upload</span>
1833
1833
  `, i.appendChild(n), i.appendChild(this.previewWrapper), i.appendChild(o), t.appendChild(i), s ? this.updatePreviewState(this.value) : this.updatePreviewState(null), o.onclick = () => {
1834
1834
  window.postMessage(
@@ -1841,14 +1841,428 @@ class nt extends x {
1841
1841
  }, t;
1842
1842
  }
1843
1843
  }
1844
- class Gt extends P {
1844
+ const at = (h, t, e) => {
1845
+ let i = !1, s = 0, n = 0, o = 0, a = 0;
1846
+ const l = (d) => {
1847
+ if (d.target.closest("button")) return;
1848
+ i = !0, s = d.clientX, n = d.clientY;
1849
+ const p = t.getBoundingClientRect();
1850
+ o = p.left, a = p.top, document.addEventListener("mousemove", r), document.addEventListener("mouseup", c), document.body.style.userSelect = "none";
1851
+ }, r = (d) => {
1852
+ if (!i) return;
1853
+ const p = d.clientX - s, g = d.clientY - n, f = window.innerWidth, m = window.innerHeight, u = t.offsetWidth, v = t.offsetHeight;
1854
+ let C = o + p, y = a + g;
1855
+ C = Math.max(8, Math.min(f - u - 8, C)), y = Math.max(8, Math.min(m - v - 8, y)), t.style.left = `${C}px`, t.style.top = `${y}px`, e == null || e(C, y);
1856
+ }, c = () => {
1857
+ i = !1, document.removeEventListener("mousemove", r), document.removeEventListener("mouseup", c), document.body.style.userSelect = "";
1858
+ };
1859
+ h.addEventListener("mousedown", l);
1860
+ }, Rt = `
1861
+ <svg xmlns="http://www.w3.org/2000/svg" width="15" height="16" viewBox="0 0 15 16" fill="none">
1862
+ <path d="M5 10.5L7.5 8M7.5 8L10 10.5M7.5 8V13.625M12.5 10.9643C13.2634 10.3338 13.75 9.37996 13.75 8.3125C13.75 6.41402 12.211 4.875 10.3125 4.875C10.1759 4.875 10.0482 4.80375 9.97882 4.68609C9.16379 3.30302 7.65902 2.375 5.9375 2.375C3.34867 2.375 1.25 4.47367 1.25 7.0625C1.25 8.35381 1.77215 9.52317 2.61684 10.371" stroke="#475467" stroke-linecap="round" stroke-linejoin="round"/>
1863
+ </svg>
1864
+ `, Ft = `
1865
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none">
1866
+ <path d="M12 4L4 12M4 4L12 12" stroke="#667085" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
1867
+ </svg>
1868
+ `, zt = `
1869
+ <svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12" fill="none">
1870
+ <path d="M8 3V2.6C8 2.03995 8 1.75992 7.89101 1.54601C7.79513 1.35785 7.64215 1.20487 7.45399 1.10899C7.24008 1 6.96005 1 6.4 1H5.6C5.03995 1 4.75992 1 4.54601 1.10899C4.35785 1.20487 4.20487 1.35785 4.10899 1.54601C4 1.75992 4 2.03995 4 2.6V3M5 5.75V8.25M7 5.75V8.25M1.5 3H10.5M9.5 3V8.6C9.5 9.44008 9.5 9.86012 9.33651 10.181C9.1927 10.4632 8.96323 10.6927 8.68099 10.8365C8.36012 11 7.94008 11 7.1 11H4.9C4.05992 11 3.63988 11 3.31901 10.8365C3.03677 10.6927 2.8073 10.4632 2.66349 10.181C2.5 9.86012 2.5 9.44008 2.5 8.6V3" stroke="#667085" stroke-linecap="round" stroke-linejoin="round"/>
1871
+ </svg>
1872
+ `, Ut = `
1873
+ <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 14 14" fill="none">
1874
+ <path d="M4.66667 3.5H9.91667C11.5275 3.5 12.8333 4.80584 12.8333 6.41667C12.8333 8.0275 11.5275 9.33333 9.91667 9.33333H3.5M3.5 9.33333L5.83333 7M3.5 9.33333L5.83333 11.6667" stroke="#667085" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
1875
+ </svg>
1876
+ `, Wt = `
1877
+ <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 14 14" fill="none">
1878
+ <path d="M9.33333 3.5H4.08333C2.47249 3.5 1.16667 4.80584 1.16667 6.41667C1.16667 8.0275 2.47249 9.33333 4.08333 9.33333H10.5M10.5 9.33333L8.16667 7M10.5 9.33333L8.16667 11.6667" stroke="#667085" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
1879
+ </svg>
1880
+ `, $ = class $ extends x {
1881
+ constructor(t = {}) {
1882
+ super(t), this.inputType = {
1883
+ imageUrl: "text",
1884
+ markers: "text"
1885
+ }, this.mainButton = null, this.thumbnailEl = null, this.markerCountEl = null, this.popoverEl = null, this.backdropEl = null, this.imageElement = null, this.cursorTooltip = null, this.popoverPosition = null, this.isPopoverOpen = !1, this.draggingMarkerId = null, this.history = [], this.historyIndex = -1, this.isUndoRedoOperation = !1, this.initialValue = null, this.props.maxMarkers = this.props.maxMarkers ?? 10, this.props.maxFileSizeMB = this.props.maxFileSizeMB ?? 5, this.props.markerSize = this.props.markerSize ?? 24, this.value || (this.value = { imageUrl: "", markers: [] }), this.onBackgroundClick = (e) => {
1886
+ this.isPopoverOpen && this.popoverEl && !this.popoverEl.contains(e.target) && this.closePopover();
1887
+ }, this.handlePopoverKeydown = (e) => {
1888
+ this.isPopoverOpen && (e.key === "Escape" ? this.closePopover() : (e.ctrlKey || e.metaKey) && (e.key === "z" || e.key === "Z" ? e.shiftKey ? (e.preventDefault(), this.redo()) : (e.preventDefault(), this.undo()) : (e.key === "y" || e.key === "Y") && (e.preventDefault(), this.redo())));
1889
+ }, this.boundHandleMarkerDrag = this.handleMarkerDrag.bind(this), this.boundStopDragging = this.stopDragging.bind(this);
1890
+ }
1891
+ draw() {
1892
+ const t = document.createElement("div");
1893
+ if (t.className = "image-map-setting-wrapper", this.props.title || this.props.icon) {
1894
+ const e = document.createElement("div");
1895
+ if (e.className = "icon-container", this.props.icon) {
1896
+ const i = this.createIcon(this.props.icon);
1897
+ e.appendChild(i);
1898
+ }
1899
+ if (this.props.title) {
1900
+ const i = this.createLabel(this.props.title);
1901
+ e.appendChild(i);
1902
+ }
1903
+ t.appendChild(e);
1904
+ }
1905
+ return this.mainButton = document.createElement("button"), this.mainButton.type = "button", this.mainButton.className = "image-map-button", this.thumbnailEl = document.createElement("img"), this.thumbnailEl.className = "image-map-thumbnail", this.mainButton.appendChild(this.thumbnailEl), this.markerCountEl = document.createElement("span"), this.markerCountEl.className = "image-map-marker-count", this.mainButton.appendChild(this.markerCountEl), this.mainButton.addEventListener("click", () => this.openPopover()), t.appendChild(this.mainButton), this.createPopover(), this.updateButtonDisplay(), t;
1906
+ }
1907
+ updateButtonDisplay() {
1908
+ if (!this.mainButton || !this.thumbnailEl || !this.markerCountEl) return;
1909
+ if (this.value && this.value.imageUrl && this.value.imageUrl !== "") {
1910
+ this.mainButton.classList.add("has-image"), this.thumbnailEl.src = this.value.imageUrl;
1911
+ const e = this.value.markers.length;
1912
+ this.markerCountEl.textContent = `${e} marker${e !== 1 ? "s" : ""}`;
1913
+ } else
1914
+ this.mainButton.classList.remove("has-image"), this.thumbnailEl.src = "", this.markerCountEl.textContent = "Add Image Map";
1915
+ }
1916
+ createPopover() {
1917
+ this.backdropEl = document.createElement("div"), this.backdropEl.className = "image-map-backdrop", this.backdropEl.style.display = "none", this.popoverEl = document.createElement("div"), this.popoverEl.className = "image-map-popover", this.popoverEl.style.display = "none";
1918
+ const t = document.createElement("div");
1919
+ t.className = "image-map-header", t.style.cursor = "move";
1920
+ const e = document.createElement("h3");
1921
+ e.className = "image-map-title", e.textContent = "Configure Image Map", t.appendChild(e);
1922
+ const i = document.createElement("button");
1923
+ i.type = "button", i.className = "image-map-close-btn", i.innerHTML = Ft, i.addEventListener("click", () => this.closePopover()), t.appendChild(i), at(t, this.popoverEl, (n, o) => {
1924
+ this.popoverPosition = { left: n, top: o };
1925
+ }), this.popoverEl.appendChild(t);
1926
+ const s = document.createElement("div");
1927
+ s.className = "image-map-content", this.popoverEl.appendChild(s), document.body.appendChild(this.backdropEl), document.body.appendChild(this.popoverEl);
1928
+ }
1929
+ openPopover() {
1930
+ $.openInstance && $.openInstance !== this && $.openInstance.closePopover(), this.isPopoverOpen = !0, $.openInstance = this, this.value ? this.initialValue = JSON.parse(JSON.stringify(this.value)) : this.initialValue = { imageUrl: "", markers: [] }, this.value && (this.history = [JSON.parse(JSON.stringify(this.value.markers))], this.historyIndex = 0), this.backdropEl && (this.backdropEl.style.display = "block"), this.popoverEl && (this.popoverEl.style.display = "flex"), this.positionPopover(), this.refreshPopoverContent(), setTimeout(() => {
1931
+ document.addEventListener("click", this.onBackgroundClick, !0);
1932
+ }, 200), document.addEventListener("keydown", this.handlePopoverKeydown, !0);
1933
+ }
1934
+ hasAllMarkers() {
1935
+ if (!this.value) return !1;
1936
+ const t = this.props.maxMarkers || 10;
1937
+ return this.value.markers.length === t;
1938
+ }
1939
+ hasChanges() {
1940
+ return !this.initialValue || !this.value ? !1 : JSON.stringify(this.initialValue.markers) !== JSON.stringify(this.value.markers);
1941
+ }
1942
+ closePopover(t = !1) {
1943
+ if (!t && this.hasChanges() && !this.hasAllMarkers()) {
1944
+ if (!window.confirm(
1945
+ "You haven't placed all markers. Closing will discard your changes. Do you want to continue?"
1946
+ ))
1947
+ return;
1948
+ this.initialValue && (this.value = JSON.parse(JSON.stringify(this.initialValue)), this.updateButtonDisplay(), this.triggerChange());
1949
+ }
1950
+ this.isPopoverOpen = !1, this.draggingMarkerId = null, this.backdropEl && (this.backdropEl.style.display = "none"), this.popoverEl && (this.popoverEl.style.display = "none"), document.removeEventListener("click", this.onBackgroundClick, !0), document.removeEventListener("keydown", this.handlePopoverKeydown, !0), $.openInstance === this && ($.openInstance = null);
1951
+ }
1952
+ positionPopover() {
1953
+ if (!this.popoverEl || !this.mainButton) return;
1954
+ const t = this.mainButton.getBoundingClientRect(), e = 800, i = Math.min(window.innerHeight * 0.8, 700);
1955
+ let s = t.right + 8, n = t.top;
1956
+ const o = window.innerWidth - t.right;
1957
+ o < e + 16 && t.left > o + 100 && (s = t.left - e - 8), s = Math.max(8, Math.min(s, window.innerWidth - e - 8)), n = Math.max(8, Math.min(n, window.innerHeight - i - 8)), this.popoverEl.style.left = `${s}px`, this.popoverEl.style.top = `${n}px`, this.popoverPosition = { left: s, top: n };
1958
+ }
1959
+ refreshPopoverContent() {
1960
+ if (!this.popoverEl) return;
1961
+ const t = this.popoverEl.querySelector(".image-map-content");
1962
+ if (!t) return;
1963
+ const e = t.querySelector(".image-map-container"), i = (e == null ? void 0 : e.scrollTop) || 0;
1964
+ if (t.innerHTML = "", this.value && this.value.imageUrl && this.value.imageUrl !== "") {
1965
+ const n = document.createElement("div");
1966
+ n.className = "image-map-main-layout";
1967
+ const o = document.createElement("div");
1968
+ o.className = "image-map-image-section", this.renderImageMapSection(o);
1969
+ const a = document.createElement("div");
1970
+ a.className = "image-map-sidebar", this.renderSidebar(a), n.appendChild(o), n.appendChild(a), t.appendChild(n), requestAnimationFrame(() => {
1971
+ const l = o.querySelector(".image-map-container");
1972
+ l && (l.scrollTop = i);
1973
+ });
1974
+ } else
1975
+ this.renderUploadSection(t);
1976
+ }
1977
+ renderUploadSection(t) {
1978
+ const e = document.createElement("div");
1979
+ e.className = "upload-section";
1980
+ const i = document.createElement("label");
1981
+ i.className = "upload-label", i.innerHTML = `
1982
+ <div class="upload-placeholder">
1983
+ ${Rt}
1984
+ <span>Click to upload image</span>
1985
+ </div>
1986
+ `;
1987
+ const s = document.createElement("input");
1988
+ s.type = "file", s.accept = "image/*", s.style.display = "none", s.addEventListener("change", (n) => {
1989
+ var a;
1990
+ const o = (a = n.target.files) == null ? void 0 : a[0];
1991
+ o && this.handleImageUpload(o);
1992
+ }), i.appendChild(s), e.appendChild(i), t.appendChild(e);
1993
+ }
1994
+ renderImageMapSection(t) {
1995
+ const e = document.createElement("div");
1996
+ e.className = "image-map-actions";
1997
+ const i = document.createElement("div");
1998
+ i.className = "undo-redo-group";
1999
+ const s = document.createElement("button");
2000
+ s.type = "button", s.className = "undo-btn action-btn", s.innerHTML = Ut, s.title = "Undo (Ctrl+Z)", s.disabled = !this.canUndo(), s.addEventListener("click", () => this.undo()), i.appendChild(s);
2001
+ const n = document.createElement("button");
2002
+ n.type = "button", n.className = "redo-btn action-btn", n.innerHTML = Wt, n.title = "Redo (Ctrl+Y)", n.disabled = !this.canRedo(), n.addEventListener("click", () => this.redo()), i.appendChild(n), e.appendChild(i);
2003
+ const o = document.createElement("button");
2004
+ o.type = "button", o.className = "clear-all-btn", o.textContent = "Clear All Markers", o.addEventListener("click", () => this.handleClearAllMarkers()), e.appendChild(o), t.appendChild(e);
2005
+ const a = document.createElement("div");
2006
+ a.className = "image-map-container";
2007
+ const l = document.createElement("div");
2008
+ l.className = "image-map-wrapper", l.addEventListener("mousemove", this.boundHandleMarkerDrag), l.addEventListener("mouseup", this.boundStopDragging), l.addEventListener("mouseleave", this.boundStopDragging), this.imageElement = document.createElement("img"), this.imageElement.className = "image-map-image", this.imageElement.src = this.value.imageUrl, this.imageElement.addEventListener("click", (r) => this.handleImageClick(r)), l.appendChild(this.imageElement), this.cursorTooltip = document.createElement("div"), this.cursorTooltip.className = "marker-cursor-tooltip", l.appendChild(this.cursorTooltip), this.imageElement.addEventListener("mouseenter", () => this.showCursorTooltip()), this.imageElement.addEventListener("mouseleave", () => this.hideCursorTooltip()), this.imageElement.addEventListener("mousemove", (r) => this.updateCursorTooltip(r)), this.value && this.value.markers && this.value.markers.forEach((r) => {
2009
+ const c = this.createMarkerElement(r);
2010
+ l.appendChild(c);
2011
+ }), a.appendChild(l), t.appendChild(a);
2012
+ }
2013
+ renderSidebar(t) {
2014
+ var l;
2015
+ const e = document.createElement("div");
2016
+ e.className = "prize-counter";
2017
+ const i = this.props.maxMarkers || 10, s = ((l = this.value) == null ? void 0 : l.markers.length) || 0, n = s === i;
2018
+ e.textContent = `Prizes ${s}/${i}`, n && e.classList.add("complete"), t.appendChild(e);
2019
+ const o = document.createElement("div");
2020
+ if (o.className = "prize-list", this.value && this.value.markers.length > 0)
2021
+ [...this.value.markers].sort((c, d) => c.index - d.index).forEach((c) => {
2022
+ const d = document.createElement("div");
2023
+ d.className = "prize-item";
2024
+ const p = document.createElement("div");
2025
+ p.className = "prize-label", c.prizeName ? p.textContent = `Prize #${c.index}, ${c.prizeName}` : p.textContent = `Prize #${c.index}`, d.appendChild(p), o.appendChild(d);
2026
+ });
2027
+ else {
2028
+ const r = document.createElement("div");
2029
+ r.className = "prize-list-empty", r.textContent = "No prizes added yet. Click on the image to add prizes.", o.appendChild(r);
2030
+ }
2031
+ t.appendChild(o);
2032
+ const a = document.createElement("button");
2033
+ a.type = "button", a.className = "sidebar-save-btn", a.textContent = "Save", n ? a.title = "Save and close" : (a.disabled = !0, a.title = `Add ${i - s} more prize(s) to save`), a.addEventListener("click", () => {
2034
+ n && (this.triggerChange(), this.closePopover(!0));
2035
+ }), t.appendChild(a);
2036
+ }
2037
+ createMarkerElement(t) {
2038
+ const e = document.createElement("div");
2039
+ e.className = "marker-container", e.style.left = `${t.x}%`, e.style.top = `${t.y}%`, e.setAttribute("data-marker-id", String(t.id));
2040
+ const i = document.createElement("div");
2041
+ i.className = "image-map-marker";
2042
+ const s = document.createElement("span");
2043
+ s.className = "marker-number", s.textContent = String(t.index), i.appendChild(s);
2044
+ const n = document.createElement("button");
2045
+ n.type = "button", n.className = "marker-delete-btn", n.innerHTML = zt, n.addEventListener("click", (a) => {
2046
+ a.stopPropagation(), this.handleDeleteMarker(t.id);
2047
+ }), i.appendChild(n), e.appendChild(i);
2048
+ const o = document.createElement("div");
2049
+ return o.className = "marker-label", t.prizeName ? o.textContent = t.prizeName : o.textContent = `Prize ${t.index}`, e.appendChild(o), e.addEventListener("mousedown", (a) => {
2050
+ a.stopPropagation(), a.preventDefault(), this.draggingMarkerId = t.id, e.classList.add("dragging");
2051
+ }), e;
2052
+ }
2053
+ handleImageUpload(t) {
2054
+ if (!["image/jpeg", "image/jpg", "image/png", "image/gif", "image/webp"].includes(t.type)) {
2055
+ this.showError("Invalid file type. Please upload a JPEG, PNG, GIF, or WebP image.");
2056
+ return;
2057
+ }
2058
+ const i = (this.props.maxFileSizeMB || 5) * 1024 * 1024;
2059
+ if (t.size > i) {
2060
+ const n = (t.size / 1048576).toFixed(1);
2061
+ this.showError(`File size (${n}MB) exceeds ${this.props.maxFileSizeMB}MB limit.`);
2062
+ return;
2063
+ }
2064
+ const s = new FileReader();
2065
+ s.onload = (n) => {
2066
+ var a;
2067
+ const o = (a = n.target) == null ? void 0 : a.result;
2068
+ typeof o == "string" && (this.value = {
2069
+ imageUrl: o,
2070
+ markers: []
2071
+ // Clear markers on new upload
2072
+ }, this.history = [[]], this.historyIndex = 0, this.updateUndoRedoButtons(), this.updateButtonDisplay(), this.refreshPopoverContent(), this.triggerChange());
2073
+ }, s.onerror = () => {
2074
+ this.showError("Failed to read image file.");
2075
+ }, s.readAsDataURL(t);
2076
+ }
2077
+ handleImageClick(t) {
2078
+ if (this.draggingMarkerId !== null || !this.value || !this.imageElement) return;
2079
+ if (this.value.markers.length >= (this.props.maxMarkers || 10)) {
2080
+ this.showError(`Maximum of ${this.props.maxMarkers || 10} markers allowed.`);
2081
+ return;
2082
+ }
2083
+ const e = this.imageElement.getBoundingClientRect(), i = (t.clientX - e.left) / e.width * 100, s = (t.clientY - e.top) / e.height * 100, n = this.value.markers.map((c) => c.index).sort((c, d) => c - d);
2084
+ let o = 1;
2085
+ for (const c of n)
2086
+ if (c === o)
2087
+ o++;
2088
+ else
2089
+ break;
2090
+ let a;
2091
+ this.props.prizeMap && this.props.prizeMap.length > 0 && (a = this.props.prizeMap[o - 1]);
2092
+ const l = {
2093
+ id: Date.now(),
2094
+ index: o,
2095
+ x: Math.min(100, Math.max(0, i)),
2096
+ y: Math.min(100, Math.max(0, s)),
2097
+ prizeName: a
2098
+ }, r = [...this.value.markers, l];
2099
+ this.setMarkers(r), this.saveState(), this.refreshPopoverContent(), this.updateButtonDisplay(), this.triggerChange();
2100
+ }
2101
+ handleMarkerDrag(t) {
2102
+ var r;
2103
+ if (this.draggingMarkerId === null || !this.imageElement || !this.value) return;
2104
+ const e = this.imageElement.getBoundingClientRect(), i = (t.clientX - e.left) / e.width * 100, s = (t.clientY - e.top) / e.height * 100, n = Math.min(100, Math.max(0, i)), o = Math.min(100, Math.max(0, s)), a = this.value.markers.map(
2105
+ (c) => c.id === this.draggingMarkerId ? { ...c, x: n, y: o } : c
2106
+ ), l = (r = this.popoverEl) == null ? void 0 : r.querySelector(
2107
+ `[data-marker-id="${this.draggingMarkerId}"]`
2108
+ );
2109
+ l && (l.style.left = `${n}%`, l.style.top = `${o}%`), this.setMarkers(a);
2110
+ }
2111
+ stopDragging() {
2112
+ var t;
2113
+ if (this.draggingMarkerId !== null) {
2114
+ const e = (t = this.popoverEl) == null ? void 0 : t.querySelector(
2115
+ `[data-marker-id="${this.draggingMarkerId}"]`
2116
+ );
2117
+ e == null || e.classList.remove("dragging"), this.draggingMarkerId = null, this.saveState(), this.triggerChange();
2118
+ }
2119
+ }
2120
+ handleDeleteMarker(t) {
2121
+ if (!this.value || this.value.markers.findIndex((s) => s.id === t) === -1) return;
2122
+ const i = this.value.markers.filter((s) => s.id !== t);
2123
+ this.setMarkers(i), this.saveState(), this.refreshPopoverContent(), this.updateButtonDisplay(), this.triggerChange();
2124
+ }
2125
+ handleClearAllMarkers() {
2126
+ this.value && (this.setMarkers([]), this.saveState(), this.refreshPopoverContent(), this.updateButtonDisplay(), this.triggerChange());
2127
+ }
2128
+ getNextPrizeInfo() {
2129
+ if (!this.value) return { index: 1, name: "Prize 1" };
2130
+ const t = this.value.markers.map((s) => s.index).sort((s, n) => s - n);
2131
+ let e = 1;
2132
+ for (const s of t)
2133
+ if (s === e)
2134
+ e++;
2135
+ else
2136
+ break;
2137
+ let i = `Prize ${e}`;
2138
+ if (this.props.prizeMap && this.props.prizeMap.length > 0) {
2139
+ const s = this.props.prizeMap[e - 1];
2140
+ s && (i = s);
2141
+ }
2142
+ return { index: e, name: i };
2143
+ }
2144
+ showCursorTooltip() {
2145
+ if (!this.cursorTooltip || !this.value || this.value.markers.length >= (this.props.maxMarkers || 10))
2146
+ return;
2147
+ const t = this.getNextPrizeInfo();
2148
+ this.cursorTooltip.textContent = `Add: ${t.name}`, this.cursorTooltip.classList.add("visible");
2149
+ }
2150
+ hideCursorTooltip() {
2151
+ this.cursorTooltip && this.cursorTooltip.classList.remove("visible");
2152
+ }
2153
+ updateCursorTooltip(t) {
2154
+ if (!this.cursorTooltip || !this.imageElement) return;
2155
+ const e = this.imageElement.getBoundingClientRect(), i = t.clientX - e.left, s = t.clientY - e.top;
2156
+ this.cursorTooltip.style.left = `${i}px`, this.cursorTooltip.style.top = `${s}px`;
2157
+ }
2158
+ saveState() {
2159
+ if (this.isUndoRedoOperation || !this.value) return;
2160
+ const t = JSON.parse(JSON.stringify(this.value.markers));
2161
+ if (this.historyIndex >= 0 && this.history.length > 0) {
2162
+ const e = this.history[this.historyIndex];
2163
+ if (JSON.stringify(e) === JSON.stringify(t))
2164
+ return;
2165
+ }
2166
+ this.history = this.history.slice(0, this.historyIndex + 1), this.history.push(t), this.historyIndex++, this.history.length > 50 && (this.history.shift(), this.historyIndex--), this.updateUndoRedoButtons();
2167
+ }
2168
+ canUndo() {
2169
+ return this.historyIndex > 0;
2170
+ }
2171
+ canRedo() {
2172
+ return this.historyIndex < this.history.length - 1;
2173
+ }
2174
+ undo() {
2175
+ if (!this.canUndo() || !this.value) return;
2176
+ this.historyIndex--, this.isUndoRedoOperation = !0;
2177
+ const t = JSON.parse(
2178
+ JSON.stringify(this.history[this.historyIndex])
2179
+ );
2180
+ this.setMarkers(t), this.refreshPopoverContent(), this.updateButtonDisplay(), this.triggerChange(), this.isUndoRedoOperation = !1, this.updateUndoRedoButtons();
2181
+ }
2182
+ redo() {
2183
+ if (!this.canRedo() || !this.value) return;
2184
+ this.historyIndex++, this.isUndoRedoOperation = !0;
2185
+ const t = JSON.parse(
2186
+ JSON.stringify(this.history[this.historyIndex])
2187
+ );
2188
+ this.setMarkers(t), this.refreshPopoverContent(), this.updateButtonDisplay(), this.triggerChange(), this.isUndoRedoOperation = !1, this.updateUndoRedoButtons();
2189
+ }
2190
+ updateUndoRedoButtons() {
2191
+ if (!this.popoverEl) return;
2192
+ const t = this.popoverEl.querySelector(".undo-btn"), e = this.popoverEl.querySelector(".redo-btn");
2193
+ t && (t.disabled = !this.canUndo()), e && (e.disabled = !this.canRedo());
2194
+ }
2195
+ showError(t) {
2196
+ const e = document.createElement("div");
2197
+ if (e.className = "image-map-error-toast", e.textContent = t, e.style.cssText = `
2198
+ position: fixed;
2199
+ top: 20px;
2200
+ right: 20px;
2201
+ background-color: #ef4444;
2202
+ color: white;
2203
+ padding: 12px 16px;
2204
+ border-radius: 8px;
2205
+ box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
2206
+ z-index: 10000;
2207
+ max-width: 350px;
2208
+ font-size: 14px;
2209
+ animation: slideIn 0.3s ease-out;
2210
+ `, !document.getElementById("image-map-toast-styles")) {
2211
+ const i = document.createElement("style");
2212
+ i.id = "image-map-toast-styles", i.textContent = `
2213
+ @keyframes slideIn {
2214
+ from {
2215
+ transform: translateX(400px);
2216
+ opacity: 0;
2217
+ }
2218
+ to {
2219
+ transform: translateX(0);
2220
+ opacity: 1;
2221
+ }
2222
+ }
2223
+ @keyframes slideOut {
2224
+ from {
2225
+ transform: translateX(0);
2226
+ opacity: 1;
2227
+ }
2228
+ to {
2229
+ transform: translateX(400px);
2230
+ opacity: 0;
2231
+ }
2232
+ }
2233
+ `, document.head.appendChild(i);
2234
+ }
2235
+ document.body.appendChild(e), setTimeout(() => {
2236
+ e.style.animation = "slideOut 0.3s ease-out", setTimeout(() => {
2237
+ e.parentElement && e.parentElement.removeChild(e);
2238
+ }, 300);
2239
+ }, 5e3);
2240
+ }
2241
+ setMarkers(t) {
2242
+ const e = t.map((i) => ({ ...i }));
2243
+ this.value = {
2244
+ ...this.value || { imageUrl: "", markers: [] },
2245
+ markers: e
2246
+ };
2247
+ }
2248
+ triggerChange() {
2249
+ this.value && (this.onChange && this.onChange(this.value), this.props.detectChange && this.props.detectChange(this.value));
2250
+ }
2251
+ destroy() {
2252
+ var t, e;
2253
+ this.closePopover(), (t = this.backdropEl) != null && t.parentElement && this.backdropEl.parentElement.removeChild(this.backdropEl), (e = this.popoverEl) != null && e.parentElement && this.popoverEl.parentElement.removeChild(this.popoverEl), document.removeEventListener("click", this.onBackgroundClick, !0), document.removeEventListener("keydown", this.handlePopoverKeydown, !0);
2254
+ }
2255
+ };
2256
+ $.openInstance = null;
2257
+ let ht = $;
2258
+ class jt extends P {
1845
2259
  constructor(t = {}) {
1846
2260
  super({
1847
2261
  ...t,
1848
2262
  title: t.title || "Height",
1849
2263
  suffix: t.suffix || "px",
1850
2264
  minValue: t.minValue ?? 0,
1851
- icon: t.icon || Dt,
2265
+ icon: t.icon || qt,
1852
2266
  default: t.default ?? 100
1853
2267
  }), this.inputType = "number", this.mobileValue = t.mobile;
1854
2268
  }
@@ -1859,17 +2273,17 @@ class Gt extends P {
1859
2273
  this.mobileValue = t, t !== void 0 && this.setValue(t);
1860
2274
  }
1861
2275
  }
1862
- const Dt = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
2276
+ const qt = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
1863
2277
  <path d="M9 14L9 5M9 14L6.75 12.5M9 14L11.25 12.5M9 5L6.75 6.5M9 5L11.25 6.5M15.75 2.75H2.25M15.75 16.25H2.25" stroke="#667085" stroke-linecap="round" stroke-linejoin="round"/>
1864
2278
  </svg>`;
1865
- class Ft extends P {
2279
+ class Jt extends P {
1866
2280
  constructor(t = {}) {
1867
2281
  super({
1868
2282
  ...t,
1869
2283
  title: t.title || "Width",
1870
2284
  suffix: t.suffix || "px",
1871
2285
  minValue: t.minValue ?? 0,
1872
- icon: t.icon || Rt,
2286
+ icon: t.icon || _t,
1873
2287
  default: t.default ?? 100
1874
2288
  }), this.inputType = "number", this.mobileValue = t.mobile;
1875
2289
  }
@@ -1880,14 +2294,14 @@ class Ft extends P {
1880
2294
  this.mobileValue = t, t !== void 0 && this.setValue(t);
1881
2295
  }
1882
2296
  }
1883
- const Rt = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
2297
+ const _t = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
1884
2298
  <path d="M4.5 9.5H13.5M4.5 9.5L6 7.25M4.5 9.5L6 11.75M13.5 9.5L12 7.25M13.5 9.5L12 11.75M15.75 16.25V2.75M2.25 16.25V2.75" stroke="#667085" stroke-linecap="round" stroke-linejoin="round"/>
1885
- </svg>`, Wt = `
2299
+ </svg>`, Xt = `
1886
2300
  <svg xmlns="http://www.w3.org/2000/svg" class="svg-select-api" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-down">
1887
2301
  <polyline points="6 9 12 15 18 9"></polyline>
1888
2302
  </svg>
1889
2303
  `;
1890
- class ve extends x {
2304
+ class Le extends x {
1891
2305
  constructor(t = {}) {
1892
2306
  if (super(t), this.inputType = "select", this._options = [], this.isOpen = !1, this.selectedOptionIndex = null, this.optionsListEl = null, this.svgContainer = null, this.buttonEl = null, this.isLoading = !1, this.container = null, this.hasInitializedOptions = !1, this.selectedOptionIndex = null, t.default !== void 0 && (this.value = t.default), this.initializeOptions(t), !t.getOptionsAsync && this.value !== void 0) {
1893
2307
  const e = this._options.findIndex(
@@ -1942,7 +2356,7 @@ class ve extends x {
1942
2356
  a.onclick = (l) => this.selectApiOption(l, o, e), i.appendChild(a);
1943
2357
  }), t.appendChild(i);
1944
2358
  const s = document.createElement("div");
1945
- return s.classList.add("svg-container"), s.innerHTML = Wt, t.appendChild(s), s.onclick = () => {
2359
+ return s.classList.add("svg-container"), s.innerHTML = Xt, t.appendChild(s), s.onclick = () => {
1946
2360
  var n, o;
1947
2361
  this.isLoading || (this.isOpen = !this.isOpen, (n = this.optionsListEl) == null || n.classList.toggle("open", this.isOpen), (o = this.svgContainer) == null || o.classList.toggle("open", this.isOpen));
1948
2362
  }, this.optionsListEl = i, this.svgContainer = s, this.props.getOptionsAsync && !this.hasInitializedOptions ? (this.isLoading = !0, this.updateButtonText(), this.props.getOptionsAsync().then((n) => {
@@ -2036,7 +2450,7 @@ class ve extends x {
2036
2450
  ), this.updateButtonText(), this.updateOptionsList(), this.detectChangeCallback && this.detectChangeCallback !== this.props.detectChange && this.detectChangeCallback(t);
2037
2451
  }
2038
2452
  }
2039
- class Ce extends x {
2453
+ class ke extends x {
2040
2454
  constructor(t) {
2041
2455
  var e, i;
2042
2456
  super(t), this.inputType = "text", this.value = t.default ?? ((i = (e = t.options) == null ? void 0 : e[0]) == null ? void 0 : i.value) ?? "", this.detectChangeCallback = t.detectChange;
@@ -2059,19 +2473,19 @@ class Ce extends x {
2059
2473
  i.className = "toggle-switch";
2060
2474
  const s = document.createElement("input");
2061
2475
  s.type = "checkbox", s.checked = ((a = (o = this.props.options) == null ? void 0 : o.find((l) => l.value === this.value)) == null ? void 0 : a.status) ?? !1, this.getDataPropsPath() && s.setAttribute("data-test-id", this.getDataPropsPath()), s.addEventListener("change", () => {
2062
- var r, h;
2063
- const l = ((h = (r = this.props.options) == null ? void 0 : r.find((d) => d.status === s.checked)) == null ? void 0 : h.value) ?? "";
2476
+ var r, c;
2477
+ const l = ((c = (r = this.props.options) == null ? void 0 : r.find((d) => d.status === s.checked)) == null ? void 0 : c.value) ?? "";
2064
2478
  this.value = l, this.onChange && this.onChange(this.value), this.detectChangeCallback && this.detectChangeCallback(this.value);
2065
2479
  });
2066
2480
  const n = document.createElement("span");
2067
2481
  if (n.className = "toggle-slider", this.props.activeColor || this.props.inactiveColor) {
2068
- const l = document.createElement("style"), r = this.props.activeColor || "#4CAF50", h = this.props.inactiveColor || "#ccc";
2482
+ const l = document.createElement("style"), r = this.props.activeColor || "#4CAF50", c = this.props.inactiveColor || "#ccc";
2069
2483
  l.textContent = `
2070
2484
  .toggle-switch input:checked + .toggle-slider {
2071
2485
  background-color: ${r};
2072
2486
  }
2073
2487
  .toggle-switch .toggle-slider {
2074
- background-color: ${h};
2488
+ background-color: ${c};
2075
2489
  }
2076
2490
  `, document.head.appendChild(l);
2077
2491
  }
@@ -2086,13 +2500,13 @@ class Ce extends x {
2086
2500
  this.detectChangeCallback = t;
2087
2501
  }
2088
2502
  }
2089
- const Ut = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
2503
+ const Zt = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
2090
2504
  <path d="M13.3334 5.99996H2.66675M13.3334 9.99996H2.66675M5.33341 12.6666V3.33329M10.6667 12.6666V3.33329" stroke="#667085" stroke-width="1.33333" stroke-linecap="round" stroke-linejoin="round"/>
2091
2505
  </svg>`;
2092
- class ye extends x {
2506
+ class Me extends x {
2093
2507
  // Store mobile value
2094
2508
  constructor(t = {}) {
2095
- t.rowGap = t.rowGap ?? !0, t.columnGap = t.columnGap ?? !0, t.title = t.title ?? "Gap", t.icon = t.icon ?? Ut, t.suffix = t.suffix ?? "px", t.minValue = t.minValue ?? 0, super(t), this.inputType = "number", this.inputValues = {}, this.mobileValue = t.mobile, this.value = this.validateValue(t.default ?? 0), t.rowGap && (this.inputValues.row = this.value), t.columnGap && (this.inputValues.column = this.value);
2509
+ t.rowGap = t.rowGap ?? !0, t.columnGap = t.columnGap ?? !0, t.title = t.title ?? "Gap", t.icon = t.icon ?? Zt, t.suffix = t.suffix ?? "px", t.minValue = t.minValue ?? 0, super(t), this.inputType = "number", this.inputValues = {}, this.mobileValue = t.mobile, this.value = this.validateValue(t.default ?? 0), t.rowGap && (this.inputValues.row = this.value), t.columnGap && (this.inputValues.column = this.value);
2096
2510
  }
2097
2511
  draw() {
2098
2512
  const t = document.createElement("div");
@@ -2143,40 +2557,40 @@ class ye extends x {
2143
2557
  this.mobileValue = t, t !== void 0 && this.setValue(t);
2144
2558
  }
2145
2559
  }
2146
- const zt = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
2560
+ const Kt = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
2147
2561
  <path d="M2.25 11.75H15.75M5.85 2.75H12.15C13.4101 2.75 14.0402 2.75 14.5215 2.99524C14.9448 3.21095 15.289 3.55516 15.5048 3.97852C15.75 4.45982 15.75 5.08988 15.75 6.35V12.65C15.75 13.9101 15.75 14.5402 15.5048 15.0215C15.289 15.4448 14.9448 15.789 14.5215 16.0048C14.0402 16.25 13.4101 16.25 12.15 16.25H5.85C4.58988 16.25 3.95982 16.25 3.47852 16.0048C3.05516 15.789 2.71095 15.4448 2.49524 15.0215C2.25 14.5402 2.25 13.9101 2.25 12.65V6.35C2.25 5.08988 2.25 4.45982 2.49524 3.97852C2.71095 3.55516 3.05516 3.21095 3.47852 2.99524C3.95982 2.75 4.58988 2.75 5.85 2.75Z" stroke="#667085" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
2148
2562
  </svg>`;
2149
- class be extends P {
2563
+ class Ie extends P {
2150
2564
  constructor(t = {}) {
2151
2565
  super({
2152
2566
  ...t,
2153
2567
  minValue: t.minValue ?? 0,
2154
2568
  maxValue: t.maxValue ?? 1e3,
2155
- icon: t.icon || zt,
2569
+ icon: t.icon || Kt,
2156
2570
  title: t.title || "Margin Bottom",
2157
2571
  default: t.default ?? 20,
2158
2572
  wrapperClassName: "margin-bottom-wrapper " + (t.wrapperClassName || "")
2159
2573
  }), this.inputType = "number";
2160
2574
  }
2161
2575
  }
2162
- const jt = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
2576
+ const Yt = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
2163
2577
  <path d="M15.75 7.25H2.25m9.9 9h-6.3c-1.26 0-1.89 0-2.371-.245a2.25 2.25 0 0 1-.984-.983c-.245-.482-.245-1.112-.245-2.372v-6.3c0-1.26 0-1.89.245-2.371a2.25 2.25 0 0 1 .984-.984c.48-.245 1.11-.245 2.371-.245h6.3c1.26 0 1.89 0 2.371.245.424.216.768.56.984.984.245.48.245 1.11.245 2.371v6.3c0 1.26 0 1.89-.245 2.371-.216.424-.56.768-.984.984-.48.245-1.11.245-2.371.245"
2164
2578
  stroke="#667085" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
2165
2579
  </svg>`;
2166
- class Ee extends P {
2580
+ class Ne extends P {
2167
2581
  constructor(t = {}) {
2168
2582
  super({
2169
2583
  ...t,
2170
2584
  minValue: t.minValue ?? 0,
2171
2585
  maxValue: t.maxValue ?? 1e3,
2172
- icon: t.icon || jt,
2586
+ icon: t.icon || Yt,
2173
2587
  title: t.title || "Margin Top",
2174
2588
  default: t.default ?? 20,
2175
2589
  wrapperClassName: "margin-top-wrapper " + (t.wrapperClassName || "")
2176
2590
  }), this.inputType = "number";
2177
2591
  }
2178
2592
  }
2179
- class we extends x {
2593
+ class Se extends x {
2180
2594
  constructor(t) {
2181
2595
  super(t), this.inputType = {}, this.container = null, this.defaultLanguage = "", this.uploadSettings = /* @__PURE__ */ new Map(), t.default ? this.value = { ...t.default } : this.value || (this.value = {}), this.defaultLanguage = t.languages.includes(x.DefaultLanguage) ? x.DefaultLanguage : t.languages[0];
2182
2596
  const e = t.defaultValue || `Enter text in ${this.capitalizeFirstLetter(this.defaultLanguage)}`;
@@ -2208,14 +2622,14 @@ class we extends x {
2208
2622
  t.placeholder = e;
2209
2623
  return;
2210
2624
  }
2211
- const h = "...";
2625
+ const c = "...";
2212
2626
  let d = 0, p = e.length, g = 0;
2213
2627
  for (; d <= p; ) {
2214
- const m = Math.floor((d + p) / 2), u = e.slice(0, m).trimEnd() + h;
2628
+ const m = Math.floor((d + p) / 2), u = e.slice(0, m).trimEnd() + c;
2215
2629
  this.measureTextWidth(u, i) <= l ? (g = m, d = m + 1) : p = m - 1;
2216
2630
  }
2217
- const v = e.slice(0, g).trimEnd() + h;
2218
- t.placeholder = v;
2631
+ const f = e.slice(0, g).trimEnd() + c;
2632
+ t.placeholder = f;
2219
2633
  }
2220
2634
  autosizeTextarea(t, e = 3) {
2221
2635
  t.style.height = "auto";
@@ -2227,7 +2641,7 @@ class we extends x {
2227
2641
  i.classList.add("simple-multi-language-row");
2228
2642
  const s = document.createElement("label");
2229
2643
  if (s.classList.add("simple-language-label"), s.textContent = t.toUpperCase(), s.setAttribute("for", `textarea-${t}`), i.appendChild(s), this.props.multiImg) {
2230
- const n = new nt({
2644
+ const n = new ot({
2231
2645
  defaultUrl: e || "",
2232
2646
  title: "",
2233
2647
  id: `${this.id}_upload_${t}`
@@ -2250,8 +2664,8 @@ class we extends x {
2250
2664
  ), n.addEventListener("input", (l) => {
2251
2665
  const r = l.target;
2252
2666
  this.updateLanguageValue(t, r.value), t === this.defaultLanguage && this.updateOtherLanguagePlaceholders(r.value), this.autosizeTextarea(r, 3);
2253
- const h = n.getAttribute("data-full-placeholder") || "";
2254
- h && this.adaptPlaceholderToSingleLine(n, h);
2667
+ const c = n.getAttribute("data-full-placeholder") || "";
2668
+ c && this.adaptPlaceholderToSingleLine(n, c);
2255
2669
  }), i.appendChild(n), ((l) => (typeof queueMicrotask == "function" ? queueMicrotask : (r) => setTimeout(r, 0))(l))(() => {
2256
2670
  this.autosizeTextarea(n, 3);
2257
2671
  const l = n.getAttribute("data-full-placeholder") || "";
@@ -2323,7 +2737,7 @@ class we extends x {
2323
2737
  });
2324
2738
  }
2325
2739
  }
2326
- class xe extends x {
2740
+ class Ve extends x {
2327
2741
  constructor(t = {}) {
2328
2742
  super(t), this.inputType = "select";
2329
2743
  const e = [
@@ -2334,7 +2748,7 @@ class xe extends x {
2334
2748
  { name: "Bounce", value: "bounce 1.5s ease-in-out infinite" },
2335
2749
  { name: "Pulse", value: "pulse 1.5s ease-in-out infinite" }
2336
2750
  ];
2337
- this.selectSetting = new et({
2751
+ this.selectSetting = new it({
2338
2752
  title: this.title || "Animation",
2339
2753
  options: e,
2340
2754
  default: this.props.default || "none"
@@ -2350,72 +2764,56 @@ class xe extends x {
2350
2764
  this.selectSetting.destroy(), super.destroy();
2351
2765
  }
2352
2766
  }
2353
- const ut = (c, t, e) => {
2354
- let i = !1, s = 0, n = 0, o = 0, a = 0;
2355
- const l = (d) => {
2356
- if (d.target.closest("button")) return;
2357
- i = !0, s = d.clientX, n = d.clientY;
2358
- const p = t.getBoundingClientRect();
2359
- o = p.left, a = p.top, document.addEventListener("mousemove", r), document.addEventListener("mouseup", h), document.body.style.userSelect = "none";
2360
- }, r = (d) => {
2361
- if (!i) return;
2362
- const p = d.clientX - s, g = d.clientY - n, v = window.innerWidth, m = window.innerHeight, u = t.offsetWidth, f = t.offsetHeight;
2363
- let C = o + p, y = a + g;
2364
- C = Math.max(8, Math.min(v - u - 8, C)), y = Math.max(8, Math.min(m - f - 8, y)), t.style.left = `${C}px`, t.style.top = `${y}px`, e == null || e(C, y);
2365
- }, h = () => {
2366
- i = !1, document.removeEventListener("mousemove", r), document.removeEventListener("mouseup", h), document.body.style.userSelect = "";
2367
- };
2368
- c.addEventListener("mousedown", l);
2369
- }, U = (c) => {
2370
- if (!c) return null;
2371
- let t = c.trim();
2767
+ const W = (h) => {
2768
+ if (!h) return null;
2769
+ let t = h.trim();
2372
2770
  return !t.startsWith("#") || (t = t.slice(1), t.length === 3 && (t = t.split("").map((e) => e + e).join("")), !/^[0-9a-fA-F]{6}$/.test(t)) ? null : `#${t.toUpperCase()}`;
2373
- }, J = (c, t, e) => `#${[c, t, e].map((i) => Math.max(0, Math.min(255, i)).toString(16).padStart(2, "0")).join("")}`, N = (c) => {
2374
- const t = c.replace("#", ""), e = t.length === 3 ? t.split("").map((i) => i + i).join("") : t;
2771
+ }, X = (h, t, e) => `#${[h, t, e].map((i) => Math.max(0, Math.min(255, i)).toString(16).padStart(2, "0")).join("")}`, S = (h) => {
2772
+ const t = h.replace("#", ""), e = t.length === 3 ? t.split("").map((i) => i + i).join("") : t;
2375
2773
  return {
2376
2774
  r: parseInt(e.slice(0, 2), 16),
2377
2775
  g: parseInt(e.slice(2, 4), 16),
2378
2776
  b: parseInt(e.slice(4, 6), 16)
2379
2777
  };
2380
- }, R = (c) => {
2381
- const { r: t, g: e, b: i } = N(c), s = t / 255, n = e / 255, o = i / 255, a = Math.max(s, n, o), l = Math.min(s, n, o), r = a - l;
2382
- let h = 0;
2383
- r !== 0 && (a === s ? h = (n - o) / r % 6 : a === n ? h = (o - s) / r + 2 : h = (s - n) / r + 4), h < 0 && (h += 6);
2778
+ }, z = (h) => {
2779
+ const { r: t, g: e, b: i } = S(h), s = t / 255, n = e / 255, o = i / 255, a = Math.max(s, n, o), l = Math.min(s, n, o), r = a - l;
2780
+ let c = 0;
2781
+ r !== 0 && (a === s ? c = (n - o) / r % 6 : a === n ? c = (o - s) / r + 2 : c = (s - n) / r + 4), c < 0 && (c += 6);
2384
2782
  const d = a === 0 ? 0 : r / a, p = a;
2385
- return { h: h * 60, s: d, v: p };
2386
- }, W = (c, t, e) => {
2387
- const i = (c % 360 + 360) % 360, s = e * t, n = s * (1 - Math.abs(i / 60 % 2 - 1)), o = e - s;
2783
+ return { h: c * 60, s: d, v: p };
2784
+ }, U = (h, t, e) => {
2785
+ const i = (h % 360 + 360) % 360, s = e * t, n = s * (1 - Math.abs(i / 60 % 2 - 1)), o = e - s;
2388
2786
  let a = 0, l = 0, r = 0;
2389
- return i < 60 ? (a = s, l = n, r = 0) : i < 120 ? (a = n, l = s, r = 0) : i < 180 ? (a = 0, l = s, r = n) : i < 240 ? (a = 0, l = n, r = s) : i < 300 ? (a = n, l = 0, r = s) : (a = s, l = 0, r = n), J(
2787
+ return i < 60 ? (a = s, l = n, r = 0) : i < 120 ? (a = n, l = s, r = 0) : i < 180 ? (a = 0, l = s, r = n) : i < 240 ? (a = 0, l = n, r = s) : i < 300 ? (a = n, l = 0, r = s) : (a = s, l = 0, r = n), X(
2390
2788
  Math.round((a + o) * 255),
2391
2789
  Math.round((l + o) * 255),
2392
2790
  Math.round((r + o) * 255)
2393
2791
  );
2394
- }, gt = (c, t, e) => {
2792
+ }, vt = (h, t, e) => {
2395
2793
  const i = e * (1 - t / 2), s = i === 0 || i === 1 ? 0 : (e - i) / Math.min(i, 1 - i);
2396
- return { hue: c, sat: s, lightness: i };
2397
- }, it = (c, t, e) => {
2398
- const i = (1 - Math.abs(2 * e - 1)) * t, s = i * (1 - Math.abs(c / 60 % 2 - 1)), n = e - i / 2;
2794
+ return { hue: h, sat: s, lightness: i };
2795
+ }, st = (h, t, e) => {
2796
+ const i = (1 - Math.abs(2 * e - 1)) * t, s = i * (1 - Math.abs(h / 60 % 2 - 1)), n = e - i / 2;
2399
2797
  let o = 0, a = 0, l = 0;
2400
- return c < 60 ? (o = i, a = s, l = 0) : c < 120 ? (o = s, a = i, l = 0) : c < 180 ? (o = 0, a = i, l = s) : c < 240 ? (o = 0, a = s, l = i) : c < 300 ? (o = s, a = 0, l = i) : (o = i, a = 0, l = s), {
2798
+ return h < 60 ? (o = i, a = s, l = 0) : h < 120 ? (o = s, a = i, l = 0) : h < 180 ? (o = 0, a = i, l = s) : h < 240 ? (o = 0, a = s, l = i) : h < 300 ? (o = s, a = 0, l = i) : (o = i, a = 0, l = s), {
2401
2799
  r: Math.round((o + n) * 255),
2402
2800
  g: Math.round((a + n) * 255),
2403
2801
  b: Math.round((l + n) * 255)
2404
2802
  };
2405
- }, st = (c, t) => {
2803
+ }, nt = (h, t) => {
2406
2804
  const e = Math.max(0, Math.min(100, t)) / 100;
2407
- if (c.startsWith("#")) {
2408
- const { r: s, g: n, b: o } = N(c);
2805
+ if (h.startsWith("#")) {
2806
+ const { r: s, g: n, b: o } = S(h);
2409
2807
  return `rgba(${s}, ${n}, ${o}, ${e})`;
2410
2808
  }
2411
- if (c.startsWith("rgba("))
2412
- return c.replace(/,\s*[\d.]+\)$/, `, ${e})`);
2413
- if (c.startsWith("rgb("))
2414
- return c.replace("rgb(", "rgba(").replace(")", `, ${e})`);
2415
- if (c.startsWith("hsl(")) {
2416
- const s = c.match(/hsl\((\d+),\s*(\d+)%,\s*(\d+)%\)/);
2809
+ if (h.startsWith("rgba("))
2810
+ return h.replace(/,\s*[\d.]+\)$/, `, ${e})`);
2811
+ if (h.startsWith("rgb("))
2812
+ return h.replace("rgb(", "rgba(").replace(")", `, ${e})`);
2813
+ if (h.startsWith("hsl(")) {
2814
+ const s = h.match(/hsl\((\d+),\s*(\d+)%,\s*(\d+)%\)/);
2417
2815
  if (s) {
2418
- const { r: n, g: o, b: a } = it(
2816
+ const { r: n, g: o, b: a } = st(
2419
2817
  parseInt(s[1]),
2420
2818
  parseInt(s[2]) / 100,
2421
2819
  parseInt(s[3]) / 100
@@ -2423,10 +2821,10 @@ const ut = (c, t, e) => {
2423
2821
  return `rgba(${n}, ${o}, ${a}, ${e})`;
2424
2822
  }
2425
2823
  }
2426
- if (c.startsWith("hsla(")) {
2427
- const s = c.match(/hsla\((\d+),\s*(\d+)%,\s*(\d+)%,\s*[\d.]+\)/);
2824
+ if (h.startsWith("hsla(")) {
2825
+ const s = h.match(/hsla\((\d+),\s*(\d+)%,\s*(\d+)%,\s*[\d.]+\)/);
2428
2826
  if (s) {
2429
- const { r: n, g: o, b: a } = it(
2827
+ const { r: n, g: o, b: a } = st(
2430
2828
  parseInt(s[1]),
2431
2829
  parseInt(s[2]) / 100,
2432
2830
  parseInt(s[3]) / 100
@@ -2434,13 +2832,13 @@ const ut = (c, t, e) => {
2434
2832
  return `rgba(${n}, ${o}, ${a}, ${e})`;
2435
2833
  }
2436
2834
  }
2437
- const i = U(c);
2835
+ const i = W(h);
2438
2836
  if (i) {
2439
- const { r: s, g: n, b: o } = N(i);
2837
+ const { r: s, g: n, b: o } = S(i);
2440
2838
  return `rgba(${s}, ${n}, ${o}, ${e})`;
2441
2839
  }
2442
- return c;
2443
- }, qt = (c) => [
2840
+ return h;
2841
+ }, Qt = (h) => [
2444
2842
  "red",
2445
2843
  "green",
2446
2844
  "blue",
@@ -2464,22 +2862,22 @@ const ut = (c, t, e) => {
2464
2862
  "teal",
2465
2863
  "fuchsia",
2466
2864
  "transparent"
2467
- ].includes(c.toLowerCase()), mt = (c) => [
2865
+ ].includes(h.toLowerCase()), ft = (h) => [
2468
2866
  /^#[0-9a-fA-F]{3,8}$/,
2469
2867
  /^rgba?\s*\([^)]+\)$/,
2470
2868
  /^hsla?\s*\([^)]+\)$/,
2471
2869
  /^[a-zA-Z]+$/
2472
- ].some((e) => e.test(c.trim())), _t = (c) => {
2870
+ ].some((e) => e.test(h.trim())), te = (h) => {
2473
2871
  if (typeof document > "u")
2474
- return mt(c) || !!U(c);
2872
+ return ft(h) || !!W(h);
2475
2873
  const t = document.createElement("div");
2476
- return t.style.color = c, t.style.color !== "";
2477
- }, ft = (c) => {
2478
- const t = c.trim();
2874
+ return t.style.color = h, t.style.color !== "";
2875
+ }, Ct = (h) => {
2876
+ const t = h.trim();
2479
2877
  if (/^#[0-9A-Fa-f]{8}$/.test(t)) {
2480
2878
  const n = t.slice(1), o = parseInt(n.slice(0, 2), 16), a = parseInt(n.slice(2, 4), 16), l = parseInt(n.slice(4, 6), 16), r = parseInt(n.slice(6, 8), 16);
2481
2879
  return {
2482
- color: J(o, a, l),
2880
+ color: X(o, a, l),
2483
2881
  position: 0,
2484
2882
  opacity: Math.round(r / 255 * 100)
2485
2883
  };
@@ -2490,7 +2888,7 @@ const ut = (c, t, e) => {
2490
2888
  if (e) {
2491
2889
  const n = parseInt(e[1]), o = parseInt(e[2]), a = parseInt(e[3]), l = e[4] ? parseFloat(e[4]) : 1;
2492
2890
  return {
2493
- color: J(n, o, a),
2891
+ color: X(n, o, a),
2494
2892
  position: 0,
2495
2893
  opacity: Math.round(l * 100)
2496
2894
  };
@@ -2499,23 +2897,23 @@ const ut = (c, t, e) => {
2499
2897
  /hsla?\s*\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)/
2500
2898
  );
2501
2899
  if (i) {
2502
- const { r: n, g: o, b: a } = it(
2900
+ const { r: n, g: o, b: a } = st(
2503
2901
  parseFloat(i[1]),
2504
2902
  parseFloat(i[2]) / 100,
2505
2903
  parseFloat(i[3]) / 100
2506
2904
  ), l = i[4] ? parseFloat(i[4]) : 1;
2507
2905
  return {
2508
- color: J(n, o, a),
2906
+ color: X(n, o, a),
2509
2907
  position: 0,
2510
2908
  opacity: Math.round(l * 100)
2511
2909
  };
2512
2910
  }
2513
- return { color: U(t) || t, position: 0, opacity: 100 };
2514
- }, rt = (c) => {
2911
+ return { color: W(t) || t, position: 0, opacity: 100 };
2912
+ }, dt = (h) => {
2515
2913
  const t = [];
2516
2914
  let e = "", i = 0;
2517
- for (let s = 0; s < c.length; s++) {
2518
- const n = c[s];
2915
+ for (let s = 0; s < h.length; s++) {
2916
+ const n = h[s];
2519
2917
  if (n === "(") i++;
2520
2918
  else if (n === ")") i--;
2521
2919
  else if (n === "," && i === 0) {
@@ -2525,16 +2923,16 @@ const ut = (c, t, e) => {
2525
2923
  e += n;
2526
2924
  }
2527
2925
  return e.trim() && t.push(e.trim()), t;
2528
- }, ct = (c, t) => {
2529
- const e = new RegExp(`${t}\\s*\\(`, "i"), i = c.match(e);
2926
+ }, pt = (h, t) => {
2927
+ const e = new RegExp(`${t}\\s*\\(`, "i"), i = h.match(e);
2530
2928
  if (!i) return null;
2531
2929
  const s = i.index + i[0].length;
2532
2930
  let n = 1, o = s;
2533
- for (let a = s; a < c.length && n > 0; a++)
2534
- c[a] === "(" ? n++ : c[a] === ")" && n--, o = a;
2535
- return n === 0 ? c.substring(s, o) : null;
2536
- }, Jt = (c) => {
2537
- const t = c.split(" ")[0].toLowerCase();
2931
+ for (let a = s; a < h.length && n > 0; a++)
2932
+ h[a] === "(" ? n++ : h[a] === ")" && n--, o = a;
2933
+ return n === 0 ? h.substring(s, o) : null;
2934
+ }, ee = (h) => {
2935
+ const t = h.split(" ")[0].toLowerCase();
2538
2936
  return [
2539
2937
  "circle",
2540
2938
  "ellipse",
@@ -2545,38 +2943,38 @@ const ut = (c, t, e) => {
2545
2943
  "at",
2546
2944
  "contain",
2547
2945
  "cover"
2548
- ].includes(t) ? !1 : /^#[0-9a-f]{3,8}$/i.test(t) || /^rgb/i.test(c) || /^hsl/i.test(c) || qt(t);
2549
- }, ht = (c) => {
2946
+ ].includes(t) ? !1 : /^#[0-9a-f]{3,8}$/i.test(t) || /^rgb/i.test(h) || /^hsl/i.test(h) || Qt(t);
2947
+ }, ut = (h) => {
2550
2948
  const t = [];
2551
- return c.forEach((e, i) => {
2949
+ return h.forEach((e, i) => {
2552
2950
  const s = e.trim();
2553
2951
  if (!s) return;
2554
2952
  let n = "", o = 0;
2555
2953
  const a = s.match(/^(.+?)\s+(\d+(?:\.\d+)?)%?\s*$/);
2556
- a && mt(a[1].trim()) ? (n = a[1].trim(), o = parseFloat(a[2])) : (n = s, o = c.length === 1 ? 0 : i / (c.length - 1) * 100);
2557
- const l = ft(n);
2954
+ a && ft(a[1].trim()) ? (n = a[1].trim(), o = parseFloat(a[2])) : (n = s, o = h.length === 1 ? 0 : i / (h.length - 1) * 100);
2955
+ const l = Ct(n);
2558
2956
  l.position = Math.max(0, Math.min(100, Math.round(o))), t.push(l);
2559
2957
  }), t;
2560
- }, H = (c) => {
2561
- const t = c.stops && c.stops.length ? c.stops : [{ color: "#000000", position: 0, opacity: 100 }];
2958
+ }, B = (h) => {
2959
+ const t = h.stops && h.stops.length ? h.stops : [{ color: "#000000", position: 0, opacity: 100 }];
2562
2960
  return {
2563
- type: c.type && ["linear", "radial", "solid"].includes(c.type) ? c.type : "linear",
2564
- angle: typeof c.angle == "number" ? c.angle : 90,
2961
+ type: h.type && ["linear", "radial", "solid"].includes(h.type) ? h.type : "linear",
2962
+ angle: typeof h.angle == "number" ? h.angle : 90,
2565
2963
  stops: t.map((e, i) => ({
2566
2964
  color: e.color || "#000000",
2567
2965
  position: typeof e.position == "number" ? e.position : t.length === 1 ? 0 : Math.round(i / (t.length - 1) * 100),
2568
2966
  opacity: e.opacity === void 0 || Number.isNaN(e.opacity) ? 100 : e.opacity
2569
2967
  }))
2570
2968
  };
2571
- }, I = (c) => {
2572
- const t = c.replace(/;$/, "").trim();
2573
- if (_t(t)) {
2574
- const s = ft(t);
2575
- return H({ type: "solid", angle: 0, stops: [s] });
2969
+ }, N = (h) => {
2970
+ const t = h.replace(/;$/, "").trim();
2971
+ if (te(t)) {
2972
+ const s = Ct(t);
2973
+ return B({ type: "solid", angle: 0, stops: [s] });
2576
2974
  }
2577
- const e = ct(t, "linear-gradient");
2975
+ const e = pt(t, "linear-gradient");
2578
2976
  if (e) {
2579
- const s = rt(e);
2977
+ const s = dt(e);
2580
2978
  let n = 90, o = s;
2581
2979
  const a = s[0];
2582
2980
  if (a.includes("deg")) {
@@ -2592,30 +2990,30 @@ const ut = (c, t, e) => {
2592
2990
  "to top right": 45,
2593
2991
  "to top left": 315
2594
2992
  }[a] ?? 90, o = s.slice(1));
2595
- const l = ht(o);
2596
- return l.length ? H({ type: "linear", angle: n, stops: l }) : null;
2993
+ const l = ut(o);
2994
+ return l.length ? B({ type: "linear", angle: n, stops: l }) : null;
2597
2995
  }
2598
- const i = ct(t, "radial-gradient");
2996
+ const i = pt(t, "radial-gradient");
2599
2997
  if (i) {
2600
- const s = rt(i), n = s[0] && !Jt(s[0]) ? s.slice(1) : s, o = ht(n);
2601
- return o.length ? H({ type: "radial", angle: 0, stops: o }) : null;
2998
+ const s = dt(i), n = s[0] && !ee(s[0]) ? s.slice(1) : s, o = ut(n);
2999
+ return o.length ? B({ type: "radial", angle: 0, stops: o }) : null;
2602
3000
  }
2603
3001
  return null;
2604
- }, O = (c) => {
2605
- if (c.type === "solid") {
2606
- const e = c.stops[0], i = e.color;
3002
+ }, O = (h) => {
3003
+ if (h.type === "solid") {
3004
+ const e = h.stops[0], i = e.color;
2607
3005
  if (i.startsWith("var(--"))
2608
3006
  return i;
2609
3007
  const s = e.opacity ?? 100, n = i.replace("#", ""), o = Math.round(s / 100 * 255).toString(16).toUpperCase().padStart(2, "0");
2610
3008
  return `#${n}${o}`;
2611
3009
  }
2612
- const t = c.stops.map(
2613
- (e) => `${st(e.color, e.opacity ?? 100)} ${e.position}%`
3010
+ const t = h.stops.map(
3011
+ (e) => `${nt(e.color, e.opacity ?? 100)} ${e.position}%`
2614
3012
  ).join(", ");
2615
- return c.type === "radial" ? `radial-gradient(circle, ${t})` : `linear-gradient(${c.angle}deg, ${t})`;
2616
- }, Zt = (c) => Math.round(c / 100 * 255).toString(16).toUpperCase().padStart(2, "0"), Z = (c) => {
2617
- if (c.type === "solid") {
2618
- const t = c.stops[0];
3013
+ return h.type === "radial" ? `radial-gradient(circle, ${t})` : `linear-gradient(${h.angle}deg, ${t})`;
3014
+ }, ie = (h) => Math.round(h / 100 * 255).toString(16).toUpperCase().padStart(2, "0"), Z = (h) => {
3015
+ if (h.type === "solid") {
3016
+ const t = h.stops[0];
2619
3017
  if (t) {
2620
3018
  const e = t.color;
2621
3019
  if (e.startsWith("var(--"))
@@ -2625,14 +3023,14 @@ const ut = (c, t, e) => {
2625
3023
  if (i === 100)
2626
3024
  return e;
2627
3025
  {
2628
- const s = Zt(i);
3026
+ const s = ie(i);
2629
3027
  return `${e}${s}`;
2630
3028
  }
2631
3029
  }
2632
3030
  return "#000000";
2633
3031
  }
2634
- return c.type === "linear" ? `Linear ${c.angle}°` : "Radial Gradient";
2635
- }, z = class z {
3032
+ return h.type === "linear" ? `Linear ${h.angle}°` : "Radial Gradient";
3033
+ }, j = class j {
2636
3034
  static defaults() {
2637
3035
  return {
2638
3036
  solid: [],
@@ -2642,8 +3040,8 @@ const ut = (c, t, e) => {
2642
3040
  static normalizeList(t) {
2643
3041
  const e = /* @__PURE__ */ new Set(), i = [];
2644
3042
  return t.forEach((s) => {
2645
- let n = U(s);
2646
- n || I(s) && (n = s), n && (e.has(n) || (e.add(n), i.push(n)));
3043
+ let n = W(s);
3044
+ n || N(s) && (n = s), n && (e.has(n) || (e.add(n), i.push(n)));
2647
3045
  }), i.slice(0, this.MAX_COLORS);
2648
3046
  }
2649
3047
  static ensureLoaded() {
@@ -2688,11 +3086,11 @@ const ut = (c, t, e) => {
2688
3086
  }
2689
3087
  static addColor(t, e) {
2690
3088
  if (!t) return;
2691
- let i = U(t), s = "solid";
3089
+ let i = W(t), s = "solid";
2692
3090
  if (i)
2693
3091
  s = "solid";
2694
3092
  else {
2695
- const l = I(t);
3093
+ const l = N(t);
2696
3094
  l && (i = t, s = l.type === "solid" ? "solid" : "gradient");
2697
3095
  }
2698
3096
  if (!i) return;
@@ -2700,9 +3098,9 @@ const ut = (c, t, e) => {
2700
3098
  a !== -1 && o.splice(a, 1), o.unshift(i), o.length > this.MAX_COLORS && (o.length = this.MAX_COLORS), this.persist();
2701
3099
  }
2702
3100
  };
2703
- z.STORAGE_KEY = "settingsLib_recentColors", z.MAX_COLORS = 12, z.colors = null;
2704
- let D = z;
2705
- const ot = (c, t) => {
3101
+ j.STORAGE_KEY = "settingsLib_recentColors", j.MAX_COLORS = 12, j.colors = null;
3102
+ let R = j;
3103
+ const lt = (h, t) => {
2706
3104
  const e = document.createElement("div");
2707
3105
  e.className = "color-picker-recent-section";
2708
3106
  const i = document.createElement("div");
@@ -2711,8 +3109,8 @@ const ot = (c, t) => {
2711
3109
  s.className = "color-picker-tooltip", s.style.display = "none", e.appendChild(s);
2712
3110
  const n = () => {
2713
3111
  s.style.display = "none";
2714
- }, o = (h, d) => {
2715
- const p = h.getBoundingClientRect();
3112
+ }, o = (c, d) => {
3113
+ const p = c.getBoundingClientRect();
2716
3114
  s.textContent = d, s.style.left = `${p.left + p.width / 2}px`, s.style.top = `${p.bottom + 8}px`, s.style.display = "block";
2717
3115
  }, a = document.createElement("div");
2718
3116
  a.className = "color-picker-recent-grid";
@@ -2720,18 +3118,18 @@ const ot = (c, t) => {
2720
3118
  l.className = "color-picker-recent-placeholder", l.textContent = "No recent colors yet", e.appendChild(i), e.appendChild(a), e.appendChild(l);
2721
3119
  const r = () => {
2722
3120
  n(), a.innerHTML = "";
2723
- const h = D.getColors(t);
2724
- if (h.length === 0) {
3121
+ const c = R.getColors(t);
3122
+ if (c.length === 0) {
2725
3123
  a.style.display = "none", l.style.display = "block";
2726
3124
  return;
2727
3125
  }
2728
- a.style.display = "grid", l.style.display = "none", h.forEach((d) => {
3126
+ a.style.display = "grid", l.style.display = "none", c.forEach((d) => {
2729
3127
  const p = document.createElement("button");
2730
3128
  p.type = "button", p.className = "color-picker-recent-swatch";
2731
- const g = Xt(d);
3129
+ const g = se(d);
2732
3130
  if (p.title = g, p.setAttribute("aria-label", `Use color: ${g}`), d.includes("gradient(")) {
2733
3131
  p.style.backgroundImage = d, p.style.backgroundColor = "transparent";
2734
- const m = I(d);
3132
+ const m = N(d);
2735
3133
  m && m.stops && m.stops.length > 0 && (p.style.borderColor = m.stops[0].color);
2736
3134
  } else
2737
3135
  p.style.backgroundColor = d, p.style.borderColor = d;
@@ -2744,47 +3142,47 @@ const ot = (c, t) => {
2744
3142
  p.style.boxShadow = "";
2745
3143
  }, 150);
2746
3144
  }), p.addEventListener("click", () => {
2747
- n(), c(d);
3145
+ n(), h(d);
2748
3146
  }), a.appendChild(p);
2749
3147
  });
2750
3148
  };
2751
3149
  return r(), { container: e, refresh: r };
2752
- }, Xt = (c) => {
2753
- const t = I(c);
3150
+ }, se = (h) => {
3151
+ const t = N(h);
2754
3152
  if (t)
2755
3153
  return Z(t);
2756
- const e = U(c);
3154
+ const e = W(h);
2757
3155
  if (e) {
2758
- const i = N(e);
3156
+ const i = S(e);
2759
3157
  return `${e} (RGB: ${i.r}, ${i.g}, ${i.b})`;
2760
3158
  }
2761
- return c;
2762
- }, vt = `<svg width="13" height="13" viewBox="0 0 13 13" fill="none" xmlns="http://www.w3.org/2000/svg">
3159
+ return h;
3160
+ }, yt = `<svg width="13" height="13" viewBox="0 0 13 13" fill="none" xmlns="http://www.w3.org/2000/svg">
2763
3161
  <path fill-rule="evenodd" clip-rule="evenodd"
2764
3162
  d="M6.12347 4.96653L1.41158 0.254304C1.25449 0.102568 1.04409 0.0186071 0.825694 0.0205049C0.607302 0.0224037 0.398393 0.110007 0.24396 0.26445C0.0895282 0.418893 0.0019303 0.627818 3.24698e-05 0.846225C-0.00186536 1.06463 0.0820894 1.27505 0.233815 1.43215L4.9457 6.14438L0.233814 10.8566C0.0820886 11.0137 -0.00186625 11.2241 3.15434e-05 11.4425C0.00192934 11.6609 0.0895272 11.8699 0.243959 12.0243C0.398392 12.1787 0.607301 12.2663 0.825693 12.2682C1.04408 12.2701 1.25449 12.1862 1.41158 12.0344L6.12347 7.32222L10.8354 12.0344C10.9932 12.1824 11.2023 12.2632 11.4186 12.2597C11.6349 12.2562 11.8414 12.1687 11.9943 12.0156C12.1472 11.8626 12.2346 11.6561 12.2379 11.4398C12.2413 11.2234 12.1604 11.0143 12.0123 10.8566L7.30123 6.14438L12.0131 1.43215C12.0927 1.35531 12.1561 1.2634 12.1998 1.16177C12.2434 1.06014 12.2664 0.950833 12.2674 0.84023C12.2683 0.729626 12.2473 0.61994 12.2054 0.517568C12.1635 0.415196 12.1017 0.322191 12.0234 0.243979C11.9452 0.165768 11.8522 0.103916 11.7499 0.0620327C11.6475 0.0201492 11.5378 -0.000927989 11.4272 3.33052e-05C11.3166 0.000993646 11.2073 0.0239743 11.1057 0.0676297C11.0041 0.111286 10.9122 0.174745 10.8354 0.254305L6.12347 4.96653Z"
2765
3163
  fill="#919EAB"/>
2766
- </svg>`, Ct = `<svg width="23" height="23" viewBox="0 0 23 23" fill="none" xmlns="http://www.w3.org/2000/svg">
3164
+ </svg>`, bt = `<svg width="23" height="23" viewBox="0 0 23 23" fill="none" xmlns="http://www.w3.org/2000/svg">
2767
3165
  <path fill-rule="evenodd" clip-rule="evenodd" d="M19.1972 3.29156C18.936 3.03034 18.6259 2.82313 18.2847 2.68176C17.9434 2.54039 17.5777 2.46763 17.2083 2.46763C16.8389 2.46763 16.4731 2.54039 16.1319 2.68176C15.7906 2.82313 15.4805 3.03034 15.2194 3.29156L13.7822 4.72875C13.2585 4.4772 12.6697 4.39449 12.097 4.49207C11.5243 4.58964 10.9961 4.86267 10.5853 5.27343L9.91687 5.94281C9.74268 6.11693 9.6045 6.32366 9.51023 6.5512C9.41595 6.77873 9.36743 7.02261 9.36743 7.2689C9.36743 7.5152 9.41595 7.75907 9.51023 7.98661C9.6045 8.21414 9.74268 8.42088 9.91687 8.595L3.83625 14.6747C3.57512 14.936 3.36803 15.2462 3.2268 15.5875C3.08556 15.9288 3.01296 16.2947 3.01312 16.6641V18.3516C3.01312 18.6499 3.13165 18.9361 3.34263 19.1471C3.55361 19.358 3.83975 19.4766 4.13812 19.4766H5.82562C6.57129 19.4759 7.28618 19.1792 7.81312 18.6516L13.8937 12.5728C14.0679 12.747 14.2746 12.8852 14.5021 12.9795C14.7297 13.0737 14.9735 13.1223 15.2198 13.1223C15.4661 13.1223 15.71 13.0737 15.9375 12.9795C16.1651 12.8852 16.3718 12.747 16.5459 12.5728L17.2153 11.9025C17.6261 11.4917 17.8991 10.9635 17.9967 10.3908C18.0942 9.81811 18.0115 9.22926 17.76 8.70562L19.1972 7.26937C19.4584 7.0082 19.6656 6.69813 19.807 6.35687C19.9484 6.01561 20.0211 5.64985 20.0211 5.28047C20.0211 4.91108 19.9484 4.54532 19.807 4.20406C19.6656 3.8628 19.4584 3.55273 19.1972 3.29156ZM5.16281 16.0012L11.2425 9.92062L12.5681 11.2462L6.48844 17.3269C6.31266 17.5027 6.07424 17.6015 5.82562 17.6016H4.88812V16.6641C4.88818 16.4154 4.98698 16.177 5.16281 16.0012Z" fill="#353C47"/>
2768
- </svg>`, Kt = `<svg width="15" height="17" viewBox="0 0 15 17" fill="none" xmlns="http://www.w3.org/2000/svg">
3166
+ </svg>`, ne = `<svg width="15" height="17" viewBox="0 0 15 17" fill="none" xmlns="http://www.w3.org/2000/svg">
2769
3167
  <path d="M14.1333 12.4667H0.8M0.8 12.4667L4.13333 9.13332M0.8 12.4667L4.13333 15.8M0.8 4.13332H14.1333M14.1333 4.13332L10.8 0.799988M14.1333 4.13332L10.8 7.46665" stroke="#919EAB" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/>
2770
- </svg>`, Yt = `<svg width="14" height="2" viewBox="0 0 14 2" fill="none" xmlns="http://www.w3.org/2000/svg">
3168
+ </svg>`, oe = `<svg width="14" height="2" viewBox="0 0 14 2" fill="none" xmlns="http://www.w3.org/2000/svg">
2771
3169
  <path d="M0.8 0.800003H12.4667" stroke="#919EAB" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/>
2772
- </svg>`, Qt = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
3170
+ </svg>`, ae = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2773
3171
  <rect x="21.25" y="21.333" width="18" height="18" rx="1" transform="rotate(-180 21.25 21.333)" stroke="#637381"/>
2774
3172
  <rect x="18.5835" y="18.667" width="12.6667" height="12.6667" rx="1" transform="rotate(-180 18.5835 18.667)" fill="#637381"/>
2775
3173
  </svg>
2776
3174
 
2777
- `, te = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
3175
+ `, le = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2778
3176
  <path d="M4.5 21L19.5 21C19.8978 21 20.2794 20.842 20.5607 20.5607C20.842 20.2794 21 19.8978 21 19.5L21 4.5C21 4.10218 20.842 3.72065 20.5607 3.43934C20.2794 3.15804 19.8978 3 19.5 3L4.5 3C4.10218 3 3.72065 3.15804 3.43934 3.43934C3.15804 3.72064 3 4.10218 3 4.5L3 19.5C3 19.8978 3.15804 20.2794 3.43934 20.5607C3.72065 20.842 4.10218 21 4.5 21ZM7.5 4.5L7.5 7.5L10.5 7.5L10.5 4.5L13.5 4.5L13.5 7.5L16.5 7.5L16.5 10.5L13.5 10.5L13.5 13.5L16.5 13.5L16.5 16.5L13.5 16.5L13.5 19.5L10.5 19.5L10.5 16.5L7.5 16.5L7.5 19.5L4.5 19.5L4.5 4.5L7.5 4.5Z" fill="#637381"/>
2779
3177
  <path d="M13.5 16.5L10.5 16.5L10.5 13.5L13.5 13.5L13.5 16.5ZM13.5 10.5L10.5 10.5L10.5 7.5L13.5 7.5L13.5 10.5ZM10.5 13.5L7.5 13.5L7.5 10.5L10.5 10.5L10.5 13.5Z" fill="#637381"/>
2780
3178
  </svg>
2781
3179
 
2782
- `, ee = `<svg width="26" height="26" viewBox="0 0 26 26" fill="none" xmlns="http://www.w3.org/2000/svg">
3180
+ `, re = `<svg width="26" height="26" viewBox="0 0 26 26" fill="none" xmlns="http://www.w3.org/2000/svg">
2783
3181
  <path d="M20.6106 19.5062C20.6887 19.5843 20.6887 19.711 20.6106 19.7891L19.7896 20.6101C19.7115 20.6882 19.5848 20.6882 19.5067 20.6101L5.98957 7.09298C5.91146 7.01488 5.91146 6.88825 5.98957 6.81014L6.81063 5.98908C6.88873 5.91097 7.01537 5.91097 7.09347 5.98908L20.6106 19.5062Z" fill="#46525C"/>
2784
3182
  <path d="M9.69583 12.2146C9.81298 12.3318 9.81298 12.5217 9.69583 12.6389L7.80151 14.5332C6.72071 15.614 6.6062 17.4365 7.80151 18.6318C8.99473 19.8267 10.8184 19.7123 11.8992 18.6318L13.7935 16.7366C13.9106 16.6194 14.1006 16.6194 14.2178 16.7366L14.816 17.3348C14.9331 17.4519 14.9332 17.6418 14.816 17.759L12.9216 19.6543C11.2241 21.3536 8.47364 21.3518 6.77417 19.6543C5.07483 17.9568 5.0749 15.2064 6.77417 13.5068L8.66848 11.6116C8.78563 11.4944 8.97562 11.4944 9.0928 11.6116L9.69583 12.2146ZM13.5085 6.77441C15.2061 5.07514 17.9565 5.07509 19.656 6.77441C21.3535 8.47388 21.3533 11.2243 19.656 12.9238L17.7607 14.8182C17.6436 14.9354 17.4536 14.9353 17.3365 14.8182L16.7344 14.2161C16.6172 14.0989 16.6172 13.9089 16.7344 13.7918L18.6296 11.8975C19.7101 10.8167 19.8245 8.99503 18.6296 7.7998C17.4363 6.60449 15.6118 6.719 14.531 7.7998L12.6367 9.69412C12.5195 9.81128 12.3296 9.81128 12.2124 9.69412L11.6123 9.09402C11.4952 8.97684 11.4952 8.78685 11.6124 8.6697L13.5085 6.77441Z" fill="#46525C"/>
2785
3183
  </svg>
2786
3184
  `;
2787
- class dt {
3185
+ class gt {
2788
3186
  constructor(t, e = "gradient") {
2789
3187
  this.isOpen = !1, this.currentColor = "#FF0000", this.currentOpacity = 100, this.outsideClick = (i) => {
2790
3188
  if (!this.isOpen) return;
@@ -2826,7 +3224,7 @@ class dt {
2826
3224
  const i = document.createElement("span");
2827
3225
  i.textContent = "Color";
2828
3226
  const s = document.createElement("button");
2829
- s.className = "color-picker-close", s.innerHTML = vt, s.addEventListener("click", () => this.close(!0)), e.appendChild(i), e.appendChild(s), ut(e, t);
3227
+ s.className = "color-picker-close", s.innerHTML = yt, s.addEventListener("click", () => this.close(!0)), e.appendChild(i), e.appendChild(s), at(e, t);
2830
3228
  const n = document.createElement("div");
2831
3229
  n.className = "color-picker-area", this.colorArea = n;
2832
3230
  const o = document.createElement("div");
@@ -2834,38 +3232,38 @@ class dt {
2834
3232
  const a = document.createElement("div");
2835
3233
  a.className = "color-picker-sliders-container";
2836
3234
  const l = document.createElement("button");
2837
- l.className = "color-picker-eyedropper", l.type = "button", l.innerHTML = Ct;
3235
+ l.className = "color-picker-eyedropper", l.type = "button", l.innerHTML = bt;
2838
3236
  const r = document.createElement("div");
2839
3237
  r.className = "color-picker-sliders-group";
2840
- const h = document.createElement("div");
2841
- h.className = "color-picker-hue", this.hueSlider = h;
3238
+ const c = document.createElement("div");
3239
+ c.className = "color-picker-hue", this.hueSlider = c;
2842
3240
  const d = document.createElement("div");
2843
- d.className = "color-picker-hue-marker", this.hueMarker = d, h.appendChild(d);
3241
+ d.className = "color-picker-hue-marker", this.hueMarker = d, c.appendChild(d);
2844
3242
  const p = document.createElement("div");
2845
3243
  p.className = "color-picker-opacity", this.opacitySlider = p;
2846
3244
  const g = document.createElement("div");
2847
- g.className = "color-picker-opacity-marker", this.opacityMarker = g, p.appendChild(g), r.appendChild(h), r.appendChild(p), a.appendChild(l), a.appendChild(r);
2848
- const v = ot((b) => {
3245
+ g.className = "color-picker-opacity-marker", this.opacityMarker = g, p.appendChild(g), r.appendChild(c), r.appendChild(p), a.appendChild(l), a.appendChild(r);
3246
+ const f = lt((b) => {
2849
3247
  var E;
2850
3248
  this.setColor(b), (E = this.onChange) == null || E.call(this, b, this.currentOpacity);
2851
3249
  }, this.recentScope);
2852
- this.recentSectionRefresh = v.refresh;
3250
+ this.recentSectionRefresh = f.refresh;
2853
3251
  const m = document.createElement("div");
2854
3252
  m.className = "color-picker-format-section";
2855
3253
  const u = document.createElement("select");
2856
3254
  u.className = "color-picker-format-select", this.select = u;
2857
- const f = document.createElement("option");
2858
- f.value = "hex", f.textContent = "HEX";
3255
+ const v = document.createElement("option");
3256
+ v.value = "hex", v.textContent = "HEX";
2859
3257
  const C = document.createElement("option");
2860
3258
  C.value = "rgb", C.textContent = "RGB";
2861
3259
  const y = document.createElement("option");
2862
- y.value = "hsl", y.textContent = "HSL", u.appendChild(f), u.appendChild(C), u.appendChild(y);
3260
+ y.value = "hsl", y.textContent = "HSL", u.appendChild(v), u.appendChild(C), u.appendChild(y);
2863
3261
  const w = document.createElement("input");
2864
3262
  w.type = "text", w.className = "color-picker-color-input", w.value = this.currentColor, this.input = w;
2865
3263
  const k = document.createElement("div");
2866
3264
  k.className = "color-picker-input-container";
2867
- const S = document.createElement("button");
2868
- return S.className = "color-picker-copy-inside", S.textContent = "Copy", k.appendChild(w), k.appendChild(S), m.appendChild(u), m.appendChild(k), t.appendChild(e), t.appendChild(n), t.appendChild(a), t.appendChild(v.container), t.appendChild(m), t.addEventListener("click", (b) => b.stopPropagation()), this.bind(n, h, p, w, u, S, l), t;
3265
+ const I = document.createElement("button");
3266
+ return I.className = "color-picker-copy-inside", I.textContent = "Copy", k.appendChild(w), k.appendChild(I), m.appendChild(u), m.appendChild(k), t.appendChild(e), t.appendChild(n), t.appendChild(a), t.appendChild(f.container), t.appendChild(m), t.addEventListener("click", (b) => b.stopPropagation()), this.bind(n, c, p, w, u, I, l), t;
2869
3267
  }
2870
3268
  createBackdrop() {
2871
3269
  const t = document.createElement("div");
@@ -2874,37 +3272,37 @@ class dt {
2874
3272
  bind(t, e, i, s, n, o, a) {
2875
3273
  const l = (d) => {
2876
3274
  var C;
2877
- const p = t.getBoundingClientRect(), g = Math.max(0, Math.min(1, (d.clientX - p.left) / p.width)), v = Math.max(0, Math.min(1, (d.clientY - p.top) / p.height));
2878
- this.colorMarker.style.left = `${g * 100}%`, this.colorMarker.style.top = `${v * 100}%`;
2879
- const u = this.parsePercentage(this.hueMarker.style.left || "0%") * 360, f = W(u, g, 1 - v);
2880
- this.currentColor = f, this.syncInput(), this.updateOpacityBg(), (C = this.onChange) == null || C.call(this, f, this.currentOpacity);
3275
+ const p = t.getBoundingClientRect(), g = Math.max(0, Math.min(1, (d.clientX - p.left) / p.width)), f = Math.max(0, Math.min(1, (d.clientY - p.top) / p.height));
3276
+ this.colorMarker.style.left = `${g * 100}%`, this.colorMarker.style.top = `${f * 100}%`;
3277
+ const u = this.parsePercentage(this.hueMarker.style.left || "0%") * 360, v = U(u, g, 1 - f);
3278
+ this.currentColor = v, this.syncInput(), this.updateOpacityBg(), (C = this.onChange) == null || C.call(this, v, this.currentOpacity);
2881
3279
  }, r = (d) => {
2882
3280
  var C;
2883
3281
  const p = e.getBoundingClientRect();
2884
3282
  let g = Math.max(0, Math.min(1, (d.clientX - p.left) / p.width));
2885
3283
  this.hueMarker.style.left = `${g * 100}%`;
2886
- const v = g * 360, m = this.parsePercentage(this.colorMarker.style.left || "0%"), u = this.parsePercentage(this.colorMarker.style.top || "0%"), f = W(v, m, 1 - u);
2887
- this.currentColor = f, this.colorArea.style.background = `linear-gradient(to top, #000, transparent), linear-gradient(to right, #fff, hsl(${v}, 100%, 50%))`, this.syncInput(), this.updateOpacityBg(), (C = this.onChange) == null || C.call(this, f, this.currentOpacity);
2888
- }, h = (d) => {
2889
- var v;
3284
+ const f = g * 360, m = this.parsePercentage(this.colorMarker.style.left || "0%"), u = this.parsePercentage(this.colorMarker.style.top || "0%"), v = U(f, m, 1 - u);
3285
+ this.currentColor = v, this.colorArea.style.background = `linear-gradient(to top, #000, transparent), linear-gradient(to right, #fff, hsl(${f}, 100%, 50%))`, this.syncInput(), this.updateOpacityBg(), (C = this.onChange) == null || C.call(this, v, this.currentOpacity);
3286
+ }, c = (d) => {
3287
+ var f;
2890
3288
  const p = i.getBoundingClientRect(), g = Math.max(0, Math.min(1, (d.clientX - p.left) / p.width));
2891
- this.opacityMarker.style.left = `${g * 100}%`, this.currentOpacity = Math.round(g * 100), (v = this.onChange) == null || v.call(this, this.currentColor, this.currentOpacity);
3289
+ this.opacityMarker.style.left = `${g * 100}%`, this.currentOpacity = Math.round(g * 100), (f = this.onChange) == null || f.call(this, this.currentColor, this.currentOpacity);
2892
3290
  };
2893
3291
  t.addEventListener("mousedown", (d) => {
2894
3292
  d.preventDefault(), l(d);
2895
- const p = (v) => l(v), g = () => {
3293
+ const p = (f) => l(f), g = () => {
2896
3294
  document.removeEventListener("mousemove", p), document.removeEventListener("mouseup", g);
2897
3295
  };
2898
3296
  document.addEventListener("mousemove", p), document.addEventListener("mouseup", g);
2899
3297
  }), e.addEventListener("mousedown", (d) => {
2900
3298
  d.preventDefault(), r(d);
2901
- const p = (v) => r(v), g = () => {
3299
+ const p = (f) => r(f), g = () => {
2902
3300
  document.removeEventListener("mousemove", p), document.removeEventListener("mouseup", g);
2903
3301
  };
2904
3302
  document.addEventListener("mousemove", p), document.addEventListener("mouseup", g);
2905
3303
  }), i.addEventListener("mousedown", (d) => {
2906
- d.preventDefault(), h(d);
2907
- const p = (v) => h(v), g = () => {
3304
+ d.preventDefault(), c(d);
3305
+ const p = (f) => c(f), g = () => {
2908
3306
  document.removeEventListener("mousemove", p), document.removeEventListener("mouseup", g);
2909
3307
  };
2910
3308
  document.addEventListener("mousemove", p), document.addEventListener("mouseup", g);
@@ -2935,17 +3333,17 @@ class dt {
2935
3333
  setColor(t) {
2936
3334
  var o;
2937
3335
  this.currentColor = t;
2938
- const { h: e, s: i, v: s } = R(t), n = e >= 360 ? e % 360 : e;
3336
+ const { h: e, s: i, v: s } = z(t), n = e >= 360 ? e % 360 : e;
2939
3337
  this.hueMarker.style.left = `${n / 360 * 100}%`, this.colorMarker.style.left = `${i * 100}%`, this.colorMarker.style.top = `${(1 - s) * 100}%`, this.colorArea.style.background = `linear-gradient(to top, #000, transparent), linear-gradient(to right, #fff, hsl(${n}, 100%, 50%))`, this.syncInput(), this.updateOpacityBg(), (o = this.onChange) == null || o.call(this, t, this.currentOpacity);
2940
3338
  }
2941
3339
  syncInput() {
2942
- const t = this.select.value, { h: e, s: i, v: s } = R(this.currentColor);
3340
+ const t = this.select.value, { h: e, s: i, v: s } = z(this.currentColor);
2943
3341
  if (t === "hex") this.input.value = this.currentColor;
2944
3342
  else if (t === "rgb") {
2945
- const { r: n, g: o, b: a } = N(this.currentColor);
3343
+ const { r: n, g: o, b: a } = S(this.currentColor);
2946
3344
  this.input.value = `rgb(${n}, ${o}, ${a})`;
2947
3345
  } else {
2948
- const { hue: n, sat: o, lightness: a } = gt(e, i, s);
3346
+ const { hue: n, sat: o, lightness: a } = vt(e, i, s);
2949
3347
  this.input.value = `hsl(${Math.round(n)}, ${Math.round(
2950
3348
  o * 100
2951
3349
  )}%, ${Math.round(a * 100)}%)`;
@@ -2964,14 +3362,14 @@ class dt {
2964
3362
  const s = t.match(/hsl\((\d+),\s*(\d+)%,\s*(\d+)%\)/);
2965
3363
  if (s) {
2966
3364
  const n = parseInt(s[1]), o = parseInt(s[2]) / 100, a = parseInt(s[3]) / 100, l = a + o * Math.min(a, 1 - a), r = l === 0 ? 0 : 2 * (1 - a / l);
2967
- e = W(n, r, l);
3365
+ e = U(n, r, l);
2968
3366
  }
2969
3367
  }
2970
3368
  }
2971
3369
  e && this.setColor(e);
2972
3370
  }
2973
3371
  updateOpacityBg() {
2974
- const { r: t, g: e, b: i } = N(this.currentColor);
3372
+ const { r: t, g: e, b: i } = S(this.currentColor);
2975
3373
  this.opacitySlider.style.setProperty(
2976
3374
  "--base-color",
2977
3375
  `rgb(${t}, ${e}, ${i})`
@@ -2980,24 +3378,24 @@ class dt {
2980
3378
  open(t, e, i) {
2981
3379
  var y;
2982
3380
  this.currentColor = t, this.currentOpacity = i ?? 100, this.syncInput();
2983
- const { h: s, s: n, v: o } = R(t);
3381
+ const { h: s, s: n, v: o } = z(t);
2984
3382
  this.hueMarker.style.left = `${s / 360 * 100}%`, this.colorMarker.style.left = `${n * 100}%`, this.colorMarker.style.top = `${(1 - o) * 100}%`, this.colorArea.style.background = `linear-gradient(to top, #000, transparent), linear-gradient(to right, #fff, hsl(${s}, 100%, 50%))`, this.updateOpacityBg(), this.opacityMarker.style.left = `${this.currentOpacity}%`, (y = this.recentSectionRefresh) == null || y.call(this), this.isOpen = !0, this.backdrop.style.display = "block", this.backdrop.parentElement || document.body.appendChild(this.backdrop), this.element.style.display = "block", this.element.style.position = "fixed", this.element.style.zIndex = "10002", this.element.style.left = "-9999px", this.element.style.top = "0px", this.element.parentElement || document.body.appendChild(this.element);
2985
- const a = this.element.offsetWidth, l = this.element.offsetHeight, r = e.getBoundingClientRect(), h = window.innerWidth, d = window.innerHeight, p = 16;
2986
- let g = r.right + 8, v = r.top;
2987
- const m = h - r.right, u = r.left;
2988
- m >= a + p ? g = r.right + 8 : u >= a + p ? g = r.left - a - 8 : g = Math.max(p, (h - a) / 2);
2989
- const f = d - r.bottom, C = r.top;
2990
- f >= l + p ? v = r.bottom + 8 : C >= l + p ? v = r.top - l - 8 : f > C ? (v = r.bottom + 8, v + l > d - p && (v = d - l - p)) : (v = r.top - l - 8, v < p && (v = p)), this.element.style.left = `${g}px`, this.element.style.top = `${v}px`;
3383
+ const a = this.element.offsetWidth, l = this.element.offsetHeight, r = e.getBoundingClientRect(), c = window.innerWidth, d = window.innerHeight, p = 16;
3384
+ let g = r.right + 8, f = r.top;
3385
+ const m = c - r.right, u = r.left;
3386
+ m >= a + p ? g = r.right + 8 : u >= a + p ? g = r.left - a - 8 : g = Math.max(p, (c - a) / 2);
3387
+ const v = d - r.bottom, C = r.top;
3388
+ v >= l + p ? f = r.bottom + 8 : C >= l + p ? f = r.top - l - 8 : v > C ? (f = r.bottom + 8, f + l > d - p && (f = d - l - p)) : (f = r.top - l - 8, f < p && (f = p)), this.element.style.left = `${g}px`, this.element.style.top = `${f}px`;
2991
3389
  }
2992
3390
  close(t) {
2993
3391
  var e;
2994
- this.isOpen && (this.isOpen = !1, this.backdrop.style.display = "none", this.element.style.display = "none", document.removeEventListener("click", this.outsideClick, !0), document.removeEventListener("keydown", this.keyDown, !0), t && this.onChange && this.recentScope === "solid" && (D.addColor(this.currentColor, this.recentScope), (e = this.recentSectionRefresh) == null || e.call(this)));
3392
+ this.isOpen && (this.isOpen = !1, this.backdrop.style.display = "none", this.element.style.display = "none", document.removeEventListener("click", this.outsideClick, !0), document.removeEventListener("keydown", this.keyDown, !0), t && this.onChange && this.recentScope === "solid" && (R.addColor(this.currentColor, this.recentScope), (e = this.recentSectionRefresh) == null || e.call(this)));
2995
3393
  }
2996
3394
  getElement() {
2997
3395
  return this.element;
2998
3396
  }
2999
3397
  }
3000
- class ie {
3398
+ class ce {
3001
3399
  constructor(t) {
3002
3400
  this.isDragging = !1, this.currentColor = t.initialColor, this.currentOpacity = t.initialOpacity, this.onColorChange = t.onColorChange, this.recentScope = t.scope ?? "solid", this.element = this.build(), this.initFromColor(this.currentColor, this.currentOpacity);
3003
3401
  }
@@ -3015,7 +3413,7 @@ class ie {
3015
3413
  const s = document.createElement("div");
3016
3414
  s.className = "color-picker-sliders-container embedded";
3017
3415
  const n = document.createElement("button");
3018
- n.className = "color-picker-eyedropper", n.type = "button", n.innerHTML = Ct;
3416
+ n.className = "color-picker-eyedropper", n.type = "button", n.innerHTML = bt;
3019
3417
  const o = document.createElement("div");
3020
3418
  o.className = "color-picker-sliders-group";
3021
3419
  const a = document.createElement("div");
@@ -3024,10 +3422,10 @@ class ie {
3024
3422
  l.className = "color-picker-hue-marker", this.hueMarker = l, a.appendChild(l);
3025
3423
  const r = document.createElement("div");
3026
3424
  r.className = "color-picker-opacity embedded", this.opacitySlider = r;
3027
- const h = document.createElement("div");
3028
- h.className = "color-picker-opacity-marker", this.opacityMarker = h, r.appendChild(h), o.appendChild(a), o.appendChild(r), s.appendChild(n), s.appendChild(o);
3029
- const d = ot((w) => {
3030
- const k = I(w);
3425
+ const c = document.createElement("div");
3426
+ c.className = "color-picker-opacity-marker", this.opacityMarker = c, r.appendChild(c), o.appendChild(a), o.appendChild(r), s.appendChild(n), s.appendChild(o);
3427
+ const d = lt((w) => {
3428
+ const k = N(w);
3031
3429
  k && k.type !== "solid" ? this.onColorChange(w, this.currentOpacity) : (this.setColor(w), this.onColorChange(this.currentColor, this.currentOpacity));
3032
3430
  }, "all");
3033
3431
  this.recentSectionRefresh = d.refresh;
@@ -3035,50 +3433,50 @@ class ie {
3035
3433
  p.className = "color-picker-format-section embedded";
3036
3434
  const g = document.createElement("select");
3037
3435
  g.className = "color-picker-format-select", this.select = g;
3038
- const v = document.createElement("option");
3039
- v.value = "hex", v.textContent = "HEX";
3436
+ const f = document.createElement("option");
3437
+ f.value = "hex", f.textContent = "HEX";
3040
3438
  const m = document.createElement("option");
3041
3439
  m.value = "rgb", m.textContent = "RGB";
3042
3440
  const u = document.createElement("option");
3043
- u.value = "hsl", u.textContent = "HSL", g.appendChild(v), g.appendChild(m), g.appendChild(u);
3044
- const f = document.createElement("input");
3045
- f.type = "text", f.className = "color-picker-color-input", this.input = f;
3441
+ u.value = "hsl", u.textContent = "HSL", g.appendChild(f), g.appendChild(m), g.appendChild(u);
3442
+ const v = document.createElement("input");
3443
+ v.type = "text", v.className = "color-picker-color-input", this.input = v;
3046
3444
  const C = document.createElement("div");
3047
3445
  C.className = "color-picker-input-container";
3048
3446
  const y = document.createElement("button");
3049
- return y.className = "color-picker-copy-inside", y.textContent = "Copy", C.appendChild(f), C.appendChild(y), p.appendChild(g), p.appendChild(C), t.appendChild(e), t.appendChild(s), t.appendChild(p), t.appendChild(d.container), this.bind(e, a, r, f, g, y, n), t;
3447
+ return y.className = "color-picker-copy-inside", y.textContent = "Copy", C.appendChild(v), C.appendChild(y), p.appendChild(g), p.appendChild(C), t.appendChild(e), t.appendChild(s), t.appendChild(p), t.appendChild(d.container), this.bind(e, a, r, v, g, y, n), t;
3050
3448
  }
3051
3449
  bind(t, e, i, s, n, o, a) {
3052
3450
  const l = (d) => {
3053
- const p = t.getBoundingClientRect(), g = Math.max(0, Math.min(1, (d.clientX - p.left) / p.width)), v = Math.max(0, Math.min(1, (d.clientY - p.top) / p.height));
3054
- this.colorMarker.style.left = `${g * 100}%`, this.colorMarker.style.top = `${v * 100}%`;
3055
- const u = this.parsePercentage(this.hueMarker.style.left || "0%") * 360, f = W(u, g, 1 - v);
3056
- this.currentColor = f, this.syncInput(), this.updateOpacityBg(), this.queueChange();
3451
+ const p = t.getBoundingClientRect(), g = Math.max(0, Math.min(1, (d.clientX - p.left) / p.width)), f = Math.max(0, Math.min(1, (d.clientY - p.top) / p.height));
3452
+ this.colorMarker.style.left = `${g * 100}%`, this.colorMarker.style.top = `${f * 100}%`;
3453
+ const u = this.parsePercentage(this.hueMarker.style.left || "0%") * 360, v = U(u, g, 1 - f);
3454
+ this.currentColor = v, this.syncInput(), this.updateOpacityBg(), this.queueChange();
3057
3455
  }, r = (d) => {
3058
3456
  const p = e.getBoundingClientRect(), g = Math.max(0, Math.min(1, (d.clientX - p.left) / p.width));
3059
3457
  this.hueMarker.style.left = `${g * 100}%`;
3060
- const v = g * 360, m = this.parsePercentage(this.colorMarker.style.left || "0%"), u = this.parsePercentage(this.colorMarker.style.top || "0%"), f = W(v, m, 1 - u);
3061
- this.currentColor = f, this.colorArea.style.background = `linear-gradient(to top, #000, transparent),
3062
- linear-gradient(to right, #fff, hsl(${v}, 100%, 50%))`, this.syncInput(), this.updateOpacityBg(), this.queueChange();
3063
- }, h = (d) => {
3458
+ const f = g * 360, m = this.parsePercentage(this.colorMarker.style.left || "0%"), u = this.parsePercentage(this.colorMarker.style.top || "0%"), v = U(f, m, 1 - u);
3459
+ this.currentColor = v, this.colorArea.style.background = `linear-gradient(to top, #000, transparent),
3460
+ linear-gradient(to right, #fff, hsl(${f}, 100%, 50%))`, this.syncInput(), this.updateOpacityBg(), this.queueChange();
3461
+ }, c = (d) => {
3064
3462
  const p = i.getBoundingClientRect(), g = Math.max(0, Math.min(1, (d.clientX - p.left) / p.width));
3065
3463
  this.opacityMarker.style.left = `${g * 100}%`, this.currentOpacity = Math.round(g * 100), this.queueChange();
3066
3464
  };
3067
3465
  t.addEventListener("mousedown", (d) => {
3068
3466
  d.preventDefault(), this.isDragging = !0, l(d);
3069
- const p = (v) => l(v), g = () => {
3467
+ const p = (f) => l(f), g = () => {
3070
3468
  this.isDragging = !1, this.flushChange(), document.removeEventListener("mousemove", p), document.removeEventListener("mouseup", g), this.applyPendingExternal();
3071
3469
  };
3072
3470
  document.addEventListener("mousemove", p), document.addEventListener("mouseup", g);
3073
3471
  }), e.addEventListener("mousedown", (d) => {
3074
3472
  d.preventDefault(), this.isDragging = !0, r(d);
3075
- const p = (v) => r(v), g = () => {
3473
+ const p = (f) => r(f), g = () => {
3076
3474
  this.isDragging = !1, this.flushChange(), document.removeEventListener("mousemove", p), document.removeEventListener("mouseup", g), this.applyPendingExternal();
3077
3475
  };
3078
3476
  document.addEventListener("mousemove", p), document.addEventListener("mouseup", g);
3079
3477
  }), i.addEventListener("mousedown", (d) => {
3080
- d.preventDefault(), this.isDragging = !0, h(d);
3081
- const p = (v) => h(v), g = () => {
3478
+ d.preventDefault(), this.isDragging = !0, c(d);
3479
+ const p = (f) => c(f), g = () => {
3082
3480
  this.isDragging = !1, this.flushChange(), document.removeEventListener("mousemove", p), document.removeEventListener("mouseup", g), this.applyPendingExternal();
3083
3481
  };
3084
3482
  document.addEventListener("mousemove", p), document.addEventListener("mouseup", g);
@@ -3110,19 +3508,19 @@ class ie {
3110
3508
  }
3111
3509
  setColor(t) {
3112
3510
  this.currentColor = t;
3113
- const { h: e, s: i, v: s } = R(t), n = e >= 360 ? e % 360 : e;
3511
+ const { h: e, s: i, v: s } = z(t), n = e >= 360 ? e % 360 : e;
3114
3512
  this.hueMarker.style.left = `${n / 360 * 100}%`, this.colorMarker.style.left = `${i * 100}%`, this.colorMarker.style.top = `${(1 - s) * 100}%`, this.colorArea.style.background = `linear-gradient(to top, #000, transparent),
3115
3513
  linear-gradient(to right, #fff, hsl(${n}, 100%, 50%))`, this.syncInput(), this.updateOpacityBg();
3116
3514
  }
3117
3515
  syncInput() {
3118
- const t = this.select.value, { h: e, s: i, v: s } = R(this.currentColor);
3516
+ const t = this.select.value, { h: e, s: i, v: s } = z(this.currentColor);
3119
3517
  if (t === "hex")
3120
3518
  this.input.value = this.currentColor;
3121
3519
  else if (t === "rgb") {
3122
- const { r: n, g: o, b: a } = N(this.currentColor);
3520
+ const { r: n, g: o, b: a } = S(this.currentColor);
3123
3521
  this.input.value = `rgb(${n}, ${o}, ${a})`;
3124
3522
  } else {
3125
- const { hue: n, sat: o, lightness: a } = gt(e, i, s);
3523
+ const { hue: n, sat: o, lightness: a } = vt(e, i, s);
3126
3524
  this.input.value = `hsl(${Math.round(n)}, ${Math.round(
3127
3525
  o * 100
3128
3526
  )}%, ${Math.round(a * 100)}%)`;
@@ -3142,14 +3540,14 @@ class ie {
3142
3540
  const s = t.match(/hsl\((\d+),\s*(\d+)%,\s*(\d+)%\)/);
3143
3541
  if (s) {
3144
3542
  const n = parseInt(s[1], 10), o = parseInt(s[2], 10) / 100, a = parseInt(s[3], 10) / 100, l = a + o * Math.min(a, 1 - a), r = l === 0 ? 0 : 2 * (1 - a / l);
3145
- e = W(n, r, l);
3543
+ e = U(n, r, l);
3146
3544
  }
3147
3545
  }
3148
3546
  }
3149
3547
  e && (this.setColor(e), this.onColorChange(this.currentColor, this.currentOpacity));
3150
3548
  }
3151
3549
  updateOpacityBg() {
3152
- const { r: t, g: e, b: i } = N(this.currentColor);
3550
+ const { r: t, g: e, b: i } = S(this.currentColor);
3153
3551
  this.opacitySlider.style.setProperty(
3154
3552
  "--base-color",
3155
3553
  `rgb(${t}, ${e}, ${i})`
@@ -3171,13 +3569,13 @@ class ie {
3171
3569
  initFromColor(t, e) {
3172
3570
  var a;
3173
3571
  this.currentColor = t, this.currentOpacity = e;
3174
- const { h: i, s, v: n } = R(t), o = i >= 360 ? i % 360 : i;
3572
+ const { h: i, s, v: n } = z(t), o = i >= 360 ? i % 360 : i;
3175
3573
  this.hueMarker.style.left = `${o / 360 * 100}%`, this.colorMarker.style.left = `${s * 100}%`, this.colorMarker.style.top = `${(1 - n) * 100}%`, this.colorArea.style.background = `linear-gradient(to top, #000, transparent),
3176
3574
  linear-gradient(to right, #fff, hsl(${o}, 100%, 50%))`, this.opacityMarker.style.left = `${e}%`, this.updateOpacityBg(), this.syncInput(), (a = this.recentSectionRefresh) == null || a.call(this);
3177
3575
  }
3178
3576
  commitRecentColor() {
3179
3577
  var t;
3180
- this.recentScope === "solid" && (D.addColor(this.currentColor, this.recentScope), (t = this.recentSectionRefresh) == null || t.call(this));
3578
+ this.recentScope === "solid" && (R.addColor(this.currentColor, this.recentScope), (t = this.recentSectionRefresh) == null || t.call(this));
3181
3579
  }
3182
3580
  getElement() {
3183
3581
  return this.element;
@@ -3190,7 +3588,7 @@ class ie {
3190
3588
  this.initFromColor(t, e);
3191
3589
  }
3192
3590
  }
3193
- const $ = class $ extends x {
3591
+ const H = class H extends x {
3194
3592
  constructor(t = {}) {
3195
3593
  const e = typeof t.default == "string" ? void 0 : t.default;
3196
3594
  super({
@@ -3206,12 +3604,12 @@ const $ = class $ extends x {
3206
3604
  if (!this.popoverEl || !this.isPopoverOpen) return;
3207
3605
  const s = i.target, n = this.popoverEl.contains(s), o = (p = this.element) == null ? void 0 : p.contains(s), a = document.querySelectorAll(".custom-color-picker"), l = Array.from(a).some((g) => g.contains(s)), r = s.closest(
3208
3606
  ".gstop-color-input, .gradient-mini-preview, .gstop-color-preview"
3209
- ), h = s.classList.contains(
3607
+ ), c = s.classList.contains(
3210
3608
  "color-picker-backdrop"
3211
3609
  ), d = s.classList.contains(
3212
3610
  "gradient-popover-backdrop"
3213
3611
  );
3214
- !n && !o && !l && !r && !h && !d && this.closePopover();
3612
+ !n && !o && !l && !r && !c && !d && this.closePopover();
3215
3613
  }, this.handlePopoverKeydown = (i) => {
3216
3614
  if (this.isPopoverOpen) {
3217
3615
  if (i.key === "Escape") {
@@ -3264,16 +3662,16 @@ const $ = class $ extends x {
3264
3662
  const t = this.originalDefault;
3265
3663
  if (typeof t == "string") {
3266
3664
  if (t.startsWith("var(--"))
3267
- return H({
3665
+ return B({
3268
3666
  type: "solid",
3269
3667
  angle: 0,
3270
3668
  stops: [{ color: t, position: 0, opacity: 100 }]
3271
3669
  });
3272
- const i = I(t);
3670
+ const i = N(t);
3273
3671
  if (i)
3274
- return H(i);
3672
+ return B(i);
3275
3673
  }
3276
- return H(t && typeof t == "object" ? t : {
3674
+ return B(t && typeof t == "object" ? t : {
3277
3675
  type: "linear",
3278
3676
  angle: 90,
3279
3677
  stops: [
@@ -3284,17 +3682,17 @@ const $ = class $ extends x {
3284
3682
  }
3285
3683
  setValue(t) {
3286
3684
  let e = null;
3287
- typeof t == "string" ? t.startsWith("var(--") ? e = H({
3685
+ typeof t == "string" ? t.startsWith("var(--") ? e = B({
3288
3686
  type: "solid",
3289
3687
  angle: 0,
3290
3688
  stops: [{ color: t, position: 0, opacity: 100 }]
3291
- }) : e = I(t) : t && typeof t == "object" && (e = H(t)), e || (e = this.defaultValue()), this.value = e, this.setLinkedGlobalVariableFrom(t ?? e), this.updateUI(), this.isPopoverOpen && this.refreshPopoverContent(), this.triggerChange(), this.pendingSolidColor = null, this.updateUnlinkButtonVisibility();
3689
+ }) : e = N(t) : t && typeof t == "object" && (e = B(t)), e || (e = this.defaultValue()), this.value = e, this.setLinkedGlobalVariableFrom(t ?? e), this.updateUI(), this.isPopoverOpen && this.refreshPopoverContent(), this.triggerChange(), this.pendingSolidColor = null, this.updateUnlinkButtonVisibility();
3292
3690
  }
3293
3691
  updateUI() {
3294
3692
  if (this.previewEl && this.value)
3295
3693
  if (this.value.type === "solid") {
3296
3694
  const t = this.value.stops[0], e = t.opacity ?? 100, i = this.resolveGlobalVarColor(t.color);
3297
- this.previewEl.style.background = st(i, e);
3695
+ this.previewEl.style.background = nt(i, e);
3298
3696
  } else {
3299
3697
  const t = this.resolveGradientGlobalVars(this.value);
3300
3698
  this.previewEl.style.background = O(t);
@@ -3362,7 +3760,7 @@ const $ = class $ extends x {
3362
3760
  (i) => this.handlePaste(i)
3363
3761
  ), this.inputEl.addEventListener("input", (i) => this.handleTextInput(i)), this.inputEl.addEventListener("keydown", (i) => {
3364
3762
  i.key === "Enter" && (this.handleTextInput(i), this.inputEl.blur()), i.key === "Escape" && (this.value && (this.inputEl.value = O(this.value)), this.inputEl.blur());
3365
- }), e.appendChild(this.previewEl), this.unlinkButton = document.createElement("button"), this.unlinkButton.type = "button", this.unlinkButton.className = "gradient-unlink-button", this.unlinkButton.innerHTML = ee, this.unlinkButton.title = "Break global color binding", this.unlinkButton.addEventListener("click", (i) => {
3763
+ }), e.appendChild(this.previewEl), this.unlinkButton = document.createElement("button"), this.unlinkButton.type = "button", this.unlinkButton.className = "gradient-unlink-button", this.unlinkButton.innerHTML = re, this.unlinkButton.title = "Break global color binding", this.unlinkButton.addEventListener("click", (i) => {
3366
3764
  i.preventDefault(), i.stopPropagation(), this.breakGlobalBinding();
3367
3765
  }), e.appendChild(this.unlinkButton), e.appendChild(this.inputEl), t.appendChild(e), this.createPopover(), this.element = t, this.updateUnlinkButtonVisibility(), t;
3368
3766
  }
@@ -3385,7 +3783,7 @@ const $ = class $ extends x {
3385
3783
  t.appendChild(l);
3386
3784
  }
3387
3785
  const i = document.createElement("button");
3388
- i.type = "button", i.className = "gradient-popover-close", i.innerHTML = vt, i.addEventListener("click", () => this.closePopover()), t.appendChild(i), ut(t, this.popoverEl, (l, r) => {
3786
+ i.type = "button", i.className = "gradient-popover-close", i.innerHTML = yt, i.addEventListener("click", () => this.closePopover()), t.appendChild(i), at(t, this.popoverEl, (l, r) => {
3389
3787
  this.popoverPosition = { left: l, top: r };
3390
3788
  });
3391
3789
  const s = document.createElement("div");
@@ -3396,10 +3794,10 @@ const $ = class $ extends x {
3396
3794
  n.appendChild(o), s.appendChild(n);
3397
3795
  const a = document.createElement("div");
3398
3796
  if (a.className = "gradient-editor-content", this.updatePopoverContent(a), s.appendChild(a), this.variant !== "global" && e) {
3399
- const l = e.children[0], r = e.children[1], h = (d) => {
3797
+ const l = e.children[0], r = e.children[1], c = (d) => {
3400
3798
  this.currentMode = d, d === "custom" ? (l.classList.add("active"), r.classList.remove("active"), n.style.display = "block") : (r.classList.add("active"), l.classList.remove("active"), n.style.display = "none"), this.updatePopoverContent(a);
3401
3799
  };
3402
- l.addEventListener("click", () => h("custom")), r.addEventListener("click", () => h("global")), this.isBoundToGlobal() ? (this.currentMode = "global", h("global")) : (this.currentMode = "custom", h("custom"));
3800
+ l.addEventListener("click", () => c("custom")), r.addEventListener("click", () => c("global")), this.isBoundToGlobal() ? (this.currentMode = "global", c("global")) : (this.currentMode = "custom", c("custom"));
3403
3801
  }
3404
3802
  this.popoverEl.appendChild(t), this.popoverEl.appendChild(s), document.body.appendChild(this.backdropEl), document.body.appendChild(this.popoverEl);
3405
3803
  }
@@ -3408,9 +3806,9 @@ const $ = class $ extends x {
3408
3806
  const t = document.createElement("div");
3409
3807
  t.className = "gradient-type-tabs";
3410
3808
  const e = document.createElement("button");
3411
- e.type = "button", e.className = `gradient-type-tab ${((s = this.value) == null ? void 0 : s.type) === "solid" ? "active" : ""}`, e.innerHTML = Qt, e.style.minWidth = "32px", e.addEventListener("click", () => this.switchType("solid"));
3809
+ e.type = "button", e.className = `gradient-type-tab ${((s = this.value) == null ? void 0 : s.type) === "solid" ? "active" : ""}`, e.innerHTML = ae, e.style.minWidth = "32px", e.addEventListener("click", () => this.switchType("solid"));
3412
3810
  const i = document.createElement("button");
3413
- return i.type = "button", i.className = `gradient-type-tab ${((n = this.value) == null ? void 0 : n.type) !== "solid" ? "active" : ""}`, i.innerHTML = te, i.style.minWidth = "32px", i.addEventListener("click", () => {
3811
+ return i.type = "button", i.className = `gradient-type-tab ${((n = this.value) == null ? void 0 : n.type) !== "solid" ? "active" : ""}`, i.innerHTML = le, i.style.minWidth = "32px", i.addEventListener("click", () => {
3414
3812
  var a, l;
3415
3813
  const o = ((a = this.value) == null ? void 0 : a.type) === "solid" ? "linear" : ((l = this.value) == null ? void 0 : l.type) || "linear";
3416
3814
  this.switchType(o);
@@ -3426,7 +3824,7 @@ const $ = class $ extends x {
3426
3824
  ]), t !== "solid" && this.value.stops.length === 1) {
3427
3825
  const a = this.value.stops[0].color;
3428
3826
  if (a.startsWith("var(--")) {
3429
- const l = this.resolveGlobalVarColor(a), r = I(l);
3827
+ const l = this.resolveGlobalVarColor(a), r = N(l);
3430
3828
  r && r.type !== "solid" && r.stops.length >= 2 ? (this.value.stops = r.stops, this.value.angle = r.angle, this.value.type = r.type) : (this.value.stops.push({
3431
3829
  color: "#786666",
3432
3830
  position: 100,
@@ -3488,23 +3886,23 @@ const $ = class $ extends x {
3488
3886
  title: "Text Color",
3489
3887
  keys: ["text-dark", "text-light"]
3490
3888
  }
3491
- ], v = this.globalSearchQuery.toLowerCase();
3889
+ ], f = this.globalSearchQuery.toLowerCase();
3492
3890
  let m;
3493
3891
  this.globalLayoutMode === "list" ? (m = document.createElement("div"), m.className = "global-colors-list") : (m = document.createElement("div"), m.className = "global-colors-grid"), d.appendChild(m), g.forEach((u) => {
3494
- const f = Object.entries(p).filter(([C]) => !u.keys.includes(C) && u.title !== "Global Colors" ? !1 : u.keys.includes(C) && C.toLowerCase().includes(v));
3495
- f.length !== 0 && f.forEach(([C, y]) => {
3892
+ const v = Object.entries(p).filter(([C]) => !u.keys.includes(C) && u.title !== "Global Colors" ? !1 : u.keys.includes(C) && C.toLowerCase().includes(f));
3893
+ v.length !== 0 && v.forEach(([C, y]) => {
3496
3894
  if (this.globalLayoutMode === "list") {
3497
3895
  const w = document.createElement("div");
3498
3896
  w.className = "global-color-row";
3499
3897
  const k = document.createElement("div");
3500
3898
  k.className = "global-color-circle";
3501
- const S = this.resolveGlobalVarColor(y);
3502
- k.style.background = S, (this.linkedGlobalVariable === `var(--${C})` || e.color === `var(--${C})`) && k.classList.add("selected");
3899
+ const I = this.resolveGlobalVarColor(y);
3900
+ k.style.background = I, (this.linkedGlobalVariable === `var(--${C})` || e.color === `var(--${C})`) && k.classList.add("selected");
3503
3901
  const E = document.createElement("span");
3504
3902
  E.className = "global-color-label", E.textContent = C.split("-").map((M) => M.charAt(0).toUpperCase() + M.slice(1)).join(" "), w.appendChild(k), w.appendChild(E), w.addEventListener("click", (M) => {
3505
3903
  M.preventDefault();
3506
- const B = `var(--${C})`;
3507
- this.setValue(B), this.pendingSolidColor = B, i(d);
3904
+ const A = `var(--${C})`;
3905
+ this.setValue(A), this.pendingSolidColor = A, i(d);
3508
3906
  }), m.appendChild(w);
3509
3907
  } else {
3510
3908
  const w = document.createElement("div");
@@ -3532,21 +3930,21 @@ const $ = class $ extends x {
3532
3930
  }), n.appendChild(o), n.appendChild(a);
3533
3931
  const r = document.createElement("button");
3534
3932
  r.className = "global-layout-toggle", r.type = "button";
3535
- const h = () => {
3933
+ const c = () => {
3536
3934
  r.innerHTML = this.globalLayoutMode === "list" ? '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="7" height="7"></rect><rect x="14" y="3" width="7" height="7"></rect><rect x="14" y="14" width="7" height="7"></rect><rect x="3" y="14" width="7" height="7"></rect></svg>' : '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="8" y1="6" x2="21" y2="6"></line><line x1="8" y1="12" x2="21" y2="12"></line><line x1="8" y1="18" x2="21" y2="18"></line><line x1="3" y1="6" x2="3.01" y2="6"></line><line x1="3" y1="12" x2="3.01" y2="12"></line><line x1="3" y1="18" x2="3.01" y2="18"></line></svg>';
3537
3935
  };
3538
- h(), r.addEventListener("click", () => {
3539
- this.globalLayoutMode = this.globalLayoutMode === "list" ? "grid" : "list", h(), i(l);
3936
+ c(), r.addEventListener("click", () => {
3937
+ this.globalLayoutMode = this.globalLayoutMode === "list" ? "grid" : "list", c(), i(l);
3540
3938
  }), s.appendChild(n), s.appendChild(r), t.appendChild(s), t.appendChild(l), i(l);
3541
3939
  }
3542
3940
  renderSolid(t) {
3543
3941
  (!this.value || !this.value.stops || !this.value.stops.length) && (this.value || (this.value = this.defaultValue()), this.value.stops = [{ color: "#000000", position: 0, opacity: 100 }]);
3544
- const e = this.value.stops[0], i = new ie({
3942
+ const e = this.value.stops[0], i = new ce({
3545
3943
  initialColor: e.color.startsWith("var(--") ? this.resolveGlobalVarColor(e.color) : e.color,
3546
3944
  initialOpacity: e.opacity ?? 100,
3547
3945
  onColorChange: (s, n) => {
3548
3946
  if (this.clearGlobalBindingForCustomChange(), this.value) {
3549
- const o = I(s);
3947
+ const o = N(s);
3550
3948
  if (o && o.type !== "solid") {
3551
3949
  this.value = o, this.switchType(o.type);
3552
3950
  return;
@@ -3561,16 +3959,16 @@ const $ = class $ extends x {
3561
3959
  this.solidPicker = null;
3562
3960
  let e = null;
3563
3961
  {
3564
- const h = document.createElement("div");
3565
- h.className = "gradient-subtype-inline";
3962
+ const c = document.createElement("div");
3963
+ c.className = "gradient-subtype-inline";
3566
3964
  const d = document.createElement("select");
3567
3965
  d.className = "gradient-subtype-select";
3568
3966
  const p = document.createElement("option");
3569
3967
  p.value = "linear", p.textContent = "Linear";
3570
3968
  const g = document.createElement("option");
3571
3969
  g.value = "radial", g.textContent = "Radial", d.appendChild(p), d.appendChild(g), d.value = this.value.type === "radial" ? "radial" : "linear", e = document.createElement("input"), e.type = "text", e.inputMode = "numeric", e.className = "gradient-degree-input", e.value = `${this.value.angle ?? 90}°`, e.style.width = "75px", e.style.textAlign = "center", (!this.value.angle || this.value.stops.length < 2) && (this.value.angle = 90, e.value = "90°");
3572
- const v = document.createElement("button");
3573
- v.type = "button", v.className = "gradient-flip-btn", v.innerHTML = Kt, d.addEventListener("change", () => {
3970
+ const f = document.createElement("button");
3971
+ f.type = "button", f.className = "gradient-flip-btn", f.innerHTML = ne, d.addEventListener("change", () => {
3574
3972
  this.clearGlobalBindingForCustomChange(), this.switchType(d.value === "radial" ? "radial" : "linear"), e && this.updateDegreeVisibility(e);
3575
3973
  }), e.addEventListener("focus", (m) => {
3576
3974
  const u = m.target;
@@ -3583,13 +3981,13 @@ const $ = class $ extends x {
3583
3981
  var C;
3584
3982
  this.previewUpdateTimeout && (clearTimeout(this.previewUpdateTimeout), this.previewUpdateTimeout = null);
3585
3983
  const u = m.target;
3586
- let f = parseInt(u.value);
3587
- Number.isNaN(f) && (f = ((C = this.value) == null ? void 0 : C.angle) ?? 0), f = Math.max(0, Math.min(360, f)), this.value && (this.value.angle = f), u.value = `${f}°`, this.updateGradientPreview(), this.updateUI(), this.triggerChange();
3588
- }), v.addEventListener("click", () => {
3984
+ let v = parseInt(u.value);
3985
+ Number.isNaN(v) && (v = ((C = this.value) == null ? void 0 : C.angle) ?? 0), v = Math.max(0, Math.min(360, v)), this.value && (this.value.angle = v), u.value = `${v}°`, this.updateGradientPreview(), this.updateUI(), this.triggerChange();
3986
+ }), f.addEventListener("click", () => {
3589
3987
  this.clearGlobalBindingForCustomChange(), !(!this.value || !this.value.stops) && (this.value.stops.forEach((m) => {
3590
3988
  m.position = 100 - m.position;
3591
3989
  }), this.value.stops.sort((m, u) => m.position - u.position), this.updateGradientPreview(i), this.createHandles(s, i), this.updateStopsList(l), this.updateUI(), this.triggerChange());
3592
- }), h.appendChild(d), h.appendChild(e), h.appendChild(v), t.appendChild(h), this.updateDegreeVisibility(e);
3990
+ }), c.appendChild(d), c.appendChild(e), c.appendChild(f), t.appendChild(c), this.updateDegreeVisibility(e);
3593
3991
  }
3594
3992
  const i = document.createElement("div");
3595
3993
  i.className = "gradient-preview", this.updateGradientPreview(i);
@@ -3603,13 +4001,13 @@ const $ = class $ extends x {
3603
4001
  a.type = "button", a.className = "gradient-add-stop", a.textContent = "+", n.appendChild(o), n.appendChild(a);
3604
4002
  const l = document.createElement("div");
3605
4003
  l.className = "gradient-stops", t.appendChild(n), t.appendChild(l), this.updateStopsList(l);
3606
- const r = ot((h) => {
3607
- const d = I(h);
4004
+ const r = lt((c) => {
4005
+ const d = N(c);
3608
4006
  d && (this.clearGlobalBindingForCustomChange(), this.value = d, this.switchType(d.type), this.updateUI(), this.triggerChange());
3609
4007
  }, "all");
3610
4008
  this.recentGradientRefresh = r.refresh, t.appendChild(r.container), a.addEventListener("click", () => {
3611
- var h;
3612
- this.clearGlobalBindingForCustomChange(), this.addStop(), this.updateStopsList(l), this.updateGradientPreview(i), this.createHandles(s, i), this.updateUI(), ((h = document.activeElement) == null ? void 0 : h.tagName) !== "INPUT" && this.repositionPopover(), this.triggerChange();
4009
+ var c;
4010
+ this.clearGlobalBindingForCustomChange(), this.addStop(), this.updateStopsList(l), this.updateGradientPreview(i), this.createHandles(s, i), this.updateUI(), ((c = document.activeElement) == null ? void 0 : c.tagName) !== "INPUT" && this.repositionPopover(), this.triggerChange();
3613
4011
  });
3614
4012
  }
3615
4013
  updateDegreeVisibility(t) {
@@ -3624,7 +4022,7 @@ const $ = class $ extends x {
3624
4022
  e.style.background = O(this.value);
3625
4023
  else {
3626
4024
  const s = this.value.stops.map(
3627
- (n) => `${st(n.color, n.opacity ?? 100)} ${n.position}%`
4025
+ (n) => `${nt(n.color, n.opacity ?? 100)} ${n.position}%`
3628
4026
  ).join(", ");
3629
4027
  e.style.background = `linear-gradient(90deg, ${s})`;
3630
4028
  }
@@ -3642,29 +4040,29 @@ const $ = class $ extends x {
3642
4040
  o.className = "gstop-chip";
3643
4041
  const a = this.resolveGlobalVarColor(i.color);
3644
4042
  o.style.backgroundColor = a, n.appendChild(o);
3645
- const l = new dt((u, f) => {
3646
- this.clearGlobalBindingForCustomChange(), this.value && this.value.stops[s] && (this.value.stops[s].color = u, f !== void 0 && (this.value.stops[s].opacity = f), o.style.backgroundColor = u, this.updateGradientPreview(), this.updateStopsList(), this.updateUI(), this.triggerChange());
4043
+ const l = new gt((u, v) => {
4044
+ this.clearGlobalBindingForCustomChange(), this.value && this.value.stops[s] && (this.value.stops[s].color = u, v !== void 0 && (this.value.stops[s].opacity = v), o.style.backgroundColor = u, this.updateGradientPreview(), this.updateStopsList(), this.updateUI(), this.triggerChange());
3647
4045
  }, "solid");
3648
- let r = !1, h = !1, d = 0, p = 0;
4046
+ let r = !1, c = !1, d = 0, p = 0;
3649
4047
  const g = (u) => {
3650
- r = !0, h = !1, d = u.clientX, p = this.value.stops[s].position, n.classList.add("selected"), document.addEventListener("mousemove", v), document.addEventListener("mouseup", m), u.preventDefault(), u.stopPropagation();
3651
- }, v = (u) => {
4048
+ r = !0, c = !1, d = u.clientX, p = this.value.stops[s].position, n.classList.add("selected"), document.addEventListener("mousemove", f), document.addEventListener("mouseup", m), u.preventDefault(), u.stopPropagation();
4049
+ }, f = (u) => {
3652
4050
  if (!r || !this.value) return;
3653
- const f = u.clientX - d;
3654
- if (Math.abs(f) > 3 && (h = !0), h) {
4051
+ const v = u.clientX - d;
4052
+ if (Math.abs(v) > 3 && (c = !0), c) {
3655
4053
  this.clearGlobalBindingForCustomChange();
3656
4054
  const C = e.getBoundingClientRect();
3657
- let y = p + f / C.width * 100;
4055
+ let y = p + v / C.width * 100;
3658
4056
  y = Math.max(0, Math.min(100, y)), this.value.stops[s].position = Math.round(y), n.style.left = `${y}%`, this.updateGradientPreview();
3659
4057
  }
3660
4058
  }, m = (u) => {
3661
- var f;
4059
+ var v;
3662
4060
  if (r)
3663
- if (r = !1, n.classList.remove("selected"), document.removeEventListener("mousemove", v), document.removeEventListener("mouseup", m), h)
4061
+ if (r = !1, n.classList.remove("selected"), document.removeEventListener("mousemove", f), document.removeEventListener("mouseup", m), c)
3664
4062
  this.value && (this.value.stops.sort((C, y) => C.position - y.position), this.createHandles(t, e), this.updateStopsList()), this.updateUI(), this.triggerChange();
3665
4063
  else {
3666
4064
  u.stopPropagation();
3667
- const C = (f = this.value) == null ? void 0 : f.stops[s];
4065
+ const C = (v = this.value) == null ? void 0 : v.stops[s];
3668
4066
  C && setTimeout(() => {
3669
4067
  const y = this.resolveGlobalVarColor(C.color);
3670
4068
  l.open(y, o, C.opacity ?? 100);
@@ -3678,7 +4076,7 @@ const $ = class $ extends x {
3678
4076
  var i;
3679
4077
  const e = t || ((i = this.popoverEl) == null ? void 0 : i.querySelector(".gradient-stops"));
3680
4078
  !e || !this.value || this.value.type === "solid" || !this.value.stops || (e.innerHTML = "", this.value.stops.forEach((s, n) => {
3681
- var k, S;
4079
+ var k, I;
3682
4080
  const o = document.createElement("div");
3683
4081
  o.className = "gstop-row";
3684
4082
  const a = document.createElement("div");
@@ -3687,31 +4085,31 @@ const $ = class $ extends x {
3687
4085
  l.type = "text", l.className = "gstop-position-input", l.value = `${s.position}%`, l.style.width = "60px", a.appendChild(l);
3688
4086
  const r = document.createElement("div");
3689
4087
  r.className = "gstop-color-container";
3690
- const h = this.resolveGlobalVarColor(s.color), d = document.createElement("div");
3691
- d.className = "gstop-color-preview", d.style.backgroundColor = h;
4088
+ const c = this.resolveGlobalVarColor(s.color), d = document.createElement("div");
4089
+ d.className = "gstop-color-preview", d.style.backgroundColor = c;
3692
4090
  const p = document.createElement("input");
3693
- p.type = "text", p.className = "gstop-color-input", p.value = h.replace("#", "").toUpperCase();
4091
+ p.type = "text", p.className = "gstop-color-input", p.value = c.replace("#", "").toUpperCase();
3694
4092
  const g = document.createElement("button");
3695
4093
  g.type = "button", g.className = "gstop-color-copy", g.textContent = "Copy", r.appendChild(d), r.appendChild(p), r.appendChild(g);
3696
- const v = document.createElement("button");
3697
- v.type = "button", v.className = "gstop-del", v.innerHTML = Yt, v.disabled = (((S = (k = this.value) == null ? void 0 : k.stops) == null ? void 0 : S.length) || 0) <= 2, o.appendChild(a), o.appendChild(r), o.appendChild(v), e.appendChild(o);
4094
+ const f = document.createElement("button");
4095
+ f.type = "button", f.className = "gstop-del", f.innerHTML = oe, f.disabled = (((I = (k = this.value) == null ? void 0 : k.stops) == null ? void 0 : I.length) || 0) <= 2, o.appendChild(a), o.appendChild(r), o.appendChild(f), e.appendChild(o);
3698
4096
  const m = document.createElement("span");
3699
4097
  m.className = "gstop-opacity-label", m.textContent = "Opacity";
3700
4098
  const u = document.createElement("div");
3701
4099
  u.className = "gstop-opacity-group";
3702
- const f = document.createElement("input");
3703
- f.type = "range", f.className = "gstop-opacity-slider", f.min = "0", f.max = "100", f.value = String(s.opacity ?? 100);
3704
- const C = N(h);
3705
- f.style.setProperty(
4100
+ const v = document.createElement("input");
4101
+ v.type = "range", v.className = "gstop-opacity-slider", v.min = "0", v.max = "100", v.value = String(s.opacity ?? 100);
4102
+ const C = S(c);
4103
+ v.style.setProperty(
3706
4104
  "--slider-color",
3707
4105
  `rgb(${C.r}, ${C.g}, ${C.b})`
3708
4106
  );
3709
4107
  const y = document.createElement("span");
3710
- y.className = "gstop-opacity-value", y.textContent = `${s.opacity ?? 100}%`, u.appendChild(f), u.appendChild(y);
3711
- const w = new dt((b, E) => {
3712
- this.clearGlobalBindingForCustomChange(), p.value = b.replace("#", "").toUpperCase(), d.style.backgroundColor = b, this.value.stops[n].color = b, E !== void 0 && (this.value.stops[n].opacity = E, f.value = String(E), y.textContent = `${E}%`);
3713
- const M = N(b);
3714
- f.style.setProperty(
4108
+ y.className = "gstop-opacity-value", y.textContent = `${s.opacity ?? 100}%`, u.appendChild(v), u.appendChild(y);
4109
+ const w = new gt((b, E) => {
4110
+ this.clearGlobalBindingForCustomChange(), p.value = b.replace("#", "").toUpperCase(), d.style.backgroundColor = b, this.value.stops[n].color = b, E !== void 0 && (this.value.stops[n].opacity = E, v.value = String(E), y.textContent = `${E}%`);
4111
+ const M = S(b);
4112
+ v.style.setProperty(
3715
4113
  "--slider-color",
3716
4114
  `rgb(${M.r}, ${M.g}, ${M.b})`
3717
4115
  ), this.updateGradientPreview(), this.createHandles(
@@ -3728,8 +4126,8 @@ const $ = class $ extends x {
3728
4126
  const b = p.value.trim(), E = b.startsWith("#") ? b : `#${b}`;
3729
4127
  if (/^#[0-9A-Fa-f]{6}$/.test(E)) {
3730
4128
  this.value.stops[n].color = E, d.style.backgroundColor = E;
3731
- const M = N(E);
3732
- f.style.setProperty(
4129
+ const M = S(E);
4130
+ v.style.setProperty(
3733
4131
  "--slider-color",
3734
4132
  `rgb(${M.r}, ${M.g}, ${M.b})`
3735
4133
  ), this.debouncedPreviewUpdate();
@@ -3749,8 +4147,8 @@ const $ = class $ extends x {
3749
4147
  this.clearGlobalBindingForCustomChange();
3750
4148
  const E = b.target, M = parseInt(E.value.replace(/[^\d]/g, ""), 10);
3751
4149
  if (!Number.isNaN(M)) {
3752
- const B = Math.max(0, Math.min(100, M));
3753
- this.value.stops[n].position = B, E.value = `${B}%`, this.debouncedPreviewUpdate();
4150
+ const A = Math.max(0, Math.min(100, M));
4151
+ this.value.stops[n].position = A, E.value = `${A}%`, this.debouncedPreviewUpdate();
3754
4152
  }
3755
4153
  }), l.addEventListener("blur", (b) => {
3756
4154
  this.previewUpdateTimeout && (clearTimeout(this.previewUpdateTimeout), this.previewUpdateTimeout = null);
@@ -3758,24 +4156,24 @@ const $ = class $ extends x {
3758
4156
  if (Number.isNaN(M))
3759
4157
  E.value = `${this.value.stops[n].position}%`;
3760
4158
  else {
3761
- const B = Math.max(0, Math.min(100, M));
3762
- this.value.stops[n].position = B, E.value = `${B}%`;
4159
+ const A = Math.max(0, Math.min(100, M));
4160
+ this.value.stops[n].position = A, E.value = `${A}%`;
3763
4161
  }
3764
4162
  this.updateGradientPreview(), this.createHandles(
3765
4163
  this.popoverEl.querySelector(".gradient-handles"),
3766
4164
  this.popoverEl.querySelector(".gradient-preview")
3767
4165
  ), this.updateStopsList(), this.updateUI(), this.triggerChange();
3768
- }), v.addEventListener("click", () => {
4166
+ }), f.addEventListener("click", () => {
3769
4167
  var b;
3770
4168
  (this.value.stops.length || 0) <= 2 || (this.clearGlobalBindingForCustomChange(), this.value.stops.splice(n, 1), this.createHandles(
3771
4169
  this.popoverEl.querySelector(".gradient-handles"),
3772
4170
  this.popoverEl.querySelector(".gradient-preview")
3773
4171
  ), this.updateStopsList(), this.updateGradientPreview(), this.updateUI(), ((b = document.activeElement) == null ? void 0 : b.tagName) !== "INPUT" && this.repositionPopover(), this.triggerChange());
3774
- }), f.addEventListener("input", () => {
4172
+ }), v.addEventListener("input", () => {
3775
4173
  this.clearGlobalBindingForCustomChange();
3776
- const b = parseInt(f.value, 10);
4174
+ const b = parseInt(v.value, 10);
3777
4175
  this.value.stops[n].opacity = Math.max(0, Math.min(100, b)), y.textContent = `${this.value.stops[n].opacity}%`, this.debouncedPreviewUpdate();
3778
- }), f.addEventListener("change", () => {
4176
+ }), v.addEventListener("change", () => {
3779
4177
  this.clearGlobalBindingForCustomChange(), this.previewUpdateTimeout && (clearTimeout(this.previewUpdateTimeout), this.previewUpdateTimeout = null), this.updateGradientPreview(), this.updateUI(), this.triggerChange();
3780
4178
  });
3781
4179
  }));
@@ -3798,14 +4196,14 @@ const $ = class $ extends x {
3798
4196
  this.value.stops.push(n), this.value.stops.sort((o, a) => o.position - a.position);
3799
4197
  }
3800
4198
  openPopover() {
3801
- if (this.popoverEl && ($.openInstance && $.openInstance !== this && $.openInstance.closePopover(), !this.isPopoverOpen)) {
3802
- if (this.isPopoverOpen = !0, $.openInstance = this, this.backdropEl && (this.backdropEl.style.display = "block", this.backdropEl.parentElement || document.body.appendChild(this.backdropEl)), this.popoverEl.style.display = "flex", this.refreshPopoverContent(), this.element) {
4199
+ if (this.popoverEl && (H.openInstance && H.openInstance !== this && H.openInstance.closePopover(), !this.isPopoverOpen)) {
4200
+ if (this.isPopoverOpen = !0, H.openInstance = this, this.backdropEl && (this.backdropEl.style.display = "block", this.backdropEl.parentElement || document.body.appendChild(this.backdropEl)), this.popoverEl.style.display = "flex", this.refreshPopoverContent(), this.element) {
3803
4201
  const t = this.element.getBoundingClientRect(), e = 306, i = window.innerWidth, s = window.innerHeight, n = 16;
3804
4202
  this.popoverEl.style.position = "fixed", this.popoverEl.style.zIndex = "10000", this.popoverEl.style.left = "-9999px", this.popoverEl.style.top = "0px";
3805
4203
  const o = this.popoverEl.offsetHeight;
3806
4204
  let a = t.right + 8, l = t.top;
3807
- const r = i - t.right, h = t.left, d = e + n;
3808
- r < d && h > r + 100 && (a = t.left - e - 8);
4205
+ const r = i - t.right, c = t.left, d = e + n;
4206
+ r < d && c > r + 100 && (a = t.left - e - 8);
3809
4207
  const p = s - t.bottom, g = t.top;
3810
4208
  g >= o + n ? l = t.top - o - 8 : p >= o + n ? l = t.bottom + 8 : g > p ? (l = t.top - o - 8, l < n && (l = n)) : (l = t.bottom + 8, l + o > s - n && (l = s - o - n)), this.popoverEl.style.left = `${a}px`, this.popoverEl.style.top = `${l}px`, this.popoverPosition = { left: a, top: l };
3811
4209
  }
@@ -3828,10 +4226,10 @@ const $ = class $ extends x {
3828
4226
  this.popoverEl.style.left, this.popoverEl.style.top, this.popoverEl.style.left = "-9999px", this.popoverEl.style.top = "0px";
3829
4227
  const a = this.popoverEl.offsetHeight;
3830
4228
  let l = e.right + 8, r = e.top;
3831
- const h = s - e.right, d = e.left, p = i + o;
3832
- h < p && d > h + 100 && (l = e.left - i - 8);
3833
- const g = n - e.bottom, v = e.top;
3834
- v >= a + o ? r = e.top - a - 8 : g >= a + o ? r = e.bottom + 8 : v > g ? (r = e.top - a - 8, r < o && (r = o)) : (r = e.bottom + 8, r + a > n - o && (r = n - a - o)), this.popoverEl.style.left = `${l}px`, this.popoverEl.style.top = `${r}px`;
4229
+ const c = s - e.right, d = e.left, p = i + o;
4230
+ c < p && d > c + 100 && (l = e.left - i - 8);
4231
+ const g = n - e.bottom, f = e.top;
4232
+ f >= a + o ? r = e.top - a - 8 : g >= a + o ? r = e.bottom + 8 : f > g ? (r = e.top - a - 8, r < o && (r = o)) : (r = e.bottom + 8, r + a > n - o && (r = n - a - o)), this.popoverEl.style.left = `${l}px`, this.popoverEl.style.top = `${r}px`;
3835
4233
  });
3836
4234
  }
3837
4235
  }
@@ -3850,13 +4248,13 @@ const $ = class $ extends x {
3850
4248
  if (!(!this.popoverEl || !this.isPopoverOpen)) {
3851
4249
  if (this.isPopoverOpen = !1, this.popoverPosition = null, this.backdropEl && (this.backdropEl.style.display = "none"), this.popoverEl.style.display = "none", document.removeEventListener("click", this.onBackgroundClick, !0), document.removeEventListener("keydown", this.handlePopoverKeydown, !0), this.commitPendingSolidColor(), this.value && this.value.type !== "solid") {
3852
4250
  const e = O(this.value);
3853
- D.addColor(e, "gradient"), (t = this.recentGradientRefresh) == null || t.call(this);
4251
+ R.addColor(e, "gradient"), (t = this.recentGradientRefresh) == null || t.call(this);
3854
4252
  }
3855
- this.previewUpdateTimeout && (clearTimeout(this.previewUpdateTimeout), this.previewUpdateTimeout = null), $.openInstance === this && ($.openInstance = null);
4253
+ this.previewUpdateTimeout && (clearTimeout(this.previewUpdateTimeout), this.previewUpdateTimeout = null), H.openInstance === this && (H.openInstance = null);
3856
4254
  }
3857
4255
  }
3858
4256
  commitPendingSolidColor() {
3859
- this.pendingSolidColor && (this.solidPicker ? this.solidPicker.commitRecentColor() : D.addColor(this.pendingSolidColor, "solid"), this.pendingSolidColor = null);
4257
+ this.pendingSolidColor && (this.solidPicker ? this.solidPicker.commitRecentColor() : R.addColor(this.pendingSolidColor, "solid"), this.pendingSolidColor = null);
3860
4258
  }
3861
4259
  handlePaste(t) {
3862
4260
  var i;
@@ -3871,7 +4269,7 @@ const $ = class $ extends x {
3871
4269
  parseAndSet(t) {
3872
4270
  let e = t.trim();
3873
4271
  e && !e.startsWith("#") && !e.startsWith("var(") && !e.startsWith("rgb") && !e.startsWith("hsl") && !e.includes("gradient") && /^[0-9A-Fa-f]{3}$|^[0-9A-Fa-f]{6}$|^[0-9A-Fa-f]{8}$/.test(e) && (e = "#" + e, this.inputEl && (this.inputEl.value = e));
3874
- const i = I(e);
4272
+ const i = N(e);
3875
4273
  i && this.setValue(i);
3876
4274
  }
3877
4275
  getChangePayload() {
@@ -3904,18 +4302,18 @@ const $ = class $ extends x {
3904
4302
  return this.value;
3905
4303
  }
3906
4304
  };
3907
- $.openInstance = null;
3908
- let K = $;
3909
- const se = `
4305
+ H.openInstance = null;
4306
+ let Y = H;
4307
+ const he = `
3910
4308
  <svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
3911
4309
  <path d="M5.625 9.5H5.6325M12.375 9.5H12.3825M9 9.5H9.0075M9 12.875H9.0075M9 6.125H9.0075M2.25 6.35L2.25 12.65C2.25 13.9101 2.25 14.5402 2.49524 15.0215C2.71095 15.4448 3.05516 15.789 3.47852 16.0048C3.95982 16.25 4.58988 16.25 5.85 16.25H12.15C13.4101 16.25 14.0402 16.25 14.5215 16.0048C14.9448 15.789 15.289 15.4448 15.5048 15.0215C15.75 14.5402 15.75 13.9101 15.75 12.65V6.35C15.75 5.08988 15.75 4.45982 15.5048 3.97852C15.289 3.55516 14.9448 3.21095 14.5215 2.99524C14.0402 2.75 13.4101 2.75 12.15 2.75L5.85 2.75C4.58988 2.75 3.95982 2.75 3.47852 2.99524C3.05516 3.21095 2.71095 3.55516 2.49524 3.97852C2.25 4.45982 2.25 5.08988 2.25 6.35Z" stroke="#667085" stroke-linecap="round" stroke-linejoin="round"/>
3912
4310
  </svg>
3913
- `, ne = `
4311
+ `, de = `
3914
4312
  <svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
3915
4313
  <path d="M6 2.75H5.85C4.58988 2.75 3.95982 2.75 3.47852 2.99524C3.05516 3.21095 2.71095 3.55516 2.49524 3.97852C2.25 4.45982 2.25 5.08988 2.25 6.35V6.5M6 16.25H5.85C4.58988 16.25 3.95982 16.25 3.47852 16.0048C3.05516 15.789 2.71095 15.4448 2.49524 15.0215C2.25 14.5402 2.25 13.9101 2.25 12.65V12.5M15.75 6.5V6.35C15.75 5.08988 15.75 4.45982 15.5048 3.97852C15.289 3.55516 14.9448 3.21095 14.5215 2.99524C14.0402 2.75 13.4101 2.75 12.15 2.75H12M15.75 12.5V12.65C15.75 13.9101 15.75 14.5402 15.5048 15.0215C15.289 15.4448 14.9448 15.789 14.5215 16.0048C14.0402 16.25 13.4101 16.25 12.15 16.25H12" stroke="#667085" stroke-linecap="round" stroke-linejoin="round"/>
3916
4314
  </svg>
3917
4315
  `;
3918
- class Le extends T {
4316
+ class Te extends T {
3919
4317
  constructor(t) {
3920
4318
  super({
3921
4319
  title: "Border",
@@ -3923,17 +4321,17 @@ class Le extends T {
3923
4321
  settings: {
3924
4322
  size: new P({
3925
4323
  title: "Size",
3926
- icon: ne,
4324
+ icon: de,
3927
4325
  default: (t == null ? void 0 : t.size) ?? 0,
3928
4326
  suffix: "px"
3929
4327
  }),
3930
- color: new K({
4328
+ color: new Y({
3931
4329
  title: "Border Color",
3932
4330
  default: (t == null ? void 0 : t.color) || "#000000"
3933
4331
  }),
3934
4332
  radius: new P({
3935
4333
  title: "Radius",
3936
- icon: se,
4334
+ icon: he,
3937
4335
  default: (t == null ? void 0 : t.radius) ?? 12,
3938
4336
  suffix: "px"
3939
4337
  })
@@ -3957,20 +4355,20 @@ class Le extends T {
3957
4355
  `;
3958
4356
  }
3959
4357
  }
3960
- const oe = `
4358
+ const pe = `
3961
4359
  <svg xmlns="http://www.w3.org/2000/svg" width="14" height="13" viewBox="0 0 14 13" fill="none">
3962
4360
  <path d="M1 2.75C1 2.05109 1 1.70163 1.11418 1.42597C1.26642 1.05843 1.55843 0.766422 1.92597 0.614181C2.20163 0.5 2.55109 0.5 3.25 0.5H10.75C11.4489 0.5 11.7984 0.5 12.074 0.614181C12.4416 0.766422 12.7336 1.05843 12.8858 1.42597C13 1.70163 13 2.05109 13 2.75M4.75 12.5H9.25M7 0.5V12.5" stroke="#667085" stroke-linecap="round" stroke-linejoin="round"/>
3963
4361
  </svg>
3964
- `, ae = `
4362
+ `, ue = `
3965
4363
  <svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
3966
4364
  <path d="M3 5.75C3 5.05109 3 4.70163 3.11418 4.42597C3.26642 4.05843 3.55843 3.76642 3.92597 3.61418C4.20163 3.5 4.55109 3.5 5.25 3.5H12.75C13.4489 3.5 13.7984 3.5 14.074 3.61418C14.4416 3.76642 14.7336 4.05843 14.8858 4.42597C15 4.70163 15 5.05109 15 5.75M6 15.5H12M7.6875 3.5V15.5M10.3125 3.5V15.5" stroke="#667085" stroke-linecap="round" stroke-linejoin="round"/>
3967
4365
  </svg>
3968
- `, le = `
4366
+ `, ge = `
3969
4367
  <svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
3970
4368
  <path d="M6 5.75H12M9 5.75V13.25M5.85 16.25H12.15C13.4101 16.25 14.0402 16.25 14.5215 16.0048C14.9448 15.789 15.289 15.4448 15.5048 15.0215C15.75 14.5402 15.75 13.9101 15.75 12.65V6.35C15.75 5.08988 15.75 4.45982 15.5048 3.97852C15.289 3.55516 14.9448 3.21095 14.5215 2.99524C14.0402 2.75 13.4101 2.75 12.15 2.75H5.85C4.58988 2.75 3.95982 2.75 3.47852 2.99524C3.05516 3.21095 2.71095 3.55516 2.49524 3.97852C2.25 4.45982 2.25 5.08988 2.25 6.35V12.65C2.25 13.9101 2.25 14.5402 2.49524 15.0215C2.71095 15.4448 3.05516 15.789 3.47852 16.0048C3.95982 16.25 4.58988 16.25 5.85 16.25Z" stroke="#667085" stroke-linecap="round" stroke-linejoin="round"/>
3971
4369
  </svg>
3972
4370
  `;
3973
- class ke extends T {
4371
+ class Pe extends T {
3974
4372
  constructor(t = {}) {
3975
4373
  const { showAlign: e = t.showAlign ?? !0, ...i } = t;
3976
4374
  super({
@@ -3978,13 +4376,13 @@ class ke extends T {
3978
4376
  collapsed: i.collapsed,
3979
4377
  settings: (() => {
3980
4378
  const s = {
3981
- color: new K({
4379
+ color: new Y({
3982
4380
  title: "Color",
3983
4381
  default: i.colorDefault ?? "#001E1E"
3984
4382
  }),
3985
- fontFamily: new et({
4383
+ fontFamily: new it({
3986
4384
  title: "Font",
3987
- icon: oe,
4385
+ icon: pe,
3988
4386
  default: i.fontFamilyDefault ?? "Satoshi",
3989
4387
  options: i.fontFamilyOptions ?? [
3990
4388
  { name: "Alt", value: "Croco Sans Black Caps Alt" },
@@ -3995,9 +4393,9 @@ class ke extends T {
3995
4393
  getOptions: i.fontFamilyGetOptions,
3996
4394
  getOptionsAsync: i.fontFamilyGetOptionsAsync
3997
4395
  }),
3998
- fontWeight: new et({
4396
+ fontWeight: new it({
3999
4397
  title: "Weight",
4000
- icon: ae,
4398
+ icon: ue,
4001
4399
  default: i.fontWeightDefault ?? "400",
4002
4400
  options: i.fontWeightOptions ?? [
4003
4401
  { name: "Regular", value: "400" },
@@ -4009,7 +4407,7 @@ class ke extends T {
4009
4407
  }),
4010
4408
  fontSize: new P({
4011
4409
  title: "Size",
4012
- icon: le,
4410
+ icon: ge,
4013
4411
  default: i.fontSizeDefault ?? 12,
4014
4412
  suffix: "px",
4015
4413
  mobile: i.fontSizeMobileDefault
@@ -4017,7 +4415,7 @@ class ke extends T {
4017
4415
  };
4018
4416
  return e ? {
4019
4417
  ...s,
4020
- align: new Pt({
4418
+ align: new $t({
4021
4419
  title: "Align",
4022
4420
  default: i.alignDefault ?? "center"
4023
4421
  })
@@ -4049,7 +4447,7 @@ class ke extends T {
4049
4447
  `;
4050
4448
  }
4051
4449
  }
4052
- class q extends x {
4450
+ class J extends x {
4053
4451
  constructor(t) {
4054
4452
  super({
4055
4453
  ...t,
@@ -4060,8 +4458,8 @@ class q extends x {
4060
4458
  const t = this.value === "auto" ? "text" : "number", e = (a) => {
4061
4459
  this.value !== "auto" && (this.props.minValue !== void 0 && (a.min = String(this.props.minValue)), this.props.maxValue !== void 0 && (a.max = String(this.props.maxValue)), this.props.className && a.classList.add(this.props.className), a.addEventListener("input", () => {
4062
4460
  const l = this.props.minValue ?? Number.MIN_SAFE_INTEGER, r = this.props.maxValue ?? Number.MAX_SAFE_INTEGER;
4063
- let h = Number(a.value);
4064
- h < l && (h = l), h > r && (h = r), a.value = String(h);
4461
+ let c = Number(a.value);
4462
+ c < l && (c = l), c > r && (c = r), a.value = String(c);
4065
4463
  }));
4066
4464
  }, i = this.createInput({
4067
4465
  value: this.value,
@@ -4095,33 +4493,33 @@ class q extends x {
4095
4493
  }), i;
4096
4494
  }
4097
4495
  }
4098
- class Me extends T {
4496
+ class Oe extends T {
4099
4497
  constructor(t) {
4100
4498
  super({
4101
4499
  title: "Margins",
4102
4500
  collapsed: t == null ? void 0 : t.collapsed,
4103
4501
  settings: {
4104
- marginTop: new q({
4502
+ marginTop: new J({
4105
4503
  title: "Top",
4106
- icon: re,
4504
+ icon: me,
4107
4505
  suffix: "px",
4108
4506
  default: (t == null ? void 0 : t.marginTop) ?? "auto"
4109
4507
  }),
4110
- marginRight: new q({
4508
+ marginRight: new J({
4111
4509
  title: "Right",
4112
- icon: ce,
4510
+ icon: ve,
4113
4511
  suffix: "px",
4114
4512
  default: (t == null ? void 0 : t.marginRight) ?? 0
4115
4513
  }),
4116
- marginBottom: new q({
4514
+ marginBottom: new J({
4117
4515
  title: "Bottom",
4118
- icon: he,
4516
+ icon: fe,
4119
4517
  suffix: "px",
4120
4518
  default: (t == null ? void 0 : t.marginBottom) ?? 0
4121
4519
  }),
4122
- marginLeft: new q({
4520
+ marginLeft: new J({
4123
4521
  title: "Left",
4124
- icon: de,
4522
+ icon: Ce,
4125
4523
  suffix: "px",
4126
4524
  default: (t == null ? void 0 : t.marginLeft) ?? 0
4127
4525
  })
@@ -4138,26 +4536,26 @@ class Me extends T {
4138
4536
  `;
4139
4537
  }
4140
4538
  }
4141
- const re = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
4539
+ const me = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
4142
4540
  <path d="M2.25 16.25H2.2575M2.25 9.5H2.2575M2.25 12.875H2.2575M2.25 6.125H2.2575M5.625 16.25H5.6325M5.625 9.5H5.6325M12.375 16.25H12.3825M12.375 9.5H12.3825M9 16.25H9.0075M9 9.5H9.0075M9 12.875H9.0075M9 6.125H9.0075M15.75 16.25H15.7575M15.75 9.5H15.7575M15.75 12.875H15.7575M15.75 6.125H15.7575M15.75 2.75H2.25" stroke="#667085" stroke-linecap="round" stroke-linejoin="round"/>
4143
- </svg>`, ce = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
4541
+ </svg>`, ve = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
4144
4542
  <path d="M5.625 2.75H5.6325M5.625 9.5H5.6325M5.625 16.25H5.6325M12.375 2.75H12.3825M12.375 9.5H12.3825M12.375 16.25H12.3825M9 2.75H9.0075M9 9.5H9.0075M9 16.25H9.0075M9 12.875H9.0075M9 6.125H9.0075M2.25 2.75H2.2575M2.25 9.5H2.2575M2.25 16.25H2.2575M2.25 12.875H2.2575M2.25 6.125H2.2575M15.75 16.25V2.75" stroke="#667085" stroke-linecap="round" stroke-linejoin="round"/>
4145
- </svg>`, he = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
4543
+ </svg>`, fe = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
4146
4544
  <path d="M2.25 2.75H2.2575M2.25 9.5H2.2575M2.25 12.875H2.2575M2.25 6.125H2.2575M5.625 2.75H5.6325M5.625 9.5H5.6325M12.375 2.75H12.3825M12.375 9.5H12.3825M9 2.75H9.0075M9 9.5H9.0075M9 12.875H9.0075M9 6.125H9.0075M15.75 2.75H15.7575M15.75 9.5H15.7575M15.75 12.875H15.7575M15.75 6.125H15.7575M15.75 16.25H2.25" stroke="#667085" stroke-linecap="round" stroke-linejoin="round"/>
4147
- </svg>`, de = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
4545
+ </svg>`, Ce = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
4148
4546
  <path d="M5.625 2.75H5.6325M5.625 9.5H5.6325M5.625 16.25H5.6325M12.375 2.75H12.3825M12.375 9.5H12.3825M12.375 16.25H12.3825M9 2.75H9.0075M9 9.5H9.0075M9 16.25H9.0075M9 12.875H9.0075M9 6.125H9.0075M15.75 2.75H15.7575M15.75 9.5H15.7575M15.75 16.25H15.7575M15.75 12.875H15.7575M15.75 6.125H15.7575M2.25 16.25V2.75" stroke="#667085" stroke-linecap="round" stroke-linejoin="round"/>
4149
4547
  </svg>`;
4150
- class Se extends T {
4548
+ class $e extends T {
4151
4549
  constructor(t) {
4152
4550
  super({
4153
4551
  title: "Background Image",
4154
4552
  collapsed: t == null ? void 0 : t.collapsed,
4155
4553
  settings: {
4156
- backgroundImage: new nt({
4554
+ backgroundImage: new ot({
4157
4555
  ...t == null ? void 0 : t.uploadProps,
4158
4556
  default: (t == null ? void 0 : t.backgroundImage) ?? ""
4159
4557
  }),
4160
- opacity: new Vt({
4558
+ opacity: new Pt({
4161
4559
  default: (t == null ? void 0 : t.opacity) ?? 100
4162
4560
  }),
4163
4561
  backgroundColor: new F({
@@ -4186,21 +4584,21 @@ class Se extends T {
4186
4584
  `;
4187
4585
  }
4188
4586
  }
4189
- class Ie extends T {
4587
+ class He extends T {
4190
4588
  constructor(t) {
4191
4589
  super({
4192
4590
  title: (t == null ? void 0 : t.title) ?? "Image",
4193
4591
  collapsed: t == null ? void 0 : t.collapsed,
4194
4592
  settings: {
4195
- image: new nt({
4593
+ image: new ot({
4196
4594
  ...t == null ? void 0 : t.uploadProps,
4197
4595
  default: (t == null ? void 0 : t.image) ?? ""
4198
4596
  }),
4199
- width: new Ft({
4597
+ width: new Jt({
4200
4598
  default: (t == null ? void 0 : t.width) ?? 1e3,
4201
4599
  mobile: t == null ? void 0 : t.widthMobile
4202
4600
  }),
4203
- height: new Gt({
4601
+ height: new jt({
4204
4602
  default: (t == null ? void 0 : t.height) ?? 300,
4205
4603
  mobile: t == null ? void 0 : t.heightMobile
4206
4604
  })
@@ -4209,41 +4607,42 @@ class Ie extends T {
4209
4607
  }
4210
4608
  }
4211
4609
  export {
4212
- Pt as AlignSetting,
4213
- xe as AnimationSetting,
4214
- Se as BackgroundSettingSet,
4215
- Le as BorderSettingSet,
4216
- me as ButtonSetting,
4610
+ $t as AlignSetting,
4611
+ Ve as AnimationSetting,
4612
+ $e as BackgroundSettingSet,
4613
+ Te as BorderSettingSet,
4614
+ we as ButtonSetting,
4217
4615
  V as ColorSetting,
4218
4616
  F as ColorWithOpacitySetting,
4219
- fe as DimensionSetting,
4220
- ye as GapSetting,
4221
- K as GradientSetting,
4222
- ke as HeaderTypographySettingSet,
4223
- Gt as HeightSetting,
4224
- ge as HtmlSetting,
4225
- Ie as ImageSettingSet,
4226
- be as MarginBottomSetting,
4227
- Me as MarginSettingGroup,
4228
- Ee as MarginTopSetting,
4229
- we as MultiLanguageSetting,
4617
+ xe as DimensionSetting,
4618
+ Me as GapSetting,
4619
+ Y as GradientSetting,
4620
+ Pe as HeaderTypographySettingSet,
4621
+ jt as HeightSetting,
4622
+ Ee as HtmlSetting,
4623
+ ht as ImageMapSetting,
4624
+ He as ImageSettingSet,
4625
+ Ie as MarginBottomSetting,
4626
+ Oe as MarginSettingGroup,
4627
+ Ne as MarginTopSetting,
4628
+ Se as MultiLanguageSetting,
4230
4629
  P as NumberSetting,
4231
- Vt as OpacitySetting,
4232
- ve as SelectApiSettings,
4233
- et as SelectSetting,
4630
+ Pt as OpacitySetting,
4631
+ Le as SelectApiSettings,
4632
+ it as SelectSetting,
4234
4633
  x as Setting,
4235
4634
  T as SettingGroup,
4236
- Mt as StringSetting,
4237
- Lt as TabSettingGroup,
4238
- Lt as TabsSettingGroup,
4239
- Ce as Toggle,
4240
- nt as UploadSetting,
4241
- Ft as WidthSetting,
4242
- ue as asSettingGroupWithSettings,
4243
- kt as createSettingGroup,
4244
- pe as createTabSettingGroup,
4245
- A as isSetting,
4246
- lt as isSettingChild,
4635
+ Nt as StringSetting,
4636
+ Mt as TabSettingGroup,
4637
+ Mt as TabsSettingGroup,
4638
+ ke as Toggle,
4639
+ ot as UploadSetting,
4640
+ Jt as WidthSetting,
4641
+ be as asSettingGroupWithSettings,
4642
+ It as createSettingGroup,
4643
+ ye as createTabSettingGroup,
4644
+ D as isSetting,
4645
+ ct as isSettingChild,
4247
4646
  L as isSettingGroup,
4248
- j as iterateSettings
4647
+ q as iterateSettings
4249
4648
  };