@uploadcare/react-uploader 0.3.0-alpha.1 → 0.3.0-alpha.2

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,9 +1,9 @@
1
- var ur = Object.defineProperty;
2
- var dr = (s, i, e) => i in s ? ur(s, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[i] = e;
3
- var u = (s, i, e) => (dr(s, typeof i != "symbol" ? i + "" : i, e), e);
1
+ var hr = Object.defineProperty;
2
+ var ur = (s, i, e) => i in s ? hr(s, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[i] = e;
3
+ var u = (s, i, e) => (ur(s, typeof i != "symbol" ? i + "" : i, e), e);
4
4
  import L, { useMemo as ke } from "react";
5
- var fr = Object.defineProperty, pr = (s, i, e) => i in s ? fr(s, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[i] = e, Ft = (s, i, e) => (pr(s, typeof i != "symbol" ? i + "" : i, e), e);
6
- function mr(s) {
5
+ var dr = Object.defineProperty, fr = (s, i, e) => i in s ? dr(s, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[i] = e, Mt = (s, i, e) => (fr(s, typeof i != "symbol" ? i + "" : i, e), e);
6
+ function pr(s) {
7
7
  let i = (e) => {
8
8
  var t;
9
9
  for (let r in e)
@@ -14,7 +14,7 @@ function mr(s) {
14
14
  }
15
15
  var T = class {
16
16
  constructor(s) {
17
- s.constructor === Object ? this.store = mr(s) : (this._storeIsProxy = !0, this.store = s), this.callbackMap = /* @__PURE__ */ Object.create(null);
17
+ s.constructor === Object ? this.store = pr(s) : (this._storeIsProxy = !0, this.store = s), this.callbackMap = /* @__PURE__ */ Object.create(null);
18
18
  }
19
19
  static warn(s, i) {
20
20
  console.warn(`Symbiote Data: cannot ${s}. Prop name: ` + i);
@@ -79,24 +79,24 @@ var v = Object.freeze({
79
79
  SET_LATER_KEY: "__toSetLater__",
80
80
  USE_TPL: "use-template",
81
81
  ROOT_STYLE_ATTR_NAME: "sym-component"
82
- }), qi = "1234567890QWERTYUIOPASDFGHJKLZXCVBNMqwertyuiopasdfghjklzxcvbnm", gr = qi.length - 1, Ae = class {
82
+ }), qi = "1234567890QWERTYUIOPASDFGHJKLZXCVBNMqwertyuiopasdfghjklzxcvbnm", mr = qi.length - 1, Ae = class {
83
83
  static generate(s = "XXXXXXXXX-XXX") {
84
84
  let i = "";
85
85
  for (let e = 0; e < s.length; e++)
86
- i += s[e] === "-" ? s[e] : qi.charAt(Math.random() * gr);
86
+ i += s[e] === "-" ? s[e] : qi.charAt(Math.random() * mr);
87
87
  return i;
88
88
  }
89
89
  };
90
- function Xi(s, i, e) {
90
+ function Gi(s, i, e) {
91
91
  let t = !0, r, n = i.split(".");
92
92
  return n.forEach((o, l) => {
93
93
  l < n.length - 1 ? s = s[o] : r = o;
94
94
  }), s ? s[r] = e : t = !1, t;
95
95
  }
96
- function br(s) {
96
+ function gr(s) {
97
97
  return s.split("-").map((i, e) => i && e ? i[0].toUpperCase() + i.slice(1) : i).join("").split("_").map((i, e) => i && e ? i.toUpperCase() : i).join("");
98
98
  }
99
- function _r(s, i) {
99
+ function br(s, i) {
100
100
  [...s.querySelectorAll(`[${v.REPEAT_ATTR}]`)].forEach((e) => {
101
101
  let t = e.getAttribute(v.REPEAT_ITEM_TAG_ATTR), r;
102
102
  if (t && (r = window.customElements.get(t)), !r) {
@@ -154,8 +154,8 @@ function _r(s, i) {
154
154
  }), e.removeAttribute(v.REPEAT_ATTR), e.removeAttribute(v.REPEAT_ITEM_TAG_ATTR);
155
155
  });
156
156
  }
157
- var mi = "__default__";
158
- function vr(s, i) {
157
+ var pi = "__default__";
158
+ function _r(s, i) {
159
159
  if (i.shadowRoot)
160
160
  return;
161
161
  let e = [...s.querySelectorAll("slot")];
@@ -163,14 +163,14 @@ function vr(s, i) {
163
163
  return;
164
164
  let t = {};
165
165
  e.forEach((r) => {
166
- let n = r.getAttribute("name") || mi;
166
+ let n = r.getAttribute("name") || pi;
167
167
  t[n] = {
168
168
  slot: r,
169
169
  fr: document.createDocumentFragment()
170
170
  };
171
171
  }), i.initChildren.forEach((r) => {
172
172
  var n;
173
- let o = mi;
173
+ let o = pi;
174
174
  r instanceof Element && r.hasAttribute("slot") && (o = r.getAttribute("slot"), r.removeAttribute("slot")), (n = t[o]) == null || n.fr.appendChild(r);
175
175
  }), Object.values(t).forEach((r) => {
176
176
  if (r.fr.childNodes.length)
@@ -182,18 +182,18 @@ function vr(s, i) {
182
182
  r.slot.remove();
183
183
  });
184
184
  }
185
- function yr(s, i) {
185
+ function vr(s, i) {
186
186
  [...s.querySelectorAll(`[${v.EL_REF_ATTR}]`)].forEach((e) => {
187
187
  let t = e.getAttribute(v.EL_REF_ATTR);
188
188
  i.ref[t] = e, e.removeAttribute(v.EL_REF_ATTR);
189
189
  });
190
190
  }
191
- function Cr(s, i) {
191
+ function yr(s, i) {
192
192
  [...s.querySelectorAll(`[${v.BIND_ATTR}]`)].forEach((e) => {
193
193
  let r = e.getAttribute(v.BIND_ATTR).split(";");
194
194
  [...e.attributes].forEach((n) => {
195
195
  if (n.name.startsWith("-") && n.value) {
196
- let o = br(n.name.replace("-", ""));
196
+ let o = gr(n.name.replace("-", ""));
197
197
  r.push(o + ":" + n.value), e.removeAttribute(n.name);
198
198
  }
199
199
  }), r.forEach((n) => {
@@ -205,26 +205,26 @@ function Cr(s, i) {
205
205
  for (let h of c) {
206
206
  let d;
207
207
  h.startsWith("!!") ? (d = "double", h = h.replace("!!", "")) : h.startsWith("!") && (d = "single", h = h.replace("!", "")), i.sub(h, (f) => {
208
- d === "double" ? f = !!f : d === "single" && (f = !f), a ? (f == null ? void 0 : f.constructor) === Boolean ? f ? e.setAttribute(l, "") : e.removeAttribute(l) : e.setAttribute(l, f) : Xi(e, l, f) || (e[v.SET_LATER_KEY] || (e[v.SET_LATER_KEY] = /* @__PURE__ */ Object.create(null)), e[v.SET_LATER_KEY][l] = f);
208
+ d === "double" ? f = !!f : d === "single" && (f = !f), a ? (f == null ? void 0 : f.constructor) === Boolean ? f ? e.setAttribute(l, "") : e.removeAttribute(l) : e.setAttribute(l, f) : Gi(e, l, f) || (e[v.SET_LATER_KEY] || (e[v.SET_LATER_KEY] = /* @__PURE__ */ Object.create(null)), e[v.SET_LATER_KEY][l] = f);
209
209
  });
210
210
  }
211
211
  }), e.removeAttribute(v.BIND_ATTR);
212
212
  });
213
213
  }
214
- var tt = "{{", Be = "}}", wr = "skip-text";
215
- function Er(s) {
214
+ var tt = "{{", Be = "}}", Cr = "skip-text";
215
+ function wr(s) {
216
216
  let i, e = [], t = document.createTreeWalker(s, NodeFilter.SHOW_TEXT, {
217
217
  acceptNode: (r) => {
218
218
  var n;
219
- return !((n = r.parentElement) != null && n.hasAttribute(wr)) && r.textContent.includes(tt) && r.textContent.includes(Be) && 1;
219
+ return !((n = r.parentElement) != null && n.hasAttribute(Cr)) && r.textContent.includes(tt) && r.textContent.includes(Be) && 1;
220
220
  }
221
221
  });
222
222
  for (; i = t.nextNode(); )
223
223
  e.push(i);
224
224
  return e;
225
225
  }
226
- var Ar = function(s, i) {
227
- Er(s).forEach((t) => {
226
+ var Er = function(s, i) {
227
+ wr(s).forEach((t) => {
228
228
  let r = [], n;
229
229
  for (; t.textContent.includes(Be); )
230
230
  t.textContent.startsWith(tt) ? (n = t.textContent.indexOf(Be) + Be.length, t.splitText(n), r.push(t)) : (n = t.textContent.indexOf(tt), t.splitText(n)), t = t.nextSibling;
@@ -235,14 +235,14 @@ var Ar = function(s, i) {
235
235
  });
236
236
  });
237
237
  });
238
- }, Tr = [_r, vr, yr, Cr, Ar], st = "'", Le = '"', $r = /\\([0-9a-fA-F]{1,6} ?)/g;
239
- function Sr(s) {
238
+ }, Ar = [br, _r, vr, yr, Er], st = "'", Le = '"', Tr = /\\([0-9a-fA-F]{1,6} ?)/g;
239
+ function $r(s) {
240
240
  return (s[0] === Le || s[0] === st) && (s[s.length - 1] === Le || s[s.length - 1] === st);
241
241
  }
242
- function xr(s) {
242
+ function Sr(s) {
243
243
  return (s[0] === Le || s[0] === st) && (s = s.slice(1)), (s[s.length - 1] === Le || s[s.length - 1] === st) && (s = s.slice(0, -1)), s;
244
244
  }
245
- function Ir(s) {
245
+ function xr(s) {
246
246
  let i = "", e = "";
247
247
  for (var t = 0; t < s.length; t++) {
248
248
  const r = s[t + 1];
@@ -250,19 +250,19 @@ function Ir(s) {
250
250
  }
251
251
  return i;
252
252
  }
253
- function Or(s) {
253
+ function Ir(s) {
254
254
  let i = s;
255
- Sr(s) && (i = xr(i), i = i.replace($r, (e, t) => String.fromCodePoint(parseInt(t.trim(), 16))), i = i.replaceAll(`\\
256
- `, "\\n"), i = Ir(i), i = Le + i + Le);
255
+ $r(s) && (i = Sr(i), i = i.replace(Tr, (e, t) => String.fromCodePoint(parseInt(t.trim(), 16))), i = i.replaceAll(`\\
256
+ `, "\\n"), i = xr(i), i = Le + i + Le);
257
257
  try {
258
258
  return JSON.parse(i);
259
259
  } catch {
260
260
  throw new Error(`Failed to parse CSS property value: ${i}. Original input: ${s}`);
261
261
  }
262
262
  }
263
- var gi = 0, $e = null, ie = null, ce = class extends HTMLElement {
263
+ var mi = 0, $e = null, ie = null, ce = class extends HTMLElement {
264
264
  constructor() {
265
- super(), Ft(this, "updateCssData", () => {
265
+ super(), Mt(this, "updateCssData", () => {
266
266
  var s;
267
267
  this.dropCssDataCache(), (s = this.__boundCssProps) == null || s.forEach((i) => {
268
268
  let e = this.getCssData(this.__extractCssName(i), !0);
@@ -424,11 +424,11 @@ var gi = 0, $e = null, ie = null, ce = class extends HTMLElement {
424
424
  let i = (s = this.getAttribute(v.CTX_NAME_ATTR)) == null ? void 0 : s.trim();
425
425
  if (i && this.style.setProperty(v.CSS_CTX_PROP, `'${i}'`), this.__initDataCtx(), this[v.SET_LATER_KEY]) {
426
426
  for (let e in this[v.SET_LATER_KEY])
427
- Xi(this, e, this[v.SET_LATER_KEY][e]);
427
+ Gi(this, e, this[v.SET_LATER_KEY][e]);
428
428
  delete this[v.SET_LATER_KEY];
429
429
  }
430
430
  this.initChildren = [...this.childNodes];
431
- for (let e of Tr)
431
+ for (let e of Ar)
432
432
  this.addTemplateProcessor(e);
433
433
  if (this.pauseRender)
434
434
  this.__initCallback();
@@ -463,7 +463,7 @@ var gi = 0, $e = null, ie = null, ce = class extends HTMLElement {
463
463
  }, 100)));
464
464
  }
465
465
  static reg(s, i = !1) {
466
- s || (gi++, s = `${v.AUTO_TAG_PRFX}-${gi}`), this.__tag = s;
466
+ s || (mi++, s = `${v.AUTO_TAG_PRFX}-${mi}`), this.__tag = s;
467
467
  let e = window.customElements.get(s);
468
468
  if (e) {
469
469
  !i && e !== this && console.warn([
@@ -496,7 +496,7 @@ var gi = 0, $e = null, ie = null, ce = class extends HTMLElement {
496
496
  this.__computedStyle || (this.__computedStyle = window.getComputedStyle(this));
497
497
  let e = this.__computedStyle.getPropertyValue(s).trim();
498
498
  try {
499
- this.__cssDataCache[s] = Or(e);
499
+ this.__cssDataCache[s] = Ir(e);
500
500
  } catch {
501
501
  !i && console.warn(`CSS Data error: ${s}`), this.__cssDataCache[s] = null;
502
502
  }
@@ -552,30 +552,30 @@ var gi = 0, $e = null, ie = null, ce = class extends HTMLElement {
552
552
  }
553
553
  }
554
554
  }, at = ce;
555
- Ft(at, "template");
556
- function Yi(s, i) {
555
+ Mt(at, "template");
556
+ function Xi(s, i) {
557
557
  for (let e in i)
558
558
  e.includes("-") ? s.style.setProperty(e, i[e]) : s.style[e] = i[e];
559
559
  }
560
- function kr(s, i) {
560
+ function Or(s, i) {
561
561
  for (let e in i)
562
562
  i[e].constructor === Boolean ? i[e] ? s.setAttribute(e, "") : s.removeAttribute(e) : s.setAttribute(e, i[e]);
563
563
  }
564
- function Dt(s = { tag: "div" }) {
564
+ function Ft(s = { tag: "div" }) {
565
565
  let i = document.createElement(s.tag);
566
- if (s.attributes && kr(i, s.attributes), s.styles && Yi(i, s.styles), s.properties)
566
+ if (s.attributes && Or(i, s.attributes), s.styles && Xi(i, s.styles), s.properties)
567
567
  for (let e in s.properties)
568
568
  i[e] = s.properties[e];
569
569
  return s.processors && s.processors.forEach((e) => {
570
570
  e(i);
571
571
  }), s.children && s.children.forEach((e) => {
572
- let t = Dt(e);
572
+ let t = Ft(e);
573
573
  i.appendChild(t);
574
574
  }), i;
575
575
  }
576
- var Ki = "idb-store-ready", Lr = "symbiote-db", Pr = "symbiote-idb-update_", Ur = class {
576
+ var Yi = "idb-store-ready", kr = "symbiote-db", Lr = "symbiote-idb-update_", Pr = class {
577
577
  _notifyWhenReady(s = null) {
578
- window.dispatchEvent(new CustomEvent(Ki, {
578
+ window.dispatchEvent(new CustomEvent(Yi, {
579
579
  detail: {
580
580
  dbName: this.name,
581
581
  storeName: this.storeName,
@@ -584,7 +584,7 @@ var Ki = "idb-store-ready", Lr = "symbiote-db", Pr = "symbiote-idb-update_", Ur
584
584
  }));
585
585
  }
586
586
  get _updEventName() {
587
- return Pr + this.name;
587
+ return Lr + this.name;
588
588
  }
589
589
  _getUpdateEvent(s) {
590
590
  return new CustomEvent(this._updEventName, {
@@ -671,15 +671,15 @@ var Ki = "idb-store-ready", Lr = "symbiote-db", Pr = "symbiote-idb-update_", Ur
671
671
  };
672
672
  }
673
673
  stop() {
674
- window.removeEventListener("storage", this._updateHandler), this._subscriptionsMap = null, Ji.clear(this.name);
674
+ window.removeEventListener("storage", this._updateHandler), this._subscriptionsMap = null, Ki.clear(this.name);
675
675
  }
676
- }, Ji = class {
676
+ }, Ki = class {
677
677
  static get readyEventName() {
678
- return Ki;
678
+ return Yi;
679
679
  }
680
- static open(s = Lr, i = "store") {
680
+ static open(s = kr, i = "store") {
681
681
  let e = s + "/" + i;
682
- return this._reg[e] || (this._reg[e] = new Ur(s, i)), this._reg[e];
682
+ return this._reg[e] || (this._reg[e] = new Pr(s, i)), this._reg[e];
683
683
  }
684
684
  static clear(s) {
685
685
  window.indexedDB.deleteDatabase(s);
@@ -687,8 +687,8 @@ var Ki = "idb-store-ready", Lr = "symbiote-db", Pr = "symbiote-idb-update_", Ur
687
687
  i.split("/")[0] === s && delete this._reg[i];
688
688
  }
689
689
  };
690
- Ft(Ji, "_reg", /* @__PURE__ */ Object.create(null));
691
- const Rr = 20, x = Object.freeze({
690
+ Mt(Ki, "_reg", /* @__PURE__ */ Object.create(null));
691
+ const Ur = 20, x = Object.freeze({
692
692
  FILE_ADDED: "file-added",
693
693
  FILE_REMOVED: "file-removed",
694
694
  FILE_UPLOAD_START: "file-upload-start",
@@ -708,7 +708,7 @@ const Rr = 20, x = Object.freeze({
708
708
  CHANGE: "change",
709
709
  GROUP_CREATED: "group-created"
710
710
  });
711
- class Mr {
711
+ class Rr {
712
712
  /** @param {(...args: unknown[]) => void} debugPrint */
713
713
  constructor(i) {
714
714
  /**
@@ -768,7 +768,7 @@ class Mr {
768
768
  return;
769
769
  }
770
770
  this._timeoutStore.has(i) && window.clearTimeout(this._timeoutStore.get(i));
771
- const r = typeof t == "number" ? t : Rr, n = window.setTimeout(() => {
771
+ const r = typeof t == "number" ? t : Ur, n = window.setTimeout(() => {
772
772
  this._dispatch(i, typeof e == "function" ? e() : e), this._timeoutStore.delete(i);
773
773
  }, r);
774
774
  this._timeoutStore.set(i, n);
@@ -787,7 +787,7 @@ function H(s, i) {
787
787
  }, /** @type {T & { cancel: () => void }} } */
788
788
  t;
789
789
  }
790
- const bi = "--uploadcare-blocks-window-height";
790
+ const gi = "--uploadcare-blocks-window-height";
791
791
  class rt {
792
792
  /**
793
793
  * @param {unknown} client
@@ -809,7 +809,7 @@ class rt {
809
809
  }
810
810
  /** @private */
811
811
  static detachTracker() {
812
- window.removeEventListener("resize", this.flush, { capture: !0 }), document.documentElement.style.removeProperty(bi);
812
+ window.removeEventListener("resize", this.flush, { capture: !0 }), document.documentElement.style.removeProperty(gi);
813
813
  }
814
814
  }
815
815
  /**
@@ -818,9 +818,9 @@ class rt {
818
818
  */
819
819
  u(rt, "clientsRegistry", /* @__PURE__ */ new Set()), /** @private */
820
820
  u(rt, "flush", H(() => {
821
- document.documentElement.style.setProperty(bi, `${window.innerHeight}px`);
821
+ document.documentElement.style.setProperty(gi, `${window.innerHeight}px`);
822
822
  }, 100));
823
- const Fr = (s) => {
823
+ const Mr = (s) => {
824
824
  var t;
825
825
  const i = (
826
826
  /** @type {any} */
@@ -828,30 +828,30 @@ const Fr = (s) => {
828
828
  );
829
829
  let e = "ltr";
830
830
  return typeof i.getTextInfo == "function" && i.getTextInfo().direction ? e = i.getTextInfo().direction : "textInfo" in i && ((t = i.textInfo) != null && t.direction) && (e = i.textInfo.direction), e;
831
- }, Zi = (s, i) => new Intl.PluralRules(s).select(i), Dr = (s) => s, It = "{{", Qi = "}}", _i = "plural:";
832
- function Ot(s, i, e = {}) {
831
+ }, Ji = (s, i) => new Intl.PluralRules(s).select(i), Fr = (s) => s, xt = "{{", Zi = "}}", bi = "plural:";
832
+ function It(s, i, e = {}) {
833
833
  var o;
834
- let { openToken: t = It, closeToken: r = Qi, transform: n = Dr } = e;
834
+ let { openToken: t = xt, closeToken: r = Zi, transform: n = Fr } = e;
835
835
  for (let l in i) {
836
836
  let a = (o = i[l]) == null ? void 0 : o.toString();
837
837
  s = s.replaceAll(t + l + r, typeof a == "string" ? n(a) : a);
838
838
  }
839
839
  return s;
840
840
  }
841
- function Nr(s) {
841
+ function Dr(s) {
842
842
  const i = [];
843
- let e = s.indexOf(It);
843
+ let e = s.indexOf(xt);
844
844
  for (; e !== -1; ) {
845
- const t = s.indexOf(Qi, e), r = s.substring(e + 2, t);
846
- if (r.startsWith(_i)) {
847
- const n = s.substring(e + 2, t).replace(_i, ""), o = n.substring(0, n.indexOf("(")), l = n.substring(n.indexOf("(") + 1, n.indexOf(")"));
845
+ const t = s.indexOf(Zi, e), r = s.substring(e + 2, t);
846
+ if (r.startsWith(bi)) {
847
+ const n = s.substring(e + 2, t).replace(bi, ""), o = n.substring(0, n.indexOf("(")), l = n.substring(n.indexOf("(") + 1, n.indexOf(")"));
848
848
  i.push({ variable: r, pluralKey: o, countVariable: l });
849
849
  }
850
- e = s.indexOf(It, t);
850
+ e = s.indexOf(xt, t);
851
851
  }
852
852
  return i;
853
853
  }
854
- const zr = ({ element: s, attribute: i, onSuccess: e, onTimeout: t, timeout: r = 300 }) => {
854
+ const Nr = ({ element: s, attribute: i, onSuccess: e, onTimeout: t, timeout: r = 300 }) => {
855
855
  const n = s.getAttribute(i);
856
856
  if (n !== null) {
857
857
  e(n);
@@ -872,20 +872,20 @@ const zr = ({ element: s, attribute: i, onSuccess: e, onTimeout: t, timeout: r =
872
872
  c.type === "attributes" && c.attributeName === i && h !== null && (clearTimeout(l), o.disconnect(), e(h));
873
873
  };
874
874
  };
875
- function vi(s) {
875
+ function _i(s) {
876
876
  return Object.prototype.toString.call(s) === "[object Object]";
877
877
  }
878
- const Vr = /\W|_/g;
879
- function Br(s) {
880
- return s.split(Vr).map((i, e) => i.charAt(0)[e > 0 ? "toUpperCase" : "toLowerCase"]() + i.slice(1)).join("");
878
+ const zr = /\W|_/g;
879
+ function Vr(s) {
880
+ return s.split(zr).map((i, e) => i.charAt(0)[e > 0 ? "toUpperCase" : "toLowerCase"]() + i.slice(1)).join("");
881
881
  }
882
- function yi(s, { ignoreKeys: i } = { ignoreKeys: [] }) {
882
+ function vi(s, { ignoreKeys: i } = { ignoreKeys: [] }) {
883
883
  return Array.isArray(s) ? s.map((e) => ae(e, { ignoreKeys: i })) : s;
884
884
  }
885
885
  function ae(s, { ignoreKeys: i } = { ignoreKeys: [] }) {
886
886
  if (Array.isArray(s))
887
- return yi(s, { ignoreKeys: i });
888
- if (!vi(s))
887
+ return vi(s, { ignoreKeys: i });
888
+ if (!_i(s))
889
889
  return s;
890
890
  const e = {};
891
891
  for (const t of Object.keys(s)) {
@@ -894,12 +894,12 @@ function ae(s, { ignoreKeys: i } = { ignoreKeys: [] }) {
894
894
  e[t] = r;
895
895
  continue;
896
896
  }
897
- vi(r) ? r = ae(r, { ignoreKeys: i }) : Array.isArray(r) && (r = yi(r, { ignoreKeys: i })), e[Br(t)] = r;
897
+ _i(r) ? r = ae(r, { ignoreKeys: i }) : Array.isArray(r) && (r = vi(r, { ignoreKeys: i })), e[Vr(t)] = r;
898
898
  }
899
899
  return e;
900
900
  }
901
- const jr = (s) => new Promise((i) => setTimeout(i, s));
902
- function es({ libraryName: s, libraryVersion: i, userAgent: e, publicKey: t = "", integration: r = "" }) {
901
+ const Br = (s) => new Promise((i) => setTimeout(i, s));
902
+ function Qi({ libraryName: s, libraryVersion: i, userAgent: e, publicKey: t = "", integration: r = "" }) {
903
903
  const n = "JavaScript";
904
904
  if (typeof e == "string")
905
905
  return e;
@@ -914,41 +914,41 @@ function es({ libraryName: s, libraryVersion: i, userAgent: e, publicKey: t = ""
914
914
  const o = [s, i, t].filter(Boolean).join("/"), l = [n, r].filter(Boolean).join("; ");
915
915
  return `${o} (${l})`;
916
916
  }
917
- const Hr = {
917
+ const jr = {
918
918
  factor: 2,
919
919
  time: 100
920
920
  };
921
- function Wr(s, i = Hr) {
921
+ function Hr(s, i = jr) {
922
922
  let e = 0;
923
923
  function t(r) {
924
924
  const n = Math.round(i.time * i.factor ** e);
925
925
  return r({
926
926
  attempt: e,
927
- retry: (l) => jr(l ?? n).then(() => (e += 1, t(r)))
927
+ retry: (l) => Br(l ?? n).then(() => (e += 1, t(r)))
928
928
  });
929
929
  }
930
930
  return t(s);
931
931
  }
932
- class Nt extends Error {
932
+ class Dt extends Error {
933
933
  }
934
- class qe extends Nt {
934
+ class Ge extends Dt {
935
935
  constructor(e) {
936
936
  super();
937
937
  u(this, "originalProgressEvent");
938
- this.name = "NetworkError", this.message = "Network error", Object.setPrototypeOf(this, qe.prototype), this.originalProgressEvent = e;
938
+ this.name = "NetworkError", this.message = "Network error", Object.setPrototypeOf(this, Ge.prototype), this.originalProgressEvent = e;
939
939
  }
940
940
  }
941
941
  const ct = (s, i) => {
942
942
  s && (s.aborted ? Promise.resolve().then(i) : s.addEventListener("abort", () => i(), { once: !0 }));
943
943
  };
944
- class Ee extends Nt {
944
+ class Ee extends Dt {
945
945
  constructor(e = "Request canceled") {
946
946
  super(e);
947
947
  u(this, "isCancel", !0);
948
948
  this.name = "CancelError", Object.setPrototypeOf(this, Ee.prototype);
949
949
  }
950
950
  }
951
- const Gr = 500, ts = ({ check: s, interval: i = Gr, timeout: e, signal: t }) => new Promise((r, n) => {
951
+ const Wr = 500, es = ({ check: s, interval: i = Wr, timeout: e, signal: t }) => new Promise((r, n) => {
952
952
  let o, l;
953
953
  ct(t, () => {
954
954
  o && clearTimeout(o), n(new Ee("Poll cancelled"));
@@ -983,7 +983,7 @@ const Gr = 500, ts = ({ check: s, interval: i = Gr, timeout: e, signal: t }) =>
983
983
  maxConcurrentRequests: 4,
984
984
  pollingTimeoutMilliseconds: 1e4,
985
985
  pusherKey: "79ae88bd931ea68464d9"
986
- }, ht = "application/octet-stream", is = "original", ge = ({ method: s, url: i, data: e, headers: t = {}, signal: r, onProgress: n }) => new Promise((o, l) => {
986
+ }, ht = "application/octet-stream", ts = "original", ge = ({ method: s, url: i, data: e, headers: t = {}, signal: r, onProgress: n }) => new Promise((o, l) => {
987
987
  const a = new XMLHttpRequest(), c = (s == null ? void 0 : s.toUpperCase()) || "GET";
988
988
  let h = !1;
989
989
  a.open(c, i, !0), t && Object.entries(t).forEach((d) => {
@@ -1016,7 +1016,7 @@ const Gr = 500, ts = ({ check: s, interval: i = Gr, timeout: e, signal: t }) =>
1016
1016
  });
1017
1017
  }
1018
1018
  }, a.onerror = (d) => {
1019
- h || l(new qe(d));
1019
+ h || l(new Ge(d));
1020
1020
  }, n && typeof n == "function" && (a.upload.onprogress = (d) => {
1021
1021
  d.lengthComputable ? n({
1022
1022
  isComputable: !0,
@@ -1027,37 +1027,37 @@ const Gr = 500, ts = ({ check: s, interval: i = Gr, timeout: e, signal: t }) =>
1027
1027
  function qr(s, ...i) {
1028
1028
  return s;
1029
1029
  }
1030
- const Xr = ({ name: s }) => s ? [s] : [], Yr = qr;
1031
- var Kr = () => new FormData();
1032
- const ss = (s) => !1, ut = (s) => typeof Blob < "u" && s instanceof Blob, dt = (s) => typeof File < "u" && s instanceof File, ft = (s) => !!s && typeof s == "object" && !Array.isArray(s) && "uri" in s && typeof s.uri == "string", Re = (s) => ut(s) || dt(s) || ss() || ft(s), Jr = (s) => typeof s == "string" || typeof s == "number" || typeof s > "u", Zr = (s) => !!s && typeof s == "object" && !Array.isArray(s), Qr = (s) => !!s && typeof s == "object" && "data" in s && Re(s.data);
1033
- function rs(s, i, e) {
1030
+ const Gr = ({ name: s }) => s ? [s] : [], Xr = qr;
1031
+ var Yr = () => new FormData();
1032
+ const is = (s) => !1, ut = (s) => typeof Blob < "u" && s instanceof Blob, dt = (s) => typeof File < "u" && s instanceof File, ft = (s) => !!s && typeof s == "object" && !Array.isArray(s) && "uri" in s && typeof s.uri == "string", Re = (s) => ut(s) || dt(s) || is() || ft(s), Kr = (s) => typeof s == "string" || typeof s == "number" || typeof s > "u", Jr = (s) => !!s && typeof s == "object" && !Array.isArray(s), Zr = (s) => !!s && typeof s == "object" && "data" in s && Re(s.data);
1033
+ function ss(s, i, e) {
1034
1034
  if (Array.isArray(e))
1035
1035
  for (const t of e)
1036
- rs(s, `${i}[]`, t);
1037
- else if (Qr(e)) {
1038
- const { name: t, contentType: r } = e, n = Yr(e.data, t, r ?? ht), o = Xr({ name: t, contentType: r });
1036
+ ss(s, `${i}[]`, t);
1037
+ else if (Zr(e)) {
1038
+ const { name: t, contentType: r } = e, n = Xr(e.data, t, r ?? ht), o = Gr({ name: t, contentType: r });
1039
1039
  s.push([i, n, ...o]);
1040
- } else if (Zr(e))
1040
+ } else if (Jr(e))
1041
1041
  for (const [t, r] of Object.entries(e))
1042
1042
  typeof r < "u" && s.push([`${i}[${t}]`, String(r)]);
1043
1043
  else
1044
- Jr(e) && e && s.push([i, e.toString()]);
1044
+ Kr(e) && e && s.push([i, e.toString()]);
1045
1045
  }
1046
- function en(s) {
1046
+ function Qr(s) {
1047
1047
  const i = [];
1048
1048
  for (const [e, t] of Object.entries(s))
1049
- rs(i, e, t);
1049
+ ss(i, e, t);
1050
1050
  return i;
1051
1051
  }
1052
1052
  function pt(s) {
1053
- const i = Kr(), e = en(s);
1053
+ const i = Yr(), e = Qr(s);
1054
1054
  for (const t of e) {
1055
1055
  const [r, n, ...o] = t;
1056
1056
  i.append(r, n, ...o);
1057
1057
  }
1058
1058
  return i;
1059
1059
  }
1060
- class N extends Nt {
1060
+ class N extends Dt {
1061
1061
  constructor(e, t, r, n, o) {
1062
1062
  super();
1063
1063
  u(this, "code");
@@ -1067,7 +1067,7 @@ class N extends Nt {
1067
1067
  this.name = "UploadError", this.message = e, this.code = t, this.request = r, this.response = n, this.headers = o, Object.setPrototypeOf(this, N.prototype);
1068
1068
  }
1069
1069
  }
1070
- const tn = (s) => {
1070
+ const en = (s) => {
1071
1071
  const i = new URLSearchParams();
1072
1072
  for (const [e, t] of Object.entries(s))
1073
1073
  t && typeof t == "object" && !Array.isArray(t) ? Object.entries(t).filter((r) => r[1] ?? !1).forEach((r) => i.set(`${e}[${r[0]}]`, String(r[1]))) : Array.isArray(t) ? t.forEach((r) => {
@@ -1076,46 +1076,46 @@ const tn = (s) => {
1076
1076
  return i.toString();
1077
1077
  }, oe = (s, i, e) => {
1078
1078
  const t = new URL(s);
1079
- return t.pathname = (t.pathname + i).replace("//", "/"), e && (t.search = tn(e)), t.toString();
1079
+ return t.pathname = (t.pathname + i).replace("//", "/"), e && (t.search = en(e)), t.toString();
1080
1080
  };
1081
- var sn = "6.14.1";
1082
- const rn = "UploadcareUploadClient", nn = sn;
1081
+ var tn = "6.14.1";
1082
+ const sn = "UploadcareUploadClient", rn = tn;
1083
1083
  function Te(s) {
1084
- return es({
1085
- libraryName: rn,
1086
- libraryVersion: nn,
1084
+ return Qi({
1085
+ libraryName: sn,
1086
+ libraryVersion: rn,
1087
1087
  ...s
1088
1088
  });
1089
1089
  }
1090
- const on = "RequestThrottledError", Ci = 15e3, ln = 1e3;
1091
- function an(s) {
1090
+ const nn = "RequestThrottledError", yi = 15e3, on = 1e3;
1091
+ function ln(s) {
1092
1092
  const { headers: i } = s || {};
1093
1093
  if (!i || typeof i["retry-after"] != "string")
1094
- return Ci;
1094
+ return yi;
1095
1095
  const e = parseInt(i["retry-after"], 10);
1096
- return Number.isFinite(e) ? e * 1e3 : Ci;
1096
+ return Number.isFinite(e) ? e * 1e3 : yi;
1097
1097
  }
1098
1098
  function be(s, i) {
1099
1099
  const { retryThrottledRequestMaxTimes: e, retryNetworkErrorMaxTimes: t } = i;
1100
- return Wr(({ attempt: r, retry: n }) => s().catch((o) => {
1101
- if ("response" in o && (o == null ? void 0 : o.code) === on && r < e)
1102
- return n(an(o));
1103
- if (o instanceof qe && r < t)
1104
- return n((r + 1) * ln);
1100
+ return Hr(({ attempt: r, retry: n }) => s().catch((o) => {
1101
+ if ("response" in o && (o == null ? void 0 : o.code) === nn && r < e)
1102
+ return n(ln(o));
1103
+ if (o instanceof Ge && r < t)
1104
+ return n((r + 1) * on);
1105
1105
  throw o;
1106
1106
  }));
1107
1107
  }
1108
- const ns = (s) => {
1108
+ const rs = (s) => {
1109
1109
  let i = "";
1110
1110
  return (ut(s) || dt(s) || ft(s)) && (i = s.type), i || ht;
1111
- }, os = (s) => {
1111
+ }, ns = (s) => {
1112
1112
  let i = "";
1113
- return dt(s) && s.name ? i = s.name : ut(s) || ss() ? i = "" : ft(s) && s.name && (i = s.name), i || is;
1113
+ return dt(s) && s.name ? i = s.name : ut(s) || is() ? i = "" : ft(s) && s.name && (i = s.name), i || ts;
1114
1114
  };
1115
- function zt(s) {
1115
+ function Nt(s) {
1116
1116
  return typeof s > "u" || s === "auto" ? "auto" : s ? "1" : "0";
1117
1117
  }
1118
- function cn(s, { publicKey: i, fileName: e, contentType: t, baseURL: r = A.baseURL, secureSignature: n, secureExpire: o, store: l, signal: a, onProgress: c, source: h = "local", integration: d, userAgent: f, retryThrottledRequestMaxTimes: m = A.retryThrottledRequestMaxTimes, retryNetworkErrorMaxTimes: p = A.retryNetworkErrorMaxTimes, metadata: g }) {
1118
+ function an(s, { publicKey: i, fileName: e, contentType: t, baseURL: r = A.baseURL, secureSignature: n, secureExpire: o, store: l, signal: a, onProgress: c, source: h = "local", integration: d, userAgent: f, retryThrottledRequestMaxTimes: m = A.retryThrottledRequestMaxTimes, retryNetworkErrorMaxTimes: p = A.retryNetworkErrorMaxTimes, metadata: g }) {
1119
1119
  return be(() => ge({
1120
1120
  method: "POST",
1121
1121
  url: oe(r, "/base/", {
@@ -1127,11 +1127,11 @@ function cn(s, { publicKey: i, fileName: e, contentType: t, baseURL: r = A.baseU
1127
1127
  data: pt({
1128
1128
  file: {
1129
1129
  data: s,
1130
- name: e || os(s),
1131
- contentType: t || ns(s)
1130
+ name: e || ns(s),
1131
+ contentType: t || rs(s)
1132
1132
  },
1133
1133
  UPLOADCARE_PUB_KEY: i,
1134
- UPLOADCARE_STORE: zt(l),
1134
+ UPLOADCARE_STORE: Nt(l),
1135
1135
  signature: n,
1136
1136
  expire: o,
1137
1137
  source: h,
@@ -1146,11 +1146,11 @@ function cn(s, { publicKey: i, fileName: e, contentType: t, baseURL: r = A.baseU
1146
1146
  return y;
1147
1147
  }), { retryNetworkErrorMaxTimes: p, retryThrottledRequestMaxTimes: m });
1148
1148
  }
1149
- var kt;
1149
+ var Ot;
1150
1150
  (function(s) {
1151
1151
  s.Token = "token", s.FileInfo = "file_info";
1152
- })(kt || (kt = {}));
1153
- function hn(s, { publicKey: i, baseURL: e = A.baseURL, store: t, fileName: r, checkForUrlDuplicates: n, saveUrlForRecurrentUploads: o, secureSignature: l, secureExpire: a, source: c = "url", signal: h, integration: d, userAgent: f, retryThrottledRequestMaxTimes: m = A.retryThrottledRequestMaxTimes, retryNetworkErrorMaxTimes: p = A.retryNetworkErrorMaxTimes, metadata: g }) {
1152
+ })(Ot || (Ot = {}));
1153
+ function cn(s, { publicKey: i, baseURL: e = A.baseURL, store: t, fileName: r, checkForUrlDuplicates: n, saveUrlForRecurrentUploads: o, secureSignature: l, secureExpire: a, source: c = "url", signal: h, integration: d, userAgent: f, retryThrottledRequestMaxTimes: m = A.retryThrottledRequestMaxTimes, retryNetworkErrorMaxTimes: p = A.retryNetworkErrorMaxTimes, metadata: g }) {
1154
1154
  return be(() => ge({
1155
1155
  method: "POST",
1156
1156
  headers: {
@@ -1160,7 +1160,7 @@ function hn(s, { publicKey: i, baseURL: e = A.baseURL, store: t, fileName: r, ch
1160
1160
  jsonerrors: 1,
1161
1161
  pub_key: i,
1162
1162
  source_url: s,
1163
- store: zt(t),
1163
+ store: Nt(t),
1164
1164
  filename: r,
1165
1165
  check_URL_duplicates: n ? 1 : void 0,
1166
1166
  save_URL_duplicates: o ? 1 : void 0,
@@ -1181,8 +1181,8 @@ var D;
1181
1181
  (function(s) {
1182
1182
  s.Unknown = "unknown", s.Waiting = "waiting", s.Progress = "progress", s.Error = "error", s.Success = "success";
1183
1183
  })(D || (D = {}));
1184
- const un = (s) => "status" in s && s.status === D.Error;
1185
- function dn(s, { publicKey: i, baseURL: e = A.baseURL, signal: t, integration: r, userAgent: n, retryThrottledRequestMaxTimes: o = A.retryThrottledRequestMaxTimes, retryNetworkErrorMaxTimes: l = A.retryNetworkErrorMaxTimes } = {}) {
1184
+ const hn = (s) => "status" in s && s.status === D.Error;
1185
+ function un(s, { publicKey: i, baseURL: e = A.baseURL, signal: t, integration: r, userAgent: n, retryThrottledRequestMaxTimes: o = A.retryThrottledRequestMaxTimes, retryNetworkErrorMaxTimes: l = A.retryNetworkErrorMaxTimes } = {}) {
1186
1186
  return be(() => ge({
1187
1187
  method: "GET",
1188
1188
  headers: i ? {
@@ -1199,12 +1199,12 @@ function dn(s, { publicKey: i, baseURL: e = A.baseURL, signal: t, integration: r
1199
1199
  signal: t
1200
1200
  }).then(({ data: a, headers: c, request: h }) => {
1201
1201
  const d = ae(JSON.parse(a));
1202
- if ("error" in d && !un(d))
1202
+ if ("error" in d && !hn(d))
1203
1203
  throw new N(d.error.content, d.error.errorCode, h, d, c);
1204
1204
  return d;
1205
1205
  }), { retryNetworkErrorMaxTimes: l, retryThrottledRequestMaxTimes: o });
1206
1206
  }
1207
- function fn(s, { publicKey: i, baseURL: e = A.baseURL, jsonpCallback: t, secureSignature: r, secureExpire: n, signal: o, source: l, integration: a, userAgent: c, retryThrottledRequestMaxTimes: h = A.retryThrottledRequestMaxTimes, retryNetworkErrorMaxTimes: d = A.retryNetworkErrorMaxTimes }) {
1207
+ function dn(s, { publicKey: i, baseURL: e = A.baseURL, jsonpCallback: t, secureSignature: r, secureExpire: n, signal: o, source: l, integration: a, userAgent: c, retryThrottledRequestMaxTimes: h = A.retryThrottledRequestMaxTimes, retryNetworkErrorMaxTimes: d = A.retryNetworkErrorMaxTimes }) {
1208
1208
  return be(() => ge({
1209
1209
  method: "POST",
1210
1210
  headers: {
@@ -1229,7 +1229,7 @@ function fn(s, { publicKey: i, baseURL: e = A.baseURL, jsonpCallback: t, secureS
1229
1229
  return g;
1230
1230
  }), { retryNetworkErrorMaxTimes: d, retryThrottledRequestMaxTimes: h });
1231
1231
  }
1232
- function ls(s, { publicKey: i, baseURL: e = A.baseURL, signal: t, source: r, integration: n, userAgent: o, retryThrottledRequestMaxTimes: l = A.retryThrottledRequestMaxTimes, retryNetworkErrorMaxTimes: a = A.retryNetworkErrorMaxTimes }) {
1232
+ function os(s, { publicKey: i, baseURL: e = A.baseURL, signal: t, source: r, integration: n, userAgent: o, retryThrottledRequestMaxTimes: l = A.retryThrottledRequestMaxTimes, retryNetworkErrorMaxTimes: a = A.retryNetworkErrorMaxTimes }) {
1233
1233
  return be(() => ge({
1234
1234
  method: "GET",
1235
1235
  headers: {
@@ -1249,7 +1249,7 @@ function ls(s, { publicKey: i, baseURL: e = A.baseURL, signal: t, source: r, int
1249
1249
  return f;
1250
1250
  }), { retryThrottledRequestMaxTimes: l, retryNetworkErrorMaxTimes: a });
1251
1251
  }
1252
- function pn(s, { publicKey: i, contentType: e, fileName: t, multipartChunkSize: r = A.multipartChunkSize, baseURL: n = "", secureSignature: o, secureExpire: l, store: a, signal: c, source: h = "local", integration: d, userAgent: f, retryThrottledRequestMaxTimes: m = A.retryThrottledRequestMaxTimes, retryNetworkErrorMaxTimes: p = A.retryNetworkErrorMaxTimes, metadata: g }) {
1252
+ function fn(s, { publicKey: i, contentType: e, fileName: t, multipartChunkSize: r = A.multipartChunkSize, baseURL: n = "", secureSignature: o, secureExpire: l, store: a, signal: c, source: h = "local", integration: d, userAgent: f, retryThrottledRequestMaxTimes: m = A.retryThrottledRequestMaxTimes, retryNetworkErrorMaxTimes: p = A.retryNetworkErrorMaxTimes, metadata: g }) {
1253
1253
  return be(() => ge({
1254
1254
  method: "POST",
1255
1255
  url: oe(n, "/multipart/start/", { jsonerrors: 1 }),
@@ -1257,11 +1257,11 @@ function pn(s, { publicKey: i, contentType: e, fileName: t, multipartChunkSize:
1257
1257
  "X-UC-User-Agent": Te({ publicKey: i, integration: d, userAgent: f })
1258
1258
  },
1259
1259
  data: pt({
1260
- filename: t || is,
1260
+ filename: t || ts,
1261
1261
  size: s,
1262
1262
  content_type: e || ht,
1263
1263
  part_size: r,
1264
- UPLOADCARE_STORE: zt(a),
1264
+ UPLOADCARE_STORE: Nt(a),
1265
1265
  UPLOADCARE_PUB_KEY: i,
1266
1266
  signature: o,
1267
1267
  expire: l,
@@ -1276,7 +1276,7 @@ function pn(s, { publicKey: i, contentType: e, fileName: t, multipartChunkSize:
1276
1276
  return y.parts = Object.keys(y.parts).map((U) => y.parts[Number(U)]), y;
1277
1277
  }), { retryThrottledRequestMaxTimes: m, retryNetworkErrorMaxTimes: p });
1278
1278
  }
1279
- function mn(s, i, { contentType: e, signal: t, onProgress: r, retryThrottledRequestMaxTimes: n = A.retryThrottledRequestMaxTimes, retryNetworkErrorMaxTimes: o = A.retryNetworkErrorMaxTimes }) {
1279
+ function pn(s, i, { contentType: e, signal: t, onProgress: r, retryThrottledRequestMaxTimes: n = A.retryThrottledRequestMaxTimes, retryNetworkErrorMaxTimes: o = A.retryNetworkErrorMaxTimes }) {
1280
1280
  return be(() => ge({
1281
1281
  method: "PUT",
1282
1282
  url: i,
@@ -1295,7 +1295,7 @@ function mn(s, i, { contentType: e, signal: t, onProgress: r, retryThrottledRequ
1295
1295
  retryNetworkErrorMaxTimes: o
1296
1296
  });
1297
1297
  }
1298
- function gn(s, { publicKey: i, baseURL: e = A.baseURL, source: t = "local", signal: r, integration: n, userAgent: o, retryThrottledRequestMaxTimes: l = A.retryThrottledRequestMaxTimes, retryNetworkErrorMaxTimes: a = A.retryNetworkErrorMaxTimes }) {
1298
+ function mn(s, { publicKey: i, baseURL: e = A.baseURL, source: t = "local", signal: r, integration: n, userAgent: o, retryThrottledRequestMaxTimes: l = A.retryThrottledRequestMaxTimes, retryNetworkErrorMaxTimes: a = A.retryNetworkErrorMaxTimes }) {
1299
1299
  return be(() => ge({
1300
1300
  method: "POST",
1301
1301
  url: oe(e, "/multipart/complete/", { jsonerrors: 1 }),
@@ -1315,9 +1315,9 @@ function gn(s, { publicKey: i, baseURL: e = A.baseURL, source: t = "local", sign
1315
1315
  return f;
1316
1316
  }), { retryThrottledRequestMaxTimes: l, retryNetworkErrorMaxTimes: a });
1317
1317
  }
1318
- function Vt(s, { publicKey: i, baseURL: e, source: t, integration: r, userAgent: n, retryThrottledRequestMaxTimes: o, retryNetworkErrorMaxTimes: l, signal: a, onProgress: c }) {
1319
- return ts({
1320
- check: (h) => ls(s, {
1318
+ function zt(s, { publicKey: i, baseURL: e, source: t, integration: r, userAgent: n, retryThrottledRequestMaxTimes: o, retryNetworkErrorMaxTimes: l, signal: a, onProgress: c }) {
1319
+ return es({
1320
+ check: (h) => os(s, {
1321
1321
  publicKey: i,
1322
1322
  baseURL: e,
1323
1323
  signal: h,
@@ -1330,7 +1330,7 @@ function Vt(s, { publicKey: i, baseURL: e, source: t, integration: r, userAgent:
1330
1330
  signal: a
1331
1331
  });
1332
1332
  }
1333
- function bn(s) {
1333
+ function gn(s) {
1334
1334
  return "defaultEffects" in s;
1335
1335
  }
1336
1336
  class Me {
@@ -1351,10 +1351,10 @@ class Me {
1351
1351
  u(this, "s3Bucket", null);
1352
1352
  u(this, "defaultEffects", null);
1353
1353
  const { uuid: r, s3Bucket: n } = i, o = oe(e, `${r}/`), l = n ? oe(`https://${n}.s3.amazonaws.com/`, `${r}/${i.filename}`) : null;
1354
- this.uuid = r, this.name = t || i.filename, this.size = i.size, this.isStored = i.isStored, this.isImage = i.isImage, this.mimeType = i.mimeType, this.cdnUrl = o, this.originalFilename = i.originalFilename, this.imageInfo = i.imageInfo, this.videoInfo = i.videoInfo, this.contentInfo = i.contentInfo, this.metadata = i.metadata || null, this.s3Bucket = n || null, this.s3Url = l, bn(i) && (this.defaultEffects = i.defaultEffects);
1354
+ this.uuid = r, this.name = t || i.filename, this.size = i.size, this.isStored = i.isStored, this.isImage = i.isImage, this.mimeType = i.mimeType, this.cdnUrl = o, this.originalFilename = i.originalFilename, this.imageInfo = i.imageInfo, this.videoInfo = i.videoInfo, this.contentInfo = i.contentInfo, this.metadata = i.metadata || null, this.s3Bucket = n || null, this.s3Url = l, gn(i) && (this.defaultEffects = i.defaultEffects);
1355
1355
  }
1356
1356
  }
1357
- const _n = (s, { publicKey: i, fileName: e, baseURL: t, secureSignature: r, secureExpire: n, store: o, contentType: l, signal: a, onProgress: c, source: h, integration: d, userAgent: f, retryThrottledRequestMaxTimes: m, retryNetworkErrorMaxTimes: p, baseCDN: g, metadata: w }) => cn(s, {
1357
+ const bn = (s, { publicKey: i, fileName: e, baseURL: t, secureSignature: r, secureExpire: n, store: o, contentType: l, signal: a, onProgress: c, source: h, integration: d, userAgent: f, retryThrottledRequestMaxTimes: m, retryNetworkErrorMaxTimes: p, baseCDN: g, metadata: w }) => an(s, {
1358
1358
  publicKey: i,
1359
1359
  fileName: e,
1360
1360
  contentType: l,
@@ -1370,7 +1370,7 @@ const _n = (s, { publicKey: i, fileName: e, baseURL: t, secureSignature: r, secu
1370
1370
  retryThrottledRequestMaxTimes: m,
1371
1371
  retryNetworkErrorMaxTimes: p,
1372
1372
  metadata: w
1373
- }).then(({ file: E }) => Vt(E, {
1373
+ }).then(({ file: E }) => zt(E, {
1374
1374
  publicKey: i,
1375
1375
  baseURL: t,
1376
1376
  source: h,
@@ -1380,7 +1380,7 @@ const _n = (s, { publicKey: i, fileName: e, baseURL: t, secureSignature: r, secu
1380
1380
  retryNetworkErrorMaxTimes: p,
1381
1381
  onProgress: c,
1382
1382
  signal: a
1383
- })).then((E) => new Me(E, { baseCDN: g })), vn = (s, { publicKey: i, fileName: e, baseURL: t, signal: r, onProgress: n, source: o, integration: l, userAgent: a, retryThrottledRequestMaxTimes: c, retryNetworkErrorMaxTimes: h, baseCDN: d }) => ls(s, {
1383
+ })).then((E) => new Me(E, { baseCDN: g })), _n = (s, { publicKey: i, fileName: e, baseURL: t, signal: r, onProgress: n, source: o, integration: l, userAgent: a, retryThrottledRequestMaxTimes: c, retryNetworkErrorMaxTimes: h, baseCDN: d }) => os(s, {
1384
1384
  publicKey: i,
1385
1385
  baseURL: t,
1386
1386
  signal: r,
@@ -1392,7 +1392,7 @@ const _n = (s, { publicKey: i, fileName: e, baseURL: t, secureSignature: r, secu
1392
1392
  }).then((f) => new Me(f, { baseCDN: d, fileName: e })).then((f) => (n && n({
1393
1393
  isComputable: !0,
1394
1394
  value: 1
1395
- }), f)), yn = (s, { signal: i } = {}) => {
1395
+ }), f)), vn = (s, { signal: i } = {}) => {
1396
1396
  let e = null, t = null;
1397
1397
  const r = s.map(() => new AbortController()), n = (o) => () => {
1398
1398
  t = o, r.forEach((l, a) => a !== o && l.abort());
@@ -1408,8 +1408,8 @@ const _n = (s, { publicKey: i, fileName: e, baseURL: t, secureSignature: r, secu
1408
1408
  return o[t];
1409
1409
  });
1410
1410
  };
1411
- var Cn = window.WebSocket;
1412
- class wn {
1411
+ var yn = window.WebSocket;
1412
+ class Cn {
1413
1413
  constructor() {
1414
1414
  u(this, "events", /* @__PURE__ */ Object.create({}));
1415
1415
  }
@@ -1424,8 +1424,8 @@ class wn {
1424
1424
  e ? this.events[i] = this.events[i].filter((t) => t !== e) : this.events[i] = [];
1425
1425
  }
1426
1426
  }
1427
- const En = (s, i) => s === "success" ? { status: D.Success, ...i } : s === "progress" ? { status: D.Progress, ...i } : { status: D.Error, ...i };
1428
- class An {
1427
+ const wn = (s, i) => s === "success" ? { status: D.Success, ...i } : s === "progress" ? { status: D.Progress, ...i } : { status: D.Error, ...i };
1428
+ class En {
1429
1429
  constructor(i, e = 3e4) {
1430
1430
  u(this, "key");
1431
1431
  u(this, "disconnectTime");
@@ -1433,14 +1433,14 @@ class An {
1433
1433
  u(this, "queue", []);
1434
1434
  u(this, "isConnected", !1);
1435
1435
  u(this, "subscribers", 0);
1436
- u(this, "emmitter", new wn());
1436
+ u(this, "emmitter", new Cn());
1437
1437
  u(this, "disconnectTimeoutId", null);
1438
1438
  this.key = i, this.disconnectTime = e;
1439
1439
  }
1440
1440
  connect() {
1441
1441
  if (this.disconnectTimeoutId && clearTimeout(this.disconnectTimeoutId), !this.isConnected && !this.ws) {
1442
1442
  const i = `wss://ws.pusherapp.com/app/${this.key}?protocol=5&client=js&version=1.12.2`;
1443
- this.ws = new Cn(i), this.ws.addEventListener("error", (e) => {
1443
+ this.ws = new yn(i), this.ws.addEventListener("error", (e) => {
1444
1444
  this.emmitter.emit("error", new Error(e.message));
1445
1445
  }), this.emmitter.on("connected", () => {
1446
1446
  this.isConnected = !0, this.queue.forEach((e) => this.send(e.event, e.data)), this.queue = [];
@@ -1458,7 +1458,7 @@ class An {
1458
1458
  case "progress":
1459
1459
  case "success":
1460
1460
  case "fail":
1461
- this.emmitter.emit(t.channel, En(t.event, JSON.parse(t.data)));
1461
+ this.emmitter.emit(t.channel, wn(t.event, JSON.parse(t.data)));
1462
1462
  }
1463
1463
  });
1464
1464
  }
@@ -1497,19 +1497,19 @@ class An {
1497
1497
  return this.emmitter.on("error", i), () => this.emmitter.off("error", i);
1498
1498
  }
1499
1499
  }
1500
- let wt = null;
1501
- const Bt = (s) => {
1502
- if (!wt) {
1500
+ let Ct = null;
1501
+ const Vt = (s) => {
1502
+ if (!Ct) {
1503
1503
  const i = typeof window > "u" ? 0 : 3e4;
1504
- wt = new An(s, i);
1504
+ Ct = new En(s, i);
1505
1505
  }
1506
- return wt;
1507
- }, Tn = (s) => {
1508
- Bt(s).connect();
1506
+ return Ct;
1507
+ }, An = (s) => {
1508
+ Vt(s).connect();
1509
1509
  };
1510
- function $n({ token: s, publicKey: i, baseURL: e, integration: t, userAgent: r, retryThrottledRequestMaxTimes: n, retryNetworkErrorMaxTimes: o, onProgress: l, signal: a }) {
1511
- return ts({
1512
- check: (c) => dn(s, {
1510
+ function Tn({ token: s, publicKey: i, baseURL: e, integration: t, userAgent: r, retryThrottledRequestMaxTimes: n, retryNetworkErrorMaxTimes: o, onProgress: l, signal: a }) {
1511
+ return es({
1512
+ check: (c) => un(s, {
1513
1513
  publicKey: i,
1514
1514
  baseURL: e,
1515
1515
  integration: t,
@@ -1542,8 +1542,8 @@ function $n({ token: s, publicKey: i, baseURL: e, integration: t, userAgent: r,
1542
1542
  signal: a
1543
1543
  });
1544
1544
  }
1545
- const Sn = ({ token: s, pusherKey: i, signal: e, onProgress: t }) => new Promise((r, n) => {
1546
- const o = Bt(i), l = o.onError(n), a = () => {
1545
+ const $n = ({ token: s, pusherKey: i, signal: e, onProgress: t }) => new Promise((r, n) => {
1546
+ const o = Vt(i), l = o.onError(n), a = () => {
1547
1547
  l(), o.unsubscribe(s);
1548
1548
  };
1549
1549
  ct(e, () => {
@@ -1568,7 +1568,7 @@ const Sn = ({ token: s, pusherKey: i, signal: e, onProgress: t }) => new Promise
1568
1568
  a(), n(new N(c.msg, c.error_code));
1569
1569
  }
1570
1570
  });
1571
- }), xn = (s, { publicKey: i, fileName: e, baseURL: t, baseCDN: r, checkForUrlDuplicates: n, saveUrlForRecurrentUploads: o, secureSignature: l, secureExpire: a, store: c, signal: h, onProgress: d, source: f, integration: m, userAgent: p, retryThrottledRequestMaxTimes: g, pusherKey: w = A.pusherKey, metadata: E }) => Promise.resolve(Tn(w)).then(() => hn(s, {
1571
+ }), Sn = (s, { publicKey: i, fileName: e, baseURL: t, baseCDN: r, checkForUrlDuplicates: n, saveUrlForRecurrentUploads: o, secureSignature: l, secureExpire: a, store: c, signal: h, onProgress: d, source: f, integration: m, userAgent: p, retryThrottledRequestMaxTimes: g, pusherKey: w = A.pusherKey, metadata: E }) => Promise.resolve(An(w)).then(() => cn(s, {
1572
1572
  publicKey: i,
1573
1573
  fileName: e,
1574
1574
  baseURL: t,
@@ -1584,10 +1584,10 @@ const Sn = ({ token: s, pusherKey: i, signal: e, onProgress: t }) => new Promise
1584
1584
  retryThrottledRequestMaxTimes: g,
1585
1585
  metadata: E
1586
1586
  })).catch((b) => {
1587
- const y = Bt(w);
1587
+ const y = Vt(w);
1588
1588
  return y == null || y.disconnect(), Promise.reject(b);
1589
- }).then((b) => b.type === kt.FileInfo ? b : yn([
1590
- ({ signal: y }) => $n({
1589
+ }).then((b) => b.type === Ot.FileInfo ? b : vn([
1590
+ ({ signal: y }) => Tn({
1591
1591
  token: b.token,
1592
1592
  publicKey: i,
1593
1593
  baseURL: t,
@@ -1597,7 +1597,7 @@ const Sn = ({ token: s, pusherKey: i, signal: e, onProgress: t }) => new Promise
1597
1597
  onProgress: d,
1598
1598
  signal: y
1599
1599
  }),
1600
- ({ signal: y }) => Sn({
1600
+ ({ signal: y }) => $n({
1601
1601
  token: b.token,
1602
1602
  pusherKey: w,
1603
1603
  signal: y,
@@ -1607,7 +1607,7 @@ const Sn = ({ token: s, pusherKey: i, signal: e, onProgress: t }) => new Promise
1607
1607
  if (b instanceof N)
1608
1608
  throw b;
1609
1609
  return b;
1610
- }).then((b) => Vt(b.uuid, {
1610
+ }).then((b) => zt(b.uuid, {
1611
1611
  publicKey: i,
1612
1612
  baseURL: t,
1613
1613
  integration: m,
@@ -1615,24 +1615,24 @@ const Sn = ({ token: s, pusherKey: i, signal: e, onProgress: t }) => new Promise
1615
1615
  retryThrottledRequestMaxTimes: g,
1616
1616
  onProgress: d,
1617
1617
  signal: h
1618
- })).then((b) => new Me(b, { baseCDN: r })), Et = /* @__PURE__ */ new WeakMap(), In = async (s) => {
1619
- if (Et.has(s))
1620
- return Et.get(s);
1618
+ })).then((b) => new Me(b, { baseCDN: r })), wt = /* @__PURE__ */ new WeakMap(), xn = async (s) => {
1619
+ if (wt.has(s))
1620
+ return wt.get(s);
1621
1621
  const i = await fetch(s.uri).then((e) => e.blob());
1622
- return Et.set(s, i), i;
1623
- }, as = async (s) => {
1622
+ return wt.set(s, i), i;
1623
+ }, ls = async (s) => {
1624
1624
  if (dt(s) || ut(s))
1625
1625
  return s.size;
1626
1626
  if (ft(s))
1627
- return (await In(s)).size;
1627
+ return (await xn(s)).size;
1628
1628
  throw new Error("Unknown file type. Cannot determine file size.");
1629
- }, On = (s, i = A.multipartMinFileSize) => s >= i, cs = (s) => {
1629
+ }, In = (s, i = A.multipartMinFileSize) => s >= i, as = (s) => {
1630
1630
  const i = "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}", e = new RegExp(i);
1631
1631
  return !Re(s) && e.test(s);
1632
- }, jt = (s) => {
1632
+ }, Bt = (s) => {
1633
1633
  const i = "^(?:\\w+:)?\\/\\/([^\\s\\.]+\\.\\S{2}|localhost[\\:?\\d]*)\\S*$", e = new RegExp(i);
1634
1634
  return !Re(s) && e.test(s);
1635
- }, kn = (s, i) => new Promise((e, t) => {
1635
+ }, On = (s, i) => new Promise((e, t) => {
1636
1636
  const r = [];
1637
1637
  let n = !1, o = i.length;
1638
1638
  const l = [...i], a = () => {
@@ -1645,10 +1645,10 @@ const Sn = ({ token: s, pusherKey: i, signal: e, onProgress: t }) => new Promise
1645
1645
  };
1646
1646
  for (let c = 0; c < s; c++)
1647
1647
  a();
1648
- }), Ln = (s, i, e, t) => {
1648
+ }), kn = (s, i, e, t) => {
1649
1649
  const r = t * i, n = Math.min(r + t, e);
1650
1650
  return s.slice(r, n);
1651
- }, Pn = async (s, i, e) => (t) => Ln(s, t, i, e), Un = (s, i, { publicKey: e, contentType: t, onProgress: r, signal: n, integration: o, retryThrottledRequestMaxTimes: l, retryNetworkErrorMaxTimes: a }) => mn(s, i, {
1651
+ }, Ln = async (s, i, e) => (t) => kn(s, t, i, e), Pn = (s, i, { publicKey: e, contentType: t, onProgress: r, signal: n, integration: o, retryThrottledRequestMaxTimes: l, retryNetworkErrorMaxTimes: a }) => pn(s, i, {
1652
1652
  publicKey: e,
1653
1653
  contentType: t,
1654
1654
  onProgress: r,
@@ -1656,14 +1656,14 @@ const Sn = ({ token: s, pusherKey: i, signal: e, onProgress: t }) => new Promise
1656
1656
  integration: o,
1657
1657
  retryThrottledRequestMaxTimes: l,
1658
1658
  retryNetworkErrorMaxTimes: a
1659
- }), Rn = async (s, { publicKey: i, fileName: e, fileSize: t, baseURL: r, secureSignature: n, secureExpire: o, store: l, signal: a, onProgress: c, source: h, integration: d, userAgent: f, retryThrottledRequestMaxTimes: m, retryNetworkErrorMaxTimes: p, contentType: g, multipartChunkSize: w = A.multipartChunkSize, maxConcurrentRequests: E = A.maxConcurrentRequests, baseCDN: b, metadata: y }) => {
1660
- const U = t ?? await as(s);
1659
+ }), Un = async (s, { publicKey: i, fileName: e, fileSize: t, baseURL: r, secureSignature: n, secureExpire: o, store: l, signal: a, onProgress: c, source: h, integration: d, userAgent: f, retryThrottledRequestMaxTimes: m, retryNetworkErrorMaxTimes: p, contentType: g, multipartChunkSize: w = A.multipartChunkSize, maxConcurrentRequests: E = A.maxConcurrentRequests, baseCDN: b, metadata: y }) => {
1660
+ const U = t ?? await ls(s);
1661
1661
  let ee;
1662
1662
  const _e = (O, R) => {
1663
1663
  if (!c)
1664
1664
  return;
1665
1665
  ee || (ee = Array(O).fill(0));
1666
- const W = (X) => X.reduce((te, Ct) => te + Ct, 0);
1666
+ const W = (X) => X.reduce((te, yt) => te + yt, 0);
1667
1667
  return (X) => {
1668
1668
  X.isComputable && (ee[R] = X.value, c({
1669
1669
  isComputable: !0,
@@ -1671,10 +1671,10 @@ const Sn = ({ token: s, pusherKey: i, signal: e, onProgress: t }) => new Promise
1671
1671
  }));
1672
1672
  };
1673
1673
  };
1674
- return g || (g = ns(s)), pn(U, {
1674
+ return g || (g = rs(s)), fn(U, {
1675
1675
  publicKey: i,
1676
1676
  contentType: g,
1677
- fileName: e || os(s),
1677
+ fileName: e || ns(s),
1678
1678
  baseURL: r,
1679
1679
  secureSignature: n,
1680
1680
  secureExpire: o,
@@ -1687,10 +1687,10 @@ const Sn = ({ token: s, pusherKey: i, signal: e, onProgress: t }) => new Promise
1687
1687
  retryNetworkErrorMaxTimes: p,
1688
1688
  metadata: y
1689
1689
  }).then(async ({ uuid: O, parts: R }) => {
1690
- const W = await Pn(s, U, w);
1690
+ const W = await Ln(s, U, w);
1691
1691
  return Promise.all([
1692
1692
  O,
1693
- kn(E, R.map((X, te) => () => Un(W(te), X, {
1693
+ On(E, R.map((X, te) => () => Pn(W(te), X, {
1694
1694
  publicKey: i,
1695
1695
  contentType: g,
1696
1696
  onProgress: _e(R.length, te),
@@ -1700,7 +1700,7 @@ const Sn = ({ token: s, pusherKey: i, signal: e, onProgress: t }) => new Promise
1700
1700
  retryNetworkErrorMaxTimes: p
1701
1701
  })))
1702
1702
  ]);
1703
- }).then(([O]) => gn(O, {
1703
+ }).then(([O]) => mn(O, {
1704
1704
  publicKey: i,
1705
1705
  baseURL: r,
1706
1706
  source: h,
@@ -1708,7 +1708,7 @@ const Sn = ({ token: s, pusherKey: i, signal: e, onProgress: t }) => new Promise
1708
1708
  userAgent: f,
1709
1709
  retryThrottledRequestMaxTimes: m,
1710
1710
  retryNetworkErrorMaxTimes: p
1711
- })).then((O) => O.isReady ? O : Vt(O.uuid, {
1711
+ })).then((O) => O.isReady ? O : zt(O.uuid, {
1712
1712
  publicKey: i,
1713
1713
  baseURL: r,
1714
1714
  source: h,
@@ -1720,10 +1720,10 @@ const Sn = ({ token: s, pusherKey: i, signal: e, onProgress: t }) => new Promise
1720
1720
  signal: a
1721
1721
  })).then((O) => new Me(O, { baseCDN: b }));
1722
1722
  };
1723
- async function hs(s, { publicKey: i, fileName: e, baseURL: t = A.baseURL, secureSignature: r, secureExpire: n, store: o, signal: l, onProgress: a, source: c, integration: h, userAgent: d, retryThrottledRequestMaxTimes: f, retryNetworkErrorMaxTimes: m, contentType: p, multipartMinFileSize: g, multipartChunkSize: w, maxConcurrentRequests: E, baseCDN: b = A.baseCDN, checkForUrlDuplicates: y, saveUrlForRecurrentUploads: U, pusherKey: ee, metadata: _e }) {
1723
+ async function cs(s, { publicKey: i, fileName: e, baseURL: t = A.baseURL, secureSignature: r, secureExpire: n, store: o, signal: l, onProgress: a, source: c, integration: h, userAgent: d, retryThrottledRequestMaxTimes: f, retryNetworkErrorMaxTimes: m, contentType: p, multipartMinFileSize: g, multipartChunkSize: w, maxConcurrentRequests: E, baseCDN: b = A.baseCDN, checkForUrlDuplicates: y, saveUrlForRecurrentUploads: U, pusherKey: ee, metadata: _e }) {
1724
1724
  if (Re(s)) {
1725
- const O = await as(s);
1726
- return On(O, g) ? Rn(s, {
1725
+ const O = await ls(s);
1726
+ return In(O, g) ? Un(s, {
1727
1727
  publicKey: i,
1728
1728
  contentType: p,
1729
1729
  multipartChunkSize: w,
@@ -1743,7 +1743,7 @@ async function hs(s, { publicKey: i, fileName: e, baseURL: t = A.baseURL, secure
1743
1743
  retryNetworkErrorMaxTimes: m,
1744
1744
  baseCDN: b,
1745
1745
  metadata: _e
1746
- }) : _n(s, {
1746
+ }) : bn(s, {
1747
1747
  publicKey: i,
1748
1748
  fileName: e,
1749
1749
  contentType: p,
@@ -1762,8 +1762,8 @@ async function hs(s, { publicKey: i, fileName: e, baseURL: t = A.baseURL, secure
1762
1762
  metadata: _e
1763
1763
  });
1764
1764
  }
1765
- if (jt(s))
1766
- return xn(s, {
1765
+ if (Bt(s))
1766
+ return Sn(s, {
1767
1767
  publicKey: i,
1768
1768
  fileName: e,
1769
1769
  baseURL: t,
@@ -1783,8 +1783,8 @@ async function hs(s, { publicKey: i, fileName: e, baseURL: t = A.baseURL, secure
1783
1783
  pusherKey: ee,
1784
1784
  metadata: _e
1785
1785
  });
1786
- if (cs(s))
1787
- return vn(s, {
1786
+ if (as(s))
1787
+ return _n(s, {
1788
1788
  publicKey: i,
1789
1789
  fileName: e,
1790
1790
  baseURL: t,
@@ -1799,7 +1799,7 @@ async function hs(s, { publicKey: i, fileName: e, baseURL: t = A.baseURL, secure
1799
1799
  });
1800
1800
  throw new TypeError(`File uploading from "${s}" is not supported`);
1801
1801
  }
1802
- class Mn {
1802
+ class Rn {
1803
1803
  constructor(i, { baseCDN: e = A.baseCDN } = {}) {
1804
1804
  u(this, "uuid");
1805
1805
  u(this, "filesCount");
@@ -1815,31 +1815,31 @@ class Mn {
1815
1815
  this.totalSize = Object.values(t).reduce((r, n) => r + n.size, 0), this.isStored = !!i.datetimeStored, this.isImage = !!Object.values(t).filter((r) => r.isImage).length, this.cdnUrl = i.cdnUrl, this.files = t.map((r) => new Me(r, { baseCDN: e })), this.createdAt = i.datetimeCreated, this.storedAt = i.datetimeStored;
1816
1816
  }
1817
1817
  }
1818
- const Fn = (s) => {
1818
+ const Mn = (s) => {
1819
1819
  for (const i of s)
1820
1820
  if (!Re(i))
1821
1821
  return !1;
1822
1822
  return !0;
1823
- }, Dn = (s) => {
1823
+ }, Fn = (s) => {
1824
1824
  for (const i of s)
1825
- if (!cs(i))
1825
+ if (!as(i))
1826
1826
  return !1;
1827
1827
  return !0;
1828
- }, Nn = (s) => {
1828
+ }, Dn = (s) => {
1829
1829
  for (const i of s)
1830
- if (!jt(i))
1830
+ if (!Bt(i))
1831
1831
  return !1;
1832
1832
  return !0;
1833
1833
  };
1834
- function zn(s, { publicKey: i, fileName: e, baseURL: t = A.baseURL, secureSignature: r, secureExpire: n, store: o, signal: l, onProgress: a, source: c, integration: h, userAgent: d, retryThrottledRequestMaxTimes: f, retryNetworkErrorMaxTimes: m, contentType: p, multipartChunkSize: g = A.multipartChunkSize, baseCDN: w = A.baseCDN, checkForUrlDuplicates: E, saveUrlForRecurrentUploads: b, jsonpCallback: y }) {
1835
- if (!Fn(s) && !Nn(s) && !Dn(s))
1834
+ function Nn(s, { publicKey: i, fileName: e, baseURL: t = A.baseURL, secureSignature: r, secureExpire: n, store: o, signal: l, onProgress: a, source: c, integration: h, userAgent: d, retryThrottledRequestMaxTimes: f, retryNetworkErrorMaxTimes: m, contentType: p, multipartChunkSize: g = A.multipartChunkSize, baseCDN: w = A.baseCDN, checkForUrlDuplicates: E, saveUrlForRecurrentUploads: b, jsonpCallback: y }) {
1835
+ if (!Mn(s) && !Dn(s) && !Fn(s))
1836
1836
  throw new TypeError(`Group uploading from "${s}" is not supported`);
1837
1837
  let U, ee = !0;
1838
1838
  const _e = s.length, O = (R, W) => {
1839
1839
  if (!a)
1840
1840
  return;
1841
1841
  U || (U = Array(R).fill(0));
1842
- const X = (te) => te.reduce((Ct, hr) => Ct + hr) / R;
1842
+ const X = (te) => te.reduce((yt, cr) => yt + cr) / R;
1843
1843
  return (te) => {
1844
1844
  if (!te.isComputable || !ee) {
1845
1845
  ee = !1, a({ isComputable: !1 });
@@ -1848,7 +1848,7 @@ function zn(s, { publicKey: i, fileName: e, baseURL: t = A.baseURL, secureSignat
1848
1848
  U[W] = te.value, a({ isComputable: !0, value: X(U) });
1849
1849
  };
1850
1850
  };
1851
- return Promise.all(s.map((R, W) => Re(R) || jt(R) ? hs(R, {
1851
+ return Promise.all(s.map((R, W) => Re(R) || Bt(R) ? cs(R, {
1852
1852
  publicKey: i,
1853
1853
  fileName: e,
1854
1854
  baseURL: t,
@@ -1867,7 +1867,7 @@ function zn(s, { publicKey: i, fileName: e, baseURL: t = A.baseURL, secureSignat
1867
1867
  baseCDN: w,
1868
1868
  checkForUrlDuplicates: E,
1869
1869
  saveUrlForRecurrentUploads: b
1870
- }).then((X) => X.uuid) : R)).then((R) => fn(R, {
1870
+ }).then((X) => X.uuid) : R)).then((R) => dn(R, {
1871
1871
  publicKey: i,
1872
1872
  baseURL: t,
1873
1873
  jsonpCallback: y,
@@ -1879,9 +1879,9 @@ function zn(s, { publicKey: i, fileName: e, baseURL: t = A.baseURL, secureSignat
1879
1879
  userAgent: d,
1880
1880
  retryThrottledRequestMaxTimes: f,
1881
1881
  retryNetworkErrorMaxTimes: m
1882
- }).then((W) => new Mn(W, { baseCDN: w })).then((W) => (a && a({ isComputable: !0, value: 1 }), W)));
1882
+ }).then((W) => new Rn(W, { baseCDN: w })).then((W) => (a && a({ isComputable: !0, value: 1 }), W)));
1883
1883
  }
1884
- class Vn {
1884
+ class zn {
1885
1885
  constructor(i) {
1886
1886
  u(this, "_concurrency", 1);
1887
1887
  u(this, "_pending", []);
@@ -1922,8 +1922,8 @@ class Vn {
1922
1922
  return this._concurrency;
1923
1923
  }
1924
1924
  }
1925
- const us = () => ({}), ds = (s) => ({
1926
- ...us(),
1925
+ const hs = () => ({}), us = (s) => ({
1926
+ ...hs(),
1927
1927
  "*currentActivity": "",
1928
1928
  "*currentActivityParams": {},
1929
1929
  "*history": [],
@@ -1934,13 +1934,13 @@ const us = () => ({}), ds = (s) => ({
1934
1934
  "*currentActivity": ""
1935
1935
  });
1936
1936
  }
1937
- }), fs = (s) => ({
1938
- ...ds(s),
1937
+ }), ds = (s) => ({
1938
+ ...us(s),
1939
1939
  "*commonProgress": 0,
1940
1940
  "*uploadList": [],
1941
1941
  "*focusedEntry": null,
1942
1942
  "*uploadMetadata": null,
1943
- "*uploadQueue": new Vn(1),
1943
+ "*uploadQueue": new zn(1),
1944
1944
  "*uploadCollection": null,
1945
1945
  /** @type {ReturnType<import('../utils/buildOutputError.js').buildCollectionFileError>[]} */
1946
1946
  "*collectionErrors": [],
@@ -1950,7 +1950,7 @@ const us = () => ({}), ds = (s) => ({
1950
1950
  "*groupInfo": null,
1951
1951
  /** @type {Set<string>} */
1952
1952
  "*uploadTrigger": /* @__PURE__ */ new Set()
1953
- }), Ht = {
1953
+ }), jt = {
1954
1954
  "locale-id": "en",
1955
1955
  "social-source-lang": "en",
1956
1956
  "upload-file": "Upload file",
@@ -2051,28 +2051,28 @@ const us = () => ({}), ds = (s) => ({
2051
2051
  "images-only-accepted": "Only image files are accepted.",
2052
2052
  "file-type-not-allowed": "Uploading of these file types is not allowed.",
2053
2053
  "some-files-were-not-uploaded": "Some files were not uploaded."
2054
- }, nt = /* @__PURE__ */ new Map(), Lt = /* @__PURE__ */ new Map(), ps = (s, i) => {
2055
- nt.has(s) && console.log(`Locale ${s} is already defined. Overwriting...`), nt.set(s, { ...Ht, ...i });
2056
- }, Bn = (s, i) => {
2057
- Lt.set(s, i);
2058
- }, ms = (s, i) => {
2059
- typeof i == "function" ? Bn(s, i) : ps(s, i);
2060
- }, jn = async (s) => {
2054
+ }, nt = /* @__PURE__ */ new Map(), kt = /* @__PURE__ */ new Map(), fs = (s, i) => {
2055
+ nt.has(s) && console.log(`Locale ${s} is already defined. Overwriting...`), nt.set(s, { ...jt, ...i });
2056
+ }, Vn = (s, i) => {
2057
+ kt.set(s, i);
2058
+ }, ps = (s, i) => {
2059
+ typeof i == "function" ? Vn(s, i) : fs(s, i);
2060
+ }, Bn = async (s) => {
2061
2061
  if (!nt.has(s)) {
2062
- if (!Lt.has(s))
2062
+ if (!kt.has(s))
2063
2063
  throw new Error(`Locale ${s} is not defined`);
2064
2064
  const e = await /** @type {LocaleDefinitionResolver} */
2065
- Lt.get(s)();
2066
- ps(s, e);
2065
+ kt.get(s)();
2066
+ fs(s, e);
2067
2067
  }
2068
2068
  return (
2069
2069
  /** @type {LocaleDefinition} */
2070
2070
  nt.get(s)
2071
2071
  );
2072
2072
  };
2073
- ms("en", Ht);
2074
- const Ce = (s) => `*l10n/${s}`, Hn = "en";
2075
- class Wn {
2073
+ ps("en", jt);
2074
+ const Ce = (s) => `*l10n/${s}`, jn = "en";
2075
+ class Hn {
2076
2076
  /** @param {import('./Block.js').Block} blockInstance */
2077
2077
  constructor(i) {
2078
2078
  /**
@@ -2093,7 +2093,7 @@ class Wn {
2093
2093
  */
2094
2094
  u(this, "_boundBlocks", /* @__PURE__ */ new Map());
2095
2095
  this._blockInstance = i;
2096
- for (let [e, t] of Object.entries(Ht))
2096
+ for (let [e, t] of Object.entries(jt))
2097
2097
  this._blockInstance.add(Ce(e), t, !1);
2098
2098
  setTimeout(() => {
2099
2099
  i.subConfigValue("localeName", async (e) => {
@@ -2101,8 +2101,8 @@ class Wn {
2101
2101
  if (!this._blockInstance || !e)
2102
2102
  return;
2103
2103
  this._localeName = e;
2104
- const t = await jn(e);
2105
- if (e !== Hn && this._localeName !== e)
2104
+ const t = await Bn(e);
2105
+ if (e !== jn && this._localeName !== e)
2106
2106
  return;
2107
2107
  const r = (n = this._blockInstance.cfg.localeDefinitionOverride) == null ? void 0 : n[e];
2108
2108
  for (const [o, l] of Object.entries(t)) {
@@ -2161,7 +2161,7 @@ class Wn {
2161
2161
  this._callbacks.clear();
2162
2162
  }
2163
2163
  }
2164
- function Gn(s, i) {
2164
+ function Wn(s, i) {
2165
2165
  [...s.querySelectorAll("[l10n]")].forEach((e) => {
2166
2166
  let t = e.getAttribute("l10n");
2167
2167
  if (!t)
@@ -2203,19 +2203,19 @@ function Gn(s, i) {
2203
2203
  }), e.removeAttribute("l10n");
2204
2204
  });
2205
2205
  }
2206
- const B = (s) => `*cfg/${s}`, Wt = "blocks", mt = "0.39.1", gs = (s) => {
2206
+ const B = (s) => `*cfg/${s}`, Ht = "blocks", Wt = "0.39.1", ms = (s) => {
2207
2207
  if (typeof s != "string" || !s)
2208
2208
  return "";
2209
2209
  let i = s.trim();
2210
2210
  return i.startsWith("-/") ? i = i.slice(2) : i.startsWith("/") && (i = i.slice(1)), i.endsWith("/") && (i = i.slice(0, i.length - 1)), i;
2211
- }, Gt = (...s) => s.filter((i) => typeof i == "string" && i).map((i) => gs(
2211
+ }, qt = (...s) => s.filter((i) => typeof i == "string" && i).map((i) => ms(
2212
2212
  /** @type {String} */
2213
2213
  i
2214
2214
  )).join("/-/"), pe = (...s) => {
2215
- let i = Gt(...s);
2215
+ let i = qt(...s);
2216
2216
  return i ? `-/${i}/` : "";
2217
2217
  };
2218
- function bs(s) {
2218
+ function gs(s) {
2219
2219
  let i = new URL(s), e = i.pathname + i.search + i.hash, t = e.lastIndexOf("http"), r = e.lastIndexOf("/"), n = "";
2220
2220
  return t >= 0 ? n = e.slice(t) : r >= 0 && (n = e.slice(r + 1)), n;
2221
2221
  }
@@ -2224,18 +2224,18 @@ function qn(s) {
2224
2224
  const t = e.indexOf("/"), r = e.indexOf("/", t + 1);
2225
2225
  return e.substring(t + 1, r);
2226
2226
  }
2227
- function Xn(s) {
2228
- let i = _s(s), e = new URL(i), t = e.pathname.indexOf("/-/");
2229
- return t === -1 ? [] : e.pathname.substring(t).split("/-/").filter(Boolean).map((n) => gs(n));
2227
+ function Gn(s) {
2228
+ let i = bs(s), e = new URL(i), t = e.pathname.indexOf("/-/");
2229
+ return t === -1 ? [] : e.pathname.substring(t).split("/-/").filter(Boolean).map((n) => ms(n));
2230
2230
  }
2231
- function _s(s) {
2232
- let i = new URL(s), e = bs(s), t = vs(e) ? ys(e).pathname : e;
2231
+ function bs(s) {
2232
+ let i = new URL(s), e = gs(s), t = _s(e) ? vs(e).pathname : e;
2233
2233
  return i.pathname = i.pathname.replace(t, ""), i.search = "", i.hash = "", i.toString();
2234
2234
  }
2235
- function vs(s) {
2235
+ function _s(s) {
2236
2236
  return s.startsWith("http");
2237
2237
  }
2238
- function ys(s) {
2238
+ function vs(s) {
2239
2239
  let i = new URL(s);
2240
2240
  return {
2241
2241
  pathname: i.origin + i.pathname || "",
@@ -2244,9 +2244,9 @@ function ys(s) {
2244
2244
  };
2245
2245
  }
2246
2246
  const j = (s, i, e) => {
2247
- let t = new URL(_s(s));
2248
- if (e = e || bs(s), t.pathname.startsWith("//") && (t.pathname = t.pathname.replace("//", "/")), vs(e)) {
2249
- let r = ys(e);
2247
+ let t = new URL(bs(s));
2248
+ if (e = e || gs(s), t.pathname.startsWith("//") && (t.pathname = t.pathname.replace("//", "/")), _s(e)) {
2249
+ let r = vs(e);
2250
2250
  t.pathname = t.pathname + (i || "") + (r.pathname || ""), t.search = r.search, t.hash = r.hash;
2251
2251
  } else
2252
2252
  t.pathname = t.pathname + (i || "") + (e || "");
@@ -2268,7 +2268,7 @@ const j = (s, i, e) => {
2268
2268
  mirror: !1,
2269
2269
  flip: !1,
2270
2270
  crop: void 0
2271
- }), Cs = (
2271
+ }), ys = (
2272
2272
  /** @type {const} */
2273
2273
  [
2274
2274
  "enhance",
@@ -2286,7 +2286,7 @@ const j = (s, i, e) => {
2286
2286
  "crop"
2287
2287
  ]
2288
2288
  );
2289
- function Yn(s, i) {
2289
+ function Xn(s, i) {
2290
2290
  if (typeof i == "number") {
2291
2291
  const e = i;
2292
2292
  return V[s] !== e ? `${s}/${e}` : "";
@@ -2311,20 +2311,20 @@ function Yn(s, i) {
2311
2311
  }
2312
2312
  return "";
2313
2313
  }
2314
- function gt(s) {
2315
- return Gt(
2316
- ...Cs.filter(
2314
+ function mt(s) {
2315
+ return qt(
2316
+ ...ys.filter(
2317
2317
  (i) => typeof s[i] < "u" && s[i] !== null
2318
2318
  ).map((i) => {
2319
2319
  let e = s[i];
2320
- return Yn(i, e);
2320
+ return Xn(i, e);
2321
2321
  }).filter((i) => !!i)
2322
2322
  );
2323
2323
  }
2324
- const ws = Gt("format/auto", "progressive/yes"), se = ([s]) => typeof s < "u" ? Number(s) : void 0, wi = () => !0, Kn = ([s, i]) => ({
2324
+ const Cs = qt("format/auto", "progressive/yes"), se = ([s]) => typeof s < "u" ? Number(s) : void 0, Ci = () => !0, Yn = ([s, i]) => ({
2325
2325
  name: s,
2326
2326
  amount: typeof i < "u" ? Number(i) : 100
2327
- }), Jn = ([s, i]) => {
2327
+ }), Kn = ([s, i]) => {
2328
2328
  if (!/\d+x\d+/.test(s) || !/\d+,\d+/.test(i))
2329
2329
  throw new Error("Crop by aspect ratio, percentage or alignment shortcuts is not supported.");
2330
2330
  return (
@@ -2334,7 +2334,7 @@ const ws = Gt("format/auto", "progressive/yes"), se = ([s]) => typeof s < "u" ?
2334
2334
  coords: le(i).map(Number)
2335
2335
  }
2336
2336
  );
2337
- }, Zn = Object.freeze({
2337
+ }, Jn = Object.freeze({
2338
2338
  enhance: se,
2339
2339
  brightness: se,
2340
2340
  exposure: se,
@@ -2343,22 +2343,22 @@ const ws = Gt("format/auto", "progressive/yes"), se = ([s]) => typeof s < "u" ?
2343
2343
  saturation: se,
2344
2344
  vibrance: se,
2345
2345
  warmth: se,
2346
- filter: Kn,
2347
- mirror: wi,
2348
- flip: wi,
2346
+ filter: Yn,
2347
+ mirror: Ci,
2348
+ flip: Ci,
2349
2349
  rotate: se,
2350
- crop: Jn
2350
+ crop: Kn
2351
2351
  });
2352
- function Qn(s) {
2352
+ function Zn(s) {
2353
2353
  const i = {};
2354
2354
  for (const e of s) {
2355
2355
  const [t, ...r] = e.split("/");
2356
- if (!Cs.includes(t))
2356
+ if (!ys.includes(t))
2357
2357
  continue;
2358
2358
  const n = (
2359
2359
  /** @type {(typeof SUPPORTED_OPERATIONS_ORDERED)[number]} */
2360
2360
  t
2361
- ), o = Zn[n];
2361
+ ), o = Jn[n];
2362
2362
  try {
2363
2363
  const l = o(r);
2364
2364
  i[n] = l;
@@ -2382,7 +2382,7 @@ const P = Object.freeze({
2382
2382
  CROP: "crop",
2383
2383
  TUNING: "tuning",
2384
2384
  FILTERS: "filters"
2385
- }), Q = [P.CROP, P.TUNING, P.FILTERS], eo = [
2385
+ }), Q = [P.CROP, P.TUNING, P.FILTERS], Qn = [
2386
2386
  "brightness",
2387
2387
  "exposure",
2388
2388
  "gamma",
@@ -2391,7 +2391,7 @@ const P = Object.freeze({
2391
2391
  "vibrance",
2392
2392
  "warmth",
2393
2393
  "enhance"
2394
- ], to = [
2394
+ ], eo = [
2395
2395
  "adaris",
2396
2396
  "briaril",
2397
2397
  "calarel",
@@ -2432,7 +2432,7 @@ const P = Object.freeze({
2432
2432
  "yllara",
2433
2433
  "zatvel",
2434
2434
  "zevcen"
2435
- ], io = ["rotate", "mirror", "flip"], Pe = Object.freeze({
2435
+ ], to = ["rotate", "mirror", "flip"], Pe = Object.freeze({
2436
2436
  brightness: {
2437
2437
  zero: V.brightness,
2438
2438
  range: [-100, 100],
@@ -2478,7 +2478,7 @@ const P = Object.freeze({
2478
2478
  range: [0, 100],
2479
2479
  keypointsNumber: 1
2480
2480
  }
2481
- }), so = (s) => s ? s.split(",").map((i) => i.trim()) : [], qt = (s) => s ? s.join(",") : "", ro = "https://ucarecdn.com", no = "https://upload.uploadcare.com", oo = "https://social.uploadcare.com", ue = {
2481
+ }), io = (s) => s ? s.split(",").map((i) => i.trim()) : [], Gt = (s) => s ? s.join(",") : "", so = "https://ucarecdn.com", ro = "https://upload.uploadcare.com", no = "https://social.uploadcare.com", ue = {
2482
2482
  pubkey: "",
2483
2483
  multiple: !0,
2484
2484
  multipleMin: 0,
@@ -2491,7 +2491,7 @@ const P = Object.freeze({
2491
2491
  cameraMirror: !1,
2492
2492
  cameraCapture: "",
2493
2493
  sourceList: "local, url, camera, dropbox, gdrive",
2494
- cloudImageEditorTabs: qt(Q),
2494
+ cloudImageEditorTabs: Gt(Q),
2495
2495
  maxLocalFileSizeBytes: 0,
2496
2496
  thumbSize: 76,
2497
2497
  showEmptyList: !1,
@@ -2504,9 +2504,9 @@ const P = Object.freeze({
2504
2504
  modalBackdropStrokes: !1,
2505
2505
  sourceListWrap: !0,
2506
2506
  remoteTabSessionKey: "",
2507
- cdnCname: ro,
2508
- baseUrl: no,
2509
- socialBaseUrl: oo,
2507
+ cdnCname: so,
2508
+ baseUrl: ro,
2509
+ socialBaseUrl: no,
2510
2510
  secureSignature: "",
2511
2511
  secureExpire: "",
2512
2512
  secureDeliveryProxy: "",
@@ -2524,7 +2524,7 @@ const P = Object.freeze({
2524
2524
  metadata: null,
2525
2525
  localeName: "en",
2526
2526
  localeDefinitionOverride: null
2527
- }, At = "lr-";
2527
+ }, Et = "lr-";
2528
2528
  class $ extends at {
2529
2529
  constructor() {
2530
2530
  super();
@@ -2532,8 +2532,8 @@ class $ extends at {
2532
2532
  u(this, "allowCustomTemplate", !0);
2533
2533
  /** @type {import('./ActivityBlock.js').ActivityType} */
2534
2534
  u(this, "activityType", null);
2535
- u(this, "init$", us());
2536
- this.l10nProcessorSubs = /* @__PURE__ */ new Map(), this.addTemplateProcessor(Gn);
2535
+ u(this, "init$", hs());
2536
+ this.l10nProcessorSubs = /* @__PURE__ */ new Map(), this.addTemplateProcessor(Wn);
2537
2537
  }
2538
2538
  /**
2539
2539
  * @param {String} str
@@ -2543,13 +2543,13 @@ class $ extends at {
2543
2543
  l10n(e, t = {}) {
2544
2544
  if (!e)
2545
2545
  return "";
2546
- let r = this.$[Ce(e)] || e, n = Nr(r);
2546
+ let r = this.$[Ce(e)] || e, n = Dr(r);
2547
2547
  for (let l of n)
2548
2548
  t[l.variable] = this.pluralize(
2549
2549
  l.pluralKey,
2550
2550
  Number(t[l.countVariable])
2551
2551
  );
2552
- return Ot(r, t);
2552
+ return It(r, t);
2553
2553
  }
2554
2554
  /**
2555
2555
  * @param {string} key
@@ -2557,7 +2557,7 @@ class $ extends at {
2557
2557
  * @returns {string}
2558
2558
  */
2559
2559
  pluralize(e, t) {
2560
- const r = this.l10n("locale-id") || "en", n = Zi(r, t);
2560
+ const r = this.l10n("locale-id") || "en", n = Ji(r, t);
2561
2561
  return this.l10n(`${e}__${n}`);
2562
2562
  }
2563
2563
  /**
@@ -2613,7 +2613,7 @@ class $ extends at {
2613
2613
  /** @type {typeof Block} */
2614
2614
  this.constructor.className
2615
2615
  );
2616
- e && this.classList.toggle(`${At}${e}`, !0), this.hasAttribute("retpl") && (this.constructor.template = null, this.processInnerHtml = !0), this.requireCtxName ? zr({
2616
+ e && this.classList.toggle(`${Et}${e}`, !0), this.hasAttribute("retpl") && (this.constructor.template = null, this.processInnerHtml = !0), this.requireCtxName ? Nr({
2617
2617
  element: this,
2618
2618
  attribute: "ctx-name",
2619
2619
  onSuccess: () => {
@@ -2628,8 +2628,8 @@ class $ extends at {
2628
2628
  super.disconnectedCallback(), rt.unregisterClient(this);
2629
2629
  }
2630
2630
  initCallback() {
2631
- this.has("*blocksRegistry") || this.add("*blocksRegistry", /* @__PURE__ */ new Set()), this.$["*blocksRegistry"].add(this), this.has("*eventEmitter") || this.add("*eventEmitter", new Mr(this.debugPrint.bind(this))), this.has("*localeManager") || this.add("*localeManager", new Wn(this)), this.sub(Ce("locale-id"), (t) => {
2632
- this.style.direction = Fr(t);
2631
+ this.has("*blocksRegistry") || this.add("*blocksRegistry", /* @__PURE__ */ new Set()), this.$["*blocksRegistry"].add(this), this.has("*eventEmitter") || this.add("*eventEmitter", new Rr(this.debugPrint.bind(this))), this.has("*localeManager") || this.add("*localeManager", new Hn(this)), this.sub(Ce("locale-id"), (t) => {
2632
+ this.style.direction = Mr(t);
2633
2633
  });
2634
2634
  }
2635
2635
  /** @returns {LocaleManager | null} */
@@ -2669,7 +2669,7 @@ class $ extends at {
2669
2669
  */
2670
2670
  proxyUrl(e) {
2671
2671
  let t = this.cfg.secureDeliveryProxy;
2672
- return t ? Ot(
2672
+ return t ? It(
2673
2673
  t,
2674
2674
  { previewUrl: e },
2675
2675
  { transform: (r) => window.encodeURIComponent(r) }
@@ -2730,29 +2730,29 @@ class $ extends at {
2730
2730
  super.reg();
2731
2731
  return;
2732
2732
  }
2733
- super.reg(e.startsWith(At) ? e : At + e);
2733
+ super.reg(e.startsWith(Et) ? e : Et + e);
2734
2734
  }
2735
2735
  }
2736
2736
  /** @type {string | null} */
2737
2737
  u($, "StateConsumerScope", null), u($, "className", "");
2738
- const Ei = "active", De = "___ACTIVITY_IS_ACTIVE___", re = class re extends $ {
2738
+ const wi = "active", De = "___ACTIVITY_IS_ACTIVE___", re = class re extends $ {
2739
2739
  constructor() {
2740
2740
  super(...arguments);
2741
2741
  u(this, "historyTracked", !1);
2742
- u(this, "init$", ds(this));
2742
+ u(this, "init$", us(this));
2743
2743
  u(this, "_debouncedHistoryFlush", H(this._historyFlush.bind(this), 10));
2744
2744
  }
2745
2745
  /** @private */
2746
2746
  _deactivate() {
2747
2747
  var t;
2748
2748
  let e = re._activityCallbacks.get(this);
2749
- this[De] = !1, this.removeAttribute(Ei), (t = e == null ? void 0 : e.deactivateCallback) == null || t.call(e);
2749
+ this[De] = !1, this.removeAttribute(wi), (t = e == null ? void 0 : e.deactivateCallback) == null || t.call(e);
2750
2750
  }
2751
2751
  /** @private */
2752
2752
  _activate() {
2753
2753
  var t;
2754
2754
  let e = re._activityCallbacks.get(this);
2755
- this.$["*historyBack"] = this.historyBack.bind(this), this[De] = !0, this.setAttribute(Ei, ""), (t = e == null ? void 0 : e.activateCallback) == null || t.call(e), this._debouncedHistoryFlush(), this.emit(x.ACTIVITY_CHANGE, {
2755
+ this.$["*historyBack"] = this.historyBack.bind(this), this[De] = !0, this.setAttribute(wi, ""), (t = e == null ? void 0 : e.activateCallback) == null || t.call(e), this._debouncedHistoryFlush(), this.emit(x.ACTIVITY_CHANGE, {
2756
2756
  activity: this.activityType
2757
2757
  });
2758
2758
  }
@@ -2854,21 +2854,21 @@ _.activities = Object.freeze({
2854
2854
  EXTERNAL: "external",
2855
2855
  DETAILS: "details"
2856
2856
  });
2857
- const lo = 20, Pt = 24, je = 34, Es = 3, J = Es / 2, ve = 1, Ke = 100 / 3, C = 1, Ai = 24, ao = 6;
2857
+ const oo = 20, Lt = 24, je = 34, ws = 3, J = ws / 2, ve = 1, Ke = 100 / 3, C = 1, Ei = 24, lo = 6;
2858
2858
  function Ie(s, i) {
2859
2859
  for (let e in i)
2860
2860
  s.setAttributeNS(null, e, i[e].toString());
2861
2861
  }
2862
- function G(s, i = {}) {
2862
+ function q(s, i = {}) {
2863
2863
  let e = document.createElementNS("http://www.w3.org/2000/svg", s);
2864
2864
  return Ie(e, i), e;
2865
2865
  }
2866
- function co(s, i, e) {
2866
+ function ao(s, i, e) {
2867
2867
  let { x: t, y: r, width: n, height: o } = s, l = i.includes("w") ? 0 : 1, a = i.includes("n") ? 0 : 1, c = [-1, 1][l], h = [-1, 1][a], d = [
2868
2868
  t + l * n + J * c,
2869
- r + a * o + J * h - Pt * e * h
2869
+ r + a * o + J * h - Lt * e * h
2870
2870
  ], f = [t + l * n + J * c, r + a * o + J * h], m = [
2871
- t + l * n - Pt * e * c + J * c,
2871
+ t + l * n - Lt * e * c + J * c,
2872
2872
  r + a * o + J * h
2873
2873
  ];
2874
2874
  return {
@@ -2876,7 +2876,7 @@ function co(s, i, e) {
2876
2876
  center: f
2877
2877
  };
2878
2878
  }
2879
- function ho(s, i, e) {
2879
+ function co(s, i, e) {
2880
2880
  let { x: t, y: r, width: n, height: o } = s, l = ["n", "s"].includes(i) ? 0.5 : { w: 0, e: 1 }[
2881
2881
  /** @type {Extract<import('./types.js').Direction, 'w' | 'e'>} */
2882
2882
  i
@@ -2888,10 +2888,10 @@ function ho(s, i, e) {
2888
2888
  let m = `M ${d[0]} ${d[1]} L ${f[0]} ${f[1]}`, p = [f[0] - (f[0] - d[0]) / 2, f[1] - (f[1] - d[1]) / 2];
2889
2889
  return { d: m, center: p };
2890
2890
  }
2891
- function uo(s) {
2891
+ function ho(s) {
2892
2892
  return s === "" ? "move" : ["e", "w"].includes(s) ? "ew-resize" : ["n", "s"].includes(s) ? "ns-resize" : ["nw", "se"].includes(s) ? "nwse-resize" : "nesw-resize";
2893
2893
  }
2894
- function fo({ rect: s, delta: [i, e], imageBox: t }) {
2894
+ function uo({ rect: s, delta: [i, e], imageBox: t }) {
2895
2895
  return ot(
2896
2896
  {
2897
2897
  ...s,
@@ -2909,86 +2909,86 @@ function ot(s, i) {
2909
2909
  y: t
2910
2910
  };
2911
2911
  }
2912
- function po({ rect: s, delta: i, aspectRatio: e, imageBox: t }) {
2912
+ function fo({ rect: s, delta: i, aspectRatio: e, imageBox: t }) {
2913
2913
  const [, r] = i;
2914
2914
  let { y: n, width: o, height: l } = s;
2915
2915
  n += r, l -= r, e && (o = l * e);
2916
2916
  let a = s.x + s.width / 2 - o / 2;
2917
2917
  return n <= t.y && (n = t.y, l = s.y + s.height - n, e && (o = l * e, a = s.x + s.width / 2 - o / 2)), a <= t.x && (a = t.x, n = s.y + s.height - l), a + o >= t.x + t.width && (a = Math.max(t.x, t.x + t.width - o), o = t.x + t.width - a, e && (l = o / e), n = s.y + s.height - l), l < C && (l = C, e && (o = l * e, a = s.x + s.width / 2 - o / 2), n = s.y + s.height - l), o < C && (o = C, e && (l = o / e, a = s.x + s.width / 2 - o / 2), n = s.y + s.height - l), { x: a, y: n, width: o, height: l };
2918
2918
  }
2919
- function mo({ rect: s, delta: i, aspectRatio: e, imageBox: t }) {
2919
+ function po({ rect: s, delta: i, aspectRatio: e, imageBox: t }) {
2920
2920
  const [r] = i;
2921
2921
  let { x: n, width: o, height: l } = s;
2922
2922
  n += r, o -= r, e && (l = o / e);
2923
2923
  let a = s.y + s.height / 2 - l / 2;
2924
2924
  return n <= t.x && (n = t.x, o = s.x + s.width - n, e && (l = o / e, a = s.y + s.height / 2 - l / 2)), a <= t.y && (a = t.y, n = s.x + s.width - o), a + l >= t.y + t.height && (a = Math.max(t.y, t.y + t.height - l), l = t.y + t.height - a, e && (o = l * e), n = s.x + s.width - o), l < C && (l = C, e && (o = l * e), a = s.y + s.height / 2 - l / 2, n = s.x + s.width - o), o < C && (o = C, e && (l = o / e), a = s.y + s.height / 2 - l / 2, n = s.x + s.width - o), { x: n, y: a, width: o, height: l };
2925
2925
  }
2926
- function go({ rect: s, delta: i, aspectRatio: e, imageBox: t }) {
2926
+ function mo({ rect: s, delta: i, aspectRatio: e, imageBox: t }) {
2927
2927
  const [, r] = i;
2928
2928
  let { y: n, width: o, height: l } = s;
2929
2929
  l += r, e && (o = l * e);
2930
2930
  let a = s.x + s.width / 2 - o / 2;
2931
2931
  return n + l >= t.y + t.height && (l = t.y + t.height - n, e && (o = l * e), a = s.x + s.width / 2 - o / 2), a <= t.x && (a = t.x, n = s.y), a + o >= t.x + t.width && (a = Math.max(t.x, t.x + t.width - o), o = t.x + t.width - a, e && (l = o / e), n = s.y), l < C && (l = C, e && (o = l * e), a = s.x + s.width / 2 - o / 2), o < C && (o = C, e && (l = o / e), a = s.x + s.width / 2 - o / 2), { x: a, y: n, width: o, height: l };
2932
2932
  }
2933
- function bo({ rect: s, delta: i, aspectRatio: e, imageBox: t }) {
2933
+ function go({ rect: s, delta: i, aspectRatio: e, imageBox: t }) {
2934
2934
  const [r] = i;
2935
2935
  let { x: n, width: o, height: l } = s;
2936
2936
  o += r, e && (l = o / e);
2937
2937
  let a = s.y + s.height / 2 - l / 2;
2938
2938
  return n + o >= t.x + t.width && (o = t.x + t.width - n, e && (l = o / e), a = s.y + s.height / 2 - l / 2), a <= t.y && (a = t.y, n = s.x), a + l >= t.y + t.height && (a = Math.max(t.y, t.y + t.height - l), l = t.y + t.height - a, e && (o = l * e), n = s.x), l < C && (l = C, e && (o = l * e), a = s.y + s.height / 2 - l / 2), o < C && (o = C, e && (l = o / e), a = s.y + s.height / 2 - l / 2), { x: n, y: a, width: o, height: l };
2939
2939
  }
2940
- function _o({ rect: s, delta: i, aspectRatio: e, imageBox: t }) {
2940
+ function bo({ rect: s, delta: i, aspectRatio: e, imageBox: t }) {
2941
2941
  let [r, n] = i, { x: o, y: l, width: a, height: c } = s;
2942
2942
  return o + r < t.x && (r = t.x - o), l + n < t.y && (n = t.y - l), o += r, a -= r, l += n, c -= n, e && Math.abs(a / c) > e ? (n = a / e - c, c += n, l -= n, l <= t.y && (c = c - (t.y - l), a = c * e, o = s.x + s.width - a, l = t.y)) : e && (r = c * e - a, a = a + r, o -= r, o <= t.x && (a = a - (t.x - o), c = a / e, o = t.x, l = s.y + s.height - c)), c < C && (c = C, e && (a = c * e), o = s.x + s.width - a, l = s.y + s.height - c), a < C && (a = C, e && (c = a / e), o = s.x + s.width - a, l = s.y + s.height - c), { x: o, y: l, width: a, height: c };
2943
2943
  }
2944
- function vo({ rect: s, delta: i, aspectRatio: e, imageBox: t }) {
2944
+ function _o({ rect: s, delta: i, aspectRatio: e, imageBox: t }) {
2945
2945
  let [r, n] = i, { x: o, y: l, width: a, height: c } = s;
2946
2946
  return o + a + r > t.x + t.width && (r = t.x + t.width - o - a), l + n < t.y && (n = t.y - l), a += r, l += n, c -= n, e && Math.abs(a / c) > e ? (n = a / e - c, c += n, l -= n, l <= t.y && (c = c - (t.y - l), a = c * e, o = s.x, l = t.y)) : e && (r = c * e - a, a += r, o + a >= t.x + t.width && (a = t.x + t.width - o, c = a / e, o = t.x + t.width - a, l = s.y + s.height - c)), c < C && (c = C, e && (a = c * e), l = s.y + s.height - c), a < C && (a = C, e && (c = a / e), l = s.y + s.height - c), { x: o, y: l, width: a, height: c };
2947
2947
  }
2948
- function yo({ rect: s, delta: i, aspectRatio: e, imageBox: t }) {
2948
+ function vo({ rect: s, delta: i, aspectRatio: e, imageBox: t }) {
2949
2949
  let [r, n] = i, { x: o, y: l, width: a, height: c } = s;
2950
2950
  return o + r < t.x && (r = t.x - o), l + c + n > t.y + t.height && (n = t.y + t.height - l - c), o += r, a -= r, c += n, e && Math.abs(a / c) > e ? (n = a / e - c, c += n, l + c >= t.y + t.height && (c = t.y + t.height - l, a = c * e, o = s.x + s.width - a, l = t.y + t.height - c)) : e && (r = c * e - a, a += r, o -= r, o <= t.x && (a = a - (t.x - o), c = a / e, o = t.x, l = s.y)), c < C && (c = C, e && (a = c * e), o = s.x + s.width - a), a < C && (a = C, e && (c = a / e), o = s.x + s.width - a), { x: o, y: l, width: a, height: c };
2951
2951
  }
2952
- function Co({ rect: s, delta: i, aspectRatio: e, imageBox: t }) {
2952
+ function yo({ rect: s, delta: i, aspectRatio: e, imageBox: t }) {
2953
2953
  let [r, n] = i, { x: o, y: l, width: a, height: c } = s;
2954
2954
  return o + a + r > t.x + t.width && (r = t.x + t.width - o - a), l + c + n > t.y + t.height && (n = t.y + t.height - l - c), a += r, c += n, e && Math.abs(a / c) > e ? (n = a / e - c, c += n, l + c >= t.y + t.height && (c = t.y + t.height - l, a = c * e, o = s.x, l = t.y + t.height - c)) : e && (r = c * e - a, a += r, o + a >= t.x + t.width && (a = t.x + t.width - o, c = a / e, o = t.x + t.width - a, l = s.y)), c < C && (c = C, e && (a = c * e)), a < C && (a = C, e && (c = a / e)), { x: o, y: l, width: a, height: c };
2955
2955
  }
2956
- function wo({ direction: s, ...i }) {
2956
+ function Co({ direction: s, ...i }) {
2957
2957
  switch (s) {
2958
2958
  case "n":
2959
- return po(i);
2959
+ return fo(i);
2960
2960
  case "w":
2961
- return mo(i);
2961
+ return po(i);
2962
2962
  case "s":
2963
- return go(i);
2963
+ return mo(i);
2964
2964
  case "e":
2965
- return bo(i);
2965
+ return go(i);
2966
2966
  case "nw":
2967
- return _o(i);
2967
+ return bo(i);
2968
2968
  case "ne":
2969
- return vo(i);
2969
+ return _o(i);
2970
2970
  case "sw":
2971
- return yo(i);
2971
+ return vo(i);
2972
2972
  case "se":
2973
- return Co(i);
2973
+ return yo(i);
2974
2974
  default:
2975
2975
  return i.rect;
2976
2976
  }
2977
2977
  }
2978
- function Eo(s, [i, e]) {
2978
+ function wo(s, [i, e]) {
2979
2979
  return s.x <= i && i <= s.x + s.width && s.y <= e && e <= s.y + s.height;
2980
2980
  }
2981
- function Ao(s, i) {
2981
+ function Eo(s, i) {
2982
2982
  return s.x >= i.x && s.y >= i.y && s.x + s.width <= i.x + i.width && s.y + s.height <= i.y + i.height;
2983
2983
  }
2984
- function To(s, i) {
2984
+ function Ao(s, i) {
2985
2985
  return Math.abs(s.width / s.height - i) < 0.1;
2986
2986
  }
2987
2987
  function Ne({ width: s, height: i }, e) {
2988
2988
  let t = e / 90 % 2 !== 0;
2989
2989
  return { width: t ? i : s, height: t ? s : i };
2990
2990
  }
2991
- function $o(s, i, e) {
2991
+ function To(s, i, e) {
2992
2992
  const t = s / i;
2993
2993
  let r, n;
2994
2994
  t > e ? (r = Math.round(i * e), n = i) : (r = s, n = Math.round(s / e));
@@ -3006,7 +3006,7 @@ function it(s) {
3006
3006
  function Oe(s, i, e) {
3007
3007
  return Math.min(Math.max(s, i), e);
3008
3008
  }
3009
- const As = (s) => {
3009
+ const Es = (s) => {
3010
3010
  if (!s)
3011
3011
  return [];
3012
3012
  const [i, e] = s.split(":").map(Number);
@@ -3023,18 +3023,18 @@ const As = (s) => {
3023
3023
  EXTERNAL: "external",
3024
3024
  API: "js-api"
3025
3025
  });
3026
- function So(s) {
3027
- return es({
3026
+ function $o(s) {
3027
+ return Qi({
3028
3028
  ...s,
3029
- libraryName: Wt,
3030
- libraryVersion: mt
3029
+ libraryName: Ht,
3030
+ libraryVersion: Wt
3031
3031
  });
3032
3032
  }
3033
- const Ts = ({ type: s, message: i, ...e }) => ({
3033
+ const As = ({ type: s, message: i, ...e }) => ({
3034
3034
  type: s,
3035
3035
  message: i,
3036
3036
  ...e
3037
- }), Se = Ts, Tt = Ts, Ut = [
3037
+ }), Se = As, At = As, Pt = [
3038
3038
  "image/*",
3039
3039
  "image/heif",
3040
3040
  "image/heif-sequence",
@@ -3048,9 +3048,9 @@ const Ts = ({ type: s, message: i, ...e }) => ({
3048
3048
  ".heics",
3049
3049
  ".avif",
3050
3050
  ".avifs"
3051
- ], Ti = (s) => s ? s.filter((i) => typeof i == "string").map((i) => le(i)).flat() : [], $s = (s, i) => i.some((e) => e.endsWith("*") ? (e = e.replace("*", ""), s.startsWith(e)) : s === e), xo = (s, i) => i.some((e) => e.startsWith(".") ? s.toLowerCase().endsWith(e.toLowerCase()) : !1), $i = (s) => {
3051
+ ], Ai = (s) => s ? s.filter((i) => typeof i == "string").map((i) => le(i)).flat() : [], Ts = (s, i) => i.some((e) => e.endsWith("*") ? (e = e.replace("*", ""), s.startsWith(e)) : s === e), So = (s, i) => i.some((e) => e.startsWith(".") ? s.toLowerCase().endsWith(e.toLowerCase()) : !1), Ti = (s) => {
3052
3052
  let i = s == null ? void 0 : s.type;
3053
- return i ? $s(i, Ut) : !1;
3053
+ return i ? Ts(i, Pt) : !1;
3054
3054
  }, Y = 1e3, ye = Object.freeze({
3055
3055
  AUTO: "auto",
3056
3056
  BYTE: "byte",
@@ -3059,12 +3059,12 @@ const Ts = ({ type: s, message: i, ...e }) => ({
3059
3059
  GB: "gb",
3060
3060
  TB: "tb",
3061
3061
  PB: "pb"
3062
- }), ze = (s) => Math.ceil(s * 100) / 100, Io = (s, i = ye.AUTO) => {
3062
+ }), ze = (s) => Math.ceil(s * 100) / 100, xo = (s, i = ye.AUTO) => {
3063
3063
  const e = i === ye.AUTO;
3064
3064
  if (i === ye.BYTE || e && s < Y ** 1) {
3065
3065
  const t = (
3066
3066
  /** @type {Extract<import('./getPluralForm').PluralForm, 'one' | 'other'>} */
3067
- Zi("en-US", s)
3067
+ Ji("en-US", s)
3068
3068
  ), r = {
3069
3069
  one: "byte",
3070
3070
  other: "bytes"
@@ -3072,12 +3072,12 @@ const Ts = ({ type: s, message: i, ...e }) => ({
3072
3072
  return `${s} ${r}`;
3073
3073
  }
3074
3074
  return i === ye.KB || e && s < Y ** 2 ? `${ze(s / Y ** 1)} KB` : i === ye.MB || e && s < Y ** 3 ? `${ze(s / Y ** 2)} MB` : i === ye.GB || e && s < Y ** 4 ? `${ze(s / Y ** 3)} GB` : i === ye.TB || e && s < Y ** 5 ? `${ze(s / Y ** 4)} TB` : `${ze(s / Y ** 5)} PB`;
3075
- }, Si = /* @__PURE__ */ new Set();
3076
- function Ss(s) {
3077
- Si.has(s) || (Si.add(s), console.warn(s));
3075
+ }, $i = /* @__PURE__ */ new Set();
3076
+ function $s(s) {
3077
+ $i.has(s) || ($i.add(s), console.warn(s));
3078
3078
  }
3079
- const xi = "[Typed State] Wrong property name: ", Oo = "[Typed State] Wrong property type: ";
3080
- class ko {
3079
+ const Si = "[Typed State] Wrong property name: ", Io = "[Typed State] Wrong property type: ";
3080
+ class Oo {
3081
3081
  /**
3082
3082
  * @param {Object<string, { type: any; value: any; nullable?: Boolean }>} typedSchema
3083
3083
  * @param {String} [ctxName]
@@ -3095,7 +3095,7 @@ class ko {
3095
3095
  */
3096
3096
  setValue(i, e) {
3097
3097
  if (!this.__typedSchema.hasOwnProperty(i)) {
3098
- console.warn(xi + i);
3098
+ console.warn(Si + i);
3099
3099
  return;
3100
3100
  }
3101
3101
  let t = this.__typedSchema[i];
@@ -3103,7 +3103,7 @@ class ko {
3103
3103
  this.__data.pub(i, e);
3104
3104
  return;
3105
3105
  }
3106
- console.warn(Oo + i);
3106
+ console.warn(Io + i);
3107
3107
  }
3108
3108
  /** @param {Object<string, any>} updObj */
3109
3109
  setMultipleValues(i) {
@@ -3113,7 +3113,7 @@ class ko {
3113
3113
  /** @param {String} prop */
3114
3114
  getValue(i) {
3115
3115
  if (!this.__typedSchema.hasOwnProperty(i)) {
3116
- console.warn(xi + i);
3116
+ console.warn(Si + i);
3117
3117
  return;
3118
3118
  }
3119
3119
  return this.__data.read(i);
@@ -3129,7 +3129,7 @@ class ko {
3129
3129
  T.deleteCtx(this.__ctxId);
3130
3130
  }
3131
3131
  }
3132
- class Lo {
3132
+ class ko {
3133
3133
  /**
3134
3134
  * @param {Object} options
3135
3135
  * @param {Object<string, { type: any; value: any }>} options.typedSchema
@@ -3172,7 +3172,7 @@ class Lo {
3172
3172
  * @returns {string}
3173
3173
  */
3174
3174
  add(i) {
3175
- let e = new ko(this.__typedSchema);
3175
+ let e = new Oo(this.__typedSchema);
3176
3176
  for (let t in i)
3177
3177
  e.setValue(t, i[t]);
3178
3178
  return this.__items.add(e.uid), this.notify(), this.__data.add(e.uid, e), this.__added.add(e), this.__watchList.forEach((t) => {
@@ -3252,7 +3252,7 @@ class Lo {
3252
3252
  }), delete this.__subsMap[i];
3253
3253
  }
3254
3254
  }
3255
- const Po = (s) => {
3255
+ const Lo = (s) => {
3256
3256
  const i = /* @__PURE__ */ new Map();
3257
3257
  return (
3258
3258
  /** @type {T} */
@@ -3265,16 +3265,16 @@ const Po = (s) => {
3265
3265
  }
3266
3266
  );
3267
3267
  };
3268
- function Uo(s) {
3268
+ function Po(s) {
3269
3269
  let i = !1;
3270
3270
  return setTimeout(() => {
3271
3271
  i = !0;
3272
3272
  }, 0), (t) => (
3273
3273
  /** @type {T} */
3274
- (...r) => (i && Ss(s), t(...r))
3274
+ (...r) => (i && $s(s), t(...r))
3275
3275
  );
3276
3276
  }
3277
- function Ro(s) {
3277
+ function Uo(s) {
3278
3278
  const i = {
3279
3279
  /** @returns {number} */
3280
3280
  progress: () => s.$["*commonProgress"],
@@ -3299,14 +3299,14 @@ function Ro(s) {
3299
3299
  /** @type {import('../index.js').OutputCollectionState<TCollectionStatus, TGroupFlag>} */
3300
3300
  /** @type {unknown} */
3301
3301
  {}
3302
- ), t = Uo(
3302
+ ), t = Po(
3303
3303
  "You're trying to access the OutputCollectionState asynchronously. In this case, the data you retrieve will be newer than it was when the OutputCollectionState was created or when the event was dispatched. If you want to retain the state at a specific moment in time, you should use the spread operator like this: `{...outputCollectionState}` or `{...e.detail}`"
3304
3304
  );
3305
3305
  for (const [r, n] of Object.entries(i)) {
3306
3306
  const o = (
3307
3307
  /** @type {keyof typeof getters} */
3308
3308
  r
3309
- ), a = Po(t(
3309
+ ), a = Lo(t(
3310
3310
  /** @type {(typeof getters)[name]} */
3311
3311
  n
3312
3312
  ));
@@ -3317,7 +3317,7 @@ function Ro(s) {
3317
3317
  }
3318
3318
  return e;
3319
3319
  }
3320
- const Mo = Object.freeze({
3320
+ const Ro = Object.freeze({
3321
3321
  file: {
3322
3322
  type: File,
3323
3323
  value: null
@@ -3419,11 +3419,11 @@ const Mo = Object.freeze({
3419
3419
  type: Boolean,
3420
3420
  value: !1
3421
3421
  }
3422
- }), Fo = /[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}/i, Do = new RegExp(`^/?(${Fo.source})(?:/(-/(?:[^/]+/)+)?([^/]*))?$`, "i"), No = ({ url: s, cdnBase: i }) => {
3422
+ }), Mo = /[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}/i, Fo = new RegExp(`^/?(${Mo.source})(?:/(-/(?:[^/]+/)+)?([^/]*))?$`, "i"), Do = ({ url: s, cdnBase: i }) => {
3423
3423
  const e = new URL(i), t = new URL(s);
3424
3424
  if (e.host !== t.host)
3425
3425
  return null;
3426
- const [, r, n, o] = Do.exec(t.pathname);
3426
+ const [, r, n, o] = Fo.exec(t.pathname);
3427
3427
  return {
3428
3428
  uuid: r,
3429
3429
  cdnUrlModifiers: n || "",
@@ -3435,7 +3435,7 @@ class S extends _ {
3435
3435
  super(...arguments);
3436
3436
  u(this, "couldBeCtxOwner", !1);
3437
3437
  u(this, "isCtxOwner", !1);
3438
- u(this, "init$", fs(this));
3438
+ u(this, "init$", ds(this));
3439
3439
  /** @private */
3440
3440
  u(this, "__initialUploadMetadata", null);
3441
3441
  /**
@@ -3469,7 +3469,7 @@ class S extends _ {
3469
3469
  max: n,
3470
3470
  total: t
3471
3471
  });
3472
- return Tt({
3472
+ return At({
3473
3473
  type: "TOO_FEW_FILES",
3474
3474
  message: o,
3475
3475
  total: t,
@@ -3483,7 +3483,7 @@ class S extends _ {
3483
3483
  max: n,
3484
3484
  total: t
3485
3485
  });
3486
- return Tt({
3486
+ return At({
3487
3487
  type: "TOO_MANY_FILES",
3488
3488
  message: o,
3489
3489
  total: t,
@@ -3494,7 +3494,7 @@ class S extends _ {
3494
3494
  },
3495
3495
  (e) => {
3496
3496
  if (e.items().some((t) => e.readProp(t, "errors").length > 0))
3497
- return Tt({
3497
+ return At({
3498
3498
  type: "SOME_FILES_HAS_ERRORS",
3499
3499
  message: this.l10n("some-files-were-not-uploaded")
3500
3500
  });
@@ -3622,7 +3622,7 @@ class S extends _ {
3622
3622
  * @public
3623
3623
  */
3624
3624
  setUploadMetadata(e) {
3625
- Ss(
3625
+ $s(
3626
3626
  "setUploadMetadata is deprecated. Use `metadata` instance property on `lr-config` block instead. See migration guide: https://uploadcare.com/docs/file-uploader/migration-to-0.25.0/"
3627
3627
  ), this.connectedOnce ? this.$["*uploadMetadata"] = e : this.__initialUploadMetadata = e;
3628
3628
  }
@@ -3631,8 +3631,8 @@ class S extends _ {
3631
3631
  }
3632
3632
  initCallback() {
3633
3633
  if (super.initCallback(), !this.$["*uploadCollection"]) {
3634
- let e = new Lo({
3635
- typedSchema: Mo,
3634
+ let e = new ko({
3635
+ typedSchema: Ro,
3636
3636
  watchList: ["uploadProgress", "uploadError", "fileInfo", "errors", "cdnUrl", "isUploading"]
3637
3637
  });
3638
3638
  this.$["*uploadCollection"] = e;
@@ -3689,7 +3689,7 @@ class S extends _ {
3689
3689
  * @returns {import('../types').OutputFileEntry<'idle'>}
3690
3690
  */
3691
3691
  addFileFromCdnUrl(e, { silent: t, fileName: r, source: n } = {}) {
3692
- const o = No({ url: e, cdnBase: this.cfg.cdnCname });
3692
+ const o = Do({ url: e, cdnBase: this.cfg.cdnCname });
3693
3693
  if (!o)
3694
3694
  throw new Error("Invalid CDN URL");
3695
3695
  const l = this.uploadCollection.add({
@@ -3710,7 +3710,7 @@ class S extends _ {
3710
3710
  addFileFromObject(e, { silent: t, fileName: r, source: n, fullPath: o } = {}) {
3711
3711
  const l = this.uploadCollection.add({
3712
3712
  file: e,
3713
- isImage: $i(e),
3713
+ isImage: Ti(e),
3714
3714
  mimeType: e.type,
3715
3715
  fileName: r ?? e.name,
3716
3716
  fileSize: e.size,
@@ -3732,7 +3732,7 @@ class S extends _ {
3732
3732
  ), e.map((t) => {
3733
3733
  const r = this.uploadCollection.add({
3734
3734
  file: t,
3735
- isImage: $i(t),
3735
+ isImage: Ti(t),
3736
3736
  mimeType: t.type,
3737
3737
  fileName: t.name,
3738
3738
  fileSize: t.size
@@ -3751,7 +3751,7 @@ class S extends _ {
3751
3751
  }
3752
3752
  /** @param {{ captureCamera?: boolean }} options */
3753
3753
  openSystemDialog(e = {}) {
3754
- let t = qt(Ti([this.cfg.accept ?? "", ...this.cfg.imgOnly ? Ut : []]));
3754
+ let t = Gt(Ai([this.cfg.accept ?? "", ...this.cfg.imgOnly ? Pt : []]));
3755
3755
  this.cfg.accept && this.cfg.imgOnly && console.warn(
3756
3756
  "There could be a mistake.\nBoth `accept` and `imgOnly` parameters are set.\nThe value of `accept` will be concatenated with the internal image mime types list."
3757
3757
  ), this.fileInput = document.createElement("input"), this.fileInput.type = "file", this.fileInput.multiple = this.cfg.multiple, e.captureCamera ? (this.fileInput.capture = this.cfg.cameraCapture, this.fileInput.accept = "image/*") : this.fileInput.accept = t, this.fileInput.dispatchEvent(new MouseEvent("click")), this.fileInput.onchange = () => {
@@ -3800,13 +3800,13 @@ class S extends _ {
3800
3800
  * @param {import('../types').OutputFileEntry} outputEntry
3801
3801
  */
3802
3802
  _validateFileType(e) {
3803
- const t = this.cfg.imgOnly, r = this.cfg.accept, n = Ti([...t ? Ut : [], r]);
3803
+ const t = this.cfg.imgOnly, r = this.cfg.accept, n = Ai([...t ? Pt : [], r]);
3804
3804
  if (!n.length)
3805
3805
  return;
3806
3806
  const o = e.mimeType, l = e.name;
3807
3807
  if (!o || !l)
3808
3808
  return;
3809
- const a = $s(o, n), c = xo(l, n);
3809
+ const a = Ts(o, n), c = So(l, n);
3810
3810
  if (!a && !c)
3811
3811
  return Se({
3812
3812
  type: "FORBIDDEN_FILE_TYPE",
@@ -3823,7 +3823,7 @@ class S extends _ {
3823
3823
  if (t && r && r > t)
3824
3824
  return Se({
3825
3825
  type: "FILE_SIZE_EXCEEDED",
3826
- message: this.l10n("files-max-size-limit-error", { maxFileSize: Io(t) }),
3826
+ message: this.l10n("files-max-size-limit-error", { maxFileSize: xo(t) }),
3827
3827
  entry: e
3828
3828
  });
3829
3829
  }
@@ -3842,7 +3842,7 @@ class S extends _ {
3842
3842
  entry: e,
3843
3843
  error: r
3844
3844
  });
3845
- if (r instanceof qe)
3845
+ if (r instanceof Ge)
3846
3846
  return Se({
3847
3847
  type: "NETWORK_ERROR",
3848
3848
  message: r.message,
@@ -3917,7 +3917,7 @@ class S extends _ {
3917
3917
  * @param {import('../types').OutputCollectionState} collectionState
3918
3918
  */
3919
3919
  async _createGroup(e) {
3920
- const t = this.getUploadClientOptions(), r = e.allEntries.map((a) => a.uuid + (a.cdnUrlModifiers ? `/${a.cdnUrlModifiers}` : "")), n = new AbortController(), o = await zn(r, { ...t, signal: n.signal });
3920
+ const t = this.getUploadClientOptions(), r = e.allEntries.map((a) => a.uuid + (a.cdnUrlModifiers ? `/${a.cdnUrlModifiers}` : "")), n = new AbortController(), o = await Nn(r, { ...t, signal: n.signal });
3921
3921
  if (this.$["*collectionState"] !== e) {
3922
3922
  n.abort();
3923
3923
  return;
@@ -3931,7 +3931,7 @@ class S extends _ {
3931
3931
  }
3932
3932
  /** @private */
3933
3933
  setInitialCrop() {
3934
- const e = As(this.cfg.cropPreset);
3934
+ const e = Es(this.cfg.cropPreset);
3935
3935
  if (e) {
3936
3936
  const [t] = e, r = this.uploadCollection.findItems(
3937
3937
  (n) => {
@@ -3940,7 +3940,7 @@ class S extends _ {
3940
3940
  }
3941
3941
  ).map((n) => this.uploadCollection.read(n));
3942
3942
  for (const n of r) {
3943
- const o = n.getValue("fileInfo"), { width: l, height: a } = o.imageInfo, c = t.width / t.height, h = $o(l, a, c), d = pe(
3943
+ const o = n.getValue("fileInfo"), { width: l, height: a } = o.imageInfo, c = t.width / t.height, h = To(l, a, c), d = pe(
3944
3944
  `crop/${h.width}x${h.height}/${h.x},${h.y}`,
3945
3945
  "preview"
3946
3946
  );
@@ -3971,7 +3971,7 @@ class S extends _ {
3971
3971
  publicKey: this.cfg.pubkey,
3972
3972
  baseCDN: this.cfg.cdnCname,
3973
3973
  baseURL: this.cfg.baseUrl,
3974
- userAgent: So,
3974
+ userAgent: $o,
3975
3975
  integration: this.cfg.userAgentIntegration,
3976
3976
  secureSignature: this.cfg.secureSignature,
3977
3977
  secureExpire: this.cfg.secureExpire,
@@ -4032,7 +4032,7 @@ class S extends _ {
4032
4032
  getOutputCollectionState() {
4033
4033
  return (
4034
4034
  /** @type {ReturnType<typeof buildOutputCollectionState<TStatus>>} */
4035
- Ro(this)
4035
+ Uo(this)
4036
4036
  );
4037
4037
  }
4038
4038
  }
@@ -4056,7 +4056,7 @@ S.sourceTypes = Object.freeze({
4056
4056
  DRAW: "draw",
4057
4057
  ...S.extSrcList
4058
4058
  });
4059
- const bt = (s) => {
4059
+ const gt = (s) => {
4060
4060
  var i;
4061
4061
  return (i = s.match(/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g)) == null ? void 0 : i.map((e) => e.toLowerCase()).join("-");
4062
4062
  }, k = (s) => String(s), K = (s) => {
@@ -4074,26 +4074,26 @@ const bt = (s) => {
4074
4074
  if (s === "false")
4075
4075
  return !1;
4076
4076
  throw new Error(`Invalid boolean: "${s}"`);
4077
- }, zo = (s) => s === "auto" ? s : I(s), Vo = (s) => {
4077
+ }, No = (s) => s === "auto" ? s : I(s), zo = (s) => {
4078
4078
  const i = k(s);
4079
4079
  if (i !== "user" && i !== "environment" && i !== "")
4080
4080
  throw new Error(`Invalid "cameraCapture" value: "${i}"`);
4081
4081
  return i;
4082
- }, Bo = (s) => {
4082
+ }, Vo = (s) => {
4083
4083
  if (typeof s == "object" && !Array.isArray(s) || typeof s == "function")
4084
4084
  return (
4085
4085
  /** @type {import('../../types').MetadataCallback} */
4086
4086
  s
4087
4087
  );
4088
4088
  throw new Error("Invalid metadata value. Must be an object or function.");
4089
- }, jo = (s) => {
4089
+ }, Bo = (s) => {
4090
4090
  if (typeof s == "object")
4091
4091
  return (
4092
4092
  /** @type {import('../../types').LocaleDefinitionOverride} */
4093
4093
  s
4094
4094
  );
4095
4095
  throw new Error("Invalid localeDefinitionOverride value. Must be an object.");
4096
- }, Ho = {
4096
+ }, jo = {
4097
4097
  pubkey: k,
4098
4098
  multiple: I,
4099
4099
  multipleMin: K,
@@ -4102,9 +4102,9 @@ const bt = (s) => {
4102
4102
  imgOnly: I,
4103
4103
  accept: k,
4104
4104
  externalSourcesPreferredTypes: k,
4105
- store: zo,
4105
+ store: No,
4106
4106
  cameraMirror: I,
4107
- cameraCapture: Vo,
4107
+ cameraCapture: zo,
4108
4108
  sourceList: k,
4109
4109
  maxLocalFileSizeBytes: K,
4110
4110
  thumbSize: K,
@@ -4137,12 +4137,12 @@ const bt = (s) => {
4137
4137
  userAgentIntegration: k,
4138
4138
  debug: I,
4139
4139
  localeName: k,
4140
- metadata: Bo,
4141
- localeDefinitionOverride: jo
4142
- }, Wo = (s, i) => {
4140
+ metadata: Vo,
4141
+ localeDefinitionOverride: Bo
4142
+ }, Ho = (s, i) => {
4143
4143
  if (!(typeof i > "u" || i === null))
4144
4144
  try {
4145
- return Ho[s](i);
4145
+ return jo[s](i);
4146
4146
  } catch (e) {
4147
4147
  return console.error(`Invalid value for config key "${s}".`, e), ue[s];
4148
4148
  }
@@ -4152,22 +4152,22 @@ const bt = (s) => {
4152
4152
  // "debug" option should go first to be able to print debug messages from the very beginning
4153
4153
  .../* @__PURE__ */ new Set(["debug", ...Object.keys(ue)])
4154
4154
  ]
4155
- ), Go = ["metadata", "localeDefinitionOverride"], qo = (s) => Go.includes(s), Ue = (
4155
+ ), Wo = ["metadata", "localeDefinitionOverride"], qo = (s) => Wo.includes(s), Ue = (
4156
4156
  /** @type {(keyof import('../../types').ConfigPlainType)[]} */
4157
4157
  Xt.filter((s) => !qo(s))
4158
- ), Xo = (
4158
+ ), Go = (
4159
4159
  /** @type {Record<keyof import('../../types').ConfigAttributesType, keyof import('../../types').ConfigPlainType>} */
4160
4160
  {
4161
- ...Object.fromEntries(Ue.map((s) => [bt(s), s])),
4161
+ ...Object.fromEntries(Ue.map((s) => [gt(s), s])),
4162
4162
  ...Object.fromEntries(Ue.map((s) => [s.toLowerCase(), s]))
4163
4163
  }
4164
- ), Yo = (
4164
+ ), Xo = (
4165
4165
  /** @type {Record<keyof import('../../types').ConfigAttributesType, string>} */
4166
4166
  {
4167
- ...Object.fromEntries(Ue.map((s) => [bt(s), B(s)])),
4167
+ ...Object.fromEntries(Ue.map((s) => [gt(s), B(s)])),
4168
4168
  ...Object.fromEntries(Ue.map((s) => [s.toLowerCase(), B(s)]))
4169
4169
  }
4170
- ), Ii = (s) => "__" + s;
4170
+ ), xi = (s) => "__" + s;
4171
4171
  class Yt extends $ {
4172
4172
  constructor() {
4173
4173
  super();
@@ -4192,7 +4192,7 @@ class Yt extends $ {
4192
4192
  */
4193
4193
  _flushValueToAttribute(e, t) {
4194
4194
  if (Ue.includes(e)) {
4195
- const r = [.../* @__PURE__ */ new Set([bt(e), e.toLowerCase()])];
4195
+ const r = [.../* @__PURE__ */ new Set([gt(e), e.toLowerCase()])];
4196
4196
  for (const n of r)
4197
4197
  typeof t > "u" || t === null ? this.removeAttribute(n) : this.getAttribute(n) !== t.toString() && this.setAttribute(n, t.toString());
4198
4198
  }
@@ -4214,7 +4214,7 @@ class Yt extends $ {
4214
4214
  const r = (
4215
4215
  /** @type {typeof this & any} */
4216
4216
  this
4217
- ), n = Wo(e, t), o = Ii(e);
4217
+ ), n = Ho(e, t), o = xi(e);
4218
4218
  r[o] !== n && (this._assertSameValueDifferentReference(e, r[o], n), r[o] = n, this._flushValueToAttribute(e, n), this._flushValueToState(e, n), this.debugPrint(`[lr-config] "${e}"`, n));
4219
4219
  }
4220
4220
  /**
@@ -4225,7 +4225,7 @@ class Yt extends $ {
4225
4225
  const t = (
4226
4226
  /** @type {typeof this & any} */
4227
4227
  this
4228
- ), r = Ii(e);
4228
+ ), r = xi(e);
4229
4229
  return t[r];
4230
4230
  }
4231
4231
  /**
@@ -4276,14 +4276,14 @@ class Yt extends $ {
4276
4276
  const n = (
4277
4277
  /** @type {typeof this & any} */
4278
4278
  this
4279
- ), o = Xo[e];
4279
+ ), o = Go[e];
4280
4280
  n[o] = r;
4281
4281
  }
4282
4282
  }
4283
- Yt.bindAttributes(Yo);
4283
+ Yt.bindAttributes(Xo);
4284
4284
  for (const s of Xt)
4285
4285
  Yt.prototype[s] = void 0;
4286
- const xs = (
4286
+ const Ss = (
4287
4287
  /** @type {Config} */
4288
4288
  /** @type {unknown} */
4289
4289
  Yt
@@ -4322,7 +4322,7 @@ Kt.bindAttributes({
4322
4322
  name: "name",
4323
4323
  size: "size"
4324
4324
  });
4325
- const Ko = (s) => [...new Set(s)], Jo = (s) => Object.entries(s).filter(([i, e]) => e !== void 0 && e !== "").map(([i, e]) => i === "cdn-operations" || i === "analytics" ? e : `${i}/${e}`), Zo = "https://ucarecdn.com", lt = Object.freeze({
4325
+ const Yo = (s) => [...new Set(s)], Ko = (s) => Object.entries(s).filter(([i, e]) => e !== void 0 && e !== "").map(([i, e]) => i === "cdn-operations" || i === "analytics" ? e : `${i}/${e}`), Jo = "https://ucarecdn.com", lt = Object.freeze({
4326
4326
  "dev-mode": {},
4327
4327
  pubkey: {},
4328
4328
  uuid: {},
@@ -4337,7 +4337,7 @@ const Ko = (s) => [...new Set(s)], Jo = (s) => Object.entries(s).filter(([i, e])
4337
4337
  // '200, 300, 400'
4338
4338
  },
4339
4339
  "cdn-cname": {
4340
- default: Zo
4340
+ default: Jo
4341
4341
  },
4342
4342
  "proxy-cname": {},
4343
4343
  "secure-delivery-proxy": {},
@@ -4354,17 +4354,17 @@ const Ko = (s) => [...new Set(s)], Jo = (s) => Object.entries(s).filter(([i, e])
4354
4354
  "is-preview-blur": {
4355
4355
  default: 1
4356
4356
  }
4357
- }), He = "--lr-img-", Oi = "unresolved", Je = 2, Ze = 3, ki = !window.location.host.trim() || window.location.host.includes(":") || window.location.hostname.includes("localhost"), Li = 3e3, Pi = 5e3, Ui = Object.freeze({
4357
+ }), He = "--lr-img-", Ii = "unresolved", Je = 2, Ze = 3, Oi = !window.location.host.trim() || window.location.host.includes(":") || window.location.hostname.includes("localhost"), ki = 3e3, Li = 5e3, Pi = Object.freeze({
4358
4358
  PREVIEW: "PREVIEW",
4359
4359
  MAIN: "MAIN"
4360
- }), Is = /* @__PURE__ */ Object.create(null);
4361
- var Gi;
4360
+ }), xs = /* @__PURE__ */ Object.create(null);
4361
+ var Wi;
4362
4362
  for (let s in lt)
4363
- Is[He + s] = ((Gi = lt[s]) == null ? void 0 : Gi.default) || "";
4364
- class Qo extends at {
4363
+ xs[He + s] = ((Wi = lt[s]) == null ? void 0 : Wi.default) || "";
4364
+ class Zo extends at {
4365
4365
  constructor() {
4366
4366
  super(...arguments);
4367
- u(this, "cssInit$", Is);
4367
+ u(this, "cssInit$", xs);
4368
4368
  }
4369
4369
  /**
4370
4370
  * @param {String} key
@@ -4388,7 +4388,7 @@ class Qo extends at {
4388
4388
  });
4389
4389
  }
4390
4390
  analyticsParams() {
4391
- return `-/@clib/${Wt}/${mt}/lr-img/`;
4391
+ return `-/@clib/${Ht}/${Wt}/lr-img/`;
4392
4392
  }
4393
4393
  initAttributes(e) {
4394
4394
  [...this.attributes].forEach((t) => {
@@ -4424,7 +4424,7 @@ class Qo extends at {
4424
4424
  });
4425
4425
  }
4426
4426
  }
4427
- class el extends Qo {
4427
+ class Qo extends Zo {
4428
4428
  constructor() {
4429
4429
  super(...arguments);
4430
4430
  u(this, "_img", new Image());
@@ -4435,7 +4435,7 @@ class el extends Qo {
4435
4435
  * @param {String} src
4436
4436
  */
4437
4437
  _fmtAbs(e) {
4438
- return !e.includes("//") && !ki && (e = new URL(e, document.baseURI).href), e;
4438
+ return !e.includes("//") && !Oi && (e = new URL(e, document.baseURI).href), e;
4439
4439
  }
4440
4440
  /**
4441
4441
  * Validate size
@@ -4447,10 +4447,10 @@ class el extends Qo {
4447
4447
  if ((e == null ? void 0 : e.trim()) !== "") {
4448
4448
  let t = e.match(/\d+/)[0], r = e.match(/[a-zA-Z]+/)[0];
4449
4449
  const n = parseInt(t, 10);
4450
- if (Number(n) > Pi && this.hasFormatJPG)
4451
- return Pi + r;
4452
- if (Number(n) > Li && !this.hasFormatJPG)
4450
+ if (Number(n) > Li && this.hasFormatJPG)
4453
4451
  return Li + r;
4452
+ if (Number(n) > ki && !this.hasFormatJPG)
4453
+ return ki + r;
4454
4454
  }
4455
4455
  return e;
4456
4456
  }
@@ -4469,7 +4469,7 @@ class el extends Qo {
4469
4469
  "cdn-operations": this.$$("cdn-operations"),
4470
4470
  analytics: this.analyticsParams()
4471
4471
  };
4472
- return pe(...Jo(r));
4472
+ return pe(...Ko(r));
4473
4473
  }
4474
4474
  /**
4475
4475
  * @private
@@ -4480,7 +4480,7 @@ class el extends Qo {
4480
4480
  _getUrlBase(e = "", t = "") {
4481
4481
  if (this.$$("src").startsWith("data:") || this.$$("src").startsWith("blob:"))
4482
4482
  return this.$$("src");
4483
- if (ki && this.$$("src") && !this.$$("src").includes("//"))
4483
+ if (Oi && this.$$("src") && !this.$$("src").includes("//"))
4484
4484
  return this._proxyUrl(this.$$("src"));
4485
4485
  let r = this._getCdnModifiers(e, t);
4486
4486
  if (this.$$("src").startsWith(this.$$("cdn-cname")))
@@ -4526,7 +4526,7 @@ class el extends Qo {
4526
4526
  * @returns {String}
4527
4527
  */
4528
4528
  _proxyUrl(e) {
4529
- return this.$$("secure-delivery-proxy") ? Ot(
4529
+ return this.$$("secure-delivery-proxy") ? It(
4530
4530
  this.$$("secure-delivery-proxy"),
4531
4531
  { previewUrl: e },
4532
4532
  { transform: (r) => window.encodeURIComponent(r) }
@@ -4557,10 +4557,10 @@ class el extends Qo {
4557
4557
  }
4558
4558
  get currentImg() {
4559
4559
  return this.hasPreviewImage ? {
4560
- type: Ui.PREVIEW,
4560
+ type: Pi.PREVIEW,
4561
4561
  img: this._imgPreview
4562
4562
  } : {
4563
- type: Ui.MAIN,
4563
+ type: Pi.MAIN,
4564
4564
  img: this.img
4565
4565
  };
4566
4566
  }
@@ -4573,7 +4573,7 @@ class el extends Qo {
4573
4573
  get breakpoints() {
4574
4574
  if (this.$$("breakpoints")) {
4575
4575
  const e = le(this.$$("breakpoints"));
4576
- return Ko(e.map((t) => parseInt(t, 10)));
4576
+ return Yo(e.map((t) => parseInt(t, 10)));
4577
4577
  } else
4578
4578
  return null;
4579
4579
  }
@@ -4614,8 +4614,8 @@ class el extends Qo {
4614
4614
  }
4615
4615
  loaderImage({ src: e, srcset: t, elNode: r }) {
4616
4616
  return new Promise((n, o) => {
4617
- this._setupConfigForImage({ elNode: r }), r.setAttribute(Oi, ""), r.addEventListener("load", () => {
4618
- r.removeAttribute(Oi), n(r);
4617
+ this._setupConfigForImage({ elNode: r }), r.setAttribute(Ii, ""), r.addEventListener("load", () => {
4618
+ r.removeAttribute(Ii), n(r);
4619
4619
  }), r.addEventListener("error", () => {
4620
4620
  o(!1);
4621
4621
  }), this._appendURL({
@@ -4660,7 +4660,7 @@ class el extends Qo {
4660
4660
  this.bgSelector ? this.renderBackground() : this.renderImage();
4661
4661
  }
4662
4662
  }
4663
- class tl extends el {
4663
+ class el extends Qo {
4664
4664
  initCallback() {
4665
4665
  super.initCallback(), this.sub$$("src", () => {
4666
4666
  this.init();
@@ -4711,7 +4711,7 @@ Jt.bindAttributes({
4711
4711
  // @ts-expect-error TODO: we need to update symbiote types
4712
4712
  dropzone: null
4713
4713
  });
4714
- class Os extends _ {
4714
+ class Is extends _ {
4715
4715
  constructor() {
4716
4716
  super(...arguments);
4717
4717
  u(this, "historyTracked", !0);
@@ -4722,9 +4722,9 @@ class Os extends _ {
4722
4722
  super.initCallback(), this.registerActivity(this.activityType);
4723
4723
  }
4724
4724
  }
4725
- Os.template = /* HTML */
4725
+ Is.template = /* HTML */
4726
4726
  ' <div class="content"><slot></slot></div> ';
4727
- function il(s) {
4727
+ function tl(s) {
4728
4728
  return new Promise((i) => {
4729
4729
  typeof window.FileReader != "function" && i(!1);
4730
4730
  try {
@@ -4741,7 +4741,7 @@ function il(s) {
4741
4741
  }
4742
4742
  });
4743
4743
  }
4744
- function sl(s, i) {
4744
+ function il(s, i) {
4745
4745
  return new Promise((e) => {
4746
4746
  let t = 0;
4747
4747
  const r = [], n = (l) => {
@@ -4769,7 +4769,7 @@ function sl(s, i) {
4769
4769
  n(s);
4770
4770
  });
4771
4771
  }
4772
- function rl(s) {
4772
+ function sl(s) {
4773
4773
  const i = [], e = [];
4774
4774
  for (let t = 0; t < s.items.length; t++) {
4775
4775
  let r = s.items[t];
@@ -4783,7 +4783,7 @@ function rl(s) {
4783
4783
  r.getAsEntry()
4784
4784
  );
4785
4785
  e.push(
4786
- sl(l, n).then((a) => {
4786
+ il(l, n).then((a) => {
4787
4787
  a && i.push(...a);
4788
4788
  })
4789
4789
  );
@@ -4791,7 +4791,7 @@ function rl(s) {
4791
4791
  }
4792
4792
  const o = r.getAsFile();
4793
4793
  o && e.push(
4794
- il(o).then((l) => {
4794
+ tl(o).then((l) => {
4795
4795
  l || i.push({
4796
4796
  type: "file",
4797
4797
  file: o
@@ -4818,12 +4818,12 @@ const F = {
4818
4818
  NEAR: 2,
4819
4819
  OVER: 3
4820
4820
  };
4821
- let Ri = ["focus"], nl = 100, $t = /* @__PURE__ */ new Map();
4822
- function ol(s, i) {
4821
+ let Ui = ["focus"], rl = 100, Tt = /* @__PURE__ */ new Map();
4822
+ function nl(s, i) {
4823
4823
  let e = Math.max(Math.min(s[0], i.x + i.width), i.x), t = Math.max(Math.min(s[1], i.y + i.height), i.y);
4824
4824
  return Math.sqrt((s[0] - e) * (s[0] - e) + (s[1] - t) * (s[1] - t));
4825
4825
  }
4826
- function Mi(s) {
4826
+ function Ri(s) {
4827
4827
  let i = 0, e = document.body, t = /* @__PURE__ */ new Set(), r = (p) => t.add(p), n = F.INACTIVE, o = (p) => {
4828
4828
  s.shouldIgnore() && p !== F.INACTIVE || (n !== p && t.forEach((g) => g(p)), n = p);
4829
4829
  }, l = () => i > 0;
@@ -4840,26 +4840,26 @@ function Mi(s) {
4840
4840
  if (s.shouldIgnore())
4841
4841
  return;
4842
4842
  l() || (i += 1);
4843
- let g = [p.x, p.y], w = s.element.getBoundingClientRect(), E = Math.floor(ol(g, w)), b = E < nl, y = p.composedPath().includes(s.element);
4844
- $t.set(s.element, E);
4845
- let U = Math.min(...$t.values()) === E;
4843
+ let g = [p.x, p.y], w = s.element.getBoundingClientRect(), E = Math.floor(nl(g, w)), b = E < rl, y = p.composedPath().includes(s.element);
4844
+ Tt.set(s.element, E);
4845
+ let U = Math.min(...Tt.values()) === E;
4846
4846
  y && U ? (p.preventDefault(), o(F.OVER)) : o(b && U ? F.NEAR : F.ACTIVE);
4847
4847
  }, m = async (p) => {
4848
4848
  if (s.shouldIgnore())
4849
4849
  return;
4850
4850
  p.preventDefault();
4851
- let g = await rl(p.dataTransfer);
4851
+ let g = await sl(p.dataTransfer);
4852
4852
  s.onItems(g), o(F.INACTIVE);
4853
4853
  };
4854
- return e.addEventListener("drop", d), e.addEventListener("dragleave", h), e.addEventListener("dragenter", c), e.addEventListener("dragover", f), s.element.addEventListener("drop", m), Ri.forEach((p) => {
4854
+ return e.addEventListener("drop", d), e.addEventListener("dragleave", h), e.addEventListener("dragenter", c), e.addEventListener("dragover", f), s.element.addEventListener("drop", m), Ui.forEach((p) => {
4855
4855
  window.addEventListener(p, a);
4856
4856
  }), () => {
4857
- $t.delete(s.element), e.removeEventListener("drop", d), e.removeEventListener("dragleave", h), e.removeEventListener("dragenter", c), e.removeEventListener("dragover", f), s.element.removeEventListener("drop", m), Ri.forEach((p) => {
4857
+ Tt.delete(s.element), e.removeEventListener("drop", d), e.removeEventListener("dragleave", h), e.removeEventListener("dragenter", c), e.removeEventListener("dragover", f), s.element.removeEventListener("drop", m), Ui.forEach((p) => {
4858
4858
  window.removeEventListener(p, a);
4859
4859
  });
4860
4860
  };
4861
4861
  }
4862
- const ks = "lr-drop-area", xe = `${ks}/registry`;
4862
+ const Os = "lr-drop-area", xe = `${Os}/registry`;
4863
4863
  class Zt extends S {
4864
4864
  constructor() {
4865
4865
  super(), this.init$ = {
@@ -4911,7 +4911,7 @@ class Zt extends S {
4911
4911
  (e) => {
4912
4912
  typeof e == "string" ? this.bindL10n("text", () => this.l10n(e) || e) : this.bindL10n("text", () => this.l10n("drop-files-here"));
4913
4913
  }
4914
- ), this._destroyDropzone = Mi({
4914
+ ), this._destroyDropzone = Ri({
4915
4915
  element: this,
4916
4916
  shouldIgnore: () => this._shouldIgnore(),
4917
4917
  /** @param {DropzoneState} state */
@@ -4928,7 +4928,7 @@ class Zt extends S {
4928
4928
  }
4929
4929
  });
4930
4930
  let i = this.ref["content-wrapper"];
4931
- i && (this._destroyContentWrapperDropzone = Mi({
4931
+ i && (this._destroyContentWrapperDropzone = Ri({
4932
4932
  element: i,
4933
4933
  /** @param {DropzoneState} state */
4934
4934
  onChange: (e) => {
@@ -4972,7 +4972,7 @@ class Zt extends S {
4972
4972
  var e, t;
4973
4973
  super.destroyCallback();
4974
4974
  const i = this.$[xe];
4975
- i && (i.delete(this), i.size === 0 && T.deleteCtx(ks)), (e = this._destroyDropzone) == null || e.call(this), (t = this._destroyContentWrapperDropzone) == null || t.call(this), this._onAreaClicked && this.removeEventListener("click", this._onAreaClicked);
4975
+ i && (i.delete(this), i.size === 0 && T.deleteCtx(Os)), (e = this._destroyDropzone) == null || e.call(this), (t = this._destroyContentWrapperDropzone) == null || t.call(this), this._onAreaClicked && this.removeEventListener("click", this._onAreaClicked);
4976
4976
  }
4977
4977
  }
4978
4978
  Zt.template = /* HTML */
@@ -5000,7 +5000,7 @@ Zt.bindAttributes({
5000
5000
  // @ts-expect-error TODO: fix types inside symbiote
5001
5001
  disabled: null
5002
5002
  });
5003
- const ll = "src-type-";
5003
+ const ol = "src-type-";
5004
5004
  class Qt extends S {
5005
5005
  constructor() {
5006
5006
  super();
@@ -5081,7 +5081,7 @@ class Qt extends S {
5081
5081
  return;
5082
5082
  }
5083
5083
  const { textKey: r = e, icon: n = e } = t;
5084
- this.$["src-type"] = `${ll}${r}`, this.$.iconName = n, this.onclick = () => {
5084
+ this.$["src-type"] = `${ol}${r}`, this.$.iconName = n, this.onclick = () => {
5085
5085
  this.activate();
5086
5086
  };
5087
5087
  }
@@ -5095,7 +5095,7 @@ Qt.bindAttributes({
5095
5095
  // @ts-expect-error symbiote types bug
5096
5096
  type: null
5097
5097
  });
5098
- class al extends $ {
5098
+ class ll extends $ {
5099
5099
  initCallback() {
5100
5100
  super.initCallback(), this.subConfigValue("sourceList", (i) => {
5101
5101
  let e = le(i), t = "";
@@ -5106,7 +5106,7 @@ class al extends $ {
5106
5106
  });
5107
5107
  }
5108
5108
  }
5109
- const _t = () => {
5109
+ const bt = () => {
5110
5110
  const s = [];
5111
5111
  return {
5112
5112
  stack: s,
@@ -5154,15 +5154,15 @@ const _t = () => {
5154
5154
  });
5155
5155
  })
5156
5156
  };
5157
- }, cl = async (s) => {
5158
- const i = [], { promiseReadJpegChunks: e, stack: t } = _t();
5157
+ }, al = async (s) => {
5158
+ const i = [], { promiseReadJpegChunks: e, stack: t } = bt();
5159
5159
  return await e(s), t.forEach(({ marker: r, view: n }) => {
5160
5160
  r === 226 && // check for "ICC_PROFILE\0"
5161
5161
  n.getUint32(0) === 1229144927 && n.getUint32(4) === 1347571526 && n.getUint32(8) === 1229735168 && i.push(n);
5162
5162
  }), i;
5163
- }, Ls = async (s, i, e) => {
5163
+ }, ks = async (s, i, e) => {
5164
5164
  {
5165
- const t = [], r = [], { promiseReadJpegChunks: n, stack: o } = _t();
5165
+ const t = [], r = [], { promiseReadJpegChunks: n, stack: o } = bt();
5166
5166
  await n(s), o.forEach((c) => {
5167
5167
  if (c.marker === i)
5168
5168
  return t.push(c.startPos), r.push(c.length);
@@ -5179,13 +5179,13 @@ const _t = () => {
5179
5179
  type: s.type
5180
5180
  });
5181
5181
  }
5182
- }, hl = 226, Ps = (s, i) => Ls(s, hl, i.map((e) => e.buffer)), ul = async (s) => {
5182
+ }, cl = 226, Ls = (s, i) => ks(s, cl, i.map((e) => e.buffer)), hl = async (s) => {
5183
5183
  try {
5184
- return await Ps(s, []);
5184
+ return await Ls(s, []);
5185
5185
  } catch (i) {
5186
5186
  throw new Error(`Failed to strip ICC profile: ${i}`);
5187
5187
  }
5188
- }, dl = (s, i, e) => new Promise((t, r) => {
5188
+ }, ul = (s, i, e) => new Promise((t, r) => {
5189
5189
  const n = (o) => {
5190
5190
  if (!o) {
5191
5191
  r("Failed to convert canvas to blob");
@@ -5194,14 +5194,14 @@ const _t = () => {
5194
5194
  t(o);
5195
5195
  };
5196
5196
  s.toBlob(n, i, e), s.width = s.height = 1;
5197
- }), Ge = () => {
5197
+ }), qe = () => {
5198
5198
  const s = document.createElement("canvas"), i = s.getContext("2d");
5199
5199
  return {
5200
5200
  canvas: s,
5201
5201
  ctx: i
5202
5202
  };
5203
- }, fl = (s) => {
5204
- const { ctx: e, canvas: t } = Ge();
5203
+ }, dl = (s) => {
5204
+ const { ctx: e, canvas: t } = qe();
5205
5205
  t.width = t.height = 50, e.drawImage(s, 0, 0, 50, 50);
5206
5206
  const r = e.getImageData(0, 0, 50, 50).data;
5207
5207
  t.width = t.height = 1;
@@ -5209,9 +5209,9 @@ const _t = () => {
5209
5209
  if (r[n] < 254)
5210
5210
  return !0;
5211
5211
  return !1;
5212
- }, pl = async (s) => {
5212
+ }, fl = async (s) => {
5213
5213
  let i = null;
5214
- const { promiseReadJpegChunks: e, stack: t } = _t();
5214
+ const { promiseReadJpegChunks: e, stack: t } = bt();
5215
5215
  return await e(s), t.forEach(({ marker: r, view: n }) => {
5216
5216
  if (!i && r === 225 && n.byteLength >= 14 && // check for "Exif\0"
5217
5217
  n.getUint32(0) === 1165519206 && n.getUint16(4) === 0) {
@@ -5219,18 +5219,18 @@ const _t = () => {
5219
5219
  return;
5220
5220
  }
5221
5221
  }), i;
5222
- }, ml = "data:image/jpg;base64,/9j/4AAQSkZJRgABAQEASABIAAD/4QA6RXhpZgAATU0AKgAAAAgAAwESAAMAAAABAAYAAAEoAAMAAAABAAIAAAITAAMAAAABAAEAAAAAAAD/2wBDAP//////////////////////////////////////////////////////////////////////////////////////wAALCAABAAIBASIA/8QAJgABAAAAAAAAAAAAAAAAAAAAAxABAAAAAAAAAAAAAAAAAAAAAP/aAAgBAQAAPwBH/9k=";
5222
+ }, pl = "data:image/jpg;base64,/9j/4AAQSkZJRgABAQEASABIAAD/4QA6RXhpZgAATU0AKgAAAAgAAwESAAMAAAABAAYAAAEoAAMAAAABAAIAAAITAAMAAAABAAEAAAAAAAD/2wBDAP//////////////////////////////////////////////////////////////////////////////////////wAALCAABAAIBASIA/8QAJgABAAAAAAAAAAAAAAAAAAAAAxABAAAAAAAAAAAAAAAAAAAAAP/aAAgBAQAAPwBH/9k=";
5223
5223
  let Qe;
5224
- const gl = () => new Promise((s) => {
5224
+ const ml = () => new Promise((s) => {
5225
5225
  if (Qe !== void 0)
5226
5226
  s(Qe);
5227
5227
  else {
5228
5228
  const i = new Image();
5229
5229
  i.addEventListener("load", () => {
5230
5230
  Qe = i.naturalWidth < i.naturalHeight, i.src = "//:0", s(Qe);
5231
- }), i.src = ml;
5231
+ }), i.src = pl;
5232
5232
  }
5233
- }), bl = (s, i) => {
5233
+ }), gl = (s, i) => {
5234
5234
  let e, t, r, n;
5235
5235
  if (!s || s.byteLength < 14 || s.getUint32(0) !== 1165519206 || s.getUint16(4) !== 0)
5236
5236
  return;
@@ -5249,20 +5249,20 @@ const gl = () => new Promise((s) => {
5249
5249
  return;
5250
5250
  s.getUint16(r, t) === 274 && i(r + 8, t), r += 12;
5251
5251
  }
5252
- }, _l = (s, i) => {
5253
- bl(s, (e, t) => s.setUint16(e, i, t));
5254
- }, vl = async (s, i, e) => (e && _l(i, 1), Ls(s, 225, [i.buffer])), yl = (s, i) => new Promise((e, t) => {
5252
+ }, bl = (s, i) => {
5253
+ gl(s, (e, t) => s.setUint16(e, i, t));
5254
+ }, _l = async (s, i, e) => (e && bl(i, 1), ks(s, 225, [i.buffer])), vl = (s, i) => new Promise((e, t) => {
5255
5255
  i && (s.src = i), s.complete ? e(s) : (s.addEventListener("load", () => {
5256
5256
  e(s);
5257
5257
  }), s.addEventListener("error", () => {
5258
5258
  t(new Error("Failed to load image. Probably not an image."));
5259
5259
  }));
5260
- }), Cl = (s) => yl(new Image(), s), wl = [
5260
+ }), yl = (s) => vl(new Image(), s), Cl = [
5261
5261
  1,
5262
5262
  // L (black-white)
5263
5263
  3
5264
5264
  // RGB
5265
- ], El = [
5265
+ ], wl = [
5266
5266
  192,
5267
5267
  // ("SOF0", "Baseline DCT", SOF)
5268
5268
  193,
@@ -5289,7 +5289,7 @@ const gl = () => new Promise((s) => {
5289
5289
  // ("SOF14", "Differential progressive DCT (AC)", SOF)
5290
5290
  207
5291
5291
  // ("SOF15", "Differential spatial (AC)", SOF)
5292
- ], Fi = {
5292
+ ], Mi = {
5293
5293
  squareSide: [
5294
5294
  // Safari (iOS < 9, ram >= 256)
5295
5295
  // We are supported mobile safari < 9 since widget v2, by 5 Mpx limit
@@ -5333,22 +5333,22 @@ const gl = () => new Promise((s) => {
5333
5333
  // but we will not use them
5334
5334
  65535
5335
5335
  ]
5336
- }, Al = async (s) => {
5336
+ }, El = async (s) => {
5337
5337
  let i = !1;
5338
- const { promiseReadJpegChunks: e, stack: t } = _t();
5338
+ const { promiseReadJpegChunks: e, stack: t } = bt();
5339
5339
  return await e(s).then(() => (t.forEach(({ marker: r, view: n }) => {
5340
- if (!i && El.indexOf(r) >= 0) {
5340
+ if (!i && wl.indexOf(r) >= 0) {
5341
5341
  const o = n.getUint8(5);
5342
- wl.indexOf(o) < 0 && (i = !0);
5342
+ Cl.indexOf(o) < 0 && (i = !0);
5343
5343
  }
5344
5344
  }), i)).catch(() => i);
5345
- }, Us = (s, i) => {
5345
+ }, Ps = (s, i) => {
5346
5346
  const e = {};
5347
5347
  return (...t) => {
5348
5348
  const r = i(t, e);
5349
5349
  return r in e ? e[r] : e[r] = s(...t);
5350
5350
  };
5351
- }, Rs = (s, i) => {
5351
+ }, Us = (s, i) => {
5352
5352
  const [e] = s, t = Object.keys(i).map((r) => parseInt(r, 10)).sort((r, n) => r - n);
5353
5353
  for (let r = 0; r < t.length; r++) {
5354
5354
  const n = t[r], o = !!i[n];
@@ -5361,12 +5361,12 @@ const gl = () => new Promise((s) => {
5361
5361
  G: 110,
5362
5362
  B: 165,
5363
5363
  A: 255
5364
- }, Tl = `rgba(${he.R}, ${he.G}, ${he.B}, ${he.A / 255})`, Ms = (s, i) => {
5364
+ }, Al = `rgba(${he.R}, ${he.G}, ${he.B}, ${he.A / 255})`, Rs = (s, i) => {
5365
5365
  try {
5366
- const e = [s - 1, i - 1, 1, 1], { canvas: t, ctx: r } = Ge();
5366
+ const e = [s - 1, i - 1, 1, 1], { canvas: t, ctx: r } = qe();
5367
5367
  t.width = 1, t.height = 1;
5368
- const { canvas: n, ctx: o } = Ge();
5369
- n.width = s, n.height = i, o && (o.fillStyle = Tl, o.fillRect(...e), r.drawImage(n, s - 1, i - 1, 1, 1, 0, 0, 1, 1));
5368
+ const { canvas: n, ctx: o } = qe();
5369
+ n.width = s, n.height = i, o && (o.fillStyle = Al, o.fillRect(...e), r.drawImage(n, s - 1, i - 1, 1, 1, 0, 0, 1, 1));
5370
5370
  const l = r && r.getImageData(0, 0, 1, 1).data;
5371
5371
  let a = !1;
5372
5372
  return l && (a = l[0] === he.R && l[1] === he.G && l[2] === he.B && l[3] === he.A), n.width = n.height = 1, a;
@@ -5374,7 +5374,7 @@ const gl = () => new Promise((s) => {
5374
5374
  return console.error(`Failed to test for max canvas size of ${s}x${i}.`), !1;
5375
5375
  }
5376
5376
  };
5377
- function Fs(s) {
5377
+ function Ms(s) {
5378
5378
  return (...i) => new Promise((e) => {
5379
5379
  setTimeout(() => {
5380
5380
  const t = s(...i);
@@ -5382,71 +5382,71 @@ function Fs(s) {
5382
5382
  }, 0);
5383
5383
  });
5384
5384
  }
5385
- const $l = Fs(Us(Ms, Rs)), Sl = Fs(Us(Ms, Rs)), Ds = async (s, i) => {
5386
- const e = Fi.squareSide.find((o) => o * o >= s * i), t = Fi.dimension.find((o) => o >= s && o >= i);
5385
+ const Tl = Ms(Ps(Rs, Us)), $l = Ms(Ps(Rs, Us)), Fs = async (s, i) => {
5386
+ const e = Mi.squareSide.find((o) => o * o >= s * i), t = Mi.dimension.find((o) => o >= s && o >= i);
5387
5387
  if (!e || !t)
5388
5388
  throw new Error("Not supported");
5389
5389
  const [r, n] = await Promise.all([
5390
- $l(e, e),
5391
- Sl(t, 1)
5390
+ Tl(e, e),
5391
+ $l(t, 1)
5392
5392
  ]);
5393
5393
  if (r && n)
5394
5394
  return !0;
5395
5395
  throw new Error("Not supported");
5396
- }, Ns = async (s, i, e) => {
5396
+ }, Ds = async (s, i, e) => {
5397
5397
  try {
5398
- const { ctx: t, canvas: r } = Ge();
5398
+ const { ctx: t, canvas: r } = qe();
5399
5399
  return r.width = i, r.height = e, t.imageSmoothingQuality = "high", t.drawImage(s, 0, 0, i, e), s instanceof HTMLImageElement && (s.src = "//:0"), s instanceof HTMLCanvasElement && (s.width = s.height = 1), r;
5400
5400
  } catch (t) {
5401
5401
  throw new Error("Canvas resize error", { cause: t });
5402
5402
  }
5403
- }, xl = ({ img: s, targetW: i, targetH: e }) => Ns(s, i, e), Il = function({ sourceW: s, targetW: i, targetH: e, step: t }) {
5403
+ }, Sl = ({ img: s, targetW: i, targetH: e }) => Ds(s, i, e), xl = function({ sourceW: s, targetW: i, targetH: e, step: t }) {
5404
5404
  const r = [];
5405
5405
  let n = i, o = e;
5406
5406
  do
5407
5407
  r.push([n, o]), n = Math.round(n / t), o = Math.round(o / t);
5408
5408
  while (n < s * t);
5409
5409
  return r.reverse();
5410
- }, Ol = ({ img: s, sourceW: i, targetW: e, targetH: t, step: r }) => Il({ sourceW: i, targetW: e, targetH: t, step: r }).reduce((o, [l, a]) => o.then((c) => Ds(l, a).then(() => Ns(c, l, a)).catch(() => c)), Promise.resolve(s)), kl = () => /iPad|iPhone|iPod/.test(navigator.platform) ? !0 : navigator.maxTouchPoints && navigator.maxTouchPoints > 2 && /MacIntel/.test(navigator.platform), Ll = navigator.maxTouchPoints && navigator.maxTouchPoints > 2 && /MacIntel/.test(navigator.platform), St = 0.71, Pl = (s, i) => {
5411
- if (s.width * St * s.height * St < i.size)
5410
+ }, Il = ({ img: s, sourceW: i, targetW: e, targetH: t, step: r }) => xl({ sourceW: i, targetW: e, targetH: t, step: r }).reduce((o, [l, a]) => o.then((c) => Fs(l, a).then(() => Ds(c, l, a)).catch(() => c)), Promise.resolve(s)), Ol = () => /iPad|iPhone|iPod/.test(navigator.platform) ? !0 : navigator.maxTouchPoints && navigator.maxTouchPoints > 2 && /MacIntel/.test(navigator.platform), kl = navigator.maxTouchPoints && navigator.maxTouchPoints > 2 && /MacIntel/.test(navigator.platform), $t = 0.71, Ll = (s, i) => {
5411
+ if (s.width * $t * s.height * $t < i.size)
5412
5412
  throw new Error("Not required");
5413
5413
  const e = s.width, t = s.height, r = e / t, n = Math.floor(Math.sqrt(i.size * r)), o = Math.floor(i.size / Math.sqrt(i.size * r));
5414
- return Ds(n, o).then(() => {
5415
- const { ctx: l } = Ge();
5416
- return "imageSmoothingQuality" in l && !kl() && !Ll ? xl({ img: s, targetW: n, targetH: o }) : Ol({ img: s, sourceW: e, targetW: n, targetH: o, step: St });
5414
+ return Fs(n, o).then(() => {
5415
+ const { ctx: l } = qe();
5416
+ return "imageSmoothingQuality" in l && !Ol() && !kl ? Sl({ img: s, targetW: n, targetH: o }) : Il({ img: s, sourceW: e, targetW: n, targetH: o, step: $t });
5417
5417
  }).catch(() => Promise.reject("Not supported"));
5418
- }, Ul = async (s, i) => {
5418
+ }, Pl = async (s, i) => {
5419
5419
  try {
5420
- if (await Al(s))
5420
+ if (await El(s))
5421
5421
  throw new Error("Should skipped");
5422
5422
  const t = await Promise.allSettled([
5423
- pl(s),
5424
- gl(),
5425
- cl(s)
5426
- ]), n = !t.some((g) => g.status === "rejected"), [o, l, a] = t, c = await ul(s).catch(() => s), h = await Cl(URL.createObjectURL(c));
5423
+ fl(s),
5424
+ ml(),
5425
+ al(s)
5426
+ ]), n = !t.some((g) => g.status === "rejected"), [o, l, a] = t, c = await hl(s).catch(() => s), h = await yl(URL.createObjectURL(c));
5427
5427
  URL.revokeObjectURL(h.src);
5428
- const d = await Pl(h, i);
5428
+ const d = await Ll(h, i);
5429
5429
  let f = "image/jpeg", m = (i == null ? void 0 : i.quality) || 0.8;
5430
- !n && fl(d) && (f = "image/png", m = void 0);
5431
- let p = await dl(d, f, m);
5430
+ !n && dl(d) && (f = "image/png", m = void 0);
5431
+ let p = await ul(d, f, m);
5432
5432
  if (n && o.status === "fulfilled" && o.value) {
5433
5433
  const g = o.value, w = l.status === "fulfilled" ? l.value : !1;
5434
- p = await vl(p, g, w);
5434
+ p = await _l(p, g, w);
5435
5435
  }
5436
- return n && a.status === "fulfilled" && a.value.length > 0 && (p = await Ps(p, a.value)), p;
5436
+ return n && a.status === "fulfilled" && a.value.length > 0 && (p = await Ls(p, a.value)), p;
5437
5437
  } catch (e) {
5438
5438
  let t;
5439
5439
  throw e instanceof Error && (t = e.message), typeof e == "string" && (t = e), new Error(`Failed to shrink image. ${t ? `Message: "${t}".` : ""}`, { cause: e });
5440
5440
  }
5441
5441
  };
5442
- function zs(s) {
5442
+ function Ns(s) {
5443
5443
  let i = new Blob([s], {
5444
5444
  type: "image/svg+xml"
5445
5445
  });
5446
5446
  return URL.createObjectURL(i);
5447
5447
  }
5448
- function Rl(s = "#fff", i = "rgba(0, 0, 0, .1)") {
5449
- return zs(
5448
+ function Ul(s = "#fff", i = "rgba(0, 0, 0, .1)") {
5449
+ return Ns(
5450
5450
  /*svg*/
5451
5451
  `<svg height="20" width="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
5452
5452
  <rect x="0" y="0" width="20" height="20" fill="${s}" />
@@ -5455,8 +5455,8 @@ function Rl(s = "#fff", i = "rgba(0, 0, 0, .1)") {
5455
5455
  </svg>`
5456
5456
  );
5457
5457
  }
5458
- function Di(s = "hsl(209, 21%, 65%)", i = 32, e = 32) {
5459
- return zs(
5458
+ function Fi(s = "hsl(209, 21%, 65%)", i = 32, e = 32) {
5459
+ return Ns(
5460
5460
  /*svg*/
5461
5461
  `
5462
5462
  <svg width="${i}" height="${e}" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">
@@ -5465,7 +5465,7 @@ function Di(s = "hsl(209, 21%, 65%)", i = 32, e = 32) {
5465
5465
  `
5466
5466
  );
5467
5467
  }
5468
- function Ml(s, i = 40) {
5468
+ function Rl(s, i = 40) {
5469
5469
  if (s.type === "image/svg+xml")
5470
5470
  return URL.createObjectURL(s);
5471
5471
  let e = document.createElement("canvas"), t = e.getContext("2d"), r = new Image(), n = new Promise((o, l) => {
@@ -5485,11 +5485,11 @@ function Ml(s, i = 40) {
5485
5485
  });
5486
5486
  return r.src = URL.createObjectURL(s), n;
5487
5487
  }
5488
- const Ni = 16384, Fl = /^([0-9]+)x([0-9]+)(?:\s+(\d{1,2}|100)%)?$/i, Dl = (s) => {
5489
- const i = Fl.exec(s == null ? void 0 : s.toLocaleLowerCase()) || [];
5488
+ const Di = 16384, Ml = /^([0-9]+)x([0-9]+)(?:\s+(\d{1,2}|100)%)?$/i, Fl = (s) => {
5489
+ const i = Ml.exec(s == null ? void 0 : s.toLocaleLowerCase()) || [];
5490
5490
  if (!i.length)
5491
5491
  return !1;
5492
- const e = i[1] * i[2], t = Ni * Ni;
5492
+ const e = i[1] * i[2], t = Di * Di;
5493
5493
  return e > t ? (console.warn(
5494
5494
  `Shrinked size can not be larger than ${Math.floor(t / 1e3 / 1e3)}MP. You have set ${i[1]}x${i[2]} (${Math.ceil(e / 1e3 / 100) / 10}MP).`
5495
5495
  ), !1) : {
@@ -5589,15 +5589,15 @@ class we extends S {
5589
5589
  if (!e.getValue("thumbUrl"))
5590
5590
  if ((t = e.getValue("file")) != null && t.type.includes("image"))
5591
5591
  try {
5592
- let r = await Ml(e.getValue("file"), this.cfg.thumbSize);
5592
+ let r = await Rl(e.getValue("file"), this.cfg.thumbSize);
5593
5593
  e.setValue("thumbUrl", r);
5594
5594
  } catch {
5595
5595
  let n = window.getComputedStyle(this).getPropertyValue("--clr-generic-file-icon");
5596
- e.setValue("thumbUrl", Di(n));
5596
+ e.setValue("thumbUrl", Fi(n));
5597
5597
  }
5598
5598
  else {
5599
5599
  let r = window.getComputedStyle(this).getPropertyValue("--clr-generic-file-icon");
5600
- e.setValue("thumbUrl", Di(r));
5600
+ e.setValue("thumbUrl", Fi(r));
5601
5601
  }
5602
5602
  }
5603
5603
  /**
@@ -5681,14 +5681,14 @@ class we extends S {
5681
5681
  super.disconnectedCallback(), this._debouncedGenerateThumb.cancel(), (e = this._observer) == null || e.disconnect();
5682
5682
  }
5683
5683
  _settingsOfShrink() {
5684
- return Dl(this.cfg.imageShrink);
5684
+ return Fl(this.cfg.imageShrink);
5685
5685
  }
5686
5686
  /**
5687
5687
  * @private
5688
5688
  * @param {File} file
5689
5689
  */
5690
5690
  _processShrink(e) {
5691
- return Ul(e, this._settingsOfShrink());
5691
+ return Pl(e, this._settingsOfShrink());
5692
5692
  }
5693
5693
  async upload() {
5694
5694
  var r, n;
@@ -5717,7 +5717,7 @@ class we extends S {
5717
5717
  signal: o.signal,
5718
5718
  metadata: await this.getMetadataFor(e.uid)
5719
5719
  };
5720
- return this.debugPrint("upload options", h, f), hs(h, f);
5720
+ return this.debugPrint("upload options", h, f), cs(h, f);
5721
5721
  };
5722
5722
  let a = await this.$["*uploadQueue"].add(l);
5723
5723
  e.setMultipleValues({
@@ -5832,7 +5832,7 @@ ei.template = /* HTML */
5832
5832
  <slot></slot>
5833
5833
  </dialog>
5834
5834
  `;
5835
- const Vs = (s, i) => {
5835
+ const zs = (s, i) => {
5836
5836
  let e, t, r;
5837
5837
  const n = (...o) => {
5838
5838
  e ? (clearTimeout(t), t = setTimeout(
@@ -5853,7 +5853,7 @@ const Vs = (s, i) => {
5853
5853
  /** @type {unknown} */
5854
5854
  n;
5855
5855
  };
5856
- class Bs extends S {
5856
+ class Vs extends S {
5857
5857
  constructor() {
5858
5858
  super();
5859
5859
  // Context owner should have access to CSS l10n
@@ -5862,7 +5862,7 @@ class Bs extends S {
5862
5862
  u(this, "historyTracked", !0);
5863
5863
  u(this, "activityType", _.activities.UPLOAD_LIST);
5864
5864
  /** @private */
5865
- u(this, "_throttledHandleCollectionUpdate", Vs(() => {
5865
+ u(this, "_throttledHandleCollectionUpdate", zs(() => {
5866
5866
  this.isConnected && (this._updateUploadsState(), !this.couldOpenActivity && this.$["*currentActivity"] === this.activityType && this.historyBack());
5867
5867
  }, 300));
5868
5868
  this.init$ = {
@@ -5956,7 +5956,7 @@ class Bs extends S {
5956
5956
  super.destroyCallback(), this.uploadCollection.unobserveProperties(this._throttledHandleCollectionUpdate);
5957
5957
  }
5958
5958
  }
5959
- Bs.template = /* HTML */
5959
+ Vs.template = /* HTML */
5960
5960
  `
5961
5961
  <lr-activity-header>
5962
5962
  <span class="header-text">{{headerText}}</span>
@@ -5999,7 +5999,7 @@ Bs.template = /* HTML */
5999
5999
 
6000
6000
  <lr-drop-area ghost></lr-drop-area>
6001
6001
  `;
6002
- class js extends S {
6002
+ class Bs extends S {
6003
6003
  constructor() {
6004
6004
  super(...arguments);
6005
6005
  u(this, "couldBeCtxOwner", !0);
@@ -6032,7 +6032,7 @@ class js extends S {
6032
6032
  });
6033
6033
  }
6034
6034
  }
6035
- js.template = /* HTML */
6035
+ Bs.template = /* HTML */
6036
6036
  `
6037
6037
  <lr-activity-header>
6038
6038
  <button type="button" class="mini-btn" set="onclick: *historyBack">
@@ -6056,8 +6056,8 @@ js.template = /* HTML */
6056
6056
  ></button>
6057
6057
  </form>
6058
6058
  `;
6059
- const zi = () => typeof navigator.permissions < "u";
6060
- class Hs extends S {
6059
+ const Ni = () => typeof navigator.permissions < "u";
6060
+ class js extends S {
6061
6061
  constructor() {
6062
6062
  super(...arguments);
6063
6063
  u(this, "couldBeCtxOwner", !0);
@@ -6071,7 +6071,7 @@ class Hs extends S {
6071
6071
  shotBtnDisabled: !0,
6072
6072
  videoHidden: !0,
6073
6073
  messageHidden: !0,
6074
- requestBtnHidden: zi(),
6074
+ requestBtnHidden: Ni(),
6075
6075
  cameraSelectOptions: null,
6076
6076
  cameraSelectHidden: !0,
6077
6077
  l10nMessage: "",
@@ -6090,7 +6090,7 @@ class Hs extends S {
6090
6090
  });
6091
6091
  /** @private */
6092
6092
  u(this, "_onActivate", () => {
6093
- zi() && this._subscribePermissions(), this._capture();
6093
+ Ni() && this._subscribePermissions(), this._capture();
6094
6094
  });
6095
6095
  /** @private */
6096
6096
  u(this, "_onDeactivate", () => {
@@ -6194,7 +6194,7 @@ class Hs extends S {
6194
6194
  }
6195
6195
  }
6196
6196
  }
6197
- Hs.template = /* HTML */
6197
+ js.template = /* HTML */
6198
6198
  `
6199
6199
  <lr-activity-header>
6200
6200
  <button type="button" class="mini-btn" set="onclick: *historyBack">
@@ -6233,7 +6233,7 @@ Hs.template = /* HTML */
6233
6233
  </button>
6234
6234
  </div>
6235
6235
  `;
6236
- class Ws extends S {
6236
+ class Hs extends S {
6237
6237
  constructor() {
6238
6238
  super(...arguments);
6239
6239
  u(this, "requireCtxName", !0);
@@ -6245,13 +6245,13 @@ class Ws extends S {
6245
6245
  super.destroyCallback(), this.$["*eventEmitter"].unbindTarget(this);
6246
6246
  }
6247
6247
  }
6248
- Ws.EventType = x;
6249
- const Rt = (
6248
+ Hs.EventType = x;
6249
+ const Ut = (
6250
6250
  /** @type {UploadCtxProvider} */
6251
6251
  /** @type {unknown} */
6252
- Ws
6252
+ Hs
6253
6253
  );
6254
- class Nl {
6254
+ class Dl {
6255
6255
  constructor() {
6256
6256
  u(this, "captionL10nStr", "confirm-your-action");
6257
6257
  u(this, "messageL10Str", "are-you-sure");
@@ -6265,12 +6265,12 @@ class Nl {
6265
6265
  this.historyBack();
6266
6266
  }
6267
6267
  }
6268
- class Gs extends _ {
6268
+ class Ws extends _ {
6269
6269
  constructor() {
6270
6270
  super(...arguments);
6271
6271
  u(this, "activityType", _.activities.CONFIRMATION);
6272
6272
  /** @private */
6273
- u(this, "_defaults", new Nl());
6273
+ u(this, "_defaults", new Dl());
6274
6274
  u(this, "init$", {
6275
6275
  ...this.init$,
6276
6276
  activityCaption: "",
@@ -6304,7 +6304,7 @@ class Gs extends _ {
6304
6304
  });
6305
6305
  }
6306
6306
  }
6307
- Gs.template = /* HTML */
6307
+ Ws.template = /* HTML */
6308
6308
  `
6309
6309
  <lr-activity-header>
6310
6310
  <button type="button" class="mini-btn" set="onclick: *historyBack">
@@ -6349,7 +6349,7 @@ class qs extends S {
6349
6349
  }
6350
6350
  qs.template = /* HTML */
6351
6351
  ' <lr-progress-bar set="visible: visible; value: value"></lr-progress-bar> ';
6352
- class Xs extends $ {
6352
+ class Gs extends $ {
6353
6353
  constructor() {
6354
6354
  super(...arguments);
6355
6355
  /** @type {Number} */
@@ -6377,7 +6377,7 @@ class Xs extends $ {
6377
6377
  });
6378
6378
  }
6379
6379
  }
6380
- Xs.template = /* HTML */
6380
+ Gs.template = /* HTML */
6381
6381
  ' <div ref="line" class="progress"></div> ';
6382
6382
  const me = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=";
6383
6383
  class ti extends $ {
@@ -6391,7 +6391,7 @@ class ti extends $ {
6391
6391
  }
6392
6392
  initCallback() {
6393
6393
  super.initCallback(), this.sub("checkerboard", () => {
6394
- this.style.backgroundImage = this.hasAttribute("checkerboard") ? `url(${Rl()})` : "unset";
6394
+ this.style.backgroundImage = this.hasAttribute("checkerboard") ? `url(${Ul()})` : "unset";
6395
6395
  });
6396
6396
  }
6397
6397
  destroyCallback() {
@@ -6419,7 +6419,7 @@ ti.template = /* HTML */
6419
6419
  ti.bindAttributes({
6420
6420
  checkerboard: "checkerboard"
6421
6421
  });
6422
- function Ys(...s) {
6422
+ function Xs(...s) {
6423
6423
  return s.reduce((i, e) => {
6424
6424
  if (typeof e == "string")
6425
6425
  return i[e] = !0, i;
@@ -6428,22 +6428,22 @@ function Ys(...s) {
6428
6428
  return i;
6429
6429
  }, {});
6430
6430
  }
6431
- function q(...s) {
6432
- let i = Ys(...s);
6431
+ function G(...s) {
6432
+ let i = Xs(...s);
6433
6433
  return Object.keys(i).reduce((e, t) => (i[t] && e.push(t), e), []).join(" ");
6434
6434
  }
6435
- function zl(s, ...i) {
6436
- let e = Ys(...i);
6435
+ function Nl(s, ...i) {
6436
+ let e = Xs(...i);
6437
6437
  for (let t of Object.keys(e))
6438
6438
  s.classList.toggle(t, e[t]);
6439
6439
  }
6440
- const Vl = (s) => {
6440
+ const zl = (s) => {
6441
6441
  if (!s)
6442
6442
  return Q;
6443
- const i = so(s).filter((e) => Q.includes(e));
6443
+ const i = io(s).filter((e) => Q.includes(e));
6444
6444
  return i.length === 0 ? Q : i;
6445
6445
  };
6446
- function Bl(s) {
6446
+ function Vl(s) {
6447
6447
  return {
6448
6448
  "*originalUrl": null,
6449
6449
  "*faderEl": null,
@@ -6471,7 +6471,7 @@ function Bl(s) {
6471
6471
  uuid: null,
6472
6472
  cdnUrl: null,
6473
6473
  cropPreset: "",
6474
- tabs: qt(Q),
6474
+ tabs: Gt(Q),
6475
6475
  "presence.networkProblems": !1,
6476
6476
  "presence.modalCaption": !0,
6477
6477
  "presence.editorToolbar": !1,
@@ -6489,7 +6489,7 @@ function Bl(s) {
6489
6489
  "*on.apply": (i) => {
6490
6490
  if (!i)
6491
6491
  return;
6492
- let e = s.$["*originalUrl"], t = pe(gt(i), "preview"), r = j(e, t), n = {
6492
+ let e = s.$["*originalUrl"], t = pe(mt(i), "preview"), r = j(e, t), n = {
6493
6493
  originalUrl: e,
6494
6494
  cdnUrlModifiers: t,
6495
6495
  cdnUrl: r,
@@ -6513,7 +6513,7 @@ function Bl(s) {
6513
6513
  }
6514
6514
  };
6515
6515
  }
6516
- const jl = (
6516
+ const Bl = (
6517
6517
  /* HTML */
6518
6518
  `
6519
6519
  <div class="wrapper wrapper_desktop">
@@ -6556,7 +6556,7 @@ class Fe extends $ {
6556
6556
  u(this, "_debouncedShowLoader", H(this._showLoader.bind(this), 300));
6557
6557
  this.init$ = {
6558
6558
  ...this.init$,
6559
- ...Bl(this)
6559
+ ...Vl(this)
6560
6560
  };
6561
6561
  }
6562
6562
  /**
@@ -6592,7 +6592,7 @@ class Fe extends $ {
6592
6592
  if (t === this.$["*originalUrl"])
6593
6593
  return;
6594
6594
  this.$["*originalUrl"] = t;
6595
- const r = Xn(this.$.cdnUrl), n = Qn(r);
6595
+ const r = Gn(this.$.cdnUrl), n = Zn(r);
6596
6596
  this.$["*editorTransformations"] = n;
6597
6597
  } else if (this.$.uuid) {
6598
6598
  const e = We(this.cfg.cdnCname, this.$.uuid);
@@ -6628,15 +6628,15 @@ class Fe extends $ {
6628
6628
  let t = this.ref["img-el"];
6629
6629
  t.src !== e && (this._imgLoading = !0, t.src = e || me);
6630
6630
  }), this.sub("cropPreset", (e) => {
6631
- this.$["*cropPresetList"] = As(e);
6631
+ this.$["*cropPresetList"] = Es(e);
6632
6632
  }), this.sub(
6633
6633
  "tabs",
6634
6634
  /** @param {string} val */
6635
6635
  (e) => {
6636
- this.$["*tabList"] = Vl(e);
6636
+ this.$["*tabList"] = zl(e);
6637
6637
  }
6638
6638
  ), this.sub("*tabId", (e) => {
6639
- this.ref["img-el"].className = q("image", {
6639
+ this.ref["img-el"].className = G("image", {
6640
6640
  image_hidden_to_cropper: e === P.CROP,
6641
6641
  image_hidden_effects: e !== P.CROP
6642
6642
  });
@@ -6647,7 +6647,7 @@ class Fe extends $ {
6647
6647
  (e) => {
6648
6648
  if (Object.keys(e).length === 0)
6649
6649
  return;
6650
- let t = this.$["*originalUrl"], r = pe(gt(e), "preview"), n = j(t, r), o = {
6650
+ let t = this.$["*originalUrl"], r = pe(mt(e), "preview"), n = j(t, r), o = {
6651
6651
  originalUrl: t,
6652
6652
  cdnUrlModifiers: r,
6653
6653
  cdnUrl: n,
@@ -6666,14 +6666,14 @@ class Fe extends $ {
6666
6666
  }
6667
6667
  }
6668
6668
  u(Fe, "className", "cloud-image-editor");
6669
- Fe.template = jl;
6669
+ Fe.template = Bl;
6670
6670
  Fe.bindAttributes({
6671
6671
  uuid: "uuid",
6672
6672
  "cdn-url": "cdnUrl",
6673
6673
  "crop-preset": "cropPreset",
6674
6674
  tabs: "tabs"
6675
6675
  });
6676
- class Ks extends $ {
6676
+ class Ys extends $ {
6677
6677
  constructor() {
6678
6678
  super(), this.init$ = {
6679
6679
  ...this.init$,
@@ -6698,13 +6698,13 @@ class Ks extends $ {
6698
6698
  let i = this.$["*cropBox"];
6699
6699
  if (!i)
6700
6700
  return;
6701
- let { x: e, y: t, width: r, height: n } = i, o = this.ref["svg-el"], l = G("mask", { id: "backdrop-mask" }), a = G("rect", {
6701
+ let { x: e, y: t, width: r, height: n } = i, o = this.ref["svg-el"], l = q("mask", { id: "backdrop-mask" }), a = q("rect", {
6702
6702
  x: 0,
6703
6703
  y: 0,
6704
6704
  width: "100%",
6705
6705
  height: "100%",
6706
6706
  fill: "white"
6707
- }), c = G("rect", {
6707
+ }), c = q("rect", {
6708
6708
  x: e,
6709
6709
  y: t,
6710
6710
  width: r,
@@ -6712,7 +6712,7 @@ class Ks extends $ {
6712
6712
  fill: "black"
6713
6713
  });
6714
6714
  l.appendChild(a), l.appendChild(c);
6715
- let h = G("rect", {
6715
+ let h = q("rect", {
6716
6716
  x: 0,
6717
6717
  y: 0,
6718
6718
  width: "100%",
@@ -6756,19 +6756,19 @@ class Ks extends $ {
6756
6756
  Ie(n, p);
6757
6757
  } else {
6758
6758
  const p = Oe(
6759
- Math.min(d, f) / (Pt * 2 + je) / 2,
6759
+ Math.min(d, f) / (Lt * 2 + je) / 2,
6760
6760
  0,
6761
6761
  1
6762
6762
  );
6763
- let { d: g, center: w } = a ? co(i, t, p) : ho(
6763
+ let { d: g, center: w } = a ? ao(i, t, p) : co(
6764
6764
  i,
6765
6765
  /** @type {Extract<import('./types.js').Direction, 'n' | 's' | 'w' | 'e'>} */
6766
6766
  t,
6767
6767
  p
6768
6768
  );
6769
6769
  const E = Math.max(
6770
- Ai * Oe(Math.min(d, f) / Ai / 3, 0, 1),
6771
- ao
6770
+ Ei * Oe(Math.min(d, f) / Ei / 3, 0, 1),
6771
+ lo
6772
6772
  );
6773
6773
  Ie(n, {
6774
6774
  x: w[0] - E,
@@ -6780,7 +6780,7 @@ class Ks extends $ {
6780
6780
  let m = this._shouldThumbBeDisabled(t);
6781
6781
  o.setAttribute(
6782
6782
  "class",
6783
- q("thumb", {
6783
+ G("thumb", {
6784
6784
  "thumb--hidden": m,
6785
6785
  "thumb--visible": !m
6786
6786
  })
@@ -6802,14 +6802,14 @@ class Ks extends $ {
6802
6802
  let r = (
6803
6803
  /** @type {import('./types.js').Direction} */
6804
6804
  `${["n", "", "s"][e]}${["w", "", "e"][t]}`
6805
- ), n = G("g");
6805
+ ), n = q("g");
6806
6806
  n.classList.add("thumb"), n.setAttribute("with-effects", "");
6807
- let o = G("rect", {
6807
+ let o = q("rect", {
6808
6808
  fill: "transparent"
6809
- }), l = G("path", {
6809
+ }), l = q("path", {
6810
6810
  stroke: "currentColor",
6811
6811
  fill: "none",
6812
- "stroke-width": Es
6812
+ "stroke-width": ws
6813
6813
  });
6814
6814
  n.appendChild(l), n.appendChild(o), i[r] = {
6815
6815
  direction: r,
@@ -6822,7 +6822,7 @@ class Ks extends $ {
6822
6822
  }
6823
6823
  /** @private */
6824
6824
  _createGuides() {
6825
- let i = G("svg"), e = G("rect", {
6825
+ let i = q("svg"), e = q("rect", {
6826
6826
  x: 0,
6827
6827
  y: 0,
6828
6828
  width: "100%",
@@ -6834,7 +6834,7 @@ class Ks extends $ {
6834
6834
  });
6835
6835
  i.appendChild(e);
6836
6836
  for (let t = 1; t <= 2; t++) {
6837
- let r = G("line", {
6837
+ let r = q("line", {
6838
6838
  x1: `${Ke * t}%`,
6839
6839
  y1: "0%",
6840
6840
  x2: `${Ke * t}%`,
@@ -6846,7 +6846,7 @@ class Ks extends $ {
6846
6846
  i.appendChild(r);
6847
6847
  }
6848
6848
  for (let t = 1; t <= 2; t++) {
6849
- let r = G("line", {
6849
+ let r = q("line", {
6850
6850
  x1: "0%",
6851
6851
  y1: `${Ke * t}%`,
6852
6852
  x2: "100%",
@@ -6914,7 +6914,7 @@ class Ks extends $ {
6914
6914
  this._dragStartCrop ?? this.$["*cropBox"]
6915
6915
  );
6916
6916
  const l = (c = this.$["*cropPresetList"]) == null ? void 0 : c[0], a = l ? l.width / l.height : void 0;
6917
- if (i === "" ? o = fo({ rect: o, delta: [t, r], imageBox: n }) : o = wo({ rect: o, delta: [t, r], direction: i, aspectRatio: a, imageBox: n }), !Object.values(o).every((h) => Number.isFinite(h) && h >= 0)) {
6917
+ if (i === "" ? o = uo({ rect: o, delta: [t, r], imageBox: n }) : o = Co({ rect: o, delta: [t, r], direction: i, aspectRatio: a, imageBox: n }), !Object.values(o).every((h) => Number.isFinite(h) && h >= 0)) {
6918
6918
  console.error("CropFrame is trying to create invalid rectangle", {
6919
6919
  payload: o
6920
6920
  });
@@ -6938,14 +6938,14 @@ class Ks extends $ {
6938
6938
  width: n.width,
6939
6939
  height: n.height
6940
6940
  };
6941
- return Eo(o, [i.x, i.y]);
6941
+ return wo(o, [i.x, i.y]);
6942
6942
  });
6943
6943
  this._hoverThumb = e, this._updateCursor();
6944
6944
  }
6945
6945
  /** @private */
6946
6946
  _updateCursor() {
6947
6947
  let i = this._hoverThumb;
6948
- this.ref["svg-el"].style.cursor = i ? uo(i.direction) : "initial";
6948
+ this.ref["svg-el"].style.cursor = i ? ho(i.direction) : "initial";
6949
6949
  }
6950
6950
  /** @private */
6951
6951
  _render() {
@@ -6956,7 +6956,7 @@ class Ks extends $ {
6956
6956
  this._frameThumbs && Object.values(this._frameThumbs).map(({ groupNode: e }) => e).forEach((e) => {
6957
6957
  e.setAttribute(
6958
6958
  "class",
6959
- q("thumb", {
6959
+ G("thumb", {
6960
6960
  "thumb--hidden": !i,
6961
6961
  "thumb--visible": i
6962
6962
  })
@@ -6975,7 +6975,7 @@ class Ks extends $ {
6975
6975
  }), this.sub("dragging", (i) => {
6976
6976
  this._frameGuides && this._frameGuides.setAttribute(
6977
6977
  "class",
6978
- q({
6978
+ G({
6979
6979
  "guides--hidden": this._guidesHidden,
6980
6980
  "guides--visible": !this._guidesHidden && i,
6981
6981
  "guides--semi-hidden": !this._guidesHidden && !i
@@ -6987,9 +6987,9 @@ class Ks extends $ {
6987
6987
  super.destroyCallback(), document.removeEventListener("pointermove", this._handlePointerMove), document.removeEventListener("pointerup", this._handlePointerUp);
6988
6988
  }
6989
6989
  }
6990
- Ks.template = /* HTML */
6990
+ Ys.template = /* HTML */
6991
6991
  ' <svg class="svg" ref="svg-el" xmlns="http://www.w3.org/2000/svg"></svg> ';
6992
- class vt extends $ {
6992
+ class _t extends $ {
6993
6993
  constructor() {
6994
6994
  super(...arguments);
6995
6995
  u(this, "init$", {
@@ -7004,7 +7004,7 @@ class vt extends $ {
7004
7004
  super.initCallback(), this._titleEl = this.ref["title-el"], this._iconEl = this.ref["icon-el"], this.setAttribute("role", "button"), this.tabIndex === -1 && (this.tabIndex = 0), this.sub("title", (e) => {
7005
7005
  this._titleEl && (this._titleEl.style.display = e ? "block" : "none");
7006
7006
  }), this.sub("active", (e) => {
7007
- this.className = q({
7007
+ this.className = G({
7008
7008
  active: e,
7009
7009
  not_active: !e
7010
7010
  });
@@ -7013,25 +7013,25 @@ class vt extends $ {
7013
7013
  });
7014
7014
  }
7015
7015
  }
7016
- vt.template = /* HTML */
7016
+ _t.template = /* HTML */
7017
7017
  `
7018
7018
  <div class="before"></div>
7019
7019
  <lr-icon size="20" set="@name: icon;"></lr-icon>
7020
7020
  <div class="title" ref="title-el">{{title}}</div>
7021
7021
  `;
7022
- function Hl(s) {
7022
+ function jl(s) {
7023
7023
  let i = s + 90;
7024
7024
  return i = i >= 360 ? 0 : i, i;
7025
7025
  }
7026
- function Wl(s, i) {
7027
- return s === "rotate" ? Hl(i) : ["mirror", "flip"].includes(s) ? !i : null;
7026
+ function Hl(s, i) {
7027
+ return s === "rotate" ? jl(i) : ["mirror", "flip"].includes(s) ? !i : null;
7028
7028
  }
7029
- class Js extends vt {
7029
+ class Ks extends _t {
7030
7030
  initCallback() {
7031
7031
  super.initCallback(), this.defineAccessor("operation", (i) => {
7032
7032
  i && (this._operation = i, this.$.icon = i);
7033
7033
  }), this.$["on.click"] = (i) => {
7034
- let e = this.$["*cropperEl"].getValue(this._operation), t = Wl(this._operation, e);
7034
+ let e = this.$["*cropperEl"].getValue(this._operation), t = Hl(this._operation, e);
7035
7035
  this.$["*cropperEl"].setValue(this._operation, t);
7036
7036
  };
7037
7037
  }
@@ -7040,7 +7040,7 @@ const Ve = {
7040
7040
  FILTER: "filter",
7041
7041
  COLOR_OPERATION: "color_operation"
7042
7042
  }, de = "original";
7043
- class Zs extends $ {
7043
+ class Js extends $ {
7044
7044
  constructor() {
7045
7045
  super(...arguments);
7046
7046
  u(this, "init$", {
@@ -7108,7 +7108,7 @@ class Zs extends $ {
7108
7108
  });
7109
7109
  }
7110
7110
  }
7111
- Zs.template = /* HTML */
7111
+ Js.template = /* HTML */
7112
7112
  `
7113
7113
  <lr-slider-ui
7114
7114
  ref="slider-el"
@@ -7123,7 +7123,7 @@ function ii(s) {
7123
7123
  i.naturalWidth === 0 && (i.src = me);
7124
7124
  } };
7125
7125
  }
7126
- function Mt(s) {
7126
+ function Rt(s) {
7127
7127
  let i = [];
7128
7128
  for (let n of s) {
7129
7129
  let o = ii(n);
@@ -7136,7 +7136,7 @@ function Mt(s) {
7136
7136
  });
7137
7137
  } };
7138
7138
  }
7139
- class si extends vt {
7139
+ class si extends _t {
7140
7140
  constructor() {
7141
7141
  super(...arguments);
7142
7142
  u(this, "init$", {
@@ -7157,8 +7157,8 @@ class si extends vt {
7157
7157
  } : void 0, j(
7158
7158
  this._originalUrl,
7159
7159
  pe(
7160
- ws,
7161
- gt(l),
7160
+ Cs,
7161
+ mt(l),
7162
7162
  `quality/${n}`,
7163
7163
  `scale_crop/${r}x${r}/center`
7164
7164
  )
@@ -7217,7 +7217,7 @@ si.template = /* HTML */
7217
7217
  <div class="preview" ref="preview-el"></div>
7218
7218
  <lr-icon size="40" ref="icon-el" set="@name: icon; @size: iconSize;"></lr-icon>
7219
7219
  `;
7220
- class Qs extends vt {
7220
+ class Zs extends _t {
7221
7221
  constructor() {
7222
7222
  super(...arguments);
7223
7223
  /**
@@ -7239,7 +7239,7 @@ class Qs extends vt {
7239
7239
  });
7240
7240
  }
7241
7241
  }
7242
- function Gl(s, i) {
7242
+ function Wl(s, i) {
7243
7243
  let e = {};
7244
7244
  for (let t of i) {
7245
7245
  let r = s[t];
@@ -7252,8 +7252,8 @@ function ri(s, i, e) {
7252
7252
  return j(
7253
7253
  s,
7254
7254
  pe(
7255
- ws,
7256
- gt(e),
7255
+ Cs,
7256
+ mt(e),
7257
7257
  `quality/${o}`,
7258
7258
  `stretch/off/-/resize/${n}x`
7259
7259
  )
@@ -7265,14 +7265,14 @@ function ql(s) {
7265
7265
  ({ dimensions: e, coords: t }) => e.every((r) => r > 0) && t.every((r) => r >= 0)
7266
7266
  ].every((e) => e(s)) : !0;
7267
7267
  }
7268
- class er extends $ {
7268
+ class Qs extends $ {
7269
7269
  constructor() {
7270
7270
  super();
7271
7271
  u(this, "ctxOwner", !0);
7272
7272
  this.init$ = {
7273
7273
  ...this.init$,
7274
7274
  image: null,
7275
- "*padding": lo,
7275
+ "*padding": oo,
7276
7276
  /** @type {Operations} */
7277
7277
  "*operations": {
7278
7278
  rotate: 0,
@@ -7293,7 +7293,7 @@ class er extends $ {
7293
7293
  width: 0,
7294
7294
  height: 0
7295
7295
  }
7296
- }, this._commitDebounced = H(this._commit.bind(this), 300), this._handleResizeThrottled = Vs(this._handleResize.bind(this), 100), this._imageSize = { width: 0, height: 0 };
7296
+ }, this._commitDebounced = H(this._commit.bind(this), 300), this._handleResizeThrottled = zs(this._handleResize.bind(this), 100), this._imageSize = { width: 0, height: 0 };
7297
7297
  }
7298
7298
  /** @private */
7299
7299
  _handleResize() {
@@ -7301,7 +7301,7 @@ class er extends $ {
7301
7301
  }
7302
7302
  /** @private */
7303
7303
  _syncTransformations() {
7304
- let e = this.$["*editorTransformations"], t = Gl(e, Object.keys(this.$["*operations"])), r = { ...this.$["*operations"], ...t };
7304
+ let e = this.$["*editorTransformations"], t = Wl(e, Object.keys(this.$["*operations"])), r = { ...this.$["*operations"], ...t };
7305
7305
  this.$["*operations"] = r;
7306
7306
  }
7307
7307
  /** @private */
@@ -7349,7 +7349,7 @@ class er extends $ {
7349
7349
  );
7350
7350
  }
7351
7351
  const h = (f = this.$["*cropPresetList"]) == null ? void 0 : f[0], d = h ? h.width / h.height : void 0;
7352
- if (!Ao(e, t) || d && !To(e, d)) {
7352
+ if (!Eo(e, t) || d && !Ao(e, d)) {
7353
7353
  const m = t.width / t.height;
7354
7354
  let p = t.width, g = t.height;
7355
7355
  d && (m > d ? p = Math.min(t.height * d, t.width) : g = Math.min(t.width / d, t.height)), e = {
@@ -7382,7 +7382,7 @@ class er extends $ {
7382
7382
  */
7383
7383
  _animateIn({ fromViewer: e }) {
7384
7384
  this.$.image && (this.ref["frame-el"].toggleThumbs(!0), this._transitionToImage(), setTimeout(() => {
7385
- this.className = q({
7385
+ this.className = G({
7386
7386
  active_from_viewer: e,
7387
7387
  active_from_editor: !e,
7388
7388
  inactive_to_editor: !1
@@ -7474,7 +7474,7 @@ class er extends $ {
7474
7474
  }
7475
7475
  deactivate({ reset: e = !1 } = {}) {
7476
7476
  var t;
7477
- this._isActive && (!e && this._commit(), this._isActive = !1, this._transitionToCrop(), this.className = q({
7477
+ this._isActive && (!e && this._commit(), this._isActive = !1, this._transitionToCrop(), this.className = G({
7478
7478
  active_from_viewer: !1,
7479
7479
  active_from_editor: !1,
7480
7480
  inactive_to_editor: !0
@@ -7542,41 +7542,41 @@ class er extends $ {
7542
7542
  super.destroyCallback(), (e = this._observer) == null || e.disconnect();
7543
7543
  }
7544
7544
  }
7545
- er.template = /* HTML */
7545
+ Qs.template = /* HTML */
7546
7546
  `
7547
7547
  <canvas class="canvas" ref="canvas-el"></canvas>
7548
7548
  <lr-crop-frame ref="frame-el"></lr-crop-frame>
7549
7549
  `;
7550
- function Vi(s, i, e) {
7550
+ function zi(s, i, e) {
7551
7551
  let t = Array(e);
7552
7552
  e--;
7553
7553
  for (let r = e; r >= 0; r--)
7554
7554
  t[r] = Math.ceil((r * i + (e - r) * s) / e);
7555
7555
  return t;
7556
7556
  }
7557
- function Xl(s) {
7557
+ function Gl(s) {
7558
7558
  return s.reduce(
7559
7559
  (i, e, t) => t < s.length - 1 ? [...i, [e, s[t + 1]]] : i,
7560
7560
  []
7561
7561
  );
7562
7562
  }
7563
- function Yl(s, i, e) {
7564
- let t = Xl(s).find(([r, n]) => r <= i && i <= n);
7563
+ function Xl(s, i, e) {
7564
+ let t = Gl(s).find(([r, n]) => r <= i && i <= n);
7565
7565
  return s.map((r) => {
7566
7566
  let n = Math.abs(t[0] - t[1]), o = Math.abs(i - t[0]) / n;
7567
7567
  return t[0] === r ? i > e ? 1 : 1 - o : t[1] === r ? i >= e ? o : 1 : 0;
7568
7568
  });
7569
7569
  }
7570
- function Kl(s, i) {
7570
+ function Yl(s, i) {
7571
7571
  return s.map((e, t) => e < i ? s.length - t : t);
7572
7572
  }
7573
- function Bi(s, i) {
7573
+ function Vi(s, i) {
7574
7574
  let e = Pe[s].keypointsNumber, { range: t, zero: r } = Pe[s];
7575
- return [.../* @__PURE__ */ new Set([...Vi(t[0], r, e + 1), ...Vi(r, t[1], e + 1), r, i])].sort(
7575
+ return [.../* @__PURE__ */ new Set([...zi(t[0], r, e + 1), ...zi(r, t[1], e + 1), r, i])].sort(
7576
7576
  (n, o) => n - o
7577
7577
  );
7578
7578
  }
7579
- class Jl extends $ {
7579
+ class Kl extends $ {
7580
7580
  constructor() {
7581
7581
  super(), this._isActive = !1, this._hidden = !0, this._addKeypointDebounced = H(this._addKeypoint.bind(this), 600), this.classList.add("inactive_to_cropper");
7582
7582
  }
@@ -7683,7 +7683,7 @@ class Jl extends $ {
7683
7683
  */
7684
7684
  _update(i, e) {
7685
7685
  this._operation = i, this._value = e;
7686
- let { zero: t } = Pe[i], r = this._keypoints.map((l) => l.value), n = Yl(r, e, t), o = Kl(r, t);
7686
+ let { zero: t } = Pe[i], r = this._keypoints.map((l) => l.value), n = Xl(r, e, t), o = Yl(r, t);
7687
7687
  for (let [l, a] of Object.entries(this._keypoints))
7688
7688
  a.opacity = n[l], a.zIndex = o[l];
7689
7689
  this._flush();
@@ -7699,7 +7699,7 @@ class Jl extends $ {
7699
7699
  this._previewImage = this._previewImage || this._createPreviewImage(), !this.contains(this._previewImage) && i.appendChild(this._previewImage);
7700
7700
  let e = document.createElement("div");
7701
7701
  i.appendChild(e);
7702
- let t = this._keypoints.map((c) => c.src), { images: r, promise: n, cancel: o } = Mt(t);
7702
+ let t = this._keypoints.map((c) => c.src), { images: r, promise: n, cancel: o } = Rt(t);
7703
7703
  r.forEach((c) => {
7704
7704
  let h = this._handleImageLoading(c.src);
7705
7705
  c.addEventListener("load", h), c.addEventListener("error", h);
@@ -7734,14 +7734,14 @@ class Jl extends $ {
7734
7734
  */
7735
7735
  preload({ url: i, filter: e, operation: t, value: r }) {
7736
7736
  this._cancelBatchPreload && this._cancelBatchPreload();
7737
- let o = Bi(t, r).map((a) => this._imageSrc({ url: i, filter: e, operation: t, value: a })), { cancel: l } = Mt(o);
7737
+ let o = Vi(t, r).map((a) => this._imageSrc({ url: i, filter: e, operation: t, value: a })), { cancel: l } = Rt(o);
7738
7738
  this._cancelBatchPreload = l;
7739
7739
  }
7740
7740
  /** @private */
7741
7741
  _setOriginalSrc(i) {
7742
7742
  let e = this._previewImage || this._createPreviewImage();
7743
7743
  if (!this.contains(e) && this.appendChild(e), this._previewImage = e, e.src === i) {
7744
- e.style.opacity = "1", e.style.transform = "scale(1)", this.className = q({
7744
+ e.style.opacity = "1", e.style.transform = "scale(1)", this.className = G({
7745
7745
  active_from_viewer: this._fromViewer,
7746
7746
  active_from_cropper: !this._fromViewer,
7747
7747
  inactive_to_cropper: !1
@@ -7753,7 +7753,7 @@ class Jl extends $ {
7753
7753
  e.addEventListener("error", t, { once: !0 }), e.src = i, e.addEventListener(
7754
7754
  "load",
7755
7755
  () => {
7756
- t(), e && (e.style.opacity = "1", e.style.transform = "scale(1)", this.className = q({
7756
+ t(), e && (e.style.opacity = "1", e.style.transform = "scale(1)", this.className = G({
7757
7757
  active_from_viewer: this._fromViewer,
7758
7758
  active_from_cropper: !this._fromViewer,
7759
7759
  inactive_to_cropper: !1
@@ -7782,11 +7782,11 @@ class Jl extends $ {
7782
7782
  this._setOriginalSrc(l), this._container && this._container.remove();
7783
7783
  return;
7784
7784
  }
7785
- this._keypoints = Bi(e, t).map((l) => this._constructKeypoint(e, l)), this._update(e, t), this._initNodes();
7785
+ this._keypoints = Vi(e, t).map((l) => this._constructKeypoint(e, l)), this._update(e, t), this._initNodes();
7786
7786
  }
7787
7787
  /** @param {{ hide?: Boolean }} options */
7788
7788
  deactivate({ hide: i = !0 } = {}) {
7789
- this._isActive = !1, this._cancelLastImages && this._cancelLastImages(), this._cancelBatchPreload && this._cancelBatchPreload(), i && !this._hidden ? (this._hidden = !0, this._previewImage && (this._previewImage.style.transform = "scale(1)"), this.className = q({
7789
+ this._isActive = !1, this._cancelLastImages && this._cancelLastImages(), this._cancelBatchPreload && this._cancelBatchPreload(), i && !this._hidden ? (this._hidden = !0, this._previewImage && (this._previewImage.style.transform = "scale(1)"), this.className = G({
7790
7790
  active_from_viewer: !1,
7791
7791
  active_from_cropper: !1,
7792
7792
  inactive_to_cropper: !0
@@ -7799,19 +7799,19 @@ class Jl extends $ {
7799
7799
  )) : this._container && this._container.remove();
7800
7800
  }
7801
7801
  }
7802
- const Zl = 1;
7803
- class tr extends $ {
7802
+ const Jl = 1;
7803
+ class er extends $ {
7804
7804
  initCallback() {
7805
7805
  super.initCallback(), this.addEventListener("wheel", (i) => {
7806
7806
  i.preventDefault();
7807
7807
  let { deltaY: e, deltaX: t } = i;
7808
- Math.abs(t) > Zl ? this.scrollLeft += t : this.scrollLeft += e;
7808
+ Math.abs(t) > Jl ? this.scrollLeft += t : this.scrollLeft += e;
7809
7809
  });
7810
7810
  }
7811
7811
  }
7812
- tr.template = /* HTML */
7812
+ er.template = /* HTML */
7813
7813
  " <slot></slot> ";
7814
- function Ql(s) {
7814
+ function Zl(s) {
7815
7815
  return (
7816
7816
  /* HTML */
7817
7817
  `
@@ -7829,7 +7829,7 @@ function Ql(s) {
7829
7829
  `
7830
7830
  );
7831
7831
  }
7832
- function ea(s) {
7832
+ function Ql(s) {
7833
7833
  return (
7834
7834
  /* HTML */
7835
7835
  `
@@ -7843,7 +7843,7 @@ function ea(s) {
7843
7843
  `
7844
7844
  );
7845
7845
  }
7846
- class ir extends $ {
7846
+ class tr extends $ {
7847
7847
  constructor() {
7848
7848
  super();
7849
7849
  u(this, "_updateInfoTooltip", H(() => {
@@ -7872,9 +7872,9 @@ class ir extends $ {
7872
7872
  "*currentFilter": de,
7873
7873
  "*currentOperation": null,
7874
7874
  showLoader: !1,
7875
- filters: to,
7876
- colorOperations: eo,
7877
- cropOperations: io,
7875
+ filters: eo,
7876
+ colorOperations: Qn,
7877
+ cropOperations: to,
7878
7878
  "*operationTooltip": null,
7879
7879
  "presence.mainToolbar": !0,
7880
7880
  "presence.subToolbar": !1,
@@ -7936,7 +7936,7 @@ class ir extends $ {
7936
7936
  * @param {String} operation
7937
7937
  */
7938
7938
  _createOperationControl(e) {
7939
- let t = new Qs();
7939
+ let t = new Zs();
7940
7940
  return t.operation = e, t;
7941
7941
  }
7942
7942
  /**
@@ -7952,7 +7952,7 @@ class ir extends $ {
7952
7952
  * @param {String} operation
7953
7953
  */
7954
7954
  _createToggleControl(e) {
7955
- let t = new Js();
7955
+ let t = new Ks();
7956
7956
  return t.operation = e, t;
7957
7957
  }
7958
7958
  /**
@@ -8010,7 +8010,7 @@ class ir extends $ {
8010
8010
  if (this.$["*imgContainerEl"] && this.$["*originalUrl"]) {
8011
8011
  let e = this.$["*imgContainerEl"].offsetWidth, t = this.proxyUrl(ri(this.$["*originalUrl"], e, this.$["*editorTransformations"]));
8012
8012
  this._cancelPreload && this._cancelPreload();
8013
- let { cancel: r } = Mt([t]);
8013
+ let { cancel: r } = Rt([t]);
8014
8014
  this._cancelPreload = () => {
8015
8015
  r(), this._cancelPreload = void 0;
8016
8016
  };
@@ -8067,7 +8067,7 @@ class ir extends $ {
8067
8067
  }), this._updateInfoTooltip();
8068
8068
  }
8069
8069
  }
8070
- ir.template = /* HTML */
8070
+ tr.template = /* HTML */
8071
8071
  `
8072
8072
  <lr-line-loader-ui set="active: showLoader"></lr-line-loader-ui>
8073
8073
  <div class="info-tooltip_container">
@@ -8077,12 +8077,12 @@ ir.template = /* HTML */
8077
8077
  </div>
8078
8078
  <div class="toolbar-container">
8079
8079
  <lr-presence-toggle class="sub-toolbar" set="visible: presence.mainToolbar; styles: presence.subTopToolbarStyles">
8080
- <div class="tab-content-row">${Q.map(ea).join("")}</div>
8080
+ <div class="tab-content-row">${Q.map(Ql).join("")}</div>
8081
8081
  <div class="controls-row">
8082
8082
  <lr-btn-ui theme="boring" icon="closeMax" set="onclick: on.cancel"> </lr-btn-ui>
8083
8083
  <lr-presence-toggle class="tab-toggles" set="visible: presence.tabToggles; styles: presence.tabTogglesStyles">
8084
8084
  <div ref="tabs-indicator" class="tab-toggles_indicator"></div>
8085
- ${Q.map(Ql).join("")}
8085
+ ${Q.map(Zl).join("")}
8086
8086
  </lr-presence-toggle>
8087
8087
  <lr-btn-ui theme="primary" icon="done" set="onclick: on.apply"> </lr-btn-ui>
8088
8088
  </div>
@@ -8111,7 +8111,7 @@ class ni extends $ {
8111
8111
  });
8112
8112
  }
8113
8113
  _iconCss() {
8114
- return q("icon", {
8114
+ return G("icon", {
8115
8115
  icon_left: !this._iconReversed,
8116
8116
  icon_right: this._iconReversed,
8117
8117
  icon_hidden: this._iconHidden,
@@ -8137,7 +8137,7 @@ ni.template = /* HTML */
8137
8137
  <lr-icon size="20" set="className: iconCss; @name: icon;"></lr-icon>
8138
8138
  <div class="text">{{text}}</div>
8139
8139
  `;
8140
- class sr extends $ {
8140
+ class ir extends $ {
8141
8141
  constructor() {
8142
8142
  super(), this._active = !1, this._handleTransitionEndRight = () => {
8143
8143
  let i = this.ref["line-el"];
@@ -8160,7 +8160,7 @@ class sr extends $ {
8160
8160
  this._active = !1;
8161
8161
  }
8162
8162
  }
8163
- sr.template = /* HTML */
8163
+ ir.template = /* HTML */
8164
8164
  `
8165
8165
  <div class="inner">
8166
8166
  <div class="line" ref="line-el"></div>
@@ -8171,7 +8171,7 @@ const et = {
8171
8171
  visible: "visible",
8172
8172
  hidden: "hidden"
8173
8173
  };
8174
- class rr extends $ {
8174
+ class sr extends $ {
8175
8175
  constructor() {
8176
8176
  super(), this._visible = !1, this._visibleStyle = et.visible, this._hiddenStyle = et.hidden, this._externalTransitions = !1, this.defineAccessor("styles", (i) => {
8177
8177
  i && (this._externalTransitions = !0, this._visibleStyle = i.visible, this._hiddenStyle = i.hidden);
@@ -8180,7 +8180,7 @@ class rr extends $ {
8180
8180
  });
8181
8181
  }
8182
8182
  _handleVisible() {
8183
- this.style.visibility = this._visible ? "inherit" : "hidden", zl(this, {
8183
+ this.style.visibility = this._visible ? "inherit" : "hidden", Nl(this, {
8184
8184
  [et.transition]: !this._externalTransitions,
8185
8185
  [this._visibleStyle]: this._visible,
8186
8186
  [this._hiddenStyle]: !this._visible
@@ -8190,9 +8190,9 @@ class rr extends $ {
8190
8190
  super.initCallback(), this.setAttribute("hidden", ""), this._externalTransitions || this.classList.add(et.transition), this._handleVisible(), setTimeout(() => this.removeAttribute("hidden"), 0);
8191
8191
  }
8192
8192
  }
8193
- rr.template = /* HTML */
8193
+ sr.template = /* HTML */
8194
8194
  " <slot></slot> ";
8195
- class nr extends $ {
8195
+ class rr extends $ {
8196
8196
  constructor() {
8197
8197
  super();
8198
8198
  u(this, "init$", {
@@ -8283,7 +8283,7 @@ class nr extends $ {
8283
8283
  (e = this._observer) == null || e.disconnect();
8284
8284
  }
8285
8285
  }
8286
- nr.template = /* HTML */
8286
+ rr.template = /* HTML */
8287
8287
  `
8288
8288
  <div class="steps" ref="steps-el"></div>
8289
8289
  <div ref="thumb-el" class="thumb"></div>
@@ -8295,7 +8295,7 @@ nr.template = /* HTML */
8295
8295
  set="oninput: on.sliderInput; onchange: on.sliderChange; @min: min; @max: max; @value: defaultValue;"
8296
8296
  />
8297
8297
  `;
8298
- class ta extends S {
8298
+ class ea extends S {
8299
8299
  constructor() {
8300
8300
  super();
8301
8301
  u(this, "couldBeCtxOwner", !0);
@@ -8358,22 +8358,22 @@ class ta extends S {
8358
8358
  this._instance = void 0, this.innerHTML = "";
8359
8359
  }
8360
8360
  }
8361
- const ia = function(s) {
8361
+ const ta = function(s) {
8362
8362
  return s.replace(/[\\-\\[]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
8363
- }, sa = function(s, i = "i") {
8364
- const e = s.split("*").map(ia);
8363
+ }, ia = function(s, i = "i") {
8364
+ const e = s.split("*").map(ta);
8365
8365
  return new RegExp("^" + e.join(".+") + "$", i);
8366
8366
  };
8367
- let ra = (s) => Object.keys(s).reduce((e, t) => {
8367
+ let sa = (s) => Object.keys(s).reduce((e, t) => {
8368
8368
  let r = s[t], n = Object.keys(r).reduce((o, l) => {
8369
8369
  let a = r[l];
8370
8370
  return o + `${l}: ${a};`;
8371
8371
  }, "");
8372
8372
  return e + `${t}{${n}}`;
8373
8373
  }, "");
8374
- function na({ textColor: s, backgroundColor: i, linkColor: e, linkColorHover: t, shadeColor: r }) {
8374
+ function ra({ textColor: s, backgroundColor: i, linkColor: e, linkColorHover: t, shadeColor: r }) {
8375
8375
  let n = `solid 1px ${r}`;
8376
- return ra({
8376
+ return sa({
8377
8377
  body: {
8378
8378
  color: s,
8379
8379
  "background-color": i
@@ -8454,18 +8454,18 @@ window.addEventListener("message", (s) => {
8454
8454
  s.source === t && r(i);
8455
8455
  }
8456
8456
  });
8457
- const oa = function(s, i, e) {
8457
+ const na = function(s, i, e) {
8458
8458
  s in fe || (fe[s] = []), fe[s].push([i, e]);
8459
- }, la = function(s, i) {
8459
+ }, oa = function(s, i) {
8460
8460
  s in fe && (fe[s] = fe[s].filter((e) => e[0] !== i));
8461
8461
  };
8462
- function aa(s) {
8462
+ function la(s) {
8463
8463
  let i = [];
8464
8464
  for (let [e, t] of Object.entries(s))
8465
8465
  t == null || typeof t == "string" && t.length === 0 || i.push(`${e}=${encodeURIComponent(t)}`);
8466
8466
  return i.join("&");
8467
8467
  }
8468
- class or extends S {
8468
+ class nr extends S {
8469
8469
  constructor() {
8470
8470
  super();
8471
8471
  u(this, "couldBeCtxOwner", !0);
@@ -8522,7 +8522,7 @@ class or extends S {
8522
8522
  if (e.alternatives) {
8523
8523
  const t = le(this.cfg.externalSourcesPreferredTypes);
8524
8524
  for (const r of t) {
8525
- const n = sa(r);
8525
+ const n = ia(r);
8526
8526
  for (const [o, l] of Object.entries(e.alternatives))
8527
8527
  if (n.test(o))
8528
8528
  return l;
@@ -8567,7 +8567,7 @@ class or extends S {
8567
8567
  };
8568
8568
  this.sendMessage({
8569
8569
  type: "embed-css",
8570
- style: na(e)
8570
+ style: ra(e)
8571
8571
  });
8572
8572
  }
8573
8573
  /** @private */
@@ -8580,11 +8580,11 @@ class or extends S {
8580
8580
  pass_window_open: !1,
8581
8581
  session_key: t
8582
8582
  }, a = new URL(`/window3/${n}`, r);
8583
- return a.search = aa(l), a.toString();
8583
+ return a.search = la(l), a.toString();
8584
8584
  }
8585
8585
  /** @private */
8586
8586
  mountIframe() {
8587
- let e = Dt({
8587
+ let e = Ft({
8588
8588
  tag: "iframe",
8589
8589
  attributes: {
8590
8590
  src: this.remoteUrl(),
@@ -8594,14 +8594,14 @@ class or extends S {
8594
8594
  allowTransparency: !0
8595
8595
  }
8596
8596
  });
8597
- e.addEventListener("load", this.handleIframeLoad.bind(this)), this.ref.iframeWrapper.innerHTML = "", this.ref.iframeWrapper.appendChild(e), oa("file-selected", e.contentWindow, this.handleFileSelected.bind(this)), this._iframe = e, this.$.selectedList = [];
8597
+ e.addEventListener("load", this.handleIframeLoad.bind(this)), this.ref.iframeWrapper.innerHTML = "", this.ref.iframeWrapper.appendChild(e), na("file-selected", e.contentWindow, this.handleFileSelected.bind(this)), this._iframe = e, this.$.selectedList = [];
8598
8598
  }
8599
8599
  /** @private */
8600
8600
  unmountIframe() {
8601
- this._iframe && la("file-selected", this._iframe.contentWindow), this.ref.iframeWrapper.innerHTML = "", this._iframe = null, this.$.selectedList = [], this.$.counter = 0;
8601
+ this._iframe && oa("file-selected", this._iframe.contentWindow), this.ref.iframeWrapper.innerHTML = "", this._iframe = null, this.$.selectedList = [], this.$.counter = 0;
8602
8602
  }
8603
8603
  }
8604
- or.template = /* HTML */
8604
+ nr.template = /* HTML */
8605
8605
  `
8606
8606
  <lr-activity-header>
8607
8607
  <button type="button" class="mini-btn" set="onclick: *historyBack">
@@ -8643,7 +8643,7 @@ class oi extends $ {
8643
8643
  if (!i)
8644
8644
  return;
8645
8645
  le(i).forEach((t) => {
8646
- let r = Dt({
8646
+ let r = Ft({
8647
8647
  tag: "div",
8648
8648
  attributes: {
8649
8649
  class: "tab"
@@ -8672,14 +8672,14 @@ oi.template = /* HTML */
8672
8672
  <slot></slot>
8673
8673
  </div>
8674
8674
  `;
8675
- class ca extends S {
8675
+ class aa extends S {
8676
8676
  constructor() {
8677
8677
  super(...arguments);
8678
8678
  u(this, "requireCtxName", !0);
8679
8679
  }
8680
8680
  _createValidationInput() {
8681
8681
  const e = document.createElement("input");
8682
- return e.type = "text", e.name = this.ctxName, e.required = this.cfg.multipleMin > 0, e.tabIndex = -1, Yi(e, {
8682
+ return e.type = "text", e.name = this.ctxName, e.required = this.cfg.multipleMin > 0, e.tabIndex = -1, Xi(e, {
8683
8683
  opacity: 0,
8684
8684
  height: 0,
8685
8685
  width: 0
@@ -8727,9 +8727,9 @@ class ca extends S {
8727
8727
  );
8728
8728
  }
8729
8729
  }
8730
- class ha extends _ {
8730
+ class ca extends _ {
8731
8731
  }
8732
- class lr extends $ {
8732
+ class or extends $ {
8733
8733
  constructor() {
8734
8734
  super(...arguments);
8735
8735
  u(this, "init$", {
@@ -8755,7 +8755,7 @@ class lr extends $ {
8755
8755
  });
8756
8756
  }
8757
8757
  }
8758
- lr.template = /* HTML */
8758
+ or.template = /* HTML */
8759
8759
  `
8760
8760
  <button>
8761
8761
  {{currentText}}
@@ -8772,7 +8772,7 @@ const M = {
8772
8772
  VOL_OFF: "mute",
8773
8773
  CAP_ON: "captions",
8774
8774
  CAP_OFF: "captions-off"
8775
- }, ji = {
8775
+ }, Bi = {
8776
8776
  requestFullscreen: (s) => {
8777
8777
  s.requestFullscreen ? s.requestFullscreen() : s.webkitRequestFullscreen && s.webkitRequestFullscreen();
8778
8778
  },
@@ -8822,7 +8822,7 @@ class ne extends $ {
8822
8822
  this._video.paused || this._video.ended ? this._video.play() : this._video.pause();
8823
8823
  }
8824
8824
  toggleFullscreen() {
8825
- (document.fullscreenElement || document.webkitFullscreenElement) === this ? ji.exitFullscreen() : ji.requestFullscreen(this);
8825
+ (document.fullscreenElement || document.webkitFullscreenElement) === this ? Bi.exitFullscreen() : Bi.requestFullscreen(this);
8826
8826
  }
8827
8827
  toggleCaptions() {
8828
8828
  this.$.capIcon === M.CAP_OFF ? (this.$.capIcon = M.CAP_ON, this._video.textTracks[0].mode = "showing", window.localStorage.setItem(ne.is + ":captions", "1")) : (this.$.capIcon = M.CAP_OFF, this._video.textTracks[0].mode = "hidden", window.localStorage.removeItem(ne.is + ":captions"));
@@ -8956,7 +8956,7 @@ ne.bindAttributes({
8956
8956
  video: "video",
8957
8957
  src: "src"
8958
8958
  });
8959
- class ar extends $ {
8959
+ class lr extends $ {
8960
8960
  initCallback() {
8961
8961
  super.initCallback(), this.subConfigValue(
8962
8962
  "removeCopyright",
@@ -8968,7 +8968,7 @@ class ar extends $ {
8968
8968
  }
8969
8969
  }
8970
8970
  u(
8971
- ar,
8971
+ lr,
8972
8972
  "template",
8973
8973
  /* HTML */
8974
8974
  `
@@ -8984,7 +8984,7 @@ class li extends $ {
8984
8984
  constructor() {
8985
8985
  super(...arguments);
8986
8986
  u(this, "requireCtxName", !0);
8987
- u(this, "init$", fs(this));
8987
+ u(this, "init$", ds(this));
8988
8988
  u(this, "_template", null);
8989
8989
  }
8990
8990
  static set template(e) {
@@ -9026,7 +9026,7 @@ ai.template = /* HTML */
9026
9026
 
9027
9027
  <lr-progress-bar-common></lr-progress-bar-common>
9028
9028
  `;
9029
- let yt = class extends li {
9029
+ let vt = class extends li {
9030
9030
  initCallback() {
9031
9031
  super.initCallback();
9032
9032
  const i = this.ref.uBlock;
@@ -9041,7 +9041,7 @@ let yt = class extends li {
9041
9041
  });
9042
9042
  }
9043
9043
  };
9044
- yt.template = /* HTML */
9044
+ vt.template = /* HTML */
9045
9045
  `
9046
9046
  <lr-start-from>
9047
9047
  <lr-drop-area clickable l10n="choose-file"></lr-drop-area>
@@ -9049,7 +9049,7 @@ yt.template = /* HTML */
9049
9049
  </lr-start-from>
9050
9050
  <lr-upload-list ref="uBlock"></lr-upload-list>
9051
9051
  `;
9052
- let cr = class extends li {
9052
+ let ar = class extends li {
9053
9053
  constructor() {
9054
9054
  super(), this.init$ = {
9055
9055
  ...this.init$,
@@ -9078,7 +9078,7 @@ let cr = class extends li {
9078
9078
  });
9079
9079
  }
9080
9080
  };
9081
- cr.template = /* HTML */
9081
+ ar.template = /* HTML */
9082
9082
  ` <lr-start-from>
9083
9083
  <lr-drop-area with-icon clickable></lr-drop-area>
9084
9084
  <lr-source-list wrap></lr-source-list>
@@ -9096,7 +9096,7 @@ cr.template = /* HTML */
9096
9096
  <lr-external-source></lr-external-source>
9097
9097
  <lr-progress-bar></lr-progress-bar>
9098
9098
  <lr-cloud-image-editor-activity></lr-cloud-image-editor-activity>`;
9099
- class ua extends Fe {
9099
+ class ha extends Fe {
9100
9100
  initCallback() {
9101
9101
  super.initCallback(), this.__shadowReady = !0, this.$["*faderEl"] = this.ref["fader-el"], this.$["*cropperEl"] = this.ref["cropper-el"], this.$["*imgContainerEl"] = this.ref["img-container-el"], this.initEditor();
9102
9102
  }
@@ -9110,22 +9110,22 @@ function Xe(s) {
9110
9110
  e.startsWith("-") && (e = e.replace("-", "")), e.startsWith("lr-") || (e = "lr-" + e), s[i].reg && s[i].reg(e);
9111
9111
  }
9112
9112
  }
9113
- const xt = "LR";
9114
- async function da(s, i = !1) {
9113
+ const St = "LR";
9114
+ async function ua(s, i = !1) {
9115
9115
  return new Promise((e, t) => {
9116
9116
  if (typeof document != "object") {
9117
9117
  e(null);
9118
9118
  return;
9119
9119
  }
9120
- if (typeof window == "object" && window[xt]) {
9121
- e(window[xt]);
9120
+ if (typeof window == "object" && window[St]) {
9121
+ e(window[St]);
9122
9122
  return;
9123
9123
  }
9124
9124
  let r = document.createElement("script");
9125
9125
  r.async = !0, r.src = s, r.onerror = () => {
9126
9126
  t();
9127
9127
  }, r.onload = () => {
9128
- let n = window[xt];
9128
+ let n = window[St];
9129
9129
  i && Xe(n), e(n);
9130
9130
  }, document.head.appendChild(r);
9131
9131
  });
@@ -9133,74 +9133,74 @@ async function da(s, i = !1) {
9133
9133
  const ci = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9134
9134
  __proto__: null,
9135
9135
  ActivityBlock: _,
9136
- ActivityHeader: ha,
9136
+ ActivityHeader: ca,
9137
9137
  BaseComponent: at,
9138
9138
  Block: $,
9139
- CameraSource: Hs,
9140
- CloudImageEditor: ua,
9141
- CloudImageEditorActivity: ta,
9139
+ CameraSource: js,
9140
+ CloudImageEditor: ha,
9141
+ CloudImageEditorActivity: ea,
9142
9142
  CloudImageEditorBlock: Fe,
9143
- Config: xs,
9144
- ConfirmationDialog: Gs,
9145
- Copyright: ar,
9146
- CropFrame: Ks,
9143
+ Config: Ss,
9144
+ ConfirmationDialog: Ws,
9145
+ Copyright: lr,
9146
+ CropFrame: Ys,
9147
9147
  Data: T,
9148
9148
  DropArea: Zt,
9149
- EditorCropButtonControl: Js,
9149
+ EditorCropButtonControl: Ks,
9150
9150
  EditorFilterControl: si,
9151
- EditorImageCropper: er,
9152
- EditorImageFader: Jl,
9153
- EditorOperationControl: Qs,
9154
- EditorScroller: tr,
9155
- EditorSlider: Zs,
9156
- EditorToolbar: ir,
9157
- ExternalSource: or,
9151
+ EditorImageCropper: Qs,
9152
+ EditorImageFader: Kl,
9153
+ EditorOperationControl: Zs,
9154
+ EditorScroller: er,
9155
+ EditorSlider: Js,
9156
+ EditorToolbar: tr,
9157
+ ExternalSource: nr,
9158
9158
  FileItem: we,
9159
9159
  FilePreview: ti,
9160
- FileUploaderInline: cr,
9161
- FileUploaderMinimal: yt,
9160
+ FileUploaderInline: ar,
9161
+ FileUploaderMinimal: vt,
9162
9162
  FileUploaderRegular: ai,
9163
- FormInput: ca,
9163
+ FormInput: aa,
9164
9164
  Icon: Kt,
9165
- Img: tl,
9166
- LineLoaderUi: sr,
9165
+ Img: el,
9166
+ LineLoaderUi: ir,
9167
9167
  LrBtnUi: ni,
9168
9168
  Modal: ei,
9169
- PACKAGE_NAME: Wt,
9170
- PACKAGE_VERSION: mt,
9171
- PresenceToggle: rr,
9172
- ProgressBar: Xs,
9169
+ PACKAGE_NAME: Ht,
9170
+ PACKAGE_VERSION: Wt,
9171
+ PresenceToggle: sr,
9172
+ ProgressBar: Gs,
9173
9173
  ProgressBarCommon: qs,
9174
- Select: lr,
9174
+ Select: or,
9175
9175
  SimpleBtn: Jt,
9176
- SliderUi: nr,
9176
+ SliderUi: rr,
9177
9177
  SourceBtn: Qt,
9178
- SourceList: al,
9179
- StartFrom: Os,
9178
+ SourceList: ll,
9179
+ StartFrom: Is,
9180
9180
  Tabs: oi,
9181
9181
  UID: Ae,
9182
- UploadCtxProvider: Rt,
9183
- UploadList: Bs,
9182
+ UploadCtxProvider: Ut,
9183
+ UploadList: Vs,
9184
9184
  UploaderBlock: S,
9185
- UrlSource: js,
9185
+ UrlSource: Bs,
9186
9186
  Video: ne,
9187
- connectBlocksFrom: da,
9188
- defineLocale: ms,
9187
+ connectBlocksFrom: ua,
9188
+ defineLocale: ps,
9189
9189
  registerBlocks: Xe,
9190
- toKebabCase: bt
9191
- }, Symbol.toStringTag, { value: "Module" })), fa = /* @__PURE__ */ new Set([
9190
+ toKebabCase: gt
9191
+ }, Symbol.toStringTag, { value: "Module" })), da = /* @__PURE__ */ new Set([
9192
9192
  "children",
9193
9193
  "ref",
9194
9194
  "style",
9195
9195
  "className"
9196
- ]), pa = (s = {}) => Object == null ? void 0 : Object.keys(s).reduce((i, e) => {
9196
+ ]), fa = (s = {}) => Object == null ? void 0 : Object.keys(s).reduce((i, e) => {
9197
9197
  var t, r;
9198
9198
  const n = s == null ? void 0 : s[e], o = `on${(r = (t = n == null ? void 0 : n.split("-")) == null ? void 0 : t.map((l) => l.charAt(0).toUpperCase() + l.slice(1))) == null ? void 0 : r.join("")}`;
9199
9199
  return i[o] = n, i;
9200
- }, {}), Hi = /* @__PURE__ */ new WeakMap(), ma = (s) => {
9201
- let i = Hi.get(s);
9202
- return i || (i = /* @__PURE__ */ new Map(), Hi.set(s, i)), i;
9203
- }, Wi = ({
9200
+ }, {}), ji = /* @__PURE__ */ new WeakMap(), pa = (s) => {
9201
+ let i = ji.get(s);
9202
+ return i || (i = /* @__PURE__ */ new Map(), ji.set(s, i)), i;
9203
+ }, Hi = ({
9204
9204
  node: s,
9205
9205
  nameProp: i,
9206
9206
  valueProp: e,
@@ -9208,7 +9208,7 @@ const ci = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9208
9208
  event: r
9209
9209
  }) => {
9210
9210
  if (r !== void 0 && e !== t) {
9211
- const n = ma(s), o = n.has(r);
9211
+ const n = pa(s), o = n.has(r);
9212
9212
  if (e) {
9213
9213
  const l = {
9214
9214
  handleEvent: e
@@ -9221,10 +9221,10 @@ const ci = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9221
9221
  return;
9222
9222
  }
9223
9223
  s[i] = e, e == null && i in HTMLElement.prototype && s.removeAttribute(i);
9224
- }, ga = (s, i, e) => {
9224
+ }, ma = (s, i, e) => {
9225
9225
  const t = {}, r = {};
9226
9226
  return Object.entries(s).forEach(([n, o]) => {
9227
- fa.has(n) ? t[n === "className" ? "class" : n] = o : i.has(n) || n in e.prototype ? r[n] = o : t[n] = o;
9227
+ da.has(n) ? t[n === "className" ? "class" : n] = o : i.has(n) || n in e.prototype ? r[n] = o : t[n] = o;
9228
9228
  }), { reactProps: t, customElProps: r };
9229
9229
  }, Ye = ({
9230
9230
  react: s,
@@ -9233,15 +9233,15 @@ const ci = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9233
9233
  elClass: e,
9234
9234
  schemaEvents: t
9235
9235
  }) => {
9236
- const r = pa(t), n = new Set(Object.keys(r ?? {})), o = s.forwardRef(
9236
+ const r = fa(t), n = new Set(Object.keys(r ?? {})), o = s.forwardRef(
9237
9237
  (l, a) => {
9238
- const c = s.useRef(/* @__PURE__ */ new Map()), h = s.useRef(null), { reactProps: d, customElProps: f } = ga(l, n, e);
9238
+ const c = s.useRef(/* @__PURE__ */ new Map()), h = s.useRef(null), { reactProps: d, customElProps: f } = ma(l, n, e);
9239
9239
  return s.useLayoutEffect(() => {
9240
9240
  if (h.current === null)
9241
9241
  return;
9242
9242
  const m = /* @__PURE__ */ new Map();
9243
9243
  for (const p in f)
9244
- Wi({
9244
+ Hi({
9245
9245
  node: h.current,
9246
9246
  nameProp: p,
9247
9247
  valueProp: f[p],
@@ -9249,7 +9249,7 @@ const ci = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9249
9249
  event: r[p]
9250
9250
  }), c.current.delete(p), m.set(p, l[p]);
9251
9251
  for (const [p, g] of c.current)
9252
- Wi({
9252
+ Hi({
9253
9253
  node: h.current,
9254
9254
  nameProp: p,
9255
9255
  valueProp: void 0,
@@ -9272,13 +9272,13 @@ const ci = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9272
9272
  }, hi = Ye({
9273
9273
  react: L,
9274
9274
  tag: "lr-config",
9275
- elClass: xs
9275
+ elClass: Ss
9276
9276
  }), ui = Ye({
9277
9277
  react: L,
9278
9278
  tag: "lr-upload-ctx-provider",
9279
- elClass: Rt,
9280
- schemaEvents: Rt.EventType
9281
- }), di = (s) => `https://cdn.jsdelivr.net/npm/@uploadcare/blocks@${mt}/web/lr-file-uploader-${s}.min.css`, fi = (s) => {
9279
+ elClass: Ut,
9280
+ schemaEvents: Ut.EventType
9281
+ }), di = (s) => {
9282
9282
  const i = {}, e = {};
9283
9283
  return Object.entries(s).forEach(([t, r]) => {
9284
9284
  t.startsWith("on") ? i[t] = r : e[t] = r;
@@ -9286,53 +9286,47 @@ const ci = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9286
9286
  eventHandlers: i,
9287
9287
  config: e
9288
9288
  };
9289
- }, ba = "0.3.0", _a = "React-Uploader", pi = () => `${_a}/${ba}`;
9289
+ }, ga = "0.3.0-alpha.2", ba = "React-Uploader", fi = () => `${ba}/${ga}`;
9290
9290
  Xe(ci);
9291
- const va = Ye({
9291
+ const _a = Ye({
9292
9292
  react: L,
9293
9293
  tag: "lr-file-uploader-regular",
9294
9294
  elClass: ai
9295
- }), ya = di("regular"), Oa = ({
9295
+ }), $a = ({
9296
9296
  ctxName: s,
9297
9297
  className: i,
9298
9298
  apiRef: e,
9299
9299
  ...t
9300
9300
  }) => {
9301
9301
  const r = ke(() => s ?? Ae.generate(), [s]), { eventHandlers: n, config: o } = ke(
9302
- () => fi(t),
9302
+ () => di(t),
9303
9303
  [t]
9304
9304
  );
9305
- return /* @__PURE__ */ L.createElement("div", { className: i }, /* @__PURE__ */ L.createElement(hi, { userAgentIntegration: pi(), "ctx-name": r, ...o }), /* @__PURE__ */ L.createElement(
9305
+ return /* @__PURE__ */ L.createElement("div", { className: i }, /* @__PURE__ */ L.createElement(hi, { userAgentIntegration: fi(), "ctx-name": r, ...o }), /* @__PURE__ */ L.createElement(
9306
9306
  ui,
9307
9307
  {
9308
9308
  ref: e,
9309
9309
  "ctx-name": r,
9310
9310
  ...n
9311
9311
  }
9312
- ), /* @__PURE__ */ L.createElement(
9313
- va,
9314
- {
9315
- "ctx-name": r,
9316
- "css-src": ya
9317
- }
9318
- ));
9312
+ ), /* @__PURE__ */ L.createElement(_a, { "ctx-name": r }));
9319
9313
  };
9320
9314
  Xe(ci);
9321
- const Ca = Ye({
9315
+ const va = Ye({
9322
9316
  react: L,
9323
9317
  tag: "lr-file-uploader-minimal",
9324
- elClass: yt
9325
- }), wa = di("minimal"), ka = ({
9318
+ elClass: vt
9319
+ }), Sa = ({
9326
9320
  ctxName: s,
9327
9321
  className: i,
9328
9322
  apiRef: e,
9329
9323
  ...t
9330
9324
  }) => {
9331
9325
  const r = ke(() => s ?? Ae.generate(), [s]), { eventHandlers: n, config: o } = ke(
9332
- () => fi(t),
9326
+ () => di(t),
9333
9327
  [t]
9334
9328
  );
9335
- return /* @__PURE__ */ L.createElement("div", { className: i }, /* @__PURE__ */ L.createElement(hi, { userAgentIntegration: pi(), "ctx-name": r, ...o }), /* @__PURE__ */ L.createElement(
9329
+ return /* @__PURE__ */ L.createElement("div", { className: i }, /* @__PURE__ */ L.createElement(hi, { userAgentIntegration: fi(), "ctx-name": r, ...o }), /* @__PURE__ */ L.createElement(
9336
9330
  ui,
9337
9331
  {
9338
9332
  ref: e,
@@ -9340,40 +9334,39 @@ const Ca = Ye({
9340
9334
  ...n
9341
9335
  }
9342
9336
  ), /* @__PURE__ */ L.createElement(
9343
- Ca,
9337
+ va,
9344
9338
  {
9345
- "ctx-name": r,
9346
- "css-src": wa
9339
+ "ctx-name": r
9347
9340
  }
9348
9341
  ));
9349
9342
  };
9350
9343
  Xe(ci);
9351
- const Ea = Ye({
9344
+ const ya = Ye({
9352
9345
  react: L,
9353
9346
  tag: "lr-file-uploader-inline",
9354
- elClass: yt
9355
- }), Aa = di("inline"), La = ({
9347
+ elClass: vt
9348
+ }), xa = ({
9356
9349
  ctxName: s,
9357
9350
  className: i,
9358
9351
  apiRef: e,
9359
9352
  ...t
9360
9353
  }) => {
9361
9354
  const r = ke(() => s ?? Ae.generate(), [s]), { eventHandlers: n, config: o } = ke(
9362
- () => fi(t),
9355
+ () => di(t),
9363
9356
  [t]
9364
9357
  );
9365
- return /* @__PURE__ */ L.createElement("div", { className: i }, /* @__PURE__ */ L.createElement(hi, { userAgentIntegration: pi(), "ctx-name": r, ...o }), /* @__PURE__ */ L.createElement(
9358
+ return /* @__PURE__ */ L.createElement("div", { className: i }, /* @__PURE__ */ L.createElement(hi, { userAgentIntegration: fi(), "ctx-name": r, ...o }), /* @__PURE__ */ L.createElement(
9366
9359
  ui,
9367
9360
  {
9368
9361
  ref: e,
9369
9362
  "ctx-name": r,
9370
9363
  ...n
9371
9364
  }
9372
- ), /* @__PURE__ */ L.createElement(Ea, { "ctx-name": r, "css-src": Aa }));
9365
+ ), /* @__PURE__ */ L.createElement(ya, { "ctx-name": r }));
9373
9366
  };
9374
9367
  export {
9375
- La as FileUploaderInline,
9376
- ka as FileUploaderMinimal,
9377
- Oa as FileUploaderRegular,
9378
- Rt as UploadCtxProvider
9368
+ xa as FileUploaderInline,
9369
+ Sa as FileUploaderMinimal,
9370
+ $a as FileUploaderRegular,
9371
+ Ut as UploadCtxProvider
9379
9372
  };