@singlebase/elements 0.6.0 → 0.7.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/dist/{authui-display-CKfGK5va.js → authui-display-BM_F3-5e.js} +473 -499
- package/dist/authui-display-BM_F3-5e.js.map +1 -0
- package/dist/{authui-display-aWNht0cW.cjs → authui-display-CMVHTNFz.cjs} +51 -51
- package/dist/authui-display-CMVHTNFz.cjs.map +1 -0
- package/dist/authui.cjs +1 -1
- package/dist/authui.js +2 -2
- package/dist/{chat-CEh6RygY.js → chat-BH_3e1jT.js} +793 -653
- package/dist/chat-BH_3e1jT.js.map +1 -0
- package/dist/{chat-C-gsskho.cjs → chat-ezUmd9II.cjs} +310 -287
- package/dist/chat-ezUmd9II.cjs.map +1 -0
- package/dist/chat-messages.d.ts +8 -1
- package/dist/chat.cjs +1 -1
- package/dist/chat.d.ts +1 -1
- package/dist/chat.js +1 -1
- package/dist/elements/authui.d.ts +0 -4
- package/dist/elements/chat.d.ts +46 -8
- package/dist/elements/uploader.d.ts +0 -6
- package/dist/files-4T62wkwj.cjs +77 -0
- package/dist/files-4T62wkwj.cjs.map +1 -0
- package/dist/{files-DDJWPzZW.js → files-DS-H-3yN.js} +56 -57
- package/dist/files-DS-H-3yN.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +4 -4
- package/dist/messages.d.ts +0 -2
- package/dist/singlebase-elements.min.js +2004 -1917
- package/dist/singlebase-elements.min.js.map +1 -1
- package/dist/upload-messages.d.ts +0 -1
- package/dist/{uploader-660JIgIN.cjs → uploader-COP8PkJ6.cjs} +7 -7
- package/dist/uploader-COP8PkJ6.cjs.map +1 -0
- package/dist/{uploader-vfczkX51.js → uploader-tdMU9Gxv.js} +235 -262
- package/dist/uploader-tdMU9Gxv.js.map +1 -0
- package/dist/uploader.cjs +1 -1
- package/dist/uploader.js +2 -2
- package/dist/utils/branding.d.ts +5 -5
- package/package.json +3 -3
- package/dist/authui-display-CKfGK5va.js.map +0 -1
- package/dist/authui-display-aWNht0cW.cjs.map +0 -1
- package/dist/chat-C-gsskho.cjs.map +0 -1
- package/dist/chat-CEh6RygY.js.map +0 -1
- package/dist/files-DDJWPzZW.js.map +0 -1
- package/dist/files-DyxcjZsx.cjs +0 -75
- package/dist/files-DyxcjZsx.cjs.map +0 -1
- package/dist/uploader-660JIgIN.cjs.map +0 -1
- package/dist/uploader-vfczkX51.js.map +0 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
var
|
|
1
|
+
var fe = (r) => {
|
|
2
2
|
throw TypeError(r);
|
|
3
3
|
};
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
import { css as
|
|
7
|
-
import { property as b, state as
|
|
8
|
-
import { getDefaultClient as
|
|
9
|
-
import { t as
|
|
10
|
-
const
|
|
4
|
+
var be = (r, e, t) => e.has(r) || fe("Cannot " + t);
|
|
5
|
+
var l = (r, e, t) => (be(r, e, "read from private field"), t ? t.call(r) : e.get(r)), d = (r, e, t) => e.has(r) ? fe("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(r) : e.set(r, t), c = (r, e, t, i) => (be(r, e, "write to private field"), i ? i.call(r, t) : e.set(r, t), t);
|
|
6
|
+
import { css as xe, LitElement as Ue, nothing as x, html as u } from "lit";
|
|
7
|
+
import { property as b, state as Q, customElement as Se } from "lit/decorators.js";
|
|
8
|
+
import { getDefaultClient as Me } from "@singlebase/core";
|
|
9
|
+
import { t as Ce, b as je, r as Fe, f as oe, a as v, c as Oe, p as ne, e as te, g as De, h as Ee, i as Le, j as Te, k as Ae } from "./files-DS-H-3yN.js";
|
|
10
|
+
const Ne = xe`
|
|
11
11
|
/* ── layout primitives ───────────────────────────────────── */
|
|
12
12
|
.stack {
|
|
13
13
|
display: flex;
|
|
@@ -984,7 +984,7 @@ const Re = ye`
|
|
|
984
984
|
font-style: italic;
|
|
985
985
|
}
|
|
986
986
|
`;
|
|
987
|
-
function
|
|
987
|
+
function Pe(r, e, t) {
|
|
988
988
|
if (!r || !e) return null;
|
|
989
989
|
let i;
|
|
990
990
|
try {
|
|
@@ -992,32 +992,32 @@ function Be(r, e, t) {
|
|
|
992
992
|
} catch {
|
|
993
993
|
return null;
|
|
994
994
|
}
|
|
995
|
-
let
|
|
995
|
+
let o;
|
|
996
996
|
try {
|
|
997
|
-
|
|
997
|
+
o = new URL(r, i.href);
|
|
998
998
|
} catch {
|
|
999
999
|
return t == null || t(`"${r}" is not a valid URL`), null;
|
|
1000
1000
|
}
|
|
1001
|
-
return
|
|
1001
|
+
return o.protocol !== "http:" && o.protocol !== "https:" ? (t == null || t(`refusing redirect to unsupported scheme "${o.protocol}"`), null) : o.origin !== i.origin ? (t == null || t(`refusing cross-origin redirect to ${o.origin}; same-origin only`), null) : o.href === i.href ? null : o.href;
|
|
1002
1002
|
}
|
|
1003
|
-
const
|
|
1004
|
-
async function
|
|
1003
|
+
const ve = { pages: null, encrypted: null }, ge = 16 * 1024 * 1024, Re = 2 * 1024 * 1024, Be = 40, Ge = 4 * 1024 * 1024, ye = /* @__PURE__ */ new Set(["docx", "pptx", "xlsx"]);
|
|
1004
|
+
async function Ie(r, e) {
|
|
1005
1005
|
try {
|
|
1006
|
-
if (e === "pdf") return await
|
|
1007
|
-
if (
|
|
1006
|
+
if (e === "pdf") return await Ke(r);
|
|
1007
|
+
if (ye.has(e)) return await Ve(r, e);
|
|
1008
1008
|
} catch {
|
|
1009
1009
|
}
|
|
1010
|
-
return
|
|
1010
|
+
return ve;
|
|
1011
1011
|
}
|
|
1012
|
-
function
|
|
1013
|
-
return r === "pdf" ||
|
|
1012
|
+
function _e(r) {
|
|
1013
|
+
return r === "pdf" || ye.has(r);
|
|
1014
1014
|
}
|
|
1015
|
-
async function
|
|
1016
|
-
const e = await
|
|
1017
|
-
let g =
|
|
1018
|
-
return g === null && (g = await
|
|
1015
|
+
async function Ke(r) {
|
|
1016
|
+
const e = await re(r.slice(0, ge)), t = r.size > ge ? await re(r.slice(Math.max(0, r.size - Re))) : null, i = ie(e) + (t ? ie(t) : ""), o = /\/Encrypt[\s/<>\]]/.test(i);
|
|
1017
|
+
let g = we(i);
|
|
1018
|
+
return g === null && (g = await qe(e)), { pages: g, encrypted: o };
|
|
1019
1019
|
}
|
|
1020
|
-
function
|
|
1020
|
+
function we(r) {
|
|
1021
1021
|
if (/\/Type\s*\/Pages/.test(r)) {
|
|
1022
1022
|
let t = 0;
|
|
1023
1023
|
for (const i of r.matchAll(/\/Count\s+(\d+)/g))
|
|
@@ -1027,80 +1027,80 @@ function ze(r) {
|
|
|
1027
1027
|
const e = r.match(/\/Type\s*\/Page[^s]/g);
|
|
1028
1028
|
return e != null && e.length ? e.length : null;
|
|
1029
1029
|
}
|
|
1030
|
-
async function
|
|
1030
|
+
async function qe(r) {
|
|
1031
1031
|
if (typeof DecompressionStream > "u") return null;
|
|
1032
|
-
const e =
|
|
1032
|
+
const e = ie(r);
|
|
1033
1033
|
let t = "", i = 0;
|
|
1034
|
-
for (const
|
|
1035
|
-
if (i >=
|
|
1036
|
-
const g =
|
|
1034
|
+
for (const o of e.matchAll(/stream\r?\n/g)) {
|
|
1035
|
+
if (i >= Be || t.length >= Ge) break;
|
|
1036
|
+
const g = o.index + o[0].length;
|
|
1037
1037
|
let s = e.indexOf("endstream", g);
|
|
1038
1038
|
if (s < 0) break;
|
|
1039
1039
|
for (; s > g && (e[s - 1] === `
|
|
1040
1040
|
` || e[s - 1] === "\r"); ) s -= 1;
|
|
1041
1041
|
i += 1;
|
|
1042
1042
|
try {
|
|
1043
|
-
const a = await
|
|
1044
|
-
t +=
|
|
1043
|
+
const a = await ke(r.subarray(g, s), "deflate");
|
|
1044
|
+
t += ie(a);
|
|
1045
1045
|
} catch {
|
|
1046
1046
|
}
|
|
1047
1047
|
}
|
|
1048
|
-
return t ?
|
|
1048
|
+
return t ? we(t) : null;
|
|
1049
1049
|
}
|
|
1050
|
-
async function
|
|
1051
|
-
const t = await
|
|
1052
|
-
if (
|
|
1053
|
-
if (t[0] !== 80 || t[1] !== 75) return
|
|
1054
|
-
const i = await
|
|
1050
|
+
async function Ve(r, e) {
|
|
1051
|
+
const t = await re(r.slice(0, 8));
|
|
1052
|
+
if (Ye(t)) return { pages: null, encrypted: !0 };
|
|
1053
|
+
if (t[0] !== 80 || t[1] !== 75) return ve;
|
|
1054
|
+
const i = await He(r, "docProps/app.xml");
|
|
1055
1055
|
if (!i) return { pages: null, encrypted: !1 };
|
|
1056
|
-
const
|
|
1056
|
+
const o = e === "pptx" ? "Slides" : "Pages", g = new TextDecoder().decode(i).match(new RegExp(`<${o}>(\\d+)</${o}>`));
|
|
1057
1057
|
return { pages: g ? Number(g[1]) : null, encrypted: !1 };
|
|
1058
1058
|
}
|
|
1059
|
-
function
|
|
1059
|
+
function Ye(r) {
|
|
1060
1060
|
return [208, 207, 17, 224, 161, 177, 26, 225].every((t, i) => r[i] === t);
|
|
1061
1061
|
}
|
|
1062
|
-
async function
|
|
1062
|
+
async function He(r, e) {
|
|
1063
1063
|
const t = Math.min(r.size, 66e3), i = new DataView(await r.slice(r.size - t).arrayBuffer());
|
|
1064
|
-
let
|
|
1064
|
+
let o = -1;
|
|
1065
1065
|
for (let h = i.byteLength - 22; h >= 0; h--)
|
|
1066
1066
|
if (i.getUint32(h, !0) === 101010256) {
|
|
1067
|
-
|
|
1067
|
+
o = h;
|
|
1068
1068
|
break;
|
|
1069
1069
|
}
|
|
1070
|
-
if (
|
|
1071
|
-
const g = i.getUint32(
|
|
1070
|
+
if (o < 0) return null;
|
|
1071
|
+
const g = i.getUint32(o + 12, !0), s = i.getUint32(o + 16, !0);
|
|
1072
1072
|
if (!g || s === 4294967295) return null;
|
|
1073
1073
|
const a = new DataView(await r.slice(s, s + g).arrayBuffer()), m = new TextDecoder();
|
|
1074
1074
|
let f = 0;
|
|
1075
1075
|
for (; f + 46 <= a.byteLength && a.getUint32(f, !0) === 33639248; ) {
|
|
1076
|
-
const h = a.getUint16(f + 10, !0),
|
|
1076
|
+
const h = a.getUint16(f + 10, !0), ee = a.getUint32(f + 20, !0), y = a.getUint16(f + 28, !0), ae = a.getUint16(f + 30, !0), $e = a.getUint16(f + 32, !0), se = a.getUint32(f + 42, !0);
|
|
1077
1077
|
if (m.decode(new Uint8Array(a.buffer, a.byteOffset + f + 46, y)) === e) {
|
|
1078
|
-
const
|
|
1079
|
-
return h === 0 ?
|
|
1078
|
+
const ce = new DataView(await r.slice(se, se + 30).arrayBuffer()), pe = se + 30 + ce.getUint16(26, !0) + ce.getUint16(28, !0), ue = await re(r.slice(pe, pe + ee));
|
|
1079
|
+
return h === 0 ? ue : h === 8 && typeof DecompressionStream < "u" ? await ke(ue, "deflate-raw") : null;
|
|
1080
1080
|
}
|
|
1081
|
-
f += 46 + y +
|
|
1081
|
+
f += 46 + y + ae + $e;
|
|
1082
1082
|
}
|
|
1083
1083
|
return null;
|
|
1084
1084
|
}
|
|
1085
|
-
async function
|
|
1085
|
+
async function re(r) {
|
|
1086
1086
|
return new Uint8Array(await r.arrayBuffer());
|
|
1087
1087
|
}
|
|
1088
|
-
async function
|
|
1088
|
+
async function ke(r, e) {
|
|
1089
1089
|
const t = new Blob([r]).stream().pipeThrough(new DecompressionStream(e));
|
|
1090
1090
|
return new Uint8Array(await new Response(t).arrayBuffer());
|
|
1091
1091
|
}
|
|
1092
|
-
function
|
|
1092
|
+
function ie(r) {
|
|
1093
1093
|
let e = "";
|
|
1094
1094
|
for (let i = 0; i < r.length; i += 32768)
|
|
1095
1095
|
e += String.fromCharCode(...r.subarray(i, i + 32768));
|
|
1096
1096
|
return e;
|
|
1097
1097
|
}
|
|
1098
|
-
var
|
|
1099
|
-
for (var
|
|
1100
|
-
(s = r[g]) && (
|
|
1101
|
-
return i &&
|
|
1102
|
-
},
|
|
1103
|
-
const
|
|
1098
|
+
var ze = Object.defineProperty, Je = Object.getOwnPropertyDescriptor, Xe = (r, e, t) => e in r ? ze(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, p = (r, e, t, i) => {
|
|
1099
|
+
for (var o = i > 1 ? void 0 : i ? Je(e, t) : e, g = r.length - 1, s; g >= 0; g--)
|
|
1100
|
+
(s = r[g]) && (o = (i ? s(e, t, o) : s(o)) || o);
|
|
1101
|
+
return i && o && ze(e, t, o), o;
|
|
1102
|
+
}, We = (r, e, t) => Xe(r, e + "", t);
|
|
1103
|
+
const le = {
|
|
1104
1104
|
fromAttribute: (r) => {
|
|
1105
1105
|
if (!r) return {};
|
|
1106
1106
|
try {
|
|
@@ -1111,17 +1111,15 @@ const ce = {
|
|
|
1111
1111
|
}
|
|
1112
1112
|
},
|
|
1113
1113
|
toAttribute: (r) => JSON.stringify(r ?? {})
|
|
1114
|
-
},
|
|
1114
|
+
}, de = {
|
|
1115
1115
|
fromAttribute: (r) => r === null ? !0 : r !== "false",
|
|
1116
1116
|
toAttribute: (r) => r ? null : "false"
|
|
1117
|
-
},
|
|
1117
|
+
}, he = [
|
|
1118
1118
|
"view",
|
|
1119
1119
|
"dropzone",
|
|
1120
1120
|
"allowRename",
|
|
1121
1121
|
"autoUpload",
|
|
1122
1122
|
"branding",
|
|
1123
|
-
"brandingText",
|
|
1124
|
-
"brandingUrl",
|
|
1125
1123
|
"logoUrl",
|
|
1126
1124
|
"logoText",
|
|
1127
1125
|
"heading",
|
|
@@ -1143,248 +1141,234 @@ const ce = {
|
|
|
1143
1141
|
"onComplete",
|
|
1144
1142
|
"onError"
|
|
1145
1143
|
];
|
|
1146
|
-
var k, z, $, U, S, M, C,
|
|
1147
|
-
let
|
|
1144
|
+
var k, z, $, U, S, M, C, j, F, O, D, E, L, T, A, N, P, R, B, G, I, _, K, q, V, Y, H, J, X, W, Z, me;
|
|
1145
|
+
let n = (me = class extends Ue {
|
|
1148
1146
|
constructor() {
|
|
1149
1147
|
super(...arguments);
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
l(this, Q, !1);
|
|
1182
|
-
l(this, ee, "");
|
|
1148
|
+
d(this, k, null);
|
|
1149
|
+
d(this, z, {});
|
|
1150
|
+
d(this, $);
|
|
1151
|
+
d(this, U);
|
|
1152
|
+
d(this, S);
|
|
1153
|
+
d(this, M, "full");
|
|
1154
|
+
d(this, C, !0);
|
|
1155
|
+
d(this, j, !0);
|
|
1156
|
+
d(this, F, !1);
|
|
1157
|
+
d(this, O, !0);
|
|
1158
|
+
d(this, D, "");
|
|
1159
|
+
d(this, E, "");
|
|
1160
|
+
d(this, L, "");
|
|
1161
|
+
d(this, T, "");
|
|
1162
|
+
d(this, A, 10);
|
|
1163
|
+
d(this, N, "25MB");
|
|
1164
|
+
d(this, P, 0);
|
|
1165
|
+
d(this, R, "");
|
|
1166
|
+
d(this, B, {});
|
|
1167
|
+
d(this, G, "default");
|
|
1168
|
+
d(this, I, {});
|
|
1169
|
+
d(this, _, {});
|
|
1170
|
+
d(this, K, !1);
|
|
1171
|
+
d(this, q, "");
|
|
1172
|
+
d(this, V, null);
|
|
1173
|
+
d(this, Y, null);
|
|
1174
|
+
d(this, H, []);
|
|
1175
|
+
d(this, J, "");
|
|
1176
|
+
d(this, X, !1);
|
|
1177
|
+
d(this, W, !1);
|
|
1178
|
+
d(this, Z, "");
|
|
1183
1179
|
}
|
|
1184
1180
|
get client() {
|
|
1185
|
-
return
|
|
1181
|
+
return l(this, k);
|
|
1186
1182
|
}
|
|
1187
1183
|
set client(e) {
|
|
1188
1184
|
c(this, k, e);
|
|
1189
1185
|
}
|
|
1190
1186
|
get messages() {
|
|
1191
|
-
return
|
|
1187
|
+
return l(this, z);
|
|
1192
1188
|
}
|
|
1193
1189
|
set messages(e) {
|
|
1194
1190
|
c(this, z, e);
|
|
1195
1191
|
}
|
|
1196
1192
|
get theme() {
|
|
1197
|
-
return
|
|
1193
|
+
return l(this, $);
|
|
1198
1194
|
}
|
|
1199
1195
|
set theme(e) {
|
|
1200
1196
|
c(this, $, e);
|
|
1201
1197
|
}
|
|
1202
1198
|
get density() {
|
|
1203
|
-
return
|
|
1199
|
+
return l(this, U);
|
|
1204
1200
|
}
|
|
1205
1201
|
set density(e) {
|
|
1206
1202
|
c(this, U, e);
|
|
1207
1203
|
}
|
|
1208
1204
|
get radius() {
|
|
1209
|
-
return
|
|
1205
|
+
return l(this, S);
|
|
1210
1206
|
}
|
|
1211
1207
|
set radius(e) {
|
|
1212
1208
|
c(this, S, e);
|
|
1213
1209
|
}
|
|
1214
1210
|
get view() {
|
|
1215
|
-
return
|
|
1211
|
+
return l(this, M);
|
|
1216
1212
|
}
|
|
1217
1213
|
set view(e) {
|
|
1218
1214
|
c(this, M, e);
|
|
1219
1215
|
}
|
|
1220
1216
|
get dropzone() {
|
|
1221
|
-
return
|
|
1217
|
+
return l(this, C);
|
|
1222
1218
|
}
|
|
1223
1219
|
set dropzone(e) {
|
|
1224
1220
|
c(this, C, e);
|
|
1225
1221
|
}
|
|
1226
1222
|
get allowRename() {
|
|
1227
|
-
return
|
|
1223
|
+
return l(this, j);
|
|
1228
1224
|
}
|
|
1229
1225
|
set allowRename(e) {
|
|
1230
|
-
c(this,
|
|
1226
|
+
c(this, j, e);
|
|
1231
1227
|
}
|
|
1232
1228
|
get autoUpload() {
|
|
1233
|
-
return
|
|
1229
|
+
return l(this, F);
|
|
1234
1230
|
}
|
|
1235
1231
|
set autoUpload(e) {
|
|
1236
|
-
c(this,
|
|
1232
|
+
c(this, F, e);
|
|
1237
1233
|
}
|
|
1238
1234
|
get branding() {
|
|
1239
|
-
return
|
|
1235
|
+
return l(this, O);
|
|
1240
1236
|
}
|
|
1241
1237
|
set branding(e) {
|
|
1242
|
-
c(this, F, e);
|
|
1243
|
-
}
|
|
1244
|
-
get brandingText() {
|
|
1245
|
-
return d(this, O);
|
|
1246
|
-
}
|
|
1247
|
-
set brandingText(e) {
|
|
1248
1238
|
c(this, O, e);
|
|
1249
1239
|
}
|
|
1250
|
-
get brandingUrl() {
|
|
1251
|
-
return d(this, D);
|
|
1252
|
-
}
|
|
1253
|
-
set brandingUrl(e) {
|
|
1254
|
-
c(this, D, e);
|
|
1255
|
-
}
|
|
1256
1240
|
get logoUrl() {
|
|
1257
|
-
return
|
|
1241
|
+
return l(this, D);
|
|
1258
1242
|
}
|
|
1259
1243
|
set logoUrl(e) {
|
|
1260
|
-
c(this,
|
|
1244
|
+
c(this, D, e);
|
|
1261
1245
|
}
|
|
1262
1246
|
get logoText() {
|
|
1263
|
-
return
|
|
1247
|
+
return l(this, E);
|
|
1264
1248
|
}
|
|
1265
1249
|
set logoText(e) {
|
|
1266
|
-
c(this,
|
|
1250
|
+
c(this, E, e);
|
|
1267
1251
|
}
|
|
1268
1252
|
get heading() {
|
|
1269
|
-
return
|
|
1253
|
+
return l(this, L);
|
|
1270
1254
|
}
|
|
1271
1255
|
set heading(e) {
|
|
1272
|
-
c(this,
|
|
1256
|
+
c(this, L, e);
|
|
1273
1257
|
}
|
|
1274
1258
|
get description() {
|
|
1275
|
-
return
|
|
1259
|
+
return l(this, T);
|
|
1276
1260
|
}
|
|
1277
1261
|
set description(e) {
|
|
1278
|
-
c(this,
|
|
1262
|
+
c(this, T, e);
|
|
1279
1263
|
}
|
|
1280
1264
|
get maxFiles() {
|
|
1281
|
-
return
|
|
1265
|
+
return l(this, A);
|
|
1282
1266
|
}
|
|
1283
1267
|
set maxFiles(e) {
|
|
1284
|
-
c(this,
|
|
1268
|
+
c(this, A, e);
|
|
1285
1269
|
}
|
|
1286
1270
|
get maxSize() {
|
|
1287
|
-
return
|
|
1271
|
+
return l(this, N);
|
|
1288
1272
|
}
|
|
1289
1273
|
set maxSize(e) {
|
|
1290
|
-
c(this,
|
|
1274
|
+
c(this, N, e);
|
|
1291
1275
|
}
|
|
1292
1276
|
get minSize() {
|
|
1293
|
-
return
|
|
1277
|
+
return l(this, P);
|
|
1294
1278
|
}
|
|
1295
1279
|
set minSize(e) {
|
|
1296
|
-
c(this,
|
|
1280
|
+
c(this, P, e);
|
|
1297
1281
|
}
|
|
1298
1282
|
get accept() {
|
|
1299
|
-
return
|
|
1283
|
+
return l(this, R);
|
|
1300
1284
|
}
|
|
1301
1285
|
set accept(e) {
|
|
1302
|
-
c(this,
|
|
1286
|
+
c(this, R, e);
|
|
1303
1287
|
}
|
|
1304
1288
|
get rules() {
|
|
1305
|
-
return
|
|
1289
|
+
return l(this, B);
|
|
1306
1290
|
}
|
|
1307
1291
|
set rules(e) {
|
|
1308
|
-
c(this,
|
|
1292
|
+
c(this, B, e);
|
|
1309
1293
|
}
|
|
1310
1294
|
get bucket() {
|
|
1311
|
-
return
|
|
1295
|
+
return l(this, G);
|
|
1312
1296
|
}
|
|
1313
1297
|
set bucket(e) {
|
|
1314
|
-
c(this,
|
|
1298
|
+
c(this, G, e);
|
|
1315
1299
|
}
|
|
1316
1300
|
get metadata() {
|
|
1317
|
-
return
|
|
1301
|
+
return l(this, I);
|
|
1318
1302
|
}
|
|
1319
1303
|
set metadata(e) {
|
|
1320
|
-
c(this,
|
|
1304
|
+
c(this, I, e);
|
|
1321
1305
|
}
|
|
1322
1306
|
get options() {
|
|
1323
|
-
return
|
|
1307
|
+
return l(this, _);
|
|
1324
1308
|
}
|
|
1325
1309
|
set options(e) {
|
|
1326
|
-
c(this,
|
|
1310
|
+
c(this, _, e);
|
|
1327
1311
|
}
|
|
1328
1312
|
get publicRead() {
|
|
1329
|
-
return
|
|
1313
|
+
return l(this, K);
|
|
1330
1314
|
}
|
|
1331
1315
|
set publicRead(e) {
|
|
1332
|
-
c(this,
|
|
1316
|
+
c(this, K, e);
|
|
1333
1317
|
}
|
|
1334
1318
|
get redirectUrl() {
|
|
1335
|
-
return
|
|
1319
|
+
return l(this, q);
|
|
1336
1320
|
}
|
|
1337
1321
|
set redirectUrl(e) {
|
|
1338
|
-
c(this,
|
|
1322
|
+
c(this, q, e);
|
|
1339
1323
|
}
|
|
1340
1324
|
get onComplete() {
|
|
1341
|
-
return
|
|
1325
|
+
return l(this, V);
|
|
1342
1326
|
}
|
|
1343
1327
|
set onComplete(e) {
|
|
1344
|
-
c(this,
|
|
1328
|
+
c(this, V, e);
|
|
1345
1329
|
}
|
|
1346
1330
|
get onError() {
|
|
1347
|
-
return
|
|
1331
|
+
return l(this, Y);
|
|
1348
1332
|
}
|
|
1349
1333
|
set onError(e) {
|
|
1350
|
-
c(this,
|
|
1334
|
+
c(this, Y, e);
|
|
1351
1335
|
}
|
|
1352
1336
|
get items() {
|
|
1353
|
-
return
|
|
1337
|
+
return l(this, H);
|
|
1354
1338
|
}
|
|
1355
1339
|
set items(e) {
|
|
1356
|
-
c(this,
|
|
1340
|
+
c(this, H, e);
|
|
1357
1341
|
}
|
|
1358
1342
|
get notice() {
|
|
1359
|
-
return
|
|
1343
|
+
return l(this, J);
|
|
1360
1344
|
}
|
|
1361
1345
|
set notice(e) {
|
|
1362
|
-
c(this,
|
|
1346
|
+
c(this, J, e);
|
|
1363
1347
|
}
|
|
1364
1348
|
get busy() {
|
|
1365
|
-
return
|
|
1349
|
+
return l(this, X);
|
|
1366
1350
|
}
|
|
1367
1351
|
set busy(e) {
|
|
1368
|
-
c(this,
|
|
1352
|
+
c(this, X, e);
|
|
1369
1353
|
}
|
|
1370
1354
|
get dragging() {
|
|
1371
|
-
return
|
|
1355
|
+
return l(this, W);
|
|
1372
1356
|
}
|
|
1373
1357
|
set dragging(e) {
|
|
1374
|
-
c(this,
|
|
1358
|
+
c(this, W, e);
|
|
1375
1359
|
}
|
|
1376
1360
|
get editing() {
|
|
1377
|
-
return
|
|
1361
|
+
return l(this, Z);
|
|
1378
1362
|
}
|
|
1379
1363
|
set editing(e) {
|
|
1380
|
-
c(this,
|
|
1364
|
+
c(this, Z, e);
|
|
1381
1365
|
}
|
|
1382
1366
|
get msg() {
|
|
1383
|
-
return
|
|
1367
|
+
return Fe(this.messages);
|
|
1384
1368
|
}
|
|
1385
1369
|
/** An explicit `.client`, else the page default. */
|
|
1386
1370
|
get resolvedClient() {
|
|
1387
|
-
return this.client ??
|
|
1371
|
+
return this.client ?? Me() ?? null;
|
|
1388
1372
|
}
|
|
1389
1373
|
/** The staging list, for host code that wants to inspect or persist it. */
|
|
1390
1374
|
get files() {
|
|
@@ -1410,7 +1394,7 @@ let o = (ve = class extends Me {
|
|
|
1410
1394
|
*/
|
|
1411
1395
|
set config(e) {
|
|
1412
1396
|
const t = this;
|
|
1413
|
-
for (const i of
|
|
1397
|
+
for (const i of he)
|
|
1414
1398
|
e && i in e && (t[i] = e[i]);
|
|
1415
1399
|
}
|
|
1416
1400
|
/**
|
|
@@ -1422,7 +1406,7 @@ let o = (ve = class extends Me {
|
|
|
1422
1406
|
}
|
|
1423
1407
|
get config() {
|
|
1424
1408
|
const e = this;
|
|
1425
|
-
return Object.fromEntries(
|
|
1409
|
+
return Object.fromEntries(he.map((t) => [t, e[t]]));
|
|
1426
1410
|
}
|
|
1427
1411
|
/** Drops every staged file and any notice. */
|
|
1428
1412
|
clear() {
|
|
@@ -1446,12 +1430,12 @@ let o = (ve = class extends Me {
|
|
|
1446
1430
|
for (const s of e)
|
|
1447
1431
|
s.status = "uploading", s.percent = 0, s.error = "";
|
|
1448
1432
|
this.items = [...this.items];
|
|
1449
|
-
const i = /* @__PURE__ */ new Map(),
|
|
1433
|
+
const i = /* @__PURE__ */ new Map(), o = e.map((s) => {
|
|
1450
1434
|
const a = { file: s.file, filename: s.file.name };
|
|
1451
1435
|
return this.bucket && (a.bucket = this.bucket), this.publicRead && (a.publicRead = !0), s.name !== s.file.name && (a.newName = s.name), Object.keys(this.metadata ?? {}).length && (a.metadata = { ...this.metadata }), Object.keys(this.options ?? {}).length && (a.options = { ...this.options }), i.set(a, s), a;
|
|
1452
1436
|
});
|
|
1453
1437
|
try {
|
|
1454
|
-
const s = await t.files.upload(
|
|
1438
|
+
const s = await t.files.upload(o, {
|
|
1455
1439
|
onProgress: (f) => {
|
|
1456
1440
|
const h = i.get(f.input);
|
|
1457
1441
|
h && (h.percent = f.percent, this.items = [...this.items], this.emit("singlebase-upload-progress", { file: h, percent: this.percent }));
|
|
@@ -1471,7 +1455,7 @@ let o = (ve = class extends Me {
|
|
|
1471
1455
|
} catch (s) {
|
|
1472
1456
|
for (const a of e)
|
|
1473
1457
|
a.status = "error", a.error = "";
|
|
1474
|
-
this.items = [...this.items], this.fail(
|
|
1458
|
+
this.items = [...this.items], this.fail(Qe(s) || this.msg.errUpload);
|
|
1475
1459
|
} finally {
|
|
1476
1460
|
this.busy = !1;
|
|
1477
1461
|
}
|
|
@@ -1479,10 +1463,10 @@ let o = (ve = class extends Me {
|
|
|
1479
1463
|
// ── staging ───────────────────────────────────────────────
|
|
1480
1464
|
/** The rule for this filename's extension, if the host set one. */
|
|
1481
1465
|
ruleFor(e) {
|
|
1482
|
-
const t =
|
|
1466
|
+
const t = oe(e);
|
|
1483
1467
|
if (!t) return null;
|
|
1484
|
-
for (const [i,
|
|
1485
|
-
if (i.toLowerCase().replace(/^\./, "") === t) return
|
|
1468
|
+
for (const [i, o] of Object.entries(this.rules ?? {}))
|
|
1469
|
+
if (i.toLowerCase().replace(/^\./, "") === t) return o;
|
|
1486
1470
|
return null;
|
|
1487
1471
|
}
|
|
1488
1472
|
async add(e) {
|
|
@@ -1490,33 +1474,33 @@ let o = (ve = class extends Me {
|
|
|
1490
1474
|
const a = this.items.filter((m) => m.status === "done" || m.status === "error");
|
|
1491
1475
|
a.forEach(w), this.items = this.items.filter((m) => !a.includes(m));
|
|
1492
1476
|
}
|
|
1493
|
-
const t = this.maxFiles > 0 ? this.maxFiles : Number.POSITIVE_INFINITY, i = [...this.items],
|
|
1477
|
+
const t = this.maxFiles > 0 ? this.maxFiles : Number.POSITIVE_INFINITY, i = [...this.items], o = i.length, g = [];
|
|
1494
1478
|
let s = "";
|
|
1495
1479
|
for (const a of Array.from(e)) {
|
|
1496
1480
|
if (i.length >= t) {
|
|
1497
1481
|
s = v(this.msg.errTooMany, { max: t });
|
|
1498
1482
|
break;
|
|
1499
1483
|
}
|
|
1500
|
-
if (this.accept && !
|
|
1484
|
+
if (this.accept && !Oe(this.accept, a.name, a.type)) {
|
|
1501
1485
|
s = v(this.msg.errType, { name: a.name });
|
|
1502
1486
|
continue;
|
|
1503
1487
|
}
|
|
1504
|
-
const m = this.ruleFor(a.name), f =
|
|
1488
|
+
const m = this.ruleFor(a.name), f = ne((m == null ? void 0 : m.maxSize) ?? this.maxSize), h = ne((m == null ? void 0 : m.minSize) ?? this.minSize);
|
|
1505
1489
|
if (f && a.size > f) {
|
|
1506
|
-
s = v(this.msg.errTooLarge, { name: a.name, size:
|
|
1490
|
+
s = v(this.msg.errTooLarge, { name: a.name, size: te(f) });
|
|
1507
1491
|
continue;
|
|
1508
1492
|
}
|
|
1509
1493
|
if (h && a.size < h) {
|
|
1510
|
-
s = v(this.msg.errTooSmall, { name: a.name, size:
|
|
1494
|
+
s = v(this.msg.errTooSmall, { name: a.name, size: te(h) });
|
|
1511
1495
|
continue;
|
|
1512
1496
|
}
|
|
1513
|
-
const
|
|
1514
|
-
if (i.some((
|
|
1497
|
+
const ee = De(a);
|
|
1498
|
+
if (i.some((ae) => ae.key === ee)) {
|
|
1515
1499
|
s = v(this.msg.errDuplicate, { name: a.name });
|
|
1516
1500
|
continue;
|
|
1517
1501
|
}
|
|
1518
1502
|
const y = {
|
|
1519
|
-
key:
|
|
1503
|
+
key: ee,
|
|
1520
1504
|
file: a,
|
|
1521
1505
|
name: a.name,
|
|
1522
1506
|
// Reading bytes takes a moment, so the row appears immediately as
|
|
@@ -1527,16 +1511,16 @@ let o = (ve = class extends Me {
|
|
|
1527
1511
|
record: null,
|
|
1528
1512
|
pages: null,
|
|
1529
1513
|
encrypted: null,
|
|
1530
|
-
preview:
|
|
1514
|
+
preview: Ze(a)
|
|
1531
1515
|
};
|
|
1532
1516
|
i.push(y), g.push(y);
|
|
1533
1517
|
}
|
|
1534
|
-
this.notice = s, s && this.emit("singlebase-upload-rejected", { message: s }), i.length !==
|
|
1518
|
+
this.notice = s, s && this.emit("singlebase-upload-rejected", { message: s }), i.length !== o && (this.items = i, this.emit("singlebase-upload-selected", { files: this.items }), await Promise.all(
|
|
1535
1519
|
g.filter((a) => a.status === "checking").map((a) => this.inspect(a, this.ruleFor(a.file.name)))
|
|
1536
1520
|
), (this.autoUpload || this.view === "button") && this.upload());
|
|
1537
1521
|
}
|
|
1538
1522
|
needsInspection(e, t) {
|
|
1539
|
-
return !e || !
|
|
1523
|
+
return !e || !_e(oe(t)) ? !1 : e.maxPages !== void 0 || e.allowProtected === !1;
|
|
1540
1524
|
}
|
|
1541
1525
|
/**
|
|
1542
1526
|
* Reads the file and applies the rule. A fact the reader could not
|
|
@@ -1544,21 +1528,21 @@ let o = (ve = class extends Me {
|
|
|
1544
1528
|
* the page rule simply doesn't apply to that file.
|
|
1545
1529
|
*/
|
|
1546
1530
|
async inspect(e, t) {
|
|
1547
|
-
const i = await
|
|
1531
|
+
const i = await Ie(e.file, oe(e.file.name));
|
|
1548
1532
|
e.pages = i.pages, e.encrypted = i.encrypted;
|
|
1549
|
-
let
|
|
1550
|
-
t.allowProtected === !1 && i.encrypted === !0 ?
|
|
1533
|
+
let o = "";
|
|
1534
|
+
t.allowProtected === !1 && i.encrypted === !0 ? o = v(this.msg.errProtected, { name: e.name }) : t.maxPages && i.pages !== null && i.pages > t.maxPages && (o = v(this.msg.errTooManyPages, {
|
|
1551
1535
|
name: e.name,
|
|
1552
1536
|
pages: i.pages,
|
|
1553
1537
|
max: t.maxPages
|
|
1554
|
-
})),
|
|
1538
|
+
})), o ? (w(e), this.items = this.items.filter((g) => g !== e), this.notice = o, this.emit("singlebase-upload-rejected", { message: o })) : (e.status = "ready", this.items = [...this.items]);
|
|
1555
1539
|
}
|
|
1556
1540
|
/** Drops one staged file. Named for the row action, not Element.remove(). */
|
|
1557
1541
|
removeItem(e) {
|
|
1558
1542
|
this.items.filter((t) => t.key === e).forEach(w), this.items = this.items.filter((t) => t.key !== e), this.notice = "";
|
|
1559
1543
|
}
|
|
1560
1544
|
commitRename(e, t) {
|
|
1561
|
-
e.name =
|
|
1545
|
+
e.name = Ee(e.file.name, t), this.editing = "", this.items = [...this.items];
|
|
1562
1546
|
}
|
|
1563
1547
|
fail(e) {
|
|
1564
1548
|
var t;
|
|
@@ -1569,7 +1553,7 @@ let o = (ve = class extends Me {
|
|
|
1569
1553
|
}
|
|
1570
1554
|
redirect() {
|
|
1571
1555
|
if (!this.redirectUrl || typeof location > "u") return;
|
|
1572
|
-
const e =
|
|
1556
|
+
const e = Pe(
|
|
1573
1557
|
this.redirectUrl,
|
|
1574
1558
|
location.href,
|
|
1575
1559
|
(t) => console.warn(`[singlebase-uploader] ${t}`)
|
|
@@ -1606,7 +1590,7 @@ let o = (ve = class extends Me {
|
|
|
1606
1590
|
return this.items.filter((e) => e.status === "ready" || e.status === "error").length;
|
|
1607
1591
|
}
|
|
1608
1592
|
get hint() {
|
|
1609
|
-
const e =
|
|
1593
|
+
const e = Le(this.accept), t = ne(this.maxSize), i = t ? v(this.msg.hintUpTo, { size: te(t) }) : "";
|
|
1610
1594
|
return [e, i].filter(Boolean).join(" · ");
|
|
1611
1595
|
}
|
|
1612
1596
|
renderInput() {
|
|
@@ -1627,12 +1611,7 @@ let o = (ve = class extends Me {
|
|
|
1627
1611
|
/>` : this.logoText ? u`<div class="brand-mark" part="logo">${this.logoText}</div>` : x;
|
|
1628
1612
|
}
|
|
1629
1613
|
renderBranding() {
|
|
1630
|
-
return
|
|
1631
|
-
this.branding,
|
|
1632
|
-
this.brandingText,
|
|
1633
|
-
this.msg.brandingLabel,
|
|
1634
|
-
this.brandingUrl
|
|
1635
|
-
);
|
|
1614
|
+
return Te(this.branding, "Files");
|
|
1636
1615
|
}
|
|
1637
1616
|
renderNotice() {
|
|
1638
1617
|
return this.notice ? u`<div class="banner" role="alert" part="error">${this.notice}</div>` : x;
|
|
@@ -1645,7 +1624,7 @@ let o = (ve = class extends Me {
|
|
|
1645
1624
|
</div>`;
|
|
1646
1625
|
}
|
|
1647
1626
|
renderStatus(e) {
|
|
1648
|
-
const t =
|
|
1627
|
+
const t = te(e.file.size);
|
|
1649
1628
|
if (e.status === "checking") return `${t} · ${this.msg.checking}`;
|
|
1650
1629
|
if (e.status === "uploading") return `${t} · ${this.msg.uploading}`;
|
|
1651
1630
|
if (e.status === "done") return `${t} · ${this.msg.uploaded}`;
|
|
@@ -1658,7 +1637,7 @@ let o = (ve = class extends Me {
|
|
|
1658
1637
|
const t = this.allowRename && e.status === "ready";
|
|
1659
1638
|
return e.status === "uploading" || e.status, u`<div class="row" part="file">
|
|
1660
1639
|
<div class="chip" part="file-type">
|
|
1661
|
-
${e.preview ? u`<img class="thumb" src=${e.preview} alt="" part="preview" />` :
|
|
1640
|
+
${e.preview ? u`<img class="thumb" src=${e.preview} alt="" part="preview" />` : Ae(e.name) || "FILE"}
|
|
1662
1641
|
</div>
|
|
1663
1642
|
<div class="meta">
|
|
1664
1643
|
${this.editing === e.key ? u`<input
|
|
@@ -1780,12 +1759,12 @@ let o = (ve = class extends Me {
|
|
|
1780
1759
|
render() {
|
|
1781
1760
|
return u`${this.renderInput()}${this.view === "button" ? this.renderButton() : this.view === "compact" ? this.renderCompact() : this.renderFull()}`;
|
|
1782
1761
|
}
|
|
1783
|
-
}, k = new WeakMap(), z = new WeakMap(), $ = new WeakMap(), U = new WeakMap(), S = new WeakMap(), M = new WeakMap(), C = new WeakMap(),
|
|
1784
|
-
|
|
1762
|
+
}, k = new WeakMap(), z = new WeakMap(), $ = new WeakMap(), U = new WeakMap(), S = new WeakMap(), M = new WeakMap(), C = new WeakMap(), j = new WeakMap(), F = new WeakMap(), O = new WeakMap(), D = new WeakMap(), E = new WeakMap(), L = new WeakMap(), T = new WeakMap(), A = new WeakMap(), N = new WeakMap(), P = new WeakMap(), R = new WeakMap(), B = new WeakMap(), G = new WeakMap(), I = new WeakMap(), _ = new WeakMap(), K = new WeakMap(), q = new WeakMap(), V = new WeakMap(), Y = new WeakMap(), H = new WeakMap(), J = new WeakMap(), X = new WeakMap(), W = new WeakMap(), Z = new WeakMap(), me);
|
|
1763
|
+
We(n, "styles", [
|
|
1764
|
+
Ce,
|
|
1765
|
+
Ne,
|
|
1785
1766
|
je,
|
|
1786
|
-
|
|
1787
|
-
Fe,
|
|
1788
|
-
ye`
|
|
1767
|
+
xe`
|
|
1789
1768
|
.card {
|
|
1790
1769
|
display: flex;
|
|
1791
1770
|
flex-direction: column;
|
|
@@ -2040,120 +2019,114 @@ Qe(o, "styles", [
|
|
|
2040
2019
|
]);
|
|
2041
2020
|
p([
|
|
2042
2021
|
b({ attribute: !1 })
|
|
2043
|
-
],
|
|
2022
|
+
], n.prototype, "client", 1);
|
|
2044
2023
|
p([
|
|
2045
2024
|
b({ attribute: !1 })
|
|
2046
|
-
],
|
|
2025
|
+
], n.prototype, "messages", 1);
|
|
2047
2026
|
p([
|
|
2048
2027
|
b({ reflect: !0 })
|
|
2049
|
-
],
|
|
2028
|
+
], n.prototype, "theme", 1);
|
|
2050
2029
|
p([
|
|
2051
2030
|
b({ reflect: !0 })
|
|
2052
|
-
],
|
|
2031
|
+
], n.prototype, "density", 1);
|
|
2053
2032
|
p([
|
|
2054
2033
|
b({ reflect: !0 })
|
|
2055
|
-
],
|
|
2034
|
+
], n.prototype, "radius", 1);
|
|
2056
2035
|
p([
|
|
2057
2036
|
b({ reflect: !0 })
|
|
2058
|
-
],
|
|
2037
|
+
], n.prototype, "view", 1);
|
|
2059
2038
|
p([
|
|
2060
|
-
b({ converter:
|
|
2061
|
-
],
|
|
2039
|
+
b({ converter: de })
|
|
2040
|
+
], n.prototype, "dropzone", 1);
|
|
2062
2041
|
p([
|
|
2063
|
-
b({ converter:
|
|
2064
|
-
],
|
|
2042
|
+
b({ converter: de, attribute: "allow-rename" })
|
|
2043
|
+
], n.prototype, "allowRename", 1);
|
|
2065
2044
|
p([
|
|
2066
2045
|
b({ type: Boolean, attribute: "auto-upload" })
|
|
2067
|
-
],
|
|
2068
|
-
p([
|
|
2069
|
-
b({ converter: pe })
|
|
2070
|
-
], o.prototype, "branding", 1);
|
|
2071
|
-
p([
|
|
2072
|
-
b({ attribute: "branding-text" })
|
|
2073
|
-
], o.prototype, "brandingText", 1);
|
|
2046
|
+
], n.prototype, "autoUpload", 1);
|
|
2074
2047
|
p([
|
|
2075
|
-
b({
|
|
2076
|
-
],
|
|
2048
|
+
b({ converter: de })
|
|
2049
|
+
], n.prototype, "branding", 1);
|
|
2077
2050
|
p([
|
|
2078
2051
|
b({ attribute: "logo-url" })
|
|
2079
|
-
],
|
|
2052
|
+
], n.prototype, "logoUrl", 1);
|
|
2080
2053
|
p([
|
|
2081
2054
|
b({ attribute: "logo-text" })
|
|
2082
|
-
],
|
|
2055
|
+
], n.prototype, "logoText", 1);
|
|
2083
2056
|
p([
|
|
2084
2057
|
b()
|
|
2085
|
-
],
|
|
2058
|
+
], n.prototype, "heading", 1);
|
|
2086
2059
|
p([
|
|
2087
2060
|
b()
|
|
2088
|
-
],
|
|
2061
|
+
], n.prototype, "description", 1);
|
|
2089
2062
|
p([
|
|
2090
2063
|
b({ type: Number, attribute: "max-files" })
|
|
2091
|
-
],
|
|
2064
|
+
], n.prototype, "maxFiles", 1);
|
|
2092
2065
|
p([
|
|
2093
2066
|
b({ attribute: "max-size" })
|
|
2094
|
-
],
|
|
2067
|
+
], n.prototype, "maxSize", 1);
|
|
2095
2068
|
p([
|
|
2096
2069
|
b({ attribute: "min-size" })
|
|
2097
|
-
],
|
|
2070
|
+
], n.prototype, "minSize", 1);
|
|
2098
2071
|
p([
|
|
2099
2072
|
b()
|
|
2100
|
-
],
|
|
2073
|
+
], n.prototype, "accept", 1);
|
|
2101
2074
|
p([
|
|
2102
|
-
b({ converter:
|
|
2103
|
-
],
|
|
2075
|
+
b({ converter: le })
|
|
2076
|
+
], n.prototype, "rules", 1);
|
|
2104
2077
|
p([
|
|
2105
2078
|
b()
|
|
2106
|
-
],
|
|
2079
|
+
], n.prototype, "bucket", 1);
|
|
2107
2080
|
p([
|
|
2108
|
-
b({ converter:
|
|
2109
|
-
],
|
|
2081
|
+
b({ converter: le })
|
|
2082
|
+
], n.prototype, "metadata", 1);
|
|
2110
2083
|
p([
|
|
2111
|
-
b({ converter:
|
|
2112
|
-
],
|
|
2084
|
+
b({ converter: le })
|
|
2085
|
+
], n.prototype, "options", 1);
|
|
2113
2086
|
p([
|
|
2114
2087
|
b({ type: Boolean, attribute: "public-read" })
|
|
2115
|
-
],
|
|
2088
|
+
], n.prototype, "publicRead", 1);
|
|
2116
2089
|
p([
|
|
2117
2090
|
b({ attribute: "redirect-url" })
|
|
2118
|
-
],
|
|
2091
|
+
], n.prototype, "redirectUrl", 1);
|
|
2119
2092
|
p([
|
|
2120
2093
|
b({ attribute: !1 })
|
|
2121
|
-
],
|
|
2094
|
+
], n.prototype, "onComplete", 1);
|
|
2122
2095
|
p([
|
|
2123
2096
|
b({ attribute: !1 })
|
|
2124
|
-
],
|
|
2097
|
+
], n.prototype, "onError", 1);
|
|
2125
2098
|
p([
|
|
2126
|
-
|
|
2127
|
-
],
|
|
2099
|
+
Q()
|
|
2100
|
+
], n.prototype, "items", 1);
|
|
2128
2101
|
p([
|
|
2129
|
-
|
|
2130
|
-
],
|
|
2102
|
+
Q()
|
|
2103
|
+
], n.prototype, "notice", 1);
|
|
2131
2104
|
p([
|
|
2132
|
-
|
|
2133
|
-
],
|
|
2105
|
+
Q()
|
|
2106
|
+
], n.prototype, "busy", 1);
|
|
2134
2107
|
p([
|
|
2135
|
-
|
|
2136
|
-
],
|
|
2108
|
+
Q()
|
|
2109
|
+
], n.prototype, "dragging", 1);
|
|
2137
2110
|
p([
|
|
2138
|
-
|
|
2139
|
-
],
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
],
|
|
2143
|
-
function
|
|
2111
|
+
Q()
|
|
2112
|
+
], n.prototype, "editing", 1);
|
|
2113
|
+
n = p([
|
|
2114
|
+
Se("singlebase-uploader")
|
|
2115
|
+
], n);
|
|
2116
|
+
function Ze(r) {
|
|
2144
2117
|
return !r.type.startsWith("image/") || typeof URL.createObjectURL != "function" ? "" : URL.createObjectURL(r);
|
|
2145
2118
|
}
|
|
2146
2119
|
function w(r) {
|
|
2147
2120
|
r.preview && URL.revokeObjectURL(r.preview);
|
|
2148
2121
|
}
|
|
2149
|
-
function
|
|
2122
|
+
function Qe(r) {
|
|
2150
2123
|
return r instanceof Error ? r.message : "";
|
|
2151
2124
|
}
|
|
2152
2125
|
export {
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2126
|
+
n as S,
|
|
2127
|
+
_e as a,
|
|
2128
|
+
Ie as i,
|
|
2129
|
+
Pe as r,
|
|
2130
|
+
Ne as s
|
|
2158
2131
|
};
|
|
2159
|
-
//# sourceMappingURL=uploader-
|
|
2132
|
+
//# sourceMappingURL=uploader-tdMU9Gxv.js.map
|