@civet/core 6.1.0 → 6.2.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/ChannelNotifier.d.ts +1 -0
- package/dist/Notifier.d.ts +1 -0
- package/dist/main.js +556 -545
- package/dist/useResource.d.ts +1 -1
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { createContext as
|
|
1
|
+
import { createContext as xe, useContext as Ae, useMemo as oe, useReducer as qe, useState as Ce, useEffect as ce, useCallback as Le } from "react";
|
|
2
2
|
import { jsx as se } from "react/jsx-runtime";
|
|
3
|
-
const ue =
|
|
3
|
+
const ue = xe({});
|
|
4
4
|
ue.displayName = "ConfigContext";
|
|
5
|
-
const et = ue.Consumer,
|
|
5
|
+
const et = ue.Consumer, Ue = () => Ae(ue), ae = xe({
|
|
6
6
|
name: "",
|
|
7
7
|
query: void 0,
|
|
8
8
|
options: void 0,
|
|
@@ -21,8 +21,8 @@ const et = ue.Consumer, Pe = () => xe(ue), ae = Ee({
|
|
|
21
21
|
notify: () => Promise.reject(new Error("Missing context provider"))
|
|
22
22
|
});
|
|
23
23
|
ae.displayName = "ResourceContext";
|
|
24
|
-
const
|
|
25
|
-
class
|
|
24
|
+
const Pe = ae.Provider, tt = ae.Consumer, rt = () => Ae(ae);
|
|
25
|
+
class ge {
|
|
26
26
|
listeners = /* @__PURE__ */ new Set();
|
|
27
27
|
subscribe = (s) => {
|
|
28
28
|
if (typeof s != "function")
|
|
@@ -31,13 +31,19 @@ class Ae {
|
|
|
31
31
|
this.listeners.delete(s);
|
|
32
32
|
};
|
|
33
33
|
};
|
|
34
|
+
once = (s) => {
|
|
35
|
+
const u = this.subscribe((...p) => {
|
|
36
|
+
u(), s(...p);
|
|
37
|
+
});
|
|
38
|
+
return u;
|
|
39
|
+
};
|
|
34
40
|
isSubscribed = (s) => this.listeners.has(s);
|
|
35
41
|
trigger = (...s) => {
|
|
36
|
-
this.listeners.forEach((
|
|
42
|
+
this.listeners.forEach((u) => u(...s));
|
|
37
43
|
};
|
|
38
44
|
}
|
|
39
45
|
class Be {
|
|
40
|
-
notifier = new
|
|
46
|
+
notifier = new ge();
|
|
41
47
|
locked = !1;
|
|
42
48
|
aborted = !1;
|
|
43
49
|
constructor() {
|
|
@@ -59,8 +65,8 @@ class Be {
|
|
|
59
65
|
listen = (s) => {
|
|
60
66
|
if (this.locked) return () => {
|
|
61
67
|
};
|
|
62
|
-
const
|
|
63
|
-
return this.aborted && !
|
|
68
|
+
const u = this.notifier.isSubscribed(s), p = this.notifier.subscribe(s);
|
|
69
|
+
return this.aborted && !u && s(), p;
|
|
64
70
|
};
|
|
65
71
|
abort = () => {
|
|
66
72
|
this.locked || (this.lock(), Object.defineProperty(this, "aborted", {
|
|
@@ -81,8 +87,8 @@ class Be {
|
|
|
81
87
|
proxy = () => {
|
|
82
88
|
const s = this;
|
|
83
89
|
return {
|
|
84
|
-
listen(
|
|
85
|
-
return s.listen(
|
|
90
|
+
listen(u) {
|
|
91
|
+
return s.listen(u);
|
|
86
92
|
},
|
|
87
93
|
get locked() {
|
|
88
94
|
return s.locked;
|
|
@@ -95,54 +101,59 @@ class Be {
|
|
|
95
101
|
}
|
|
96
102
|
class ke {
|
|
97
103
|
channels = {};
|
|
98
|
-
subscribe = (s,
|
|
104
|
+
subscribe = (s, u) => {
|
|
105
|
+
if (s == null || !`${s}`)
|
|
106
|
+
throw new Error("Channel is required");
|
|
107
|
+
return this.channels[s] == null && (this.channels[s] = new ge()), this.channels[s].subscribe(u);
|
|
108
|
+
};
|
|
109
|
+
once = (s, u) => {
|
|
99
110
|
if (s == null || !`${s}`)
|
|
100
111
|
throw new Error("Channel is required");
|
|
101
|
-
return this.channels[s] == null && (this.channels[s] = new
|
|
112
|
+
return this.channels[s] == null && (this.channels[s] = new ge()), this.channels[s].once(u);
|
|
102
113
|
};
|
|
103
|
-
isSubscribed = (s,
|
|
114
|
+
isSubscribed = (s, u) => {
|
|
104
115
|
if (s == null || !`${s}`)
|
|
105
116
|
throw new Error("Channel is required");
|
|
106
|
-
return this.channels[s] != null && this.channels[s].isSubscribed(
|
|
117
|
+
return this.channels[s] != null && this.channels[s].isSubscribed(u);
|
|
107
118
|
};
|
|
108
|
-
trigger = (s, ...
|
|
119
|
+
trigger = (s, ...u) => {
|
|
109
120
|
s == null ? Object.values(this.channels).forEach(
|
|
110
|
-
(p) => p.trigger(...
|
|
111
|
-
) : this.channels[s] != null && this.channels[s].trigger(...
|
|
121
|
+
(p) => p.trigger(...u)
|
|
122
|
+
) : this.channels[s] != null && this.channels[s].trigger(...u);
|
|
112
123
|
};
|
|
113
124
|
}
|
|
114
125
|
function nt(...h) {
|
|
115
|
-
return h.length === 0 ? (s) => s : h.length === 1 ? h[0] : h.reduce((s,
|
|
126
|
+
return h.length === 0 ? (s) => s : h.length === 1 ? h[0] : h.reduce((s, u) => (p) => s(u(p)));
|
|
116
127
|
}
|
|
117
128
|
function je(h) {
|
|
118
129
|
return h && h.__esModule && Object.prototype.hasOwnProperty.call(h, "default") ? h.default : h;
|
|
119
130
|
}
|
|
120
|
-
var de,
|
|
131
|
+
var de, Ee;
|
|
121
132
|
function Re() {
|
|
122
|
-
return
|
|
123
|
-
if (s ===
|
|
124
|
-
if (s &&
|
|
125
|
-
if (s.constructor !==
|
|
126
|
-
var p, m,
|
|
133
|
+
return Ee || (Ee = 1, de = function h(s, u) {
|
|
134
|
+
if (s === u) return !0;
|
|
135
|
+
if (s && u && typeof s == "object" && typeof u == "object") {
|
|
136
|
+
if (s.constructor !== u.constructor) return !1;
|
|
137
|
+
var p, m, b;
|
|
127
138
|
if (Array.isArray(s)) {
|
|
128
|
-
if (p = s.length, p !=
|
|
139
|
+
if (p = s.length, p != u.length) return !1;
|
|
129
140
|
for (m = p; m-- !== 0; )
|
|
130
|
-
if (!h(s[m],
|
|
141
|
+
if (!h(s[m], u[m])) return !1;
|
|
131
142
|
return !0;
|
|
132
143
|
}
|
|
133
|
-
if (s.constructor === RegExp) return s.source ===
|
|
134
|
-
if (s.valueOf !== Object.prototype.valueOf) return s.valueOf() ===
|
|
135
|
-
if (s.toString !== Object.prototype.toString) return s.toString() ===
|
|
136
|
-
if (
|
|
144
|
+
if (s.constructor === RegExp) return s.source === u.source && s.flags === u.flags;
|
|
145
|
+
if (s.valueOf !== Object.prototype.valueOf) return s.valueOf() === u.valueOf();
|
|
146
|
+
if (s.toString !== Object.prototype.toString) return s.toString() === u.toString();
|
|
147
|
+
if (b = Object.keys(s), p = b.length, p !== Object.keys(u).length) return !1;
|
|
137
148
|
for (m = p; m-- !== 0; )
|
|
138
|
-
if (!Object.prototype.hasOwnProperty.call(
|
|
149
|
+
if (!Object.prototype.hasOwnProperty.call(u, b[m])) return !1;
|
|
139
150
|
for (m = p; m-- !== 0; ) {
|
|
140
|
-
var j =
|
|
141
|
-
if (!h(s[j],
|
|
151
|
+
var j = b[m];
|
|
152
|
+
if (!h(s[j], u[j])) return !1;
|
|
142
153
|
}
|
|
143
154
|
return !0;
|
|
144
155
|
}
|
|
145
|
-
return s !== s &&
|
|
156
|
+
return s !== s && u !== u;
|
|
146
157
|
}), de;
|
|
147
158
|
}
|
|
148
159
|
var De = Re();
|
|
@@ -153,88 +164,88 @@ function ie(h) {
|
|
|
153
164
|
var he = { exports: {} }, Ie;
|
|
154
165
|
function Te() {
|
|
155
166
|
return Ie || (Ie = 1, (function(h, s) {
|
|
156
|
-
(function(
|
|
157
|
-
h.exports =
|
|
167
|
+
(function(u) {
|
|
168
|
+
h.exports = u();
|
|
158
169
|
})(function() {
|
|
159
|
-
return (function
|
|
160
|
-
function j(
|
|
161
|
-
if (!m[
|
|
162
|
-
if (!p[
|
|
163
|
-
var
|
|
164
|
-
if (!
|
|
165
|
-
if (
|
|
166
|
-
throw new Error("Cannot find module '" +
|
|
170
|
+
return (function u(p, m, b) {
|
|
171
|
+
function j(R, D) {
|
|
172
|
+
if (!m[R]) {
|
|
173
|
+
if (!p[R]) {
|
|
174
|
+
var N = typeof ie == "function" && ie;
|
|
175
|
+
if (!D && N) return N(R, !0);
|
|
176
|
+
if (P) return P(R, !0);
|
|
177
|
+
throw new Error("Cannot find module '" + R + "'");
|
|
167
178
|
}
|
|
168
|
-
|
|
169
|
-
var
|
|
170
|
-
return j(
|
|
171
|
-
},
|
|
179
|
+
D = m[R] = { exports: {} }, p[R][0].call(D.exports, function(F) {
|
|
180
|
+
var T = p[R][1][F];
|
|
181
|
+
return j(T || F);
|
|
182
|
+
}, D, D.exports, u, p, m, b);
|
|
172
183
|
}
|
|
173
|
-
return m[
|
|
184
|
+
return m[R].exports;
|
|
174
185
|
}
|
|
175
|
-
for (var
|
|
186
|
+
for (var P = typeof ie == "function" && ie, U = 0; U < b.length; U++) j(b[U]);
|
|
176
187
|
return j;
|
|
177
|
-
})({ 1: [function(
|
|
178
|
-
(function(
|
|
179
|
-
var
|
|
180
|
-
function S(
|
|
181
|
-
d =
|
|
188
|
+
})({ 1: [function(u, p, m) {
|
|
189
|
+
(function(b, j, P, U, R, D, N, F, T) {
|
|
190
|
+
var _ = u("crypto");
|
|
191
|
+
function S(a, d) {
|
|
192
|
+
d = I(a, d);
|
|
182
193
|
var r;
|
|
183
|
-
return (r = d.algorithm !== "passthrough" ?
|
|
194
|
+
return (r = d.algorithm !== "passthrough" ? _.createHash(d.algorithm) : new C()).write === void 0 && (r.write = r.update, r.end = r.update), v(d, r).dispatch(a), r.update || r.end(""), r.digest ? r.digest(d.encoding === "buffer" ? void 0 : d.encoding) : (a = r.read(), d.encoding !== "buffer" ? a.toString(d.encoding) : a);
|
|
184
195
|
}
|
|
185
|
-
(m = p.exports = S).sha1 = function(
|
|
186
|
-
return S(
|
|
187
|
-
}, m.keys = function(
|
|
188
|
-
return S(
|
|
189
|
-
}, m.MD5 = function(
|
|
190
|
-
return S(
|
|
191
|
-
}, m.keysMD5 = function(
|
|
192
|
-
return S(
|
|
196
|
+
(m = p.exports = S).sha1 = function(a) {
|
|
197
|
+
return S(a);
|
|
198
|
+
}, m.keys = function(a) {
|
|
199
|
+
return S(a, { excludeValues: !0, algorithm: "sha1", encoding: "hex" });
|
|
200
|
+
}, m.MD5 = function(a) {
|
|
201
|
+
return S(a, { algorithm: "md5", encoding: "hex" });
|
|
202
|
+
}, m.keysMD5 = function(a) {
|
|
203
|
+
return S(a, { algorithm: "md5", encoding: "hex", excludeValues: !0 });
|
|
193
204
|
};
|
|
194
|
-
var c =
|
|
195
|
-
function
|
|
205
|
+
var c = _.getHashes ? _.getHashes().slice() : ["sha1", "md5"], w = (c.push("passthrough"), ["buffer", "hex", "binary", "base64"]);
|
|
206
|
+
function I(a, d) {
|
|
196
207
|
var r = {};
|
|
197
|
-
if (r.algorithm = (d = d || {}).algorithm || "sha1", r.encoding = d.encoding || "hex", r.excludeValues = !!d.excludeValues, r.algorithm = r.algorithm.toLowerCase(), r.encoding = r.encoding.toLowerCase(), r.ignoreUnknown = d.ignoreUnknown === !0, r.respectType = d.respectType !== !1, r.respectFunctionNames = d.respectFunctionNames !== !1, r.respectFunctionProperties = d.respectFunctionProperties !== !1, r.unorderedArrays = d.unorderedArrays === !0, r.unorderedSets = d.unorderedSets !== !1, r.unorderedObjects = d.unorderedObjects !== !1, r.replacer = d.replacer || void 0, r.excludeKeys = d.excludeKeys || void 0,
|
|
208
|
+
if (r.algorithm = (d = d || {}).algorithm || "sha1", r.encoding = d.encoding || "hex", r.excludeValues = !!d.excludeValues, r.algorithm = r.algorithm.toLowerCase(), r.encoding = r.encoding.toLowerCase(), r.ignoreUnknown = d.ignoreUnknown === !0, r.respectType = d.respectType !== !1, r.respectFunctionNames = d.respectFunctionNames !== !1, r.respectFunctionProperties = d.respectFunctionProperties !== !1, r.unorderedArrays = d.unorderedArrays === !0, r.unorderedSets = d.unorderedSets !== !1, r.unorderedObjects = d.unorderedObjects !== !1, r.replacer = d.replacer || void 0, r.excludeKeys = d.excludeKeys || void 0, a === void 0) throw new Error("Object argument required.");
|
|
198
209
|
for (var i = 0; i < c.length; ++i) c[i].toLowerCase() === r.algorithm.toLowerCase() && (r.algorithm = c[i]);
|
|
199
210
|
if (c.indexOf(r.algorithm) === -1) throw new Error('Algorithm "' + r.algorithm + '" not supported. supported values: ' + c.join(", "));
|
|
200
|
-
if (
|
|
211
|
+
if (w.indexOf(r.encoding) === -1 && r.algorithm !== "passthrough") throw new Error('Encoding "' + r.encoding + '" not supported. supported values: ' + w.join(", "));
|
|
201
212
|
return r;
|
|
202
213
|
}
|
|
203
|
-
function
|
|
204
|
-
if (typeof
|
|
214
|
+
function E(a) {
|
|
215
|
+
if (typeof a == "function") return /^function\s+\w*\s*\(\s*\)\s*{\s+\[native code\]\s+}$/i.exec(Function.prototype.toString.call(a)) != null;
|
|
205
216
|
}
|
|
206
|
-
function v(
|
|
217
|
+
function v(a, d, r) {
|
|
207
218
|
r = r || [];
|
|
208
219
|
function i(t) {
|
|
209
220
|
return d.update ? d.update(t, "utf8") : d.write(t, "utf8");
|
|
210
221
|
}
|
|
211
222
|
return { dispatch: function(t) {
|
|
212
|
-
return this["_" + ((t =
|
|
223
|
+
return this["_" + ((t = a.replacer ? a.replacer(t) : t) === null ? "null" : typeof t)](t);
|
|
213
224
|
}, _object: function(t) {
|
|
214
|
-
var f, l = Object.prototype.toString.call(t),
|
|
215
|
-
if (
|
|
216
|
-
if (r.push(t),
|
|
217
|
-
if (
|
|
218
|
-
return !
|
|
219
|
-
})), i("object:" + l.length + ":"), f = this, l.forEach(function(
|
|
220
|
-
f.dispatch(
|
|
225
|
+
var f, l = Object.prototype.toString.call(t), q = /\[object (.*)\]/i.exec(l);
|
|
226
|
+
if (q = (q = q ? q[1] : "unknown:[" + l + "]").toLowerCase(), 0 <= (l = r.indexOf(t))) return this.dispatch("[CIRCULAR:" + l + "]");
|
|
227
|
+
if (r.push(t), P !== void 0 && P.isBuffer && P.isBuffer(t)) return i("buffer:"), i(t);
|
|
228
|
+
if (q === "object" || q === "function" || q === "asyncfunction") return l = Object.keys(t), a.unorderedObjects && (l = l.sort()), a.respectType === !1 || E(t) || l.splice(0, 0, "prototype", "__proto__", "constructor"), a.excludeKeys && (l = l.filter(function(L) {
|
|
229
|
+
return !a.excludeKeys(L);
|
|
230
|
+
})), i("object:" + l.length + ":"), f = this, l.forEach(function(L) {
|
|
231
|
+
f.dispatch(L), i(":"), a.excludeValues || f.dispatch(t[L]), i(",");
|
|
221
232
|
});
|
|
222
|
-
if (!this["_" +
|
|
223
|
-
if (
|
|
224
|
-
throw new Error('Unknown object type "' +
|
|
233
|
+
if (!this["_" + q]) {
|
|
234
|
+
if (a.ignoreUnknown) return i("[" + q + "]");
|
|
235
|
+
throw new Error('Unknown object type "' + q + '"');
|
|
225
236
|
}
|
|
226
|
-
this["_" +
|
|
227
|
-
}, _array: function(t,
|
|
228
|
-
|
|
237
|
+
this["_" + q](t);
|
|
238
|
+
}, _array: function(t, L) {
|
|
239
|
+
L = L !== void 0 ? L : a.unorderedArrays !== !1;
|
|
229
240
|
var l = this;
|
|
230
|
-
if (i("array:" + t.length + ":"), !
|
|
231
|
-
return l.dispatch(
|
|
241
|
+
if (i("array:" + t.length + ":"), !L || t.length <= 1) return t.forEach(function(k) {
|
|
242
|
+
return l.dispatch(k);
|
|
232
243
|
});
|
|
233
|
-
var
|
|
244
|
+
var q = [], L = t.map(function(k) {
|
|
234
245
|
var B = new C(), Y = r.slice();
|
|
235
|
-
return v(
|
|
246
|
+
return v(a, B, Y).dispatch(k), q = q.concat(Y.slice(r.length)), B.read().toString();
|
|
236
247
|
});
|
|
237
|
-
return r = r.concat(
|
|
248
|
+
return r = r.concat(q), L.sort(), this._array(L, !1);
|
|
238
249
|
}, _date: function(t) {
|
|
239
250
|
return i("date:" + t.toJSON());
|
|
240
251
|
}, _symbol: function(t) {
|
|
@@ -246,7 +257,7 @@ function Te() {
|
|
|
246
257
|
}, _string: function(t) {
|
|
247
258
|
i("string:" + t.length + ":"), i(t.toString());
|
|
248
259
|
}, _function: function(t) {
|
|
249
|
-
i("fn:"),
|
|
260
|
+
i("fn:"), E(t) ? this.dispatch("[native]") : this.dispatch(t.toString()), a.respectFunctionNames !== !1 && this.dispatch("function-name:" + String(t.name)), a.respectFunctionProperties && this._object(t);
|
|
250
261
|
}, _number: function(t) {
|
|
251
262
|
return i("number:" + t.toString());
|
|
252
263
|
}, _xml: function(t) {
|
|
@@ -280,13 +291,13 @@ function Te() {
|
|
|
280
291
|
}, _url: function(t) {
|
|
281
292
|
return i("url:" + t.toString());
|
|
282
293
|
}, _map: function(t) {
|
|
283
|
-
return i("map:"), t = Array.from(t), this._array(t,
|
|
294
|
+
return i("map:"), t = Array.from(t), this._array(t, a.unorderedSets !== !1);
|
|
284
295
|
}, _set: function(t) {
|
|
285
|
-
return i("set:"), t = Array.from(t), this._array(t,
|
|
296
|
+
return i("set:"), t = Array.from(t), this._array(t, a.unorderedSets !== !1);
|
|
286
297
|
}, _file: function(t) {
|
|
287
298
|
return i("file:"), this.dispatch([t.name, t.size, t.type, t.lastModfied]);
|
|
288
299
|
}, _blob: function() {
|
|
289
|
-
if (
|
|
300
|
+
if (a.ignoreUnknown) return i("[blob]");
|
|
290
301
|
throw Error(`Hashing Blob objects is currently not supported
|
|
291
302
|
(see https://github.com/puleos/object-hash/issues/26)
|
|
292
303
|
Use "options.replacer" or "options.ignoreUnknown"
|
|
@@ -332,58 +343,58 @@ Use "options.replacer" or "options.ignoreUnknown"
|
|
|
332
343
|
} };
|
|
333
344
|
}
|
|
334
345
|
function C() {
|
|
335
|
-
return { buf: "", write: function(
|
|
336
|
-
this.buf +=
|
|
337
|
-
}, end: function(
|
|
338
|
-
this.buf +=
|
|
346
|
+
return { buf: "", write: function(a) {
|
|
347
|
+
this.buf += a;
|
|
348
|
+
}, end: function(a) {
|
|
349
|
+
this.buf += a;
|
|
339
350
|
}, read: function() {
|
|
340
351
|
return this.buf;
|
|
341
352
|
} };
|
|
342
353
|
}
|
|
343
|
-
m.writeToStream = function(
|
|
344
|
-
return r === void 0 && (r = d, d = {}), v(d =
|
|
354
|
+
m.writeToStream = function(a, d, r) {
|
|
355
|
+
return r === void 0 && (r = d, d = {}), v(d = I(a, d), r).dispatch(a);
|
|
345
356
|
};
|
|
346
|
-
}).call(this,
|
|
347
|
-
}, { buffer: 3, crypto: 5, lYpoI2: 11 }], 2: [function(
|
|
348
|
-
(function(
|
|
349
|
-
(function(
|
|
350
|
-
var S = typeof Uint8Array < "u" ? Uint8Array : Array, c = 43,
|
|
357
|
+
}).call(this, u("lYpoI2"), typeof self < "u" ? self : typeof window < "u" ? window : {}, u("buffer").Buffer, arguments[3], arguments[4], arguments[5], arguments[6], "/fake_9a5aa49d.js", "/");
|
|
358
|
+
}, { buffer: 3, crypto: 5, lYpoI2: 11 }], 2: [function(u, p, m) {
|
|
359
|
+
(function(b, j, P, U, R, D, N, F, T) {
|
|
360
|
+
(function(_) {
|
|
361
|
+
var S = typeof Uint8Array < "u" ? Uint8Array : Array, c = 43, w = 47, I = 48, E = 97, v = 65, C = 45, a = 95;
|
|
351
362
|
function d(r) {
|
|
352
|
-
return r = r.charCodeAt(0), r === c || r === C ? 62 : r ===
|
|
363
|
+
return r = r.charCodeAt(0), r === c || r === C ? 62 : r === w || r === a ? 63 : r < I ? -1 : r < I + 10 ? r - I + 26 + 26 : r < v + 26 ? r - v : r < E + 26 ? r - E + 26 : void 0;
|
|
353
364
|
}
|
|
354
|
-
|
|
365
|
+
_.toByteArray = function(r) {
|
|
355
366
|
var i, t;
|
|
356
367
|
if (0 < r.length % 4) throw new Error("Invalid string. Length must be a multiple of 4");
|
|
357
|
-
var f = r.length, f = r.charAt(f - 2) === "=" ? 2 : r.charAt(f - 1) === "=" ? 1 : 0, l = new S(3 * r.length / 4 - f),
|
|
358
|
-
function
|
|
359
|
-
l[
|
|
368
|
+
var f = r.length, f = r.charAt(f - 2) === "=" ? 2 : r.charAt(f - 1) === "=" ? 1 : 0, l = new S(3 * r.length / 4 - f), q = 0 < f ? r.length - 4 : r.length, L = 0;
|
|
369
|
+
function k(B) {
|
|
370
|
+
l[L++] = B;
|
|
360
371
|
}
|
|
361
|
-
for (i = 0; i <
|
|
362
|
-
return f == 2 ?
|
|
363
|
-
},
|
|
364
|
-
var i, t, f, l,
|
|
365
|
-
function
|
|
372
|
+
for (i = 0; i < q; i += 4, 0) k((16711680 & (t = d(r.charAt(i)) << 18 | d(r.charAt(i + 1)) << 12 | d(r.charAt(i + 2)) << 6 | d(r.charAt(i + 3)))) >> 16), k((65280 & t) >> 8), k(255 & t);
|
|
373
|
+
return f == 2 ? k(255 & (t = d(r.charAt(i)) << 2 | d(r.charAt(i + 1)) >> 4)) : f == 1 && (k((t = d(r.charAt(i)) << 10 | d(r.charAt(i + 1)) << 4 | d(r.charAt(i + 2)) >> 2) >> 8 & 255), k(255 & t)), l;
|
|
374
|
+
}, _.fromByteArray = function(r) {
|
|
375
|
+
var i, t, f, l, q = r.length % 3, L = "";
|
|
376
|
+
function k(B) {
|
|
366
377
|
return "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(B);
|
|
367
378
|
}
|
|
368
|
-
for (i = 0, f = r.length -
|
|
369
|
-
switch (
|
|
379
|
+
for (i = 0, f = r.length - q; i < f; i += 3) t = (r[i] << 16) + (r[i + 1] << 8) + r[i + 2], L += k((l = t) >> 18 & 63) + k(l >> 12 & 63) + k(l >> 6 & 63) + k(63 & l);
|
|
380
|
+
switch (q) {
|
|
370
381
|
case 1:
|
|
371
|
-
|
|
382
|
+
L = (L += k((t = r[r.length - 1]) >> 2)) + k(t << 4 & 63) + "==";
|
|
372
383
|
break;
|
|
373
384
|
case 2:
|
|
374
|
-
|
|
385
|
+
L = (L = (L += k((t = (r[r.length - 2] << 8) + r[r.length - 1]) >> 10)) + k(t >> 4 & 63)) + k(t << 2 & 63) + "=";
|
|
375
386
|
}
|
|
376
|
-
return
|
|
387
|
+
return L;
|
|
377
388
|
};
|
|
378
389
|
})(m === void 0 ? this.base64js = {} : m);
|
|
379
|
-
}).call(this,
|
|
380
|
-
}, { buffer: 3, lYpoI2: 11 }], 3: [function(
|
|
381
|
-
(function(
|
|
382
|
-
var
|
|
390
|
+
}).call(this, u("lYpoI2"), typeof self < "u" ? self : typeof window < "u" ? window : {}, u("buffer").Buffer, arguments[3], arguments[4], arguments[5], arguments[6], "/node_modules/gulp-browserify/node_modules/base64-js/lib/b64.js", "/node_modules/gulp-browserify/node_modules/base64-js/lib");
|
|
391
|
+
}, { buffer: 3, lYpoI2: 11 }], 3: [function(u, p, m) {
|
|
392
|
+
(function(b, j, c, U, R, D, N, F, T) {
|
|
393
|
+
var _ = u("base64-js"), S = u("ieee754");
|
|
383
394
|
function c(e, n, o) {
|
|
384
395
|
if (!(this instanceof c)) return new c(e, n, o);
|
|
385
|
-
var y, g,
|
|
386
|
-
if (n === "base64" && $ == "string") for (e = (
|
|
396
|
+
var y, g, A, O, $ = typeof e;
|
|
397
|
+
if (n === "base64" && $ == "string") for (e = (O = e).trim ? O.trim() : O.replace(/^\s+|\s+$/g, ""); e.length % 4 != 0; ) e += "=";
|
|
387
398
|
if ($ == "number") y = J(e);
|
|
388
399
|
else if ($ == "string") y = c.byteLength(e, n);
|
|
389
400
|
else {
|
|
@@ -391,68 +402,68 @@ Use "options.replacer" or "options.ignoreUnknown"
|
|
|
391
402
|
y = J(e.length);
|
|
392
403
|
}
|
|
393
404
|
if (c._useTypedArrays ? g = c._augment(new Uint8Array(y)) : ((g = this).length = y, g._isBuffer = !0), c._useTypedArrays && typeof e.byteLength == "number") g._set(e);
|
|
394
|
-
else if (z(
|
|
405
|
+
else if (z(O = e) || c.isBuffer(O) || O && typeof O == "object" && typeof O.length == "number") for (A = 0; A < y; A++) c.isBuffer(e) ? g[A] = e.readUInt8(A) : g[A] = e[A];
|
|
395
406
|
else if ($ == "string") g.write(e, 0, n);
|
|
396
|
-
else if ($ == "number" && !c._useTypedArrays && !o) for (
|
|
407
|
+
else if ($ == "number" && !c._useTypedArrays && !o) for (A = 0; A < y; A++) g[A] = 0;
|
|
397
408
|
return g;
|
|
398
409
|
}
|
|
399
|
-
function
|
|
410
|
+
function w(e, n, o, y) {
|
|
400
411
|
return c._charsWritten = ne((function(g) {
|
|
401
|
-
for (var
|
|
402
|
-
return
|
|
412
|
+
for (var A = [], O = 0; O < g.length; O++) A.push(255 & g.charCodeAt(O));
|
|
413
|
+
return A;
|
|
403
414
|
})(n), e, o, y);
|
|
404
415
|
}
|
|
405
|
-
function
|
|
416
|
+
function I(e, n, o, y) {
|
|
406
417
|
return c._charsWritten = ne((function(g) {
|
|
407
|
-
for (var
|
|
418
|
+
for (var A, O, $ = [], H = 0; H < g.length; H++) O = g.charCodeAt(H), A = O >> 8, O = O % 256, $.push(O), $.push(A);
|
|
408
419
|
return $;
|
|
409
420
|
})(n), e, o, y);
|
|
410
421
|
}
|
|
411
|
-
function
|
|
422
|
+
function E(e, n, o) {
|
|
412
423
|
var y = "";
|
|
413
424
|
o = Math.min(e.length, o);
|
|
414
425
|
for (var g = n; g < o; g++) y += String.fromCharCode(e[g]);
|
|
415
426
|
return y;
|
|
416
427
|
}
|
|
417
|
-
function v(e, n, o,
|
|
418
|
-
|
|
419
|
-
var g,
|
|
420
|
-
if (!(
|
|
428
|
+
function v(e, n, o, A) {
|
|
429
|
+
A || (x(typeof o == "boolean", "missing or invalid endian"), x(n != null, "missing offset"), x(n + 1 < e.length, "Trying to read beyond buffer length"));
|
|
430
|
+
var g, A = e.length;
|
|
431
|
+
if (!(A <= n)) return o ? (g = e[n], n + 1 < A && (g |= e[n + 1] << 8)) : (g = e[n] << 8, n + 1 < A && (g |= e[n + 1])), g;
|
|
421
432
|
}
|
|
422
|
-
function C(e, n, o,
|
|
423
|
-
|
|
424
|
-
var g,
|
|
425
|
-
if (!(
|
|
433
|
+
function C(e, n, o, A) {
|
|
434
|
+
A || (x(typeof o == "boolean", "missing or invalid endian"), x(n != null, "missing offset"), x(n + 3 < e.length, "Trying to read beyond buffer length"));
|
|
435
|
+
var g, A = e.length;
|
|
436
|
+
if (!(A <= n)) return o ? (n + 2 < A && (g = e[n + 2] << 16), n + 1 < A && (g |= e[n + 1] << 8), g |= e[n], n + 3 < A && (g += e[n + 3] << 24 >>> 0)) : (n + 1 < A && (g = e[n + 1] << 16), n + 2 < A && (g |= e[n + 2] << 8), n + 3 < A && (g |= e[n + 3]), g += e[n] << 24 >>> 0), g;
|
|
426
437
|
}
|
|
427
|
-
function
|
|
428
|
-
if (y || (
|
|
438
|
+
function a(e, n, o, y) {
|
|
439
|
+
if (y || (x(typeof o == "boolean", "missing or invalid endian"), x(n != null, "missing offset"), x(n + 1 < e.length, "Trying to read beyond buffer length")), !(e.length <= n)) return y = v(e, n, o, !0), 32768 & y ? -1 * (65535 - y + 1) : y;
|
|
429
440
|
}
|
|
430
441
|
function d(e, n, o, y) {
|
|
431
|
-
if (y || (
|
|
442
|
+
if (y || (x(typeof o == "boolean", "missing or invalid endian"), x(n != null, "missing offset"), x(n + 3 < e.length, "Trying to read beyond buffer length")), !(e.length <= n)) return y = C(e, n, o, !0), 2147483648 & y ? -1 * (4294967295 - y + 1) : y;
|
|
432
443
|
}
|
|
433
444
|
function r(e, n, o, y) {
|
|
434
|
-
return y || (
|
|
445
|
+
return y || (x(typeof o == "boolean", "missing or invalid endian"), x(n + 3 < e.length, "Trying to read beyond buffer length")), S.read(e, n, o, 23, 4);
|
|
435
446
|
}
|
|
436
447
|
function i(e, n, o, y) {
|
|
437
|
-
return y || (
|
|
448
|
+
return y || (x(typeof o == "boolean", "missing or invalid endian"), x(n + 7 < e.length, "Trying to read beyond buffer length")), S.read(e, n, o, 52, 8);
|
|
438
449
|
}
|
|
439
450
|
function t(e, n, o, y, g) {
|
|
440
|
-
if (g || (
|
|
451
|
+
if (g || (x(n != null, "missing value"), x(typeof y == "boolean", "missing or invalid endian"), x(o != null, "missing offset"), x(o + 1 < e.length, "trying to write beyond buffer length"), fe(n, 65535)), g = e.length, !(g <= o)) for (var A = 0, O = Math.min(g - o, 2); A < O; A++) e[o + A] = (n & 255 << 8 * (y ? A : 1 - A)) >>> 8 * (y ? A : 1 - A);
|
|
441
452
|
}
|
|
442
453
|
function f(e, n, o, y, g) {
|
|
443
|
-
if (g || (
|
|
454
|
+
if (g || (x(n != null, "missing value"), x(typeof y == "boolean", "missing or invalid endian"), x(o != null, "missing offset"), x(o + 3 < e.length, "trying to write beyond buffer length"), fe(n, 4294967295)), g = e.length, !(g <= o)) for (var A = 0, O = Math.min(g - o, 4); A < O; A++) e[o + A] = n >>> 8 * (y ? A : 3 - A) & 255;
|
|
444
455
|
}
|
|
445
456
|
function l(e, n, o, y, g) {
|
|
446
|
-
g || (
|
|
457
|
+
g || (x(n != null, "missing value"), x(typeof y == "boolean", "missing or invalid endian"), x(o != null, "missing offset"), x(o + 1 < e.length, "Trying to write beyond buffer length"), le(n, 32767, -32768)), e.length <= o || t(e, 0 <= n ? n : 65535 + n + 1, o, y, g);
|
|
447
458
|
}
|
|
448
|
-
function
|
|
449
|
-
g || (
|
|
459
|
+
function q(e, n, o, y, g) {
|
|
460
|
+
g || (x(n != null, "missing value"), x(typeof y == "boolean", "missing or invalid endian"), x(o != null, "missing offset"), x(o + 3 < e.length, "Trying to write beyond buffer length"), le(n, 2147483647, -2147483648)), e.length <= o || f(e, 0 <= n ? n : 4294967295 + n + 1, o, y, g);
|
|
450
461
|
}
|
|
451
|
-
function
|
|
452
|
-
g || (
|
|
462
|
+
function L(e, n, o, y, g) {
|
|
463
|
+
g || (x(n != null, "missing value"), x(typeof y == "boolean", "missing or invalid endian"), x(o != null, "missing offset"), x(o + 3 < e.length, "Trying to write beyond buffer length"), ve(n, 34028234663852886e22, -34028234663852886e22)), e.length <= o || S.write(e, n, o, y, 23, 4);
|
|
453
464
|
}
|
|
454
|
-
function
|
|
455
|
-
g || (
|
|
465
|
+
function k(e, n, o, y, g) {
|
|
466
|
+
g || (x(n != null, "missing value"), x(typeof y == "boolean", "missing or invalid endian"), x(o != null, "missing offset"), x(o + 7 < e.length, "Trying to write beyond buffer length"), ve(n, 17976931348623157e292, -17976931348623157e292)), e.length <= o || S.write(e, n, o, y, 52, 8);
|
|
456
467
|
}
|
|
457
468
|
m.Buffer = c, m.SlowBuffer = c, m.INSPECT_MAX_BYTES = 50, c.poolSize = 8192, c._useTypedArrays = (function() {
|
|
458
469
|
try {
|
|
@@ -498,7 +509,7 @@ Use "options.replacer" or "options.ignoreUnknown"
|
|
|
498
509
|
o = e.length;
|
|
499
510
|
break;
|
|
500
511
|
case "base64":
|
|
501
|
-
o =
|
|
512
|
+
o = be(e).length;
|
|
502
513
|
break;
|
|
503
514
|
case "ucs2":
|
|
504
515
|
case "ucs-2":
|
|
@@ -511,61 +522,61 @@ Use "options.replacer" or "options.ignoreUnknown"
|
|
|
511
522
|
}
|
|
512
523
|
return o;
|
|
513
524
|
}, c.concat = function(e, n) {
|
|
514
|
-
if (
|
|
525
|
+
if (x(z(e), `Usage: Buffer.concat(list, [totalLength])
|
|
515
526
|
list should be an Array.`), e.length === 0) return new c(0);
|
|
516
527
|
if (e.length === 1) return e[0];
|
|
517
528
|
if (typeof n != "number") for (g = n = 0; g < e.length; g++) n += e[g].length;
|
|
518
529
|
for (var o = new c(n), y = 0, g = 0; g < e.length; g++) {
|
|
519
|
-
var
|
|
520
|
-
|
|
530
|
+
var A = e[g];
|
|
531
|
+
A.copy(o, y), y += A.length;
|
|
521
532
|
}
|
|
522
533
|
return o;
|
|
523
534
|
}, c.prototype.write = function(e, n, o, y) {
|
|
524
535
|
isFinite(n) ? isFinite(o) || (y = o, o = void 0) : (H = y, y = n, n = o, o = H), n = Number(n) || 0;
|
|
525
|
-
var g,
|
|
536
|
+
var g, A, O, $, H = this.length - n;
|
|
526
537
|
switch ((!o || H < (o = Number(o))) && (o = H), y = String(y || "utf8").toLowerCase()) {
|
|
527
538
|
case "hex":
|
|
528
539
|
g = (function(Q, K, X, G) {
|
|
529
540
|
X = Number(X) || 0;
|
|
530
541
|
var V = Q.length - X;
|
|
531
|
-
(!G || V < (G = Number(G))) && (G = V),
|
|
542
|
+
(!G || V < (G = Number(G))) && (G = V), x((V = K.length) % 2 == 0, "Invalid hex string"), V / 2 < G && (G = V / 2);
|
|
532
543
|
for (var ee = 0; ee < G; ee++) {
|
|
533
|
-
var
|
|
534
|
-
|
|
544
|
+
var _e = parseInt(K.substr(2 * ee, 2), 16);
|
|
545
|
+
x(!isNaN(_e), "Invalid hex string"), Q[X + ee] = _e;
|
|
535
546
|
}
|
|
536
547
|
return c._charsWritten = 2 * ee, ee;
|
|
537
548
|
})(this, e, n, o);
|
|
538
549
|
break;
|
|
539
550
|
case "utf8":
|
|
540
551
|
case "utf-8":
|
|
541
|
-
|
|
552
|
+
A = this, O = n, $ = o, g = c._charsWritten = ne(Z(e), A, O, $);
|
|
542
553
|
break;
|
|
543
554
|
case "ascii":
|
|
544
555
|
case "binary":
|
|
545
|
-
g =
|
|
556
|
+
g = w(this, e, n, o);
|
|
546
557
|
break;
|
|
547
558
|
case "base64":
|
|
548
|
-
|
|
559
|
+
A = this, O = n, $ = o, g = c._charsWritten = ne(be(e), A, O, $);
|
|
549
560
|
break;
|
|
550
561
|
case "ucs2":
|
|
551
562
|
case "ucs-2":
|
|
552
563
|
case "utf16le":
|
|
553
564
|
case "utf-16le":
|
|
554
|
-
g =
|
|
565
|
+
g = I(this, e, n, o);
|
|
555
566
|
break;
|
|
556
567
|
default:
|
|
557
568
|
throw new Error("Unknown encoding");
|
|
558
569
|
}
|
|
559
570
|
return g;
|
|
560
571
|
}, c.prototype.toString = function(e, n, o) {
|
|
561
|
-
var y, g,
|
|
572
|
+
var y, g, A, O, $ = this;
|
|
562
573
|
if (e = String(e || "utf8").toLowerCase(), n = Number(n) || 0, (o = o !== void 0 ? Number(o) : $.length) === n) return "";
|
|
563
574
|
switch (e) {
|
|
564
575
|
case "hex":
|
|
565
576
|
y = (function(H, Q, K) {
|
|
566
577
|
var X = H.length;
|
|
567
578
|
(!Q || Q < 0) && (Q = 0), (!K || K < 0 || X < K) && (K = X);
|
|
568
|
-
for (var G = "", V = Q; V < K; V++) G +=
|
|
579
|
+
for (var G = "", V = Q; V < K; V++) G += M(H[V]);
|
|
569
580
|
return G;
|
|
570
581
|
})($, n, o);
|
|
571
582
|
break;
|
|
@@ -574,16 +585,16 @@ list should be an Array.`), e.length === 0) return new c(0);
|
|
|
574
585
|
y = (function(H, Q, K) {
|
|
575
586
|
var X = "", G = "";
|
|
576
587
|
K = Math.min(H.length, K);
|
|
577
|
-
for (var V = Q; V < K; V++) H[V] <= 127 ? (X +=
|
|
578
|
-
return X +
|
|
588
|
+
for (var V = Q; V < K; V++) H[V] <= 127 ? (X += we(G) + String.fromCharCode(H[V]), G = "") : G += "%" + H[V].toString(16);
|
|
589
|
+
return X + we(G);
|
|
579
590
|
})($, n, o);
|
|
580
591
|
break;
|
|
581
592
|
case "ascii":
|
|
582
593
|
case "binary":
|
|
583
|
-
y =
|
|
594
|
+
y = E($, n, o);
|
|
584
595
|
break;
|
|
585
596
|
case "base64":
|
|
586
|
-
g = $,
|
|
597
|
+
g = $, O = o, y = (A = n) === 0 && O === g.length ? _.fromByteArray(g) : _.fromByteArray(g.slice(A, O));
|
|
587
598
|
break;
|
|
588
599
|
case "ucs2":
|
|
589
600
|
case "ucs-2":
|
|
@@ -602,22 +613,22 @@ list should be an Array.`), e.length === 0) return new c(0);
|
|
|
602
613
|
return { type: "Buffer", data: Array.prototype.slice.call(this._arr || this, 0) };
|
|
603
614
|
}, c.prototype.copy = function(e, n, o, y) {
|
|
604
615
|
if (n = n || 0, (y = y || y === 0 ? y : this.length) !== (o = o || 0) && e.length !== 0 && this.length !== 0) {
|
|
605
|
-
|
|
616
|
+
x(o <= y, "sourceEnd < sourceStart"), x(0 <= n && n < e.length, "targetStart out of bounds"), x(0 <= o && o < this.length, "sourceStart out of bounds"), x(0 <= y && y <= this.length, "sourceEnd out of bounds"), y > this.length && (y = this.length);
|
|
606
617
|
var g = (y = e.length - n < y - o ? e.length - n + o : y) - o;
|
|
607
|
-
if (g < 100 || !c._useTypedArrays) for (var
|
|
618
|
+
if (g < 100 || !c._useTypedArrays) for (var A = 0; A < g; A++) e[A + n] = this[A + o];
|
|
608
619
|
else e._set(this.subarray(o, o + g), n);
|
|
609
620
|
}
|
|
610
621
|
}, c.prototype.slice = function(e, n) {
|
|
611
622
|
var o = this.length;
|
|
612
623
|
if (e = Y(e, o, 0), n = Y(n, o, o), c._useTypedArrays) return c._augment(this.subarray(e, n));
|
|
613
|
-
for (var y = n - e, g = new c(y, void 0, !0),
|
|
624
|
+
for (var y = n - e, g = new c(y, void 0, !0), A = 0; A < y; A++) g[A] = this[A + e];
|
|
614
625
|
return g;
|
|
615
626
|
}, c.prototype.get = function(e) {
|
|
616
627
|
return console.log(".get() is deprecated. Access using array indexes instead."), this.readUInt8(e);
|
|
617
628
|
}, c.prototype.set = function(e, n) {
|
|
618
629
|
return console.log(".set() is deprecated. Access using array indexes instead."), this.writeUInt8(e, n);
|
|
619
630
|
}, c.prototype.readUInt8 = function(e, n) {
|
|
620
|
-
if (n || (
|
|
631
|
+
if (n || (x(e != null, "missing offset"), x(e < this.length, "Trying to read beyond buffer length")), !(e >= this.length)) return this[e];
|
|
621
632
|
}, c.prototype.readUInt16LE = function(e, n) {
|
|
622
633
|
return v(this, e, !0, n);
|
|
623
634
|
}, c.prototype.readUInt16BE = function(e, n) {
|
|
@@ -627,11 +638,11 @@ list should be an Array.`), e.length === 0) return new c(0);
|
|
|
627
638
|
}, c.prototype.readUInt32BE = function(e, n) {
|
|
628
639
|
return C(this, e, !1, n);
|
|
629
640
|
}, c.prototype.readInt8 = function(e, n) {
|
|
630
|
-
if (n || (
|
|
641
|
+
if (n || (x(e != null, "missing offset"), x(e < this.length, "Trying to read beyond buffer length")), !(e >= this.length)) return 128 & this[e] ? -1 * (255 - this[e] + 1) : this[e];
|
|
631
642
|
}, c.prototype.readInt16LE = function(e, n) {
|
|
632
|
-
return
|
|
643
|
+
return a(this, e, !0, n);
|
|
633
644
|
}, c.prototype.readInt16BE = function(e, n) {
|
|
634
|
-
return
|
|
645
|
+
return a(this, e, !1, n);
|
|
635
646
|
}, c.prototype.readInt32LE = function(e, n) {
|
|
636
647
|
return d(this, e, !0, n);
|
|
637
648
|
}, c.prototype.readInt32BE = function(e, n) {
|
|
@@ -645,7 +656,7 @@ list should be an Array.`), e.length === 0) return new c(0);
|
|
|
645
656
|
}, c.prototype.readDoubleBE = function(e, n) {
|
|
646
657
|
return i(this, e, !1, n);
|
|
647
658
|
}, c.prototype.writeUInt8 = function(e, n, o) {
|
|
648
|
-
o || (
|
|
659
|
+
o || (x(e != null, "missing value"), x(n != null, "missing offset"), x(n < this.length, "trying to write beyond buffer length"), fe(e, 255)), n >= this.length || (this[n] = e);
|
|
649
660
|
}, c.prototype.writeUInt16LE = function(e, n, o) {
|
|
650
661
|
t(this, e, n, !0, o);
|
|
651
662
|
}, c.prototype.writeUInt16BE = function(e, n, o) {
|
|
@@ -655,30 +666,30 @@ list should be an Array.`), e.length === 0) return new c(0);
|
|
|
655
666
|
}, c.prototype.writeUInt32BE = function(e, n, o) {
|
|
656
667
|
f(this, e, n, !1, o);
|
|
657
668
|
}, c.prototype.writeInt8 = function(e, n, o) {
|
|
658
|
-
o || (
|
|
669
|
+
o || (x(e != null, "missing value"), x(n != null, "missing offset"), x(n < this.length, "Trying to write beyond buffer length"), le(e, 127, -128)), n >= this.length || (0 <= e ? this.writeUInt8(e, n, o) : this.writeUInt8(255 + e + 1, n, o));
|
|
659
670
|
}, c.prototype.writeInt16LE = function(e, n, o) {
|
|
660
671
|
l(this, e, n, !0, o);
|
|
661
672
|
}, c.prototype.writeInt16BE = function(e, n, o) {
|
|
662
673
|
l(this, e, n, !1, o);
|
|
663
674
|
}, c.prototype.writeInt32LE = function(e, n, o) {
|
|
664
|
-
|
|
675
|
+
q(this, e, n, !0, o);
|
|
665
676
|
}, c.prototype.writeInt32BE = function(e, n, o) {
|
|
666
|
-
|
|
677
|
+
q(this, e, n, !1, o);
|
|
667
678
|
}, c.prototype.writeFloatLE = function(e, n, o) {
|
|
668
|
-
|
|
679
|
+
L(this, e, n, !0, o);
|
|
669
680
|
}, c.prototype.writeFloatBE = function(e, n, o) {
|
|
670
|
-
|
|
681
|
+
L(this, e, n, !1, o);
|
|
671
682
|
}, c.prototype.writeDoubleLE = function(e, n, o) {
|
|
672
|
-
|
|
683
|
+
k(this, e, n, !0, o);
|
|
673
684
|
}, c.prototype.writeDoubleBE = function(e, n, o) {
|
|
674
|
-
|
|
685
|
+
k(this, e, n, !1, o);
|
|
675
686
|
}, c.prototype.fill = function(e, n, o) {
|
|
676
|
-
if (n = n || 0, o = o || this.length,
|
|
677
|
-
|
|
687
|
+
if (n = n || 0, o = o || this.length, x(typeof (e = typeof (e = e || 0) == "string" ? e.charCodeAt(0) : e) == "number" && !isNaN(e), "value is not a number"), x(n <= o, "end < start"), o !== n && this.length !== 0) {
|
|
688
|
+
x(0 <= n && n < this.length, "start out of bounds"), x(0 <= o && o <= this.length, "end out of bounds");
|
|
678
689
|
for (var y = n; y < o; y++) this[y] = e;
|
|
679
690
|
}
|
|
680
691
|
}, c.prototype.inspect = function() {
|
|
681
|
-
for (var e = [], n = this.length, o = 0; o < n; o++) if (e[o] =
|
|
692
|
+
for (var e = [], n = this.length, o = 0; o < n; o++) if (e[o] = M(this[o]), o === m.INSPECT_MAX_BYTES) {
|
|
682
693
|
e[o + 1] = "...";
|
|
683
694
|
break;
|
|
684
695
|
}
|
|
@@ -701,25 +712,25 @@ list should be an Array.`), e.length === 0) return new c(0);
|
|
|
701
712
|
return Object.prototype.toString.call(n) === "[object Array]";
|
|
702
713
|
})(e);
|
|
703
714
|
}
|
|
704
|
-
function
|
|
715
|
+
function M(e) {
|
|
705
716
|
return e < 16 ? "0" + e.toString(16) : e.toString(16);
|
|
706
717
|
}
|
|
707
718
|
function Z(e) {
|
|
708
719
|
for (var n = [], o = 0; o < e.length; o++) {
|
|
709
720
|
var y = e.charCodeAt(o);
|
|
710
721
|
if (y <= 127) n.push(e.charCodeAt(o));
|
|
711
|
-
else for (var g = o,
|
|
722
|
+
else for (var g = o, A = (55296 <= y && y <= 57343 && o++, encodeURIComponent(e.slice(g, o + 1)).substr(1).split("%")), O = 0; O < A.length; O++) n.push(parseInt(A[O], 16));
|
|
712
723
|
}
|
|
713
724
|
return n;
|
|
714
725
|
}
|
|
715
|
-
function
|
|
716
|
-
return
|
|
726
|
+
function be(e) {
|
|
727
|
+
return _.toByteArray(e);
|
|
717
728
|
}
|
|
718
729
|
function ne(e, n, o, y) {
|
|
719
730
|
for (var g = 0; g < y && !(g + o >= n.length || g >= e.length); g++) n[g + o] = e[g];
|
|
720
731
|
return g;
|
|
721
732
|
}
|
|
722
|
-
function
|
|
733
|
+
function we(e) {
|
|
723
734
|
try {
|
|
724
735
|
return decodeURIComponent(e);
|
|
725
736
|
} catch {
|
|
@@ -727,50 +738,50 @@ list should be an Array.`), e.length === 0) return new c(0);
|
|
|
727
738
|
}
|
|
728
739
|
}
|
|
729
740
|
function fe(e, n) {
|
|
730
|
-
|
|
741
|
+
x(typeof e == "number", "cannot write a non-number as a number"), x(0 <= e, "specified a negative value for writing an unsigned value"), x(e <= n, "value is larger than maximum value for type"), x(Math.floor(e) === e, "value has a fractional component");
|
|
731
742
|
}
|
|
732
743
|
function le(e, n, o) {
|
|
733
|
-
|
|
744
|
+
x(typeof e == "number", "cannot write a non-number as a number"), x(e <= n, "value larger than maximum allowed value"), x(o <= e, "value smaller than minimum allowed value"), x(Math.floor(e) === e, "value has a fractional component");
|
|
734
745
|
}
|
|
735
|
-
function
|
|
736
|
-
|
|
746
|
+
function ve(e, n, o) {
|
|
747
|
+
x(typeof e == "number", "cannot write a non-number as a number"), x(e <= n, "value larger than maximum allowed value"), x(o <= e, "value smaller than minimum allowed value");
|
|
737
748
|
}
|
|
738
|
-
function
|
|
749
|
+
function x(e, n) {
|
|
739
750
|
if (!e) throw new Error(n || "Failed assertion");
|
|
740
751
|
}
|
|
741
752
|
c._augment = function(e) {
|
|
742
753
|
return e._isBuffer = !0, e._get = e.get, e._set = e.set, e.get = B.get, e.set = B.set, e.write = B.write, e.toString = B.toString, e.toLocaleString = B.toString, e.toJSON = B.toJSON, e.copy = B.copy, e.slice = B.slice, e.readUInt8 = B.readUInt8, e.readUInt16LE = B.readUInt16LE, e.readUInt16BE = B.readUInt16BE, e.readUInt32LE = B.readUInt32LE, e.readUInt32BE = B.readUInt32BE, e.readInt8 = B.readInt8, e.readInt16LE = B.readInt16LE, e.readInt16BE = B.readInt16BE, e.readInt32LE = B.readInt32LE, e.readInt32BE = B.readInt32BE, e.readFloatLE = B.readFloatLE, e.readFloatBE = B.readFloatBE, e.readDoubleLE = B.readDoubleLE, e.readDoubleBE = B.readDoubleBE, e.writeUInt8 = B.writeUInt8, e.writeUInt16LE = B.writeUInt16LE, e.writeUInt16BE = B.writeUInt16BE, e.writeUInt32LE = B.writeUInt32LE, e.writeUInt32BE = B.writeUInt32BE, e.writeInt8 = B.writeInt8, e.writeInt16LE = B.writeInt16LE, e.writeInt16BE = B.writeInt16BE, e.writeInt32LE = B.writeInt32LE, e.writeInt32BE = B.writeInt32BE, e.writeFloatLE = B.writeFloatLE, e.writeFloatBE = B.writeFloatBE, e.writeDoubleLE = B.writeDoubleLE, e.writeDoubleBE = B.writeDoubleBE, e.fill = B.fill, e.inspect = B.inspect, e.toArrayBuffer = B.toArrayBuffer, e;
|
|
743
754
|
};
|
|
744
|
-
}).call(this,
|
|
745
|
-
}, { "base64-js": 2, buffer: 3, ieee754: 10, lYpoI2: 11 }], 4: [function(
|
|
746
|
-
(function(
|
|
747
|
-
var
|
|
748
|
-
c.fill(0), p.exports = { hash: function(
|
|
749
|
-
for (var C =
|
|
750
|
-
t.length % S != 0 && (l = t.length + (S - t.length % S), t =
|
|
751
|
-
for (var l,
|
|
752
|
-
return
|
|
753
|
-
})(
|
|
754
|
-
return
|
|
755
|
+
}).call(this, u("lYpoI2"), typeof self < "u" ? self : typeof window < "u" ? window : {}, u("buffer").Buffer, arguments[3], arguments[4], arguments[5], arguments[6], "/node_modules/gulp-browserify/node_modules/buffer/index.js", "/node_modules/gulp-browserify/node_modules/buffer");
|
|
756
|
+
}, { "base64-js": 2, buffer: 3, ieee754: 10, lYpoI2: 11 }], 4: [function(u, p, m) {
|
|
757
|
+
(function(b, j, _, U, R, D, N, F, T) {
|
|
758
|
+
var _ = u("buffer").Buffer, S = 4, c = new _(S);
|
|
759
|
+
c.fill(0), p.exports = { hash: function(w, I, E, v) {
|
|
760
|
+
for (var C = I((function(t, f) {
|
|
761
|
+
t.length % S != 0 && (l = t.length + (S - t.length % S), t = _.concat([t, c], l));
|
|
762
|
+
for (var l, q = [], L = f ? t.readInt32BE : t.readInt32LE, k = 0; k < t.length; k += S) q.push(L.call(t, k));
|
|
763
|
+
return q;
|
|
764
|
+
})(w = _.isBuffer(w) ? w : new _(w), v), 8 * w.length), I = v, a = new _(E), d = I ? a.writeInt32BE : a.writeInt32LE, r = 0; r < C.length; r++) d.call(a, C[r], 4 * r, !0);
|
|
765
|
+
return a;
|
|
755
766
|
} };
|
|
756
|
-
}).call(this,
|
|
757
|
-
}, { buffer: 3, lYpoI2: 11 }], 5: [function(
|
|
758
|
-
(function(
|
|
759
|
-
var
|
|
767
|
+
}).call(this, u("lYpoI2"), typeof self < "u" ? self : typeof window < "u" ? window : {}, u("buffer").Buffer, arguments[3], arguments[4], arguments[5], arguments[6], "/node_modules/gulp-browserify/node_modules/crypto-browserify/helpers.js", "/node_modules/gulp-browserify/node_modules/crypto-browserify");
|
|
768
|
+
}, { buffer: 3, lYpoI2: 11 }], 5: [function(u, p, m) {
|
|
769
|
+
(function(b, j, _, U, R, D, N, F, T) {
|
|
770
|
+
var _ = u("buffer").Buffer, S = u("./sha"), c = u("./sha256"), w = u("./rng"), I = { sha1: S, sha256: c, md5: u("./md5") }, E = 64, v = new _(E);
|
|
760
771
|
function C(t, f) {
|
|
761
|
-
var l =
|
|
762
|
-
return l ||
|
|
763
|
-
return
|
|
764
|
-
}, digest: function(
|
|
765
|
-
var
|
|
766
|
-
|
|
767
|
-
for (var z = new
|
|
768
|
-
return J = B(
|
|
769
|
-
})(l, f,
|
|
770
|
-
return
|
|
772
|
+
var l = I[t = t || "sha1"], q = [];
|
|
773
|
+
return l || a("algorithm:", t, "is not yet supported"), { update: function(L) {
|
|
774
|
+
return _.isBuffer(L) || (L = new _(L)), q.push(L), L.length, this;
|
|
775
|
+
}, digest: function(L) {
|
|
776
|
+
var k = _.concat(q), k = f ? (function(B, Y, J) {
|
|
777
|
+
_.isBuffer(Y) || (Y = new _(Y)), _.isBuffer(J) || (J = new _(J)), Y.length > E ? Y = B(Y) : Y.length < E && (Y = _.concat([Y, v], E));
|
|
778
|
+
for (var z = new _(E), M = new _(E), Z = 0; Z < E; Z++) z[Z] = 54 ^ Y[Z], M[Z] = 92 ^ Y[Z];
|
|
779
|
+
return J = B(_.concat([z, J])), B(_.concat([M, J]));
|
|
780
|
+
})(l, f, k) : l(k);
|
|
781
|
+
return q = null, L ? k.toString(L) : k;
|
|
771
782
|
} };
|
|
772
783
|
}
|
|
773
|
-
function
|
|
784
|
+
function a() {
|
|
774
785
|
var t = [].slice.call(arguments).join(" ");
|
|
775
786
|
throw new Error([t, "we accept pull requests", "http://github.com/dominictarr/crypto-browserify"].join(`
|
|
776
787
|
`));
|
|
@@ -778,164 +789,164 @@ list should be an Array.`), e.length === 0) return new c(0);
|
|
|
778
789
|
v.fill(0), m.createHash = function(t) {
|
|
779
790
|
return C(t);
|
|
780
791
|
}, m.createHmac = C, m.randomBytes = function(t, f) {
|
|
781
|
-
if (!f || !f.call) return new
|
|
792
|
+
if (!f || !f.call) return new _(w(t));
|
|
782
793
|
try {
|
|
783
|
-
f.call(this, void 0, new
|
|
794
|
+
f.call(this, void 0, new _(w(t)));
|
|
784
795
|
} catch (l) {
|
|
785
796
|
f(l);
|
|
786
797
|
}
|
|
787
798
|
};
|
|
788
799
|
var d, r = ["createCredentials", "createCipher", "createCipheriv", "createDecipher", "createDecipheriv", "createSign", "createVerify", "createDiffieHellman", "pbkdf2"], i = function(t) {
|
|
789
800
|
m[t] = function() {
|
|
790
|
-
|
|
801
|
+
a("sorry,", t, "is not implemented yet");
|
|
791
802
|
};
|
|
792
803
|
};
|
|
793
804
|
for (d in r) i(r[d]);
|
|
794
|
-
}).call(this,
|
|
795
|
-
}, { "./md5": 6, "./rng": 7, "./sha": 8, "./sha256": 9, buffer: 3, lYpoI2: 11 }], 6: [function(
|
|
796
|
-
(function(
|
|
797
|
-
var
|
|
798
|
-
function S(
|
|
799
|
-
|
|
800
|
-
for (var r = 1732584193, i = -271733879, t = -1732584194, f = 271733878, l = 0; l <
|
|
801
|
-
var
|
|
802
|
-
r =
|
|
805
|
+
}).call(this, u("lYpoI2"), typeof self < "u" ? self : typeof window < "u" ? window : {}, u("buffer").Buffer, arguments[3], arguments[4], arguments[5], arguments[6], "/node_modules/gulp-browserify/node_modules/crypto-browserify/index.js", "/node_modules/gulp-browserify/node_modules/crypto-browserify");
|
|
806
|
+
}, { "./md5": 6, "./rng": 7, "./sha": 8, "./sha256": 9, buffer: 3, lYpoI2: 11 }], 6: [function(u, p, m) {
|
|
807
|
+
(function(b, j, P, U, R, D, N, F, T) {
|
|
808
|
+
var _ = u("./helpers");
|
|
809
|
+
function S(a, d) {
|
|
810
|
+
a[d >> 5] |= 128 << d % 32, a[14 + (d + 64 >>> 9 << 4)] = d;
|
|
811
|
+
for (var r = 1732584193, i = -271733879, t = -1732584194, f = 271733878, l = 0; l < a.length; l += 16) {
|
|
812
|
+
var q = r, L = i, k = t, B = f, r = w(r, i, t, f, a[l + 0], 7, -680876936), f = w(f, r, i, t, a[l + 1], 12, -389564586), t = w(t, f, r, i, a[l + 2], 17, 606105819), i = w(i, t, f, r, a[l + 3], 22, -1044525330);
|
|
813
|
+
r = w(r, i, t, f, a[l + 4], 7, -176418897), f = w(f, r, i, t, a[l + 5], 12, 1200080426), t = w(t, f, r, i, a[l + 6], 17, -1473231341), i = w(i, t, f, r, a[l + 7], 22, -45705983), r = w(r, i, t, f, a[l + 8], 7, 1770035416), f = w(f, r, i, t, a[l + 9], 12, -1958414417), t = w(t, f, r, i, a[l + 10], 17, -42063), i = w(i, t, f, r, a[l + 11], 22, -1990404162), r = w(r, i, t, f, a[l + 12], 7, 1804603682), f = w(f, r, i, t, a[l + 13], 12, -40341101), t = w(t, f, r, i, a[l + 14], 17, -1502002290), r = I(r, i = w(i, t, f, r, a[l + 15], 22, 1236535329), t, f, a[l + 1], 5, -165796510), f = I(f, r, i, t, a[l + 6], 9, -1069501632), t = I(t, f, r, i, a[l + 11], 14, 643717713), i = I(i, t, f, r, a[l + 0], 20, -373897302), r = I(r, i, t, f, a[l + 5], 5, -701558691), f = I(f, r, i, t, a[l + 10], 9, 38016083), t = I(t, f, r, i, a[l + 15], 14, -660478335), i = I(i, t, f, r, a[l + 4], 20, -405537848), r = I(r, i, t, f, a[l + 9], 5, 568446438), f = I(f, r, i, t, a[l + 14], 9, -1019803690), t = I(t, f, r, i, a[l + 3], 14, -187363961), i = I(i, t, f, r, a[l + 8], 20, 1163531501), r = I(r, i, t, f, a[l + 13], 5, -1444681467), f = I(f, r, i, t, a[l + 2], 9, -51403784), t = I(t, f, r, i, a[l + 7], 14, 1735328473), r = E(r, i = I(i, t, f, r, a[l + 12], 20, -1926607734), t, f, a[l + 5], 4, -378558), f = E(f, r, i, t, a[l + 8], 11, -2022574463), t = E(t, f, r, i, a[l + 11], 16, 1839030562), i = E(i, t, f, r, a[l + 14], 23, -35309556), r = E(r, i, t, f, a[l + 1], 4, -1530992060), f = E(f, r, i, t, a[l + 4], 11, 1272893353), t = E(t, f, r, i, a[l + 7], 16, -155497632), i = E(i, t, f, r, a[l + 10], 23, -1094730640), r = E(r, i, t, f, a[l + 13], 4, 681279174), f = E(f, r, i, t, a[l + 0], 11, -358537222), t = E(t, f, r, i, a[l + 3], 16, -722521979), i = E(i, t, f, r, a[l + 6], 23, 76029189), r = E(r, i, t, f, a[l + 9], 4, -640364487), f = E(f, r, i, t, a[l + 12], 11, -421815835), t = E(t, f, r, i, a[l + 15], 16, 530742520), r = v(r, i = E(i, t, f, r, a[l + 2], 23, -995338651), t, f, a[l + 0], 6, -198630844), f = v(f, r, i, t, a[l + 7], 10, 1126891415), t = v(t, f, r, i, a[l + 14], 15, -1416354905), i = v(i, t, f, r, a[l + 5], 21, -57434055), r = v(r, i, t, f, a[l + 12], 6, 1700485571), f = v(f, r, i, t, a[l + 3], 10, -1894986606), t = v(t, f, r, i, a[l + 10], 15, -1051523), i = v(i, t, f, r, a[l + 1], 21, -2054922799), r = v(r, i, t, f, a[l + 8], 6, 1873313359), f = v(f, r, i, t, a[l + 15], 10, -30611744), t = v(t, f, r, i, a[l + 6], 15, -1560198380), i = v(i, t, f, r, a[l + 13], 21, 1309151649), r = v(r, i, t, f, a[l + 4], 6, -145523070), f = v(f, r, i, t, a[l + 11], 10, -1120210379), t = v(t, f, r, i, a[l + 2], 15, 718787259), i = v(i, t, f, r, a[l + 9], 21, -343485551), r = C(r, q), i = C(i, L), t = C(t, k), f = C(f, B);
|
|
803
814
|
}
|
|
804
815
|
return Array(r, i, t, f);
|
|
805
816
|
}
|
|
806
|
-
function c(
|
|
807
|
-
return C((d = C(C(d,
|
|
817
|
+
function c(a, d, r, i, t, f) {
|
|
818
|
+
return C((d = C(C(d, a), C(i, f))) << t | d >>> 32 - t, r);
|
|
808
819
|
}
|
|
809
|
-
function
|
|
810
|
-
return c(d & r | ~d & i,
|
|
820
|
+
function w(a, d, r, i, t, f, l) {
|
|
821
|
+
return c(d & r | ~d & i, a, d, t, f, l);
|
|
811
822
|
}
|
|
812
|
-
function
|
|
813
|
-
return c(d & i | r & ~i,
|
|
823
|
+
function I(a, d, r, i, t, f, l) {
|
|
824
|
+
return c(d & i | r & ~i, a, d, t, f, l);
|
|
814
825
|
}
|
|
815
|
-
function
|
|
816
|
-
return c(d ^ r ^ i,
|
|
826
|
+
function E(a, d, r, i, t, f, l) {
|
|
827
|
+
return c(d ^ r ^ i, a, d, t, f, l);
|
|
817
828
|
}
|
|
818
|
-
function v(
|
|
819
|
-
return c(r ^ (d | ~i),
|
|
829
|
+
function v(a, d, r, i, t, f, l) {
|
|
830
|
+
return c(r ^ (d | ~i), a, d, t, f, l);
|
|
820
831
|
}
|
|
821
|
-
function C(
|
|
822
|
-
var r = (65535 &
|
|
823
|
-
return (
|
|
832
|
+
function C(a, d) {
|
|
833
|
+
var r = (65535 & a) + (65535 & d);
|
|
834
|
+
return (a >> 16) + (d >> 16) + (r >> 16) << 16 | 65535 & r;
|
|
824
835
|
}
|
|
825
|
-
p.exports = function(
|
|
826
|
-
return
|
|
836
|
+
p.exports = function(a) {
|
|
837
|
+
return _.hash(a, S, 16);
|
|
827
838
|
};
|
|
828
|
-
}).call(this,
|
|
829
|
-
}, { "./helpers": 4, buffer: 3, lYpoI2: 11 }], 7: [function(
|
|
830
|
-
(function(
|
|
831
|
-
p.exports = function(
|
|
832
|
-
for (var S, c = new Array(
|
|
839
|
+
}).call(this, u("lYpoI2"), typeof self < "u" ? self : typeof window < "u" ? window : {}, u("buffer").Buffer, arguments[3], arguments[4], arguments[5], arguments[6], "/node_modules/gulp-browserify/node_modules/crypto-browserify/md5.js", "/node_modules/gulp-browserify/node_modules/crypto-browserify");
|
|
840
|
+
}, { "./helpers": 4, buffer: 3, lYpoI2: 11 }], 7: [function(u, p, m) {
|
|
841
|
+
(function(b, j, P, U, R, D, N, F, T) {
|
|
842
|
+
p.exports = function(_) {
|
|
843
|
+
for (var S, c = new Array(_), w = 0; w < _; w++) (3 & w) == 0 && (S = 4294967296 * Math.random()), c[w] = S >>> ((3 & w) << 3) & 255;
|
|
833
844
|
return c;
|
|
834
845
|
};
|
|
835
|
-
}).call(this,
|
|
836
|
-
}, { buffer: 3, lYpoI2: 11 }], 8: [function(
|
|
837
|
-
(function(
|
|
838
|
-
var
|
|
839
|
-
function S(
|
|
840
|
-
|
|
841
|
-
for (var v, C,
|
|
842
|
-
for (var
|
|
843
|
-
d[z] = z < 16 ?
|
|
844
|
-
var
|
|
846
|
+
}).call(this, u("lYpoI2"), typeof self < "u" ? self : typeof window < "u" ? window : {}, u("buffer").Buffer, arguments[3], arguments[4], arguments[5], arguments[6], "/node_modules/gulp-browserify/node_modules/crypto-browserify/rng.js", "/node_modules/gulp-browserify/node_modules/crypto-browserify");
|
|
847
|
+
}, { buffer: 3, lYpoI2: 11 }], 8: [function(u, p, m) {
|
|
848
|
+
(function(b, j, P, U, R, D, N, F, T) {
|
|
849
|
+
var _ = u("./helpers");
|
|
850
|
+
function S(I, E) {
|
|
851
|
+
I[E >> 5] |= 128 << 24 - E % 32, I[15 + (E + 64 >> 9 << 4)] = E;
|
|
852
|
+
for (var v, C, a, d = Array(80), r = 1732584193, i = -271733879, t = -1732584194, f = 271733878, l = -1009589776, q = 0; q < I.length; q += 16) {
|
|
853
|
+
for (var L = r, k = i, B = t, Y = f, J = l, z = 0; z < 80; z++) {
|
|
854
|
+
d[z] = z < 16 ? I[q + z] : w(d[z - 3] ^ d[z - 8] ^ d[z - 14] ^ d[z - 16], 1);
|
|
855
|
+
var M = c(c(w(r, 5), (M = i, C = t, a = f, (v = z) < 20 ? M & C | ~M & a : !(v < 40) && v < 60 ? M & C | M & a | C & a : M ^ C ^ a)), c(c(l, d[z]), (v = z) < 20 ? 1518500249 : v < 40 ? 1859775393 : v < 60 ? -1894007588 : -899497514)), l = f, f = t, t = w(i, 30), i = r, r = M;
|
|
845
856
|
}
|
|
846
|
-
r = c(r,
|
|
857
|
+
r = c(r, L), i = c(i, k), t = c(t, B), f = c(f, Y), l = c(l, J);
|
|
847
858
|
}
|
|
848
859
|
return Array(r, i, t, f, l);
|
|
849
860
|
}
|
|
850
|
-
function c(
|
|
851
|
-
var v = (65535 &
|
|
852
|
-
return (
|
|
861
|
+
function c(I, E) {
|
|
862
|
+
var v = (65535 & I) + (65535 & E);
|
|
863
|
+
return (I >> 16) + (E >> 16) + (v >> 16) << 16 | 65535 & v;
|
|
853
864
|
}
|
|
854
|
-
function
|
|
855
|
-
return
|
|
865
|
+
function w(I, E) {
|
|
866
|
+
return I << E | I >>> 32 - E;
|
|
856
867
|
}
|
|
857
|
-
p.exports = function(
|
|
858
|
-
return
|
|
868
|
+
p.exports = function(I) {
|
|
869
|
+
return _.hash(I, S, 20, !0);
|
|
859
870
|
};
|
|
860
|
-
}).call(this,
|
|
861
|
-
}, { "./helpers": 4, buffer: 3, lYpoI2: 11 }], 9: [function(
|
|
862
|
-
(function(
|
|
863
|
-
function
|
|
864
|
-
var C = (65535 &
|
|
865
|
-
return (
|
|
871
|
+
}).call(this, u("lYpoI2"), typeof self < "u" ? self : typeof window < "u" ? window : {}, u("buffer").Buffer, arguments[3], arguments[4], arguments[5], arguments[6], "/node_modules/gulp-browserify/node_modules/crypto-browserify/sha.js", "/node_modules/gulp-browserify/node_modules/crypto-browserify");
|
|
872
|
+
}, { "./helpers": 4, buffer: 3, lYpoI2: 11 }], 9: [function(u, p, m) {
|
|
873
|
+
(function(b, j, P, U, R, D, N, F, T) {
|
|
874
|
+
function _(E, v) {
|
|
875
|
+
var C = (65535 & E) + (65535 & v);
|
|
876
|
+
return (E >> 16) + (v >> 16) + (C >> 16) << 16 | 65535 & C;
|
|
866
877
|
}
|
|
867
|
-
function S(
|
|
868
|
-
var C,
|
|
869
|
-
|
|
870
|
-
for (var i, t, f = 0; f <
|
|
871
|
-
for (var l = d[0],
|
|
872
|
-
d[0] =
|
|
878
|
+
function S(E, v) {
|
|
879
|
+
var C, a = new Array(1116352408, 1899447441, 3049323471, 3921009573, 961987163, 1508970993, 2453635748, 2870763221, 3624381080, 310598401, 607225278, 1426881987, 1925078388, 2162078206, 2614888103, 3248222580, 3835390401, 4022224774, 264347078, 604807628, 770255983, 1249150122, 1555081692, 1996064986, 2554220882, 2821834349, 2952996808, 3210313671, 3336571891, 3584528711, 113926993, 338241895, 666307205, 773529912, 1294757372, 1396182291, 1695183700, 1986661051, 2177026350, 2456956037, 2730485921, 2820302411, 3259730800, 3345764771, 3516065817, 3600352804, 4094571909, 275423344, 430227734, 506948616, 659060556, 883997877, 958139571, 1322822218, 1537002063, 1747873779, 1955562222, 2024104815, 2227730452, 2361852424, 2428436474, 2756734187, 3204031479, 3329325298), d = new Array(1779033703, 3144134277, 1013904242, 2773480762, 1359893119, 2600822924, 528734635, 1541459225), r = new Array(64);
|
|
880
|
+
E[v >> 5] |= 128 << 24 - v % 32, E[15 + (v + 64 >> 9 << 4)] = v;
|
|
881
|
+
for (var i, t, f = 0; f < E.length; f += 16) {
|
|
882
|
+
for (var l = d[0], q = d[1], L = d[2], k = d[3], B = d[4], Y = d[5], J = d[6], z = d[7], M = 0; M < 64; M++) r[M] = M < 16 ? E[M + f] : _(_(_((t = r[M - 2], w(t, 17) ^ w(t, 19) ^ I(t, 10)), r[M - 7]), (t = r[M - 15], w(t, 7) ^ w(t, 18) ^ I(t, 3))), r[M - 16]), C = _(_(_(_(z, w(t = B, 6) ^ w(t, 11) ^ w(t, 25)), B & Y ^ ~B & J), a[M]), r[M]), i = _(w(i = l, 2) ^ w(i, 13) ^ w(i, 22), l & q ^ l & L ^ q & L), z = J, J = Y, Y = B, B = _(k, C), k = L, L = q, q = l, l = _(C, i);
|
|
883
|
+
d[0] = _(l, d[0]), d[1] = _(q, d[1]), d[2] = _(L, d[2]), d[3] = _(k, d[3]), d[4] = _(B, d[4]), d[5] = _(Y, d[5]), d[6] = _(J, d[6]), d[7] = _(z, d[7]);
|
|
873
884
|
}
|
|
874
885
|
return d;
|
|
875
886
|
}
|
|
876
|
-
var c =
|
|
877
|
-
return
|
|
878
|
-
},
|
|
879
|
-
return
|
|
887
|
+
var c = u("./helpers"), w = function(E, v) {
|
|
888
|
+
return E >>> v | E << 32 - v;
|
|
889
|
+
}, I = function(E, v) {
|
|
890
|
+
return E >>> v;
|
|
880
891
|
};
|
|
881
|
-
p.exports = function(
|
|
882
|
-
return c.hash(
|
|
892
|
+
p.exports = function(E) {
|
|
893
|
+
return c.hash(E, S, 32, !0);
|
|
883
894
|
};
|
|
884
|
-
}).call(this,
|
|
885
|
-
}, { "./helpers": 4, buffer: 3, lYpoI2: 11 }], 10: [function(
|
|
886
|
-
(function(
|
|
887
|
-
m.read = function(
|
|
888
|
-
var
|
|
889
|
-
for (i += t,
|
|
890
|
-
for (v =
|
|
891
|
-
if (
|
|
895
|
+
}).call(this, u("lYpoI2"), typeof self < "u" ? self : typeof window < "u" ? window : {}, u("buffer").Buffer, arguments[3], arguments[4], arguments[5], arguments[6], "/node_modules/gulp-browserify/node_modules/crypto-browserify/sha256.js", "/node_modules/gulp-browserify/node_modules/crypto-browserify");
|
|
896
|
+
}, { "./helpers": 4, buffer: 3, lYpoI2: 11 }], 10: [function(u, p, m) {
|
|
897
|
+
(function(b, j, P, U, R, D, N, F, T) {
|
|
898
|
+
m.read = function(_, S, c, w, f) {
|
|
899
|
+
var E, v, C = 8 * f - w - 1, a = (1 << C) - 1, d = a >> 1, r = -7, i = c ? f - 1 : 0, t = c ? -1 : 1, f = _[S + i];
|
|
900
|
+
for (i += t, E = f & (1 << -r) - 1, f >>= -r, r += C; 0 < r; E = 256 * E + _[S + i], i += t, r -= 8) ;
|
|
901
|
+
for (v = E & (1 << -r) - 1, E >>= -r, r += w; 0 < r; v = 256 * v + _[S + i], i += t, r -= 8) ;
|
|
902
|
+
if (E === 0) E = 1 - d;
|
|
892
903
|
else {
|
|
893
|
-
if (
|
|
894
|
-
v += Math.pow(2,
|
|
904
|
+
if (E === a) return v ? NaN : 1 / 0 * (f ? -1 : 1);
|
|
905
|
+
v += Math.pow(2, w), E -= d;
|
|
895
906
|
}
|
|
896
|
-
return (f ? -1 : 1) * v * Math.pow(2,
|
|
897
|
-
}, m.write = function(
|
|
898
|
-
var v, C,
|
|
899
|
-
for (S = Math.abs(S), isNaN(S) || S === 1 / 0 ? (C = isNaN(S) ? 1 : 0, v = d) : (v = Math.floor(Math.log(S) / Math.LN2), S * (
|
|
900
|
-
for (v = v <<
|
|
901
|
-
|
|
907
|
+
return (f ? -1 : 1) * v * Math.pow(2, E - w);
|
|
908
|
+
}, m.write = function(_, S, c, w, I, l) {
|
|
909
|
+
var v, C, a = 8 * l - I - 1, d = (1 << a) - 1, r = d >> 1, i = I === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, t = w ? 0 : l - 1, f = w ? 1 : -1, l = S < 0 || S === 0 && 1 / S < 0 ? 1 : 0;
|
|
910
|
+
for (S = Math.abs(S), isNaN(S) || S === 1 / 0 ? (C = isNaN(S) ? 1 : 0, v = d) : (v = Math.floor(Math.log(S) / Math.LN2), S * (w = Math.pow(2, -v)) < 1 && (v--, w *= 2), 2 <= (S += 1 <= v + r ? i / w : i * Math.pow(2, 1 - r)) * w && (v++, w /= 2), d <= v + r ? (C = 0, v = d) : 1 <= v + r ? (C = (S * w - 1) * Math.pow(2, I), v += r) : (C = S * Math.pow(2, r - 1) * Math.pow(2, I), v = 0)); 8 <= I; _[c + t] = 255 & C, t += f, C /= 256, I -= 8) ;
|
|
911
|
+
for (v = v << I | C, a += I; 0 < a; _[c + t] = 255 & v, t += f, v /= 256, a -= 8) ;
|
|
912
|
+
_[c + t - f] |= 128 * l;
|
|
902
913
|
};
|
|
903
|
-
}).call(this,
|
|
904
|
-
}, { buffer: 3, lYpoI2: 11 }], 11: [function(
|
|
905
|
-
(function(
|
|
906
|
-
var
|
|
907
|
-
function
|
|
914
|
+
}).call(this, u("lYpoI2"), typeof self < "u" ? self : typeof window < "u" ? window : {}, u("buffer").Buffer, arguments[3], arguments[4], arguments[5], arguments[6], "/node_modules/gulp-browserify/node_modules/ieee754/index.js", "/node_modules/gulp-browserify/node_modules/ieee754");
|
|
915
|
+
}, { buffer: 3, lYpoI2: 11 }], 11: [function(u, p, m) {
|
|
916
|
+
(function(b, j, P, U, R, D, N, F, T) {
|
|
917
|
+
var _, S, c;
|
|
918
|
+
function w() {
|
|
908
919
|
}
|
|
909
|
-
(
|
|
910
|
-
return window.setImmediate(
|
|
911
|
-
} : c ? (
|
|
912
|
-
var
|
|
913
|
-
|
|
914
|
-
}, !0), function(
|
|
915
|
-
|
|
916
|
-
}) : function(
|
|
917
|
-
setTimeout(
|
|
918
|
-
}),
|
|
920
|
+
(b = p.exports = {}).nextTick = (S = typeof window < "u" && window.setImmediate, c = typeof window < "u" && window.postMessage && window.addEventListener, S ? function(I) {
|
|
921
|
+
return window.setImmediate(I);
|
|
922
|
+
} : c ? (_ = [], window.addEventListener("message", function(I) {
|
|
923
|
+
var E = I.source;
|
|
924
|
+
E !== window && E !== null || I.data !== "process-tick" || (I.stopPropagation(), 0 < _.length && _.shift()());
|
|
925
|
+
}, !0), function(I) {
|
|
926
|
+
_.push(I), window.postMessage("process-tick", "*");
|
|
927
|
+
}) : function(I) {
|
|
928
|
+
setTimeout(I, 0);
|
|
929
|
+
}), b.title = "browser", b.browser = !0, b.env = {}, b.argv = [], b.on = w, b.addListener = w, b.once = w, b.off = w, b.removeListener = w, b.removeAllListeners = w, b.emit = w, b.binding = function(I) {
|
|
919
930
|
throw new Error("process.binding is not supported");
|
|
920
|
-
},
|
|
931
|
+
}, b.cwd = function() {
|
|
921
932
|
return "/";
|
|
922
|
-
},
|
|
933
|
+
}, b.chdir = function(I) {
|
|
923
934
|
throw new Error("process.chdir is not supported");
|
|
924
935
|
};
|
|
925
|
-
}).call(this,
|
|
936
|
+
}).call(this, u("lYpoI2"), typeof self < "u" ? self : typeof window < "u" ? window : {}, u("buffer").Buffer, arguments[3], arguments[4], arguments[5], arguments[6], "/node_modules/gulp-browserify/node_modules/process/browser.js", "/node_modules/gulp-browserify/node_modules/process");
|
|
926
937
|
}, { buffer: 3, lYpoI2: 11 }] }, {}, [1])(1);
|
|
927
938
|
});
|
|
928
939
|
})(he)), he.exports;
|
|
929
940
|
}
|
|
930
|
-
var
|
|
931
|
-
const
|
|
932
|
-
class
|
|
941
|
+
var Ne = Te();
|
|
942
|
+
const Me = /* @__PURE__ */ je(Ne);
|
|
943
|
+
class ye {
|
|
933
944
|
_inferSchema;
|
|
934
945
|
_inferInstance;
|
|
935
946
|
data;
|
|
936
947
|
instance;
|
|
937
|
-
constructor(s,
|
|
938
|
-
this.data = s ?? {}, this.instance =
|
|
948
|
+
constructor(s, u) {
|
|
949
|
+
this.data = s ?? {}, this.instance = u;
|
|
939
950
|
}
|
|
940
951
|
clear = () => {
|
|
941
952
|
Object.keys(this.data).forEach((s) => {
|
|
@@ -943,27 +954,27 @@ class ge {
|
|
|
943
954
|
});
|
|
944
955
|
};
|
|
945
956
|
delete = (s) => {
|
|
946
|
-
const
|
|
947
|
-
return delete this.data[s],
|
|
957
|
+
const u = this.data[s];
|
|
958
|
+
return delete this.data[s], u;
|
|
948
959
|
};
|
|
949
960
|
entries = () => Object.entries(this.data);
|
|
950
961
|
get = (s) => this.data[s];
|
|
951
962
|
has = (s) => Object.prototype.hasOwnProperty.call(this.data, s);
|
|
952
963
|
keys = () => Object.keys(this.data);
|
|
953
|
-
set = (s,
|
|
954
|
-
this.data[s] =
|
|
964
|
+
set = (s, u) => {
|
|
965
|
+
this.data[s] = u;
|
|
955
966
|
};
|
|
956
967
|
values = () => Object.values(this.data);
|
|
957
|
-
commit = (s,
|
|
968
|
+
commit = (s, u) => {
|
|
958
969
|
const p = { ...this.data };
|
|
959
|
-
|
|
960
|
-
delete p[
|
|
970
|
+
u?.forEach((b) => {
|
|
971
|
+
delete p[b];
|
|
961
972
|
});
|
|
962
973
|
const m = Object.keys(p);
|
|
963
|
-
return s != null && Object.keys(s).length === m.length && m.reduce((
|
|
974
|
+
return s != null && Object.keys(s).length === m.length && m.reduce((b, j) => b && Object.is(p[j], s[j]), !0) ? s : p;
|
|
964
975
|
};
|
|
965
976
|
}
|
|
966
|
-
const Fe = (h) => h instanceof
|
|
977
|
+
const Fe = (h) => h instanceof ye ? h : new ye(h);
|
|
967
978
|
class Se {
|
|
968
979
|
_inferItem;
|
|
969
980
|
_inferQuery;
|
|
@@ -978,14 +989,14 @@ class Se {
|
|
|
978
989
|
contextPlugins = [];
|
|
979
990
|
uiPlugins = [];
|
|
980
991
|
constructor() {
|
|
981
|
-
const s = [],
|
|
992
|
+
const s = [], u = [];
|
|
982
993
|
this.extend({
|
|
983
994
|
context: (p) => {
|
|
984
995
|
const m = s;
|
|
985
996
|
p != null && !m.includes(p) && m.push(p);
|
|
986
997
|
},
|
|
987
998
|
ui: (p) => {
|
|
988
|
-
const m =
|
|
999
|
+
const m = u;
|
|
989
1000
|
p != null && !m.includes(p) && m.push(p);
|
|
990
1001
|
}
|
|
991
1002
|
}), Object.defineProperties(this, {
|
|
@@ -996,7 +1007,7 @@ class Se {
|
|
|
996
1007
|
configurable: !1
|
|
997
1008
|
},
|
|
998
1009
|
uiPlugins: {
|
|
999
|
-
value: Object.freeze([...
|
|
1010
|
+
value: Object.freeze([...u]),
|
|
1000
1011
|
enumerable: !0,
|
|
1001
1012
|
writable: !1,
|
|
1002
1013
|
configurable: !1
|
|
@@ -1012,106 +1023,106 @@ class Se {
|
|
|
1012
1023
|
normalizeResource(s) {
|
|
1013
1024
|
return s;
|
|
1014
1025
|
}
|
|
1015
|
-
subscribe(s,
|
|
1026
|
+
subscribe(s, u) {
|
|
1016
1027
|
if (s == null) throw new Error("No resource name specified");
|
|
1017
|
-
return this.notifier.subscribe(this.normalizeResource(s),
|
|
1028
|
+
return this.notifier.subscribe(this.normalizeResource(s), u);
|
|
1018
1029
|
}
|
|
1019
1030
|
notify(s) {
|
|
1020
1031
|
this.notifier.trigger(this.normalizeResource(s));
|
|
1021
1032
|
}
|
|
1022
|
-
get(s,
|
|
1033
|
+
get(s, u, p, m, b) {
|
|
1023
1034
|
return new Promise(
|
|
1024
|
-
(j,
|
|
1035
|
+
(j, P) => this.continuousGet(
|
|
1025
1036
|
this.normalizeResource(s),
|
|
1026
|
-
|
|
1037
|
+
u,
|
|
1027
1038
|
p,
|
|
1028
1039
|
m,
|
|
1029
|
-
(
|
|
1030
|
-
if (
|
|
1031
|
-
U
|
|
1040
|
+
(U, R, D) => {
|
|
1041
|
+
if (U != null) {
|
|
1042
|
+
P(U);
|
|
1032
1043
|
return;
|
|
1033
1044
|
}
|
|
1034
|
-
|
|
1035
|
-
|
|
1045
|
+
R && j(
|
|
1046
|
+
D ?? this.createEmptyResponse({
|
|
1036
1047
|
name: this.normalizeResource(s),
|
|
1037
|
-
query:
|
|
1048
|
+
query: u,
|
|
1038
1049
|
disabled: !1,
|
|
1039
1050
|
options: p
|
|
1040
1051
|
})
|
|
1041
1052
|
);
|
|
1042
1053
|
},
|
|
1043
|
-
|
|
1054
|
+
b
|
|
1044
1055
|
)
|
|
1045
1056
|
);
|
|
1046
1057
|
}
|
|
1047
|
-
continuousGet(s,
|
|
1048
|
-
const
|
|
1049
|
-
new Promise((
|
|
1058
|
+
continuousGet(s, u, p, m, b, j) {
|
|
1059
|
+
const P = j ?? new Be();
|
|
1060
|
+
new Promise((U) => {
|
|
1050
1061
|
if (s == null) throw new Error("No resource name specified");
|
|
1051
|
-
const
|
|
1052
|
-
|
|
1062
|
+
const R = (N, F, T) => {
|
|
1063
|
+
P.locked || ((N != null || F) && P.lock(), N != null ? b(N, !0, void 0) : b(
|
|
1053
1064
|
void 0,
|
|
1054
|
-
|
|
1055
|
-
|
|
1065
|
+
F,
|
|
1066
|
+
T ?? this.createEmptyResponse({
|
|
1056
1067
|
name: this.normalizeResource(s),
|
|
1057
|
-
query:
|
|
1068
|
+
query: u,
|
|
1058
1069
|
disabled: !1,
|
|
1059
1070
|
options: p
|
|
1060
1071
|
})
|
|
1061
1072
|
));
|
|
1062
|
-
},
|
|
1063
|
-
|
|
1073
|
+
}, D = P.proxy();
|
|
1074
|
+
U(
|
|
1064
1075
|
Promise.resolve(
|
|
1065
1076
|
this.handleGet(
|
|
1066
1077
|
this.normalizeResource(s),
|
|
1067
|
-
|
|
1078
|
+
u,
|
|
1068
1079
|
p,
|
|
1069
1080
|
Fe(m),
|
|
1070
|
-
|
|
1081
|
+
D
|
|
1071
1082
|
)
|
|
1072
|
-
).then((
|
|
1073
|
-
typeof
|
|
1083
|
+
).then((N) => {
|
|
1084
|
+
typeof N == "function" ? N(R) : R(void 0, !0, N);
|
|
1074
1085
|
})
|
|
1075
1086
|
);
|
|
1076
|
-
}).catch((
|
|
1077
|
-
|
|
1087
|
+
}).catch((U) => {
|
|
1088
|
+
P.locked || b(U, !0, void 0);
|
|
1078
1089
|
});
|
|
1079
1090
|
}
|
|
1080
|
-
compareRequests(s,
|
|
1081
|
-
return Oe(s,
|
|
1091
|
+
compareRequests(s, u) {
|
|
1092
|
+
return Oe(s, u);
|
|
1082
1093
|
}
|
|
1083
1094
|
createEmptyResponse(s) {
|
|
1084
1095
|
}
|
|
1085
|
-
shouldPersist(s,
|
|
1086
|
-
return p === "very" || p &&
|
|
1096
|
+
shouldPersist(s, u, p, m) {
|
|
1097
|
+
return p === "very" || p && u.name === s.name;
|
|
1087
1098
|
}
|
|
1088
|
-
compareItemVersions(s,
|
|
1099
|
+
compareItemVersions(s, u) {
|
|
1089
1100
|
return !0;
|
|
1090
1101
|
}
|
|
1091
1102
|
getItemIdentifier(s) {
|
|
1092
|
-
return
|
|
1103
|
+
return Me(s);
|
|
1093
1104
|
}
|
|
1094
|
-
transition(s,
|
|
1105
|
+
transition(s, u) {
|
|
1095
1106
|
return s.data;
|
|
1096
1107
|
}
|
|
1097
|
-
recycleItems(s,
|
|
1098
|
-
if (s.data == null ||
|
|
1108
|
+
recycleItems(s, u) {
|
|
1109
|
+
if (s.data == null || u.data == null)
|
|
1099
1110
|
return s.data;
|
|
1100
|
-
const p = Array.isArray(s.data) ? s.data : [s.data], m = Array.isArray(
|
|
1101
|
-
p.length > 0 && m.forEach((
|
|
1102
|
-
const
|
|
1103
|
-
|
|
1111
|
+
const p = Array.isArray(s.data) ? s.data : [s.data], m = Array.isArray(u.data) ? u.data : [u.data], b = {};
|
|
1112
|
+
p.length > 0 && m.forEach((P) => {
|
|
1113
|
+
const U = this.getItemIdentifier(P);
|
|
1114
|
+
U != null && (b[U] = P);
|
|
1104
1115
|
});
|
|
1105
1116
|
let j;
|
|
1106
|
-
return m.length > 0 ? j = p.map((
|
|
1107
|
-
const
|
|
1108
|
-
if (
|
|
1109
|
-
const
|
|
1110
|
-
if (this.compareItemVersions(
|
|
1117
|
+
return m.length > 0 ? j = p.map((P) => {
|
|
1118
|
+
const U = this.getItemIdentifier(P);
|
|
1119
|
+
if (U != null && Object.prototype.hasOwnProperty.call(b, U)) {
|
|
1120
|
+
const R = b[U];
|
|
1121
|
+
if (this.compareItemVersions(P, R)) return R;
|
|
1111
1122
|
}
|
|
1112
|
-
return
|
|
1123
|
+
return P;
|
|
1113
1124
|
}) : j = p, Array.isArray(s.data) ? m.length === j.length && j.reduce(
|
|
1114
|
-
(
|
|
1125
|
+
(P, U, R) => P && Object.is(m[R], U),
|
|
1115
1126
|
!0
|
|
1116
1127
|
) ? m : j : j[0];
|
|
1117
1128
|
}
|
|
@@ -1121,8 +1132,8 @@ function ot({
|
|
|
1121
1132
|
dataProvider: h,
|
|
1122
1133
|
children: s
|
|
1123
1134
|
}) {
|
|
1124
|
-
const
|
|
1125
|
-
return /* @__PURE__ */ se(ue.Provider, { value:
|
|
1135
|
+
const u = oe(() => ({ dataProvider: h }), [h]);
|
|
1136
|
+
return /* @__PURE__ */ se(ue.Provider, { value: u, children: s });
|
|
1126
1137
|
}
|
|
1127
1138
|
function st(h) {
|
|
1128
1139
|
if (typeof h != "function")
|
|
@@ -1143,12 +1154,12 @@ function st(h) {
|
|
|
1143
1154
|
function Ye({
|
|
1144
1155
|
resource: h,
|
|
1145
1156
|
children: s,
|
|
1146
|
-
...
|
|
1157
|
+
...u
|
|
1147
1158
|
}) {
|
|
1148
1159
|
return h.dataProvider.uiPlugins.reduceRight(
|
|
1149
|
-
(p, m) => (
|
|
1160
|
+
(p, m) => (b) => /* @__PURE__ */ se(m, { ...u, context: b, children: p }),
|
|
1150
1161
|
(p) => /* @__PURE__ */ se(
|
|
1151
|
-
|
|
1162
|
+
Pe,
|
|
1152
1163
|
{
|
|
1153
1164
|
value: p,
|
|
1154
1165
|
children: s
|
|
@@ -1173,44 +1184,44 @@ function Ve() {
|
|
|
1173
1184
|
return pe($e);
|
|
1174
1185
|
}
|
|
1175
1186
|
const te = {};
|
|
1176
|
-
function He(h, s,
|
|
1187
|
+
function He(h, s, u) {
|
|
1177
1188
|
let p;
|
|
1178
1189
|
{
|
|
1179
|
-
const m = Date.now(),
|
|
1180
|
-
Ge(te, m,
|
|
1190
|
+
const m = Date.now(), b = Ve();
|
|
1191
|
+
Ge(te, m, b), p = We(b, te.msecs, te.nsecs, te.clockseq, te.node, s, u);
|
|
1181
1192
|
}
|
|
1182
1193
|
return s ?? ze(p);
|
|
1183
1194
|
}
|
|
1184
|
-
function Ge(h, s,
|
|
1185
|
-
return h.msecs ??= -1 / 0, h.nsecs ??= 0, s === h.msecs ? (h.nsecs++, h.nsecs >= 1e4 && (h.node = void 0, h.nsecs = 0)) : s > h.msecs ? h.nsecs = 0 : s < h.msecs && (h.node = void 0), h.node || (h.node =
|
|
1195
|
+
function Ge(h, s, u) {
|
|
1196
|
+
return h.msecs ??= -1 / 0, h.nsecs ??= 0, s === h.msecs ? (h.nsecs++, h.nsecs >= 1e4 && (h.node = void 0, h.nsecs = 0)) : s > h.msecs ? h.nsecs = 0 : s < h.msecs && (h.node = void 0), h.node || (h.node = u.slice(10, 16), h.node[0] |= 1, h.clockseq = (u[8] << 8 | u[9]) & 16383), h.msecs = s, h;
|
|
1186
1197
|
}
|
|
1187
|
-
function We(h, s,
|
|
1198
|
+
function We(h, s, u, p, m, b, j = 0) {
|
|
1188
1199
|
if (h.length < 16)
|
|
1189
1200
|
throw new Error("Random bytes length must be >= 16");
|
|
1190
|
-
if (!
|
|
1191
|
-
|
|
1192
|
-
else if (j < 0 || j + 16 >
|
|
1201
|
+
if (!b)
|
|
1202
|
+
b = new Uint8Array(16), j = 0;
|
|
1203
|
+
else if (j < 0 || j + 16 > b.length)
|
|
1193
1204
|
throw new RangeError(`UUID byte range ${j}:${j + 15} is out of buffer bounds`);
|
|
1194
|
-
s ??= Date.now(),
|
|
1195
|
-
const
|
|
1196
|
-
|
|
1197
|
-
const
|
|
1198
|
-
|
|
1199
|
-
for (let
|
|
1200
|
-
|
|
1201
|
-
return
|
|
1205
|
+
s ??= Date.now(), u ??= 0, p ??= (h[8] << 8 | h[9]) & 16383, m ??= h.slice(10, 16), s += 122192928e5;
|
|
1206
|
+
const P = ((s & 268435455) * 1e4 + u) % 4294967296;
|
|
1207
|
+
b[j++] = P >>> 24 & 255, b[j++] = P >>> 16 & 255, b[j++] = P >>> 8 & 255, b[j++] = P & 255;
|
|
1208
|
+
const U = s / 4294967296 * 1e4 & 268435455;
|
|
1209
|
+
b[j++] = U >>> 8 & 255, b[j++] = U & 255, b[j++] = U >>> 24 & 15 | 16, b[j++] = U >>> 16 & 255, b[j++] = p >>> 8 | 128, b[j++] = p & 255;
|
|
1210
|
+
for (let R = 0; R < 6; ++R)
|
|
1211
|
+
b[j++] = m[R];
|
|
1212
|
+
return b;
|
|
1202
1213
|
}
|
|
1203
1214
|
function re(h) {
|
|
1204
|
-
let s,
|
|
1215
|
+
let s, u, p;
|
|
1205
1216
|
if (typeof h != "string")
|
|
1206
|
-
s = "~",
|
|
1217
|
+
s = "~", u = 0, p = He();
|
|
1207
1218
|
else {
|
|
1208
1219
|
let m;
|
|
1209
|
-
[s, m, p] = h.split("$"),
|
|
1220
|
+
[s, m, p] = h.split("$"), u = ((parseInt(m, 36) || 0) + 1) % Number.MAX_SAFE_INTEGER, u === 0 && (s += "~");
|
|
1210
1221
|
}
|
|
1211
|
-
return `${s}$${
|
|
1222
|
+
return `${s}$${u.toString(36).padStart(11, "0")}$${p}`;
|
|
1212
1223
|
}
|
|
1213
|
-
function
|
|
1224
|
+
function me(h) {
|
|
1214
1225
|
return {
|
|
1215
1226
|
...h,
|
|
1216
1227
|
requestInstruction: {
|
|
@@ -1226,43 +1237,43 @@ function Je(h, s) {
|
|
|
1226
1237
|
switch (s.type) {
|
|
1227
1238
|
// Creates a new request and instructs the resource to fetch data.
|
|
1228
1239
|
case "next-request": {
|
|
1229
|
-
const { requestDetails:
|
|
1240
|
+
const { requestDetails: u, persistent: p } = s, m = re(h.request), b = re(h.revision);
|
|
1230
1241
|
let j = !1;
|
|
1231
1242
|
h.persistent === "very" && p === "very" ? j = "very" : h.persistent && p && (j = !0);
|
|
1232
|
-
const
|
|
1233
|
-
|
|
1243
|
+
const P = !u.disabled && h.dataProvider.shouldPersist(
|
|
1244
|
+
u,
|
|
1234
1245
|
h.requestDetails,
|
|
1235
1246
|
j,
|
|
1236
1247
|
h.value
|
|
1237
1248
|
);
|
|
1238
|
-
return
|
|
1249
|
+
return me({
|
|
1239
1250
|
dataProvider: h.dataProvider,
|
|
1240
|
-
requestDetails:
|
|
1251
|
+
requestDetails: u,
|
|
1241
1252
|
request: m,
|
|
1242
|
-
revision:
|
|
1243
|
-
isLoading: !
|
|
1244
|
-
value:
|
|
1245
|
-
name:
|
|
1246
|
-
query:
|
|
1247
|
-
options:
|
|
1253
|
+
revision: b,
|
|
1254
|
+
isLoading: !u.disabled,
|
|
1255
|
+
value: P ? h.value : {
|
|
1256
|
+
name: u.name,
|
|
1257
|
+
query: u.query,
|
|
1258
|
+
options: u.options,
|
|
1248
1259
|
request: m,
|
|
1249
|
-
revision:
|
|
1260
|
+
revision: b,
|
|
1250
1261
|
data: h.dataProvider.createEmptyResponse(
|
|
1251
|
-
|
|
1262
|
+
u
|
|
1252
1263
|
),
|
|
1253
1264
|
meta: {},
|
|
1254
1265
|
error: void 0,
|
|
1255
|
-
isDisabled: !!
|
|
1256
|
-
isIncomplete: !
|
|
1257
|
-
isInitial: !
|
|
1266
|
+
isDisabled: !!u.disabled,
|
|
1267
|
+
isIncomplete: !u.disabled,
|
|
1268
|
+
isInitial: !u.disabled
|
|
1258
1269
|
},
|
|
1259
1270
|
persistent: p
|
|
1260
1271
|
});
|
|
1261
1272
|
}
|
|
1262
1273
|
// Creates a new revision for the current request and instructs the resource to fetch data.
|
|
1263
1274
|
case "next-revision": {
|
|
1264
|
-
const { notify:
|
|
1265
|
-
return
|
|
1275
|
+
const { notify: u } = s, p = re(h.revision);
|
|
1276
|
+
return u({ request: h.request, revision: p }), me({
|
|
1266
1277
|
...h,
|
|
1267
1278
|
revision: p,
|
|
1268
1279
|
isLoading: !h.requestDetails.disabled
|
|
@@ -1270,16 +1281,16 @@ function Je(h, s) {
|
|
|
1270
1281
|
}
|
|
1271
1282
|
// Sets a new persistence level.
|
|
1272
1283
|
case "set-persistence": {
|
|
1273
|
-
const { persistent:
|
|
1284
|
+
const { persistent: u } = s;
|
|
1274
1285
|
return {
|
|
1275
1286
|
...h,
|
|
1276
|
-
persistent:
|
|
1287
|
+
persistent: u
|
|
1277
1288
|
};
|
|
1278
1289
|
}
|
|
1279
1290
|
// Updates the current request's data.
|
|
1280
1291
|
case "update-data": {
|
|
1281
|
-
const { request:
|
|
1282
|
-
return
|
|
1292
|
+
const { request: u, revision: p, value: m } = s;
|
|
1293
|
+
return u !== h.request || p !== h.revision ? h : {
|
|
1283
1294
|
...h,
|
|
1284
1295
|
isLoading: m.isIncomplete,
|
|
1285
1296
|
value: m
|
|
@@ -1288,179 +1299,179 @@ function Je(h, s) {
|
|
|
1288
1299
|
}
|
|
1289
1300
|
return h;
|
|
1290
1301
|
}
|
|
1291
|
-
function Ke(h, s,
|
|
1292
|
-
const { dataProvider: m, requestDetails:
|
|
1293
|
-
let
|
|
1294
|
-
const
|
|
1295
|
-
|
|
1302
|
+
function Ke(h, s, u, p) {
|
|
1303
|
+
const { dataProvider: m, requestDetails: b, request: j, revision: P, value: U } = h, R = new ye({ ...U.meta }, s);
|
|
1304
|
+
let D = Promise.resolve(U);
|
|
1305
|
+
const N = (F, T, _) => {
|
|
1306
|
+
D = D.then((S) => {
|
|
1296
1307
|
try {
|
|
1297
1308
|
let c;
|
|
1298
|
-
if (
|
|
1309
|
+
if (F != null)
|
|
1299
1310
|
c = {
|
|
1300
1311
|
...S,
|
|
1301
|
-
error:
|
|
1312
|
+
error: F,
|
|
1302
1313
|
isIncomplete: !1
|
|
1303
1314
|
};
|
|
1304
1315
|
else {
|
|
1305
|
-
const
|
|
1306
|
-
name:
|
|
1307
|
-
query:
|
|
1308
|
-
options:
|
|
1316
|
+
const w = {
|
|
1317
|
+
name: b.name,
|
|
1318
|
+
query: b.query,
|
|
1319
|
+
options: b.options,
|
|
1309
1320
|
request: j,
|
|
1310
|
-
revision:
|
|
1311
|
-
data:
|
|
1312
|
-
meta:
|
|
1321
|
+
revision: P,
|
|
1322
|
+
data: _,
|
|
1323
|
+
meta: R.commit(S.meta),
|
|
1313
1324
|
error: void 0,
|
|
1314
1325
|
isDisabled: !1,
|
|
1315
|
-
isIncomplete: !
|
|
1316
|
-
isInitial: !!S.isInitial && !
|
|
1326
|
+
isIncomplete: !T,
|
|
1327
|
+
isInitial: !!S.isInitial && !T
|
|
1317
1328
|
};
|
|
1318
|
-
|
|
1319
|
-
|
|
1329
|
+
w.data = m.transition(
|
|
1330
|
+
w,
|
|
1320
1331
|
S
|
|
1321
|
-
),
|
|
1322
|
-
|
|
1332
|
+
), w.data = m.recycleItems(
|
|
1333
|
+
w,
|
|
1323
1334
|
S
|
|
1324
|
-
), c =
|
|
1335
|
+
), c = w;
|
|
1325
1336
|
}
|
|
1326
|
-
return p({ type: "update-data", request: j, revision:
|
|
1337
|
+
return p({ type: "update-data", request: j, revision: P, value: c }), c;
|
|
1327
1338
|
} catch {
|
|
1328
1339
|
return S;
|
|
1329
1340
|
}
|
|
1330
1341
|
});
|
|
1331
1342
|
};
|
|
1332
1343
|
m.continuousGet(
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1344
|
+
b.name,
|
|
1345
|
+
b.query,
|
|
1346
|
+
b.options,
|
|
1347
|
+
R,
|
|
1348
|
+
N,
|
|
1349
|
+
u
|
|
1339
1350
|
);
|
|
1340
1351
|
}
|
|
1341
1352
|
function Xe({
|
|
1342
1353
|
dataProvider: h,
|
|
1343
1354
|
name: s,
|
|
1344
|
-
query:
|
|
1355
|
+
query: u,
|
|
1345
1356
|
disabled: p,
|
|
1346
1357
|
options: m,
|
|
1347
|
-
persistent:
|
|
1358
|
+
persistent: b,
|
|
1348
1359
|
...j
|
|
1349
1360
|
}) {
|
|
1350
|
-
const
|
|
1361
|
+
const P = Ue(), U = h || P.dataProvider, R = U?.normalizeResource(s) ?? s, D = oe(
|
|
1351
1362
|
() => ({
|
|
1352
|
-
name:
|
|
1353
|
-
query:
|
|
1363
|
+
name: R,
|
|
1364
|
+
query: u,
|
|
1354
1365
|
disabled: !!p,
|
|
1355
1366
|
options: m
|
|
1356
1367
|
}),
|
|
1357
|
-
[
|
|
1358
|
-
), [
|
|
1359
|
-
const
|
|
1360
|
-
return
|
|
1361
|
-
dataProvider:
|
|
1362
|
-
requestDetails:
|
|
1363
|
-
request:
|
|
1368
|
+
[R, u, p, m]
|
|
1369
|
+
), [N, F] = qe(Je, void 0, () => {
|
|
1370
|
+
const q = re(), L = re();
|
|
1371
|
+
return me({
|
|
1372
|
+
dataProvider: U,
|
|
1373
|
+
requestDetails: D,
|
|
1374
|
+
request: q,
|
|
1364
1375
|
revision: L,
|
|
1365
|
-
isLoading: !
|
|
1376
|
+
isLoading: !D.disabled,
|
|
1366
1377
|
value: {
|
|
1367
|
-
name:
|
|
1368
|
-
query:
|
|
1369
|
-
options:
|
|
1370
|
-
request:
|
|
1378
|
+
name: D.name,
|
|
1379
|
+
query: D.query,
|
|
1380
|
+
options: D.options,
|
|
1381
|
+
request: q,
|
|
1371
1382
|
revision: L,
|
|
1372
|
-
data:
|
|
1373
|
-
|
|
1383
|
+
data: U?.createEmptyResponse(
|
|
1384
|
+
D
|
|
1374
1385
|
),
|
|
1375
1386
|
meta: {},
|
|
1376
1387
|
error: void 0,
|
|
1377
|
-
isDisabled: !!
|
|
1378
|
-
isIncomplete: !
|
|
1379
|
-
isInitial: !
|
|
1388
|
+
isDisabled: !!D.disabled,
|
|
1389
|
+
isIncomplete: !D.disabled,
|
|
1390
|
+
isInitial: !D.disabled
|
|
1380
1391
|
},
|
|
1381
|
-
persistent:
|
|
1392
|
+
persistent: b ?? !1
|
|
1382
1393
|
});
|
|
1383
1394
|
}), {
|
|
1384
|
-
dataProvider:
|
|
1385
|
-
requestDetails:
|
|
1386
|
-
request:
|
|
1387
|
-
revision:
|
|
1388
|
-
isLoading:
|
|
1389
|
-
value:
|
|
1390
|
-
persistent:
|
|
1391
|
-
requestInstruction:
|
|
1392
|
-
} =
|
|
1393
|
-
if (
|
|
1395
|
+
dataProvider: T,
|
|
1396
|
+
requestDetails: _,
|
|
1397
|
+
request: S,
|
|
1398
|
+
revision: c,
|
|
1399
|
+
isLoading: w,
|
|
1400
|
+
value: I,
|
|
1401
|
+
persistent: E,
|
|
1402
|
+
requestInstruction: v
|
|
1403
|
+
} = N;
|
|
1404
|
+
if (T == null)
|
|
1394
1405
|
throw new Error(
|
|
1395
1406
|
"Unmet requirement: The DataProvider for the useResource hook is missing - Check your ConfigContext provider and the dataProvider property"
|
|
1396
1407
|
);
|
|
1397
|
-
if (
|
|
1408
|
+
if (T !== U)
|
|
1398
1409
|
throw new Error(
|
|
1399
1410
|
"Constant violation: The DataProvider provided to the useResource hook must not be replaced - Check your ConfigContext provider and the dataProvider property"
|
|
1400
1411
|
);
|
|
1401
|
-
const [
|
|
1412
|
+
const [C, a] = Ce();
|
|
1402
1413
|
ce(() => {
|
|
1403
|
-
const
|
|
1404
|
-
return
|
|
1405
|
-
|
|
1414
|
+
const q = T.createInstance() ?? {};
|
|
1415
|
+
return a(q), () => {
|
|
1416
|
+
T.releaseInstance(q);
|
|
1406
1417
|
};
|
|
1407
|
-
}, [
|
|
1418
|
+
}, [T]), _ !== D && !T.compareRequests(D, _) ? F({
|
|
1408
1419
|
type: "next-request",
|
|
1409
|
-
requestDetails:
|
|
1410
|
-
persistent:
|
|
1411
|
-
}) :
|
|
1412
|
-
const
|
|
1413
|
-
async () => new Promise((
|
|
1414
|
-
|
|
1420
|
+
requestDetails: D,
|
|
1421
|
+
persistent: b ?? !1
|
|
1422
|
+
}) : E !== (b ?? !1) && F({ type: "set-persistence", persistent: b ?? !1 });
|
|
1423
|
+
const d = Le(
|
|
1424
|
+
async () => new Promise((q) => {
|
|
1425
|
+
F({ type: "next-revision", notify: q });
|
|
1415
1426
|
}),
|
|
1416
1427
|
[]
|
|
1417
1428
|
);
|
|
1418
|
-
ce(() =>
|
|
1419
|
-
if (
|
|
1429
|
+
ce(() => _.disabled ? void 0 : T.subscribe(_.name, d), [_.disabled, T, _.name, d]), ce(() => {
|
|
1430
|
+
if (C == null || v.requestDetails.disabled)
|
|
1420
1431
|
return;
|
|
1421
|
-
const
|
|
1432
|
+
const q = new Be();
|
|
1422
1433
|
return Ke(
|
|
1423
|
-
_,
|
|
1424
1434
|
v,
|
|
1425
|
-
|
|
1426
|
-
|
|
1435
|
+
C,
|
|
1436
|
+
q,
|
|
1437
|
+
F
|
|
1427
1438
|
), () => {
|
|
1428
|
-
|
|
1439
|
+
q.abort();
|
|
1429
1440
|
};
|
|
1430
|
-
}, [
|
|
1431
|
-
const
|
|
1432
|
-
() => ({ request:
|
|
1433
|
-
[
|
|
1434
|
-
),
|
|
1435
|
-
() => ({ ...
|
|
1436
|
-
[
|
|
1441
|
+
}, [C, v]);
|
|
1442
|
+
const r = c !== I.revision, i = r ? S : I.request, t = r ? c : I.revision, f = oe(
|
|
1443
|
+
() => ({ request: i, revision: t }),
|
|
1444
|
+
[i, t]
|
|
1445
|
+
), l = oe(
|
|
1446
|
+
() => ({ ...I, dataProvider: T, isLoading: w, isStale: r, next: f, notify: d }),
|
|
1447
|
+
[I, T, w, r, f, d]
|
|
1437
1448
|
);
|
|
1438
|
-
return
|
|
1449
|
+
return T.contextPlugins.reduce((q, L) => L(q, j), l);
|
|
1439
1450
|
}
|
|
1440
1451
|
function ut({
|
|
1441
1452
|
dataProvider: h,
|
|
1442
1453
|
name: s,
|
|
1443
|
-
query:
|
|
1454
|
+
query: u,
|
|
1444
1455
|
disabled: p,
|
|
1445
1456
|
options: m,
|
|
1446
|
-
persistent:
|
|
1457
|
+
persistent: b,
|
|
1447
1458
|
children: j,
|
|
1448
|
-
...
|
|
1459
|
+
...P
|
|
1449
1460
|
}) {
|
|
1450
|
-
const
|
|
1461
|
+
const U = Xe({
|
|
1451
1462
|
dataProvider: h,
|
|
1452
1463
|
name: s,
|
|
1453
|
-
query:
|
|
1464
|
+
query: u,
|
|
1454
1465
|
disabled: p,
|
|
1455
1466
|
options: m,
|
|
1456
|
-
persistent:
|
|
1457
|
-
...
|
|
1467
|
+
persistent: b,
|
|
1468
|
+
...P
|
|
1458
1469
|
});
|
|
1459
1470
|
return /* @__PURE__ */ se(
|
|
1460
1471
|
Ye,
|
|
1461
1472
|
{
|
|
1462
|
-
...
|
|
1463
|
-
resource:
|
|
1473
|
+
...P,
|
|
1474
|
+
resource: U,
|
|
1464
1475
|
children: j
|
|
1465
1476
|
}
|
|
1466
1477
|
);
|
|
@@ -1471,15 +1482,15 @@ export {
|
|
|
1471
1482
|
et as ConfigConsumer,
|
|
1472
1483
|
ot as ConfigProvider,
|
|
1473
1484
|
Se as DataProvider,
|
|
1474
|
-
|
|
1475
|
-
|
|
1485
|
+
ye as Meta,
|
|
1486
|
+
ge as Notifier,
|
|
1476
1487
|
ut as Resource,
|
|
1477
1488
|
tt as ResourceConsumer,
|
|
1478
1489
|
Ye as ResourceProvider,
|
|
1479
1490
|
nt as compose,
|
|
1480
1491
|
st as createPlugin,
|
|
1481
1492
|
it as isDataProvider,
|
|
1482
|
-
|
|
1493
|
+
Ue as useConfigContext,
|
|
1483
1494
|
Xe as useResource,
|
|
1484
1495
|
rt as useResourceContext
|
|
1485
1496
|
};
|