UNPKG

4.57 kBJavaScriptView Raw
1/*! *****************************************************************************
2Copyright (c) Microsoft Corporation.
3
4Permission to use, copy, modify, and/or distribute this software for any
5purpose with or without fee is hereby granted.
6
7THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
8REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
9AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
10INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
11LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
12OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
13PERFORMANCE OF THIS SOFTWARE.
14***************************************************************************** */
15/* global Reflect, Promise */
16
17var extendStatics = function(d, b) {
18 extendStatics = Object.setPrototypeOf ||
19 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
20 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
21 return extendStatics(d, b);
22};
23
24function __extends(d, b) {
25 if (typeof b !== "function" && b !== null)
26 throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
27 extendStatics(d, b);
28 function __() { this.constructor = d; }
29 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
30}
31
32var __assign = function() {
33 __assign = Object.assign || function __assign(t) {
34 for (var s, i = 1, n = arguments.length; i < n; i++) {
35 s = arguments[i];
36 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
37 }
38 return t;
39 };
40 return __assign.apply(this, arguments);
41};
42
43function __awaiter(thisArg, _arguments, P, generator) {
44 function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
45 return new (P || (P = Promise))(function (resolve, reject) {
46 function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
47 function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
48 function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
49 step((generator = generator.apply(thisArg, _arguments || [])).next());
50 });
51}
52
53function __generator(thisArg, body) {
54 var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
55 return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
56 function verb(n) { return function (v) { return step([n, v]); }; }
57 function step(op) {
58 if (f) throw new TypeError("Generator is already executing.");
59 while (_) try {
60 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;
61 if (y = 0, t) op = [op[0] & 2, t.value];
62 switch (op[0]) {
63 case 0: case 1: t = op; break;
64 case 4: _.label++; return { value: op[1], done: false };
65 case 5: _.label++; y = op[1]; op = [0]; continue;
66 case 7: op = _.ops.pop(); _.trys.pop(); continue;
67 default:
68 if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
69 if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
70 if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
71 if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
72 if (t[2]) _.ops.pop();
73 _.trys.pop(); continue;
74 }
75 op = body.call(thisArg, _);
76 } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
77 if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
78 }
79}
80
81function __spreadArray(to, from) {
82 for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
83 to[j] = from[i];
84 return to;
85}
86
87export { __assign as _, __extends as a, __awaiter as b, __generator as c, __spreadArray as d };