folder-pane 4.0.0 → 4.0.1-0
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.
- package/declarations.d.ts +4 -4
- package/dist/_virtual/~icons/lucide/chevron-down.cjs.js +2 -0
- package/dist/_virtual/~icons/lucide/chevron-down.cjs.js.map +1 -0
- package/dist/_virtual/~icons/lucide/chevron-down.esm.js +10 -0
- package/dist/_virtual/~icons/lucide/chevron-down.esm.js.map +1 -0
- package/dist/_virtual/~icons/lucide/chevron-right.cjs.js +2 -0
- package/dist/_virtual/~icons/lucide/chevron-right.cjs.js.map +1 -0
- package/dist/_virtual/~icons/lucide/chevron-right.esm.js +10 -0
- package/dist/_virtual/~icons/lucide/chevron-right.esm.js.map +1 -0
- package/dist/_virtual/~icons/lucide/circle-small.cjs.js +2 -0
- package/dist/_virtual/~icons/lucide/circle-small.cjs.js.map +1 -0
- package/dist/_virtual/~icons/lucide/circle-small.esm.js +10 -0
- package/dist/_virtual/~icons/lucide/circle-small.esm.js.map +1 -0
- package/dist/_virtual/~icons/lucide/file-box.cjs.js +2 -0
- package/dist/_virtual/~icons/lucide/file-box.cjs.js.map +1 -0
- package/dist/_virtual/~icons/lucide/file-box.esm.js +10 -0
- package/dist/_virtual/~icons/lucide/file-box.esm.js.map +1 -0
- package/dist/_virtual/~icons/lucide/file.cjs.js +2 -0
- package/dist/_virtual/~icons/lucide/file.cjs.js.map +1 -0
- package/dist/_virtual/~icons/lucide/file.esm.js +10 -0
- package/dist/_virtual/~icons/lucide/file.esm.js.map +1 -0
- package/dist/_virtual/~icons/lucide/folder-open.cjs.js +2 -0
- package/dist/_virtual/~icons/lucide/folder-open.cjs.js.map +1 -0
- package/dist/_virtual/~icons/lucide/folder-open.esm.js +10 -0
- package/dist/_virtual/~icons/lucide/folder-open.esm.js.map +1 -0
- package/dist/_virtual/~icons/lucide/folder.cjs.js +2 -0
- package/dist/_virtual/~icons/lucide/folder.cjs.js.map +1 -0
- package/dist/_virtual/~icons/lucide/folder.esm.js +10 -0
- package/dist/_virtual/~icons/lucide/folder.esm.js.map +1 -0
- package/dist/_virtual/~icons/lucide/globe.cjs.js +2 -0
- package/dist/_virtual/~icons/lucide/globe.cjs.js.map +1 -0
- package/dist/_virtual/~icons/lucide/globe.esm.js +10 -0
- package/dist/_virtual/~icons/lucide/globe.esm.js.map +1 -0
- package/dist/_virtual/~icons/lucide/layout-grid.cjs.js +2 -0
- package/dist/_virtual/~icons/lucide/layout-grid.cjs.js.map +1 -0
- package/dist/_virtual/~icons/lucide/layout-grid.esm.js +10 -0
- package/dist/_virtual/~icons/lucide/layout-grid.esm.js.map +1 -0
- package/dist/_virtual/~icons/lucide/list.cjs.js +2 -0
- package/dist/_virtual/~icons/lucide/list.cjs.js.map +1 -0
- package/dist/_virtual/~icons/lucide/list.esm.js +10 -0
- package/dist/_virtual/~icons/lucide/list.esm.js.map +1 -0
- package/dist/_virtual/~icons/lucide/lock-keyhole.cjs.js +2 -0
- package/dist/_virtual/~icons/lucide/lock-keyhole.cjs.js.map +1 -0
- package/dist/_virtual/~icons/lucide/lock-keyhole.esm.js +10 -0
- package/dist/_virtual/~icons/lucide/lock-keyhole.esm.js.map +1 -0
- package/dist/_virtual/~icons/lucide/plus.cjs.js +2 -0
- package/dist/_virtual/~icons/lucide/plus.cjs.js.map +1 -0
- package/dist/_virtual/~icons/lucide/plus.esm.js +10 -0
- package/dist/_virtual/~icons/lucide/plus.esm.js.map +1 -0
- package/dist/_virtual/~icons/lucide/search.cjs.js +2 -0
- package/dist/_virtual/~icons/lucide/search.cjs.js.map +1 -0
- package/dist/_virtual/~icons/lucide/search.esm.js +10 -0
- package/dist/_virtual/~icons/lucide/search.esm.js.map +1 -0
- package/dist/_virtual/~icons/lucide/trash-2.cjs.js +2 -0
- package/dist/_virtual/~icons/lucide/trash-2.cjs.js.map +1 -0
- package/dist/_virtual/~icons/lucide/trash-2.esm.js +10 -0
- package/dist/_virtual/~icons/lucide/trash-2.esm.js.map +1 -0
- package/dist/_virtual/~icons/lucide/upload.cjs.js +2 -0
- package/dist/_virtual/~icons/lucide/upload.cjs.js.map +1 -0
- package/dist/_virtual/~icons/lucide/upload.esm.js +10 -0
- package/dist/_virtual/~icons/lucide/upload.esm.js.map +1 -0
- package/dist/_virtual/~icons/lucide/x.cjs.js +2 -0
- package/dist/_virtual/~icons/lucide/x.cjs.js.map +1 -0
- package/dist/_virtual/~icons/lucide/x.esm.js +10 -0
- package/dist/_virtual/~icons/lucide/x.esm.js.map +1 -0
- package/dist/components/folder-pane-container/FolderPaneContainer.cjs.js +91 -0
- package/dist/components/folder-pane-container/FolderPaneContainer.cjs.js.map +1 -0
- package/dist/components/folder-pane-container/FolderPaneContainer.d.ts +44 -0
- package/dist/components/folder-pane-container/FolderPaneContainer.d.ts.map +1 -0
- package/dist/components/folder-pane-container/FolderPaneContainer.esm.js +585 -0
- package/dist/components/folder-pane-container/FolderPaneContainer.esm.js.map +1 -0
- package/dist/components/folder-pane-container/FolderPaneContainer.styles.cjs.js +2 -0
- package/dist/components/folder-pane-container/FolderPaneContainer.styles.cjs.js.map +1 -0
- package/dist/components/folder-pane-container/FolderPaneContainer.styles.esm.js +6 -0
- package/dist/components/folder-pane-container/FolderPaneContainer.styles.esm.js.map +1 -0
- package/dist/components/folder-pane-container/index.cjs.js +1 -0
- package/dist/components/folder-pane-container/index.d.ts +2 -0
- package/dist/components/folder-pane-container/index.d.ts.map +1 -0
- package/dist/components/folder-pane-container/index.esm.js +1 -0
- package/dist/components/folder-pane-content/FolderPaneContent.cjs.js +4 -0
- package/dist/components/folder-pane-content/FolderPaneContent.cjs.js.map +1 -0
- package/dist/components/folder-pane-content/FolderPaneContent.d.ts +6 -0
- package/dist/components/folder-pane-content/FolderPaneContent.d.ts.map +1 -0
- package/dist/components/folder-pane-content/FolderPaneContent.esm.js +176 -0
- package/dist/components/folder-pane-content/FolderPaneContent.esm.js.map +1 -0
- package/dist/components/folder-pane-content/FolderPaneContent.styles.cjs.js +2 -0
- package/dist/components/folder-pane-content/FolderPaneContent.styles.cjs.js.map +1 -0
- package/dist/components/folder-pane-content/FolderPaneContent.styles.esm.js +6 -0
- package/dist/components/folder-pane-content/FolderPaneContent.styles.esm.js.map +1 -0
- package/dist/components/folder-pane-content/index.cjs.js +1 -0
- package/dist/components/folder-pane-content/index.d.ts +2 -0
- package/dist/components/folder-pane-content/index.d.ts.map +1 -0
- package/dist/components/folder-pane-content/index.esm.js +1 -0
- package/dist/components/folder-pane-sidebar/FolderPaneSidebar.cjs.js +53 -0
- package/dist/components/folder-pane-sidebar/FolderPaneSidebar.cjs.js.map +1 -0
- package/dist/components/folder-pane-sidebar/FolderPaneSidebar.d.ts +33 -0
- package/dist/components/folder-pane-sidebar/FolderPaneSidebar.d.ts.map +1 -0
- package/dist/components/folder-pane-sidebar/FolderPaneSidebar.esm.js +429 -0
- package/dist/components/folder-pane-sidebar/FolderPaneSidebar.esm.js.map +1 -0
- package/dist/components/folder-pane-sidebar/FolderPaneSidebar.styles.cjs.js +2 -0
- package/dist/components/folder-pane-sidebar/FolderPaneSidebar.styles.cjs.js.map +1 -0
- package/dist/components/folder-pane-sidebar/FolderPaneSidebar.styles.esm.js +6 -0
- package/dist/components/folder-pane-sidebar/FolderPaneSidebar.styles.esm.js.map +1 -0
- package/dist/components/folder-pane-sidebar/index.cjs.js +1 -0
- package/dist/components/folder-pane-sidebar/index.d.ts +2 -0
- package/dist/components/folder-pane-sidebar/index.d.ts.map +1 -0
- package/dist/components/folder-pane-sidebar/index.esm.js +1 -0
- package/dist/components/folder-pane-storage-header/FolderPaneCreateDialog.cjs.js +32 -0
- package/dist/components/folder-pane-storage-header/FolderPaneCreateDialog.cjs.js.map +1 -0
- package/dist/components/folder-pane-storage-header/FolderPaneCreateDialog.d.ts +15 -0
- package/dist/components/folder-pane-storage-header/FolderPaneCreateDialog.d.ts.map +1 -0
- package/dist/components/folder-pane-storage-header/FolderPaneCreateDialog.esm.js +290 -0
- package/dist/components/folder-pane-storage-header/FolderPaneCreateDialog.esm.js.map +1 -0
- package/dist/components/folder-pane-storage-header/FolderPaneCreateDialog.styles.cjs.js +2 -0
- package/dist/components/folder-pane-storage-header/FolderPaneCreateDialog.styles.cjs.js.map +1 -0
- package/dist/components/folder-pane-storage-header/FolderPaneCreateDialog.styles.esm.js +6 -0
- package/dist/components/folder-pane-storage-header/FolderPaneCreateDialog.styles.esm.js.map +1 -0
- package/dist/components/folder-pane-storage-header/FolderPaneStorageHeader.cjs.js +79 -0
- package/dist/components/folder-pane-storage-header/FolderPaneStorageHeader.cjs.js.map +1 -0
- package/dist/components/folder-pane-storage-header/FolderPaneStorageHeader.d.ts +27 -0
- package/dist/components/folder-pane-storage-header/FolderPaneStorageHeader.d.ts.map +1 -0
- package/dist/components/folder-pane-storage-header/FolderPaneStorageHeader.esm.js +437 -0
- package/dist/components/folder-pane-storage-header/FolderPaneStorageHeader.esm.js.map +1 -0
- package/dist/components/folder-pane-storage-header/FolderPaneStorageHeader.styles.cjs.js +2 -0
- package/dist/components/folder-pane-storage-header/FolderPaneStorageHeader.styles.cjs.js.map +1 -0
- package/dist/components/folder-pane-storage-header/FolderPaneStorageHeader.styles.esm.js +6 -0
- package/dist/components/folder-pane-storage-header/FolderPaneStorageHeader.styles.esm.js.map +1 -0
- package/dist/components/folder-pane-storage-header/index.cjs.js +1 -0
- package/dist/components/folder-pane-storage-header/index.d.ts +2 -0
- package/dist/components/folder-pane-storage-header/index.d.ts.map +1 -0
- package/dist/components/folder-pane-storage-header/index.esm.js +1 -0
- package/dist/components/folder-pane-view/FolderPaneView.cjs.js +51 -0
- package/dist/components/folder-pane-view/FolderPaneView.cjs.js.map +1 -0
- package/dist/components/folder-pane-view/FolderPaneView.d.ts +82 -0
- package/dist/components/folder-pane-view/FolderPaneView.d.ts.map +1 -0
- package/dist/components/folder-pane-view/FolderPaneView.esm.js +728 -0
- package/dist/components/folder-pane-view/FolderPaneView.esm.js.map +1 -0
- package/dist/components/folder-pane-view/index.cjs.js +1 -0
- package/dist/components/folder-pane-view/index.d.ts +2 -0
- package/dist/components/folder-pane-view/index.d.ts.map +1 -0
- package/dist/components/folder-pane-view/index.esm.js +1 -0
- package/dist/components/folder-pane-view/renderRequest.cjs.js +2 -0
- package/dist/components/folder-pane-view/renderRequest.cjs.js.map +1 -0
- package/dist/components/folder-pane-view/renderRequest.d.ts +8 -0
- package/dist/components/folder-pane-view/renderRequest.d.ts.map +1 -0
- package/dist/components/folder-pane-view/renderRequest.esm.js +10 -0
- package/dist/components/folder-pane-view/renderRequest.esm.js.map +1 -0
- package/dist/creationSafety.cjs.js +2 -0
- package/dist/creationSafety.cjs.js.map +1 -0
- package/dist/creationSafety.d.ts +9 -0
- package/dist/creationSafety.d.ts.map +1 -0
- package/dist/creationSafety.esm.js +17 -0
- package/dist/creationSafety.esm.js.map +1 -0
- package/dist/folderPane.cjs.js +2 -2
- package/dist/folderPane.cjs.js.map +1 -1
- package/dist/folderPane.d.ts +2 -1
- package/dist/folderPane.d.ts.map +1 -1
- package/dist/folderPane.esm.js +23 -60
- package/dist/folderPane.esm.js.map +1 -1
- package/dist/helpers.cjs.js +2 -0
- package/dist/helpers.cjs.js.map +1 -0
- package/dist/helpers.d.ts +30 -0
- package/dist/helpers.d.ts.map +1 -0
- package/dist/helpers.esm.js +59 -0
- package/dist/helpers.esm.js.map +1 -0
- package/dist/index.esm.js +1 -2
- package/dist/mintPaneInstance.cjs.js +2 -0
- package/dist/mintPaneInstance.cjs.js.map +1 -0
- package/dist/mintPaneInstance.d.ts +43 -0
- package/dist/mintPaneInstance.d.ts.map +1 -0
- package/dist/mintPaneInstance.esm.js +104 -0
- package/dist/mintPaneInstance.esm.js.map +1 -0
- package/dist/types.d.ts +9 -0
- package/dist/types.d.ts.map +1 -0
- package/package.json +8 -5
- package/dist/_virtual/_rolldown/runtime.cjs.js +0 -1
|
@@ -0,0 +1,290 @@
|
|
|
1
|
+
import { getCreationDialogText as e } from "../../helpers.esm.js";
|
|
2
|
+
import { invalidCreationNameMessage as t, isSafeCreationName as n } from "../../creationSafety.esm.js";
|
|
3
|
+
import r from "./FolderPaneCreateDialog.styles.esm.js";
|
|
4
|
+
import "../../_virtual/~icons/lucide/x.esm.js";
|
|
5
|
+
import { DialogComponent as i, customElement as a } from "solid-ui";
|
|
6
|
+
import { html as o } from "lit";
|
|
7
|
+
import { property as s, query as c, state as l } from "lit/decorators.js";
|
|
8
|
+
import "solid-ui/components/button";
|
|
9
|
+
import "solid-ui/components/dialog";
|
|
10
|
+
import "solid-ui/components/dialog-content";
|
|
11
|
+
import "solid-ui/components/dialog-footer";
|
|
12
|
+
import "solid-ui/components/dialog-header";
|
|
13
|
+
// src/components/folder-pane-storage-header/FolderPaneCreateDialog.ts
|
|
14
|
+
var u, d, f, p, m, h, g, _, v, y, b, x, S, C, w, T, E, D, O;
|
|
15
|
+
function k(e, t, n) {
|
|
16
|
+
A(e, t), t.set(e, n);
|
|
17
|
+
}
|
|
18
|
+
function A(e, t) {
|
|
19
|
+
if (t.has(e)) throw TypeError("Cannot initialize the same private elements twice on an object");
|
|
20
|
+
}
|
|
21
|
+
function j(e, t, n) {
|
|
22
|
+
return e.set(N(e, t), n), n;
|
|
23
|
+
}
|
|
24
|
+
function M(e, t) {
|
|
25
|
+
return e.get(N(e, t));
|
|
26
|
+
}
|
|
27
|
+
function N(e, t, n) {
|
|
28
|
+
if (typeof e == "function" ? e === t : e.has(t)) return arguments.length < 3 ? t : n;
|
|
29
|
+
throw TypeError("Private element is not present on this object");
|
|
30
|
+
}
|
|
31
|
+
function P(e, t, n) {
|
|
32
|
+
return (t = I(t)) in e ? Object.defineProperty(e, t, {
|
|
33
|
+
value: n,
|
|
34
|
+
enumerable: !0,
|
|
35
|
+
configurable: !0,
|
|
36
|
+
writable: !0
|
|
37
|
+
}) : e[t] = n, e;
|
|
38
|
+
}
|
|
39
|
+
function F(e, t, n, r, i, a) {
|
|
40
|
+
function o(e, t, n) {
|
|
41
|
+
return function(r, i) {
|
|
42
|
+
return n && n(r), e[t].call(r, i);
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
function s(e, t) {
|
|
46
|
+
for (var n = 0; n < e.length; n++) e[n].call(t);
|
|
47
|
+
return t;
|
|
48
|
+
}
|
|
49
|
+
function c(e, t, n, r) {
|
|
50
|
+
if (typeof e != "function" && (r || e !== void 0)) throw TypeError(t + " must " + (n || "be") + " a function" + (r ? "" : " or undefined"));
|
|
51
|
+
return e;
|
|
52
|
+
}
|
|
53
|
+
function l(e, t, n, r, i, a, s, l, u, d, f, p, m) {
|
|
54
|
+
function h(e) {
|
|
55
|
+
if (!m(e)) throw TypeError("Attempted to access private element on non-instance");
|
|
56
|
+
}
|
|
57
|
+
var g, _ = t[0], v = t[3], y = !l;
|
|
58
|
+
if (!y) {
|
|
59
|
+
n || Array.isArray(_) || (_ = [_]);
|
|
60
|
+
var b = {}, x = [], S = i === 3 ? "get" : i === 4 || p ? "set" : "value";
|
|
61
|
+
d ? (f || p ? b = {
|
|
62
|
+
get: R(function() {
|
|
63
|
+
return v(this);
|
|
64
|
+
}, r, "get"),
|
|
65
|
+
set: function(e) {
|
|
66
|
+
t[4](this, e);
|
|
67
|
+
}
|
|
68
|
+
} : b[S] = v, f || R(b[S], r, i === 2 ? "" : S)) : f || (b = Object.getOwnPropertyDescriptor(e, r));
|
|
69
|
+
}
|
|
70
|
+
for (var C = e, w = _.length - 1; w >= 0; w -= n ? 2 : 1) {
|
|
71
|
+
var T = _[w], E = n ? _[w - 1] : void 0, D = {}, O = {
|
|
72
|
+
kind: [
|
|
73
|
+
"field",
|
|
74
|
+
"accessor",
|
|
75
|
+
"method",
|
|
76
|
+
"getter",
|
|
77
|
+
"setter",
|
|
78
|
+
"class"
|
|
79
|
+
][i],
|
|
80
|
+
name: r,
|
|
81
|
+
metadata: a,
|
|
82
|
+
addInitializer: function(e, t) {
|
|
83
|
+
if (e.v) throw Error("attempted to call addInitializer after decoration was finished");
|
|
84
|
+
c(t, "An initializer", "be", !0), s.push(t);
|
|
85
|
+
}.bind(null, D)
|
|
86
|
+
};
|
|
87
|
+
try {
|
|
88
|
+
if (y) (g = c(T.call(E, C, O), "class decorators", "return")) && (C = g);
|
|
89
|
+
else {
|
|
90
|
+
var k, A;
|
|
91
|
+
O.static = u, O.private = d, d ? i === 2 ? k = function(e) {
|
|
92
|
+
return h(e), b.value;
|
|
93
|
+
} : (i < 4 && (k = o(b, "get", h)), i !== 3 && (A = o(b, "set", h))) : (k = function(e) {
|
|
94
|
+
return e[r];
|
|
95
|
+
}, (i < 2 || i === 4) && (A = function(e, t) {
|
|
96
|
+
e[r] = t;
|
|
97
|
+
}));
|
|
98
|
+
var j = O.access = { has: d ? m.bind() : function(e) {
|
|
99
|
+
return r in e;
|
|
100
|
+
} };
|
|
101
|
+
if (k && (j.get = k), A && (j.set = A), C = T.call(E, p ? {
|
|
102
|
+
get: b.get,
|
|
103
|
+
set: b.set
|
|
104
|
+
} : b[S], O), p) {
|
|
105
|
+
if (typeof C == "object" && C) (g = c(C.get, "accessor.get")) && (b.get = g), (g = c(C.set, "accessor.set")) && (b.set = g), (g = c(C.init, "accessor.init")) && x.push(g);
|
|
106
|
+
else if (C !== void 0) throw TypeError("accessor decorators must return an object with get, set, or init properties or void 0");
|
|
107
|
+
} else c(C, (f ? "field" : "method") + " decorators", "return") && (f ? x.push(C) : b[S] = C);
|
|
108
|
+
}
|
|
109
|
+
} finally {
|
|
110
|
+
D.v = !0;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
return (f || p) && l.push(function(e, t) {
|
|
114
|
+
for (var n = x.length - 1; n >= 0; n--) t = x[n].call(e, t);
|
|
115
|
+
return t;
|
|
116
|
+
}), f || y || (d ? p ? l.push(o(b, "get"), o(b, "set")) : l.push(i === 2 ? b[S] : o.call.bind(b[S])) : Object.defineProperty(e, r, b)), C;
|
|
117
|
+
}
|
|
118
|
+
function u(e, t) {
|
|
119
|
+
return Object.defineProperty(e, Symbol.metadata || Symbol.for("Symbol.metadata"), {
|
|
120
|
+
configurable: !0,
|
|
121
|
+
enumerable: !0,
|
|
122
|
+
value: t
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
if (arguments.length >= 6) var d = a[Symbol.metadata || Symbol.for("Symbol.metadata")];
|
|
126
|
+
var f = Object.create(d ?? null), p = function(e, t, n, r) {
|
|
127
|
+
var i, a, o = [], c = function(t) {
|
|
128
|
+
return z(t) === e;
|
|
129
|
+
}, u = /* @__PURE__ */ new Map();
|
|
130
|
+
function d(e) {
|
|
131
|
+
e && o.push(s.bind(null, e));
|
|
132
|
+
}
|
|
133
|
+
for (var f = 0; f < t.length; f++) {
|
|
134
|
+
var p = t[f];
|
|
135
|
+
if (Array.isArray(p)) {
|
|
136
|
+
var m = p[1], h = p[2], g = p.length > 3, _ = 16 & m, v = !!(8 & m), y = (m &= 7) == 0, b = h + "/" + v;
|
|
137
|
+
if (!y && !g) {
|
|
138
|
+
var x = u.get(b);
|
|
139
|
+
if (!0 === x || x === 3 && m !== 4 || x === 4 && m !== 3) throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + h);
|
|
140
|
+
u.set(b, !(m > 2) || m);
|
|
141
|
+
}
|
|
142
|
+
l(v ? e : e.prototype, p, _, g ? "#" + h : I(h), m, r, v ? a ||= [] : i ||= [], o, v, g, y, m === 1, v && g ? c : n);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
return d(i), d(a), o;
|
|
146
|
+
}(e, t, i, f);
|
|
147
|
+
return n.length || u(e, f), {
|
|
148
|
+
e: p,
|
|
149
|
+
get c() {
|
|
150
|
+
var t = [];
|
|
151
|
+
return n.length && [u(l(e, [n], r, e.name, 5, f, t), f), s.bind(null, t, e)];
|
|
152
|
+
}
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
function I(e) {
|
|
156
|
+
var t = L(e, "string");
|
|
157
|
+
return typeof t == "symbol" ? t : t + "";
|
|
158
|
+
}
|
|
159
|
+
function L(e, t) {
|
|
160
|
+
if (typeof e != "object" || !e) return e;
|
|
161
|
+
var n;
|
|
162
|
+
if (typeof Symbol < "u" && (n = e[Symbol.toPrimitive]) !== void 0) {
|
|
163
|
+
var r = n.call(e, t || "default");
|
|
164
|
+
if (typeof r != "object") return r;
|
|
165
|
+
throw TypeError("@@toPrimitive must return a primitive value.");
|
|
166
|
+
}
|
|
167
|
+
return (t === "string" ? String : Number)(e);
|
|
168
|
+
}
|
|
169
|
+
function R(e, t, n) {
|
|
170
|
+
typeof t == "symbol" && (t = (t = t.description) ? "[" + t + "]" : "");
|
|
171
|
+
try {
|
|
172
|
+
Object.defineProperty(e, "name", {
|
|
173
|
+
configurable: !0,
|
|
174
|
+
value: n ? n + " " + t : t
|
|
175
|
+
});
|
|
176
|
+
} catch {}
|
|
177
|
+
return e;
|
|
178
|
+
}
|
|
179
|
+
function z(e) {
|
|
180
|
+
if (Object(e) !== e) throw TypeError("right-hand side of 'in' should be an object, got " + (e === null ? "null" : typeof e));
|
|
181
|
+
return e;
|
|
182
|
+
}
|
|
183
|
+
function B(e) {
|
|
184
|
+
return e;
|
|
185
|
+
}
|
|
186
|
+
v = [a("folder-pane-create-dialog")];
|
|
187
|
+
var V;
|
|
188
|
+
new (D = (f = /*#__PURE__*/ new WeakMap(), p = /*#__PURE__*/ new WeakMap(), m = /*#__PURE__*/ new WeakMap(), h = /*#__PURE__*/ new WeakMap(), O = (y = s({ attribute: !1 }), x = l(), C = l(), T = c("input"), "label"), d = class extends i {
|
|
189
|
+
constructor(...e) {
|
|
190
|
+
super(...e), k(this, f, (g(this), b(this, null))), k(this, p, S(this, "")), k(this, m, w(this, "")), k(this, h, E(this, null)), P(this, "cancel", () => this.close()), P(this, "confirm", () => {
|
|
191
|
+
let e = this.name.trim();
|
|
192
|
+
n(e) ? this.close(e) : this.validationMessage = t;
|
|
193
|
+
}), P(this, "onNameInput", (e) => {
|
|
194
|
+
this.name = e.target.value, this.validationMessage = "";
|
|
195
|
+
}), P(this, "onNameKeydown", (e) => {
|
|
196
|
+
e.key === "Enter" && (e.preventDefault(), this.confirm());
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
get [O]() {
|
|
200
|
+
return M(f, this);
|
|
201
|
+
}
|
|
202
|
+
set label(e) {
|
|
203
|
+
j(f, this, e);
|
|
204
|
+
}
|
|
205
|
+
get name() {
|
|
206
|
+
return M(p, this);
|
|
207
|
+
}
|
|
208
|
+
set name(e) {
|
|
209
|
+
j(p, this, e);
|
|
210
|
+
}
|
|
211
|
+
get validationMessage() {
|
|
212
|
+
return M(m, this);
|
|
213
|
+
}
|
|
214
|
+
set validationMessage(e) {
|
|
215
|
+
j(m, this, e);
|
|
216
|
+
}
|
|
217
|
+
get nameInput() {
|
|
218
|
+
return M(h, this);
|
|
219
|
+
}
|
|
220
|
+
set nameInput(e) {
|
|
221
|
+
j(h, this, e);
|
|
222
|
+
}
|
|
223
|
+
firstUpdated() {
|
|
224
|
+
requestAnimationFrame(() => {
|
|
225
|
+
this.nameInput?.focus(), this.nameInput?.setSelectionRange(0, this.nameInput.value.length);
|
|
226
|
+
});
|
|
227
|
+
}
|
|
228
|
+
render() {
|
|
229
|
+
let t = this.label ?? "Container", { title: n, placeholder: r } = e(t), i = `${n.slice(4)} name`;
|
|
230
|
+
return o`
|
|
231
|
+
<solid-ui-dialog>
|
|
232
|
+
<solid-ui-dialog-header slot="header" class="folder-pane-create-dialog-header">
|
|
233
|
+
<h1>${n}</h1>
|
|
234
|
+
<solid-ui-button variant="ghost" @click=${this.cancel} title="Close" aria-label="Close">
|
|
235
|
+
<icon-lucide-x slot="icon"></icon-lucide-x>
|
|
236
|
+
</solid-ui-button>
|
|
237
|
+
</solid-ui-dialog-header>
|
|
238
|
+
<solid-ui-dialog-content>
|
|
239
|
+
<label class="folder-pane-create-dialog-label">
|
|
240
|
+
<span>${i}</span>
|
|
241
|
+
<input
|
|
242
|
+
type="text"
|
|
243
|
+
placeholder=${r}
|
|
244
|
+
.value=${this.name}
|
|
245
|
+
@input=${this.onNameInput}
|
|
246
|
+
@keydown=${this.onNameKeydown}
|
|
247
|
+
/>
|
|
248
|
+
${this.validationMessage ? o`<span class="folder-pane-create-dialog-error" role="alert">${this.validationMessage}</span>` : ""}
|
|
249
|
+
</label>
|
|
250
|
+
</solid-ui-dialog-content>
|
|
251
|
+
<solid-ui-dialog-footer>
|
|
252
|
+
<solid-ui-button variant="secondary" @click=${this.cancel}>
|
|
253
|
+
Cancel
|
|
254
|
+
</solid-ui-button>
|
|
255
|
+
<solid-ui-button ?disabled=${!this.name.trim()} @click=${this.confirm}>
|
|
256
|
+
Create
|
|
257
|
+
</solid-ui-button>
|
|
258
|
+
</solid-ui-dialog-footer>
|
|
259
|
+
</solid-ui-dialog>
|
|
260
|
+
`;
|
|
261
|
+
}
|
|
262
|
+
}, {e: [b, S, w, E, g], c: [V, _]} = F(d, [
|
|
263
|
+
[
|
|
264
|
+
y,
|
|
265
|
+
1,
|
|
266
|
+
"label"
|
|
267
|
+
],
|
|
268
|
+
[
|
|
269
|
+
x,
|
|
270
|
+
1,
|
|
271
|
+
"name"
|
|
272
|
+
],
|
|
273
|
+
[
|
|
274
|
+
C,
|
|
275
|
+
1,
|
|
276
|
+
"validationMessage"
|
|
277
|
+
],
|
|
278
|
+
[
|
|
279
|
+
T,
|
|
280
|
+
1,
|
|
281
|
+
"nameInput"
|
|
282
|
+
]
|
|
283
|
+
], v, 0, void 0, i), d), u = class extends B {
|
|
284
|
+
constructor() {
|
|
285
|
+
super(V), P(this, "styles", r), _();
|
|
286
|
+
}
|
|
287
|
+
}, P(u, D, void 0), u)();
|
|
288
|
+
export { V as default };
|
|
289
|
+
|
|
290
|
+
//# sourceMappingURL=FolderPaneCreateDialog.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FolderPaneCreateDialog.esm.js","names":["DialogComponent","customElement","html","property","query","state","getCreationDialogText","invalidCreationNameMessage","isSafeCreationName","styles","_classDecs","_FolderPaneCreateDial","_FolderPaneCreateDial2","_A","WeakMap","_B","_C","_D","_ref","_labelDecs","attribute","_nameDecs","_validationMessageDecs","_nameInputDecs","_FolderPaneCreateDialog","FolderPaneCreateDialog","constructor","args","_classPrivateFieldInitSpec","_initProto","_init_label","_init_name","_init_validationMessage","_init_nameInput","_defineProperty","close","name","trim","validationMessage","event","target","value","key","preventDefault","confirm","_classPrivateFieldGet","label","v","_classPrivateFieldSet","nameInput","firstUpdated","requestAnimationFrame","focus","setSelectionRange","length","render","paneLabel","title","placeholder","displayLabel","slice","fieldLabel","cancel","onNameInput","onNameKeydown","e","c","_initClass","_applyDecs","_Class","_identity","default","styles","FolderPaneCreateDialog_styles_default","_Class","_FolderPaneCreateDialog","_A","_B","_C","_D","_initProto","_initClass","_classDecs","_labelDecs","_init_label","_nameDecs","_init_name","_validationMessageDecs","_init_validationMessage","_nameInputDecs","_init_nameInput","_FolderPaneCreateDial2","_ref","_classPrivateFieldInitSpec","a","_checkPrivateRedeclaration","_classPrivateFieldSet","s","_assertClassBrand","r","_classPrivateFieldGet","_defineProperty","_toPropertyKey","t","_applyDecs","i","n","o","c","applyDec","m","h","y","v","g","b","u","w","S","A","d","p","_setFunctionName","P","j","D","I","F","l","f","N","_checkInRHS","_toPrimitive","e","_identity","customElement","_FolderPaneCreateDial","property","state","query","DialogComponent","args","name","isSafeCreationName","invalidCreationNameMessage","event","paneLabel","getCreationDialogText","fieldLabel","title","placeholder"],"sources":["../../../src/components/folder-pane-storage-header/FolderPaneCreateDialog.ts"],"sourcesContent":["import { DialogComponent, customElement } from 'solid-ui'\nimport { html } from 'lit'\nimport { property, query, state } from 'lit/decorators.js'\nimport { getCreationDialogText } from '../../helpers'\nimport { invalidCreationNameMessage, isSafeCreationName } from '../../creationSafety'\nimport styles from './FolderPaneCreateDialog.styles.css'\n\nimport 'solid-ui/components/button'\nimport 'solid-ui/components/dialog'\nimport 'solid-ui/components/dialog-content'\nimport 'solid-ui/components/dialog-footer'\nimport 'solid-ui/components/dialog-header'\nimport '~icons/lucide/x'\n\n@customElement('folder-pane-create-dialog')\nexport default class FolderPaneCreateDialog extends DialogComponent<string> {\n static styles = styles\n\n @property({ attribute: false })\n accessor label: string | null = null\n\n @state()\n accessor name = ''\n\n @state()\n accessor validationMessage = ''\n\n @query('input')\n private accessor nameInput: HTMLInputElement | null = null\n\n private cancel = () => this.close()\n\n private confirm = () => {\n const name = this.name.trim()\n\n if (!isSafeCreationName(name)) {\n this.validationMessage = invalidCreationNameMessage\n return\n }\n\n this.close(name)\n }\n\n private onNameInput = (event: Event) => {\n this.name = (event.target as HTMLInputElement).value\n this.validationMessage = ''\n }\n\n private onNameKeydown = (event: KeyboardEvent) => {\n if (event.key === 'Enter') {\n event.preventDefault()\n this.confirm()\n }\n }\n\n protected firstUpdated () {\n requestAnimationFrame(() => {\n this.nameInput?.focus()\n this.nameInput?.setSelectionRange(0, this.nameInput.value.length)\n })\n }\n\n protected render () {\n const paneLabel = this.label ?? 'Container'\n const { title, placeholder } = getCreationDialogText(paneLabel)\n const displayLabel = title.slice(4)\n const fieldLabel = `${displayLabel} name`\n\n return html`\n <solid-ui-dialog>\n <solid-ui-dialog-header slot=\"header\" class=\"folder-pane-create-dialog-header\">\n <h1>${title}</h1>\n <solid-ui-button variant=\"ghost\" @click=${this.cancel} title=\"Close\" aria-label=\"Close\">\n <icon-lucide-x slot=\"icon\"></icon-lucide-x>\n </solid-ui-button>\n </solid-ui-dialog-header>\n <solid-ui-dialog-content>\n <label class=\"folder-pane-create-dialog-label\">\n <span>${fieldLabel}</span>\n <input\n type=\"text\"\n placeholder=${placeholder}\n .value=${this.name}\n @input=${this.onNameInput}\n @keydown=${this.onNameKeydown}\n />\n ${this.validationMessage\n ? html`<span class=\"folder-pane-create-dialog-error\" role=\"alert\">${this.validationMessage}</span>`\n : ''}\n </label>\n </solid-ui-dialog-content>\n <solid-ui-dialog-footer>\n <solid-ui-button variant=\"secondary\" @click=${this.cancel}>\n Cancel\n </solid-ui-button>\n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,GAAE;;;;wDAIsC,KAAKwB,OAAM;;;uCAG5B,CAAC,KAAK1B,KAAKC,KAAK,EAAC,UAAW,KAAKO,QAAO;;;;;;CAM7E;AACF,GAAC,CAAAqB,GAAA,CAAAnC,GAAAC,GAAAC,GAAAC,GAAAJ,IAAAqC,GAAA,CAAAvD,GAAAwD,MAAAC,EAAA5C,GAAA;CAAA;EAAAL;EAAA;EAAA;CAAA;CAAA;EAAAE;EAAA;EAAA;CAAA;CAAA;EAAAC;EAAA;EAAA;CAAA;CAAA;EAAAC;EAAA;EAAA;CAAA;AAAA,GAAAb,GAAA,GAAA,KAAA,GAvFmDV,CAAe,GAAAwB,IAAA6C,IAAA,cAAAC,EAAA;CAAA5C,cAAA;EAAA,MAAAf,CAAA,GAAAuB,EAAA,MAAA,UACjDzB,CAAM,GAAA0D,EAAA;CAAA;AAAA,GAAAjC,EAAAmC,GAAAzD,GAAA,KAAA,CAAA,GAAAyD,GAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var e=require("lit").css`:host{display:block}:host .folder-pane-create-dialog-header{border:1px solid var(--solid-ui-color-slate-200,#e2e8f0);background:var(--solid-ui-color-slate-50,#f8fafc);border-radius:5px 5px 0 0;gap:25px;padding:20px 25px}:host h1{color:var(--solid-ui-color-gray-800,#1e2939);font-weight:500;font-size:var(--solid-ui-font-size-xl,1.25rem);margin:0}:host .folder-pane-create-dialog-label{color:var(--solid-ui-color-gray-600,#4a5565);font-size:var(--solid-ui-font-size-sm,.875rem);flex-direction:column;flex:1 0 0;align-self:stretch;align-items:flex-start;gap:5px;display:flex}:host input{box-sizing:border-box;border:1px solid var(--solid-ui-color-gray-400,#99a1af);background:var(--solid-ui-color-white,#fff);width:100%;height:40px;color:var(--solid-ui-color-gray-900,#101828);font-size:var(--solid-ui-font-size-sm,.875rem);border-radius:5px;padding:10px;font-weight:500;display:block}:host solid-ui-dialog-content{flex-direction:column;align-self:stretch;align-items:flex-start;gap:20px;padding:25px 25px 30px;display:flex}:host solid-ui-dialog-footer{border-top:1px solid var(--solid-ui-color-slate-200,#e2e8f0);background:var(--solid-ui-color-gray-50,#f9fafb);justify-content:flex-end;align-self:stretch;align-items:center;gap:15px;padding:20px 30px;display:flex}`;exports.default=e;
|
|
2
|
+
//# sourceMappingURL=FolderPaneCreateDialog.styles.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FolderPaneCreateDialog.styles.cjs.js","names":["FolderPaneCreateDialog_styles_default"],"sources":["../../../src/components/folder-pane-storage-header/FolderPaneCreateDialog.styles.css"],"sourcesContent":[":host {\n display: block;\n\n .folder-pane-create-dialog-header {\n padding: 20px 25px;\n gap: 25px;\n border-radius: 5px 5px 0 0;\n border: 1px solid var(--solid-ui-color-slate-200, #E2E8F0);\n background: var(--solid-ui-color-slate-50, #F8FAFC);\n }\n\n h1 {\n margin: 0;\n font-weight: 500;\n color: var(--solid-ui-color-gray-800, #1E2939);\n font-size: var(--solid-ui-font-size-xl, 1.25rem);\n }\n\n .folder-pane-create-dialog-label {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap: 5px;\n flex: 1 0 0;\n align-self: stretch;\n color: var(--solid-ui-color-gray-600, #4A5565);\n font-size: var(--solid-ui-font-size-sm, .875rem);\n }\n\n input {\n display: block;\n box-sizing: border-box;\n width: 100%;\n height: 40px;\n padding: 10px;\n border-radius: 5px;\n border: 1px solid var(--solid-ui-color-gray-400, #99A1AF);\n background: var(--solid-ui-color-white, #FFF);\n color: var(--solid-ui-color-gray-900, #101828);\n font-size: var(--solid-ui-font-size-sm, .875rem);\n font-weight: 500;\n }\n\n solid-ui-dialog-content {\n display: flex;\n padding: 25px 25px 30px;\n flex-direction: column;\n align-items: flex-start;\n gap: 20px;\n align-self: stretch;\n }\n\n solid-ui-dialog-footer {\n display: flex;\n padding: 20px 30px;\n justify-content: flex-end;\n align-items: center;\n gap: 15px;\n align-self: stretch;\n border-top: 1px solid var(--solid-ui-color-slate-200, #E2E8F0);\n background: var(--solid-ui-color-gray-50, #F9FAFB);\n }\n}\n"],"mappings":""}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { css as e } from "lit";
|
|
2
|
+
// src/components/folder-pane-storage-header/FolderPaneCreateDialog.styles.css
|
|
3
|
+
var t = e`:host{display:block}:host .folder-pane-create-dialog-header{border:1px solid var(--solid-ui-color-slate-200,#e2e8f0);background:var(--solid-ui-color-slate-50,#f8fafc);border-radius:5px 5px 0 0;gap:25px;padding:20px 25px}:host h1{color:var(--solid-ui-color-gray-800,#1e2939);font-weight:500;font-size:var(--solid-ui-font-size-xl,1.25rem);margin:0}:host .folder-pane-create-dialog-label{color:var(--solid-ui-color-gray-600,#4a5565);font-size:var(--solid-ui-font-size-sm,.875rem);flex-direction:column;flex:1 0 0;align-self:stretch;align-items:flex-start;gap:5px;display:flex}:host input{box-sizing:border-box;border:1px solid var(--solid-ui-color-gray-400,#99a1af);background:var(--solid-ui-color-white,#fff);width:100%;height:40px;color:var(--solid-ui-color-gray-900,#101828);font-size:var(--solid-ui-font-size-sm,.875rem);border-radius:5px;padding:10px;font-weight:500;display:block}:host solid-ui-dialog-content{flex-direction:column;align-self:stretch;align-items:flex-start;gap:20px;padding:25px 25px 30px;display:flex}:host solid-ui-dialog-footer{border-top:1px solid var(--solid-ui-color-slate-200,#e2e8f0);background:var(--solid-ui-color-gray-50,#f9fafb);justify-content:flex-end;align-self:stretch;align-items:center;gap:15px;padding:20px 30px;display:flex}`;
|
|
4
|
+
export { t as default };
|
|
5
|
+
|
|
6
|
+
//# sourceMappingURL=FolderPaneCreateDialog.styles.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FolderPaneCreateDialog.styles.esm.js","names":["FolderPaneCreateDialog_styles_default"],"sources":["../../../src/components/folder-pane-storage-header/FolderPaneCreateDialog.styles.css"],"sourcesContent":[":host {\n display: block;\n\n .folder-pane-create-dialog-header {\n padding: 20px 25px;\n gap: 25px;\n border-radius: 5px 5px 0 0;\n border: 1px solid var(--solid-ui-color-slate-200, #E2E8F0);\n background: var(--solid-ui-color-slate-50, #F8FAFC);\n }\n\n h1 {\n margin: 0;\n font-weight: 500;\n color: var(--solid-ui-color-gray-800, #1E2939);\n font-size: var(--solid-ui-font-size-xl, 1.25rem);\n }\n\n .folder-pane-create-dialog-label {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap: 5px;\n flex: 1 0 0;\n align-self: stretch;\n color: var(--solid-ui-color-gray-600, #4A5565);\n font-size: var(--solid-ui-font-size-sm, .875rem);\n }\n\n input {\n display: block;\n box-sizing: border-box;\n width: 100%;\n height: 40px;\n padding: 10px;\n border-radius: 5px;\n border: 1px solid var(--solid-ui-color-gray-400, #99A1AF);\n background: var(--solid-ui-color-white, #FFF);\n color: var(--solid-ui-color-gray-900, #101828);\n font-size: var(--solid-ui-font-size-sm, .875rem);\n font-weight: 500;\n }\n\n solid-ui-dialog-content {\n display: flex;\n padding: 25px 25px 30px;\n flex-direction: column;\n align-items: flex-start;\n gap: 20px;\n align-self: stretch;\n }\n\n solid-ui-dialog-footer {\n display: flex;\n padding: 20px 30px;\n justify-content: flex-end;\n align-items: center;\n gap: 15px;\n align-self: stretch;\n border-top: 1px solid var(--solid-ui-color-slate-200, #E2E8F0);\n background: var(--solid-ui-color-gray-50, #F9FAFB);\n }\n}\n"],"mappings":""}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
const e=require("../../helpers.cjs.js");require("../../_virtual/~icons/lucide/folder-open.cjs.js"),require("../../_virtual/~icons/lucide/layout-grid.cjs.js"),require("../../_virtual/~icons/lucide/list.cjs.js"),require("../../_virtual/~icons/lucide/chevron-down.cjs.js"),require("../../_virtual/~icons/lucide/plus.cjs.js"),require("../../_virtual/~icons/lucide/upload.cjs.js"),require("../../_virtual/~icons/lucide/search.cjs.js");const t=require("./FolderPaneStorageHeader.styles.cjs.js");let n=require("solid-ui"),r=require("lit"),i=require("lit/decorators.js");require("solid-ui/components/button"),require("solid-ui/components/menu"),require("solid-ui/components/menu-item");var a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,O,k,A,j,M,N,P,F;function I(e,t,n){L(e,t),t.set(e,n)}function L(e,t){if(t.has(e))throw TypeError(`Cannot initialize the same private elements twice on an object`)}function R(e,t,n){return e.set(B(e,t),n),n}function z(e,t){return e.get(B(e,t))}function B(e,t,n){if(typeof e==`function`?e===t:e.has(t))return arguments.length<3?t:n;throw TypeError(`Private element is not present on this object`)}function V(e,t,n){return(t=U(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function H(e,t,n,r,i,a){function o(e,t,n){return function(r,i){return n&&n(r),e[t].call(r,i)}}function s(e,t){for(var n=0;n<e.length;n++)e[n].call(t);return t}function c(e,t,n,r){if(typeof e!=`function`&&(r||e!==void 0))throw TypeError(t+` must `+(n||`be`)+` a function`+(r?``:` or undefined`));return e}function l(e,t,n,r,i,a,s,l,u,d,f,p,m){function h(e){if(!m(e))throw TypeError(`Attempted to access private element on non-instance`)}var g,_=t[0],v=t[3],y=!l;if(!y){n||Array.isArray(_)||(_=[_]);var b={},x=[],S=i===3?`get`:i===4||p?`set`:`value`;d?(f||p?b={get:G(function(){return v(this)},r,`get`),set:function(e){t[4](this,e)}}:b[S]=v,f||G(b[S],r,i===2?``:S)):f||(b=Object.getOwnPropertyDescriptor(e,r))}for(var C=e,w=_.length-1;w>=0;w-=n?2:1){var T=_[w],E=n?_[w-1]:void 0,D={},O={kind:[`field`,`accessor`,`method`,`getter`,`setter`,`class`][i],name:r,metadata:a,addInitializer:function(e,t){if(e.v)throw Error(`attempted to call addInitializer after decoration was finished`);c(t,`An initializer`,`be`,!0),s.push(t)}.bind(null,D)};try{if(y)(g=c(T.call(E,C,O),`class decorators`,`return`))&&(C=g);else{var k,A;O.static=u,O.private=d,d?i===2?k=function(e){return h(e),b.value}:(i<4&&(k=o(b,`get`,h)),i!==3&&(A=o(b,`set`,h))):(k=function(e){return e[r]},(i<2||i===4)&&(A=function(e,t){e[r]=t}));var j=O.access={has:d?m.bind():function(e){return r in e}};if(k&&(j.get=k),A&&(j.set=A),C=T.call(E,p?{get:b.get,set:b.set}:b[S],O),p){if(typeof C==`object`&&C)(g=c(C.get,`accessor.get`))&&(b.get=g),(g=c(C.set,`accessor.set`))&&(b.set=g),(g=c(C.init,`accessor.init`))&&x.push(g);else if(C!==void 0)throw TypeError(`accessor decorators must return an object with get, set, or init properties or void 0`)}else c(C,(f?`field`:`method`)+` decorators`,`return`)&&(f?x.push(C):b[S]=C)}}finally{D.v=!0}}return(f||p)&&l.push(function(e,t){for(var n=x.length-1;n>=0;n--)t=x[n].call(e,t);return t}),f||y||(d?p?l.push(o(b,`get`),o(b,`set`)):l.push(i===2?b[S]:o.call.bind(b[S])):Object.defineProperty(e,r,b)),C}function u(e,t){return Object.defineProperty(e,Symbol.metadata||Symbol.for(`Symbol.metadata`),{configurable:!0,enumerable:!0,value:t})}if(arguments.length>=6)var d=a[Symbol.metadata||Symbol.for(`Symbol.metadata`)];var f=Object.create(d??null),p=function(e,t,n,r){var i,a,o=[],c=function(t){return K(t)===e},u=new Map;function d(e){e&&o.push(s.bind(null,e))}for(var f=0;f<t.length;f++){var p=t[f];if(Array.isArray(p)){var m=p[1],h=p[2],g=p.length>3,_=16&m,v=!!(8&m),y=(m&=7)==0,b=h+`/`+v;if(!y&&!g){var x=u.get(b);if(!0===x||x===3&&m!==4||x===4&&m!==3)throw Error(`Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: `+h);u.set(b,!(m>2)||m)}l(v?e:e.prototype,p,_,g?`#`+h:U(h),m,r,v?a||=[]:i||=[],o,v,g,y,m===1,v&&g?c:n)}}return d(i),d(a),o}(e,t,i,f);return n.length||u(e,f),{e:p,get c(){var t=[];return n.length&&[u(l(e,[n],r,e.name,5,f,t),f),s.bind(null,t,e)]}}}function U(e){var t=W(e,`string`);return typeof t==`symbol`?t:t+``}function W(e,t){if(typeof e!=`object`||!e)return e;var n;if(typeof Symbol<`u`&&(n=e[Symbol.toPrimitive])!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function G(e,t,n){typeof t==`symbol`&&(t=(t=t.description)?`[`+t+`]`:``);try{Object.defineProperty(e,"name",{configurable:!0,value:n?n+` `+t:t})}catch{}return e}function K(e){if(Object(e)!==e)throw TypeError(`right-hand side of 'in' should be an object, got `+(e===null?`null`:typeof e));return e}function q(e){return e}_=[(0,n.customElement)(`folder-pane-storage-header`)];var J;new(P=(s=new WeakMap,c=new WeakMap,l=new WeakMap,u=new WeakMap,d=new WeakMap,f=new WeakMap,p=new WeakMap,m=new WeakMap,F=(v=(0,i.property)({attribute:!1}),b=(0,i.property)({attribute:!1}),S=(0,i.property)({attribute:!1}),w=(0,i.property)({attribute:!1}),E=(0,i.property)(),O=(0,i.property)(),A=(0,i.property)({type:Boolean}),M=(0,i.state)(),`subject`),o=class extends n.WebComponent{constructor(...e){super(...e),I(this,s,(h(this),y(this,void 0))),I(this,c,x(this,void 0)),I(this,l,C(this,void 0)),I(this,u,T(this,[])),I(this,d,D(this,`grid`)),I(this,f,k(this,``)),I(this,p,j(this,!1)),I(this,m,N(this,[])),V(this,`availablePanesGeneration`,0)}get[F](){return z(s,this)}set subject(e){R(s,this,e)}get selectedResource(){return z(c,this)}set selectedResource(e){R(c,this,e)}get browserContext(){return z(l,this)}set browserContext(e){R(l,this,e)}get paneList(){return z(u,this)}set paneList(e){R(u,this,e)}get view(){return z(d,this)}set view(e){R(d,this,e)}get searchQuery(){return z(f,this)}set searchQuery(e){R(f,this,e)}get canCreate(){return z(p,this)}set canCreate(e){R(p,this,e)}get availablePanes(){return z(m,this)}set availablePanes(e){R(m,this,e)}updated(t){if(!t.has(`paneList`)&&!t.has(`browserContext`))return;let r=++this.availablePanesGeneration;n.login.filterAvailablePanes(this.paneList).then(t=>{r===this.availablePanesGeneration&&(this.availablePanes=e.getCreationPanes(t))}).catch(e=>console.error(`Unable to load folder creation panes`,e))}get breadcrumbResources(){let e=this.subject,t=this.selectedResource;if(!e||!t)return e?[e]:[];let n=[t],r=t;for(;!r.sameTerm(e);){let i=r.dir();if(!i||i.sameTerm(r)||(n.unshift(i),r=i,n.length>32))return[e,t]}return n}getResourceLabel(e,t){if(this.subject?.sameTerm(e)||t===0)return`Home`;try{let t=new URL(e.uri).pathname.split(`/`).filter(Boolean);return decodeURIComponent(t[t.length-1]||e.uri)}catch{return e.uri}}selectHome(){this.dispatchEvent(new CustomEvent(`folder-pane-select-home`,{bubbles:!0,composed:!0}))}selectView(e){this.dispatchEvent(new CustomEvent(`folder-pane-change-view`,{detail:{view:e},bubbles:!0,composed:!0}))}selectResource(e){this.dispatchEvent(new CustomEvent(`folder-pane-select-resource`,{detail:{resource:e},bubbles:!0,composed:!0}))}requestUpload(){this.dispatchEvent(new CustomEvent(`folder-pane-upload`,{bubbles:!0,composed:!0}))}updateSearch(e){this.dispatchEvent(new CustomEvent(`folder-pane-search`,{detail:{query:e.target.value},bubbles:!0,composed:!0}))}createPane(e){this.dispatchEvent(new CustomEvent(`folder-pane-create-pane`,{detail:{pane:e},bubbles:!0,composed:!0}))}render(){return r.html`
|
|
2
|
+
<header class="folder-pane-storage-header">
|
|
3
|
+
<nav class="folder-pane-storage-header-breadcrumbs" aria-label="Storage breadcrumb">
|
|
4
|
+
<icon-lucide-folder-open aria-hidden="true"></icon-lucide-folder-open>
|
|
5
|
+
<ol>
|
|
6
|
+
${this.breadcrumbResources.map((e,t,n)=>r.html`
|
|
7
|
+
<li>
|
|
8
|
+
${t===n.length-1?r.html`<span aria-current="page">${this.getResourceLabel(e,t)}</span>`:r.html`
|
|
9
|
+
<button
|
|
10
|
+
type="button"
|
|
11
|
+
@click=${()=>t===0?this.selectHome():this.selectResource(e)}
|
|
12
|
+
>${this.getResourceLabel(e,t)}</button>
|
|
13
|
+
<span class="separator" aria-hidden="true">/</span>
|
|
14
|
+
`}
|
|
15
|
+
</li>
|
|
16
|
+
`)}
|
|
17
|
+
</ol>
|
|
18
|
+
</nav>
|
|
19
|
+
<div class="folder-pane-storage-header-toolbar">
|
|
20
|
+
<label class="folder-pane-storage-header-search">
|
|
21
|
+
<icon-lucide-search aria-hidden="true"></icon-lucide-search>
|
|
22
|
+
<input
|
|
23
|
+
aria-label="Search"
|
|
24
|
+
type="search"
|
|
25
|
+
.value=${this.searchQuery}
|
|
26
|
+
@input=${this.updateSearch}
|
|
27
|
+
>
|
|
28
|
+
</label>
|
|
29
|
+
<div class="folder-pane-storage-header-view-controls" role="group" aria-label="Container view">
|
|
30
|
+
<div class=${`folder-pane-storage-header-view-toggle ${this.view===`grid`?`is-selected`:``}`}>
|
|
31
|
+
<solid-ui-button
|
|
32
|
+
variant="ghost"
|
|
33
|
+
aria-label="Grid view"
|
|
34
|
+
aria-pressed=${String(this.view===`grid`)}
|
|
35
|
+
@click=${()=>this.selectView(`grid`)}
|
|
36
|
+
>
|
|
37
|
+
<icon-lucide-layout-grid slot="icon" aria-hidden="true"></icon-lucide-layout-grid>
|
|
38
|
+
</solid-ui-button>
|
|
39
|
+
</div>
|
|
40
|
+
<div class=${`folder-pane-storage-header-view-toggle ${this.view===`list`?`is-selected`:``}`}>
|
|
41
|
+
<solid-ui-button
|
|
42
|
+
variant="ghost"
|
|
43
|
+
aria-label="List view"
|
|
44
|
+
aria-pressed=${String(this.view===`list`)}
|
|
45
|
+
@click=${()=>this.selectView(`list`)}
|
|
46
|
+
>
|
|
47
|
+
<icon-lucide-list slot="icon" aria-hidden="true"></icon-lucide-list>
|
|
48
|
+
</solid-ui-button>
|
|
49
|
+
</div>
|
|
50
|
+
</div>
|
|
51
|
+
${this.canCreate?r.html`<solid-ui-menu class="folder-pane-storage-header-add-menu" placement="bottom-end">
|
|
52
|
+
<solid-ui-button
|
|
53
|
+
slot="trigger"
|
|
54
|
+
variant="primary"
|
|
55
|
+
aria-haspopup="menu"
|
|
56
|
+
>
|
|
57
|
+
<icon-lucide-plus slot="left-icon" aria-hidden="true"></icon-lucide-plus>
|
|
58
|
+
Add
|
|
59
|
+
<icon-lucide-chevron-down slot="right-icon" aria-hidden="true"></icon-lucide-chevron-down>
|
|
60
|
+
</solid-ui-button>
|
|
61
|
+
${this.availablePanes.map(t=>r.html`
|
|
62
|
+
<solid-ui-menu-item @solid-ui-select=${()=>this.createPane(t)}>
|
|
63
|
+
${t.icon?r.html`<img
|
|
64
|
+
slot="left-icon"
|
|
65
|
+
src=${String(t.icon)}
|
|
66
|
+
alt=""
|
|
67
|
+
>`:r.nothing}
|
|
68
|
+
New ${e.getPaneLabel(t)}
|
|
69
|
+
</solid-ui-menu-item>
|
|
70
|
+
`)}
|
|
71
|
+
<solid-ui-menu-item @solid-ui-select=${this.requestUpload}>
|
|
72
|
+
<icon-lucide-upload slot="left-icon" aria-hidden="true"></icon-lucide-upload>
|
|
73
|
+
Upload
|
|
74
|
+
</solid-ui-menu-item>
|
|
75
|
+
</solid-ui-menu>`:r.nothing}
|
|
76
|
+
</div>
|
|
77
|
+
</header>
|
|
78
|
+
`}},{e:[y,x,C,T,D,k,j,N,h],c:[J,g]}=H(o,[[v,1,`subject`],[b,1,`selectedResource`],[S,1,`browserContext`],[w,1,`paneList`],[E,1,`view`],[O,1,`searchQuery`],[A,1,`canCreate`],[M,1,`availablePanes`]],_,0,void 0,n.WebComponent),o),a=class extends q{constructor(){super(J),V(this,`styles`,t.default),g()}},V(a,P,void 0),a),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return J}});
|
|
79
|
+
//# sourceMappingURL=FolderPaneStorageHeader.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FolderPaneStorageHeader.cjs.js","names":["html","nothing","property","state","customElement","login","WebComponent","getCreationPanes","getPaneLabel","styles","_classDecs","_FolderPaneStorageHea","_FolderPaneStorageHea2","_A","WeakMap","_B","_C","_D","_E","_F","_G","_H","_ref","_subjectDecs","attribute","_selectedResourceDecs","_browserContextDecs","_paneListDecs","_viewDecs","_searchQueryDecs","_canCreateDecs","type","Boolean","_availablePanesDecs","_FolderPaneStorageHeader","FolderPaneStorageHeader","constructor","args","_classPrivateFieldInitSpec","_initProto","_init_subject","undefined","_init_selectedResource","_init_browserContext","_init_paneList","_init_view","_init_searchQuery","_init_canCreate","_init_availablePanes","_defineProperty","_classPrivateFieldGet","subject","v","_classPrivateFieldSet","selectedResource","browserContext","paneList","view","searchQuery","canCreate","availablePanes","updated","changedProperties","has","generation","availablePanesGeneration","filterAvailablePanes","then","panes","catch","error","console","breadcrumbResources","root","selected","resources","current","sameTerm","parent","dir","unshift","length","getResourceLabel","resource","index","pathSegments","URL","uri","pathname","split","filter","decodeURIComponent","selectHome","dispatchEvent","CustomEvent","bubbles","composed","selectView","detail","selectResource","requestUpload","updateSearch","event","query","target","value","createPane","pane","render","map","String","icon","e","c","_initClass","_applyDecs","_Class","_identity","default","customElement","property","state","WebComponent","login","getCreationPanes","nothing","getPaneLabel","styles","require_helpers","require_FolderPaneStorageHeader_styles","solid_ui","lit","lit_decorators_js","_Class","_FolderPaneStorageHeader","_A","_B","_C","_D","_E","_F","_G","_H","_initProto","_initClass","_classDecs","_subjectDecs","_init_subject","_selectedResourceDecs","_init_selectedResource","_browserContextDecs","_init_browserContext","_paneListDecs","_init_paneList","_viewDecs","_init_view","_searchQueryDecs","_init_searchQuery","_canCreateDecs","_init_canCreate","_availablePanesDecs","_init_availablePanes","_FolderPaneStorageHea2","_ref","_classPrivateFieldInitSpec","_checkPrivateRedeclaration","a","_classPrivateFieldSet","s","_assertClassBrand","r","_classPrivateFieldGet","_defineProperty","_toPropertyKey","t","_applyDecs","i","n","o","c","applyDec","m","h","y","v","g","b","u","w","S","A","d","f","p","_setFunctionName","P","j","D","I","F","l","N","_checkInRHS","_toPrimitive","e","_identity","_FolderPaneStorageHea","args","changedProperties","generation","panes","error","root","selected","resources","current","parent","resource","index","pathSegments","event","pane"],"sources":["../../../src/components/folder-pane-storage-header/FolderPaneStorageHeader.ts"],"sourcesContent":["import { html, nothing } from 'lit'\nimport { property, state } from 'lit/decorators.js'\nimport type { PropertyValues } from 'lit'\nimport type { DataBrowserContext, PaneDefinition } from 'pane-registry'\nimport { customElement, login, WebComponent } from 'solid-ui'\nimport type { NamedNode } from 'rdflib'\nimport 'solid-ui/components/button'\nimport 'solid-ui/components/menu'\nimport 'solid-ui/components/menu-item'\nimport '~icons/lucide/folder-open'\nimport '~icons/lucide/layout-grid'\nimport '~icons/lucide/list'\nimport '~icons/lucide/chevron-down'\nimport '~icons/lucide/plus'\nimport '~icons/lucide/upload'\nimport '~icons/lucide/search'\nimport { getCreationPanes, getPaneLabel } from '../../helpers'\nimport styles from './FolderPaneStorageHeader.styles.css'\n\n@customElement('folder-pane-storage-header')\nexport default class FolderPaneStorageHeader extends WebComponent {\n static styles = styles\n\n @property({ attribute: false })\n accessor subject: NamedNode | undefined = undefined\n\n @property({ attribute: false })\n accessor selectedResource: NamedNode | undefined = undefined\n\n @property({ attribute: false })\n accessor browserContext: DataBrowserContext | undefined = undefined\n\n @property({ attribute: false })\n accessor paneList: PaneDefinition[] = []\n\n @property()\n accessor view: 'grid' | 'list' = 'grid'\n\n @property()\n accessor searchQuery = ''\n\n @property({ type: Boolean })\n accessor canCreate = false\n\n @state()\n accessor availablePanes: PaneDefinition[] = []\n\n private availablePanesGeneration = 0\n\n protected updated (changedProperties: PropertyValues<this>) {\n if (!changedProperties.has('paneList') && !changedProperties.has('browserContext')) return\n const generation = ++this.availablePanesGeneration\n void login.filterAvailablePanes(this.paneList)\n .then(panes => {\n if (generation === this.availablePanesGeneration) {\n this.availablePanes = getCreationPanes(panes)\n }\n })\n .catch(error => console.error('Unable to load folder creation panes', error))\n }\n\n private get breadcrumbResources () {\n const root = this.subject\n const selected = this.selectedResource\n if (!root || !selected) return root ? [root] : []\n\n const resources = [selected]\n let current = selected\n while (!current.sameTerm(root)) {\n const parent = current.dir()\n if (!parent || parent.sameTerm(current)) return [root, selected]\n resources.unshift(parent)\n current = parent\n if (resources.length > 32) return [root, selected]\n }\n return resources\n }\n\n private getResourceLabel (resource: NamedNode, index: number) {\n if (this.subject?.sameTerm(resource) || index === 0) return 'Home'\n\n try {\n const pathSegments = new URL(resource.uri).pathname.split('/').filter(Boolean)\n return decodeURIComponent(pathSegments[pathSegments.length - 1] || resource.uri)\n } catch {\n return resource.uri\n }\n }\n\n private selectHome () {\n this.dispatchEvent(new CustomEvent('folder-pane-select-home', {\n bubbles: true,\n composed: true\n }))\n }\n\n private selectView (view: 'grid' | 'list') {\n this.dispatchEvent(new CustomEvent('folder-pane-change-view', {\n detail: { view },\n bubbles: true,\n composed: true\n }))\n }\n\n private selectResource (resource: NamedNode) {\n this.dispatchEvent(new CustomEvent('folder-pane-select-resource', {\n detail: { resource },\n bubbles: true,\n composed: true\n }))\n }\n\n private requestUpload () {\n this.dispatchEvent(new CustomEvent('folder-pane-upload', {\n bubbles: true,\n composed: true\n }))\n }\n\n private updateSearch (event: Event) {\n this.dispatchEvent(new CustomEvent('folder-pane-search', {\n detail: { query: (event.target as HTMLInputElement).value },\n bubbles: true,\n composed: true\n }))\n }\n\n private createPane (pane: PaneDefinition) {\n this.dispatchEvent(new CustomEvent('folder-pane-create-pane', {\n detail: { pane },\n bubbles: true,\n composed: true\n }))\n }\n\n render () {\n return html`\n <header class=\"folder-pane-storage-header\">\n <nav class=\"folder-pane-storage-header-breadcrumbs\" aria-label=\"Storage breadcrumb\">\n <icon-lucide-folder-open aria-hidden=\"true\"></icon-lucide-folder-open>\n <ol>\n ${this.breadcrumbResources.map((resource, index, resources) => html`\n <li>\n ${index === resources.length - 1\n ? html`<span aria-current=\"page\">${this.getResourceLabel(resource, index)}</span>`\n : html`\n <button\n type=\"button\"\n @click=${() => index === 0 ? this.selectHome() : this.selectResource(resource)}\n >${this.getResourceLabel(resource, index)}</button>\n <span class=\"separator\" aria-hidden=\"true\">/</span>\n `}\n </li>\n `)}\n </ol>\n </nav>\n <div class=\"folder-pane-storage-header-toolbar\">\n <label class=\"folder-pane-storage-header-search\">\n <icon-lucide-search aria-hidden=\"true\"></icon-lucide-search>\n <input\n aria-label=\"Search\"\n type=\"search\"\n .value=${this.searchQuery}\n @input=${this.updateSearch}\n >\n </label>\n <div class=\"folder-pane-storage-header-view-controls\" role=\"group\" aria-label=\"Container view\">\n <div class=${`folder-pane-storage-header-view-toggle ${this.view === 'grid' ? 'is-selected' : ''}`}>\n <solid-ui-button\n variant=\"ghost\"\n aria-label=\"Grid view\"\n aria-pressed=${String(this.view === 'grid')}\n @click=${() => this.selectView('grid')}\n >\n <icon-lucide-layout-grid slot=\"icon\" aria-hidden=\"true\"></icon-lucide-layout-grid>\n </solid-ui-button>\n </div>\n <div class=${`folder-pane-storage-header-view-toggle ${this.view === 'list' ? 'is-selected' : ''}`}>\n <solid-ui-button\n variant=\"ghost\"\n aria-label=\"List view\"\n aria-pressed=${String(this.view === 'list')}\n @click=${() => this.selectView('list')}\n >\n <icon-lucide-list slot=\"icon\" aria-hidden=\"true\"></icon-lucide-list>\n </solid-ui-button>\n </div>\n </div>\n ${this.canCreate ? html`<solid-ui-menu class=\"folder-pane-storage-header-add-menu\" placement=\"bottom-end\">\n <solid-ui-button\n slot=\"trigger\"\n variant=\"primary\"\n aria-haspopup=\"menu\"\n >\n <icon-lucide-plus slot=\"left-icon\" aria-hidden=\"true\"></icon-lucide-plus>\n Add\n <icon-lucide-chevron-down slot=\"right-icon\" aria-hidden=\"true\"></icon-lucide-chevron-down>\n </solid-ui-button>\n ${this.availablePanes.map(pane => html`\n <solid-ui-menu-item @solid-ui-select=${() => this.createPane(pane)}>\n ${pane.icon\n ? html`<img\n slot=\"left-icon\"\n src=${String(pane.icon)}\n alt=\"\"\n >`\n : nothing}\n New ${getPaneLabel(pane)}\n </solid-ui-menu-item>\n `)}\n <solid-ui-menu-item @solid-ui-select=${this.requestUpload}>\n <icon-lucide-upload slot=\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1,27 @@
|
|
|
1
|
+
import { PropertyValues } from 'lit';
|
|
2
|
+
import { DataBrowserContext, PaneDefinition } from 'pane-registry';
|
|
3
|
+
import { WebComponent } from 'solid-ui';
|
|
4
|
+
import { NamedNode } from 'rdflib';
|
|
5
|
+
export default class FolderPaneStorageHeader extends WebComponent {
|
|
6
|
+
static styles: any;
|
|
7
|
+
accessor subject: NamedNode | undefined;
|
|
8
|
+
accessor selectedResource: NamedNode | undefined;
|
|
9
|
+
accessor browserContext: DataBrowserContext | undefined;
|
|
10
|
+
accessor paneList: PaneDefinition[];
|
|
11
|
+
accessor view: 'grid' | 'list';
|
|
12
|
+
accessor searchQuery: string;
|
|
13
|
+
accessor canCreate: boolean;
|
|
14
|
+
accessor availablePanes: PaneDefinition[];
|
|
15
|
+
private availablePanesGeneration;
|
|
16
|
+
protected updated(changedProperties: PropertyValues<this>): void;
|
|
17
|
+
private get breadcrumbResources();
|
|
18
|
+
private getResourceLabel;
|
|
19
|
+
private selectHome;
|
|
20
|
+
private selectView;
|
|
21
|
+
private selectResource;
|
|
22
|
+
private requestUpload;
|
|
23
|
+
private updateSearch;
|
|
24
|
+
private createPane;
|
|
25
|
+
render(): import('lit-html').TemplateResult<1>;
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=FolderPaneStorageHeader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FolderPaneStorageHeader.d.ts","sourceRoot":"","sources":["../../../src/components/folder-pane-storage-header/FolderPaneStorageHeader.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,KAAK,CAAA;AACzC,OAAO,KAAK,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AACvE,OAAO,EAAwB,YAAY,EAAE,MAAM,UAAU,CAAA;AAC7D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AACvC,OAAO,4BAA4B,CAAA;AACnC,OAAO,0BAA0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