@scaleflex/asset-picker 0.2.13 → 0.2.15

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,5 +1,5 @@
1
- import { css as k, LitElement as S, html as n, nothing as f, svg as fe } from "lit";
2
- import { property as p, query as Oe, customElement as F, state as _ } from "lit/decorators.js";
1
+ import { css as $, LitElement as S, html as n, nothing as f, svg as ve } from "lit";
2
+ import { property as h, query as Le, customElement as C, state as _ } from "lit/decorators.js";
3
3
  class Ds {
4
4
  constructor(e) {
5
5
  this.listeners = /* @__PURE__ */ new Set(), this._notifying = !1, this._pendingState = null, this.state = e;
@@ -95,10 +95,10 @@ class Rs {
95
95
  (e = this.unsubscribe) == null || e.call(this);
96
96
  }
97
97
  }
98
- function Ns(t) {
98
+ function js(t) {
99
99
  return "extension" in t && !("path" in t);
100
100
  }
101
- class js {
101
+ class Ns {
102
102
  constructor(e, s) {
103
103
  this.lastClickedIndex = -1, this.host = e, this.store = s, e.addController(this);
104
104
  }
@@ -122,11 +122,11 @@ class js {
122
122
  const r = this._getCombinedList();
123
123
  for (let o = e; o <= s; o++) {
124
124
  const l = r[o];
125
- l && (Ns(l) ? i.set(l.uuid, l) : a.set(l.uuid, l));
125
+ l && (js(l) ? i.set(l.uuid, l) : a.set(l.uuid, l));
126
126
  }
127
127
  }
128
128
  handleSelect(e, s, i) {
129
- var l, c, h, u;
129
+ var l, c, p, u;
130
130
  const a = this.store.getState(), r = new Map(a.selectedAssets);
131
131
  if (!(((l = a.config) == null ? void 0 : l.multiSelect) ?? !0)) {
132
132
  r.clear(), r.set(e.uuid, e), this.store.setState({ selectedAssets: r, selectedFolders: /* @__PURE__ */ new Map() }), this.lastClickedIndex = s;
@@ -143,7 +143,7 @@ class js {
143
143
  const v = Math.min(this.lastClickedIndex, s), d = Math.max(this.lastClickedIndex, s), g = a.assets;
144
144
  for (let x = v; x <= d; x++)
145
145
  g[x] && r.set(g[x].uuid, g[x]);
146
- const m = (h = a.config) == null ? void 0 : h.maxSelections;
146
+ const m = (p = a.config) == null ? void 0 : p.maxSelections;
147
147
  if (m && r.size > m) return;
148
148
  this.store.setState({ selectedAssets: r });
149
149
  }
@@ -157,7 +157,7 @@ class js {
157
157
  this.lastClickedIndex = s;
158
158
  }
159
159
  handleFolderSelect(e, s, i) {
160
- var l, c, h;
160
+ var l, c, p;
161
161
  if (!this._folderSelectionEnabled) return;
162
162
  const a = this.store.getState(), r = new Map(a.selectedFolders);
163
163
  if (!(((l = a.config) == null ? void 0 : l.multiSelect) ?? !0)) {
@@ -172,7 +172,7 @@ class js {
172
172
  this.store.setState({ selectedAssets: d, selectedFolders: r });
173
173
  } else if (i.metaKey || i.ctrlKey) {
174
174
  r.has(e.uuid) ? r.delete(e.uuid) : r.set(e.uuid, e);
175
- const u = (h = a.config) == null ? void 0 : h.maxSelections, v = r.size + a.selectedAssets.size;
175
+ const u = (p = a.config) == null ? void 0 : p.maxSelections, v = r.size + a.selectedAssets.size;
176
176
  if (u && v > u) return;
177
177
  this.store.setState({ selectedFolders: r });
178
178
  } else
@@ -235,7 +235,7 @@ class Bs {
235
235
  this.observer && this.sentinel && (this.observer.unobserve(this.sentinel), this.observer.disconnect()), this.observer = void 0, this.sentinel = void 0;
236
236
  }
237
237
  }
238
- const Jt = 5, ze = 40, es = 15;
238
+ const es = 5, ze = 40, ts = 15;
239
239
  class Us {
240
240
  constructor(e, s) {
241
241
  this.startX = 0, this.startY = 0, this.startClientX = 0, this.startClientY = 0, this.preMarqueeSelection = /* @__PURE__ */ new Map(), this.preMarqueeFolderSelection = /* @__PURE__ */ new Map(), this._dragging = !1, this._scrollRAF = null, this._lastMouseEvent = null, this.isActive = !1, this.rect = { x: 0, y: 0, width: 0, height: 0 }, this.handleMouseDown = (i) => this.onMouseDown(i), this.handleMouseMove = (i) => this.onMouseMove(i), this.handleMouseUp = () => this.onMouseUp(), this.preventSelect = (i) => i.preventDefault(), this.host = e, this.store = s, e.addController(this);
@@ -270,7 +270,7 @@ class Us {
270
270
  if (this.container) {
271
271
  if (!this._dragging) {
272
272
  const i = Math.abs(e.clientX - this.startClientX), a = Math.abs(e.clientY - this.startClientY);
273
- if (i < Jt && a < Jt) return;
273
+ if (i < es && a < es) return;
274
274
  this._dragging = !0, this.isActive = !0, document.addEventListener("selectstart", this.preventSelect), (s = window.getSelection()) == null || s.removeAllRanges(), this.preMarqueeSelection = new Map(this.store.getState().selectedAssets), this.preMarqueeFolderSelection = new Map(this.store.getState().selectedFolders);
275
275
  }
276
276
  this._lastMouseEvent = e, this.updateMarqueeRect(e), this.startAutoScroll(e);
@@ -280,8 +280,8 @@ class Us {
280
280
  if (!this.container) return;
281
281
  const s = this.container.getBoundingClientRect(), i = e.clientX - s.left + this.container.scrollLeft, a = e.clientY - s.top + this.container.scrollTop;
282
282
  let r = Math.min(this.startX, i), o = Math.min(this.startY, a), l = Math.abs(i - this.startX), c = Math.abs(a - this.startY);
283
- const h = this.container.scrollWidth, u = this.container.scrollHeight;
284
- r + l > h && (l = h - r), o + c > u && (c = u - o), r < 0 && (l += r, r = 0), o < 0 && (c += o, o = 0), this.rect = { x: r, y: o, width: l, height: c }, this.host.requestUpdate(), this.selectIntersecting();
283
+ const p = this.container.scrollWidth, u = this.container.scrollHeight;
284
+ r + l > p && (l = p - r), o + c > u && (c = u - o), r < 0 && (l += r, r = 0), o < 0 && (c += o, o = 0), this.rect = { x: r, y: o, width: l, height: c }, this.host.requestUpdate(), this.selectIntersecting();
285
285
  }
286
286
  startAutoScroll(e) {
287
287
  if (!this.container) return;
@@ -296,7 +296,7 @@ class Us {
296
296
  if (this._scrollRAF = null, !this.container || !this._dragging || !this._lastMouseEvent || this.container.scrollHeight <= this.container.clientHeight) return;
297
297
  const e = this.container.getBoundingClientRect(), s = this._lastMouseEvent, i = s.clientY - e.top, a = e.bottom - s.clientY;
298
298
  let r = 0;
299
- i < ze ? r = -es * (1 - i / ze) : a < ze && (r = es * (1 - a / ze)), r !== 0 && (this.container.scrollTop += r, this.updateMarqueeRect(s), this._scrollRAF = requestAnimationFrame(() => this.autoScrollTick()));
299
+ i < ze ? r = -ts * (1 - i / ze) : a < ze && (r = ts * (1 - a / ze)), r !== 0 && (this.container.scrollTop += r, this.updateMarqueeRect(s), this._scrollRAF = requestAnimationFrame(() => this.autoScrollTick()));
300
300
  }
301
301
  stopAutoScroll() {
302
302
  this._scrollRAF && (cancelAnimationFrame(this._scrollRAF), this._scrollRAF = null);
@@ -328,9 +328,9 @@ class Us {
328
328
  return this.rect.x < e.x + e.width && this.rect.x + this.rect.width > e.x && this.rect.y < e.y + e.height && this.rect.y + this.rect.height > e.y;
329
329
  }
330
330
  selectIntersecting() {
331
- var h, u;
331
+ var p, u;
332
332
  if (!this.container) return;
333
- const e = this.store.getState(), s = ((h = e.config) == null ? void 0 : h.folderSelection) === !0, { assetCards: i, folderCards: a } = this.querySelectableElements(), r = new Map(this.preMarqueeSelection), o = s ? new Map(this.preMarqueeFolderSelection) : e.selectedFolders;
333
+ const e = this.store.getState(), s = ((p = e.config) == null ? void 0 : p.folderSelection) === !0, { assetCards: i, folderCards: a } = this.querySelectableElements(), r = new Map(this.preMarqueeSelection), o = s ? new Map(this.preMarqueeFolderSelection) : e.selectedFolders;
334
334
  i.forEach((v) => {
335
335
  const d = this.getCardRelativeRect(v), g = v.dataset.assetUuid;
336
336
  if (this.intersectsMarquee(d)) {
@@ -385,13 +385,13 @@ class Vs {
385
385
  try {
386
386
  const l = await fetch(i.toString(), { headers: a, signal: r.signal });
387
387
  if (clearTimeout(o), !l.ok) {
388
- let h = `API error: ${l.status} ${l.statusText}`;
388
+ let p = `API error: ${l.status} ${l.statusText}`;
389
389
  try {
390
390
  const u = await l.json();
391
- u.msg && (h = `API error: ${l.status} - ${u.msg}`);
391
+ u.msg && (p = `API error: ${l.status} - ${u.msg}`);
392
392
  } catch {
393
393
  }
394
- throw new Error(h);
394
+ throw new Error(p);
395
395
  }
396
396
  const c = await l.json();
397
397
  if (c.status === "error")
@@ -415,13 +415,13 @@ class Vs {
415
415
  signal: r.signal
416
416
  });
417
417
  if (clearTimeout(o), !l.ok) {
418
- let h = `API error: ${l.status} ${l.statusText}`;
418
+ let p = `API error: ${l.status} ${l.statusText}`;
419
419
  try {
420
420
  const u = await l.json();
421
- u.msg && (h = `API error: ${l.status} - ${u.msg}`);
421
+ u.msg && (p = `API error: ${l.status} - ${u.msg}`);
422
422
  } catch {
423
423
  }
424
- throw new Error(h);
424
+ throw new Error(p);
425
425
  }
426
426
  const c = await l.json();
427
427
  if (c.status === "error")
@@ -450,11 +450,11 @@ function qs(t) {
450
450
  const r = [];
451
451
  return t.search && r.push(t.search), t.q && r.push(t.q), r.length > 0 && (e.q = r.join(" ")), e;
452
452
  }
453
- async function Qe(t, e) {
453
+ async function Ze(t, e) {
454
454
  const s = qs(e);
455
455
  return t.request("/files", s);
456
456
  }
457
- async function ts(t, e) {
457
+ async function ss(t, e) {
458
458
  const s = {
459
459
  folder: e.folder,
460
460
  recursive: e.recursive ?? 1
@@ -515,7 +515,7 @@ const b = {
515
515
  APPROVER: "task_approver",
516
516
  REQUESTOR: "task_requester",
517
517
  DUE_DATE: "task_duedate"
518
- }, $ = {
518
+ }, w = {
519
519
  IS: ":",
520
520
  RANGE: "..",
521
521
  IS_NOT: ":-",
@@ -558,20 +558,20 @@ const b = {
558
558
  Object.fromEntries(
559
559
  Object.entries(kt).map(([t, e]) => [e, t])
560
560
  );
561
- const hs = Object.values(kt), Ze = {
561
+ const hs = Object.values(kt), Je = {
562
562
  PRESET: "preset",
563
563
  AFTER: "after",
564
564
  BEFORE: "before",
565
565
  BETWEEN: "between",
566
566
  SPECIFIC: "specific"
567
- }, ss = {
567
+ }, is = {
568
568
  EMPTY: "empty",
569
569
  NOT_EMPTY: "non-empty"
570
- }, W = "empty", Q = "non-empty", ke = "specific", Mt = 10, Ot = 10, pt = 10, us = "filters:pinned:", gs = "metadata:pinned:", is = [
570
+ }, Y = "empty", X = "non-empty", Se = "specific", Mt = 10, Ot = 10, pt = 10, us = "filters:pinned:", gs = "metadata:pinned:", as = [
571
571
  b.DATE,
572
572
  b.TYPE,
573
573
  b.SIZE
574
- ], fs = $.IS, ut = "20", gt = "1", Qs = 0, Zs = [
574
+ ], fs = w.IS, ut = "20", gt = "1", Qs = 0, Zs = [
575
575
  { key: b.DATE, label: "Date", icon: "calendar", type: "date" },
576
576
  { key: b.TYPE, label: "Format", icon: "file-type", type: "string" },
577
577
  { key: b.SIZE, label: "Size", icon: "scaling", type: "string" },
@@ -653,7 +653,7 @@ const hs = Object.values(kt), Ze = {
653
653
  ], vs = [
654
654
  { value: "created", label: "Created at" },
655
655
  { value: "updated", label: "Updated at" }
656
- ], Vt = [
656
+ ], qt = [
657
657
  { value: "today", label: "Today" },
658
658
  { value: "before", label: "Before date" },
659
659
  { value: "last_week", label: "Last week" },
@@ -698,42 +698,42 @@ const hs = Object.values(kt), Ze = {
698
698
  { label: "Small", value: "1" },
699
699
  { label: "Medium", value: "2" },
700
700
  { label: "Large", value: "4" }
701
- ], Pt = [
702
- { label: "Is", value: $.IS },
703
- { label: "Contains", value: $.CONTAINS_IN_TEXT }
704
- ], ce = [
705
- { label: "Is", value: $.IS },
706
- { label: "Is not", value: $.IS_NOT }
707
701
  ], It = [
708
- { label: "Is", value: $.IS_EXACT },
709
- { label: "Contains", value: $.IS },
710
- { label: "Does not contain", value: $.IS_NOT }
702
+ { label: "Is", value: w.IS },
703
+ { label: "Contains", value: w.CONTAINS_IN_TEXT }
704
+ ], de = [
705
+ { label: "Is", value: w.IS },
706
+ { label: "Is not", value: w.IS_NOT }
707
+ ], Pt = [
708
+ { label: "Is", value: w.IS_EXACT },
709
+ { label: "Contains", value: w.IS },
710
+ { label: "Does not contain", value: w.IS_NOT }
711
711
  ], Dt = [
712
- { label: "Is", value: $.IS },
713
- { label: "Greater than", value: $.GREATER_THAN_OR_EQUAL },
714
- { label: "Is not", value: $.IS_NOT },
715
- { label: "Less than", value: $.LESS_THAN_OR_EQUAL },
716
- { label: "Between", value: $.RANGE }
712
+ { label: "Is", value: w.IS },
713
+ { label: "Greater than", value: w.GREATER_THAN_OR_EQUAL },
714
+ { label: "Is not", value: w.IS_NOT },
715
+ { label: "Less than", value: w.LESS_THAN_OR_EQUAL },
716
+ { label: "Between", value: w.RANGE }
717
717
  ], li = [
718
- { label: "Is", value: $.IS_EXACT },
719
- { label: "Is not", value: $.IS_NOT }
720
- ], as = [
721
- { label: "Contains", value: $.CONTAINS },
722
- { label: "Does not contain", value: $.IS_NOT }
718
+ { label: "Is", value: w.IS_EXACT },
719
+ { label: "Is not", value: w.IS_NOT }
720
+ ], rs = [
721
+ { label: "Contains", value: w.CONTAINS },
722
+ { label: "Does not contain", value: w.IS_NOT }
723
723
  ], ci = [
724
724
  { value: "APPROVED", label: "Approved", icon: "circle-check-big", iconColor: "var(--ap-success, oklch(0.637 0.17 151.295))" },
725
725
  { value: "PENDING", label: "Pending", icon: "clock", iconColor: "var(--ap-warning, oklch(0.734 0.157 69.419))" },
726
726
  { value: "REJECTED", label: "Rejected", icon: "x-circle", iconColor: "var(--ap-destructive, oklch(0.577 0.215 27.325))" },
727
727
  { value: "CANCELLED", label: "Cancelled", icon: "ban", iconColor: "var(--ap-muted-foreground, oklch(0.685 0.033 249.82))" }
728
- ], Ce = [
729
- { label: "Empty", value: W },
730
- { label: "Not empty", value: Q }
728
+ ], Fe = [
729
+ { label: "Empty", value: Y },
730
+ { label: "Not empty", value: X }
731
731
  ], zt = [
732
- ...Ce,
733
- { label: "Specific", value: ke }
732
+ ...Fe,
733
+ { label: "Specific", value: Se }
734
734
  ], di = [
735
- { label: "Empty", value: W },
736
- { label: "Not empty", value: Q },
735
+ { label: "Empty", value: Y },
736
+ { label: "Not empty", value: X },
737
737
  { label: "True", value: "true" },
738
738
  { label: "False", value: "false" }
739
739
  ], ft = {
@@ -785,48 +785,48 @@ function ui(t) {
785
785
  }
786
786
  async function gi(t) {
787
787
  var m, x;
788
- const e = await t.request("/settings"), s = e.settings ?? e, i = (s == null ? void 0 : s.metadata) ?? e.metadata, r = ((i == null ? void 0 : i.model) ?? [])[Qs], o = i == null ? void 0 : i.store, c = ((o == null ? void 0 : o.regional_variants_groups) ?? []).map((w) => ({
789
- uuid: w.uuid,
790
- label: w.label ?? w.name ?? "",
791
- variants: (w.variants ?? []).map((T) => ({
792
- api_value: T.api_value ?? T.value ?? "",
793
- internal_unique_value: T.internal_unique_value ?? T.api_value ?? "",
794
- label: T.label ?? T.name ?? ""
788
+ const e = await t.request("/settings"), s = e.settings ?? e, i = (s == null ? void 0 : s.metadata) ?? e.metadata, r = ((i == null ? void 0 : i.model) ?? [])[Qs], o = i == null ? void 0 : i.store, c = ((o == null ? void 0 : o.regional_variants_groups) ?? []).map((k) => ({
789
+ uuid: k.uuid,
790
+ label: k.label ?? k.name ?? "",
791
+ variants: (k.variants ?? []).map((E) => ({
792
+ api_value: E.api_value ?? E.value ?? "",
793
+ internal_unique_value: E.internal_unique_value ?? E.api_value ?? "",
794
+ label: E.label ?? E.name ?? ""
795
795
  }))
796
- })).filter((w) => w.variants.length > 1), h = {};
797
- for (const w of c)
798
- h[w.uuid] = ((m = w.variants[0]) == null ? void 0 : m.api_value) ?? "";
796
+ })).filter((k) => k.variants.length > 1), p = {};
797
+ for (const k of c)
798
+ p[k.uuid] = ((m = k.variants[0]) == null ? void 0 : m.api_value) ?? "";
799
799
  const u = (s == null ? void 0 : s.project_branding) ?? ((x = e.settings) == null ? void 0 : x.project_branding), v = u == null ? void 0 : u.brandColor;
800
- if (!r) return { fields: [], regionalVariantGroups: c, regionalFilters: h, brandColor: v };
800
+ if (!r) return { fields: [], regionalVariantGroups: c, regionalFilters: p, brandColor: v };
801
801
  const d = r.groups ?? [], g = [];
802
- for (const w of d) {
803
- const T = w.name || "Root fields";
804
- for (const C of w.fields ?? []) {
805
- const O = C.possible_values, D = O == null ? void 0 : O.map((E) => ({
806
- api_value: E.api_value ?? E.value ?? "",
807
- internal_unique_value: E.internal_unique_value ?? E.api_value ?? "",
808
- label: E.label ?? E.name ?? E.api_value ?? ""
802
+ for (const k of d) {
803
+ const E = k.name || "Root fields";
804
+ for (const A of k.fields ?? []) {
805
+ const I = A.possible_values, R = I == null ? void 0 : I.map((T) => ({
806
+ api_value: T.api_value ?? T.value ?? "",
807
+ internal_unique_value: T.internal_unique_value ?? T.api_value ?? "",
808
+ label: T.label ?? T.name ?? T.api_value ?? ""
809
809
  }));
810
810
  g.push({
811
811
  // Use field.key (not ckey) — this is what a.meta uses as keys
812
- key: C.key ?? C.ckey,
813
- label: C.title ?? C.label ?? C.key ?? "",
814
- type: C.type ?? "text",
815
- slug: C.slug,
816
- ckey: C.ckey,
817
- possible_values: D,
818
- group: T,
819
- regionalVariantsGroupUuid: C.regional_variants_group_uuid
812
+ key: A.key ?? A.ckey,
813
+ label: A.title ?? A.label ?? A.key ?? "",
814
+ type: A.type ?? "text",
815
+ slug: A.slug,
816
+ ckey: A.ckey,
817
+ possible_values: R,
818
+ group: E,
819
+ regionalVariantsGroupUuid: A.regional_variants_group_uuid
820
820
  });
821
821
  }
822
822
  }
823
- return { fields: g, regionalVariantGroups: c, regionalFilters: h, brandColor: v };
823
+ return { fields: g, regionalVariantGroups: c, regionalFilters: p, brandColor: v };
824
824
  }
825
- function Se(t) {
825
+ function Ce(t) {
826
826
  return t.toLocaleDateString("en-CA");
827
827
  }
828
828
  function ht() {
829
- return Se(/* @__PURE__ */ new Date());
829
+ return Ce(/* @__PURE__ */ new Date());
830
830
  }
831
831
  function bs(t) {
832
832
  const e = /* @__PURE__ */ new Date();
@@ -838,33 +838,33 @@ function bs(t) {
838
838
  };
839
839
  case "last_week": {
840
840
  const s = new Date(e);
841
- return s.setDate(s.getDate() - 7), { from: Se(s), to: null };
841
+ return s.setDate(s.getDate() - 7), { from: Ce(s), to: null };
842
842
  }
843
843
  case "within_week": {
844
844
  const s = new Date(e);
845
- return s.setDate(s.getDate() + 7), { from: ht(), to: Se(s) };
845
+ return s.setDate(s.getDate() + 7), { from: ht(), to: Ce(s) };
846
846
  }
847
847
  case "last_month": {
848
848
  const s = new Date(e);
849
- return s.setDate(s.getDate() - 30), { from: Se(s), to: null };
849
+ return s.setDate(s.getDate() - 30), { from: Ce(s), to: null };
850
850
  }
851
851
  case "within_month": {
852
852
  const s = new Date(e);
853
- return s.setDate(s.getDate() + 30), { from: ht(), to: Se(s) };
853
+ return s.setDate(s.getDate() + 30), { from: ht(), to: Ce(s) };
854
854
  }
855
855
  case "last_year": {
856
856
  const s = new Date(e);
857
- return s.setDate(s.getDate() - 365), { from: Se(s), to: null };
857
+ return s.setDate(s.getDate() - 365), { from: Ce(s), to: null };
858
858
  }
859
859
  case "within_year": {
860
860
  const s = new Date(e);
861
- return s.setDate(s.getDate() + 365), { from: ht(), to: Se(s) };
861
+ return s.setDate(s.getDate() + 365), { from: ht(), to: Ce(s) };
862
862
  }
863
863
  default:
864
864
  return null;
865
865
  }
866
866
  }
867
- function rs(t, e) {
867
+ function os(t, e) {
868
868
  return e ? e.type === "date" ? fi(e) : e.type === "string" ? vi(e) : !0 : !1;
869
869
  }
870
870
  function fi(t) {
@@ -876,12 +876,12 @@ function vi(t) {
876
876
  function mi(t, e = {}) {
877
877
  const s = [];
878
878
  for (const [i, a] of Object.entries(t)) {
879
- if (!a || !rs(i, a)) continue;
879
+ if (!a || !os(i, a)) continue;
880
880
  const r = _i(i, a);
881
881
  s.push(...r);
882
882
  }
883
883
  for (const [i, a] of Object.entries(e)) {
884
- if (!a || !rs(i, a)) continue;
884
+ if (!a || !os(i, a)) continue;
885
885
  const r = Ci(i, a);
886
886
  s.push(...r);
887
887
  }
@@ -911,9 +911,9 @@ function _i(t, e) {
911
911
  case b.FACES:
912
912
  return xi(t, i, a);
913
913
  case b.TAGS:
914
- return Fe(t, i, os(a), ",", r);
914
+ return Ee(t, i, ns(a), ",", r);
915
915
  case b.LABELS:
916
- return Fe(t, i, os(a), ",", r);
916
+ return Ee(t, i, ns(a), ",", r);
917
917
  case b.COLOR:
918
918
  return wi(i, a, r);
919
919
  case b.TYPE:
@@ -921,26 +921,26 @@ function _i(t, e) {
921
921
  case b.MIME_TYPE:
922
922
  return ki(t, a, i);
923
923
  case b.PRODUCT_REF:
924
- return Fe(t, "=%", a, ",", r);
924
+ return Ee(t, "=%", a, ",", r);
925
925
  default:
926
- return Fe(t, i, a, ",", r);
926
+ return Ee(t, i, a, ",", r);
927
927
  }
928
928
  }
929
929
  function _s(t, e) {
930
930
  const s = e.field || "created";
931
- if (e.kind === Ze.PRESET && e.preset) {
932
- if (e.preset === ss.EMPTY)
931
+ if (e.kind === Je.PRESET && e.preset) {
932
+ if (e.preset === is.EMPTY)
933
933
  return [`${s}:"empty"`];
934
- if (e.preset === ss.NOT_EMPTY)
934
+ if (e.preset === is.NOT_EMPTY)
935
935
  return [`${s}:"non-empty"`];
936
936
  const i = bs(e.preset);
937
937
  return i ? i.to === null ? [`${s}>"${i.from}"`] : [`${s}:"${i.from}..${i.to}"`] : [];
938
938
  }
939
- if (e.kind === Ze.AFTER && e.from)
939
+ if (e.kind === Je.AFTER && e.from)
940
940
  return [`${s}:>"${e.from}"`];
941
- if (e.kind === Ze.BEFORE && e.to)
941
+ if (e.kind === Je.BEFORE && e.to)
942
942
  return [`${s}:<"${e.to}"`];
943
- if (e.kind === Ze.BETWEEN) {
943
+ if (e.kind === Je.BETWEEN) {
944
944
  if (e.from && e.to)
945
945
  return [`${s}:"${e.from}..${e.to}"`];
946
946
  if (e.from && !e.to)
@@ -948,7 +948,7 @@ function _s(t, e) {
948
948
  if (!e.from && e.to)
949
949
  return [`${s}:<"${e.to}"`];
950
950
  }
951
- return e.kind === Ze.SPECIFIC && e.from ? [`${s}:"${e.from}"`] : [];
951
+ return e.kind === Je.SPECIFIC && e.from ? [`${s}:"${e.from}"`] : [];
952
952
  }
953
953
  function yi(t, e, s) {
954
954
  return e.length === 0 ? [] : [`${t}:"${e.join(s)}"`];
@@ -956,7 +956,7 @@ function yi(t, e, s) {
956
956
  function xi(t, e, s) {
957
957
  return s.length === 0 ? [] : [`${t}${e}"${s.join(",")}"`];
958
958
  }
959
- function Fe(t, e, s, i, a) {
959
+ function Ee(t, e, s, i, a) {
960
960
  if (s.length === 0) return [];
961
961
  if (a === Ws.AND)
962
962
  return s.map((o) => `${t}${e}"${o}"`);
@@ -964,7 +964,7 @@ function Fe(t, e, s, i, a) {
964
964
  return [`${t}${e}${r}`];
965
965
  }
966
966
  function wi(t, e, s) {
967
- const i = [], a = Fe("color_search", t, e, ",", s);
967
+ const i = [], a = Ee("color_search", t, e, ",", s);
968
968
  return i.push(...a), i.push('color_operator:"AND"'), i;
969
969
  }
970
970
  function $i(t, e) {
@@ -990,8 +990,8 @@ function ki(t, e, s, i) {
990
990
  function Si(t) {
991
991
  const e = [];
992
992
  if (typeof t == "object" && t !== null && !Array.isArray(t)) {
993
- const o = t, l = o.resolution, c = o.orientation, h = o.faces;
994
- return l != null && l.length && e.push(`resolution:"${l.join(",")}"`), c != null && c.length && e.push(`orientation:"${c.join(",")}"`), h != null && h.length && e.push(`faces:"${h.join(",")}"`), e;
993
+ const o = t, l = o.resolution, c = o.orientation, p = o.faces;
994
+ return l != null && l.length && e.push(`resolution:"${l.join(",")}"`), c != null && c.length && e.push(`orientation:"${c.join(",")}"`), p != null && p.length && e.push(`faces:"${p.join(",")}"`), e;
995
995
  }
996
996
  const s = t, i = s[Lt.RESOLUTION], a = s[Lt.ORIENTATION], r = s[Lt.FACES];
997
997
  return i && e.push(`resolution:"${i}"`), a && e.push(`orientation:"${a}"`), r && e.push(`faces:"${r}"`), e;
@@ -1002,22 +1002,22 @@ function Ci(t, e) {
1002
1002
  return Fi(s, e, i);
1003
1003
  const a = e, { operator: r = fs, values: o = [], logic: l, metadataType: c } = a;
1004
1004
  if (o.length === 0) return [];
1005
- if (o.length === 1 && (o[0] === W || o[0] === Q)) {
1006
- const h = c === y.GEO_POINT ? $.IS + "~" : $.IS;
1007
- return [`${s}${h}"${o[0]}"`];
1005
+ if (o.length === 1 && (o[0] === Y || o[0] === X)) {
1006
+ const p = c === y.GEO_POINT ? w.IS + "~" : w.IS;
1007
+ return [`${s}${p}"${o[0]}"`];
1008
1008
  }
1009
- if ((c === y.NUMERIC || c === y.DECIMAL2) && r === $.RANGE)
1010
- return [`${s}${$.IS}"${o.join('","')}"`];
1009
+ if ((c === y.NUMERIC || c === y.DECIMAL2) && r === w.RANGE)
1010
+ return [`${s}${w.IS}"${o.join('","')}"`];
1011
1011
  if (c === y.GEO_POINT) {
1012
- const h = o.map((u) => {
1012
+ const p = o.map((u) => {
1013
1013
  const v = u.indexOf("..");
1014
1014
  if (v === -1) return `(${u})`;
1015
1015
  const d = u.slice(0, v), g = u.slice(v);
1016
1016
  return `(${d})${g}`;
1017
1017
  });
1018
- return Fe(s, r + "~", h, ",", l);
1018
+ return Ee(s, r + "~", p, ",", l);
1019
1019
  }
1020
- return Fe(s, r, o, ",", l);
1020
+ return Ee(s, r, o, ",", l);
1021
1021
  }
1022
1022
  function Fi(t, e, s) {
1023
1023
  const i = _s(t, e);
@@ -1037,7 +1037,7 @@ function Ai(t) {
1037
1037
  return t.slice(e.length);
1038
1038
  return t;
1039
1039
  }
1040
- function os(t) {
1040
+ function ns(t) {
1041
1041
  return t.map((e) => e.replace(/#/g, ""));
1042
1042
  }
1043
1043
  const Ti = /* @__PURE__ */ new Set([
@@ -1045,7 +1045,7 @@ const Ti = /* @__PURE__ */ new Set([
1045
1045
  b.LICENSE_EXPIRY,
1046
1046
  V.DUE_DATE
1047
1047
  ]);
1048
- function Je(t) {
1048
+ function Ut(t) {
1049
1049
  if (!t) return {};
1050
1050
  const e = {};
1051
1051
  for (const [s, i] of Object.entries(t))
@@ -1071,9 +1071,9 @@ function Oi(t) {
1071
1071
  const e = localStorage.getItem(us + t), s = localStorage.getItem(gs + t);
1072
1072
  let i;
1073
1073
  try {
1074
- i = e ? JSON.parse(e) : [...is];
1074
+ i = e ? JSON.parse(e) : [...as];
1075
1075
  } catch {
1076
- i = [...is];
1076
+ i = [...as];
1077
1077
  }
1078
1078
  let a;
1079
1079
  try {
@@ -1086,17 +1086,17 @@ function Oi(t) {
1086
1086
  function Li(t, e) {
1087
1087
  localStorage.setItem(us + t, JSON.stringify(e));
1088
1088
  }
1089
- function Pi(t, e) {
1089
+ function Ii(t, e) {
1090
1090
  localStorage.setItem(gs + t, JSON.stringify(e));
1091
1091
  }
1092
1092
  const ys = "sort-by", xs = "sort-order";
1093
- function ns(t, e) {
1093
+ function ls(t, e) {
1094
1094
  try {
1095
1095
  localStorage.setItem(ys, t), localStorage.setItem(xs, e);
1096
1096
  } catch {
1097
1097
  }
1098
1098
  }
1099
- function Ii() {
1099
+ function Pi() {
1100
1100
  try {
1101
1101
  const t = localStorage.getItem(ys), e = localStorage.getItem(xs);
1102
1102
  return { sortBy: t, sortDirection: e };
@@ -1105,62 +1105,65 @@ function Ii() {
1105
1105
  }
1106
1106
  }
1107
1107
  const ws = "ap-last-folder", $s = "ap-last-view", ks = "ap-last-tab";
1108
- function ls(t) {
1108
+ function Ke(t, e) {
1109
+ return e ? `${t}:${e}` : t;
1110
+ }
1111
+ function cs(t, e) {
1109
1112
  try {
1110
- localStorage.setItem(ws, t);
1113
+ localStorage.setItem(Ke(ws, e), t);
1111
1114
  } catch {
1112
1115
  }
1113
1116
  }
1114
- function cs() {
1117
+ function Di(t) {
1115
1118
  try {
1116
- return localStorage.getItem(ws);
1119
+ return localStorage.getItem(Ke(ws, t));
1117
1120
  } catch {
1118
1121
  return null;
1119
1122
  }
1120
1123
  }
1121
- function Di(t) {
1124
+ function zi(t, e) {
1122
1125
  try {
1123
- localStorage.setItem($s, t);
1126
+ localStorage.setItem(Ke($s, e), t);
1124
1127
  } catch {
1125
1128
  }
1126
1129
  }
1127
- function zi() {
1130
+ function Ri(t) {
1128
1131
  try {
1129
- return localStorage.getItem($s);
1132
+ return localStorage.getItem(Ke($s, t));
1130
1133
  } catch {
1131
1134
  return null;
1132
1135
  }
1133
1136
  }
1134
- function Ri(t) {
1137
+ function ji(t, e) {
1135
1138
  try {
1136
- localStorage.setItem(ks, t);
1139
+ localStorage.setItem(Ke(ks, e), t);
1137
1140
  } catch {
1138
1141
  }
1139
1142
  }
1140
- function Ni() {
1143
+ function Ni(t) {
1141
1144
  try {
1142
- const t = localStorage.getItem(ks);
1143
- return t === "assets" || t === "folders" ? t : null;
1145
+ const e = localStorage.getItem(Ke(ks, t));
1146
+ return e === "assets" || e === "folders" ? e : null;
1144
1147
  } catch {
1145
1148
  return null;
1146
1149
  }
1147
1150
  }
1148
- function ji(t) {
1151
+ function Bi(t) {
1149
1152
  const e = t.replace("#", ""), s = e.length === 3 ? e[0] + e[0] + e[1] + e[1] + e[2] + e[2] : e, i = parseInt(s.slice(0, 2), 16) / 255, a = parseInt(s.slice(2, 4), 16) / 255, r = parseInt(s.slice(4, 6), 16) / 255;
1150
1153
  return [i, a, r];
1151
1154
  }
1152
1155
  function Rt(t) {
1153
1156
  return t <= 0.04045 ? t / 12.92 : Math.pow((t + 0.055) / 1.055, 2.4);
1154
1157
  }
1155
- function Bi(t, e, s) {
1156
- const i = Rt(t), a = Rt(e), r = Rt(s), o = 0.4122214708 * i + 0.5363325363 * a + 0.0514459929 * r, l = 0.2119034982 * i + 0.6806995451 * a + 0.1073969566 * r, c = 0.0883024619 * i + 0.2817188376 * a + 0.6299787005 * r, h = Math.cbrt(o), u = Math.cbrt(l), v = Math.cbrt(c), d = 0.2104542553 * h + 0.793617785 * u - 0.0040720468 * v, g = 1.9779984951 * h - 2.428592205 * u + 0.4505937099 * v, m = 0.0259040371 * h + 0.7827717662 * u - 0.808675766 * v, x = Math.sqrt(g * g + m * m);
1157
- let w = Math.atan2(m, g) * (180 / Math.PI);
1158
- return w < 0 && (w += 360), [d, x, w];
1158
+ function Ui(t, e, s) {
1159
+ const i = Rt(t), a = Rt(e), r = Rt(s), o = 0.4122214708 * i + 0.5363325363 * a + 0.0514459929 * r, l = 0.2119034982 * i + 0.6806995451 * a + 0.1073969566 * r, c = 0.0883024619 * i + 0.2817188376 * a + 0.6299787005 * r, p = Math.cbrt(o), u = Math.cbrt(l), v = Math.cbrt(c), d = 0.2104542553 * p + 0.793617785 * u - 0.0040720468 * v, g = 1.9779984951 * p - 2.428592205 * u + 0.4505937099 * v, m = 0.0259040371 * p + 0.7827717662 * u - 0.808675766 * v, x = Math.sqrt(g * g + m * m);
1160
+ let k = Math.atan2(m, g) * (180 / Math.PI);
1161
+ return k < 0 && (k += 360), [d, x, k];
1159
1162
  }
1160
- function Ui(t) {
1163
+ function Vi(t) {
1161
1164
  return t > 0.7;
1162
1165
  }
1163
- function Vi(t, e) {
1166
+ function qi(t, e) {
1164
1167
  const s = [
1165
1168
  "--ap-primary",
1166
1169
  "--ap-primary-foreground",
@@ -1176,29 +1179,29 @@ function Vi(t, e) {
1176
1179
  t.style.removeProperty(v);
1177
1180
  return;
1178
1181
  }
1179
- const [i, a, r] = ji(e), [o, l, c] = Bi(i, a, r), h = `oklch(${o.toFixed(3)} ${l.toFixed(3)} ${c.toFixed(1)})`, u = Ui(o) ? "#000" : "#fff";
1180
- t.style.setProperty("--ap-primary", h), t.style.setProperty("--ap-primary-foreground", u), t.style.setProperty("--ap-primary-10", `oklch(${o.toFixed(3)} ${l.toFixed(3)} ${c.toFixed(1)} / 0.1)`), t.style.setProperty("--ap-primary-20", `oklch(${o.toFixed(3)} ${l.toFixed(3)} ${c.toFixed(1)} / 0.2)`), t.style.setProperty("--ap-accent", `oklch(${o.toFixed(3)} ${l.toFixed(3)} ${c.toFixed(1)} / 0.07)`), t.style.setProperty("--ap-accent-foreground", h), t.style.setProperty("--ap-ring", `oklch(${o.toFixed(3)} ${l.toFixed(3)} ${c.toFixed(1)} / 0.7)`), t.style.setProperty("--ap-selection-bg", `oklch(${o.toFixed(3)} ${l.toFixed(3)} ${c.toFixed(1)} / 0.08)`);
1182
+ const [i, a, r] = Bi(e), [o, l, c] = Ui(i, a, r), p = `oklch(${o.toFixed(3)} ${l.toFixed(3)} ${c.toFixed(1)})`, u = Vi(o) ? "#000" : "#fff";
1183
+ t.style.setProperty("--ap-primary", p), t.style.setProperty("--ap-primary-foreground", u), t.style.setProperty("--ap-primary-10", `oklch(${o.toFixed(3)} ${l.toFixed(3)} ${c.toFixed(1)} / 0.1)`), t.style.setProperty("--ap-primary-20", `oklch(${o.toFixed(3)} ${l.toFixed(3)} ${c.toFixed(1)} / 0.2)`), t.style.setProperty("--ap-accent", `oklch(${o.toFixed(3)} ${l.toFixed(3)} ${c.toFixed(1)} / 0.07)`), t.style.setProperty("--ap-accent-foreground", p), t.style.setProperty("--ap-ring", `oklch(${o.toFixed(3)} ${l.toFixed(3)} ${c.toFixed(1)} / 0.7)`), t.style.setProperty("--ap-selection-bg", `oklch(${o.toFixed(3)} ${l.toFixed(3)} ${c.toFixed(1)} / 0.08)`);
1181
1184
  }
1182
- const qt = [
1185
+ const Ht = [
1183
1186
  { value: "name", label: "Name" },
1184
1187
  { value: "created_at", label: "Uploaded" },
1185
1188
  { value: "modified_at", label: "Modified" },
1186
1189
  { value: "size", label: "Size" },
1187
1190
  { value: "type", label: "Format" }
1188
- ], qi = [
1189
- { value: "relevance", label: "Relevance" },
1190
- ...qt
1191
1191
  ], Hi = [
1192
+ { value: "relevance", label: "Relevance" },
1193
+ ...Ht
1194
+ ], Gi = [
1192
1195
  { value: "name", label: "Name" },
1193
1196
  { value: "created_at", label: "Uploaded" },
1194
1197
  { value: "modified_at", label: "Modified" },
1195
1198
  { value: "files_count_recursive", label: "Assets count" },
1196
1199
  { value: "files_size_recursive", label: "Assets size" }
1197
1200
  ];
1198
- var Gi = Object.defineProperty, Ki = Object.getOwnPropertyDescriptor, Ht = (t, e, s, i) => {
1199
- for (var a = i > 1 ? void 0 : i ? Ki(e, s) : e, r = t.length - 1, o; r >= 0; r--)
1201
+ var Ki = Object.defineProperty, Yi = Object.getOwnPropertyDescriptor, Gt = (t, e, s, i) => {
1202
+ for (var a = i > 1 ? void 0 : i ? Yi(e, s) : e, r = t.length - 1, o; r >= 0; r--)
1200
1203
  (o = t[r]) && (a = (i ? o(e, s, a) : o(a)) || a);
1201
- return i && a && Gi(e, s, a), a;
1204
+ return i && a && Ki(e, s, a), a;
1202
1205
  };
1203
1206
  let tt = class extends S {
1204
1207
  constructor() {
@@ -1247,7 +1250,7 @@ let tt = class extends S {
1247
1250
  `;
1248
1251
  }
1249
1252
  };
1250
- tt.styles = k`
1253
+ tt.styles = $`
1251
1254
  :host {
1252
1255
  display: contents;
1253
1256
  }
@@ -1321,33 +1324,33 @@ tt.styles = k`
1321
1324
  }
1322
1325
  }
1323
1326
  `;
1324
- Ht([
1325
- p({ type: Boolean })
1327
+ Gt([
1328
+ h({ type: Boolean })
1326
1329
  ], tt.prototype, "open", 2);
1327
- Ht([
1328
- Oe("dialog")
1330
+ Gt([
1331
+ Le("dialog")
1329
1332
  ], tt.prototype, "dialog", 2);
1330
- tt = Ht([
1331
- F("ap-modal")
1333
+ tt = Gt([
1334
+ C("ap-modal")
1332
1335
  ], tt);
1333
- function Yi(t, e) {
1336
+ function Xi(t, e) {
1334
1337
  let s;
1335
1338
  const i = ((...a) => {
1336
1339
  clearTimeout(s), s = setTimeout(() => t(...a), e);
1337
1340
  });
1338
1341
  return i.cancel = () => clearTimeout(s), i;
1339
1342
  }
1340
- const re = k`
1343
+ const re = $`
1341
1344
  *, *::before, *::after {
1342
1345
  box-sizing: border-box;
1343
1346
  }
1344
1347
  `;
1345
- var Xi = Object.defineProperty, Wi = Object.getOwnPropertyDescriptor, St = (t, e, s, i) => {
1346
- for (var a = i > 1 ? void 0 : i ? Wi(e, s) : e, r = t.length - 1, o; r >= 0; r--)
1348
+ var Wi = Object.defineProperty, Qi = Object.getOwnPropertyDescriptor, St = (t, e, s, i) => {
1349
+ for (var a = i > 1 ? void 0 : i ? Qi(e, s) : e, r = t.length - 1, o; r >= 0; r--)
1347
1350
  (o = t[r]) && (a = (i ? o(e, s, a) : o(a)) || a);
1348
- return i && a && Xi(e, s, a), a;
1351
+ return i && a && Wi(e, s, a), a;
1349
1352
  };
1350
- let je = class extends S {
1353
+ let Ne = class extends S {
1351
1354
  constructor() {
1352
1355
  super(...arguments), this.groups = [], this.selectedFilters = {}, this._open = !1, this._handleOutsideClick = (t) => {
1353
1356
  this._open && !t.composedPath().includes(this) && (this._open = !1);
@@ -1405,7 +1408,7 @@ let je = class extends S {
1405
1408
  `;
1406
1409
  }
1407
1410
  };
1408
- je.styles = k`
1411
+ Ne.styles = $`
1409
1412
  :host {
1410
1413
  position: relative;
1411
1414
  display: inline-block;
@@ -1492,29 +1495,29 @@ je.styles = k`
1492
1495
  }
1493
1496
  `;
1494
1497
  St([
1495
- p({ type: Array })
1496
- ], je.prototype, "groups", 2);
1498
+ h({ type: Array })
1499
+ ], Ne.prototype, "groups", 2);
1497
1500
  St([
1498
- p({ type: Object })
1499
- ], je.prototype, "selectedFilters", 2);
1501
+ h({ type: Object })
1502
+ ], Ne.prototype, "selectedFilters", 2);
1500
1503
  St([
1501
1504
  _()
1502
- ], je.prototype, "_open", 2);
1503
- je = St([
1504
- F("ap-regional-settings")
1505
- ], je);
1506
- var Qi = Object.defineProperty, Zi = Object.getOwnPropertyDescriptor, ue = (t, e, s, i) => {
1507
- for (var a = i > 1 ? void 0 : i ? Zi(e, s) : e, r = t.length - 1, o; r >= 0; r--)
1505
+ ], Ne.prototype, "_open", 2);
1506
+ Ne = St([
1507
+ C("ap-regional-settings")
1508
+ ], Ne);
1509
+ var Zi = Object.defineProperty, Ji = Object.getOwnPropertyDescriptor, ge = (t, e, s, i) => {
1510
+ for (var a = i > 1 ? void 0 : i ? Ji(e, s) : e, r = t.length - 1, o; r >= 0; r--)
1508
1511
  (o = t[r]) && (a = (i ? o(e, s, a) : o(a)) || a);
1509
- return i && a && Qi(e, s, a), a;
1512
+ return i && a && Zi(e, s, a), a;
1510
1513
  };
1511
- const Ji = [
1514
+ const ea = [
1512
1515
  { value: "assets", label: "Assets", icon: "gallery-vertical-end" },
1513
1516
  { value: "folders", label: "Folders", icon: "folder-open" }
1514
1517
  ];
1515
- let se = class extends S {
1518
+ let te = class extends S {
1516
1519
  constructor() {
1517
- super(...arguments), this.activeTab = "assets", this.tabs = ["assets", "folders"], this.viewMode = "grid", this.searchQuery = "", this.regionalGroups = [], this.regionalFilters = {}, this.hideClose = !1, this._localSearch = "", this._debouncedSearch = Yi((t) => {
1520
+ super(...arguments), this.activeTab = "assets", this.tabs = ["assets", "folders"], this.viewMode = "grid", this.searchQuery = "", this.regionalGroups = [], this.regionalFilters = {}, this.hideClose = !1, this._localSearch = "", this._debouncedSearch = Xi((t) => {
1518
1521
  (t.length === 0 || t.length >= 3) && this.dispatchEvent(new CustomEvent("search-change", { detail: { value: t }, bubbles: !0, composed: !0 }));
1519
1522
  }, 300);
1520
1523
  }
@@ -1550,7 +1553,7 @@ let se = class extends S {
1550
1553
  }
1551
1554
  render() {
1552
1555
  var e, s;
1553
- const t = Ji.filter((i) => this.tabs.includes(i.value));
1556
+ const t = ea.filter((i) => this.tabs.includes(i.value));
1554
1557
  return ((e = t.find((i) => i.value === this.activeTab)) == null ? void 0 : e.label) ?? ((s = t[0]) == null || s.label), n`
1555
1558
  <div class="header-row">
1556
1559
  ${t.length > 1 ? n`<ap-dropdown
@@ -1597,7 +1600,7 @@ let se = class extends S {
1597
1600
  `;
1598
1601
  }
1599
1602
  };
1600
- se.styles = [re, k`
1603
+ te.styles = [re, $`
1601
1604
  :host {
1602
1605
  display: block;
1603
1606
  padding: 16px 20px;
@@ -1709,37 +1712,37 @@ se.styles = [re, k`
1709
1712
  background: var(--ap-border, oklch(92.86% 0.009 247.92));
1710
1713
  }
1711
1714
  `];
1712
- ue([
1713
- p()
1714
- ], se.prototype, "activeTab", 2);
1715
- ue([
1716
- p({ type: Array })
1717
- ], se.prototype, "tabs", 2);
1718
- ue([
1719
- p()
1720
- ], se.prototype, "viewMode", 2);
1721
- ue([
1722
- p()
1723
- ], se.prototype, "searchQuery", 2);
1724
- ue([
1725
- p({ type: Array })
1726
- ], se.prototype, "regionalGroups", 2);
1727
- ue([
1728
- p({ type: Object })
1729
- ], se.prototype, "regionalFilters", 2);
1730
- ue([
1731
- p({ type: Boolean })
1732
- ], se.prototype, "hideClose", 2);
1733
- ue([
1715
+ ge([
1716
+ h()
1717
+ ], te.prototype, "activeTab", 2);
1718
+ ge([
1719
+ h({ type: Array })
1720
+ ], te.prototype, "tabs", 2);
1721
+ ge([
1722
+ h()
1723
+ ], te.prototype, "viewMode", 2);
1724
+ ge([
1725
+ h()
1726
+ ], te.prototype, "searchQuery", 2);
1727
+ ge([
1728
+ h({ type: Array })
1729
+ ], te.prototype, "regionalGroups", 2);
1730
+ ge([
1731
+ h({ type: Object })
1732
+ ], te.prototype, "regionalFilters", 2);
1733
+ ge([
1734
+ h({ type: Boolean })
1735
+ ], te.prototype, "hideClose", 2);
1736
+ ge([
1734
1737
  _()
1735
- ], se.prototype, "_localSearch", 2);
1736
- se = ue([
1737
- F("ap-header")
1738
- ], se);
1739
- var ea = Object.defineProperty, ta = Object.getOwnPropertyDescriptor, Ss = (t, e, s, i) => {
1740
- for (var a = i > 1 ? void 0 : i ? ta(e, s) : e, r = t.length - 1, o; r >= 0; r--)
1738
+ ], te.prototype, "_localSearch", 2);
1739
+ te = ge([
1740
+ C("ap-header")
1741
+ ], te);
1742
+ var ta = Object.defineProperty, sa = Object.getOwnPropertyDescriptor, Ss = (t, e, s, i) => {
1743
+ for (var a = i > 1 ? void 0 : i ? sa(e, s) : e, r = t.length - 1, o; r >= 0; r--)
1741
1744
  (o = t[r]) && (a = (i ? o(e, s, a) : o(a)) || a);
1742
- return i && a && ea(e, s, a), a;
1745
+ return i && a && ta(e, s, a), a;
1743
1746
  };
1744
1747
  let mt = class extends S {
1745
1748
  constructor() {
@@ -1762,7 +1765,7 @@ let mt = class extends S {
1762
1765
  `;
1763
1766
  }
1764
1767
  };
1765
- mt.styles = k`
1768
+ mt.styles = $`
1766
1769
  :host {
1767
1770
  display: block;
1768
1771
  padding: 4px 20px 12px;
@@ -1800,15 +1803,15 @@ mt.styles = k`
1800
1803
  }
1801
1804
  `;
1802
1805
  Ss([
1803
- p({ type: Array })
1806
+ h({ type: Array })
1804
1807
  ], mt.prototype, "items", 2);
1805
1808
  mt = Ss([
1806
- F("ap-breadcrumb")
1809
+ C("ap-breadcrumb")
1807
1810
  ], mt);
1808
- var sa = Object.defineProperty, ia = Object.getOwnPropertyDescriptor, Gt = (t, e, s, i) => {
1809
- for (var a = i > 1 ? void 0 : i ? ia(e, s) : e, r = t.length - 1, o; r >= 0; r--)
1811
+ var ia = Object.defineProperty, aa = Object.getOwnPropertyDescriptor, Kt = (t, e, s, i) => {
1812
+ for (var a = i > 1 ? void 0 : i ? aa(e, s) : e, r = t.length - 1, o; r >= 0; r--)
1810
1813
  (o = t[r]) && (a = (i ? o(e, s, a) : o(a)) || a);
1811
- return i && a && sa(e, s, a), a;
1814
+ return i && a && ia(e, s, a), a;
1812
1815
  };
1813
1816
  let st = class extends S {
1814
1817
  constructor() {
@@ -1823,7 +1826,7 @@ let st = class extends S {
1823
1826
  ` : n``;
1824
1827
  }
1825
1828
  };
1826
- st.styles = k`
1829
+ st.styles = $`
1827
1830
  :host {
1828
1831
  display: block;
1829
1832
  }
@@ -1849,19 +1852,19 @@ st.styles = k`
1849
1852
  margin-bottom: 12px;
1850
1853
  }
1851
1854
  `;
1852
- Gt([
1853
- p()
1855
+ Kt([
1856
+ h()
1854
1857
  ], st.prototype, "title", 2);
1855
- Gt([
1856
- p({ type: Boolean })
1858
+ Kt([
1859
+ h({ type: Boolean })
1857
1860
  ], st.prototype, "open", 2);
1858
- st = Gt([
1859
- F("ap-filter-popover")
1861
+ st = Kt([
1862
+ C("ap-filter-popover")
1860
1863
  ], st);
1861
- var aa = Object.defineProperty, ra = Object.getOwnPropertyDescriptor, rt = (t, e, s, i) => {
1862
- for (var a = i > 1 ? void 0 : i ? ra(e, s) : e, r = t.length - 1, o; r >= 0; r--)
1864
+ var ra = Object.defineProperty, oa = Object.getOwnPropertyDescriptor, rt = (t, e, s, i) => {
1865
+ for (var a = i > 1 ? void 0 : i ? oa(e, s) : e, r = t.length - 1, o; r >= 0; r--)
1863
1866
  (o = t[r]) && (a = (i ? o(e, s, a) : o(a)) || a);
1864
- return i && a && aa(e, s, a), a;
1867
+ return i && a && ra(e, s, a), a;
1865
1868
  };
1866
1869
  function ds(t) {
1867
1870
  var i;
@@ -1891,7 +1894,7 @@ function ds(t) {
1891
1894
  return (o === -1 ? 999 : o) - (l === -1 ? 999 : l);
1892
1895
  });
1893
1896
  }
1894
- let Ee = class extends S {
1897
+ let Ae = class extends S {
1895
1898
  constructor() {
1896
1899
  super(...arguments), this.selected = [], this.fileTypes = [], this._search = "", this._expanded = /* @__PURE__ */ new Set();
1897
1900
  }
@@ -1939,7 +1942,7 @@ let Ee = class extends S {
1939
1942
  detail: {
1940
1943
  key: b.TYPE,
1941
1944
  values: t,
1942
- operator: $.IS
1945
+ operator: w.IS
1943
1946
  },
1944
1947
  bubbles: !0,
1945
1948
  composed: !0
@@ -2058,7 +2061,7 @@ let Ee = class extends S {
2058
2061
  `;
2059
2062
  }
2060
2063
  };
2061
- Ee.styles = k`
2064
+ Ae.styles = $`
2062
2065
  :host {
2063
2066
  display: block;
2064
2067
  }
@@ -2207,21 +2210,21 @@ Ee.styles = k`
2207
2210
  }
2208
2211
  `;
2209
2212
  rt([
2210
- p({ type: Array })
2211
- ], Ee.prototype, "selected", 2);
2213
+ h({ type: Array })
2214
+ ], Ae.prototype, "selected", 2);
2212
2215
  rt([
2213
- p({ type: Array })
2214
- ], Ee.prototype, "fileTypes", 2);
2216
+ h({ type: Array })
2217
+ ], Ae.prototype, "fileTypes", 2);
2215
2218
  rt([
2216
2219
  _()
2217
- ], Ee.prototype, "_search", 2);
2220
+ ], Ae.prototype, "_search", 2);
2218
2221
  rt([
2219
2222
  _()
2220
- ], Ee.prototype, "_expanded", 2);
2221
- Ee = rt([
2222
- F("ap-filter-type")
2223
- ], Ee);
2224
- const ge = k`
2223
+ ], Ae.prototype, "_expanded", 2);
2224
+ Ae = rt([
2225
+ C("ap-filter-type")
2226
+ ], Ae);
2227
+ const fe = $`
2225
2228
  :host {
2226
2229
  display: block;
2227
2230
  }
@@ -2505,15 +2508,15 @@ const ge = k`
2505
2508
  color: var(--ap-muted-foreground, oklch(0.685 0.033 249.82));
2506
2509
  }
2507
2510
  `;
2508
- var oa = Object.defineProperty, na = Object.getOwnPropertyDescriptor, Le = (t, e, s, i) => {
2509
- for (var a = i > 1 ? void 0 : i ? na(e, s) : e, r = t.length - 1, o; r >= 0; r--)
2511
+ var na = Object.defineProperty, la = Object.getOwnPropertyDescriptor, Ie = (t, e, s, i) => {
2512
+ for (var a = i > 1 ? void 0 : i ? la(e, s) : e, r = t.length - 1, o; r >= 0; r--)
2510
2513
  (o = t[r]) && (a = (i ? o(e, s, a) : o(a)) || a);
2511
- return i && a && oa(e, s, a), a;
2514
+ return i && a && na(e, s, a), a;
2512
2515
  };
2513
- function Nt(t) {
2516
+ function jt(t) {
2514
2517
  return t.toISOString().split("T")[0];
2515
2518
  }
2516
- let de = class extends S {
2519
+ let pe = class extends S {
2517
2520
  constructor() {
2518
2521
  super(...arguments), this.filterKey = b.DATE, this.field = "created", this.kind = null, this.preset = "", this.from = "", this.to = "";
2519
2522
  }
@@ -2521,10 +2524,10 @@ let de = class extends S {
2521
2524
  return this.filterKey === b.LICENSE_EXPIRY;
2522
2525
  }
2523
2526
  get _rangeOptions() {
2524
- return this._isLicenseExpiry ? ms : Vt;
2527
+ return this._isLicenseExpiry ? ms : qt;
2525
2528
  }
2526
2529
  get _todayStr() {
2527
- return Nt(/* @__PURE__ */ new Date());
2530
+ return jt(/* @__PURE__ */ new Date());
2528
2531
  }
2529
2532
  get _hasFilter() {
2530
2533
  return !!(this.kind || this.preset || this.from || this.to);
@@ -2602,7 +2605,7 @@ let de = class extends S {
2602
2605
  _renderDateInputs() {
2603
2606
  const t = this.preset;
2604
2607
  if (!["before", "after", "between", "specific"].includes(t)) return f;
2605
- const e = this.from ? Nt(new Date(this.from)) : "", s = this.to ? Nt(new Date(this.to)) : "", i = this._todayStr;
2608
+ const e = this.from ? jt(new Date(this.from)) : "", s = this.to ? jt(new Date(this.to)) : "", i = this._todayStr;
2606
2609
  return t === "specific" ? n`
2607
2610
  <div class="filter-section date-inputs">
2608
2611
  <div>
@@ -2685,38 +2688,38 @@ let de = class extends S {
2685
2688
  `;
2686
2689
  }
2687
2690
  };
2688
- de.styles = [ge, k`
2691
+ pe.styles = [fe, $`
2689
2692
  .date-inputs {
2690
2693
  margin-top: 4px;
2691
2694
  }
2692
2695
  `];
2693
- Le([
2694
- p()
2695
- ], de.prototype, "filterKey", 2);
2696
- Le([
2697
- p()
2698
- ], de.prototype, "field", 2);
2699
- Le([
2700
- p()
2701
- ], de.prototype, "kind", 2);
2702
- Le([
2703
- p()
2704
- ], de.prototype, "preset", 2);
2705
- Le([
2706
- p()
2707
- ], de.prototype, "from", 2);
2708
- Le([
2709
- p()
2710
- ], de.prototype, "to", 2);
2711
- de = Le([
2712
- F("ap-filter-date")
2713
- ], de);
2714
- var la = Object.defineProperty, ca = Object.getOwnPropertyDescriptor, Ke = (t, e, s, i) => {
2715
- for (var a = i > 1 ? void 0 : i ? ca(e, s) : e, r = t.length - 1, o; r >= 0; r--)
2696
+ Ie([
2697
+ h()
2698
+ ], pe.prototype, "filterKey", 2);
2699
+ Ie([
2700
+ h()
2701
+ ], pe.prototype, "field", 2);
2702
+ Ie([
2703
+ h()
2704
+ ], pe.prototype, "kind", 2);
2705
+ Ie([
2706
+ h()
2707
+ ], pe.prototype, "preset", 2);
2708
+ Ie([
2709
+ h()
2710
+ ], pe.prototype, "from", 2);
2711
+ Ie([
2712
+ h()
2713
+ ], pe.prototype, "to", 2);
2714
+ pe = Ie([
2715
+ C("ap-filter-date")
2716
+ ], pe);
2717
+ var ca = Object.defineProperty, da = Object.getOwnPropertyDescriptor, Ye = (t, e, s, i) => {
2718
+ for (var a = i > 1 ? void 0 : i ? da(e, s) : e, r = t.length - 1, o; r >= 0; r--)
2716
2719
  (o = t[r]) && (a = (i ? o(e, s, a) : o(a)) || a);
2717
- return i && a && la(e, s, a), a;
2720
+ return i && a && ca(e, s, a), a;
2718
2721
  };
2719
- let ve = class extends S {
2722
+ let me = class extends S {
2720
2723
  constructor() {
2721
2724
  super(...arguments), this.tags = [], this.selected = [], this.filterKey = b.TAGS, this._search = "";
2722
2725
  }
@@ -2747,7 +2750,7 @@ let ve = class extends S {
2747
2750
  detail: {
2748
2751
  key: this.filterKey,
2749
2752
  values: s,
2750
- operator: $.IS
2753
+ operator: w.IS
2751
2754
  },
2752
2755
  bubbles: !0,
2753
2756
  composed: !0
@@ -2761,7 +2764,7 @@ let ve = class extends S {
2761
2764
  detail: {
2762
2765
  key: this.filterKey,
2763
2766
  values: e,
2764
- operator: $.IS
2767
+ operator: w.IS
2765
2768
  },
2766
2769
  bubbles: !0,
2767
2770
  composed: !0
@@ -2774,7 +2777,7 @@ let ve = class extends S {
2774
2777
  detail: {
2775
2778
  key: this.filterKey,
2776
2779
  values: [],
2777
- operator: $.IS
2780
+ operator: w.IS
2778
2781
  },
2779
2782
  bubbles: !0,
2780
2783
  composed: !0
@@ -2919,7 +2922,7 @@ let ve = class extends S {
2919
2922
  `;
2920
2923
  }
2921
2924
  };
2922
- ve.styles = [re, ge, k`
2925
+ me.styles = [re, fe, $`
2923
2926
  .tag-item {
2924
2927
  display: flex;
2925
2928
  align-items: center;
@@ -3004,30 +3007,30 @@ ve.styles = [re, ge, k`
3004
3007
  overflow-y: visible;
3005
3008
  }
3006
3009
  `];
3007
- Ke([
3008
- p({ type: Array })
3009
- ], ve.prototype, "tags", 2);
3010
- Ke([
3011
- p({ type: Array })
3012
- ], ve.prototype, "selected", 2);
3013
- Ke([
3014
- p()
3015
- ], ve.prototype, "filterKey", 2);
3016
- Ke([
3017
- Oe(".tag-search")
3018
- ], ve.prototype, "_searchInput", 2);
3019
- Ke([
3010
+ Ye([
3011
+ h({ type: Array })
3012
+ ], me.prototype, "tags", 2);
3013
+ Ye([
3014
+ h({ type: Array })
3015
+ ], me.prototype, "selected", 2);
3016
+ Ye([
3017
+ h()
3018
+ ], me.prototype, "filterKey", 2);
3019
+ Ye([
3020
+ Le(".tag-search")
3021
+ ], me.prototype, "_searchInput", 2);
3022
+ Ye([
3020
3023
  _()
3021
- ], ve.prototype, "_search", 2);
3022
- ve = Ke([
3023
- F("ap-filter-tags")
3024
- ], ve);
3025
- var da = Object.defineProperty, pa = Object.getOwnPropertyDescriptor, ot = (t, e, s, i) => {
3026
- for (var a = i > 1 ? void 0 : i ? pa(e, s) : e, r = t.length - 1, o; r >= 0; r--)
3024
+ ], me.prototype, "_search", 2);
3025
+ me = Ye([
3026
+ C("ap-filter-tags")
3027
+ ], me);
3028
+ var pa = Object.defineProperty, ha = Object.getOwnPropertyDescriptor, ot = (t, e, s, i) => {
3029
+ for (var a = i > 1 ? void 0 : i ? ha(e, s) : e, r = t.length - 1, o; r >= 0; r--)
3027
3030
  (o = t[r]) && (a = (i ? o(e, s, a) : o(a)) || a);
3028
- return i && a && da(e, s, a), a;
3031
+ return i && a && pa(e, s, a), a;
3029
3032
  };
3030
- let Ae = class extends S {
3033
+ let Te = class extends S {
3031
3034
  constructor() {
3032
3035
  super(...arguments), this.labels = [], this.selected = [], this._search = "";
3033
3036
  }
@@ -3052,7 +3055,7 @@ let Ae = class extends S {
3052
3055
  detail: {
3053
3056
  key: b.LABELS,
3054
3057
  values: s,
3055
- operator: $.IS
3058
+ operator: w.IS
3056
3059
  },
3057
3060
  bubbles: !0,
3058
3061
  composed: !0
@@ -3066,7 +3069,7 @@ let Ae = class extends S {
3066
3069
  detail: {
3067
3070
  key: b.LABELS,
3068
3071
  values: e,
3069
- operator: $.IS
3072
+ operator: w.IS
3070
3073
  },
3071
3074
  bubbles: !0,
3072
3075
  composed: !0
@@ -3079,7 +3082,7 @@ let Ae = class extends S {
3079
3082
  detail: {
3080
3083
  key: b.LABELS,
3081
3084
  values: [],
3082
- operator: $.IS
3085
+ operator: w.IS
3083
3086
  },
3084
3087
  bubbles: !0,
3085
3088
  composed: !0
@@ -3183,7 +3186,7 @@ let Ae = class extends S {
3183
3186
  `;
3184
3187
  }
3185
3188
  };
3186
- Ae.styles = [ge, k`
3189
+ Te.styles = [fe, $`
3187
3190
  .label-item {
3188
3191
  display: flex;
3189
3192
  align-items: center;
@@ -3234,35 +3237,35 @@ Ae.styles = [ge, k`
3234
3237
  }
3235
3238
  `];
3236
3239
  ot([
3237
- p({ type: Array })
3238
- ], Ae.prototype, "labels", 2);
3240
+ h({ type: Array })
3241
+ ], Te.prototype, "labels", 2);
3239
3242
  ot([
3240
- p({ type: Array })
3241
- ], Ae.prototype, "selected", 2);
3243
+ h({ type: Array })
3244
+ ], Te.prototype, "selected", 2);
3242
3245
  ot([
3243
- Oe(".search-input")
3244
- ], Ae.prototype, "_searchInput", 2);
3246
+ Le(".search-input")
3247
+ ], Te.prototype, "_searchInput", 2);
3245
3248
  ot([
3246
3249
  _()
3247
- ], Ae.prototype, "_search", 2);
3248
- Ae = ot([
3249
- F("ap-filter-labels")
3250
- ], Ae);
3251
- var ha = Object.defineProperty, ua = Object.getOwnPropertyDescriptor, Ye = (t, e, s, i) => {
3252
- for (var a = i > 1 ? void 0 : i ? ua(e, s) : e, r = t.length - 1, o; r >= 0; r--)
3250
+ ], Te.prototype, "_search", 2);
3251
+ Te = ot([
3252
+ C("ap-filter-labels")
3253
+ ], Te);
3254
+ var ua = Object.defineProperty, ga = Object.getOwnPropertyDescriptor, Xe = (t, e, s, i) => {
3255
+ for (var a = i > 1 ? void 0 : i ? ga(e, s) : e, r = t.length - 1, o; r >= 0; r--)
3253
3256
  (o = t[r]) && (a = (i ? o(e, s, a) : o(a)) || a);
3254
- return i && a && ha(e, s, a), a;
3257
+ return i && a && ua(e, s, a), a;
3255
3258
  };
3256
- const jt = 3, Ut = /^#[0-9A-Fa-f]{6}$/;
3257
- function ga(t) {
3259
+ const Nt = 3, Vt = /^#[0-9A-Fa-f]{6}$/;
3260
+ function fa(t) {
3258
3261
  const e = t.trim().split(/\s+/);
3259
- return e.length < 1 || !Ut.test(e[0]) ? null : {
3262
+ return e.length < 1 || !Vt.test(e[0]) ? null : {
3260
3263
  hex: e[0],
3261
3264
  tolerance: e[1] || gt,
3262
3265
  coverage: e[3] || ut
3263
3266
  };
3264
3267
  }
3265
- let me = class extends S {
3268
+ let be = class extends S {
3266
3269
  constructor() {
3267
3270
  super(...arguments), this.values = [], this._colors = [], this._advanced = !1, this._showPalette = !1, this._initialized = !1;
3268
3271
  }
@@ -3276,7 +3279,7 @@ let me = class extends S {
3276
3279
  if (t.has("values")) {
3277
3280
  const e = [];
3278
3281
  for (const s of this.values) {
3279
- const i = ga(s);
3282
+ const i = fa(s);
3280
3283
  i && e.push(i);
3281
3284
  }
3282
3285
  (!this._initialized || this.values.length === 0 && this._colors.length > 0) && (this._colors = e, e.length > 0 && (this._advanced = e.some(
@@ -3285,13 +3288,13 @@ let me = class extends S {
3285
3288
  }
3286
3289
  }
3287
3290
  _selectColor(t) {
3288
- if (!Ut.test(t)) return;
3291
+ if (!Vt.test(t)) return;
3289
3292
  const e = this._colors.findIndex((s) => s.hex.toLowerCase() === t.toLowerCase());
3290
3293
  if (e >= 0) {
3291
3294
  this._removeColor(e);
3292
3295
  return;
3293
3296
  }
3294
- this._colors.length >= jt || (this._colors = [
3297
+ this._colors.length >= Nt || (this._colors = [
3295
3298
  ...this._colors,
3296
3299
  {
3297
3300
  hex: t,
@@ -3311,7 +3314,7 @@ let me = class extends S {
3311
3314
  }
3312
3315
  _handleHexInput(t, e) {
3313
3316
  let i = e.target.value.trim();
3314
- if (i.startsWith("#") || (i = "#" + i), !Ut.test(i) || this._colors.some(
3317
+ if (i.startsWith("#") || (i = "#" + i), !Vt.test(i) || this._colors.some(
3315
3318
  (o, l) => l !== t && o.hex.toLowerCase() === i.toLowerCase()
3316
3319
  )) return;
3317
3320
  const r = [...this._colors];
@@ -3355,7 +3358,7 @@ let me = class extends S {
3355
3358
  );
3356
3359
  }
3357
3360
  _renderPalette() {
3358
- const t = this._selectedHexes, e = this._colors.length >= jt;
3361
+ const t = this._selectedHexes, e = this._colors.length >= Nt;
3359
3362
  return n`
3360
3363
  <div class="palette">
3361
3364
  ${oi.map(
@@ -3434,7 +3437,7 @@ let me = class extends S {
3434
3437
  `;
3435
3438
  }
3436
3439
  render() {
3437
- const t = this._colors.length === 0 || this._showPalette, e = this._colors.length < jt && !this._showPalette;
3440
+ const t = this._colors.length === 0 || this._showPalette, e = this._colors.length < Nt && !this._showPalette;
3438
3441
  return n`
3439
3442
  <div class="filter-content">
3440
3443
  <button
@@ -3483,7 +3486,7 @@ let me = class extends S {
3483
3486
  `;
3484
3487
  }
3485
3488
  };
3486
- me.styles = [re, ge, k`
3489
+ be.styles = [re, fe, $`
3487
3490
  /* ── Palette ── */
3488
3491
  .palette {
3489
3492
  display: grid;
@@ -3721,39 +3724,39 @@ me.styles = [re, ge, k`
3721
3724
  opacity: 0.8;
3722
3725
  }
3723
3726
  `];
3724
- Ye([
3725
- p({ type: Array })
3726
- ], me.prototype, "values", 2);
3727
- Ye([
3727
+ Xe([
3728
+ h({ type: Array })
3729
+ ], be.prototype, "values", 2);
3730
+ Xe([
3728
3731
  _()
3729
- ], me.prototype, "_colors", 2);
3730
- Ye([
3732
+ ], be.prototype, "_colors", 2);
3733
+ Xe([
3731
3734
  _()
3732
- ], me.prototype, "_advanced", 2);
3733
- Ye([
3735
+ ], be.prototype, "_advanced", 2);
3736
+ Xe([
3734
3737
  _()
3735
- ], me.prototype, "_showPalette", 2);
3736
- Ye([
3738
+ ], be.prototype, "_showPalette", 2);
3739
+ Xe([
3737
3740
  _()
3738
- ], me.prototype, "_initialized", 2);
3739
- me = Ye([
3740
- F("ap-filter-color")
3741
- ], me);
3742
- var fa = Object.defineProperty, va = Object.getOwnPropertyDescriptor, Pe = (t, e, s, i) => {
3743
- for (var a = i > 1 ? void 0 : i ? va(e, s) : e, r = t.length - 1, o; r >= 0; r--)
3741
+ ], be.prototype, "_initialized", 2);
3742
+ be = Xe([
3743
+ C("ap-filter-color")
3744
+ ], be);
3745
+ var va = Object.defineProperty, ma = Object.getOwnPropertyDescriptor, Pe = (t, e, s, i) => {
3746
+ for (var a = i > 1 ? void 0 : i ? ma(e, s) : e, r = t.length - 1, o; r >= 0; r--)
3744
3747
  (o = t[r]) && (a = (i ? o(e, s, a) : o(a)) || a);
3745
- return i && a && fa(e, s, a), a;
3748
+ return i && a && va(e, s, a), a;
3746
3749
  };
3747
- const ma = {
3750
+ const ba = {
3748
3751
  KB: 1 / 1e3,
3749
3752
  MB: 1,
3750
3753
  GB: 1e3
3751
- }, ba = [
3754
+ }, _a = [
3752
3755
  // KB disabled until backend supports sub-MB precision
3753
3756
  { value: "MB", label: "MB" },
3754
3757
  { value: "GB", label: "GB" }
3755
3758
  ];
3756
- let pe = class extends S {
3759
+ let he = class extends S {
3757
3760
  constructor() {
3758
3761
  super(...arguments), this.min = 0, this.max = 0, this._minVal = "", this._maxVal = "", this._unit = "MB", this._initialized = !1;
3759
3762
  }
@@ -3770,7 +3773,7 @@ let pe = class extends S {
3770
3773
  this._unit = t.detail.value, this._emitChange();
3771
3774
  }
3772
3775
  _emitChange() {
3773
- const t = ma[this._unit], e = this._minVal !== "" ? parseFloat((parseFloat(this._minVal) * t).toFixed(2)).toString() : null, s = this._maxVal !== "" ? parseFloat((parseFloat(this._maxVal) * t).toFixed(2)).toString() : null;
3776
+ const t = ba[this._unit], e = this._minVal !== "" ? parseFloat((parseFloat(this._minVal) * t).toFixed(2)).toString() : null, s = this._maxVal !== "" ? parseFloat((parseFloat(this._maxVal) * t).toFixed(2)).toString() : null;
3774
3777
  let i;
3775
3778
  if (e !== null && s !== null)
3776
3779
  i = `${e}..${s}`;
@@ -3784,7 +3787,7 @@ let pe = class extends S {
3784
3787
  detail: {
3785
3788
  key: b.SIZE,
3786
3789
  values: [],
3787
- operator: $.RANGE
3790
+ operator: w.RANGE
3788
3791
  },
3789
3792
  bubbles: !0,
3790
3793
  composed: !0
@@ -3797,7 +3800,7 @@ let pe = class extends S {
3797
3800
  detail: {
3798
3801
  key: b.SIZE,
3799
3802
  values: [i],
3800
- operator: $.RANGE
3803
+ operator: w.RANGE
3801
3804
  },
3802
3805
  bubbles: !0,
3803
3806
  composed: !0
@@ -3848,7 +3851,7 @@ let pe = class extends S {
3848
3851
  <div>
3849
3852
  <span class="input-label">Unit</span>
3850
3853
  <ap-dropdown
3851
- .options=${ba}
3854
+ .options=${_a}
3852
3855
  .value=${this._unit}
3853
3856
  @ap-change=${this._setUnit}
3854
3857
  ></ap-dropdown>
@@ -3858,9 +3861,9 @@ let pe = class extends S {
3858
3861
  `;
3859
3862
  }
3860
3863
  };
3861
- pe.styles = [
3862
- ge,
3863
- k`
3864
+ he.styles = [
3865
+ fe,
3866
+ $`
3864
3867
  /* Hide number input spinners */
3865
3868
  .filter-input[type='number']::-webkit-inner-spin-button,
3866
3869
  .filter-input[type='number']::-webkit-outer-spin-button {
@@ -3882,44 +3885,44 @@ pe.styles = [
3882
3885
  `
3883
3886
  ];
3884
3887
  Pe([
3885
- p({ type: Number })
3886
- ], pe.prototype, "min", 2);
3888
+ h({ type: Number })
3889
+ ], he.prototype, "min", 2);
3887
3890
  Pe([
3888
- p({ type: Number })
3889
- ], pe.prototype, "max", 2);
3891
+ h({ type: Number })
3892
+ ], he.prototype, "max", 2);
3890
3893
  Pe([
3891
3894
  _()
3892
- ], pe.prototype, "_minVal", 2);
3895
+ ], he.prototype, "_minVal", 2);
3893
3896
  Pe([
3894
3897
  _()
3895
- ], pe.prototype, "_maxVal", 2);
3898
+ ], he.prototype, "_maxVal", 2);
3896
3899
  Pe([
3897
3900
  _()
3898
- ], pe.prototype, "_unit", 2);
3901
+ ], he.prototype, "_unit", 2);
3899
3902
  Pe([
3900
3903
  _()
3901
- ], pe.prototype, "_initialized", 2);
3902
- pe = Pe([
3903
- F("ap-filter-size")
3904
- ], pe);
3905
- var _a = Object.defineProperty, ya = Object.getOwnPropertyDescriptor, Ct = (t, e, s, i) => {
3906
- for (var a = i > 1 ? void 0 : i ? ya(e, s) : e, r = t.length - 1, o; r >= 0; r--)
3904
+ ], he.prototype, "_initialized", 2);
3905
+ he = Pe([
3906
+ C("ap-filter-size")
3907
+ ], he);
3908
+ var ya = Object.defineProperty, xa = Object.getOwnPropertyDescriptor, Ct = (t, e, s, i) => {
3909
+ for (var a = i > 1 ? void 0 : i ? xa(e, s) : e, r = t.length - 1, o; r >= 0; r--)
3907
3910
  (o = t[r]) && (a = (i ? o(e, s, a) : o(a)) || a);
3908
- return i && a && _a(e, s, a), a;
3911
+ return i && a && ya(e, s, a), a;
3909
3912
  };
3910
- const xa = fe`
3913
+ const wa = ve`
3911
3914
  <svg width="20" height="20" viewBox="0 0 12 16" fill="none" xmlns="http://www.w3.org/2000/svg">
3912
3915
  <path d="M2.66666 1.9987C2.29847 1.9987 1.99999 2.29717 1.99999 2.66536L1.99999 13.332C1.99999 13.7002 2.29847 13.9987 2.66666 13.9987L9.33332 13.9987C9.70151 13.9987 9.99999 13.7002 9.99999 13.332L9.99999 2.66536C9.99999 2.29717 9.70151 1.9987 9.33332 1.9987L2.66666 1.9987ZM9.33332 0.665364C10.4379 0.665364 11.3333 1.56079 11.3333 2.66536L11.3333 13.332C11.3333 14.4366 10.4379 15.332 9.33332 15.332L2.66666 15.332C1.56209 15.332 0.666656 14.4366 0.666656 13.332L0.666656 2.66536C0.666656 1.56079 1.56209 0.665364 2.66666 0.665364L9.33332 0.665364Z" fill="#9747FF"/>
3913
3916
  <path d="M5.33332 4.65885C5.33332 4.29066 5.6318 3.99219 5.99999 3.99219C6.36818 3.99219 6.66666 4.29066 6.66666 4.65885L6.66666 4.66536C6.66666 5.03355 6.36818 5.33203 5.99999 5.33203C5.6318 5.33203 5.33332 5.03355 5.33332 4.66536L5.33332 4.65885Z" fill="#9747FF"/>
3914
3917
  <path d="M5.33332 11.3255C5.33332 10.9573 5.6318 10.6589 5.99999 10.6589C6.36818 10.6589 6.66666 10.9573 6.66666 11.3255L6.66666 11.332C6.66666 11.7002 6.36818 11.9987 5.99999 11.9987C5.6318 11.9987 5.33332 11.7002 5.33332 11.332L5.33332 11.3255Z" fill="#9747FF"/>
3915
3918
  </svg>
3916
- `, wa = fe`
3919
+ `, $a = ve`
3917
3920
  <svg width="20" height="20" viewBox="0 0 16 12" fill="none" xmlns="http://www.w3.org/2000/svg">
3918
3921
  <path d="M14 2.66797C14 2.29978 13.7015 2.0013 13.3333 2.0013H2.66666C2.29847 2.0013 1.99999 2.29978 1.99999 2.66797V9.33463C1.99999 9.70282 2.29847 10.0013 2.66666 10.0013H13.3333C13.7015 10.0013 14 9.70282 14 9.33463V2.66797ZM15.3333 9.33463C15.3333 10.4392 14.4379 11.3346 13.3333 11.3346H2.66666C1.56209 11.3346 0.666656 10.4392 0.666656 9.33463V2.66797C0.666656 1.5634 1.56209 0.667969 2.66666 0.667969H13.3333C14.4379 0.667969 15.3333 1.5634 15.3333 2.66797V9.33463Z" fill="#65A30D"/>
3919
3922
  <path d="M11.3398 5.33464C11.708 5.33464 12.0065 5.63311 12.0065 6.0013C12.0065 6.36949 11.708 6.66797 11.3398 6.66797H11.3333C10.9651 6.66797 10.6667 6.36949 10.6667 6.0013C10.6667 5.63311 10.9651 5.33464 11.3333 5.33464H11.3398Z" fill="#65A30D"/>
3920
3923
  <path d="M4.67317 5.33464C5.04136 5.33464 5.33983 5.63311 5.33983 6.0013C5.33983 6.36949 5.04136 6.66797 4.67317 6.66797H4.66666C4.29847 6.66797 3.99999 6.36949 3.99999 6.0013C3.99999 5.63311 4.29847 5.33464 4.66666 5.33464H4.67317Z" fill="#65A30D"/>
3921
3924
  </svg>
3922
- `, $a = fe`
3925
+ `, ka = ve`
3923
3926
  <svg width="20" height="20" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
3924
3927
  <path d="M12.3333 2.33203C12.3333 1.96384 12.0349 1.66536 11.6667 1.66536H2.33334C1.96515 1.66536 1.66668 1.96384 1.66668 2.33203V11.6654C1.66668 12.0336 1.96515 12.332 2.33334 12.332H11.6667C12.0349 12.332 12.3333 12.0336 12.3333 11.6654V2.33203ZM13.6667 11.6654C13.6667 12.7699 12.7712 13.6654 11.6667 13.6654H2.33334C1.22877 13.6654 0.333344 12.7699 0.333344 11.6654V2.33203C0.333344 1.22746 1.22877 0.332031 2.33334 0.332031H11.6667C12.7712 0.332031 13.6667 1.22746 13.6667 2.33203V11.6654Z" fill="#6366F1"/>
3925
3928
  <path d="M9.67319 3.66536C10.0414 3.66536 10.3399 3.96384 10.3399 4.33203C10.3399 4.70022 10.0414 4.9987 9.67319 4.9987H9.66668C9.29849 4.9987 9.00001 4.70022 9.00001 4.33203C9.00001 3.96384 9.29849 3.66536 9.66668 3.66536H9.67319Z" fill="#6366F1"/>
@@ -3927,17 +3930,17 @@ const xa = fe`
3927
3930
  <path d="M4.33985 8.9987C4.70804 8.9987 5.00652 9.29718 5.00652 9.66537C5.00652 10.0336 4.70804 10.332 4.33985 10.332H4.33334C3.96515 10.332 3.66668 10.0336 3.66668 9.66537C3.66668 9.29718 3.96515 8.9987 4.33334 8.9987H4.33985Z" fill="#6366F1"/>
3928
3931
  <path d="M9.67319 8.9987C10.0414 8.9987 10.3399 9.29718 10.3399 9.66537C10.3399 10.0336 10.0414 10.332 9.67319 10.332H9.66668C9.29849 10.332 9.00001 10.0336 9.00001 9.66537C9.00001 9.29718 9.29849 8.9987 9.66668 8.9987H9.67319Z" fill="#6366F1"/>
3929
3932
  </svg>
3930
- `, ka = fe`
3933
+ `, Sa = ve`
3931
3934
  <svg width="20" height="20" viewBox="0 0 16 8" fill="none" xmlns="http://www.w3.org/2000/svg">
3932
3935
  <path d="M14 2.33203C14 1.96384 13.7015 1.66536 13.3333 1.66536H2.66666C2.29847 1.66536 1.99999 1.96384 1.99999 2.33203V5.66536C1.99999 6.03355 2.29847 6.33203 2.66666 6.33203H13.3333C13.7015 6.33203 14 6.03355 14 5.66536V2.33203ZM15.3333 5.66536C15.3333 6.76993 14.4379 7.66536 13.3333 7.66536H2.66666C1.56209 7.66536 0.666656 6.76993 0.666656 5.66536V2.33203C0.666656 1.22746 1.56209 0.332031 2.66666 0.332031H13.3333C14.4379 0.332031 15.3333 1.22746 15.3333 2.33203V5.66536Z" fill="#4BA3AD"/>
3933
3936
  <path d="M11.3398 3.33203C11.708 3.33203 12.0065 3.63051 12.0065 3.9987C12.0065 4.36689 11.708 4.66536 11.3398 4.66536H11.3333C10.9651 4.66536 10.6667 4.36689 10.6667 3.9987C10.6667 3.63051 10.9651 3.33203 11.3333 3.33203H11.3398Z" fill="#4BA3AD"/>
3934
3937
  <path d="M4.67317 3.33203C5.04136 3.33203 5.33983 3.63051 5.33983 3.9987C5.33983 4.36689 5.04136 4.66536 4.67317 4.66536H4.66666C4.29847 4.66536 3.99999 4.36689 3.99999 3.9987C3.99999 3.63051 4.29847 3.33203 4.66666 3.33203H4.67317Z" fill="#4BA3AD"/>
3935
3938
  </svg>
3936
- `, Sa = {
3937
- portrait: xa,
3938
- landscape: wa,
3939
- square: $a,
3940
- panorama: ka
3939
+ `, Ca = {
3940
+ portrait: wa,
3941
+ landscape: $a,
3942
+ square: ka,
3943
+ panorama: Sa
3941
3944
  };
3942
3945
  let Be = class extends S {
3943
3946
  constructor() {
@@ -4012,7 +4015,7 @@ let Be = class extends S {
4012
4015
  @ap-toggle=${() => {
4013
4016
  this._toggleOrientation(t.value);
4014
4017
  }}
4015
- ><span class="orientation-label">${Sa[t.value]}${t.label}</span></ap-checkbox>
4018
+ ><span class="orientation-label">${Ca[t.value]}${t.label}</span></ap-checkbox>
4016
4019
  `
4017
4020
  )}
4018
4021
  </div>
@@ -4042,7 +4045,7 @@ let Be = class extends S {
4042
4045
  `;
4043
4046
  }
4044
4047
  };
4045
- Be.styles = [ge, k`
4048
+ Be.styles = [fe, $`
4046
4049
  .options-horizontal {
4047
4050
  display: flex;
4048
4051
  gap: 28px;
@@ -4065,26 +4068,26 @@ Be.styles = [ge, k`
4065
4068
  }
4066
4069
  `];
4067
4070
  Ct([
4068
- p({ type: Array })
4071
+ h({ type: Array })
4069
4072
  ], Be.prototype, "selectedResolution", 2);
4070
4073
  Ct([
4071
- p({ type: Array })
4074
+ h({ type: Array })
4072
4075
  ], Be.prototype, "selectedOrientation", 2);
4073
4076
  Ct([
4074
- p({ type: Array })
4077
+ h({ type: Array })
4075
4078
  ], Be.prototype, "selectedFaces", 2);
4076
4079
  Be = Ct([
4077
- F("ap-filter-image")
4080
+ C("ap-filter-image")
4078
4081
  ], Be);
4079
- var Ca = Object.defineProperty, Fa = Object.getOwnPropertyDescriptor, z = (t, e, s, i) => {
4080
- for (var a = i > 1 ? void 0 : i ? Fa(e, s) : e, r = t.length - 1, o; r >= 0; r--)
4082
+ var Fa = Object.defineProperty, Ea = Object.getOwnPropertyDescriptor, z = (t, e, s, i) => {
4083
+ for (var a = i > 1 ? void 0 : i ? Ea(e, s) : e, r = t.length - 1, o; r >= 0; r--)
4081
4084
  (o = t[r]) && (a = (i ? o(e, s, a) : o(a)) || a);
4082
- return i && a && Ca(e, s, a), a;
4085
+ return i && a && Fa(e, s, a), a;
4083
4086
  };
4084
- function A(t) {
4087
+ function F(t) {
4085
4088
  return `${kt[t.type] || ""}${t.key}`;
4086
4089
  }
4087
- let I = class extends S {
4090
+ let D = class extends S {
4088
4091
  constructor() {
4089
4092
  super(...arguments), this.fields = [], this.appliedFilters = {}, this.visibleFields = [], this.mode = "full", this.activeFieldKey = "", this.pinnedFields = [], this.appliedMetadata = {}, this._showFieldSelection = !1, this._fieldSearch = "", this._collapsedFields = /* @__PURE__ */ new Set(), this._tagInputs = {}, this._tagSuggestions = {}, this._tagLoading = {}, this._datePresets = {}, this._dateFroms = {}, this._dateTos = {}, this._specificModeFields = /* @__PURE__ */ new Set(), this._selectSearches = {}, this._tagDebounceTimers = {};
4090
4093
  }
@@ -4105,7 +4108,7 @@ let I = class extends S {
4105
4108
  return this.visibleFields.length >= pt;
4106
4109
  }
4107
4110
  _getField(t) {
4108
- return this.fields.find((e) => A(e) === t);
4111
+ return this.fields.find((e) => F(e) === t);
4109
4112
  }
4110
4113
  _getUIType(t) {
4111
4114
  return pi[t.type];
@@ -4114,17 +4117,17 @@ let I = class extends S {
4114
4117
  return this.appliedMetadata[t] || this.appliedFilters[t] || {};
4115
4118
  }
4116
4119
  _isSpecialValue(t) {
4117
- return !t || t.length !== 1 ? !1 : t[0] === W || t[0] === Q;
4120
+ return !t || t.length !== 1 ? !1 : t[0] === Y || t[0] === X;
4118
4121
  }
4119
4122
  /** Get the "content" mode for a field: 'empty', 'not-empty', or 'specific' */
4120
4123
  _getContentMode(t) {
4121
4124
  var s, i;
4122
4125
  const e = this._getApplied(t);
4123
- return ((s = e.values) == null ? void 0 : s[0]) === W ? W : ((i = e.values) == null ? void 0 : i[0]) === Q ? Q : this._specificModeFields.has(t) || e.values && e.values.length > 0 ? ke : "";
4126
+ return ((s = e.values) == null ? void 0 : s[0]) === Y ? Y : ((i = e.values) == null ? void 0 : i[0]) === X ? X : this._specificModeFields.has(t) || e.values && e.values.length > 0 ? Se : "";
4124
4127
  }
4125
4128
  // ── Event dispatchers ────────────────────────────────────────────
4126
4129
  _emitFilterChange(t, e, s) {
4127
- const i = A(t);
4130
+ const i = F(t);
4128
4131
  this.dispatchEvent(
4129
4132
  new CustomEvent("metadata-filter-change", {
4130
4133
  detail: {
@@ -4139,7 +4142,7 @@ let I = class extends S {
4139
4142
  );
4140
4143
  }
4141
4144
  _emitFieldToggle(t, e) {
4142
- const s = A(t);
4145
+ const s = F(t);
4143
4146
  this.dispatchEvent(
4144
4147
  new CustomEvent("metadata-field-toggle", {
4145
4148
  detail: { fieldKey: s, visible: e },
@@ -4149,7 +4152,7 @@ let I = class extends S {
4149
4152
  );
4150
4153
  }
4151
4154
  _emitFieldSelect(t) {
4152
- const e = A(t);
4155
+ const e = F(t);
4153
4156
  !this.visibleFields.includes(e) && this._atFieldLimit || (this.visibleFields.includes(e) || this._emitFieldToggle(t, !0), this.dispatchEvent(
4154
4157
  new CustomEvent("metadata-field-select", {
4155
4158
  detail: { fieldKey: e },
@@ -4176,7 +4179,7 @@ let I = class extends S {
4176
4179
  }
4177
4180
  _addField(t) {
4178
4181
  if (this._atFieldLimit) return;
4179
- const e = A(t);
4182
+ const e = F(t);
4180
4183
  this.visibleFields.includes(e) || this._emitFieldToggle(t, !0);
4181
4184
  }
4182
4185
  _removeField(t) {
@@ -4188,13 +4191,13 @@ let I = class extends S {
4188
4191
  }
4189
4192
  // ── Operator change (via radio group) ─────────────────────────────
4190
4193
  _onOperatorChange(t, e) {
4191
- const i = this._getApplied(A(t)).values || [];
4194
+ const i = this._getApplied(F(t)).values || [];
4192
4195
  this._emitFilterChange(t, e, i);
4193
4196
  }
4194
4197
  // ── Content mode change ─────────────────────────────────────────
4195
4198
  _onContentModeChange(t, e) {
4196
- const s = A(t);
4197
- if (e === ke) {
4199
+ const s = F(t);
4200
+ if (e === Se) {
4198
4201
  const i = new Set(this._specificModeFields);
4199
4202
  i.add(s), this._specificModeFields = i;
4200
4203
  const a = this._getApplied(s);
@@ -4209,7 +4212,7 @@ let I = class extends S {
4209
4212
  }
4210
4213
  // ── Clear field filter ──────────────────────────────────────────
4211
4214
  _clearFieldFilter(t) {
4212
- const e = A(t);
4215
+ const e = F(t);
4213
4216
  if (this._specificModeFields.has(e)) {
4214
4217
  const d = new Set(this._specificModeFields);
4215
4218
  d.delete(e), this._specificModeFields = d;
@@ -4220,25 +4223,25 @@ let I = class extends S {
4220
4223
  this._dateFroms = r;
4221
4224
  const { [e]: o, ...l } = this._dateTos;
4222
4225
  this._dateTos = l;
4223
- const { [e]: c, ...h } = this._selectSearches;
4224
- this._selectSearches = h;
4226
+ const { [e]: c, ...p } = this._selectSearches;
4227
+ this._selectSearches = p;
4225
4228
  const { [e]: u, ...v } = this._tagInputs;
4226
4229
  this._tagInputs = v, this._emitFilterChange(t, void 0, []);
4227
4230
  }
4228
4231
  // ── Text filter ──────────────────────────────────────────────────
4229
4232
  _onTextInput(t, e) {
4230
- const s = e.target.value, a = this._getApplied(A(t)).operator || Pt[0].value;
4233
+ const s = e.target.value, a = this._getApplied(F(t)).operator || It[0].value;
4231
4234
  this._emitFilterChange(t, a, s ? [s] : []);
4232
4235
  }
4233
4236
  // ── Number filter ────────────────────────────────────────────────
4234
4237
  _onNumberInput(t, e, s) {
4235
- const i = e.target.value, a = A(t), r = this._getApplied(a), o = r.operator || Dt[0].value, l = [...r.values || []];
4238
+ const i = e.target.value, a = F(t), r = this._getApplied(a), o = r.operator || Dt[0].value, l = [...r.values || []];
4236
4239
  s === 0 ? l[0] = i : l[1] = i;
4237
- const c = l.filter((h) => h !== "" && h !== void 0);
4240
+ const c = l.filter((p) => p !== "" && p !== void 0);
4238
4241
  if (c.length > 0) {
4239
- const h = t.type === y.DECIMAL2;
4242
+ const p = t.type === y.DECIMAL2;
4240
4243
  if (!c.every(
4241
- (v) => h ? !isNaN(parseFloat(v)) : /^-?\d+$/.test(v)
4244
+ (v) => p ? !isNaN(parseFloat(v)) : /^-?\d+$/.test(v)
4242
4245
  )) return;
4243
4246
  }
4244
4247
  this._emitFilterChange(t, o, l);
@@ -4246,22 +4249,22 @@ let I = class extends S {
4246
4249
  // ── Boolean filter ───────────────────────────────────────────────
4247
4250
  _onBooleanSelect(t, e) {
4248
4251
  var a;
4249
- const s = this._getApplied(A(t));
4252
+ const s = this._getApplied(F(t));
4250
4253
  ((a = s.values) == null ? void 0 : a[0]) === e ? this._emitFilterChange(t, void 0, []) : this._emitFilterChange(t, s.operator, [e]);
4251
4254
  }
4252
4255
  // ── Select-one filter ────────────────────────────────────────────
4253
4256
  _onSelectOneToggle(t, e) {
4254
- const s = A(t), i = this._getApplied(s), a = i.operator || ce[0].value, r = i.values || [];
4257
+ const s = F(t), i = this._getApplied(s), a = i.operator || de[0].value, r = i.values || [];
4255
4258
  r.length === 1 && r[0] === e ? this._emitFilterChange(t, a, []) : this._emitFilterChange(t, a, [e]);
4256
4259
  }
4257
4260
  // ── Multi-select filter ──────────────────────────────────────────
4258
4261
  _onMultiSelectToggle(t, e) {
4259
- const s = A(t), i = this._getApplied(s), a = i.operator || It[0].value, r = i.values || [], o = r.includes(e) ? r.filter((l) => l !== e) : [...r, e];
4262
+ const s = F(t), i = this._getApplied(s), a = i.operator || Pt[0].value, r = i.values || [], o = r.includes(e) ? r.filter((l) => l !== e) : [...r, e];
4260
4263
  this._emitFilterChange(t, a, o);
4261
4264
  }
4262
4265
  // ── Tags filter ──────────────────────────────────────────────────
4263
4266
  _onTagKeydown(t, e) {
4264
- const s = A(t);
4267
+ const s = F(t);
4265
4268
  (e.key === "Enter" || e.key === ",") && (e.preventDefault(), this._commitTagInput(t, s));
4266
4269
  }
4267
4270
  _onTagInput(t, e, s) {
@@ -4274,7 +4277,7 @@ let I = class extends S {
4274
4277
  this._tagInputs = { ...this._tagInputs, [e]: i }, this._fetchTagSuggestions(t, e, i.trim());
4275
4278
  }
4276
4279
  _selectTagSuggestion(t, e) {
4277
- const s = A(t), i = this._getApplied(s), a = i.operator || ce[0].value, r = i.values || [];
4280
+ const s = F(t), i = this._getApplied(s), a = i.operator || de[0].value, r = i.values || [];
4278
4281
  r.includes(e) || this._emitFilterChange(t, a, [...r, e]), this._tagInputs = { ...this._tagInputs, [s]: "" }, this._tagSuggestions = { ...this._tagSuggestions, [s]: [] };
4279
4282
  }
4280
4283
  _fetchTagSuggestions(t, e, s) {
@@ -4303,11 +4306,11 @@ let I = class extends S {
4303
4306
  _commitTagInput(t, e) {
4304
4307
  const s = (this._tagInputs[e] || "").trim();
4305
4308
  if (!s) return;
4306
- const i = this._getApplied(e), a = i.operator || ce[0].value, r = i.values || [];
4309
+ const i = this._getApplied(e), a = i.operator || de[0].value, r = i.values || [];
4307
4310
  r.includes(s) || this._emitFilterChange(t, a, [...r, s]), this._tagInputs = { ...this._tagInputs, [e]: "" }, this._tagSuggestions = { ...this._tagSuggestions, [e]: [] };
4308
4311
  }
4309
4312
  _removeTag(t, e) {
4310
- const s = A(t), i = this._getApplied(s), a = i.operator || ce[0].value, r = i.values || [];
4313
+ const s = F(t), i = this._getApplied(s), a = i.operator || de[0].value, r = i.values || [];
4311
4314
  this._emitFilterChange(
4312
4315
  t,
4313
4316
  a,
@@ -4315,12 +4318,12 @@ let I = class extends S {
4315
4318
  );
4316
4319
  }
4317
4320
  _onTagOperatorChange(t, e) {
4318
- const s = A(t), a = this._getApplied(s).values || [];
4321
+ const s = F(t), a = this._getApplied(s).values || [];
4319
4322
  this._emitFilterChange(t, e, a);
4320
4323
  }
4321
4324
  // ── Date filter ──────────────────────────────────────────────────
4322
4325
  _onDatePreset(t, e) {
4323
- const s = A(t);
4326
+ const s = F(t);
4324
4327
  if (this._datePresets = { ...this._datePresets, [s]: e }, ["before", "after", "between"].includes(e)) {
4325
4328
  this._dateFroms = { ...this._dateFroms, [s]: "" }, this._dateTos = { ...this._dateTos, [s]: "" };
4326
4329
  return;
@@ -4358,7 +4361,7 @@ let I = class extends S {
4358
4361
  a && r && (this._dateFroms = { ...this._dateFroms, [s]: a }, this._dateTos = { ...this._dateTos, [s]: r }, this._emitFilterChange(t, "..", [a, r]));
4359
4362
  }
4360
4363
  _onDateInput(t, e, s) {
4361
- const i = s.target.value, a = A(t), r = this._datePresets[a] || "", o = i ? (/* @__PURE__ */ new Date(i + "T00:00:00")).toISOString() : "";
4364
+ const i = s.target.value, a = F(t), r = this._datePresets[a] || "", o = i ? (/* @__PURE__ */ new Date(i + "T00:00:00")).toISOString() : "";
4362
4365
  e === "from" ? this._dateFroms = { ...this._dateFroms, [a]: o } : this._dateTos = { ...this._dateTos, [a]: o };
4363
4366
  let l = this._dateFroms[a] || "", c = this._dateTos[a] || "";
4364
4367
  r === "after" && l && (c = (/* @__PURE__ */ new Date()).toISOString(), this._dateTos = { ...this._dateTos, [a]: c }), r === "before" && c && (l = (/* @__PURE__ */ new Date(0)).toISOString(), this._dateFroms = { ...this._dateFroms, [a]: l }), l && c && this._emitFilterChange(t, "..", [l, c]);
@@ -4366,7 +4369,7 @@ let I = class extends S {
4366
4369
  // ── Geo filter ───────────────────────────────────────────────────
4367
4370
  _onGeoLocationInput(t, e) {
4368
4371
  var v;
4369
- const s = e.target.value.trim(), i = A(t), a = (v = this.shadowRoot) == null ? void 0 : v.querySelector(
4372
+ const s = e.target.value.trim(), i = F(t), a = (v = this.shadowRoot) == null ? void 0 : v.querySelector(
4370
4373
  `[data-geo-radius="${i}"]`
4371
4374
  ), r = (a == null ? void 0 : a.value) || "";
4372
4375
  if (!s) {
@@ -4378,20 +4381,20 @@ let I = class extends S {
4378
4381
  return;
4379
4382
  const [l, c] = o;
4380
4383
  let u = `${l},${c}..${r || "0"}`;
4381
- this._emitFilterChange(t, $.IS, [u]);
4384
+ this._emitFilterChange(t, w.IS, [u]);
4382
4385
  }
4383
4386
  _onGeoRadiusInput(t, e) {
4384
4387
  var c;
4385
- const s = e.target.value, i = A(t), a = this._getApplied(i);
4388
+ const s = e.target.value, i = F(t), a = this._getApplied(i);
4386
4389
  if (!((c = a.values) != null && c[0])) return;
4387
4390
  const r = a.values[0], [o] = r.split("..");
4388
4391
  let l = o;
4389
- s && (l += `..${s}`), this._emitFilterChange(t, $.IS, [l]);
4392
+ s && (l += `..${s}`), this._emitFilterChange(t, w.IS, [l]);
4390
4393
  }
4391
4394
  // ── Empty/non-empty option click ─────────────────────────────────
4392
4395
  _onEmptyOption(t, e) {
4393
4396
  var a;
4394
- const s = this._getApplied(A(t));
4397
+ const s = this._getApplied(F(t));
4395
4398
  ((a = s.values) == null ? void 0 : a[0]) === e ? this._emitFilterChange(t, s.operator, []) : this._emitFilterChange(t, s.operator, [e]);
4396
4399
  }
4397
4400
  // ── Render: Field selection panel ────────────────────────────────
@@ -4409,11 +4412,11 @@ let I = class extends S {
4409
4412
  ), s = this._getGroupedFields(e), i = (a, r) => r.length === 0 ? f : n`
4410
4413
  <div class="field-group-label">${a}</div>
4411
4414
  ${r.map((o) => {
4412
- const l = A(o), c = this.visibleFields.includes(l), h = !c && this._atFieldLimit;
4415
+ const l = F(o), c = this.visibleFields.includes(l), p = !c && this._atFieldLimit;
4413
4416
  return n`
4414
4417
  <div
4415
- class="field-item ${c ? "selected" : ""} ${h ? "disabled" : ""}"
4416
- @click=${() => !h && !c && this._addField(o)}
4418
+ class="field-item ${c ? "selected" : ""} ${p ? "disabled" : ""}"
4419
+ @click=${() => !p && !c && this._addField(o)}
4417
4420
  >
4418
4421
  ${c ? n`<ap-icon name="check" .size=${14}></ap-icon>` : n`<ap-icon name=${ft[o.type] || "file-text"} .size=${14} style="color: var(--ap-muted-foreground, oklch(0.685 0.033 249.82))"></ap-icon>`}
4419
4422
  <span>${o.label}</span>
@@ -4454,8 +4457,8 @@ let I = class extends S {
4454
4457
  }
4455
4458
  // ── Render: Text filter ──────────────────────────────────────────
4456
4459
  _renderTextFilter(t) {
4457
- var h, u;
4458
- const e = A(t), s = this._getApplied(e), a = this._isSpecialValue(s.values) ? "" : ((h = s.values) == null ? void 0 : h[0]) || "", r = this._getContentMode(e), o = r === W || r === Q, l = s.operator || Pt[0].value, c = t.type === y.TEXT_AREA;
4460
+ var p, u;
4461
+ const e = F(t), s = this._getApplied(e), a = this._isSpecialValue(s.values) ? "" : ((p = s.values) == null ? void 0 : p[0]) || "", r = this._getContentMode(e), o = r === Y || r === X, l = s.operator || It[0].value, c = t.type === y.TEXT_AREA;
4459
4462
  return n`
4460
4463
  <div class="filter-content" style="position: relative;">
4461
4464
  <button
@@ -4468,7 +4471,7 @@ let I = class extends S {
4468
4471
  <span class="section-label">Operator</span>
4469
4472
  <ap-radio-group
4470
4473
  direction="horizontal"
4471
- .options=${Pt}
4474
+ .options=${It}
4472
4475
  .value=${l}
4473
4476
  ?disabled=${o}
4474
4477
  @ap-change=${(v) => this._onOperatorChange(t, v.detail.value)}
@@ -4484,7 +4487,7 @@ let I = class extends S {
4484
4487
  ></ap-radio-group>
4485
4488
  </div>
4486
4489
 
4487
- ${r === ke ? n`
4490
+ ${r === Se ? n`
4488
4491
  <div class="filter-section">
4489
4492
  <span class="section-label">Value</span>
4490
4493
  ${c ? n`
@@ -4513,13 +4516,13 @@ let I = class extends S {
4513
4516
  }
4514
4517
  // ── Render: Number filter ────────────────────────────────────────
4515
4518
  _renderNumberFilter(t) {
4516
- var C, O, D;
4517
- const e = A(t), s = this._getApplied(e), i = s.operator || Dt[0].value, a = this._isSpecialValue(s.values), r = this._getContentMode(e), o = r === W || r === Q, l = i === $.RANGE, c = i === $.GREATER_THAN_OR_EQUAL, h = i === $.LESS_THAN_OR_EQUAL, u = t.type === y.DECIMAL2, v = u ? "0.01" : "1", d = u ? "0.00" : "0", g = a ? "" : ((C = s.values) == null ? void 0 : C[0]) || "", m = a ? "" : ((O = s.values) == null ? void 0 : O[1]) || "", x = l || c || h, w = l || c || h ? "Min" : "Value";
4519
+ var A, I, R;
4520
+ const e = F(t), s = this._getApplied(e), i = s.operator || Dt[0].value, a = this._isSpecialValue(s.values), r = this._getContentMode(e), o = r === Y || r === X, l = i === w.RANGE, c = i === w.GREATER_THAN_OR_EQUAL, p = i === w.LESS_THAN_OR_EQUAL, u = t.type === y.DECIMAL2, v = u ? "0.01" : "1", d = u ? "0.00" : "0", g = a ? "" : ((A = s.values) == null ? void 0 : A[0]) || "", m = a ? "" : ((I = s.values) == null ? void 0 : I[1]) || "", x = l || c || p, k = l || c || p ? "Min" : "Value";
4518
4521
  return n`
4519
4522
  <div class="filter-content" style="position: relative;">
4520
4523
  <button
4521
4524
  class="clear-btn"
4522
- ?disabled=${!((D = s.values) != null && D.length) && !s.operator}
4525
+ ?disabled=${!((R = s.values) != null && R.length) && !s.operator}
4523
4526
  @click=${() => this._clearFieldFilter(t)}
4524
4527
  >Clear all</button>
4525
4528
 
@@ -4530,7 +4533,7 @@ let I = class extends S {
4530
4533
  .options=${Dt}
4531
4534
  .value=${i}
4532
4535
  ?disabled=${o}
4533
- @ap-change=${(E) => this._onOperatorChange(t, E.detail.value)}
4536
+ @ap-change=${(T) => this._onOperatorChange(t, T.detail.value)}
4534
4537
  ></ap-radio-group>
4535
4538
  </div>
4536
4539
 
@@ -4539,23 +4542,23 @@ let I = class extends S {
4539
4542
  <ap-radio-group
4540
4543
  .options=${zt}
4541
4544
  .value=${r}
4542
- @ap-change=${(E) => this._onContentModeChange(t, E.detail.value)}
4545
+ @ap-change=${(T) => this._onContentModeChange(t, T.detail.value)}
4543
4546
  ></ap-radio-group>
4544
4547
  </div>
4545
4548
 
4546
- ${r === ke ? n`
4549
+ ${r === Se ? n`
4547
4550
  <div class="filter-section">
4548
4551
  <div class="grid-2">
4549
4552
  <div>
4550
- <span class="input-label" aria-disabled=${h ? "true" : f}>${w}</span>
4553
+ <span class="input-label" aria-disabled=${p ? "true" : f}>${k}</span>
4551
4554
  <input
4552
4555
  class="filter-input"
4553
4556
  type="number"
4554
4557
  step=${v}
4555
4558
  placeholder=${d}
4556
4559
  .value=${g}
4557
- ?disabled=${h}
4558
- @change=${(E) => this._onNumberInput(t, E, 0)}
4560
+ ?disabled=${p}
4561
+ @change=${(T) => this._onNumberInput(t, T, 0)}
4559
4562
  />
4560
4563
  </div>
4561
4564
  ${x ? n`
@@ -4568,7 +4571,7 @@ let I = class extends S {
4568
4571
  placeholder=${d}
4569
4572
  .value=${m}
4570
4573
  ?disabled=${c}
4571
- @change=${(E) => this._onNumberInput(t, E, 1)}
4574
+ @change=${(T) => this._onNumberInput(t, T, 1)}
4572
4575
  />
4573
4576
  </div>
4574
4577
  ` : f}
@@ -4581,7 +4584,7 @@ let I = class extends S {
4581
4584
  // ── Render: Boolean filter ───────────────────────────────────────
4582
4585
  _renderBooleanFilter(t) {
4583
4586
  var i, a;
4584
- const e = this._getApplied(A(t)), s = ((i = e.values) == null ? void 0 : i[0]) || "";
4587
+ const e = this._getApplied(F(t)), s = ((i = e.values) == null ? void 0 : i[0]) || "";
4585
4588
  return n`
4586
4589
  <div class="filter-content" style="position: relative;">
4587
4590
  <button
@@ -4603,7 +4606,7 @@ let I = class extends S {
4603
4606
  }
4604
4607
  // ── Render: Select-one filter ────────────────────────────────────
4605
4608
  _renderSelectOneFilter(t) {
4606
- const e = A(t), s = this._getApplied(e), i = this._isSpecialValue(s.values), a = i ? [] : s.values || [], r = t.possible_values || [], o = s.operator || ce[0].value, l = (this._selectSearches[e] || "").toLowerCase(), c = l.length > 0, h = a.length > 0 || i, u = l ? r.filter((d) => d.label.toLowerCase().includes(l)) : r, v = a.length >= pt;
4609
+ const e = F(t), s = this._getApplied(e), i = this._isSpecialValue(s.values), a = i ? [] : s.values || [], r = t.possible_values || [], o = s.operator || de[0].value, l = (this._selectSearches[e] || "").toLowerCase(), c = l.length > 0, p = a.length > 0 || i, u = l ? r.filter((d) => d.label.toLowerCase().includes(l)) : r, v = a.length >= pt;
4607
4610
  return n`
4608
4611
  <div class="filter-content">
4609
4612
  <!-- Search input -->
@@ -4635,7 +4638,7 @@ let I = class extends S {
4635
4638
  <span class="section-label"></span>
4636
4639
  <button
4637
4640
  class="clear-btn"
4638
- ?disabled=${!h && !s.operator}
4641
+ ?disabled=${!p && !s.operator}
4639
4642
  @click=${() => this._clearFieldFilter(t)}
4640
4643
  >Clear all</button>
4641
4644
  </div>
@@ -4646,13 +4649,13 @@ let I = class extends S {
4646
4649
  <span class="section-label">Operator</span>
4647
4650
  <button
4648
4651
  class="clear-btn"
4649
- ?disabled=${!h && !s.operator}
4652
+ ?disabled=${!p && !s.operator}
4650
4653
  @click=${() => this._clearFieldFilter(t)}
4651
4654
  >Clear all</button>
4652
4655
  </div>
4653
4656
  <ap-radio-group
4654
4657
  direction="horizontal"
4655
- .options=${ce}
4658
+ .options=${de}
4656
4659
  .value=${o}
4657
4660
  @ap-change=${(d) => this._onOperatorChange(t, d.detail.value)}
4658
4661
  ></ap-radio-group>
@@ -4684,7 +4687,7 @@ let I = class extends S {
4684
4687
 
4685
4688
  <!-- Empty/Not empty checkboxes -->
4686
4689
  <div class="options-list short">
4687
- ${Ce.map(
4690
+ ${Fe.map(
4688
4691
  (d) => {
4689
4692
  var g;
4690
4693
  return n`
@@ -4723,7 +4726,7 @@ let I = class extends S {
4723
4726
  }
4724
4727
  // ── Render: Multi-select filter ──────────────────────────────────
4725
4728
  _renderMultiSelectFilter(t) {
4726
- const e = A(t), s = this._getApplied(e), i = this._isSpecialValue(s.values), a = i ? [] : s.values || [], r = t.possible_values || [], o = s.operator || It[0].value, l = (this._selectSearches[e] || "").toLowerCase(), c = l.length > 0, h = a.length > 0 || i, u = l ? r.filter((d) => d.label.toLowerCase().includes(l)) : r, v = a.length >= pt;
4729
+ const e = F(t), s = this._getApplied(e), i = this._isSpecialValue(s.values), a = i ? [] : s.values || [], r = t.possible_values || [], o = s.operator || Pt[0].value, l = (this._selectSearches[e] || "").toLowerCase(), c = l.length > 0, p = a.length > 0 || i, u = l ? r.filter((d) => d.label.toLowerCase().includes(l)) : r, v = a.length >= pt;
4727
4730
  return n`
4728
4731
  <div class="filter-content">
4729
4732
  <!-- Search input -->
@@ -4755,7 +4758,7 @@ let I = class extends S {
4755
4758
  <span class="section-label"></span>
4756
4759
  <button
4757
4760
  class="clear-btn"
4758
- ?disabled=${!h && !s.operator}
4761
+ ?disabled=${!p && !s.operator}
4759
4762
  @click=${() => this._clearFieldFilter(t)}
4760
4763
  >Clear all</button>
4761
4764
  </div>
@@ -4766,13 +4769,13 @@ let I = class extends S {
4766
4769
  <span class="section-label">Operator</span>
4767
4770
  <button
4768
4771
  class="clear-btn"
4769
- ?disabled=${!h && !s.operator}
4772
+ ?disabled=${!p && !s.operator}
4770
4773
  @click=${() => this._clearFieldFilter(t)}
4771
4774
  >Clear all</button>
4772
4775
  </div>
4773
4776
  <ap-radio-group
4774
4777
  direction="horizontal"
4775
- .options=${It}
4778
+ .options=${Pt}
4776
4779
  .value=${o}
4777
4780
  @ap-change=${(d) => this._onOperatorChange(t, d.detail.value)}
4778
4781
  ></ap-radio-group>
@@ -4804,7 +4807,7 @@ let I = class extends S {
4804
4807
 
4805
4808
  <!-- Empty/Not empty checkboxes -->
4806
4809
  <div class="options-list short">
4807
- ${Ce.map(
4810
+ ${Fe.map(
4808
4811
  (d) => {
4809
4812
  var g;
4810
4813
  return n`
@@ -4843,7 +4846,7 @@ let I = class extends S {
4843
4846
  }
4844
4847
  // ── Render: Tags filter ──────────────────────────────────────────
4845
4848
  _renderTagsFilter(t) {
4846
- const e = A(t), s = this._getApplied(e), i = this._isSpecialValue(s.values), a = i ? [] : s.values || [], r = this._tagInputs[e] || "", o = s.operator || ce[0].value, l = a.length > 0 || i, c = this._tagSuggestions[e] || [], h = this._tagLoading[e] || !1, u = r.trim().length > 0, v = a.length >= pt;
4849
+ const e = F(t), s = this._getApplied(e), i = this._isSpecialValue(s.values), a = i ? [] : s.values || [], r = this._tagInputs[e] || "", o = s.operator || de[0].value, l = a.length > 0 || i, c = this._tagSuggestions[e] || [], p = this._tagLoading[e] || !1, u = r.trim().length > 0, v = a.length >= pt;
4847
4850
  return n`
4848
4851
  <div class="filter-content">
4849
4852
  <!-- Search input -->
@@ -4888,7 +4891,7 @@ let I = class extends S {
4888
4891
  </div>
4889
4892
  <ap-radio-group
4890
4893
  direction="horizontal"
4891
- .options=${ce}
4894
+ .options=${de}
4892
4895
  .value=${o}
4893
4896
  ?disabled=${i}
4894
4897
  @ap-change=${(d) => this._onTagOperatorChange(t, d.detail.value)}
@@ -4917,7 +4920,7 @@ let I = class extends S {
4917
4920
  <div class="filter-section">
4918
4921
  <span class="section-label">All options</span>
4919
4922
  <div class="options-list short">
4920
- ${Ce.map(
4923
+ ${Fe.map(
4921
4924
  (d) => {
4922
4925
  var g;
4923
4926
  return n`
@@ -4939,7 +4942,7 @@ let I = class extends S {
4939
4942
  ${u ? n`
4940
4943
  <div class="filter-section">
4941
4944
  <div class="options-list">
4942
- ${h ? n`<div class="option-item disabled"><span>Loading...</span></div>` : c.length > 0 ? c.map(
4945
+ ${p ? n`<div class="option-item disabled"><span>Loading...</span></div>` : c.length > 0 ? c.map(
4943
4946
  (d) => {
4944
4947
  const g = a.includes(d), m = !g && v;
4945
4948
  return n`
@@ -4962,10 +4965,10 @@ let I = class extends S {
4962
4965
  // ── Render: Date filter ──────────────────────────────────────────
4963
4966
  _renderDateFilter(t) {
4964
4967
  var u, v;
4965
- const e = A(t), s = this._datePresets[e] || "", i = this._getApplied(e), r = this._isSpecialValue(i.values) ? ((u = i.values) == null ? void 0 : u[0]) || "" : s, o = [
4968
+ const e = F(t), s = this._datePresets[e] || "", i = this._getApplied(e), r = this._isSpecialValue(i.values) ? ((u = i.values) == null ? void 0 : u[0]) || "" : s, o = [
4966
4969
  { value: "empty", label: "Empty" },
4967
4970
  { value: "non-empty", label: "Not empty" }
4968
- ], l = this._dateFroms[e] ? new Date(this._dateFroms[e]).toISOString().split("T")[0] : "", c = this._dateTos[e] ? new Date(this._dateTos[e]).toISOString().split("T")[0] : "", h = ["before", "after", "between"].includes(r);
4971
+ ], l = this._dateFroms[e] ? new Date(this._dateFroms[e]).toISOString().split("T")[0] : "", c = this._dateTos[e] ? new Date(this._dateTos[e]).toISOString().split("T")[0] : "", p = ["before", "after", "between"].includes(r);
4969
4972
  return n`
4970
4973
  <div class="filter-content" style="position: relative;">
4971
4974
  <button
@@ -4985,13 +4988,13 @@ let I = class extends S {
4985
4988
 
4986
4989
  <ap-radio-group
4987
4990
  columns="2"
4988
- .options=${Vt}
4991
+ .options=${qt}
4989
4992
  .value=${r !== "empty" && r !== "non-empty" ? r : ""}
4990
4993
  @ap-change=${(d) => this._onDatePreset(t, d.detail.value)}
4991
4994
  ></ap-radio-group>
4992
4995
  </div>
4993
4996
 
4994
- ${h ? n`
4997
+ ${p ? n`
4995
4998
  <div class="filter-section">
4996
4999
  <div class="grid-2">
4997
5000
  ${r === "before" ? n`
@@ -5043,13 +5046,13 @@ let I = class extends S {
5043
5046
  // ── Render: Geo filter ───────────────────────────────────────────
5044
5047
  _renderGeoFilter(t) {
5045
5048
  var u, v;
5046
- const e = A(t), s = this._getApplied(e), i = this._isSpecialValue(s.values), a = this._getContentMode(e);
5049
+ const e = F(t), s = this._getApplied(e), i = this._isSpecialValue(s.values), a = this._getContentMode(e);
5047
5050
  let r = "", o = "";
5048
5051
  if (!i && ((u = s.values) != null && u[0])) {
5049
5052
  const d = s.values[0], [g, m] = d.split("..");
5050
5053
  r = g || "", o = m || "";
5051
5054
  }
5052
- const l = r.length > 0, c = r.split(",").map((d) => d.trim()), h = !l || c.length === 2 && c.every((d) => !isNaN(Number(d)) && d !== "");
5055
+ const l = r.length > 0, c = r.split(",").map((d) => d.trim()), p = !l || c.length === 2 && c.every((d) => !isNaN(Number(d)) && d !== "");
5053
5056
  return n`
5054
5057
  <div class="filter-content" style="position: relative;">
5055
5058
  <button
@@ -5067,7 +5070,7 @@ let I = class extends S {
5067
5070
  ></ap-radio-group>
5068
5071
  </div>
5069
5072
 
5070
- ${a === ke ? n`
5073
+ ${a === Se ? n`
5071
5074
  <div class="filter-section">
5072
5075
  <div class="geo-row">
5073
5076
  <div class="geo-location">
@@ -5079,7 +5082,7 @@ let I = class extends S {
5079
5082
  .value=${r}
5080
5083
  @change=${(d) => this._onGeoLocationInput(t, d)}
5081
5084
  />
5082
- ${l && !h ? n`<div class="error-text">Enter coordinates as "latitude, longitude"</div>` : f}
5085
+ ${l && !p ? n`<div class="error-text">Enter coordinates as "latitude, longitude"</div>` : f}
5083
5086
  </div>
5084
5087
  <div class="geo-radius">
5085
5088
  <span class="input-label">Max radius (&deg;)</span>
@@ -5101,7 +5104,7 @@ let I = class extends S {
5101
5104
  // ── Render: Attachment filter ────────────────────────────────────
5102
5105
  _renderAttachmentFilter(t) {
5103
5106
  var i, a;
5104
- const e = this._getApplied(A(t)), s = ((i = e.values) == null ? void 0 : i[0]) || "";
5107
+ const e = this._getApplied(F(t)), s = ((i = e.values) == null ? void 0 : i[0]) || "";
5105
5108
  return n`
5106
5109
  <div class="filter-content" style="position: relative;">
5107
5110
  <button
@@ -5112,7 +5115,7 @@ let I = class extends S {
5112
5115
 
5113
5116
  <div class="filter-section">
5114
5117
  <ap-radio-group
5115
- .options=${Ce}
5118
+ .options=${Fe}
5116
5119
  .value=${s}
5117
5120
  @ap-change=${(r) => this._onEmptyOption(t, r.detail.value)}
5118
5121
  ></ap-radio-group>
@@ -5122,7 +5125,7 @@ let I = class extends S {
5122
5125
  }
5123
5126
  // ── Render: Face matcher (integer-list with slug face_matcher) ──
5124
5127
  _renderFaceMatcherFilter(t) {
5125
- const e = A(t), s = this._getApplied(e), i = s.values || [], a = s.operator || $.IS;
5128
+ const e = F(t), s = this._getApplied(e), i = s.values || [], a = s.operator || w.IS;
5126
5129
  return n`
5127
5130
  <div class="filter-content" style="position: relative;">
5128
5131
  <button
@@ -5135,7 +5138,7 @@ let I = class extends S {
5135
5138
  <span class="section-label">Condition</span>
5136
5139
  <ap-radio-group
5137
5140
  direction="horizontal"
5138
- .options=${ce}
5141
+ .options=${de}
5139
5142
  .value=${a}
5140
5143
  @ap-change=${(r) => this._emitFilterChange(t, r.detail.value, i)}
5141
5144
  ></ap-radio-group>
@@ -5223,10 +5226,10 @@ let I = class extends S {
5223
5226
  ), s = this._getGroupedFields(e), i = (a, r) => r.length === 0 ? f : n`
5224
5227
  <div class="field-group-label">${a}</div>
5225
5228
  ${r.map((o) => {
5226
- const l = A(o), c = this.visibleFields.includes(l), h = !!this.appliedMetadata[l] || !!this.appliedFilters[l], u = this.pinnedFields.includes(l), v = !c && this._atFieldLimit;
5229
+ const l = F(o), c = this.visibleFields.includes(l), p = !!this.appliedMetadata[l] || !!this.appliedFilters[l], u = this.pinnedFields.includes(l), v = !c && this._atFieldLimit;
5227
5230
  return n`
5228
5231
  <div
5229
- class="field-item ${h ? "has-filter" : ""} ${v ? "disabled" : ""}"
5232
+ class="field-item ${p ? "has-filter" : ""} ${v ? "disabled" : ""}"
5230
5233
  @click=${() => !v && this._emitFieldSelect(o)}
5231
5234
  >
5232
5235
  <ap-icon name=${ft[o.type] || "file-text"} .size=${14} style="color: var(--ap-muted-foreground, oklch(0.685 0.033 249.82))"></ap-icon>
@@ -5240,7 +5243,7 @@ let I = class extends S {
5240
5243
  >
5241
5244
  <ap-icon name="pin" .size=${12}></ap-icon>
5242
5245
  </button>
5243
- ${h ? n`<ap-icon name="check" .size=${14}></ap-icon>` : f}
5246
+ ${p ? n`<ap-icon name="check" .size=${14}></ap-icon>` : f}
5244
5247
  </div>
5245
5248
  `;
5246
5249
  })}
@@ -5301,7 +5304,7 @@ let I = class extends S {
5301
5304
  `;
5302
5305
  }
5303
5306
  };
5304
- I.styles = [re, ge, k`
5307
+ D.styles = [re, fe, $`
5305
5308
  /* ── Field selection panel ─────────────────────────────── */
5306
5309
 
5307
5310
  .add-field-btn {
@@ -5680,71 +5683,71 @@ I.styles = [re, ge, k`
5680
5683
  }
5681
5684
  `];
5682
5685
  z([
5683
- p({ type: Array })
5684
- ], I.prototype, "fields", 2);
5686
+ h({ type: Array })
5687
+ ], D.prototype, "fields", 2);
5685
5688
  z([
5686
- p({ type: Object })
5687
- ], I.prototype, "appliedFilters", 2);
5689
+ h({ type: Object })
5690
+ ], D.prototype, "appliedFilters", 2);
5688
5691
  z([
5689
- p({ type: Array })
5690
- ], I.prototype, "visibleFields", 2);
5692
+ h({ type: Array })
5693
+ ], D.prototype, "visibleFields", 2);
5691
5694
  z([
5692
- p()
5693
- ], I.prototype, "mode", 2);
5695
+ h()
5696
+ ], D.prototype, "mode", 2);
5694
5697
  z([
5695
- p()
5696
- ], I.prototype, "activeFieldKey", 2);
5698
+ h()
5699
+ ], D.prototype, "activeFieldKey", 2);
5697
5700
  z([
5698
- p({ type: Array })
5699
- ], I.prototype, "pinnedFields", 2);
5701
+ h({ type: Array })
5702
+ ], D.prototype, "pinnedFields", 2);
5700
5703
  z([
5701
- p({ type: Object })
5702
- ], I.prototype, "appliedMetadata", 2);
5704
+ h({ type: Object })
5705
+ ], D.prototype, "appliedMetadata", 2);
5703
5706
  z([
5704
- p({ attribute: !1 })
5705
- ], I.prototype, "apiClient", 2);
5707
+ h({ attribute: !1 })
5708
+ ], D.prototype, "apiClient", 2);
5706
5709
  z([
5707
5710
  _()
5708
- ], I.prototype, "_showFieldSelection", 2);
5711
+ ], D.prototype, "_showFieldSelection", 2);
5709
5712
  z([
5710
5713
  _()
5711
- ], I.prototype, "_fieldSearch", 2);
5714
+ ], D.prototype, "_fieldSearch", 2);
5712
5715
  z([
5713
5716
  _()
5714
- ], I.prototype, "_collapsedFields", 2);
5717
+ ], D.prototype, "_collapsedFields", 2);
5715
5718
  z([
5716
5719
  _()
5717
- ], I.prototype, "_tagInputs", 2);
5720
+ ], D.prototype, "_tagInputs", 2);
5718
5721
  z([
5719
5722
  _()
5720
- ], I.prototype, "_tagSuggestions", 2);
5723
+ ], D.prototype, "_tagSuggestions", 2);
5721
5724
  z([
5722
5725
  _()
5723
- ], I.prototype, "_tagLoading", 2);
5726
+ ], D.prototype, "_tagLoading", 2);
5724
5727
  z([
5725
5728
  _()
5726
- ], I.prototype, "_datePresets", 2);
5729
+ ], D.prototype, "_datePresets", 2);
5727
5730
  z([
5728
5731
  _()
5729
- ], I.prototype, "_dateFroms", 2);
5732
+ ], D.prototype, "_dateFroms", 2);
5730
5733
  z([
5731
5734
  _()
5732
- ], I.prototype, "_dateTos", 2);
5735
+ ], D.prototype, "_dateTos", 2);
5733
5736
  z([
5734
5737
  _()
5735
- ], I.prototype, "_specificModeFields", 2);
5738
+ ], D.prototype, "_specificModeFields", 2);
5736
5739
  z([
5737
5740
  _()
5738
- ], I.prototype, "_selectSearches", 2);
5739
- I = z([
5740
- F("ap-filter-metadata")
5741
- ], I);
5742
- var Ea = Object.defineProperty, Aa = Object.getOwnPropertyDescriptor, oe = (t, e, s, i) => {
5743
- for (var a = i > 1 ? void 0 : i ? Aa(e, s) : e, r = t.length - 1, o; r >= 0; r--)
5741
+ ], D.prototype, "_selectSearches", 2);
5742
+ D = z([
5743
+ C("ap-filter-metadata")
5744
+ ], D);
5745
+ var Aa = Object.defineProperty, Ta = Object.getOwnPropertyDescriptor, oe = (t, e, s, i) => {
5746
+ for (var a = i > 1 ? void 0 : i ? Ta(e, s) : e, r = t.length - 1, o; r >= 0; r--)
5744
5747
  (o = t[r]) && (a = (i ? o(e, s, a) : o(a)) || a);
5745
- return i && a && Ea(e, s, a), a;
5748
+ return i && a && Aa(e, s, a), a;
5746
5749
  };
5747
- let Z = class extends S {
5750
+ let W = class extends S {
5748
5751
  constructor() {
5749
5752
  super(...arguments), this.selectedStatus = [], this.statusOperator = ":=", this.approverValue = "", this.approverOperator = "~", this.requesterValue = "", this.requesterOperator = "~", this.dueDatePreset = "", this.dueDateFrom = "", this.dueDateTo = "";
5750
5753
  }
@@ -5753,11 +5756,11 @@ let Z = class extends S {
5753
5756
  return this.selectedStatus.length > 0 || !!this.approverValue || !!this.requesterValue || !!this.dueDatePreset || !!this.dueDateFrom || !!this.dueDateTo;
5754
5757
  }
5755
5758
  get _statusHasEmptyValue() {
5756
- return this.selectedStatus.includes(W) || this.selectedStatus.includes(Q);
5759
+ return this.selectedStatus.includes(Y) || this.selectedStatus.includes(X);
5757
5760
  }
5758
5761
  get _statusHasOnlyEmptyValues() {
5759
5762
  return this.selectedStatus.length > 0 && this.selectedStatus.every(
5760
- (t) => t === W || t === Q
5763
+ (t) => t === Y || t === X
5761
5764
  );
5762
5765
  }
5763
5766
  get _dueDateNeedsInputs() {
@@ -5868,7 +5871,7 @@ let Z = class extends S {
5868
5871
 
5869
5872
  <!-- Empty / Not empty checkboxes -->
5870
5873
  <div class="options-list short mt-12">
5871
- ${Ce.map(
5874
+ ${Fe.map(
5872
5875
  (e) => n`
5873
5876
  <ap-checkbox
5874
5877
  ?checked=${this.selectedStatus.includes(e.value)}
@@ -5915,7 +5918,7 @@ let Z = class extends S {
5915
5918
  <span class="section-label condition-label">Condition</span>
5916
5919
  <ap-radio-group
5917
5920
  direction="horizontal"
5918
- .options=${as}
5921
+ .options=${rs}
5919
5922
  .value=${this.approverOperator}
5920
5923
  @ap-change=${this._handleApproverOperator}
5921
5924
  ></ap-radio-group>
@@ -5946,7 +5949,7 @@ let Z = class extends S {
5946
5949
  <span class="section-label condition-label">Condition</span>
5947
5950
  <ap-radio-group
5948
5951
  direction="horizontal"
5949
- .options=${as}
5952
+ .options=${rs}
5950
5953
  .value=${this.requesterOperator}
5951
5954
  @ap-change=${this._handleRequesterOperator}
5952
5955
  ></ap-radio-group>
@@ -5975,8 +5978,8 @@ let Z = class extends S {
5975
5978
 
5976
5979
  <!-- Empty / Not empty radio buttons -->
5977
5980
  <ap-radio-group
5978
- .options=${Ce}
5979
- .value=${this.dueDatePreset === W || this.dueDatePreset === Q ? this.dueDatePreset : ""}
5981
+ .options=${Fe}
5982
+ .value=${this.dueDatePreset === Y || this.dueDatePreset === X ? this.dueDatePreset : ""}
5980
5983
  @ap-change=${this._handleDueDatePreset}
5981
5984
  ></ap-radio-group>
5982
5985
 
@@ -5986,7 +5989,7 @@ let Z = class extends S {
5986
5989
  <ap-radio-group
5987
5990
  columns="2"
5988
5991
  .options=${ri}
5989
- .value=${this.dueDatePreset !== W && this.dueDatePreset !== Q ? this.dueDatePreset : ""}
5992
+ .value=${this.dueDatePreset !== Y && this.dueDatePreset !== X ? this.dueDatePreset : ""}
5990
5993
  @ap-change=${this._handleDueDatePreset}
5991
5994
  ></ap-radio-group>
5992
5995
 
@@ -6034,7 +6037,7 @@ let Z = class extends S {
6034
6037
  `;
6035
6038
  }
6036
6039
  };
6037
- Z.styles = [re, ge, k`
6040
+ W.styles = [re, fe, $`
6038
6041
  .options-list.short {
6039
6042
  max-height: none;
6040
6043
  }
@@ -6055,49 +6058,49 @@ Z.styles = [re, ge, k`
6055
6058
  }
6056
6059
  `];
6057
6060
  oe([
6058
- p({ type: Array })
6059
- ], Z.prototype, "selectedStatus", 2);
6061
+ h({ type: Array })
6062
+ ], W.prototype, "selectedStatus", 2);
6060
6063
  oe([
6061
- p()
6062
- ], Z.prototype, "statusOperator", 2);
6064
+ h()
6065
+ ], W.prototype, "statusOperator", 2);
6063
6066
  oe([
6064
- p()
6065
- ], Z.prototype, "approverValue", 2);
6067
+ h()
6068
+ ], W.prototype, "approverValue", 2);
6066
6069
  oe([
6067
- p()
6068
- ], Z.prototype, "approverOperator", 2);
6070
+ h()
6071
+ ], W.prototype, "approverOperator", 2);
6069
6072
  oe([
6070
- p()
6071
- ], Z.prototype, "requesterValue", 2);
6073
+ h()
6074
+ ], W.prototype, "requesterValue", 2);
6072
6075
  oe([
6073
- p()
6074
- ], Z.prototype, "requesterOperator", 2);
6076
+ h()
6077
+ ], W.prototype, "requesterOperator", 2);
6075
6078
  oe([
6076
- p()
6077
- ], Z.prototype, "dueDatePreset", 2);
6079
+ h()
6080
+ ], W.prototype, "dueDatePreset", 2);
6078
6081
  oe([
6079
- p()
6080
- ], Z.prototype, "dueDateFrom", 2);
6082
+ h()
6083
+ ], W.prototype, "dueDateFrom", 2);
6081
6084
  oe([
6082
- p()
6083
- ], Z.prototype, "dueDateTo", 2);
6084
- Z = oe([
6085
- F("ap-filter-approval")
6086
- ], Z);
6087
- var Ta = Object.defineProperty, Ma = Object.getOwnPropertyDescriptor, ne = (t, e, s, i) => {
6088
- for (var a = i > 1 ? void 0 : i ? Ma(e, s) : e, r = t.length - 1, o; r >= 0; r--)
6085
+ h()
6086
+ ], W.prototype, "dueDateTo", 2);
6087
+ W = oe([
6088
+ C("ap-filter-approval")
6089
+ ], W);
6090
+ var Ma = Object.defineProperty, Oa = Object.getOwnPropertyDescriptor, ne = (t, e, s, i) => {
6091
+ for (var a = i > 1 ? void 0 : i ? Oa(e, s) : e, r = t.length - 1, o; r >= 0; r--)
6089
6092
  (o = t[r]) && (a = (i ? o(e, s, a) : o(a)) || a);
6090
- return i && a && Ta(e, s, a), a;
6093
+ return i && a && Ma(e, s, a), a;
6091
6094
  };
6092
- const Oa = 300;
6093
- function La(t) {
6095
+ const La = 300;
6096
+ function Ia(t) {
6094
6097
  return t.filter(
6095
6098
  (e) => e.toLowerCase().includes("*") || !t.some(
6096
6099
  (s) => s.toLowerCase().includes("*") && e.toLowerCase().startsWith(s.slice(0, -1).toLowerCase())
6097
6100
  )
6098
6101
  );
6099
6102
  }
6100
- let J = class extends S {
6103
+ let Q = class extends S {
6101
6104
  constructor() {
6102
6105
  super(...arguments), this.selected = [], this._search = "", this._debouncedSearch = "", this._products = [], this._isLoading = !1, this._showAddList = !1, this._addListText = "";
6103
6106
  }
@@ -6114,13 +6117,13 @@ let J = class extends S {
6114
6117
  return this._debouncedSearch.length > 0;
6115
6118
  }
6116
6119
  _emit(t) {
6117
- const e = La(t);
6120
+ const e = Ia(t);
6118
6121
  this.dispatchEvent(
6119
6122
  new CustomEvent("filter-change", {
6120
6123
  detail: {
6121
6124
  key: b.PRODUCT_REF,
6122
6125
  values: e,
6123
- operator: $.IS
6126
+ operator: w.IS
6124
6127
  },
6125
6128
  bubbles: !0,
6126
6129
  composed: !0
@@ -6142,7 +6145,7 @@ let J = class extends S {
6142
6145
  this._search = e, this._debounceTimer && clearTimeout(this._debounceTimer), this._debounceTimer = setTimeout(() => {
6143
6146
  const s = e.trim().toLowerCase();
6144
6147
  this._debouncedSearch = s, s ? this._fetchProducts(s) : (this._products = [], this._isLoading = !1);
6145
- }, Oa);
6148
+ }, La);
6146
6149
  }
6147
6150
  _clearSearch() {
6148
6151
  this._search = "", this._debouncedSearch = "", this._products = [], this._isLoading = !1, this._debounceTimer && clearTimeout(this._debounceTimer);
@@ -6316,7 +6319,7 @@ let J = class extends S {
6316
6319
  `;
6317
6320
  }
6318
6321
  };
6319
- J.styles = [re, ge, k`
6322
+ Q.styles = [re, fe, $`
6320
6323
  .product-item {
6321
6324
  display: flex;
6322
6325
  align-items: center;
@@ -6557,43 +6560,43 @@ J.styles = [re, ge, k`
6557
6560
  }
6558
6561
  `];
6559
6562
  ne([
6560
- p({ type: Array })
6561
- ], J.prototype, "selected", 2);
6563
+ h({ type: Array })
6564
+ ], Q.prototype, "selected", 2);
6562
6565
  ne([
6563
- p({ attribute: !1 })
6564
- ], J.prototype, "apiClient", 2);
6566
+ h({ attribute: !1 })
6567
+ ], Q.prototype, "apiClient", 2);
6565
6568
  ne([
6566
- Oe(".product-search")
6567
- ], J.prototype, "_searchInput", 2);
6569
+ Le(".product-search")
6570
+ ], Q.prototype, "_searchInput", 2);
6568
6571
  ne([
6569
6572
  _()
6570
- ], J.prototype, "_search", 2);
6573
+ ], Q.prototype, "_search", 2);
6571
6574
  ne([
6572
6575
  _()
6573
- ], J.prototype, "_debouncedSearch", 2);
6576
+ ], Q.prototype, "_debouncedSearch", 2);
6574
6577
  ne([
6575
6578
  _()
6576
- ], J.prototype, "_products", 2);
6579
+ ], Q.prototype, "_products", 2);
6577
6580
  ne([
6578
6581
  _()
6579
- ], J.prototype, "_isLoading", 2);
6582
+ ], Q.prototype, "_isLoading", 2);
6580
6583
  ne([
6581
6584
  _()
6582
- ], J.prototype, "_showAddList", 2);
6585
+ ], Q.prototype, "_showAddList", 2);
6583
6586
  ne([
6584
6587
  _()
6585
- ], J.prototype, "_addListText", 2);
6586
- J = ne([
6587
- F("ap-filter-product-ref")
6588
- ], J);
6589
- var Pa = Object.defineProperty, Ia = Object.getOwnPropertyDescriptor, P = (t, e, s, i) => {
6590
- for (var a = i > 1 ? void 0 : i ? Ia(e, s) : e, r = t.length - 1, o; r >= 0; r--)
6588
+ ], Q.prototype, "_addListText", 2);
6589
+ Q = ne([
6590
+ C("ap-filter-product-ref")
6591
+ ], Q);
6592
+ var Pa = Object.defineProperty, Da = Object.getOwnPropertyDescriptor, L = (t, e, s, i) => {
6593
+ for (var a = i > 1 ? void 0 : i ? Da(e, s) : e, r = t.length - 1, o; r >= 0; r--)
6591
6594
  (o = t[r]) && (a = (i ? o(e, s, a) : o(a)) || a);
6592
6595
  return i && a && Pa(e, s, a), a;
6593
6596
  };
6594
- let L = class extends S {
6597
+ let O = class extends S {
6595
6598
  constructor() {
6596
- super(...arguments), this.totalCount = 0, this.totalFolderCount = 0, this.isLoading = !1, this.showUpload = !1, this.sortBy = "created_at", this.sortDirection = "desc", this.sortOptions = qt, this.filters = {
6599
+ super(...arguments), this.totalCount = 0, this.totalFolderCount = 0, this.isLoading = !1, this.showUpload = !1, this.sortBy = "created_at", this.sortDirection = "desc", this.sortOptions = Ht, this.filters = {
6597
6600
  metadata: { pinned: [], visible: [], applied: {} },
6598
6601
  pinned: [],
6599
6602
  visible: [],
@@ -6814,9 +6817,9 @@ let L = class extends S {
6814
6817
  ></ap-filter-date>`;
6815
6818
  }
6816
6819
  case "size": {
6817
- const r = e.size, o = ((s = r == null ? void 0 : r.values) == null ? void 0 : s[0]) || "", [l, c] = o.split(".."), h = l ? parseFloat(l) / 1e6 : 0, u = c ? parseFloat(c) / 1e6 : 0;
6820
+ const r = e.size, o = ((s = r == null ? void 0 : r.values) == null ? void 0 : s[0]) || "", [l, c] = o.split(".."), p = l ? parseFloat(l) / 1e6 : 0, u = c ? parseFloat(c) / 1e6 : 0;
6818
6821
  return n`<ap-filter-size
6819
- .min=${h}
6822
+ .min=${p}
6820
6823
  .max=${u}
6821
6824
  @filter-change=${this._handleFilterChange}
6822
6825
  ></ap-filter-size>`;
@@ -6999,7 +7002,7 @@ let L = class extends S {
6999
7002
  `;
7000
7003
  }
7001
7004
  };
7002
- L.styles = k`
7005
+ O.styles = $`
7003
7006
  :host {
7004
7007
  display: block;
7005
7008
  padding: 8px 20px 6px;
@@ -7338,82 +7341,82 @@ L.styles = k`
7338
7341
  top: 0;
7339
7342
  }
7340
7343
  `;
7341
- P([
7342
- p({ type: Number })
7343
- ], L.prototype, "totalCount", 2);
7344
- P([
7345
- p({ type: Number })
7346
- ], L.prototype, "totalFolderCount", 2);
7347
- P([
7348
- p({ type: Boolean })
7349
- ], L.prototype, "isLoading", 2);
7350
- P([
7351
- p({ type: Boolean })
7352
- ], L.prototype, "showUpload", 2);
7353
- P([
7354
- p()
7355
- ], L.prototype, "sortBy", 2);
7356
- P([
7357
- p()
7358
- ], L.prototype, "sortDirection", 2);
7359
- P([
7360
- p({ type: Array })
7361
- ], L.prototype, "sortOptions", 2);
7362
- P([
7363
- p({ type: Object })
7364
- ], L.prototype, "filters", 2);
7365
- P([
7366
- p({ type: Array })
7367
- ], L.prototype, "labels", 2);
7368
- P([
7369
- p({ type: Array })
7370
- ], L.prototype, "tags", 2);
7371
- P([
7372
- p({ type: Array })
7373
- ], L.prototype, "fileTypes", 2);
7374
- P([
7375
- p({ type: Array })
7376
- ], L.prototype, "metadataFields", 2);
7377
- P([
7378
- p({ type: Array })
7379
- ], L.prototype, "pinnedFilters", 2);
7380
- P([
7381
- p({ type: Array })
7382
- ], L.prototype, "forcedFilterKeys", 2);
7383
- P([
7384
- p({ attribute: !1 })
7385
- ], L.prototype, "apiClient", 2);
7386
- P([
7387
- Oe("ap-dropdown")
7388
- ], L.prototype, "_sortDropdown", 2);
7389
- P([
7344
+ L([
7345
+ h({ type: Number })
7346
+ ], O.prototype, "totalCount", 2);
7347
+ L([
7348
+ h({ type: Number })
7349
+ ], O.prototype, "totalFolderCount", 2);
7350
+ L([
7351
+ h({ type: Boolean })
7352
+ ], O.prototype, "isLoading", 2);
7353
+ L([
7354
+ h({ type: Boolean })
7355
+ ], O.prototype, "showUpload", 2);
7356
+ L([
7357
+ h()
7358
+ ], O.prototype, "sortBy", 2);
7359
+ L([
7360
+ h()
7361
+ ], O.prototype, "sortDirection", 2);
7362
+ L([
7363
+ h({ type: Array })
7364
+ ], O.prototype, "sortOptions", 2);
7365
+ L([
7366
+ h({ type: Object })
7367
+ ], O.prototype, "filters", 2);
7368
+ L([
7369
+ h({ type: Array })
7370
+ ], O.prototype, "labels", 2);
7371
+ L([
7372
+ h({ type: Array })
7373
+ ], O.prototype, "tags", 2);
7374
+ L([
7375
+ h({ type: Array })
7376
+ ], O.prototype, "fileTypes", 2);
7377
+ L([
7378
+ h({ type: Array })
7379
+ ], O.prototype, "metadataFields", 2);
7380
+ L([
7381
+ h({ type: Array })
7382
+ ], O.prototype, "pinnedFilters", 2);
7383
+ L([
7384
+ h({ type: Array })
7385
+ ], O.prototype, "forcedFilterKeys", 2);
7386
+ L([
7387
+ h({ attribute: !1 })
7388
+ ], O.prototype, "apiClient", 2);
7389
+ L([
7390
+ Le("ap-dropdown")
7391
+ ], O.prototype, "_sortDropdown", 2);
7392
+ L([
7390
7393
  _()
7391
- ], L.prototype, "_showDropdown", 2);
7392
- P([
7394
+ ], O.prototype, "_showDropdown", 2);
7395
+ L([
7393
7396
  _()
7394
- ], L.prototype, "_showMetadataSelector", 2);
7395
- P([
7397
+ ], O.prototype, "_showMetadataSelector", 2);
7398
+ L([
7396
7399
  _()
7397
- ], L.prototype, "_openFilter", 2);
7398
- P([
7400
+ ], O.prototype, "_openFilter", 2);
7401
+ L([
7399
7402
  _()
7400
- ], L.prototype, "_openMetadataField", 2);
7401
- P([
7403
+ ], O.prototype, "_openMetadataField", 2);
7404
+ L([
7402
7405
  _()
7403
- ], L.prototype, "_externalTrigger", 2);
7404
- P([
7406
+ ], O.prototype, "_externalTrigger", 2);
7407
+ L([
7405
7408
  _()
7406
- ], L.prototype, "_externalLeft", 2);
7407
- P([
7409
+ ], O.prototype, "_externalLeft", 2);
7410
+ L([
7408
7411
  _()
7409
- ], L.prototype, "_externalTop", 2);
7410
- L = P([
7411
- F("ap-content-toolbar")
7412
- ], L);
7413
- var Da = Object.defineProperty, za = Object.getOwnPropertyDescriptor, G = (t, e, s, i) => {
7414
- for (var a = i > 1 ? void 0 : i ? za(e, s) : e, r = t.length - 1, o; r >= 0; r--)
7412
+ ], O.prototype, "_externalTop", 2);
7413
+ O = L([
7414
+ C("ap-content-toolbar")
7415
+ ], O);
7416
+ var za = Object.defineProperty, Ra = Object.getOwnPropertyDescriptor, G = (t, e, s, i) => {
7417
+ for (var a = i > 1 ? void 0 : i ? Ra(e, s) : e, r = t.length - 1, o; r >= 0; r--)
7415
7418
  (o = t[r]) && (a = (i ? o(e, s, a) : o(a)) || a);
7416
- return i && a && Da(e, s, a), a;
7419
+ return i && a && za(e, s, a), a;
7417
7420
  };
7418
7421
  let B = class extends S {
7419
7422
  constructor() {
@@ -7463,7 +7466,7 @@ let B = class extends S {
7463
7466
  }
7464
7467
  _getDateSummary(t) {
7465
7468
  var o, l;
7466
- const e = ((o = vs.find((c) => c.value === t.field)) == null ? void 0 : o.label) || t.field, s = [...Vt, ...ms], i = t.preset ? ((l = s.find((c) => c.value === t.preset)) == null ? void 0 : l.label) || t.preset : "", a = (c) => {
7469
+ const e = ((o = vs.find((c) => c.value === t.field)) == null ? void 0 : o.label) || t.field, s = [...qt, ...ms], i = t.preset ? ((l = s.find((c) => c.value === t.preset)) == null ? void 0 : l.label) || t.preset : "", a = (c) => {
7467
7470
  try {
7468
7471
  return c.split("T")[0];
7469
7472
  } catch {
@@ -7611,8 +7614,8 @@ let B = class extends S {
7611
7614
  `;
7612
7615
  }
7613
7616
  render() {
7614
- const t = Je(this.forcedFilters), e = new Set(Object.keys(t)), s = Object.keys(this.appliedFilters).filter((g) => !e.has(g)), i = Object.keys(this.appliedMetadata), a = new Set(this.pinnedFilters), r = new Set(this.pinnedMetadataFields), o = this.pinnedFilters.filter((g) => !e.has(g)), l = s.filter((g) => !a.has(g)), c = i.filter((g) => !r.has(g)), h = this.pendingFilter && !a.has(this.pendingFilter) && !(this.pendingFilter in this.appliedFilters), u = this.pendingMetadataField && !r.has(this.pendingMetadataField) && !(this.pendingMetadataField in this.appliedMetadata), v = s.length + i.length > 0;
7615
- return e.size + o.length + this.pinnedMetadataFields.length + l.length + c.length + (h ? 1 : 0) + (u ? 1 : 0) === 0 ? f : n`
7617
+ const t = Ut(this.forcedFilters), e = new Set(Object.keys(t)), s = Object.keys(this.appliedFilters).filter((g) => !e.has(g)), i = Object.keys(this.appliedMetadata), a = new Set(this.pinnedFilters), r = new Set(this.pinnedMetadataFields), o = this.pinnedFilters.filter((g) => !e.has(g)), l = s.filter((g) => !a.has(g)), c = i.filter((g) => !r.has(g)), p = this.pendingFilter && !a.has(this.pendingFilter) && !(this.pendingFilter in this.appliedFilters), u = this.pendingMetadataField && !r.has(this.pendingMetadataField) && !(this.pendingMetadataField in this.appliedMetadata), v = s.length + i.length > 0;
7618
+ return e.size + o.length + this.pinnedMetadataFields.length + l.length + c.length + (p ? 1 : 0) + (u ? 1 : 0) === 0 ? f : n`
7616
7619
  <div class="chips-row">
7617
7620
  <div class="chips">
7618
7621
  ${[...e].map(
@@ -7627,7 +7630,7 @@ let B = class extends S {
7627
7630
  ${l.map(
7628
7631
  (g) => this._renderFilterChip(g, this.appliedFilters[g])
7629
7632
  )}
7630
- ${h ? n`
7633
+ ${p ? n`
7631
7634
  <span class="chip pinned-empty active pending" @click=${(g) => this._openFilter(this.pendingFilter, g)}>
7632
7635
  <span class="chip-icon"><ap-icon name=${this._getFilterIcon(this.pendingFilter)} .size=${16}></ap-icon></span>
7633
7636
  <span class="chip-label">${Re[this.pendingFilter] || this.pendingFilter}</span>
@@ -7650,7 +7653,7 @@ let B = class extends S {
7650
7653
  `;
7651
7654
  }
7652
7655
  };
7653
- B.styles = k`
7656
+ B.styles = $`
7654
7657
  :host {
7655
7658
  display: block;
7656
7659
  }
@@ -7799,51 +7802,51 @@ B.styles = k`
7799
7802
  }
7800
7803
  `;
7801
7804
  G([
7802
- p({ type: Object })
7805
+ h({ type: Object })
7803
7806
  ], B.prototype, "appliedFilters", 2);
7804
7807
  G([
7805
- p({ type: Object })
7808
+ h({ type: Object })
7806
7809
  ], B.prototype, "appliedMetadata", 2);
7807
7810
  G([
7808
- p({ type: Object })
7811
+ h({ type: Object })
7809
7812
  ], B.prototype, "forcedFilters", 2);
7810
7813
  G([
7811
- p({ type: Array })
7814
+ h({ type: Array })
7812
7815
  ], B.prototype, "metadataFields", 2);
7813
7816
  G([
7814
- p({ type: Array })
7817
+ h({ type: Array })
7815
7818
  ], B.prototype, "pinnedFilters", 2);
7816
7819
  G([
7817
- p({ type: Array })
7820
+ h({ type: Array })
7818
7821
  ], B.prototype, "pinnedMetadataFields", 2);
7819
7822
  G([
7820
- p({ type: Array })
7823
+ h({ type: Array })
7821
7824
  ], B.prototype, "tags", 2);
7822
7825
  G([
7823
- p({ type: Array })
7826
+ h({ type: Array })
7824
7827
  ], B.prototype, "labels", 2);
7825
7828
  G([
7826
- p()
7829
+ h()
7827
7830
  ], B.prototype, "activeFilter", 2);
7828
7831
  G([
7829
- p()
7832
+ h()
7830
7833
  ], B.prototype, "activeMetadataField", 2);
7831
7834
  G([
7832
- p()
7835
+ h()
7833
7836
  ], B.prototype, "pendingFilter", 2);
7834
7837
  G([
7835
- p()
7838
+ h()
7836
7839
  ], B.prototype, "pendingMetadataField", 2);
7837
7840
  B = G([
7838
- F("ap-filters-bar")
7841
+ C("ap-filters-bar")
7839
7842
  ], B);
7840
- var Ra = Object.defineProperty, Na = Object.getOwnPropertyDescriptor, le = (t, e, s, i) => {
7843
+ var ja = Object.defineProperty, Na = Object.getOwnPropertyDescriptor, le = (t, e, s, i) => {
7841
7844
  for (var a = i > 1 ? void 0 : i ? Na(e, s) : e, r = t.length - 1, o; r >= 0; r--)
7842
7845
  (o = t[r]) && (a = (i ? o(e, s, a) : o(a)) || a);
7843
- return i && a && Ra(e, s, a), a;
7846
+ return i && a && ja(e, s, a), a;
7844
7847
  };
7845
- const ja = 6;
7846
- let ee = class extends S {
7848
+ const Ba = 6;
7849
+ let Z = class extends S {
7847
7850
  constructor() {
7848
7851
  super(...arguments), this.assets = [], this.folders = [], this.folderPreviews = {}, this.selectedIds = [], this.selectedFolderIds = [], this.isLoading = !1, this.multiSelect = !0, this.folderSelectable = !1, this.gridSize = "normal", this._prevCount = 0;
7849
7852
  }
@@ -7894,7 +7897,7 @@ let ee = class extends S {
7894
7897
  `;
7895
7898
  }
7896
7899
  )}
7897
- ${this.isLoading ? Array.from({ length: ja }, () => n`<div class="ghost-card">
7900
+ ${this.isLoading ? Array.from({ length: Ba }, () => n`<div class="ghost-card">
7898
7901
  <div class="ghost-thumb"></div>
7899
7902
  <div class="ghost-info">
7900
7903
  <div class="ghost-line ghost-name"></div>
@@ -7905,7 +7908,7 @@ let ee = class extends S {
7905
7908
  `;
7906
7909
  }
7907
7910
  };
7908
- ee.styles = k`
7911
+ Z.styles = $`
7909
7912
  :host {
7910
7913
  display: block;
7911
7914
  padding: 0 20px 16px;
@@ -7962,41 +7965,41 @@ ee.styles = k`
7962
7965
  }
7963
7966
  `;
7964
7967
  le([
7965
- p({ type: Array })
7966
- ], ee.prototype, "assets", 2);
7968
+ h({ type: Array })
7969
+ ], Z.prototype, "assets", 2);
7967
7970
  le([
7968
- p({ type: Array })
7969
- ], ee.prototype, "folders", 2);
7971
+ h({ type: Array })
7972
+ ], Z.prototype, "folders", 2);
7970
7973
  le([
7971
- p({ type: Object })
7972
- ], ee.prototype, "folderPreviews", 2);
7974
+ h({ type: Object })
7975
+ ], Z.prototype, "folderPreviews", 2);
7973
7976
  le([
7974
- p({ type: Array })
7975
- ], ee.prototype, "selectedIds", 2);
7977
+ h({ type: Array })
7978
+ ], Z.prototype, "selectedIds", 2);
7976
7979
  le([
7977
- p({ type: Array })
7978
- ], ee.prototype, "selectedFolderIds", 2);
7980
+ h({ type: Array })
7981
+ ], Z.prototype, "selectedFolderIds", 2);
7979
7982
  le([
7980
- p({ type: Boolean })
7981
- ], ee.prototype, "isLoading", 2);
7983
+ h({ type: Boolean })
7984
+ ], Z.prototype, "isLoading", 2);
7982
7985
  le([
7983
- p({ type: Boolean })
7984
- ], ee.prototype, "multiSelect", 2);
7986
+ h({ type: Boolean })
7987
+ ], Z.prototype, "multiSelect", 2);
7985
7988
  le([
7986
- p({ type: Boolean })
7987
- ], ee.prototype, "folderSelectable", 2);
7989
+ h({ type: Boolean })
7990
+ ], Z.prototype, "folderSelectable", 2);
7988
7991
  le([
7989
- p({ type: String })
7990
- ], ee.prototype, "gridSize", 2);
7991
- ee = le([
7992
- F("ap-grid-view")
7993
- ], ee);
7994
- var Ba = Object.defineProperty, Ua = Object.getOwnPropertyDescriptor, te = (t, e, s, i) => {
7995
- for (var a = i > 1 ? void 0 : i ? Ua(e, s) : e, r = t.length - 1, o; r >= 0; r--)
7992
+ h({ type: String })
7993
+ ], Z.prototype, "gridSize", 2);
7994
+ Z = le([
7995
+ C("ap-grid-view")
7996
+ ], Z);
7997
+ var Ua = Object.defineProperty, Va = Object.getOwnPropertyDescriptor, J = (t, e, s, i) => {
7998
+ for (var a = i > 1 ? void 0 : i ? Va(e, s) : e, r = t.length - 1, o; r >= 0; r--)
7996
7999
  (o = t[r]) && (a = (i ? o(e, s, a) : o(a)) || a);
7997
- return i && a && Ba(e, s, a), a;
8000
+ return i && a && Ua(e, s, a), a;
7998
8001
  };
7999
- const Va = 5;
8002
+ const qa = 5;
8000
8003
  let H = class extends S {
8001
8004
  constructor() {
8002
8005
  super(...arguments), this.assets = [], this.folders = [], this.selectedIds = [], this.selectedFolderIds = [], this.isLoading = !1, this.multiSelect = !0, this.folderSelectable = !1, this.totalCount = 0, this.isSelectingAll = !1, this.folderPreviews = {}, this._compactLevel = 0;
@@ -8085,7 +8088,7 @@ let H = class extends S {
8085
8088
  ></ap-asset-row>
8086
8089
  `
8087
8090
  )}
8088
- ${this.isLoading ? Array.from({ length: Va }, (i, a) => {
8091
+ ${this.isLoading ? Array.from({ length: qa }, (i, a) => {
8089
8092
  const r = ["70%", "55%", "80%", "45%", "65%"];
8090
8093
  return n`
8091
8094
  <div class="ghost-row" style="grid-template-columns: ${this._getGridColumns(this.multiSelect)}">
@@ -8103,7 +8106,7 @@ let H = class extends S {
8103
8106
  `;
8104
8107
  }
8105
8108
  };
8106
- H.styles = k`
8109
+ H.styles = $`
8107
8110
  :host {
8108
8111
  display: block;
8109
8112
  padding: 0 20px 16px;
@@ -8191,44 +8194,44 @@ H.styles = k`
8191
8194
  .ghost-el { animation: none; }
8192
8195
  }
8193
8196
  `;
8194
- te([
8195
- p({ type: Array })
8197
+ J([
8198
+ h({ type: Array })
8196
8199
  ], H.prototype, "assets", 2);
8197
- te([
8198
- p({ type: Array })
8200
+ J([
8201
+ h({ type: Array })
8199
8202
  ], H.prototype, "folders", 2);
8200
- te([
8201
- p({ type: Array })
8203
+ J([
8204
+ h({ type: Array })
8202
8205
  ], H.prototype, "selectedIds", 2);
8203
- te([
8204
- p({ type: Array })
8206
+ J([
8207
+ h({ type: Array })
8205
8208
  ], H.prototype, "selectedFolderIds", 2);
8206
- te([
8207
- p({ type: Boolean })
8209
+ J([
8210
+ h({ type: Boolean })
8208
8211
  ], H.prototype, "isLoading", 2);
8209
- te([
8210
- p({ type: Boolean })
8212
+ J([
8213
+ h({ type: Boolean })
8211
8214
  ], H.prototype, "multiSelect", 2);
8212
- te([
8213
- p({ type: Boolean })
8215
+ J([
8216
+ h({ type: Boolean })
8214
8217
  ], H.prototype, "folderSelectable", 2);
8215
- te([
8216
- p({ type: Number })
8218
+ J([
8219
+ h({ type: Number })
8217
8220
  ], H.prototype, "totalCount", 2);
8218
- te([
8219
- p({ type: Boolean })
8221
+ J([
8222
+ h({ type: Boolean })
8220
8223
  ], H.prototype, "isSelectingAll", 2);
8221
- te([
8222
- p({ type: Object })
8224
+ J([
8225
+ h({ type: Object })
8223
8226
  ], H.prototype, "folderPreviews", 2);
8224
- te([
8227
+ J([
8225
8228
  _()
8226
8229
  ], H.prototype, "_compactLevel", 2);
8227
- H = te([
8228
- F("ap-list-view")
8230
+ H = J([
8231
+ C("ap-list-view")
8229
8232
  ], H);
8230
- const qa = /* @__PURE__ */ new Set(["jpg", "jpeg", "png", "gif", "webp", "svg", "bmp", "ico", "tiff", "tif", "avif", "heic", "heif", "psd", "eps"]), Ha = /* @__PURE__ */ new Set([
8231
- ...qa,
8233
+ const Ha = /* @__PURE__ */ new Set(["jpg", "jpeg", "png", "gif", "webp", "svg", "bmp", "ico", "tiff", "tif", "avif", "heic", "heif", "psd", "eps"]), Ga = /* @__PURE__ */ new Set([
8234
+ ...Ha,
8232
8235
  "pdf",
8233
8236
  "psd",
8234
8237
  "eps",
@@ -8239,7 +8242,7 @@ const qa = /* @__PURE__ */ new Set(["jpg", "jpeg", "png", "gif", "webp", "svg",
8239
8242
  "woff2",
8240
8243
  "eot"
8241
8244
  ]);
8242
- function Ne(t) {
8245
+ function je(t) {
8243
8246
  if (!t) return "other";
8244
8247
  const e = {
8245
8248
  image: "image",
@@ -8253,9 +8256,9 @@ function Ne(t) {
8253
8256
  }
8254
8257
  function Cs(t) {
8255
8258
  const e = (t == null ? void 0 : t.toLowerCase().replace(".", "")) || "";
8256
- return Ha.has(e);
8259
+ return Ga.has(e);
8257
8260
  }
8258
- const Fs = "https://assets.filerobot.com/scaleflex/assets/file-types/v2/", Ga = {
8261
+ const Fs = "https://assets.filerobot.com/scaleflex/assets/file-types/v2/", Ka = {
8259
8262
  png: "PNG",
8260
8263
  jpg: "JPG",
8261
8264
  jpeg: "JPG",
@@ -8319,7 +8322,7 @@ const Fs = "https://assets.filerobot.com/scaleflex/assets/file-types/v2/", Ga =
8319
8322
  bin: "BIN"
8320
8323
  };
8321
8324
  function nt(t) {
8322
- const e = (t == null ? void 0 : t.toLowerCase().replace(".", "")) || "", s = Ga[e];
8325
+ const e = (t == null ? void 0 : t.toLowerCase().replace(".", "")) || "", s = Ka[e];
8323
8326
  return `${Fs}${s || "DEFAULT"}.png`;
8324
8327
  }
8325
8328
  function Ue() {
@@ -8330,14 +8333,14 @@ function Ft(t) {
8330
8333
  const e = t.split("/");
8331
8334
  return e.length > 1 ? e[1] : e[0];
8332
8335
  }
8333
- const Ka = /* @__PURE__ */ new Set(["png", "svg", "webp", "gif", "avif"]);
8334
- function Kt(t) {
8336
+ const Ya = /* @__PURE__ */ new Set(["png", "svg", "webp", "gif", "avif"]);
8337
+ function Yt(t) {
8335
8338
  const e = (t == null ? void 0 : t.toLowerCase().replace(".", "")) || "";
8336
- return Ka.has(e);
8339
+ return Ya.has(e);
8337
8340
  }
8338
- const Ya = /* @__PURE__ */ new Set(["svg", "svg+xml", "png", "pdf"]);
8341
+ const Xa = /* @__PURE__ */ new Set(["svg", "svg+xml", "png", "pdf"]);
8339
8342
  function Es(t) {
8340
- return Ya.has(Ft(t).toLowerCase());
8343
+ return Xa.has(Ft(t).toLowerCase());
8341
8344
  }
8342
8345
  function bt(t) {
8343
8346
  var i;
@@ -8348,7 +8351,7 @@ function As(t) {
8348
8351
  const e = t.info, s = (e == null ? void 0 : e.video_thumbnail) || (e == null ? void 0 : e.image_thumbnail) || (e == null ? void 0 : e.thumbnail) || "";
8349
8352
  return s ? Ve(s) : "";
8350
8353
  }
8351
- function Yt(t) {
8354
+ function Xt(t) {
8352
8355
  var s, i;
8353
8356
  let e = Ve(((s = t.url) == null ? void 0 : s.cdn) || ((i = t.url) == null ? void 0 : i.public) || "");
8354
8357
  return e ? (e = e.replace(/([?&])func=proxy&?/, "$1").replace(/[?&]$/, ""), et(e, {
@@ -8389,10 +8392,10 @@ function Ts(t, e) {
8389
8392
  const s = t.file_uri_cdn;
8390
8393
  if (!s) return "";
8391
8394
  let i = Ve(s);
8392
- const a = Ne(t.file_type), r = String(window.devicePixelRatio || 1);
8395
+ const a = je(t.file_type), r = String(window.devicePixelRatio || 1);
8393
8396
  return a === "video" ? et(i, { w: e, dpr: r, force_format: "webp,jpeg" }) : t.file_type === "application/pdf" || Ft(t.file_type).toLowerCase() === "pdf" ? (i = i.replace(/([?&])func=proxy&?/, "$1").replace(/[?&]$/, ""), et(i, { w: e, dpr: r, force_format: "webp,jpeg", doc_page: "1", bypass_process_proxy: "1" })) : et(i, { w: e, dpr: r });
8394
8397
  }
8395
- function Xt(t) {
8398
+ function Wt(t) {
8396
8399
  if (t === 0) return "0 B";
8397
8400
  const e = ["B", "KB", "MB", "GB", "TB"], s = 1024, i = Math.floor(Math.log(t) / Math.log(s));
8398
8401
  return `${(t / Math.pow(s, i)).toFixed(i === 0 ? 0 : 1)} ${e[i]}`;
@@ -8409,12 +8412,12 @@ function _t(t) {
8409
8412
  function Ms(t, e) {
8410
8413
  return !t || !e ? "" : `${t} x ${e}`;
8411
8414
  }
8412
- var Xa = Object.defineProperty, Wa = Object.getOwnPropertyDescriptor, lt = (t, e, s, i) => {
8413
- for (var a = i > 1 ? void 0 : i ? Wa(e, s) : e, r = t.length - 1, o; r >= 0; r--)
8415
+ var Wa = Object.defineProperty, Qa = Object.getOwnPropertyDescriptor, lt = (t, e, s, i) => {
8416
+ for (var a = i > 1 ? void 0 : i ? Qa(e, s) : e, r = t.length - 1, o; r >= 0; r--)
8414
8417
  (o = t[r]) && (a = (i ? o(e, s, a) : o(a)) || a);
8415
- return i && a && Xa(e, s, a), a;
8418
+ return i && a && Wa(e, s, a), a;
8416
8419
  };
8417
- let Te = class extends S {
8420
+ let Me = class extends S {
8418
8421
  constructor() {
8419
8422
  super(...arguments), this.index = 0, this.selected = !1, this.multiSelect = !0;
8420
8423
  }
@@ -8450,13 +8453,13 @@ let Te = class extends S {
8450
8453
  }));
8451
8454
  }
8452
8455
  render() {
8453
- var c, h, u, v, d;
8456
+ var c, p, u, v, d;
8454
8457
  const t = this.asset;
8455
8458
  if (!t) return n``;
8456
- const s = Ne(t.type) === "video", i = ((c = t.extension) == null ? void 0 : c.toLowerCase()) === "pdf", a = Cs(t.extension || "");
8459
+ const s = je(t.type) === "video", i = ((c = t.extension) == null ? void 0 : c.toLowerCase()) === "pdf", a = Cs(t.extension || "");
8457
8460
  let r = "";
8458
- s ? r = As(t) : i ? r = Yt(t) : a && (r = bt(t));
8459
- const o = nt(t.extension || ""), l = Kt(t.extension || "");
8461
+ s ? r = As(t) : i ? r = Xt(t) : a && (r = bt(t));
8462
+ const o = nt(t.extension || ""), l = Yt(t.extension || "");
8460
8463
  return n`
8461
8464
  <div class="card" @click=${this._handleSelect}>
8462
8465
  <div class="thumbnail ${l && r ? "chess" : ""}">
@@ -8478,7 +8481,7 @@ let Te = class extends S {
8478
8481
  m.src !== x && (m.src = x);
8479
8482
  }}
8480
8483
  />`}
8481
- ${s && (((h = t.info) == null ? void 0 : h.video_duration) ?? ((u = t.info) == null ? void 0 : u.duration)) != null ? n`<span class="duration">${this._formatDuration(t.info.video_duration ?? t.info.duration)}</span>` : f}
8484
+ ${s && (((p = t.info) == null ? void 0 : p.video_duration) ?? ((u = t.info) == null ? void 0 : u.duration)) != null ? n`<span class="duration">${this._formatDuration(t.info.video_duration ?? t.info.duration)}</span>` : f}
8482
8485
  <div class="overlay">
8483
8486
  <button class="overlay-btn" @click=${this._handlePreview} aria-label="Preview">
8484
8487
  <ap-icon name="preview" .size=${16}></ap-icon>
@@ -8502,16 +8505,16 @@ let Te = class extends S {
8502
8505
  <div class="info">
8503
8506
  <div class="name" title=${t.name}>${t.name}</div>
8504
8507
  <div class="meta">${(v = t.extension) == null ? void 0 : v.toUpperCase()}${(() => {
8505
- var w, T, C, O;
8506
- const g = ((w = t.info) == null ? void 0 : w.img_w) || ((T = t.info) == null ? void 0 : T.video_w), m = ((C = t.info) == null ? void 0 : C.img_h) || ((O = t.info) == null ? void 0 : O.video_h), x = Ms(g, m);
8508
+ var k, E, A, I;
8509
+ const g = ((k = t.info) == null ? void 0 : k.img_w) || ((E = t.info) == null ? void 0 : E.video_w), m = ((A = t.info) == null ? void 0 : A.img_h) || ((I = t.info) == null ? void 0 : I.video_h), x = Ms(g, m);
8507
8510
  return x ? ` · ${x}` : "";
8508
- })()} · ${Xt(((d = t.size) == null ? void 0 : d.bytes) || 0)}</div>
8511
+ })()} · ${Wt(((d = t.size) == null ? void 0 : d.bytes) || 0)}</div>
8509
8512
  </div>
8510
8513
  </div>
8511
8514
  `;
8512
8515
  }
8513
8516
  };
8514
- Te.styles = k`
8517
+ Me.styles = $`
8515
8518
  :host {
8516
8519
  display: block;
8517
8520
  animation: ap-card-in 300ms ease-out both;
@@ -8692,26 +8695,26 @@ Te.styles = k`
8692
8695
  }
8693
8696
  `;
8694
8697
  lt([
8695
- p({ type: Object })
8696
- ], Te.prototype, "asset", 2);
8698
+ h({ type: Object })
8699
+ ], Me.prototype, "asset", 2);
8697
8700
  lt([
8698
- p({ type: Number })
8699
- ], Te.prototype, "index", 2);
8701
+ h({ type: Number })
8702
+ ], Me.prototype, "index", 2);
8700
8703
  lt([
8701
- p({ type: Boolean, reflect: !0 })
8702
- ], Te.prototype, "selected", 2);
8704
+ h({ type: Boolean, reflect: !0 })
8705
+ ], Me.prototype, "selected", 2);
8703
8706
  lt([
8704
- p({ type: Boolean })
8705
- ], Te.prototype, "multiSelect", 2);
8706
- Te = lt([
8707
- F("ap-asset-card")
8708
- ], Te);
8709
- var Qa = Object.defineProperty, Za = Object.getOwnPropertyDescriptor, Xe = (t, e, s, i) => {
8710
- for (var a = i > 1 ? void 0 : i ? Za(e, s) : e, r = t.length - 1, o; r >= 0; r--)
8707
+ h({ type: Boolean })
8708
+ ], Me.prototype, "multiSelect", 2);
8709
+ Me = lt([
8710
+ C("ap-asset-card")
8711
+ ], Me);
8712
+ var Za = Object.defineProperty, Ja = Object.getOwnPropertyDescriptor, We = (t, e, s, i) => {
8713
+ for (var a = i > 1 ? void 0 : i ? Ja(e, s) : e, r = t.length - 1, o; r >= 0; r--)
8711
8714
  (o = t[r]) && (a = (i ? o(e, s, a) : o(a)) || a);
8712
- return i && a && Qa(e, s, a), a;
8715
+ return i && a && Za(e, s, a), a;
8713
8716
  };
8714
- let be = class extends S {
8717
+ let _e = class extends S {
8715
8718
  constructor() {
8716
8719
  super(...arguments), this.index = 0, this.selected = !1, this.multiSelect = !0, this.compactLevel = 0;
8717
8720
  }
@@ -8747,13 +8750,13 @@ let be = class extends S {
8747
8750
  }));
8748
8751
  }
8749
8752
  render() {
8750
- var c, h, u;
8753
+ var c, p, u;
8751
8754
  const t = this.asset;
8752
8755
  if (!t) return n``;
8753
- const s = Ne(t.type) === "video", i = ((c = t.extension) == null ? void 0 : c.toLowerCase()) === "pdf", a = Cs(t.extension || "");
8756
+ const s = je(t.type) === "video", i = ((c = t.extension) == null ? void 0 : c.toLowerCase()) === "pdf", a = Cs(t.extension || "");
8754
8757
  let r = "";
8755
- s ? r = As(t) : i ? r = Yt(t) : a && (r = bt(t));
8756
- const o = nt(t.extension || ""), l = Kt(t.extension || "");
8758
+ s ? r = As(t) : i ? r = Xt(t) : a && (r = bt(t));
8759
+ const o = nt(t.extension || ""), l = Yt(t.extension || "");
8757
8760
  return n`
8758
8761
  <div class="row" style="grid-template-columns: ${this._getGridColumns()}" @click=${this._handleSelect}>
8759
8762
  ${this.multiSelect ? n`
@@ -8786,8 +8789,8 @@ let be = class extends S {
8786
8789
  />`}
8787
8790
  </div>
8788
8791
  <div class="name" title=${t.name}>${t.name}</div>
8789
- <div class="type">${(h = t.extension) == null ? void 0 : h.toUpperCase()}</div>
8790
- ${this.compactLevel < 2 ? n`<div class="desc">${Xt(((u = t.size) == null ? void 0 : u.bytes) || 0)}</div>` : f}
8792
+ <div class="type">${(p = t.extension) == null ? void 0 : p.toUpperCase()}</div>
8793
+ ${this.compactLevel < 2 ? n`<div class="desc">${Wt(((u = t.size) == null ? void 0 : u.bytes) || 0)}</div>` : f}
8791
8794
  ${this.compactLevel < 1 ? n`<div class="date">${_t(t.created_at || "")}</div>` : f}
8792
8795
  <div class="actions">
8793
8796
  <button class="icon-btn select-btn" @click=${this._handleQuickSelect} aria-label="Select" title="Select">
@@ -8801,7 +8804,7 @@ let be = class extends S {
8801
8804
  `;
8802
8805
  }
8803
8806
  };
8804
- be.styles = k`
8807
+ _e.styles = $`
8805
8808
  :host {
8806
8809
  display: block;
8807
8810
  }
@@ -8932,30 +8935,30 @@ be.styles = k`
8932
8935
  display: block;
8933
8936
  }
8934
8937
  `;
8935
- Xe([
8936
- p({ type: Object })
8937
- ], be.prototype, "asset", 2);
8938
- Xe([
8939
- p({ type: Number })
8940
- ], be.prototype, "index", 2);
8941
- Xe([
8942
- p({ type: Boolean, reflect: !0 })
8943
- ], be.prototype, "selected", 2);
8944
- Xe([
8945
- p({ type: Boolean })
8946
- ], be.prototype, "multiSelect", 2);
8947
- Xe([
8948
- p({ type: Number })
8949
- ], be.prototype, "compactLevel", 2);
8950
- be = Xe([
8951
- F("ap-asset-row")
8952
- ], be);
8953
- var Ja = Object.defineProperty, er = Object.getOwnPropertyDescriptor, Ie = (t, e, s, i) => {
8954
- for (var a = i > 1 ? void 0 : i ? er(e, s) : e, r = t.length - 1, o; r >= 0; r--)
8938
+ We([
8939
+ h({ type: Object })
8940
+ ], _e.prototype, "asset", 2);
8941
+ We([
8942
+ h({ type: Number })
8943
+ ], _e.prototype, "index", 2);
8944
+ We([
8945
+ h({ type: Boolean, reflect: !0 })
8946
+ ], _e.prototype, "selected", 2);
8947
+ We([
8948
+ h({ type: Boolean })
8949
+ ], _e.prototype, "multiSelect", 2);
8950
+ We([
8951
+ h({ type: Number })
8952
+ ], _e.prototype, "compactLevel", 2);
8953
+ _e = We([
8954
+ C("ap-asset-row")
8955
+ ], _e);
8956
+ var er = Object.defineProperty, tr = Object.getOwnPropertyDescriptor, De = (t, e, s, i) => {
8957
+ for (var a = i > 1 ? void 0 : i ? tr(e, s) : e, r = t.length - 1, o; r >= 0; r--)
8955
8958
  (o = t[r]) && (a = (i ? o(e, s, a) : o(a)) || a);
8956
- return i && a && Ja(e, s, a), a;
8959
+ return i && a && er(e, s, a), a;
8957
8960
  };
8958
- let he = class extends S {
8961
+ let ue = class extends S {
8959
8962
  constructor() {
8960
8963
  super(...arguments), this.previews = [], this.selected = !1, this.selectable = !1, this.multiSelect = !0, this.index = 0;
8961
8964
  }
@@ -9057,7 +9060,7 @@ let he = class extends S {
9057
9060
  `;
9058
9061
  }
9059
9062
  };
9060
- he.styles = [re, k`
9063
+ ue.styles = [re, $`
9061
9064
  :host {
9062
9065
  display: block;
9063
9066
  }
@@ -9236,31 +9239,31 @@ he.styles = [re, k`
9236
9239
  display: block;
9237
9240
  }
9238
9241
  `];
9239
- Ie([
9240
- p({ type: Object })
9241
- ], he.prototype, "folder", 2);
9242
- Ie([
9243
- p({ type: Array })
9244
- ], he.prototype, "previews", 2);
9245
- Ie([
9246
- p({ type: Boolean, reflect: !0 })
9247
- ], he.prototype, "selected", 2);
9248
- Ie([
9249
- p({ type: Boolean })
9250
- ], he.prototype, "selectable", 2);
9251
- Ie([
9252
- p({ type: Boolean })
9253
- ], he.prototype, "multiSelect", 2);
9254
- Ie([
9255
- p({ type: Number })
9256
- ], he.prototype, "index", 2);
9257
- he = Ie([
9258
- F("ap-folder-card")
9259
- ], he);
9260
- var tr = Object.defineProperty, sr = Object.getOwnPropertyDescriptor, ye = (t, e, s, i) => {
9261
- for (var a = i > 1 ? void 0 : i ? sr(e, s) : e, r = t.length - 1, o; r >= 0; r--)
9242
+ De([
9243
+ h({ type: Object })
9244
+ ], ue.prototype, "folder", 2);
9245
+ De([
9246
+ h({ type: Array })
9247
+ ], ue.prototype, "previews", 2);
9248
+ De([
9249
+ h({ type: Boolean, reflect: !0 })
9250
+ ], ue.prototype, "selected", 2);
9251
+ De([
9252
+ h({ type: Boolean })
9253
+ ], ue.prototype, "selectable", 2);
9254
+ De([
9255
+ h({ type: Boolean })
9256
+ ], ue.prototype, "multiSelect", 2);
9257
+ De([
9258
+ h({ type: Number })
9259
+ ], ue.prototype, "index", 2);
9260
+ ue = De([
9261
+ C("ap-folder-card")
9262
+ ], ue);
9263
+ var sr = Object.defineProperty, ir = Object.getOwnPropertyDescriptor, xe = (t, e, s, i) => {
9264
+ for (var a = i > 1 ? void 0 : i ? ir(e, s) : e, r = t.length - 1, o; r >= 0; r--)
9262
9265
  (o = t[r]) && (a = (i ? o(e, s, a) : o(a)) || a);
9263
- return i && a && tr(e, s, a), a;
9266
+ return i && a && sr(e, s, a), a;
9264
9267
  };
9265
9268
  let ie = class extends S {
9266
9269
  constructor() {
@@ -9346,7 +9349,7 @@ let ie = class extends S {
9346
9349
  ` : n``;
9347
9350
  }
9348
9351
  };
9349
- ie.styles = k`
9352
+ ie.styles = $`
9350
9353
  :host {
9351
9354
  display: block;
9352
9355
  }
@@ -9466,36 +9469,36 @@ ie.styles = k`
9466
9469
  display: block;
9467
9470
  }
9468
9471
  `;
9469
- ye([
9470
- p({ type: Object })
9472
+ xe([
9473
+ h({ type: Object })
9471
9474
  ], ie.prototype, "folder", 2);
9472
- ye([
9473
- p({ type: Array })
9475
+ xe([
9476
+ h({ type: Array })
9474
9477
  ], ie.prototype, "previews", 2);
9475
- ye([
9476
- p({ type: Boolean, reflect: !0 })
9478
+ xe([
9479
+ h({ type: Boolean, reflect: !0 })
9477
9480
  ], ie.prototype, "selected", 2);
9478
- ye([
9479
- p({ type: Boolean })
9481
+ xe([
9482
+ h({ type: Boolean })
9480
9483
  ], ie.prototype, "selectable", 2);
9481
- ye([
9482
- p({ type: Boolean })
9484
+ xe([
9485
+ h({ type: Boolean })
9483
9486
  ], ie.prototype, "multiSelect", 2);
9484
- ye([
9485
- p({ type: Number })
9487
+ xe([
9488
+ h({ type: Number })
9486
9489
  ], ie.prototype, "index", 2);
9487
- ye([
9488
- p({ type: Number })
9490
+ xe([
9491
+ h({ type: Number })
9489
9492
  ], ie.prototype, "compactLevel", 2);
9490
- ie = ye([
9491
- F("ap-folder-row")
9493
+ ie = xe([
9494
+ C("ap-folder-row")
9492
9495
  ], ie);
9493
- var ir = Object.defineProperty, ar = Object.getOwnPropertyDescriptor, ct = (t, e, s, i) => {
9494
- for (var a = i > 1 ? void 0 : i ? ar(e, s) : e, r = t.length - 1, o; r >= 0; r--)
9496
+ var ar = Object.defineProperty, rr = Object.getOwnPropertyDescriptor, ct = (t, e, s, i) => {
9497
+ for (var a = i > 1 ? void 0 : i ? rr(e, s) : e, r = t.length - 1, o; r >= 0; r--)
9495
9498
  (o = t[r]) && (a = (i ? o(e, s, a) : o(a)) || a);
9496
- return i && a && ir(e, s, a), a;
9499
+ return i && a && ar(e, s, a), a;
9497
9500
  };
9498
- let Me = class extends S {
9501
+ let Oe = class extends S {
9499
9502
  constructor() {
9500
9503
  super(...arguments), this.variant = "grid", this.gridSize = "normal", this.multiSelect = !0, this.folderCount = 0;
9501
9504
  }
@@ -9556,7 +9559,7 @@ let Me = class extends S {
9556
9559
  `;
9557
9560
  }
9558
9561
  };
9559
- Me.styles = k`
9562
+ Oe.styles = $`
9560
9563
  :host {
9561
9564
  display: block;
9562
9565
  padding: 0 20px 16px;
@@ -9683,33 +9686,33 @@ Me.styles = k`
9683
9686
  }
9684
9687
  `;
9685
9688
  ct([
9686
- p({ reflect: !0 })
9687
- ], Me.prototype, "variant", 2);
9689
+ h({ reflect: !0 })
9690
+ ], Oe.prototype, "variant", 2);
9688
9691
  ct([
9689
- p({ type: String })
9690
- ], Me.prototype, "gridSize", 2);
9692
+ h({ type: String })
9693
+ ], Oe.prototype, "gridSize", 2);
9691
9694
  ct([
9692
- p({ type: Boolean })
9693
- ], Me.prototype, "multiSelect", 2);
9695
+ h({ type: Boolean })
9696
+ ], Oe.prototype, "multiSelect", 2);
9694
9697
  ct([
9695
- p({ type: Number })
9696
- ], Me.prototype, "folderCount", 2);
9697
- Me = ct([
9698
- F("ap-skeleton")
9699
- ], Me);
9700
- function rr(t) {
9698
+ h({ type: Number })
9699
+ ], Oe.prototype, "folderCount", 2);
9700
+ Oe = ct([
9701
+ C("ap-skeleton")
9702
+ ], Oe);
9703
+ function or(t) {
9701
9704
  var a, r;
9702
9705
  const e = (a = t.info) == null ? void 0 : a.playlists;
9703
9706
  if (!(e != null && e.length)) return null;
9704
9707
  const s = (r = e[0]) == null ? void 0 : r.playlists;
9705
9708
  return s != null && s.length && s[0] || null;
9706
9709
  }
9707
- var or = Object.defineProperty, nr = Object.getOwnPropertyDescriptor, j = (t, e, s, i) => {
9708
- for (var a = i > 1 ? void 0 : i ? nr(e, s) : e, r = t.length - 1, o; r >= 0; r--)
9710
+ var nr = Object.defineProperty, lr = Object.getOwnPropertyDescriptor, N = (t, e, s, i) => {
9711
+ for (var a = i > 1 ? void 0 : i ? lr(e, s) : e, r = t.length - 1, o; r >= 0; r--)
9709
9712
  (o = t[r]) && (a = (i ? o(e, s, a) : o(a)) || a);
9710
- return i && a && or(e, s, a), a;
9713
+ return i && a && nr(e, s, a), a;
9711
9714
  };
9712
- let N = class extends S {
9715
+ let j = class extends S {
9713
9716
  constructor() {
9714
9717
  super(...arguments), this.asset = null, this.assets = [], this.selectedIds = [], this.containerToken = "", this.showMetadata = !0, this.metadataFields = [], this.labels = [], this.regionalFilters = {}, this.multiSelect = !0, this._isFullscreen = !1, this._fsImageLoaded = !1, this._previewLoading = !1, this._openSections = /* @__PURE__ */ new Set(["file-info", "metadata"]), this._hls = null;
9715
9718
  }
@@ -9731,13 +9734,13 @@ let N = class extends S {
9731
9734
  }
9732
9735
  updated(t) {
9733
9736
  if (super.updated(t), t.has("asset") && (this._destroyHls(), this._previewLoading = !0, this.asset)) {
9734
- const e = Ne(this.asset.type);
9737
+ const e = je(this.asset.type);
9735
9738
  e === "video" && this._setupHls(this.asset), e !== "image" && e !== "video" && (this._previewLoading = !1);
9736
9739
  }
9737
9740
  }
9738
9741
  async _setupHls(t) {
9739
9742
  var i, a;
9740
- const e = rr(t);
9743
+ const e = or(t);
9741
9744
  if (!e || (await this.updateComplete, ((i = this.asset) == null ? void 0 : i.uuid) !== t.uuid)) return;
9742
9745
  const s = this._videoEl;
9743
9746
  if (s) {
@@ -9750,8 +9753,8 @@ let N = class extends S {
9750
9753
  if (!r.isSupported() || ((a = this.asset) == null ? void 0 : a.uuid) !== t.uuid || !this.isConnected) return;
9751
9754
  const o = new r();
9752
9755
  this._hls = o, o.loadSource(e), o.attachMedia(s), o.on(r.Events.ERROR, (l, c) => {
9753
- var h;
9754
- c.fatal && (this._destroyHls(), s.src = ((h = t.url) == null ? void 0 : h.cdn) || "");
9756
+ var p;
9757
+ c.fatal && (this._destroyHls(), s.src = ((p = t.url) == null ? void 0 : p.cdn) || "");
9755
9758
  });
9756
9759
  } catch {
9757
9760
  }
@@ -9804,7 +9807,7 @@ let N = class extends S {
9804
9807
  }
9805
9808
  /** Check if an asset supports inline fullscreen preview (not PDF/other). */
9806
9809
  _supportsFullscreen(t) {
9807
- const e = Ne(t.type);
9810
+ const e = je(t.type);
9808
9811
  return e === "image" || e === "video" || e === "audio";
9809
9812
  }
9810
9813
  /**
@@ -9873,14 +9876,14 @@ let N = class extends S {
9873
9876
  }
9874
9877
  _applyTagFilter(t) {
9875
9878
  this.dispatchEvent(new CustomEvent("filter-update", {
9876
- detail: { key: b.TAGS, values: [t], operator: $.IS },
9879
+ detail: { key: b.TAGS, values: [t], operator: w.IS },
9877
9880
  bubbles: !0,
9878
9881
  composed: !0
9879
9882
  }));
9880
9883
  }
9881
9884
  _applyLabelFilter(t) {
9882
9885
  this.dispatchEvent(new CustomEvent("filter-update", {
9883
- detail: { key: b.LABELS, values: [t], operator: $.IS },
9886
+ detail: { key: b.LABELS, values: [t], operator: w.IS },
9884
9887
  bubbles: !0,
9885
9888
  composed: !0
9886
9889
  }));
@@ -9947,7 +9950,7 @@ let N = class extends S {
9947
9950
  _getFileInfoRows(t) {
9948
9951
  var s, i, a, r, o, l;
9949
9952
  const e = [];
9950
- return e.push({ label: "File name", value: t.name }), t.extension && e.push({ label: "Type", value: t.extension.toUpperCase() }), (s = t.size) != null && s.bytes && e.push({ label: "Size", value: Xt(t.size.bytes) }), (i = t.info) != null && i.img_w && e.push({ label: "Dimensions", value: Ms(t.info.img_w, t.info.img_h) }), (a = t.info) != null && a.video_w && e.push({ label: "Video resolution", value: `${t.info.video_w} x ${t.info.video_h}` }), (((r = t.info) == null ? void 0 : r.video_duration) ?? ((o = t.info) == null ? void 0 : o.duration)) != null && e.push({ label: "Duration", value: `${Math.round(t.info.video_duration ?? t.info.duration)}s` }), (l = t.info) != null && l.color_space && e.push({ label: "Color space", value: t.info.color_space }), t.created_at && e.push({ label: "Created", value: _t(t.created_at) }), t.modified_at && e.push({ label: "Modified", value: _t(t.modified_at) }), e;
9953
+ return e.push({ label: "File name", value: t.name }), t.extension && e.push({ label: "Type", value: t.extension.toUpperCase() }), (s = t.size) != null && s.bytes && e.push({ label: "Size", value: Wt(t.size.bytes) }), (i = t.info) != null && i.img_w && e.push({ label: "Dimensions", value: Ms(t.info.img_w, t.info.img_h) }), (a = t.info) != null && a.video_w && e.push({ label: "Video resolution", value: `${t.info.video_w} x ${t.info.video_h}` }), (((r = t.info) == null ? void 0 : r.video_duration) ?? ((o = t.info) == null ? void 0 : o.duration)) != null && e.push({ label: "Duration", value: `${Math.round(t.info.video_duration ?? t.info.duration)}s` }), (l = t.info) != null && l.color_space && e.push({ label: "Color space", value: t.info.color_space }), t.created_at && e.push({ label: "Created", value: _t(t.created_at) }), t.modified_at && e.push({ label: "Modified", value: _t(t.modified_at) }), e;
9951
9954
  }
9952
9955
  /**
9953
9956
  * Build a lookup map from metadata field key → field definition.
@@ -9998,9 +10001,9 @@ let N = class extends S {
9998
10001
  var r, o, l, c;
9999
10002
  const e = [], s = this._buildFieldMap(), i = /* @__PURE__ */ new Set();
10000
10003
  if (this.metadataFields.length > 0) {
10001
- const h = t;
10004
+ const p = t;
10002
10005
  for (const u of this.metadataFields) {
10003
- const v = h[u.key] ?? ((o = (r = t.info) == null ? void 0 : r.metadata) == null ? void 0 : o[u.key]) ?? ((l = t.meta) == null ? void 0 : l[u.key]), d = this._resolveFieldValue(v, u);
10006
+ const v = p[u.key] ?? ((o = (r = t.info) == null ? void 0 : r.metadata) == null ? void 0 : o[u.key]) ?? ((l = t.meta) == null ? void 0 : l[u.key]), d = this._resolveFieldValue(v, u);
10004
10007
  if (!d) continue;
10005
10008
  i.add(u.key), u.slug && i.add(u.slug);
10006
10009
  const g = d.length > 50;
@@ -10008,39 +10011,39 @@ let N = class extends S {
10008
10011
  }
10009
10012
  }
10010
10013
  if (t.meta)
10011
- for (const [h, u] of Object.entries(t.meta)) {
10012
- if (i.has(h) || u == null || u === "") continue;
10013
- const v = s.get(h);
10014
+ for (const [p, u] of Object.entries(t.meta)) {
10015
+ if (i.has(p) || u == null || u === "") continue;
10016
+ const v = s.get(p);
10014
10017
  if (v) {
10015
10018
  const d = this._resolveFieldValue(u, v);
10016
10019
  if (!d) continue;
10017
- i.add(h);
10020
+ i.add(p);
10018
10021
  const g = d.length > 50;
10019
10022
  e.push({ label: v.label, value: d, wrap: g });
10020
10023
  } else {
10021
10024
  const d = typeof u == "object" ? JSON.stringify(u) : String(u);
10022
10025
  if (!d || d === "{}" || d === "[]") continue;
10023
- i.add(h);
10024
- const g = h.charAt(0).toUpperCase() + h.slice(1).replace(/_/g, " "), m = d.length > 50;
10026
+ i.add(p);
10027
+ const g = p.charAt(0).toUpperCase() + p.slice(1).replace(/_/g, " "), m = d.length > 50;
10025
10028
  e.push({ label: g, value: d, wrap: m });
10026
10029
  }
10027
10030
  }
10028
10031
  const a = (c = t.info) == null ? void 0 : c.metadata;
10029
10032
  if (a && typeof a == "object")
10030
- for (const [h, u] of Object.entries(a)) {
10031
- if (i.has(h) || u == null || u === "") continue;
10032
- const v = s.get(h);
10033
+ for (const [p, u] of Object.entries(a)) {
10034
+ if (i.has(p) || u == null || u === "") continue;
10035
+ const v = s.get(p);
10033
10036
  if (v) {
10034
10037
  const d = this._resolveFieldValue(u, v);
10035
10038
  if (!d) continue;
10036
- i.add(h);
10039
+ i.add(p);
10037
10040
  const g = d.length > 50;
10038
10041
  e.push({ label: v.label, value: d, wrap: g });
10039
10042
  } else {
10040
10043
  const d = typeof u == "object" ? JSON.stringify(u) : String(u);
10041
10044
  if (!d || d === "{}" || d === "[]") continue;
10042
- i.add(h);
10043
- const g = h.charAt(0).toUpperCase() + h.slice(1).replace(/_/g, " "), m = d.length > 50;
10045
+ i.add(p);
10046
+ const g = p.charAt(0).toUpperCase() + p.slice(1).replace(/_/g, " "), m = d.length > 50;
10044
10047
  e.push({ label: g, value: d, wrap: m });
10045
10048
  }
10046
10049
  }
@@ -10081,10 +10084,10 @@ let N = class extends S {
10081
10084
  `;
10082
10085
  }
10083
10086
  render() {
10084
- var D, E, M, R, Y, X, De, dt;
10087
+ var R, T, P, M, se, ce, ee, dt;
10085
10088
  const t = this.asset;
10086
10089
  if (!t) return f;
10087
- const e = Ne(t.type), s = e === "image", i = e === "video", a = e === "audio", r = ((D = t.extension) == null ? void 0 : D.toLowerCase()) === "pdf", o = nt(t.extension || ""), l = Kt(t.extension || ""), c = ((E = t.extension) == null ? void 0 : E.toLowerCase()) === "svg", h = bt(t), u = s ? c ? ((M = t.url) == null ? void 0 : M.cdn) || "" : h || Ve(((R = t.url) == null ? void 0 : R.cdn) || "", this.containerToken) : "", v = s ? this._getFullscreenImageUrl(t) : "", d = s && !c ? this._getBlurDimensions(t) : null, g = i && ((Y = t.url) == null ? void 0 : Y.cdn) || "", m = i && (((X = t.info) == null ? void 0 : X.video_thumbnail) || ((De = t.info) == null ? void 0 : De.preview)) || "", x = r && !s ? Yt(t) : "", w = this._getCurrentIndex(), T = w > 0 && this._findNavTarget(w, -1) >= 0, C = w >= 0 && this._findNavTarget(w, 1) >= 0, O = this.assets.length > 1;
10090
+ const e = je(t.type), s = e === "image", i = e === "video", a = e === "audio", r = ((R = t.extension) == null ? void 0 : R.toLowerCase()) === "pdf", o = nt(t.extension || ""), l = Yt(t.extension || ""), c = ((T = t.extension) == null ? void 0 : T.toLowerCase()) === "svg", p = bt(t), u = s ? c ? ((P = t.url) == null ? void 0 : P.cdn) || "" : p || Ve(((M = t.url) == null ? void 0 : M.cdn) || "", this.containerToken) : "", v = s ? this._getFullscreenImageUrl(t) : "", d = s && !c ? this._getBlurDimensions(t) : null, g = i && ((se = t.url) == null ? void 0 : se.cdn) || "", m = i && (((ce = t.info) == null ? void 0 : ce.video_thumbnail) || ((ee = t.info) == null ? void 0 : ee.preview)) || "", x = r && !s ? Xt(t) : "", k = this._getCurrentIndex(), E = k > 0 && this._findNavTarget(k, -1) >= 0, A = k >= 0 && this._findNavTarget(k, 1) >= 0, I = this.assets.length > 1;
10088
10091
  return n`
10089
10092
  <div class="panel">
10090
10093
  <div class="panel-header">
@@ -10104,11 +10107,11 @@ let N = class extends S {
10104
10107
  </div>
10105
10108
 
10106
10109
  <div class="preview-area ${s && l ? "chess" : ""}">
10107
- ${O ? n`
10108
- <button class="nav-btn prev" @click=${this._prev} ?disabled=${!T} aria-label="Previous">
10110
+ ${I ? n`
10111
+ <button class="nav-btn prev" @click=${this._prev} ?disabled=${!E} aria-label="Previous">
10109
10112
  <ap-icon name="chevron-left" .size=${16}></ap-icon>
10110
10113
  </button>
10111
- <button class="nav-btn next" @click=${this._next} ?disabled=${!C} aria-label="Next">
10114
+ <button class="nav-btn next" @click=${this._next} ?disabled=${!A} aria-label="Next">
10112
10115
  <ap-icon name="chevron-right" .size=${16}></ap-icon>
10113
10116
  </button>
10114
10117
  ` : f}
@@ -10122,12 +10125,12 @@ let N = class extends S {
10122
10125
  <img
10123
10126
  src=${u}
10124
10127
  alt=${t.name}
10125
- @load=${(we) => {
10126
- we.target.classList.remove("icon-fallback"), this._previewLoading = !1;
10128
+ @load=${($e) => {
10129
+ $e.target.classList.remove("icon-fallback"), this._previewLoading = !1;
10127
10130
  }}
10128
- @error=${(we) => {
10129
- const $e = we.target;
10130
- this._previewLoading = !1, $e.src !== o && ($e.src = o, $e.classList.add("icon-fallback"));
10131
+ @error=${($e) => {
10132
+ const ke = $e.target;
10133
+ this._previewLoading = !1, ke.src !== o && (ke.src = o, ke.classList.add("icon-fallback"));
10131
10134
  }}
10132
10135
  />
10133
10136
  <div class="fs-wrapper">
@@ -10159,9 +10162,9 @@ let N = class extends S {
10159
10162
  src=${x || o}
10160
10163
  alt=${t.name}
10161
10164
  class=${x ? "" : "icon-fallback"}
10162
- @error=${(we) => {
10163
- const $e = we.target;
10164
- $e.src !== o && ($e.src = o, $e.classList.add("icon-fallback"));
10165
+ @error=${($e) => {
10166
+ const ke = $e.target;
10167
+ ke.src !== o && (ke.src = o, ke.classList.add("icon-fallback"));
10165
10168
  }}
10166
10169
  />
10167
10170
  ` : f}
@@ -10176,7 +10179,7 @@ let N = class extends S {
10176
10179
  `;
10177
10180
  }
10178
10181
  };
10179
- N.styles = k`
10182
+ j.styles = $`
10180
10183
  :host {
10181
10184
  display: block;
10182
10185
  }
@@ -10488,60 +10491,60 @@ N.styles = k`
10488
10491
  .accordion-chevron { transition: none; }
10489
10492
  }
10490
10493
  `;
10491
- j([
10492
- p({ type: Object })
10493
- ], N.prototype, "asset", 2);
10494
- j([
10495
- p({ type: Array })
10496
- ], N.prototype, "assets", 2);
10497
- j([
10498
- p({ type: Array })
10499
- ], N.prototype, "selectedIds", 2);
10500
- j([
10501
- p()
10502
- ], N.prototype, "containerToken", 2);
10503
- j([
10504
- p({ type: Boolean })
10505
- ], N.prototype, "showMetadata", 2);
10506
- j([
10507
- p({ type: Array })
10508
- ], N.prototype, "metadataFields", 2);
10509
- j([
10510
- p({ type: Array })
10511
- ], N.prototype, "labels", 2);
10512
- j([
10513
- p({ type: Object })
10514
- ], N.prototype, "regionalFilters", 2);
10515
- j([
10516
- p({ type: Boolean })
10517
- ], N.prototype, "multiSelect", 2);
10518
- j([
10519
- Oe(".preview-area")
10520
- ], N.prototype, "previewArea", 2);
10521
- j([
10522
- Oe("video")
10523
- ], N.prototype, "_videoEl", 2);
10524
- j([
10494
+ N([
10495
+ h({ type: Object })
10496
+ ], j.prototype, "asset", 2);
10497
+ N([
10498
+ h({ type: Array })
10499
+ ], j.prototype, "assets", 2);
10500
+ N([
10501
+ h({ type: Array })
10502
+ ], j.prototype, "selectedIds", 2);
10503
+ N([
10504
+ h()
10505
+ ], j.prototype, "containerToken", 2);
10506
+ N([
10507
+ h({ type: Boolean })
10508
+ ], j.prototype, "showMetadata", 2);
10509
+ N([
10510
+ h({ type: Array })
10511
+ ], j.prototype, "metadataFields", 2);
10512
+ N([
10513
+ h({ type: Array })
10514
+ ], j.prototype, "labels", 2);
10515
+ N([
10516
+ h({ type: Object })
10517
+ ], j.prototype, "regionalFilters", 2);
10518
+ N([
10519
+ h({ type: Boolean })
10520
+ ], j.prototype, "multiSelect", 2);
10521
+ N([
10522
+ Le(".preview-area")
10523
+ ], j.prototype, "previewArea", 2);
10524
+ N([
10525
+ Le("video")
10526
+ ], j.prototype, "_videoEl", 2);
10527
+ N([
10525
10528
  _()
10526
- ], N.prototype, "_isFullscreen", 2);
10527
- j([
10529
+ ], j.prototype, "_isFullscreen", 2);
10530
+ N([
10528
10531
  _()
10529
- ], N.prototype, "_fsImageLoaded", 2);
10530
- j([
10532
+ ], j.prototype, "_fsImageLoaded", 2);
10533
+ N([
10531
10534
  _()
10532
- ], N.prototype, "_previewLoading", 2);
10533
- j([
10535
+ ], j.prototype, "_previewLoading", 2);
10536
+ N([
10534
10537
  _()
10535
- ], N.prototype, "_openSections", 2);
10536
- N = j([
10537
- F("ap-preview-panel")
10538
- ], N);
10539
- var lr = Object.defineProperty, cr = Object.getOwnPropertyDescriptor, Wt = (t, e, s, i) => {
10540
- for (var a = i > 1 ? void 0 : i ? cr(e, s) : e, r = t.length - 1, o; r >= 0; r--)
10538
+ ], j.prototype, "_openSections", 2);
10539
+ j = N([
10540
+ C("ap-preview-panel")
10541
+ ], j);
10542
+ var cr = Object.defineProperty, dr = Object.getOwnPropertyDescriptor, Qt = (t, e, s, i) => {
10543
+ for (var a = i > 1 ? void 0 : i ? dr(e, s) : e, r = t.length - 1, o; r >= 0; r--)
10541
10544
  (o = t[r]) && (a = (i ? o(e, s, a) : o(a)) || a);
10542
- return i && a && lr(e, s, a), a;
10545
+ return i && a && cr(e, s, a), a;
10543
10546
  };
10544
- const dr = {
10547
+ const pr = {
10545
10548
  // ── Navigation & Actions ────────────────────────────────────────────
10546
10549
  search: [
10547
10550
  { tag: "circle", attrs: { cx: "11", cy: "11", r: "8" } },
@@ -10890,11 +10893,11 @@ let it = class extends S {
10890
10893
  super(...arguments), this.name = "", this.size = 20;
10891
10894
  }
10892
10895
  render() {
10893
- const t = dr[this.name];
10896
+ const t = pr[this.name];
10894
10897
  if (!t) return f;
10895
- const e = typeof t == "string" ? fe`<path d=${t}></path>` : t.map((s) => {
10898
+ const e = typeof t == "string" ? ve`<path d=${t}></path>` : t.map((s) => {
10896
10899
  const { tag: i, attrs: a } = s;
10897
- return i === "circle" ? fe`<circle cx=${a.cx} cy=${a.cy} r=${a.r} fill=${a.fill ?? "none"}></circle>` : i === "rect" ? fe`<rect width=${a.width} height=${a.height} x=${a.x} y=${a.y} rx=${a.rx ?? "0"} ry=${a.ry ?? "0"}></rect>` : fe`<path d=${a.d}></path>`;
10900
+ return i === "circle" ? ve`<circle cx=${a.cx} cy=${a.cy} r=${a.r} fill=${a.fill ?? "none"}></circle>` : i === "rect" ? ve`<rect width=${a.width} height=${a.height} x=${a.x} y=${a.y} rx=${a.rx ?? "0"} ry=${a.ry ?? "0"}></rect>` : ve`<path d=${a.d}></path>`;
10898
10901
  });
10899
10902
  return n`
10900
10903
  <svg
@@ -10912,7 +10915,7 @@ let it = class extends S {
10912
10915
  }
10913
10916
  };
10914
10917
  it.styles = [
10915
- k`
10918
+ $`
10916
10919
  :host {
10917
10920
  display: inline-flex;
10918
10921
  align-items: center;
@@ -10924,19 +10927,19 @@ it.styles = [
10924
10927
  }
10925
10928
  `
10926
10929
  ];
10927
- Wt([
10928
- p()
10930
+ Qt([
10931
+ h()
10929
10932
  ], it.prototype, "name", 2);
10930
- Wt([
10931
- p({ type: Number })
10933
+ Qt([
10934
+ h({ type: Number })
10932
10935
  ], it.prototype, "size", 2);
10933
- it = Wt([
10934
- F("ap-icon")
10936
+ it = Qt([
10937
+ C("ap-icon")
10935
10938
  ], it);
10936
- var pr = Object.defineProperty, hr = Object.getOwnPropertyDescriptor, xe = (t, e, s, i) => {
10937
- for (var a = i > 1 ? void 0 : i ? hr(e, s) : e, r = t.length - 1, o; r >= 0; r--)
10939
+ var hr = Object.defineProperty, ur = Object.getOwnPropertyDescriptor, we = (t, e, s, i) => {
10940
+ for (var a = i > 1 ? void 0 : i ? ur(e, s) : e, r = t.length - 1, o; r >= 0; r--)
10938
10941
  (o = t[r]) && (a = (i ? o(e, s, a) : o(a)) || a);
10939
- return i && a && pr(e, s, a), a;
10942
+ return i && a && hr(e, s, a), a;
10940
10943
  };
10941
10944
  let ae = class extends S {
10942
10945
  constructor() {
@@ -11003,7 +11006,7 @@ let ae = class extends S {
11003
11006
  `;
11004
11007
  }
11005
11008
  };
11006
- ae.styles = k`
11009
+ ae.styles = $`
11007
11010
  :host {
11008
11011
  display: block;
11009
11012
  padding: 0 8px 8px;
@@ -11091,34 +11094,34 @@ ae.styles = k`
11091
11094
  .bar { animation: none; }
11092
11095
  }
11093
11096
  `;
11094
- xe([
11095
- p({ type: Array })
11097
+ we([
11098
+ h({ type: Array })
11096
11099
  ], ae.prototype, "selectedAssets", 2);
11097
- xe([
11098
- p({ type: Array })
11100
+ we([
11101
+ h({ type: Array })
11099
11102
  ], ae.prototype, "selectedFolders", 2);
11100
- xe([
11101
- p({ type: Number })
11103
+ we([
11104
+ h({ type: Number })
11102
11105
  ], ae.prototype, "totalCount", 2);
11103
- xe([
11104
- p({ type: Number })
11106
+ we([
11107
+ h({ type: Number })
11105
11108
  ], ae.prototype, "totalFolderCount", 2);
11106
- xe([
11107
- p({ type: Boolean })
11109
+ we([
11110
+ h({ type: Boolean })
11108
11111
  ], ae.prototype, "isSelectingAll", 2);
11109
- xe([
11110
- p({ type: Boolean })
11112
+ we([
11113
+ h({ type: Boolean })
11111
11114
  ], ae.prototype, "multiSelect", 2);
11112
- xe([
11113
- p({ type: Number })
11115
+ we([
11116
+ h({ type: Number })
11114
11117
  ], ae.prototype, "maxSelections", 2);
11115
- ae = xe([
11116
- F("ap-selection-bar")
11118
+ ae = we([
11119
+ C("ap-selection-bar")
11117
11120
  ], ae);
11118
- var ur = Object.defineProperty, gr = Object.getOwnPropertyDescriptor, Qt = (t, e, s, i) => {
11119
- for (var a = i > 1 ? void 0 : i ? gr(e, s) : e, r = t.length - 1, o; r >= 0; r--)
11121
+ var gr = Object.defineProperty, fr = Object.getOwnPropertyDescriptor, Zt = (t, e, s, i) => {
11122
+ for (var a = i > 1 ? void 0 : i ? fr(e, s) : e, r = t.length - 1, o; r >= 0; r--)
11120
11123
  (o = t[r]) && (a = (i ? o(e, s, a) : o(a)) || a);
11121
- return i && a && ur(e, s, a), a;
11124
+ return i && a && gr(e, s, a), a;
11122
11125
  };
11123
11126
  let at = class extends S {
11124
11127
  constructor() {
@@ -11133,7 +11136,7 @@ let at = class extends S {
11133
11136
  `;
11134
11137
  }
11135
11138
  };
11136
- at.styles = k`
11139
+ at.styles = $`
11137
11140
  :host {
11138
11141
  display: block;
11139
11142
  position: absolute;
@@ -11151,21 +11154,21 @@ at.styles = k`
11151
11154
  border-radius: 2px;
11152
11155
  }
11153
11156
  `;
11154
- Qt([
11155
- p({ type: Boolean })
11157
+ Zt([
11158
+ h({ type: Boolean })
11156
11159
  ], at.prototype, "active", 2);
11157
- Qt([
11158
- p({ type: Object })
11160
+ Zt([
11161
+ h({ type: Object })
11159
11162
  ], at.prototype, "rect", 2);
11160
- at = Qt([
11161
- F("ap-marquee-overlay")
11163
+ at = Zt([
11164
+ C("ap-marquee-overlay")
11162
11165
  ], at);
11163
- var fr = Object.defineProperty, vr = Object.getOwnPropertyDescriptor, We = (t, e, s, i) => {
11164
- for (var a = i > 1 ? void 0 : i ? vr(e, s) : e, r = t.length - 1, o; r >= 0; r--)
11166
+ var vr = Object.defineProperty, mr = Object.getOwnPropertyDescriptor, Qe = (t, e, s, i) => {
11167
+ for (var a = i > 1 ? void 0 : i ? mr(e, s) : e, r = t.length - 1, o; r >= 0; r--)
11165
11168
  (o = t[r]) && (a = (i ? o(e, s, a) : o(a)) || a);
11166
- return i && a && fr(e, s, a), a;
11169
+ return i && a && vr(e, s, a), a;
11167
11170
  };
11168
- let _e = class extends S {
11171
+ let ye = class extends S {
11169
11172
  constructor() {
11170
11173
  super(...arguments), this.value = "", this.options = [], this.disabled = !1, this.direction = "vertical", this._onKeydown = (t) => {
11171
11174
  const e = this.options.filter(
@@ -11228,9 +11231,9 @@ let _e = class extends S {
11228
11231
  }));
11229
11232
  }
11230
11233
  };
11231
- _e.styles = [
11234
+ ye.styles = [
11232
11235
  re,
11233
- k`
11236
+ $`
11234
11237
  :host {
11235
11238
  display: flex;
11236
11239
  flex-direction: column;
@@ -11293,28 +11296,28 @@ _e.styles = [
11293
11296
  }
11294
11297
  `
11295
11298
  ];
11296
- We([
11297
- p()
11298
- ], _e.prototype, "value", 2);
11299
- We([
11300
- p({ type: Array })
11301
- ], _e.prototype, "options", 2);
11302
- We([
11303
- p({ type: Boolean })
11304
- ], _e.prototype, "disabled", 2);
11305
- We([
11306
- p({ reflect: !0 })
11307
- ], _e.prototype, "direction", 2);
11308
- We([
11309
- p({ reflect: !0 })
11310
- ], _e.prototype, "columns", 2);
11311
- _e = We([
11312
- F("ap-radio-group")
11313
- ], _e);
11314
- var mr = Object.defineProperty, br = Object.getOwnPropertyDescriptor, Os = (t, e, s, i) => {
11315
- for (var a = i > 1 ? void 0 : i ? br(e, s) : e, r = t.length - 1, o; r >= 0; r--)
11299
+ Qe([
11300
+ h()
11301
+ ], ye.prototype, "value", 2);
11302
+ Qe([
11303
+ h({ type: Array })
11304
+ ], ye.prototype, "options", 2);
11305
+ Qe([
11306
+ h({ type: Boolean })
11307
+ ], ye.prototype, "disabled", 2);
11308
+ Qe([
11309
+ h({ reflect: !0 })
11310
+ ], ye.prototype, "direction", 2);
11311
+ Qe([
11312
+ h({ reflect: !0 })
11313
+ ], ye.prototype, "columns", 2);
11314
+ ye = Qe([
11315
+ C("ap-radio-group")
11316
+ ], ye);
11317
+ var br = Object.defineProperty, _r = Object.getOwnPropertyDescriptor, Os = (t, e, s, i) => {
11318
+ for (var a = i > 1 ? void 0 : i ? _r(e, s) : e, r = t.length - 1, o; r >= 0; r--)
11316
11319
  (o = t[r]) && (a = (i ? o(e, s, a) : o(a)) || a);
11317
- return i && a && mr(e, s, a), a;
11320
+ return i && a && br(e, s, a), a;
11318
11321
  };
11319
11322
  let yt = class extends S {
11320
11323
  constructor() {
@@ -11325,7 +11328,7 @@ let yt = class extends S {
11325
11328
  }
11326
11329
  };
11327
11330
  yt.styles = [
11328
- k`
11331
+ $`
11329
11332
  :host {
11330
11333
  display: inline-flex;
11331
11334
  }
@@ -11341,15 +11344,15 @@ yt.styles = [
11341
11344
  `
11342
11345
  ];
11343
11346
  Os([
11344
- p({ type: Number })
11347
+ h({ type: Number })
11345
11348
  ], yt.prototype, "size", 2);
11346
11349
  yt = Os([
11347
- F("ap-spinner")
11350
+ C("ap-spinner")
11348
11351
  ], yt);
11349
- var _r = Object.defineProperty, yr = Object.getOwnPropertyDescriptor, Et = (t, e, s, i) => {
11350
- for (var a = i > 1 ? void 0 : i ? yr(e, s) : e, r = t.length - 1, o; r >= 0; r--)
11352
+ var yr = Object.defineProperty, xr = Object.getOwnPropertyDescriptor, Et = (t, e, s, i) => {
11353
+ for (var a = i > 1 ? void 0 : i ? xr(e, s) : e, r = t.length - 1, o; r >= 0; r--)
11351
11354
  (o = t[r]) && (a = (i ? o(e, s, a) : o(a)) || a);
11352
- return i && a && _r(e, s, a), a;
11355
+ return i && a && yr(e, s, a), a;
11353
11356
  };
11354
11357
  let qe = class extends S {
11355
11358
  constructor() {
@@ -11403,7 +11406,7 @@ let qe = class extends S {
11403
11406
  `;
11404
11407
  }
11405
11408
  };
11406
- qe.styles = [re, k`
11409
+ qe.styles = [re, $`
11407
11410
  :host {
11408
11411
  display: block;
11409
11412
  }
@@ -11478,21 +11481,21 @@ qe.styles = [re, k`
11478
11481
  }
11479
11482
  `];
11480
11483
  Et([
11481
- p({ type: Array })
11484
+ h({ type: Array })
11482
11485
  ], qe.prototype, "folders", 2);
11483
11486
  Et([
11484
- p({ type: Boolean })
11487
+ h({ type: Boolean })
11485
11488
  ], qe.prototype, "loading", 2);
11486
11489
  Et([
11487
11490
  _()
11488
11491
  ], qe.prototype, "_mode", 2);
11489
11492
  qe = Et([
11490
- F("ap-folder-resolve-dialog")
11493
+ C("ap-folder-resolve-dialog")
11491
11494
  ], qe);
11492
- var xr = Object.defineProperty, wr = Object.getOwnPropertyDescriptor, At = (t, e, s, i) => {
11493
- for (var a = i > 1 ? void 0 : i ? wr(e, s) : e, r = t.length - 1, o; r >= 0; r--)
11495
+ var wr = Object.defineProperty, $r = Object.getOwnPropertyDescriptor, At = (t, e, s, i) => {
11496
+ for (var a = i > 1 ? void 0 : i ? $r(e, s) : e, r = t.length - 1, o; r >= 0; r--)
11494
11497
  (o = t[r]) && (a = (i ? o(e, s, a) : o(a)) || a);
11495
- return i && a && xr(e, s, a), a;
11498
+ return i && a && wr(e, s, a), a;
11496
11499
  };
11497
11500
  let He = class extends S {
11498
11501
  constructor() {
@@ -11529,7 +11532,7 @@ let He = class extends S {
11529
11532
  }
11530
11533
  };
11531
11534
  He.styles = [
11532
- k`
11535
+ $`
11533
11536
  :host {
11534
11537
  display: inline-flex;
11535
11538
  align-items: center;
@@ -11591,21 +11594,21 @@ He.styles = [
11591
11594
  `
11592
11595
  ];
11593
11596
  At([
11594
- p({ type: Boolean, reflect: !0 })
11597
+ h({ type: Boolean, reflect: !0 })
11595
11598
  ], He.prototype, "checked", 2);
11596
11599
  At([
11597
- p({ type: Boolean, reflect: !0 })
11600
+ h({ type: Boolean, reflect: !0 })
11598
11601
  ], He.prototype, "indeterminate", 2);
11599
11602
  At([
11600
- p({ type: Boolean, reflect: !0 })
11603
+ h({ type: Boolean, reflect: !0 })
11601
11604
  ], He.prototype, "disabled", 2);
11602
11605
  He = At([
11603
- F("ap-checkbox")
11606
+ C("ap-checkbox")
11604
11607
  ], He);
11605
- var $r = Object.defineProperty, kr = Object.getOwnPropertyDescriptor, Ls = (t, e, s, i) => {
11606
- for (var a = i > 1 ? void 0 : i ? kr(e, s) : e, r = t.length - 1, o; r >= 0; r--)
11608
+ var kr = Object.defineProperty, Sr = Object.getOwnPropertyDescriptor, Ls = (t, e, s, i) => {
11609
+ for (var a = i > 1 ? void 0 : i ? Sr(e, s) : e, r = t.length - 1, o; r >= 0; r--)
11607
11610
  (o = t[r]) && (a = (i ? o(e, s, a) : o(a)) || a);
11608
- return i && a && $r(e, s, a), a;
11611
+ return i && a && kr(e, s, a), a;
11609
11612
  };
11610
11613
  let xt = class extends S {
11611
11614
  constructor() {
@@ -11629,7 +11632,7 @@ let xt = class extends S {
11629
11632
  }
11630
11633
  };
11631
11634
  xt.styles = [
11632
- k`
11635
+ $`
11633
11636
  :host {
11634
11637
  position: relative;
11635
11638
  display: inline-block;
@@ -11656,12 +11659,12 @@ Ls([
11656
11659
  _()
11657
11660
  ], xt.prototype, "open", 2);
11658
11661
  xt = Ls([
11659
- F("ap-popover")
11662
+ C("ap-popover")
11660
11663
  ], xt);
11661
- var Sr = Object.defineProperty, Cr = Object.getOwnPropertyDescriptor, K = (t, e, s, i) => {
11662
- for (var a = i > 1 ? void 0 : i ? Cr(e, s) : e, r = t.length - 1, o; r >= 0; r--)
11664
+ var Cr = Object.defineProperty, Fr = Object.getOwnPropertyDescriptor, K = (t, e, s, i) => {
11665
+ for (var a = i > 1 ? void 0 : i ? Fr(e, s) : e, r = t.length - 1, o; r >= 0; r--)
11663
11666
  (o = t[r]) && (a = (i ? o(e, s, a) : o(a)) || a);
11664
- return i && a && Sr(e, s, a), a;
11667
+ return i && a && Cr(e, s, a), a;
11665
11668
  };
11666
11669
  let U = class extends S {
11667
11670
  constructor() {
@@ -11772,7 +11775,7 @@ let U = class extends S {
11772
11775
  };
11773
11776
  U.styles = [
11774
11777
  re,
11775
- k`
11778
+ $`
11776
11779
  :host {
11777
11780
  position: relative;
11778
11781
  display: inline-block;
@@ -11855,16 +11858,16 @@ U.styles = [
11855
11858
  `
11856
11859
  ];
11857
11860
  K([
11858
- p()
11861
+ h()
11859
11862
  ], U.prototype, "value", 2);
11860
11863
  K([
11861
- p()
11864
+ h()
11862
11865
  ], U.prototype, "label", 2);
11863
11866
  K([
11864
- p({ reflect: !0 })
11867
+ h({ reflect: !0 })
11865
11868
  ], U.prototype, "variant", 2);
11866
11869
  K([
11867
- p({ type: Array })
11870
+ h({ type: Array })
11868
11871
  ], U.prototype, "options", 2);
11869
11872
  K([
11870
11873
  _()
@@ -11891,12 +11894,12 @@ K([
11891
11894
  _()
11892
11895
  ], U.prototype, "_menuRight", 2);
11893
11896
  U = K([
11894
- F("ap-dropdown")
11897
+ C("ap-dropdown")
11895
11898
  ], U);
11896
- var Fr = Object.defineProperty, Er = Object.getOwnPropertyDescriptor, Ps = (t, e, s, i) => {
11897
- for (var a = i > 1 ? void 0 : i ? Er(e, s) : e, r = t.length - 1, o; r >= 0; r--)
11899
+ var Er = Object.defineProperty, Ar = Object.getOwnPropertyDescriptor, Is = (t, e, s, i) => {
11900
+ for (var a = i > 1 ? void 0 : i ? Ar(e, s) : e, r = t.length - 1, o; r >= 0; r--)
11898
11901
  (o = t[r]) && (a = (i ? o(e, s, a) : o(a)) || a);
11899
- return i && a && Fr(e, s, a), a;
11902
+ return i && a && Er(e, s, a), a;
11900
11903
  };
11901
11904
  let wt = class extends S {
11902
11905
  constructor() {
@@ -11907,7 +11910,7 @@ let wt = class extends S {
11907
11910
  }
11908
11911
  };
11909
11912
  wt.styles = [
11910
- k`
11913
+ $`
11911
11914
  :host {
11912
11915
  display: inline-flex;
11913
11916
  }
@@ -11928,16 +11931,16 @@ wt.styles = [
11928
11931
  }
11929
11932
  `
11930
11933
  ];
11931
- Ps([
11932
- p({ reflect: !0 })
11934
+ Is([
11935
+ h({ reflect: !0 })
11933
11936
  ], wt.prototype, "variant", 2);
11934
- wt = Ps([
11935
- F("ap-badge")
11937
+ wt = Is([
11938
+ C("ap-badge")
11936
11939
  ], wt);
11937
- var Ar = Object.defineProperty, Tr = Object.getOwnPropertyDescriptor, Is = (t, e, s, i) => {
11938
- for (var a = i > 1 ? void 0 : i ? Tr(e, s) : e, r = t.length - 1, o; r >= 0; r--)
11940
+ var Tr = Object.defineProperty, Mr = Object.getOwnPropertyDescriptor, Ps = (t, e, s, i) => {
11941
+ for (var a = i > 1 ? void 0 : i ? Mr(e, s) : e, r = t.length - 1, o; r >= 0; r--)
11939
11942
  (o = t[r]) && (a = (i ? o(e, s, a) : o(a)) || a);
11940
- return i && a && Ar(e, s, a), a;
11943
+ return i && a && Tr(e, s, a), a;
11941
11944
  };
11942
11945
  let $t = class extends S {
11943
11946
  constructor() {
@@ -11951,7 +11954,7 @@ let $t = class extends S {
11951
11954
  }
11952
11955
  };
11953
11956
  $t.styles = [
11954
- k`
11957
+ $`
11955
11958
  :host {
11956
11959
  position: relative;
11957
11960
  display: inline-flex;
@@ -11976,20 +11979,20 @@ $t.styles = [
11976
11979
  }
11977
11980
  `
11978
11981
  ];
11979
- Is([
11980
- p()
11982
+ Ps([
11983
+ h()
11981
11984
  ], $t.prototype, "text", 2);
11982
- $t = Is([
11983
- F("ap-tooltip")
11985
+ $t = Ps([
11986
+ C("ap-tooltip")
11984
11987
  ], $t);
11985
- var Mr = Object.defineProperty, Tt = (t, e, s, i) => {
11988
+ var Or = Object.defineProperty, Tt = (t, e, s, i) => {
11986
11989
  for (var a = void 0, r = t.length - 1, o; r >= 0; r--)
11987
11990
  (o = t[r]) && (a = o(e, s, a) || a);
11988
- return a && Mr(e, s, a), a;
11991
+ return a && Or(e, s, a), a;
11989
11992
  };
11990
- const Zt = class Zt extends S {
11993
+ const Jt = class Jt extends S {
11991
11994
  constructor() {
11992
- super(), this._initFailed = !1, this._loadId = 0, this._loadMoreId = 0, this._loadDataTimer = null, this._pendingFilter = null, this._pendingMetadataField = null, this._uploaderEl = null, this._uploaderImportPromise = null, this._dragCounter = 0, this._isDragOver = !1, this._isUploaderOpen = !1, this._folderResolveOpen = !1, this._onDragEnter = (e) => {
11995
+ super(), this._initFailed = !1, this._loadId = 0, this._loadMoreId = 0, this._selectAllId = 0, this._loadDataTimer = null, this._pendingFilter = null, this._pendingMetadataField = null, this._normalizedForcedFilters = {}, this._uploaderEl = null, this._uploaderImportPromise = null, this._dragCounter = 0, this._isDragOver = !1, this._isUploaderOpen = !1, this._folderResolveOpen = !1, this._onDragEnter = (e) => {
11993
11996
  var s;
11994
11997
  !((s = this.config) != null && s.uploader) || !this._hasFileTransfer(e) || (e.preventDefault(), this._dragCounter++, this._dragCounter === 1 && (this._isDragOver = !0));
11995
11998
  }, this._onDragOver = (e) => {
@@ -12004,15 +12007,12 @@ const Zt = class Zt extends S {
12004
12007
  e.preventDefault(), this._dragCounter = 0, this._isDragOver = !1;
12005
12008
  const s = Array.from(((a = e.dataTransfer) == null ? void 0 : a.files) ?? []);
12006
12009
  s.length > 0 && this._openUploader(s);
12007
- }, this.store = zs(), this.storeCtrl = new Rs(this, this.store), this.selectionCtrl = new js(this, this.store), this.infiniteScrollCtrl = new Bs(this, () => this._loadMore()), this.marqueeCtrl = new Us(this, this.store);
12010
+ }, this.store = zs(), this.storeCtrl = new Rs(this, this.store), this.selectionCtrl = new Ns(this, this.store), this.infiniteScrollCtrl = new Bs(this, () => this._loadMore()), this.marqueeCtrl = new Us(this, this.store);
12008
12011
  }
12009
12012
  get _isInline() {
12010
12013
  var e;
12011
12014
  return ((e = this.config) == null ? void 0 : e.displayMode) === "inline";
12012
12015
  }
12013
- connectedCallback() {
12014
- super.connectedCallback();
12015
- }
12016
12016
  disconnectedCallback() {
12017
12017
  super.disconnectedCallback(), this._uploaderEl && (this._uploaderEl.remove(), this._uploaderEl = null), this._uploaderImportPromise = null, this._dragCounter = 0, this._isDragOver = !1, this._isUploaderOpen = !1;
12018
12018
  }
@@ -12029,55 +12029,48 @@ const Zt = class Zt extends S {
12029
12029
  }
12030
12030
  _initConfig(e) {
12031
12031
  const s = { folderSelection: !0, ...e };
12032
- this._initFailed = !1, this._initPromise = this._doInit(s).catch(() => {
12032
+ this._initFailed = !1, this._normalizedForcedFilters = Ut(s.forcedFilters), this._initPromise = this._doInit(s).catch(() => {
12033
12033
  this._initFailed = !0;
12034
12034
  }), this.toggleAttribute("inline", s.displayMode === "inline"), s.displayMode === "inline" && !this.store.getState().isOpen && this.open();
12035
12035
  }
12036
12036
  async _doInit(e) {
12037
- const s = Ii(), i = s.sortBy ?? e.defaultSortBy ?? "created_at", a = s.sortDirection ?? e.defaultSortDirection ?? "desc";
12037
+ const s = Pi(), i = s.sortBy ?? e.defaultSortBy ?? "created_at", a = s.sortDirection ?? e.defaultSortDirection ?? "desc";
12038
12038
  this.store.setState({
12039
12039
  config: e,
12040
12040
  projectToken: e.auth.projectToken,
12041
- viewMode: e.rememberLastView && zi() || e.defaultViewMode || "grid",
12041
+ viewMode: e.rememberLastView && Ri(e.auth.projectToken) || e.defaultViewMode || "grid",
12042
12042
  sortBy: i,
12043
12043
  sortDirection: a
12044
12044
  }), this.apiClient = new Vs(e.auth, e.apiBase);
12045
12045
  try {
12046
12046
  if (e.auth.mode === "securityTemplate") {
12047
- const g = await Xs(this.apiClient);
12048
- this.apiClient.setSassKey(g), this.store.setState({ sassKey: g });
12047
+ const m = await Xs(this.apiClient);
12048
+ this.apiClient.setSassKey(m), this.store.setState({ sassKey: m });
12049
12049
  }
12050
12050
  const [r, o, l, c] = await Promise.allSettled([
12051
12051
  gi(this.apiClient),
12052
12052
  Ks(this.apiClient),
12053
12053
  Ys(this.apiClient),
12054
12054
  hi(this.apiClient)
12055
- ]);
12055
+ ]), p = {};
12056
12056
  if (r.status === "fulfilled") {
12057
- const { fields: g, regionalVariantGroups: m, regionalFilters: x, brandColor: w } = r.value;
12058
- this.store.setState({
12059
- metadataFields: g,
12060
- regionalVariantGroups: m,
12061
- regionalFilters: x,
12062
- ...w ? { brandColor: w } : {}
12063
- });
12064
- }
12065
- o.status === "fulfilled" && this.store.setState({ labels: o.value.labels || [] }), l.status === "fulfilled" && this.store.setState({ tags: l.value }), c.status === "fulfilled" && this.store.setState({ fileTypes: c.value });
12066
- const { pinnedFilters: h, pinnedMetadata: u } = Oi(e.auth.projectToken ?? null), v = this.store.getState().filters;
12067
- this.store.setState({
12068
- filters: {
12069
- ...v,
12070
- pinned: h,
12071
- visible: [...h],
12072
- metadata: {
12073
- ...v.metadata,
12074
- pinned: u,
12075
- visible: [...u]
12076
- }
12057
+ const { fields: m, regionalVariantGroups: x, regionalFilters: k, brandColor: E } = r.value;
12058
+ p.metadataFields = m, p.regionalVariantGroups = x, p.regionalFilters = k, E && (p.brandColor = E);
12059
+ }
12060
+ o.status === "fulfilled" && (p.labels = o.value.labels || []), l.status === "fulfilled" && (p.tags = l.value), c.status === "fulfilled" && (p.fileTypes = c.value);
12061
+ const { pinnedFilters: u, pinnedMetadata: v } = Oi(e.auth.projectToken ?? null), d = this.store.getState().filters;
12062
+ p.filters = {
12063
+ ...d,
12064
+ pinned: u,
12065
+ visible: [...u],
12066
+ metadata: {
12067
+ ...d.metadata,
12068
+ pinned: v,
12069
+ visible: [...v]
12077
12070
  }
12078
- });
12079
- const d = e.brandColor || this.store.getState().brandColor;
12080
- d && (this.store.setState({ brandColor: d }), Vi(this, d));
12071
+ }, this.store.setState(p);
12072
+ const g = e.brandColor || p.brandColor || this.store.getState().brandColor;
12073
+ g && (p.brandColor || this.store.setState({ brandColor: g }), qi(this, g));
12081
12074
  } catch (r) {
12082
12075
  throw this.dispatchEvent(new CustomEvent("ap-error", {
12083
12076
  detail: { error: r, context: "init" },
@@ -12155,7 +12148,7 @@ const Zt = class Zt extends S {
12155
12148
  }
12156
12149
  /** Close the uploader panel and return to the asset picker. */
12157
12150
  _closeUploader() {
12158
- this._isUploaderOpen = !1, this._uploaderEl = null;
12151
+ this._isUploaderOpen = !1, this._uploaderEl && (this._uploaderEl.remove(), this._uploaderEl = null);
12159
12152
  }
12160
12153
  _handleUploadClick() {
12161
12154
  this._openUploader();
@@ -12167,14 +12160,14 @@ const Zt = class Zt extends S {
12167
12160
  return !!((i = (s = e.dataTransfer) == null ? void 0 : s.types) != null && i.includes("Files"));
12168
12161
  }
12169
12162
  async open() {
12170
- var u, v, d, g, m, x, w, T, C, O;
12171
- const e = this.store.getState(), s = Je((u = this.config) == null ? void 0 : u.forcedFilters), i = new Set(Object.keys(s)), a = {}, r = Je((v = this.config) == null ? void 0 : v.defaultFilters);
12172
- for (const [D, E] of Object.entries(r))
12173
- i.has(D) || (a[D] = E);
12174
- const o = Object.keys(a), l = ((d = this.config) == null ? void 0 : d.tabs) ?? ["assets", "folders"], c = (g = this.config) != null && g.rememberLastTab ? Ni() : null, h = (c && l.includes(c) ? c : null) ?? ((m = this.config) != null && m.defaultTab && l.includes(this.config.defaultTab) ? this.config.defaultTab : null) ?? l[0] ?? "assets";
12163
+ var p, u, v, d, g;
12164
+ const e = this.store.getState(), s = new Set(Object.keys(this._normalizedForcedFilters)), i = {}, a = Ut((p = this.config) == null ? void 0 : p.defaultFilters);
12165
+ for (const [m, x] of Object.entries(a))
12166
+ s.has(m) || (i[m] = x);
12167
+ const r = Object.keys(i), o = ((u = this.config) == null ? void 0 : u.tabs) ?? ["assets", "folders"], l = (v = this.config) != null && v.rememberLastTab ? Ni(this.config.auth.projectToken) : null, c = (l && o.includes(l) ? l : null) ?? ((d = this.config) != null && d.defaultTab && o.includes(this.config.defaultTab) ? this.config.defaultTab : null) ?? o[0] ?? "assets";
12175
12168
  this.store.setState({
12176
12169
  isOpen: !0,
12177
- activeTab: h,
12170
+ activeTab: c,
12178
12171
  searchQuery: "",
12179
12172
  filters: {
12180
12173
  metadata: {
@@ -12183,17 +12176,17 @@ const Zt = class Zt extends S {
12183
12176
  applied: {}
12184
12177
  },
12185
12178
  pinned: e.filters.pinned,
12186
- visible: [.../* @__PURE__ */ new Set([...e.filters.pinned, ...o])],
12187
- applied: a
12179
+ visible: [.../* @__PURE__ */ new Set([...e.filters.pinned, ...r])],
12180
+ applied: i
12188
12181
  },
12189
12182
  offset: 0,
12190
12183
  assets: [],
12191
12184
  folders: [],
12192
12185
  currentFolder: null,
12193
- currentFolderPath: h === "folders" && ((x = this.config) == null ? void 0 : x.rememberLastFolder) && cs() || ((w = this.config) == null ? void 0 : w.rootFolderPath) || "/",
12186
+ currentFolderPath: this._resolveInitialFolderPath(c),
12194
12187
  breadcrumb: this._buildBreadcrumbFromPath(
12195
- h === "folders" && ((T = this.config) == null ? void 0 : T.rememberLastFolder) && cs() || ((C = this.config) == null ? void 0 : C.rootFolderPath) || "/",
12196
- ((O = this.config) == null ? void 0 : O.rootFolderPath) || "/"
12188
+ this._resolveInitialFolderPath(c),
12189
+ ((g = this.config) == null ? void 0 : g.rootFolderPath) || "/"
12197
12190
  ),
12198
12191
  selectedAssets: /* @__PURE__ */ new Map(),
12199
12192
  selectedFolders: /* @__PURE__ */ new Map(),
@@ -12210,48 +12203,48 @@ const Zt = class Zt extends S {
12210
12203
  })), await this.updateComplete, !this._initPromise && this.config && this._initConfig(this.config), !(this._initPromise && (await this._initPromise, this._initFailed)) && this._loadData();
12211
12204
  }
12212
12205
  close() {
12213
- this.store.setState({ isOpen: !1 }), this._dragCounter = 0, this._isDragOver = !1, this._isUploaderOpen = !1, this._folderResolveOpen = !1;
12206
+ this.store.setState({ isOpen: !1 }), this._dragCounter = 0, this._isDragOver = !1, this._isUploaderOpen = !1, this._folderResolveOpen = !1, this._selectAllId++;
12214
12207
  }
12215
12208
  _scrollToTop() {
12216
12209
  var e;
12217
12210
  (e = this.renderRoot.querySelector(".main-content")) == null || e.scrollTo({ top: 0 });
12218
12211
  }
12219
12212
  async _loadData() {
12220
- var i, a, r, o, l, c, h, u, v, d, g, m, x, w;
12213
+ var i, a, r, o, l, c, p, u, v, d, g, m, x, k;
12221
12214
  if (!this.apiClient) return;
12222
12215
  const e = ++this._loadId, s = this.store.getState();
12223
12216
  this._scrollToTop(), this.store.setState({ isLoading: !0 });
12224
12217
  try {
12225
- const T = s.activeTab;
12226
- if (T === "assets") {
12227
- const C = this._buildSearchNotation(), O = s.currentFolderPath || "/", D = Qe(this.apiClient, {
12228
- folder: O,
12218
+ const E = s.activeTab;
12219
+ if (E === "assets") {
12220
+ const A = this._buildSearchNotation(), I = s.currentFolderPath || "/", R = Ze(this.apiClient, {
12221
+ folder: I,
12229
12222
  offset: 0,
12230
12223
  limit: s.limit,
12231
12224
  sort_by: s.sortBy,
12232
12225
  sort_direction: s.sortDirection,
12233
12226
  search: s.searchQuery || void 0,
12234
- q: C || void 0,
12227
+ q: A || void 0,
12235
12228
  recursive: 1
12236
- }), E = ts(this.apiClient, {
12237
- folder: O,
12238
- q: C || void 0,
12229
+ }), T = ss(this.apiClient, {
12230
+ folder: I,
12231
+ q: A || void 0,
12239
12232
  search: s.searchQuery || void 0,
12240
12233
  recursive: 1
12241
- }).catch(() => null), [M, R] = await Promise.all([D, E]);
12234
+ }).catch(() => null), [P, M] = await Promise.all([R, T]);
12242
12235
  if (e !== this._loadId) return;
12243
- const Y = ((i = M.files) == null ? void 0 : i.length) ?? 0, X = Y >= s.limit, De = ((a = R == null ? void 0 : R.stats) == null ? void 0 : a.approx_files_count) ?? ((r = R == null ? void 0 : R.info) == null ? void 0 : r.total_files_count) ?? ((o = M.info) == null ? void 0 : o.total_files_count) ?? ((c = (l = M.base) == null ? void 0 : l.count) == null ? void 0 : c.files_recursive) ?? ((u = (h = M.base) == null ? void 0 : h.count) == null ? void 0 : u.files_direct) ?? Y;
12236
+ const se = ((i = P.files) == null ? void 0 : i.length) ?? 0, ce = se >= s.limit, ee = ((a = M == null ? void 0 : M.stats) == null ? void 0 : a.approx_files_count) ?? ((r = M == null ? void 0 : M.info) == null ? void 0 : r.total_files_count) ?? ((o = P.info) == null ? void 0 : o.total_files_count) ?? ((c = (l = P.base) == null ? void 0 : l.count) == null ? void 0 : c.files_recursive) ?? ((u = (p = P.base) == null ? void 0 : p.count) == null ? void 0 : u.files_direct) ?? se;
12244
12237
  this.store.setState({
12245
- assets: M.files || [],
12238
+ assets: P.files || [],
12246
12239
  folders: [],
12247
- totalCount: De,
12240
+ totalCount: ee,
12248
12241
  totalFolderCount: 0,
12249
12242
  offset: 0,
12250
- hasMore: X,
12243
+ hasMore: ce,
12251
12244
  isLoading: !1
12252
12245
  });
12253
- } else if (T === "folders") {
12254
- const C = this._buildSearchNotation(), O = s.currentFolderPath || "/", [D, E, M] = await Promise.all([
12246
+ } else if (E === "folders") {
12247
+ const A = this._buildSearchNotation(), I = s.currentFolderPath || "/", [R, T, P] = await Promise.all([
12255
12248
  Hs(this.apiClient, {
12256
12249
  folderPath: s.currentFolderPath,
12257
12250
  q: s.searchQuery || void 0,
@@ -12259,48 +12252,48 @@ const Zt = class Zt extends S {
12259
12252
  sort_by: s.sortBy,
12260
12253
  sort_direction: s.sortDirection
12261
12254
  }),
12262
- Qe(this.apiClient, {
12263
- folder: O,
12255
+ Ze(this.apiClient, {
12256
+ folder: I,
12264
12257
  offset: 0,
12265
12258
  limit: s.limit,
12266
12259
  sort_by: s.sortBy,
12267
12260
  sort_direction: s.sortDirection,
12268
12261
  search: s.searchQuery || void 0,
12269
- q: C || void 0,
12262
+ q: A || void 0,
12270
12263
  recursive: 0
12271
12264
  }),
12272
- ts(this.apiClient, {
12273
- folder: O,
12274
- q: C || void 0,
12265
+ ss(this.apiClient, {
12266
+ folder: I,
12267
+ q: A || void 0,
12275
12268
  search: s.searchQuery || void 0,
12276
12269
  recursive: 0
12277
12270
  }).catch(() => null)
12278
12271
  ]);
12279
12272
  if (e !== this._loadId) return;
12280
- const R = D.folders || [];
12281
- let Y = {};
12282
- if (R.length > 0)
12273
+ const M = R.folders || [];
12274
+ let se = {};
12275
+ if (M.length > 0)
12283
12276
  try {
12284
- Y = await Gs(this.apiClient, R.map((we) => we.uuid));
12277
+ se = await Gs(this.apiClient, M.map(($e) => $e.uuid));
12285
12278
  } catch {
12286
12279
  }
12287
12280
  if (e !== this._loadId) return;
12288
- const X = ((v = E.files) == null ? void 0 : v.length) ?? 0, De = X >= s.limit, dt = ((d = M == null ? void 0 : M.stats) == null ? void 0 : d.approx_files_count) ?? ((g = M == null ? void 0 : M.info) == null ? void 0 : g.total_files_count) ?? ((m = E.info) == null ? void 0 : m.total_files_count) ?? ((w = (x = E.base) == null ? void 0 : x.count) == null ? void 0 : w.files_direct) ?? X;
12281
+ const ce = ((v = T.files) == null ? void 0 : v.length) ?? 0, ee = ce >= s.limit, dt = ((d = P == null ? void 0 : P.stats) == null ? void 0 : d.approx_files_count) ?? ((g = P == null ? void 0 : P.info) == null ? void 0 : g.total_files_count) ?? ((m = T.info) == null ? void 0 : m.total_files_count) ?? ((k = (x = T.base) == null ? void 0 : x.count) == null ? void 0 : k.files_direct) ?? ce;
12289
12282
  this.store.setState({
12290
- assets: E.files || [],
12291
- folders: R,
12292
- folderPreviews: Y,
12283
+ assets: T.files || [],
12284
+ folders: M,
12285
+ folderPreviews: se,
12293
12286
  totalCount: dt,
12294
- totalFolderCount: D.total ?? R.length,
12287
+ totalFolderCount: R.total ?? M.length,
12295
12288
  offset: 0,
12296
- hasMore: De,
12289
+ hasMore: ee,
12297
12290
  isLoading: !1
12298
12291
  });
12299
12292
  }
12300
- } catch (T) {
12293
+ } catch (E) {
12301
12294
  if (e !== this._loadId) return;
12302
12295
  this.store.setState({ isLoading: !1 }), this.dispatchEvent(new CustomEvent("ap-error", {
12303
- detail: { error: T, context: "loadData" },
12296
+ detail: { error: E, context: "loadData" },
12304
12297
  bubbles: !0,
12305
12298
  composed: !0
12306
12299
  }));
@@ -12312,7 +12305,7 @@ const Zt = class Zt extends S {
12312
12305
  const s = ++this._loadMoreId, i = e.offset + e.limit;
12313
12306
  this.store.setState({ isLoading: !0 });
12314
12307
  try {
12315
- const a = this._buildSearchNotation(), r = await Qe(this.apiClient, {
12308
+ const a = this._buildSearchNotation(), r = await Ze(this.apiClient, {
12316
12309
  folder: e.currentFolderPath || "/",
12317
12310
  offset: i,
12318
12311
  limit: e.limit,
@@ -12323,9 +12316,9 @@ const Zt = class Zt extends S {
12323
12316
  recursive: e.activeTab === "folders" ? 0 : 1
12324
12317
  });
12325
12318
  if (s !== this._loadMoreId) return;
12326
- const o = this.store.getState().assets, l = r.files || [], c = l.length >= e.limit, h = [...o, ...l];
12319
+ const o = this.store.getState().assets, l = r.files || [], c = l.length >= e.limit, p = [...o, ...l];
12327
12320
  this.store.setState({
12328
- assets: h,
12321
+ assets: p,
12329
12322
  offset: i,
12330
12323
  hasMore: c,
12331
12324
  isLoading: !1
@@ -12349,12 +12342,12 @@ const Zt = class Zt extends S {
12349
12342
  }));
12350
12343
  }
12351
12344
  _handleSearchChange(e) {
12352
- this.store.setState({ searchQuery: e.detail.value, offset: 0, assets: [], folders: [] }), this.selectionCtrl.resetRange(), this._loadData();
12345
+ this.store.setState({ searchQuery: e.detail.value, offset: 0, assets: [], folders: [], isLoading: !0 }), this.selectionCtrl.resetRange(), this._debouncedLoadData();
12353
12346
  }
12354
12347
  _handleViewChange(e) {
12355
12348
  var i;
12356
12349
  const s = e.detail.mode;
12357
- this.store.setState({ viewMode: s }), (i = this.config) != null && i.rememberLastView && Di(s), this._scrollToTop();
12350
+ this.store.setState({ viewMode: s }), (i = this.config) != null && i.rememberLastView && zi(s, this.config.auth.projectToken), this._scrollToTop();
12358
12351
  }
12359
12352
  _handleRegionalChange(e) {
12360
12353
  const { groupUuid: s, value: i } = e.detail, a = this.store.getState().regionalFilters;
@@ -12369,7 +12362,7 @@ const Zt = class Zt extends S {
12369
12362
  offset: 0,
12370
12363
  assets: [],
12371
12364
  folders: []
12372
- }), ns(s, i.sortDirection), this.selectionCtrl.resetRange(), this._loadData();
12365
+ }), ls(s, i.sortDirection), this.selectionCtrl.resetRange(), this._loadData();
12373
12366
  }
12374
12367
  _handleSortDirectionChange(e) {
12375
12368
  const s = e.detail.value, i = this.store.getState();
@@ -12378,12 +12371,12 @@ const Zt = class Zt extends S {
12378
12371
  offset: 0,
12379
12372
  assets: [],
12380
12373
  folders: []
12381
- }), ns(i.sortBy, s), this.selectionCtrl.resetRange(), this._loadData();
12374
+ }), ls(i.sortBy, s), this.selectionCtrl.resetRange(), this._loadData();
12382
12375
  }
12383
12376
  _handleTabChange(e) {
12384
12377
  var i, a;
12385
12378
  const s = e.detail.tab;
12386
- (i = this.config) != null && i.rememberLastTab && Ri(s), this.store.setState({
12379
+ (i = this.config) != null && i.rememberLastTab && ji(s, this.config.auth.projectToken), this._selectAllId++, this.store.setState({
12387
12380
  activeTab: s,
12388
12381
  currentFolder: null,
12389
12382
  currentFolderPath: ((a = this.config) == null ? void 0 : a.rootFolderPath) ?? "/",
@@ -12417,7 +12410,7 @@ const Zt = class Zt extends S {
12417
12410
  _handleFolderOpen(e) {
12418
12411
  var r;
12419
12412
  const s = e.detail.folder, i = this.store.getState(), a = s.path || `${i.currentFolderPath}${s.name}/`;
12420
- (r = this.config) != null && r.rememberLastFolder && ls(a), this.store.setState({
12413
+ (r = this.config) != null && r.rememberLastFolder && cs(a, this.config.auth.projectToken), this._selectAllId++, this.store.setState({
12421
12414
  currentFolder: s.uuid,
12422
12415
  currentFolderPath: a,
12423
12416
  breadcrumb: [...i.breadcrumb, { uuid: s.uuid, name: s.name, path: a }],
@@ -12429,8 +12422,8 @@ const Zt = class Zt extends S {
12429
12422
  }
12430
12423
  _handleBreadcrumbNavigate(e) {
12431
12424
  var l, c;
12432
- const s = e.detail.uuid, i = this.store.getState(), a = s ? i.breadcrumb.findIndex((h) => h.uuid === s) : -1, r = s ? i.breadcrumb.slice(0, a + 1) : [], o = r.length > 0 ? r[r.length - 1].path : ((l = this.config) == null ? void 0 : l.rootFolderPath) || "/";
12433
- (c = this.config) != null && c.rememberLastFolder && ls(o), this.store.setState({
12425
+ const s = e.detail.uuid, i = this.store.getState(), a = s ? i.breadcrumb.findIndex((p) => p.uuid === s) : -1, r = s ? i.breadcrumb.slice(0, a + 1) : [], o = r.length > 0 ? r[r.length - 1].path : ((l = this.config) == null ? void 0 : l.rootFolderPath) || "/";
12426
+ (c = this.config) != null && c.rememberLastFolder && cs(o, this.config.auth.projectToken), this._selectAllId++, this.store.setState({
12434
12427
  currentFolder: s || null,
12435
12428
  currentFolderPath: o,
12436
12429
  breadcrumb: r,
@@ -12439,6 +12432,10 @@ const Zt = class Zt extends S {
12439
12432
  folders: []
12440
12433
  }), this.selectionCtrl.resetRange(), this._loadData();
12441
12434
  }
12435
+ _resolveInitialFolderPath(e) {
12436
+ var s, i;
12437
+ return e === "folders" && ((s = this.config) == null ? void 0 : s.rememberLastFolder) && Di(this.config.auth.projectToken) || ((i = this.config) == null ? void 0 : i.rootFolderPath) || "/";
12438
+ }
12442
12439
  /**
12443
12440
  * Build breadcrumb items from a folder path relative to the root folder path.
12444
12441
  * Used to restore breadcrumbs when opening the picker into a remembered/configured folder.
@@ -12458,7 +12455,7 @@ const Zt = class Zt extends S {
12458
12455
  this.store.setState({ previewAsset: e.detail.asset });
12459
12456
  }
12460
12457
  _handleSelectionConfirm(e) {
12461
- var a, r, o, l, c, h;
12458
+ var a, r, o, l, c, p;
12462
12459
  const s = e.detail.assets, i = e.detail.folders || [];
12463
12460
  if (i.length > 0 && ((a = this.config) == null ? void 0 : a.folderSelection) !== !1) {
12464
12461
  if (((r = this.config) == null ? void 0 : r.folderSelectionMode) === "assets") {
@@ -12472,7 +12469,7 @@ const Zt = class Zt extends S {
12472
12469
  })), this._isInline || this.close();
12473
12470
  return;
12474
12471
  }
12475
- (h = (c = this.config) == null ? void 0 : c.onSelect) == null || h.call(c, s), this.dispatchEvent(new CustomEvent("ap-select", {
12472
+ (p = (c = this.config) == null ? void 0 : c.onSelect) == null || p.call(c, s), this.dispatchEvent(new CustomEvent("ap-select", {
12476
12473
  detail: { assets: s },
12477
12474
  bubbles: !0,
12478
12475
  composed: !0
@@ -12485,17 +12482,17 @@ const Zt = class Zt extends S {
12485
12482
  try {
12486
12483
  const c = await Promise.all(
12487
12484
  i.map(
12488
- (m) => Qe(this.apiClient, {
12485
+ (m) => Ze(this.apiClient, {
12489
12486
  folder: m.path,
12490
12487
  recursive: s === "recursive" ? 1 : 0,
12491
12488
  limit: 1e4
12492
12489
  })
12493
12490
  )
12494
- ), h = [];
12491
+ ), p = [];
12495
12492
  for (const m of c)
12496
- h.push(...m.files);
12493
+ p.push(...m.files);
12497
12494
  const u = [...a], v = new Set(u.map((m) => m.uuid));
12498
- for (const m of h)
12495
+ for (const m of p)
12499
12496
  v.has(m.uuid) || (u.push(m), v.add(m.uuid));
12500
12497
  const d = (r = this.config) == null ? void 0 : r.maxSelections, g = d ? u.slice(0, d) : u;
12501
12498
  (l = (o = this.config) == null ? void 0 : o.onSelect) == null || l.call(o, g), this.dispatchEvent(new CustomEvent("ap-select", {
@@ -12515,10 +12512,10 @@ const Zt = class Zt extends S {
12515
12512
  this._folderResolveOpen = !1;
12516
12513
  }
12517
12514
  async _handleSelectAll(e) {
12518
- var l, c, h;
12515
+ var c, p, u;
12519
12516
  const s = this.store.getState();
12520
- if (s.isSelectingAll || !this.apiClient || !(((l = s.config) == null ? void 0 : l.multiSelect) ?? !0)) return;
12521
- const a = ((c = e == null ? void 0 : e.detail) == null ? void 0 : c.scope) ?? "all", r = a !== "assets" && ((h = this.config) == null ? void 0 : h.folderSelection) !== !1 && s.folders.length > 0;
12517
+ if (s.isSelectingAll || !this.apiClient || !(((c = s.config) == null ? void 0 : c.multiSelect) ?? !0)) return;
12518
+ const a = ((p = e == null ? void 0 : e.detail) == null ? void 0 : p.scope) ?? "all", r = a !== "assets" && ((u = this.config) == null ? void 0 : u.folderSelection) !== !1 && s.folders.length > 0;
12522
12519
  if (!(a !== "folders")) {
12523
12520
  r && this.selectionCtrl.selectAllFolders(s.folders);
12524
12521
  return;
@@ -12527,40 +12524,45 @@ const Zt = class Zt extends S {
12527
12524
  r && this.selectionCtrl.selectAllFolders(s.folders), this.selectionCtrl.selectAll(s.assets);
12528
12525
  return;
12529
12526
  }
12527
+ const l = ++this._selectAllId;
12530
12528
  this.store.setState({ isSelectingAll: !0 });
12531
12529
  try {
12532
- const u = this._buildSearchNotation(), v = s.currentFolderPath || "/", d = s.limit, g = s.assets, m = s.totalCount, x = s.activeTab === "folders" ? 0 : 1, w = [];
12533
- for (let M = g.length; M < m; M += d)
12534
- w.push(M);
12535
- const T = 4, C = [];
12536
- for (let M = 0; M < w.length; M += T) {
12537
- const R = w.slice(M, M + T), Y = await Promise.all(
12538
- R.map(
12539
- (X) => Qe(this.apiClient, {
12540
- folder: v,
12541
- offset: X,
12542
- limit: d,
12530
+ const v = this._buildSearchNotation(), d = s.currentFolderPath || "/", g = s.limit, m = s.assets, x = s.totalCount, k = s.activeTab === "folders" ? 0 : 1, E = [];
12531
+ for (let M = m.length; M < x; M += g)
12532
+ E.push(M);
12533
+ const A = 4, I = [];
12534
+ for (let M = 0; M < E.length; M += A) {
12535
+ if (l !== this._selectAllId) return;
12536
+ const se = E.slice(M, M + A), ce = await Promise.all(
12537
+ se.map(
12538
+ (ee) => Ze(this.apiClient, {
12539
+ folder: d,
12540
+ offset: ee,
12541
+ limit: g,
12543
12542
  sort_by: s.sortBy,
12544
12543
  sort_direction: s.sortDirection,
12545
12544
  search: s.searchQuery || void 0,
12546
- q: u || void 0,
12547
- recursive: x
12545
+ q: v || void 0,
12546
+ recursive: k
12548
12547
  })
12549
12548
  )
12550
12549
  );
12551
- for (const X of Y)
12552
- X.files && C.push(...X.files);
12550
+ if (l !== this._selectAllId) return;
12551
+ for (const ee of ce)
12552
+ ee.files && I.push(...ee.files);
12553
12553
  }
12554
- const O = new Set(g.map((M) => M.uuid)), D = C.filter((M) => O.has(M.uuid) ? !1 : (O.add(M.uuid), !0)), E = [...g, ...D];
12554
+ if (l !== this._selectAllId) return;
12555
+ const R = new Set(m.map((M) => M.uuid)), T = I.filter((M) => R.has(M.uuid) ? !1 : (R.add(M.uuid), !0)), P = [...m, ...T];
12555
12556
  this.store.setState({
12556
- assets: E,
12557
- offset: Math.max(0, E.length - d),
12557
+ assets: P,
12558
+ offset: Math.max(0, P.length - g),
12558
12559
  hasMore: !1,
12559
12560
  isSelectingAll: !1
12560
- }), r && this.selectionCtrl.selectAllFolders(s.folders), this.selectionCtrl.selectAll(E);
12561
- } catch (u) {
12561
+ }), r && this.selectionCtrl.selectAllFolders(s.folders), this.selectionCtrl.selectAll(P);
12562
+ } catch (v) {
12563
+ if (l !== this._selectAllId) return;
12562
12564
  this.store.setState({ isSelectingAll: !1 }), this.dispatchEvent(new CustomEvent("ap-error", {
12563
- detail: { error: u, context: "selectAll" },
12565
+ detail: { error: v, context: "selectAll" },
12564
12566
  bubbles: !0,
12565
12567
  composed: !0
12566
12568
  }));
@@ -12583,12 +12585,12 @@ const Zt = class Zt extends S {
12583
12585
  (c) => c == null || c === "" || Array.isArray(c) && c.length === 0
12584
12586
  );
12585
12587
  if (!l && this._isDateFilterKey(s) && typeof i == "object" && !Array.isArray(i)) {
12586
- const { kind: c, preset: h, from: u, to: v } = i;
12587
- l = !c && !h && !u && !v;
12588
+ const { kind: c, preset: p, from: u, to: v } = i;
12589
+ l = !c && !p && !u && !v;
12588
12590
  }
12589
12591
  if (l) {
12590
12592
  const c = { ...o.applied };
12591
- delete c[s], o.applied = c, o.pinned.includes(s) || (o.visible = o.visible.filter((h) => h !== s));
12593
+ delete c[s], o.applied = c, o.pinned.includes(s) || (o.visible = o.visible.filter((p) => p !== s));
12592
12594
  } else {
12593
12595
  const c = { ...o.applied };
12594
12596
  this._isDateFilterKey(s) && typeof i == "object" && !Array.isArray(i) ? c[s] = {
@@ -12645,21 +12647,21 @@ const Zt = class Zt extends S {
12645
12647
  i ? (this._pendingMetadataField = i, a.pendingMetadataField = i) : s && (this._pendingFilter = s, a.pendingFilter = s), await a.updateComplete;
12646
12648
  let o = a.renderRoot.querySelector(".chip.pending");
12647
12649
  if (!o) {
12648
- const x = a.renderRoot.querySelectorAll(".chip.pinned-empty"), w = i ? (d = a._getMetadataLabel) == null ? void 0 : d.call(a, i) : void 0;
12649
- for (const T of x) {
12650
- const C = (m = (g = T.querySelector(".chip-label")) == null ? void 0 : g.textContent) == null ? void 0 : m.trim();
12651
- if (i && C === w) {
12652
- o = T;
12650
+ const x = a.renderRoot.querySelectorAll(".chip.pinned-empty"), k = i ? (d = a._getMetadataLabel) == null ? void 0 : d.call(a, i) : void 0;
12651
+ for (const E of x) {
12652
+ const A = (m = (g = E.querySelector(".chip-label")) == null ? void 0 : g.textContent) == null ? void 0 : m.trim();
12653
+ if (i && A === k) {
12654
+ o = E;
12653
12655
  break;
12654
12656
  }
12655
- if (s && C === (Re[s] || s)) {
12656
- o = T;
12657
+ if (s && A === (Re[s] || s)) {
12658
+ o = E;
12657
12659
  break;
12658
12660
  }
12659
12661
  }
12660
12662
  }
12661
12663
  if (!o) return;
12662
- const l = o.getBoundingClientRect(), c = this.renderRoot.querySelector(".toolbar-filters-wrapper"), h = c == null ? void 0 : c.getBoundingClientRect(), u = h ? l.left - h.left : l.left, v = h ? l.bottom - h.top : void 0;
12664
+ const l = o.getBoundingClientRect(), c = this.renderRoot.querySelector(".toolbar-filters-wrapper"), p = c == null ? void 0 : c.getBoundingClientRect(), u = p ? l.left - p.left : l.left, v = p ? l.bottom - p.top : void 0;
12663
12665
  i ? r.openMetadataFieldPanel(i, !0, u, v) : s && r.openFilterPanel(s, !0, u, v);
12664
12666
  }
12665
12667
  _handleFilterRemove(e) {
@@ -12670,13 +12672,13 @@ const Zt = class Zt extends S {
12670
12672
  delete r[s], a.applied = r, a.pinned.includes(s) || (a.visible = a.visible.filter((l) => l !== s)), this.store.setState({ filters: a, offset: 0, assets: [], folders: [], isLoading: !0 }), this.selectionCtrl.resetRange(), this._debouncedLoadData();
12671
12673
  }
12672
12674
  _handleMetadataFilterChange(e) {
12673
- const { fieldKey: s, operator: i, values: a, metadataType: r } = e.detail, l = { ...this.store.getState().filters }, c = { ...l.metadata }, h = { ...c.applied };
12674
- if (!a || Array.isArray(a) && a.length === 0 ? (delete h[s], c.applied = h, c.pinned.includes(s) || (c.visible = c.visible.filter((v) => v !== s))) : (h[s] = {
12675
+ const { fieldKey: s, operator: i, values: a, metadataType: r } = e.detail, l = { ...this.store.getState().filters }, c = { ...l.metadata }, p = { ...c.applied };
12676
+ if (!a || Array.isArray(a) && a.length === 0 ? (delete p[s], c.applied = p, c.pinned.includes(s) || (c.visible = c.visible.filter((v) => v !== s))) : (p[s] = {
12675
12677
  type: "string",
12676
12678
  values: Array.isArray(a) ? a : [a],
12677
12679
  operator: i || ":",
12678
12680
  metadataType: r
12679
- }, c.applied = h, c.visible.includes(s) || (c.visible = [...c.visible, s])), l.metadata = c, this.store.setState({ filters: l, offset: 0, assets: [], folders: [], isLoading: !0 }), this.selectionCtrl.resetRange(), this._debouncedLoadData(), this._pendingMetadataField === s) {
12681
+ }, c.applied = p, c.visible.includes(s) || (c.visible = [...c.visible, s])), l.metadata = c, this.store.setState({ filters: l, offset: 0, assets: [], folders: [], isLoading: !0 }), this.selectionCtrl.resetRange(), this._debouncedLoadData(), this._pendingMetadataField === s) {
12680
12682
  this._pendingMetadataField = null;
12681
12683
  const v = this.renderRoot.querySelector("ap-filters-bar");
12682
12684
  v && (v.pendingMetadataField = null);
@@ -12693,16 +12695,16 @@ const Zt = class Zt extends S {
12693
12695
  _handleFilterPin(e) {
12694
12696
  var l, c;
12695
12697
  const { key: s, pinned: i } = e.detail, r = { ...this.store.getState().filters };
12696
- i ? r.pinned.includes(s) || (r.pinned = [...r.pinned, s]) : (r.pinned = r.pinned.filter((h) => h !== s), s in r.applied || (r.visible = r.visible.filter((h) => h !== s))), this.store.setState({ filters: r });
12698
+ i ? r.pinned.includes(s) || (r.pinned = [...r.pinned, s]) : (r.pinned = r.pinned.filter((p) => p !== s), s in r.applied || (r.visible = r.visible.filter((p) => p !== s))), this.store.setState({ filters: r });
12697
12699
  const o = ((c = (l = this.store.getState().config) == null ? void 0 : l.auth) == null ? void 0 : c.projectToken) ?? null;
12698
12700
  Li(o, r.pinned);
12699
12701
  }
12700
12702
  _handleMetadataPin(e) {
12701
- var c, h;
12703
+ var c, p;
12702
12704
  const { fieldKey: s, pinned: i } = e.detail, r = { ...this.store.getState().filters }, o = { ...r.metadata };
12703
12705
  i ? o.pinned.includes(s) || (o.pinned = [...o.pinned, s]) : (o.pinned = o.pinned.filter((u) => u !== s), s in o.applied || (o.visible = o.visible.filter((u) => u !== s))), r.metadata = o, this.store.setState({ filters: r });
12704
- const l = ((h = (c = this.store.getState().config) == null ? void 0 : c.auth) == null ? void 0 : h.projectToken) ?? null;
12705
- Pi(l, o.pinned);
12706
+ const l = ((p = (c = this.store.getState().config) == null ? void 0 : c.auth) == null ? void 0 : p.projectToken) ?? null;
12707
+ Ii(l, o.pinned);
12706
12708
  }
12707
12709
  _handleFiltersClearAll() {
12708
12710
  const e = this.store.getState();
@@ -12734,8 +12736,8 @@ const Zt = class Zt extends S {
12734
12736
  r.visible = r.visible.filter((o) => o !== s), a.metadata = r, this.store.setState({ filters: a });
12735
12737
  }
12736
12738
  _handleFiltersSet(e) {
12737
- var h;
12738
- const { applied: s, metadata: i } = e.detail, r = { ...this.store.getState().filters }, o = new Set(Object.keys(((h = this.config) == null ? void 0 : h.forcedFilters) ?? {})), l = { ...s };
12739
+ var p;
12740
+ const { applied: s, metadata: i } = e.detail, r = { ...this.store.getState().filters }, o = new Set(Object.keys(((p = this.config) == null ? void 0 : p.forcedFilters) ?? {})), l = { ...s };
12739
12741
  for (const u of o) delete l[u];
12740
12742
  r.applied = l;
12741
12743
  const c = Object.keys(s);
@@ -12750,16 +12752,15 @@ const Zt = class Zt extends S {
12750
12752
  // ── Sort Options ────────────────────────────────────────────────────
12751
12753
  _getSortOptions() {
12752
12754
  const e = this.storeCtrl.state;
12753
- return e.searchQuery ? qi : e.activeTab === "folders" ? Hi : qt;
12755
+ return e.searchQuery ? Hi : e.activeTab === "folders" ? Gi : Ht;
12754
12756
  }
12755
12757
  // ── Search Notation Builder ──────────────────────────────────────────
12756
12758
  _buildSearchNotation() {
12757
- var a;
12758
- const e = this.store.getState(), s = { ...Je((a = this.config) == null ? void 0 : a.forcedFilters), ...e.filters.applied };
12759
+ const e = this.store.getState(), s = { ...this._normalizedForcedFilters, ...e.filters.applied };
12759
12760
  return mi(s, e.filters.metadata.applied).join(" ");
12760
12761
  }
12761
12762
  render() {
12762
- var d, g, m, x, w, T, C, O, D, E, M, R;
12763
+ var d, g, m, x, k, E, A, I, R, T, P;
12763
12764
  const e = this.storeCtrl.state, s = Array.from(e.selectedAssets.keys()), i = Array.from(e.selectedFolders.keys()), a = this.selectionCtrl.getSelectedAssets(), r = this.selectionCtrl.getSelectedFolders(), o = ((d = this.config) == null ? void 0 : d.folderSelection) !== !1, l = n`
12764
12765
  <ap-header
12765
12766
  .activeTab=${e.activeTab}
@@ -12775,7 +12776,7 @@ const Zt = class Zt extends S {
12775
12776
  @regional-change=${this._handleRegionalChange}
12776
12777
  @ap-close=${() => this._handleCancel("close-button")}
12777
12778
  ></ap-header>
12778
- `, c = !!((m = this.config) != null && m.uploader), h = n`
12779
+ `, c = !!((m = this.config) != null && m.uploader), p = n`
12779
12780
  <div class="content-area"
12780
12781
  @dragenter=${this._onDragEnter}
12781
12782
  @dragover=${this._onDragOver}
@@ -12807,7 +12808,7 @@ const Zt = class Zt extends S {
12807
12808
  .metadataFields=${e.metadataFields}
12808
12809
  .pinnedFilters=${e.filters.pinned}
12809
12810
  .apiClient=${this.apiClient}
12810
- .forcedFilterKeys=${Object.keys(Je((w = this.config) == null ? void 0 : w.forcedFilters))}
12811
+ .forcedFilterKeys=${Object.keys(this._normalizedForcedFilters)}
12811
12812
  @sort-change=${this._handleSortChange}
12812
12813
  @sort-direction-change=${this._handleSortDirectionChange}
12813
12814
  @filter-update=${this._handleFilterUpdate}
@@ -12828,7 +12829,7 @@ const Zt = class Zt extends S {
12828
12829
  .labels=${e.labels}
12829
12830
  .pinnedFilters=${e.filters.pinned}
12830
12831
  .pinnedMetadataFields=${e.filters.metadata.pinned}
12831
- .forcedFilters=${((T = this.config) == null ? void 0 : T.forcedFilters) ?? {}}
12832
+ .forcedFilters=${((k = this.config) == null ? void 0 : k.forcedFilters) ?? {}}
12832
12833
  @filter-remove=${this._handleFilterRemove}
12833
12834
  @filter-deactivate=${this._handleFilterDeactivate}
12834
12835
  @filter-open=${this._handleFilterOpen}
@@ -12846,7 +12847,7 @@ const Zt = class Zt extends S {
12846
12847
  ></ap-breadcrumb>` : f}
12847
12848
  </div>
12848
12849
 
12849
- ${e.isLoading && e.assets.length === 0 && e.folders.length === 0 ? n`<ap-skeleton .variant=${e.viewMode} .gridSize=${((C = this.config) == null ? void 0 : C.gridSize) ?? "normal"} .multiSelect=${((O = this.config) == null ? void 0 : O.multiSelect) !== !1} .folderCount=${2}></ap-skeleton>` : this._renderContent(e, s, i, o)}
12850
+ ${e.isLoading && e.assets.length === 0 && e.folders.length === 0 ? n`<ap-skeleton .variant=${e.viewMode} .gridSize=${((E = this.config) == null ? void 0 : E.gridSize) ?? "normal"} .multiSelect=${((A = this.config) == null ? void 0 : A.multiSelect) !== !1} .folderCount=${2}></ap-skeleton>` : this._renderContent(e, s, i, o)}
12850
12851
 
12851
12852
  <ap-marquee-overlay .active=${this.marqueeCtrl.isActive} .rect=${this.marqueeCtrl.rect}></ap-marquee-overlay>
12852
12853
  ${this._folderResolveOpen ? n`
@@ -12864,11 +12865,11 @@ const Zt = class Zt extends S {
12864
12865
  .assets=${e.assets}
12865
12866
  .selectedIds=${s}
12866
12867
  .containerToken=${e.projectToken}
12867
- .showMetadata=${((D = this.config) == null ? void 0 : D.showMetadata) !== !1}
12868
+ .showMetadata=${((I = this.config) == null ? void 0 : I.showMetadata) !== !1}
12868
12869
  .metadataFields=${e.metadataFields}
12869
12870
  .labels=${e.labels}
12870
12871
  .regionalFilters=${e.regionalFilters}
12871
- .multiSelect=${((E = this.config) == null ? void 0 : E.multiSelect) ?? !0}
12872
+ .multiSelect=${((R = this.config) == null ? void 0 : R.multiSelect) ?? !0}
12872
12873
  @preview-close=${this._handlePreviewClose}
12873
12874
  @preview-navigate=${this._handlePreviewNavigate}
12874
12875
  @asset-select=${this._handleAssetSelect}
@@ -12883,8 +12884,8 @@ const Zt = class Zt extends S {
12883
12884
  .totalCount=${e.totalCount}
12884
12885
  .totalFolderCount=${e.totalFolderCount}
12885
12886
  .isSelectingAll=${e.isSelectingAll}
12886
- .multiSelect=${((M = this.config) == null ? void 0 : M.multiSelect) ?? !0}
12887
- .maxSelections=${(R = this.config) == null ? void 0 : R.maxSelections}
12887
+ .multiSelect=${((T = this.config) == null ? void 0 : T.multiSelect) ?? !0}
12888
+ .maxSelections=${(P = this.config) == null ? void 0 : P.maxSelections}
12888
12889
  @selection-confirm=${this._handleSelectionConfirm}
12889
12890
  @selection-clear=${this._handleSelectionClear}
12890
12891
  @selection-deselect=${this._handleSelectionDeselect}
@@ -12904,25 +12905,25 @@ const Zt = class Zt extends S {
12904
12905
  <div class="ap-inline">
12905
12906
  ${this._isUploaderOpen ? v : n`
12906
12907
  <div class="inline-header">${l}</div>
12907
- <div class="inline-content">${h}</div>
12908
+ <div class="inline-content">${p}</div>
12908
12909
  <div class="inline-footer">${u}</div>
12909
12910
  `}
12910
12911
  </div>
12911
12912
  ` : f : n`
12912
12913
  <ap-modal
12913
12914
  ?open=${e.isOpen}
12914
- @ap-cancel=${(Y) => this._handleCancel(Y.detail.reason)}
12915
+ @ap-cancel=${(M) => this._handleCancel(M.detail.reason)}
12915
12916
  >
12916
12917
  ${this._isUploaderOpen ? v : n`
12917
12918
  <div slot="header">${l}</div>
12918
- ${h}
12919
+ ${p}
12919
12920
  <div slot="footer">${u}</div>
12920
12921
  `}
12921
12922
  </ap-modal>
12922
12923
  `;
12923
12924
  }
12924
12925
  _renderContent(e, s, i = [], a = !1) {
12925
- var r, o, l, c, h, u;
12926
+ var r, o, l, c, p, u;
12926
12927
  return e.activeTab === "assets" ? !e.isLoading && e.assets.length === 0 ? n`
12927
12928
  <div class="empty-state">
12928
12929
  <ap-icon name="search" .size=${48}></ap-icon>
@@ -12980,7 +12981,7 @@ const Zt = class Zt extends S {
12980
12981
  .isLoading=${e.isLoading}
12981
12982
  .multiSelect=${((c = this.config) == null ? void 0 : c.multiSelect) ?? !0}
12982
12983
  .folderSelectable=${a}
12983
- .gridSize=${((h = this.config) == null ? void 0 : h.gridSize) ?? "normal"}
12984
+ .gridSize=${((p = this.config) == null ? void 0 : p.gridSize) ?? "normal"}
12984
12985
  @asset-select=${this._handleAssetSelect}
12985
12986
  @asset-preview=${this._handleAssetPreview}
12986
12987
  @asset-quick-select=${this._handleQuickSelect}
@@ -13012,8 +13013,8 @@ const Zt = class Zt extends S {
13012
13013
  ` : f;
13013
13014
  }
13014
13015
  };
13015
- Zt.styles = [
13016
- k`
13016
+ Jt.styles = [
13017
+ $`
13017
13018
  :host {
13018
13019
  display: contents;
13019
13020
  font-family: var(--ap-font-family, system-ui, -apple-system, sans-serif);
@@ -13140,7 +13141,7 @@ Zt.styles = [
13140
13141
  flex-direction: column;
13141
13142
  flex: 1;
13142
13143
  min-height: 0;
13143
- background: var(--ap-background, #fff);
13144
+ background: var(--ap-background, oklch(1 0 0));
13144
13145
  animation: uploader-slide-in 250ms ease-out;
13145
13146
  }
13146
13147
  .uploader-close-btn {
@@ -13156,13 +13157,13 @@ Zt.styles = [
13156
13157
  border: none;
13157
13158
  border-radius: var(--ap-radius-sm, 6px);
13158
13159
  background: none;
13159
- color: var(--ap-muted-foreground, #71717a);
13160
+ color: var(--ap-muted-foreground, oklch(0.685 0.033 249.82));
13160
13161
  cursor: pointer;
13161
13162
  transition: all 150ms;
13162
13163
  }
13163
13164
  .uploader-close-btn:hover {
13164
- background: var(--ap-muted, #f4f4f5);
13165
- color: var(--ap-foreground, #09090b);
13165
+ background: var(--ap-muted, oklch(0.974 0.006 239.819));
13166
+ color: var(--ap-foreground, oklch(0.37 0.022 248.413));
13166
13167
  }
13167
13168
  .uploader-close-btn:focus-visible {
13168
13169
  outline: 2px solid var(--ap-ring, oklch(0.65 0.19 258));
@@ -13184,12 +13185,10 @@ Zt.styles = [
13184
13185
  display: block;
13185
13186
  width: 100%;
13186
13187
  height: 100%;
13187
- --sfx-up-border: transparent;
13188
- --sfx-up-radius: 0;
13189
13188
  }
13190
13189
  `
13191
13190
  ];
13192
- let Ge = Zt;
13191
+ let Ge = Jt;
13193
13192
  Tt([
13194
13193
  _()
13195
13194
  ], Ge.prototype, "_isDragOver");
@@ -13200,9 +13199,9 @@ Tt([
13200
13199
  _()
13201
13200
  ], Ge.prototype, "_folderResolveOpen");
13202
13201
  Tt([
13203
- p({ type: Object })
13202
+ h({ type: Object })
13204
13203
  ], Ge.prototype, "config");
13205
13204
  export {
13206
13205
  Ge as A,
13207
- rr as g
13206
+ or as g
13208
13207
  };