new license file version [CI SKIP]

This commit is contained in:
2023-03-15 12:34:41 +00:00
parent 0a6d92a1f3
commit 61328d20ed
13115 changed files with 1892314 additions and 1 deletions

View File

@@ -0,0 +1 @@
{"version":3,"file":"data.js","sourceRoot":"","sources":["../src/data.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,kDAAgC;AAChC,mCAAkC;AAClC,mCAAoC;AAEpC,4EAAiD;AAEjD,gEAA6C;AAE7C,MAAM,KAAK,GAAG,eAAW,CAAC,cAAc,CAAC,CAAC;AAE1C,MAAM,YAAa,SAAQ,iBAAQ;IAGlC,YAAY,IAAY,EAAE,GAAW;QACpC,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAChB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IAClB,CAAC;CACD;AAMD;;GAEG;AACH,SAA8B,GAAG,CAChC,EAAE,IAAI,EAAE,GAAG,EAAsB,EACjC,EAAE,KAAK,EAAe;;QAEtB,wEAAwE;QACxE,+DAA+D;QAC/D,MAAM,MAAM,GAAG,mBAAU,CAAC,MAAM,CAAC,CAAC;QAClC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QACnB,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAClC,KAAK,CAAC,yCAAyC,EAAE,IAAI,CAAC,CAAC;QAEvD,4EAA4E;QAC5E,IAAI,KAAK,IAAI,KAAK,CAAC,IAAI,KAAK,IAAI,EAAE;YACjC,KAAK,CAAC,kCAAkC,EAAE,IAAI,CAAC,CAAC;YAChD,MAAM,IAAI,qBAAgB,EAAE,CAAC;SAC7B;aAAM;YACN,KAAK,CAAC,kDAAkD,CAAC,CAAC;YAC1D,MAAM,GAAG,GAAG,4BAAe,CAAC,GAAG,CAAC,CAAC;YACjC,OAAO,IAAI,YAAY,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;SACnC;IACF,CAAC;CAAA;AApBD,sBAoBC"}

View File

@@ -0,0 +1,27 @@
# Finite Number
Finite _number_ primitive
## `finite/coerce`
Follows [`number/coerce`](number.md#numbercoerce) additionally rejecting `Infinity` and `-Infinity` values (`null` is returned if given values coerces to them)
```javascript
const coerceToFinite = require("type/finite/coerce");
coerceToFinite("12"); // 12
coerceToFinite(Infinity); // null
coerceToFinite(null); // null
```
## `finite/ensure`
If given argument is a finite number coercible value (via [`finite/coerce`](#finitecoerce)) returns result number.
Otherwise `TypeError` is thrown.
```javascript
const ensureFinite = require("type/finite/ensure");
ensureFinite(12); // "12"
ensureFinite(null); // Thrown TypeError: null is not a finite number
```

View File

@@ -0,0 +1 @@
{"version":3,"file":"takeLast.js","sourceRoot":"","sources":["../../../../src/internal/operators/takeLast.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,6CAA4C;AAE5C,qCAAuC;AACvC,2DAAgE;AAyChE,SAAgB,QAAQ,CAAI,KAAa;IACvC,OAAO,KAAK,IAAI,CAAC;QACf,CAAC,CAAC,cAAM,OAAA,aAAK,EAAL,CAAK;QACb,CAAC,CAAC,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;YAKzB,IAAI,MAAM,GAAQ,EAAE,CAAC;YACrB,MAAM,CAAC,SAAS,CACd,6CAAwB,CACtB,UAAU,EACV,UAAC,KAAK;gBAEJ,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBAGnB,KAAK,GAAG,MAAM,CAAC,MAAM,IAAI,MAAM,CAAC,KAAK,EAAE,CAAC;YAC1C,CAAC,EACD;;;oBAGE,KAAoB,IAAA,WAAA,SAAA,MAAM,CAAA,8BAAA,kDAAE;wBAAvB,IAAM,KAAK,mBAAA;wBACd,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;qBACxB;;;;;;;;;gBACD,UAAU,CAAC,QAAQ,EAAE,CAAC;YACxB,CAAC,EAED,SAAS,EACT;gBAEE,MAAM,GAAG,IAAK,CAAC;YACjB,CAAC,CACF,CACF,CAAC;QACJ,CAAC,CAAC,CAAC;AACT,CAAC;AApCD,4BAoCC"}

View File

@@ -0,0 +1,6 @@
import assertString from './util/assertString';
var charsetRegex = /^[^\s-_](?!.*?[-_]{2,})[a-z0-9-\\][^\s]*[^-_\s]$/;
export default function isSlug(str) {
assertString(str);
return charsetRegex.test(str);
}

View File

@@ -0,0 +1,8 @@
import Settings from '../../settings';
import { ErrorFilterFunction } from '../../types';
export default class ErrorFilter {
private readonly _settings;
constructor(_settings: Settings);
getFilter(): ErrorFilterFunction;
private _isNonFatalError;
}

View File

@@ -0,0 +1,142 @@
'use strict'
let { SourceMapConsumer, SourceMapGenerator } = require('source-map-js')
let { existsSync, readFileSync } = require('fs')
let { dirname, join } = require('path')
function fromBase64(str) {
if (Buffer) {
return Buffer.from(str, 'base64').toString()
} else {
/* c8 ignore next 2 */
return window.atob(str)
}
}
class PreviousMap {
constructor(css, opts) {
if (opts.map === false) return
this.loadAnnotation(css)
this.inline = this.startWith(this.annotation, 'data:')
let prev = opts.map ? opts.map.prev : undefined
let text = this.loadMap(opts.from, prev)
if (!this.mapFile && opts.from) {
this.mapFile = opts.from
}
if (this.mapFile) this.root = dirname(this.mapFile)
if (text) this.text = text
}
consumer() {
if (!this.consumerCache) {
this.consumerCache = new SourceMapConsumer(this.text)
}
return this.consumerCache
}
withContent() {
return !!(
this.consumer().sourcesContent &&
this.consumer().sourcesContent.length > 0
)
}
startWith(string, start) {
if (!string) return false
return string.substr(0, start.length) === start
}
getAnnotationURL(sourceMapString) {
return sourceMapString.replace(/^\/\*\s*# sourceMappingURL=/, '').trim()
}
loadAnnotation(css) {
let comments = css.match(/\/\*\s*# sourceMappingURL=/gm)
if (!comments) return
// sourceMappingURLs from comments, strings, etc.
let start = css.lastIndexOf(comments.pop())
let end = css.indexOf('*/', start)
if (start > -1 && end > -1) {
// Locate the last sourceMappingURL to avoid pickin
this.annotation = this.getAnnotationURL(css.substring(start, end))
}
}
decodeInline(text) {
let baseCharsetUri = /^data:application\/json;charset=utf-?8;base64,/
let baseUri = /^data:application\/json;base64,/
let charsetUri = /^data:application\/json;charset=utf-?8,/
let uri = /^data:application\/json,/
if (charsetUri.test(text) || uri.test(text)) {
return decodeURIComponent(text.substr(RegExp.lastMatch.length))
}
if (baseCharsetUri.test(text) || baseUri.test(text)) {
return fromBase64(text.substr(RegExp.lastMatch.length))
}
let encoding = text.match(/data:application\/json;([^,]+),/)[1]
throw new Error('Unsupported source map encoding ' + encoding)
}
loadFile(path) {
this.root = dirname(path)
if (existsSync(path)) {
this.mapFile = path
return readFileSync(path, 'utf-8').toString().trim()
}
}
loadMap(file, prev) {
if (prev === false) return false
if (prev) {
if (typeof prev === 'string') {
return prev
} else if (typeof prev === 'function') {
let prevPath = prev(file)
if (prevPath) {
let map = this.loadFile(prevPath)
if (!map) {
throw new Error(
'Unable to load previous source map: ' + prevPath.toString()
)
}
return map
}
} else if (prev instanceof SourceMapConsumer) {
return SourceMapGenerator.fromSourceMap(prev).toString()
} else if (prev instanceof SourceMapGenerator) {
return prev.toString()
} else if (this.isMap(prev)) {
return JSON.stringify(prev)
} else {
throw new Error(
'Unsupported previous source map format: ' + prev.toString()
)
}
} else if (this.inline) {
return this.decodeInline(this.annotation)
} else if (this.annotation) {
let map = this.annotation
if (file) map = join(dirname(file), map)
return this.loadFile(map)
}
}
isMap(map) {
if (typeof map !== 'object') return false
return (
typeof map.mappings === 'string' ||
typeof map._mappings === 'string' ||
Array.isArray(map.sections)
)
}
}
module.exports = PreviousMap
PreviousMap.default = PreviousMap

View File

@@ -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.00712,"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.00712,"39":0,"40":0,"41":0,"42":0,"43":0.00712,"44":0.02492,"45":0.00712,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0.00356,"53":0.00356,"54":0,"55":0,"56":0.00356,"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.01068,"79":0.00356,"80":0.00356,"81":0,"82":0,"83":0,"84":0.00356,"85":0,"86":0,"87":0.02136,"88":0.00356,"89":0,"90":0,"91":0,"92":0,"93":0.00356,"94":0,"95":0.00712,"96":0,"97":0,"98":0,"99":0,"100":0,"101":0.00356,"102":0.01068,"103":0.00356,"104":0,"105":0.00356,"106":0.00712,"107":0.01068,"108":0.0178,"109":0.4094,"110":0.25276,"111":0,"112":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.00356,"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.00356,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0.00712,"48":0.06764,"49":0.02492,"50":0,"51":0,"52":0,"53":0.00356,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0.00356,"66":0,"67":0,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0.02136,"75":0,"76":0.00356,"77":0,"78":0,"79":0.02136,"80":0.00356,"81":0.0534,"83":0.00712,"84":0.01068,"85":0.00712,"86":0.00712,"87":0.0178,"88":0.00356,"89":0.01068,"90":0.00356,"91":0.00356,"92":0.00712,"93":0.00712,"94":0.00712,"95":0.00356,"96":0.1602,"97":0.00712,"98":0.00356,"99":0.00356,"100":0.01424,"101":0.0356,"102":0.01068,"103":0.06408,"104":0.01424,"105":0.03204,"106":0.26344,"107":0.089,"108":0.32752,"109":3.77004,"110":2.5098,"111":0.00356,"112":0.00356,"113":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.00356,"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,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0.00712,"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.0178,"94":0.16376,"95":0.07832,"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.00356,"13":0.00356,"14":0,"15":0,"16":0,"17":0,"18":0.00356,"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.00356,"101":0,"102":0,"103":0.00356,"104":0,"105":0.00356,"106":0.00356,"107":0.04628,"108":0.03204,"109":0.59808,"110":0.77964},E:{"4":0,"5":0,"6":0,"7":0,"8":0.00356,"9":0.01068,"10":0,"11":0,"12":0,"13":0.00712,"14":0.06052,"15":0.00712,_:"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.01068,"13.1":0.0534,"14.1":0.1246,"15.1":0.02136,"15.2-15.3":0.02492,"15.4":0.03916,"15.5":0.09256,"15.6":0.49128,"16.0":0.0356,"16.1":0.09256,"16.2":0.32752,"16.3":0.21716,"16.4":0},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0,"5.0-5.1":0,"6.0-6.1":0,"7.0-7.1":0.0199,"8.1-8.4":0.02388,"9.0-9.2":0.00398,"9.3":0.1353,"10.0-10.2":0,"10.3":0.16714,"11.0-11.2":0.00398,"11.3-11.4":0.12734,"12.0-12.1":0.01592,"12.2-12.5":0.88741,"13.0-13.1":0.01194,"13.2":0.00796,"13.3":0.03979,"13.4-13.7":0.1154,"14.0-14.4":0.44967,"14.5-14.8":1.31718,"15.0-15.1":0.30244,"15.2-15.3":0.45365,"15.4":0.42182,"15.5":1.09832,"15.6":4.39725,"16.0":3.97543,"16.1":10.58921,"16.2":9.31579,"16.3":3.89982,"16.4":0.01194},P:{"4":0.05214,"20":1.43898,"5.0-5.4":0,"6.2-6.4":0,"7.2-7.4":0.03128,"8.2":0,"9.2":0,"10.1":0,"11.1-11.2":0.03128,"12.0":0.01043,"13.0":0.03128,"14.0":0.04171,"15.0":0.02085,"16.0":0.06256,"17.0":0.04171,"18.0":0.10427,"19.0":2.37745},I:{"0":0,"3":0,"4":0.02984,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0.04974,"4.4":0,"4.4.3-4.4.4":0.13926},K:{_:"0 10 11 12 11.1 11.5 12.1"},A:{"6":0,"7":0,"8":0,"9":0.09256,"10":0,"11":0.03204,"5.5":0},N:{"10":0,"11":0},S:{"2.5":0,_:"3.0-3.1"},J:{"7":0,"10":0.00644},O:{"0":0.02576},H:{"0":0.18901},L:{"0":43.10056},R:{_:"0"},M:{"0":0.48944},Q:{"13.1":0}};

View File

@@ -0,0 +1,21 @@
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $EvalError = GetIntrinsic('%EvalError%');
var DaysInYear = require('./DaysInYear');
var YearFromTime = require('./YearFromTime');
// https://262.ecma-international.org/5.1/#sec-15.9.1.3
module.exports = function InLeapYear(t) {
var days = DaysInYear(YearFromTime(t));
if (days === 365) {
return 0;
}
if (days === 366) {
return 1;
}
throw new $EvalError('Assertion failed: there are not 365 or 366 days in a year, got: ' + days);
};

View File

@@ -0,0 +1,16 @@
sudo: false # http://docs.travis-ci.com/user/workers/container-based-infrastructure/
language: node_js
node_js:
- 0.12
- 4
- 6
- 7
before_install:
- mkdir node_modules; ln -s ../ node_modules/event-emitter
notifications:
email:
- medikoo+event-emitter@medikoo.com
script: "npm test && npm run lint"

View File

@@ -0,0 +1,4 @@
import { AuthInterface } from "./AuthInterface";
export interface StrategyInterface<StrategyOptions extends any[], AuthOptions extends any[], Authentication extends object> {
(...args: StrategyOptions): AuthInterface<AuthOptions, Authentication>;
}

View File

@@ -0,0 +1,41 @@
var isSymbol = require('./isSymbol');
/**
* Compares values to sort them in ascending order.
*
* @private
* @param {*} value The value to compare.
* @param {*} other The other value to compare.
* @returns {number} Returns the sort order indicator for `value`.
*/
function compareAscending(value, other) {
if (value !== other) {
var valIsDefined = value !== undefined,
valIsNull = value === null,
valIsReflexive = value === value,
valIsSymbol = isSymbol(value);
var othIsDefined = other !== undefined,
othIsNull = other === null,
othIsReflexive = other === other,
othIsSymbol = isSymbol(other);
if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||
(valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||
(valIsNull && othIsDefined && othIsReflexive) ||
(!valIsDefined && othIsReflexive) ||
!valIsReflexive) {
return 1;
}
if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||
(othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||
(othIsNull && valIsDefined && valIsReflexive) ||
(!othIsDefined && valIsReflexive) ||
!othIsReflexive) {
return -1;
}
}
return 0;
}
module.exports = compareAscending;

View File

@@ -0,0 +1,56 @@
const fs = require('fs');
const path = require('path');
const { compile } = require('./compiler.js');
const extensions = ['.svelte', '.html'];
let compileOptions = {};
function capitalise(name) {
return name[0].toUpperCase() + name.slice(1);
}
function register(options = {}) {
if (options.extensions) {
extensions.forEach(deregisterExtension);
options.extensions.forEach(registerExtension);
}
compileOptions = Object.assign({}, options);
delete compileOptions.extensions;
}
function deregisterExtension(extension) {
delete require.extensions[extension];
}
function registerExtension(extension) {
require.extensions[extension] = function(module, filename) {
const name = path.parse(filename).name
.replace(/^\d/, '_$&')
.replace(/[^a-zA-Z0-9_$]/g, '');
const options = Object.assign({}, compileOptions, {
filename,
name: capitalise(name),
generate: 'ssr',
format: 'cjs'
});
const { js, warnings } = compile(fs.readFileSync(filename, 'utf-8'), options);
if (options.dev) {
warnings.forEach(warning => {
console.warn(`\nSvelte Warning in ${warning.filename}:`);
console.warn(warning.message);
console.warn(warning.frame);
})
}
return module._compile(js.code, filename);
};
}
registerExtension('.svelte');
registerExtension('.html');
module.exports = register;

View File

@@ -0,0 +1 @@
{"name":"before-after-hook","version":"2.2.3","files":{"LICENSE":{"checkedAt":1678883670463,"integrity":"sha512-rUDGBk4RqSUdFEeOVrthZIsFQaVxZwJ5B+SARKYeOI+A0OMBEsq9xC5f144uzwe2TUmDj9cW+6D6/qnQYNUfGw==","mode":420,"size":11369},"lib/add.js":{"checkedAt":1678883670463,"integrity":"sha512-NKM4ws50PxN6XUXXqBmU4d6JsmJ5NEYnxNq3EzwW2NJX5Gg/ysxZyRYxLcVrfXun3jegvOm2RMk8m70tF7+7Vg==","mode":420,"size":1004},"index.js":{"checkedAt":1678883670463,"integrity":"sha512-381SxB/H/bNX2nr8QNAMV1L1PhLxhtbcO/gos91Y+r8GOqhGT3ES+SWkSa2w+C/GYDcWTLEF2UggiEXnocWjZA==","mode":420,"size":1756},"lib/register.js":{"checkedAt":1678883670465,"integrity":"sha512-gf8BAgLLdvt7H51ktVkFUIwgwP6G1g1VtgYQUlP7YBdDmkIETkM1+H1oSbLXCE4ZU1z/sc7d9XK7NsCyvSYEKA==","mode":420,"size":678},"lib/remove.js":{"checkedAt":1678883670465,"integrity":"sha512-KgF43fIMPCVVUaO27RJQmfOjOGOBJHNULoeFB/Kz9WTuOy75I3H1EtU0q//GddKKsYvE3dGXHHYS+1f4D25rMg==","mode":420,"size":331},"package.json":{"checkedAt":1678883670465,"integrity":"sha512-0Jqo4qLnF9u3lExXXP0tsHYaK7rugjWYtq0auWguhaFOALPyyn6/7AExAjCbJrPb6qGQBsBhQXkMQXhZnCEX6Q==","mode":420,"size":2081},"README.md":{"checkedAt":1678883670467,"integrity":"sha512-SdKPwjGfqNSOBZuGlcaD4a2R1P/LozMeAHFKRMxseHFi309OTF+7JFKRfOhy7YmDZtlIPCQsvgs0TInuAizf8g==","mode":420,"size":15208},"index.d.ts":{"checkedAt":1678883670467,"integrity":"sha512-8MkaLVwA3c5EkYZM2ZWoO3N4OkAciCOFtbO+2yvLVmVuJPgHTl3tRf21/37/tahLQiN8x7mVEk3qeZ2iqxkdSA==","mode":420,"size":4534}}}

View File

@@ -0,0 +1,9 @@
{
"root": true,
"extends": "@ljharb",
"rules": {
"no-magic-numbers": 0
}
}

View File

@@ -0,0 +1,148 @@
# es6-iterator
## ECMAScript 6 Iterator interface
### Installation
$ npm install es6-iterator
To port it to Browser or any other (non CJS) environment, use your favorite CJS bundler. No favorite yet? Try: [Browserify](http://browserify.org/), [Webmake](https://github.com/medikoo/modules-webmake) or [Webpack](http://webpack.github.io/)
## API
### Constructors
#### Iterator(list) _(es6-iterator)_
Abstract Iterator interface. Meant for extensions and not to be used on its own.
Accepts any _list_ object (technically object with numeric _length_ property).
_Mind it doesn't iterate strings properly, for that use dedicated [StringIterator](#string-iterator)_
```javascript
var Iterator = require('es6-iterator')
var iterator = new Iterator([1, 2, 3]);
iterator.next(); // { value: 1, done: false }
iterator.next(); // { value: 2, done: false }
iterator.next(); // { value: 3, done: false }
iterator.next(); // { value: undefined, done: true }
```
#### ArrayIterator(arrayLike[, kind]) _(es6-iterator/array)_
Dedicated for arrays and array-likes. Supports three iteration kinds:
* __value__ _(default)_ - Iterates values
* __key__ - Iterates indexes
* __key+value__ - Iterates keys and indexes, each iteration value is in _[key, value]_ form.
```javascript
var ArrayIterator = require('es6-iterator/array')
var iterator = new ArrayIterator([1, 2, 3], 'key+value');
iterator.next(); // { value: [0, 1], done: false }
iterator.next(); // { value: [1, 2], done: false }
iterator.next(); // { value: [2, 3], done: false }
iterator.next(); // { value: undefined, done: true }
```
May also be used for _arguments_ objects:
```javascript
(function () {
var iterator = new ArrayIterator(arguments);
iterator.next(); // { value: 1, done: false }
iterator.next(); // { value: 2, done: false }
iterator.next(); // { value: 3, done: false }
iterator.next(); // { value: undefined, done: true }
}(1, 2, 3));
```
#### StringIterator(str) _(es6-iterator/string)_
Assures proper iteration over unicode symbols.
See: http://mathiasbynens.be/notes/javascript-unicode
```javascript
var StringIterator = require('es6-iterator/string');
var iterator = new StringIterator('f🙈o🙉o🙊');
iterator.next(); // { value: 'f', done: false }
iterator.next(); // { value: '🙈', done: false }
iterator.next(); // { value: 'o', done: false }
iterator.next(); // { value: '🙉', done: false }
iterator.next(); // { value: 'o', done: false }
iterator.next(); // { value: '🙊', done: false }
iterator.next(); // { value: undefined, done: true }
```
### Function utilities
#### forOf(iterable, callback[, thisArg]) _(es6-iterator/for-of)_
Polyfill for ECMAScript 6 [`for...of`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...of) statement.
```
var forOf = require('es6-iterator/for-of');
var result = [];
forOf('🙈🙉🙊', function (monkey) { result.push(monkey); });
console.log(result); // ['🙈', '🙉', '🙊'];
```
Optionally you can break iteration at any point:
```javascript
var result = [];
forOf([1,2,3,4]', function (val, doBreak) {
result.push(monkey);
if (val >= 3) doBreak();
});
console.log(result); // [1, 2, 3];
```
#### get(obj) _(es6-iterator/get)_
Return iterator for any iterable object.
```javascript
var getIterator = require('es6-iterator/get');
var iterator = get([1,2,3]);
iterator.next(); // { value: 1, done: false }
iterator.next(); // { value: 2, done: false }
iterator.next(); // { value: 3, done: false }
iterator.next(); // { value: undefined, done: true }
```
#### isIterable(obj) _(es6-iterator/is-iterable)_
Whether _obj_ is iterable
```javascript
var isIterable = require('es6-iterator/is-iterable');
isIterable(null); // false
isIterable(true); // false
isIterable('str'); // true
isIterable(['a', 'r', 'r']); // true
isIterable(new ArrayIterator([])); // true
```
#### validIterable(obj) _(es6-iterator/valid-iterable)_
If _obj_ is an iterable it is returned. Otherwise _TypeError_ is thrown.
### Method extensions
#### iterator.chain(iterator1[, …iteratorn]) _(es6-iterator/#/chain)_
Chain multiple iterators into one.
### Tests [![Build Status](https://travis-ci.org/medikoo/es6-iterator.png)](https://travis-ci.org/medikoo/es6-iterator)
$ npm test

View File

@@ -0,0 +1,128 @@
'use strict';
const TEMPLATE_REGEX = /(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi;
const STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g;
const STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/;
const ESCAPE_REGEX = /\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi;
const ESCAPES = new Map([
['n', '\n'],
['r', '\r'],
['t', '\t'],
['b', '\b'],
['f', '\f'],
['v', '\v'],
['0', '\0'],
['\\', '\\'],
['e', '\u001B'],
['a', '\u0007']
]);
function unescape(c) {
if ((c[0] === 'u' && c.length === 5) || (c[0] === 'x' && c.length === 3)) {
return String.fromCharCode(parseInt(c.slice(1), 16));
}
return ESCAPES.get(c) || c;
}
function parseArguments(name, args) {
const results = [];
const chunks = args.trim().split(/\s*,\s*/g);
let matches;
for (const chunk of chunks) {
if (!isNaN(chunk)) {
results.push(Number(chunk));
} else if ((matches = chunk.match(STRING_REGEX))) {
results.push(matches[2].replace(ESCAPE_REGEX, (m, escape, chr) => escape ? unescape(escape) : chr));
} else {
throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`);
}
}
return results;
}
function parseStyle(style) {
STYLE_REGEX.lastIndex = 0;
const results = [];
let matches;
while ((matches = STYLE_REGEX.exec(style)) !== null) {
const name = matches[1];
if (matches[2]) {
const args = parseArguments(name, matches[2]);
results.push([name].concat(args));
} else {
results.push([name]);
}
}
return results;
}
function buildStyle(chalk, styles) {
const enabled = {};
for (const layer of styles) {
for (const style of layer.styles) {
enabled[style[0]] = layer.inverse ? null : style.slice(1);
}
}
let current = chalk;
for (const styleName of Object.keys(enabled)) {
if (Array.isArray(enabled[styleName])) {
if (!(styleName in current)) {
throw new Error(`Unknown Chalk style: ${styleName}`);
}
if (enabled[styleName].length > 0) {
current = current[styleName].apply(current, enabled[styleName]);
} else {
current = current[styleName];
}
}
}
return current;
}
module.exports = (chalk, tmp) => {
const styles = [];
const chunks = [];
let chunk = [];
// eslint-disable-next-line max-params
tmp.replace(TEMPLATE_REGEX, (m, escapeChar, inverse, style, close, chr) => {
if (escapeChar) {
chunk.push(unescape(escapeChar));
} else if (style) {
const str = chunk.join('');
chunk = [];
chunks.push(styles.length === 0 ? str : buildStyle(chalk, styles)(str));
styles.push({inverse, styles: parseStyle(style)});
} else if (close) {
if (styles.length === 0) {
throw new Error('Found extraneous } in Chalk template literal');
}
chunks.push(buildStyle(chalk, styles)(chunk.join('')));
chunk = [];
styles.pop();
} else {
chunk.push(chr);
}
});
chunks.push(chunk.join(''));
if (styles.length > 0) {
const errMsg = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? '' : 's'} (\`}\`)`;
throw new Error(errMsg);
}
return chunks.join('');
};

View File

@@ -0,0 +1,3 @@
import Renderer, { RenderOptions } from '../Renderer';
import Comment from '../../nodes/Comment';
export default function (node: Comment, renderer: Renderer, options: RenderOptions): void;

View File

@@ -0,0 +1 @@
{"version":3,"file":"every.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/every.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAInD,wBAAgB,KAAK,CAAC,CAAC,EAAE,SAAS,EAAE,kBAAkB,GAAG,gBAAgB,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,EAAE,KAAK,CAAC,SAAS,KAAK,GAAG,KAAK,GAAG,OAAO,CAAC,CAAC;AAChI,gHAAgH;AAChH,wBAAgB,KAAK,CAAC,CAAC,EACrB,SAAS,EAAE,kBAAkB,EAC7B,OAAO,EAAE,GAAG,GACX,gBAAgB,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,EAAE,KAAK,CAAC,SAAS,KAAK,GAAG,KAAK,GAAG,OAAO,CAAC,CAAC;AAC1E,gHAAgH;AAChH,wBAAgB,KAAK,CAAC,CAAC,EAAE,CAAC,EACxB,SAAS,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,OAAO,EAC/E,OAAO,EAAE,CAAC,GACT,gBAAgB,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;AAChC,wBAAgB,KAAK,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,OAAO,GAAG,gBAAgB,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC"}

View File

@@ -0,0 +1,22 @@
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## v1.0.0 - 2022-01-02
### Commits
- Tests [`e2f59ad`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/e2f59ad74e2ae0f5f4899fcde6a6f693ab7cc074)
- Initial commit [`dc222aa`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/dc222aad3c0b940d8d3af1ca9937d108bd2dc4b9)
- [meta] do not publish workflow files [`5ef77f7`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/5ef77f7cb6946d16ee38672be9ec0f1bbdf63262)
- npm init [`992b068`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/992b068503a461f7e8676f40ca2aab255fd8d6ff)
- read me [`6c9afa9`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/6c9afa9fabc8eaf0814aaed6dd01e6df0931b76d)
- Initial implementation [`2f98925`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/2f9892546396d4ab0ad9f1ff83e76c3f01234ae8)
- [meta] add `auto-changelog` [`6c476ae`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/6c476ae1ed7ce68b0480344f090ac2844f35509d)
- [Dev Deps] add `eslint`, `@ljharb/eslint-config` [`d0fffc8`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/d0fffc886d25fba119355520750a909d64da0087)
- Only apps should have lockfiles [`ab318ed`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/ab318ed7ae62f6c2c0e80a50398d40912afd8f69)
- [meta] add `safe-publish-latest` [`2bb23b3`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/2bb23b3ebab02dc4135c4cdf0217db82835b9fca)
- [meta] add `sideEffects` flag [`600223b`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/600223ba24f30779f209d9097721eff35ed62741)

View File

@@ -0,0 +1,72 @@
import { EMPTY } from './observable/empty';
import { of } from './observable/of';
import { throwError } from './observable/throwError';
import { isFunction } from './util/isFunction';
export var NotificationKind;
(function (NotificationKind) {
NotificationKind["NEXT"] = "N";
NotificationKind["ERROR"] = "E";
NotificationKind["COMPLETE"] = "C";
})(NotificationKind || (NotificationKind = {}));
var Notification = (function () {
function Notification(kind, value, error) {
this.kind = kind;
this.value = value;
this.error = error;
this.hasValue = kind === 'N';
}
Notification.prototype.observe = function (observer) {
return observeNotification(this, observer);
};
Notification.prototype.do = function (nextHandler, errorHandler, completeHandler) {
var _a = this, kind = _a.kind, value = _a.value, error = _a.error;
return kind === 'N' ? nextHandler === null || nextHandler === void 0 ? void 0 : nextHandler(value) : kind === 'E' ? errorHandler === null || errorHandler === void 0 ? void 0 : errorHandler(error) : completeHandler === null || completeHandler === void 0 ? void 0 : completeHandler();
};
Notification.prototype.accept = function (nextOrObserver, error, complete) {
var _a;
return isFunction((_a = nextOrObserver) === null || _a === void 0 ? void 0 : _a.next)
? this.observe(nextOrObserver)
: this.do(nextOrObserver, error, complete);
};
Notification.prototype.toObservable = function () {
var _a = this, kind = _a.kind, value = _a.value, error = _a.error;
var result = kind === 'N'
?
of(value)
:
kind === 'E'
?
throwError(function () { return error; })
:
kind === 'C'
?
EMPTY
:
0;
if (!result) {
throw new TypeError("Unexpected notification kind " + kind);
}
return result;
};
Notification.createNext = function (value) {
return new Notification('N', value);
};
Notification.createError = function (err) {
return new Notification('E', undefined, err);
};
Notification.createComplete = function () {
return Notification.completeNotification;
};
Notification.completeNotification = new Notification('C');
return Notification;
}());
export { Notification };
export function observeNotification(notification, observer) {
var _a, _b, _c;
var _d = notification, kind = _d.kind, value = _d.value, error = _d.error;
if (typeof kind !== 'string') {
throw new TypeError('Invalid notification, missing "kind"');
}
kind === 'N' ? (_a = observer.next) === null || _a === void 0 ? void 0 : _a.call(observer, value) : kind === 'E' ? (_b = observer.error) === null || _b === void 0 ? void 0 : _b.call(observer, error) : (_c = observer.complete) === null || _c === void 0 ? void 0 : _c.call(observer);
}
//# sourceMappingURL=Notification.js.map

View File

@@ -0,0 +1,275 @@
import EventEmitter from 'node:events';
import urlLib from 'node:url';
import crypto from 'node:crypto';
import stream, { PassThrough as PassThroughStream } from 'node:stream';
import normalizeUrl from 'normalize-url';
import getStream from 'get-stream';
import CachePolicy from 'http-cache-semantics';
import Response from 'responselike';
import Keyv from 'keyv';
import mimicResponse from 'mimic-response';
import { CacheError, RequestError } from './types.js';
class CacheableRequest {
constructor(cacheRequest, cacheAdapter) {
this.hooks = new Map();
this.request = () => (options, cb) => {
let url;
if (typeof options === 'string') {
url = normalizeUrlObject(urlLib.parse(options));
options = {};
}
else if (options instanceof urlLib.URL) {
url = normalizeUrlObject(urlLib.parse(options.toString()));
options = {};
}
else {
const [pathname, ...searchParts] = (options.path ?? '').split('?');
const search = searchParts.length > 0
? `?${searchParts.join('?')}`
: '';
url = normalizeUrlObject({ ...options, pathname, search });
}
options = {
headers: {},
method: 'GET',
cache: true,
strictTtl: false,
automaticFailover: false,
...options,
...urlObjectToRequestOptions(url),
};
options.headers = Object.fromEntries(entries(options.headers).map(([key, value]) => [key.toLowerCase(), value]));
const ee = new EventEmitter();
const normalizedUrlString = normalizeUrl(urlLib.format(url), {
stripWWW: false,
removeTrailingSlash: false,
stripAuthentication: false,
});
let key = `${options.method}:${normalizedUrlString}`;
// POST, PATCH, and PUT requests may be cached, depending on the response
// cache-control headers. As a result, the body of the request should be
// added to the cache key in order to avoid collisions.
if (options.body && options.method !== undefined && ['POST', 'PATCH', 'PUT'].includes(options.method)) {
if (options.body instanceof stream.Readable) {
// Streamed bodies should completely skip the cache because they may
// or may not be hashable and in either case the stream would need to
// close before the cache key could be generated.
options.cache = false;
}
else {
key += `:${crypto.createHash('md5').update(options.body).digest('hex')}`;
}
}
let revalidate = false;
let madeRequest = false;
const makeRequest = (options_) => {
madeRequest = true;
let requestErrored = false;
let requestErrorCallback = () => { };
const requestErrorPromise = new Promise(resolve => {
requestErrorCallback = () => {
if (!requestErrored) {
requestErrored = true;
resolve();
}
};
});
const handler = async (response) => {
if (revalidate) {
response.status = response.statusCode;
const revalidatedPolicy = CachePolicy.fromObject(revalidate.cachePolicy).revalidatedPolicy(options_, response);
if (!revalidatedPolicy.modified) {
response.resume();
await new Promise(resolve => {
// Skipping 'error' handler cause 'error' event should't be emitted for 304 response
response
.once('end', resolve);
});
const headers = convertHeaders(revalidatedPolicy.policy.responseHeaders());
response = new Response({ statusCode: revalidate.statusCode, headers, body: revalidate.body, url: revalidate.url });
response.cachePolicy = revalidatedPolicy.policy;
response.fromCache = true;
}
}
if (!response.fromCache) {
response.cachePolicy = new CachePolicy(options_, response, options_);
response.fromCache = false;
}
let clonedResponse;
if (options_.cache && response.cachePolicy.storable()) {
clonedResponse = cloneResponse(response);
(async () => {
try {
const bodyPromise = getStream.buffer(response);
await Promise.race([
requestErrorPromise,
new Promise(resolve => response.once('end', resolve)),
new Promise(resolve => response.once('close', resolve)), // eslint-disable-line no-promise-executor-return
]);
const body = await bodyPromise;
let value = {
url: response.url,
statusCode: response.fromCache ? revalidate.statusCode : response.statusCode,
body,
cachePolicy: response.cachePolicy.toObject(),
};
let ttl = options_.strictTtl ? response.cachePolicy.timeToLive() : undefined;
if (options_.maxTtl) {
ttl = ttl ? Math.min(ttl, options_.maxTtl) : options_.maxTtl;
}
if (this.hooks.size > 0) {
/* eslint-disable no-await-in-loop */
for (const key_ of this.hooks.keys()) {
value = await this.runHook(key_, value, response);
}
/* eslint-enable no-await-in-loop */
}
await this.cache.set(key, value, ttl);
}
catch (error) {
ee.emit('error', new CacheError(error));
}
})();
}
else if (options_.cache && revalidate) {
(async () => {
try {
await this.cache.delete(key);
}
catch (error) {
ee.emit('error', new CacheError(error));
}
})();
}
ee.emit('response', clonedResponse ?? response);
if (typeof cb === 'function') {
cb(clonedResponse ?? response);
}
};
try {
const request_ = this.cacheRequest(options_, handler);
request_.once('error', requestErrorCallback);
request_.once('abort', requestErrorCallback);
request_.once('destroy', requestErrorCallback);
ee.emit('request', request_);
}
catch (error) {
ee.emit('error', new RequestError(error));
}
};
(async () => {
const get = async (options_) => {
await Promise.resolve();
const cacheEntry = options_.cache ? await this.cache.get(key) : undefined;
if (typeof cacheEntry === 'undefined' && !options_.forceRefresh) {
makeRequest(options_);
return;
}
const policy = CachePolicy.fromObject(cacheEntry.cachePolicy);
if (policy.satisfiesWithoutRevalidation(options_) && !options_.forceRefresh) {
const headers = convertHeaders(policy.responseHeaders());
const response = new Response({ statusCode: cacheEntry.statusCode, headers, body: cacheEntry.body, url: cacheEntry.url });
response.cachePolicy = policy;
response.fromCache = true;
ee.emit('response', response);
if (typeof cb === 'function') {
cb(response);
}
}
else if (policy.satisfiesWithoutRevalidation(options_) && Date.now() >= policy.timeToLive() && options_.forceRefresh) {
await this.cache.delete(key);
options_.headers = policy.revalidationHeaders(options_);
makeRequest(options_);
}
else {
revalidate = cacheEntry;
options_.headers = policy.revalidationHeaders(options_);
makeRequest(options_);
}
};
const errorHandler = (error) => ee.emit('error', new CacheError(error));
if (this.cache instanceof Keyv) {
const cachek = this.cache;
cachek.once('error', errorHandler);
ee.on('error', () => cachek.removeListener('error', errorHandler));
ee.on('response', () => cachek.removeListener('error', errorHandler));
}
try {
await get(options);
}
catch (error) {
if (options.automaticFailover && !madeRequest) {
makeRequest(options);
}
ee.emit('error', new CacheError(error));
}
})();
return ee;
};
this.addHook = (name, fn) => {
if (!this.hooks.has(name)) {
this.hooks.set(name, fn);
}
};
this.removeHook = (name) => this.hooks.delete(name);
this.getHook = (name) => this.hooks.get(name);
this.runHook = async (name, ...args) => this.hooks.get(name)?.(...args);
if (cacheAdapter instanceof Keyv) {
this.cache = cacheAdapter;
}
else if (typeof cacheAdapter === 'string') {
this.cache = new Keyv({
uri: cacheAdapter,
namespace: 'cacheable-request',
});
}
else {
this.cache = new Keyv({
store: cacheAdapter,
namespace: 'cacheable-request',
});
}
this.request = this.request.bind(this);
this.cacheRequest = cacheRequest;
}
}
const entries = Object.entries;
const cloneResponse = (response) => {
const clone = new PassThroughStream({ autoDestroy: false });
mimicResponse(response, clone);
return response.pipe(clone);
};
const urlObjectToRequestOptions = (url) => {
const options = { ...url };
options.path = `${url.pathname || '/'}${url.search || ''}`;
delete options.pathname;
delete options.search;
return options;
};
const normalizeUrlObject = (url) =>
// If url was parsed by url.parse or new URL:
// - hostname will be set
// - host will be hostname[:port]
// - port will be set if it was explicit in the parsed string
// Otherwise, url was from request options:
// - hostname or host may be set
// - host shall not have port encoded
({
protocol: url.protocol,
auth: url.auth,
hostname: url.hostname || url.host || 'localhost',
port: url.port,
pathname: url.pathname,
search: url.search,
});
const convertHeaders = (headers) => {
const result = [];
for (const name of Object.keys(headers)) {
result[name.toLowerCase()] = headers[name];
}
return result;
};
export default CacheableRequest;
export * from './types.js';
export const onResponse = 'onResponse';
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1,10 @@
"use strict";
var objToString = Object.prototype.toString, id = objToString.call(new Date());
module.exports = function (value) {
return (
(value && !isNaN(value) && (value instanceof Date || objToString.call(value) === id)) ||
false
);
};

View File

@@ -0,0 +1,7 @@
"use strict";
var indexOf = String.prototype.indexOf;
module.exports = function (searchString /*, position*/) {
return indexOf.call(this, searchString, arguments[1]) > -1;
};

View File

@@ -0,0 +1,29 @@
'use strict';
var callBound = require('call-bind/callBound');
var $arrayPush = callBound('Array.prototype.push');
var GetIterator = require('./GetIterator');
var IteratorStep = require('./IteratorStep');
var IteratorValue = require('./IteratorValue');
// https://262.ecma-international.org/12.0/#sec-iterabletolist
module.exports = function IterableToList(items) {
var iterator;
if (arguments.length > 1) {
iterator = GetIterator(items, 'sync', arguments[1]);
} else {
iterator = GetIterator(items, 'sync');
}
var values = [];
var next = true;
while (next) {
next = IteratorStep(iterator);
if (next) {
var nextValue = IteratorValue(next);
$arrayPush(values, nextValue);
}
}
return values;
};

View File

@@ -0,0 +1,44 @@
define(['exports', 'module', './handlebars/base', './handlebars/safe-string', './handlebars/exception', './handlebars/utils', './handlebars/runtime', './handlebars/no-conflict'], function (exports, module, _handlebarsBase, _handlebarsSafeString, _handlebarsException, _handlebarsUtils, _handlebarsRuntime, _handlebarsNoConflict) {
'use strict';
// istanbul ignore next
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
// Each of these augment the Handlebars object. No need to setup here.
// (This is done to easily share code between commonjs and browse envs)
var _SafeString = _interopRequireDefault(_handlebarsSafeString);
var _Exception = _interopRequireDefault(_handlebarsException);
var _noConflict = _interopRequireDefault(_handlebarsNoConflict);
// For compatibility and usage outside of module systems, make the Handlebars object a namespace
function create() {
var hb = new _handlebarsBase.HandlebarsEnvironment();
_handlebarsUtils.extend(hb, _handlebarsBase);
hb.SafeString = _SafeString['default'];
hb.Exception = _Exception['default'];
hb.Utils = _handlebarsUtils;
hb.escapeExpression = _handlebarsUtils.escapeExpression;
hb.VM = _handlebarsRuntime;
hb.template = function (spec) {
return _handlebarsRuntime.template(spec, hb);
};
return hb;
}
var inst = create();
inst.create = create;
_noConflict['default'](inst);
inst['default'] = inst;
module.exports = inst;
});
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL2xpYi9oYW5kbGViYXJzLnJ1bnRpbWUuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFZQSxXQUFTLE1BQU0sR0FBRztBQUNoQixRQUFJLEVBQUUsR0FBRyxJQUFJLGdCQUFLLHFCQUFxQixFQUFFLENBQUM7O0FBRTFDLHFCQUFNLE1BQU0sQ0FBQyxFQUFFLGtCQUFPLENBQUM7QUFDdkIsTUFBRSxDQUFDLFVBQVUseUJBQWEsQ0FBQztBQUMzQixNQUFFLENBQUMsU0FBUyx3QkFBWSxDQUFDO0FBQ3pCLE1BQUUsQ0FBQyxLQUFLLG1CQUFRLENBQUM7QUFDakIsTUFBRSxDQUFDLGdCQUFnQixHQUFHLGlCQUFNLGdCQUFnQixDQUFDOztBQUU3QyxNQUFFLENBQUMsRUFBRSxxQkFBVSxDQUFDO0FBQ2hCLE1BQUUsQ0FBQyxRQUFRLEdBQUcsVUFBUyxJQUFJLEVBQUU7QUFDM0IsYUFBTyxtQkFBUSxRQUFRLENBQUMsSUFBSSxFQUFFLEVBQUUsQ0FBQyxDQUFDO0tBQ25DLENBQUM7O0FBRUYsV0FBTyxFQUFFLENBQUM7R0FDWDs7QUFFRCxNQUFJLElBQUksR0FBRyxNQUFNLEVBQUUsQ0FBQztBQUNwQixNQUFJLENBQUMsTUFBTSxHQUFHLE1BQU0sQ0FBQzs7QUFFckIseUJBQVcsSUFBSSxDQUFDLENBQUM7O0FBRWpCLE1BQUksQ0FBQyxTQUFTLENBQUMsR0FBRyxJQUFJLENBQUM7O21CQUVSLElBQUkiLCJmaWxlIjoiaGFuZGxlYmFycy5ydW50aW1lLmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0ICogYXMgYmFzZSBmcm9tICcuL2hhbmRsZWJhcnMvYmFzZSc7XG5cbi8vIEVhY2ggb2YgdGhlc2UgYXVnbWVudCB0aGUgSGFuZGxlYmFycyBvYmplY3QuIE5vIG5lZWQgdG8gc2V0dXAgaGVyZS5cbi8vIChUaGlzIGlzIGRvbmUgdG8gZWFzaWx5IHNoYXJlIGNvZGUgYmV0d2VlbiBjb21tb25qcyBhbmQgYnJvd3NlIGVudnMpXG5pbXBvcnQgU2FmZVN0cmluZyBmcm9tICcuL2hhbmRsZWJhcnMvc2FmZS1zdHJpbmcnO1xuaW1wb3J0IEV4Y2VwdGlvbiBmcm9tICcuL2hhbmRsZWJhcnMvZXhjZXB0aW9uJztcbmltcG9ydCAqIGFzIFV0aWxzIGZyb20gJy4vaGFuZGxlYmFycy91dGlscyc7XG5pbXBvcnQgKiBhcyBydW50aW1lIGZyb20gJy4vaGFuZGxlYmFycy9ydW50aW1lJztcblxuaW1wb3J0IG5vQ29uZmxpY3QgZnJvbSAnLi9oYW5kbGViYXJzL25vLWNvbmZsaWN0JztcblxuLy8gRm9yIGNvbXBhdGliaWxpdHkgYW5kIHVzYWdlIG91dHNpZGUgb2YgbW9kdWxlIHN5c3RlbXMsIG1ha2UgdGhlIEhhbmRsZWJhcnMgb2JqZWN0IGEgbmFtZXNwYWNlXG5mdW5jdGlvbiBjcmVhdGUoKSB7XG4gIGxldCBoYiA9IG5ldyBiYXNlLkhhbmRsZWJhcnNFbnZpcm9ubWVudCgpO1xuXG4gIFV0aWxzLmV4dGVuZChoYiwgYmFzZSk7XG4gIGhiLlNhZmVTdHJpbmcgPSBTYWZlU3RyaW5nO1xuICBoYi5FeGNlcHRpb24gPSBFeGNlcHRpb247XG4gIGhiLlV0aWxzID0gVXRpbHM7XG4gIGhiLmVzY2FwZUV4cHJlc3Npb24gPSBVdGlscy5lc2NhcGVFeHByZXNzaW9uO1xuXG4gIGhiLlZNID0gcnVudGltZTtcbiAgaGIudGVtcGxhdGUgPSBmdW5jdGlvbihzcGVjKSB7XG4gICAgcmV0dXJuIHJ1bnRpbWUudGVtcGxhdGUoc3BlYywgaGIpO1xuICB9O1xuXG4gIHJldHVybiBoYjtcbn1cblxubGV0IGluc3QgPSBjcmVhdGUoKTtcbmluc3QuY3JlYXRlID0gY3JlYXRlO1xuXG5ub0NvbmZsaWN0KGluc3QpO1xuXG5pbnN0WydkZWZhdWx0J10gPSBpbnN0O1xuXG5leHBvcnQgZGVmYXVsdCBpbnN0O1xuIl19

View File

@@ -0,0 +1 @@
module.exports={A:{A:{"132":"J D E F A B CC"},B:{"1":"C K L G M N O P Q R S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H"},C:{"1":"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 h lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB","2":"0 1 2 3 4 5 6 7 8 9 DC tB I v J D E F A B C K L G M N O w g x y z AB BB EC FC","322":"CB DB EB FB GB"},D:{"1":"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 h lB mB nB oB pB P Q R S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB GC","2":"I v J","16":"D","33":"0 1 2 3 4 5 6 7 8 9 E F A B C K L G M N O w g x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB"},E:{"1":"B C K L G qB rB 1B MC NC 2B 3B 4B 5B sB 6B 7B 8B 9B OC","2":"I HC zB","16":"v","33":"J D E F A IC JC KC LC 0B"},F:{"1":"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 h lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d e","2":"F B C PC QC RC SC qB AC TC rB","33":"0 1 2 3 4 5 6 7 8 9 G M N O w g x y z AB"},G:{"1":"dC eC fC gC hC iC jC kC lC mC nC 2B 3B 4B 5B sB 6B 7B 8B 9B","16":"zB UC BC","33":"E VC WC XC YC ZC aC bC cC"},H:{"2":"oC"},I:{"1":"f","2":"pC qC rC","33":"tB I sC BC tC uC"},J:{"33":"D A"},K:{"1":"h","2":"A B C qB AC rB"},L:{"1":"H"},M:{"1":"H"},N:{"36":"A B"},O:{"1":"vC"},P:{"1":"g wC xC yC zC 0C 0B 1C 2C 3C 4C 5C sB 6C 7C 8C","33":"I"},Q:{"1":"1B"},R:{"1":"9C"},S:{"1":"AD BD"}},B:2,C:"CSS writing-mode property"};

View File

@@ -0,0 +1,47 @@
'use strict'
const fs = require('graceful-fs')
const path = require('path')
const copySync = require('../copy-sync').copySync
const removeSync = require('../remove').removeSync
const mkdirpSync = require('../mkdirs').mkdirpSync
const stat = require('../util/stat')
function moveSync (src, dest, opts) {
opts = opts || {}
const overwrite = opts.overwrite || opts.clobber || false
const { srcStat } = stat.checkPathsSync(src, dest, 'move')
stat.checkParentPathsSync(src, srcStat, dest, 'move')
mkdirpSync(path.dirname(dest))
return doRename(src, dest, overwrite)
}
function doRename (src, dest, overwrite) {
if (overwrite) {
removeSync(dest)
return rename(src, dest, overwrite)
}
if (fs.existsSync(dest)) throw new Error('dest already exists.')
return rename(src, dest, overwrite)
}
function rename (src, dest, overwrite) {
try {
fs.renameSync(src, dest)
} catch (err) {
if (err.code !== 'EXDEV') throw err
return moveAcrossDevice(src, dest, overwrite)
}
}
function moveAcrossDevice (src, dest, overwrite) {
const opts = {
overwrite,
errorOnExist: true
}
copySync(src, dest, opts)
return removeSync(src)
}
module.exports = moveSync

View File

@@ -0,0 +1,72 @@
let flexSpec = require('./flex-spec')
let Declaration = require('../declaration')
class FlexDirection extends Declaration {
/**
* Return property name by final spec
*/
normalize() {
return 'flex-direction'
}
/**
* Use two properties for 2009 spec
*/
insert(decl, prefix, prefixes) {
let spec
;[spec, prefix] = flexSpec(prefix)
if (spec !== 2009) {
return super.insert(decl, prefix, prefixes)
}
let already = decl.parent.some(
i =>
i.prop === prefix + 'box-orient' || i.prop === prefix + 'box-direction'
)
if (already) {
return undefined
}
let v = decl.value
let orient, dir
if (v === 'inherit' || v === 'initial' || v === 'unset') {
orient = v
dir = v
} else {
orient = v.includes('row') ? 'horizontal' : 'vertical'
dir = v.includes('reverse') ? 'reverse' : 'normal'
}
let cloned = this.clone(decl)
cloned.prop = prefix + 'box-orient'
cloned.value = orient
if (this.needCascade(decl)) {
cloned.raws.before = this.calcBefore(prefixes, decl, prefix)
}
decl.parent.insertBefore(decl, cloned)
cloned = this.clone(decl)
cloned.prop = prefix + 'box-direction'
cloned.value = dir
if (this.needCascade(decl)) {
cloned.raws.before = this.calcBefore(prefixes, decl, prefix)
}
return decl.parent.insertBefore(decl, cloned)
}
/**
* Clean two properties for 2009 spec
*/
old(prop, prefix) {
let spec
;[spec, prefix] = flexSpec(prefix)
if (spec === 2009) {
return [prefix + 'box-orient', prefix + 'box-direction']
} else {
return super.old(prop, prefix)
}
}
}
FlexDirection.names = ['flex-direction', 'box-direction', 'box-orient']
module.exports = FlexDirection

View File

@@ -0,0 +1 @@
{"name":"tr46","version":"0.0.3","files":{"package.json":{"checkedAt":1678883670003,"integrity":"sha512-Z2IVlAYQMp01/u8GdNncYamrfCZdbu3KWC4TADrNi52LSJTIbnnqqF6XJmaC276WN4JrmfC5r6VtvPmtB3oaVQ==","mode":436,"size":732},".npmignore":{"checkedAt":1678883670003,"integrity":"sha512-WN8n3inxMvaN7ROxWF30ua6QjwhfLKYPT2Tu2zCE5xM3IXmubDHKUw4/C0wdaQaENT43ZBfJw27HiHHny8kWlQ==","mode":436,"size":40},"index.js":{"checkedAt":1678883670003,"integrity":"sha512-95tuY1eGu0s4+AVi2GKmoskI6mkbP8QnEqroJZHHNazQLY/XnM83Ro5Y+GW7oo+b4NkhgrMMjktO9yYbtX8hPQ==","mode":436,"size":7567},"lib/.gitkeep":{"checkedAt":1678883668323,"integrity":"sha512-z4PhNX7vuL3xVChQ1m2AB9Yg5AULVxXcg/SpIdNs6c5H0NE8XYXysP+DGNKHfuwvY7kxvUdBeoGlODJ6+SfaPg==","mode":436,"size":0},"lib/mappingTable.json":{"checkedAt":1678883670028,"integrity":"sha512-itVSxk9TMDwA8qVsH9wtbGRLEqqZPBgdX0hH+0YTcBs9A9Kk+ONH4ddVmZaBWFrjCB6GWuVPITQMgmGWwq+D1A==","mode":436,"size":260049}}}

View File

@@ -0,0 +1,17 @@
'use strict';
var toStr = Object.prototype.toString;
module.exports = function isArguments(value) {
var str = toStr.call(value);
var isArgs = str === '[object Arguments]';
if (!isArgs) {
isArgs = str !== '[object Array]' &&
value !== null &&
typeof value === 'object' &&
typeof value.length === 'number' &&
value.length >= 0 &&
toStr.call(value.callee) === '[object Function]';
}
return isArgs;
};

View File

@@ -0,0 +1,3 @@
const compare = require('./compare')
const compareLoose = (a, b) => compare(a, b, true)
module.exports = compareLoose

View File

@@ -0,0 +1,32 @@
"use strict";
var WeakMapPoly = require("../polyfill");
module.exports = function (t, a) {
var map;
a.throws(function () {
t(undefined);
}, TypeError, "Undefined");
a.throws(function () {
t(null);
}, TypeError, "Null");
a.throws(function () {
t(true);
}, TypeError, "Primitive");
a.throws(function () {
t("raz");
}, TypeError, "String");
a.throws(function () {
t({});
}, TypeError, "Object");
a.throws(function () {
t([]);
}, TypeError, "Array");
if (typeof WeakMap !== "undefined") {
map = new WeakMap();
a(t(map), map, "Native");
}
map = new WeakMapPoly();
a(t(map), map, "Polyfill");
};

View File

@@ -0,0 +1,5 @@
import { OperatorFunction, SchedulerLike } from '../types';
export declare function bufferTime<T>(bufferTimeSpan: number, scheduler?: SchedulerLike): OperatorFunction<T, T[]>;
export declare function bufferTime<T>(bufferTimeSpan: number, bufferCreationInterval: number | null | undefined, scheduler?: SchedulerLike): OperatorFunction<T, T[]>;
export declare function bufferTime<T>(bufferTimeSpan: number, bufferCreationInterval: number | null | undefined, maxBufferSize: number, scheduler?: SchedulerLike): OperatorFunction<T, T[]>;
//# sourceMappingURL=bufferTime.d.ts.map

View File

@@ -0,0 +1,9 @@
"use strict";
var indexOf = require("./e-index-of")
, filter = Array.prototype.filter
, isFirst;
isFirst = function (value, index) { return indexOf.call(this, value) === index; };
module.exports = function () { return filter.call(this, isFirst, this); };

View File

@@ -0,0 +1 @@
{"version":3,"file":"Subscriber.d.ts","sourceRoot":"","sources":["../../../src/internal/Subscriber.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAA0B,MAAM,SAAS,CAAC;AAC3D,OAAO,EAAkB,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAQ9D;;;;;;;;;GASG;AACH,qBAAa,UAAU,CAAC,CAAC,CAAE,SAAQ,YAAa,YAAW,QAAQ,CAAC,CAAC,CAAC;IACpE;;;;;;;;;;;;;;OAcG;IACH,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,KAAK,IAAI,EAAE,QAAQ,CAAC,EAAE,MAAM,IAAI,GAAG,UAAU,CAAC,CAAC,CAAC;IAIzG,oGAAoG;IACpG,SAAS,CAAC,SAAS,EAAE,OAAO,CAAS;IACrC,oGAAoG;IACpG,SAAS,CAAC,WAAW,EAAE,UAAU,CAAC,GAAG,CAAC,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC;IAEvD;;;OAGG;gBACS,WAAW,CAAC,EAAE,UAAU,CAAC,GAAG,CAAC,GAAG,QAAQ,CAAC,GAAG,CAAC;IAczD;;;;;;OAMG;IACH,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,GAAG,IAAI;IAQrB;;;;;;OAMG;IACH,KAAK,CAAC,GAAG,CAAC,EAAE,GAAG,GAAG,IAAI;IAStB;;;;;OAKG;IACH,QAAQ,IAAI,IAAI;IAShB,WAAW,IAAI,IAAI;IAQnB,SAAS,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC,GAAG,IAAI;IAI/B,SAAS,CAAC,MAAM,CAAC,GAAG,EAAE,GAAG,GAAG,IAAI;IAQhC,SAAS,CAAC,SAAS,IAAI,IAAI;CAO5B;AAwDD,qBAAa,cAAc,CAAC,CAAC,CAAE,SAAQ,UAAU,CAAC,CAAC,CAAC;gBAEhD,cAAc,CAAC,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC,GAAG,IAAI,EACnE,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC,GAAG,IAAI,EAClC,QAAQ,CAAC,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,IAAI;CAqCjC;AAgCD;;;;GAIG;AACH,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,GAAG;IAAE,MAAM,EAAE,IAAI,CAAA;CAKpE,CAAC"}

View File

@@ -0,0 +1,80 @@
var isES5 = (function(){
"use strict";
return this === undefined;
})();
if (isES5) {
module.exports = {
freeze: Object.freeze,
defineProperty: Object.defineProperty,
getDescriptor: Object.getOwnPropertyDescriptor,
keys: Object.keys,
names: Object.getOwnPropertyNames,
getPrototypeOf: Object.getPrototypeOf,
isArray: Array.isArray,
isES5: isES5,
propertyIsWritable: function(obj, prop) {
var descriptor = Object.getOwnPropertyDescriptor(obj, prop);
return !!(!descriptor || descriptor.writable || descriptor.set);
}
};
} else {
var has = {}.hasOwnProperty;
var str = {}.toString;
var proto = {}.constructor.prototype;
var ObjectKeys = function (o) {
var ret = [];
for (var key in o) {
if (has.call(o, key)) {
ret.push(key);
}
}
return ret;
};
var ObjectGetDescriptor = function(o, key) {
return {value: o[key]};
};
var ObjectDefineProperty = function (o, key, desc) {
o[key] = desc.value;
return o;
};
var ObjectFreeze = function (obj) {
return obj;
};
var ObjectGetPrototypeOf = function (obj) {
try {
return Object(obj).constructor.prototype;
}
catch (e) {
return proto;
}
};
var ArrayIsArray = function (obj) {
try {
return str.call(obj) === "[object Array]";
}
catch(e) {
return false;
}
};
module.exports = {
isArray: ArrayIsArray,
keys: ObjectKeys,
names: ObjectKeys,
defineProperty: ObjectDefineProperty,
getDescriptor: ObjectGetDescriptor,
freeze: ObjectFreeze,
getPrototypeOf: ObjectGetPrototypeOf,
isES5: isES5,
propertyIsWritable: function() {
return true;
}
};
}

View File

@@ -0,0 +1,64 @@
'use strict';
var path = require('path');
var fs = require('fs');
var acorn = require('./acorn.js');
var infile, forceFile, silent = false, compact = false, tokenize = false;
var options = {};
function help(status) {
var print = (status === 0) ? console.log : console.error;
print("usage: " + path.basename(process.argv[1]) + " [--ecma3|--ecma5|--ecma6|--ecma7|--ecma8|--ecma9|...|--ecma2015|--ecma2016|--ecma2017|--ecma2018|...]");
print(" [--tokenize] [--locations] [---allow-hash-bang] [--compact] [--silent] [--module] [--help] [--] [infile]");
process.exit(status);
}
for (var i = 2; i < process.argv.length; ++i) {
var arg = process.argv[i];
if ((arg === "-" || arg[0] !== "-") && !infile) { infile = arg; }
else if (arg === "--" && !infile && i + 2 === process.argv.length) { forceFile = infile = process.argv[++i]; }
else if (arg === "--locations") { options.locations = true; }
else if (arg === "--allow-hash-bang") { options.allowHashBang = true; }
else if (arg === "--silent") { silent = true; }
else if (arg === "--compact") { compact = true; }
else if (arg === "--help") { help(0); }
else if (arg === "--tokenize") { tokenize = true; }
else if (arg === "--module") { options.sourceType = "module"; }
else {
var match = arg.match(/^--ecma(\d+)$/);
if (match)
{ options.ecmaVersion = +match[1]; }
else
{ help(1); }
}
}
function run(code) {
var result;
try {
if (!tokenize) {
result = acorn.parse(code, options);
} else {
result = [];
var tokenizer = acorn.tokenizer(code, options), token;
do {
token = tokenizer.getToken();
result.push(token);
} while (token.type !== acorn.tokTypes.eof)
}
} catch (e) {
console.error(infile && infile !== "-" ? e.message.replace(/\(\d+:\d+\)$/, function (m) { return m.slice(0, 1) + infile + " " + m.slice(1); }) : e.message);
process.exit(1);
}
if (!silent) { console.log(JSON.stringify(result, null, compact ? null : 2)); }
}
if (forceFile || infile && infile !== "-") {
run(fs.readFileSync(infile, "utf8"));
} else {
var code = "";
process.stdin.resume();
process.stdin.on("data", function (chunk) { return code += chunk; });
process.stdin.on("end", function () { return run(code); });
}

View File

@@ -0,0 +1,17 @@
import Wrapper from './shared/Wrapper';
import Renderer from '../Renderer';
import Block from '../Block';
import KeyBlock from '../../nodes/KeyBlock';
import FragmentWrapper from './Fragment';
import { Identifier } from 'estree';
export default class KeyBlockWrapper extends Wrapper {
node: KeyBlock;
fragment: FragmentWrapper;
block: Block;
dependencies: string[];
var: Identifier;
constructor(renderer: Renderer, block: Block, parent: Wrapper, node: KeyBlock, strip_whitespace: boolean, next_sibling: Wrapper);
render(block: Block, parent_node: Identifier, parent_nodes: Identifier): void;
render_static_key(_block: Block, parent_node: Identifier, parent_nodes: Identifier): void;
render_dynamic_key(block: Block, parent_node: Identifier, parent_nodes: Identifier): void;
}

View File

@@ -0,0 +1,21 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = stripLow;
var _assertString = _interopRequireDefault(require("./util/assertString"));
var _blacklist = _interopRequireDefault(require("./blacklist"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function stripLow(str, keep_new_lines) {
(0, _assertString.default)(str);
var chars = keep_new_lines ? '\\x00-\\x09\\x0B\\x0C\\x0E-\\x1F\\x7F' : '\\x00-\\x1F\\x7F';
return (0, _blacklist.default)(str, chars);
}
module.exports = exports.default;
module.exports.default = exports.default;

View File

@@ -0,0 +1,16 @@
var getMapData = require('./_getMapData');
/**
* Checks if a map value for `key` exists.
*
* @private
* @name has
* @memberOf MapCache
* @param {string} key The key of the entry to check.
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
*/
function mapCacheHas(key) {
return getMapData(this, key).has(key);
}
module.exports = mapCacheHas;

View File

@@ -0,0 +1,59 @@
{
"name": "string-width",
"version": "5.1.2",
"description": "Get the visual width of a string - the number of columns required to display it",
"license": "MIT",
"repository": "sindresorhus/string-width",
"funding": "https://github.com/sponsors/sindresorhus",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "https://sindresorhus.com"
},
"type": "module",
"exports": "./index.js",
"engines": {
"node": ">=12"
},
"scripts": {
"test": "xo && ava && tsd"
},
"files": [
"index.js",
"index.d.ts"
],
"keywords": [
"string",
"character",
"unicode",
"width",
"visual",
"column",
"columns",
"fullwidth",
"full-width",
"full",
"ansi",
"escape",
"codes",
"cli",
"command-line",
"terminal",
"console",
"cjk",
"chinese",
"japanese",
"korean",
"fixed-width"
],
"dependencies": {
"eastasianwidth": "^0.2.0",
"emoji-regex": "^9.2.2",
"strip-ansi": "^7.0.1"
},
"devDependencies": {
"ava": "^3.15.0",
"tsd": "^0.14.0",
"xo": "^0.38.2"
}
}

View File

@@ -0,0 +1,247 @@
# svelte-select
A select/autocomplete component for Svelte apps. With support for grouping, filtering, async and more.
## Demos
🌱 [Simple demo](https://svelte.dev/repl/a859c2ba7d1744af9c95037c48989193?version=3.12.1)
🌻 [Advanced demo](https://svelte.dev/repl/3e032a58c3974d07b7818c0f817a06a3?version=3.20.1)
## Installation
```bash
yarn add svelte-select
```
**Note:** Install as a dev dependency (yarn add svelte-select --dev) if using [Sapper](https://sapper.svelte.dev/) to avoid a SSR error.
## Usage
```html
<script>
import Select from 'svelte-select';
let items = [
{value: 'chocolate', label: 'Chocolate'},
{value: 'pizza', label: 'Pizza'},
{value: 'cake', label: 'Cake'},
{value: 'chips', label: 'Chips'},
{value: 'ice-cream', label: 'Ice Cream'},
];
let selectedValue = {value: 'cake', label: 'Cake'};
function handleSelect(event) {
console.log('selected item': event.detail);
// .. do something here 🙂
}
</script>
<Select {items} {selectedValue} on:select={handleSelect}></Select>
```
## API
- `items: Array` Default: `[]`. List of selectable items that appear in the dropdown.
- `selectedValue: Any` Default: `undefined`. Selected item or items
- `filterText: String` Default: `''`. Text to filter `items` by.
- `placeholder: String` Default: `'Select...'`. Placeholder text.
- `noOptionsMessage: String` Default: `'No options'`. Message to display in list when there are no `items`.
- `optionIdentifier: String` Default: `'value'`. Override default identifier.
- `listOpen: Boolean` Default: `false`. Open/close list.
- `hideEmptyState: Boolean` Default: `false`. Hide list and don't show `noOptionsMessage` when there are no `items`.
- `containerClasses: String` Default: `''`. Add extra container classes, for example 'global-x local-y'.
- `containerStyles: String` Default: `''`. Add inline styles to container.
- `isClearable: Boolean` Default: `true`. Enable clearing of selected items.
- `isCreatable: Boolean` Default: `false`. Can create new item(s) to be added to `selectedValue`.
- `isDisabled: Boolean` Default: `false`. Disable select.
- `isMulti: Boolean` Default: `false`. Enable multi-select, `selectedValue` becomes an array of selected items.
- `isSearchable: Boolean` Default: `true`. Enable search/filtering of `items` via `filterText`.
- `isGroupHeaderSelectable: Boolean` Default: `false`. Enable selectable group headers in `items` (see adv demo).
- `listPlacement: String` Default: `'auto'`. When `'auto'` displays either `'top'` or `'bottom'` depending on viewport.
- `hasError: Boolean` Default: `false`. Show/hide error styles around select input (red border by default).
- `listAutoWidth: Boolean` Default: `true`. List width will grow wider than the Select container (depending on list item content length).
- `showIndicator: Boolean` Default: `false`. If true, the chevron indicator is always shown.
- `inputAttributes: Object` Default: `{}`. Useful for passing in HTML attributes like `'id'` to the Select input.
- `Item: Component` Default: `Item`. Item component.
- `Selection: Component` Default: `Selection`. Selection component.
- `MultiSelection: Component` Default: `MultiSelection`. Multi selection component.
- `Icon: Component` Default: `Icon`. Icon component.
- `iconProps: Object` Default: `{}`. Icon props.
- `indicatorSvg: @html` Default: `undefined`. Override default SVG chevron indicator.
- `ClearIcon` Default: `ClearIcon`. ClearIcon component.
- `isVirtualList: Boolean` Default: `false`. Uses [svelte-virtual-list](https://github.com/sveltejs/svelte-virtual-list) to render list (experimental).
- `filteredItems: Array` Default: `[]`. List of items that are filtered by `filterText`
### Exposed methods
If you really want to get your hands dirty these internal functions are exposed as props to override if needed. See the adv demo or look through the test file (test/src/index.js) for examples.
```js
export let itemFilter = (label, filterText, option) => label.toLowerCase().includes(filterText.toLowerCase());
```
```js
export let groupBy = undefined; // see adv demo for example
```
```js
export let groupFilter = groups => groups;
```
```js
export let createGroupHeaderItem = groupValue => {
return {
value: groupValue,
label: groupValue
};
};
```
```js
export let createItem = filterText => {
return {
value: filterText,
label: filterText
};
};
```
```js
export let getOptionLabel = (option, filterText) => {
return option.isCreator ? `Create \"${filterText}\"` : option.label;
};
```
```js
export let getSelectionLabel = option => {
if (option) return option.label;
};
```
```js
export let getGroupHeaderLabel = option => {
return option.label;
};
```
```js
export function handleClear() {
selectedValue = undefined;
listOpen = false;
dispatch("clear", selectedValue);
handleFocus();
}
```
```js
export let loadOptions = undefined; // if used must return a Promise that updates 'items'
/* Return an object with { cancelled: true } to keep the loading state as active. */
```
## Styling
You can style a component by overriding [the available CSS variables](/docs/theming_variables.md).
```html
<script>
import Select from 'svelte-select';
const items = ['One', 'Two', 'Three'];
</script>
<style>
.themed {
--border: 3px solid blue;
--borderRadius: 10px;
--placeholderColor: blue;
}
</style>
<div class="themed">
<h2>Theming</h2>
<Select {items}></Select>
</div>
```
You can also use the `inputStyles` prop to write in any override styles needed for the input.
```html
<script>
import Select from 'svelte-select';
const items = ['One', 'Two', 'Three'];
</script>
<Select {items} inputStyles="box-sizing: border-box;"></Select>
```
## Events
| Event Name | Callback | Description |
|------|------|----------|
| select | { detail } | fires when selectedValue changes
| clear | - | fires when clear all is invoked
| loaded | { items } | fires when `loadOptions` resolves
| error | { type, details } | fires when error is caught
```html
<script>
import Select from 'svelte-select';
let items = [...];
function handleSelect(event) {
// event.detail will contain the selected value
...
}
function onClear() {
...
}
</script>
<Select {items} on:select={handleSelect} on:clear={handleClear}></Select>
```
## Development
```bash
yarn global add serve@8
yarn
yarn dev
yarn test:browser
```
In your favourite browser go to http://localhost:3000 and open devtools and see the console for the test output. When developing its handy to see the component on the page; comment out the `select.$destroy();` on the last test in /test/src/index.js or use the `test.only()` to target just one test.
For example:
```js
test.only('when getSelectionLabel contains HTML then render the HTML', async (t) => {
const select = new Select({
target,
props: {
selectedValue: items[0],
getSelectionLabel: (option) => `<p>${option.label}</p>`,
}
});
t.ok(document.querySelector('.selection').innerHTML === '<p>Chocolate</p>');
//select.$destroy();
});
```
## Configuring webpack
If you're using webpack with [svelte-loader](https://github.com/sveltejs/svelte-loader), make sure that you add `"svelte"` to [`resolve.mainFields`](https://webpack.js.org/configuration/resolve/#resolve-mainfields) in your webpack config. This ensures that webpack imports the uncompiled component (`src/index.html`) rather than the compiled version (`index.mjs`) — this is more efficient.
If you're using Rollup with [rollup-plugin-svelte](https://github.com/rollup/rollup-plugin-svelte), this will happen automatically.
## License
[LIL](LICENSE)

View File

@@ -0,0 +1,17 @@
/**
* Removes `key` and its value from the hash.
*
* @private
* @name delete
* @memberOf Hash
* @param {Object} hash The hash to modify.
* @param {string} key The key of the value to remove.
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
*/
function hashDelete(key) {
var result = this.has(key) && delete this.__data__[key];
this.size -= result ? 1 : 0;
return result;
}
module.exports = hashDelete;

View File

@@ -0,0 +1,13 @@
'use strict';
var callBound = require('call-bind/callBound');
var $byteLength = callBound('ArrayBuffer.prototype.byteLength', true);
var isArrayBuffer = require('is-array-buffer');
module.exports = function byteLength(ab) {
if (!isArrayBuffer(ab)) {
return NaN;
}
return $byteLength ? $byteLength(ab) : ab.byteLength;
}; // in node < 0.11, byteLength is an own nonconfigurable property

View File

@@ -0,0 +1,9 @@
'use strict';
var CompletionRecord = require('./CompletionRecord');
// https://262.ecma-international.org/9.0/#sec-throwcompletion
module.exports = function ThrowCompletion(argument) {
return new CompletionRecord('throw', argument);
};

View File

@@ -0,0 +1,22 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = isMultibyte;
var _assertString = _interopRequireDefault(require("./util/assertString"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/* eslint-disable no-control-regex */
var multibyte = /[^\x00-\x7F]/;
/* eslint-enable no-control-regex */
function isMultibyte(str) {
(0, _assertString.default)(str);
return multibyte.test(str);
}
module.exports = exports.default;
module.exports.default = exports.default;

View File

@@ -0,0 +1,119 @@
import { ConnectableObservable } from '../observable/ConnectableObservable';
import { Subscription } from '../Subscription';
import { MonoTypeOperatorFunction } from '../types';
import { operate } from '../util/lift';
import { createOperatorSubscriber } from './OperatorSubscriber';
/**
* Make a {@link ConnectableObservable} behave like a ordinary observable and automates the way
* you can connect to it.
*
* Internally it counts the subscriptions to the observable and subscribes (only once) to the source if
* the number of subscriptions is larger than 0. If the number of subscriptions is smaller than 1, it
* unsubscribes from the source. This way you can make sure that everything before the *published*
* refCount has only a single subscription independently of the number of subscribers to the target
* observable.
*
* Note that using the {@link share} operator is exactly the same as using the `multicast(() => new Subject())` operator
* (making the observable hot) and the *refCount* operator in a sequence.
*
* ![](refCount.png)
*
* ## Example
*
* In the following example there are two intervals turned into connectable observables
* by using the *publish* operator. The first one uses the *refCount* operator, the
* second one does not use it. You will notice that a connectable observable does nothing
* until you call its connect function.
*
* ```ts
* import { interval, tap, publish, refCount } from 'rxjs';
*
* // Turn the interval observable into a ConnectableObservable (hot)
* const refCountInterval = interval(400).pipe(
* tap(num => console.log(`refCount ${ num }`)),
* publish(),
* refCount()
* );
*
* const publishedInterval = interval(400).pipe(
* tap(num => console.log(`publish ${ num }`)),
* publish()
* );
*
* refCountInterval.subscribe();
* refCountInterval.subscribe();
* // 'refCount 0' -----> 'refCount 1' -----> etc
* // All subscriptions will receive the same value and the tap (and
* // every other operator) before the `publish` operator will be executed
* // only once per event independently of the number of subscriptions.
*
* publishedInterval.subscribe();
* // Nothing happens until you call .connect() on the observable.
* ```
*
* @return A function that returns an Observable that automates the connection
* to ConnectableObservable.
* @see {@link ConnectableObservable}
* @see {@link share}
* @see {@link publish}
* @deprecated Replaced with the {@link share} operator. How `share` is used
* will depend on the connectable observable you created just prior to the
* `refCount` operator.
* Details: https://rxjs.dev/deprecations/multicasting
*/
export function refCount<T>(): MonoTypeOperatorFunction<T> {
return operate((source, subscriber) => {
let connection: Subscription | null = null;
(source as any)._refCount++;
const refCounter = createOperatorSubscriber(subscriber, undefined, undefined, undefined, () => {
if (!source || (source as any)._refCount <= 0 || 0 < --(source as any)._refCount) {
connection = null;
return;
}
///
// Compare the local RefCountSubscriber's connection Subscription to the
// connection Subscription on the shared ConnectableObservable. In cases
// where the ConnectableObservable source synchronously emits values, and
// the RefCountSubscriber's downstream Observers synchronously unsubscribe,
// execution continues to here before the RefCountOperator has a chance to
// supply the RefCountSubscriber with the shared connection Subscription.
// For example:
// ```
// range(0, 10).pipe(
// publish(),
// refCount(),
// take(5),
// )
// .subscribe();
// ```
// In order to account for this case, RefCountSubscriber should only dispose
// the ConnectableObservable's shared connection Subscription if the
// connection Subscription exists, *and* either:
// a. RefCountSubscriber doesn't have a reference to the shared connection
// Subscription yet, or,
// b. RefCountSubscriber's connection Subscription reference is identical
// to the shared connection Subscription
///
const sharedConnection = (source as any)._connection;
const conn = connection;
connection = null;
if (sharedConnection && (!conn || sharedConnection === conn)) {
sharedConnection.unsubscribe();
}
subscriber.unsubscribe();
});
source.subscribe(refCounter);
if (!refCounter.closed) {
connection = (source as ConnectableObservable<T>).connect();
}
});
}

View File

@@ -0,0 +1,28 @@
/**
Represents an array of strings split using a given character or character set.
Use-case: Defining the return type of a method like `String.prototype.split`.
@example
```
import {Split} from 'type-fest';
declare function split<S extends string, D extends string>(string: S, separator: D): Split<S, D>;
type Item = 'foo' | 'bar' | 'baz' | 'waldo';
const items = 'foo,bar,baz,waldo';
let array: Item[];
array = split(items, ',');
```
@category Template Literals
*/
export type Split<
S extends string,
Delimiter extends string
> = S extends `${infer Head}${Delimiter}${infer Tail}`
? [Head, ...Split<Tail, Delimiter>]
: S extends Delimiter
? []
: [S];

View File

@@ -0,0 +1,5 @@
var convert = require('./convert'),
func = convert('constant', require('../constant'), require('./_falseOptions'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -0,0 +1 @@
module.exports={A:{A:{"2":"J D E F A B CC"},B:{"1":"S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H","2":"C K L G M N O","66":"P Q R"},C:{"2":"0 1 2 3 4 5 6 7 8 9 DC tB I v J D E F A B C K L G M N O w g 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 h lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB EC FC"},D:{"1":"R S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB GC","2":"0 1 2 3 4 5 6 7 8 9 I v J D E F A B C K L G M N O w g 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 h","66":"lB mB nB oB pB P Q"},E:{"1":"6B 7B 8B 9B OC","2":"I v J D E F A B C K L G HC zB IC JC KC LC 0B qB rB 1B MC NC 2B 3B 4B 5B sB"},F:{"1":"gB hB iB jB kB h lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d e","2":"0 1 2 3 4 5 6 7 8 9 F B C G M N O w g 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 PC QC RC SC qB AC TC rB","66":"eB fB"},G:{"1":"6B 7B 8B 9B","2":"E zB UC BC VC WC XC YC ZC aC bC cC dC eC fC gC hC iC jC kC lC mC nC 2B 3B 4B 5B sB"},H:{"2":"oC"},I:{"1":"f","2":"tB I pC qC rC sC BC tC uC"},J:{"2":"D A"},K:{"1":"h","2":"A B C qB AC rB"},L:{"1":"H"},M:{"2":"H"},N:{"2":"A B"},O:{"2":"vC"},P:{"1":"g 3C 4C 5C sB 6C 7C 8C","2":"I wC xC yC zC 0C 0B 1C 2C"},Q:{"2":"1B"},R:{"1":"9C"},S:{"2":"AD BD"}},B:7,C:"URL Scroll-To-Text Fragment"};

View File

@@ -0,0 +1,44 @@
var compareAscending = require('./_compareAscending');
/**
* Used by `_.orderBy` to compare multiple properties of a value to another
* and stable sort them.
*
* If `orders` is unspecified, all values are sorted in ascending order. Otherwise,
* specify an order of "desc" for descending or "asc" for ascending sort order
* of corresponding values.
*
* @private
* @param {Object} object The object to compare.
* @param {Object} other The other object to compare.
* @param {boolean[]|string[]} orders The order to sort by for each property.
* @returns {number} Returns the sort order indicator for `object`.
*/
function compareMultiple(object, other, orders) {
var index = -1,
objCriteria = object.criteria,
othCriteria = other.criteria,
length = objCriteria.length,
ordersLength = orders.length;
while (++index < length) {
var result = compareAscending(objCriteria[index], othCriteria[index]);
if (result) {
if (index >= ordersLength) {
return result;
}
var order = orders[index];
return result * (order == 'desc' ? -1 : 1);
}
}
// Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications
// that causes it, under certain circumstances, to provide the same value for
// `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247
// for more details.
//
// This also ensures a stable sort in V8 and other engines.
// See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.
return object.index - other.index;
}
module.exports = compareMultiple;

View File

@@ -0,0 +1 @@
module.exports={A:{A:{"2":"J D E F A B CC"},B:{"1":"P Q R S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H","2":"C K L G M N O"},C:{"2":"0 1 2 3 4 5 6 7 8 9 DC tB I v J D E F A B C K L G M N O w g 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 h lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB EC FC"},D:{"1":"fB gB hB iB jB kB h lB mB nB oB pB P Q R S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB GC","2":"0 1 2 3 4 5 6 7 8 9 I v J D E F A B C K L G M N O w g 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 v J D E F A B C K L G HC zB IC JC KC LC 0B qB rB 1B MC NC 2B 3B 4B 5B sB 6B 7B 8B 9B OC"},F:{"1":"UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d e","2":"0 1 2 3 4 5 6 7 8 9 F B C G M N O w g x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB PC QC RC SC qB AC TC rB"},G:{"2":"E zB UC BC VC WC XC YC ZC aC bC cC dC eC fC gC hC iC jC kC lC mC nC 2B 3B 4B 5B sB 6B 7B 8B 9B"},H:{"2":"oC"},I:{"1":"f","2":"tB I pC qC rC sC BC tC uC"},J:{"2":"D A"},K:{"1":"h","2":"A B C qB AC rB"},L:{"1":"H"},M:{"2":"H"},N:{"2":"A B"},O:{"1":"vC"},P:{"2":"I g wC xC yC zC 0C 0B 1C 2C 3C 4C 5C sB 6C 7C 8C"},Q:{"1":"1B"},R:{"1":"9C"},S:{"2":"AD BD"}},B:4,C:"Gyroscope"};

View File

@@ -0,0 +1,10 @@
import { h } from 'preact';
import { BaseComponent, BaseProps } from '../base';
export interface MessageRowProps extends BaseProps {
message: string;
colSpan?: number;
className?: string;
}
export declare class MessageRow extends BaseComponent<MessageRowProps, {}> {
render(): h.JSX.Element;
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/fast-memoize/index.ts"],"names":[],"mappings":"AAIA,aAAK,IAAI,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;AAEnC,MAAM,WAAW,KAAK,CAAC,CAAC,EAAE,CAAC;IACzB,MAAM,EAAE,eAAe,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;CAC9B;AAED,UAAU,eAAe,CAAC,CAAC,EAAE,CAAC;IAC5B,IAAI,YAAY,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;CACvB;AAED,UAAU,YAAY,CAAC,CAAC,EAAE,CAAC;IACzB,GAAG,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAA;IACd,GAAG,CAAC,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,IAAI,CAAA;CAC5B;AAED,oBAAY,UAAU,GAAG,CAAC,IAAI,EAAE,GAAG,EAAE,KAAK,MAAM,CAAA;AAEhD,MAAM,WAAW,OAAO,CAAC,CAAC,SAAS,IAAI;IACrC,KAAK,CAAC,EAAE,KAAK,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,CAAA;IACpC,UAAU,CAAC,EAAE,UAAU,CAAA;IACvB,QAAQ,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,CAAA;CAC1B;AAED,MAAM,WAAW,eAAe,CAAC,CAAC,SAAS,IAAI;IAC7C,KAAK,EAAE,KAAK,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,CAAA;IACnC,UAAU,EAAE,UAAU,CAAA;CACvB;AAED,MAAM,WAAW,WAAW,CAAC,CAAC,SAAS,IAAI;IACzC,CAAC,EAAE,EAAE,CAAC,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAAA;CACjC;AAED,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,CAAC,SAAS,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,2BAa1E;AAYD,oBAAY,UAAU,GAAG,CAAC,CAAC,SAAS,IAAI,EACtC,IAAI,EAAE,OAAO,EACb,EAAE,EAAE,CAAC,EACL,KAAK,EAAE,YAAY,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,EAC1C,UAAU,EAAE,UAAU,EACtB,GAAG,EAAE,GAAG,KACL,GAAG,CAAA;AA4HR,MAAM,WAAW,UAAU,CAAC,CAAC,SAAS,IAAI;IACxC,QAAQ,EAAE,WAAW,CAAC,CAAC,CAAC,CAAA;IACxB,OAAO,EAAE,WAAW,CAAC,CAAC,CAAC,CAAA;CACxB;AAED,eAAO,MAAM,UAAU,EAAE,UAAU,CAAC,IAAI,CAGvC,CAAA"}

View File

@@ -0,0 +1,9 @@
'use strict';
var mod = require('../helpers/mod');
// https://262.ecma-international.org/5.1/#sec-5.2
module.exports = function modulo(x, y) {
return mod(x, y);
};

View File

@@ -0,0 +1,29 @@
import { map } from './map';
import { innerFrom } from '../observable/innerFrom';
import { operate } from '../util/lift';
import { createOperatorSubscriber } from './OperatorSubscriber';
export function exhaustMap(project, resultSelector) {
if (resultSelector) {
return function (source) {
return source.pipe(exhaustMap(function (a, i) { return innerFrom(project(a, i)).pipe(map(function (b, ii) { return resultSelector(a, b, i, ii); })); }));
};
}
return operate(function (source, subscriber) {
var index = 0;
var innerSub = null;
var isComplete = false;
source.subscribe(createOperatorSubscriber(subscriber, function (outerValue) {
if (!innerSub) {
innerSub = createOperatorSubscriber(subscriber, undefined, function () {
innerSub = null;
isComplete && subscriber.complete();
});
innerFrom(project(outerValue, index++)).subscribe(innerSub);
}
}, function () {
isComplete = true;
!innerSub && subscriber.complete();
}));
});
}
//# sourceMappingURL=exhaustMap.js.map

View File

@@ -0,0 +1,2 @@
declare function coerceToString(value: any): string | null;
export default coerceToString;