@civet/events 2.0.1 → 2.0.3
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/main.js +96 -903
- package/package.json +13 -9
package/dist/main.js
CHANGED
|
@@ -1,931 +1,124 @@
|
|
|
1
|
-
import { createContext as
|
|
2
|
-
import { jsx as
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { createContext as R, useContext as j, useMemo as q, useState as y, useEffect as S } from "react";
|
|
2
|
+
import { jsx as C, Fragment as w } from "react/jsx-runtime";
|
|
3
|
+
import { useResourceContext as D } from "@civet/core";
|
|
4
|
+
const l = R({});
|
|
5
|
+
l.displayName = "Events.ConfigContext";
|
|
6
|
+
const J = l.Consumer, _ = () => j(l);
|
|
7
|
+
function K(...r) {
|
|
8
|
+
return (...e) => r.reduce(
|
|
9
|
+
(t, n) => t || (typeof n == "function" ? n(...e) : !1),
|
|
9
10
|
!1
|
|
10
11
|
);
|
|
11
12
|
}
|
|
12
|
-
class
|
|
13
|
+
class F {
|
|
13
14
|
_inferResource;
|
|
14
15
|
_inferEvent;
|
|
15
16
|
_inferOptions;
|
|
16
|
-
subscribe(
|
|
17
|
-
if (typeof
|
|
17
|
+
subscribe(e, t, n) {
|
|
18
|
+
if (typeof n != "function")
|
|
18
19
|
throw new Error("Handler must be a function");
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
const o = this.handleSubscribe(
|
|
21
|
+
e,
|
|
22
|
+
t,
|
|
23
|
+
n
|
|
23
24
|
);
|
|
24
|
-
return typeof
|
|
25
|
+
return typeof o != "function" && console.warn(
|
|
25
26
|
"EventReceiver.handleSubscribe should return a callback to cancel the subscription. Ignoring this warning may result in the execution of obsolete handlers and potential memory leaks."
|
|
26
|
-
),
|
|
27
|
+
), o;
|
|
27
28
|
}
|
|
28
29
|
}
|
|
29
|
-
const
|
|
30
|
-
function
|
|
31
|
-
eventReceiver:
|
|
32
|
-
children:
|
|
30
|
+
const L = (r) => r instanceof F;
|
|
31
|
+
function Q({
|
|
32
|
+
eventReceiver: r,
|
|
33
|
+
children: e
|
|
33
34
|
}) {
|
|
34
|
-
const
|
|
35
|
-
return /* @__PURE__ */
|
|
35
|
+
const t = q(() => ({ eventReceiver: r }), [r]);
|
|
36
|
+
return /* @__PURE__ */ C(l.Provider, { value: t, children: e });
|
|
36
37
|
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
mt.Consumer;
|
|
40
|
-
const st = ut({
|
|
41
|
-
name: "",
|
|
42
|
-
query: void 0,
|
|
43
|
-
options: void 0,
|
|
44
|
-
request: "",
|
|
45
|
-
revision: "",
|
|
46
|
-
data: [],
|
|
47
|
-
meta: {},
|
|
48
|
-
error: void 0,
|
|
49
|
-
isEmpty: !0,
|
|
50
|
-
isIncomplete: !1,
|
|
51
|
-
isInitial: !0,
|
|
52
|
-
dataProvider: void 0,
|
|
53
|
-
isLoading: !1,
|
|
54
|
-
isStale: !1,
|
|
55
|
-
next: { request: "", revision: "" },
|
|
56
|
-
notify: () => Promise.reject(new Error("Missing context provider"))
|
|
57
|
-
});
|
|
58
|
-
st.displayName = "ResourceContext";
|
|
59
|
-
st.Consumer;
|
|
60
|
-
const Bt = () => yt(st);
|
|
61
|
-
function et(T) {
|
|
62
|
-
throw new Error('Could not dynamically require "' + T + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
|
|
38
|
+
function H(r) {
|
|
39
|
+
return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
|
|
63
40
|
}
|
|
64
|
-
var
|
|
65
|
-
function
|
|
66
|
-
return
|
|
67
|
-
(
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
if (!D && J) return J(k, !0);
|
|
76
|
-
if (H) return H(k, !0);
|
|
77
|
-
throw new Error("Cannot find module '" + k + "'");
|
|
78
|
-
}
|
|
79
|
-
D = _[k] = { exports: {} }, U[k][0].call(D.exports, function(W) {
|
|
80
|
-
var K = U[k][1][W];
|
|
81
|
-
return q(K || W);
|
|
82
|
-
}, D, D.exports, w, U, _, L);
|
|
83
|
-
}
|
|
84
|
-
return _[k].exports;
|
|
85
|
-
}
|
|
86
|
-
for (var H = typeof et == "function" && et, $ = 0; $ < L.length; $++) q(L[$]);
|
|
87
|
-
return q;
|
|
88
|
-
})({ 1: [function(w, U, _) {
|
|
89
|
-
(function(L, q, H, $, k, D, J, W, K) {
|
|
90
|
-
var y = w("crypto");
|
|
91
|
-
function I(u, c) {
|
|
92
|
-
c = v(u, c);
|
|
93
|
-
var r;
|
|
94
|
-
return (r = c.algorithm !== "passthrough" ? y.createHash(c.algorithm) : new B()).write === void 0 && (r.write = r.update, r.end = r.update), d(c, r).dispatch(u), r.update || r.end(""), r.digest ? r.digest(c.encoding === "buffer" ? void 0 : c.encoding) : (u = r.read(), c.encoding !== "buffer" ? u.toString(c.encoding) : u);
|
|
95
|
-
}
|
|
96
|
-
(_ = U.exports = I).sha1 = function(u) {
|
|
97
|
-
return I(u);
|
|
98
|
-
}, _.keys = function(u) {
|
|
99
|
-
return I(u, { excludeValues: !0, algorithm: "sha1", encoding: "hex" });
|
|
100
|
-
}, _.MD5 = function(u) {
|
|
101
|
-
return I(u, { algorithm: "md5", encoding: "hex" });
|
|
102
|
-
}, _.keysMD5 = function(u) {
|
|
103
|
-
return I(u, { algorithm: "md5", encoding: "hex", excludeValues: !0 });
|
|
104
|
-
};
|
|
105
|
-
var a = y.getHashes ? y.getHashes().slice() : ["sha1", "md5"], p = (a.push("passthrough"), ["buffer", "hex", "binary", "base64"]);
|
|
106
|
-
function v(u, c) {
|
|
107
|
-
var r = {};
|
|
108
|
-
if (r.algorithm = (c = c || {}).algorithm || "sha1", r.encoding = c.encoding || "hex", r.excludeValues = !!c.excludeValues, r.algorithm = r.algorithm.toLowerCase(), r.encoding = r.encoding.toLowerCase(), r.ignoreUnknown = c.ignoreUnknown === !0, r.respectType = c.respectType !== !1, r.respectFunctionNames = c.respectFunctionNames !== !1, r.respectFunctionProperties = c.respectFunctionProperties !== !1, r.unorderedArrays = c.unorderedArrays === !0, r.unorderedSets = c.unorderedSets !== !1, r.unorderedObjects = c.unorderedObjects !== !1, r.replacer = c.replacer || void 0, r.excludeKeys = c.excludeKeys || void 0, u === void 0) throw new Error("Object argument required.");
|
|
109
|
-
for (var o = 0; o < a.length; ++o) a[o].toLowerCase() === r.algorithm.toLowerCase() && (r.algorithm = a[o]);
|
|
110
|
-
if (a.indexOf(r.algorithm) === -1) throw new Error('Algorithm "' + r.algorithm + '" not supported. supported values: ' + a.join(", "));
|
|
111
|
-
if (p.indexOf(r.encoding) === -1 && r.algorithm !== "passthrough") throw new Error('Encoding "' + r.encoding + '" not supported. supported values: ' + p.join(", "));
|
|
112
|
-
return r;
|
|
113
|
-
}
|
|
114
|
-
function g(u) {
|
|
115
|
-
if (typeof u == "function") return /^function\s+\w*\s*\(\s*\)\s*{\s+\[native code\]\s+}$/i.exec(Function.prototype.toString.call(u)) != null;
|
|
116
|
-
}
|
|
117
|
-
function d(u, c, r) {
|
|
118
|
-
r = r || [];
|
|
119
|
-
function o(e) {
|
|
120
|
-
return c.update ? c.update(e, "utf8") : c.write(e, "utf8");
|
|
121
|
-
}
|
|
122
|
-
return { dispatch: function(e) {
|
|
123
|
-
return this["_" + ((e = u.replacer ? u.replacer(e) : e) === null ? "null" : typeof e)](e);
|
|
124
|
-
}, _object: function(e) {
|
|
125
|
-
var s, f = Object.prototype.toString.call(e), x = /\[object (.*)\]/i.exec(f);
|
|
126
|
-
if (x = (x = x ? x[1] : "unknown:[" + f + "]").toLowerCase(), 0 <= (f = r.indexOf(e))) return this.dispatch("[CIRCULAR:" + f + "]");
|
|
127
|
-
if (r.push(e), H !== void 0 && H.isBuffer && H.isBuffer(e)) return o("buffer:"), o(e);
|
|
128
|
-
if (x === "object" || x === "function" || x === "asyncfunction") return f = Object.keys(e), u.unorderedObjects && (f = f.sort()), u.respectType === !1 || g(e) || f.splice(0, 0, "prototype", "__proto__", "constructor"), u.excludeKeys && (f = f.filter(function(A) {
|
|
129
|
-
return !u.excludeKeys(A);
|
|
130
|
-
})), o("object:" + f.length + ":"), s = this, f.forEach(function(A) {
|
|
131
|
-
s.dispatch(A), o(":"), u.excludeValues || s.dispatch(e[A]), o(",");
|
|
132
|
-
});
|
|
133
|
-
if (!this["_" + x]) {
|
|
134
|
-
if (u.ignoreUnknown) return o("[" + x + "]");
|
|
135
|
-
throw new Error('Unknown object type "' + x + '"');
|
|
136
|
-
}
|
|
137
|
-
this["_" + x](e);
|
|
138
|
-
}, _array: function(e, A) {
|
|
139
|
-
A = A !== void 0 ? A : u.unorderedArrays !== !1;
|
|
140
|
-
var f = this;
|
|
141
|
-
if (o("array:" + e.length + ":"), !A || e.length <= 1) return e.forEach(function(C) {
|
|
142
|
-
return f.dispatch(C);
|
|
143
|
-
});
|
|
144
|
-
var x = [], A = e.map(function(C) {
|
|
145
|
-
var E = new B(), M = r.slice();
|
|
146
|
-
return d(u, E, M).dispatch(C), x = x.concat(M.slice(r.length)), E.read().toString();
|
|
147
|
-
});
|
|
148
|
-
return r = r.concat(x), A.sort(), this._array(A, !1);
|
|
149
|
-
}, _date: function(e) {
|
|
150
|
-
return o("date:" + e.toJSON());
|
|
151
|
-
}, _symbol: function(e) {
|
|
152
|
-
return o("symbol:" + e.toString());
|
|
153
|
-
}, _error: function(e) {
|
|
154
|
-
return o("error:" + e.toString());
|
|
155
|
-
}, _boolean: function(e) {
|
|
156
|
-
return o("bool:" + e.toString());
|
|
157
|
-
}, _string: function(e) {
|
|
158
|
-
o("string:" + e.length + ":"), o(e.toString());
|
|
159
|
-
}, _function: function(e) {
|
|
160
|
-
o("fn:"), g(e) ? this.dispatch("[native]") : this.dispatch(e.toString()), u.respectFunctionNames !== !1 && this.dispatch("function-name:" + String(e.name)), u.respectFunctionProperties && this._object(e);
|
|
161
|
-
}, _number: function(e) {
|
|
162
|
-
return o("number:" + e.toString());
|
|
163
|
-
}, _xml: function(e) {
|
|
164
|
-
return o("xml:" + e.toString());
|
|
165
|
-
}, _null: function() {
|
|
166
|
-
return o("Null");
|
|
167
|
-
}, _undefined: function() {
|
|
168
|
-
return o("Undefined");
|
|
169
|
-
}, _regexp: function(e) {
|
|
170
|
-
return o("regex:" + e.toString());
|
|
171
|
-
}, _uint8array: function(e) {
|
|
172
|
-
return o("uint8array:"), this.dispatch(Array.prototype.slice.call(e));
|
|
173
|
-
}, _uint8clampedarray: function(e) {
|
|
174
|
-
return o("uint8clampedarray:"), this.dispatch(Array.prototype.slice.call(e));
|
|
175
|
-
}, _int8array: function(e) {
|
|
176
|
-
return o("int8array:"), this.dispatch(Array.prototype.slice.call(e));
|
|
177
|
-
}, _uint16array: function(e) {
|
|
178
|
-
return o("uint16array:"), this.dispatch(Array.prototype.slice.call(e));
|
|
179
|
-
}, _int16array: function(e) {
|
|
180
|
-
return o("int16array:"), this.dispatch(Array.prototype.slice.call(e));
|
|
181
|
-
}, _uint32array: function(e) {
|
|
182
|
-
return o("uint32array:"), this.dispatch(Array.prototype.slice.call(e));
|
|
183
|
-
}, _int32array: function(e) {
|
|
184
|
-
return o("int32array:"), this.dispatch(Array.prototype.slice.call(e));
|
|
185
|
-
}, _float32array: function(e) {
|
|
186
|
-
return o("float32array:"), this.dispatch(Array.prototype.slice.call(e));
|
|
187
|
-
}, _float64array: function(e) {
|
|
188
|
-
return o("float64array:"), this.dispatch(Array.prototype.slice.call(e));
|
|
189
|
-
}, _arraybuffer: function(e) {
|
|
190
|
-
return o("arraybuffer:"), this.dispatch(new Uint8Array(e));
|
|
191
|
-
}, _url: function(e) {
|
|
192
|
-
return o("url:" + e.toString());
|
|
193
|
-
}, _map: function(e) {
|
|
194
|
-
return o("map:"), e = Array.from(e), this._array(e, u.unorderedSets !== !1);
|
|
195
|
-
}, _set: function(e) {
|
|
196
|
-
return o("set:"), e = Array.from(e), this._array(e, u.unorderedSets !== !1);
|
|
197
|
-
}, _file: function(e) {
|
|
198
|
-
return o("file:"), this.dispatch([e.name, e.size, e.type, e.lastModfied]);
|
|
199
|
-
}, _blob: function() {
|
|
200
|
-
if (u.ignoreUnknown) return o("[blob]");
|
|
201
|
-
throw Error(`Hashing Blob objects is currently not supported
|
|
202
|
-
(see https://github.com/puleos/object-hash/issues/26)
|
|
203
|
-
Use "options.replacer" or "options.ignoreUnknown"
|
|
204
|
-
`);
|
|
205
|
-
}, _domwindow: function() {
|
|
206
|
-
return o("domwindow");
|
|
207
|
-
}, _bigint: function(e) {
|
|
208
|
-
return o("bigint:" + e.toString());
|
|
209
|
-
}, _process: function() {
|
|
210
|
-
return o("process");
|
|
211
|
-
}, _timer: function() {
|
|
212
|
-
return o("timer");
|
|
213
|
-
}, _pipe: function() {
|
|
214
|
-
return o("pipe");
|
|
215
|
-
}, _tcp: function() {
|
|
216
|
-
return o("tcp");
|
|
217
|
-
}, _udp: function() {
|
|
218
|
-
return o("udp");
|
|
219
|
-
}, _tty: function() {
|
|
220
|
-
return o("tty");
|
|
221
|
-
}, _statwatcher: function() {
|
|
222
|
-
return o("statwatcher");
|
|
223
|
-
}, _securecontext: function() {
|
|
224
|
-
return o("securecontext");
|
|
225
|
-
}, _connection: function() {
|
|
226
|
-
return o("connection");
|
|
227
|
-
}, _zlib: function() {
|
|
228
|
-
return o("zlib");
|
|
229
|
-
}, _context: function() {
|
|
230
|
-
return o("context");
|
|
231
|
-
}, _nodescript: function() {
|
|
232
|
-
return o("nodescript");
|
|
233
|
-
}, _httpparser: function() {
|
|
234
|
-
return o("httpparser");
|
|
235
|
-
}, _dataview: function() {
|
|
236
|
-
return o("dataview");
|
|
237
|
-
}, _signal: function() {
|
|
238
|
-
return o("signal");
|
|
239
|
-
}, _fsevent: function() {
|
|
240
|
-
return o("fsevent");
|
|
241
|
-
}, _tlswrap: function() {
|
|
242
|
-
return o("tlswrap");
|
|
243
|
-
} };
|
|
244
|
-
}
|
|
245
|
-
function B() {
|
|
246
|
-
return { buf: "", write: function(u) {
|
|
247
|
-
this.buf += u;
|
|
248
|
-
}, end: function(u) {
|
|
249
|
-
this.buf += u;
|
|
250
|
-
}, read: function() {
|
|
251
|
-
return this.buf;
|
|
252
|
-
} };
|
|
253
|
-
}
|
|
254
|
-
_.writeToStream = function(u, c, r) {
|
|
255
|
-
return r === void 0 && (r = c, c = {}), d(c = v(u, c), r).dispatch(u);
|
|
256
|
-
};
|
|
257
|
-
}).call(this, w("lYpoI2"), typeof self < "u" ? self : typeof window < "u" ? window : {}, w("buffer").Buffer, arguments[3], arguments[4], arguments[5], arguments[6], "/fake_9a5aa49d.js", "/");
|
|
258
|
-
}, { buffer: 3, crypto: 5, lYpoI2: 11 }], 2: [function(w, U, _) {
|
|
259
|
-
(function(L, q, H, $, k, D, J, W, K) {
|
|
260
|
-
(function(y) {
|
|
261
|
-
var I = typeof Uint8Array < "u" ? Uint8Array : Array, a = 43, p = 47, v = 48, g = 97, d = 65, B = 45, u = 95;
|
|
262
|
-
function c(r) {
|
|
263
|
-
return r = r.charCodeAt(0), r === a || r === B ? 62 : r === p || r === u ? 63 : r < v ? -1 : r < v + 10 ? r - v + 26 + 26 : r < d + 26 ? r - d : r < g + 26 ? r - g + 26 : void 0;
|
|
264
|
-
}
|
|
265
|
-
y.toByteArray = function(r) {
|
|
266
|
-
var o, e;
|
|
267
|
-
if (0 < r.length % 4) throw new Error("Invalid string. Length must be a multiple of 4");
|
|
268
|
-
var s = r.length, s = r.charAt(s - 2) === "=" ? 2 : r.charAt(s - 1) === "=" ? 1 : 0, f = new I(3 * r.length / 4 - s), x = 0 < s ? r.length - 4 : r.length, A = 0;
|
|
269
|
-
function C(E) {
|
|
270
|
-
f[A++] = E;
|
|
271
|
-
}
|
|
272
|
-
for (o = 0; o < x; o += 4, 0) C((16711680 & (e = c(r.charAt(o)) << 18 | c(r.charAt(o + 1)) << 12 | c(r.charAt(o + 2)) << 6 | c(r.charAt(o + 3)))) >> 16), C((65280 & e) >> 8), C(255 & e);
|
|
273
|
-
return s == 2 ? C(255 & (e = c(r.charAt(o)) << 2 | c(r.charAt(o + 1)) >> 4)) : s == 1 && (C((e = c(r.charAt(o)) << 10 | c(r.charAt(o + 1)) << 4 | c(r.charAt(o + 2)) >> 2) >> 8 & 255), C(255 & e)), f;
|
|
274
|
-
}, y.fromByteArray = function(r) {
|
|
275
|
-
var o, e, s, f, x = r.length % 3, A = "";
|
|
276
|
-
function C(E) {
|
|
277
|
-
return "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(E);
|
|
278
|
-
}
|
|
279
|
-
for (o = 0, s = r.length - x; o < s; o += 3) e = (r[o] << 16) + (r[o + 1] << 8) + r[o + 2], A += C((f = e) >> 18 & 63) + C(f >> 12 & 63) + C(f >> 6 & 63) + C(63 & f);
|
|
280
|
-
switch (x) {
|
|
281
|
-
case 1:
|
|
282
|
-
A = (A += C((e = r[r.length - 1]) >> 2)) + C(e << 4 & 63) + "==";
|
|
283
|
-
break;
|
|
284
|
-
case 2:
|
|
285
|
-
A = (A = (A += C((e = (r[r.length - 2] << 8) + r[r.length - 1]) >> 10)) + C(e >> 4 & 63)) + C(e << 2 & 63) + "=";
|
|
286
|
-
}
|
|
287
|
-
return A;
|
|
288
|
-
};
|
|
289
|
-
})(_ === void 0 ? this.base64js = {} : _);
|
|
290
|
-
}).call(this, w("lYpoI2"), typeof self < "u" ? self : typeof window < "u" ? window : {}, w("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");
|
|
291
|
-
}, { buffer: 3, lYpoI2: 11 }], 3: [function(w, U, _) {
|
|
292
|
-
(function(L, q, a, $, k, D, J, W, K) {
|
|
293
|
-
var y = w("base64-js"), I = w("ieee754");
|
|
294
|
-
function a(t, n, i) {
|
|
295
|
-
if (!(this instanceof a)) return new a(t, n, i);
|
|
296
|
-
var h, l, b, S, O = typeof t;
|
|
297
|
-
if (n === "base64" && O == "string") for (t = (S = t).trim ? S.trim() : S.replace(/^\s+|\s+$/g, ""); t.length % 4 != 0; ) t += "=";
|
|
298
|
-
if (O == "number") h = X(t);
|
|
299
|
-
else if (O == "string") h = a.byteLength(t, n);
|
|
300
|
-
else {
|
|
301
|
-
if (O != "object") throw new Error("First argument needs to be a number, array or string.");
|
|
302
|
-
h = X(t.length);
|
|
303
|
-
}
|
|
304
|
-
if (a._useTypedArrays ? l = a._augment(new Uint8Array(h)) : ((l = this).length = h, l._isBuffer = !0), a._useTypedArrays && typeof t.byteLength == "number") l._set(t);
|
|
305
|
-
else if (R(S = t) || a.isBuffer(S) || S && typeof S == "object" && typeof S.length == "number") for (b = 0; b < h; b++) a.isBuffer(t) ? l[b] = t.readUInt8(b) : l[b] = t[b];
|
|
306
|
-
else if (O == "string") l.write(t, 0, n);
|
|
307
|
-
else if (O == "number" && !a._useTypedArrays && !i) for (b = 0; b < h; b++) l[b] = 0;
|
|
308
|
-
return l;
|
|
309
|
-
}
|
|
310
|
-
function p(t, n, i, h) {
|
|
311
|
-
return a._charsWritten = tt((function(l) {
|
|
312
|
-
for (var b = [], S = 0; S < l.length; S++) b.push(255 & l.charCodeAt(S));
|
|
313
|
-
return b;
|
|
314
|
-
})(n), t, i, h);
|
|
315
|
-
}
|
|
316
|
-
function v(t, n, i, h) {
|
|
317
|
-
return a._charsWritten = tt((function(l) {
|
|
318
|
-
for (var b, S, O = [], F = 0; F < l.length; F++) S = l.charCodeAt(F), b = S >> 8, S = S % 256, O.push(S), O.push(b);
|
|
319
|
-
return O;
|
|
320
|
-
})(n), t, i, h);
|
|
321
|
-
}
|
|
322
|
-
function g(t, n, i) {
|
|
323
|
-
var h = "";
|
|
324
|
-
i = Math.min(t.length, i);
|
|
325
|
-
for (var l = n; l < i; l++) h += String.fromCharCode(t[l]);
|
|
326
|
-
return h;
|
|
327
|
-
}
|
|
328
|
-
function d(t, n, i, b) {
|
|
329
|
-
b || (m(typeof i == "boolean", "missing or invalid endian"), m(n != null, "missing offset"), m(n + 1 < t.length, "Trying to read beyond buffer length"));
|
|
330
|
-
var l, b = t.length;
|
|
331
|
-
if (!(b <= n)) return i ? (l = t[n], n + 1 < b && (l |= t[n + 1] << 8)) : (l = t[n] << 8, n + 1 < b && (l |= t[n + 1])), l;
|
|
332
|
-
}
|
|
333
|
-
function B(t, n, i, b) {
|
|
334
|
-
b || (m(typeof i == "boolean", "missing or invalid endian"), m(n != null, "missing offset"), m(n + 3 < t.length, "Trying to read beyond buffer length"));
|
|
335
|
-
var l, b = t.length;
|
|
336
|
-
if (!(b <= n)) return i ? (n + 2 < b && (l = t[n + 2] << 16), n + 1 < b && (l |= t[n + 1] << 8), l |= t[n], n + 3 < b && (l += t[n + 3] << 24 >>> 0)) : (n + 1 < b && (l = t[n + 1] << 16), n + 2 < b && (l |= t[n + 2] << 8), n + 3 < b && (l |= t[n + 3]), l += t[n] << 24 >>> 0), l;
|
|
337
|
-
}
|
|
338
|
-
function u(t, n, i, h) {
|
|
339
|
-
if (h || (m(typeof i == "boolean", "missing or invalid endian"), m(n != null, "missing offset"), m(n + 1 < t.length, "Trying to read beyond buffer length")), !(t.length <= n)) return h = d(t, n, i, !0), 32768 & h ? -1 * (65535 - h + 1) : h;
|
|
340
|
-
}
|
|
341
|
-
function c(t, n, i, h) {
|
|
342
|
-
if (h || (m(typeof i == "boolean", "missing or invalid endian"), m(n != null, "missing offset"), m(n + 3 < t.length, "Trying to read beyond buffer length")), !(t.length <= n)) return h = B(t, n, i, !0), 2147483648 & h ? -1 * (4294967295 - h + 1) : h;
|
|
343
|
-
}
|
|
344
|
-
function r(t, n, i, h) {
|
|
345
|
-
return h || (m(typeof i == "boolean", "missing or invalid endian"), m(n + 3 < t.length, "Trying to read beyond buffer length")), I.read(t, n, i, 23, 4);
|
|
346
|
-
}
|
|
347
|
-
function o(t, n, i, h) {
|
|
348
|
-
return h || (m(typeof i == "boolean", "missing or invalid endian"), m(n + 7 < t.length, "Trying to read beyond buffer length")), I.read(t, n, i, 52, 8);
|
|
349
|
-
}
|
|
350
|
-
function e(t, n, i, h, l) {
|
|
351
|
-
if (l || (m(n != null, "missing value"), m(typeof h == "boolean", "missing or invalid endian"), m(i != null, "missing offset"), m(i + 1 < t.length, "trying to write beyond buffer length"), nt(n, 65535)), l = t.length, !(l <= i)) for (var b = 0, S = Math.min(l - i, 2); b < S; b++) t[i + b] = (n & 255 << 8 * (h ? b : 1 - b)) >>> 8 * (h ? b : 1 - b);
|
|
352
|
-
}
|
|
353
|
-
function s(t, n, i, h, l) {
|
|
354
|
-
if (l || (m(n != null, "missing value"), m(typeof h == "boolean", "missing or invalid endian"), m(i != null, "missing offset"), m(i + 3 < t.length, "trying to write beyond buffer length"), nt(n, 4294967295)), l = t.length, !(l <= i)) for (var b = 0, S = Math.min(l - i, 4); b < S; b++) t[i + b] = n >>> 8 * (h ? b : 3 - b) & 255;
|
|
355
|
-
}
|
|
356
|
-
function f(t, n, i, h, l) {
|
|
357
|
-
l || (m(n != null, "missing value"), m(typeof h == "boolean", "missing or invalid endian"), m(i != null, "missing offset"), m(i + 1 < t.length, "Trying to write beyond buffer length"), ot(n, 32767, -32768)), t.length <= i || e(t, 0 <= n ? n : 65535 + n + 1, i, h, l);
|
|
358
|
-
}
|
|
359
|
-
function x(t, n, i, h, l) {
|
|
360
|
-
l || (m(n != null, "missing value"), m(typeof h == "boolean", "missing or invalid endian"), m(i != null, "missing offset"), m(i + 3 < t.length, "Trying to write beyond buffer length"), ot(n, 2147483647, -2147483648)), t.length <= i || s(t, 0 <= n ? n : 4294967295 + n + 1, i, h, l);
|
|
361
|
-
}
|
|
362
|
-
function A(t, n, i, h, l) {
|
|
363
|
-
l || (m(n != null, "missing value"), m(typeof h == "boolean", "missing or invalid endian"), m(i != null, "missing offset"), m(i + 3 < t.length, "Trying to write beyond buffer length"), ct(n, 34028234663852886e22, -34028234663852886e22)), t.length <= i || I.write(t, n, i, h, 23, 4);
|
|
364
|
-
}
|
|
365
|
-
function C(t, n, i, h, l) {
|
|
366
|
-
l || (m(n != null, "missing value"), m(typeof h == "boolean", "missing or invalid endian"), m(i != null, "missing offset"), m(i + 7 < t.length, "Trying to write beyond buffer length"), ct(n, 17976931348623157e292, -17976931348623157e292)), t.length <= i || I.write(t, n, i, h, 52, 8);
|
|
367
|
-
}
|
|
368
|
-
_.Buffer = a, _.SlowBuffer = a, _.INSPECT_MAX_BYTES = 50, a.poolSize = 8192, a._useTypedArrays = (function() {
|
|
369
|
-
try {
|
|
370
|
-
var t = new ArrayBuffer(0), n = new Uint8Array(t);
|
|
371
|
-
return n.foo = function() {
|
|
372
|
-
return 42;
|
|
373
|
-
}, n.foo() === 42 && typeof n.subarray == "function";
|
|
374
|
-
} catch {
|
|
375
|
-
return !1;
|
|
376
|
-
}
|
|
377
|
-
})(), a.isEncoding = function(t) {
|
|
378
|
-
switch (String(t).toLowerCase()) {
|
|
379
|
-
case "hex":
|
|
380
|
-
case "utf8":
|
|
381
|
-
case "utf-8":
|
|
382
|
-
case "ascii":
|
|
383
|
-
case "binary":
|
|
384
|
-
case "base64":
|
|
385
|
-
case "raw":
|
|
386
|
-
case "ucs2":
|
|
387
|
-
case "ucs-2":
|
|
388
|
-
case "utf16le":
|
|
389
|
-
case "utf-16le":
|
|
390
|
-
return !0;
|
|
391
|
-
default:
|
|
392
|
-
return !1;
|
|
393
|
-
}
|
|
394
|
-
}, a.isBuffer = function(t) {
|
|
395
|
-
return !(t == null || !t._isBuffer);
|
|
396
|
-
}, a.byteLength = function(t, n) {
|
|
397
|
-
var i;
|
|
398
|
-
switch (t += "", n || "utf8") {
|
|
399
|
-
case "hex":
|
|
400
|
-
i = t.length / 2;
|
|
401
|
-
break;
|
|
402
|
-
case "utf8":
|
|
403
|
-
case "utf-8":
|
|
404
|
-
i = G(t).length;
|
|
405
|
-
break;
|
|
406
|
-
case "ascii":
|
|
407
|
-
case "binary":
|
|
408
|
-
case "raw":
|
|
409
|
-
i = t.length;
|
|
410
|
-
break;
|
|
411
|
-
case "base64":
|
|
412
|
-
i = ft(t).length;
|
|
413
|
-
break;
|
|
414
|
-
case "ucs2":
|
|
415
|
-
case "ucs-2":
|
|
416
|
-
case "utf16le":
|
|
417
|
-
case "utf-16le":
|
|
418
|
-
i = 2 * t.length;
|
|
419
|
-
break;
|
|
420
|
-
default:
|
|
421
|
-
throw new Error("Unknown encoding");
|
|
422
|
-
}
|
|
423
|
-
return i;
|
|
424
|
-
}, a.concat = function(t, n) {
|
|
425
|
-
if (m(R(t), `Usage: Buffer.concat(list, [totalLength])
|
|
426
|
-
list should be an Array.`), t.length === 0) return new a(0);
|
|
427
|
-
if (t.length === 1) return t[0];
|
|
428
|
-
if (typeof n != "number") for (l = n = 0; l < t.length; l++) n += t[l].length;
|
|
429
|
-
for (var i = new a(n), h = 0, l = 0; l < t.length; l++) {
|
|
430
|
-
var b = t[l];
|
|
431
|
-
b.copy(i, h), h += b.length;
|
|
432
|
-
}
|
|
433
|
-
return i;
|
|
434
|
-
}, a.prototype.write = function(t, n, i, h) {
|
|
435
|
-
isFinite(n) ? isFinite(i) || (h = i, i = void 0) : (F = h, h = n, n = i, i = F), n = Number(n) || 0;
|
|
436
|
-
var l, b, S, O, F = this.length - n;
|
|
437
|
-
switch ((!i || F < (i = Number(i))) && (i = F), h = String(h || "utf8").toLowerCase()) {
|
|
438
|
-
case "hex":
|
|
439
|
-
l = (function(Z, z, Q, P) {
|
|
440
|
-
Q = Number(Q) || 0;
|
|
441
|
-
var Y = Z.length - Q;
|
|
442
|
-
(!P || Y < (P = Number(P))) && (P = Y), m((Y = z.length) % 2 == 0, "Invalid hex string"), Y / 2 < P && (P = Y / 2);
|
|
443
|
-
for (var V = 0; V < P; V++) {
|
|
444
|
-
var lt = parseInt(z.substr(2 * V, 2), 16);
|
|
445
|
-
m(!isNaN(lt), "Invalid hex string"), Z[Q + V] = lt;
|
|
446
|
-
}
|
|
447
|
-
return a._charsWritten = 2 * V, V;
|
|
448
|
-
})(this, t, n, i);
|
|
449
|
-
break;
|
|
450
|
-
case "utf8":
|
|
451
|
-
case "utf-8":
|
|
452
|
-
b = this, S = n, O = i, l = a._charsWritten = tt(G(t), b, S, O);
|
|
453
|
-
break;
|
|
454
|
-
case "ascii":
|
|
455
|
-
case "binary":
|
|
456
|
-
l = p(this, t, n, i);
|
|
457
|
-
break;
|
|
458
|
-
case "base64":
|
|
459
|
-
b = this, S = n, O = i, l = a._charsWritten = tt(ft(t), b, S, O);
|
|
460
|
-
break;
|
|
461
|
-
case "ucs2":
|
|
462
|
-
case "ucs-2":
|
|
463
|
-
case "utf16le":
|
|
464
|
-
case "utf-16le":
|
|
465
|
-
l = v(this, t, n, i);
|
|
466
|
-
break;
|
|
467
|
-
default:
|
|
468
|
-
throw new Error("Unknown encoding");
|
|
469
|
-
}
|
|
470
|
-
return l;
|
|
471
|
-
}, a.prototype.toString = function(t, n, i) {
|
|
472
|
-
var h, l, b, S, O = this;
|
|
473
|
-
if (t = String(t || "utf8").toLowerCase(), n = Number(n) || 0, (i = i !== void 0 ? Number(i) : O.length) === n) return "";
|
|
474
|
-
switch (t) {
|
|
475
|
-
case "hex":
|
|
476
|
-
h = (function(F, Z, z) {
|
|
477
|
-
var Q = F.length;
|
|
478
|
-
(!Z || Z < 0) && (Z = 0), (!z || z < 0 || Q < z) && (z = Q);
|
|
479
|
-
for (var P = "", Y = Z; Y < z; Y++) P += N(F[Y]);
|
|
480
|
-
return P;
|
|
481
|
-
})(O, n, i);
|
|
482
|
-
break;
|
|
483
|
-
case "utf8":
|
|
484
|
-
case "utf-8":
|
|
485
|
-
h = (function(F, Z, z) {
|
|
486
|
-
var Q = "", P = "";
|
|
487
|
-
z = Math.min(F.length, z);
|
|
488
|
-
for (var Y = Z; Y < z; Y++) F[Y] <= 127 ? (Q += at(P) + String.fromCharCode(F[Y]), P = "") : P += "%" + F[Y].toString(16);
|
|
489
|
-
return Q + at(P);
|
|
490
|
-
})(O, n, i);
|
|
491
|
-
break;
|
|
492
|
-
case "ascii":
|
|
493
|
-
case "binary":
|
|
494
|
-
h = g(O, n, i);
|
|
495
|
-
break;
|
|
496
|
-
case "base64":
|
|
497
|
-
l = O, S = i, h = (b = n) === 0 && S === l.length ? y.fromByteArray(l) : y.fromByteArray(l.slice(b, S));
|
|
498
|
-
break;
|
|
499
|
-
case "ucs2":
|
|
500
|
-
case "ucs-2":
|
|
501
|
-
case "utf16le":
|
|
502
|
-
case "utf-16le":
|
|
503
|
-
h = (function(F, Z, z) {
|
|
504
|
-
for (var Q = F.slice(Z, z), P = "", Y = 0; Y < Q.length; Y += 2) P += String.fromCharCode(Q[Y] + 256 * Q[Y + 1]);
|
|
505
|
-
return P;
|
|
506
|
-
})(O, n, i);
|
|
507
|
-
break;
|
|
508
|
-
default:
|
|
509
|
-
throw new Error("Unknown encoding");
|
|
510
|
-
}
|
|
511
|
-
return h;
|
|
512
|
-
}, a.prototype.toJSON = function() {
|
|
513
|
-
return { type: "Buffer", data: Array.prototype.slice.call(this._arr || this, 0) };
|
|
514
|
-
}, a.prototype.copy = function(t, n, i, h) {
|
|
515
|
-
if (n = n || 0, (h = h || h === 0 ? h : this.length) !== (i = i || 0) && t.length !== 0 && this.length !== 0) {
|
|
516
|
-
m(i <= h, "sourceEnd < sourceStart"), m(0 <= n && n < t.length, "targetStart out of bounds"), m(0 <= i && i < this.length, "sourceStart out of bounds"), m(0 <= h && h <= this.length, "sourceEnd out of bounds"), h > this.length && (h = this.length);
|
|
517
|
-
var l = (h = t.length - n < h - i ? t.length - n + i : h) - i;
|
|
518
|
-
if (l < 100 || !a._useTypedArrays) for (var b = 0; b < l; b++) t[b + n] = this[b + i];
|
|
519
|
-
else t._set(this.subarray(i, i + l), n);
|
|
520
|
-
}
|
|
521
|
-
}, a.prototype.slice = function(t, n) {
|
|
522
|
-
var i = this.length;
|
|
523
|
-
if (t = M(t, i, 0), n = M(n, i, i), a._useTypedArrays) return a._augment(this.subarray(t, n));
|
|
524
|
-
for (var h = n - t, l = new a(h, void 0, !0), b = 0; b < h; b++) l[b] = this[b + t];
|
|
525
|
-
return l;
|
|
526
|
-
}, a.prototype.get = function(t) {
|
|
527
|
-
return console.log(".get() is deprecated. Access using array indexes instead."), this.readUInt8(t);
|
|
528
|
-
}, a.prototype.set = function(t, n) {
|
|
529
|
-
return console.log(".set() is deprecated. Access using array indexes instead."), this.writeUInt8(t, n);
|
|
530
|
-
}, a.prototype.readUInt8 = function(t, n) {
|
|
531
|
-
if (n || (m(t != null, "missing offset"), m(t < this.length, "Trying to read beyond buffer length")), !(t >= this.length)) return this[t];
|
|
532
|
-
}, a.prototype.readUInt16LE = function(t, n) {
|
|
533
|
-
return d(this, t, !0, n);
|
|
534
|
-
}, a.prototype.readUInt16BE = function(t, n) {
|
|
535
|
-
return d(this, t, !1, n);
|
|
536
|
-
}, a.prototype.readUInt32LE = function(t, n) {
|
|
537
|
-
return B(this, t, !0, n);
|
|
538
|
-
}, a.prototype.readUInt32BE = function(t, n) {
|
|
539
|
-
return B(this, t, !1, n);
|
|
540
|
-
}, a.prototype.readInt8 = function(t, n) {
|
|
541
|
-
if (n || (m(t != null, "missing offset"), m(t < this.length, "Trying to read beyond buffer length")), !(t >= this.length)) return 128 & this[t] ? -1 * (255 - this[t] + 1) : this[t];
|
|
542
|
-
}, a.prototype.readInt16LE = function(t, n) {
|
|
543
|
-
return u(this, t, !0, n);
|
|
544
|
-
}, a.prototype.readInt16BE = function(t, n) {
|
|
545
|
-
return u(this, t, !1, n);
|
|
546
|
-
}, a.prototype.readInt32LE = function(t, n) {
|
|
547
|
-
return c(this, t, !0, n);
|
|
548
|
-
}, a.prototype.readInt32BE = function(t, n) {
|
|
549
|
-
return c(this, t, !1, n);
|
|
550
|
-
}, a.prototype.readFloatLE = function(t, n) {
|
|
551
|
-
return r(this, t, !0, n);
|
|
552
|
-
}, a.prototype.readFloatBE = function(t, n) {
|
|
553
|
-
return r(this, t, !1, n);
|
|
554
|
-
}, a.prototype.readDoubleLE = function(t, n) {
|
|
555
|
-
return o(this, t, !0, n);
|
|
556
|
-
}, a.prototype.readDoubleBE = function(t, n) {
|
|
557
|
-
return o(this, t, !1, n);
|
|
558
|
-
}, a.prototype.writeUInt8 = function(t, n, i) {
|
|
559
|
-
i || (m(t != null, "missing value"), m(n != null, "missing offset"), m(n < this.length, "trying to write beyond buffer length"), nt(t, 255)), n >= this.length || (this[n] = t);
|
|
560
|
-
}, a.prototype.writeUInt16LE = function(t, n, i) {
|
|
561
|
-
e(this, t, n, !0, i);
|
|
562
|
-
}, a.prototype.writeUInt16BE = function(t, n, i) {
|
|
563
|
-
e(this, t, n, !1, i);
|
|
564
|
-
}, a.prototype.writeUInt32LE = function(t, n, i) {
|
|
565
|
-
s(this, t, n, !0, i);
|
|
566
|
-
}, a.prototype.writeUInt32BE = function(t, n, i) {
|
|
567
|
-
s(this, t, n, !1, i);
|
|
568
|
-
}, a.prototype.writeInt8 = function(t, n, i) {
|
|
569
|
-
i || (m(t != null, "missing value"), m(n != null, "missing offset"), m(n < this.length, "Trying to write beyond buffer length"), ot(t, 127, -128)), n >= this.length || (0 <= t ? this.writeUInt8(t, n, i) : this.writeUInt8(255 + t + 1, n, i));
|
|
570
|
-
}, a.prototype.writeInt16LE = function(t, n, i) {
|
|
571
|
-
f(this, t, n, !0, i);
|
|
572
|
-
}, a.prototype.writeInt16BE = function(t, n, i) {
|
|
573
|
-
f(this, t, n, !1, i);
|
|
574
|
-
}, a.prototype.writeInt32LE = function(t, n, i) {
|
|
575
|
-
x(this, t, n, !0, i);
|
|
576
|
-
}, a.prototype.writeInt32BE = function(t, n, i) {
|
|
577
|
-
x(this, t, n, !1, i);
|
|
578
|
-
}, a.prototype.writeFloatLE = function(t, n, i) {
|
|
579
|
-
A(this, t, n, !0, i);
|
|
580
|
-
}, a.prototype.writeFloatBE = function(t, n, i) {
|
|
581
|
-
A(this, t, n, !1, i);
|
|
582
|
-
}, a.prototype.writeDoubleLE = function(t, n, i) {
|
|
583
|
-
C(this, t, n, !0, i);
|
|
584
|
-
}, a.prototype.writeDoubleBE = function(t, n, i) {
|
|
585
|
-
C(this, t, n, !1, i);
|
|
586
|
-
}, a.prototype.fill = function(t, n, i) {
|
|
587
|
-
if (n = n || 0, i = i || this.length, m(typeof (t = typeof (t = t || 0) == "string" ? t.charCodeAt(0) : t) == "number" && !isNaN(t), "value is not a number"), m(n <= i, "end < start"), i !== n && this.length !== 0) {
|
|
588
|
-
m(0 <= n && n < this.length, "start out of bounds"), m(0 <= i && i <= this.length, "end out of bounds");
|
|
589
|
-
for (var h = n; h < i; h++) this[h] = t;
|
|
590
|
-
}
|
|
591
|
-
}, a.prototype.inspect = function() {
|
|
592
|
-
for (var t = [], n = this.length, i = 0; i < n; i++) if (t[i] = N(this[i]), i === _.INSPECT_MAX_BYTES) {
|
|
593
|
-
t[i + 1] = "...";
|
|
594
|
-
break;
|
|
595
|
-
}
|
|
596
|
-
return "<Buffer " + t.join(" ") + ">";
|
|
597
|
-
}, a.prototype.toArrayBuffer = function() {
|
|
598
|
-
if (typeof Uint8Array > "u") throw new Error("Buffer.toArrayBuffer not supported in this browser");
|
|
599
|
-
if (a._useTypedArrays) return new a(this).buffer;
|
|
600
|
-
for (var t = new Uint8Array(this.length), n = 0, i = t.length; n < i; n += 1) t[n] = this[n];
|
|
601
|
-
return t.buffer;
|
|
602
|
-
};
|
|
603
|
-
var E = a.prototype;
|
|
604
|
-
function M(t, n, i) {
|
|
605
|
-
return typeof t != "number" ? i : n <= (t = ~~t) ? n : 0 <= t || 0 <= (t += n) ? t : 0;
|
|
606
|
-
}
|
|
607
|
-
function X(t) {
|
|
608
|
-
return (t = ~~Math.ceil(+t)) < 0 ? 0 : t;
|
|
609
|
-
}
|
|
610
|
-
function R(t) {
|
|
611
|
-
return (Array.isArray || function(n) {
|
|
612
|
-
return Object.prototype.toString.call(n) === "[object Array]";
|
|
613
|
-
})(t);
|
|
614
|
-
}
|
|
615
|
-
function N(t) {
|
|
616
|
-
return t < 16 ? "0" + t.toString(16) : t.toString(16);
|
|
617
|
-
}
|
|
618
|
-
function G(t) {
|
|
619
|
-
for (var n = [], i = 0; i < t.length; i++) {
|
|
620
|
-
var h = t.charCodeAt(i);
|
|
621
|
-
if (h <= 127) n.push(t.charCodeAt(i));
|
|
622
|
-
else for (var l = i, b = (55296 <= h && h <= 57343 && i++, encodeURIComponent(t.slice(l, i + 1)).substr(1).split("%")), S = 0; S < b.length; S++) n.push(parseInt(b[S], 16));
|
|
623
|
-
}
|
|
624
|
-
return n;
|
|
625
|
-
}
|
|
626
|
-
function ft(t) {
|
|
627
|
-
return y.toByteArray(t);
|
|
628
|
-
}
|
|
629
|
-
function tt(t, n, i, h) {
|
|
630
|
-
for (var l = 0; l < h && !(l + i >= n.length || l >= t.length); l++) n[l + i] = t[l];
|
|
631
|
-
return l;
|
|
632
|
-
}
|
|
633
|
-
function at(t) {
|
|
634
|
-
try {
|
|
635
|
-
return decodeURIComponent(t);
|
|
636
|
-
} catch {
|
|
637
|
-
return "�";
|
|
638
|
-
}
|
|
639
|
-
}
|
|
640
|
-
function nt(t, n) {
|
|
641
|
-
m(typeof t == "number", "cannot write a non-number as a number"), m(0 <= t, "specified a negative value for writing an unsigned value"), m(t <= n, "value is larger than maximum value for type"), m(Math.floor(t) === t, "value has a fractional component");
|
|
642
|
-
}
|
|
643
|
-
function ot(t, n, i) {
|
|
644
|
-
m(typeof t == "number", "cannot write a non-number as a number"), m(t <= n, "value larger than maximum allowed value"), m(i <= t, "value smaller than minimum allowed value"), m(Math.floor(t) === t, "value has a fractional component");
|
|
645
|
-
}
|
|
646
|
-
function ct(t, n, i) {
|
|
647
|
-
m(typeof t == "number", "cannot write a non-number as a number"), m(t <= n, "value larger than maximum allowed value"), m(i <= t, "value smaller than minimum allowed value");
|
|
648
|
-
}
|
|
649
|
-
function m(t, n) {
|
|
650
|
-
if (!t) throw new Error(n || "Failed assertion");
|
|
651
|
-
}
|
|
652
|
-
a._augment = function(t) {
|
|
653
|
-
return t._isBuffer = !0, t._get = t.get, t._set = t.set, t.get = E.get, t.set = E.set, t.write = E.write, t.toString = E.toString, t.toLocaleString = E.toString, t.toJSON = E.toJSON, t.copy = E.copy, t.slice = E.slice, t.readUInt8 = E.readUInt8, t.readUInt16LE = E.readUInt16LE, t.readUInt16BE = E.readUInt16BE, t.readUInt32LE = E.readUInt32LE, t.readUInt32BE = E.readUInt32BE, t.readInt8 = E.readInt8, t.readInt16LE = E.readInt16LE, t.readInt16BE = E.readInt16BE, t.readInt32LE = E.readInt32LE, t.readInt32BE = E.readInt32BE, t.readFloatLE = E.readFloatLE, t.readFloatBE = E.readFloatBE, t.readDoubleLE = E.readDoubleLE, t.readDoubleBE = E.readDoubleBE, t.writeUInt8 = E.writeUInt8, t.writeUInt16LE = E.writeUInt16LE, t.writeUInt16BE = E.writeUInt16BE, t.writeUInt32LE = E.writeUInt32LE, t.writeUInt32BE = E.writeUInt32BE, t.writeInt8 = E.writeInt8, t.writeInt16LE = E.writeInt16LE, t.writeInt16BE = E.writeInt16BE, t.writeInt32LE = E.writeInt32LE, t.writeInt32BE = E.writeInt32BE, t.writeFloatLE = E.writeFloatLE, t.writeFloatBE = E.writeFloatBE, t.writeDoubleLE = E.writeDoubleLE, t.writeDoubleBE = E.writeDoubleBE, t.fill = E.fill, t.inspect = E.inspect, t.toArrayBuffer = E.toArrayBuffer, t;
|
|
654
|
-
};
|
|
655
|
-
}).call(this, w("lYpoI2"), typeof self < "u" ? self : typeof window < "u" ? window : {}, w("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");
|
|
656
|
-
}, { "base64-js": 2, buffer: 3, ieee754: 10, lYpoI2: 11 }], 4: [function(w, U, _) {
|
|
657
|
-
(function(L, q, y, $, k, D, J, W, K) {
|
|
658
|
-
var y = w("buffer").Buffer, I = 4, a = new y(I);
|
|
659
|
-
a.fill(0), U.exports = { hash: function(p, v, g, d) {
|
|
660
|
-
for (var B = v((function(e, s) {
|
|
661
|
-
e.length % I != 0 && (f = e.length + (I - e.length % I), e = y.concat([e, a], f));
|
|
662
|
-
for (var f, x = [], A = s ? e.readInt32BE : e.readInt32LE, C = 0; C < e.length; C += I) x.push(A.call(e, C));
|
|
663
|
-
return x;
|
|
664
|
-
})(p = y.isBuffer(p) ? p : new y(p), d), 8 * p.length), v = d, u = new y(g), c = v ? u.writeInt32BE : u.writeInt32LE, r = 0; r < B.length; r++) c.call(u, B[r], 4 * r, !0);
|
|
665
|
-
return u;
|
|
666
|
-
} };
|
|
667
|
-
}).call(this, w("lYpoI2"), typeof self < "u" ? self : typeof window < "u" ? window : {}, w("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");
|
|
668
|
-
}, { buffer: 3, lYpoI2: 11 }], 5: [function(w, U, _) {
|
|
669
|
-
(function(L, q, y, $, k, D, J, W, K) {
|
|
670
|
-
var y = w("buffer").Buffer, I = w("./sha"), a = w("./sha256"), p = w("./rng"), v = { sha1: I, sha256: a, md5: w("./md5") }, g = 64, d = new y(g);
|
|
671
|
-
function B(e, s) {
|
|
672
|
-
var f = v[e = e || "sha1"], x = [];
|
|
673
|
-
return f || u("algorithm:", e, "is not yet supported"), { update: function(A) {
|
|
674
|
-
return y.isBuffer(A) || (A = new y(A)), x.push(A), A.length, this;
|
|
675
|
-
}, digest: function(A) {
|
|
676
|
-
var C = y.concat(x), C = s ? (function(E, M, X) {
|
|
677
|
-
y.isBuffer(M) || (M = new y(M)), y.isBuffer(X) || (X = new y(X)), M.length > g ? M = E(M) : M.length < g && (M = y.concat([M, d], g));
|
|
678
|
-
for (var R = new y(g), N = new y(g), G = 0; G < g; G++) R[G] = 54 ^ M[G], N[G] = 92 ^ M[G];
|
|
679
|
-
return X = E(y.concat([R, X])), E(y.concat([N, X]));
|
|
680
|
-
})(f, s, C) : f(C);
|
|
681
|
-
return x = null, A ? C.toString(A) : C;
|
|
682
|
-
} };
|
|
683
|
-
}
|
|
684
|
-
function u() {
|
|
685
|
-
var e = [].slice.call(arguments).join(" ");
|
|
686
|
-
throw new Error([e, "we accept pull requests", "http://github.com/dominictarr/crypto-browserify"].join(`
|
|
687
|
-
`));
|
|
688
|
-
}
|
|
689
|
-
d.fill(0), _.createHash = function(e) {
|
|
690
|
-
return B(e);
|
|
691
|
-
}, _.createHmac = B, _.randomBytes = function(e, s) {
|
|
692
|
-
if (!s || !s.call) return new y(p(e));
|
|
693
|
-
try {
|
|
694
|
-
s.call(this, void 0, new y(p(e)));
|
|
695
|
-
} catch (f) {
|
|
696
|
-
s(f);
|
|
697
|
-
}
|
|
698
|
-
};
|
|
699
|
-
var c, r = ["createCredentials", "createCipher", "createCipheriv", "createDecipher", "createDecipheriv", "createSign", "createVerify", "createDiffieHellman", "pbkdf2"], o = function(e) {
|
|
700
|
-
_[e] = function() {
|
|
701
|
-
u("sorry,", e, "is not implemented yet");
|
|
702
|
-
};
|
|
703
|
-
};
|
|
704
|
-
for (c in r) o(r[c]);
|
|
705
|
-
}).call(this, w("lYpoI2"), typeof self < "u" ? self : typeof window < "u" ? window : {}, w("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");
|
|
706
|
-
}, { "./md5": 6, "./rng": 7, "./sha": 8, "./sha256": 9, buffer: 3, lYpoI2: 11 }], 6: [function(w, U, _) {
|
|
707
|
-
(function(L, q, H, $, k, D, J, W, K) {
|
|
708
|
-
var y = w("./helpers");
|
|
709
|
-
function I(u, c) {
|
|
710
|
-
u[c >> 5] |= 128 << c % 32, u[14 + (c + 64 >>> 9 << 4)] = c;
|
|
711
|
-
for (var r = 1732584193, o = -271733879, e = -1732584194, s = 271733878, f = 0; f < u.length; f += 16) {
|
|
712
|
-
var x = r, A = o, C = e, E = s, r = p(r, o, e, s, u[f + 0], 7, -680876936), s = p(s, r, o, e, u[f + 1], 12, -389564586), e = p(e, s, r, o, u[f + 2], 17, 606105819), o = p(o, e, s, r, u[f + 3], 22, -1044525330);
|
|
713
|
-
r = p(r, o, e, s, u[f + 4], 7, -176418897), s = p(s, r, o, e, u[f + 5], 12, 1200080426), e = p(e, s, r, o, u[f + 6], 17, -1473231341), o = p(o, e, s, r, u[f + 7], 22, -45705983), r = p(r, o, e, s, u[f + 8], 7, 1770035416), s = p(s, r, o, e, u[f + 9], 12, -1958414417), e = p(e, s, r, o, u[f + 10], 17, -42063), o = p(o, e, s, r, u[f + 11], 22, -1990404162), r = p(r, o, e, s, u[f + 12], 7, 1804603682), s = p(s, r, o, e, u[f + 13], 12, -40341101), e = p(e, s, r, o, u[f + 14], 17, -1502002290), r = v(r, o = p(o, e, s, r, u[f + 15], 22, 1236535329), e, s, u[f + 1], 5, -165796510), s = v(s, r, o, e, u[f + 6], 9, -1069501632), e = v(e, s, r, o, u[f + 11], 14, 643717713), o = v(o, e, s, r, u[f + 0], 20, -373897302), r = v(r, o, e, s, u[f + 5], 5, -701558691), s = v(s, r, o, e, u[f + 10], 9, 38016083), e = v(e, s, r, o, u[f + 15], 14, -660478335), o = v(o, e, s, r, u[f + 4], 20, -405537848), r = v(r, o, e, s, u[f + 9], 5, 568446438), s = v(s, r, o, e, u[f + 14], 9, -1019803690), e = v(e, s, r, o, u[f + 3], 14, -187363961), o = v(o, e, s, r, u[f + 8], 20, 1163531501), r = v(r, o, e, s, u[f + 13], 5, -1444681467), s = v(s, r, o, e, u[f + 2], 9, -51403784), e = v(e, s, r, o, u[f + 7], 14, 1735328473), r = g(r, o = v(o, e, s, r, u[f + 12], 20, -1926607734), e, s, u[f + 5], 4, -378558), s = g(s, r, o, e, u[f + 8], 11, -2022574463), e = g(e, s, r, o, u[f + 11], 16, 1839030562), o = g(o, e, s, r, u[f + 14], 23, -35309556), r = g(r, o, e, s, u[f + 1], 4, -1530992060), s = g(s, r, o, e, u[f + 4], 11, 1272893353), e = g(e, s, r, o, u[f + 7], 16, -155497632), o = g(o, e, s, r, u[f + 10], 23, -1094730640), r = g(r, o, e, s, u[f + 13], 4, 681279174), s = g(s, r, o, e, u[f + 0], 11, -358537222), e = g(e, s, r, o, u[f + 3], 16, -722521979), o = g(o, e, s, r, u[f + 6], 23, 76029189), r = g(r, o, e, s, u[f + 9], 4, -640364487), s = g(s, r, o, e, u[f + 12], 11, -421815835), e = g(e, s, r, o, u[f + 15], 16, 530742520), r = d(r, o = g(o, e, s, r, u[f + 2], 23, -995338651), e, s, u[f + 0], 6, -198630844), s = d(s, r, o, e, u[f + 7], 10, 1126891415), e = d(e, s, r, o, u[f + 14], 15, -1416354905), o = d(o, e, s, r, u[f + 5], 21, -57434055), r = d(r, o, e, s, u[f + 12], 6, 1700485571), s = d(s, r, o, e, u[f + 3], 10, -1894986606), e = d(e, s, r, o, u[f + 10], 15, -1051523), o = d(o, e, s, r, u[f + 1], 21, -2054922799), r = d(r, o, e, s, u[f + 8], 6, 1873313359), s = d(s, r, o, e, u[f + 15], 10, -30611744), e = d(e, s, r, o, u[f + 6], 15, -1560198380), o = d(o, e, s, r, u[f + 13], 21, 1309151649), r = d(r, o, e, s, u[f + 4], 6, -145523070), s = d(s, r, o, e, u[f + 11], 10, -1120210379), e = d(e, s, r, o, u[f + 2], 15, 718787259), o = d(o, e, s, r, u[f + 9], 21, -343485551), r = B(r, x), o = B(o, A), e = B(e, C), s = B(s, E);
|
|
714
|
-
}
|
|
715
|
-
return Array(r, o, e, s);
|
|
716
|
-
}
|
|
717
|
-
function a(u, c, r, o, e, s) {
|
|
718
|
-
return B((c = B(B(c, u), B(o, s))) << e | c >>> 32 - e, r);
|
|
719
|
-
}
|
|
720
|
-
function p(u, c, r, o, e, s, f) {
|
|
721
|
-
return a(c & r | ~c & o, u, c, e, s, f);
|
|
722
|
-
}
|
|
723
|
-
function v(u, c, r, o, e, s, f) {
|
|
724
|
-
return a(c & o | r & ~o, u, c, e, s, f);
|
|
725
|
-
}
|
|
726
|
-
function g(u, c, r, o, e, s, f) {
|
|
727
|
-
return a(c ^ r ^ o, u, c, e, s, f);
|
|
728
|
-
}
|
|
729
|
-
function d(u, c, r, o, e, s, f) {
|
|
730
|
-
return a(r ^ (c | ~o), u, c, e, s, f);
|
|
731
|
-
}
|
|
732
|
-
function B(u, c) {
|
|
733
|
-
var r = (65535 & u) + (65535 & c);
|
|
734
|
-
return (u >> 16) + (c >> 16) + (r >> 16) << 16 | 65535 & r;
|
|
735
|
-
}
|
|
736
|
-
U.exports = function(u) {
|
|
737
|
-
return y.hash(u, I, 16);
|
|
738
|
-
};
|
|
739
|
-
}).call(this, w("lYpoI2"), typeof self < "u" ? self : typeof window < "u" ? window : {}, w("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");
|
|
740
|
-
}, { "./helpers": 4, buffer: 3, lYpoI2: 11 }], 7: [function(w, U, _) {
|
|
741
|
-
(function(L, q, H, $, k, D, J, W, K) {
|
|
742
|
-
U.exports = function(y) {
|
|
743
|
-
for (var I, a = new Array(y), p = 0; p < y; p++) (3 & p) == 0 && (I = 4294967296 * Math.random()), a[p] = I >>> ((3 & p) << 3) & 255;
|
|
744
|
-
return a;
|
|
745
|
-
};
|
|
746
|
-
}).call(this, w("lYpoI2"), typeof self < "u" ? self : typeof window < "u" ? window : {}, w("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");
|
|
747
|
-
}, { buffer: 3, lYpoI2: 11 }], 8: [function(w, U, _) {
|
|
748
|
-
(function(L, q, H, $, k, D, J, W, K) {
|
|
749
|
-
var y = w("./helpers");
|
|
750
|
-
function I(v, g) {
|
|
751
|
-
v[g >> 5] |= 128 << 24 - g % 32, v[15 + (g + 64 >> 9 << 4)] = g;
|
|
752
|
-
for (var d, B, u, c = Array(80), r = 1732584193, o = -271733879, e = -1732584194, s = 271733878, f = -1009589776, x = 0; x < v.length; x += 16) {
|
|
753
|
-
for (var A = r, C = o, E = e, M = s, X = f, R = 0; R < 80; R++) {
|
|
754
|
-
c[R] = R < 16 ? v[x + R] : p(c[R - 3] ^ c[R - 8] ^ c[R - 14] ^ c[R - 16], 1);
|
|
755
|
-
var N = a(a(p(r, 5), (N = o, B = e, u = s, (d = R) < 20 ? N & B | ~N & u : !(d < 40) && d < 60 ? N & B | N & u | B & u : N ^ B ^ u)), a(a(f, c[R]), (d = R) < 20 ? 1518500249 : d < 40 ? 1859775393 : d < 60 ? -1894007588 : -899497514)), f = s, s = e, e = p(o, 30), o = r, r = N;
|
|
756
|
-
}
|
|
757
|
-
r = a(r, A), o = a(o, C), e = a(e, E), s = a(s, M), f = a(f, X);
|
|
758
|
-
}
|
|
759
|
-
return Array(r, o, e, s, f);
|
|
760
|
-
}
|
|
761
|
-
function a(v, g) {
|
|
762
|
-
var d = (65535 & v) + (65535 & g);
|
|
763
|
-
return (v >> 16) + (g >> 16) + (d >> 16) << 16 | 65535 & d;
|
|
764
|
-
}
|
|
765
|
-
function p(v, g) {
|
|
766
|
-
return v << g | v >>> 32 - g;
|
|
767
|
-
}
|
|
768
|
-
U.exports = function(v) {
|
|
769
|
-
return y.hash(v, I, 20, !0);
|
|
770
|
-
};
|
|
771
|
-
}).call(this, w("lYpoI2"), typeof self < "u" ? self : typeof window < "u" ? window : {}, w("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");
|
|
772
|
-
}, { "./helpers": 4, buffer: 3, lYpoI2: 11 }], 9: [function(w, U, _) {
|
|
773
|
-
(function(L, q, H, $, k, D, J, W, K) {
|
|
774
|
-
function y(g, d) {
|
|
775
|
-
var B = (65535 & g) + (65535 & d);
|
|
776
|
-
return (g >> 16) + (d >> 16) + (B >> 16) << 16 | 65535 & B;
|
|
777
|
-
}
|
|
778
|
-
function I(g, d) {
|
|
779
|
-
var B, u = 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), c = new Array(1779033703, 3144134277, 1013904242, 2773480762, 1359893119, 2600822924, 528734635, 1541459225), r = new Array(64);
|
|
780
|
-
g[d >> 5] |= 128 << 24 - d % 32, g[15 + (d + 64 >> 9 << 4)] = d;
|
|
781
|
-
for (var o, e, s = 0; s < g.length; s += 16) {
|
|
782
|
-
for (var f = c[0], x = c[1], A = c[2], C = c[3], E = c[4], M = c[5], X = c[6], R = c[7], N = 0; N < 64; N++) r[N] = N < 16 ? g[N + s] : y(y(y((e = r[N - 2], p(e, 17) ^ p(e, 19) ^ v(e, 10)), r[N - 7]), (e = r[N - 15], p(e, 7) ^ p(e, 18) ^ v(e, 3))), r[N - 16]), B = y(y(y(y(R, p(e = E, 6) ^ p(e, 11) ^ p(e, 25)), E & M ^ ~E & X), u[N]), r[N]), o = y(p(o = f, 2) ^ p(o, 13) ^ p(o, 22), f & x ^ f & A ^ x & A), R = X, X = M, M = E, E = y(C, B), C = A, A = x, x = f, f = y(B, o);
|
|
783
|
-
c[0] = y(f, c[0]), c[1] = y(x, c[1]), c[2] = y(A, c[2]), c[3] = y(C, c[3]), c[4] = y(E, c[4]), c[5] = y(M, c[5]), c[6] = y(X, c[6]), c[7] = y(R, c[7]);
|
|
784
|
-
}
|
|
785
|
-
return c;
|
|
786
|
-
}
|
|
787
|
-
var a = w("./helpers"), p = function(g, d) {
|
|
788
|
-
return g >>> d | g << 32 - d;
|
|
789
|
-
}, v = function(g, d) {
|
|
790
|
-
return g >>> d;
|
|
791
|
-
};
|
|
792
|
-
U.exports = function(g) {
|
|
793
|
-
return a.hash(g, I, 32, !0);
|
|
794
|
-
};
|
|
795
|
-
}).call(this, w("lYpoI2"), typeof self < "u" ? self : typeof window < "u" ? window : {}, w("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");
|
|
796
|
-
}, { "./helpers": 4, buffer: 3, lYpoI2: 11 }], 10: [function(w, U, _) {
|
|
797
|
-
(function(L, q, H, $, k, D, J, W, K) {
|
|
798
|
-
_.read = function(y, I, a, p, s) {
|
|
799
|
-
var g, d, B = 8 * s - p - 1, u = (1 << B) - 1, c = u >> 1, r = -7, o = a ? s - 1 : 0, e = a ? -1 : 1, s = y[I + o];
|
|
800
|
-
for (o += e, g = s & (1 << -r) - 1, s >>= -r, r += B; 0 < r; g = 256 * g + y[I + o], o += e, r -= 8) ;
|
|
801
|
-
for (d = g & (1 << -r) - 1, g >>= -r, r += p; 0 < r; d = 256 * d + y[I + o], o += e, r -= 8) ;
|
|
802
|
-
if (g === 0) g = 1 - c;
|
|
803
|
-
else {
|
|
804
|
-
if (g === u) return d ? NaN : 1 / 0 * (s ? -1 : 1);
|
|
805
|
-
d += Math.pow(2, p), g -= c;
|
|
806
|
-
}
|
|
807
|
-
return (s ? -1 : 1) * d * Math.pow(2, g - p);
|
|
808
|
-
}, _.write = function(y, I, a, p, v, f) {
|
|
809
|
-
var d, B, u = 8 * f - v - 1, c = (1 << u) - 1, r = c >> 1, o = v === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, e = p ? 0 : f - 1, s = p ? 1 : -1, f = I < 0 || I === 0 && 1 / I < 0 ? 1 : 0;
|
|
810
|
-
for (I = Math.abs(I), isNaN(I) || I === 1 / 0 ? (B = isNaN(I) ? 1 : 0, d = c) : (d = Math.floor(Math.log(I) / Math.LN2), I * (p = Math.pow(2, -d)) < 1 && (d--, p *= 2), 2 <= (I += 1 <= d + r ? o / p : o * Math.pow(2, 1 - r)) * p && (d++, p /= 2), c <= d + r ? (B = 0, d = c) : 1 <= d + r ? (B = (I * p - 1) * Math.pow(2, v), d += r) : (B = I * Math.pow(2, r - 1) * Math.pow(2, v), d = 0)); 8 <= v; y[a + e] = 255 & B, e += s, B /= 256, v -= 8) ;
|
|
811
|
-
for (d = d << v | B, u += v; 0 < u; y[a + e] = 255 & d, e += s, d /= 256, u -= 8) ;
|
|
812
|
-
y[a + e - s] |= 128 * f;
|
|
813
|
-
};
|
|
814
|
-
}).call(this, w("lYpoI2"), typeof self < "u" ? self : typeof window < "u" ? window : {}, w("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");
|
|
815
|
-
}, { buffer: 3, lYpoI2: 11 }], 11: [function(w, U, _) {
|
|
816
|
-
(function(L, q, H, $, k, D, J, W, K) {
|
|
817
|
-
var y, I, a;
|
|
818
|
-
function p() {
|
|
819
|
-
}
|
|
820
|
-
(L = U.exports = {}).nextTick = (I = typeof window < "u" && window.setImmediate, a = typeof window < "u" && window.postMessage && window.addEventListener, I ? function(v) {
|
|
821
|
-
return window.setImmediate(v);
|
|
822
|
-
} : a ? (y = [], window.addEventListener("message", function(v) {
|
|
823
|
-
var g = v.source;
|
|
824
|
-
g !== window && g !== null || v.data !== "process-tick" || (v.stopPropagation(), 0 < y.length && y.shift()());
|
|
825
|
-
}, !0), function(v) {
|
|
826
|
-
y.push(v), window.postMessage("process-tick", "*");
|
|
827
|
-
}) : function(v) {
|
|
828
|
-
setTimeout(v, 0);
|
|
829
|
-
}), L.title = "browser", L.browser = !0, L.env = {}, L.argv = [], L.on = p, L.addListener = p, L.once = p, L.off = p, L.removeListener = p, L.removeAllListeners = p, L.emit = p, L.binding = function(v) {
|
|
830
|
-
throw new Error("process.binding is not supported");
|
|
831
|
-
}, L.cwd = function() {
|
|
832
|
-
return "/";
|
|
833
|
-
}, L.chdir = function(v) {
|
|
834
|
-
throw new Error("process.chdir is not supported");
|
|
835
|
-
};
|
|
836
|
-
}).call(this, w("lYpoI2"), typeof self < "u" ? self : typeof window < "u" ? window : {}, w("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");
|
|
837
|
-
}, { buffer: 3, lYpoI2: 11 }] }, {}, [1])(1);
|
|
838
|
-
});
|
|
839
|
-
})(pt)), pt.exports;
|
|
840
|
-
}
|
|
841
|
-
At();
|
|
842
|
-
const Ut = [];
|
|
843
|
-
for (let T = 0; T < 256; ++T)
|
|
844
|
-
Ut.push((T + 256).toString(16).slice(1));
|
|
845
|
-
function xt(T) {
|
|
846
|
-
return T && T.__esModule && Object.prototype.hasOwnProperty.call(T, "default") ? T.default : T;
|
|
847
|
-
}
|
|
848
|
-
var it, gt;
|
|
849
|
-
function Ct() {
|
|
850
|
-
return gt || (gt = 1, it = function T(j, w) {
|
|
851
|
-
if (j === w) return !0;
|
|
852
|
-
if (j && w && typeof j == "object" && typeof w == "object") {
|
|
853
|
-
if (j.constructor !== w.constructor) return !1;
|
|
854
|
-
var U, _, L;
|
|
855
|
-
if (Array.isArray(j)) {
|
|
856
|
-
if (U = j.length, U != w.length) return !1;
|
|
857
|
-
for (_ = U; _-- !== 0; )
|
|
858
|
-
if (!T(j[_], w[_])) return !1;
|
|
41
|
+
var d, E;
|
|
42
|
+
function A() {
|
|
43
|
+
return E || (E = 1, d = function r(e, t) {
|
|
44
|
+
if (e === t) return !0;
|
|
45
|
+
if (e && t && typeof e == "object" && typeof t == "object") {
|
|
46
|
+
if (e.constructor !== t.constructor) return !1;
|
|
47
|
+
var n, o, s;
|
|
48
|
+
if (Array.isArray(e)) {
|
|
49
|
+
if (n = e.length, n != t.length) return !1;
|
|
50
|
+
for (o = n; o-- !== 0; )
|
|
51
|
+
if (!r(e[o], t[o])) return !1;
|
|
859
52
|
return !0;
|
|
860
53
|
}
|
|
861
|
-
if (
|
|
862
|
-
if (
|
|
863
|
-
if (
|
|
864
|
-
if (
|
|
865
|
-
for (
|
|
866
|
-
if (!Object.prototype.hasOwnProperty.call(
|
|
867
|
-
for (
|
|
868
|
-
var
|
|
869
|
-
if (!
|
|
54
|
+
if (e.constructor === RegExp) return e.source === t.source && e.flags === t.flags;
|
|
55
|
+
if (e.valueOf !== Object.prototype.valueOf) return e.valueOf() === t.valueOf();
|
|
56
|
+
if (e.toString !== Object.prototype.toString) return e.toString() === t.toString();
|
|
57
|
+
if (s = Object.keys(e), n = s.length, n !== Object.keys(t).length) return !1;
|
|
58
|
+
for (o = n; o-- !== 0; )
|
|
59
|
+
if (!Object.prototype.hasOwnProperty.call(t, s[o])) return !1;
|
|
60
|
+
for (o = n; o-- !== 0; ) {
|
|
61
|
+
var u = s[o];
|
|
62
|
+
if (!r(e[u], t[u])) return !1;
|
|
870
63
|
}
|
|
871
64
|
return !0;
|
|
872
65
|
}
|
|
873
|
-
return
|
|
874
|
-
}),
|
|
66
|
+
return e !== e && t !== t;
|
|
67
|
+
}), d;
|
|
875
68
|
}
|
|
876
|
-
var
|
|
877
|
-
const
|
|
878
|
-
function
|
|
879
|
-
eventReceiver:
|
|
880
|
-
resource:
|
|
881
|
-
disabled:
|
|
882
|
-
options:
|
|
883
|
-
onEvent:
|
|
884
|
-
onNotify:
|
|
69
|
+
var M = A();
|
|
70
|
+
const P = /* @__PURE__ */ H(M);
|
|
71
|
+
function B({
|
|
72
|
+
eventReceiver: r,
|
|
73
|
+
resource: e,
|
|
74
|
+
disabled: t,
|
|
75
|
+
options: n,
|
|
76
|
+
onEvent: o,
|
|
77
|
+
onNotify: s
|
|
885
78
|
}) {
|
|
886
|
-
const
|
|
887
|
-
|
|
888
|
-
const [
|
|
889
|
-
|
|
890
|
-
const
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
(
|
|
895
|
-
if ((
|
|
896
|
-
let
|
|
897
|
-
if (typeof
|
|
79
|
+
const u = _(), a = r || u.eventReceiver, O = D(), f = e || O, [c, b] = y(f);
|
|
80
|
+
f?.request !== c?.request && b(f);
|
|
81
|
+
const [p, h] = y(n);
|
|
82
|
+
P(p, n) || h(n);
|
|
83
|
+
const g = !!(t || f?.isEmpty);
|
|
84
|
+
S(() => a == null || g ? void 0 : a.subscribe(
|
|
85
|
+
c,
|
|
86
|
+
p,
|
|
87
|
+
(v) => {
|
|
88
|
+
if ((v?.length || 0) === 0) return;
|
|
89
|
+
let i;
|
|
90
|
+
if (typeof o == "function" ? i = v.filter((m) => !o(m)) : i = v, i.length === 0 || typeof c?.notify != "function")
|
|
898
91
|
return;
|
|
899
|
-
const
|
|
900
|
-
typeof
|
|
92
|
+
const x = c.notify();
|
|
93
|
+
typeof s == "function" && x.then((m) => s(m, i));
|
|
901
94
|
}
|
|
902
|
-
), [
|
|
95
|
+
), [a, g, c, p, o, s]);
|
|
903
96
|
}
|
|
904
|
-
function
|
|
905
|
-
eventReceiver:
|
|
906
|
-
resource:
|
|
907
|
-
disabled:
|
|
908
|
-
options:
|
|
909
|
-
onEvent:
|
|
910
|
-
onNotify:
|
|
911
|
-
children:
|
|
97
|
+
function T({
|
|
98
|
+
eventReceiver: r,
|
|
99
|
+
resource: e,
|
|
100
|
+
disabled: t,
|
|
101
|
+
options: n,
|
|
102
|
+
onEvent: o,
|
|
103
|
+
onNotify: s,
|
|
104
|
+
children: u
|
|
912
105
|
}) {
|
|
913
|
-
return
|
|
914
|
-
eventReceiver:
|
|
915
|
-
resource:
|
|
916
|
-
disabled:
|
|
917
|
-
options:
|
|
918
|
-
onEvent:
|
|
919
|
-
onNotify:
|
|
920
|
-
}), /* @__PURE__ */
|
|
106
|
+
return B({
|
|
107
|
+
eventReceiver: r,
|
|
108
|
+
resource: e,
|
|
109
|
+
disabled: t,
|
|
110
|
+
options: n,
|
|
111
|
+
onEvent: o,
|
|
112
|
+
onNotify: s
|
|
113
|
+
}), /* @__PURE__ */ C(w, { children: u });
|
|
921
114
|
}
|
|
922
115
|
export {
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
116
|
+
J as ConfigConsumer,
|
|
117
|
+
Q as ConfigProvider,
|
|
118
|
+
T as EventHandler,
|
|
119
|
+
F as EventReceiver,
|
|
120
|
+
K as composeHandlers,
|
|
121
|
+
L as isEventReceiver,
|
|
122
|
+
_ as useConfigContext,
|
|
123
|
+
B as useEventHandler
|
|
931
124
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@civet/events",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.3",
|
|
4
4
|
"description": "Civet",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Aaron Burmeister"
|
|
@@ -28,7 +28,10 @@
|
|
|
28
28
|
"types": "./dist/main.d.ts",
|
|
29
29
|
"exports": {
|
|
30
30
|
".": {
|
|
31
|
-
"import":
|
|
31
|
+
"import": {
|
|
32
|
+
"types": "./dist/main.d.ts",
|
|
33
|
+
"default": "./dist/main.js"
|
|
34
|
+
}
|
|
32
35
|
}
|
|
33
36
|
},
|
|
34
37
|
"scripts": {
|
|
@@ -38,12 +41,13 @@
|
|
|
38
41
|
"lint:fix": "npm run lint -- --fix",
|
|
39
42
|
"prettify": "prettier . --write",
|
|
40
43
|
"preview": "vite preview",
|
|
44
|
+
"postversion": "git commit -am$npm_package_version",
|
|
41
45
|
"prepublishOnly": "npm run build"
|
|
42
46
|
},
|
|
43
47
|
"dependencies": {
|
|
44
48
|
"fast-deep-equal": "^3.1.3",
|
|
45
49
|
"object-hash": "^3.0.0",
|
|
46
|
-
"uuid": "^
|
|
50
|
+
"uuid": "^13.0.0"
|
|
47
51
|
},
|
|
48
52
|
"peerDependencies": {
|
|
49
53
|
"@civet/core": ">=2.0",
|
|
@@ -51,12 +55,12 @@
|
|
|
51
55
|
"react-dom": ">=18.0"
|
|
52
56
|
},
|
|
53
57
|
"devDependencies": {
|
|
54
|
-
"@civet/core": "^2.
|
|
55
|
-
"@eslint/js": "^9.
|
|
58
|
+
"@civet/core": "^2.1.3",
|
|
59
|
+
"@eslint/js": "^9.35.0",
|
|
56
60
|
"@types/react": "^19.1.12",
|
|
57
61
|
"@types/react-dom": "^19.1.9",
|
|
58
62
|
"@vitejs/plugin-react": "^5.0.2",
|
|
59
|
-
"eslint": "^9.
|
|
63
|
+
"eslint": "^9.35.0",
|
|
60
64
|
"eslint-config-prettier": "^10.1.8",
|
|
61
65
|
"eslint-import-resolver-alias": "^1.1.2",
|
|
62
66
|
"eslint-import-resolver-typescript": "^4.4.4",
|
|
@@ -65,13 +69,13 @@
|
|
|
65
69
|
"eslint-plugin-react-hooks": "^5.2.0",
|
|
66
70
|
"eslint-plugin-react-refresh": "^0.4.20",
|
|
67
71
|
"eslint-plugin-unused-imports": "^4.2.0",
|
|
68
|
-
"globals": "^16.
|
|
72
|
+
"globals": "^16.4.0",
|
|
69
73
|
"prettier": "^3.6.2",
|
|
70
74
|
"react": "^19.1.1",
|
|
71
75
|
"react-dom": "^19.1.1",
|
|
72
76
|
"typescript": "^5.9.2",
|
|
73
|
-
"typescript-eslint": "^8.
|
|
74
|
-
"vite": "^7.1.
|
|
77
|
+
"typescript-eslint": "^8.43.0",
|
|
78
|
+
"vite": "^7.1.5",
|
|
75
79
|
"vite-plugin-dts": "^4.5.4",
|
|
76
80
|
"vite-tsconfig-paths": "^5.1.4"
|
|
77
81
|
}
|