@scaleflex/asset-picker 0.2.0 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
- import { css as $, LitElement as w, html as n, nothing as f, svg as ce } from "lit";
2
- import { property as h, query as Se, customElement as k, state as _ } from "lit/decorators.js";
3
- class As {
1
+ import { css as $, LitElement as k, html as n, nothing as f, svg as ce } from "lit";
2
+ import { property as h, query as Se, customElement as S, state as _ } from "lit/decorators.js";
3
+ class Ts {
4
4
  constructor(e) {
5
5
  this.listeners = /* @__PURE__ */ new Set(), this._notifying = !1, this._pendingState = null, this.state = e;
6
6
  }
@@ -31,8 +31,8 @@ class As {
31
31
  this.listeners.clear();
32
32
  }
33
33
  }
34
- function Ts() {
35
- return new As({
34
+ function Ms() {
35
+ return new Ts({
36
36
  config: null,
37
37
  projectToken: "",
38
38
  sassKey: "",
@@ -92,7 +92,7 @@ class Os {
92
92
  (e = this.unsubscribe) == null || e.call(this);
93
93
  }
94
94
  }
95
- class Ms {
95
+ class Ps {
96
96
  constructor(e, s) {
97
97
  this.lastClickedIndex = -1, this.host = e, this.store = s, e.addController(this);
98
98
  }
@@ -135,7 +135,7 @@ class Ms {
135
135
  return Array.from(this.store.getState().selectedAssets.values());
136
136
  }
137
137
  }
138
- class Ps {
138
+ class Ls {
139
139
  constructor(e, s) {
140
140
  this.host = e, this.onLoadMore = s, e.addController(this);
141
141
  }
@@ -157,8 +157,8 @@ class Ps {
157
157
  this.observer && this.sentinel && (this.observer.unobserve(this.sentinel), this.observer.disconnect()), this.observer = void 0, this.sentinel = void 0;
158
158
  }
159
159
  }
160
- const Kt = 5, Te = 40, Gt = 15;
161
- class Ls {
160
+ const Gt = 5, Te = 40, Yt = 15;
161
+ class Is {
162
162
  constructor(e, s) {
163
163
  this.startX = 0, this.startY = 0, this.startClientX = 0, this.startClientY = 0, this.preMarqueeSelection = /* @__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.host = e, this.store = s, e.addController(this);
164
164
  }
@@ -190,7 +190,7 @@ class Ls {
190
190
  if (this.container) {
191
191
  if (!this._dragging) {
192
192
  const s = Math.abs(e.clientX - this.startClientX), i = Math.abs(e.clientY - this.startClientY);
193
- if (s < Kt && i < Kt) return;
193
+ if (s < Gt && i < Gt) return;
194
194
  this._dragging = !0, this.isActive = !0, this.preMarqueeSelection = new Map(this.store.getState().selectedAssets);
195
195
  }
196
196
  this._lastMouseEvent = e, this.updateMarqueeRect(e), this.startAutoScroll(e);
@@ -215,7 +215,7 @@ class Ls {
215
215
  if (this._scrollRAF = null, !this.container || !this._dragging || !this._lastMouseEvent) return;
216
216
  const e = this.container.getBoundingClientRect(), s = this._lastMouseEvent, i = s.clientY - e.top, a = e.bottom - s.clientY;
217
217
  let r = 0;
218
- i < Te ? r = -Gt * (1 - i / Te) : a < Te && (r = Gt * (1 - a / Te)), r !== 0 && (this.container.scrollTop += r, this.updateMarqueeRect(s), this._scrollRAF = requestAnimationFrame(() => this.autoScrollTick()));
218
+ i < Te ? r = -Yt * (1 - i / Te) : a < Te && (r = Yt * (1 - a / Te)), r !== 0 && (this.container.scrollTop += r, this.updateMarqueeRect(s), this._scrollRAF = requestAnimationFrame(() => this.autoScrollTick()));
219
219
  }
220
220
  stopAutoScroll() {
221
221
  this._scrollRAF && (cancelAnimationFrame(this._scrollRAF), this._scrollRAF = null);
@@ -255,7 +255,7 @@ class Ls {
255
255
  this.store.setState({ selectedAssets: s });
256
256
  }
257
257
  }
258
- class Is {
258
+ class Ds {
259
259
  constructor(e, s) {
260
260
  this.auth = e;
261
261
  const i = e.projectToken;
@@ -338,7 +338,7 @@ class Is {
338
338
  }
339
339
  }
340
340
  }
341
- function Ds(t) {
341
+ function zs(t) {
342
342
  const e = {
343
343
  offset: t.offset ?? 0,
344
344
  limit: t.limit ?? 100,
@@ -357,17 +357,17 @@ function Ds(t) {
357
357
  return t.search && r.push(t.search), t.q && r.push(t.q), r.length > 0 && (e.q = r.join(" ")), e;
358
358
  }
359
359
  async function tt(t, e) {
360
- const s = Ds(e);
360
+ const s = zs(e);
361
361
  return t.request("/files", s);
362
362
  }
363
- async function Yt(t, e) {
363
+ async function Xt(t, e) {
364
364
  const s = {
365
365
  folder: e.folder,
366
366
  recursive: e.recursive ?? 1
367
367
  }, i = [];
368
368
  return e.search && i.push(e.search), e.q && i.push(e.q), i.length > 0 && (s.q = i.join(" ")), t.request("/files/stats", s);
369
369
  }
370
- async function zs(t, e) {
370
+ async function Rs(t, e) {
371
371
  const s = {
372
372
  recursive: (e == null ? void 0 : e.recursive) ?? 0,
373
373
  folder: (e == null ? void 0 : e.folderPath) ?? "/",
@@ -382,16 +382,16 @@ async function zs(t, e) {
382
382
  };
383
383
  return s.sort = `${r[i] || i}:${a}`, await t.request("/folders", s);
384
384
  }
385
- async function Rs(t, e) {
385
+ async function Ns(t, e) {
386
386
  return e.length === 0 ? {} : (await t.post(
387
387
  "/folders/previews",
388
388
  { folders: e }
389
389
  )).folders || {};
390
390
  }
391
- async function Ns(t) {
391
+ async function js(t) {
392
392
  return await t.request("/labels");
393
393
  }
394
- async function js(t) {
394
+ async function Us(t) {
395
395
  return ((await t.request("/tags")).tags || []).map((i) => ({
396
396
  ...i,
397
397
  label: i.names.en || Object.values(i.names)[0] || ""
@@ -416,12 +416,12 @@ const m = {
416
416
  PRODUCT_REF: "product_ref",
417
417
  FACES: "faces",
418
418
  COLOR: "color"
419
- }, V = {
419
+ }, B = {
420
420
  STATUS: "approval_status",
421
421
  APPROVER: "task_approver",
422
422
  REQUESTOR: "task_requester",
423
423
  DUE_DATE: "task_duedate"
424
- }, x = {
424
+ }, w = {
425
425
  IS: ":",
426
426
  RANGE: "..",
427
427
  IS_NOT: ":-",
@@ -430,9 +430,9 @@ const m = {
430
430
  CONTAINS_IN_TEXT: "~~~",
431
431
  GREATER_THAN_OR_EQUAL: ">=",
432
432
  LESS_THAN_OR_EQUAL: "<="
433
- }, Us = {
433
+ }, Vs = {
434
434
  AND: "AND"
435
- }, C = {
435
+ }, x = {
436
436
  NUMERIC: "numeric",
437
437
  SELECT_ONE: "select-one",
438
438
  MULTI_SELECT: "multi-select",
@@ -447,36 +447,36 @@ const m = {
447
447
  DECIMAL2: "decimal2",
448
448
  INTEGER_LIST: "integer-list"
449
449
  }, vt = {
450
- [C.DATE]: "date_",
451
- [C.BOOLEAN]: "bool_",
452
- [C.NUMERIC]: "num_",
453
- [C.DECIMAL2]: "dec_",
454
- [C.ATTACHMENTS_ASSETS]: "attach_",
455
- [C.ATTACHMENT_URI]: "uri_",
456
- [C.SELECT_ONE]: "one_",
457
- [C.MULTI_SELECT]: "multi_",
458
- [C.SUPERTAGS]: "tags_",
459
- [C.TEXT]: "text_",
460
- [C.TEXT_AREA]: "area_",
461
- [C.GEO_POINT]: "geo_",
462
- [C.INTEGER_LIST]: "intlist_"
450
+ [x.DATE]: "date_",
451
+ [x.BOOLEAN]: "bool_",
452
+ [x.NUMERIC]: "num_",
453
+ [x.DECIMAL2]: "dec_",
454
+ [x.ATTACHMENTS_ASSETS]: "attach_",
455
+ [x.ATTACHMENT_URI]: "uri_",
456
+ [x.SELECT_ONE]: "one_",
457
+ [x.MULTI_SELECT]: "multi_",
458
+ [x.SUPERTAGS]: "tags_",
459
+ [x.TEXT]: "text_",
460
+ [x.TEXT_AREA]: "area_",
461
+ [x.GEO_POINT]: "geo_",
462
+ [x.INTEGER_LIST]: "intlist_"
463
463
  };
464
464
  Object.fromEntries(
465
465
  Object.entries(vt).map(([t, e]) => [e, t])
466
466
  );
467
- const is = Object.values(vt), Be = {
467
+ const rs = Object.values(vt), Ue = {
468
468
  PRESET: "preset",
469
469
  AFTER: "after",
470
470
  BEFORE: "before",
471
471
  BETWEEN: "between",
472
472
  SPECIFIC: "specific"
473
- }, Xt = {
473
+ }, Wt = {
474
474
  EMPTY: "empty",
475
475
  NOT_EMPTY: "non-empty"
476
- }, K = "empty", G = "non-empty", be = "specific", xt = 10, $t = 10, st = 10, rs = "filters:pinned:", os = "metadata:pinned:", Wt = [
476
+ }, K = "empty", G = "non-empty", be = "specific", xt = 10, wt = 10, st = 10, os = "filters:pinned:", ns = "metadata:pinned:", Qt = [
477
477
  m.DATE,
478
478
  m.TYPE
479
- ], ns = x.IS, it = "20", rt = "1", Vs = 0, qs = [
479
+ ], ls = w.IS, it = "20", rt = "1", qs = 0, Hs = [
480
480
  { key: m.DATE, label: "Date", icon: "calendar", type: "date" },
481
481
  { key: m.TYPE, label: "Format", icon: "file-type", type: "string" },
482
482
  { key: m.SIZE, label: "Size", icon: "scaling", type: "string" },
@@ -486,21 +486,21 @@ const is = Object.values(vt), Be = {
486
486
  { key: m.PRODUCT_REF, label: "Products", icon: "box", type: "string" },
487
487
  { key: m.IMAGE, label: "Image", icon: "image", type: "string" },
488
488
  { key: m.COLOR, label: "Color", icon: "swatch-book", type: "string" }
489
- ], Hs = {
489
+ ], Ks = {
490
490
  key: m.METADATA,
491
491
  label: "Metadata",
492
492
  icon: "file-text",
493
493
  type: "string"
494
- }, Ks = {
494
+ }, Gs = {
495
495
  key: m.APPROVAL,
496
496
  label: "Approval",
497
497
  icon: "badge-check",
498
498
  type: "string"
499
- }, Mt = [
500
- Hs,
501
- ...qs,
502
- Ks
503
- ], Oe = {
499
+ }, Pt = [
500
+ Ks,
501
+ ...Hs,
502
+ Gs
503
+ ], Me = {
504
504
  [m.TYPE]: "Format",
505
505
  [m.DATE]: "Date",
506
506
  [m.SIZE]: "Size",
@@ -521,7 +521,7 @@ const is = Object.values(vt), Be = {
521
521
  DESIGN_TEMPLATE: "template_fdt",
522
522
  OTHER: "other",
523
523
  FONTS: "font"
524
- }, ls = [
524
+ }, cs = [
525
525
  { value: le.IMAGE, label: "Image", icon: "image" },
526
526
  { value: le.VIDEO, label: "Video", icon: "clapperboard" },
527
527
  { value: le.AUDIO, label: "Audio", icon: "music" },
@@ -530,28 +530,28 @@ const is = Object.values(vt), Be = {
530
530
  { value: le.DESIGN_TEMPLATE, label: "Design template", icon: "layout-template" },
531
531
  { value: le.FONTS, label: "Fonts", icon: "text" },
532
532
  { value: le.OTHER, label: "Other", icon: "layout-grid" }
533
- ], wt = {
533
+ ], $t = {
534
534
  RESOLUTION: 0,
535
535
  ORIENTATION: 1,
536
536
  FACES: 2
537
- }, Gs = [
537
+ }, Ys = [
538
538
  { value: "small", label: "Small" },
539
539
  { value: "medium", label: "Medium" },
540
540
  { value: "large", label: "Large" }
541
- ], Ys = [
541
+ ], Xs = [
542
542
  { value: "portrait", label: "Portrait" },
543
543
  { value: "landscape", label: "Landscape" },
544
544
  { value: "square", label: "Square" },
545
545
  { value: "panorama", label: "Panorama" }
546
- ], Xs = [
546
+ ], Ws = [
547
547
  { value: "none", label: "None" },
548
548
  { value: "1", label: "1" },
549
549
  { value: "2", label: "2" },
550
550
  { value: "3..", label: "3+" }
551
- ], cs = [
551
+ ], ds = [
552
552
  { value: "created", label: "Created at" },
553
553
  { value: "updated", label: "Updated at" }
554
- ], Lt = [
554
+ ], It = [
555
555
  { value: "today", label: "Today" },
556
556
  { value: "before", label: "Before date" },
557
557
  { value: "last_week", label: "Last week" },
@@ -559,7 +559,7 @@ const is = Object.values(vt), Be = {
559
559
  { value: "last_month", label: "Last month" },
560
560
  { value: "between", label: "Between dates" },
561
561
  { value: "last_year", label: "Last year" }
562
- ], ds = [
562
+ ], ps = [
563
563
  { value: "today", label: "Today" },
564
564
  { value: "before", label: "Before date" },
565
565
  { value: "within_week", label: "Within week" },
@@ -568,7 +568,7 @@ const is = Object.values(vt), Be = {
568
568
  { value: "between", label: "Between dates" },
569
569
  { value: "within_year", label: "Within year" },
570
570
  { value: "specific", label: "Specific date" }
571
- ], Ws = [
571
+ ], Qs = [
572
572
  { value: "today", label: "Today" },
573
573
  { value: "before", label: "Before date" },
574
574
  { value: "within_week", label: "Within week" },
@@ -577,7 +577,7 @@ const is = Object.values(vt), Be = {
577
577
  { value: "between", label: "Between dates" },
578
578
  { value: "within_year", label: "Within year" },
579
579
  { value: "specific", label: "Specific date" }
580
- ], Qs = [
580
+ ], Zs = [
581
581
  "#ffffff",
582
582
  "#99a1af",
583
583
  "#000000",
@@ -591,34 +591,34 @@ const is = Object.values(vt), Be = {
591
591
  "#1447e6",
592
592
  "#7f22fe",
593
593
  "#e60076"
594
- ], Zs = [
594
+ ], Js = [
595
595
  { label: "None (Exact)", value: "0" },
596
596
  { label: "Small", value: "1" },
597
597
  { label: "Medium", value: "2" },
598
598
  { label: "Large", value: "4" }
599
599
  ], kt = [
600
- { label: "Is", value: x.IS },
601
- { label: "Contains", value: x.CONTAINS_IN_TEXT }
600
+ { label: "Is", value: w.IS },
601
+ { label: "Contains", value: w.CONTAINS_IN_TEXT }
602
602
  ], ee = [
603
- { label: "Is", value: x.IS },
604
- { label: "Is not", value: x.IS_NOT }
603
+ { label: "Is", value: w.IS },
604
+ { label: "Is not", value: w.IS_NOT }
605
605
  ], St = [
606
- { label: "Is", value: x.IS_EXACT },
607
- { label: "Contains", value: x.IS },
608
- { label: "Does not contain", value: x.IS_NOT }
606
+ { label: "Is", value: w.IS_EXACT },
607
+ { label: "Contains", value: w.IS },
608
+ { label: "Does not contain", value: w.IS_NOT }
609
609
  ], Ct = [
610
- { label: "Is", value: x.IS },
611
- { label: "Greater than", value: x.GREATER_THAN_OR_EQUAL },
612
- { label: "Is not", value: x.IS_NOT },
613
- { label: "Less than", value: x.LESS_THAN_OR_EQUAL },
614
- { label: "Between", value: x.RANGE }
615
- ], Js = [
616
- { label: "Is", value: x.IS_EXACT },
617
- { label: "Is not", value: x.IS_NOT }
618
- ], Qt = [
619
- { label: "Contains", value: x.CONTAINS },
620
- { label: "Does not contain", value: x.IS_NOT }
610
+ { label: "Is", value: w.IS },
611
+ { label: "Greater than", value: w.GREATER_THAN_OR_EQUAL },
612
+ { label: "Is not", value: w.IS_NOT },
613
+ { label: "Less than", value: w.LESS_THAN_OR_EQUAL },
614
+ { label: "Between", value: w.RANGE }
621
615
  ], ea = [
616
+ { label: "Is", value: w.IS_EXACT },
617
+ { label: "Is not", value: w.IS_NOT }
618
+ ], Zt = [
619
+ { label: "Contains", value: w.CONTAINS },
620
+ { label: "Does not contain", value: w.IS_NOT }
621
+ ], ta = [
622
622
  { value: "APPROVED", label: "Approved", icon: "circle-check-big", iconColor: "var(--ap-success, oklch(0.637 0.17 151.295))" },
623
623
  { value: "PENDING", label: "Pending", icon: "clock", iconColor: "var(--ap-warning, oklch(0.734 0.157 69.419))" },
624
624
  { value: "REJECTED", label: "Rejected", icon: "x-circle", iconColor: "var(--ap-destructive, oklch(0.577 0.215 27.325))" },
@@ -629,60 +629,74 @@ const is = Object.values(vt), Be = {
629
629
  ], Ft = [
630
630
  ...ye,
631
631
  { label: "Specific", value: be }
632
- ], ta = [
632
+ ], sa = [
633
633
  { label: "Empty", value: K },
634
634
  { label: "Not empty", value: G },
635
635
  { label: "True", value: "true" },
636
636
  { label: "False", value: "false" }
637
- ], sa = {
638
- [C.TEXT]: "text",
639
- [C.TEXT_AREA]: "text",
640
- [C.NUMERIC]: "number",
641
- [C.DECIMAL2]: "number",
642
- [C.BOOLEAN]: "boolean",
643
- [C.SELECT_ONE]: "select-one",
644
- [C.MULTI_SELECT]: "multi-select",
645
- [C.SUPERTAGS]: "tags",
646
- [C.DATE]: "date",
647
- [C.GEO_POINT]: "geo",
648
- [C.ATTACHMENTS_ASSETS]: "attachment",
649
- [C.ATTACHMENT_URI]: "attachment",
650
- [C.INTEGER_LIST]: "attachment"
637
+ ], Et = {
638
+ [x.DATE]: "calendar",
639
+ [x.BOOLEAN]: "toggle-left",
640
+ [x.NUMERIC]: "file-digit",
641
+ [x.DECIMAL2]: "decimals-arrow-right",
642
+ [x.ATTACHMENTS_ASSETS]: "paperclip",
643
+ [x.ATTACHMENT_URI]: "link-2",
644
+ [x.SELECT_ONE]: "circle-dot",
645
+ [x.MULTI_SELECT]: "square-check",
646
+ [x.SUPERTAGS]: "hash",
647
+ [x.TEXT]: "text-initial",
648
+ [x.TEXT_AREA]: "text-align-justify",
649
+ [x.GEO_POINT]: "locate",
650
+ [x.INTEGER_LIST]: "list-ordered"
651
+ }, aa = {
652
+ [x.TEXT]: "text",
653
+ [x.TEXT_AREA]: "text",
654
+ [x.NUMERIC]: "number",
655
+ [x.DECIMAL2]: "number",
656
+ [x.BOOLEAN]: "boolean",
657
+ [x.SELECT_ONE]: "select-one",
658
+ [x.MULTI_SELECT]: "multi-select",
659
+ [x.SUPERTAGS]: "tags",
660
+ [x.DATE]: "date",
661
+ [x.GEO_POINT]: "geo",
662
+ [x.ATTACHMENTS_ASSETS]: "attachment",
663
+ [x.ATTACHMENT_URI]: "attachment",
664
+ [x.INTEGER_LIST]: "attachment"
651
665
  };
652
- async function aa(t) {
653
- var b, E, y, D;
654
- 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) ?? [])[Vs], o = i == null ? void 0 : i.store, c = ((o == null ? void 0 : o.regional_variants_groups) ?? []).map((F) => ({
655
- uuid: F.uuid,
656
- label: F.label ?? F.name ?? "",
657
- variants: (F.variants ?? []).map((A) => ({
666
+ async function ia(t) {
667
+ var b, E;
668
+ 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((y) => ({
669
+ uuid: y.uuid,
670
+ label: y.label ?? y.name ?? "",
671
+ variants: (y.variants ?? []).map((A) => ({
658
672
  api_value: A.api_value ?? A.value ?? "",
659
673
  internal_unique_value: A.internal_unique_value ?? A.api_value ?? "",
660
674
  label: A.label ?? A.name ?? ""
661
675
  }))
662
- })).filter((F) => F.variants.length > 1), p = {};
663
- for (const F of c)
664
- p[F.uuid] = ((b = F.variants[0]) == null ? void 0 : b.api_value) ?? "";
676
+ })).filter((y) => y.variants.length > 1), p = {};
677
+ for (const y of c)
678
+ p[y.uuid] = ((b = y.variants[0]) == null ? void 0 : b.api_value) ?? "";
665
679
  const u = (s == null ? void 0 : s.project_branding) ?? ((E = e.settings) == null ? void 0 : E.project_branding), v = u == null ? void 0 : u.brandColor;
666
680
  if (!r) return { fields: [], regionalVariantGroups: c, regionalFilters: p, brandColor: v };
667
681
  const d = r.groups ?? [], g = [];
668
- for (const F of d) {
669
- const A = ((y = F.name) == null ? void 0 : y.toLowerCase()) === "products" || ((D = F.name) == null ? void 0 : D.toLowerCase()) === "product fields";
670
- for (const L of F.fields ?? []) {
671
- const I = L.possible_values, N = I == null ? void 0 : I.map((O) => ({
672
- api_value: O.api_value ?? O.value ?? "",
673
- internal_unique_value: O.internal_unique_value ?? O.api_value ?? "",
674
- label: O.label ?? O.name ?? O.api_value ?? ""
682
+ for (const y of d) {
683
+ const A = y.name || "Root fields";
684
+ for (const F of y.fields ?? []) {
685
+ const I = F.possible_values, H = I == null ? void 0 : I.map((T) => ({
686
+ api_value: T.api_value ?? T.value ?? "",
687
+ internal_unique_value: T.internal_unique_value ?? T.api_value ?? "",
688
+ label: T.label ?? T.name ?? T.api_value ?? ""
675
689
  }));
676
690
  g.push({
677
691
  // Use field.key (not ckey) — this is what a.meta uses as keys
678
- key: L.key ?? L.ckey,
679
- label: L.title ?? L.label ?? L.key ?? "",
680
- type: L.type ?? "text",
681
- slug: L.slug,
682
- ckey: L.ckey,
683
- possible_values: N,
684
- group: A ? "product" : "root",
685
- regionalVariantsGroupUuid: L.regional_variants_group_uuid
692
+ key: F.key ?? F.ckey,
693
+ label: F.title ?? F.label ?? F.key ?? "",
694
+ type: F.type ?? "text",
695
+ slug: F.slug,
696
+ ckey: F.ckey,
697
+ possible_values: H,
698
+ group: A,
699
+ regionalVariantsGroupUuid: F.regional_variants_group_uuid
686
700
  });
687
701
  }
688
702
  }
@@ -694,7 +708,7 @@ function _e(t) {
694
708
  function at() {
695
709
  return _e(/* @__PURE__ */ new Date());
696
710
  }
697
- function ps(t) {
711
+ function hs(t) {
698
712
  const e = /* @__PURE__ */ new Date();
699
713
  switch (t) {
700
714
  case "today":
@@ -730,30 +744,30 @@ function ps(t) {
730
744
  return null;
731
745
  }
732
746
  }
733
- function Zt(t, e) {
734
- return e ? e.type === "date" ? ia(e) : e.type === "string" ? ra(e) : !0 : !1;
747
+ function Jt(t, e) {
748
+ return e ? e.type === "date" ? ra(e) : e.type === "string" ? oa(e) : !0 : !1;
735
749
  }
736
- function ia(t) {
750
+ function ra(t) {
737
751
  return !(!t.kind && !t.preset || t.kind === "preset" && !t.preset || t.kind === "between" && !t.from && !t.to || t.kind === "after" && !t.from || t.kind === "before" && !t.to || t.kind === "specific" && !t.from || t.from && t.to && new Date(t.from) > new Date(t.to));
738
752
  }
739
- function ra(t) {
753
+ function oa(t) {
740
754
  return !t.values || !Array.isArray(t.values) ? !1 : t.values.filter(Boolean).length > 0;
741
755
  }
742
- function oa(t, e = {}) {
756
+ function na(t, e = {}) {
743
757
  const s = [];
744
758
  for (const [i, a] of Object.entries(t)) {
745
- if (!a || !Zt(i, a)) continue;
746
- const r = la(i, a);
759
+ if (!a || !Jt(i, a)) continue;
760
+ const r = ca(i, a);
747
761
  s.push(...r);
748
762
  }
749
763
  for (const [i, a] of Object.entries(e)) {
750
- if (!a || !Zt(i, a)) continue;
751
- const r = ua(i, a);
764
+ if (!a || !Jt(i, a)) continue;
765
+ const r = ga(i, a);
752
766
  s.push(...r);
753
767
  }
754
- return na(s);
768
+ return la(s);
755
769
  }
756
- function na(t) {
770
+ function la(t) {
757
771
  const e = [], s = [], i = [];
758
772
  for (const a of t)
759
773
  a.startsWith("type:") || a.startsWith("type=") ? e.push(a) : a.startsWith("mimetype:") || a.startsWith("mimetype=") ? s.push(a) : i.push(a);
@@ -764,49 +778,49 @@ function na(t) {
764
778
  i.push(...e, ...s);
765
779
  return i;
766
780
  }
767
- function la(t, e) {
781
+ function ca(t, e) {
768
782
  if (e.type === "date")
769
- return hs(t, e);
783
+ return us(t, e);
770
784
  if (t === m.IMAGE)
771
- return ha(e);
772
- const s = e, { operator: i = ns, values: a = [], logic: r } = s;
785
+ return ua(e);
786
+ const s = e, { operator: i = ls, values: a = [], logic: r } = s;
773
787
  if (a.length === 0) return [];
774
788
  switch (t) {
775
789
  case m.SIZE:
776
- return ca(t, a, "..");
790
+ return da(t, a, "..");
777
791
  case m.FACES:
778
- return da(t, i, a);
792
+ return pa(t, i, a);
779
793
  case m.TAGS:
780
- return xe(t, i, es(a), ",", r);
794
+ return xe(t, i, ts(a), ",", r);
781
795
  case m.LABELS:
782
- return xe(t, i, es(a), ",", r);
796
+ return xe(t, i, ts(a), ",", r);
783
797
  case m.COLOR:
784
- return pa(i, a, r);
798
+ return ha(i, a, r);
785
799
  case m.TYPE:
786
- return Jt(t, a, i);
800
+ return es(t, a, i);
787
801
  case m.MIME_TYPE:
788
- return Jt(t, a, i);
802
+ return es(t, a, i);
789
803
  case m.PRODUCT_REF:
790
804
  return xe(t, "=%", a, ",", r);
791
805
  default:
792
806
  return xe(t, i, a, ",", r);
793
807
  }
794
808
  }
795
- function hs(t, e) {
809
+ function us(t, e) {
796
810
  const s = e.field || "created";
797
- if (e.kind === Be.PRESET && e.preset) {
798
- if (e.preset === Xt.EMPTY)
811
+ if (e.kind === Ue.PRESET && e.preset) {
812
+ if (e.preset === Wt.EMPTY)
799
813
  return [`${s}:"empty"`];
800
- if (e.preset === Xt.NOT_EMPTY)
814
+ if (e.preset === Wt.NOT_EMPTY)
801
815
  return [`${s}:"non-empty"`];
802
- const i = ps(e.preset);
816
+ const i = hs(e.preset);
803
817
  return i ? i.to === null ? [`${s}>"${i.from}"`] : [`${s}:"${i.from}..${i.to}"`] : [];
804
818
  }
805
- if (e.kind === Be.AFTER && e.from)
819
+ if (e.kind === Ue.AFTER && e.from)
806
820
  return [`${s}:>"${e.from}"`];
807
- if (e.kind === Be.BEFORE && e.to)
821
+ if (e.kind === Ue.BEFORE && e.to)
808
822
  return [`${s}:<"${e.to}"`];
809
- if (e.kind === Be.BETWEEN) {
823
+ if (e.kind === Ue.BETWEEN) {
810
824
  if (e.from && e.to)
811
825
  return [`${s}:"${e.from}..${e.to}"`];
812
826
  if (e.from && !e.to)
@@ -814,52 +828,52 @@ function hs(t, e) {
814
828
  if (!e.from && e.to)
815
829
  return [`${s}:<"${e.to}"`];
816
830
  }
817
- return e.kind === Be.SPECIFIC && e.from ? [`${s}:"${e.from}"`] : [];
831
+ return e.kind === Ue.SPECIFIC && e.from ? [`${s}:"${e.from}"`] : [];
818
832
  }
819
- function ca(t, e, s) {
833
+ function da(t, e, s) {
820
834
  return e.length === 0 ? [] : [`${t}:"${e.join(s)}"`];
821
835
  }
822
- function da(t, e, s) {
836
+ function pa(t, e, s) {
823
837
  return s.length === 0 ? [] : [`${t}${e}"${s.join(",")}"`];
824
838
  }
825
839
  function xe(t, e, s, i, a) {
826
840
  if (s.length === 0) return [];
827
- if (a === Us.AND)
841
+ if (a === Vs.AND)
828
842
  return s.map((o) => `${t}${e}"${o}"`);
829
843
  const r = s.map((o) => `"${o}"`).join(i);
830
844
  return [`${t}${e}${r}`];
831
845
  }
832
- function pa(t, e, s) {
846
+ function ha(t, e, s) {
833
847
  const i = [], a = xe("color_search", t, e, ",", s);
834
848
  return i.push(...a), i.push('color_operator:"AND"'), i;
835
849
  }
836
- function Jt(t, e, s, i) {
850
+ function es(t, e, s, i) {
837
851
  if (e.length === 0) return [];
838
852
  const a = e.map((r) => `"${r}"`).join(",");
839
853
  return [`${t}${s}${a}`];
840
854
  }
841
- function ha(t) {
855
+ function ua(t) {
842
856
  const e = [];
843
857
  if (typeof t == "object" && t !== null && !Array.isArray(t)) {
844
858
  const o = t, l = o.resolution, c = o.orientation, p = o.faces;
845
859
  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;
846
860
  }
847
- const s = t, i = s[wt.RESOLUTION], a = s[wt.ORIENTATION], r = s[wt.FACES];
861
+ const s = t, i = s[$t.RESOLUTION], a = s[$t.ORIENTATION], r = s[$t.FACES];
848
862
  return i && e.push(`resolution:"${i}"`), a && e.push(`orientation:"${a}"`), r && e.push(`faces:"${r}"`), e;
849
863
  }
850
- function ua(t, e) {
851
- const s = va(t), i = fa(t);
864
+ function ga(t, e) {
865
+ const s = ma(t), i = va(t);
852
866
  if (e.type === "date")
853
- return ga(s, e, i);
854
- const a = e, { operator: r = ns, values: o = [], logic: l, metadataType: c } = a;
867
+ return fa(s, e, i);
868
+ const a = e, { operator: r = ls, values: o = [], logic: l, metadataType: c } = a;
855
869
  if (o.length === 0) return [];
856
870
  if (o.length === 1 && (o[0] === K || o[0] === G)) {
857
- const p = c === C.GEO_POINT ? x.IS + "~" : x.IS;
871
+ const p = c === x.GEO_POINT ? w.IS + "~" : w.IS;
858
872
  return [`${s}${p}"${o[0]}"`];
859
873
  }
860
- if ((c === C.NUMERIC || c === C.DECIMAL2) && r === x.RANGE)
861
- return [`${s}${x.IS}"${o.join('","')}"`];
862
- if (c === C.GEO_POINT) {
874
+ if ((c === x.NUMERIC || c === x.DECIMAL2) && r === w.RANGE)
875
+ return [`${s}${w.IS}"${o.join('","')}"`];
876
+ if (c === x.GEO_POINT) {
863
877
  const p = o.map((u) => {
864
878
  const v = u.indexOf("..");
865
879
  if (v === -1) return `(${u})`;
@@ -870,8 +884,8 @@ function ua(t, e) {
870
884
  }
871
885
  return xe(s, r, o, ",", l);
872
886
  }
873
- function ga(t, e, s) {
874
- const i = hs(t, e);
887
+ function fa(t, e, s) {
888
+ const i = us(t, e);
875
889
  return !s || i.length === 0 ? i : i.map((a) => {
876
890
  const r = a.search(/[^a-zA-Z0-9_]/);
877
891
  if (r === -1) return `"${a}"`;
@@ -879,32 +893,32 @@ function ga(t, e, s) {
879
893
  return `"${o}${c}"`;
880
894
  });
881
895
  }
882
- function fa(t) {
896
+ function va(t) {
883
897
  return t.startsWith("date_");
884
898
  }
885
- function va(t) {
886
- for (const e of is)
899
+ function ma(t) {
900
+ for (const e of rs)
887
901
  if (t.startsWith(e))
888
902
  return t.slice(e.length);
889
903
  return t;
890
904
  }
891
- function es(t) {
905
+ function ts(t) {
892
906
  return t.map((e) => e.replace(/#/g, ""));
893
907
  }
894
- const ma = /* @__PURE__ */ new Set([
908
+ const ba = /* @__PURE__ */ new Set([
895
909
  m.DATE,
896
910
  m.LICENSE_EXPIRY,
897
- V.DUE_DATE
911
+ B.DUE_DATE
898
912
  ]);
899
- function Ue(t) {
913
+ function Be(t) {
900
914
  if (!t) return {};
901
915
  const e = {};
902
916
  for (const [s, i] of Object.entries(t))
903
- i && (e[s] = ba(s, i));
917
+ i && (e[s] = _a(s, i));
904
918
  return e;
905
919
  }
906
- function ba(t, e) {
907
- return e.type === "string" || e.type === "date" ? e : ma.has(t) ? {
920
+ function _a(t, e) {
921
+ return e.type === "string" || e.type === "date" ? e : ba.has(t) ? {
908
922
  type: "date",
909
923
  field: e.field ?? "created",
910
924
  kind: e.kind ?? null,
@@ -918,13 +932,13 @@ function ba(t, e) {
918
932
  ...e.logic !== void 0 && { logic: e.logic }
919
933
  };
920
934
  }
921
- function _a(t) {
922
- const e = localStorage.getItem(rs + t), s = localStorage.getItem(os + t);
935
+ function ya(t) {
936
+ const e = localStorage.getItem(os + t), s = localStorage.getItem(ns + t);
923
937
  let i;
924
938
  try {
925
- i = e ? JSON.parse(e) : [...Wt];
939
+ i = e ? JSON.parse(e) : [...Qt];
926
940
  } catch {
927
- i = [...Wt];
941
+ i = [...Qt];
928
942
  }
929
943
  let a;
930
944
  try {
@@ -934,70 +948,70 @@ function _a(t) {
934
948
  }
935
949
  return { pinnedFilters: i, pinnedMetadata: a };
936
950
  }
937
- function ya(t, e) {
938
- localStorage.setItem(rs + t, JSON.stringify(e));
939
- }
940
951
  function xa(t, e) {
941
952
  localStorage.setItem(os + t, JSON.stringify(e));
942
953
  }
943
- const us = "sort-by", gs = "sort-order";
944
- function ts(t, e) {
954
+ function wa(t, e) {
955
+ localStorage.setItem(ns + t, JSON.stringify(e));
956
+ }
957
+ const gs = "sort-by", fs = "sort-order";
958
+ function ss(t, e) {
945
959
  try {
946
- localStorage.setItem(us, t), localStorage.setItem(gs, e);
960
+ localStorage.setItem(gs, t), localStorage.setItem(fs, e);
947
961
  } catch {
948
962
  }
949
963
  }
950
964
  function $a() {
951
965
  try {
952
- const t = localStorage.getItem(us), e = localStorage.getItem(gs);
966
+ const t = localStorage.getItem(gs), e = localStorage.getItem(fs);
953
967
  return { sortBy: t, sortDirection: e };
954
968
  } catch {
955
969
  return { sortBy: null, sortDirection: null };
956
970
  }
957
971
  }
958
- const fs = "ap-last-folder", vs = "ap-last-view";
959
- function ss(t) {
972
+ const vs = "ap-last-folder", ms = "ap-last-view";
973
+ function as(t) {
960
974
  try {
961
- localStorage.setItem(fs, t);
975
+ localStorage.setItem(vs, t);
962
976
  } catch {
963
977
  }
964
978
  }
965
- function wa() {
979
+ function ka() {
966
980
  try {
967
- return localStorage.getItem(fs);
981
+ return localStorage.getItem(vs);
968
982
  } catch {
969
983
  return null;
970
984
  }
971
985
  }
972
- function ka(t) {
986
+ function Sa(t) {
973
987
  try {
974
- localStorage.setItem(vs, t);
988
+ localStorage.setItem(ms, t);
975
989
  } catch {
976
990
  }
977
991
  }
978
- function Sa() {
992
+ function Ca() {
979
993
  try {
980
- return localStorage.getItem(vs);
994
+ return localStorage.getItem(ms);
981
995
  } catch {
982
996
  return null;
983
997
  }
984
998
  }
985
- function Ca(t) {
999
+ function Fa(t) {
986
1000
  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;
987
1001
  return [i, a, r];
988
1002
  }
989
- function Et(t) {
1003
+ function At(t) {
990
1004
  return t <= 0.04045 ? t / 12.92 : Math.pow((t + 0.055) / 1.055, 2.4);
991
1005
  }
992
- function Fa(t, e, s) {
993
- const i = Et(t), a = Et(e), r = Et(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, b = 0.0259040371 * p + 0.7827717662 * u - 0.808675766 * v, E = Math.sqrt(g * g + b * b);
1006
+ function Ea(t, e, s) {
1007
+ const i = At(t), a = At(e), r = At(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, b = 0.0259040371 * p + 0.7827717662 * u - 0.808675766 * v, E = Math.sqrt(g * g + b * b);
994
1008
  let y = Math.atan2(b, g) * (180 / Math.PI);
995
1009
  return y < 0 && (y += 360), [d, E, y];
996
1010
  }
997
- function Ea(t) {
1011
+ function Aa(t) {
998
1012
  return t > 0.7;
999
1013
  }
1000
- function Aa(t, e) {
1014
+ function Ta(t, e) {
1001
1015
  const s = [
1002
1016
  "--ap-primary",
1003
1017
  "--ap-primary-foreground",
@@ -1013,18 +1027,18 @@ function Aa(t, e) {
1013
1027
  t.style.removeProperty(v);
1014
1028
  return;
1015
1029
  }
1016
- const [i, a, r] = Ca(e), [o, l, c] = Fa(i, a, r), p = `oklch(${o.toFixed(3)} ${l.toFixed(3)} ${c.toFixed(1)})`, u = Ea(o) ? "#000" : "#fff";
1030
+ const [i, a, r] = Fa(e), [o, l, c] = Ea(i, a, r), p = `oklch(${o.toFixed(3)} ${l.toFixed(3)} ${c.toFixed(1)})`, u = Aa(o) ? "#000" : "#fff";
1017
1031
  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)`);
1018
1032
  }
1019
- const It = [
1033
+ const Dt = [
1020
1034
  { value: "name", label: "Name" },
1021
1035
  { value: "created_at", label: "Uploaded" },
1022
1036
  { value: "modified_at", label: "Modified" },
1023
1037
  { value: "size", label: "Size" },
1024
1038
  { value: "type", label: "Format" }
1025
- ], Ta = [
1039
+ ], Ma = [
1026
1040
  { value: "relevance", label: "Relevance" },
1027
- ...It
1041
+ ...Dt
1028
1042
  ], Oa = [
1029
1043
  { value: "name", label: "Name" },
1030
1044
  { value: "created_at", label: "Uploaded" },
@@ -1032,12 +1046,12 @@ const It = [
1032
1046
  { value: "files_count_recursive", label: "Assets count" },
1033
1047
  { value: "files_size_recursive", label: "Assets size" }
1034
1048
  ];
1035
- var Ma = Object.defineProperty, Pa = Object.getOwnPropertyDescriptor, Dt = (t, e, s, i) => {
1036
- for (var a = i > 1 ? void 0 : i ? Pa(e, s) : e, r = t.length - 1, o; r >= 0; r--)
1049
+ var Pa = Object.defineProperty, La = Object.getOwnPropertyDescriptor, zt = (t, e, s, i) => {
1050
+ for (var a = i > 1 ? void 0 : i ? La(e, s) : e, r = t.length - 1, o; r >= 0; r--)
1037
1051
  (o = t[r]) && (a = (i ? o(e, s, a) : o(a)) || a);
1038
- return i && a && Ma(e, s, a), a;
1052
+ return i && a && Pa(e, s, a), a;
1039
1053
  };
1040
- let qe = class extends w {
1054
+ let qe = class extends k {
1041
1055
  constructor() {
1042
1056
  super(...arguments), this.open = !1;
1043
1057
  }
@@ -1158,16 +1172,16 @@ qe.styles = $`
1158
1172
  }
1159
1173
  }
1160
1174
  `;
1161
- Dt([
1175
+ zt([
1162
1176
  h({ type: Boolean })
1163
1177
  ], qe.prototype, "open", 2);
1164
- Dt([
1178
+ zt([
1165
1179
  Se("dialog")
1166
1180
  ], qe.prototype, "dialog", 2);
1167
- qe = Dt([
1168
- k("ap-modal")
1181
+ qe = zt([
1182
+ S("ap-modal")
1169
1183
  ], qe);
1170
- function La(t, e) {
1184
+ function Ia(t, e) {
1171
1185
  let s;
1172
1186
  const i = ((...a) => {
1173
1187
  clearTimeout(s), s = setTimeout(() => t(...a), e);
@@ -1179,12 +1193,12 @@ const ie = $`
1179
1193
  box-sizing: border-box;
1180
1194
  }
1181
1195
  `;
1182
- var Ia = Object.defineProperty, Da = Object.getOwnPropertyDescriptor, mt = (t, e, s, i) => {
1183
- for (var a = i > 1 ? void 0 : i ? Da(e, s) : e, r = t.length - 1, o; r >= 0; r--)
1196
+ var Da = Object.defineProperty, za = Object.getOwnPropertyDescriptor, mt = (t, e, s, i) => {
1197
+ for (var a = i > 1 ? void 0 : i ? za(e, s) : e, r = t.length - 1, o; r >= 0; r--)
1184
1198
  (o = t[r]) && (a = (i ? o(e, s, a) : o(a)) || a);
1185
- return i && a && Ia(e, s, a), a;
1199
+ return i && a && Da(e, s, a), a;
1186
1200
  };
1187
- let Pe = class extends w {
1201
+ let Pe = class extends k {
1188
1202
  constructor() {
1189
1203
  super(...arguments), this.groups = [], this.selectedFilters = {}, this._open = !1, this._handleOutsideClick = (t) => {
1190
1204
  this._open && !t.composedPath().includes(this) && (this._open = !1);
@@ -1338,20 +1352,20 @@ mt([
1338
1352
  _()
1339
1353
  ], Pe.prototype, "_open", 2);
1340
1354
  Pe = mt([
1341
- k("ap-regional-settings")
1355
+ S("ap-regional-settings")
1342
1356
  ], Pe);
1343
- var za = Object.defineProperty, Ra = Object.getOwnPropertyDescriptor, re = (t, e, s, i) => {
1344
- for (var a = i > 1 ? void 0 : i ? Ra(e, s) : e, r = t.length - 1, o; r >= 0; r--)
1357
+ var Ra = Object.defineProperty, Na = Object.getOwnPropertyDescriptor, re = (t, e, s, i) => {
1358
+ for (var a = i > 1 ? void 0 : i ? Na(e, s) : e, r = t.length - 1, o; r >= 0; r--)
1345
1359
  (o = t[r]) && (a = (i ? o(e, s, a) : o(a)) || a);
1346
- return i && a && za(e, s, a), a;
1360
+ return i && a && Ra(e, s, a), a;
1347
1361
  };
1348
- const Na = [
1362
+ const ja = [
1349
1363
  { value: "assets", label: "Assets", icon: "gallery-vertical-end" },
1350
1364
  { value: "folders", label: "Folders", icon: "folder-open" }
1351
1365
  ];
1352
- let W = class extends w {
1366
+ let W = class extends k {
1353
1367
  constructor() {
1354
- 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 = La((t) => {
1368
+ 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 = Ia((t) => {
1355
1369
  (t.length === 0 || t.length >= 3) && this.dispatchEvent(new CustomEvent("search-change", { detail: { value: t }, bubbles: !0, composed: !0 }));
1356
1370
  }, 300);
1357
1371
  }
@@ -1387,7 +1401,7 @@ let W = class extends w {
1387
1401
  }
1388
1402
  render() {
1389
1403
  var e, s;
1390
- const t = Na.filter((i) => this.tabs.includes(i.value));
1404
+ const t = ja.filter((i) => this.tabs.includes(i.value));
1391
1405
  return ((e = t.find((i) => i.value === this.activeTab)) == null ? void 0 : e.label) ?? ((s = t[0]) == null || s.label), n`
1392
1406
  <div class="header-row">
1393
1407
  ${t.length > 1 ? n`<ap-dropdown
@@ -1566,14 +1580,14 @@ re([
1566
1580
  _()
1567
1581
  ], W.prototype, "_localSearch", 2);
1568
1582
  W = re([
1569
- k("ap-header")
1583
+ S("ap-header")
1570
1584
  ], W);
1571
- var ja = Object.defineProperty, Ba = Object.getOwnPropertyDescriptor, ms = (t, e, s, i) => {
1585
+ var Ua = Object.defineProperty, Ba = Object.getOwnPropertyDescriptor, bs = (t, e, s, i) => {
1572
1586
  for (var a = i > 1 ? void 0 : i ? Ba(e, s) : e, r = t.length - 1, o; r >= 0; r--)
1573
1587
  (o = t[r]) && (a = (i ? o(e, s, a) : o(a)) || a);
1574
- return i && a && ja(e, s, a), a;
1588
+ return i && a && Ua(e, s, a), a;
1575
1589
  };
1576
- let ot = class extends w {
1590
+ let ot = class extends k {
1577
1591
  constructor() {
1578
1592
  super(...arguments), this.items = [];
1579
1593
  }
@@ -1628,18 +1642,18 @@ ot.styles = $`
1628
1642
  color: var(--ap-muted-foreground, oklch(0.685 0.033 249.82));
1629
1643
  }
1630
1644
  `;
1631
- ms([
1645
+ bs([
1632
1646
  h({ type: Array })
1633
1647
  ], ot.prototype, "items", 2);
1634
- ot = ms([
1635
- k("ap-breadcrumb")
1648
+ ot = bs([
1649
+ S("ap-breadcrumb")
1636
1650
  ], ot);
1637
- var Ua = Object.defineProperty, Va = Object.getOwnPropertyDescriptor, zt = (t, e, s, i) => {
1638
- for (var a = i > 1 ? void 0 : i ? Va(e, s) : e, r = t.length - 1, o; r >= 0; r--)
1651
+ var Va = Object.defineProperty, qa = Object.getOwnPropertyDescriptor, Rt = (t, e, s, i) => {
1652
+ for (var a = i > 1 ? void 0 : i ? qa(e, s) : e, r = t.length - 1, o; r >= 0; r--)
1639
1653
  (o = t[r]) && (a = (i ? o(e, s, a) : o(a)) || a);
1640
- return i && a && Ua(e, s, a), a;
1654
+ return i && a && Va(e, s, a), a;
1641
1655
  };
1642
- let He = class extends w {
1656
+ let He = class extends k {
1643
1657
  constructor() {
1644
1658
  super(...arguments), this.title = "", this.open = !1;
1645
1659
  }
@@ -1658,7 +1672,7 @@ He.styles = $`
1658
1672
  }
1659
1673
  .popover {
1660
1674
  position: absolute;
1661
- top: calc(100% + 8px);
1675
+ top: calc(100% + 4px);
1662
1676
  left: 20px;
1663
1677
  z-index: 50;
1664
1678
  width: 320px;
@@ -1678,21 +1692,21 @@ He.styles = $`
1678
1692
  margin-bottom: 12px;
1679
1693
  }
1680
1694
  `;
1681
- zt([
1695
+ Rt([
1682
1696
  h()
1683
1697
  ], He.prototype, "title", 2);
1684
- zt([
1698
+ Rt([
1685
1699
  h({ type: Boolean })
1686
1700
  ], He.prototype, "open", 2);
1687
- He = zt([
1688
- k("ap-filter-popover")
1701
+ He = Rt([
1702
+ S("ap-filter-popover")
1689
1703
  ], He);
1690
- var qa = Object.defineProperty, Ha = Object.getOwnPropertyDescriptor, bs = (t, e, s, i) => {
1691
- for (var a = i > 1 ? void 0 : i ? Ha(e, s) : e, r = t.length - 1, o; r >= 0; r--)
1704
+ var Ha = Object.defineProperty, Ka = Object.getOwnPropertyDescriptor, _s = (t, e, s, i) => {
1705
+ for (var a = i > 1 ? void 0 : i ? Ka(e, s) : e, r = t.length - 1, o; r >= 0; r--)
1692
1706
  (o = t[r]) && (a = (i ? o(e, s, a) : o(a)) || a);
1693
- return i && a && qa(e, s, a), a;
1707
+ return i && a && Ha(e, s, a), a;
1694
1708
  };
1695
- let nt = class extends w {
1709
+ let nt = class extends k {
1696
1710
  constructor() {
1697
1711
  super(...arguments), this.selected = [];
1698
1712
  }
@@ -1703,7 +1717,7 @@ let nt = class extends w {
1703
1717
  detail: {
1704
1718
  key: m.TYPE,
1705
1719
  values: e,
1706
- operator: x.IS
1720
+ operator: w.IS
1707
1721
  },
1708
1722
  bubbles: !0,
1709
1723
  composed: !0
@@ -1714,7 +1728,7 @@ let nt = class extends w {
1714
1728
  return n`
1715
1729
  <div class="options">
1716
1730
  <span class="section-label">Formats</span>
1717
- ${ls.map(
1731
+ ${cs.map(
1718
1732
  (t) => n`
1719
1733
  <div
1720
1734
  class="option ${this.selected.includes(t.value) ? "selected" : ""}"
@@ -1780,11 +1794,11 @@ nt.styles = $`
1780
1794
  color: var(--ap-primary, oklch(0.578 0.198 268.129));
1781
1795
  }
1782
1796
  `;
1783
- bs([
1797
+ _s([
1784
1798
  h({ type: Array })
1785
1799
  ], nt.prototype, "selected", 2);
1786
- nt = bs([
1787
- k("ap-filter-type")
1800
+ nt = _s([
1801
+ S("ap-filter-type")
1788
1802
  ], nt);
1789
1803
  const oe = $`
1790
1804
  :host {
@@ -1903,6 +1917,28 @@ const oe = $`
1903
1917
  color: var(--ap-muted-foreground, oklch(0.685 0.033 249.82));
1904
1918
  }
1905
1919
 
1920
+ /* ── Date input: Lucide calendar icon ── */
1921
+ .filter-input[type="date"]::-webkit-calendar-picker-indicator {
1922
+ opacity: 0;
1923
+ position: absolute;
1924
+ right: 0;
1925
+ top: 0;
1926
+ width: 100%;
1927
+ height: 100%;
1928
+ cursor: pointer;
1929
+ }
1930
+ .filter-input[type="date"] {
1931
+ position: relative;
1932
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 2v4'/%3E%3Cpath d='M16 2v4'/%3E%3Crect width='18' height='18' x='3' y='4' rx='2'/%3E%3Cpath d='M3 10h18'/%3E%3C/svg%3E");
1933
+ background-repeat: no-repeat;
1934
+ background-position: right 10px center;
1935
+ background-size: 16px 16px;
1936
+ padding-right: 32px;
1937
+ }
1938
+ .input-label:has(+ .filter-input[type="date"]) {
1939
+ font-weight: 400;
1940
+ }
1941
+
1906
1942
  textarea.filter-input {
1907
1943
  min-height: 60px;
1908
1944
  resize: vertical;
@@ -2039,15 +2075,15 @@ const oe = $`
2039
2075
  color: var(--ap-muted-foreground, oklch(0.685 0.033 249.82));
2040
2076
  }
2041
2077
  `;
2042
- var Ka = Object.defineProperty, Ga = Object.getOwnPropertyDescriptor, Ce = (t, e, s, i) => {
2043
- for (var a = i > 1 ? void 0 : i ? Ga(e, s) : e, r = t.length - 1, o; r >= 0; r--)
2078
+ var Ga = Object.defineProperty, Ya = Object.getOwnPropertyDescriptor, Ce = (t, e, s, i) => {
2079
+ for (var a = i > 1 ? void 0 : i ? Ya(e, s) : e, r = t.length - 1, o; r >= 0; r--)
2044
2080
  (o = t[r]) && (a = (i ? o(e, s, a) : o(a)) || a);
2045
- return i && a && Ka(e, s, a), a;
2081
+ return i && a && Ga(e, s, a), a;
2046
2082
  };
2047
- function At(t) {
2083
+ function Tt(t) {
2048
2084
  return t.toISOString().split("T")[0];
2049
2085
  }
2050
- let te = class extends w {
2086
+ let te = class extends k {
2051
2087
  constructor() {
2052
2088
  super(...arguments), this.filterKey = m.DATE, this.field = "created", this.kind = null, this.preset = "", this.from = "", this.to = "";
2053
2089
  }
@@ -2055,10 +2091,10 @@ let te = class extends w {
2055
2091
  return this.filterKey === m.LICENSE_EXPIRY;
2056
2092
  }
2057
2093
  get _rangeOptions() {
2058
- return this._isLicenseExpiry ? ds : Lt;
2094
+ return this._isLicenseExpiry ? ps : It;
2059
2095
  }
2060
2096
  get _todayStr() {
2061
- return At(/* @__PURE__ */ new Date());
2097
+ return Tt(/* @__PURE__ */ new Date());
2062
2098
  }
2063
2099
  get _hasFilter() {
2064
2100
  return !!(this.kind || this.preset || this.from || this.to);
@@ -2076,7 +2112,7 @@ let te = class extends w {
2076
2112
  this.from = "", this.to = "", this.requestUpdate();
2077
2113
  return;
2078
2114
  }
2079
- const s = ps(t);
2115
+ const s = hs(t);
2080
2116
  s && (this.from = s.from, this.to = s.to ?? ""), this._dispatchChange();
2081
2117
  }
2082
2118
  _clearAll() {
@@ -2113,7 +2149,7 @@ let te = class extends w {
2113
2149
  <div class="filter-section">
2114
2150
  <span class="section-label">Date type</span>
2115
2151
  <ap-radio-group
2116
- .options=${cs}
2152
+ .options=${ds}
2117
2153
  .value=${this.field}
2118
2154
  @ap-change=${(t) => this._selectField(t.detail.value)}
2119
2155
  ></ap-radio-group>
@@ -2136,7 +2172,7 @@ let te = class extends w {
2136
2172
  _renderDateInputs() {
2137
2173
  const t = this.preset;
2138
2174
  if (!["before", "after", "between", "specific"].includes(t)) return f;
2139
- const e = this.from ? At(new Date(this.from)) : "", s = this.to ? At(new Date(this.to)) : "", i = this._todayStr;
2175
+ const e = this.from ? Tt(new Date(this.from)) : "", s = this.to ? Tt(new Date(this.to)) : "", i = this._todayStr;
2140
2176
  return t === "specific" ? n`
2141
2177
  <div class="filter-section date-inputs">
2142
2178
  <div>
@@ -2243,14 +2279,14 @@ Ce([
2243
2279
  h()
2244
2280
  ], te.prototype, "to", 2);
2245
2281
  te = Ce([
2246
- k("ap-filter-date")
2282
+ S("ap-filter-date")
2247
2283
  ], te);
2248
- var Ya = Object.defineProperty, Xa = Object.getOwnPropertyDescriptor, ze = (t, e, s, i) => {
2249
- for (var a = i > 1 ? void 0 : i ? Xa(e, s) : e, r = t.length - 1, o; r >= 0; r--)
2284
+ var Xa = Object.defineProperty, Wa = Object.getOwnPropertyDescriptor, ze = (t, e, s, i) => {
2285
+ for (var a = i > 1 ? void 0 : i ? Wa(e, s) : e, r = t.length - 1, o; r >= 0; r--)
2250
2286
  (o = t[r]) && (a = (i ? o(e, s, a) : o(a)) || a);
2251
- return i && a && Ya(e, s, a), a;
2287
+ return i && a && Xa(e, s, a), a;
2252
2288
  };
2253
- let de = class extends w {
2289
+ let de = class extends k {
2254
2290
  constructor() {
2255
2291
  super(...arguments), this.tags = [], this.selected = [], this.filterKey = m.TAGS, this._search = "";
2256
2292
  }
@@ -2281,7 +2317,7 @@ let de = class extends w {
2281
2317
  detail: {
2282
2318
  key: this.filterKey,
2283
2319
  values: s,
2284
- operator: x.IS
2320
+ operator: w.IS
2285
2321
  },
2286
2322
  bubbles: !0,
2287
2323
  composed: !0
@@ -2295,7 +2331,7 @@ let de = class extends w {
2295
2331
  detail: {
2296
2332
  key: this.filterKey,
2297
2333
  values: e,
2298
- operator: x.IS
2334
+ operator: w.IS
2299
2335
  },
2300
2336
  bubbles: !0,
2301
2337
  composed: !0
@@ -2308,7 +2344,7 @@ let de = class extends w {
2308
2344
  detail: {
2309
2345
  key: this.filterKey,
2310
2346
  values: [],
2311
- operator: x.IS
2347
+ operator: w.IS
2312
2348
  },
2313
2349
  bubbles: !0,
2314
2350
  composed: !0
@@ -2543,14 +2579,14 @@ ze([
2543
2579
  _()
2544
2580
  ], de.prototype, "_search", 2);
2545
2581
  de = ze([
2546
- k("ap-filter-tags")
2582
+ S("ap-filter-tags")
2547
2583
  ], de);
2548
- var Wa = Object.defineProperty, Qa = Object.getOwnPropertyDescriptor, Qe = (t, e, s, i) => {
2549
- for (var a = i > 1 ? void 0 : i ? Qa(e, s) : e, r = t.length - 1, o; r >= 0; r--)
2584
+ var Qa = Object.defineProperty, Za = Object.getOwnPropertyDescriptor, Qe = (t, e, s, i) => {
2585
+ for (var a = i > 1 ? void 0 : i ? Za(e, s) : e, r = t.length - 1, o; r >= 0; r--)
2550
2586
  (o = t[r]) && (a = (i ? o(e, s, a) : o(a)) || a);
2551
- return i && a && Wa(e, s, a), a;
2587
+ return i && a && Qa(e, s, a), a;
2552
2588
  };
2553
- let $e = class extends w {
2589
+ let we = class extends k {
2554
2590
  constructor() {
2555
2591
  super(...arguments), this.labels = [], this.selected = [], this._search = "";
2556
2592
  }
@@ -2561,7 +2597,7 @@ let $e = class extends w {
2561
2597
  });
2562
2598
  }
2563
2599
  get _atLimit() {
2564
- return this.selected.length >= $t;
2600
+ return this.selected.length >= wt;
2565
2601
  }
2566
2602
  get _isSearching() {
2567
2603
  return this._search.trim().length > 0;
@@ -2575,7 +2611,7 @@ let $e = class extends w {
2575
2611
  detail: {
2576
2612
  key: m.LABELS,
2577
2613
  values: s,
2578
- operator: x.IS
2614
+ operator: w.IS
2579
2615
  },
2580
2616
  bubbles: !0,
2581
2617
  composed: !0
@@ -2589,7 +2625,7 @@ let $e = class extends w {
2589
2625
  detail: {
2590
2626
  key: m.LABELS,
2591
2627
  values: e,
2592
- operator: x.IS
2628
+ operator: w.IS
2593
2629
  },
2594
2630
  bubbles: !0,
2595
2631
  composed: !0
@@ -2602,7 +2638,7 @@ let $e = class extends w {
2602
2638
  detail: {
2603
2639
  key: m.LABELS,
2604
2640
  values: [],
2605
- operator: x.IS
2641
+ operator: w.IS
2606
2642
  },
2607
2643
  bubbles: !0,
2608
2644
  composed: !0
@@ -2623,7 +2659,7 @@ let $e = class extends w {
2623
2659
  return n`
2624
2660
  <div
2625
2661
  class="label-item ${s ? "disabled" : ""}"
2626
- title=${s ? `You can select up to ${$t} labels` : f}
2662
+ title=${s ? `You can select up to ${wt} labels` : f}
2627
2663
  @click=${() => !s && this._toggle(t.sid)}
2628
2664
  >
2629
2665
  <ap-checkbox ?checked=${e}></ap-checkbox>
@@ -2698,14 +2734,14 @@ let $e = class extends w {
2698
2734
  ${this._atLimit ? n`
2699
2735
  <div class="info-alert">
2700
2736
  <ap-icon name="info" .size=${14}></ap-icon>
2701
- <span>You can select up to ${$t} labels.</span>
2737
+ <span>You can select up to ${wt} labels.</span>
2702
2738
  </div>
2703
2739
  ` : f}
2704
2740
  </div>
2705
2741
  `;
2706
2742
  }
2707
2743
  };
2708
- $e.styles = [oe, $`
2744
+ we.styles = [oe, $`
2709
2745
  .label-item {
2710
2746
  display: flex;
2711
2747
  align-items: center;
@@ -2757,34 +2793,34 @@ $e.styles = [oe, $`
2757
2793
  `];
2758
2794
  Qe([
2759
2795
  h({ type: Array })
2760
- ], $e.prototype, "labels", 2);
2796
+ ], we.prototype, "labels", 2);
2761
2797
  Qe([
2762
2798
  h({ type: Array })
2763
- ], $e.prototype, "selected", 2);
2799
+ ], we.prototype, "selected", 2);
2764
2800
  Qe([
2765
2801
  Se(".search-input")
2766
- ], $e.prototype, "_searchInput", 2);
2802
+ ], we.prototype, "_searchInput", 2);
2767
2803
  Qe([
2768
2804
  _()
2769
- ], $e.prototype, "_search", 2);
2770
- $e = Qe([
2771
- k("ap-filter-labels")
2772
- ], $e);
2773
- var Za = Object.defineProperty, Ja = Object.getOwnPropertyDescriptor, Re = (t, e, s, i) => {
2774
- for (var a = i > 1 ? void 0 : i ? Ja(e, s) : e, r = t.length - 1, o; r >= 0; r--)
2805
+ ], we.prototype, "_search", 2);
2806
+ we = Qe([
2807
+ S("ap-filter-labels")
2808
+ ], we);
2809
+ var Ja = Object.defineProperty, ei = Object.getOwnPropertyDescriptor, Re = (t, e, s, i) => {
2810
+ for (var a = i > 1 ? void 0 : i ? ei(e, s) : e, r = t.length - 1, o; r >= 0; r--)
2775
2811
  (o = t[r]) && (a = (i ? o(e, s, a) : o(a)) || a);
2776
- return i && a && Za(e, s, a), a;
2812
+ return i && a && Ja(e, s, a), a;
2777
2813
  };
2778
- const Tt = 3, Pt = /^#[0-9A-Fa-f]{6}$/;
2779
- function ei(t) {
2814
+ const Mt = 3, Lt = /^#[0-9A-Fa-f]{6}$/;
2815
+ function ti(t) {
2780
2816
  const e = t.trim().split(/\s+/);
2781
- return e.length < 1 || !Pt.test(e[0]) ? null : {
2817
+ return e.length < 1 || !Lt.test(e[0]) ? null : {
2782
2818
  hex: e[0],
2783
2819
  tolerance: e[1] || rt,
2784
2820
  coverage: e[3] || it
2785
2821
  };
2786
2822
  }
2787
- let pe = class extends w {
2823
+ let pe = class extends k {
2788
2824
  constructor() {
2789
2825
  super(...arguments), this.values = [], this._colors = [], this._advanced = !1, this._showPalette = !1, this._initialized = !1;
2790
2826
  }
@@ -2798,7 +2834,7 @@ let pe = class extends w {
2798
2834
  if (t.has("values")) {
2799
2835
  const e = [];
2800
2836
  for (const s of this.values) {
2801
- const i = ei(s);
2837
+ const i = ti(s);
2802
2838
  i && e.push(i);
2803
2839
  }
2804
2840
  (!this._initialized || this.values.length === 0 && this._colors.length > 0) && (this._colors = e, e.length > 0 && (this._advanced = e.some(
@@ -2807,13 +2843,13 @@ let pe = class extends w {
2807
2843
  }
2808
2844
  }
2809
2845
  _selectColor(t) {
2810
- if (!Pt.test(t)) return;
2846
+ if (!Lt.test(t)) return;
2811
2847
  const e = this._colors.findIndex((s) => s.hex.toLowerCase() === t.toLowerCase());
2812
2848
  if (e >= 0) {
2813
2849
  this._removeColor(e);
2814
2850
  return;
2815
2851
  }
2816
- this._colors.length >= Tt || (this._colors = [
2852
+ this._colors.length >= Mt || (this._colors = [
2817
2853
  ...this._colors,
2818
2854
  {
2819
2855
  hex: t,
@@ -2833,7 +2869,7 @@ let pe = class extends w {
2833
2869
  }
2834
2870
  _handleHexInput(t, e) {
2835
2871
  let i = e.target.value.trim();
2836
- if (i.startsWith("#") || (i = "#" + i), !Pt.test(i) || this._colors.some(
2872
+ if (i.startsWith("#") || (i = "#" + i), !Lt.test(i) || this._colors.some(
2837
2873
  (o, l) => l !== t && o.hex.toLowerCase() === i.toLowerCase()
2838
2874
  )) return;
2839
2875
  const r = [...this._colors];
@@ -2877,10 +2913,10 @@ let pe = class extends w {
2877
2913
  );
2878
2914
  }
2879
2915
  _renderPalette() {
2880
- const t = this._selectedHexes, e = this._colors.length >= Tt;
2916
+ const t = this._selectedHexes, e = this._colors.length >= Mt;
2881
2917
  return n`
2882
2918
  <div class="palette">
2883
- ${Qs.map(
2919
+ ${Zs.map(
2884
2920
  (s) => {
2885
2921
  const i = t.has(s), a = e && !i;
2886
2922
  return n`
@@ -2917,7 +2953,7 @@ let pe = class extends w {
2917
2953
  <span class="adv-field-label">Difference</span>
2918
2954
  <ap-dropdown
2919
2955
  .value=${t.tolerance}
2920
- .options=${Zs}
2956
+ .options=${Js}
2921
2957
  @ap-change=${(s) => this._handleToleranceChange(e, s)}
2922
2958
  ></ap-dropdown>
2923
2959
  </div>
@@ -2956,7 +2992,7 @@ let pe = class extends w {
2956
2992
  `;
2957
2993
  }
2958
2994
  render() {
2959
- const t = this._colors.length === 0 || this._showPalette, e = this._colors.length < Tt && !this._showPalette;
2995
+ const t = this._colors.length === 0 || this._showPalette, e = this._colors.length < Mt && !this._showPalette;
2960
2996
  return n`
2961
2997
  <div class="filter-content">
2962
2998
  <button
@@ -3256,23 +3292,23 @@ Re([
3256
3292
  _()
3257
3293
  ], pe.prototype, "_initialized", 2);
3258
3294
  pe = Re([
3259
- k("ap-filter-color")
3295
+ S("ap-filter-color")
3260
3296
  ], pe);
3261
- var ti = Object.defineProperty, si = Object.getOwnPropertyDescriptor, Fe = (t, e, s, i) => {
3262
- for (var a = i > 1 ? void 0 : i ? si(e, s) : e, r = t.length - 1, o; r >= 0; r--)
3297
+ var si = Object.defineProperty, ai = Object.getOwnPropertyDescriptor, Fe = (t, e, s, i) => {
3298
+ for (var a = i > 1 ? void 0 : i ? ai(e, s) : e, r = t.length - 1, o; r >= 0; r--)
3263
3299
  (o = t[r]) && (a = (i ? o(e, s, a) : o(a)) || a);
3264
- return i && a && ti(e, s, a), a;
3300
+ return i && a && si(e, s, a), a;
3265
3301
  };
3266
- const ai = {
3302
+ const ii = {
3267
3303
  KB: 1 / 1e3,
3268
3304
  MB: 1,
3269
3305
  GB: 1e3
3270
- }, ii = [
3306
+ }, ri = [
3271
3307
  // KB disabled until backend supports sub-MB precision
3272
3308
  { value: "MB", label: "MB" },
3273
3309
  { value: "GB", label: "GB" }
3274
3310
  ];
3275
- let se = class extends w {
3311
+ let se = class extends k {
3276
3312
  constructor() {
3277
3313
  super(...arguments), this.min = 0, this.max = 0, this._minVal = "", this._maxVal = "", this._unit = "MB", this._initialized = !1;
3278
3314
  }
@@ -3289,7 +3325,7 @@ let se = class extends w {
3289
3325
  this._unit = t.detail.value, this._emitChange();
3290
3326
  }
3291
3327
  _emitChange() {
3292
- const t = ai[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;
3328
+ const t = ii[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;
3293
3329
  let i;
3294
3330
  if (e !== null && s !== null)
3295
3331
  i = `${e}..${s}`;
@@ -3303,7 +3339,7 @@ let se = class extends w {
3303
3339
  detail: {
3304
3340
  key: m.SIZE,
3305
3341
  values: [],
3306
- operator: x.RANGE
3342
+ operator: w.RANGE
3307
3343
  },
3308
3344
  bubbles: !0,
3309
3345
  composed: !0
@@ -3316,7 +3352,7 @@ let se = class extends w {
3316
3352
  detail: {
3317
3353
  key: m.SIZE,
3318
3354
  values: [i],
3319
- operator: x.RANGE
3355
+ operator: w.RANGE
3320
3356
  },
3321
3357
  bubbles: !0,
3322
3358
  composed: !0
@@ -3367,7 +3403,7 @@ let se = class extends w {
3367
3403
  <div>
3368
3404
  <span class="input-label">Unit</span>
3369
3405
  <ap-dropdown
3370
- .options=${ii}
3406
+ .options=${ri}
3371
3407
  .value=${this._unit}
3372
3408
  @ap-change=${this._setUnit}
3373
3409
  ></ap-dropdown>
@@ -3419,26 +3455,26 @@ Fe([
3419
3455
  _()
3420
3456
  ], se.prototype, "_initialized", 2);
3421
3457
  se = Fe([
3422
- k("ap-filter-size")
3458
+ S("ap-filter-size")
3423
3459
  ], se);
3424
- var ri = Object.defineProperty, oi = Object.getOwnPropertyDescriptor, bt = (t, e, s, i) => {
3425
- for (var a = i > 1 ? void 0 : i ? oi(e, s) : e, r = t.length - 1, o; r >= 0; r--)
3460
+ var oi = Object.defineProperty, ni = Object.getOwnPropertyDescriptor, bt = (t, e, s, i) => {
3461
+ for (var a = i > 1 ? void 0 : i ? ni(e, s) : e, r = t.length - 1, o; r >= 0; r--)
3426
3462
  (o = t[r]) && (a = (i ? o(e, s, a) : o(a)) || a);
3427
- return i && a && ri(e, s, a), a;
3463
+ return i && a && oi(e, s, a), a;
3428
3464
  };
3429
- const ni = ce`
3465
+ const li = ce`
3430
3466
  <svg width="20" height="20" viewBox="0 0 12 16" fill="none" xmlns="http://www.w3.org/2000/svg">
3431
3467
  <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"/>
3432
3468
  <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"/>
3433
3469
  <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"/>
3434
3470
  </svg>
3435
- `, li = ce`
3471
+ `, ci = ce`
3436
3472
  <svg width="20" height="20" viewBox="0 0 16 12" fill="none" xmlns="http://www.w3.org/2000/svg">
3437
3473
  <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"/>
3438
3474
  <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"/>
3439
3475
  <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"/>
3440
3476
  </svg>
3441
- `, ci = ce`
3477
+ `, di = ce`
3442
3478
  <svg width="20" height="20" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
3443
3479
  <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"/>
3444
3480
  <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"/>
@@ -3446,19 +3482,19 @@ const ni = ce`
3446
3482
  <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"/>
3447
3483
  <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"/>
3448
3484
  </svg>
3449
- `, di = ce`
3485
+ `, pi = ce`
3450
3486
  <svg width="20" height="20" viewBox="0 0 16 8" fill="none" xmlns="http://www.w3.org/2000/svg">
3451
3487
  <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"/>
3452
3488
  <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"/>
3453
3489
  <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"/>
3454
3490
  </svg>
3455
- `, pi = {
3456
- portrait: ni,
3457
- landscape: li,
3458
- square: ci,
3459
- panorama: di
3491
+ `, hi = {
3492
+ portrait: li,
3493
+ landscape: ci,
3494
+ square: di,
3495
+ panorama: pi
3460
3496
  };
3461
- let Le = class extends w {
3497
+ let Le = class extends k {
3462
3498
  constructor() {
3463
3499
  super(...arguments), this.selectedResolution = [], this.selectedOrientation = [], this.selectedFaces = [];
3464
3500
  }
@@ -3508,7 +3544,7 @@ let Le = class extends w {
3508
3544
  <div class="filter-section">
3509
3545
  <span class="section-label">Resolution</span>
3510
3546
  <div class="options-horizontal">
3511
- ${Gs.map(
3547
+ ${Ys.map(
3512
3548
  (t) => n`
3513
3549
  <ap-checkbox
3514
3550
  ?checked=${this.selectedResolution.includes(t.value)}
@@ -3524,14 +3560,14 @@ let Le = class extends w {
3524
3560
  <div class="filter-section">
3525
3561
  <span class="section-label">Orientation</span>
3526
3562
  <div class="options-vertical">
3527
- ${Ys.map(
3563
+ ${Xs.map(
3528
3564
  (t) => n`
3529
3565
  <ap-checkbox
3530
3566
  ?checked=${this.selectedOrientation.includes(t.value)}
3531
3567
  @ap-toggle=${() => {
3532
3568
  this._toggleOrientation(t.value);
3533
3569
  }}
3534
- ><span class="orientation-label">${pi[t.value]}${t.label}</span></ap-checkbox>
3570
+ ><span class="orientation-label">${hi[t.value]}${t.label}</span></ap-checkbox>
3535
3571
  `
3536
3572
  )}
3537
3573
  </div>
@@ -3540,7 +3576,7 @@ let Le = class extends w {
3540
3576
  <div class="filter-section">
3541
3577
  <span class="section-label">Faces</span>
3542
3578
  <div class="options-horizontal">
3543
- ${Xs.map(
3579
+ ${Ws.map(
3544
3580
  (t) => n`
3545
3581
  <ap-checkbox
3546
3582
  ?checked=${this.selectedFaces.includes(t.value)}
@@ -3590,17 +3626,17 @@ bt([
3590
3626
  h({ type: Array })
3591
3627
  ], Le.prototype, "selectedFaces", 2);
3592
3628
  Le = bt([
3593
- k("ap-filter-image")
3629
+ S("ap-filter-image")
3594
3630
  ], Le);
3595
- var hi = Object.defineProperty, ui = Object.getOwnPropertyDescriptor, z = (t, e, s, i) => {
3596
- for (var a = i > 1 ? void 0 : i ? ui(e, s) : e, r = t.length - 1, o; r >= 0; r--)
3631
+ var ui = Object.defineProperty, gi = Object.getOwnPropertyDescriptor, L = (t, e, s, i) => {
3632
+ for (var a = i > 1 ? void 0 : i ? gi(e, s) : e, r = t.length - 1, o; r >= 0; r--)
3597
3633
  (o = t[r]) && (a = (i ? o(e, s, a) : o(a)) || a);
3598
- return i && a && hi(e, s, a), a;
3634
+ return i && a && ui(e, s, a), a;
3599
3635
  };
3600
- function S(t) {
3636
+ function C(t) {
3601
3637
  return `${vt[t.type] || ""}${t.key}`;
3602
3638
  }
3603
- let M = class extends w {
3639
+ let P = class extends k {
3604
3640
  constructor() {
3605
3641
  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 = {};
3606
3642
  }
@@ -3621,10 +3657,10 @@ let M = class extends w {
3621
3657
  return this.visibleFields.length >= st;
3622
3658
  }
3623
3659
  _getField(t) {
3624
- return this.fields.find((e) => S(e) === t);
3660
+ return this.fields.find((e) => C(e) === t);
3625
3661
  }
3626
3662
  _getUIType(t) {
3627
- return sa[t.type];
3663
+ return aa[t.type];
3628
3664
  }
3629
3665
  _getApplied(t) {
3630
3666
  return this.appliedMetadata[t] || this.appliedFilters[t] || {};
@@ -3640,7 +3676,7 @@ let M = class extends w {
3640
3676
  }
3641
3677
  // ── Event dispatchers ────────────────────────────────────────────
3642
3678
  _emitFilterChange(t, e, s) {
3643
- const i = S(t);
3679
+ const i = C(t);
3644
3680
  this.dispatchEvent(
3645
3681
  new CustomEvent("metadata-filter-change", {
3646
3682
  detail: {
@@ -3655,7 +3691,7 @@ let M = class extends w {
3655
3691
  );
3656
3692
  }
3657
3693
  _emitFieldToggle(t, e) {
3658
- const s = S(t);
3694
+ const s = C(t);
3659
3695
  this.dispatchEvent(
3660
3696
  new CustomEvent("metadata-field-toggle", {
3661
3697
  detail: { fieldKey: s, visible: e },
@@ -3665,7 +3701,7 @@ let M = class extends w {
3665
3701
  );
3666
3702
  }
3667
3703
  _emitFieldSelect(t) {
3668
- const e = S(t);
3704
+ const e = C(t);
3669
3705
  !this.visibleFields.includes(e) && this._atFieldLimit || (this.visibleFields.includes(e) || this._emitFieldToggle(t, !0), this.dispatchEvent(
3670
3706
  new CustomEvent("metadata-field-select", {
3671
3707
  detail: { fieldKey: e },
@@ -3692,7 +3728,7 @@ let M = class extends w {
3692
3728
  }
3693
3729
  _addField(t) {
3694
3730
  if (this._atFieldLimit) return;
3695
- const e = S(t);
3731
+ const e = C(t);
3696
3732
  this.visibleFields.includes(e) || this._emitFieldToggle(t, !0);
3697
3733
  }
3698
3734
  _removeField(t) {
@@ -3704,12 +3740,12 @@ let M = class extends w {
3704
3740
  }
3705
3741
  // ── Operator change (via radio group) ─────────────────────────────
3706
3742
  _onOperatorChange(t, e) {
3707
- const i = this._getApplied(S(t)).values || [];
3743
+ const i = this._getApplied(C(t)).values || [];
3708
3744
  this._emitFilterChange(t, e, i);
3709
3745
  }
3710
3746
  // ── Content mode change ─────────────────────────────────────────
3711
3747
  _onContentModeChange(t, e) {
3712
- const s = S(t);
3748
+ const s = C(t);
3713
3749
  if (e === be) {
3714
3750
  const i = new Set(this._specificModeFields);
3715
3751
  i.add(s), this._specificModeFields = i;
@@ -3725,7 +3761,7 @@ let M = class extends w {
3725
3761
  }
3726
3762
  // ── Clear field filter ──────────────────────────────────────────
3727
3763
  _clearFieldFilter(t) {
3728
- const e = S(t);
3764
+ const e = C(t);
3729
3765
  if (this._specificModeFields.has(e)) {
3730
3766
  const d = new Set(this._specificModeFields);
3731
3767
  d.delete(e), this._specificModeFields = d;
@@ -3743,16 +3779,16 @@ let M = class extends w {
3743
3779
  }
3744
3780
  // ── Text filter ──────────────────────────────────────────────────
3745
3781
  _onTextInput(t, e) {
3746
- const s = e.target.value, a = this._getApplied(S(t)).operator || kt[0].value;
3782
+ const s = e.target.value, a = this._getApplied(C(t)).operator || kt[0].value;
3747
3783
  this._emitFilterChange(t, a, s ? [s] : []);
3748
3784
  }
3749
3785
  // ── Number filter ────────────────────────────────────────────────
3750
3786
  _onNumberInput(t, e, s) {
3751
- const i = e.target.value, a = S(t), r = this._getApplied(a), o = r.operator || Ct[0].value, l = [...r.values || []];
3787
+ const i = e.target.value, a = C(t), r = this._getApplied(a), o = r.operator || Ct[0].value, l = [...r.values || []];
3752
3788
  s === 0 ? l[0] = i : l[1] = i;
3753
3789
  const c = l.filter((p) => p !== "" && p !== void 0);
3754
3790
  if (c.length > 0) {
3755
- const p = t.type === C.DECIMAL2;
3791
+ const p = t.type === x.DECIMAL2;
3756
3792
  if (!c.every(
3757
3793
  (v) => p ? !isNaN(parseFloat(v)) : /^-?\d+$/.test(v)
3758
3794
  )) return;
@@ -3762,22 +3798,22 @@ let M = class extends w {
3762
3798
  // ── Boolean filter ───────────────────────────────────────────────
3763
3799
  _onBooleanSelect(t, e) {
3764
3800
  var a;
3765
- const s = this._getApplied(S(t));
3801
+ const s = this._getApplied(C(t));
3766
3802
  ((a = s.values) == null ? void 0 : a[0]) === e ? this._emitFilterChange(t, void 0, []) : this._emitFilterChange(t, s.operator, [e]);
3767
3803
  }
3768
3804
  // ── Select-one filter ────────────────────────────────────────────
3769
3805
  _onSelectOneToggle(t, e) {
3770
- const s = S(t), i = this._getApplied(s), a = i.operator || ee[0].value, r = i.values || [];
3806
+ const s = C(t), i = this._getApplied(s), a = i.operator || ee[0].value, r = i.values || [];
3771
3807
  r.length === 1 && r[0] === e ? this._emitFilterChange(t, a, []) : this._emitFilterChange(t, a, [e]);
3772
3808
  }
3773
3809
  // ── Multi-select filter ──────────────────────────────────────────
3774
3810
  _onMultiSelectToggle(t, e) {
3775
- const s = S(t), i = this._getApplied(s), a = i.operator || St[0].value, r = i.values || [], o = r.includes(e) ? r.filter((l) => l !== e) : [...r, e];
3811
+ const s = C(t), i = this._getApplied(s), a = i.operator || St[0].value, r = i.values || [], o = r.includes(e) ? r.filter((l) => l !== e) : [...r, e];
3776
3812
  this._emitFilterChange(t, a, o);
3777
3813
  }
3778
3814
  // ── Tags filter ──────────────────────────────────────────────────
3779
3815
  _onTagKeydown(t, e) {
3780
- const s = S(t);
3816
+ const s = C(t);
3781
3817
  (e.key === "Enter" || e.key === ",") && (e.preventDefault(), this._commitTagInput(t, s));
3782
3818
  }
3783
3819
  _onTagInput(t, e, s) {
@@ -3790,7 +3826,7 @@ let M = class extends w {
3790
3826
  this._tagInputs = { ...this._tagInputs, [e]: i }, this._fetchTagSuggestions(t, e, i.trim());
3791
3827
  }
3792
3828
  _selectTagSuggestion(t, e) {
3793
- const s = S(t), i = this._getApplied(s), a = i.operator || ee[0].value, r = i.values || [];
3829
+ const s = C(t), i = this._getApplied(s), a = i.operator || ee[0].value, r = i.values || [];
3794
3830
  r.includes(e) || this._emitFilterChange(t, a, [...r, e]), this._tagInputs = { ...this._tagInputs, [s]: "" }, this._tagSuggestions = { ...this._tagSuggestions, [s]: [] };
3795
3831
  }
3796
3832
  _fetchTagSuggestions(t, e, s) {
@@ -3823,7 +3859,7 @@ let M = class extends w {
3823
3859
  r.includes(s) || this._emitFilterChange(t, a, [...r, s]), this._tagInputs = { ...this._tagInputs, [e]: "" }, this._tagSuggestions = { ...this._tagSuggestions, [e]: [] };
3824
3860
  }
3825
3861
  _removeTag(t, e) {
3826
- const s = S(t), i = this._getApplied(s), a = i.operator || ee[0].value, r = i.values || [];
3862
+ const s = C(t), i = this._getApplied(s), a = i.operator || ee[0].value, r = i.values || [];
3827
3863
  this._emitFilterChange(
3828
3864
  t,
3829
3865
  a,
@@ -3831,12 +3867,12 @@ let M = class extends w {
3831
3867
  );
3832
3868
  }
3833
3869
  _onTagOperatorChange(t, e) {
3834
- const s = S(t), a = this._getApplied(s).values || [];
3870
+ const s = C(t), a = this._getApplied(s).values || [];
3835
3871
  this._emitFilterChange(t, e, a);
3836
3872
  }
3837
3873
  // ── Date filter ──────────────────────────────────────────────────
3838
3874
  _onDatePreset(t, e) {
3839
- const s = S(t);
3875
+ const s = C(t);
3840
3876
  if (this._datePresets = { ...this._datePresets, [s]: e }, ["before", "after", "between"].includes(e)) {
3841
3877
  this._dateFroms = { ...this._dateFroms, [s]: "" }, this._dateTos = { ...this._dateTos, [s]: "" };
3842
3878
  return;
@@ -3874,7 +3910,7 @@ let M = class extends w {
3874
3910
  a && r && (this._dateFroms = { ...this._dateFroms, [s]: a }, this._dateTos = { ...this._dateTos, [s]: r }, this._emitFilterChange(t, "..", [a, r]));
3875
3911
  }
3876
3912
  _onDateInput(t, e, s) {
3877
- const i = s.target.value, a = S(t), r = this._datePresets[a] || "", o = i ? (/* @__PURE__ */ new Date(i + "T00:00:00")).toISOString() : "";
3913
+ const i = s.target.value, a = C(t), r = this._datePresets[a] || "", o = i ? (/* @__PURE__ */ new Date(i + "T00:00:00")).toISOString() : "";
3878
3914
  e === "from" ? this._dateFroms = { ...this._dateFroms, [a]: o } : this._dateTos = { ...this._dateTos, [a]: o };
3879
3915
  let l = this._dateFroms[a] || "", c = this._dateTos[a] || "";
3880
3916
  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]);
@@ -3882,7 +3918,7 @@ let M = class extends w {
3882
3918
  // ── Geo filter ───────────────────────────────────────────────────
3883
3919
  _onGeoLocationInput(t, e) {
3884
3920
  var v;
3885
- const s = e.target.value.trim(), i = S(t), a = (v = this.shadowRoot) == null ? void 0 : v.querySelector(
3921
+ const s = e.target.value.trim(), i = C(t), a = (v = this.shadowRoot) == null ? void 0 : v.querySelector(
3886
3922
  `[data-geo-radius="${i}"]`
3887
3923
  ), r = (a == null ? void 0 : a.value) || "";
3888
3924
  if (!s) {
@@ -3894,39 +3930,45 @@ let M = class extends w {
3894
3930
  return;
3895
3931
  const [l, c] = o;
3896
3932
  let u = `${l},${c}..${r || "0"}`;
3897
- this._emitFilterChange(t, x.IS, [u]);
3933
+ this._emitFilterChange(t, w.IS, [u]);
3898
3934
  }
3899
3935
  _onGeoRadiusInput(t, e) {
3900
3936
  var c;
3901
- const s = e.target.value, i = S(t), a = this._getApplied(i);
3937
+ const s = e.target.value, i = C(t), a = this._getApplied(i);
3902
3938
  if (!((c = a.values) != null && c[0])) return;
3903
3939
  const r = a.values[0], [o] = r.split("..");
3904
3940
  let l = o;
3905
- s && (l += `..${s}`), this._emitFilterChange(t, x.IS, [l]);
3941
+ s && (l += `..${s}`), this._emitFilterChange(t, w.IS, [l]);
3906
3942
  }
3907
3943
  // ── Empty/non-empty option click ─────────────────────────────────
3908
3944
  _onEmptyOption(t, e) {
3909
3945
  var a;
3910
- const s = this._getApplied(S(t));
3946
+ const s = this._getApplied(C(t));
3911
3947
  ((a = s.values) == null ? void 0 : a[0]) === e ? this._emitFilterChange(t, s.operator, []) : this._emitFilterChange(t, s.operator, [e]);
3912
3948
  }
3913
3949
  // ── Render: Field selection panel ────────────────────────────────
3950
+ _getGroupedFields(t) {
3951
+ const e = /* @__PURE__ */ new Map();
3952
+ for (const s of t) {
3953
+ const i = s.group || "Root fields";
3954
+ e.has(i) || e.set(i, []), e.get(i).push(s);
3955
+ }
3956
+ return e;
3957
+ }
3914
3958
  _renderFieldSelection() {
3915
3959
  const t = this._fieldSearch.toLowerCase(), e = this.fields.filter(
3916
- (r) => r.label.toLowerCase().includes(t)
3917
- ), s = e.filter(
3918
- (r) => !r.group || r.group === "root"
3919
- ), i = e.filter((r) => r.group === "product"), a = (r, o) => o.length === 0 ? f : n`
3920
- <div class="field-group-label">${r}</div>
3921
- ${o.map((l) => {
3922
- const c = S(l), p = this.visibleFields.includes(c), u = !p && this._atFieldLimit;
3960
+ (a) => a.label.toLowerCase().includes(t)
3961
+ ), s = this._getGroupedFields(e), i = (a, r) => r.length === 0 ? f : n`
3962
+ <div class="field-group-label">${a}</div>
3963
+ ${r.map((o) => {
3964
+ const l = C(o), c = this.visibleFields.includes(l), p = !c && this._atFieldLimit;
3923
3965
  return n`
3924
3966
  <div
3925
- class="field-item ${p ? "selected" : ""} ${u ? "disabled" : ""}"
3926
- @click=${() => !u && !p && this._addField(l)}
3967
+ class="field-item ${c ? "selected" : ""} ${p ? "disabled" : ""}"
3968
+ @click=${() => !p && !c && this._addField(o)}
3927
3969
  >
3928
- ${p ? n`<ap-icon name="check" .size=${14}></ap-icon>` : f}
3929
- <span>${l.label}</span>
3970
+ ${c ? n`<ap-icon name="check" .size=${14}></ap-icon>` : n`<ap-icon name=${Et[o.type] || "file-text"} .size=${14} style="color: var(--ap-muted-foreground, oklch(0.685 0.033 249.82))"></ap-icon>`}
3971
+ <span>${o.label}</span>
3930
3972
  </div>
3931
3973
  `;
3932
3974
  })}
@@ -3947,15 +3989,14 @@ let M = class extends w {
3947
3989
  type="text"
3948
3990
  placeholder="Search fields..."
3949
3991
  .value=${this._fieldSearch}
3950
- @input=${(r) => {
3951
- this._fieldSearch = r.target.value;
3992
+ @input=${(a) => {
3993
+ this._fieldSearch = a.target.value;
3952
3994
  }}
3953
3995
  />
3954
3996
  <div class="field-list">
3955
- ${e.length === 0 ? n`<div class="empty-msg">No fields found</div>` : n`
3956
- ${a("Root fields", s)}
3957
- ${a("Product fields", i)}
3958
- `}
3997
+ ${e.length === 0 ? n`<div class="empty-msg">No fields found</div>` : n`${[...s.entries()].map(
3998
+ ([a, r]) => i(a, r)
3999
+ )}`}
3959
4000
  </div>
3960
4001
  </div>
3961
4002
  `;
@@ -3963,7 +4004,7 @@ let M = class extends w {
3963
4004
  // ── Render: Text filter ──────────────────────────────────────────
3964
4005
  _renderTextFilter(t) {
3965
4006
  var p, u;
3966
- const e = S(t), s = this._getApplied(e), a = this._isSpecialValue(s.values) ? "" : ((p = s.values) == null ? void 0 : p[0]) || "", r = this._getContentMode(e), o = r === K || r === G, l = s.operator || kt[0].value, c = t.type === C.TEXT_AREA;
4007
+ const e = C(t), s = this._getApplied(e), a = this._isSpecialValue(s.values) ? "" : ((p = s.values) == null ? void 0 : p[0]) || "", r = this._getContentMode(e), o = r === K || r === G, l = s.operator || kt[0].value, c = t.type === x.TEXT_AREA;
3967
4008
  return n`
3968
4009
  <div class="filter-content" style="position: relative;">
3969
4010
  <button
@@ -4021,13 +4062,13 @@ let M = class extends w {
4021
4062
  }
4022
4063
  // ── Render: Number filter ────────────────────────────────────────
4023
4064
  _renderNumberFilter(t) {
4024
- var F, A, L;
4025
- const e = S(t), s = this._getApplied(e), i = s.operator || Ct[0].value, a = this._isSpecialValue(s.values), r = this._getContentMode(e), o = r === K || r === G, l = i === x.RANGE, c = i === x.GREATER_THAN_OR_EQUAL, p = i === x.LESS_THAN_OR_EQUAL, u = t.type === C.DECIMAL2, v = u ? "0.01" : "1", d = u ? "0.00" : "0", g = a ? "" : ((F = s.values) == null ? void 0 : F[0]) || "", b = a ? "" : ((A = s.values) == null ? void 0 : A[1]) || "", E = l || c || p, y = l || c || p ? "Min" : "Value";
4065
+ var F, I, H;
4066
+ const e = C(t), s = this._getApplied(e), i = s.operator || Ct[0].value, a = this._isSpecialValue(s.values), r = this._getContentMode(e), o = r === K || r === G, l = i === w.RANGE, c = i === w.GREATER_THAN_OR_EQUAL, p = i === w.LESS_THAN_OR_EQUAL, u = t.type === x.DECIMAL2, v = u ? "0.01" : "1", d = u ? "0.00" : "0", g = a ? "" : ((F = s.values) == null ? void 0 : F[0]) || "", b = a ? "" : ((I = s.values) == null ? void 0 : I[1]) || "", E = l || c || p, y = l || c || p ? "Min" : "Value";
4026
4067
  return n`
4027
4068
  <div class="filter-content" style="position: relative;">
4028
4069
  <button
4029
4070
  class="clear-btn"
4030
- ?disabled=${!((L = s.values) != null && L.length) && !s.operator}
4071
+ ?disabled=${!((H = s.values) != null && H.length) && !s.operator}
4031
4072
  @click=${() => this._clearFieldFilter(t)}
4032
4073
  >Clear all</button>
4033
4074
 
@@ -4038,7 +4079,7 @@ let M = class extends w {
4038
4079
  .options=${Ct}
4039
4080
  .value=${i}
4040
4081
  ?disabled=${o}
4041
- @ap-change=${(I) => this._onOperatorChange(t, I.detail.value)}
4082
+ @ap-change=${(T) => this._onOperatorChange(t, T.detail.value)}
4042
4083
  ></ap-radio-group>
4043
4084
  </div>
4044
4085
 
@@ -4047,7 +4088,7 @@ let M = class extends w {
4047
4088
  <ap-radio-group
4048
4089
  .options=${Ft}
4049
4090
  .value=${r}
4050
- @ap-change=${(I) => this._onContentModeChange(t, I.detail.value)}
4091
+ @ap-change=${(T) => this._onContentModeChange(t, T.detail.value)}
4051
4092
  ></ap-radio-group>
4052
4093
  </div>
4053
4094
 
@@ -4063,7 +4104,7 @@ let M = class extends w {
4063
4104
  placeholder=${d}
4064
4105
  .value=${g}
4065
4106
  ?disabled=${p}
4066
- @change=${(I) => this._onNumberInput(t, I, 0)}
4107
+ @change=${(T) => this._onNumberInput(t, T, 0)}
4067
4108
  />
4068
4109
  </div>
4069
4110
  ${E ? n`
@@ -4076,7 +4117,7 @@ let M = class extends w {
4076
4117
  placeholder=${d}
4077
4118
  .value=${b}
4078
4119
  ?disabled=${c}
4079
- @change=${(I) => this._onNumberInput(t, I, 1)}
4120
+ @change=${(T) => this._onNumberInput(t, T, 1)}
4080
4121
  />
4081
4122
  </div>
4082
4123
  ` : f}
@@ -4089,7 +4130,7 @@ let M = class extends w {
4089
4130
  // ── Render: Boolean filter ───────────────────────────────────────
4090
4131
  _renderBooleanFilter(t) {
4091
4132
  var i, a;
4092
- const e = this._getApplied(S(t)), s = ((i = e.values) == null ? void 0 : i[0]) || "";
4133
+ const e = this._getApplied(C(t)), s = ((i = e.values) == null ? void 0 : i[0]) || "";
4093
4134
  return n`
4094
4135
  <div class="filter-content" style="position: relative;">
4095
4136
  <button
@@ -4101,7 +4142,7 @@ let M = class extends w {
4101
4142
  <div class="filter-section">
4102
4143
  <span class="section-label">Value</span>
4103
4144
  <ap-radio-group
4104
- .options=${ta}
4145
+ .options=${sa}
4105
4146
  .value=${s}
4106
4147
  @ap-change=${(r) => this._onBooleanSelect(t, r.detail.value)}
4107
4148
  ></ap-radio-group>
@@ -4111,7 +4152,7 @@ let M = class extends w {
4111
4152
  }
4112
4153
  // ── Render: Select-one filter ────────────────────────────────────
4113
4154
  _renderSelectOneFilter(t) {
4114
- const e = S(t), s = this._getApplied(e), i = this._isSpecialValue(s.values), a = i ? [] : s.values || [], r = t.possible_values || [], o = s.operator || ee[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 >= st;
4155
+ const e = C(t), s = this._getApplied(e), i = this._isSpecialValue(s.values), a = i ? [] : s.values || [], r = t.possible_values || [], o = s.operator || ee[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 >= st;
4115
4156
  return n`
4116
4157
  <div class="filter-content">
4117
4158
  <!-- Search input -->
@@ -4230,7 +4271,7 @@ let M = class extends w {
4230
4271
  }
4231
4272
  // ── Render: Multi-select filter ──────────────────────────────────
4232
4273
  _renderMultiSelectFilter(t) {
4233
- const e = S(t), s = this._getApplied(e), i = this._isSpecialValue(s.values), a = i ? [] : s.values || [], r = t.possible_values || [], o = s.operator || St[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 >= st;
4274
+ const e = C(t), s = this._getApplied(e), i = this._isSpecialValue(s.values), a = i ? [] : s.values || [], r = t.possible_values || [], o = s.operator || St[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 >= st;
4234
4275
  return n`
4235
4276
  <div class="filter-content">
4236
4277
  <!-- Search input -->
@@ -4349,7 +4390,7 @@ let M = class extends w {
4349
4390
  }
4350
4391
  // ── Render: Tags filter ──────────────────────────────────────────
4351
4392
  _renderTagsFilter(t) {
4352
- const e = S(t), s = this._getApplied(e), i = this._isSpecialValue(s.values), a = i ? [] : s.values || [], r = this._tagInputs[e] || "", o = s.operator || ee[0].value, l = a.length > 0 || i, c = this._tagSuggestions[e] || [], p = this._tagLoading[e] || !1, u = r.trim().length > 0, v = a.length >= st;
4393
+ const e = C(t), s = this._getApplied(e), i = this._isSpecialValue(s.values), a = i ? [] : s.values || [], r = this._tagInputs[e] || "", o = s.operator || ee[0].value, l = a.length > 0 || i, c = this._tagSuggestions[e] || [], p = this._tagLoading[e] || !1, u = r.trim().length > 0, v = a.length >= st;
4353
4394
  return n`
4354
4395
  <div class="filter-content">
4355
4396
  <!-- Search input -->
@@ -4467,7 +4508,7 @@ let M = class extends w {
4467
4508
  // ── Render: Date filter ──────────────────────────────────────────
4468
4509
  _renderDateFilter(t) {
4469
4510
  var u, v;
4470
- const e = S(t), s = this._datePresets[e] || "", i = this._getApplied(e), r = this._isSpecialValue(i.values) ? ((u = i.values) == null ? void 0 : u[0]) || "" : s, o = [
4511
+ const e = C(t), s = this._datePresets[e] || "", i = this._getApplied(e), r = this._isSpecialValue(i.values) ? ((u = i.values) == null ? void 0 : u[0]) || "" : s, o = [
4471
4512
  { value: "empty", label: "Empty" },
4472
4513
  { value: "non-empty", label: "Not empty" }
4473
4514
  ], 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);
@@ -4490,7 +4531,7 @@ let M = class extends w {
4490
4531
 
4491
4532
  <ap-radio-group
4492
4533
  columns="2"
4493
- .options=${Lt}
4534
+ .options=${It}
4494
4535
  .value=${r !== "empty" && r !== "non-empty" ? r : ""}
4495
4536
  @ap-change=${(d) => this._onDatePreset(t, d.detail.value)}
4496
4537
  ></ap-radio-group>
@@ -4548,7 +4589,7 @@ let M = class extends w {
4548
4589
  // ── Render: Geo filter ───────────────────────────────────────────
4549
4590
  _renderGeoFilter(t) {
4550
4591
  var u, v;
4551
- const e = S(t), s = this._getApplied(e), i = this._isSpecialValue(s.values), a = this._getContentMode(e);
4592
+ const e = C(t), s = this._getApplied(e), i = this._isSpecialValue(s.values), a = this._getContentMode(e);
4552
4593
  let r = "", o = "";
4553
4594
  if (!i && ((u = s.values) != null && u[0])) {
4554
4595
  const d = s.values[0], [g, b] = d.split("..");
@@ -4606,7 +4647,7 @@ let M = class extends w {
4606
4647
  // ── Render: Attachment filter ────────────────────────────────────
4607
4648
  _renderAttachmentFilter(t) {
4608
4649
  var i, a;
4609
- const e = this._getApplied(S(t)), s = ((i = e.values) == null ? void 0 : i[0]) || "";
4650
+ const e = this._getApplied(C(t)), s = ((i = e.values) == null ? void 0 : i[0]) || "";
4610
4651
  return n`
4611
4652
  <div class="filter-content" style="position: relative;">
4612
4653
  <button
@@ -4627,7 +4668,7 @@ let M = class extends w {
4627
4668
  }
4628
4669
  // ── Render: Face matcher (integer-list with slug face_matcher) ──
4629
4670
  _renderFaceMatcherFilter(t) {
4630
- const e = S(t), s = this._getApplied(e), i = s.values || [], a = s.operator || x.IS;
4671
+ const e = C(t), s = this._getApplied(e), i = s.values || [], a = s.operator || w.IS;
4631
4672
  return n`
4632
4673
  <div class="filter-content" style="position: relative;">
4633
4674
  <button
@@ -4678,7 +4719,7 @@ let M = class extends w {
4678
4719
  case "geo":
4679
4720
  return this._renderGeoFilter(t);
4680
4721
  case "attachment":
4681
- return t.type === C.INTEGER_LIST && t.slug === "face_matcher" ? this._renderFaceMatcherFilter(t) : this._renderAttachmentFilter(t);
4722
+ return t.type === x.INTEGER_LIST && t.slug === "face_matcher" ? this._renderFaceMatcherFilter(t) : this._renderAttachmentFilter(t);
4682
4723
  default:
4683
4724
  return f;
4684
4725
  }
@@ -4700,6 +4741,7 @@ let M = class extends w {
4700
4741
  name="chevron-right"
4701
4742
  .size=${14}
4702
4743
  ></ap-icon>
4744
+ <ap-icon name=${Et[e.type] || "file-text"} .size=${14} style="color: var(--ap-muted-foreground, oklch(0.685 0.033 249.82))"></ap-icon>
4703
4745
  <span>${e.label}</span>
4704
4746
  </div>
4705
4747
  <div class="field-header-actions">
@@ -4723,29 +4765,28 @@ let M = class extends w {
4723
4765
  // ── Selector mode render ─────────────────────────────────────────
4724
4766
  _renderSelectorMode() {
4725
4767
  const t = this._fieldSearch.toLowerCase(), e = this.fields.filter(
4726
- (r) => r.label.toLowerCase().includes(t)
4727
- ), s = e.filter(
4728
- (r) => !r.group || r.group === "root"
4729
- ), i = e.filter((r) => r.group === "product"), a = (r, o) => o.length === 0 ? f : n`
4730
- <div class="field-group-label">${r}</div>
4731
- ${o.map((l) => {
4732
- const c = S(l), p = this.visibleFields.includes(c), u = !!this.appliedMetadata[c] || !!this.appliedFilters[c], v = this.pinnedFields.includes(c), d = !p && this._atFieldLimit;
4768
+ (a) => a.label.toLowerCase().includes(t)
4769
+ ), s = this._getGroupedFields(e), i = (a, r) => r.length === 0 ? f : n`
4770
+ <div class="field-group-label">${a}</div>
4771
+ ${r.map((o) => {
4772
+ const l = C(o), c = this.visibleFields.includes(l), p = !!this.appliedMetadata[l] || !!this.appliedFilters[l], u = this.pinnedFields.includes(l), v = !c && this._atFieldLimit;
4733
4773
  return n`
4734
4774
  <div
4735
- class="field-item ${u ? "has-filter" : ""} ${d ? "disabled" : ""}"
4736
- @click=${() => !d && this._emitFieldSelect(l)}
4775
+ class="field-item ${p ? "has-filter" : ""} ${v ? "disabled" : ""}"
4776
+ @click=${() => !v && this._emitFieldSelect(o)}
4737
4777
  >
4738
- <span class="field-item-label">${l.label}</span>
4778
+ <ap-icon name=${Et[o.type] || "file-text"} .size=${14} style="color: var(--ap-muted-foreground, oklch(0.685 0.033 249.82))"></ap-icon>
4779
+ <span class="field-item-label">${o.label}</span>
4739
4780
  <button
4740
- class="field-item-pin ${v ? "pinned" : ""}"
4741
- @click=${(g) => {
4742
- g.stopPropagation(), this._emitPin(c, !v);
4781
+ class="field-item-pin ${u ? "pinned" : ""}"
4782
+ @click=${(d) => {
4783
+ d.stopPropagation(), this._emitPin(l, !u);
4743
4784
  }}
4744
- title=${v ? "Unpin field" : "Pin field"}
4785
+ title=${u ? "Unpin field" : "Pin field"}
4745
4786
  >
4746
4787
  <ap-icon name="pin" .size=${12}></ap-icon>
4747
4788
  </button>
4748
- ${u ? n`<ap-icon name="check" .size=${14}></ap-icon>` : f}
4789
+ ${p ? n`<ap-icon name="check" .size=${14}></ap-icon>` : f}
4749
4790
  </div>
4750
4791
  `;
4751
4792
  })}
@@ -4757,15 +4798,14 @@ let M = class extends w {
4757
4798
  type="text"
4758
4799
  placeholder="Search fields..."
4759
4800
  .value=${this._fieldSearch}
4760
- @input=${(r) => {
4761
- this._fieldSearch = r.target.value;
4801
+ @input=${(a) => {
4802
+ this._fieldSearch = a.target.value;
4762
4803
  }}
4763
4804
  />
4764
4805
  <div class="field-list">
4765
- ${e.length === 0 ? n`<div class="empty-msg">No fields found</div>` : n`
4766
- ${a("Root fields", s)}
4767
- ${a("Product fields", i)}
4768
- `}
4806
+ ${e.length === 0 ? n`<div class="empty-msg">No fields found</div>` : n`${[...s.entries()].map(
4807
+ ([a, r]) => i(a, r)
4808
+ )}`}
4769
4809
  </div>
4770
4810
  </div>
4771
4811
  `;
@@ -4804,7 +4844,7 @@ let M = class extends w {
4804
4844
  `;
4805
4845
  }
4806
4846
  };
4807
- M.styles = [ie, oe, $`
4847
+ P.styles = [ie, oe, $`
4808
4848
  /* ── Field selection panel ─────────────────────────────── */
4809
4849
 
4810
4850
  .add-field-btn {
@@ -5169,72 +5209,72 @@ M.styles = [ie, oe, $`
5169
5209
  background: var(--ap-primary-10, oklch(0.578 0.198 268.129 / 0.1));
5170
5210
  }
5171
5211
  `];
5172
- z([
5212
+ L([
5173
5213
  h({ type: Array })
5174
- ], M.prototype, "fields", 2);
5175
- z([
5214
+ ], P.prototype, "fields", 2);
5215
+ L([
5176
5216
  h({ type: Object })
5177
- ], M.prototype, "appliedFilters", 2);
5178
- z([
5217
+ ], P.prototype, "appliedFilters", 2);
5218
+ L([
5179
5219
  h({ type: Array })
5180
- ], M.prototype, "visibleFields", 2);
5181
- z([
5220
+ ], P.prototype, "visibleFields", 2);
5221
+ L([
5182
5222
  h()
5183
- ], M.prototype, "mode", 2);
5184
- z([
5223
+ ], P.prototype, "mode", 2);
5224
+ L([
5185
5225
  h()
5186
- ], M.prototype, "activeFieldKey", 2);
5187
- z([
5226
+ ], P.prototype, "activeFieldKey", 2);
5227
+ L([
5188
5228
  h({ type: Array })
5189
- ], M.prototype, "pinnedFields", 2);
5190
- z([
5229
+ ], P.prototype, "pinnedFields", 2);
5230
+ L([
5191
5231
  h({ type: Object })
5192
- ], M.prototype, "appliedMetadata", 2);
5193
- z([
5232
+ ], P.prototype, "appliedMetadata", 2);
5233
+ L([
5194
5234
  h({ attribute: !1 })
5195
- ], M.prototype, "apiClient", 2);
5196
- z([
5235
+ ], P.prototype, "apiClient", 2);
5236
+ L([
5197
5237
  _()
5198
- ], M.prototype, "_showFieldSelection", 2);
5199
- z([
5238
+ ], P.prototype, "_showFieldSelection", 2);
5239
+ L([
5200
5240
  _()
5201
- ], M.prototype, "_fieldSearch", 2);
5202
- z([
5241
+ ], P.prototype, "_fieldSearch", 2);
5242
+ L([
5203
5243
  _()
5204
- ], M.prototype, "_collapsedFields", 2);
5205
- z([
5244
+ ], P.prototype, "_collapsedFields", 2);
5245
+ L([
5206
5246
  _()
5207
- ], M.prototype, "_tagInputs", 2);
5208
- z([
5247
+ ], P.prototype, "_tagInputs", 2);
5248
+ L([
5209
5249
  _()
5210
- ], M.prototype, "_tagSuggestions", 2);
5211
- z([
5250
+ ], P.prototype, "_tagSuggestions", 2);
5251
+ L([
5212
5252
  _()
5213
- ], M.prototype, "_tagLoading", 2);
5214
- z([
5253
+ ], P.prototype, "_tagLoading", 2);
5254
+ L([
5215
5255
  _()
5216
- ], M.prototype, "_datePresets", 2);
5217
- z([
5256
+ ], P.prototype, "_datePresets", 2);
5257
+ L([
5218
5258
  _()
5219
- ], M.prototype, "_dateFroms", 2);
5220
- z([
5259
+ ], P.prototype, "_dateFroms", 2);
5260
+ L([
5221
5261
  _()
5222
- ], M.prototype, "_dateTos", 2);
5223
- z([
5262
+ ], P.prototype, "_dateTos", 2);
5263
+ L([
5224
5264
  _()
5225
- ], M.prototype, "_specificModeFields", 2);
5226
- z([
5265
+ ], P.prototype, "_specificModeFields", 2);
5266
+ L([
5227
5267
  _()
5228
- ], M.prototype, "_selectSearches", 2);
5229
- M = z([
5230
- k("ap-filter-metadata")
5231
- ], M);
5232
- var gi = Object.defineProperty, fi = Object.getOwnPropertyDescriptor, Z = (t, e, s, i) => {
5233
- for (var a = i > 1 ? void 0 : i ? fi(e, s) : e, r = t.length - 1, o; r >= 0; r--)
5268
+ ], P.prototype, "_selectSearches", 2);
5269
+ P = L([
5270
+ S("ap-filter-metadata")
5271
+ ], P);
5272
+ var fi = Object.defineProperty, vi = Object.getOwnPropertyDescriptor, Z = (t, e, s, i) => {
5273
+ for (var a = i > 1 ? void 0 : i ? vi(e, s) : e, r = t.length - 1, o; r >= 0; r--)
5234
5274
  (o = t[r]) && (a = (i ? o(e, s, a) : o(a)) || a);
5235
- return i && a && gi(e, s, a), a;
5275
+ return i && a && fi(e, s, a), a;
5236
5276
  };
5237
- let Y = class extends w {
5277
+ let Y = class extends k {
5238
5278
  constructor() {
5239
5279
  super(...arguments), this.selectedStatus = [], this.statusOperator = ":=", this.approverValue = "", this.approverOperator = "~", this.requesterValue = "", this.requesterOperator = "~", this.dueDatePreset = "", this.dueDateFrom = "", this.dueDateTo = "";
5240
5280
  }
@@ -5256,43 +5296,43 @@ let Y = class extends w {
5256
5296
  // ── Status handlers ────────────────────────────────────────────────
5257
5297
  _toggleStatus(t) {
5258
5298
  const e = this.selectedStatus.includes(t) ? this.selectedStatus.filter((s) => s !== t) : [...this.selectedStatus, t];
5259
- this._emitChange(V.STATUS, e, this.statusOperator);
5299
+ this._emitChange(B.STATUS, e, this.statusOperator);
5260
5300
  }
5261
5301
  _handleStatusOperator(t) {
5262
5302
  const e = t.detail.value;
5263
- this._emitChange(V.STATUS, this.selectedStatus, e);
5303
+ this._emitChange(B.STATUS, this.selectedStatus, e);
5264
5304
  }
5265
5305
  _clearStatus() {
5266
- this._emitChange(V.STATUS, [], this.statusOperator);
5306
+ this._emitChange(B.STATUS, [], this.statusOperator);
5267
5307
  }
5268
5308
  // ── Approver handlers ──────────────────────────────────────────────
5269
5309
  _handleApproverInput(t) {
5270
5310
  const e = t.target.value;
5271
- this._emitChange(V.APPROVER, e ? [e] : [], this.approverOperator);
5311
+ this._emitChange(B.APPROVER, e ? [e] : [], this.approverOperator);
5272
5312
  }
5273
5313
  _handleApproverOperator(t) {
5274
5314
  const e = t.detail.value;
5275
- this._emitChange(V.APPROVER, this.approverValue ? [this.approverValue] : [], e);
5315
+ this._emitChange(B.APPROVER, this.approverValue ? [this.approverValue] : [], e);
5276
5316
  }
5277
5317
  _clearApprover() {
5278
- this._emitChange(V.APPROVER, [], this.approverOperator);
5318
+ this._emitChange(B.APPROVER, [], this.approverOperator);
5279
5319
  }
5280
5320
  // ── Requester handlers ─────────────────────────────────────────────
5281
5321
  _handleRequesterInput(t) {
5282
5322
  const e = t.target.value;
5283
- this._emitChange(V.REQUESTOR, e ? [e] : [], this.requesterOperator);
5323
+ this._emitChange(B.REQUESTOR, e ? [e] : [], this.requesterOperator);
5284
5324
  }
5285
5325
  _handleRequesterOperator(t) {
5286
5326
  const e = t.detail.value;
5287
- this._emitChange(V.REQUESTOR, this.requesterValue ? [this.requesterValue] : [], e);
5327
+ this._emitChange(B.REQUESTOR, this.requesterValue ? [this.requesterValue] : [], e);
5288
5328
  }
5289
5329
  _clearRequester() {
5290
- this._emitChange(V.REQUESTOR, [], this.requesterOperator);
5330
+ this._emitChange(B.REQUESTOR, [], this.requesterOperator);
5291
5331
  }
5292
5332
  // ── Due Date handlers ──────────────────────────────────────────────
5293
5333
  _handleDueDatePreset(t) {
5294
5334
  const e = t.detail.value, s = this.dueDatePreset === e ? "" : e;
5295
- this._emitChange(V.DUE_DATE, s ? [s] : [], ":");
5335
+ this._emitChange(B.DUE_DATE, s ? [s] : [], ":");
5296
5336
  }
5297
5337
  _handleDueDateFrom(t) {
5298
5338
  const e = t.target.value;
@@ -5305,7 +5345,7 @@ let Y = class extends w {
5305
5345
  _clearDueDate() {
5306
5346
  this.dispatchEvent(new CustomEvent("filter-change", {
5307
5347
  detail: {
5308
- key: V.DUE_DATE,
5348
+ key: B.DUE_DATE,
5309
5349
  values: [],
5310
5350
  operator: ":"
5311
5351
  },
@@ -5317,7 +5357,7 @@ let Y = class extends w {
5317
5357
  const s = [];
5318
5358
  t && s.push(t), e && s.push(e), this.dispatchEvent(new CustomEvent("filter-change", {
5319
5359
  detail: {
5320
- key: V.DUE_DATE,
5360
+ key: B.DUE_DATE,
5321
5361
  values: s,
5322
5362
  operator: t && e ? ".." : t ? ">=" : "<="
5323
5363
  },
@@ -5350,7 +5390,7 @@ let Y = class extends w {
5350
5390
  <span class="section-label condition-label">Condition</span>
5351
5391
  <ap-radio-group
5352
5392
  direction="horizontal"
5353
- .options=${Js}
5393
+ .options=${ea}
5354
5394
  .value=${this.statusOperator}
5355
5395
  ?disabled=${this._statusHasOnlyEmptyValues}
5356
5396
  @ap-change=${this._handleStatusOperator}
@@ -5372,7 +5412,7 @@ let Y = class extends w {
5372
5412
 
5373
5413
  <!-- Status options -->
5374
5414
  <div class="options-list short">
5375
- ${ea.map(
5415
+ ${ta.map(
5376
5416
  (e) => n`
5377
5417
  <ap-checkbox
5378
5418
  ?checked=${this.selectedStatus.includes(e.value)}
@@ -5405,7 +5445,7 @@ let Y = class extends w {
5405
5445
  <span class="section-label condition-label">Condition</span>
5406
5446
  <ap-radio-group
5407
5447
  direction="horizontal"
5408
- .options=${Qt}
5448
+ .options=${Zt}
5409
5449
  .value=${this.approverOperator}
5410
5450
  @ap-change=${this._handleApproverOperator}
5411
5451
  ></ap-radio-group>
@@ -5436,7 +5476,7 @@ let Y = class extends w {
5436
5476
  <span class="section-label condition-label">Condition</span>
5437
5477
  <ap-radio-group
5438
5478
  direction="horizontal"
5439
- .options=${Qt}
5479
+ .options=${Zt}
5440
5480
  .value=${this.requesterOperator}
5441
5481
  @ap-change=${this._handleRequesterOperator}
5442
5482
  ></ap-radio-group>
@@ -5475,7 +5515,7 @@ let Y = class extends w {
5475
5515
  <!-- Date range options -->
5476
5516
  <ap-radio-group
5477
5517
  columns="2"
5478
- .options=${Ws}
5518
+ .options=${Qs}
5479
5519
  .value=${this.dueDatePreset !== K && this.dueDatePreset !== G ? this.dueDatePreset : ""}
5480
5520
  @ap-change=${this._handleDueDatePreset}
5481
5521
  ></ap-radio-group>
@@ -5572,22 +5612,22 @@ Z([
5572
5612
  h()
5573
5613
  ], Y.prototype, "dueDateTo", 2);
5574
5614
  Y = Z([
5575
- k("ap-filter-approval")
5615
+ S("ap-filter-approval")
5576
5616
  ], Y);
5577
- var vi = Object.defineProperty, mi = Object.getOwnPropertyDescriptor, J = (t, e, s, i) => {
5578
- for (var a = i > 1 ? void 0 : i ? mi(e, s) : e, r = t.length - 1, o; r >= 0; r--)
5617
+ var mi = Object.defineProperty, bi = Object.getOwnPropertyDescriptor, J = (t, e, s, i) => {
5618
+ for (var a = i > 1 ? void 0 : i ? bi(e, s) : e, r = t.length - 1, o; r >= 0; r--)
5579
5619
  (o = t[r]) && (a = (i ? o(e, s, a) : o(a)) || a);
5580
- return i && a && vi(e, s, a), a;
5620
+ return i && a && mi(e, s, a), a;
5581
5621
  };
5582
- const bi = 300;
5583
- function _i(t) {
5622
+ const _i = 300;
5623
+ function yi(t) {
5584
5624
  return t.filter(
5585
5625
  (e) => e.toLowerCase().includes("*") || !t.some(
5586
5626
  (s) => s.toLowerCase().includes("*") && e.toLowerCase().startsWith(s.slice(0, -1).toLowerCase())
5587
5627
  )
5588
5628
  );
5589
5629
  }
5590
- let X = class extends w {
5630
+ let X = class extends k {
5591
5631
  constructor() {
5592
5632
  super(...arguments), this.selected = [], this._search = "", this._debouncedSearch = "", this._products = [], this._isLoading = !1, this._showAddList = !1, this._addListText = "";
5593
5633
  }
@@ -5604,13 +5644,13 @@ let X = class extends w {
5604
5644
  return this._debouncedSearch.length > 0;
5605
5645
  }
5606
5646
  _emit(t) {
5607
- const e = _i(t);
5647
+ const e = yi(t);
5608
5648
  this.dispatchEvent(
5609
5649
  new CustomEvent("filter-change", {
5610
5650
  detail: {
5611
5651
  key: m.PRODUCT_REF,
5612
5652
  values: e,
5613
- operator: x.IS
5653
+ operator: w.IS
5614
5654
  },
5615
5655
  bubbles: !0,
5616
5656
  composed: !0
@@ -5632,7 +5672,7 @@ let X = class extends w {
5632
5672
  this._search = e, this._debounceTimer && clearTimeout(this._debounceTimer), this._debounceTimer = setTimeout(() => {
5633
5673
  const s = e.trim().toLowerCase();
5634
5674
  this._debouncedSearch = s, s ? this._fetchProducts(s) : (this._products = [], this._isLoading = !1);
5635
- }, bi);
5675
+ }, _i);
5636
5676
  }
5637
5677
  _clearSearch() {
5638
5678
  this._search = "", this._debouncedSearch = "", this._products = [], this._isLoading = !1, this._debounceTimer && clearTimeout(this._debounceTimer);
@@ -6058,21 +6098,21 @@ J([
6058
6098
  _()
6059
6099
  ], X.prototype, "_addListText", 2);
6060
6100
  X = J([
6061
- k("ap-filter-product-ref")
6101
+ S("ap-filter-product-ref")
6062
6102
  ], X);
6063
- var yi = Object.defineProperty, xi = Object.getOwnPropertyDescriptor, P = (t, e, s, i) => {
6064
- for (var a = i > 1 ? void 0 : i ? xi(e, s) : e, r = t.length - 1, o; r >= 0; r--)
6103
+ var xi = Object.defineProperty, wi = Object.getOwnPropertyDescriptor, O = (t, e, s, i) => {
6104
+ for (var a = i > 1 ? void 0 : i ? wi(e, s) : e, r = t.length - 1, o; r >= 0; r--)
6065
6105
  (o = t[r]) && (a = (i ? o(e, s, a) : o(a)) || a);
6066
- return i && a && yi(e, s, a), a;
6106
+ return i && a && xi(e, s, a), a;
6067
6107
  };
6068
- let T = class extends w {
6108
+ let M = class extends k {
6069
6109
  constructor() {
6070
- super(...arguments), this.totalCount = 0, this.totalFolderCount = 0, this.isLoading = !1, this.showUpload = !1, this.sortBy = "created_at", this.sortDirection = "desc", this.sortOptions = It, this.filters = {
6110
+ super(...arguments), this.totalCount = 0, this.totalFolderCount = 0, this.isLoading = !1, this.showUpload = !1, this.sortBy = "created_at", this.sortDirection = "desc", this.sortOptions = Dt, this.filters = {
6071
6111
  metadata: { pinned: [], visible: [], applied: {} },
6072
6112
  pinned: [],
6073
6113
  visible: [],
6074
6114
  applied: {}
6075
- }, this.labels = [], this.tags = [], this.metadataFields = [], this.pinnedFilters = [], this.forcedFilterKeys = [], this._showDropdown = !1, this._showMetadataSelector = !1, this._openFilter = null, this._openMetadataField = null, this._externalTrigger = !1, this._externalLeft = null, this._outsideClickHandler = (t) => {
6115
+ }, this.labels = [], this.tags = [], this.metadataFields = [], this.pinnedFilters = [], this.forcedFilterKeys = [], this._showDropdown = !1, this._showMetadataSelector = !1, this._openFilter = null, this._openMetadataField = null, this._externalTrigger = !1, this._externalLeft = null, this._externalTop = null, this._outsideClickHandler = (t) => {
6076
6116
  const e = t.composedPath();
6077
6117
  if (this._externalTrigger && e.some(
6078
6118
  (r) => {
@@ -6082,9 +6122,9 @@ let T = class extends w {
6082
6122
  ))
6083
6123
  return;
6084
6124
  const s = this._openFilter && e.some((a) => a instanceof HTMLElement ? a.classList.contains("popover-anchor") || a.classList.contains("popover-panel") : !1), i = (this._showDropdown || this._showMetadataSelector) && e.some(
6085
- (a) => a instanceof HTMLElement && (a.classList.contains("dropdown-menu") || a.classList.contains("filter-dropdown"))
6125
+ (a) => a instanceof HTMLElement && (a.classList.contains("dropdown-menu") || a.classList.contains("filter-dropdown") || a.classList.contains("metadata-selector-overlay"))
6086
6126
  );
6087
- s || i || (this._openFilter && (this._openFilter = null, this._openMetadataField = null, this._externalTrigger = !1, this._externalLeft = null), (this._showDropdown || this._showMetadataSelector) && (this._showDropdown = !1, this._showMetadataSelector = !1));
6127
+ s || i || (this._openFilter && (this._openFilter = null, this._openMetadataField = null, this._externalTrigger = !1, this._externalLeft = null, this._externalTop = null), (this._showDropdown || this._showMetadataSelector) && (this._showDropdown = !1, this._showMetadataSelector = !1));
6088
6128
  };
6089
6129
  }
6090
6130
  connectedCallback() {
@@ -6111,7 +6151,7 @@ let T = class extends w {
6111
6151
  }
6112
6152
  _closeAllDropdowns() {
6113
6153
  var t;
6114
- this._showDropdown = !1, this._showMetadataSelector = !1, this._openFilter = null, this._openMetadataField = null, this._externalTrigger = !1, this._externalLeft = null, (t = this._sortDropdown) == null || t.close();
6154
+ this._showDropdown = !1, this._showMetadataSelector = !1, this._openFilter = null, this._openMetadataField = null, this._externalTrigger = !1, this._externalLeft = null, this._externalTop = null, (t = this._sortDropdown) == null || t.close();
6115
6155
  }
6116
6156
  _handleUploadClick() {
6117
6157
  this.dispatchEvent(new CustomEvent("upload-click", { bubbles: !0, composed: !0 }));
@@ -6121,27 +6161,27 @@ let T = class extends w {
6121
6161
  this._closeAllDropdowns(), this._showDropdown = !t;
6122
6162
  }
6123
6163
  _toggleMetadataSelector() {
6124
- this._showMetadataSelector = !this._showMetadataSelector, this._showDropdown = !1;
6164
+ this._showMetadataSelector = !this._showMetadataSelector;
6125
6165
  }
6126
6166
  /** Close any open filter panel */
6127
6167
  closeFilterPanel() {
6128
- this._openFilter = null, this._openMetadataField = null, this._externalTrigger = !1, this._externalLeft = null;
6168
+ this._openFilter = null, this._openMetadataField = null, this._externalTrigger = !1, this._externalLeft = null, this._externalTop = null;
6129
6169
  }
6130
6170
  /** Open a specific filter panel (also used programmatically by parent) */
6131
- openFilterPanel(t, e = !1, s) {
6171
+ openFilterPanel(t, e = !1, s, i) {
6132
6172
  if (e && this._externalTrigger && this._openFilter === t && !this._openMetadataField) {
6133
6173
  this.closeFilterPanel();
6134
6174
  return;
6135
6175
  }
6136
6176
  if (!e && !this._isFilterActive(t)) {
6137
- this._showDropdown = !1, this.dispatchEvent(new CustomEvent("filter-pending", {
6177
+ this._showDropdown = !1, this._showMetadataSelector = !1, this.dispatchEvent(new CustomEvent("filter-pending", {
6138
6178
  detail: { key: t },
6139
6179
  bubbles: !0,
6140
6180
  composed: !0
6141
6181
  }));
6142
6182
  return;
6143
6183
  }
6144
- this._showDropdown = !1, this._openFilter = t, this._openMetadataField = null, this._externalTrigger = e, this._externalLeft = s ?? null;
6184
+ this._showDropdown = !1, this._showMetadataSelector = !1, this._openFilter = t, this._openMetadataField = null, this._externalTrigger = e, this._externalLeft = s ?? null, this._externalTop = i ?? null;
6145
6185
  }
6146
6186
  _handleSortOpen() {
6147
6187
  this._showDropdown = !1, this._openFilter = null, this._openMetadataField = null;
@@ -6186,7 +6226,7 @@ let T = class extends w {
6186
6226
  var s;
6187
6227
  t.stopPropagation();
6188
6228
  const e = t.detail.fieldKey;
6189
- if (this._showMetadataSelector = !1, !(e in (((s = this.filters.metadata) == null ? void 0 : s.applied) || {}))) {
6229
+ if (this._showMetadataSelector = !1, this._showDropdown = !1, !(e in (((s = this.filters.metadata) == null ? void 0 : s.applied) || {}))) {
6190
6230
  this.dispatchEvent(new CustomEvent("filter-pending", {
6191
6231
  detail: { metadataFieldKey: e },
6192
6232
  bubbles: !0,
@@ -6203,12 +6243,12 @@ let T = class extends w {
6203
6243
  composed: !0
6204
6244
  }));
6205
6245
  }
6206
- openMetadataFieldPanel(t, e = !1, s) {
6246
+ openMetadataFieldPanel(t, e = !1, s, i) {
6207
6247
  if (e && this._externalTrigger && this._openMetadataField === t) {
6208
6248
  this.closeFilterPanel();
6209
6249
  return;
6210
6250
  }
6211
- this._showDropdown = !1, this._openFilter = "metadata", this._openMetadataField = t, this._externalTrigger = e, this._externalLeft = s ?? null;
6251
+ this._showDropdown = !1, this._openFilter = "metadata", this._openMetadataField = t, this._externalTrigger = e, this._externalLeft = s ?? null, this._externalTop = i ?? null;
6212
6252
  }
6213
6253
  _getMetadataFieldLabel(t) {
6214
6254
  for (const e of this.metadataFields)
@@ -6225,7 +6265,7 @@ let T = class extends w {
6225
6265
  }));
6226
6266
  }
6227
6267
  _getFilterIcon(t) {
6228
- const e = Mt.find((s) => s.key === t);
6268
+ const e = Pt.find((s) => s.key === t);
6229
6269
  return (e == null ? void 0 : e.icon) || "filter";
6230
6270
  }
6231
6271
  _renderFilterContent(t) {
@@ -6354,8 +6394,7 @@ let T = class extends w {
6354
6394
  }
6355
6395
  }
6356
6396
  _renderFilterButton(t) {
6357
- const e = t.key === "metadata", s = e ? Object.keys(this.filters.metadata.applied).length > 0 : this._isFilterActive(t.key), i = this.pinnedFilters.includes(t.key);
6358
- return n`
6397
+ const e = t.key === "metadata", s = e ? Object.keys(this.filters.metadata.applied).length > 0 : this._isFilterActive(t.key), i = this.pinnedFilters.includes(t.key), a = n`
6359
6398
  <button
6360
6399
  class="filter-btn ${s ? "active" : ""} ${i ? "pinned" : ""}"
6361
6400
  @click=${() => e ? this._toggleMetadataSelector() : this.openFilterPanel(t.key)}
@@ -6370,13 +6409,32 @@ let T = class extends w {
6370
6409
  <span
6371
6410
  class="pin-btn ${i ? "pinned" : ""}"
6372
6411
  title=${i ? "Unpin filter" : "Pin filter"}
6373
- @click=${(a) => this._togglePin(t.key, a)}
6412
+ @click=${(r) => this._togglePin(t.key, r)}
6374
6413
  >
6375
6414
  <ap-icon name="pin" .size=${14}></ap-icon>
6376
6415
  </span>
6377
6416
  `}
6378
6417
  </button>
6379
6418
  `;
6419
+ return e ? n`
6420
+ <div class="filter-btn-wrapper">
6421
+ ${a}
6422
+ ${this._showMetadataSelector ? n`
6423
+ <div class="metadata-selector-overlay">
6424
+ <ap-filter-metadata
6425
+ mode="selector"
6426
+ .fields=${this.metadataFields}
6427
+ .appliedMetadata=${this.filters.metadata.applied}
6428
+ .visibleFields=${this.filters.metadata.visible}
6429
+ .pinnedFields=${this.filters.metadata.pinned}
6430
+ @metadata-field-select=${this._handleMetadataSelectorFieldSelect}
6431
+ @metadata-field-toggle=${this._handleMetadataFieldToggle}
6432
+ @metadata-pin=${this._handleMetadataPin}
6433
+ ></ap-filter-metadata>
6434
+ </div>
6435
+ ` : f}
6436
+ </div>
6437
+ ` : a;
6380
6438
  }
6381
6439
  render() {
6382
6440
  const t = Object.keys(this.filters.applied).length + Object.keys(this.filters.metadata.applied).length;
@@ -6396,21 +6454,7 @@ let T = class extends w {
6396
6454
  </button>
6397
6455
  ${this._showDropdown ? n`
6398
6456
  <div class="dropdown-menu">
6399
- ${Mt.filter((e) => !this.forcedFilterKeys.includes(e.key)).map((e) => this._renderFilterButton(e))}
6400
- </div>
6401
- ` : f}
6402
- ${this._showMetadataSelector ? n`
6403
- <div class="dropdown-menu metadata-selector-menu">
6404
- <ap-filter-metadata
6405
- mode="selector"
6406
- .fields=${this.metadataFields}
6407
- .appliedMetadata=${this.filters.metadata.applied}
6408
- .visibleFields=${this.filters.metadata.visible}
6409
- .pinnedFields=${this.filters.metadata.pinned}
6410
- @metadata-field-select=${this._handleMetadataSelectorFieldSelect}
6411
- @metadata-field-toggle=${this._handleMetadataFieldToggle}
6412
- @metadata-pin=${this._handleMetadataPin}
6413
- ></ap-filter-metadata>
6457
+ ${Pt.filter((e) => !this.forcedFilterKeys.includes(e.key)).map((e) => this._renderFilterButton(e))}
6414
6458
  </div>
6415
6459
  ` : f}
6416
6460
  </div>
@@ -6439,7 +6483,7 @@ let T = class extends w {
6439
6483
  </div>
6440
6484
  </div>
6441
6485
  ${this._openFilter ? n`
6442
- <div class="popover-anchor ${this._externalTrigger ? "external" : ""}">
6486
+ <div class="popover-anchor ${this._externalTrigger ? "external" : ""}" style=${this._externalTrigger && this._externalTop != null ? `top: ${this._externalTop + 4}px` : ""}>
6443
6487
  ${this._externalTrigger ? f : n`
6444
6488
  <div class="anchor-tab">
6445
6489
  ${this._openFilter === "metadata" && this._openMetadataField ? n`
@@ -6451,10 +6495,10 @@ let T = class extends w {
6451
6495
  ${this._getMetadataFieldLabel(this._openMetadataField)}
6452
6496
  ` : n`
6453
6497
  <ap-icon name=${this._getFilterIcon(this._openFilter)} .size=${16}></ap-icon>
6454
- ${Oe[this._openFilter] || this._openFilter}
6498
+ ${Me[this._openFilter] || this._openFilter}
6455
6499
  `}
6456
6500
  <button class="anchor-close" @click=${() => {
6457
- this._openFilter = null, this._openMetadataField = null, this._externalTrigger = !1, this._externalLeft = null;
6501
+ this._openFilter = null, this._openMetadataField = null, this._externalTrigger = !1, this._externalLeft = null, this._externalTop = null;
6458
6502
  }} title="Close">
6459
6503
  <ap-icon name="close" .size=${14}></ap-icon>
6460
6504
  </button>
@@ -6468,7 +6512,7 @@ let T = class extends w {
6468
6512
  `;
6469
6513
  }
6470
6514
  };
6471
- T.styles = $`
6515
+ M.styles = $`
6472
6516
  :host {
6473
6517
  display: block;
6474
6518
  padding: 8px 20px 6px;
@@ -6568,13 +6612,25 @@ T.styles = $`
6568
6612
  gap: 12px;
6569
6613
  overscroll-behavior: contain;
6570
6614
  }
6571
- .dropdown-menu.metadata-selector-menu {
6572
- display: block;
6573
- min-width: 0;
6615
+ .filter-btn-wrapper {
6616
+ position: relative;
6617
+ display: flex;
6618
+ }
6619
+ .filter-btn-wrapper .filter-btn {
6620
+ flex: 1;
6621
+ }
6622
+ .metadata-selector-overlay {
6623
+ position: absolute;
6624
+ top: calc(100% + 4px);
6625
+ left: 0;
6626
+ z-index: 60;
6574
6627
  width: 280px;
6575
- padding: 0;
6576
6628
  max-height: 400px;
6577
6629
  overflow-y: auto;
6630
+ background: var(--ap-card, oklch(1 0 0));
6631
+ border: 1px solid var(--ap-border, oklch(92.86% 0.009 247.92));
6632
+ border-radius: var(--ap-radius, 8px);
6633
+ box-shadow: 0 10px 25px -5px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
6578
6634
  }
6579
6635
 
6580
6636
  /* Filter button in dropdown */
@@ -6786,90 +6842,94 @@ T.styles = $`
6786
6842
  }
6787
6843
  .popover-anchor.external {
6788
6844
  padding: 0;
6845
+ top: 0;
6789
6846
  }
6790
6847
  .popover-anchor.external .popover-panel {
6791
6848
  border-radius: 8px;
6792
6849
  top: 0;
6793
6850
  }
6794
6851
  `;
6795
- P([
6852
+ O([
6796
6853
  h({ type: Number })
6797
- ], T.prototype, "totalCount", 2);
6798
- P([
6854
+ ], M.prototype, "totalCount", 2);
6855
+ O([
6799
6856
  h({ type: Number })
6800
- ], T.prototype, "totalFolderCount", 2);
6801
- P([
6857
+ ], M.prototype, "totalFolderCount", 2);
6858
+ O([
6802
6859
  h({ type: Boolean })
6803
- ], T.prototype, "isLoading", 2);
6804
- P([
6860
+ ], M.prototype, "isLoading", 2);
6861
+ O([
6805
6862
  h({ type: Boolean })
6806
- ], T.prototype, "showUpload", 2);
6807
- P([
6863
+ ], M.prototype, "showUpload", 2);
6864
+ O([
6808
6865
  h()
6809
- ], T.prototype, "sortBy", 2);
6810
- P([
6866
+ ], M.prototype, "sortBy", 2);
6867
+ O([
6811
6868
  h()
6812
- ], T.prototype, "sortDirection", 2);
6813
- P([
6869
+ ], M.prototype, "sortDirection", 2);
6870
+ O([
6814
6871
  h({ type: Array })
6815
- ], T.prototype, "sortOptions", 2);
6816
- P([
6872
+ ], M.prototype, "sortOptions", 2);
6873
+ O([
6817
6874
  h({ type: Object })
6818
- ], T.prototype, "filters", 2);
6819
- P([
6875
+ ], M.prototype, "filters", 2);
6876
+ O([
6820
6877
  h({ type: Array })
6821
- ], T.prototype, "labels", 2);
6822
- P([
6878
+ ], M.prototype, "labels", 2);
6879
+ O([
6823
6880
  h({ type: Array })
6824
- ], T.prototype, "tags", 2);
6825
- P([
6881
+ ], M.prototype, "tags", 2);
6882
+ O([
6826
6883
  h({ type: Array })
6827
- ], T.prototype, "metadataFields", 2);
6828
- P([
6884
+ ], M.prototype, "metadataFields", 2);
6885
+ O([
6829
6886
  h({ type: Array })
6830
- ], T.prototype, "pinnedFilters", 2);
6831
- P([
6887
+ ], M.prototype, "pinnedFilters", 2);
6888
+ O([
6832
6889
  h({ type: Array })
6833
- ], T.prototype, "forcedFilterKeys", 2);
6834
- P([
6890
+ ], M.prototype, "forcedFilterKeys", 2);
6891
+ O([
6835
6892
  h({ attribute: !1 })
6836
- ], T.prototype, "apiClient", 2);
6837
- P([
6893
+ ], M.prototype, "apiClient", 2);
6894
+ O([
6838
6895
  Se("ap-dropdown")
6839
- ], T.prototype, "_sortDropdown", 2);
6840
- P([
6896
+ ], M.prototype, "_sortDropdown", 2);
6897
+ O([
6841
6898
  _()
6842
- ], T.prototype, "_showDropdown", 2);
6843
- P([
6899
+ ], M.prototype, "_showDropdown", 2);
6900
+ O([
6844
6901
  _()
6845
- ], T.prototype, "_showMetadataSelector", 2);
6846
- P([
6902
+ ], M.prototype, "_showMetadataSelector", 2);
6903
+ O([
6847
6904
  _()
6848
- ], T.prototype, "_openFilter", 2);
6849
- P([
6905
+ ], M.prototype, "_openFilter", 2);
6906
+ O([
6850
6907
  _()
6851
- ], T.prototype, "_openMetadataField", 2);
6852
- P([
6908
+ ], M.prototype, "_openMetadataField", 2);
6909
+ O([
6853
6910
  _()
6854
- ], T.prototype, "_externalTrigger", 2);
6855
- P([
6911
+ ], M.prototype, "_externalTrigger", 2);
6912
+ O([
6856
6913
  _()
6857
- ], T.prototype, "_externalLeft", 2);
6858
- T = P([
6859
- k("ap-content-toolbar")
6860
- ], T);
6861
- var $i = Object.defineProperty, wi = Object.getOwnPropertyDescriptor, q = (t, e, s, i) => {
6862
- for (var a = i > 1 ? void 0 : i ? wi(e, s) : e, r = t.length - 1, o; r >= 0; r--)
6914
+ ], M.prototype, "_externalLeft", 2);
6915
+ O([
6916
+ _()
6917
+ ], M.prototype, "_externalTop", 2);
6918
+ M = O([
6919
+ S("ap-content-toolbar")
6920
+ ], M);
6921
+ var $i = Object.defineProperty, ki = Object.getOwnPropertyDescriptor, V = (t, e, s, i) => {
6922
+ for (var a = i > 1 ? void 0 : i ? ki(e, s) : e, r = t.length - 1, o; r >= 0; r--)
6863
6923
  (o = t[r]) && (a = (i ? o(e, s, a) : o(a)) || a);
6864
6924
  return i && a && $i(e, s, a), a;
6865
6925
  };
6866
- let B = class extends w {
6926
+ let N = class extends k {
6867
6927
  constructor() {
6868
6928
  super(...arguments), this.appliedFilters = {}, this.appliedMetadata = {}, this.forcedFilters = {}, this.metadataFields = [], this.pinnedFilters = [], this.pinnedMetadataFields = [], this.tags = [], this.labels = [], this.activeFilter = null, this.activeMetadataField = null, this.pendingFilter = null, this.pendingMetadataField = null;
6869
6929
  }
6870
6930
  _mapTypeLabel(t) {
6871
6931
  var e;
6872
- return ((e = ls.find((s) => s.value === t)) == null ? void 0 : e.label) || t;
6932
+ return ((e = cs.find((s) => s.value === t)) == null ? void 0 : e.label) || t;
6873
6933
  }
6874
6934
  _getSizeSummary(t) {
6875
6935
  if (t.values.length === 0) return "";
@@ -6908,7 +6968,7 @@ let B = class extends w {
6908
6968
  }
6909
6969
  _getDateSummary(t) {
6910
6970
  var o, l;
6911
- const e = ((o = cs.find((c) => c.value === t.field)) == null ? void 0 : o.label) || t.field, s = [...Lt, ...ds], i = t.preset ? ((l = s.find((c) => c.value === t.preset)) == null ? void 0 : l.label) || t.preset : "", a = (c) => {
6971
+ const e = ((o = ds.find((c) => c.value === t.field)) == null ? void 0 : o.label) || t.field, s = [...It, ...ps], i = t.preset ? ((l = s.find((c) => c.value === t.preset)) == null ? void 0 : l.label) || t.preset : "", a = (c) => {
6912
6972
  try {
6913
6973
  return c.split("T")[0];
6914
6974
  } catch {
@@ -6939,14 +6999,14 @@ let B = class extends w {
6939
6999
  }
6940
7000
  _getFilterIcon(t) {
6941
7001
  var e;
6942
- return ((e = Mt.find((s) => s.key === t)) == null ? void 0 : e.icon) || "filter";
7002
+ return ((e = Pt.find((s) => s.key === t)) == null ? void 0 : e.icon) || "filter";
6943
7003
  }
6944
7004
  _getMetadataLabel(t) {
6945
7005
  const e = this._stripMetadataPrefix(t), s = this.metadataFields.find((i) => i.key === e);
6946
7006
  return (s == null ? void 0 : s.label) || e;
6947
7007
  }
6948
7008
  _stripMetadataPrefix(t) {
6949
- for (const e of is)
7009
+ for (const e of rs)
6950
7010
  if (t.startsWith(e)) return t.slice(e.length);
6951
7011
  return t;
6952
7012
  }
@@ -6991,7 +7051,7 @@ let B = class extends w {
6991
7051
  return n`
6992
7052
  <span class="chip forced">
6993
7053
  ${(i || t === m.TYPE || t === m.SIZE) && s ? n`<span class="chip-label">${s}</span>` : n`
6994
- <span class="chip-label">${Oe[t] || t}</span>
7054
+ <span class="chip-label">${Me[t] || t}</span>
6995
7055
  ${s ? n`<span class="chip-summary">${s}</span>` : f}
6996
7056
  `}
6997
7057
  <span class="chip-lock">
@@ -7005,7 +7065,7 @@ let B = class extends w {
7005
7065
  return n`
7006
7066
  <span class="chip pinned-empty ${t === this.activeFilter ? "active" : ""}" @click=${(a) => this._openFilter(t, a)}>
7007
7067
  <span class="chip-icon"><ap-icon name=${this._getFilterIcon(t)} .size=${16}></ap-icon></span>
7008
- <span class="chip-label">${Oe[t] || t}</span>
7068
+ <span class="chip-label">${Me[t] || t}</span>
7009
7069
  <span class="chip-chevron"><ap-icon name="chevron-down" .size=${14}></ap-icon></span>
7010
7070
  </span>
7011
7071
  `;
@@ -7015,7 +7075,7 @@ let B = class extends w {
7015
7075
  ${(i || t === m.TYPE || t === m.SIZE) && s ? n`
7016
7076
  <span class="chip-icon"><ap-icon name=${this._getFilterIcon(t)} .size=${16}></ap-icon></span>
7017
7077
  <span class="chip-label">${s}</span>` : n`
7018
- <span class="chip-label">${Oe[t] || t}</span>
7078
+ <span class="chip-label">${Me[t] || t}</span>
7019
7079
  ${s ? n`<span class="chip-summary">${s}</span>` : f}
7020
7080
  `}
7021
7081
  <button class="chip-remove" @click=${(a) => {
@@ -7051,7 +7111,7 @@ let B = class extends w {
7051
7111
  `;
7052
7112
  }
7053
7113
  render() {
7054
- const t = Ue(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;
7114
+ const t = Be(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;
7055
7115
  return e.size + o.length + this.pinnedMetadataFields.length + l.length + c.length + (p ? 1 : 0) + (u ? 1 : 0) === 0 ? f : n`
7056
7116
  <div class="chips-row">
7057
7117
  <div class="chips">
@@ -7070,7 +7130,7 @@ let B = class extends w {
7070
7130
  ${p ? n`
7071
7131
  <span class="chip pinned-empty active pending" @click=${(g) => this._openFilter(this.pendingFilter, g)}>
7072
7132
  <span class="chip-icon"><ap-icon name=${this._getFilterIcon(this.pendingFilter)} .size=${16}></ap-icon></span>
7073
- <span class="chip-label">${Oe[this.pendingFilter] || this.pendingFilter}</span>
7133
+ <span class="chip-label">${Me[this.pendingFilter] || this.pendingFilter}</span>
7074
7134
  <span class="chip-chevron"><ap-icon name="chevron-down" .size=${14}></ap-icon></span>
7075
7135
  </span>
7076
7136
  ` : f}
@@ -7090,7 +7150,7 @@ let B = class extends w {
7090
7150
  `;
7091
7151
  }
7092
7152
  };
7093
- B.styles = $`
7153
+ N.styles = $`
7094
7154
  :host {
7095
7155
  display: block;
7096
7156
  }
@@ -7238,52 +7298,52 @@ B.styles = $`
7238
7298
  opacity: 0.6;
7239
7299
  }
7240
7300
  `;
7241
- q([
7301
+ V([
7242
7302
  h({ type: Object })
7243
- ], B.prototype, "appliedFilters", 2);
7244
- q([
7303
+ ], N.prototype, "appliedFilters", 2);
7304
+ V([
7245
7305
  h({ type: Object })
7246
- ], B.prototype, "appliedMetadata", 2);
7247
- q([
7306
+ ], N.prototype, "appliedMetadata", 2);
7307
+ V([
7248
7308
  h({ type: Object })
7249
- ], B.prototype, "forcedFilters", 2);
7250
- q([
7309
+ ], N.prototype, "forcedFilters", 2);
7310
+ V([
7251
7311
  h({ type: Array })
7252
- ], B.prototype, "metadataFields", 2);
7253
- q([
7312
+ ], N.prototype, "metadataFields", 2);
7313
+ V([
7254
7314
  h({ type: Array })
7255
- ], B.prototype, "pinnedFilters", 2);
7256
- q([
7315
+ ], N.prototype, "pinnedFilters", 2);
7316
+ V([
7257
7317
  h({ type: Array })
7258
- ], B.prototype, "pinnedMetadataFields", 2);
7259
- q([
7318
+ ], N.prototype, "pinnedMetadataFields", 2);
7319
+ V([
7260
7320
  h({ type: Array })
7261
- ], B.prototype, "tags", 2);
7262
- q([
7321
+ ], N.prototype, "tags", 2);
7322
+ V([
7263
7323
  h({ type: Array })
7264
- ], B.prototype, "labels", 2);
7265
- q([
7324
+ ], N.prototype, "labels", 2);
7325
+ V([
7266
7326
  h()
7267
- ], B.prototype, "activeFilter", 2);
7268
- q([
7327
+ ], N.prototype, "activeFilter", 2);
7328
+ V([
7269
7329
  h()
7270
- ], B.prototype, "activeMetadataField", 2);
7271
- q([
7330
+ ], N.prototype, "activeMetadataField", 2);
7331
+ V([
7272
7332
  h()
7273
- ], B.prototype, "pendingFilter", 2);
7274
- q([
7333
+ ], N.prototype, "pendingFilter", 2);
7334
+ V([
7275
7335
  h()
7276
- ], B.prototype, "pendingMetadataField", 2);
7277
- B = q([
7278
- k("ap-filters-bar")
7279
- ], B);
7280
- var ki = Object.defineProperty, Si = Object.getOwnPropertyDescriptor, Ee = (t, e, s, i) => {
7281
- for (var a = i > 1 ? void 0 : i ? Si(e, s) : e, r = t.length - 1, o; r >= 0; r--)
7336
+ ], N.prototype, "pendingMetadataField", 2);
7337
+ N = V([
7338
+ S("ap-filters-bar")
7339
+ ], N);
7340
+ var Si = Object.defineProperty, Ci = Object.getOwnPropertyDescriptor, Ee = (t, e, s, i) => {
7341
+ for (var a = i > 1 ? void 0 : i ? Ci(e, s) : e, r = t.length - 1, o; r >= 0; r--)
7282
7342
  (o = t[r]) && (a = (i ? o(e, s, a) : o(a)) || a);
7283
- return i && a && ki(e, s, a), a;
7343
+ return i && a && Si(e, s, a), a;
7284
7344
  };
7285
- const Ci = 6;
7286
- let ae = class extends w {
7345
+ const Fi = 6;
7346
+ let ae = class extends k {
7287
7347
  constructor() {
7288
7348
  super(...arguments), this.assets = [], this.folders = [], this.folderPreviews = {}, this.selectedIds = [], this.isLoading = !1, this.multiSelect = !0, this._prevCount = 0;
7289
7349
  }
@@ -7325,7 +7385,7 @@ let ae = class extends w {
7325
7385
  `;
7326
7386
  }
7327
7387
  )}
7328
- ${this.isLoading ? Array.from({ length: Ci }, () => n`<div class="ghost-card"></div>`) : f}
7388
+ ${this.isLoading ? Array.from({ length: Fi }, () => n`<div class="ghost-card"></div>`) : f}
7329
7389
  </div>
7330
7390
  `;
7331
7391
  }
@@ -7379,15 +7439,15 @@ Ee([
7379
7439
  h({ type: Boolean })
7380
7440
  ], ae.prototype, "multiSelect", 2);
7381
7441
  ae = Ee([
7382
- k("ap-grid-view")
7442
+ S("ap-grid-view")
7383
7443
  ], ae);
7384
- var Fi = Object.defineProperty, Ei = Object.getOwnPropertyDescriptor, ge = (t, e, s, i) => {
7385
- for (var a = i > 1 ? void 0 : i ? Ei(e, s) : e, r = t.length - 1, o; r >= 0; r--)
7444
+ var Ei = Object.defineProperty, Ai = Object.getOwnPropertyDescriptor, ge = (t, e, s, i) => {
7445
+ for (var a = i > 1 ? void 0 : i ? Ai(e, s) : e, r = t.length - 1, o; r >= 0; r--)
7386
7446
  (o = t[r]) && (a = (i ? o(e, s, a) : o(a)) || a);
7387
- return i && a && Fi(e, s, a), a;
7447
+ return i && a && Ei(e, s, a), a;
7388
7448
  };
7389
- const Ai = 5;
7390
- let Q = class extends w {
7449
+ const Ti = 5;
7450
+ let Q = class extends k {
7391
7451
  constructor() {
7392
7452
  super(...arguments), this.assets = [], this.folders = [], this.selectedIds = [], this.isLoading = !1, this.multiSelect = !0, this.totalCount = 0, this.isSelectingAll = !1;
7393
7453
  }
@@ -7444,7 +7504,7 @@ let Q = class extends w {
7444
7504
  ></ap-asset-row>
7445
7505
  `
7446
7506
  )}
7447
- ${this.isLoading ? Array.from({ length: Ai }, () => n`<div class="ghost-row"></div>`) : f}
7507
+ ${this.isLoading ? Array.from({ length: Ti }, () => n`<div class="ghost-row"></div>`) : f}
7448
7508
  </div>
7449
7509
  `;
7450
7510
  }
@@ -7547,18 +7607,18 @@ ge([
7547
7607
  h({ type: Boolean })
7548
7608
  ], Q.prototype, "isSelectingAll", 2);
7549
7609
  Q = ge([
7550
- k("ap-list-view")
7610
+ S("ap-list-view")
7551
7611
  ], Q);
7552
7612
  function lt(t) {
7553
7613
  var i;
7554
7614
  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) || (e == null ? void 0 : e.preview) || ((i = t.url) == null ? void 0 : i.cdn) || "";
7555
7615
  return Ie(s);
7556
7616
  }
7557
- function _s(t) {
7617
+ function ys(t) {
7558
7618
  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) || "";
7559
7619
  return s ? Ie(s) : "";
7560
7620
  }
7561
- function Rt(t) {
7621
+ function Nt(t) {
7562
7622
  var s, i;
7563
7623
  let e = Ie(((s = t.url) == null ? void 0 : s.cdn) || ((i = t.url) == null ? void 0 : i.public) || "");
7564
7624
  return e ? (e = e.replace(/([?&])func=proxy&?/, "$1").replace(/[?&]$/, ""), Ve(e, {
@@ -7578,14 +7638,14 @@ function Ve(t, e) {
7578
7638
  return t;
7579
7639
  }
7580
7640
  }
7581
- const as = /^(https:\/\/)([a-z0-9_-]+)\.filerobot\.com\//i;
7641
+ const is = /^(https:\/\/)([a-z0-9_-]+)\.filerobot\.com\//i;
7582
7642
  function Ie(t, e) {
7583
7643
  if (!t) return "";
7584
7644
  if (t.includes("assets.filerobot.com")) return t;
7585
- const s = t.match(as);
7645
+ const s = t.match(is);
7586
7646
  if (s) {
7587
7647
  const i = s[2];
7588
- return t.replace(as, `$1assets.filerobot.com/${i}/`);
7648
+ return t.replace(is, `$1assets.filerobot.com/${i}/`);
7589
7649
  }
7590
7650
  if (e)
7591
7651
  try {
@@ -7595,7 +7655,7 @@ function Ie(t, e) {
7595
7655
  }
7596
7656
  return t;
7597
7657
  }
7598
- function Nt(t) {
7658
+ function jt(t) {
7599
7659
  if (t === 0) return "0 B";
7600
7660
  const e = ["B", "KB", "MB", "GB", "TB"], s = 1024, i = Math.floor(Math.log(t) / Math.log(s));
7601
7661
  return `${(t / Math.pow(s, i)).toFixed(i === 0 ? 0 : 1)} ${e[i]}`;
@@ -7609,11 +7669,11 @@ function ct(t) {
7609
7669
  day: "numeric"
7610
7670
  });
7611
7671
  }
7612
- function ys(t, e) {
7672
+ function xs(t, e) {
7613
7673
  return !t || !e ? "" : `${t} x ${e}`;
7614
7674
  }
7615
- const Ti = /* @__PURE__ */ new Set(["jpg", "jpeg", "png", "gif", "webp", "svg", "bmp", "ico", "tiff", "tif", "avif", "heic", "heif"]), Oi = /* @__PURE__ */ new Set([
7616
- ...Ti,
7675
+ const Mi = /* @__PURE__ */ new Set(["jpg", "jpeg", "png", "gif", "webp", "svg", "bmp", "ico", "tiff", "tif", "avif", "heic", "heif"]), Oi = /* @__PURE__ */ new Set([
7676
+ ...Mi,
7617
7677
  "pdf",
7618
7678
  "psd",
7619
7679
  "eps",
@@ -7624,7 +7684,7 @@ const Ti = /* @__PURE__ */ new Set(["jpg", "jpeg", "png", "gif", "webp", "svg",
7624
7684
  "woff2",
7625
7685
  "eot"
7626
7686
  ]);
7627
- function Me(t) {
7687
+ function Oe(t) {
7628
7688
  if (!t) return "other";
7629
7689
  const e = {
7630
7690
  image: "image",
@@ -7636,11 +7696,11 @@ function Me(t) {
7636
7696
  };
7637
7697
  return e[t] ? e[t] : t.startsWith("image/") ? "image" : t.startsWith("video/") ? "video" : t.startsWith("audio/") ? "audio" : t.startsWith("application/pdf") || t.startsWith("text/") || t.startsWith("application/msword") || t.startsWith("application/vnd.") ? "document" : t.startsWith("application/zip") || t.startsWith("application/x-rar") || t.startsWith("application/x-7z") || t.startsWith("application/gzip") ? "archive" : t.startsWith("font/") ? "font" : "other";
7638
7698
  }
7639
- function xs(t) {
7699
+ function ws(t) {
7640
7700
  const e = (t == null ? void 0 : t.toLowerCase().replace(".", "")) || "";
7641
7701
  return Oi.has(e);
7642
7702
  }
7643
- const $s = "https://assets.filerobot.com/scaleflex/assets/file-types/v2/", Mi = {
7703
+ const $s = "https://assets.filerobot.com/scaleflex/assets/file-types/v2/", Pi = {
7644
7704
  png: "PNG",
7645
7705
  jpg: "JPG",
7646
7706
  jpeg: "JPG",
@@ -7704,7 +7764,7 @@ const $s = "https://assets.filerobot.com/scaleflex/assets/file-types/v2/", Mi =
7704
7764
  bin: "BIN"
7705
7765
  };
7706
7766
  function _t(t) {
7707
- const e = (t == null ? void 0 : t.toLowerCase().replace(".", "")) || "", s = Mi[e];
7767
+ const e = (t == null ? void 0 : t.toLowerCase().replace(".", "")) || "", s = Pi[e];
7708
7768
  return `${$s}${s || "DEFAULT"}.png`;
7709
7769
  }
7710
7770
  function Ke() {
@@ -7715,17 +7775,17 @@ function Ot(t) {
7715
7775
  const e = t.split("/");
7716
7776
  return e.length > 1 ? e[1] : e[0];
7717
7777
  }
7718
- const Pi = /* @__PURE__ */ new Set(["png", "svg", "webp", "gif", "avif"]);
7719
- function jt(t) {
7778
+ const Li = /* @__PURE__ */ new Set(["png", "svg", "webp", "gif", "avif"]);
7779
+ function Ut(t) {
7720
7780
  const e = (t == null ? void 0 : t.toLowerCase().replace(".", "")) || "";
7721
- return Pi.has(e);
7781
+ return Li.has(e);
7722
7782
  }
7723
- var Li = Object.defineProperty, Ii = Object.getOwnPropertyDescriptor, Ze = (t, e, s, i) => {
7724
- for (var a = i > 1 ? void 0 : i ? Ii(e, s) : e, r = t.length - 1, o; r >= 0; r--)
7783
+ var Ii = Object.defineProperty, Di = Object.getOwnPropertyDescriptor, Ze = (t, e, s, i) => {
7784
+ for (var a = i > 1 ? void 0 : i ? Di(e, s) : e, r = t.length - 1, o; r >= 0; r--)
7725
7785
  (o = t[r]) && (a = (i ? o(e, s, a) : o(a)) || a);
7726
- return i && a && Li(e, s, a), a;
7786
+ return i && a && Ii(e, s, a), a;
7727
7787
  };
7728
- let we = class extends w {
7788
+ let $e = class extends k {
7729
7789
  constructor() {
7730
7790
  super(...arguments), this.index = 0, this.selected = !1, this.multiSelect = !0;
7731
7791
  }
@@ -7764,10 +7824,10 @@ let we = class extends w {
7764
7824
  var c, p, u, v;
7765
7825
  const t = this.asset;
7766
7826
  if (!t) return n``;
7767
- const s = Me(t.type) === "video", i = ((c = t.extension) == null ? void 0 : c.toLowerCase()) === "pdf", a = xs(t.extension || "");
7827
+ const s = Oe(t.type) === "video", i = ((c = t.extension) == null ? void 0 : c.toLowerCase()) === "pdf", a = ws(t.extension || "");
7768
7828
  let r = "";
7769
- s ? r = _s(t) : i ? r = Rt(t) : a && (r = lt(t));
7770
- const o = _t(t.extension || ""), l = jt(t.extension || "");
7829
+ s ? r = ys(t) : i ? r = Nt(t) : a && (r = lt(t));
7830
+ const o = _t(t.extension || ""), l = Ut(t.extension || "");
7771
7831
  return n`
7772
7832
  <div class="card" @click=${this._handleSelect}>
7773
7833
  <div class="thumbnail ${l && r ? "chess" : ""}">
@@ -7813,16 +7873,16 @@ let we = class extends w {
7813
7873
  <div class="info">
7814
7874
  <div class="name" title=${t.name}>${t.name}</div>
7815
7875
  <div class="meta">${(u = t.extension) == null ? void 0 : u.toUpperCase()}${(() => {
7816
- var E, y, D, F;
7817
- const d = ((E = t.info) == null ? void 0 : E.img_w) || ((y = t.info) == null ? void 0 : y.video_w), g = ((D = t.info) == null ? void 0 : D.img_h) || ((F = t.info) == null ? void 0 : F.video_h), b = ys(d, g);
7876
+ var E, y, A, F;
7877
+ const d = ((E = t.info) == null ? void 0 : E.img_w) || ((y = t.info) == null ? void 0 : y.video_w), g = ((A = t.info) == null ? void 0 : A.img_h) || ((F = t.info) == null ? void 0 : F.video_h), b = xs(d, g);
7818
7878
  return b ? ` · ${b}` : "";
7819
- })()} · ${Nt(((v = t.size) == null ? void 0 : v.bytes) || 0)}</div>
7879
+ })()} · ${jt(((v = t.size) == null ? void 0 : v.bytes) || 0)}</div>
7820
7880
  </div>
7821
7881
  </div>
7822
7882
  `;
7823
7883
  }
7824
7884
  };
7825
- we.styles = $`
7885
+ $e.styles = $`
7826
7886
  :host {
7827
7887
  display: block;
7828
7888
  animation: ap-card-in 300ms ease-out both;
@@ -8001,25 +8061,25 @@ we.styles = $`
8001
8061
  `;
8002
8062
  Ze([
8003
8063
  h({ type: Object })
8004
- ], we.prototype, "asset", 2);
8064
+ ], $e.prototype, "asset", 2);
8005
8065
  Ze([
8006
8066
  h({ type: Number })
8007
- ], we.prototype, "index", 2);
8067
+ ], $e.prototype, "index", 2);
8008
8068
  Ze([
8009
8069
  h({ type: Boolean, reflect: !0 })
8010
- ], we.prototype, "selected", 2);
8070
+ ], $e.prototype, "selected", 2);
8011
8071
  Ze([
8012
8072
  h({ type: Boolean })
8013
- ], we.prototype, "multiSelect", 2);
8014
- we = Ze([
8015
- k("ap-asset-card")
8016
- ], we);
8017
- var Di = Object.defineProperty, zi = Object.getOwnPropertyDescriptor, Je = (t, e, s, i) => {
8018
- for (var a = i > 1 ? void 0 : i ? zi(e, s) : e, r = t.length - 1, o; r >= 0; r--)
8073
+ ], $e.prototype, "multiSelect", 2);
8074
+ $e = Ze([
8075
+ S("ap-asset-card")
8076
+ ], $e);
8077
+ var zi = Object.defineProperty, Ri = Object.getOwnPropertyDescriptor, Je = (t, e, s, i) => {
8078
+ for (var a = i > 1 ? void 0 : i ? Ri(e, s) : e, r = t.length - 1, o; r >= 0; r--)
8019
8079
  (o = t[r]) && (a = (i ? o(e, s, a) : o(a)) || a);
8020
- return i && a && Di(e, s, a), a;
8080
+ return i && a && zi(e, s, a), a;
8021
8081
  };
8022
- let ke = class extends w {
8082
+ let ke = class extends k {
8023
8083
  constructor() {
8024
8084
  super(...arguments), this.index = 0, this.selected = !1, this.multiSelect = !0;
8025
8085
  }
@@ -8048,10 +8108,10 @@ let ke = class extends w {
8048
8108
  var c, p, u;
8049
8109
  const t = this.asset;
8050
8110
  if (!t) return n``;
8051
- const s = Me(t.type) === "video", i = ((c = t.extension) == null ? void 0 : c.toLowerCase()) === "pdf", a = xs(t.extension || "");
8111
+ const s = Oe(t.type) === "video", i = ((c = t.extension) == null ? void 0 : c.toLowerCase()) === "pdf", a = ws(t.extension || "");
8052
8112
  let r = "";
8053
- s ? r = _s(t) : i ? r = Rt(t) : a && (r = lt(t));
8054
- const o = _t(t.extension || ""), l = jt(t.extension || "");
8113
+ s ? r = ys(t) : i ? r = Nt(t) : a && (r = lt(t));
8114
+ const o = _t(t.extension || ""), l = Ut(t.extension || "");
8055
8115
  return n`
8056
8116
  <div class="row" @click=${this._handleSelect}>
8057
8117
  ${this.multiSelect ? n`
@@ -8085,7 +8145,7 @@ let ke = class extends w {
8085
8145
  </div>
8086
8146
  <div class="name" title=${t.name}>${t.name}</div>
8087
8147
  <div class="type">${(p = t.extension) == null ? void 0 : p.toUpperCase()}</div>
8088
- <div class="desc">${Nt(((u = t.size) == null ? void 0 : u.bytes) || 0)}</div>
8148
+ <div class="desc">${jt(((u = t.size) == null ? void 0 : u.bytes) || 0)}</div>
8089
8149
  <div class="date">${ct(t.created_at || "")}</div>
8090
8150
  <div class="actions">
8091
8151
  <button class="icon-btn" @click=${this._handlePreview} aria-label="Preview">
@@ -8235,14 +8295,14 @@ Je([
8235
8295
  h({ type: Boolean })
8236
8296
  ], ke.prototype, "multiSelect", 2);
8237
8297
  ke = Je([
8238
- k("ap-asset-row")
8298
+ S("ap-asset-row")
8239
8299
  ], ke);
8240
- var Ri = Object.defineProperty, Ni = Object.getOwnPropertyDescriptor, Bt = (t, e, s, i) => {
8241
- for (var a = i > 1 ? void 0 : i ? Ni(e, s) : e, r = t.length - 1, o; r >= 0; r--)
8300
+ var Ni = Object.defineProperty, ji = Object.getOwnPropertyDescriptor, Bt = (t, e, s, i) => {
8301
+ for (var a = i > 1 ? void 0 : i ? ji(e, s) : e, r = t.length - 1, o; r >= 0; r--)
8242
8302
  (o = t[r]) && (a = (i ? o(e, s, a) : o(a)) || a);
8243
- return i && a && Ri(e, s, a), a;
8303
+ return i && a && Ni(e, s, a), a;
8244
8304
  };
8245
- let Ge = class extends w {
8305
+ let Ge = class extends k {
8246
8306
  constructor() {
8247
8307
  super(...arguments), this.previews = [];
8248
8308
  }
@@ -8265,7 +8325,7 @@ let Ge = class extends w {
8265
8325
  const e = t.file_uri_cdn;
8266
8326
  if (!e) return "";
8267
8327
  let s = Ie(e);
8268
- const i = Me(t.file_type), a = String(window.devicePixelRatio || 1);
8328
+ const i = Oe(t.file_type), a = String(window.devicePixelRatio || 1);
8269
8329
  return i === "video" ? Ve(s, { w: "200", dpr: a, force_format: "webp,jpeg" }) : t.file_type === "application/pdf" || Ot(t.file_type).toLowerCase() === "pdf" ? (s = s.replace(/([?&])func=proxy&?/, "$1").replace(/[?&]$/, ""), Ve(s, { w: "200", dpr: a, force_format: "webp,jpeg", doc_page: "1", bypass_process_proxy: "1" })) : Ve(s, { w: "200", dpr: a });
8270
8330
  }
8271
8331
  _renderPreviewImg(t) {
@@ -8470,14 +8530,14 @@ Bt([
8470
8530
  h({ type: Array })
8471
8531
  ], Ge.prototype, "previews", 2);
8472
8532
  Ge = Bt([
8473
- k("ap-folder-card")
8533
+ S("ap-folder-card")
8474
8534
  ], Ge);
8475
- var ji = Object.defineProperty, Bi = Object.getOwnPropertyDescriptor, ws = (t, e, s, i) => {
8535
+ var Ui = Object.defineProperty, Bi = Object.getOwnPropertyDescriptor, ks = (t, e, s, i) => {
8476
8536
  for (var a = i > 1 ? void 0 : i ? Bi(e, s) : e, r = t.length - 1, o; r >= 0; r--)
8477
8537
  (o = t[r]) && (a = (i ? o(e, s, a) : o(a)) || a);
8478
- return i && a && ji(e, s, a), a;
8538
+ return i && a && Ui(e, s, a), a;
8479
8539
  };
8480
- let dt = class extends w {
8540
+ let dt = class extends k {
8481
8541
  _handleOpen() {
8482
8542
  this.dispatchEvent(new CustomEvent("folder-open", {
8483
8543
  detail: { folder: this.folder },
@@ -8533,18 +8593,18 @@ dt.styles = $`
8533
8593
  color: var(--ap-muted-foreground, oklch(0.685 0.033 249.82));
8534
8594
  }
8535
8595
  `;
8536
- ws([
8596
+ ks([
8537
8597
  h({ type: Object })
8538
8598
  ], dt.prototype, "folder", 2);
8539
- dt = ws([
8540
- k("ap-folder-row")
8599
+ dt = ks([
8600
+ S("ap-folder-row")
8541
8601
  ], dt);
8542
- var Ui = Object.defineProperty, Vi = Object.getOwnPropertyDescriptor, ks = (t, e, s, i) => {
8543
- for (var a = i > 1 ? void 0 : i ? Vi(e, s) : e, r = t.length - 1, o; r >= 0; r--)
8602
+ var Vi = Object.defineProperty, qi = Object.getOwnPropertyDescriptor, Ss = (t, e, s, i) => {
8603
+ for (var a = i > 1 ? void 0 : i ? qi(e, s) : e, r = t.length - 1, o; r >= 0; r--)
8544
8604
  (o = t[r]) && (a = (i ? o(e, s, a) : o(a)) || a);
8545
- return i && a && Ui(e, s, a), a;
8605
+ return i && a && Vi(e, s, a), a;
8546
8606
  };
8547
- let pt = class extends w {
8607
+ let pt = class extends k {
8548
8608
  constructor() {
8549
8609
  super(...arguments), this.variant = "grid";
8550
8610
  }
@@ -8591,25 +8651,25 @@ pt.styles = $`
8591
8651
  .skeleton { animation: none; }
8592
8652
  }
8593
8653
  `;
8594
- ks([
8654
+ Ss([
8595
8655
  h()
8596
8656
  ], pt.prototype, "variant", 2);
8597
- pt = ks([
8598
- k("ap-skeleton")
8657
+ pt = Ss([
8658
+ S("ap-skeleton")
8599
8659
  ], pt);
8600
- function qi(t) {
8660
+ function Hi(t) {
8601
8661
  var a, r;
8602
8662
  const e = (a = t.info) == null ? void 0 : a.playlists;
8603
8663
  if (!(e != null && e.length)) return null;
8604
8664
  const s = (r = e[0]) == null ? void 0 : r.playlists;
8605
8665
  return s != null && s.length && s[0] || null;
8606
8666
  }
8607
- var Hi = Object.defineProperty, Ki = Object.getOwnPropertyDescriptor, j = (t, e, s, i) => {
8608
- for (var a = i > 1 ? void 0 : i ? Ki(e, s) : e, r = t.length - 1, o; r >= 0; r--)
8667
+ var Ki = Object.defineProperty, Gi = Object.getOwnPropertyDescriptor, z = (t, e, s, i) => {
8668
+ for (var a = i > 1 ? void 0 : i ? Gi(e, s) : e, r = t.length - 1, o; r >= 0; r--)
8609
8669
  (o = t[r]) && (a = (i ? o(e, s, a) : o(a)) || a);
8610
- return i && a && Hi(e, s, a), a;
8670
+ return i && a && Ki(e, s, a), a;
8611
8671
  };
8612
- let R = class extends w {
8672
+ let D = class extends k {
8613
8673
  constructor() {
8614
8674
  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;
8615
8675
  }
@@ -8631,13 +8691,13 @@ let R = class extends w {
8631
8691
  }
8632
8692
  updated(t) {
8633
8693
  if (super.updated(t), t.has("asset") && (this._destroyHls(), this._previewLoading = !0, this.asset)) {
8634
- const e = Me(this.asset.type);
8694
+ const e = Oe(this.asset.type);
8635
8695
  e === "video" && this._setupHls(this.asset), e !== "image" && e !== "video" && (this._previewLoading = !1);
8636
8696
  }
8637
8697
  }
8638
8698
  async _setupHls(t) {
8639
8699
  var i, a;
8640
- const e = qi(t);
8700
+ const e = Hi(t);
8641
8701
  if (!e || (await this.updateComplete, ((i = this.asset) == null ? void 0 : i.uuid) !== t.uuid)) return;
8642
8702
  const s = this._videoEl;
8643
8703
  if (s) {
@@ -8704,7 +8764,7 @@ let R = class extends w {
8704
8764
  }
8705
8765
  /** Check if an asset supports inline fullscreen preview (not PDF/other). */
8706
8766
  _supportsFullscreen(t) {
8707
- const e = Me(t.type);
8767
+ const e = Oe(t.type);
8708
8768
  return e === "image" || e === "video" || e === "audio";
8709
8769
  }
8710
8770
  /**
@@ -8773,14 +8833,14 @@ let R = class extends w {
8773
8833
  }
8774
8834
  _applyTagFilter(t) {
8775
8835
  this.dispatchEvent(new CustomEvent("filter-update", {
8776
- detail: { key: m.TAGS, values: [t], operator: x.IS },
8836
+ detail: { key: m.TAGS, values: [t], operator: w.IS },
8777
8837
  bubbles: !0,
8778
8838
  composed: !0
8779
8839
  }));
8780
8840
  }
8781
8841
  _applyLabelFilter(t) {
8782
8842
  this.dispatchEvent(new CustomEvent("filter-update", {
8783
- detail: { key: m.LABELS, values: [t], operator: x.IS },
8843
+ detail: { key: m.LABELS, values: [t], operator: w.IS },
8784
8844
  bubbles: !0,
8785
8845
  composed: !0
8786
8846
  }));
@@ -8847,7 +8907,7 @@ let R = class extends w {
8847
8907
  _getFileInfoRows(t) {
8848
8908
  var s, i, a, r, o;
8849
8909
  const e = [];
8850
- 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: Nt(t.size.bytes) }), (i = t.info) != null && i.img_w && e.push({ label: "Dimensions", value: ys(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 && r.duration && e.push({ label: "Duration", value: `${Math.round(t.info.duration)}s` }), (o = t.info) != null && o.color_space && e.push({ label: "Color space", value: t.info.color_space }), t.created_at && e.push({ label: "Created", value: ct(t.created_at) }), t.modified_at && e.push({ label: "Modified", value: ct(t.modified_at) }), e;
8910
+ 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: jt(t.size.bytes) }), (i = t.info) != null && i.img_w && e.push({ label: "Dimensions", value: xs(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 && r.duration && e.push({ label: "Duration", value: `${Math.round(t.info.duration)}s` }), (o = t.info) != null && o.color_space && e.push({ label: "Color space", value: t.info.color_space }), t.created_at && e.push({ label: "Created", value: ct(t.created_at) }), t.modified_at && e.push({ label: "Modified", value: ct(t.modified_at) }), e;
8851
8911
  }
8852
8912
  /**
8853
8913
  * Build a lookup map from metadata field key → field definition.
@@ -8981,10 +9041,10 @@ let R = class extends w {
8981
9041
  `;
8982
9042
  }
8983
9043
  render() {
8984
- var L, I, N, O, ne, fe, Ae, et;
9044
+ var H, T, R, U, ne, fe, Ae, et;
8985
9045
  const t = this.asset;
8986
9046
  if (!t) return f;
8987
- const e = Me(t.type), s = e === "image", i = e === "video", a = e === "audio", r = ((L = t.extension) == null ? void 0 : L.toLowerCase()) === "pdf", o = _t(t.extension || ""), l = jt(t.extension || ""), c = ((I = t.extension) == null ? void 0 : I.toLowerCase()) === "svg", p = lt(t), u = s ? c ? ((N = t.url) == null ? void 0 : N.cdn) || "" : p || Ie(((O = t.url) == null ? void 0 : O.cdn) || "", this.containerToken) : "", v = s ? this._getFullscreenImageUrl(t) : "", d = s && !c ? this._getBlurDimensions(t) : null, g = i && ((ne = t.url) == null ? void 0 : ne.cdn) || "", b = i && (((fe = t.info) == null ? void 0 : fe.video_thumbnail) || ((Ae = t.info) == null ? void 0 : Ae.preview)) || "", E = r && !s ? Rt(t) : "", y = this._getCurrentIndex(), D = y > 0 && this._findNavTarget(y, -1) >= 0, F = y >= 0 && this._findNavTarget(y, 1) >= 0, A = this.assets.length > 1;
9047
+ const e = Oe(t.type), s = e === "image", i = e === "video", a = e === "audio", r = ((H = t.extension) == null ? void 0 : H.toLowerCase()) === "pdf", o = _t(t.extension || ""), l = Ut(t.extension || ""), c = ((T = t.extension) == null ? void 0 : T.toLowerCase()) === "svg", p = lt(t), u = s ? c ? ((R = t.url) == null ? void 0 : R.cdn) || "" : p || Ie(((U = t.url) == null ? void 0 : U.cdn) || "", this.containerToken) : "", v = s ? this._getFullscreenImageUrl(t) : "", d = s && !c ? this._getBlurDimensions(t) : null, g = i && ((ne = t.url) == null ? void 0 : ne.cdn) || "", b = i && (((fe = t.info) == null ? void 0 : fe.video_thumbnail) || ((Ae = t.info) == null ? void 0 : Ae.preview)) || "", E = r && !s ? Nt(t) : "", y = this._getCurrentIndex(), A = y > 0 && this._findNavTarget(y, -1) >= 0, F = y >= 0 && this._findNavTarget(y, 1) >= 0, I = this.assets.length > 1;
8988
9048
  return n`
8989
9049
  <div class="panel">
8990
9050
  <div class="panel-header">
@@ -9003,8 +9063,8 @@ let R = class extends w {
9003
9063
  </div>
9004
9064
 
9005
9065
  <div class="preview-area ${s && l ? "chess" : ""}">
9006
- ${A ? n`
9007
- <button class="nav-btn prev" @click=${this._prev} ?disabled=${!D} aria-label="Previous">
9066
+ ${I ? n`
9067
+ <button class="nav-btn prev" @click=${this._prev} ?disabled=${!A} aria-label="Previous">
9008
9068
  <ap-icon name="chevron-left" .size=${16}></ap-icon>
9009
9069
  </button>
9010
9070
  <button class="nav-btn next" @click=${this._next} ?disabled=${!F} aria-label="Next">
@@ -9075,7 +9135,7 @@ let R = class extends w {
9075
9135
  `;
9076
9136
  }
9077
9137
  };
9078
- R.styles = $`
9138
+ D.styles = $`
9079
9139
  :host {
9080
9140
  display: block;
9081
9141
  }
@@ -9385,60 +9445,60 @@ R.styles = $`
9385
9445
  .accordion-chevron { transition: none; }
9386
9446
  }
9387
9447
  `;
9388
- j([
9448
+ z([
9389
9449
  h({ type: Object })
9390
- ], R.prototype, "asset", 2);
9391
- j([
9450
+ ], D.prototype, "asset", 2);
9451
+ z([
9392
9452
  h({ type: Array })
9393
- ], R.prototype, "assets", 2);
9394
- j([
9453
+ ], D.prototype, "assets", 2);
9454
+ z([
9395
9455
  h({ type: Array })
9396
- ], R.prototype, "selectedIds", 2);
9397
- j([
9456
+ ], D.prototype, "selectedIds", 2);
9457
+ z([
9398
9458
  h()
9399
- ], R.prototype, "containerToken", 2);
9400
- j([
9459
+ ], D.prototype, "containerToken", 2);
9460
+ z([
9401
9461
  h({ type: Boolean })
9402
- ], R.prototype, "showMetadata", 2);
9403
- j([
9462
+ ], D.prototype, "showMetadata", 2);
9463
+ z([
9404
9464
  h({ type: Array })
9405
- ], R.prototype, "metadataFields", 2);
9406
- j([
9465
+ ], D.prototype, "metadataFields", 2);
9466
+ z([
9407
9467
  h({ type: Array })
9408
- ], R.prototype, "labels", 2);
9409
- j([
9468
+ ], D.prototype, "labels", 2);
9469
+ z([
9410
9470
  h({ type: Object })
9411
- ], R.prototype, "regionalFilters", 2);
9412
- j([
9471
+ ], D.prototype, "regionalFilters", 2);
9472
+ z([
9413
9473
  h({ type: Boolean })
9414
- ], R.prototype, "multiSelect", 2);
9415
- j([
9474
+ ], D.prototype, "multiSelect", 2);
9475
+ z([
9416
9476
  Se(".preview-area")
9417
- ], R.prototype, "previewArea", 2);
9418
- j([
9477
+ ], D.prototype, "previewArea", 2);
9478
+ z([
9419
9479
  Se("video")
9420
- ], R.prototype, "_videoEl", 2);
9421
- j([
9480
+ ], D.prototype, "_videoEl", 2);
9481
+ z([
9422
9482
  _()
9423
- ], R.prototype, "_isFullscreen", 2);
9424
- j([
9483
+ ], D.prototype, "_isFullscreen", 2);
9484
+ z([
9425
9485
  _()
9426
- ], R.prototype, "_fsImageLoaded", 2);
9427
- j([
9486
+ ], D.prototype, "_fsImageLoaded", 2);
9487
+ z([
9428
9488
  _()
9429
- ], R.prototype, "_previewLoading", 2);
9430
- j([
9489
+ ], D.prototype, "_previewLoading", 2);
9490
+ z([
9431
9491
  _()
9432
- ], R.prototype, "_openSections", 2);
9433
- R = j([
9434
- k("ap-preview-panel")
9435
- ], R);
9436
- var Gi = Object.defineProperty, Yi = Object.getOwnPropertyDescriptor, Ne = (t, e, s, i) => {
9437
- for (var a = i > 1 ? void 0 : i ? Yi(e, s) : e, r = t.length - 1, o; r >= 0; r--)
9492
+ ], D.prototype, "_openSections", 2);
9493
+ D = z([
9494
+ S("ap-preview-panel")
9495
+ ], D);
9496
+ var Yi = Object.defineProperty, Xi = Object.getOwnPropertyDescriptor, Ne = (t, e, s, i) => {
9497
+ for (var a = i > 1 ? void 0 : i ? Xi(e, s) : e, r = t.length - 1, o; r >= 0; r--)
9438
9498
  (o = t[r]) && (a = (i ? o(e, s, a) : o(a)) || a);
9439
- return i && a && Gi(e, s, a), a;
9499
+ return i && a && Yi(e, s, a), a;
9440
9500
  };
9441
- let he = class extends w {
9501
+ let he = class extends k {
9442
9502
  constructor() {
9443
9503
  super(...arguments), this.selectedAssets = [], this.totalCount = 0, this.isSelectingAll = !1, this.multiSelect = !0;
9444
9504
  }
@@ -9573,14 +9633,14 @@ Ne([
9573
9633
  h({ type: Number })
9574
9634
  ], he.prototype, "maxSelections", 2);
9575
9635
  he = Ne([
9576
- k("ap-selection-bar")
9636
+ S("ap-selection-bar")
9577
9637
  ], he);
9578
- var Xi = Object.defineProperty, Wi = Object.getOwnPropertyDescriptor, Ut = (t, e, s, i) => {
9579
- for (var a = i > 1 ? void 0 : i ? Wi(e, s) : e, r = t.length - 1, o; r >= 0; r--)
9638
+ var Wi = Object.defineProperty, Qi = Object.getOwnPropertyDescriptor, Vt = (t, e, s, i) => {
9639
+ for (var a = i > 1 ? void 0 : i ? Qi(e, s) : e, r = t.length - 1, o; r >= 0; r--)
9580
9640
  (o = t[r]) && (a = (i ? o(e, s, a) : o(a)) || a);
9581
- return i && a && Xi(e, s, a), a;
9641
+ return i && a && Wi(e, s, a), a;
9582
9642
  };
9583
- let Ye = class extends w {
9643
+ let Ye = class extends k {
9584
9644
  constructor() {
9585
9645
  super(...arguments), this.active = !1, this.rect = { x: 0, y: 0, width: 0, height: 0 };
9586
9646
  }
@@ -9611,21 +9671,21 @@ Ye.styles = $`
9611
9671
  border-radius: 2px;
9612
9672
  }
9613
9673
  `;
9614
- Ut([
9674
+ Vt([
9615
9675
  h({ type: Boolean })
9616
9676
  ], Ye.prototype, "active", 2);
9617
- Ut([
9677
+ Vt([
9618
9678
  h({ type: Object })
9619
9679
  ], Ye.prototype, "rect", 2);
9620
- Ye = Ut([
9621
- k("ap-marquee-overlay")
9680
+ Ye = Vt([
9681
+ S("ap-marquee-overlay")
9622
9682
  ], Ye);
9623
- var Qi = Object.defineProperty, Zi = Object.getOwnPropertyDescriptor, Vt = (t, e, s, i) => {
9624
- for (var a = i > 1 ? void 0 : i ? Zi(e, s) : e, r = t.length - 1, o; r >= 0; r--)
9683
+ var Zi = Object.defineProperty, Ji = Object.getOwnPropertyDescriptor, qt = (t, e, s, i) => {
9684
+ for (var a = i > 1 ? void 0 : i ? Ji(e, s) : e, r = t.length - 1, o; r >= 0; r--)
9625
9685
  (o = t[r]) && (a = (i ? o(e, s, a) : o(a)) || a);
9626
- return i && a && Qi(e, s, a), a;
9686
+ return i && a && Zi(e, s, a), a;
9627
9687
  };
9628
- const Ji = {
9688
+ const er = {
9629
9689
  // ── Navigation & Actions ────────────────────────────────────────────
9630
9690
  search: [
9631
9691
  { tag: "circle", attrs: { cx: "11", cy: "11", r: "8" } },
@@ -9888,6 +9948,66 @@ const Ji = {
9888
9948
  { tag: "circle", attrs: { cx: "12", cy: "12", r: "10" } },
9889
9949
  { tag: "path", attrs: { d: "M12 6v6l4 2" } }
9890
9950
  ],
9951
+ // ── Metadata Field Types (exact Lucide icon paths) ─────────────────
9952
+ "toggle-left": [
9953
+ { tag: "rect", attrs: { width: "20", height: "14", x: "2", y: "5", rx: "7" } },
9954
+ { tag: "circle", attrs: { cx: "9", cy: "12", r: "3" } }
9955
+ ],
9956
+ "file-digit": [
9957
+ { tag: "path", attrs: { d: "M4 12V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2" } },
9958
+ { tag: "path", attrs: { d: "M14 2v5a1 1 0 0 0 1 1h5" } },
9959
+ { tag: "path", attrs: { d: "M10 16h2v6" } },
9960
+ { tag: "path", attrs: { d: "M10 22h4" } },
9961
+ { tag: "rect", attrs: { width: "4", height: "6", x: "2", y: "16", rx: "2" } }
9962
+ ],
9963
+ "decimals-arrow-right": [
9964
+ { tag: "path", attrs: { d: "M10 18h10" } },
9965
+ { tag: "path", attrs: { d: "m17 21 3-3-3-3" } },
9966
+ { tag: "path", attrs: { d: "M3 11h.01" } },
9967
+ { tag: "rect", attrs: { width: "5", height: "8", x: "15", y: "3", rx: "2.5" } },
9968
+ { tag: "rect", attrs: { width: "5", height: "8", x: "6", y: "3", rx: "2.5" } }
9969
+ ],
9970
+ "text-initial": [
9971
+ { tag: "path", attrs: { d: "M15 5h6" } },
9972
+ { tag: "path", attrs: { d: "M15 12h6" } },
9973
+ { tag: "path", attrs: { d: "M3 19h18" } },
9974
+ { tag: "path", attrs: { d: "m3 12 3.553-7.724a.5.5 0 0 1 .894 0L11 12" } },
9975
+ { tag: "path", attrs: { d: "M3.92 10h6.16" } }
9976
+ ],
9977
+ "text-align-justify": [
9978
+ { tag: "path", attrs: { d: "M3 5h18" } },
9979
+ { tag: "path", attrs: { d: "M3 12h18" } },
9980
+ { tag: "path", attrs: { d: "M3 19h18" } }
9981
+ ],
9982
+ paperclip: "m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",
9983
+ "link-2": [
9984
+ { tag: "path", attrs: { d: "M9 17H7A5 5 0 0 1 7 7h2" } },
9985
+ { tag: "path", attrs: { d: "M15 7h2a5 5 0 1 1 0 10h-2" } },
9986
+ { tag: "path", attrs: { d: "M8 12h8" } }
9987
+ ],
9988
+ "circle-dot": [
9989
+ { tag: "circle", attrs: { cx: "12", cy: "12", r: "10" } },
9990
+ { tag: "circle", attrs: { cx: "12", cy: "12", r: "1" } }
9991
+ ],
9992
+ "square-check": [
9993
+ { tag: "rect", attrs: { width: "18", height: "18", x: "3", y: "3", rx: "2" } },
9994
+ { tag: "path", attrs: { d: "m9 12 2 2 4-4" } }
9995
+ ],
9996
+ locate: [
9997
+ { tag: "path", attrs: { d: "M2 12h3" } },
9998
+ { tag: "path", attrs: { d: "M19 12h3" } },
9999
+ { tag: "path", attrs: { d: "M12 2v3" } },
10000
+ { tag: "path", attrs: { d: "M12 19v3" } },
10001
+ { tag: "circle", attrs: { cx: "12", cy: "12", r: "7" } }
10002
+ ],
10003
+ "list-ordered": [
10004
+ { tag: "path", attrs: { d: "M11 5h10" } },
10005
+ { tag: "path", attrs: { d: "M11 12h10" } },
10006
+ { tag: "path", attrs: { d: "M11 19h10" } },
10007
+ { tag: "path", attrs: { d: "M4 4h1v5" } },
10008
+ { tag: "path", attrs: { d: "M4 9h2" } },
10009
+ { tag: "path", attrs: { d: "M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02" } }
10010
+ ],
9891
10011
  // ── Misc ────────────────────────────────────────────────────────────
9892
10012
  component: [
9893
10013
  { tag: "path", attrs: { d: "M15.536 11.293a1 1 0 0 0 0 1.414l2.376 2.377a1 1 0 0 0 1.414 0l2.377-2.377a1 1 0 0 0 0-1.414l-2.377-2.377a1 1 0 0 0-1.414 0z" } },
@@ -9896,12 +10016,12 @@ const Ji = {
9896
10016
  { tag: "path", attrs: { d: "M8.916 4.674a1 1 0 0 0 0 1.414l2.377 2.376a1 1 0 0 0 1.414 0l2.377-2.376a1 1 0 0 0 0-1.414l-2.377-2.377a1 1 0 0 0-1.414 0z" } }
9897
10017
  ]
9898
10018
  };
9899
- let Xe = class extends w {
10019
+ let Xe = class extends k {
9900
10020
  constructor() {
9901
10021
  super(...arguments), this.name = "", this.size = 20;
9902
10022
  }
9903
10023
  render() {
9904
- const t = Ji[this.name];
10024
+ const t = er[this.name];
9905
10025
  if (!t) return f;
9906
10026
  const e = typeof t == "string" ? ce`<path d=${t}></path>` : t.map((s) => {
9907
10027
  const { tag: i, attrs: a } = s;
@@ -9935,21 +10055,21 @@ Xe.styles = [
9935
10055
  }
9936
10056
  `
9937
10057
  ];
9938
- Vt([
10058
+ qt([
9939
10059
  h()
9940
10060
  ], Xe.prototype, "name", 2);
9941
- Vt([
10061
+ qt([
9942
10062
  h({ type: Number })
9943
10063
  ], Xe.prototype, "size", 2);
9944
- Xe = Vt([
9945
- k("ap-icon")
10064
+ Xe = qt([
10065
+ S("ap-icon")
9946
10066
  ], Xe);
9947
- var er = Object.defineProperty, tr = Object.getOwnPropertyDescriptor, Ss = (t, e, s, i) => {
9948
- for (var a = i > 1 ? void 0 : i ? tr(e, s) : e, r = t.length - 1, o; r >= 0; r--)
10067
+ var tr = Object.defineProperty, sr = Object.getOwnPropertyDescriptor, Cs = (t, e, s, i) => {
10068
+ for (var a = i > 1 ? void 0 : i ? sr(e, s) : e, r = t.length - 1, o; r >= 0; r--)
9949
10069
  (o = t[r]) && (a = (i ? o(e, s, a) : o(a)) || a);
9950
- return i && a && er(e, s, a), a;
10070
+ return i && a && tr(e, s, a), a;
9951
10071
  };
9952
- let ht = class extends w {
10072
+ let ht = class extends k {
9953
10073
  constructor() {
9954
10074
  super(...arguments), this.size = 24;
9955
10075
  }
@@ -9973,18 +10093,18 @@ ht.styles = [
9973
10093
  }
9974
10094
  `
9975
10095
  ];
9976
- Ss([
10096
+ Cs([
9977
10097
  h({ type: Number })
9978
10098
  ], ht.prototype, "size", 2);
9979
- ht = Ss([
9980
- k("ap-spinner")
10099
+ ht = Cs([
10100
+ S("ap-spinner")
9981
10101
  ], ht);
9982
- var sr = Object.defineProperty, ar = Object.getOwnPropertyDescriptor, yt = (t, e, s, i) => {
9983
- for (var a = i > 1 ? void 0 : i ? ar(e, s) : e, r = t.length - 1, o; r >= 0; r--)
10102
+ var ar = Object.defineProperty, ir = Object.getOwnPropertyDescriptor, yt = (t, e, s, i) => {
10103
+ for (var a = i > 1 ? void 0 : i ? ir(e, s) : e, r = t.length - 1, o; r >= 0; r--)
9984
10104
  (o = t[r]) && (a = (i ? o(e, s, a) : o(a)) || a);
9985
- return i && a && sr(e, s, a), a;
10105
+ return i && a && ar(e, s, a), a;
9986
10106
  };
9987
- let De = class extends w {
10107
+ let De = class extends k {
9988
10108
  constructor() {
9989
10109
  super(...arguments), this.checked = !1, this.indeterminate = !1, this.disabled = !1, this._hasLabel = !1, this._handleHostClick = () => {
9990
10110
  this.dispatchEvent(new CustomEvent("ap-toggle", {
@@ -10082,14 +10202,14 @@ yt([
10082
10202
  h({ type: Boolean, reflect: !0 })
10083
10203
  ], De.prototype, "disabled", 2);
10084
10204
  De = yt([
10085
- k("ap-checkbox")
10205
+ S("ap-checkbox")
10086
10206
  ], De);
10087
- var ir = Object.defineProperty, rr = Object.getOwnPropertyDescriptor, Cs = (t, e, s, i) => {
10088
- for (var a = i > 1 ? void 0 : i ? rr(e, s) : e, r = t.length - 1, o; r >= 0; r--)
10207
+ var rr = Object.defineProperty, or = Object.getOwnPropertyDescriptor, Fs = (t, e, s, i) => {
10208
+ for (var a = i > 1 ? void 0 : i ? or(e, s) : e, r = t.length - 1, o; r >= 0; r--)
10089
10209
  (o = t[r]) && (a = (i ? o(e, s, a) : o(a)) || a);
10090
- return i && a && ir(e, s, a), a;
10210
+ return i && a && rr(e, s, a), a;
10091
10211
  };
10092
- let ut = class extends w {
10212
+ let ut = class extends k {
10093
10213
  constructor() {
10094
10214
  super(...arguments), this.open = !1, this._handleOutsideClick = (t) => {
10095
10215
  this.open && !t.composedPath().includes(this) && (this.open = !1);
@@ -10134,18 +10254,18 @@ ut.styles = [
10134
10254
  }
10135
10255
  `
10136
10256
  ];
10137
- Cs([
10257
+ Fs([
10138
10258
  _()
10139
10259
  ], ut.prototype, "open", 2);
10140
- ut = Cs([
10141
- k("ap-popover")
10260
+ ut = Fs([
10261
+ S("ap-popover")
10142
10262
  ], ut);
10143
- var or = Object.defineProperty, nr = Object.getOwnPropertyDescriptor, H = (t, e, s, i) => {
10144
- for (var a = i > 1 ? void 0 : i ? nr(e, s) : e, r = t.length - 1, o; r >= 0; r--)
10263
+ var nr = Object.defineProperty, lr = Object.getOwnPropertyDescriptor, q = (t, e, s, i) => {
10264
+ for (var a = i > 1 ? void 0 : i ? lr(e, s) : e, r = t.length - 1, o; r >= 0; r--)
10145
10265
  (o = t[r]) && (a = (i ? o(e, s, a) : o(a)) || a);
10146
- return i && a && or(e, s, a), a;
10266
+ return i && a && nr(e, s, a), a;
10147
10267
  };
10148
- let U = class extends w {
10268
+ let j = class extends k {
10149
10269
  constructor() {
10150
10270
  super(...arguments), this.value = "", this.label = "", this.variant = "default", this.options = [], this._open = !1, this._focusedIndex = -1, this._menuPosition = "below", this._menuAlign = "align-left", this._menuTop = 0, this._menuBottom = 0, this._menuLeft = 0, this._menuRight = 0, this._handleOutsideClick = (t) => {
10151
10271
  t.composedPath().includes(this) || (this._open = !1, document.removeEventListener("click", this._handleOutsideClick));
@@ -10252,7 +10372,7 @@ let U = class extends w {
10252
10372
  super.disconnectedCallback(), document.removeEventListener("click", this._handleOutsideClick);
10253
10373
  }
10254
10374
  };
10255
- U.styles = [
10375
+ j.styles = [
10256
10376
  ie,
10257
10377
  $`
10258
10378
  :host {
@@ -10334,51 +10454,51 @@ U.styles = [
10334
10454
  }
10335
10455
  `
10336
10456
  ];
10337
- H([
10457
+ q([
10338
10458
  h()
10339
- ], U.prototype, "value", 2);
10340
- H([
10459
+ ], j.prototype, "value", 2);
10460
+ q([
10341
10461
  h()
10342
- ], U.prototype, "label", 2);
10343
- H([
10462
+ ], j.prototype, "label", 2);
10463
+ q([
10344
10464
  h({ reflect: !0 })
10345
- ], U.prototype, "variant", 2);
10346
- H([
10465
+ ], j.prototype, "variant", 2);
10466
+ q([
10347
10467
  h({ type: Array })
10348
- ], U.prototype, "options", 2);
10349
- H([
10468
+ ], j.prototype, "options", 2);
10469
+ q([
10350
10470
  _()
10351
- ], U.prototype, "_open", 2);
10352
- H([
10471
+ ], j.prototype, "_open", 2);
10472
+ q([
10353
10473
  _()
10354
- ], U.prototype, "_focusedIndex", 2);
10355
- H([
10474
+ ], j.prototype, "_focusedIndex", 2);
10475
+ q([
10356
10476
  _()
10357
- ], U.prototype, "_menuPosition", 2);
10358
- H([
10477
+ ], j.prototype, "_menuPosition", 2);
10478
+ q([
10359
10479
  _()
10360
- ], U.prototype, "_menuAlign", 2);
10361
- H([
10480
+ ], j.prototype, "_menuAlign", 2);
10481
+ q([
10362
10482
  _()
10363
- ], U.prototype, "_menuTop", 2);
10364
- H([
10483
+ ], j.prototype, "_menuTop", 2);
10484
+ q([
10365
10485
  _()
10366
- ], U.prototype, "_menuBottom", 2);
10367
- H([
10486
+ ], j.prototype, "_menuBottom", 2);
10487
+ q([
10368
10488
  _()
10369
- ], U.prototype, "_menuLeft", 2);
10370
- H([
10489
+ ], j.prototype, "_menuLeft", 2);
10490
+ q([
10371
10491
  _()
10372
- ], U.prototype, "_menuRight", 2);
10373
- U = H([
10374
- k("ap-dropdown")
10375
- ], U);
10376
- var lr = Object.defineProperty, cr = Object.getOwnPropertyDescriptor, Fs = (t, e, s, i) => {
10377
- for (var a = i > 1 ? void 0 : i ? cr(e, s) : e, r = t.length - 1, o; r >= 0; r--)
10492
+ ], j.prototype, "_menuRight", 2);
10493
+ j = q([
10494
+ S("ap-dropdown")
10495
+ ], j);
10496
+ var cr = Object.defineProperty, dr = Object.getOwnPropertyDescriptor, Es = (t, e, s, i) => {
10497
+ for (var a = i > 1 ? void 0 : i ? dr(e, s) : e, r = t.length - 1, o; r >= 0; r--)
10378
10498
  (o = t[r]) && (a = (i ? o(e, s, a) : o(a)) || a);
10379
- return i && a && lr(e, s, a), a;
10499
+ return i && a && cr(e, s, a), a;
10380
10500
  };
10381
- let gt = class extends w {
10501
+ let gt = class extends k {
10382
10502
  constructor() {
10383
10503
  super(...arguments), this.variant = "default";
10384
10504
  }
@@ -10407,18 +10527,18 @@ gt.styles = [
10407
10527
  }
10408
10528
  `
10409
10529
  ];
10410
- Fs([
10530
+ Es([
10411
10531
  h({ reflect: !0 })
10412
10532
  ], gt.prototype, "variant", 2);
10413
- gt = Fs([
10414
- k("ap-badge")
10533
+ gt = Es([
10534
+ S("ap-badge")
10415
10535
  ], gt);
10416
- var dr = Object.defineProperty, pr = Object.getOwnPropertyDescriptor, Es = (t, e, s, i) => {
10417
- for (var a = i > 1 ? void 0 : i ? pr(e, s) : e, r = t.length - 1, o; r >= 0; r--)
10536
+ var pr = Object.defineProperty, hr = Object.getOwnPropertyDescriptor, As = (t, e, s, i) => {
10537
+ for (var a = i > 1 ? void 0 : i ? hr(e, s) : e, r = t.length - 1, o; r >= 0; r--)
10418
10538
  (o = t[r]) && (a = (i ? o(e, s, a) : o(a)) || a);
10419
- return i && a && dr(e, s, a), a;
10539
+ return i && a && pr(e, s, a), a;
10420
10540
  };
10421
- let ft = class extends w {
10541
+ let ft = class extends k {
10422
10542
  constructor() {
10423
10543
  super(...arguments), this.text = "";
10424
10544
  }
@@ -10455,18 +10575,18 @@ ft.styles = [
10455
10575
  }
10456
10576
  `
10457
10577
  ];
10458
- Es([
10578
+ As([
10459
10579
  h()
10460
10580
  ], ft.prototype, "text", 2);
10461
- ft = Es([
10462
- k("ap-tooltip")
10581
+ ft = As([
10582
+ S("ap-tooltip")
10463
10583
  ], ft);
10464
- var hr = Object.defineProperty, ur = Object.getOwnPropertyDescriptor, je = (t, e, s, i) => {
10465
- for (var a = i > 1 ? void 0 : i ? ur(e, s) : e, r = t.length - 1, o; r >= 0; r--)
10584
+ var ur = Object.defineProperty, gr = Object.getOwnPropertyDescriptor, je = (t, e, s, i) => {
10585
+ for (var a = i > 1 ? void 0 : i ? gr(e, s) : e, r = t.length - 1, o; r >= 0; r--)
10466
10586
  (o = t[r]) && (a = (i ? o(e, s, a) : o(a)) || a);
10467
- return i && a && hr(e, s, a), a;
10587
+ return i && a && ur(e, s, a), a;
10468
10588
  };
10469
- let ue = class extends w {
10589
+ let ue = class extends k {
10470
10590
  constructor() {
10471
10591
  super(...arguments), this.value = "", this.options = [], this.disabled = !1, this.direction = "vertical", this._onKeydown = (t) => {
10472
10592
  const e = this.options.filter(
@@ -10607,14 +10727,14 @@ je([
10607
10727
  h({ reflect: !0 })
10608
10728
  ], ue.prototype, "columns", 2);
10609
10729
  ue = je([
10610
- k("ap-radio-group")
10730
+ S("ap-radio-group")
10611
10731
  ], ue);
10612
- var gr = Object.defineProperty, qt = (t, e, s, i) => {
10732
+ var fr = Object.defineProperty, Ht = (t, e, s, i) => {
10613
10733
  for (var a = void 0, r = t.length - 1, o; r >= 0; r--)
10614
10734
  (o = t[r]) && (a = o(e, s, a) || a);
10615
- return a && gr(e, s, a), a;
10735
+ return a && fr(e, s, a), a;
10616
10736
  };
10617
- const Ht = class Ht extends w {
10737
+ const Kt = class Kt extends k {
10618
10738
  constructor() {
10619
10739
  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._onDragEnter = (e) => {
10620
10740
  var s;
@@ -10631,7 +10751,7 @@ const Ht = class Ht extends w {
10631
10751
  e.preventDefault(), this._dragCounter = 0, this._isDragOver = !1;
10632
10752
  const s = Array.from(((a = e.dataTransfer) == null ? void 0 : a.files) ?? []);
10633
10753
  s.length > 0 && this._openUploader(s);
10634
- }, this.store = Ts(), this.storeCtrl = new Os(this, this.store), this.selectionCtrl = new Ms(this, this.store), this.infiniteScrollCtrl = new Ps(this, () => this._loadMore()), this.marqueeCtrl = new Ls(this, this.store);
10754
+ }, this.store = Ms(), this.storeCtrl = new Os(this, this.store), this.selectionCtrl = new Ps(this, this.store), this.infiniteScrollCtrl = new Ls(this, () => this._loadMore()), this.marqueeCtrl = new Is(this, this.store);
10635
10755
  }
10636
10756
  get _isInline() {
10637
10757
  var e;
@@ -10664,21 +10784,21 @@ const Ht = class Ht extends w {
10664
10784
  this.store.setState({
10665
10785
  config: e,
10666
10786
  projectToken: e.auth.projectToken,
10667
- viewMode: e.rememberLastView && Sa() || e.defaultViewMode || "grid",
10787
+ viewMode: e.rememberLastView && Ca() || e.defaultViewMode || "grid",
10668
10788
  sortBy: i,
10669
10789
  sortDirection: a,
10670
10790
  currentFolder: null,
10671
10791
  currentFolderPath: e.rootFolderPath ?? "/"
10672
- }), this.apiClient = new Is(e.auth, e.apiBase);
10792
+ }), this.apiClient = new Ds(e.auth, e.apiBase);
10673
10793
  try {
10674
10794
  if (e.auth.mode === "securityTemplate") {
10675
10795
  const d = await Bs(this.apiClient);
10676
10796
  this.apiClient.setSassKey(d), this.store.setState({ sassKey: d });
10677
10797
  }
10678
10798
  const [r, o, l] = await Promise.allSettled([
10679
- aa(this.apiClient),
10680
- Ns(this.apiClient),
10681
- js(this.apiClient)
10799
+ ia(this.apiClient),
10800
+ js(this.apiClient),
10801
+ Us(this.apiClient)
10682
10802
  ]);
10683
10803
  if (r.status === "fulfilled") {
10684
10804
  const { fields: d, regionalVariantGroups: g, regionalFilters: b, brandColor: E } = r.value;
@@ -10690,7 +10810,7 @@ const Ht = class Ht extends w {
10690
10810
  });
10691
10811
  }
10692
10812
  o.status === "fulfilled" && this.store.setState({ labels: o.value.labels || [] }), l.status === "fulfilled" && this.store.setState({ tags: l.value });
10693
- const { pinnedFilters: c, pinnedMetadata: p } = _a(e.auth.projectToken ?? null), u = this.store.getState().filters;
10813
+ const { pinnedFilters: c, pinnedMetadata: p } = ya(e.auth.projectToken ?? null), u = this.store.getState().filters;
10694
10814
  this.store.setState({
10695
10815
  filters: {
10696
10816
  ...u,
@@ -10704,7 +10824,7 @@ const Ht = class Ht extends w {
10704
10824
  }
10705
10825
  });
10706
10826
  const v = e.brandColor || this.store.getState().brandColor;
10707
- v && (this.store.setState({ brandColor: v }), Aa(this, v));
10827
+ v && (this.store.setState({ brandColor: v }), Ta(this, v));
10708
10828
  } catch (r) {
10709
10829
  throw this.dispatchEvent(new CustomEvent("ap-error", {
10710
10830
  detail: { error: r, context: "init" },
@@ -10796,7 +10916,7 @@ const Ht = class Ht extends w {
10796
10916
  }
10797
10917
  async open() {
10798
10918
  var l, c, p, u, v, d;
10799
- const e = this.store.getState(), s = Ue((l = this.config) == null ? void 0 : l.forcedFilters), i = new Set(Object.keys(s)), a = {}, r = Ue((c = this.config) == null ? void 0 : c.defaultFilters);
10919
+ const e = this.store.getState(), s = Be((l = this.config) == null ? void 0 : l.forcedFilters), i = new Set(Object.keys(s)), a = {}, r = Be((c = this.config) == null ? void 0 : c.defaultFilters);
10800
10920
  for (const [g, b] of Object.entries(r))
10801
10921
  i.has(g) || (a[g] = b);
10802
10922
  const o = Object.keys(a);
@@ -10818,7 +10938,7 @@ const Ht = class Ht extends w {
10818
10938
  assets: [],
10819
10939
  folders: [],
10820
10940
  currentFolder: null,
10821
- currentFolderPath: ((v = this.config) == null ? void 0 : v.rememberLastFolder) && wa() || ((d = this.config) == null ? void 0 : d.rootFolderPath) || "/",
10941
+ currentFolderPath: ((v = this.config) == null ? void 0 : v.rememberLastFolder) && ka() || ((d = this.config) == null ? void 0 : d.rootFolderPath) || "/",
10822
10942
  breadcrumb: [],
10823
10943
  selectedAssets: /* @__PURE__ */ new Map(),
10824
10944
  folderPreviews: {},
@@ -10845,10 +10965,10 @@ const Ht = class Ht extends w {
10845
10965
  const e = ++this._loadId, s = this.store.getState();
10846
10966
  this._scrollToTop(), this.store.setState({ isLoading: !0 });
10847
10967
  try {
10848
- const D = s.activeTab;
10849
- if (D === "assets") {
10850
- const F = this._buildSearchNotation(), A = s.currentFolderPath || "/", L = tt(this.apiClient, {
10851
- folder: A,
10968
+ const A = s.activeTab;
10969
+ if (A === "assets") {
10970
+ const F = this._buildSearchNotation(), I = s.currentFolderPath || "/", H = tt(this.apiClient, {
10971
+ folder: I,
10852
10972
  offset: 0,
10853
10973
  limit: s.limit,
10854
10974
  sort_by: s.sortBy,
@@ -10856,16 +10976,16 @@ const Ht = class Ht extends w {
10856
10976
  search: s.searchQuery || void 0,
10857
10977
  q: F || void 0,
10858
10978
  recursive: 1
10859
- }), I = Yt(this.apiClient, {
10860
- folder: A,
10979
+ }), T = Xt(this.apiClient, {
10980
+ folder: I,
10861
10981
  q: F || void 0,
10862
10982
  search: s.searchQuery || void 0,
10863
10983
  recursive: 1
10864
- }).catch(() => null), [N, O] = await Promise.all([L, I]);
10984
+ }).catch(() => null), [R, U] = await Promise.all([H, T]);
10865
10985
  if (e !== this._loadId) return;
10866
- const ne = ((i = N.files) == null ? void 0 : i.length) ?? 0, fe = ne >= s.limit, Ae = ((a = O == null ? void 0 : O.stats) == null ? void 0 : a.approx_files_count) ?? ((r = O == null ? void 0 : O.info) == null ? void 0 : r.total_files_count) ?? ((o = N.info) == null ? void 0 : o.total_files_count) ?? ((c = (l = N.base) == null ? void 0 : l.count) == null ? void 0 : c.files_recursive) ?? ((u = (p = N.base) == null ? void 0 : p.count) == null ? void 0 : u.files_direct) ?? ne;
10986
+ const ne = ((i = R.files) == null ? void 0 : i.length) ?? 0, fe = ne >= s.limit, Ae = ((a = U == null ? void 0 : U.stats) == null ? void 0 : a.approx_files_count) ?? ((r = U == null ? void 0 : U.info) == null ? void 0 : r.total_files_count) ?? ((o = R.info) == null ? void 0 : o.total_files_count) ?? ((c = (l = R.base) == null ? void 0 : l.count) == null ? void 0 : c.files_recursive) ?? ((u = (p = R.base) == null ? void 0 : p.count) == null ? void 0 : u.files_direct) ?? ne;
10867
10987
  this.store.setState({
10868
- assets: N.files || [],
10988
+ assets: R.files || [],
10869
10989
  folders: [],
10870
10990
  totalCount: Ae,
10871
10991
  totalFolderCount: 0,
@@ -10873,9 +10993,9 @@ const Ht = class Ht extends w {
10873
10993
  hasMore: fe,
10874
10994
  isLoading: !1
10875
10995
  });
10876
- } else if (D === "folders") {
10877
- const F = this._buildSearchNotation(), A = s.currentFolderPath || "/", [L, I, N] = await Promise.all([
10878
- zs(this.apiClient, {
10996
+ } else if (A === "folders") {
10997
+ const F = this._buildSearchNotation(), I = s.currentFolderPath || "/", [H, T, R] = await Promise.all([
10998
+ Rs(this.apiClient, {
10879
10999
  folderPath: s.currentFolderPath,
10880
11000
  q: s.searchQuery || void 0,
10881
11001
  recursive: s.searchQuery ? 1 : 0,
@@ -10883,7 +11003,7 @@ const Ht = class Ht extends w {
10883
11003
  sort_direction: s.sortDirection
10884
11004
  }),
10885
11005
  tt(this.apiClient, {
10886
- folder: A,
11006
+ folder: I,
10887
11007
  offset: 0,
10888
11008
  limit: s.limit,
10889
11009
  sort_by: s.sortBy,
@@ -10892,38 +11012,38 @@ const Ht = class Ht extends w {
10892
11012
  q: F || void 0,
10893
11013
  recursive: 0
10894
11014
  }),
10895
- Yt(this.apiClient, {
10896
- folder: A,
11015
+ Xt(this.apiClient, {
11016
+ folder: I,
10897
11017
  q: F || void 0,
10898
11018
  search: s.searchQuery || void 0,
10899
11019
  recursive: 0
10900
11020
  }).catch(() => null)
10901
11021
  ]);
10902
11022
  if (e !== this._loadId) return;
10903
- const O = L.folders || [];
11023
+ const U = H.folders || [];
10904
11024
  let ne = {};
10905
- if (O.length > 0)
11025
+ if (U.length > 0)
10906
11026
  try {
10907
- ne = await Rs(this.apiClient, O.map((ve) => ve.uuid));
11027
+ ne = await Ns(this.apiClient, U.map((ve) => ve.uuid));
10908
11028
  } catch {
10909
11029
  }
10910
11030
  if (e !== this._loadId) return;
10911
- const fe = ((v = I.files) == null ? void 0 : v.length) ?? 0, Ae = fe >= s.limit, et = ((d = N == null ? void 0 : N.stats) == null ? void 0 : d.approx_files_count) ?? ((g = N == null ? void 0 : N.info) == null ? void 0 : g.total_files_count) ?? ((b = I.info) == null ? void 0 : b.total_files_count) ?? ((y = (E = I.base) == null ? void 0 : E.count) == null ? void 0 : y.files_direct) ?? fe;
11031
+ const fe = ((v = T.files) == null ? void 0 : v.length) ?? 0, Ae = fe >= s.limit, et = ((d = R == null ? void 0 : R.stats) == null ? void 0 : d.approx_files_count) ?? ((g = R == null ? void 0 : R.info) == null ? void 0 : g.total_files_count) ?? ((b = T.info) == null ? void 0 : b.total_files_count) ?? ((y = (E = T.base) == null ? void 0 : E.count) == null ? void 0 : y.files_direct) ?? fe;
10912
11032
  this.store.setState({
10913
- assets: I.files || [],
10914
- folders: O,
11033
+ assets: T.files || [],
11034
+ folders: U,
10915
11035
  folderPreviews: ne,
10916
11036
  totalCount: et,
10917
- totalFolderCount: L.total ?? O.length,
11037
+ totalFolderCount: H.total ?? U.length,
10918
11038
  offset: 0,
10919
11039
  hasMore: Ae,
10920
11040
  isLoading: !1
10921
11041
  });
10922
11042
  }
10923
- } catch (D) {
11043
+ } catch (A) {
10924
11044
  if (e !== this._loadId) return;
10925
11045
  this.store.setState({ isLoading: !1 }), this.dispatchEvent(new CustomEvent("ap-error", {
10926
- detail: { error: D, context: "loadData" },
11046
+ detail: { error: A, context: "loadData" },
10927
11047
  bubbles: !0,
10928
11048
  composed: !0
10929
11049
  }));
@@ -10977,7 +11097,7 @@ const Ht = class Ht extends w {
10977
11097
  _handleViewChange(e) {
10978
11098
  var i;
10979
11099
  const s = e.detail.mode;
10980
- this.store.setState({ viewMode: s }), (i = this.config) != null && i.rememberLastView && ka(s), this._scrollToTop();
11100
+ this.store.setState({ viewMode: s }), (i = this.config) != null && i.rememberLastView && Sa(s), this._scrollToTop();
10981
11101
  }
10982
11102
  _handleRegionalChange(e) {
10983
11103
  const { groupUuid: s, value: i } = e.detail, a = this.store.getState().regionalFilters;
@@ -10992,7 +11112,7 @@ const Ht = class Ht extends w {
10992
11112
  offset: 0,
10993
11113
  assets: [],
10994
11114
  folders: []
10995
- }), ts(s, i.sortDirection), this.selectionCtrl.resetRange(), this._loadData();
11115
+ }), ss(s, i.sortDirection), this.selectionCtrl.resetRange(), this._loadData();
10996
11116
  }
10997
11117
  _handleSortDirectionChange(e) {
10998
11118
  const s = e.detail.value, i = this.store.getState();
@@ -11001,7 +11121,7 @@ const Ht = class Ht extends w {
11001
11121
  offset: 0,
11002
11122
  assets: [],
11003
11123
  folders: []
11004
- }), ts(i.sortBy, s), this.selectionCtrl.resetRange(), this._loadData();
11124
+ }), ss(i.sortBy, s), this.selectionCtrl.resetRange(), this._loadData();
11005
11125
  }
11006
11126
  _handleTabChange(e) {
11007
11127
  var s;
@@ -11036,7 +11156,7 @@ const Ht = class Ht extends w {
11036
11156
  _handleFolderOpen(e) {
11037
11157
  var r;
11038
11158
  const s = e.detail.folder, i = this.store.getState(), a = s.path || `${i.currentFolderPath}${s.name}/`;
11039
- (r = this.config) != null && r.rememberLastFolder && ss(a), this.store.setState({
11159
+ (r = this.config) != null && r.rememberLastFolder && as(a), this.store.setState({
11040
11160
  currentFolder: s.uuid,
11041
11161
  currentFolderPath: a,
11042
11162
  breadcrumb: [...i.breadcrumb, { uuid: s.uuid, name: s.name, path: a }],
@@ -11049,7 +11169,7 @@ const Ht = class Ht extends w {
11049
11169
  _handleBreadcrumbNavigate(e) {
11050
11170
  var l, c;
11051
11171
  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) || "/";
11052
- (c = this.config) != null && c.rememberLastFolder && ss(o), this.store.setState({
11172
+ (c = this.config) != null && c.rememberLastFolder && as(o), this.store.setState({
11053
11173
  currentFolder: s || null,
11054
11174
  currentFolderPath: o,
11055
11175
  breadcrumb: r,
@@ -11088,11 +11208,11 @@ const Ht = class Ht extends w {
11088
11208
  u.push(y);
11089
11209
  const v = 4, d = [];
11090
11210
  for (let y = 0; y < u.length; y += v) {
11091
- const D = u.slice(y, y + v), F = await Promise.all(
11092
- D.map(
11093
- (A) => tt(this.apiClient, {
11211
+ const A = u.slice(y, y + v), F = await Promise.all(
11212
+ A.map(
11213
+ (I) => tt(this.apiClient, {
11094
11214
  folder: r,
11095
- offset: A,
11215
+ offset: I,
11096
11216
  limit: o,
11097
11217
  sort_by: e.sortBy,
11098
11218
  sort_direction: e.sortDirection,
@@ -11102,8 +11222,8 @@ const Ht = class Ht extends w {
11102
11222
  })
11103
11223
  )
11104
11224
  );
11105
- for (const A of F)
11106
- A.files && d.push(...A.files);
11225
+ for (const I of F)
11226
+ I.files && d.push(...I.files);
11107
11227
  }
11108
11228
  const g = new Set(l.map((y) => y.uuid)), b = d.filter((y) => g.has(y.uuid) ? !1 : (g.add(y.uuid), !0)), E = [...l, ...b];
11109
11229
  this.store.setState({
@@ -11130,7 +11250,7 @@ const Ht = class Ht extends w {
11130
11250
  }
11131
11251
  // ── Filter Handlers ──────────────────────────────────────────────────
11132
11252
  _isDateFilterKey(e) {
11133
- return e === m.DATE || e === m.LICENSE_EXPIRY || e === V.DUE_DATE;
11253
+ return e === m.DATE || e === m.LICENSE_EXPIRY || e === B.DUE_DATE;
11134
11254
  }
11135
11255
  _handleFilterUpdate(e) {
11136
11256
  const { key: s, values: i, operator: a } = e.detail, o = { ...this.store.getState().filters };
@@ -11167,55 +11287,55 @@ const Ht = class Ht extends w {
11167
11287
  }
11168
11288
  _handleFilterOpen(e) {
11169
11289
  const s = e.detail.key, i = e.detail.chipRect, a = this.renderRoot.querySelector("ap-content-toolbar");
11170
- let r;
11290
+ let r, o;
11171
11291
  if (i) {
11172
- const o = this.renderRoot.querySelector(".toolbar-filters-wrapper");
11173
- if (o) {
11174
- const l = o.getBoundingClientRect();
11175
- r = i.left - l.left;
11292
+ const l = this.renderRoot.querySelector(".toolbar-filters-wrapper");
11293
+ if (l) {
11294
+ const c = l.getBoundingClientRect();
11295
+ r = i.left - c.left, o = i.bottom - c.top;
11176
11296
  }
11177
11297
  }
11178
- a == null || a.openFilterPanel(s, !0, r);
11298
+ a == null || a.openFilterPanel(s, !0, r, o);
11179
11299
  }
11180
11300
  _handleMetadataFilterOpen(e) {
11181
11301
  const { fieldKey: s, chipRect: i } = e.detail, a = this.renderRoot.querySelector("ap-content-toolbar");
11182
- let r;
11302
+ let r, o;
11183
11303
  if (i) {
11184
- const o = this.renderRoot.querySelector(".toolbar-filters-wrapper");
11185
- if (o) {
11186
- const l = o.getBoundingClientRect();
11187
- r = i.left - l.left;
11304
+ const l = this.renderRoot.querySelector(".toolbar-filters-wrapper");
11305
+ if (l) {
11306
+ const c = l.getBoundingClientRect();
11307
+ r = i.left - c.left, o = i.bottom - c.top;
11188
11308
  }
11189
11309
  }
11190
- a == null || a.openMetadataFieldPanel(s, !0, r);
11310
+ a == null || a.openMetadataFieldPanel(s, !0, r, o);
11191
11311
  }
11192
11312
  _handleFilterPanelChange(e) {
11193
11313
  const s = this.renderRoot.querySelector("ap-filters-bar");
11194
11314
  s && (s.activeFilter = e.detail.key, s.activeMetadataField = e.detail.metadataFieldKey || null), !e.detail.key && !e.detail.metadataFieldKey && (this._pendingFilter || this._pendingMetadataField) && (this._pendingFilter = null, this._pendingMetadataField = null, s && (s.pendingFilter = null, s.pendingMetadataField = null));
11195
11315
  }
11196
11316
  async _handleFilterPending(e) {
11197
- var v, d, g;
11317
+ var d, g, b;
11198
11318
  const { key: s, metadataFieldKey: i } = e.detail, a = this.renderRoot.querySelector("ap-filters-bar"), r = this.renderRoot.querySelector("ap-content-toolbar");
11199
11319
  if (!a || !r) return;
11200
11320
  i ? (this._pendingMetadataField = i, a.pendingMetadataField = i) : s && (this._pendingFilter = s, a.pendingFilter = s), await a.updateComplete;
11201
11321
  let o = a.renderRoot.querySelector(".chip.pending");
11202
11322
  if (!o) {
11203
- const b = a.renderRoot.querySelectorAll(".chip.pinned-empty"), E = i ? (v = a._getMetadataLabel) == null ? void 0 : v.call(a, i) : void 0;
11204
- for (const y of b) {
11205
- const D = (g = (d = y.querySelector(".chip-label")) == null ? void 0 : d.textContent) == null ? void 0 : g.trim();
11206
- if (i && D === E) {
11207
- o = y;
11323
+ const E = a.renderRoot.querySelectorAll(".chip.pinned-empty"), y = i ? (d = a._getMetadataLabel) == null ? void 0 : d.call(a, i) : void 0;
11324
+ for (const A of E) {
11325
+ const F = (b = (g = A.querySelector(".chip-label")) == null ? void 0 : g.textContent) == null ? void 0 : b.trim();
11326
+ if (i && F === y) {
11327
+ o = A;
11208
11328
  break;
11209
11329
  }
11210
- if (s && D === (Oe[s] || s)) {
11211
- o = y;
11330
+ if (s && F === (Me[s] || s)) {
11331
+ o = A;
11212
11332
  break;
11213
11333
  }
11214
11334
  }
11215
11335
  }
11216
11336
  if (!o) return;
11217
- 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;
11218
- i ? r.openMetadataFieldPanel(i, !0, u) : s && r.openFilterPanel(s, !0, u);
11337
+ 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;
11338
+ i ? r.openMetadataFieldPanel(i, !0, u, v) : s && r.openFilterPanel(s, !0, u, v);
11219
11339
  }
11220
11340
  _handleFilterRemove(e) {
11221
11341
  var o;
@@ -11250,14 +11370,14 @@ const Ht = class Ht extends w {
11250
11370
  const { key: s, pinned: i } = e.detail, r = { ...this.store.getState().filters };
11251
11371
  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 });
11252
11372
  const o = ((c = (l = this.store.getState().config) == null ? void 0 : l.auth) == null ? void 0 : c.projectToken) ?? null;
11253
- ya(o, r.pinned);
11373
+ xa(o, r.pinned);
11254
11374
  }
11255
11375
  _handleMetadataPin(e) {
11256
11376
  var c, p;
11257
11377
  const { fieldKey: s, pinned: i } = e.detail, r = { ...this.store.getState().filters }, o = { ...r.metadata };
11258
11378
  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 });
11259
11379
  const l = ((p = (c = this.store.getState().config) == null ? void 0 : c.auth) == null ? void 0 : p.projectToken) ?? null;
11260
- xa(l, o.pinned);
11380
+ wa(l, o.pinned);
11261
11381
  }
11262
11382
  _handleFiltersClearAll() {
11263
11383
  const e = this.store.getState();
@@ -11305,13 +11425,13 @@ const Ht = class Ht extends w {
11305
11425
  // ── Sort Options ────────────────────────────────────────────────────
11306
11426
  _getSortOptions() {
11307
11427
  const e = this.storeCtrl.state;
11308
- return e.searchQuery ? Ta : e.activeTab === "folders" ? Oa : It;
11428
+ return e.searchQuery ? Ma : e.activeTab === "folders" ? Oa : Dt;
11309
11429
  }
11310
11430
  // ── Search Notation Builder ──────────────────────────────────────────
11311
11431
  _buildSearchNotation() {
11312
11432
  var a;
11313
- const e = this.store.getState(), s = { ...Ue((a = this.config) == null ? void 0 : a.forcedFilters), ...e.filters.applied };
11314
- return oa(s, e.filters.metadata.applied).join(" ");
11433
+ const e = this.store.getState(), s = { ...Be((a = this.config) == null ? void 0 : a.forcedFilters), ...e.filters.applied };
11434
+ return na(s, e.filters.metadata.applied).join(" ");
11315
11435
  }
11316
11436
  render() {
11317
11437
  var p, u, v, d, g, b, E, y;
@@ -11366,7 +11486,7 @@ const Ht = class Ht extends w {
11366
11486
  .metadataFields=${e.metadataFields}
11367
11487
  .pinnedFilters=${e.filters.pinned}
11368
11488
  .apiClient=${this.apiClient}
11369
- .forcedFilterKeys=${Object.keys(Ue((v = this.config) == null ? void 0 : v.forcedFilters))}
11489
+ .forcedFilterKeys=${Object.keys(Be((v = this.config) == null ? void 0 : v.forcedFilters))}
11370
11490
  @sort-change=${this._handleSortChange}
11371
11491
  @sort-direction-change=${this._handleSortDirectionChange}
11372
11492
  @filter-update=${this._handleFilterUpdate}
@@ -11455,7 +11575,7 @@ const Ht = class Ht extends w {
11455
11575
  ` : f : n`
11456
11576
  <ap-modal
11457
11577
  ?open=${e.isOpen}
11458
- @ap-cancel=${(D) => this._handleCancel(D.detail.reason)}
11578
+ @ap-cancel=${(A) => this._handleCancel(A.detail.reason)}
11459
11579
  >
11460
11580
  ${this._isUploaderOpen ? c : n`
11461
11581
  <div slot="header">${a}</div>
@@ -11540,7 +11660,7 @@ const Ht = class Ht extends w {
11540
11660
  ` : f;
11541
11661
  }
11542
11662
  };
11543
- Ht.styles = [
11663
+ Kt.styles = [
11544
11664
  $`
11545
11665
  :host {
11546
11666
  display: contents;
@@ -11703,14 +11823,14 @@ Ht.styles = [
11703
11823
  }
11704
11824
  `
11705
11825
  ];
11706
- let We = Ht;
11707
- qt([
11826
+ let We = Kt;
11827
+ Ht([
11708
11828
  _()
11709
11829
  ], We.prototype, "_isDragOver");
11710
- qt([
11830
+ Ht([
11711
11831
  _()
11712
11832
  ], We.prototype, "_isUploaderOpen");
11713
- qt([
11833
+ Ht([
11714
11834
  h({ type: Object })
11715
11835
  ], We.prototype, "config");
11716
11836
  export {