Changeset 0c6b92a for imaps-frontend/node_modules/tslib/tslib.js
- Timestamp:
- 12/12/24 17:06:06 (5 weeks ago)
- Branches:
- main
- Parents:
- d565449
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
imaps-frontend/node_modules/tslib/tslib.js
rd565449 r0c6b92a 13 13 PERFORMANCE OF THIS SOFTWARE. 14 14 ***************************************************************************** */ 15 /* global global, define, Symbol, Reflect, Promise, SuppressedError */15 /* global global, define, Symbol, Reflect, Promise, SuppressedError, Iterator */ 16 16 var __extends; 17 17 var __assign; … … 45 45 var __addDisposableResource; 46 46 var __disposeResources; 47 var __rewriteRelativeImportExtension; 47 48 (function (factory) { 48 49 var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {}; … … 172 173 173 174 __generator = function (thisArg, body) { 174 var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g ;175 return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;175 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); 176 return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; 176 177 function verb(n) { return function (v) { return step([n, v]); }; } 177 178 function step(op) { … … 277 278 if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); 278 279 var g = generator.apply(thisArg, _arguments || []), i, q = []; 279 return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;280 return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; 280 281 function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } 281 282 function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } … … 312 313 }; 313 314 315 var ownKeys = function(o) { 316 ownKeys = Object.getOwnPropertyNames || function (o) { 317 var ar = []; 318 for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; 319 return ar; 320 }; 321 return ownKeys(o); 322 }; 323 314 324 __importStar = function (mod) { 315 325 if (mod && mod.__esModule) return mod; 316 326 var result = {}; 317 if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);327 if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); 318 328 __setModuleDefault(result, mod); 319 329 return result; … … 375 385 env.hasError = true; 376 386 } 387 var r, s = 0; 377 388 function next() { 378 while (env.stack.length) { 379 var rec = env.stack.pop(); 389 while (r = env.stack.pop()) { 380 390 try { 381 var result = rec.dispose && rec.dispose.call(rec.value); 382 if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); 391 if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next); 392 if (r.dispose) { 393 var result = r.dispose.call(r.value); 394 if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); 395 } 396 else s |= 1; 383 397 } 384 398 catch (e) { … … 386 400 } 387 401 } 402 if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve(); 388 403 if (env.hasError) throw env.error; 389 404 } 390 405 return next(); 406 }; 407 408 __rewriteRelativeImportExtension = function (path, preserveJsx) { 409 if (typeof path === "string" && /^\.\.?\//.test(path)) { 410 return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) { 411 return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js"); 412 }); 413 } 414 return path; 391 415 }; 392 416 … … 422 446 exporter("__addDisposableResource", __addDisposableResource); 423 447 exporter("__disposeResources", __disposeResources); 448 exporter("__rewriteRelativeImportExtension", __rewriteRelativeImportExtension); 424 449 }); 450 451 0 && (module.exports = { 452 __extends: __extends, 453 __assign: __assign, 454 __rest: __rest, 455 __decorate: __decorate, 456 __param: __param, 457 __esDecorate: __esDecorate, 458 __runInitializers: __runInitializers, 459 __propKey: __propKey, 460 __setFunctionName: __setFunctionName, 461 __metadata: __metadata, 462 __awaiter: __awaiter, 463 __generator: __generator, 464 __exportStar: __exportStar, 465 __createBinding: __createBinding, 466 __values: __values, 467 __read: __read, 468 __spread: __spread, 469 __spreadArrays: __spreadArrays, 470 __spreadArray: __spreadArray, 471 __await: __await, 472 __asyncGenerator: __asyncGenerator, 473 __asyncDelegator: __asyncDelegator, 474 __asyncValues: __asyncValues, 475 __makeTemplateObject: __makeTemplateObject, 476 __importStar: __importStar, 477 __importDefault: __importDefault, 478 __classPrivateFieldGet: __classPrivateFieldGet, 479 __classPrivateFieldSet: __classPrivateFieldSet, 480 __classPrivateFieldIn: __classPrivateFieldIn, 481 __addDisposableResource: __addDisposableResource, 482 __disposeResources: __disposeResources, 483 __rewriteRelativeImportExtension: __rewriteRelativeImportExtension, 484 });
Note:
See TracChangeset
for help on using the changeset viewer.