flinker 1.0.5 → 1.0.7
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/Utils.d.ts +2 -0
- package/dist/cjs/RXPublisher.js +4 -12
- package/dist/cjs/Utils.js +257 -0
- package/dist/esm/RXPublisher.js +4 -12
- package/dist/esm/Utils.js +252 -0
- package/package.json +1 -1
package/dist/Utils.d.ts
ADDED
package/dist/cjs/RXPublisher.js
CHANGED
|
@@ -202,9 +202,7 @@ exports.RXDelayedError = RXDelayedError;
|
|
|
202
202
|
var RXEmitter = /** @class */ (function (_super) {
|
|
203
203
|
__extends(RXEmitter, _super);
|
|
204
204
|
function RXEmitter() {
|
|
205
|
-
var _this = this;
|
|
206
|
-
console.log('new RXEmitter');
|
|
207
|
-
_this = _super.call(this) || this;
|
|
205
|
+
var _this = _super.call(this) || this;
|
|
208
206
|
_this._hasValue = false;
|
|
209
207
|
_this.hasError = false;
|
|
210
208
|
_this._err = undefined;
|
|
@@ -407,9 +405,7 @@ exports.RXOperation = RXOperation;
|
|
|
407
405
|
var RXCombine = /** @class */ (function (_super) {
|
|
408
406
|
__extends(RXCombine, _super);
|
|
409
407
|
function RXCombine(list) {
|
|
410
|
-
var _this = this;
|
|
411
|
-
console.log('new RXCombine');
|
|
412
|
-
_this = _super.call(this) || this;
|
|
408
|
+
var _this = _super.call(this) || this;
|
|
413
409
|
_this._values = [];
|
|
414
410
|
_this._hasError = false;
|
|
415
411
|
_this._err = undefined;
|
|
@@ -464,9 +460,7 @@ exports.RXCombine = RXCombine;
|
|
|
464
460
|
var RXFrom = /** @class */ (function (_super) {
|
|
465
461
|
__extends(RXFrom, _super);
|
|
466
462
|
function RXFrom(list) {
|
|
467
|
-
var _this = this;
|
|
468
|
-
console.log('new RXFrom');
|
|
469
|
-
_this = _super.call(this) || this;
|
|
463
|
+
var _this = _super.call(this) || this;
|
|
470
464
|
_this.values = list;
|
|
471
465
|
_this.sendComplete();
|
|
472
466
|
return _this;
|
|
@@ -487,9 +481,7 @@ exports.RXFrom = RXFrom;
|
|
|
487
481
|
var RXWaitUntilComplete = /** @class */ (function (_super) {
|
|
488
482
|
__extends(RXWaitUntilComplete, _super);
|
|
489
483
|
function RXWaitUntilComplete(list, resultPublisher) {
|
|
490
|
-
var _this = this;
|
|
491
|
-
console.log('new RXSequence');
|
|
492
|
-
_this = _super.call(this) || this;
|
|
484
|
+
var _this = _super.call(this) || this;
|
|
493
485
|
_this._value = undefined;
|
|
494
486
|
_this._hasError = false;
|
|
495
487
|
_this._err = undefined;
|
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
13
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
+
function step(op) {
|
|
16
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
+
switch (op[0]) {
|
|
21
|
+
case 0: case 1: t = op; break;
|
|
22
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
+
default:
|
|
26
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
+
if (t[2]) _.ops.pop();
|
|
31
|
+
_.trys.pop(); continue;
|
|
32
|
+
}
|
|
33
|
+
op = body.call(thisArg, _);
|
|
34
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.MD5 = exports.asyncDelay = void 0;
|
|
40
|
+
var asyncDelay = function (time) { return __awaiter(void 0, void 0, void 0, function () {
|
|
41
|
+
var p;
|
|
42
|
+
return __generator(this, function (_a) {
|
|
43
|
+
switch (_a.label) {
|
|
44
|
+
case 0:
|
|
45
|
+
p = new Promise(function (resolve) {
|
|
46
|
+
setTimeout(function () {
|
|
47
|
+
resolve('done!');
|
|
48
|
+
}, time);
|
|
49
|
+
});
|
|
50
|
+
return [4 /*yield*/, p];
|
|
51
|
+
case 1: return [2 /*return*/, _a.sent()];
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
}); };
|
|
55
|
+
exports.asyncDelay = asyncDelay;
|
|
56
|
+
var MD5 = function (string) {
|
|
57
|
+
function RotateLeft(lValue, iShiftBits) {
|
|
58
|
+
return (lValue << iShiftBits) | (lValue >>> (32 - iShiftBits));
|
|
59
|
+
}
|
|
60
|
+
function AddUnsigned(lX, lY) {
|
|
61
|
+
var lX4, lY4, lX8, lY8, lResult;
|
|
62
|
+
lX8 = (lX & 0x80000000);
|
|
63
|
+
lY8 = (lY & 0x80000000);
|
|
64
|
+
lX4 = (lX & 0x40000000);
|
|
65
|
+
lY4 = (lY & 0x40000000);
|
|
66
|
+
lResult = (lX & 0x3FFFFFFF) + (lY & 0x3FFFFFFF);
|
|
67
|
+
if (lX4 & lY4) {
|
|
68
|
+
return (lResult ^ 0x80000000 ^ lX8 ^ lY8);
|
|
69
|
+
}
|
|
70
|
+
if (lX4 | lY4) {
|
|
71
|
+
if (lResult & 0x40000000) {
|
|
72
|
+
return (lResult ^ 0xC0000000 ^ lX8 ^ lY8);
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
return (lResult ^ 0x40000000 ^ lX8 ^ lY8);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
return (lResult ^ lX8 ^ lY8);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
function F(x, y, z) { return (x & y) | ((~x) & z); }
|
|
83
|
+
function G(x, y, z) { return (x & z) | (y & (~z)); }
|
|
84
|
+
function H(x, y, z) { return (x ^ y ^ z); }
|
|
85
|
+
function I(x, y, z) { return (y ^ (x | (~z))); }
|
|
86
|
+
function FF(a, b, c, d, x, s, ac) {
|
|
87
|
+
a = AddUnsigned(a, AddUnsigned(AddUnsigned(F(b, c, d), x), ac));
|
|
88
|
+
return AddUnsigned(RotateLeft(a, s), b);
|
|
89
|
+
}
|
|
90
|
+
function GG(a, b, c, d, x, s, ac) {
|
|
91
|
+
a = AddUnsigned(a, AddUnsigned(AddUnsigned(G(b, c, d), x), ac));
|
|
92
|
+
return AddUnsigned(RotateLeft(a, s), b);
|
|
93
|
+
}
|
|
94
|
+
function HH(a, b, c, d, x, s, ac) {
|
|
95
|
+
a = AddUnsigned(a, AddUnsigned(AddUnsigned(H(b, c, d), x), ac));
|
|
96
|
+
return AddUnsigned(RotateLeft(a, s), b);
|
|
97
|
+
}
|
|
98
|
+
function II(a, b, c, d, x, s, ac) {
|
|
99
|
+
a = AddUnsigned(a, AddUnsigned(AddUnsigned(I(b, c, d), x), ac));
|
|
100
|
+
return AddUnsigned(RotateLeft(a, s), b);
|
|
101
|
+
}
|
|
102
|
+
function ConvertToWordArray(string) {
|
|
103
|
+
var lWordCount;
|
|
104
|
+
var lMessageLength = string.length;
|
|
105
|
+
var lNumberOfWords_temp1 = lMessageLength + 8;
|
|
106
|
+
var lNumberOfWords_temp2 = (lNumberOfWords_temp1 - (lNumberOfWords_temp1 % 64)) / 64;
|
|
107
|
+
var lNumberOfWords = (lNumberOfWords_temp2 + 1) * 16;
|
|
108
|
+
var lWordArray = Array(lNumberOfWords - 1);
|
|
109
|
+
var lBytePosition = 0;
|
|
110
|
+
var lByteCount = 0;
|
|
111
|
+
while (lByteCount < lMessageLength) {
|
|
112
|
+
lWordCount = (lByteCount - (lByteCount % 4)) / 4;
|
|
113
|
+
lBytePosition = (lByteCount % 4) * 8;
|
|
114
|
+
lWordArray[lWordCount] = (lWordArray[lWordCount] | (string.charCodeAt(lByteCount) << lBytePosition));
|
|
115
|
+
lByteCount++;
|
|
116
|
+
}
|
|
117
|
+
lWordCount = (lByteCount - (lByteCount % 4)) / 4;
|
|
118
|
+
lBytePosition = (lByteCount % 4) * 8;
|
|
119
|
+
lWordArray[lWordCount] = lWordArray[lWordCount] | (0x80 << lBytePosition);
|
|
120
|
+
lWordArray[lNumberOfWords - 2] = lMessageLength << 3;
|
|
121
|
+
lWordArray[lNumberOfWords - 1] = lMessageLength >>> 29;
|
|
122
|
+
return lWordArray;
|
|
123
|
+
}
|
|
124
|
+
function WordToHex(lValue) {
|
|
125
|
+
var WordToHexValue = '';
|
|
126
|
+
var WordToHexValue_temp = '';
|
|
127
|
+
var lByte;
|
|
128
|
+
var lCount;
|
|
129
|
+
for (lCount = 0; lCount <= 3; lCount++) {
|
|
130
|
+
lByte = (lValue >>> (lCount * 8)) & 255;
|
|
131
|
+
WordToHexValue_temp = '0' + lByte.toString(16);
|
|
132
|
+
WordToHexValue = WordToHexValue + WordToHexValue_temp.substr(WordToHexValue_temp.length - 2, 2);
|
|
133
|
+
}
|
|
134
|
+
return WordToHexValue;
|
|
135
|
+
}
|
|
136
|
+
function Utf8Encode(string) {
|
|
137
|
+
string = string.replace(/\r\n/g, '\n');
|
|
138
|
+
var utftext = '';
|
|
139
|
+
for (var n = 0; n < string.length; n++) {
|
|
140
|
+
var c_1 = string.charCodeAt(n);
|
|
141
|
+
if (c_1 < 128) {
|
|
142
|
+
utftext += String.fromCharCode(c_1);
|
|
143
|
+
}
|
|
144
|
+
else if ((c_1 > 127) && (c_1 < 2048)) {
|
|
145
|
+
utftext += String.fromCharCode((c_1 >> 6) | 192);
|
|
146
|
+
utftext += String.fromCharCode((c_1 & 63) | 128);
|
|
147
|
+
}
|
|
148
|
+
else {
|
|
149
|
+
utftext += String.fromCharCode((c_1 >> 12) | 224);
|
|
150
|
+
utftext += String.fromCharCode(((c_1 >> 6) & 63) | 128);
|
|
151
|
+
utftext += String.fromCharCode((c_1 & 63) | 128);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
return utftext;
|
|
155
|
+
}
|
|
156
|
+
var x = [];
|
|
157
|
+
var k, AA, BB, CC, DD, a, b, c, d;
|
|
158
|
+
var S11 = 7;
|
|
159
|
+
var S12 = 12;
|
|
160
|
+
var S13 = 17;
|
|
161
|
+
var S14 = 22;
|
|
162
|
+
var S21 = 5;
|
|
163
|
+
var S22 = 9;
|
|
164
|
+
var S23 = 14;
|
|
165
|
+
var S24 = 20;
|
|
166
|
+
var S31 = 4;
|
|
167
|
+
var S32 = 11;
|
|
168
|
+
var S33 = 16;
|
|
169
|
+
var S34 = 23;
|
|
170
|
+
var S41 = 6;
|
|
171
|
+
var S42 = 10;
|
|
172
|
+
var S43 = 15;
|
|
173
|
+
var S44 = 21;
|
|
174
|
+
string = Utf8Encode(string);
|
|
175
|
+
x = ConvertToWordArray(string);
|
|
176
|
+
a = 0x67452301;
|
|
177
|
+
b = 0xEFCDAB89;
|
|
178
|
+
c = 0x98BADCFE;
|
|
179
|
+
d = 0x10325476;
|
|
180
|
+
for (k = 0; k < x.length; k += 16) {
|
|
181
|
+
AA = a;
|
|
182
|
+
BB = b;
|
|
183
|
+
CC = c;
|
|
184
|
+
DD = d;
|
|
185
|
+
a = FF(a, b, c, d, x[k + 0], S11, 0xD76AA478);
|
|
186
|
+
d = FF(d, a, b, c, x[k + 1], S12, 0xE8C7B756);
|
|
187
|
+
c = FF(c, d, a, b, x[k + 2], S13, 0x242070DB);
|
|
188
|
+
b = FF(b, c, d, a, x[k + 3], S14, 0xC1BDCEEE);
|
|
189
|
+
a = FF(a, b, c, d, x[k + 4], S11, 0xF57C0FAF);
|
|
190
|
+
d = FF(d, a, b, c, x[k + 5], S12, 0x4787C62A);
|
|
191
|
+
c = FF(c, d, a, b, x[k + 6], S13, 0xA8304613);
|
|
192
|
+
b = FF(b, c, d, a, x[k + 7], S14, 0xFD469501);
|
|
193
|
+
a = FF(a, b, c, d, x[k + 8], S11, 0x698098D8);
|
|
194
|
+
d = FF(d, a, b, c, x[k + 9], S12, 0x8B44F7AF);
|
|
195
|
+
c = FF(c, d, a, b, x[k + 10], S13, 0xFFFF5BB1);
|
|
196
|
+
b = FF(b, c, d, a, x[k + 11], S14, 0x895CD7BE);
|
|
197
|
+
a = FF(a, b, c, d, x[k + 12], S11, 0x6B901122);
|
|
198
|
+
d = FF(d, a, b, c, x[k + 13], S12, 0xFD987193);
|
|
199
|
+
c = FF(c, d, a, b, x[k + 14], S13, 0xA679438E);
|
|
200
|
+
b = FF(b, c, d, a, x[k + 15], S14, 0x49B40821);
|
|
201
|
+
a = GG(a, b, c, d, x[k + 1], S21, 0xF61E2562);
|
|
202
|
+
d = GG(d, a, b, c, x[k + 6], S22, 0xC040B340);
|
|
203
|
+
c = GG(c, d, a, b, x[k + 11], S23, 0x265E5A51);
|
|
204
|
+
b = GG(b, c, d, a, x[k + 0], S24, 0xE9B6C7AA);
|
|
205
|
+
a = GG(a, b, c, d, x[k + 5], S21, 0xD62F105D);
|
|
206
|
+
d = GG(d, a, b, c, x[k + 10], S22, 0x2441453);
|
|
207
|
+
c = GG(c, d, a, b, x[k + 15], S23, 0xD8A1E681);
|
|
208
|
+
b = GG(b, c, d, a, x[k + 4], S24, 0xE7D3FBC8);
|
|
209
|
+
a = GG(a, b, c, d, x[k + 9], S21, 0x21E1CDE6);
|
|
210
|
+
d = GG(d, a, b, c, x[k + 14], S22, 0xC33707D6);
|
|
211
|
+
c = GG(c, d, a, b, x[k + 3], S23, 0xF4D50D87);
|
|
212
|
+
b = GG(b, c, d, a, x[k + 8], S24, 0x455A14ED);
|
|
213
|
+
a = GG(a, b, c, d, x[k + 13], S21, 0xA9E3E905);
|
|
214
|
+
d = GG(d, a, b, c, x[k + 2], S22, 0xFCEFA3F8);
|
|
215
|
+
c = GG(c, d, a, b, x[k + 7], S23, 0x676F02D9);
|
|
216
|
+
b = GG(b, c, d, a, x[k + 12], S24, 0x8D2A4C8A);
|
|
217
|
+
a = HH(a, b, c, d, x[k + 5], S31, 0xFFFA3942);
|
|
218
|
+
d = HH(d, a, b, c, x[k + 8], S32, 0x8771F681);
|
|
219
|
+
c = HH(c, d, a, b, x[k + 11], S33, 0x6D9D6122);
|
|
220
|
+
b = HH(b, c, d, a, x[k + 14], S34, 0xFDE5380C);
|
|
221
|
+
a = HH(a, b, c, d, x[k + 1], S31, 0xA4BEEA44);
|
|
222
|
+
d = HH(d, a, b, c, x[k + 4], S32, 0x4BDECFA9);
|
|
223
|
+
c = HH(c, d, a, b, x[k + 7], S33, 0xF6BB4B60);
|
|
224
|
+
b = HH(b, c, d, a, x[k + 10], S34, 0xBEBFBC70);
|
|
225
|
+
a = HH(a, b, c, d, x[k + 13], S31, 0x289B7EC6);
|
|
226
|
+
d = HH(d, a, b, c, x[k + 0], S32, 0xEAA127FA);
|
|
227
|
+
c = HH(c, d, a, b, x[k + 3], S33, 0xD4EF3085);
|
|
228
|
+
b = HH(b, c, d, a, x[k + 6], S34, 0x4881D05);
|
|
229
|
+
a = HH(a, b, c, d, x[k + 9], S31, 0xD9D4D039);
|
|
230
|
+
d = HH(d, a, b, c, x[k + 12], S32, 0xE6DB99E5);
|
|
231
|
+
c = HH(c, d, a, b, x[k + 15], S33, 0x1FA27CF8);
|
|
232
|
+
b = HH(b, c, d, a, x[k + 2], S34, 0xC4AC5665);
|
|
233
|
+
a = II(a, b, c, d, x[k + 0], S41, 0xF4292244);
|
|
234
|
+
d = II(d, a, b, c, x[k + 7], S42, 0x432AFF97);
|
|
235
|
+
c = II(c, d, a, b, x[k + 14], S43, 0xAB9423A7);
|
|
236
|
+
b = II(b, c, d, a, x[k + 5], S44, 0xFC93A039);
|
|
237
|
+
a = II(a, b, c, d, x[k + 12], S41, 0x655B59C3);
|
|
238
|
+
d = II(d, a, b, c, x[k + 3], S42, 0x8F0CCC92);
|
|
239
|
+
c = II(c, d, a, b, x[k + 10], S43, 0xFFEFF47D);
|
|
240
|
+
b = II(b, c, d, a, x[k + 1], S44, 0x85845DD1);
|
|
241
|
+
a = II(a, b, c, d, x[k + 8], S41, 0x6FA87E4F);
|
|
242
|
+
d = II(d, a, b, c, x[k + 15], S42, 0xFE2CE6E0);
|
|
243
|
+
c = II(c, d, a, b, x[k + 6], S43, 0xA3014314);
|
|
244
|
+
b = II(b, c, d, a, x[k + 13], S44, 0x4E0811A1);
|
|
245
|
+
a = II(a, b, c, d, x[k + 4], S41, 0xF7537E82);
|
|
246
|
+
d = II(d, a, b, c, x[k + 11], S42, 0xBD3AF235);
|
|
247
|
+
c = II(c, d, a, b, x[k + 2], S43, 0x2AD7D2BB);
|
|
248
|
+
b = II(b, c, d, a, x[k + 9], S44, 0xEB86D391);
|
|
249
|
+
a = AddUnsigned(a, AA);
|
|
250
|
+
b = AddUnsigned(b, BB);
|
|
251
|
+
c = AddUnsigned(c, CC);
|
|
252
|
+
d = AddUnsigned(d, DD);
|
|
253
|
+
}
|
|
254
|
+
var temp = WordToHex(a) + WordToHex(b) + WordToHex(c) + WordToHex(d);
|
|
255
|
+
return temp.toLowerCase();
|
|
256
|
+
};
|
|
257
|
+
exports.MD5 = MD5;
|
package/dist/esm/RXPublisher.js
CHANGED
|
@@ -199,9 +199,7 @@ export { RXDelayedError };
|
|
|
199
199
|
var RXEmitter = /** @class */ (function (_super) {
|
|
200
200
|
__extends(RXEmitter, _super);
|
|
201
201
|
function RXEmitter() {
|
|
202
|
-
var _this = this;
|
|
203
|
-
console.log('new RXEmitter');
|
|
204
|
-
_this = _super.call(this) || this;
|
|
202
|
+
var _this = _super.call(this) || this;
|
|
205
203
|
_this._hasValue = false;
|
|
206
204
|
_this.hasError = false;
|
|
207
205
|
_this._err = undefined;
|
|
@@ -404,9 +402,7 @@ export { RXOperation };
|
|
|
404
402
|
var RXCombine = /** @class */ (function (_super) {
|
|
405
403
|
__extends(RXCombine, _super);
|
|
406
404
|
function RXCombine(list) {
|
|
407
|
-
var _this = this;
|
|
408
|
-
console.log('new RXCombine');
|
|
409
|
-
_this = _super.call(this) || this;
|
|
405
|
+
var _this = _super.call(this) || this;
|
|
410
406
|
_this._values = [];
|
|
411
407
|
_this._hasError = false;
|
|
412
408
|
_this._err = undefined;
|
|
@@ -461,9 +457,7 @@ export { RXCombine };
|
|
|
461
457
|
var RXFrom = /** @class */ (function (_super) {
|
|
462
458
|
__extends(RXFrom, _super);
|
|
463
459
|
function RXFrom(list) {
|
|
464
|
-
var _this = this;
|
|
465
|
-
console.log('new RXFrom');
|
|
466
|
-
_this = _super.call(this) || this;
|
|
460
|
+
var _this = _super.call(this) || this;
|
|
467
461
|
_this.values = list;
|
|
468
462
|
_this.sendComplete();
|
|
469
463
|
return _this;
|
|
@@ -484,9 +478,7 @@ export { RXFrom };
|
|
|
484
478
|
var RXWaitUntilComplete = /** @class */ (function (_super) {
|
|
485
479
|
__extends(RXWaitUntilComplete, _super);
|
|
486
480
|
function RXWaitUntilComplete(list, resultPublisher) {
|
|
487
|
-
var _this = this;
|
|
488
|
-
console.log('new RXSequence');
|
|
489
|
-
_this = _super.call(this) || this;
|
|
481
|
+
var _this = _super.call(this) || this;
|
|
490
482
|
_this._value = undefined;
|
|
491
483
|
_this._hasError = false;
|
|
492
484
|
_this._err = undefined;
|
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
11
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
12
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
13
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
14
|
+
function step(op) {
|
|
15
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
16
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
17
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
18
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
19
|
+
switch (op[0]) {
|
|
20
|
+
case 0: case 1: t = op; break;
|
|
21
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
22
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
23
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
24
|
+
default:
|
|
25
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
26
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
27
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
28
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
29
|
+
if (t[2]) _.ops.pop();
|
|
30
|
+
_.trys.pop(); continue;
|
|
31
|
+
}
|
|
32
|
+
op = body.call(thisArg, _);
|
|
33
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
34
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
export var asyncDelay = function (time) { return __awaiter(void 0, void 0, void 0, function () {
|
|
38
|
+
var p;
|
|
39
|
+
return __generator(this, function (_a) {
|
|
40
|
+
switch (_a.label) {
|
|
41
|
+
case 0:
|
|
42
|
+
p = new Promise(function (resolve) {
|
|
43
|
+
setTimeout(function () {
|
|
44
|
+
resolve('done!');
|
|
45
|
+
}, time);
|
|
46
|
+
});
|
|
47
|
+
return [4 /*yield*/, p];
|
|
48
|
+
case 1: return [2 /*return*/, _a.sent()];
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
}); };
|
|
52
|
+
export var MD5 = function (string) {
|
|
53
|
+
function RotateLeft(lValue, iShiftBits) {
|
|
54
|
+
return (lValue << iShiftBits) | (lValue >>> (32 - iShiftBits));
|
|
55
|
+
}
|
|
56
|
+
function AddUnsigned(lX, lY) {
|
|
57
|
+
var lX4, lY4, lX8, lY8, lResult;
|
|
58
|
+
lX8 = (lX & 0x80000000);
|
|
59
|
+
lY8 = (lY & 0x80000000);
|
|
60
|
+
lX4 = (lX & 0x40000000);
|
|
61
|
+
lY4 = (lY & 0x40000000);
|
|
62
|
+
lResult = (lX & 0x3FFFFFFF) + (lY & 0x3FFFFFFF);
|
|
63
|
+
if (lX4 & lY4) {
|
|
64
|
+
return (lResult ^ 0x80000000 ^ lX8 ^ lY8);
|
|
65
|
+
}
|
|
66
|
+
if (lX4 | lY4) {
|
|
67
|
+
if (lResult & 0x40000000) {
|
|
68
|
+
return (lResult ^ 0xC0000000 ^ lX8 ^ lY8);
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
return (lResult ^ 0x40000000 ^ lX8 ^ lY8);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
return (lResult ^ lX8 ^ lY8);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
function F(x, y, z) { return (x & y) | ((~x) & z); }
|
|
79
|
+
function G(x, y, z) { return (x & z) | (y & (~z)); }
|
|
80
|
+
function H(x, y, z) { return (x ^ y ^ z); }
|
|
81
|
+
function I(x, y, z) { return (y ^ (x | (~z))); }
|
|
82
|
+
function FF(a, b, c, d, x, s, ac) {
|
|
83
|
+
a = AddUnsigned(a, AddUnsigned(AddUnsigned(F(b, c, d), x), ac));
|
|
84
|
+
return AddUnsigned(RotateLeft(a, s), b);
|
|
85
|
+
}
|
|
86
|
+
function GG(a, b, c, d, x, s, ac) {
|
|
87
|
+
a = AddUnsigned(a, AddUnsigned(AddUnsigned(G(b, c, d), x), ac));
|
|
88
|
+
return AddUnsigned(RotateLeft(a, s), b);
|
|
89
|
+
}
|
|
90
|
+
function HH(a, b, c, d, x, s, ac) {
|
|
91
|
+
a = AddUnsigned(a, AddUnsigned(AddUnsigned(H(b, c, d), x), ac));
|
|
92
|
+
return AddUnsigned(RotateLeft(a, s), b);
|
|
93
|
+
}
|
|
94
|
+
function II(a, b, c, d, x, s, ac) {
|
|
95
|
+
a = AddUnsigned(a, AddUnsigned(AddUnsigned(I(b, c, d), x), ac));
|
|
96
|
+
return AddUnsigned(RotateLeft(a, s), b);
|
|
97
|
+
}
|
|
98
|
+
function ConvertToWordArray(string) {
|
|
99
|
+
var lWordCount;
|
|
100
|
+
var lMessageLength = string.length;
|
|
101
|
+
var lNumberOfWords_temp1 = lMessageLength + 8;
|
|
102
|
+
var lNumberOfWords_temp2 = (lNumberOfWords_temp1 - (lNumberOfWords_temp1 % 64)) / 64;
|
|
103
|
+
var lNumberOfWords = (lNumberOfWords_temp2 + 1) * 16;
|
|
104
|
+
var lWordArray = Array(lNumberOfWords - 1);
|
|
105
|
+
var lBytePosition = 0;
|
|
106
|
+
var lByteCount = 0;
|
|
107
|
+
while (lByteCount < lMessageLength) {
|
|
108
|
+
lWordCount = (lByteCount - (lByteCount % 4)) / 4;
|
|
109
|
+
lBytePosition = (lByteCount % 4) * 8;
|
|
110
|
+
lWordArray[lWordCount] = (lWordArray[lWordCount] | (string.charCodeAt(lByteCount) << lBytePosition));
|
|
111
|
+
lByteCount++;
|
|
112
|
+
}
|
|
113
|
+
lWordCount = (lByteCount - (lByteCount % 4)) / 4;
|
|
114
|
+
lBytePosition = (lByteCount % 4) * 8;
|
|
115
|
+
lWordArray[lWordCount] = lWordArray[lWordCount] | (0x80 << lBytePosition);
|
|
116
|
+
lWordArray[lNumberOfWords - 2] = lMessageLength << 3;
|
|
117
|
+
lWordArray[lNumberOfWords - 1] = lMessageLength >>> 29;
|
|
118
|
+
return lWordArray;
|
|
119
|
+
}
|
|
120
|
+
function WordToHex(lValue) {
|
|
121
|
+
var WordToHexValue = '';
|
|
122
|
+
var WordToHexValue_temp = '';
|
|
123
|
+
var lByte;
|
|
124
|
+
var lCount;
|
|
125
|
+
for (lCount = 0; lCount <= 3; lCount++) {
|
|
126
|
+
lByte = (lValue >>> (lCount * 8)) & 255;
|
|
127
|
+
WordToHexValue_temp = '0' + lByte.toString(16);
|
|
128
|
+
WordToHexValue = WordToHexValue + WordToHexValue_temp.substr(WordToHexValue_temp.length - 2, 2);
|
|
129
|
+
}
|
|
130
|
+
return WordToHexValue;
|
|
131
|
+
}
|
|
132
|
+
function Utf8Encode(string) {
|
|
133
|
+
string = string.replace(/\r\n/g, '\n');
|
|
134
|
+
var utftext = '';
|
|
135
|
+
for (var n = 0; n < string.length; n++) {
|
|
136
|
+
var c_1 = string.charCodeAt(n);
|
|
137
|
+
if (c_1 < 128) {
|
|
138
|
+
utftext += String.fromCharCode(c_1);
|
|
139
|
+
}
|
|
140
|
+
else if ((c_1 > 127) && (c_1 < 2048)) {
|
|
141
|
+
utftext += String.fromCharCode((c_1 >> 6) | 192);
|
|
142
|
+
utftext += String.fromCharCode((c_1 & 63) | 128);
|
|
143
|
+
}
|
|
144
|
+
else {
|
|
145
|
+
utftext += String.fromCharCode((c_1 >> 12) | 224);
|
|
146
|
+
utftext += String.fromCharCode(((c_1 >> 6) & 63) | 128);
|
|
147
|
+
utftext += String.fromCharCode((c_1 & 63) | 128);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
return utftext;
|
|
151
|
+
}
|
|
152
|
+
var x = [];
|
|
153
|
+
var k, AA, BB, CC, DD, a, b, c, d;
|
|
154
|
+
var S11 = 7;
|
|
155
|
+
var S12 = 12;
|
|
156
|
+
var S13 = 17;
|
|
157
|
+
var S14 = 22;
|
|
158
|
+
var S21 = 5;
|
|
159
|
+
var S22 = 9;
|
|
160
|
+
var S23 = 14;
|
|
161
|
+
var S24 = 20;
|
|
162
|
+
var S31 = 4;
|
|
163
|
+
var S32 = 11;
|
|
164
|
+
var S33 = 16;
|
|
165
|
+
var S34 = 23;
|
|
166
|
+
var S41 = 6;
|
|
167
|
+
var S42 = 10;
|
|
168
|
+
var S43 = 15;
|
|
169
|
+
var S44 = 21;
|
|
170
|
+
string = Utf8Encode(string);
|
|
171
|
+
x = ConvertToWordArray(string);
|
|
172
|
+
a = 0x67452301;
|
|
173
|
+
b = 0xEFCDAB89;
|
|
174
|
+
c = 0x98BADCFE;
|
|
175
|
+
d = 0x10325476;
|
|
176
|
+
for (k = 0; k < x.length; k += 16) {
|
|
177
|
+
AA = a;
|
|
178
|
+
BB = b;
|
|
179
|
+
CC = c;
|
|
180
|
+
DD = d;
|
|
181
|
+
a = FF(a, b, c, d, x[k + 0], S11, 0xD76AA478);
|
|
182
|
+
d = FF(d, a, b, c, x[k + 1], S12, 0xE8C7B756);
|
|
183
|
+
c = FF(c, d, a, b, x[k + 2], S13, 0x242070DB);
|
|
184
|
+
b = FF(b, c, d, a, x[k + 3], S14, 0xC1BDCEEE);
|
|
185
|
+
a = FF(a, b, c, d, x[k + 4], S11, 0xF57C0FAF);
|
|
186
|
+
d = FF(d, a, b, c, x[k + 5], S12, 0x4787C62A);
|
|
187
|
+
c = FF(c, d, a, b, x[k + 6], S13, 0xA8304613);
|
|
188
|
+
b = FF(b, c, d, a, x[k + 7], S14, 0xFD469501);
|
|
189
|
+
a = FF(a, b, c, d, x[k + 8], S11, 0x698098D8);
|
|
190
|
+
d = FF(d, a, b, c, x[k + 9], S12, 0x8B44F7AF);
|
|
191
|
+
c = FF(c, d, a, b, x[k + 10], S13, 0xFFFF5BB1);
|
|
192
|
+
b = FF(b, c, d, a, x[k + 11], S14, 0x895CD7BE);
|
|
193
|
+
a = FF(a, b, c, d, x[k + 12], S11, 0x6B901122);
|
|
194
|
+
d = FF(d, a, b, c, x[k + 13], S12, 0xFD987193);
|
|
195
|
+
c = FF(c, d, a, b, x[k + 14], S13, 0xA679438E);
|
|
196
|
+
b = FF(b, c, d, a, x[k + 15], S14, 0x49B40821);
|
|
197
|
+
a = GG(a, b, c, d, x[k + 1], S21, 0xF61E2562);
|
|
198
|
+
d = GG(d, a, b, c, x[k + 6], S22, 0xC040B340);
|
|
199
|
+
c = GG(c, d, a, b, x[k + 11], S23, 0x265E5A51);
|
|
200
|
+
b = GG(b, c, d, a, x[k + 0], S24, 0xE9B6C7AA);
|
|
201
|
+
a = GG(a, b, c, d, x[k + 5], S21, 0xD62F105D);
|
|
202
|
+
d = GG(d, a, b, c, x[k + 10], S22, 0x2441453);
|
|
203
|
+
c = GG(c, d, a, b, x[k + 15], S23, 0xD8A1E681);
|
|
204
|
+
b = GG(b, c, d, a, x[k + 4], S24, 0xE7D3FBC8);
|
|
205
|
+
a = GG(a, b, c, d, x[k + 9], S21, 0x21E1CDE6);
|
|
206
|
+
d = GG(d, a, b, c, x[k + 14], S22, 0xC33707D6);
|
|
207
|
+
c = GG(c, d, a, b, x[k + 3], S23, 0xF4D50D87);
|
|
208
|
+
b = GG(b, c, d, a, x[k + 8], S24, 0x455A14ED);
|
|
209
|
+
a = GG(a, b, c, d, x[k + 13], S21, 0xA9E3E905);
|
|
210
|
+
d = GG(d, a, b, c, x[k + 2], S22, 0xFCEFA3F8);
|
|
211
|
+
c = GG(c, d, a, b, x[k + 7], S23, 0x676F02D9);
|
|
212
|
+
b = GG(b, c, d, a, x[k + 12], S24, 0x8D2A4C8A);
|
|
213
|
+
a = HH(a, b, c, d, x[k + 5], S31, 0xFFFA3942);
|
|
214
|
+
d = HH(d, a, b, c, x[k + 8], S32, 0x8771F681);
|
|
215
|
+
c = HH(c, d, a, b, x[k + 11], S33, 0x6D9D6122);
|
|
216
|
+
b = HH(b, c, d, a, x[k + 14], S34, 0xFDE5380C);
|
|
217
|
+
a = HH(a, b, c, d, x[k + 1], S31, 0xA4BEEA44);
|
|
218
|
+
d = HH(d, a, b, c, x[k + 4], S32, 0x4BDECFA9);
|
|
219
|
+
c = HH(c, d, a, b, x[k + 7], S33, 0xF6BB4B60);
|
|
220
|
+
b = HH(b, c, d, a, x[k + 10], S34, 0xBEBFBC70);
|
|
221
|
+
a = HH(a, b, c, d, x[k + 13], S31, 0x289B7EC6);
|
|
222
|
+
d = HH(d, a, b, c, x[k + 0], S32, 0xEAA127FA);
|
|
223
|
+
c = HH(c, d, a, b, x[k + 3], S33, 0xD4EF3085);
|
|
224
|
+
b = HH(b, c, d, a, x[k + 6], S34, 0x4881D05);
|
|
225
|
+
a = HH(a, b, c, d, x[k + 9], S31, 0xD9D4D039);
|
|
226
|
+
d = HH(d, a, b, c, x[k + 12], S32, 0xE6DB99E5);
|
|
227
|
+
c = HH(c, d, a, b, x[k + 15], S33, 0x1FA27CF8);
|
|
228
|
+
b = HH(b, c, d, a, x[k + 2], S34, 0xC4AC5665);
|
|
229
|
+
a = II(a, b, c, d, x[k + 0], S41, 0xF4292244);
|
|
230
|
+
d = II(d, a, b, c, x[k + 7], S42, 0x432AFF97);
|
|
231
|
+
c = II(c, d, a, b, x[k + 14], S43, 0xAB9423A7);
|
|
232
|
+
b = II(b, c, d, a, x[k + 5], S44, 0xFC93A039);
|
|
233
|
+
a = II(a, b, c, d, x[k + 12], S41, 0x655B59C3);
|
|
234
|
+
d = II(d, a, b, c, x[k + 3], S42, 0x8F0CCC92);
|
|
235
|
+
c = II(c, d, a, b, x[k + 10], S43, 0xFFEFF47D);
|
|
236
|
+
b = II(b, c, d, a, x[k + 1], S44, 0x85845DD1);
|
|
237
|
+
a = II(a, b, c, d, x[k + 8], S41, 0x6FA87E4F);
|
|
238
|
+
d = II(d, a, b, c, x[k + 15], S42, 0xFE2CE6E0);
|
|
239
|
+
c = II(c, d, a, b, x[k + 6], S43, 0xA3014314);
|
|
240
|
+
b = II(b, c, d, a, x[k + 13], S44, 0x4E0811A1);
|
|
241
|
+
a = II(a, b, c, d, x[k + 4], S41, 0xF7537E82);
|
|
242
|
+
d = II(d, a, b, c, x[k + 11], S42, 0xBD3AF235);
|
|
243
|
+
c = II(c, d, a, b, x[k + 2], S43, 0x2AD7D2BB);
|
|
244
|
+
b = II(b, c, d, a, x[k + 9], S44, 0xEB86D391);
|
|
245
|
+
a = AddUnsigned(a, AA);
|
|
246
|
+
b = AddUnsigned(b, BB);
|
|
247
|
+
c = AddUnsigned(c, CC);
|
|
248
|
+
d = AddUnsigned(d, DD);
|
|
249
|
+
}
|
|
250
|
+
var temp = WordToHex(a) + WordToHex(b) + WordToHex(c) + WordToHex(d);
|
|
251
|
+
return temp.toLowerCase();
|
|
252
|
+
};
|