@ponceca/firestore-sdk 0.1.1 → 1.0.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/app.d.mts +1 -1
- package/dist/app.d.ts +1 -1
- package/dist/app.js +3 -3
- package/dist/app.js.map +1 -1
- package/dist/app.mjs +1 -1
- package/dist/auth/index.d.mts +17 -10
- package/dist/auth/index.d.ts +17 -10
- package/dist/auth/index.js +13 -5
- package/dist/auth/index.js.map +1 -1
- package/dist/auth/index.mjs +12 -4
- package/dist/chunk-4CV4JOE5.js.map +1 -1
- package/dist/chunk-5ETO65FT.mjs +324 -0
- package/dist/chunk-5ETO65FT.mjs.map +1 -0
- package/dist/{chunk-R7K4CI3S.mjs → chunk-6XAVSRLT.mjs} +4 -4
- package/dist/{chunk-KZWSIKQZ.mjs → chunk-BV43NSDW.mjs} +9 -2
- package/dist/chunk-BV43NSDW.mjs.map +1 -0
- package/dist/chunk-BXV7KTHB.js.map +1 -1
- package/dist/{chunk-YMFAPE5C.js → chunk-DBP3RTRA.js} +6 -6
- package/dist/chunk-DBP3RTRA.js.map +1 -0
- package/dist/chunk-HCH4ADFN.js +324 -0
- package/dist/chunk-HCH4ADFN.js.map +1 -0
- package/dist/{chunk-BZZ7QVIL.js → chunk-JXJTWQJ4.js} +9 -2
- package/dist/chunk-JXJTWQJ4.js.map +1 -0
- package/dist/{chunk-6J3LNKUQ.js → chunk-KNNYFWIP.js} +7 -3
- package/dist/chunk-KNNYFWIP.js.map +1 -0
- package/dist/{chunk-C6SKWUQV.mjs → chunk-SZNBHCPW.mjs} +5 -1
- package/dist/chunk-SZNBHCPW.mjs.map +1 -0
- package/dist/{chunk-6UU4YPC7.mjs → chunk-VMO4IG3Q.mjs} +3 -3
- package/dist/{chunk-UAJM24MR.js → chunk-ZNDLJ5PH.js} +23 -23
- package/dist/chunk-ZNDLJ5PH.js.map +1 -0
- package/dist/firestore/index.d.mts +2 -2
- package/dist/firestore/index.d.ts +2 -2
- package/dist/firestore/index.js +5 -5
- package/dist/firestore/index.js.map +1 -1
- package/dist/firestore/index.mjs +4 -4
- package/dist/http-F3DW64CJ.js +10 -0
- package/dist/http-F3DW64CJ.js.map +1 -0
- package/dist/{http-SZFONH6Z.mjs → http-IM4ZHBF6.mjs} +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +15 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +13 -5
- package/dist/index.mjs.map +1 -1
- package/dist/indexeddb-mutation-queue-5EB7C2D5.js.map +1 -1
- package/dist/indexeddb-store-DNWBZUQE.js.map +1 -1
- package/dist/snapshot-MCQVLVHL.js.map +1 -1
- package/dist/storage/index.d.mts +138 -0
- package/dist/storage/index.d.ts +138 -0
- package/dist/storage/index.js +557 -0
- package/dist/storage/index.js.map +1 -0
- package/dist/storage/index.mjs +557 -0
- package/dist/storage/index.mjs.map +1 -0
- package/dist/{types-meoR-Ecp.d.ts → types-CxCKB06U.d.mts} +6 -4
- package/dist/{types-meoR-Ecp.d.mts → types-CxCKB06U.d.ts} +6 -4
- package/package.json +17 -4
- package/dist/chunk-6J3LNKUQ.js.map +0 -1
- package/dist/chunk-BZZ7QVIL.js.map +0 -1
- package/dist/chunk-C6SKWUQV.mjs.map +0 -1
- package/dist/chunk-JSUWIG2E.js +0 -128
- package/dist/chunk-JSUWIG2E.js.map +0 -1
- package/dist/chunk-KZWSIKQZ.mjs.map +0 -1
- package/dist/chunk-PZLJFCKL.mjs +0 -128
- package/dist/chunk-PZLJFCKL.mjs.map +0 -1
- package/dist/chunk-UAJM24MR.js.map +0 -1
- package/dist/chunk-YMFAPE5C.js.map +0 -1
- package/dist/http-A2S5CWEV.js +0 -10
- package/dist/http-A2S5CWEV.js.map +0 -1
- /package/dist/{chunk-R7K4CI3S.mjs.map → chunk-6XAVSRLT.mjs.map} +0 -0
- /package/dist/{chunk-6UU4YPC7.mjs.map → chunk-VMO4IG3Q.mjs.map} +0 -0
- /package/dist/{http-SZFONH6Z.mjs.map → http-IM4ZHBF6.mjs.map} +0 -0
|
@@ -0,0 +1,557 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }require('../chunk-4CV4JOE5.js');
|
|
2
|
+
|
|
3
|
+
// src/storage/index.ts
|
|
4
|
+
var _sparkmd5 = require('spark-md5'); var SparkMD5 = _interopRequireWildcard(_sparkmd5);
|
|
5
|
+
var StorageError = class extends Error {
|
|
6
|
+
constructor(code, message, serverResponse = null) {
|
|
7
|
+
super(`Firebase Storage: ${message} (${code})`);
|
|
8
|
+
this.code = code;
|
|
9
|
+
this.serverResponse = serverResponse;
|
|
10
|
+
this.name = "StorageError";
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
var AcmeStorageError = class extends StorageError {
|
|
14
|
+
constructor(code, message, serverResponse = null) {
|
|
15
|
+
super(code, message, serverResponse);
|
|
16
|
+
this.name = "AcmeStorageError";
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
function _handleError(status, context, body) {
|
|
20
|
+
let serverMessage = "";
|
|
21
|
+
let errorCode = "storage/unknown";
|
|
22
|
+
if (body) {
|
|
23
|
+
try {
|
|
24
|
+
const json = JSON.parse(body);
|
|
25
|
+
if (json.error && json.error.message) {
|
|
26
|
+
serverMessage = json.error.message;
|
|
27
|
+
} else if (json.error) {
|
|
28
|
+
serverMessage = json.error;
|
|
29
|
+
}
|
|
30
|
+
} catch (e) {
|
|
31
|
+
serverMessage = body.substring(0, 200);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
const fullMsg = serverMessage ? `${context}: ${serverMessage}` : context;
|
|
35
|
+
switch (status) {
|
|
36
|
+
case 400:
|
|
37
|
+
errorCode = "storage/invalid-argument";
|
|
38
|
+
break;
|
|
39
|
+
case 401:
|
|
40
|
+
errorCode = "storage/unauthenticated";
|
|
41
|
+
break;
|
|
42
|
+
case 403:
|
|
43
|
+
errorCode = "storage/unauthorized";
|
|
44
|
+
break;
|
|
45
|
+
case 404:
|
|
46
|
+
errorCode = "storage/object-not-found";
|
|
47
|
+
break;
|
|
48
|
+
case 413:
|
|
49
|
+
errorCode = "storage/quota-exceeded";
|
|
50
|
+
break;
|
|
51
|
+
case 429:
|
|
52
|
+
errorCode = "storage/quota-exceeded";
|
|
53
|
+
break;
|
|
54
|
+
// Resource exhausted
|
|
55
|
+
case 503:
|
|
56
|
+
errorCode = "storage/retry-limit-exceeded";
|
|
57
|
+
break;
|
|
58
|
+
}
|
|
59
|
+
return new StorageError(errorCode, fullMsg, _nullishCoalesce(body, () => ( null)));
|
|
60
|
+
}
|
|
61
|
+
function _buildHeaders(storage, token, contentType) {
|
|
62
|
+
const h = {};
|
|
63
|
+
if (token) h["Authorization"] = `Bearer ${token}`;
|
|
64
|
+
if (storage.config.apiKey) h["x-api-key"] = storage.config.apiKey;
|
|
65
|
+
if (contentType) h["Content-Type"] = contentType;
|
|
66
|
+
return h;
|
|
67
|
+
}
|
|
68
|
+
async function _requireAuth(storage) {
|
|
69
|
+
const token = await storage.config.tokenGetter();
|
|
70
|
+
if (!token) {
|
|
71
|
+
throw new StorageError("storage/unauthenticated", "User is not authenticated.");
|
|
72
|
+
}
|
|
73
|
+
return token;
|
|
74
|
+
}
|
|
75
|
+
var storageInstances = /* @__PURE__ */ new Map();
|
|
76
|
+
function getStorage(appOrConfig) {
|
|
77
|
+
if (!appOrConfig) {
|
|
78
|
+
throw new StorageError("storage/invalid-argument", "getStorage() requiere un FirebaseApp o StorageConfig.");
|
|
79
|
+
}
|
|
80
|
+
if ("options" in appOrConfig && _optionalChain([appOrConfig, 'access', _ => _.options, 'optionalAccess', _2 => _2.projectId])) {
|
|
81
|
+
const app = appOrConfig;
|
|
82
|
+
const cached = storageInstances.get(app.name);
|
|
83
|
+
if (cached) return cached;
|
|
84
|
+
const config2 = {
|
|
85
|
+
authEndpoint: app.options.storageUrl || "http://localhost:3002/api",
|
|
86
|
+
apiKey: app.options.apiKey,
|
|
87
|
+
project: app.options.projectId,
|
|
88
|
+
bucket: app.options.storageBucket || "default",
|
|
89
|
+
tokenGetter: async () => {
|
|
90
|
+
try {
|
|
91
|
+
const authModule = await Promise.resolve().then(() => _interopRequireWildcard(require("../auth/index.js")));
|
|
92
|
+
const auth = authModule.getAuth(app);
|
|
93
|
+
if (_optionalChain([auth, 'optionalAccess', _3 => _3.currentUser])) {
|
|
94
|
+
return auth.currentUser.getIdToken();
|
|
95
|
+
}
|
|
96
|
+
} catch (e2) {
|
|
97
|
+
}
|
|
98
|
+
return null;
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
const storage = { app, config: config2 };
|
|
102
|
+
storageInstances.set(app.name, storage);
|
|
103
|
+
return storage;
|
|
104
|
+
}
|
|
105
|
+
const config = appOrConfig;
|
|
106
|
+
return { app: {}, config };
|
|
107
|
+
}
|
|
108
|
+
function connectStorageEmulator(storage, host, port) {
|
|
109
|
+
const basePath = storage.config.authEndpoint.includes("/api") ? "/api" : "";
|
|
110
|
+
storage.config.authEndpoint = `http://${host}:${port}${basePath}`;
|
|
111
|
+
}
|
|
112
|
+
function _isStorageReference(value) {
|
|
113
|
+
const candidate = value;
|
|
114
|
+
return !!candidate && typeof candidate.fullPath === "string" && !!candidate.storage;
|
|
115
|
+
}
|
|
116
|
+
function ref(storageOrRef, path = "") {
|
|
117
|
+
if (_isStorageReference(storageOrRef)) {
|
|
118
|
+
if (!path) return storageOrRef;
|
|
119
|
+
const joined = storageOrRef.fullPath ? `${storageOrRef.fullPath}/${path}` : path;
|
|
120
|
+
return ref(storageOrRef.storage, joined);
|
|
121
|
+
}
|
|
122
|
+
const storage = storageOrRef;
|
|
123
|
+
const normalized = path.startsWith("/") ? path.slice(1) : path;
|
|
124
|
+
const name = normalized.split("/").pop() || "";
|
|
125
|
+
const bucket = storage.config.bucket || "default";
|
|
126
|
+
const project = storage.config.project || "default";
|
|
127
|
+
const r = {
|
|
128
|
+
storage,
|
|
129
|
+
fullPath: normalized,
|
|
130
|
+
name,
|
|
131
|
+
bucket,
|
|
132
|
+
parent: null,
|
|
133
|
+
root: null,
|
|
134
|
+
_location: { project, bucket, path: normalized }
|
|
135
|
+
};
|
|
136
|
+
Object.defineProperty(r, "parent", {
|
|
137
|
+
get() {
|
|
138
|
+
const parts = normalized.split("/");
|
|
139
|
+
if (parts.length <= 1) return null;
|
|
140
|
+
parts.pop();
|
|
141
|
+
return ref(storage, parts.join("/"));
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
Object.defineProperty(r, "root", {
|
|
145
|
+
get() {
|
|
146
|
+
return ref(storage, "");
|
|
147
|
+
}
|
|
148
|
+
});
|
|
149
|
+
return r;
|
|
150
|
+
}
|
|
151
|
+
function child(parent, childPath) {
|
|
152
|
+
const newPath = `${parent.fullPath}/${childPath}`.replace(/\/+/g, "/");
|
|
153
|
+
return ref(parent.storage, newPath);
|
|
154
|
+
}
|
|
155
|
+
function getParent(reference) {
|
|
156
|
+
return reference.parent;
|
|
157
|
+
}
|
|
158
|
+
function getRoot(reference) {
|
|
159
|
+
return reference.root;
|
|
160
|
+
}
|
|
161
|
+
async function getDownloadURL(storageRef) {
|
|
162
|
+
const token = await _requireAuth(storageRef.storage);
|
|
163
|
+
const params = new URLSearchParams();
|
|
164
|
+
params.set("path", storageRef.fullPath);
|
|
165
|
+
if (storageRef._location.project) params.set("project", storageRef._location.project);
|
|
166
|
+
if (storageRef._location.bucket) params.set("bucket", storageRef._location.bucket);
|
|
167
|
+
const endpoint = `${storageRef.storage.config.authEndpoint}/files/lookup?${params.toString()}`;
|
|
168
|
+
const res = await fetch(endpoint, { headers: _buildHeaders(storageRef.storage, token) });
|
|
169
|
+
if (!res.ok) {
|
|
170
|
+
const body = await res.text();
|
|
171
|
+
throw _handleError(res.status, `Path: ${storageRef.fullPath}`, body);
|
|
172
|
+
}
|
|
173
|
+
const data = await res.json();
|
|
174
|
+
return data.download_url;
|
|
175
|
+
}
|
|
176
|
+
async function getMetadata(storageRef) {
|
|
177
|
+
if (storageRef._cachedMetadata) return storageRef._cachedMetadata;
|
|
178
|
+
const token = await _requireAuth(storageRef.storage);
|
|
179
|
+
const params = new URLSearchParams();
|
|
180
|
+
params.set("path", storageRef.fullPath);
|
|
181
|
+
if (storageRef._location.project) params.set("project", storageRef._location.project);
|
|
182
|
+
if (storageRef._location.bucket) params.set("bucket", storageRef._location.bucket);
|
|
183
|
+
const endpoint = `${storageRef.storage.config.authEndpoint}/files/lookup?${params.toString()}`;
|
|
184
|
+
const res = await fetch(endpoint, { headers: _buildHeaders(storageRef.storage, token) });
|
|
185
|
+
if (!res.ok) {
|
|
186
|
+
const body = await res.text();
|
|
187
|
+
throw _handleError(res.status, `Path: ${storageRef.fullPath}`, body);
|
|
188
|
+
}
|
|
189
|
+
return res.json();
|
|
190
|
+
}
|
|
191
|
+
async function updateMetadata(storageRef, metadata) {
|
|
192
|
+
const token = await _requireAuth(storageRef.storage);
|
|
193
|
+
const fileData = await getMetadata(storageRef);
|
|
194
|
+
const endpoint = `${storageRef.storage.config.authEndpoint}/files/${fileData.id}/metadata`;
|
|
195
|
+
const res = await fetch(endpoint, {
|
|
196
|
+
method: "PATCH",
|
|
197
|
+
headers: _buildHeaders(storageRef.storage, token, "application/json"),
|
|
198
|
+
body: JSON.stringify(metadata)
|
|
199
|
+
});
|
|
200
|
+
if (!res.ok) {
|
|
201
|
+
const body = await res.text();
|
|
202
|
+
throw _handleError(res.status, `Update metadata: ${storageRef.fullPath}`, body);
|
|
203
|
+
}
|
|
204
|
+
return res.json();
|
|
205
|
+
}
|
|
206
|
+
async function listAll(reference) {
|
|
207
|
+
const token = await _requireAuth(reference.storage);
|
|
208
|
+
const params = new URLSearchParams();
|
|
209
|
+
params.set("prefix", reference.fullPath);
|
|
210
|
+
if (reference._location.project) params.set("project", reference._location.project);
|
|
211
|
+
if (reference._location.bucket) params.set("bucket", reference._location.bucket);
|
|
212
|
+
const endpoint = `${reference.storage.config.authEndpoint}/files?${params.toString()}`;
|
|
213
|
+
const res = await fetch(endpoint, { headers: _buildHeaders(reference.storage, token) });
|
|
214
|
+
if (!res.ok) {
|
|
215
|
+
const body = await res.text();
|
|
216
|
+
throw _handleError(res.status, `List: ${reference.fullPath}`, body);
|
|
217
|
+
}
|
|
218
|
+
const data = await res.json();
|
|
219
|
+
const items = (data.items || []).map((f) => {
|
|
220
|
+
const r = ref(reference.storage, f.path);
|
|
221
|
+
r._cachedMetadata = f;
|
|
222
|
+
return r;
|
|
223
|
+
});
|
|
224
|
+
const prefixes = (data.prefixes || []).map((p) => ref(reference.storage, p));
|
|
225
|
+
return { items, prefixes };
|
|
226
|
+
}
|
|
227
|
+
async function list(reference, options) {
|
|
228
|
+
const token = await _requireAuth(reference.storage);
|
|
229
|
+
const params = new URLSearchParams();
|
|
230
|
+
params.set("prefix", reference.fullPath);
|
|
231
|
+
if (_optionalChain([options, 'optionalAccess', _4 => _4.maxResults])) params.set("limit", options.maxResults.toString());
|
|
232
|
+
if (_optionalChain([options, 'optionalAccess', _5 => _5.pageToken])) params.set("offset", options.pageToken);
|
|
233
|
+
if (reference._location.project) params.set("project", reference._location.project);
|
|
234
|
+
if (reference._location.bucket) params.set("bucket", reference._location.bucket);
|
|
235
|
+
const endpoint = `${reference.storage.config.authEndpoint}/files?${params.toString()}`;
|
|
236
|
+
const res = await fetch(endpoint, { headers: _buildHeaders(reference.storage, token) });
|
|
237
|
+
if (!res.ok) {
|
|
238
|
+
const body = await res.text();
|
|
239
|
+
throw _handleError(res.status, `List: ${reference.fullPath}`, body);
|
|
240
|
+
}
|
|
241
|
+
const data = await res.json();
|
|
242
|
+
const items = (data.items || []).map((f) => {
|
|
243
|
+
const r = ref(reference.storage, f.path);
|
|
244
|
+
r._cachedMetadata = f;
|
|
245
|
+
return r;
|
|
246
|
+
});
|
|
247
|
+
const prefixes = (data.prefixes || []).map((p) => ref(reference.storage, p));
|
|
248
|
+
const result = { items, prefixes };
|
|
249
|
+
if (data.hasMore) {
|
|
250
|
+
result.nextPageToken = String(parseInt(_optionalChain([options, 'optionalAccess', _6 => _6.pageToken]) || "0") + (_optionalChain([options, 'optionalAccess', _7 => _7.maxResults]) || 1e3));
|
|
251
|
+
}
|
|
252
|
+
return result;
|
|
253
|
+
}
|
|
254
|
+
async function getBlob(storageRef, maxDownloadSizeBytes) {
|
|
255
|
+
const token = await _requireAuth(storageRef.storage);
|
|
256
|
+
const fileData = await getMetadata(storageRef);
|
|
257
|
+
if (maxDownloadSizeBytes && fileData.size_bytes > maxDownloadSizeBytes) {
|
|
258
|
+
throw new StorageError("storage/unknown", `File size ${fileData.size_bytes} exceeds max ${maxDownloadSizeBytes}`);
|
|
259
|
+
}
|
|
260
|
+
const endpoint = `${storageRef.storage.config.authEndpoint}/files/${fileData.id}/download`;
|
|
261
|
+
const res = await fetch(endpoint, { headers: _buildHeaders(storageRef.storage, token) });
|
|
262
|
+
if (!res.ok) {
|
|
263
|
+
const body = await res.text();
|
|
264
|
+
throw _handleError(res.status, `Download: ${storageRef.fullPath}`, body);
|
|
265
|
+
}
|
|
266
|
+
return res.blob();
|
|
267
|
+
}
|
|
268
|
+
async function getBytes(storageRef, maxDownloadSizeBytes) {
|
|
269
|
+
const blob = await getBlob(storageRef, maxDownloadSizeBytes);
|
|
270
|
+
return blob.arrayBuffer();
|
|
271
|
+
}
|
|
272
|
+
async function getStream(storageRef, maxDownloadSizeBytes) {
|
|
273
|
+
const token = await _requireAuth(storageRef.storage);
|
|
274
|
+
const fileData = await getMetadata(storageRef);
|
|
275
|
+
if (maxDownloadSizeBytes && fileData.size_bytes > maxDownloadSizeBytes) {
|
|
276
|
+
throw new StorageError("storage/unknown", `File size ${fileData.size_bytes} exceeds max ${maxDownloadSizeBytes}`);
|
|
277
|
+
}
|
|
278
|
+
const endpoint = `${storageRef.storage.config.authEndpoint}/files/${fileData.id}/download`;
|
|
279
|
+
const res = await fetch(endpoint, { headers: _buildHeaders(storageRef.storage, token) });
|
|
280
|
+
if (!res.ok || !res.body) {
|
|
281
|
+
const body = res.body ? await res.text() : "";
|
|
282
|
+
throw _handleError(res.status, `Stream: ${storageRef.fullPath}`, body);
|
|
283
|
+
}
|
|
284
|
+
return res.body;
|
|
285
|
+
}
|
|
286
|
+
async function deleteObject(storageRef) {
|
|
287
|
+
const token = await _requireAuth(storageRef.storage);
|
|
288
|
+
const headers = _buildHeaders(storageRef.storage, token);
|
|
289
|
+
const params = new URLSearchParams();
|
|
290
|
+
params.set("path", storageRef.fullPath);
|
|
291
|
+
if (storageRef._location.project) params.set("project", storageRef._location.project);
|
|
292
|
+
if (storageRef._location.bucket) params.set("bucket", storageRef._location.bucket);
|
|
293
|
+
const endpoint = `${storageRef.storage.config.authEndpoint}/files/lookup?${params.toString()}`;
|
|
294
|
+
const lookupRes = await fetch(endpoint, { headers });
|
|
295
|
+
if (!lookupRes.ok) {
|
|
296
|
+
if (lookupRes.status === 404) return;
|
|
297
|
+
const body = await lookupRes.text();
|
|
298
|
+
throw _handleError(lookupRes.status, `Delete lookup: ${storageRef.fullPath}`, body);
|
|
299
|
+
}
|
|
300
|
+
const { id } = await lookupRes.json();
|
|
301
|
+
const deleteRes = await fetch(`${storageRef.storage.config.authEndpoint}/files/${id}`, {
|
|
302
|
+
method: "DELETE",
|
|
303
|
+
headers
|
|
304
|
+
});
|
|
305
|
+
if (!deleteRes.ok) {
|
|
306
|
+
const body = await deleteRes.text();
|
|
307
|
+
throw _handleError(deleteRes.status, `Delete: ${storageRef.fullPath}`, body);
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
function uploadBytesResumable(storageRef, data, metadata) {
|
|
311
|
+
const task = new CustomUploadTask(storageRef, data, metadata);
|
|
312
|
+
setTimeout(() => task._start(), 0);
|
|
313
|
+
return task;
|
|
314
|
+
}
|
|
315
|
+
async function uploadBytes(storageRef, data, metadata) {
|
|
316
|
+
return new Promise((resolve, reject) => {
|
|
317
|
+
const task = uploadBytesResumable(storageRef, data, metadata);
|
|
318
|
+
task.on("state_changed", void 0, reject, () => resolve(task.snapshot));
|
|
319
|
+
});
|
|
320
|
+
}
|
|
321
|
+
async function uploadString(storageRef, value, format = "raw", metadata) {
|
|
322
|
+
let data;
|
|
323
|
+
let contentType = _optionalChain([metadata, 'optionalAccess', _8 => _8.contentType]) || "text/plain";
|
|
324
|
+
switch (format) {
|
|
325
|
+
case "raw":
|
|
326
|
+
data = new TextEncoder().encode(value);
|
|
327
|
+
break;
|
|
328
|
+
case "base64":
|
|
329
|
+
data = Uint8Array.from(atob(value), (c) => c.charCodeAt(0));
|
|
330
|
+
break;
|
|
331
|
+
case "base64url": {
|
|
332
|
+
const b64 = value.replace(/-/g, "+").replace(/_/g, "/");
|
|
333
|
+
data = Uint8Array.from(atob(b64), (c) => c.charCodeAt(0));
|
|
334
|
+
break;
|
|
335
|
+
}
|
|
336
|
+
case "data_url": {
|
|
337
|
+
const match = value.match(/^data:([^;,]+)?(?:;base64)?,(.*)$/);
|
|
338
|
+
if (!match) throw new StorageError("storage/invalid-argument", "Invalid data URL format");
|
|
339
|
+
contentType = match[1] || "application/octet-stream";
|
|
340
|
+
data = Uint8Array.from(atob(match[2] || ""), (c) => c.charCodeAt(0));
|
|
341
|
+
break;
|
|
342
|
+
}
|
|
343
|
+
default:
|
|
344
|
+
throw new StorageError("storage/invalid-argument", `Unknown string format: ${format}`);
|
|
345
|
+
}
|
|
346
|
+
return uploadBytes(storageRef, data, { ...metadata, contentType });
|
|
347
|
+
}
|
|
348
|
+
async function getThumbnailURL(storageRef, width = 320) {
|
|
349
|
+
const metadata = await getMetadata(storageRef);
|
|
350
|
+
const baseURL = storageRef.storage.config.authEndpoint.replace(/\/api$/, "");
|
|
351
|
+
return `${baseURL}/media/${metadata.id}/thumbnail?token=${metadata.download_token}&w=${width}`;
|
|
352
|
+
}
|
|
353
|
+
var CustomUploadTask = class {
|
|
354
|
+
constructor(_ref, data, metadata) {
|
|
355
|
+
this._ref = _ref;
|
|
356
|
+
this.observers = [];
|
|
357
|
+
this.xhr = null;
|
|
358
|
+
this.file = data instanceof Blob ? data : new Blob([data]);
|
|
359
|
+
this._snapshot = {
|
|
360
|
+
bytesTransferred: 0,
|
|
361
|
+
totalBytes: this.file.size,
|
|
362
|
+
state: "running",
|
|
363
|
+
metadata: metadata || {},
|
|
364
|
+
ref: _ref,
|
|
365
|
+
task: this
|
|
366
|
+
};
|
|
367
|
+
}
|
|
368
|
+
async _start() {
|
|
369
|
+
try {
|
|
370
|
+
const token = await this._ref.storage.config.tokenGetter();
|
|
371
|
+
if (!token) {
|
|
372
|
+
throw new StorageError("storage/unauthenticated", "User is not authenticated.");
|
|
373
|
+
}
|
|
374
|
+
const checksum = await this._computeChecksum(this.file);
|
|
375
|
+
const intentRes = await fetch(`${this._ref.storage.config.authEndpoint}/upload-intent`, {
|
|
376
|
+
method: "POST",
|
|
377
|
+
headers: _buildHeaders(this._ref.storage, token, "application/json"),
|
|
378
|
+
body: JSON.stringify({
|
|
379
|
+
path: this._ref.fullPath,
|
|
380
|
+
mime_type: this.file.type || "application/octet-stream",
|
|
381
|
+
size: this.file.size,
|
|
382
|
+
name: this._ref.name,
|
|
383
|
+
md5_hash: checksum,
|
|
384
|
+
project: this._ref._location.project || "default",
|
|
385
|
+
bucket: this._ref._location.bucket || "default"
|
|
386
|
+
})
|
|
387
|
+
});
|
|
388
|
+
if (!intentRes.ok) {
|
|
389
|
+
const body = await intentRes.text();
|
|
390
|
+
throw _handleError(intentRes.status, `Upload intent: ${this._ref.fullPath}`, body);
|
|
391
|
+
}
|
|
392
|
+
const intent = await intentRes.json();
|
|
393
|
+
await this._performResilientUpload(intent.upload_url);
|
|
394
|
+
const finalizeRes = await fetch(
|
|
395
|
+
`${this._ref.storage.config.authEndpoint}/files/${intent.object_id}/finalize`,
|
|
396
|
+
{ method: "POST", headers: _buildHeaders(this._ref.storage, token) }
|
|
397
|
+
);
|
|
398
|
+
if (!finalizeRes.ok) {
|
|
399
|
+
const body = await finalizeRes.text();
|
|
400
|
+
throw _handleError(finalizeRes.status, `Upload finalize: ${this._ref.fullPath}`, body);
|
|
401
|
+
}
|
|
402
|
+
this._updateState("success");
|
|
403
|
+
} catch (err) {
|
|
404
|
+
this._updateState("error");
|
|
405
|
+
const storageErr = err instanceof StorageError ? err : new StorageError("storage/unknown", err.message || "Upload failed");
|
|
406
|
+
this.notifyError(storageErr);
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
async _performResilientUpload(url, attempts = 0) {
|
|
410
|
+
const MAX_RETRIES = 5;
|
|
411
|
+
const BASE_DELAY = 1e3;
|
|
412
|
+
try {
|
|
413
|
+
await this._uploadToUrl(url);
|
|
414
|
+
} catch (err) {
|
|
415
|
+
const isRetryable = err.message === "Network Error" || err.message === "Upload HTTP 500" || err.message === "Upload HTTP 503";
|
|
416
|
+
if (isRetryable && attempts < MAX_RETRIES) {
|
|
417
|
+
const prevBytes = this._snapshot.bytesTransferred;
|
|
418
|
+
this._snapshot.state = "paused";
|
|
419
|
+
this.notify();
|
|
420
|
+
await new Promise((r) => setTimeout(r, BASE_DELAY * Math.pow(2, attempts)));
|
|
421
|
+
this._snapshot.state = "running";
|
|
422
|
+
this._snapshot.bytesTransferred = prevBytes;
|
|
423
|
+
this.notify();
|
|
424
|
+
return this._performResilientUpload(url, attempts + 1);
|
|
425
|
+
}
|
|
426
|
+
if (isRetryable) {
|
|
427
|
+
throw new StorageError("storage/retry-limit-exceeded", "Max retry limit exceeded.");
|
|
428
|
+
}
|
|
429
|
+
throw err;
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
_uploadToUrl(url) {
|
|
433
|
+
return new Promise((resolve, reject) => {
|
|
434
|
+
this.xhr = new XMLHttpRequest();
|
|
435
|
+
this.xhr.open("PUT", url, true);
|
|
436
|
+
this.xhr.setRequestHeader("Content-Type", this.file.type);
|
|
437
|
+
this.xhr.upload.onprogress = (e) => {
|
|
438
|
+
if (e.lengthComputable) {
|
|
439
|
+
this._snapshot.bytesTransferred = e.loaded;
|
|
440
|
+
this._snapshot.totalBytes = e.total;
|
|
441
|
+
this.notify();
|
|
442
|
+
}
|
|
443
|
+
};
|
|
444
|
+
this.xhr.onload = () => {
|
|
445
|
+
if (this.xhr && this.xhr.status >= 200 && this.xhr.status < 300) {
|
|
446
|
+
resolve();
|
|
447
|
+
} else {
|
|
448
|
+
reject(new Error(`Upload HTTP ${this.xhr ? this.xhr.status : "Unknown"}`));
|
|
449
|
+
}
|
|
450
|
+
};
|
|
451
|
+
this.xhr.onerror = () => reject(new Error("Network Error"));
|
|
452
|
+
this.xhr.onabort = () => reject(new StorageError("storage/canceled", "Upload was canceled."));
|
|
453
|
+
this.xhr.send(this.file);
|
|
454
|
+
});
|
|
455
|
+
}
|
|
456
|
+
async _computeChecksum(file) {
|
|
457
|
+
const anyFile = file;
|
|
458
|
+
if (typeof anyFile.arrayBuffer === "function") {
|
|
459
|
+
const buffer = await anyFile.arrayBuffer();
|
|
460
|
+
return SparkMD5.ArrayBuffer.hash(buffer);
|
|
461
|
+
}
|
|
462
|
+
if (typeof anyFile.text === "function") {
|
|
463
|
+
const text = await anyFile.text();
|
|
464
|
+
const bytes = new TextEncoder().encode(text);
|
|
465
|
+
return SparkMD5.ArrayBuffer.hash(bytes.buffer);
|
|
466
|
+
}
|
|
467
|
+
if (typeof FileReader !== "undefined") {
|
|
468
|
+
const buffer = await new Promise((resolve, reject) => {
|
|
469
|
+
const reader = new FileReader();
|
|
470
|
+
reader.onload = () => resolve(reader.result);
|
|
471
|
+
reader.onerror = () => reject(new Error("Unable to read blob with FileReader"));
|
|
472
|
+
reader.readAsArrayBuffer(file);
|
|
473
|
+
});
|
|
474
|
+
return SparkMD5.ArrayBuffer.hash(buffer);
|
|
475
|
+
}
|
|
476
|
+
throw new Error("Unable to compute checksum for provided file/blob");
|
|
477
|
+
}
|
|
478
|
+
_updateState(state) {
|
|
479
|
+
this._snapshot.state = state;
|
|
480
|
+
this.notify();
|
|
481
|
+
if (state === "success") this.notifyComplete();
|
|
482
|
+
}
|
|
483
|
+
get snapshot() {
|
|
484
|
+
return this._snapshot;
|
|
485
|
+
}
|
|
486
|
+
on(_event, next, error, complete) {
|
|
487
|
+
const obs = { next, error, complete };
|
|
488
|
+
this.observers.push(obs);
|
|
489
|
+
if (next) setTimeout(() => next(this._snapshot), 0);
|
|
490
|
+
return () => {
|
|
491
|
+
this.observers = this.observers.filter((o) => o !== obs);
|
|
492
|
+
};
|
|
493
|
+
}
|
|
494
|
+
then(onFulfilled, onRejected) {
|
|
495
|
+
return new Promise((resolve, reject) => {
|
|
496
|
+
const check = () => {
|
|
497
|
+
if (this._snapshot.state === "success") {
|
|
498
|
+
resolve(onFulfilled ? onFulfilled(this._snapshot) : this._snapshot);
|
|
499
|
+
} else if (this._snapshot.state === "error") {
|
|
500
|
+
reject(onRejected ? onRejected(new StorageError("storage/unknown", "Task failed")) : new StorageError("storage/unknown", "Task failed"));
|
|
501
|
+
} else {
|
|
502
|
+
this.on("state_changed", void 0, reject, () => {
|
|
503
|
+
resolve(onFulfilled ? onFulfilled(this._snapshot) : this._snapshot);
|
|
504
|
+
});
|
|
505
|
+
}
|
|
506
|
+
};
|
|
507
|
+
check();
|
|
508
|
+
});
|
|
509
|
+
}
|
|
510
|
+
cancel() {
|
|
511
|
+
if (this.xhr) {
|
|
512
|
+
this.xhr.abort();
|
|
513
|
+
this._updateState("canceled");
|
|
514
|
+
return true;
|
|
515
|
+
}
|
|
516
|
+
return false;
|
|
517
|
+
}
|
|
518
|
+
pause() {
|
|
519
|
+
return false;
|
|
520
|
+
}
|
|
521
|
+
resume() {
|
|
522
|
+
return false;
|
|
523
|
+
}
|
|
524
|
+
notify() {
|
|
525
|
+
this.observers.forEach((o) => o.next && o.next(this._snapshot));
|
|
526
|
+
}
|
|
527
|
+
notifyError(e) {
|
|
528
|
+
this.observers.forEach((o) => o.error && o.error(e));
|
|
529
|
+
}
|
|
530
|
+
notifyComplete() {
|
|
531
|
+
this.observers.forEach((o) => o.complete && o.complete());
|
|
532
|
+
}
|
|
533
|
+
};
|
|
534
|
+
|
|
535
|
+
|
|
536
|
+
|
|
537
|
+
|
|
538
|
+
|
|
539
|
+
|
|
540
|
+
|
|
541
|
+
|
|
542
|
+
|
|
543
|
+
|
|
544
|
+
|
|
545
|
+
|
|
546
|
+
|
|
547
|
+
|
|
548
|
+
|
|
549
|
+
|
|
550
|
+
|
|
551
|
+
|
|
552
|
+
|
|
553
|
+
|
|
554
|
+
|
|
555
|
+
|
|
556
|
+
exports.AcmeStorageError = AcmeStorageError; exports.StorageError = StorageError; exports.child = child; exports.connectStorageEmulator = connectStorageEmulator; exports.deleteObject = deleteObject; exports.getBlob = getBlob; exports.getBytes = getBytes; exports.getDownloadURL = getDownloadURL; exports.getMetadata = getMetadata; exports.getParent = getParent; exports.getRoot = getRoot; exports.getStorage = getStorage; exports.getStream = getStream; exports.getThumbnailURL = getThumbnailURL; exports.list = list; exports.listAll = listAll; exports.ref = ref; exports.updateMetadata = updateMetadata; exports.uploadBytes = uploadBytes; exports.uploadBytesResumable = uploadBytesResumable; exports.uploadString = uploadString;
|
|
557
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["c:\\Users\\ponce\\Documents\\codigo-2026\\firestore\\sdk\\core\\dist\\storage\\index.js"],"names":[],"mappings":"AAAA,m+BAA6B;AAC7B;AACA;AACA,wFAAqC;AACrC,IAAI,aAAa,EAAE,MAAM,QAAQ,MAAM;AACvC,EAAE,WAAW,CAAC,IAAI,EAAE,OAAO,EAAE,eAAe,EAAE,IAAI,EAAE;AACpD,IAAI,KAAK,CAAC,CAAC,kBAAkB,EAAE,OAAO,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;AACnD,IAAI,IAAI,CAAC,KAAK,EAAE,IAAI;AACpB,IAAI,IAAI,CAAC,eAAe,EAAE,cAAc;AACxC,IAAI,IAAI,CAAC,KAAK,EAAE,cAAc;AAC9B,EAAE;AACF,CAAC;AACD,IAAI,iBAAiB,EAAE,MAAM,QAAQ,aAAa;AAClD,EAAE,WAAW,CAAC,IAAI,EAAE,OAAO,EAAE,eAAe,EAAE,IAAI,EAAE;AACpD,IAAI,KAAK,CAAC,IAAI,EAAE,OAAO,EAAE,cAAc,CAAC;AACxC,IAAI,IAAI,CAAC,KAAK,EAAE,kBAAkB;AAClC,EAAE;AACF,CAAC;AACD,SAAS,YAAY,CAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE;AAC7C,EAAE,IAAI,cAAc,EAAE,EAAE;AACxB,EAAE,IAAI,UAAU,EAAE,iBAAiB;AACnC,EAAE,GAAG,CAAC,IAAI,EAAE;AACZ,IAAI,IAAI;AACR,MAAM,MAAM,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC;AACnC,MAAM,GAAG,CAAC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE;AAC5C,QAAQ,cAAc,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO;AAC1C,MAAM,EAAE,KAAK,GAAG,CAAC,IAAI,CAAC,KAAK,EAAE;AAC7B,QAAQ,cAAc,EAAE,IAAI,CAAC,KAAK;AAClC,MAAM;AACN,IAAI,EAAE,MAAM,CAAC,CAAC,EAAE;AAChB,MAAM,cAAc,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,GAAG,CAAC;AAC5C,IAAI;AACJ,EAAE;AACF,EAAE,MAAM,QAAQ,EAAE,cAAc,EAAE,CAAC,EAAA;AACA,EAAA;AACA,IAAA;AACA,MAAA;AACA,MAAA;AACA,IAAA;AACA,MAAA;AACA,MAAA;AACA,IAAA;AACA,MAAA;AACA,MAAA;AACA,IAAA;AACA,MAAA;AACA,MAAA;AACA,IAAA;AACA,MAAA;AACA,MAAA;AACA,IAAA;AACA,MAAA;AACA,MAAA;AACA;AACA,IAAA;AACA,MAAA;AACA,MAAA;AACA,EAAA;AACA,EAAA;AACA;AACA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA;AACA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA;AACA;AACA;AACA,EAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,QAAA;AACA,UAAA;AACA,UAAA;AACA,UAAA;AACA,YAAA;AACA,UAAA;AACA,QAAA;AACA,QAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA;AACA;AACA,EAAA;AACA,EAAA;AACA;AACA;AACA,EAAA;AACA,EAAA;AACA;AACA;AACA,EAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,MAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA;AACA;AACA,EAAA;AACA,EAAA;AACA;AACA;AACA,EAAA;AACA;AACA;AACA,EAAA;AACA;AACA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA;AACA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA;AACA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA;AACA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA;AACA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA;AACA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA;AACA;AACA,EAAA;AACA,EAAA;AACA;AACA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA;AACA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,IAAA;AACA,EAAA;AACA;AACA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA;AACA;AACA,EAAA;AACA,IAAA;AACA,IAAA;AACA,EAAA;AACA;AACA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,MAAA;AACA,MAAA;AACA,IAAA;AACA,MAAA;AACA,MAAA;AACA,IAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,IAAA;AACA,IAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,IAAA;AACA,IAAA;AACA,MAAA;AACA,EAAA;AACA,EAAA;AACA;AACA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA;AACA;AACA,EAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,MAAA;AACA,MAAA;AACA,QAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,QAAA;AACA,UAAA;AACA,UAAA;AACA,UAAA;AACA,UAAA;AACA,UAAA;AACA,UAAA;AACA,UAAA;AACA,QAAA;AACA,MAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,MAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,MAAA;AACA,MAAA;AACA,IAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,MAAA;AACA,IAAA;AACA,MAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,QAAA;AACA,QAAA;AACA,QAAA;AACA,QAAA;AACA,QAAA;AACA,QAAA;AACA,MAAA;AACA,MAAA;AACA,QAAA;AACA,MAAA;AACA,MAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,QAAA;AACA,UAAA;AACA,UAAA;AACA,UAAA;AACA,QAAA;AACA,MAAA;AACA,MAAA;AACA,QAAA;AACA,UAAA;AACA,QAAA;AACA,UAAA;AACA,QAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,IAAA;AACA,MAAA;AACA,MAAA;AACA,IAAA;AACA,IAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,IAAA;AACA,IAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,QAAA;AACA,QAAA;AACA,MAAA;AACA,MAAA;AACA,IAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,MAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,MAAA;AACA,QAAA;AACA,UAAA;AACA,QAAA;AACA,UAAA;AACA,QAAA;AACA,UAAA;AACA,YAAA;AACA,UAAA;AACA,QAAA;AACA,MAAA;AACA,MAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,IAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,EAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"C:\\Users\\ponce\\Documents\\codigo-2026\\firestore\\sdk\\core\\dist\\storage\\index.js","sourcesContent":[null]}
|