new license file version [CI SKIP]
This commit is contained in:
@@ -0,0 +1 @@
|
||||
export * from 'rxjs-compat/operator/skipLast';
|
||||
@@ -0,0 +1,7 @@
|
||||
"use strict";
|
||||
function __export(m) {
|
||||
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
|
||||
}
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
__export(require("rxjs-compat/util/subscribeToArray"));
|
||||
//# sourceMappingURL=subscribeToArray.js.map
|
||||
@@ -0,0 +1,7 @@
|
||||
"use strict";
|
||||
function __export(m) {
|
||||
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
|
||||
}
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
__export(require("rxjs-compat/operator/concatMap"));
|
||||
//# sourceMappingURL=concatMap.js.map
|
||||
@@ -0,0 +1,44 @@
|
||||
{
|
||||
"name": "camelcase",
|
||||
"version": "6.3.0",
|
||||
"description": "Convert a dash/dot/underscore/space separated string to camelCase or PascalCase: `foo-bar` → `fooBar`",
|
||||
"license": "MIT",
|
||||
"repository": "sindresorhus/camelcase",
|
||||
"funding": "https://github.com/sponsors/sindresorhus",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "https://sindresorhus.com"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && ava && tsd"
|
||||
},
|
||||
"files": [
|
||||
"index.js",
|
||||
"index.d.ts"
|
||||
],
|
||||
"keywords": [
|
||||
"camelcase",
|
||||
"camel-case",
|
||||
"camel",
|
||||
"case",
|
||||
"dash",
|
||||
"hyphen",
|
||||
"dot",
|
||||
"underscore",
|
||||
"separator",
|
||||
"string",
|
||||
"text",
|
||||
"convert",
|
||||
"pascalcase",
|
||||
"pascal-case"
|
||||
],
|
||||
"devDependencies": {
|
||||
"ava": "^1.4.1",
|
||||
"tsd": "^0.11.0",
|
||||
"xo": "^0.28.3"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
export * from 'rxjs-compat/operators/bufferWhen';
|
||||
@@ -0,0 +1,7 @@
|
||||
"use strict";
|
||||
function __export(m) {
|
||||
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
|
||||
}
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
__export(require("rxjs-compat/operators/bufferToggle"));
|
||||
//# sourceMappingURL=bufferToggle.js.map
|
||||
@@ -0,0 +1 @@
|
||||
module.exports={C:{"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0.00833,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0.05831,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0,"80":0,"81":0,"82":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0,"94":0,"95":0,"96":0,"97":0,"98":0,"99":0,"100":0,"101":0,"102":0,"103":0,"104":0,"105":0,"106":0,"107":0,"108":0.02083,"109":0.00417,"110":0,"111":0,"3.5":0,"3.6":0},D:{"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0.00833,"65":0,"66":0,"67":0,"68":0,"69":0,"70":0.00417,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0,"80":0,"81":0.03332,"83":0,"84":0.00417,"85":0,"86":0.05831,"87":0,"88":0.00417,"89":0,"90":0,"91":0.00417,"92":0.00417,"93":0,"94":0,"95":0.00417,"96":0.0125,"97":0,"98":0.00417,"99":0,"100":0,"101":0,"102":0.23324,"103":0.00417,"104":0,"105":0,"106":0,"107":0.01666,"108":6.11422,"109":6.94722,"110":0,"111":0,"112":0},F:{"9":0,"11":0,"12":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"60":0.00417,"62":0,"63":0,"64":0,"65":0,"66":0.00417,"67":0,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0.00417,"80":0,"81":0,"82":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0,"94":0.19576,"9.5-9.6":0,"10.0-10.1":0,"10.5":0,"10.6":0,"11.1":0,"11.5":0,"11.6":0,"12.1":0},B:{"12":0,"13":0,"14":0,"15":0,"16":0,"17":0.00417,"18":0.03749,"79":0,"80":0,"81":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0,"94":0,"95":0,"96":0,"97":0,"98":0,"99":0,"100":0,"101":0,"102":0,"103":0.00833,"104":0,"105":0,"106":0,"107":0.03332,"108":0.61642,"109":0.74137},E:{"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,_:"0","3.1":0,"3.2":0,"5.1":0,"6.1":0,"7.1":0,"9.1":0,"10.1":0,"11.1":0,"12.1":0,"13.1":0.00417,"14.1":0.00417,"15.1":0,"15.2-15.3":0,"15.4":0,"15.5":0,"15.6":0,"16.0":0,"16.1":0.04582,"16.2":0.0125,"16.3":0},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0,"5.0-5.1":0.00511,"6.0-6.1":0,"7.0-7.1":3.61062,"8.1-8.4":0.11241,"9.0-9.2":0,"9.3":0.39853,"10.0-10.2":0.02895,"10.3":0.02555,"11.0-11.2":0.00341,"11.3-11.4":0.00852,"12.0-12.1":0.53819,"12.2-12.5":1.00314,"13.0-13.1":0.39002,"13.2":0.0017,"13.3":0,"13.4-13.7":0.0562,"14.0-14.4":0.16691,"14.5-14.8":1.68609,"15.0-15.1":0.14136,"15.2-15.3":0.04769,"15.4":0.12092,"15.5":0.88733,"15.6":0.64378,"16.0":5.00889,"16.1":0.30145,"16.2":0.31678,"16.3":0.08175},P:{"4":0.17241,"5.0-5.4":0.01014,"6.2-6.4":0.01014,"7.2-7.4":1.7241,"8.2":0,"9.2":0.11156,"10.1":0,"11.1-11.2":0.05071,"12.0":0.02028,"13.0":0,"14.0":0.01014,"15.0":0.10142,"16.0":0.03043,"17.0":0.01014,"18.0":0.01014,"19.0":0.29411},I:{"0":0,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0.00043,"4.1":0,"4.2-4.3":0.00043,"4.4":0,"4.4.3-4.4.4":0.08161},K:{_:"0 10 11 12 11.1 11.5 12.1"},A:{"6":0,"7":0,"8":0,"9":0,"10":0,"11":0.00417,"5.5":0},J:{"7":0,"10":0},N:{"10":0,"11":0},R:{_:"0"},M:{"0":0.02918},Q:{"13.1":0.01751},O:{"0":0.01167},H:{"0":0.46956},L:{"0":64.00959},S:{"2.5":0.46097}};
|
||||
@@ -0,0 +1,13 @@
|
||||
import ElseBlock from './ElseBlock';
|
||||
import Expression from './shared/Expression';
|
||||
import AbstractBlock from './shared/AbstractBlock';
|
||||
import Component from '../Component';
|
||||
import TemplateScope from './shared/TemplateScope';
|
||||
import { TemplateNode } from '../../interfaces';
|
||||
import Node from './shared/Node';
|
||||
export default class IfBlock extends AbstractBlock {
|
||||
type: 'IfBlock';
|
||||
expression: Expression;
|
||||
else: ElseBlock;
|
||||
constructor(component: Component, parent: Node, scope: TemplateScope, info: TemplateNode);
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
import 'rxjs-compat/add/operator/timeoutWith';
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"takeLast.js","sources":["../../src/internal/operators/takeLast.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,4CAA2C;AAC3C,2EAA0E;AAC1E,6CAA4C;AA8C5C,SAAgB,QAAQ,CAAI,KAAa;IACvC,OAAO,SAAS,wBAAwB,CAAC,MAAqB;QAC5D,IAAI,KAAK,KAAK,CAAC,EAAE;YACf,OAAO,aAAK,EAAE,CAAC;SAChB;aAAM;YACL,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,gBAAgB,CAAC,KAAK,CAAC,CAAC,CAAC;SACjD;IACH,CAAC,CAAC;AACJ,CAAC;AARD,4BAQC;AAED;IACE,0BAAoB,KAAa;QAAb,UAAK,GAAL,KAAK,CAAQ;QAC/B,IAAI,IAAI,CAAC,KAAK,GAAG,CAAC,EAAE;YAClB,MAAM,IAAI,iDAAuB,CAAC;SACnC;IACH,CAAC;IAED,+BAAI,GAAJ,UAAK,UAAyB,EAAE,MAAW;QACzC,OAAO,MAAM,CAAC,SAAS,CAAC,IAAI,kBAAkB,CAAC,UAAU,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IAC1E,CAAC;IACH,uBAAC;AAAD,CAAC,AAVD,IAUC;AAOD;IAAoC,sCAAa;IAI/C,4BAAY,WAA0B,EAAU,KAAa;QAA7D,YACE,kBAAM,WAAW,CAAC,SACnB;QAF+C,WAAK,GAAL,KAAK,CAAQ;QAHrD,UAAI,GAAa,IAAI,KAAK,EAAE,CAAC;QAC7B,WAAK,GAAW,CAAC,CAAC;;IAI1B,CAAC;IAES,kCAAK,GAAf,UAAgB,KAAQ;QACtB,IAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QACvB,IAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QACzB,IAAM,KAAK,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC;QAE3B,IAAI,IAAI,CAAC,MAAM,GAAG,KAAK,EAAE;YACvB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;SAClB;aAAM;YACL,IAAM,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC;YAC5B,IAAI,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC;SACrB;IACH,CAAC;IAES,sCAAS,GAAnB;QACE,IAAM,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC;QACrC,IAAI,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QAEvB,IAAI,KAAK,GAAG,CAAC,EAAE;YACb,IAAM,KAAK,GAAG,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC;YACjE,IAAM,IAAI,GAAI,IAAI,CAAC,IAAI,CAAC;YAExB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,EAAE,CAAC,EAAE,EAAE;gBAC9B,IAAM,GAAG,GAAG,CAAC,KAAK,EAAE,CAAC,GAAG,KAAK,CAAC;gBAC9B,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;aAC7B;SACF;QAED,WAAW,CAAC,QAAQ,EAAE,CAAC;IACzB,CAAC;IACH,yBAAC;AAAD,CAAC,AArCD,CAAoC,uBAAU,GAqC7C"}
|
||||
@@ -0,0 +1,110 @@
|
||||
/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
|
||||
import * as tslib_1 from "tslib";
|
||||
import { Subscriber } from '../Subscriber';
|
||||
export function sequenceEqual(compareTo, comparator) {
|
||||
return function (source) { return source.lift(new SequenceEqualOperator(compareTo, comparator)); };
|
||||
}
|
||||
var SequenceEqualOperator = /*@__PURE__*/ (function () {
|
||||
function SequenceEqualOperator(compareTo, comparator) {
|
||||
this.compareTo = compareTo;
|
||||
this.comparator = comparator;
|
||||
}
|
||||
SequenceEqualOperator.prototype.call = function (subscriber, source) {
|
||||
return source.subscribe(new SequenceEqualSubscriber(subscriber, this.compareTo, this.comparator));
|
||||
};
|
||||
return SequenceEqualOperator;
|
||||
}());
|
||||
export { SequenceEqualOperator };
|
||||
var SequenceEqualSubscriber = /*@__PURE__*/ (function (_super) {
|
||||
tslib_1.__extends(SequenceEqualSubscriber, _super);
|
||||
function SequenceEqualSubscriber(destination, compareTo, comparator) {
|
||||
var _this = _super.call(this, destination) || this;
|
||||
_this.compareTo = compareTo;
|
||||
_this.comparator = comparator;
|
||||
_this._a = [];
|
||||
_this._b = [];
|
||||
_this._oneComplete = false;
|
||||
_this.destination.add(compareTo.subscribe(new SequenceEqualCompareToSubscriber(destination, _this)));
|
||||
return _this;
|
||||
}
|
||||
SequenceEqualSubscriber.prototype._next = function (value) {
|
||||
if (this._oneComplete && this._b.length === 0) {
|
||||
this.emit(false);
|
||||
}
|
||||
else {
|
||||
this._a.push(value);
|
||||
this.checkValues();
|
||||
}
|
||||
};
|
||||
SequenceEqualSubscriber.prototype._complete = function () {
|
||||
if (this._oneComplete) {
|
||||
this.emit(this._a.length === 0 && this._b.length === 0);
|
||||
}
|
||||
else {
|
||||
this._oneComplete = true;
|
||||
}
|
||||
this.unsubscribe();
|
||||
};
|
||||
SequenceEqualSubscriber.prototype.checkValues = function () {
|
||||
var _c = this, _a = _c._a, _b = _c._b, comparator = _c.comparator;
|
||||
while (_a.length > 0 && _b.length > 0) {
|
||||
var a = _a.shift();
|
||||
var b = _b.shift();
|
||||
var areEqual = false;
|
||||
try {
|
||||
areEqual = comparator ? comparator(a, b) : a === b;
|
||||
}
|
||||
catch (e) {
|
||||
this.destination.error(e);
|
||||
}
|
||||
if (!areEqual) {
|
||||
this.emit(false);
|
||||
}
|
||||
}
|
||||
};
|
||||
SequenceEqualSubscriber.prototype.emit = function (value) {
|
||||
var destination = this.destination;
|
||||
destination.next(value);
|
||||
destination.complete();
|
||||
};
|
||||
SequenceEqualSubscriber.prototype.nextB = function (value) {
|
||||
if (this._oneComplete && this._a.length === 0) {
|
||||
this.emit(false);
|
||||
}
|
||||
else {
|
||||
this._b.push(value);
|
||||
this.checkValues();
|
||||
}
|
||||
};
|
||||
SequenceEqualSubscriber.prototype.completeB = function () {
|
||||
if (this._oneComplete) {
|
||||
this.emit(this._a.length === 0 && this._b.length === 0);
|
||||
}
|
||||
else {
|
||||
this._oneComplete = true;
|
||||
}
|
||||
};
|
||||
return SequenceEqualSubscriber;
|
||||
}(Subscriber));
|
||||
export { SequenceEqualSubscriber };
|
||||
var SequenceEqualCompareToSubscriber = /*@__PURE__*/ (function (_super) {
|
||||
tslib_1.__extends(SequenceEqualCompareToSubscriber, _super);
|
||||
function SequenceEqualCompareToSubscriber(destination, parent) {
|
||||
var _this = _super.call(this, destination) || this;
|
||||
_this.parent = parent;
|
||||
return _this;
|
||||
}
|
||||
SequenceEqualCompareToSubscriber.prototype._next = function (value) {
|
||||
this.parent.nextB(value);
|
||||
};
|
||||
SequenceEqualCompareToSubscriber.prototype._error = function (err) {
|
||||
this.parent.error(err);
|
||||
this.unsubscribe();
|
||||
};
|
||||
SequenceEqualCompareToSubscriber.prototype._complete = function () {
|
||||
this.parent.completeB();
|
||||
this.unsubscribe();
|
||||
};
|
||||
return SequenceEqualCompareToSubscriber;
|
||||
}(Subscriber));
|
||||
//# sourceMappingURL=sequenceEqual.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"canReportError.js","sources":["../../src/internal/util/canReportError.ts"],"names":[],"mappings":";;AAAA,4CAA2C;AAS3C,SAAgB,cAAc,CAAC,QAAwC;IACrE,OAAO,QAAQ,EAAE;QACT,IAAA,aAAoD,EAAlD,oBAAM,EAAE,4BAAW,EAAE,wBAAS,CAAqB;QAC3D,IAAI,QAAM,IAAI,SAAS,EAAE;YACvB,OAAO,KAAK,CAAC;SACd;aAAM,IAAI,WAAW,IAAI,WAAW,YAAY,uBAAU,EAAE;YAC3D,QAAQ,GAAG,WAAW,CAAC;SACxB;aAAM;YACL,QAAQ,GAAG,IAAI,CAAC;SACjB;KACF;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAZD,wCAYC"}
|
||||
@@ -0,0 +1,52 @@
|
||||
import { Subscriber } from '../Subscriber';
|
||||
export function refCount() {
|
||||
return function refCountOperatorFunction(source) {
|
||||
return source.lift(new RefCountOperator(source));
|
||||
};
|
||||
}
|
||||
class RefCountOperator {
|
||||
constructor(connectable) {
|
||||
this.connectable = connectable;
|
||||
}
|
||||
call(subscriber, source) {
|
||||
const { connectable } = this;
|
||||
connectable._refCount++;
|
||||
const refCounter = new RefCountSubscriber(subscriber, connectable);
|
||||
const subscription = source.subscribe(refCounter);
|
||||
if (!refCounter.closed) {
|
||||
refCounter.connection = connectable.connect();
|
||||
}
|
||||
return subscription;
|
||||
}
|
||||
}
|
||||
class RefCountSubscriber extends Subscriber {
|
||||
constructor(destination, connectable) {
|
||||
super(destination);
|
||||
this.connectable = connectable;
|
||||
}
|
||||
_unsubscribe() {
|
||||
const { connectable } = this;
|
||||
if (!connectable) {
|
||||
this.connection = null;
|
||||
return;
|
||||
}
|
||||
this.connectable = null;
|
||||
const refCount = connectable._refCount;
|
||||
if (refCount <= 0) {
|
||||
this.connection = null;
|
||||
return;
|
||||
}
|
||||
connectable._refCount = refCount - 1;
|
||||
if (refCount > 1) {
|
||||
this.connection = null;
|
||||
return;
|
||||
}
|
||||
const { connection } = this;
|
||||
const sharedConnection = connectable._connection;
|
||||
this.connection = null;
|
||||
if (sharedConnection && (!connection || sharedConnection === connection)) {
|
||||
sharedConnection.unsubscribe();
|
||||
}
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=refCount.js.map
|
||||
@@ -0,0 +1,43 @@
|
||||
/** PURE_IMPORTS_START tslib,_Subject,_util_ObjectUnsubscribedError PURE_IMPORTS_END */
|
||||
import * as tslib_1 from "tslib";
|
||||
import { Subject } from './Subject';
|
||||
import { ObjectUnsubscribedError } from './util/ObjectUnsubscribedError';
|
||||
var BehaviorSubject = /*@__PURE__*/ (function (_super) {
|
||||
tslib_1.__extends(BehaviorSubject, _super);
|
||||
function BehaviorSubject(_value) {
|
||||
var _this = _super.call(this) || this;
|
||||
_this._value = _value;
|
||||
return _this;
|
||||
}
|
||||
Object.defineProperty(BehaviorSubject.prototype, "value", {
|
||||
get: function () {
|
||||
return this.getValue();
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
});
|
||||
BehaviorSubject.prototype._subscribe = function (subscriber) {
|
||||
var subscription = _super.prototype._subscribe.call(this, subscriber);
|
||||
if (subscription && !subscription.closed) {
|
||||
subscriber.next(this._value);
|
||||
}
|
||||
return subscription;
|
||||
};
|
||||
BehaviorSubject.prototype.getValue = function () {
|
||||
if (this.hasError) {
|
||||
throw this.thrownError;
|
||||
}
|
||||
else if (this.closed) {
|
||||
throw new ObjectUnsubscribedError();
|
||||
}
|
||||
else {
|
||||
return this._value;
|
||||
}
|
||||
};
|
||||
BehaviorSubject.prototype.next = function (value) {
|
||||
_super.prototype.next.call(this, this._value = value);
|
||||
};
|
||||
return BehaviorSubject;
|
||||
}(Subject));
|
||||
export { BehaviorSubject };
|
||||
//# sourceMappingURL=BehaviorSubject.js.map
|
||||
@@ -0,0 +1,103 @@
|
||||
'use strict';
|
||||
|
||||
class CancelError extends Error {
|
||||
constructor(reason) {
|
||||
super(reason || 'Promise was canceled');
|
||||
this.name = 'CancelError';
|
||||
}
|
||||
|
||||
get isCanceled() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
class PCancelable {
|
||||
static fn(userFn) {
|
||||
return (...args) => {
|
||||
return new PCancelable((resolve, reject, onCancel) => {
|
||||
args.push(onCancel);
|
||||
userFn(...args).then(resolve, reject);
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
constructor(executor) {
|
||||
this._cancelHandlers = [];
|
||||
this._isPending = true;
|
||||
this._isCanceled = false;
|
||||
this._rejectOnCancel = true;
|
||||
|
||||
this._promise = new Promise((resolve, reject) => {
|
||||
this._reject = reject;
|
||||
|
||||
const onResolve = value => {
|
||||
this._isPending = false;
|
||||
resolve(value);
|
||||
};
|
||||
|
||||
const onReject = error => {
|
||||
this._isPending = false;
|
||||
reject(error);
|
||||
};
|
||||
|
||||
const onCancel = handler => {
|
||||
this._cancelHandlers.push(handler);
|
||||
};
|
||||
|
||||
Object.defineProperties(onCancel, {
|
||||
shouldReject: {
|
||||
get: () => this._rejectOnCancel,
|
||||
set: bool => {
|
||||
this._rejectOnCancel = bool;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return executor(onResolve, onReject, onCancel);
|
||||
});
|
||||
}
|
||||
|
||||
then(onFulfilled, onRejected) {
|
||||
return this._promise.then(onFulfilled, onRejected);
|
||||
}
|
||||
|
||||
catch(onRejected) {
|
||||
return this._promise.catch(onRejected);
|
||||
}
|
||||
|
||||
finally(onFinally) {
|
||||
return this._promise.finally(onFinally);
|
||||
}
|
||||
|
||||
cancel(reason) {
|
||||
if (!this._isPending || this._isCanceled) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this._cancelHandlers.length > 0) {
|
||||
try {
|
||||
for (const handler of this._cancelHandlers) {
|
||||
handler();
|
||||
}
|
||||
} catch (error) {
|
||||
this._reject(error);
|
||||
}
|
||||
}
|
||||
|
||||
this._isCanceled = true;
|
||||
if (this._rejectOnCancel) {
|
||||
this._reject(new CancelError(reason));
|
||||
}
|
||||
}
|
||||
|
||||
get isCanceled() {
|
||||
return this._isCanceled;
|
||||
}
|
||||
}
|
||||
|
||||
Object.setPrototypeOf(PCancelable.prototype, Promise.prototype);
|
||||
|
||||
module.exports = PCancelable;
|
||||
module.exports.default = PCancelable;
|
||||
|
||||
module.exports.CancelError = CancelError;
|
||||
@@ -0,0 +1 @@
|
||||
module.exports={A:{A:{"2":"J E F G A B BC"},B:{"1":"P Q R S T U V W X Y Z a b c d f g h i j k l m n o p q r s D t","2":"C K L H M N O"},C:{"2":"0 1 2 3 4 5 6 7 8 9 CC tB I u J E F G A B C K L H M N O v w x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB e lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d f g h i j k l m n o p q r s D t xB yB DC EC"},D:{"1":"fB gB hB iB jB kB e lB mB nB oB pB P Q R S T U V W X Y Z a b c d f g h i j k l m n o p q r s D t xB yB FC","2":"0 1 2 3 4 5 6 7 8 9 I u J E F G A B C K L H M N O v w x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB","194":"YB uB ZB vB aB bB cB dB eB"},E:{"2":"I u J E F G A B C K L H GC zB HC IC JC KC 0B qB rB 1B LC MC 2B 3B 4B 5B sB 6B 7B 8B NC"},F:{"1":"UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB e lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d","2":"0 1 2 3 4 5 6 7 8 9 G B C H M N O v w x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB OC PC QC RC qB 9B SC rB"},G:{"2":"F zB TC AC UC VC WC XC YC ZC aC bC cC dC eC fC gC hC iC jC kC lC mC 2B 3B 4B 5B sB 6B 7B 8B"},H:{"2":"nC"},I:{"1":"D","2":"tB I oC pC qC rC AC sC tC"},J:{"2":"E A"},K:{"1":"e","2":"A B C qB 9B rB"},L:{"1":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"1":"uC"},P:{"2":"I vC wC xC yC zC 0B 0C 1C 2C 3C 4C sB 5C 6C 7C"},Q:{"1":"1B"},R:{"1":"8C"},S:{"2":"9C"}},B:4,C:"Accelerometer"};
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1 @@
|
||||
module.exports={A:{A:{"1":"G A B","2":"J E F BC"},B:{"1":"C K L H M N O P Q R S T U V W X Y Z a b c d f g h i j k l m n o p q r s D t"},C:{"2":"CC tB I u J E F G A B C K L H M N O v w x DC EC","132":"0 1 2 3 4 5 6 7 8 9 y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB e lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d f g h i j k l m n o p q r s D t xB yB"},D:{"1":"0 1 2 3 4 5 6 7 8 9 C K L H M N O v w x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB e lB mB nB oB pB P Q R S T U V W X Y Z a b c d f g h i j k l m n o p q r s D t xB yB FC","2":"I u J E F G","16":"A B"},E:{"1":"I u J E F G A B C K L H HC IC JC KC 0B qB rB 1B LC MC 2B 3B 4B 5B sB 6B 7B 8B NC","2":"GC zB"},F:{"1":"0 1 2 3 4 5 6 7 8 9 H M N O v w x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB e lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d","2":"G B C OC PC QC RC qB 9B SC rB"},G:{"1":"F TC AC UC VC WC XC YC ZC aC bC cC dC eC fC gC hC iC jC kC lC mC 2B 3B 4B 5B sB 6B 7B 8B","16":"zB"},H:{"2":"nC"},I:{"1":"tB I D rC AC sC tC","2":"oC pC qC"},J:{"1":"A","2":"E"},K:{"1":"e","2":"A B C qB 9B rB"},L:{"1":"D"},M:{"132":"D"},N:{"1":"A","2":"B"},O:{"1":"uC"},P:{"1":"I vC wC xC yC zC 0B 0C 1C 2C 3C 4C sB 5C 6C 7C"},Q:{"1":"1B"},R:{"1":"8C"},S:{"132":"9C"}},B:6,C:"AAC audio file format"};
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"empty.js","sources":["../../src/internal/observable/empty.ts"],"names":[],"mappings":";;AAAA,4CAA2C;AAO9B,QAAA,KAAK,GAAG,IAAI,uBAAU,CAAQ,UAAA,UAAU,IAAI,OAAA,UAAU,CAAC,QAAQ,EAAE,EAArB,CAAqB,CAAC,CAAC;AAsDhF,SAAgB,KAAK,CAAC,SAAyB;IAC7C,OAAO,SAAS,CAAC,CAAC,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,aAAK,CAAC;AACvD,CAAC;AAFD,sBAEC;AAED,SAAS,cAAc,CAAC,SAAwB;IAC9C,OAAO,IAAI,uBAAU,CAAQ,UAAA,UAAU,IAAI,OAAA,SAAS,CAAC,QAAQ,CAAC,cAAM,OAAA,UAAU,CAAC,QAAQ,EAAE,EAArB,CAAqB,CAAC,EAA/C,CAA+C,CAAC,CAAC;AAC9F,CAAC"}
|
||||
@@ -0,0 +1,4 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
require("rxjs-compat/add/observable/from");
|
||||
//# sourceMappingURL=from.js.map
|
||||
@@ -0,0 +1,12 @@
|
||||
var SubscriptionLog = /*@__PURE__*/ (function () {
|
||||
function SubscriptionLog(subscribedFrame, unsubscribedFrame) {
|
||||
if (unsubscribedFrame === void 0) {
|
||||
unsubscribedFrame = Number.POSITIVE_INFINITY;
|
||||
}
|
||||
this.subscribedFrame = subscribedFrame;
|
||||
this.unsubscribedFrame = unsubscribedFrame;
|
||||
}
|
||||
return SubscriptionLog;
|
||||
}());
|
||||
export { SubscriptionLog };
|
||||
//# sourceMappingURL=SubscriptionLog.js.map
|
||||
@@ -0,0 +1,6 @@
|
||||
import assertString from './util/assertString';
|
||||
var charsetRegex = /^[^\s-_](?!.*?[-_]{2,})([a-z0-9-\\]{1,})[^\s]*[^-_\s]$/;
|
||||
export default function isSlug(str) {
|
||||
assertString(str);
|
||||
return charsetRegex.test(str);
|
||||
}
|
||||
@@ -0,0 +1,156 @@
|
||||
import { Action } from './Action';
|
||||
import { SchedulerAction } from '../types';
|
||||
import { Subscription } from '../Subscription';
|
||||
import { AsyncScheduler } from './AsyncScheduler';
|
||||
|
||||
/**
|
||||
* We need this JSDoc comment for affecting ESDoc.
|
||||
* @ignore
|
||||
* @extends {Ignored}
|
||||
*/
|
||||
export class AsyncAction<T> extends Action<T> {
|
||||
|
||||
public id: any;
|
||||
public state: T;
|
||||
public delay: number;
|
||||
protected pending: boolean = false;
|
||||
|
||||
constructor(protected scheduler: AsyncScheduler,
|
||||
protected work: (this: SchedulerAction<T>, state?: T) => void) {
|
||||
super(scheduler, work);
|
||||
}
|
||||
|
||||
public schedule(state?: T, delay: number = 0): Subscription {
|
||||
|
||||
if (this.closed) {
|
||||
return this;
|
||||
}
|
||||
|
||||
// Always replace the current state with the new state.
|
||||
this.state = state;
|
||||
|
||||
const id = this.id;
|
||||
const scheduler = this.scheduler;
|
||||
|
||||
//
|
||||
// Important implementation note:
|
||||
//
|
||||
// Actions only execute once by default, unless rescheduled from within the
|
||||
// scheduled callback. This allows us to implement single and repeat
|
||||
// actions via the same code path, without adding API surface area, as well
|
||||
// as mimic traditional recursion but across asynchronous boundaries.
|
||||
//
|
||||
// However, JS runtimes and timers distinguish between intervals achieved by
|
||||
// serial `setTimeout` calls vs. a single `setInterval` call. An interval of
|
||||
// serial `setTimeout` calls can be individually delayed, which delays
|
||||
// scheduling the next `setTimeout`, and so on. `setInterval` attempts to
|
||||
// guarantee the interval callback will be invoked more precisely to the
|
||||
// interval period, regardless of load.
|
||||
//
|
||||
// Therefore, we use `setInterval` to schedule single and repeat actions.
|
||||
// If the action reschedules itself with the same delay, the interval is not
|
||||
// canceled. If the action doesn't reschedule, or reschedules with a
|
||||
// different delay, the interval will be canceled after scheduled callback
|
||||
// execution.
|
||||
//
|
||||
if (id != null) {
|
||||
this.id = this.recycleAsyncId(scheduler, id, delay);
|
||||
}
|
||||
|
||||
// Set the pending flag indicating that this action has been scheduled, or
|
||||
// has recursively rescheduled itself.
|
||||
this.pending = true;
|
||||
|
||||
this.delay = delay;
|
||||
// If this action has already an async Id, don't request a new one.
|
||||
this.id = this.id || this.requestAsyncId(scheduler, this.id, delay);
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
protected requestAsyncId(scheduler: AsyncScheduler, id?: any, delay: number = 0): any {
|
||||
return setInterval(scheduler.flush.bind(scheduler, this), delay);
|
||||
}
|
||||
|
||||
protected recycleAsyncId(scheduler: AsyncScheduler, id: any, delay: number = 0): any {
|
||||
// If this action is rescheduled with the same delay time, don't clear the interval id.
|
||||
if (delay !== null && this.delay === delay && this.pending === false) {
|
||||
return id;
|
||||
}
|
||||
// Otherwise, if the action's delay time is different from the current delay,
|
||||
// or the action has been rescheduled before it's executed, clear the interval id
|
||||
clearInterval(id);
|
||||
return undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Immediately executes this action and the `work` it contains.
|
||||
* @return {any}
|
||||
*/
|
||||
public execute(state: T, delay: number): any {
|
||||
|
||||
if (this.closed) {
|
||||
return new Error('executing a cancelled action');
|
||||
}
|
||||
|
||||
this.pending = false;
|
||||
const error = this._execute(state, delay);
|
||||
if (error) {
|
||||
return error;
|
||||
} else if (this.pending === false && this.id != null) {
|
||||
// Dequeue if the action didn't reschedule itself. Don't call
|
||||
// unsubscribe(), because the action could reschedule later.
|
||||
// For example:
|
||||
// ```
|
||||
// scheduler.schedule(function doWork(counter) {
|
||||
// /* ... I'm a busy worker bee ... */
|
||||
// var originalAction = this;
|
||||
// /* wait 100ms before rescheduling the action */
|
||||
// setTimeout(function () {
|
||||
// originalAction.schedule(counter + 1);
|
||||
// }, 100);
|
||||
// }, 1000);
|
||||
// ```
|
||||
this.id = this.recycleAsyncId(this.scheduler, this.id, null);
|
||||
}
|
||||
}
|
||||
|
||||
protected _execute(state: T, delay: number): any {
|
||||
let errored: boolean = false;
|
||||
let errorValue: any = undefined;
|
||||
try {
|
||||
this.work(state);
|
||||
} catch (e) {
|
||||
errored = true;
|
||||
errorValue = !!e && e || new Error(e);
|
||||
}
|
||||
if (errored) {
|
||||
this.unsubscribe();
|
||||
return errorValue;
|
||||
}
|
||||
}
|
||||
|
||||
/** @deprecated This is an internal implementation detail, do not use. */
|
||||
_unsubscribe() {
|
||||
|
||||
const id = this.id;
|
||||
const scheduler = this.scheduler;
|
||||
const actions = scheduler.actions;
|
||||
const index = actions.indexOf(this);
|
||||
|
||||
this.work = null;
|
||||
this.state = null;
|
||||
this.pending = false;
|
||||
this.scheduler = null;
|
||||
|
||||
if (index !== -1) {
|
||||
actions.splice(index, 1);
|
||||
}
|
||||
|
||||
if (id != null) {
|
||||
this.id = this.recycleAsyncId(scheduler, id, null);
|
||||
}
|
||||
|
||||
this.delay = null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
"use strict";
|
||||
function __export(m) {
|
||||
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
|
||||
}
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
__export(require("rxjs-compat/operator/switch"));
|
||||
//# sourceMappingURL=switch.js.map
|
||||
@@ -0,0 +1,7 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
function identity(x) {
|
||||
return x;
|
||||
}
|
||||
exports.identity = identity;
|
||||
//# sourceMappingURL=identity.js.map
|
||||
@@ -0,0 +1,7 @@
|
||||
"use strict";
|
||||
function __export(m) {
|
||||
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
|
||||
}
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
__export(require("rxjs-compat/operators/publishBehavior"));
|
||||
//# sourceMappingURL=publishBehavior.js.map
|
||||
@@ -0,0 +1 @@
|
||||
import 'rxjs-compat/add/operator/reduce';
|
||||
Reference in New Issue
Block a user