pax_global_header 0000666 0000000 0000000 00000000064 14717712160 0014520 g ustar 00root root 0000000 0000000 52 comment=235596f34785fd0cea3e329e81a7c7a063d3765c
mathiasbynens-regexpu-core-e35919f/ 0000775 0000000 0000000 00000000000 14717712160 0017337 5 ustar 00root root 0000000 0000000 mathiasbynens-regexpu-core-e35919f/.editorconfig 0000664 0000000 0000000 00000000301 14717712160 0022006 0 ustar 00root root 0000000 0000000 root = true
[*]
charset = utf-8
indent_style = tab
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
[{README.md,.travis.yml}]
indent_style = space
indent_size = 2
mathiasbynens-regexpu-core-e35919f/.gitattributes 0000664 0000000 0000000 00000000114 14717712160 0022226 0 ustar 00root root 0000000 0000000 # Automatically normalize line endings for all text-based files
* text=auto
mathiasbynens-regexpu-core-e35919f/.github/ 0000775 0000000 0000000 00000000000 14717712160 0020677 5 ustar 00root root 0000000 0000000 mathiasbynens-regexpu-core-e35919f/.github/workflows/ 0000775 0000000 0000000 00000000000 14717712160 0022734 5 ustar 00root root 0000000 0000000 mathiasbynens-regexpu-core-e35919f/.github/workflows/main.yml 0000664 0000000 0000000 00000002272 14717712160 0024406 0 ustar 00root root 0000000 0000000 name: run-checks
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
# Include all major maintenance + active LTS + current Node.js versions.
# https://github.com/nodejs/Release#release-schedule
node: [18, 20, 22]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node.js 22
uses: actions/setup-node@v3
with:
node-version: 22
- name: Install dependencies
run: npm install
- name: Build
run: npm run build
- name: Set up Node.js ${{ matrix.node }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- name: Test
run: npm test
node-6-compat:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node.js 6
uses: actions/setup-node@v3
with:
node-version: 6
- name: Install dependencies
run: npm install
- name: Install mocha 6
run: npm install mocha@6 -D --save
- name: Test
run: npm run test-node6
mathiasbynens-regexpu-core-e35919f/.github/workflows/publish-on-tag.yml 0000664 0000000 0000000 00000001354 14717712160 0026313 0 ustar 00root root 0000000 0000000 name: publish-on-tag
on:
push:
tags:
- '*'
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node.js 22
uses: actions/setup-node@v3
with:
node-version: 22
- name: Install dependencies
run: npm install
- name: Build
run: npm run build
- name: Test
run: npm test
- name: Publish
env:
NPM_TOKEN: ${{secrets.NPM_TOKEN}}
run: |
npm config set access public
npm config set registry 'https://wombat-dressing-room.appspot.com/'
npm config set '//wombat-dressing-room.appspot.com/:_authToken' '${NPM_TOKEN}'
npm publish
mathiasbynens-regexpu-core-e35919f/.gitignore 0000664 0000000 0000000 00000000347 14717712160 0021333 0 ustar 00root root 0000000 0000000 # Coverage report
coverage
# Installed npm modules
node_modules
# Folder view configuration files
.DS_Store
Desktop.ini
# Thumbnail cache files
._*
Thumbs.db
# Files that might appear on external disks
.Spotlight-V100
.Trashes
mathiasbynens-regexpu-core-e35919f/.npmrc 0000664 0000000 0000000 00000000023 14717712160 0020452 0 ustar 00root root 0000000 0000000 package-lock=false
mathiasbynens-regexpu-core-e35919f/LICENSE-MIT.txt 0000664 0000000 0000000 00000002065 14717712160 0021614 0 ustar 00root root 0000000 0000000 Copyright Mathias Bynens
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
mathiasbynens-regexpu-core-e35919f/README.md 0000664 0000000 0000000 00000017615 14717712160 0020630 0 ustar 00root root 0000000 0000000 # regexpu-core [](https://github.com/mathiasbynens/regexpu-core/actions?query=workflow%3Arun-checks) [](https://www.npmjs.com/package/regexpu-core)
_regexpu_ is a source code transpiler that enables the use of ES2015 Unicode regular expressions in JavaScript-of-today (ES5).
_regexpu-core_ contains _regexpu_’s core functionality, i.e. `rewritePattern(pattern, flag)`, which enables rewriting regular expressions that make use of [the ES2015 `u` flag](https://mathiasbynens.be/notes/es6-unicode-regex) into equivalent ES5-compatible regular expression patterns.
## Installation
To use _regexpu-core_ programmatically, install it as a dependency via [npm](https://www.npmjs.com/):
```bash
npm install regexpu-core --save
```
Then, `require` it:
```js
const rewritePattern = require('regexpu-core');
```
## API
This module exports a single function named `rewritePattern`.
### `rewritePattern(pattern, flags, options)`
This function takes a string that represents a regular expression pattern as well as a string representing its flags, and returns an ES5-compatible version of the pattern.
```js
rewritePattern('foo.bar', 'u', { unicodeFlag: "transform" });
// → 'foo(?:[\\0-\\t\\x0B\\f\\x0E-\\u2027\\u202A-\\uD7FF\\uDC00-\\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[\\uD800-\\uDBFF])bar'
rewritePattern('[\\u{1D306}-\\u{1D308}a-z]', 'u', { unicodeFlag: "transform" });
// → '(?:[a-z]|\\uD834[\\uDF06-\\uDF08])'
rewritePattern('[\\u{1D306}-\\u{1D308}a-z]', 'ui', { unicodeFlag: "transform" });
// → '(?:[a-z\\u017F\\u212A]|\\uD834[\\uDF06-\\uDF08])'
```
_regexpu-core_ can rewrite non-ES6 regular expressions too, which is useful to demonstrate how their behavior changes once the `u` and `i` flags are added:
```js
// In ES5, the dot operator only matches BMP symbols:
rewritePattern('foo.bar', '', { unicodeFlag: "transform" });
// → 'foo(?:[\\0-\\t\\x0B\\f\\x0E-\\u2027\\u202A-\\uFFFF])bar'
// But with the ES2015 `u` flag, it matches astral symbols too:
rewritePattern('foo.bar', 'u', { unicodeFlag: "transform" });
// → 'foo(?:[\\0-\\t\\x0B\\f\\x0E-\\u2027\\u202A-\\uD7FF\\uDC00-\\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[\\uD800-\\uDBFF])bar'
```
The optional `options` argument recognizes the following properties:
#### Stable regular expression features
These options can be set to `false` or `'transform'`. When using `'transform'`, the corresponding features are compiled to older syntax that can run in older browsers. When using `false` (the default), they are not compiled and they can be relied upon to compile more modern features.
- `unicodeFlag` - The `u` flag, enabling support for Unicode code point escapes in the form `\u{...}`.
```js
rewritePattern('\\u{ab}', '', {
unicodeFlag: 'transform'
});
// → '\\u{ab}'
rewritePattern('\\u{ab}', 'u', {
unicodeFlag: 'transform'
});
// → '\\xAB'
```
- `dotAllFlag` - The [`s` (`dotAll`) flag](https://github.com/mathiasbynens/es-regexp-dotall-flag).
```js
rewritePattern('.', '', {
dotAllFlag: 'transform'
});
// → '[\\0-\\t\\x0B\\f\\x0E-\\u2027\\u202A-\\uFFFF]'
rewritePattern('.', 's', {
dotAllFlag: 'transform'
});
// → '[\\0-\\uFFFF]'
rewritePattern('.', 'su', {
dotAllFlag: 'transform'
});
// → '(?:[\\0-\\uD7FF\\uE000-\\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF])'
```
- `unicodePropertyEscapes` - [Unicode property escapes](property-escapes.md).
By default they are compiled to Unicode code point escapes of the form `\u{...}`. If the `unicodeFlag` option is set to `'transform'` they often result in larger output, although there are cases (such as `\p{Lu}`) where it actually _decreases_ the output size.
```js
rewritePattern('\\p{Script_Extensions=Anatolian_Hieroglyphs}', 'u', {
unicodePropertyEscapes: 'transform'
});
// → '[\\u{14400}-\\u{14646}]'
rewritePattern('\\p{Script_Extensions=Anatolian_Hieroglyphs}', 'u', {
unicodeFlag: 'transform',
unicodePropertyEscapes: 'transform'
});
// → '(?:\\uD811[\\uDC00-\\uDE46])'
```
- `namedGroups` - [Named capture groups](https://github.com/tc39/proposal-regexp-named-groups).
```js
rewritePattern('(?.)\\k', '', {
namedGroups: 'transform'
});
// → '(.)\1'
```
- `unicodeSetsFlag` - [The `v` (`unicodeSets`) flag](https://github.com/tc39/proposal-regexp-set-notation)
```js
rewritePattern('[\\p{Emoji}&&\\p{ASCII}]', 'v', {
unicodeSetsFlag: 'transform'
});
// → '[#\\*0-9]'
```
By default, patterns with the `v` flag are transformed to patterns with the `u` flag. If you want to downlevel them more you can set the `unicodeFlag: 'transform'` option.
```js
rewritePattern('[^[a-h]&&[f-z]]', 'v', {
unicodeSetsFlag: 'transform'
});
// → '[^f-h]' (to be used with /u)
```
```js
rewritePattern('[^[a-h]&&[f-z]]', 'v', {
unicodeSetsFlag: 'transform',
unicodeFlag: 'transform'
});
// → '(?:(?![f-h])[\s\S])' (to be used without /u)
```
- `modifiers` - [Inline `i`/`m`/`s` modifiers](https://github.com/tc39/proposal-regexp-modifiers)
```js
rewritePattern('(?i:[a-z])[a-z]', '', {
modifiers: 'transform'
});
// → '(?:[a-zA-Z])([a-z])'
```
#### Experimental regular expression features
These options can be set to `false`, `'parse'` and `'transform'`. When using `'transform'`, the corresponding features are compiled to older syntax that can run in older browsers. When using `'parse'`, they are parsed and left as-is in the output pattern. When using `false` (the default), they result in a syntax error if used.
Once these features become stable (when the proposals are accepted as part of ECMAScript), they will be parsed by default and thus `'parse'` will behave like `false`.
#### Miscellaneous options
- `onNamedGroup`
This option is a function that gets called when a named capture group is found. It receives two parameters:
the name of the group, and its index.
```js
rewritePattern('(?.)\\k', '', {
onNamedGroup(name, index) {
console.log(name, index);
// → 'name', 1
}
});
```
- `onNewFlags`
This option is a function that gets called to pass the flags that the resulting pattern must be interpreted with.
```js
rewritePattern('abc', 'um', '', {
unicodeFlag: 'transform',
onNewFlags(flags) {
console.log(flags);
// → 'm'
}
})
```
### Caveats
- [Lookbehind assertions](https://github.com/tc39/proposal-regexp-lookbehind) cannot be transformed to older syntax.
- When using `namedGroups: 'transform'`, _regexpu-core_ only takes care of the _syntax_: you will still need a runtime wrapper around the regular expression to populate the `.groups` property of `RegExp.prototype.match()`'s result. If you are using _regexpu-core_ via Babel, it's handled automatically.
## For maintainers
### How to publish a new release
1. On the `main` branch, bump the version number in `package.json`:
```sh
npm version patch -m 'Release v%s'
```
Instead of `patch`, use `minor` or `major` [as needed](https://semver.org/).
Note that this produces a Git commit + tag.
1. Push the release commit and tag:
```sh
git push --follow-tags
```
Our CI then automatically publishes the new release to npm.
1. Once the release has been published to npm, update [`regexpu`](https://github.com/mathiasbynens/regexpu) to make use of it, and [cut a new release of `regexpu` as well](https://github.com/mathiasbynens/regexpu#how-to-publish-a-new-release).
## Author
| [](https://twitter.com/mathias "Follow @mathias on Twitter") |
|---|
| [Mathias Bynens](https://mathiasbynens.be/) |
## License
_regexpu-core_ is available under the [MIT](https://mths.be/mit) license.
mathiasbynens-regexpu-core-e35919f/data/ 0000775 0000000 0000000 00000000000 14717712160 0020250 5 ustar 00root root 0000000 0000000 mathiasbynens-regexpu-core-e35919f/data/all-characters.js 0000664 0000000 0000000 00000015146 14717712160 0023502 0 ustar 00root root 0000000 0000000 // Generated using `npm run build`. Do not edit.
'use strict';
const regenerate = require('regenerate');
exports.UNICODE_SET = regenerate()
.addRange(0x0, 0x10FFFF)
exports.UNICODE_IV_SET = regenerate(0xD7, 0x101, 0x103, 0x105, 0x107, 0x109, 0x10B, 0x10D, 0x10F, 0x111, 0x113, 0x115, 0x117, 0x119, 0x11B, 0x11D, 0x11F, 0x121, 0x123, 0x125, 0x127, 0x129, 0x12B, 0x12D, 0x133, 0x135, 0x13A, 0x13C, 0x13E, 0x140, 0x142, 0x144, 0x146, 0x14B, 0x14D, 0x14F, 0x151, 0x153, 0x155, 0x157, 0x159, 0x15B, 0x15D, 0x15F, 0x161, 0x163, 0x165, 0x167, 0x169, 0x16B, 0x16D, 0x16F, 0x171, 0x173, 0x175, 0x177, 0x17A, 0x17C, 0x17E, 0x180, 0x183, 0x185, 0x188, 0x192, 0x195, 0x19E, 0x1A1, 0x1A3, 0x1A5, 0x1A8, 0x1AD, 0x1B0, 0x1B4, 0x1B6, 0x1C6, 0x1C9, 0x1CC, 0x1CE, 0x1D0, 0x1D2, 0x1D4, 0x1D6, 0x1D8, 0x1DA, 0x1DF, 0x1E1, 0x1E3, 0x1E5, 0x1E7, 0x1E9, 0x1EB, 0x1ED, 0x1F3, 0x1F5, 0x1F9, 0x1FB, 0x1FD, 0x1FF, 0x201, 0x203, 0x205, 0x207, 0x209, 0x20B, 0x20D, 0x20F, 0x211, 0x213, 0x215, 0x217, 0x219, 0x21B, 0x21D, 0x21F, 0x221, 0x223, 0x225, 0x227, 0x229, 0x22B, 0x22D, 0x22F, 0x231, 0x23C, 0x242, 0x247, 0x249, 0x24B, 0x24D, 0x371, 0x387, 0x38B, 0x38D, 0x390, 0x3A2, 0x3D7, 0x3D9, 0x3DB, 0x3DD, 0x3DF, 0x3E1, 0x3E3, 0x3E5, 0x3E7, 0x3E9, 0x3EB, 0x3ED, 0x3EF, 0x3F6, 0x3F8, 0x461, 0x463, 0x465, 0x467, 0x469, 0x46B, 0x46D, 0x46F, 0x471, 0x473, 0x475, 0x477, 0x479, 0x47B, 0x47D, 0x47F, 0x48B, 0x48D, 0x48F, 0x491, 0x493, 0x495, 0x497, 0x499, 0x49B, 0x49D, 0x49F, 0x4A1, 0x4A3, 0x4A5, 0x4A7, 0x4A9, 0x4AB, 0x4AD, 0x4AF, 0x4B1, 0x4B3, 0x4B5, 0x4B7, 0x4B9, 0x4BB, 0x4BD, 0x4BF, 0x4C2, 0x4C4, 0x4C6, 0x4C8, 0x4CA, 0x4CC, 0x4D1, 0x4D3, 0x4D5, 0x4D7, 0x4D9, 0x4DB, 0x4DD, 0x4DF, 0x4E1, 0x4E3, 0x4E5, 0x4E7, 0x4E9, 0x4EB, 0x4ED, 0x4EF, 0x4F1, 0x4F3, 0x4F5, 0x4F7, 0x4F9, 0x4FB, 0x4FD, 0x4FF, 0x501, 0x503, 0x505, 0x507, 0x509, 0x50B, 0x50D, 0x50F, 0x511, 0x513, 0x515, 0x517, 0x519, 0x51B, 0x51D, 0x51F, 0x521, 0x523, 0x525, 0x527, 0x529, 0x52B, 0x52D, 0x10C6, 0x1E01, 0x1E03, 0x1E05, 0x1E07, 0x1E09, 0x1E0B, 0x1E0D, 0x1E0F, 0x1E11, 0x1E13, 0x1E15, 0x1E17, 0x1E19, 0x1E1B, 0x1E1D, 0x1E1F, 0x1E21, 0x1E23, 0x1E25, 0x1E27, 0x1E29, 0x1E2B, 0x1E2D, 0x1E2F, 0x1E31, 0x1E33, 0x1E35, 0x1E37, 0x1E39, 0x1E3B, 0x1E3D, 0x1E3F, 0x1E41, 0x1E43, 0x1E45, 0x1E47, 0x1E49, 0x1E4B, 0x1E4D, 0x1E4F, 0x1E51, 0x1E53, 0x1E55, 0x1E57, 0x1E59, 0x1E5B, 0x1E5D, 0x1E5F, 0x1E61, 0x1E63, 0x1E65, 0x1E67, 0x1E69, 0x1E6B, 0x1E6D, 0x1E6F, 0x1E71, 0x1E73, 0x1E75, 0x1E77, 0x1E79, 0x1E7B, 0x1E7D, 0x1E7F, 0x1E81, 0x1E83, 0x1E85, 0x1E87, 0x1E89, 0x1E8B, 0x1E8D, 0x1E8F, 0x1E91, 0x1E93, 0x1E9F, 0x1EA1, 0x1EA3, 0x1EA5, 0x1EA7, 0x1EA9, 0x1EAB, 0x1EAD, 0x1EAF, 0x1EB1, 0x1EB3, 0x1EB5, 0x1EB7, 0x1EB9, 0x1EBB, 0x1EBD, 0x1EBF, 0x1EC1, 0x1EC3, 0x1EC5, 0x1EC7, 0x1EC9, 0x1ECB, 0x1ECD, 0x1ECF, 0x1ED1, 0x1ED3, 0x1ED5, 0x1ED7, 0x1ED9, 0x1EDB, 0x1EDD, 0x1EDF, 0x1EE1, 0x1EE3, 0x1EE5, 0x1EE7, 0x1EE9, 0x1EEB, 0x1EED, 0x1EEF, 0x1EF1, 0x1EF3, 0x1EF5, 0x1EF7, 0x1EF9, 0x1EFB, 0x1EFD, 0x1F5A, 0x1F5C, 0x1F5E, 0x1FBD, 0x2C61, 0x2C68, 0x2C6A, 0x2C6C, 0x2C71, 0x2C81, 0x2C83, 0x2C85, 0x2C87, 0x2C89, 0x2C8B, 0x2C8D, 0x2C8F, 0x2C91, 0x2C93, 0x2C95, 0x2C97, 0x2C99, 0x2C9B, 0x2C9D, 0x2C9F, 0x2CA1, 0x2CA3, 0x2CA5, 0x2CA7, 0x2CA9, 0x2CAB, 0x2CAD, 0x2CAF, 0x2CB1, 0x2CB3, 0x2CB5, 0x2CB7, 0x2CB9, 0x2CBB, 0x2CBD, 0x2CBF, 0x2CC1, 0x2CC3, 0x2CC5, 0x2CC7, 0x2CC9, 0x2CCB, 0x2CCD, 0x2CCF, 0x2CD1, 0x2CD3, 0x2CD5, 0x2CD7, 0x2CD9, 0x2CDB, 0x2CDD, 0x2CDF, 0x2CE1, 0x2CEC, 0xA641, 0xA643, 0xA645, 0xA647, 0xA649, 0xA64B, 0xA64D, 0xA64F, 0xA651, 0xA653, 0xA655, 0xA657, 0xA659, 0xA65B, 0xA65D, 0xA65F, 0xA661, 0xA663, 0xA665, 0xA667, 0xA669, 0xA66B, 0xA681, 0xA683, 0xA685, 0xA687, 0xA689, 0xA68B, 0xA68D, 0xA68F, 0xA691, 0xA693, 0xA695, 0xA697, 0xA699, 0xA723, 0xA725, 0xA727, 0xA729, 0xA72B, 0xA72D, 0xA733, 0xA735, 0xA737, 0xA739, 0xA73B, 0xA73D, 0xA73F, 0xA741, 0xA743, 0xA745, 0xA747, 0xA749, 0xA74B, 0xA74D, 0xA74F, 0xA751, 0xA753, 0xA755, 0xA757, 0xA759, 0xA75B, 0xA75D, 0xA75F, 0xA761, 0xA763, 0xA765, 0xA767, 0xA769, 0xA76B, 0xA76D, 0xA77A, 0xA77C, 0xA77F, 0xA781, 0xA783, 0xA785, 0xA78C, 0xA791, 0xA797, 0xA799, 0xA79B, 0xA79D, 0xA79F, 0xA7A1, 0xA7A3, 0xA7A5, 0xA7A7, 0xA7A9, 0xA7AF, 0xA7B5, 0xA7B7, 0xA7B9, 0xA7BB, 0xA7BD, 0xA7BF, 0xA7C1, 0xA7C3, 0xA7C8, 0xA7CA, 0xA7D7, 0xA7D9, 0xA7DB, 0x1057B, 0x1058B, 0x10593)
.addRange(0x0, 0x40)
.addRange(0x5B, 0xB4)
.addRange(0xB6, 0xBF)
.addRange(0xDF, 0xFF)
.addRange(0x12F, 0x131)
.addRange(0x137, 0x138)
.addRange(0x148, 0x149)
.addRange(0x18C, 0x18D)
.addRange(0x199, 0x19B)
.addRange(0x1AA, 0x1AB)
.addRange(0x1B9, 0x1BB)
.addRange(0x1BD, 0x1C3)
.addRange(0x1DC, 0x1DD)
.addRange(0x1EF, 0x1F0)
.addRange(0x233, 0x239)
.addRange(0x23F, 0x240)
.addRange(0x24F, 0x344)
.addRange(0x346, 0x36F)
.addRange(0x373, 0x375)
.addRange(0x377, 0x37E)
.addRange(0x380, 0x385)
.addRange(0x3AC, 0x3C1)
.addRange(0x3C3, 0x3CE)
.addRange(0x3D2, 0x3D4)
.addRange(0x3F2, 0x3F3)
.addRange(0x3FB, 0x3FC)
.addRange(0x430, 0x45F)
.addRange(0x481, 0x489)
.addRange(0x4CE, 0x4CF)
.addRange(0x52F, 0x530)
.addRange(0x557, 0x109F)
.addRange(0x10C8, 0x10CC)
.addRange(0x10CE, 0x13F7)
.addRange(0x13FE, 0x1C7F)
.addRange(0x1C8A, 0x1C8F)
.addRange(0x1CBB, 0x1CBC)
.addRange(0x1CC0, 0x1DFF)
.addRange(0x1E95, 0x1E9A)
.addRange(0x1E9C, 0x1E9D)
.addRange(0x1EFF, 0x1F07)
.addRange(0x1F10, 0x1F17)
.addRange(0x1F1E, 0x1F27)
.addRange(0x1F30, 0x1F37)
.addRange(0x1F40, 0x1F47)
.addRange(0x1F4E, 0x1F58)
.addRange(0x1F60, 0x1F67)
.addRange(0x1F70, 0x1F87)
.addRange(0x1F90, 0x1F97)
.addRange(0x1FA0, 0x1FA7)
.addRange(0x1FB0, 0x1FB7)
.addRange(0x1FBF, 0x1FC7)
.addRange(0x1FCD, 0x1FD2)
.addRange(0x1FD4, 0x1FD7)
.addRange(0x1FDC, 0x1FE2)
.addRange(0x1FE4, 0x1FE7)
.addRange(0x1FED, 0x1FF7)
.addRange(0x1FFD, 0x2125)
.addRange(0x2127, 0x2129)
.addRange(0x212C, 0x2131)
.addRange(0x2133, 0x215F)
.addRange(0x2170, 0x2182)
.addRange(0x2184, 0x24B5)
.addRange(0x24D0, 0x2BFF)
.addRange(0x2C30, 0x2C5F)
.addRange(0x2C65, 0x2C66)
.addRange(0x2C73, 0x2C74)
.addRange(0x2C76, 0x2C7D)
.addRange(0x2CE3, 0x2CEA)
.addRange(0x2CEE, 0x2CF1)
.addRange(0x2CF3, 0xA63F)
.addRange(0xA66D, 0xA67F)
.addRange(0xA69B, 0xA721)
.addRange(0xA72F, 0xA731)
.addRange(0xA76F, 0xA778)
.addRange(0xA787, 0xA78A)
.addRange(0xA78E, 0xA78F)
.addRange(0xA793, 0xA795)
.addRange(0xA7CD, 0xA7CF)
.addRange(0xA7D1, 0xA7D5)
.addRange(0xA7DD, 0xA7F4)
.addRange(0xA7F6, 0xAB6F)
.addRange(0xABC0, 0xFB04)
.addRange(0xFB06, 0xFF20)
.addRange(0xFF3B, 0x103FF)
.addRange(0x10428, 0x104AF)
.addRange(0x104D4, 0x1056F)
.addRange(0x10596, 0x10C7F)
.addRange(0x10CB3, 0x10D4F)
.addRange(0x10D66, 0x1189F)
.addRange(0x118C0, 0x16E3F)
.addRange(0x16E60, 0x1E8FF)
.addRange(0x1E922, 0x10FFFF)
mathiasbynens-regexpu-core-e35919f/data/character-class-escape-sets.js 0000664 0000000 0000000 00000006570 14717712160 0026067 0 ustar 00root root 0000000 0000000 // Generated using `npm run build`. Do not edit.
'use strict';
const regenerate = require('regenerate');
const UNICODE_IV_SET = require('./all-characters.js').UNICODE_IV_SET;
exports.REGULAR = new Map([
['d', regenerate()
.addRange(0x30, 0x39)],
['D', regenerate()
.addRange(0x0, 0x2F)
.addRange(0x3A, 0xFFFF)],
['s', regenerate(0x20, 0xA0, 0x1680, 0x202F, 0x205F, 0x3000, 0xFEFF)
.addRange(0x9, 0xD)
.addRange(0x2000, 0x200A)
.addRange(0x2028, 0x2029)],
['S', regenerate()
.addRange(0x0, 0x8)
.addRange(0xE, 0x1F)
.addRange(0x21, 0x9F)
.addRange(0xA1, 0x167F)
.addRange(0x1681, 0x1FFF)
.addRange(0x200B, 0x2027)
.addRange(0x202A, 0x202E)
.addRange(0x2030, 0x205E)
.addRange(0x2060, 0x2FFF)
.addRange(0x3001, 0xFEFE)
.addRange(0xFF00, 0xFFFF)],
['w', regenerate(0x5F)
.addRange(0x30, 0x39)
.addRange(0x41, 0x5A)
.addRange(0x61, 0x7A)],
['W', regenerate(0x60)
.addRange(0x0, 0x2F)
.addRange(0x3A, 0x40)
.addRange(0x5B, 0x5E)
.addRange(0x7B, 0xFFFF)]
]);
exports.UNICODE = new Map([
['d', regenerate()
.addRange(0x30, 0x39)],
['D', regenerate()
.addRange(0x0, 0x2F)
.addRange(0x3A, 0x10FFFF)],
['s', regenerate(0x20, 0xA0, 0x1680, 0x202F, 0x205F, 0x3000, 0xFEFF)
.addRange(0x9, 0xD)
.addRange(0x2000, 0x200A)
.addRange(0x2028, 0x2029)],
['S', regenerate()
.addRange(0x0, 0x8)
.addRange(0xE, 0x1F)
.addRange(0x21, 0x9F)
.addRange(0xA1, 0x167F)
.addRange(0x1681, 0x1FFF)
.addRange(0x200B, 0x2027)
.addRange(0x202A, 0x202E)
.addRange(0x2030, 0x205E)
.addRange(0x2060, 0x2FFF)
.addRange(0x3001, 0xFEFE)
.addRange(0xFF00, 0x10FFFF)],
['w', regenerate(0x5F)
.addRange(0x30, 0x39)
.addRange(0x41, 0x5A)
.addRange(0x61, 0x7A)],
['W', regenerate(0x60)
.addRange(0x0, 0x2F)
.addRange(0x3A, 0x40)
.addRange(0x5B, 0x5E)
.addRange(0x7B, 0x10FFFF)]
]);
exports.UNICODE_IGNORE_CASE = new Map([
['d', regenerate()
.addRange(0x30, 0x39)],
['D', regenerate()
.addRange(0x0, 0x2F)
.addRange(0x3A, 0x10FFFF)],
['s', regenerate(0x20, 0xA0, 0x1680, 0x202F, 0x205F, 0x3000, 0xFEFF)
.addRange(0x9, 0xD)
.addRange(0x2000, 0x200A)
.addRange(0x2028, 0x2029)],
['S', regenerate()
.addRange(0x0, 0x8)
.addRange(0xE, 0x1F)
.addRange(0x21, 0x9F)
.addRange(0xA1, 0x167F)
.addRange(0x1681, 0x1FFF)
.addRange(0x200B, 0x2027)
.addRange(0x202A, 0x202E)
.addRange(0x2030, 0x205E)
.addRange(0x2060, 0x2FFF)
.addRange(0x3001, 0xFEFE)
.addRange(0xFF00, 0x10FFFF)],
['w', regenerate(0x5F, 0x17F, 0x212A)
.addRange(0x30, 0x39)
.addRange(0x41, 0x5A)
.addRange(0x61, 0x7A)],
['W', regenerate(0x60)
.addRange(0x0, 0x2F)
.addRange(0x3A, 0x40)
.addRange(0x5B, 0x5E)
.addRange(0x7B, 0x17E)
.addRange(0x180, 0x2129)
.addRange(0x212B, 0x10FFFF)]
]);
exports.UNICODESET_IGNORE_CASE = new Map([
['d', regenerate()
.addRange(0x30, 0x39)],
['D', UNICODE_IV_SET.clone().remove(regenerate()
.addRange(0x30, 0x39))],
['s', regenerate(0x20, 0xA0, 0x1680, 0x202F, 0x205F, 0x3000, 0xFEFF)
.addRange(0x9, 0xD)
.addRange(0x2000, 0x200A)
.addRange(0x2028, 0x2029)],
['S', UNICODE_IV_SET.clone().remove(regenerate(0x20, 0xA0, 0x1680, 0x202F, 0x205F, 0x3000, 0xFEFF)
.addRange(0x9, 0xD)
.addRange(0x2000, 0x200A)
.addRange(0x2028, 0x2029))],
['w', regenerate(0x5F)
.addRange(0x30, 0x39)
.addRange(0x61, 0x7A)],
['W', UNICODE_IV_SET.clone().remove(regenerate(0x5F)
.addRange(0x30, 0x39)
.addRange(0x61, 0x7A))]
]);
mathiasbynens-regexpu-core-e35919f/data/i-bmp-mappings.js 0000664 0000000 0000000 00000120557 14717712160 0023440 0 ustar 00root root 0000000 0000000 module.exports = new Map([
[0xB5, 0x3BC],
[0xC0, 0xE0],
[0xC1, 0xE1],
[0xC2, 0xE2],
[0xC3, 0xE3],
[0xC4, 0xE4],
[0xC5, 0xE5],
[0xC6, 0xE6],
[0xC7, 0xE7],
[0xC8, 0xE8],
[0xC9, 0xE9],
[0xCA, 0xEA],
[0xCB, 0xEB],
[0xCC, 0xEC],
[0xCD, 0xED],
[0xCE, 0xEE],
[0xCF, 0xEF],
[0xD0, 0xF0],
[0xD1, 0xF1],
[0xD2, 0xF2],
[0xD3, 0xF3],
[0xD4, 0xF4],
[0xD5, 0xF5],
[0xD6, 0xF6],
[0xD8, 0xF8],
[0xD9, 0xF9],
[0xDA, 0xFA],
[0xDB, 0xFB],
[0xDC, 0xFC],
[0xDD, 0xFD],
[0xDE, 0xFE],
[0xE0, 0xC0],
[0xE1, 0xC1],
[0xE2, 0xC2],
[0xE3, 0xC3],
[0xE4, 0xC4],
[0xE5, 0xC5],
[0xE6, 0xC6],
[0xE7, 0xC7],
[0xE8, 0xC8],
[0xE9, 0xC9],
[0xEA, 0xCA],
[0xEB, 0xCB],
[0xEC, 0xCC],
[0xED, 0xCD],
[0xEE, 0xCE],
[0xEF, 0xCF],
[0xF0, 0xD0],
[0xF1, 0xD1],
[0xF2, 0xD2],
[0xF3, 0xD3],
[0xF4, 0xD4],
[0xF5, 0xD5],
[0xF6, 0xD6],
[0xF8, 0xD8],
[0xF9, 0xD9],
[0xFA, 0xDA],
[0xFB, 0xDB],
[0xFC, 0xDC],
[0xFD, 0xDD],
[0xFE, 0xDE],
[0xFF, 0x178],
[0x100, 0x101],
[0x101, 0x100],
[0x102, 0x103],
[0x103, 0x102],
[0x104, 0x105],
[0x105, 0x104],
[0x106, 0x107],
[0x107, 0x106],
[0x108, 0x109],
[0x109, 0x108],
[0x10A, 0x10B],
[0x10B, 0x10A],
[0x10C, 0x10D],
[0x10D, 0x10C],
[0x10E, 0x10F],
[0x10F, 0x10E],
[0x110, 0x111],
[0x111, 0x110],
[0x112, 0x113],
[0x113, 0x112],
[0x114, 0x115],
[0x115, 0x114],
[0x116, 0x117],
[0x117, 0x116],
[0x118, 0x119],
[0x119, 0x118],
[0x11A, 0x11B],
[0x11B, 0x11A],
[0x11C, 0x11D],
[0x11D, 0x11C],
[0x11E, 0x11F],
[0x11F, 0x11E],
[0x120, 0x121],
[0x121, 0x120],
[0x122, 0x123],
[0x123, 0x122],
[0x124, 0x125],
[0x125, 0x124],
[0x126, 0x127],
[0x127, 0x126],
[0x128, 0x129],
[0x129, 0x128],
[0x12A, 0x12B],
[0x12B, 0x12A],
[0x12C, 0x12D],
[0x12D, 0x12C],
[0x12E, 0x12F],
[0x12F, 0x12E],
[0x132, 0x133],
[0x133, 0x132],
[0x134, 0x135],
[0x135, 0x134],
[0x136, 0x137],
[0x137, 0x136],
[0x139, 0x13A],
[0x13A, 0x139],
[0x13B, 0x13C],
[0x13C, 0x13B],
[0x13D, 0x13E],
[0x13E, 0x13D],
[0x13F, 0x140],
[0x140, 0x13F],
[0x141, 0x142],
[0x142, 0x141],
[0x143, 0x144],
[0x144, 0x143],
[0x145, 0x146],
[0x146, 0x145],
[0x147, 0x148],
[0x148, 0x147],
[0x14A, 0x14B],
[0x14B, 0x14A],
[0x14C, 0x14D],
[0x14D, 0x14C],
[0x14E, 0x14F],
[0x14F, 0x14E],
[0x150, 0x151],
[0x151, 0x150],
[0x152, 0x153],
[0x153, 0x152],
[0x154, 0x155],
[0x155, 0x154],
[0x156, 0x157],
[0x157, 0x156],
[0x158, 0x159],
[0x159, 0x158],
[0x15A, 0x15B],
[0x15B, 0x15A],
[0x15C, 0x15D],
[0x15D, 0x15C],
[0x15E, 0x15F],
[0x15F, 0x15E],
[0x160, 0x161],
[0x161, 0x160],
[0x162, 0x163],
[0x163, 0x162],
[0x164, 0x165],
[0x165, 0x164],
[0x166, 0x167],
[0x167, 0x166],
[0x168, 0x169],
[0x169, 0x168],
[0x16A, 0x16B],
[0x16B, 0x16A],
[0x16C, 0x16D],
[0x16D, 0x16C],
[0x16E, 0x16F],
[0x16F, 0x16E],
[0x170, 0x171],
[0x171, 0x170],
[0x172, 0x173],
[0x173, 0x172],
[0x174, 0x175],
[0x175, 0x174],
[0x176, 0x177],
[0x177, 0x176],
[0x178, 0xFF],
[0x179, 0x17A],
[0x17A, 0x179],
[0x17B, 0x17C],
[0x17C, 0x17B],
[0x17D, 0x17E],
[0x17E, 0x17D],
[0x180, 0x243],
[0x181, 0x253],
[0x182, 0x183],
[0x183, 0x182],
[0x184, 0x185],
[0x185, 0x184],
[0x186, 0x254],
[0x187, 0x188],
[0x188, 0x187],
[0x189, 0x256],
[0x18A, 0x257],
[0x18B, 0x18C],
[0x18C, 0x18B],
[0x18E, 0x1DD],
[0x18F, 0x259],
[0x190, 0x25B],
[0x191, 0x192],
[0x192, 0x191],
[0x193, 0x260],
[0x194, 0x263],
[0x195, 0x1F6],
[0x196, 0x269],
[0x197, 0x268],
[0x198, 0x199],
[0x199, 0x198],
[0x19A, 0x23D],
[0x19B, 0xA7DC],
[0x19C, 0x26F],
[0x19D, 0x272],
[0x19E, 0x220],
[0x19F, 0x275],
[0x1A0, 0x1A1],
[0x1A1, 0x1A0],
[0x1A2, 0x1A3],
[0x1A3, 0x1A2],
[0x1A4, 0x1A5],
[0x1A5, 0x1A4],
[0x1A6, 0x280],
[0x1A7, 0x1A8],
[0x1A8, 0x1A7],
[0x1A9, 0x283],
[0x1AC, 0x1AD],
[0x1AD, 0x1AC],
[0x1AE, 0x288],
[0x1AF, 0x1B0],
[0x1B0, 0x1AF],
[0x1B1, 0x28A],
[0x1B2, 0x28B],
[0x1B3, 0x1B4],
[0x1B4, 0x1B3],
[0x1B5, 0x1B6],
[0x1B6, 0x1B5],
[0x1B7, 0x292],
[0x1B8, 0x1B9],
[0x1B9, 0x1B8],
[0x1BC, 0x1BD],
[0x1BD, 0x1BC],
[0x1BF, 0x1F7],
[0x1C4, 0x1C6],
[0x1C5, 0x1C6],
[0x1C6, [
0x1C4,
0x1C5
]],
[0x1C7, 0x1C9],
[0x1C8, 0x1C9],
[0x1C9, [
0x1C7,
0x1C8
]],
[0x1CA, 0x1CC],
[0x1CB, 0x1CC],
[0x1CC, [
0x1CA,
0x1CB
]],
[0x1CD, 0x1CE],
[0x1CE, 0x1CD],
[0x1CF, 0x1D0],
[0x1D0, 0x1CF],
[0x1D1, 0x1D2],
[0x1D2, 0x1D1],
[0x1D3, 0x1D4],
[0x1D4, 0x1D3],
[0x1D5, 0x1D6],
[0x1D6, 0x1D5],
[0x1D7, 0x1D8],
[0x1D8, 0x1D7],
[0x1D9, 0x1DA],
[0x1DA, 0x1D9],
[0x1DB, 0x1DC],
[0x1DC, 0x1DB],
[0x1DD, 0x18E],
[0x1DE, 0x1DF],
[0x1DF, 0x1DE],
[0x1E0, 0x1E1],
[0x1E1, 0x1E0],
[0x1E2, 0x1E3],
[0x1E3, 0x1E2],
[0x1E4, 0x1E5],
[0x1E5, 0x1E4],
[0x1E6, 0x1E7],
[0x1E7, 0x1E6],
[0x1E8, 0x1E9],
[0x1E9, 0x1E8],
[0x1EA, 0x1EB],
[0x1EB, 0x1EA],
[0x1EC, 0x1ED],
[0x1ED, 0x1EC],
[0x1EE, 0x1EF],
[0x1EF, 0x1EE],
[0x1F1, 0x1F3],
[0x1F2, 0x1F3],
[0x1F3, [
0x1F1,
0x1F2
]],
[0x1F4, 0x1F5],
[0x1F5, 0x1F4],
[0x1F6, 0x195],
[0x1F7, 0x1BF],
[0x1F8, 0x1F9],
[0x1F9, 0x1F8],
[0x1FA, 0x1FB],
[0x1FB, 0x1FA],
[0x1FC, 0x1FD],
[0x1FD, 0x1FC],
[0x1FE, 0x1FF],
[0x1FF, 0x1FE],
[0x200, 0x201],
[0x201, 0x200],
[0x202, 0x203],
[0x203, 0x202],
[0x204, 0x205],
[0x205, 0x204],
[0x206, 0x207],
[0x207, 0x206],
[0x208, 0x209],
[0x209, 0x208],
[0x20A, 0x20B],
[0x20B, 0x20A],
[0x20C, 0x20D],
[0x20D, 0x20C],
[0x20E, 0x20F],
[0x20F, 0x20E],
[0x210, 0x211],
[0x211, 0x210],
[0x212, 0x213],
[0x213, 0x212],
[0x214, 0x215],
[0x215, 0x214],
[0x216, 0x217],
[0x217, 0x216],
[0x218, 0x219],
[0x219, 0x218],
[0x21A, 0x21B],
[0x21B, 0x21A],
[0x21C, 0x21D],
[0x21D, 0x21C],
[0x21E, 0x21F],
[0x21F, 0x21E],
[0x220, 0x19E],
[0x222, 0x223],
[0x223, 0x222],
[0x224, 0x225],
[0x225, 0x224],
[0x226, 0x227],
[0x227, 0x226],
[0x228, 0x229],
[0x229, 0x228],
[0x22A, 0x22B],
[0x22B, 0x22A],
[0x22C, 0x22D],
[0x22D, 0x22C],
[0x22E, 0x22F],
[0x22F, 0x22E],
[0x230, 0x231],
[0x231, 0x230],
[0x232, 0x233],
[0x233, 0x232],
[0x23A, 0x2C65],
[0x23B, 0x23C],
[0x23C, 0x23B],
[0x23D, 0x19A],
[0x23E, 0x2C66],
[0x23F, 0x2C7E],
[0x240, 0x2C7F],
[0x241, 0x242],
[0x242, 0x241],
[0x243, 0x180],
[0x244, 0x289],
[0x245, 0x28C],
[0x246, 0x247],
[0x247, 0x246],
[0x248, 0x249],
[0x249, 0x248],
[0x24A, 0x24B],
[0x24B, 0x24A],
[0x24C, 0x24D],
[0x24D, 0x24C],
[0x24E, 0x24F],
[0x24F, 0x24E],
[0x250, 0x2C6F],
[0x251, 0x2C6D],
[0x252, 0x2C70],
[0x253, 0x181],
[0x254, 0x186],
[0x256, 0x189],
[0x257, 0x18A],
[0x259, 0x18F],
[0x25B, 0x190],
[0x25C, 0xA7AB],
[0x260, 0x193],
[0x261, 0xA7AC],
[0x263, 0x194],
[0x264, 0xA7CB],
[0x265, 0xA78D],
[0x266, 0xA7AA],
[0x268, 0x197],
[0x269, 0x196],
[0x26A, 0xA7AE],
[0x26B, 0x2C62],
[0x26C, 0xA7AD],
[0x26F, 0x19C],
[0x271, 0x2C6E],
[0x272, 0x19D],
[0x275, 0x19F],
[0x27D, 0x2C64],
[0x280, 0x1A6],
[0x282, 0xA7C5],
[0x283, 0x1A9],
[0x287, 0xA7B1],
[0x288, 0x1AE],
[0x289, 0x244],
[0x28A, 0x1B1],
[0x28B, 0x1B2],
[0x28C, 0x245],
[0x292, 0x1B7],
[0x29D, 0xA7B2],
[0x29E, 0xA7B0],
[0x345, 0x3B9],
[0x370, 0x371],
[0x371, 0x370],
[0x372, 0x373],
[0x373, 0x372],
[0x376, 0x377],
[0x377, 0x376],
[0x37B, 0x3FD],
[0x37C, 0x3FE],
[0x37D, 0x3FF],
[0x37F, 0x3F3],
[0x386, 0x3AC],
[0x388, 0x3AD],
[0x389, 0x3AE],
[0x38A, 0x3AF],
[0x38C, 0x3CC],
[0x38E, 0x3CD],
[0x38F, 0x3CE],
[0x391, 0x3B1],
[0x392, 0x3B2],
[0x393, 0x3B3],
[0x394, 0x3B4],
[0x395, 0x3B5],
[0x396, 0x3B6],
[0x397, 0x3B7],
[0x398, 0x3B8],
[0x399, 0x3B9],
[0x39A, 0x3BA],
[0x39B, 0x3BB],
[0x39C, 0x3BC],
[0x39D, 0x3BD],
[0x39E, 0x3BE],
[0x39F, 0x3BF],
[0x3A0, 0x3C0],
[0x3A1, 0x3C1],
[0x3A3, 0x3C3],
[0x3A4, 0x3C4],
[0x3A5, 0x3C5],
[0x3A6, 0x3C6],
[0x3A7, 0x3C7],
[0x3A8, 0x3C8],
[0x3A9, 0x3C9],
[0x3AA, 0x3CA],
[0x3AB, 0x3CB],
[0x3AC, 0x386],
[0x3AD, 0x388],
[0x3AE, 0x389],
[0x3AF, 0x38A],
[0x3B1, 0x391],
[0x3B2, [
0x392,
0x3D0
]],
[0x3B3, 0x393],
[0x3B4, 0x394],
[0x3B5, [
0x395,
0x3F5
]],
[0x3B6, 0x396],
[0x3B7, 0x397],
[0x3B8, [
0x398,
0x3D1
]],
[0x3B9, [
0x345,
0x399,
0x1FBE
]],
[0x3BA, [
0x39A,
0x3F0
]],
[0x3BB, 0x39B],
[0x3BC, [
0xB5,
0x39C
]],
[0x3BD, 0x39D],
[0x3BE, 0x39E],
[0x3BF, 0x39F],
[0x3C0, [
0x3A0,
0x3D6
]],
[0x3C1, [
0x3A1,
0x3F1
]],
[0x3C2, 0x3C3],
[0x3C3, [
0x3A3,
0x3C2
]],
[0x3C4, 0x3A4],
[0x3C5, 0x3A5],
[0x3C6, [
0x3A6,
0x3D5
]],
[0x3C7, 0x3A7],
[0x3C8, 0x3A8],
[0x3C9, 0x3A9],
[0x3CA, 0x3AA],
[0x3CB, 0x3AB],
[0x3CC, 0x38C],
[0x3CD, 0x38E],
[0x3CE, 0x38F],
[0x3CF, 0x3D7],
[0x3D0, 0x3B2],
[0x3D1, 0x3B8],
[0x3D5, 0x3C6],
[0x3D6, 0x3C0],
[0x3D7, 0x3CF],
[0x3D8, 0x3D9],
[0x3D9, 0x3D8],
[0x3DA, 0x3DB],
[0x3DB, 0x3DA],
[0x3DC, 0x3DD],
[0x3DD, 0x3DC],
[0x3DE, 0x3DF],
[0x3DF, 0x3DE],
[0x3E0, 0x3E1],
[0x3E1, 0x3E0],
[0x3E2, 0x3E3],
[0x3E3, 0x3E2],
[0x3E4, 0x3E5],
[0x3E5, 0x3E4],
[0x3E6, 0x3E7],
[0x3E7, 0x3E6],
[0x3E8, 0x3E9],
[0x3E9, 0x3E8],
[0x3EA, 0x3EB],
[0x3EB, 0x3EA],
[0x3EC, 0x3ED],
[0x3ED, 0x3EC],
[0x3EE, 0x3EF],
[0x3EF, 0x3EE],
[0x3F0, 0x3BA],
[0x3F1, 0x3C1],
[0x3F2, 0x3F9],
[0x3F3, 0x37F],
[0x3F5, 0x3B5],
[0x3F7, 0x3F8],
[0x3F8, 0x3F7],
[0x3F9, 0x3F2],
[0x3FA, 0x3FB],
[0x3FB, 0x3FA],
[0x3FD, 0x37B],
[0x3FE, 0x37C],
[0x3FF, 0x37D],
[0x400, 0x450],
[0x401, 0x451],
[0x402, 0x452],
[0x403, 0x453],
[0x404, 0x454],
[0x405, 0x455],
[0x406, 0x456],
[0x407, 0x457],
[0x408, 0x458],
[0x409, 0x459],
[0x40A, 0x45A],
[0x40B, 0x45B],
[0x40C, 0x45C],
[0x40D, 0x45D],
[0x40E, 0x45E],
[0x40F, 0x45F],
[0x410, 0x430],
[0x411, 0x431],
[0x412, 0x432],
[0x413, 0x433],
[0x414, 0x434],
[0x415, 0x435],
[0x416, 0x436],
[0x417, 0x437],
[0x418, 0x438],
[0x419, 0x439],
[0x41A, 0x43A],
[0x41B, 0x43B],
[0x41C, 0x43C],
[0x41D, 0x43D],
[0x41E, 0x43E],
[0x41F, 0x43F],
[0x420, 0x440],
[0x421, 0x441],
[0x422, 0x442],
[0x423, 0x443],
[0x424, 0x444],
[0x425, 0x445],
[0x426, 0x446],
[0x427, 0x447],
[0x428, 0x448],
[0x429, 0x449],
[0x42A, 0x44A],
[0x42B, 0x44B],
[0x42C, 0x44C],
[0x42D, 0x44D],
[0x42E, 0x44E],
[0x42F, 0x44F],
[0x430, 0x410],
[0x431, 0x411],
[0x432, [
0x412,
0x1C80
]],
[0x433, 0x413],
[0x434, [
0x414,
0x1C81
]],
[0x435, 0x415],
[0x436, 0x416],
[0x437, 0x417],
[0x438, 0x418],
[0x439, 0x419],
[0x43A, 0x41A],
[0x43B, 0x41B],
[0x43C, 0x41C],
[0x43D, 0x41D],
[0x43E, [
0x41E,
0x1C82
]],
[0x43F, 0x41F],
[0x440, 0x420],
[0x441, [
0x421,
0x1C83
]],
[0x442, [
0x422,
0x1C84,
0x1C85
]],
[0x443, 0x423],
[0x444, 0x424],
[0x445, 0x425],
[0x446, 0x426],
[0x447, 0x427],
[0x448, 0x428],
[0x449, 0x429],
[0x44A, [
0x42A,
0x1C86
]],
[0x44B, 0x42B],
[0x44C, 0x42C],
[0x44D, 0x42D],
[0x44E, 0x42E],
[0x44F, 0x42F],
[0x450, 0x400],
[0x451, 0x401],
[0x452, 0x402],
[0x453, 0x403],
[0x454, 0x404],
[0x455, 0x405],
[0x456, 0x406],
[0x457, 0x407],
[0x458, 0x408],
[0x459, 0x409],
[0x45A, 0x40A],
[0x45B, 0x40B],
[0x45C, 0x40C],
[0x45D, 0x40D],
[0x45E, 0x40E],
[0x45F, 0x40F],
[0x460, 0x461],
[0x461, 0x460],
[0x462, 0x463],
[0x463, [
0x462,
0x1C87
]],
[0x464, 0x465],
[0x465, 0x464],
[0x466, 0x467],
[0x467, 0x466],
[0x468, 0x469],
[0x469, 0x468],
[0x46A, 0x46B],
[0x46B, 0x46A],
[0x46C, 0x46D],
[0x46D, 0x46C],
[0x46E, 0x46F],
[0x46F, 0x46E],
[0x470, 0x471],
[0x471, 0x470],
[0x472, 0x473],
[0x473, 0x472],
[0x474, 0x475],
[0x475, 0x474],
[0x476, 0x477],
[0x477, 0x476],
[0x478, 0x479],
[0x479, 0x478],
[0x47A, 0x47B],
[0x47B, 0x47A],
[0x47C, 0x47D],
[0x47D, 0x47C],
[0x47E, 0x47F],
[0x47F, 0x47E],
[0x480, 0x481],
[0x481, 0x480],
[0x48A, 0x48B],
[0x48B, 0x48A],
[0x48C, 0x48D],
[0x48D, 0x48C],
[0x48E, 0x48F],
[0x48F, 0x48E],
[0x490, 0x491],
[0x491, 0x490],
[0x492, 0x493],
[0x493, 0x492],
[0x494, 0x495],
[0x495, 0x494],
[0x496, 0x497],
[0x497, 0x496],
[0x498, 0x499],
[0x499, 0x498],
[0x49A, 0x49B],
[0x49B, 0x49A],
[0x49C, 0x49D],
[0x49D, 0x49C],
[0x49E, 0x49F],
[0x49F, 0x49E],
[0x4A0, 0x4A1],
[0x4A1, 0x4A0],
[0x4A2, 0x4A3],
[0x4A3, 0x4A2],
[0x4A4, 0x4A5],
[0x4A5, 0x4A4],
[0x4A6, 0x4A7],
[0x4A7, 0x4A6],
[0x4A8, 0x4A9],
[0x4A9, 0x4A8],
[0x4AA, 0x4AB],
[0x4AB, 0x4AA],
[0x4AC, 0x4AD],
[0x4AD, 0x4AC],
[0x4AE, 0x4AF],
[0x4AF, 0x4AE],
[0x4B0, 0x4B1],
[0x4B1, 0x4B0],
[0x4B2, 0x4B3],
[0x4B3, 0x4B2],
[0x4B4, 0x4B5],
[0x4B5, 0x4B4],
[0x4B6, 0x4B7],
[0x4B7, 0x4B6],
[0x4B8, 0x4B9],
[0x4B9, 0x4B8],
[0x4BA, 0x4BB],
[0x4BB, 0x4BA],
[0x4BC, 0x4BD],
[0x4BD, 0x4BC],
[0x4BE, 0x4BF],
[0x4BF, 0x4BE],
[0x4C0, 0x4CF],
[0x4C1, 0x4C2],
[0x4C2, 0x4C1],
[0x4C3, 0x4C4],
[0x4C4, 0x4C3],
[0x4C5, 0x4C6],
[0x4C6, 0x4C5],
[0x4C7, 0x4C8],
[0x4C8, 0x4C7],
[0x4C9, 0x4CA],
[0x4CA, 0x4C9],
[0x4CB, 0x4CC],
[0x4CC, 0x4CB],
[0x4CD, 0x4CE],
[0x4CE, 0x4CD],
[0x4CF, 0x4C0],
[0x4D0, 0x4D1],
[0x4D1, 0x4D0],
[0x4D2, 0x4D3],
[0x4D3, 0x4D2],
[0x4D4, 0x4D5],
[0x4D5, 0x4D4],
[0x4D6, 0x4D7],
[0x4D7, 0x4D6],
[0x4D8, 0x4D9],
[0x4D9, 0x4D8],
[0x4DA, 0x4DB],
[0x4DB, 0x4DA],
[0x4DC, 0x4DD],
[0x4DD, 0x4DC],
[0x4DE, 0x4DF],
[0x4DF, 0x4DE],
[0x4E0, 0x4E1],
[0x4E1, 0x4E0],
[0x4E2, 0x4E3],
[0x4E3, 0x4E2],
[0x4E4, 0x4E5],
[0x4E5, 0x4E4],
[0x4E6, 0x4E7],
[0x4E7, 0x4E6],
[0x4E8, 0x4E9],
[0x4E9, 0x4E8],
[0x4EA, 0x4EB],
[0x4EB, 0x4EA],
[0x4EC, 0x4ED],
[0x4ED, 0x4EC],
[0x4EE, 0x4EF],
[0x4EF, 0x4EE],
[0x4F0, 0x4F1],
[0x4F1, 0x4F0],
[0x4F2, 0x4F3],
[0x4F3, 0x4F2],
[0x4F4, 0x4F5],
[0x4F5, 0x4F4],
[0x4F6, 0x4F7],
[0x4F7, 0x4F6],
[0x4F8, 0x4F9],
[0x4F9, 0x4F8],
[0x4FA, 0x4FB],
[0x4FB, 0x4FA],
[0x4FC, 0x4FD],
[0x4FD, 0x4FC],
[0x4FE, 0x4FF],
[0x4FF, 0x4FE],
[0x500, 0x501],
[0x501, 0x500],
[0x502, 0x503],
[0x503, 0x502],
[0x504, 0x505],
[0x505, 0x504],
[0x506, 0x507],
[0x507, 0x506],
[0x508, 0x509],
[0x509, 0x508],
[0x50A, 0x50B],
[0x50B, 0x50A],
[0x50C, 0x50D],
[0x50D, 0x50C],
[0x50E, 0x50F],
[0x50F, 0x50E],
[0x510, 0x511],
[0x511, 0x510],
[0x512, 0x513],
[0x513, 0x512],
[0x514, 0x515],
[0x515, 0x514],
[0x516, 0x517],
[0x517, 0x516],
[0x518, 0x519],
[0x519, 0x518],
[0x51A, 0x51B],
[0x51B, 0x51A],
[0x51C, 0x51D],
[0x51D, 0x51C],
[0x51E, 0x51F],
[0x51F, 0x51E],
[0x520, 0x521],
[0x521, 0x520],
[0x522, 0x523],
[0x523, 0x522],
[0x524, 0x525],
[0x525, 0x524],
[0x526, 0x527],
[0x527, 0x526],
[0x528, 0x529],
[0x529, 0x528],
[0x52A, 0x52B],
[0x52B, 0x52A],
[0x52C, 0x52D],
[0x52D, 0x52C],
[0x52E, 0x52F],
[0x52F, 0x52E],
[0x531, 0x561],
[0x532, 0x562],
[0x533, 0x563],
[0x534, 0x564],
[0x535, 0x565],
[0x536, 0x566],
[0x537, 0x567],
[0x538, 0x568],
[0x539, 0x569],
[0x53A, 0x56A],
[0x53B, 0x56B],
[0x53C, 0x56C],
[0x53D, 0x56D],
[0x53E, 0x56E],
[0x53F, 0x56F],
[0x540, 0x570],
[0x541, 0x571],
[0x542, 0x572],
[0x543, 0x573],
[0x544, 0x574],
[0x545, 0x575],
[0x546, 0x576],
[0x547, 0x577],
[0x548, 0x578],
[0x549, 0x579],
[0x54A, 0x57A],
[0x54B, 0x57B],
[0x54C, 0x57C],
[0x54D, 0x57D],
[0x54E, 0x57E],
[0x54F, 0x57F],
[0x550, 0x580],
[0x551, 0x581],
[0x552, 0x582],
[0x553, 0x583],
[0x554, 0x584],
[0x555, 0x585],
[0x556, 0x586],
[0x561, 0x531],
[0x562, 0x532],
[0x563, 0x533],
[0x564, 0x534],
[0x565, 0x535],
[0x566, 0x536],
[0x567, 0x537],
[0x568, 0x538],
[0x569, 0x539],
[0x56A, 0x53A],
[0x56B, 0x53B],
[0x56C, 0x53C],
[0x56D, 0x53D],
[0x56E, 0x53E],
[0x56F, 0x53F],
[0x570, 0x540],
[0x571, 0x541],
[0x572, 0x542],
[0x573, 0x543],
[0x574, 0x544],
[0x575, 0x545],
[0x576, 0x546],
[0x577, 0x547],
[0x578, 0x548],
[0x579, 0x549],
[0x57A, 0x54A],
[0x57B, 0x54B],
[0x57C, 0x54C],
[0x57D, 0x54D],
[0x57E, 0x54E],
[0x57F, 0x54F],
[0x580, 0x550],
[0x581, 0x551],
[0x582, 0x552],
[0x583, 0x553],
[0x584, 0x554],
[0x585, 0x555],
[0x586, 0x556],
[0x10A0, 0x2D00],
[0x10A1, 0x2D01],
[0x10A2, 0x2D02],
[0x10A3, 0x2D03],
[0x10A4, 0x2D04],
[0x10A5, 0x2D05],
[0x10A6, 0x2D06],
[0x10A7, 0x2D07],
[0x10A8, 0x2D08],
[0x10A9, 0x2D09],
[0x10AA, 0x2D0A],
[0x10AB, 0x2D0B],
[0x10AC, 0x2D0C],
[0x10AD, 0x2D0D],
[0x10AE, 0x2D0E],
[0x10AF, 0x2D0F],
[0x10B0, 0x2D10],
[0x10B1, 0x2D11],
[0x10B2, 0x2D12],
[0x10B3, 0x2D13],
[0x10B4, 0x2D14],
[0x10B5, 0x2D15],
[0x10B6, 0x2D16],
[0x10B7, 0x2D17],
[0x10B8, 0x2D18],
[0x10B9, 0x2D19],
[0x10BA, 0x2D1A],
[0x10BB, 0x2D1B],
[0x10BC, 0x2D1C],
[0x10BD, 0x2D1D],
[0x10BE, 0x2D1E],
[0x10BF, 0x2D1F],
[0x10C0, 0x2D20],
[0x10C1, 0x2D21],
[0x10C2, 0x2D22],
[0x10C3, 0x2D23],
[0x10C4, 0x2D24],
[0x10C5, 0x2D25],
[0x10C7, 0x2D27],
[0x10CD, 0x2D2D],
[0x10D0, 0x1C90],
[0x10D1, 0x1C91],
[0x10D2, 0x1C92],
[0x10D3, 0x1C93],
[0x10D4, 0x1C94],
[0x10D5, 0x1C95],
[0x10D6, 0x1C96],
[0x10D7, 0x1C97],
[0x10D8, 0x1C98],
[0x10D9, 0x1C99],
[0x10DA, 0x1C9A],
[0x10DB, 0x1C9B],
[0x10DC, 0x1C9C],
[0x10DD, 0x1C9D],
[0x10DE, 0x1C9E],
[0x10DF, 0x1C9F],
[0x10E0, 0x1CA0],
[0x10E1, 0x1CA1],
[0x10E2, 0x1CA2],
[0x10E3, 0x1CA3],
[0x10E4, 0x1CA4],
[0x10E5, 0x1CA5],
[0x10E6, 0x1CA6],
[0x10E7, 0x1CA7],
[0x10E8, 0x1CA8],
[0x10E9, 0x1CA9],
[0x10EA, 0x1CAA],
[0x10EB, 0x1CAB],
[0x10EC, 0x1CAC],
[0x10ED, 0x1CAD],
[0x10EE, 0x1CAE],
[0x10EF, 0x1CAF],
[0x10F0, 0x1CB0],
[0x10F1, 0x1CB1],
[0x10F2, 0x1CB2],
[0x10F3, 0x1CB3],
[0x10F4, 0x1CB4],
[0x10F5, 0x1CB5],
[0x10F6, 0x1CB6],
[0x10F7, 0x1CB7],
[0x10F8, 0x1CB8],
[0x10F9, 0x1CB9],
[0x10FA, 0x1CBA],
[0x10FD, 0x1CBD],
[0x10FE, 0x1CBE],
[0x10FF, 0x1CBF],
[0x13A0, 0xAB70],
[0x13A1, 0xAB71],
[0x13A2, 0xAB72],
[0x13A3, 0xAB73],
[0x13A4, 0xAB74],
[0x13A5, 0xAB75],
[0x13A6, 0xAB76],
[0x13A7, 0xAB77],
[0x13A8, 0xAB78],
[0x13A9, 0xAB79],
[0x13AA, 0xAB7A],
[0x13AB, 0xAB7B],
[0x13AC, 0xAB7C],
[0x13AD, 0xAB7D],
[0x13AE, 0xAB7E],
[0x13AF, 0xAB7F],
[0x13B0, 0xAB80],
[0x13B1, 0xAB81],
[0x13B2, 0xAB82],
[0x13B3, 0xAB83],
[0x13B4, 0xAB84],
[0x13B5, 0xAB85],
[0x13B6, 0xAB86],
[0x13B7, 0xAB87],
[0x13B8, 0xAB88],
[0x13B9, 0xAB89],
[0x13BA, 0xAB8A],
[0x13BB, 0xAB8B],
[0x13BC, 0xAB8C],
[0x13BD, 0xAB8D],
[0x13BE, 0xAB8E],
[0x13BF, 0xAB8F],
[0x13C0, 0xAB90],
[0x13C1, 0xAB91],
[0x13C2, 0xAB92],
[0x13C3, 0xAB93],
[0x13C4, 0xAB94],
[0x13C5, 0xAB95],
[0x13C6, 0xAB96],
[0x13C7, 0xAB97],
[0x13C8, 0xAB98],
[0x13C9, 0xAB99],
[0x13CA, 0xAB9A],
[0x13CB, 0xAB9B],
[0x13CC, 0xAB9C],
[0x13CD, 0xAB9D],
[0x13CE, 0xAB9E],
[0x13CF, 0xAB9F],
[0x13D0, 0xABA0],
[0x13D1, 0xABA1],
[0x13D2, 0xABA2],
[0x13D3, 0xABA3],
[0x13D4, 0xABA4],
[0x13D5, 0xABA5],
[0x13D6, 0xABA6],
[0x13D7, 0xABA7],
[0x13D8, 0xABA8],
[0x13D9, 0xABA9],
[0x13DA, 0xABAA],
[0x13DB, 0xABAB],
[0x13DC, 0xABAC],
[0x13DD, 0xABAD],
[0x13DE, 0xABAE],
[0x13DF, 0xABAF],
[0x13E0, 0xABB0],
[0x13E1, 0xABB1],
[0x13E2, 0xABB2],
[0x13E3, 0xABB3],
[0x13E4, 0xABB4],
[0x13E5, 0xABB5],
[0x13E6, 0xABB6],
[0x13E7, 0xABB7],
[0x13E8, 0xABB8],
[0x13E9, 0xABB9],
[0x13EA, 0xABBA],
[0x13EB, 0xABBB],
[0x13EC, 0xABBC],
[0x13ED, 0xABBD],
[0x13EE, 0xABBE],
[0x13EF, 0xABBF],
[0x13F0, 0x13F8],
[0x13F1, 0x13F9],
[0x13F2, 0x13FA],
[0x13F3, 0x13FB],
[0x13F4, 0x13FC],
[0x13F5, 0x13FD],
[0x13F8, 0x13F0],
[0x13F9, 0x13F1],
[0x13FA, 0x13F2],
[0x13FB, 0x13F3],
[0x13FC, 0x13F4],
[0x13FD, 0x13F5],
[0x1C80, 0x432],
[0x1C81, 0x434],
[0x1C82, 0x43E],
[0x1C83, 0x441],
[0x1C84, 0x442],
[0x1C85, 0x442],
[0x1C86, 0x44A],
[0x1C87, 0x463],
[0x1C88, 0xA64B],
[0x1C89, 0x1C8A],
[0x1C8A, 0x1C89],
[0x1C90, 0x10D0],
[0x1C91, 0x10D1],
[0x1C92, 0x10D2],
[0x1C93, 0x10D3],
[0x1C94, 0x10D4],
[0x1C95, 0x10D5],
[0x1C96, 0x10D6],
[0x1C97, 0x10D7],
[0x1C98, 0x10D8],
[0x1C99, 0x10D9],
[0x1C9A, 0x10DA],
[0x1C9B, 0x10DB],
[0x1C9C, 0x10DC],
[0x1C9D, 0x10DD],
[0x1C9E, 0x10DE],
[0x1C9F, 0x10DF],
[0x1CA0, 0x10E0],
[0x1CA1, 0x10E1],
[0x1CA2, 0x10E2],
[0x1CA3, 0x10E3],
[0x1CA4, 0x10E4],
[0x1CA5, 0x10E5],
[0x1CA6, 0x10E6],
[0x1CA7, 0x10E7],
[0x1CA8, 0x10E8],
[0x1CA9, 0x10E9],
[0x1CAA, 0x10EA],
[0x1CAB, 0x10EB],
[0x1CAC, 0x10EC],
[0x1CAD, 0x10ED],
[0x1CAE, 0x10EE],
[0x1CAF, 0x10EF],
[0x1CB0, 0x10F0],
[0x1CB1, 0x10F1],
[0x1CB2, 0x10F2],
[0x1CB3, 0x10F3],
[0x1CB4, 0x10F4],
[0x1CB5, 0x10F5],
[0x1CB6, 0x10F6],
[0x1CB7, 0x10F7],
[0x1CB8, 0x10F8],
[0x1CB9, 0x10F9],
[0x1CBA, 0x10FA],
[0x1CBD, 0x10FD],
[0x1CBE, 0x10FE],
[0x1CBF, 0x10FF],
[0x1D79, 0xA77D],
[0x1D7D, 0x2C63],
[0x1D8E, 0xA7C6],
[0x1E00, 0x1E01],
[0x1E01, 0x1E00],
[0x1E02, 0x1E03],
[0x1E03, 0x1E02],
[0x1E04, 0x1E05],
[0x1E05, 0x1E04],
[0x1E06, 0x1E07],
[0x1E07, 0x1E06],
[0x1E08, 0x1E09],
[0x1E09, 0x1E08],
[0x1E0A, 0x1E0B],
[0x1E0B, 0x1E0A],
[0x1E0C, 0x1E0D],
[0x1E0D, 0x1E0C],
[0x1E0E, 0x1E0F],
[0x1E0F, 0x1E0E],
[0x1E10, 0x1E11],
[0x1E11, 0x1E10],
[0x1E12, 0x1E13],
[0x1E13, 0x1E12],
[0x1E14, 0x1E15],
[0x1E15, 0x1E14],
[0x1E16, 0x1E17],
[0x1E17, 0x1E16],
[0x1E18, 0x1E19],
[0x1E19, 0x1E18],
[0x1E1A, 0x1E1B],
[0x1E1B, 0x1E1A],
[0x1E1C, 0x1E1D],
[0x1E1D, 0x1E1C],
[0x1E1E, 0x1E1F],
[0x1E1F, 0x1E1E],
[0x1E20, 0x1E21],
[0x1E21, 0x1E20],
[0x1E22, 0x1E23],
[0x1E23, 0x1E22],
[0x1E24, 0x1E25],
[0x1E25, 0x1E24],
[0x1E26, 0x1E27],
[0x1E27, 0x1E26],
[0x1E28, 0x1E29],
[0x1E29, 0x1E28],
[0x1E2A, 0x1E2B],
[0x1E2B, 0x1E2A],
[0x1E2C, 0x1E2D],
[0x1E2D, 0x1E2C],
[0x1E2E, 0x1E2F],
[0x1E2F, 0x1E2E],
[0x1E30, 0x1E31],
[0x1E31, 0x1E30],
[0x1E32, 0x1E33],
[0x1E33, 0x1E32],
[0x1E34, 0x1E35],
[0x1E35, 0x1E34],
[0x1E36, 0x1E37],
[0x1E37, 0x1E36],
[0x1E38, 0x1E39],
[0x1E39, 0x1E38],
[0x1E3A, 0x1E3B],
[0x1E3B, 0x1E3A],
[0x1E3C, 0x1E3D],
[0x1E3D, 0x1E3C],
[0x1E3E, 0x1E3F],
[0x1E3F, 0x1E3E],
[0x1E40, 0x1E41],
[0x1E41, 0x1E40],
[0x1E42, 0x1E43],
[0x1E43, 0x1E42],
[0x1E44, 0x1E45],
[0x1E45, 0x1E44],
[0x1E46, 0x1E47],
[0x1E47, 0x1E46],
[0x1E48, 0x1E49],
[0x1E49, 0x1E48],
[0x1E4A, 0x1E4B],
[0x1E4B, 0x1E4A],
[0x1E4C, 0x1E4D],
[0x1E4D, 0x1E4C],
[0x1E4E, 0x1E4F],
[0x1E4F, 0x1E4E],
[0x1E50, 0x1E51],
[0x1E51, 0x1E50],
[0x1E52, 0x1E53],
[0x1E53, 0x1E52],
[0x1E54, 0x1E55],
[0x1E55, 0x1E54],
[0x1E56, 0x1E57],
[0x1E57, 0x1E56],
[0x1E58, 0x1E59],
[0x1E59, 0x1E58],
[0x1E5A, 0x1E5B],
[0x1E5B, 0x1E5A],
[0x1E5C, 0x1E5D],
[0x1E5D, 0x1E5C],
[0x1E5E, 0x1E5F],
[0x1E5F, 0x1E5E],
[0x1E60, 0x1E61],
[0x1E61, [
0x1E60,
0x1E9B
]],
[0x1E62, 0x1E63],
[0x1E63, 0x1E62],
[0x1E64, 0x1E65],
[0x1E65, 0x1E64],
[0x1E66, 0x1E67],
[0x1E67, 0x1E66],
[0x1E68, 0x1E69],
[0x1E69, 0x1E68],
[0x1E6A, 0x1E6B],
[0x1E6B, 0x1E6A],
[0x1E6C, 0x1E6D],
[0x1E6D, 0x1E6C],
[0x1E6E, 0x1E6F],
[0x1E6F, 0x1E6E],
[0x1E70, 0x1E71],
[0x1E71, 0x1E70],
[0x1E72, 0x1E73],
[0x1E73, 0x1E72],
[0x1E74, 0x1E75],
[0x1E75, 0x1E74],
[0x1E76, 0x1E77],
[0x1E77, 0x1E76],
[0x1E78, 0x1E79],
[0x1E79, 0x1E78],
[0x1E7A, 0x1E7B],
[0x1E7B, 0x1E7A],
[0x1E7C, 0x1E7D],
[0x1E7D, 0x1E7C],
[0x1E7E, 0x1E7F],
[0x1E7F, 0x1E7E],
[0x1E80, 0x1E81],
[0x1E81, 0x1E80],
[0x1E82, 0x1E83],
[0x1E83, 0x1E82],
[0x1E84, 0x1E85],
[0x1E85, 0x1E84],
[0x1E86, 0x1E87],
[0x1E87, 0x1E86],
[0x1E88, 0x1E89],
[0x1E89, 0x1E88],
[0x1E8A, 0x1E8B],
[0x1E8B, 0x1E8A],
[0x1E8C, 0x1E8D],
[0x1E8D, 0x1E8C],
[0x1E8E, 0x1E8F],
[0x1E8F, 0x1E8E],
[0x1E90, 0x1E91],
[0x1E91, 0x1E90],
[0x1E92, 0x1E93],
[0x1E93, 0x1E92],
[0x1E94, 0x1E95],
[0x1E95, 0x1E94],
[0x1E9B, 0x1E61],
[0x1EA0, 0x1EA1],
[0x1EA1, 0x1EA0],
[0x1EA2, 0x1EA3],
[0x1EA3, 0x1EA2],
[0x1EA4, 0x1EA5],
[0x1EA5, 0x1EA4],
[0x1EA6, 0x1EA7],
[0x1EA7, 0x1EA6],
[0x1EA8, 0x1EA9],
[0x1EA9, 0x1EA8],
[0x1EAA, 0x1EAB],
[0x1EAB, 0x1EAA],
[0x1EAC, 0x1EAD],
[0x1EAD, 0x1EAC],
[0x1EAE, 0x1EAF],
[0x1EAF, 0x1EAE],
[0x1EB0, 0x1EB1],
[0x1EB1, 0x1EB0],
[0x1EB2, 0x1EB3],
[0x1EB3, 0x1EB2],
[0x1EB4, 0x1EB5],
[0x1EB5, 0x1EB4],
[0x1EB6, 0x1EB7],
[0x1EB7, 0x1EB6],
[0x1EB8, 0x1EB9],
[0x1EB9, 0x1EB8],
[0x1EBA, 0x1EBB],
[0x1EBB, 0x1EBA],
[0x1EBC, 0x1EBD],
[0x1EBD, 0x1EBC],
[0x1EBE, 0x1EBF],
[0x1EBF, 0x1EBE],
[0x1EC0, 0x1EC1],
[0x1EC1, 0x1EC0],
[0x1EC2, 0x1EC3],
[0x1EC3, 0x1EC2],
[0x1EC4, 0x1EC5],
[0x1EC5, 0x1EC4],
[0x1EC6, 0x1EC7],
[0x1EC7, 0x1EC6],
[0x1EC8, 0x1EC9],
[0x1EC9, 0x1EC8],
[0x1ECA, 0x1ECB],
[0x1ECB, 0x1ECA],
[0x1ECC, 0x1ECD],
[0x1ECD, 0x1ECC],
[0x1ECE, 0x1ECF],
[0x1ECF, 0x1ECE],
[0x1ED0, 0x1ED1],
[0x1ED1, 0x1ED0],
[0x1ED2, 0x1ED3],
[0x1ED3, 0x1ED2],
[0x1ED4, 0x1ED5],
[0x1ED5, 0x1ED4],
[0x1ED6, 0x1ED7],
[0x1ED7, 0x1ED6],
[0x1ED8, 0x1ED9],
[0x1ED9, 0x1ED8],
[0x1EDA, 0x1EDB],
[0x1EDB, 0x1EDA],
[0x1EDC, 0x1EDD],
[0x1EDD, 0x1EDC],
[0x1EDE, 0x1EDF],
[0x1EDF, 0x1EDE],
[0x1EE0, 0x1EE1],
[0x1EE1, 0x1EE0],
[0x1EE2, 0x1EE3],
[0x1EE3, 0x1EE2],
[0x1EE4, 0x1EE5],
[0x1EE5, 0x1EE4],
[0x1EE6, 0x1EE7],
[0x1EE7, 0x1EE6],
[0x1EE8, 0x1EE9],
[0x1EE9, 0x1EE8],
[0x1EEA, 0x1EEB],
[0x1EEB, 0x1EEA],
[0x1EEC, 0x1EED],
[0x1EED, 0x1EEC],
[0x1EEE, 0x1EEF],
[0x1EEF, 0x1EEE],
[0x1EF0, 0x1EF1],
[0x1EF1, 0x1EF0],
[0x1EF2, 0x1EF3],
[0x1EF3, 0x1EF2],
[0x1EF4, 0x1EF5],
[0x1EF5, 0x1EF4],
[0x1EF6, 0x1EF7],
[0x1EF7, 0x1EF6],
[0x1EF8, 0x1EF9],
[0x1EF9, 0x1EF8],
[0x1EFA, 0x1EFB],
[0x1EFB, 0x1EFA],
[0x1EFC, 0x1EFD],
[0x1EFD, 0x1EFC],
[0x1EFE, 0x1EFF],
[0x1EFF, 0x1EFE],
[0x1F00, 0x1F08],
[0x1F01, 0x1F09],
[0x1F02, 0x1F0A],
[0x1F03, 0x1F0B],
[0x1F04, 0x1F0C],
[0x1F05, 0x1F0D],
[0x1F06, 0x1F0E],
[0x1F07, 0x1F0F],
[0x1F08, 0x1F00],
[0x1F09, 0x1F01],
[0x1F0A, 0x1F02],
[0x1F0B, 0x1F03],
[0x1F0C, 0x1F04],
[0x1F0D, 0x1F05],
[0x1F0E, 0x1F06],
[0x1F0F, 0x1F07],
[0x1F10, 0x1F18],
[0x1F11, 0x1F19],
[0x1F12, 0x1F1A],
[0x1F13, 0x1F1B],
[0x1F14, 0x1F1C],
[0x1F15, 0x1F1D],
[0x1F18, 0x1F10],
[0x1F19, 0x1F11],
[0x1F1A, 0x1F12],
[0x1F1B, 0x1F13],
[0x1F1C, 0x1F14],
[0x1F1D, 0x1F15],
[0x1F20, 0x1F28],
[0x1F21, 0x1F29],
[0x1F22, 0x1F2A],
[0x1F23, 0x1F2B],
[0x1F24, 0x1F2C],
[0x1F25, 0x1F2D],
[0x1F26, 0x1F2E],
[0x1F27, 0x1F2F],
[0x1F28, 0x1F20],
[0x1F29, 0x1F21],
[0x1F2A, 0x1F22],
[0x1F2B, 0x1F23],
[0x1F2C, 0x1F24],
[0x1F2D, 0x1F25],
[0x1F2E, 0x1F26],
[0x1F2F, 0x1F27],
[0x1F30, 0x1F38],
[0x1F31, 0x1F39],
[0x1F32, 0x1F3A],
[0x1F33, 0x1F3B],
[0x1F34, 0x1F3C],
[0x1F35, 0x1F3D],
[0x1F36, 0x1F3E],
[0x1F37, 0x1F3F],
[0x1F38, 0x1F30],
[0x1F39, 0x1F31],
[0x1F3A, 0x1F32],
[0x1F3B, 0x1F33],
[0x1F3C, 0x1F34],
[0x1F3D, 0x1F35],
[0x1F3E, 0x1F36],
[0x1F3F, 0x1F37],
[0x1F40, 0x1F48],
[0x1F41, 0x1F49],
[0x1F42, 0x1F4A],
[0x1F43, 0x1F4B],
[0x1F44, 0x1F4C],
[0x1F45, 0x1F4D],
[0x1F48, 0x1F40],
[0x1F49, 0x1F41],
[0x1F4A, 0x1F42],
[0x1F4B, 0x1F43],
[0x1F4C, 0x1F44],
[0x1F4D, 0x1F45],
[0x1F51, 0x1F59],
[0x1F53, 0x1F5B],
[0x1F55, 0x1F5D],
[0x1F57, 0x1F5F],
[0x1F59, 0x1F51],
[0x1F5B, 0x1F53],
[0x1F5D, 0x1F55],
[0x1F5F, 0x1F57],
[0x1F60, 0x1F68],
[0x1F61, 0x1F69],
[0x1F62, 0x1F6A],
[0x1F63, 0x1F6B],
[0x1F64, 0x1F6C],
[0x1F65, 0x1F6D],
[0x1F66, 0x1F6E],
[0x1F67, 0x1F6F],
[0x1F68, 0x1F60],
[0x1F69, 0x1F61],
[0x1F6A, 0x1F62],
[0x1F6B, 0x1F63],
[0x1F6C, 0x1F64],
[0x1F6D, 0x1F65],
[0x1F6E, 0x1F66],
[0x1F6F, 0x1F67],
[0x1F70, 0x1FBA],
[0x1F71, 0x1FBB],
[0x1F72, 0x1FC8],
[0x1F73, 0x1FC9],
[0x1F74, 0x1FCA],
[0x1F75, 0x1FCB],
[0x1F76, 0x1FDA],
[0x1F77, 0x1FDB],
[0x1F78, 0x1FF8],
[0x1F79, 0x1FF9],
[0x1F7A, 0x1FEA],
[0x1F7B, 0x1FEB],
[0x1F7C, 0x1FFA],
[0x1F7D, 0x1FFB],
[0x1FB0, 0x1FB8],
[0x1FB1, 0x1FB9],
[0x1FB8, 0x1FB0],
[0x1FB9, 0x1FB1],
[0x1FBA, 0x1F70],
[0x1FBB, 0x1F71],
[0x1FBE, 0x3B9],
[0x1FC8, 0x1F72],
[0x1FC9, 0x1F73],
[0x1FCA, 0x1F74],
[0x1FCB, 0x1F75],
[0x1FD0, 0x1FD8],
[0x1FD1, 0x1FD9],
[0x1FD8, 0x1FD0],
[0x1FD9, 0x1FD1],
[0x1FDA, 0x1F76],
[0x1FDB, 0x1F77],
[0x1FE0, 0x1FE8],
[0x1FE1, 0x1FE9],
[0x1FE5, 0x1FEC],
[0x1FE8, 0x1FE0],
[0x1FE9, 0x1FE1],
[0x1FEA, 0x1F7A],
[0x1FEB, 0x1F7B],
[0x1FEC, 0x1FE5],
[0x1FF8, 0x1F78],
[0x1FF9, 0x1F79],
[0x1FFA, 0x1F7C],
[0x1FFB, 0x1F7D],
[0x2132, 0x214E],
[0x214E, 0x2132],
[0x2160, 0x2170],
[0x2161, 0x2171],
[0x2162, 0x2172],
[0x2163, 0x2173],
[0x2164, 0x2174],
[0x2165, 0x2175],
[0x2166, 0x2176],
[0x2167, 0x2177],
[0x2168, 0x2178],
[0x2169, 0x2179],
[0x216A, 0x217A],
[0x216B, 0x217B],
[0x216C, 0x217C],
[0x216D, 0x217D],
[0x216E, 0x217E],
[0x216F, 0x217F],
[0x2170, 0x2160],
[0x2171, 0x2161],
[0x2172, 0x2162],
[0x2173, 0x2163],
[0x2174, 0x2164],
[0x2175, 0x2165],
[0x2176, 0x2166],
[0x2177, 0x2167],
[0x2178, 0x2168],
[0x2179, 0x2169],
[0x217A, 0x216A],
[0x217B, 0x216B],
[0x217C, 0x216C],
[0x217D, 0x216D],
[0x217E, 0x216E],
[0x217F, 0x216F],
[0x2183, 0x2184],
[0x2184, 0x2183],
[0x24B6, 0x24D0],
[0x24B7, 0x24D1],
[0x24B8, 0x24D2],
[0x24B9, 0x24D3],
[0x24BA, 0x24D4],
[0x24BB, 0x24D5],
[0x24BC, 0x24D6],
[0x24BD, 0x24D7],
[0x24BE, 0x24D8],
[0x24BF, 0x24D9],
[0x24C0, 0x24DA],
[0x24C1, 0x24DB],
[0x24C2, 0x24DC],
[0x24C3, 0x24DD],
[0x24C4, 0x24DE],
[0x24C5, 0x24DF],
[0x24C6, 0x24E0],
[0x24C7, 0x24E1],
[0x24C8, 0x24E2],
[0x24C9, 0x24E3],
[0x24CA, 0x24E4],
[0x24CB, 0x24E5],
[0x24CC, 0x24E6],
[0x24CD, 0x24E7],
[0x24CE, 0x24E8],
[0x24CF, 0x24E9],
[0x24D0, 0x24B6],
[0x24D1, 0x24B7],
[0x24D2, 0x24B8],
[0x24D3, 0x24B9],
[0x24D4, 0x24BA],
[0x24D5, 0x24BB],
[0x24D6, 0x24BC],
[0x24D7, 0x24BD],
[0x24D8, 0x24BE],
[0x24D9, 0x24BF],
[0x24DA, 0x24C0],
[0x24DB, 0x24C1],
[0x24DC, 0x24C2],
[0x24DD, 0x24C3],
[0x24DE, 0x24C4],
[0x24DF, 0x24C5],
[0x24E0, 0x24C6],
[0x24E1, 0x24C7],
[0x24E2, 0x24C8],
[0x24E3, 0x24C9],
[0x24E4, 0x24CA],
[0x24E5, 0x24CB],
[0x24E6, 0x24CC],
[0x24E7, 0x24CD],
[0x24E8, 0x24CE],
[0x24E9, 0x24CF],
[0x2C00, 0x2C30],
[0x2C01, 0x2C31],
[0x2C02, 0x2C32],
[0x2C03, 0x2C33],
[0x2C04, 0x2C34],
[0x2C05, 0x2C35],
[0x2C06, 0x2C36],
[0x2C07, 0x2C37],
[0x2C08, 0x2C38],
[0x2C09, 0x2C39],
[0x2C0A, 0x2C3A],
[0x2C0B, 0x2C3B],
[0x2C0C, 0x2C3C],
[0x2C0D, 0x2C3D],
[0x2C0E, 0x2C3E],
[0x2C0F, 0x2C3F],
[0x2C10, 0x2C40],
[0x2C11, 0x2C41],
[0x2C12, 0x2C42],
[0x2C13, 0x2C43],
[0x2C14, 0x2C44],
[0x2C15, 0x2C45],
[0x2C16, 0x2C46],
[0x2C17, 0x2C47],
[0x2C18, 0x2C48],
[0x2C19, 0x2C49],
[0x2C1A, 0x2C4A],
[0x2C1B, 0x2C4B],
[0x2C1C, 0x2C4C],
[0x2C1D, 0x2C4D],
[0x2C1E, 0x2C4E],
[0x2C1F, 0x2C4F],
[0x2C20, 0x2C50],
[0x2C21, 0x2C51],
[0x2C22, 0x2C52],
[0x2C23, 0x2C53],
[0x2C24, 0x2C54],
[0x2C25, 0x2C55],
[0x2C26, 0x2C56],
[0x2C27, 0x2C57],
[0x2C28, 0x2C58],
[0x2C29, 0x2C59],
[0x2C2A, 0x2C5A],
[0x2C2B, 0x2C5B],
[0x2C2C, 0x2C5C],
[0x2C2D, 0x2C5D],
[0x2C2E, 0x2C5E],
[0x2C2F, 0x2C5F],
[0x2C30, 0x2C00],
[0x2C31, 0x2C01],
[0x2C32, 0x2C02],
[0x2C33, 0x2C03],
[0x2C34, 0x2C04],
[0x2C35, 0x2C05],
[0x2C36, 0x2C06],
[0x2C37, 0x2C07],
[0x2C38, 0x2C08],
[0x2C39, 0x2C09],
[0x2C3A, 0x2C0A],
[0x2C3B, 0x2C0B],
[0x2C3C, 0x2C0C],
[0x2C3D, 0x2C0D],
[0x2C3E, 0x2C0E],
[0x2C3F, 0x2C0F],
[0x2C40, 0x2C10],
[0x2C41, 0x2C11],
[0x2C42, 0x2C12],
[0x2C43, 0x2C13],
[0x2C44, 0x2C14],
[0x2C45, 0x2C15],
[0x2C46, 0x2C16],
[0x2C47, 0x2C17],
[0x2C48, 0x2C18],
[0x2C49, 0x2C19],
[0x2C4A, 0x2C1A],
[0x2C4B, 0x2C1B],
[0x2C4C, 0x2C1C],
[0x2C4D, 0x2C1D],
[0x2C4E, 0x2C1E],
[0x2C4F, 0x2C1F],
[0x2C50, 0x2C20],
[0x2C51, 0x2C21],
[0x2C52, 0x2C22],
[0x2C53, 0x2C23],
[0x2C54, 0x2C24],
[0x2C55, 0x2C25],
[0x2C56, 0x2C26],
[0x2C57, 0x2C27],
[0x2C58, 0x2C28],
[0x2C59, 0x2C29],
[0x2C5A, 0x2C2A],
[0x2C5B, 0x2C2B],
[0x2C5C, 0x2C2C],
[0x2C5D, 0x2C2D],
[0x2C5E, 0x2C2E],
[0x2C5F, 0x2C2F],
[0x2C60, 0x2C61],
[0x2C61, 0x2C60],
[0x2C62, 0x26B],
[0x2C63, 0x1D7D],
[0x2C64, 0x27D],
[0x2C65, 0x23A],
[0x2C66, 0x23E],
[0x2C67, 0x2C68],
[0x2C68, 0x2C67],
[0x2C69, 0x2C6A],
[0x2C6A, 0x2C69],
[0x2C6B, 0x2C6C],
[0x2C6C, 0x2C6B],
[0x2C6D, 0x251],
[0x2C6E, 0x271],
[0x2C6F, 0x250],
[0x2C70, 0x252],
[0x2C72, 0x2C73],
[0x2C73, 0x2C72],
[0x2C75, 0x2C76],
[0x2C76, 0x2C75],
[0x2C7E, 0x23F],
[0x2C7F, 0x240],
[0x2C80, 0x2C81],
[0x2C81, 0x2C80],
[0x2C82, 0x2C83],
[0x2C83, 0x2C82],
[0x2C84, 0x2C85],
[0x2C85, 0x2C84],
[0x2C86, 0x2C87],
[0x2C87, 0x2C86],
[0x2C88, 0x2C89],
[0x2C89, 0x2C88],
[0x2C8A, 0x2C8B],
[0x2C8B, 0x2C8A],
[0x2C8C, 0x2C8D],
[0x2C8D, 0x2C8C],
[0x2C8E, 0x2C8F],
[0x2C8F, 0x2C8E],
[0x2C90, 0x2C91],
[0x2C91, 0x2C90],
[0x2C92, 0x2C93],
[0x2C93, 0x2C92],
[0x2C94, 0x2C95],
[0x2C95, 0x2C94],
[0x2C96, 0x2C97],
[0x2C97, 0x2C96],
[0x2C98, 0x2C99],
[0x2C99, 0x2C98],
[0x2C9A, 0x2C9B],
[0x2C9B, 0x2C9A],
[0x2C9C, 0x2C9D],
[0x2C9D, 0x2C9C],
[0x2C9E, 0x2C9F],
[0x2C9F, 0x2C9E],
[0x2CA0, 0x2CA1],
[0x2CA1, 0x2CA0],
[0x2CA2, 0x2CA3],
[0x2CA3, 0x2CA2],
[0x2CA4, 0x2CA5],
[0x2CA5, 0x2CA4],
[0x2CA6, 0x2CA7],
[0x2CA7, 0x2CA6],
[0x2CA8, 0x2CA9],
[0x2CA9, 0x2CA8],
[0x2CAA, 0x2CAB],
[0x2CAB, 0x2CAA],
[0x2CAC, 0x2CAD],
[0x2CAD, 0x2CAC],
[0x2CAE, 0x2CAF],
[0x2CAF, 0x2CAE],
[0x2CB0, 0x2CB1],
[0x2CB1, 0x2CB0],
[0x2CB2, 0x2CB3],
[0x2CB3, 0x2CB2],
[0x2CB4, 0x2CB5],
[0x2CB5, 0x2CB4],
[0x2CB6, 0x2CB7],
[0x2CB7, 0x2CB6],
[0x2CB8, 0x2CB9],
[0x2CB9, 0x2CB8],
[0x2CBA, 0x2CBB],
[0x2CBB, 0x2CBA],
[0x2CBC, 0x2CBD],
[0x2CBD, 0x2CBC],
[0x2CBE, 0x2CBF],
[0x2CBF, 0x2CBE],
[0x2CC0, 0x2CC1],
[0x2CC1, 0x2CC0],
[0x2CC2, 0x2CC3],
[0x2CC3, 0x2CC2],
[0x2CC4, 0x2CC5],
[0x2CC5, 0x2CC4],
[0x2CC6, 0x2CC7],
[0x2CC7, 0x2CC6],
[0x2CC8, 0x2CC9],
[0x2CC9, 0x2CC8],
[0x2CCA, 0x2CCB],
[0x2CCB, 0x2CCA],
[0x2CCC, 0x2CCD],
[0x2CCD, 0x2CCC],
[0x2CCE, 0x2CCF],
[0x2CCF, 0x2CCE],
[0x2CD0, 0x2CD1],
[0x2CD1, 0x2CD0],
[0x2CD2, 0x2CD3],
[0x2CD3, 0x2CD2],
[0x2CD4, 0x2CD5],
[0x2CD5, 0x2CD4],
[0x2CD6, 0x2CD7],
[0x2CD7, 0x2CD6],
[0x2CD8, 0x2CD9],
[0x2CD9, 0x2CD8],
[0x2CDA, 0x2CDB],
[0x2CDB, 0x2CDA],
[0x2CDC, 0x2CDD],
[0x2CDD, 0x2CDC],
[0x2CDE, 0x2CDF],
[0x2CDF, 0x2CDE],
[0x2CE0, 0x2CE1],
[0x2CE1, 0x2CE0],
[0x2CE2, 0x2CE3],
[0x2CE3, 0x2CE2],
[0x2CEB, 0x2CEC],
[0x2CEC, 0x2CEB],
[0x2CED, 0x2CEE],
[0x2CEE, 0x2CED],
[0x2CF2, 0x2CF3],
[0x2CF3, 0x2CF2],
[0x2D00, 0x10A0],
[0x2D01, 0x10A1],
[0x2D02, 0x10A2],
[0x2D03, 0x10A3],
[0x2D04, 0x10A4],
[0x2D05, 0x10A5],
[0x2D06, 0x10A6],
[0x2D07, 0x10A7],
[0x2D08, 0x10A8],
[0x2D09, 0x10A9],
[0x2D0A, 0x10AA],
[0x2D0B, 0x10AB],
[0x2D0C, 0x10AC],
[0x2D0D, 0x10AD],
[0x2D0E, 0x10AE],
[0x2D0F, 0x10AF],
[0x2D10, 0x10B0],
[0x2D11, 0x10B1],
[0x2D12, 0x10B2],
[0x2D13, 0x10B3],
[0x2D14, 0x10B4],
[0x2D15, 0x10B5],
[0x2D16, 0x10B6],
[0x2D17, 0x10B7],
[0x2D18, 0x10B8],
[0x2D19, 0x10B9],
[0x2D1A, 0x10BA],
[0x2D1B, 0x10BB],
[0x2D1C, 0x10BC],
[0x2D1D, 0x10BD],
[0x2D1E, 0x10BE],
[0x2D1F, 0x10BF],
[0x2D20, 0x10C0],
[0x2D21, 0x10C1],
[0x2D22, 0x10C2],
[0x2D23, 0x10C3],
[0x2D24, 0x10C4],
[0x2D25, 0x10C5],
[0x2D27, 0x10C7],
[0x2D2D, 0x10CD],
[0xA640, 0xA641],
[0xA641, 0xA640],
[0xA642, 0xA643],
[0xA643, 0xA642],
[0xA644, 0xA645],
[0xA645, 0xA644],
[0xA646, 0xA647],
[0xA647, 0xA646],
[0xA648, 0xA649],
[0xA649, 0xA648],
[0xA64A, 0xA64B],
[0xA64B, [
0x1C88,
0xA64A
]],
[0xA64C, 0xA64D],
[0xA64D, 0xA64C],
[0xA64E, 0xA64F],
[0xA64F, 0xA64E],
[0xA650, 0xA651],
[0xA651, 0xA650],
[0xA652, 0xA653],
[0xA653, 0xA652],
[0xA654, 0xA655],
[0xA655, 0xA654],
[0xA656, 0xA657],
[0xA657, 0xA656],
[0xA658, 0xA659],
[0xA659, 0xA658],
[0xA65A, 0xA65B],
[0xA65B, 0xA65A],
[0xA65C, 0xA65D],
[0xA65D, 0xA65C],
[0xA65E, 0xA65F],
[0xA65F, 0xA65E],
[0xA660, 0xA661],
[0xA661, 0xA660],
[0xA662, 0xA663],
[0xA663, 0xA662],
[0xA664, 0xA665],
[0xA665, 0xA664],
[0xA666, 0xA667],
[0xA667, 0xA666],
[0xA668, 0xA669],
[0xA669, 0xA668],
[0xA66A, 0xA66B],
[0xA66B, 0xA66A],
[0xA66C, 0xA66D],
[0xA66D, 0xA66C],
[0xA680, 0xA681],
[0xA681, 0xA680],
[0xA682, 0xA683],
[0xA683, 0xA682],
[0xA684, 0xA685],
[0xA685, 0xA684],
[0xA686, 0xA687],
[0xA687, 0xA686],
[0xA688, 0xA689],
[0xA689, 0xA688],
[0xA68A, 0xA68B],
[0xA68B, 0xA68A],
[0xA68C, 0xA68D],
[0xA68D, 0xA68C],
[0xA68E, 0xA68F],
[0xA68F, 0xA68E],
[0xA690, 0xA691],
[0xA691, 0xA690],
[0xA692, 0xA693],
[0xA693, 0xA692],
[0xA694, 0xA695],
[0xA695, 0xA694],
[0xA696, 0xA697],
[0xA697, 0xA696],
[0xA698, 0xA699],
[0xA699, 0xA698],
[0xA69A, 0xA69B],
[0xA69B, 0xA69A],
[0xA722, 0xA723],
[0xA723, 0xA722],
[0xA724, 0xA725],
[0xA725, 0xA724],
[0xA726, 0xA727],
[0xA727, 0xA726],
[0xA728, 0xA729],
[0xA729, 0xA728],
[0xA72A, 0xA72B],
[0xA72B, 0xA72A],
[0xA72C, 0xA72D],
[0xA72D, 0xA72C],
[0xA72E, 0xA72F],
[0xA72F, 0xA72E],
[0xA732, 0xA733],
[0xA733, 0xA732],
[0xA734, 0xA735],
[0xA735, 0xA734],
[0xA736, 0xA737],
[0xA737, 0xA736],
[0xA738, 0xA739],
[0xA739, 0xA738],
[0xA73A, 0xA73B],
[0xA73B, 0xA73A],
[0xA73C, 0xA73D],
[0xA73D, 0xA73C],
[0xA73E, 0xA73F],
[0xA73F, 0xA73E],
[0xA740, 0xA741],
[0xA741, 0xA740],
[0xA742, 0xA743],
[0xA743, 0xA742],
[0xA744, 0xA745],
[0xA745, 0xA744],
[0xA746, 0xA747],
[0xA747, 0xA746],
[0xA748, 0xA749],
[0xA749, 0xA748],
[0xA74A, 0xA74B],
[0xA74B, 0xA74A],
[0xA74C, 0xA74D],
[0xA74D, 0xA74C],
[0xA74E, 0xA74F],
[0xA74F, 0xA74E],
[0xA750, 0xA751],
[0xA751, 0xA750],
[0xA752, 0xA753],
[0xA753, 0xA752],
[0xA754, 0xA755],
[0xA755, 0xA754],
[0xA756, 0xA757],
[0xA757, 0xA756],
[0xA758, 0xA759],
[0xA759, 0xA758],
[0xA75A, 0xA75B],
[0xA75B, 0xA75A],
[0xA75C, 0xA75D],
[0xA75D, 0xA75C],
[0xA75E, 0xA75F],
[0xA75F, 0xA75E],
[0xA760, 0xA761],
[0xA761, 0xA760],
[0xA762, 0xA763],
[0xA763, 0xA762],
[0xA764, 0xA765],
[0xA765, 0xA764],
[0xA766, 0xA767],
[0xA767, 0xA766],
[0xA768, 0xA769],
[0xA769, 0xA768],
[0xA76A, 0xA76B],
[0xA76B, 0xA76A],
[0xA76C, 0xA76D],
[0xA76D, 0xA76C],
[0xA76E, 0xA76F],
[0xA76F, 0xA76E],
[0xA779, 0xA77A],
[0xA77A, 0xA779],
[0xA77B, 0xA77C],
[0xA77C, 0xA77B],
[0xA77D, 0x1D79],
[0xA77E, 0xA77F],
[0xA77F, 0xA77E],
[0xA780, 0xA781],
[0xA781, 0xA780],
[0xA782, 0xA783],
[0xA783, 0xA782],
[0xA784, 0xA785],
[0xA785, 0xA784],
[0xA786, 0xA787],
[0xA787, 0xA786],
[0xA78B, 0xA78C],
[0xA78C, 0xA78B],
[0xA78D, 0x265],
[0xA790, 0xA791],
[0xA791, 0xA790],
[0xA792, 0xA793],
[0xA793, 0xA792],
[0xA794, 0xA7C4],
[0xA796, 0xA797],
[0xA797, 0xA796],
[0xA798, 0xA799],
[0xA799, 0xA798],
[0xA79A, 0xA79B],
[0xA79B, 0xA79A],
[0xA79C, 0xA79D],
[0xA79D, 0xA79C],
[0xA79E, 0xA79F],
[0xA79F, 0xA79E],
[0xA7A0, 0xA7A1],
[0xA7A1, 0xA7A0],
[0xA7A2, 0xA7A3],
[0xA7A3, 0xA7A2],
[0xA7A4, 0xA7A5],
[0xA7A5, 0xA7A4],
[0xA7A6, 0xA7A7],
[0xA7A7, 0xA7A6],
[0xA7A8, 0xA7A9],
[0xA7A9, 0xA7A8],
[0xA7AA, 0x266],
[0xA7AB, 0x25C],
[0xA7AC, 0x261],
[0xA7AD, 0x26C],
[0xA7AE, 0x26A],
[0xA7B0, 0x29E],
[0xA7B1, 0x287],
[0xA7B2, 0x29D],
[0xA7B3, 0xAB53],
[0xA7B4, 0xA7B5],
[0xA7B5, 0xA7B4],
[0xA7B6, 0xA7B7],
[0xA7B7, 0xA7B6],
[0xA7B8, 0xA7B9],
[0xA7B9, 0xA7B8],
[0xA7BA, 0xA7BB],
[0xA7BB, 0xA7BA],
[0xA7BC, 0xA7BD],
[0xA7BD, 0xA7BC],
[0xA7BE, 0xA7BF],
[0xA7BF, 0xA7BE],
[0xA7C0, 0xA7C1],
[0xA7C1, 0xA7C0],
[0xA7C2, 0xA7C3],
[0xA7C3, 0xA7C2],
[0xA7C4, 0xA794],
[0xA7C5, 0x282],
[0xA7C6, 0x1D8E],
[0xA7C7, 0xA7C8],
[0xA7C8, 0xA7C7],
[0xA7C9, 0xA7CA],
[0xA7CA, 0xA7C9],
[0xA7CB, 0x264],
[0xA7CC, 0xA7CD],
[0xA7CD, 0xA7CC],
[0xA7D0, 0xA7D1],
[0xA7D1, 0xA7D0],
[0xA7D6, 0xA7D7],
[0xA7D7, 0xA7D6],
[0xA7D8, 0xA7D9],
[0xA7D9, 0xA7D8],
[0xA7DA, 0xA7DB],
[0xA7DB, 0xA7DA],
[0xA7DC, 0x19B],
[0xA7F5, 0xA7F6],
[0xA7F6, 0xA7F5],
[0xAB53, 0xA7B3],
[0xAB70, 0x13A0],
[0xAB71, 0x13A1],
[0xAB72, 0x13A2],
[0xAB73, 0x13A3],
[0xAB74, 0x13A4],
[0xAB75, 0x13A5],
[0xAB76, 0x13A6],
[0xAB77, 0x13A7],
[0xAB78, 0x13A8],
[0xAB79, 0x13A9],
[0xAB7A, 0x13AA],
[0xAB7B, 0x13AB],
[0xAB7C, 0x13AC],
[0xAB7D, 0x13AD],
[0xAB7E, 0x13AE],
[0xAB7F, 0x13AF],
[0xAB80, 0x13B0],
[0xAB81, 0x13B1],
[0xAB82, 0x13B2],
[0xAB83, 0x13B3],
[0xAB84, 0x13B4],
[0xAB85, 0x13B5],
[0xAB86, 0x13B6],
[0xAB87, 0x13B7],
[0xAB88, 0x13B8],
[0xAB89, 0x13B9],
[0xAB8A, 0x13BA],
[0xAB8B, 0x13BB],
[0xAB8C, 0x13BC],
[0xAB8D, 0x13BD],
[0xAB8E, 0x13BE],
[0xAB8F, 0x13BF],
[0xAB90, 0x13C0],
[0xAB91, 0x13C1],
[0xAB92, 0x13C2],
[0xAB93, 0x13C3],
[0xAB94, 0x13C4],
[0xAB95, 0x13C5],
[0xAB96, 0x13C6],
[0xAB97, 0x13C7],
[0xAB98, 0x13C8],
[0xAB99, 0x13C9],
[0xAB9A, 0x13CA],
[0xAB9B, 0x13CB],
[0xAB9C, 0x13CC],
[0xAB9D, 0x13CD],
[0xAB9E, 0x13CE],
[0xAB9F, 0x13CF],
[0xABA0, 0x13D0],
[0xABA1, 0x13D1],
[0xABA2, 0x13D2],
[0xABA3, 0x13D3],
[0xABA4, 0x13D4],
[0xABA5, 0x13D5],
[0xABA6, 0x13D6],
[0xABA7, 0x13D7],
[0xABA8, 0x13D8],
[0xABA9, 0x13D9],
[0xABAA, 0x13DA],
[0xABAB, 0x13DB],
[0xABAC, 0x13DC],
[0xABAD, 0x13DD],
[0xABAE, 0x13DE],
[0xABAF, 0x13DF],
[0xABB0, 0x13E0],
[0xABB1, 0x13E1],
[0xABB2, 0x13E2],
[0xABB3, 0x13E3],
[0xABB4, 0x13E4],
[0xABB5, 0x13E5],
[0xABB6, 0x13E6],
[0xABB7, 0x13E7],
[0xABB8, 0x13E8],
[0xABB9, 0x13E9],
[0xABBA, 0x13EA],
[0xABBB, 0x13EB],
[0xABBC, 0x13EC],
[0xABBD, 0x13ED],
[0xABBE, 0x13EE],
[0xABBF, 0x13EF],
[0xFF21, 0xFF41],
[0xFF22, 0xFF42],
[0xFF23, 0xFF43],
[0xFF24, 0xFF44],
[0xFF25, 0xFF45],
[0xFF26, 0xFF46],
[0xFF27, 0xFF47],
[0xFF28, 0xFF48],
[0xFF29, 0xFF49],
[0xFF2A, 0xFF4A],
[0xFF2B, 0xFF4B],
[0xFF2C, 0xFF4C],
[0xFF2D, 0xFF4D],
[0xFF2E, 0xFF4E],
[0xFF2F, 0xFF4F],
[0xFF30, 0xFF50],
[0xFF31, 0xFF51],
[0xFF32, 0xFF52],
[0xFF33, 0xFF53],
[0xFF34, 0xFF54],
[0xFF35, 0xFF55],
[0xFF36, 0xFF56],
[0xFF37, 0xFF57],
[0xFF38, 0xFF58],
[0xFF39, 0xFF59],
[0xFF3A, 0xFF5A],
[0xFF41, 0xFF21],
[0xFF42, 0xFF22],
[0xFF43, 0xFF23],
[0xFF44, 0xFF24],
[0xFF45, 0xFF25],
[0xFF46, 0xFF26],
[0xFF47, 0xFF27],
[0xFF48, 0xFF28],
[0xFF49, 0xFF29],
[0xFF4A, 0xFF2A],
[0xFF4B, 0xFF2B],
[0xFF4C, 0xFF2C],
[0xFF4D, 0xFF2D],
[0xFF4E, 0xFF2E],
[0xFF4F, 0xFF2F],
[0xFF50, 0xFF30],
[0xFF51, 0xFF31],
[0xFF52, 0xFF32],
[0xFF53, 0xFF33],
[0xFF54, 0xFF34],
[0xFF55, 0xFF35],
[0xFF56, 0xFF36],
[0xFF57, 0xFF37],
[0xFF58, 0xFF38],
[0xFF59, 0xFF39],
[0xFF5A, 0xFF3A]
]);
mathiasbynens-regexpu-core-e35919f/data/iu-foldings.js 0000664 0000000 0000000 00000066041 14717712160 0023035 0 ustar 00root root 0000000 0000000 module.exports = new Map([
[0x41, 0x61],
[0x42, 0x62],
[0x43, 0x63],
[0x44, 0x64],
[0x45, 0x65],
[0x46, 0x66],
[0x47, 0x67],
[0x48, 0x68],
[0x49, 0x69],
[0x4A, 0x6A],
[0x4B, 0x6B],
[0x4C, 0x6C],
[0x4D, 0x6D],
[0x4E, 0x6E],
[0x4F, 0x6F],
[0x50, 0x70],
[0x51, 0x71],
[0x52, 0x72],
[0x53, 0x73],
[0x54, 0x74],
[0x55, 0x75],
[0x56, 0x76],
[0x57, 0x77],
[0x58, 0x78],
[0x59, 0x79],
[0x5A, 0x7A],
[0xB5, 0x3BC],
[0xC0, 0xE0],
[0xC1, 0xE1],
[0xC2, 0xE2],
[0xC3, 0xE3],
[0xC4, 0xE4],
[0xC5, 0xE5],
[0xC6, 0xE6],
[0xC7, 0xE7],
[0xC8, 0xE8],
[0xC9, 0xE9],
[0xCA, 0xEA],
[0xCB, 0xEB],
[0xCC, 0xEC],
[0xCD, 0xED],
[0xCE, 0xEE],
[0xCF, 0xEF],
[0xD0, 0xF0],
[0xD1, 0xF1],
[0xD2, 0xF2],
[0xD3, 0xF3],
[0xD4, 0xF4],
[0xD5, 0xF5],
[0xD6, 0xF6],
[0xD8, 0xF8],
[0xD9, 0xF9],
[0xDA, 0xFA],
[0xDB, 0xFB],
[0xDC, 0xFC],
[0xDD, 0xFD],
[0xDE, 0xFE],
[0x100, 0x101],
[0x102, 0x103],
[0x104, 0x105],
[0x106, 0x107],
[0x108, 0x109],
[0x10A, 0x10B],
[0x10C, 0x10D],
[0x10E, 0x10F],
[0x110, 0x111],
[0x112, 0x113],
[0x114, 0x115],
[0x116, 0x117],
[0x118, 0x119],
[0x11A, 0x11B],
[0x11C, 0x11D],
[0x11E, 0x11F],
[0x120, 0x121],
[0x122, 0x123],
[0x124, 0x125],
[0x126, 0x127],
[0x128, 0x129],
[0x12A, 0x12B],
[0x12C, 0x12D],
[0x12E, 0x12F],
[0x132, 0x133],
[0x134, 0x135],
[0x136, 0x137],
[0x139, 0x13A],
[0x13B, 0x13C],
[0x13D, 0x13E],
[0x13F, 0x140],
[0x141, 0x142],
[0x143, 0x144],
[0x145, 0x146],
[0x147, 0x148],
[0x14A, 0x14B],
[0x14C, 0x14D],
[0x14E, 0x14F],
[0x150, 0x151],
[0x152, 0x153],
[0x154, 0x155],
[0x156, 0x157],
[0x158, 0x159],
[0x15A, 0x15B],
[0x15C, 0x15D],
[0x15E, 0x15F],
[0x160, 0x161],
[0x162, 0x163],
[0x164, 0x165],
[0x166, 0x167],
[0x168, 0x169],
[0x16A, 0x16B],
[0x16C, 0x16D],
[0x16E, 0x16F],
[0x170, 0x171],
[0x172, 0x173],
[0x174, 0x175],
[0x176, 0x177],
[0x178, 0xFF],
[0x179, 0x17A],
[0x17B, 0x17C],
[0x17D, 0x17E],
[0x17F, 0x73],
[0x181, 0x253],
[0x182, 0x183],
[0x184, 0x185],
[0x186, 0x254],
[0x187, 0x188],
[0x189, 0x256],
[0x18A, 0x257],
[0x18B, 0x18C],
[0x18E, 0x1DD],
[0x18F, 0x259],
[0x190, 0x25B],
[0x191, 0x192],
[0x193, 0x260],
[0x194, 0x263],
[0x196, 0x269],
[0x197, 0x268],
[0x198, 0x199],
[0x19C, 0x26F],
[0x19D, 0x272],
[0x19F, 0x275],
[0x1A0, 0x1A1],
[0x1A2, 0x1A3],
[0x1A4, 0x1A5],
[0x1A6, 0x280],
[0x1A7, 0x1A8],
[0x1A9, 0x283],
[0x1AC, 0x1AD],
[0x1AE, 0x288],
[0x1AF, 0x1B0],
[0x1B1, 0x28A],
[0x1B2, 0x28B],
[0x1B3, 0x1B4],
[0x1B5, 0x1B6],
[0x1B7, 0x292],
[0x1B8, 0x1B9],
[0x1BC, 0x1BD],
[0x1C4, 0x1C6],
[0x1C5, 0x1C6],
[0x1C7, 0x1C9],
[0x1C8, 0x1C9],
[0x1CA, 0x1CC],
[0x1CB, 0x1CC],
[0x1CD, 0x1CE],
[0x1CF, 0x1D0],
[0x1D1, 0x1D2],
[0x1D3, 0x1D4],
[0x1D5, 0x1D6],
[0x1D7, 0x1D8],
[0x1D9, 0x1DA],
[0x1DB, 0x1DC],
[0x1DE, 0x1DF],
[0x1E0, 0x1E1],
[0x1E2, 0x1E3],
[0x1E4, 0x1E5],
[0x1E6, 0x1E7],
[0x1E8, 0x1E9],
[0x1EA, 0x1EB],
[0x1EC, 0x1ED],
[0x1EE, 0x1EF],
[0x1F1, 0x1F3],
[0x1F2, 0x1F3],
[0x1F4, 0x1F5],
[0x1F6, 0x195],
[0x1F7, 0x1BF],
[0x1F8, 0x1F9],
[0x1FA, 0x1FB],
[0x1FC, 0x1FD],
[0x1FE, 0x1FF],
[0x200, 0x201],
[0x202, 0x203],
[0x204, 0x205],
[0x206, 0x207],
[0x208, 0x209],
[0x20A, 0x20B],
[0x20C, 0x20D],
[0x20E, 0x20F],
[0x210, 0x211],
[0x212, 0x213],
[0x214, 0x215],
[0x216, 0x217],
[0x218, 0x219],
[0x21A, 0x21B],
[0x21C, 0x21D],
[0x21E, 0x21F],
[0x220, 0x19E],
[0x222, 0x223],
[0x224, 0x225],
[0x226, 0x227],
[0x228, 0x229],
[0x22A, 0x22B],
[0x22C, 0x22D],
[0x22E, 0x22F],
[0x230, 0x231],
[0x232, 0x233],
[0x23A, 0x2C65],
[0x23B, 0x23C],
[0x23D, 0x19A],
[0x23E, 0x2C66],
[0x241, 0x242],
[0x243, 0x180],
[0x244, 0x289],
[0x245, 0x28C],
[0x246, 0x247],
[0x248, 0x249],
[0x24A, 0x24B],
[0x24C, 0x24D],
[0x24E, 0x24F],
[0x345, 0x3B9],
[0x370, 0x371],
[0x372, 0x373],
[0x376, 0x377],
[0x37F, 0x3F3],
[0x386, 0x3AC],
[0x388, 0x3AD],
[0x389, 0x3AE],
[0x38A, 0x3AF],
[0x38C, 0x3CC],
[0x38E, 0x3CD],
[0x38F, 0x3CE],
[0x391, 0x3B1],
[0x392, 0x3B2],
[0x393, 0x3B3],
[0x394, 0x3B4],
[0x395, 0x3B5],
[0x396, 0x3B6],
[0x397, 0x3B7],
[0x398, 0x3B8],
[0x399, 0x3B9],
[0x39A, 0x3BA],
[0x39B, 0x3BB],
[0x39C, 0x3BC],
[0x39D, 0x3BD],
[0x39E, 0x3BE],
[0x39F, 0x3BF],
[0x3A0, 0x3C0],
[0x3A1, 0x3C1],
[0x3A3, 0x3C3],
[0x3A4, 0x3C4],
[0x3A5, 0x3C5],
[0x3A6, 0x3C6],
[0x3A7, 0x3C7],
[0x3A8, 0x3C8],
[0x3A9, 0x3C9],
[0x3AA, 0x3CA],
[0x3AB, 0x3CB],
[0x3C2, 0x3C3],
[0x3CF, 0x3D7],
[0x3D0, 0x3B2],
[0x3D1, 0x3B8],
[0x3D5, 0x3C6],
[0x3D6, 0x3C0],
[0x3D8, 0x3D9],
[0x3DA, 0x3DB],
[0x3DC, 0x3DD],
[0x3DE, 0x3DF],
[0x3E0, 0x3E1],
[0x3E2, 0x3E3],
[0x3E4, 0x3E5],
[0x3E6, 0x3E7],
[0x3E8, 0x3E9],
[0x3EA, 0x3EB],
[0x3EC, 0x3ED],
[0x3EE, 0x3EF],
[0x3F0, 0x3BA],
[0x3F1, 0x3C1],
[0x3F4, 0x3B8],
[0x3F5, 0x3B5],
[0x3F7, 0x3F8],
[0x3F9, 0x3F2],
[0x3FA, 0x3FB],
[0x3FD, 0x37B],
[0x3FE, 0x37C],
[0x3FF, 0x37D],
[0x400, 0x450],
[0x401, 0x451],
[0x402, 0x452],
[0x403, 0x453],
[0x404, 0x454],
[0x405, 0x455],
[0x406, 0x456],
[0x407, 0x457],
[0x408, 0x458],
[0x409, 0x459],
[0x40A, 0x45A],
[0x40B, 0x45B],
[0x40C, 0x45C],
[0x40D, 0x45D],
[0x40E, 0x45E],
[0x40F, 0x45F],
[0x410, 0x430],
[0x411, 0x431],
[0x412, 0x432],
[0x413, 0x433],
[0x414, 0x434],
[0x415, 0x435],
[0x416, 0x436],
[0x417, 0x437],
[0x418, 0x438],
[0x419, 0x439],
[0x41A, 0x43A],
[0x41B, 0x43B],
[0x41C, 0x43C],
[0x41D, 0x43D],
[0x41E, 0x43E],
[0x41F, 0x43F],
[0x420, 0x440],
[0x421, 0x441],
[0x422, 0x442],
[0x423, 0x443],
[0x424, 0x444],
[0x425, 0x445],
[0x426, 0x446],
[0x427, 0x447],
[0x428, 0x448],
[0x429, 0x449],
[0x42A, 0x44A],
[0x42B, 0x44B],
[0x42C, 0x44C],
[0x42D, 0x44D],
[0x42E, 0x44E],
[0x42F, 0x44F],
[0x460, 0x461],
[0x462, 0x463],
[0x464, 0x465],
[0x466, 0x467],
[0x468, 0x469],
[0x46A, 0x46B],
[0x46C, 0x46D],
[0x46E, 0x46F],
[0x470, 0x471],
[0x472, 0x473],
[0x474, 0x475],
[0x476, 0x477],
[0x478, 0x479],
[0x47A, 0x47B],
[0x47C, 0x47D],
[0x47E, 0x47F],
[0x480, 0x481],
[0x48A, 0x48B],
[0x48C, 0x48D],
[0x48E, 0x48F],
[0x490, 0x491],
[0x492, 0x493],
[0x494, 0x495],
[0x496, 0x497],
[0x498, 0x499],
[0x49A, 0x49B],
[0x49C, 0x49D],
[0x49E, 0x49F],
[0x4A0, 0x4A1],
[0x4A2, 0x4A3],
[0x4A4, 0x4A5],
[0x4A6, 0x4A7],
[0x4A8, 0x4A9],
[0x4AA, 0x4AB],
[0x4AC, 0x4AD],
[0x4AE, 0x4AF],
[0x4B0, 0x4B1],
[0x4B2, 0x4B3],
[0x4B4, 0x4B5],
[0x4B6, 0x4B7],
[0x4B8, 0x4B9],
[0x4BA, 0x4BB],
[0x4BC, 0x4BD],
[0x4BE, 0x4BF],
[0x4C0, 0x4CF],
[0x4C1, 0x4C2],
[0x4C3, 0x4C4],
[0x4C5, 0x4C6],
[0x4C7, 0x4C8],
[0x4C9, 0x4CA],
[0x4CB, 0x4CC],
[0x4CD, 0x4CE],
[0x4D0, 0x4D1],
[0x4D2, 0x4D3],
[0x4D4, 0x4D5],
[0x4D6, 0x4D7],
[0x4D8, 0x4D9],
[0x4DA, 0x4DB],
[0x4DC, 0x4DD],
[0x4DE, 0x4DF],
[0x4E0, 0x4E1],
[0x4E2, 0x4E3],
[0x4E4, 0x4E5],
[0x4E6, 0x4E7],
[0x4E8, 0x4E9],
[0x4EA, 0x4EB],
[0x4EC, 0x4ED],
[0x4EE, 0x4EF],
[0x4F0, 0x4F1],
[0x4F2, 0x4F3],
[0x4F4, 0x4F5],
[0x4F6, 0x4F7],
[0x4F8, 0x4F9],
[0x4FA, 0x4FB],
[0x4FC, 0x4FD],
[0x4FE, 0x4FF],
[0x500, 0x501],
[0x502, 0x503],
[0x504, 0x505],
[0x506, 0x507],
[0x508, 0x509],
[0x50A, 0x50B],
[0x50C, 0x50D],
[0x50E, 0x50F],
[0x510, 0x511],
[0x512, 0x513],
[0x514, 0x515],
[0x516, 0x517],
[0x518, 0x519],
[0x51A, 0x51B],
[0x51C, 0x51D],
[0x51E, 0x51F],
[0x520, 0x521],
[0x522, 0x523],
[0x524, 0x525],
[0x526, 0x527],
[0x528, 0x529],
[0x52A, 0x52B],
[0x52C, 0x52D],
[0x52E, 0x52F],
[0x531, 0x561],
[0x532, 0x562],
[0x533, 0x563],
[0x534, 0x564],
[0x535, 0x565],
[0x536, 0x566],
[0x537, 0x567],
[0x538, 0x568],
[0x539, 0x569],
[0x53A, 0x56A],
[0x53B, 0x56B],
[0x53C, 0x56C],
[0x53D, 0x56D],
[0x53E, 0x56E],
[0x53F, 0x56F],
[0x540, 0x570],
[0x541, 0x571],
[0x542, 0x572],
[0x543, 0x573],
[0x544, 0x574],
[0x545, 0x575],
[0x546, 0x576],
[0x547, 0x577],
[0x548, 0x578],
[0x549, 0x579],
[0x54A, 0x57A],
[0x54B, 0x57B],
[0x54C, 0x57C],
[0x54D, 0x57D],
[0x54E, 0x57E],
[0x54F, 0x57F],
[0x550, 0x580],
[0x551, 0x581],
[0x552, 0x582],
[0x553, 0x583],
[0x554, 0x584],
[0x555, 0x585],
[0x556, 0x586],
[0x10A0, 0x2D00],
[0x10A1, 0x2D01],
[0x10A2, 0x2D02],
[0x10A3, 0x2D03],
[0x10A4, 0x2D04],
[0x10A5, 0x2D05],
[0x10A6, 0x2D06],
[0x10A7, 0x2D07],
[0x10A8, 0x2D08],
[0x10A9, 0x2D09],
[0x10AA, 0x2D0A],
[0x10AB, 0x2D0B],
[0x10AC, 0x2D0C],
[0x10AD, 0x2D0D],
[0x10AE, 0x2D0E],
[0x10AF, 0x2D0F],
[0x10B0, 0x2D10],
[0x10B1, 0x2D11],
[0x10B2, 0x2D12],
[0x10B3, 0x2D13],
[0x10B4, 0x2D14],
[0x10B5, 0x2D15],
[0x10B6, 0x2D16],
[0x10B7, 0x2D17],
[0x10B8, 0x2D18],
[0x10B9, 0x2D19],
[0x10BA, 0x2D1A],
[0x10BB, 0x2D1B],
[0x10BC, 0x2D1C],
[0x10BD, 0x2D1D],
[0x10BE, 0x2D1E],
[0x10BF, 0x2D1F],
[0x10C0, 0x2D20],
[0x10C1, 0x2D21],
[0x10C2, 0x2D22],
[0x10C3, 0x2D23],
[0x10C4, 0x2D24],
[0x10C5, 0x2D25],
[0x10C7, 0x2D27],
[0x10CD, 0x2D2D],
[0x13F8, 0x13F0],
[0x13F9, 0x13F1],
[0x13FA, 0x13F2],
[0x13FB, 0x13F3],
[0x13FC, 0x13F4],
[0x13FD, 0x13F5],
[0x1C80, 0x432],
[0x1C81, 0x434],
[0x1C82, 0x43E],
[0x1C83, 0x441],
[0x1C84, 0x442],
[0x1C85, 0x442],
[0x1C86, 0x44A],
[0x1C87, 0x463],
[0x1C88, 0xA64B],
[0x1C89, 0x1C8A],
[0x1C90, 0x10D0],
[0x1C91, 0x10D1],
[0x1C92, 0x10D2],
[0x1C93, 0x10D3],
[0x1C94, 0x10D4],
[0x1C95, 0x10D5],
[0x1C96, 0x10D6],
[0x1C97, 0x10D7],
[0x1C98, 0x10D8],
[0x1C99, 0x10D9],
[0x1C9A, 0x10DA],
[0x1C9B, 0x10DB],
[0x1C9C, 0x10DC],
[0x1C9D, 0x10DD],
[0x1C9E, 0x10DE],
[0x1C9F, 0x10DF],
[0x1CA0, 0x10E0],
[0x1CA1, 0x10E1],
[0x1CA2, 0x10E2],
[0x1CA3, 0x10E3],
[0x1CA4, 0x10E4],
[0x1CA5, 0x10E5],
[0x1CA6, 0x10E6],
[0x1CA7, 0x10E7],
[0x1CA8, 0x10E8],
[0x1CA9, 0x10E9],
[0x1CAA, 0x10EA],
[0x1CAB, 0x10EB],
[0x1CAC, 0x10EC],
[0x1CAD, 0x10ED],
[0x1CAE, 0x10EE],
[0x1CAF, 0x10EF],
[0x1CB0, 0x10F0],
[0x1CB1, 0x10F1],
[0x1CB2, 0x10F2],
[0x1CB3, 0x10F3],
[0x1CB4, 0x10F4],
[0x1CB5, 0x10F5],
[0x1CB6, 0x10F6],
[0x1CB7, 0x10F7],
[0x1CB8, 0x10F8],
[0x1CB9, 0x10F9],
[0x1CBA, 0x10FA],
[0x1CBD, 0x10FD],
[0x1CBE, 0x10FE],
[0x1CBF, 0x10FF],
[0x1E00, 0x1E01],
[0x1E02, 0x1E03],
[0x1E04, 0x1E05],
[0x1E06, 0x1E07],
[0x1E08, 0x1E09],
[0x1E0A, 0x1E0B],
[0x1E0C, 0x1E0D],
[0x1E0E, 0x1E0F],
[0x1E10, 0x1E11],
[0x1E12, 0x1E13],
[0x1E14, 0x1E15],
[0x1E16, 0x1E17],
[0x1E18, 0x1E19],
[0x1E1A, 0x1E1B],
[0x1E1C, 0x1E1D],
[0x1E1E, 0x1E1F],
[0x1E20, 0x1E21],
[0x1E22, 0x1E23],
[0x1E24, 0x1E25],
[0x1E26, 0x1E27],
[0x1E28, 0x1E29],
[0x1E2A, 0x1E2B],
[0x1E2C, 0x1E2D],
[0x1E2E, 0x1E2F],
[0x1E30, 0x1E31],
[0x1E32, 0x1E33],
[0x1E34, 0x1E35],
[0x1E36, 0x1E37],
[0x1E38, 0x1E39],
[0x1E3A, 0x1E3B],
[0x1E3C, 0x1E3D],
[0x1E3E, 0x1E3F],
[0x1E40, 0x1E41],
[0x1E42, 0x1E43],
[0x1E44, 0x1E45],
[0x1E46, 0x1E47],
[0x1E48, 0x1E49],
[0x1E4A, 0x1E4B],
[0x1E4C, 0x1E4D],
[0x1E4E, 0x1E4F],
[0x1E50, 0x1E51],
[0x1E52, 0x1E53],
[0x1E54, 0x1E55],
[0x1E56, 0x1E57],
[0x1E58, 0x1E59],
[0x1E5A, 0x1E5B],
[0x1E5C, 0x1E5D],
[0x1E5E, 0x1E5F],
[0x1E60, 0x1E61],
[0x1E62, 0x1E63],
[0x1E64, 0x1E65],
[0x1E66, 0x1E67],
[0x1E68, 0x1E69],
[0x1E6A, 0x1E6B],
[0x1E6C, 0x1E6D],
[0x1E6E, 0x1E6F],
[0x1E70, 0x1E71],
[0x1E72, 0x1E73],
[0x1E74, 0x1E75],
[0x1E76, 0x1E77],
[0x1E78, 0x1E79],
[0x1E7A, 0x1E7B],
[0x1E7C, 0x1E7D],
[0x1E7E, 0x1E7F],
[0x1E80, 0x1E81],
[0x1E82, 0x1E83],
[0x1E84, 0x1E85],
[0x1E86, 0x1E87],
[0x1E88, 0x1E89],
[0x1E8A, 0x1E8B],
[0x1E8C, 0x1E8D],
[0x1E8E, 0x1E8F],
[0x1E90, 0x1E91],
[0x1E92, 0x1E93],
[0x1E94, 0x1E95],
[0x1E9B, 0x1E61],
[0x1E9E, 0xDF],
[0x1EA0, 0x1EA1],
[0x1EA2, 0x1EA3],
[0x1EA4, 0x1EA5],
[0x1EA6, 0x1EA7],
[0x1EA8, 0x1EA9],
[0x1EAA, 0x1EAB],
[0x1EAC, 0x1EAD],
[0x1EAE, 0x1EAF],
[0x1EB0, 0x1EB1],
[0x1EB2, 0x1EB3],
[0x1EB4, 0x1EB5],
[0x1EB6, 0x1EB7],
[0x1EB8, 0x1EB9],
[0x1EBA, 0x1EBB],
[0x1EBC, 0x1EBD],
[0x1EBE, 0x1EBF],
[0x1EC0, 0x1EC1],
[0x1EC2, 0x1EC3],
[0x1EC4, 0x1EC5],
[0x1EC6, 0x1EC7],
[0x1EC8, 0x1EC9],
[0x1ECA, 0x1ECB],
[0x1ECC, 0x1ECD],
[0x1ECE, 0x1ECF],
[0x1ED0, 0x1ED1],
[0x1ED2, 0x1ED3],
[0x1ED4, 0x1ED5],
[0x1ED6, 0x1ED7],
[0x1ED8, 0x1ED9],
[0x1EDA, 0x1EDB],
[0x1EDC, 0x1EDD],
[0x1EDE, 0x1EDF],
[0x1EE0, 0x1EE1],
[0x1EE2, 0x1EE3],
[0x1EE4, 0x1EE5],
[0x1EE6, 0x1EE7],
[0x1EE8, 0x1EE9],
[0x1EEA, 0x1EEB],
[0x1EEC, 0x1EED],
[0x1EEE, 0x1EEF],
[0x1EF0, 0x1EF1],
[0x1EF2, 0x1EF3],
[0x1EF4, 0x1EF5],
[0x1EF6, 0x1EF7],
[0x1EF8, 0x1EF9],
[0x1EFA, 0x1EFB],
[0x1EFC, 0x1EFD],
[0x1EFE, 0x1EFF],
[0x1F08, 0x1F00],
[0x1F09, 0x1F01],
[0x1F0A, 0x1F02],
[0x1F0B, 0x1F03],
[0x1F0C, 0x1F04],
[0x1F0D, 0x1F05],
[0x1F0E, 0x1F06],
[0x1F0F, 0x1F07],
[0x1F18, 0x1F10],
[0x1F19, 0x1F11],
[0x1F1A, 0x1F12],
[0x1F1B, 0x1F13],
[0x1F1C, 0x1F14],
[0x1F1D, 0x1F15],
[0x1F28, 0x1F20],
[0x1F29, 0x1F21],
[0x1F2A, 0x1F22],
[0x1F2B, 0x1F23],
[0x1F2C, 0x1F24],
[0x1F2D, 0x1F25],
[0x1F2E, 0x1F26],
[0x1F2F, 0x1F27],
[0x1F38, 0x1F30],
[0x1F39, 0x1F31],
[0x1F3A, 0x1F32],
[0x1F3B, 0x1F33],
[0x1F3C, 0x1F34],
[0x1F3D, 0x1F35],
[0x1F3E, 0x1F36],
[0x1F3F, 0x1F37],
[0x1F48, 0x1F40],
[0x1F49, 0x1F41],
[0x1F4A, 0x1F42],
[0x1F4B, 0x1F43],
[0x1F4C, 0x1F44],
[0x1F4D, 0x1F45],
[0x1F59, 0x1F51],
[0x1F5B, 0x1F53],
[0x1F5D, 0x1F55],
[0x1F5F, 0x1F57],
[0x1F68, 0x1F60],
[0x1F69, 0x1F61],
[0x1F6A, 0x1F62],
[0x1F6B, 0x1F63],
[0x1F6C, 0x1F64],
[0x1F6D, 0x1F65],
[0x1F6E, 0x1F66],
[0x1F6F, 0x1F67],
[0x1F88, 0x1F80],
[0x1F89, 0x1F81],
[0x1F8A, 0x1F82],
[0x1F8B, 0x1F83],
[0x1F8C, 0x1F84],
[0x1F8D, 0x1F85],
[0x1F8E, 0x1F86],
[0x1F8F, 0x1F87],
[0x1F98, 0x1F90],
[0x1F99, 0x1F91],
[0x1F9A, 0x1F92],
[0x1F9B, 0x1F93],
[0x1F9C, 0x1F94],
[0x1F9D, 0x1F95],
[0x1F9E, 0x1F96],
[0x1F9F, 0x1F97],
[0x1FA8, 0x1FA0],
[0x1FA9, 0x1FA1],
[0x1FAA, 0x1FA2],
[0x1FAB, 0x1FA3],
[0x1FAC, 0x1FA4],
[0x1FAD, 0x1FA5],
[0x1FAE, 0x1FA6],
[0x1FAF, 0x1FA7],
[0x1FB8, 0x1FB0],
[0x1FB9, 0x1FB1],
[0x1FBA, 0x1F70],
[0x1FBB, 0x1F71],
[0x1FBC, 0x1FB3],
[0x1FBE, 0x3B9],
[0x1FC8, 0x1F72],
[0x1FC9, 0x1F73],
[0x1FCA, 0x1F74],
[0x1FCB, 0x1F75],
[0x1FCC, 0x1FC3],
[0x1FD3, 0x390],
[0x1FD8, 0x1FD0],
[0x1FD9, 0x1FD1],
[0x1FDA, 0x1F76],
[0x1FDB, 0x1F77],
[0x1FE3, 0x3B0],
[0x1FE8, 0x1FE0],
[0x1FE9, 0x1FE1],
[0x1FEA, 0x1F7A],
[0x1FEB, 0x1F7B],
[0x1FEC, 0x1FE5],
[0x1FF8, 0x1F78],
[0x1FF9, 0x1F79],
[0x1FFA, 0x1F7C],
[0x1FFB, 0x1F7D],
[0x1FFC, 0x1FF3],
[0x2126, 0x3C9],
[0x212A, 0x6B],
[0x212B, 0xE5],
[0x2132, 0x214E],
[0x2160, 0x2170],
[0x2161, 0x2171],
[0x2162, 0x2172],
[0x2163, 0x2173],
[0x2164, 0x2174],
[0x2165, 0x2175],
[0x2166, 0x2176],
[0x2167, 0x2177],
[0x2168, 0x2178],
[0x2169, 0x2179],
[0x216A, 0x217A],
[0x216B, 0x217B],
[0x216C, 0x217C],
[0x216D, 0x217D],
[0x216E, 0x217E],
[0x216F, 0x217F],
[0x2183, 0x2184],
[0x24B6, 0x24D0],
[0x24B7, 0x24D1],
[0x24B8, 0x24D2],
[0x24B9, 0x24D3],
[0x24BA, 0x24D4],
[0x24BB, 0x24D5],
[0x24BC, 0x24D6],
[0x24BD, 0x24D7],
[0x24BE, 0x24D8],
[0x24BF, 0x24D9],
[0x24C0, 0x24DA],
[0x24C1, 0x24DB],
[0x24C2, 0x24DC],
[0x24C3, 0x24DD],
[0x24C4, 0x24DE],
[0x24C5, 0x24DF],
[0x24C6, 0x24E0],
[0x24C7, 0x24E1],
[0x24C8, 0x24E2],
[0x24C9, 0x24E3],
[0x24CA, 0x24E4],
[0x24CB, 0x24E5],
[0x24CC, 0x24E6],
[0x24CD, 0x24E7],
[0x24CE, 0x24E8],
[0x24CF, 0x24E9],
[0x2C00, 0x2C30],
[0x2C01, 0x2C31],
[0x2C02, 0x2C32],
[0x2C03, 0x2C33],
[0x2C04, 0x2C34],
[0x2C05, 0x2C35],
[0x2C06, 0x2C36],
[0x2C07, 0x2C37],
[0x2C08, 0x2C38],
[0x2C09, 0x2C39],
[0x2C0A, 0x2C3A],
[0x2C0B, 0x2C3B],
[0x2C0C, 0x2C3C],
[0x2C0D, 0x2C3D],
[0x2C0E, 0x2C3E],
[0x2C0F, 0x2C3F],
[0x2C10, 0x2C40],
[0x2C11, 0x2C41],
[0x2C12, 0x2C42],
[0x2C13, 0x2C43],
[0x2C14, 0x2C44],
[0x2C15, 0x2C45],
[0x2C16, 0x2C46],
[0x2C17, 0x2C47],
[0x2C18, 0x2C48],
[0x2C19, 0x2C49],
[0x2C1A, 0x2C4A],
[0x2C1B, 0x2C4B],
[0x2C1C, 0x2C4C],
[0x2C1D, 0x2C4D],
[0x2C1E, 0x2C4E],
[0x2C1F, 0x2C4F],
[0x2C20, 0x2C50],
[0x2C21, 0x2C51],
[0x2C22, 0x2C52],
[0x2C23, 0x2C53],
[0x2C24, 0x2C54],
[0x2C25, 0x2C55],
[0x2C26, 0x2C56],
[0x2C27, 0x2C57],
[0x2C28, 0x2C58],
[0x2C29, 0x2C59],
[0x2C2A, 0x2C5A],
[0x2C2B, 0x2C5B],
[0x2C2C, 0x2C5C],
[0x2C2D, 0x2C5D],
[0x2C2E, 0x2C5E],
[0x2C2F, 0x2C5F],
[0x2C60, 0x2C61],
[0x2C62, 0x26B],
[0x2C63, 0x1D7D],
[0x2C64, 0x27D],
[0x2C67, 0x2C68],
[0x2C69, 0x2C6A],
[0x2C6B, 0x2C6C],
[0x2C6D, 0x251],
[0x2C6E, 0x271],
[0x2C6F, 0x250],
[0x2C70, 0x252],
[0x2C72, 0x2C73],
[0x2C75, 0x2C76],
[0x2C7E, 0x23F],
[0x2C7F, 0x240],
[0x2C80, 0x2C81],
[0x2C82, 0x2C83],
[0x2C84, 0x2C85],
[0x2C86, 0x2C87],
[0x2C88, 0x2C89],
[0x2C8A, 0x2C8B],
[0x2C8C, 0x2C8D],
[0x2C8E, 0x2C8F],
[0x2C90, 0x2C91],
[0x2C92, 0x2C93],
[0x2C94, 0x2C95],
[0x2C96, 0x2C97],
[0x2C98, 0x2C99],
[0x2C9A, 0x2C9B],
[0x2C9C, 0x2C9D],
[0x2C9E, 0x2C9F],
[0x2CA0, 0x2CA1],
[0x2CA2, 0x2CA3],
[0x2CA4, 0x2CA5],
[0x2CA6, 0x2CA7],
[0x2CA8, 0x2CA9],
[0x2CAA, 0x2CAB],
[0x2CAC, 0x2CAD],
[0x2CAE, 0x2CAF],
[0x2CB0, 0x2CB1],
[0x2CB2, 0x2CB3],
[0x2CB4, 0x2CB5],
[0x2CB6, 0x2CB7],
[0x2CB8, 0x2CB9],
[0x2CBA, 0x2CBB],
[0x2CBC, 0x2CBD],
[0x2CBE, 0x2CBF],
[0x2CC0, 0x2CC1],
[0x2CC2, 0x2CC3],
[0x2CC4, 0x2CC5],
[0x2CC6, 0x2CC7],
[0x2CC8, 0x2CC9],
[0x2CCA, 0x2CCB],
[0x2CCC, 0x2CCD],
[0x2CCE, 0x2CCF],
[0x2CD0, 0x2CD1],
[0x2CD2, 0x2CD3],
[0x2CD4, 0x2CD5],
[0x2CD6, 0x2CD7],
[0x2CD8, 0x2CD9],
[0x2CDA, 0x2CDB],
[0x2CDC, 0x2CDD],
[0x2CDE, 0x2CDF],
[0x2CE0, 0x2CE1],
[0x2CE2, 0x2CE3],
[0x2CEB, 0x2CEC],
[0x2CED, 0x2CEE],
[0x2CF2, 0x2CF3],
[0xA640, 0xA641],
[0xA642, 0xA643],
[0xA644, 0xA645],
[0xA646, 0xA647],
[0xA648, 0xA649],
[0xA64A, 0xA64B],
[0xA64C, 0xA64D],
[0xA64E, 0xA64F],
[0xA650, 0xA651],
[0xA652, 0xA653],
[0xA654, 0xA655],
[0xA656, 0xA657],
[0xA658, 0xA659],
[0xA65A, 0xA65B],
[0xA65C, 0xA65D],
[0xA65E, 0xA65F],
[0xA660, 0xA661],
[0xA662, 0xA663],
[0xA664, 0xA665],
[0xA666, 0xA667],
[0xA668, 0xA669],
[0xA66A, 0xA66B],
[0xA66C, 0xA66D],
[0xA680, 0xA681],
[0xA682, 0xA683],
[0xA684, 0xA685],
[0xA686, 0xA687],
[0xA688, 0xA689],
[0xA68A, 0xA68B],
[0xA68C, 0xA68D],
[0xA68E, 0xA68F],
[0xA690, 0xA691],
[0xA692, 0xA693],
[0xA694, 0xA695],
[0xA696, 0xA697],
[0xA698, 0xA699],
[0xA69A, 0xA69B],
[0xA722, 0xA723],
[0xA724, 0xA725],
[0xA726, 0xA727],
[0xA728, 0xA729],
[0xA72A, 0xA72B],
[0xA72C, 0xA72D],
[0xA72E, 0xA72F],
[0xA732, 0xA733],
[0xA734, 0xA735],
[0xA736, 0xA737],
[0xA738, 0xA739],
[0xA73A, 0xA73B],
[0xA73C, 0xA73D],
[0xA73E, 0xA73F],
[0xA740, 0xA741],
[0xA742, 0xA743],
[0xA744, 0xA745],
[0xA746, 0xA747],
[0xA748, 0xA749],
[0xA74A, 0xA74B],
[0xA74C, 0xA74D],
[0xA74E, 0xA74F],
[0xA750, 0xA751],
[0xA752, 0xA753],
[0xA754, 0xA755],
[0xA756, 0xA757],
[0xA758, 0xA759],
[0xA75A, 0xA75B],
[0xA75C, 0xA75D],
[0xA75E, 0xA75F],
[0xA760, 0xA761],
[0xA762, 0xA763],
[0xA764, 0xA765],
[0xA766, 0xA767],
[0xA768, 0xA769],
[0xA76A, 0xA76B],
[0xA76C, 0xA76D],
[0xA76E, 0xA76F],
[0xA779, 0xA77A],
[0xA77B, 0xA77C],
[0xA77D, 0x1D79],
[0xA77E, 0xA77F],
[0xA780, 0xA781],
[0xA782, 0xA783],
[0xA784, 0xA785],
[0xA786, 0xA787],
[0xA78B, 0xA78C],
[0xA78D, 0x265],
[0xA790, 0xA791],
[0xA792, 0xA793],
[0xA796, 0xA797],
[0xA798, 0xA799],
[0xA79A, 0xA79B],
[0xA79C, 0xA79D],
[0xA79E, 0xA79F],
[0xA7A0, 0xA7A1],
[0xA7A2, 0xA7A3],
[0xA7A4, 0xA7A5],
[0xA7A6, 0xA7A7],
[0xA7A8, 0xA7A9],
[0xA7AA, 0x266],
[0xA7AB, 0x25C],
[0xA7AC, 0x261],
[0xA7AD, 0x26C],
[0xA7AE, 0x26A],
[0xA7B0, 0x29E],
[0xA7B1, 0x287],
[0xA7B2, 0x29D],
[0xA7B3, 0xAB53],
[0xA7B4, 0xA7B5],
[0xA7B6, 0xA7B7],
[0xA7B8, 0xA7B9],
[0xA7BA, 0xA7BB],
[0xA7BC, 0xA7BD],
[0xA7BE, 0xA7BF],
[0xA7C0, 0xA7C1],
[0xA7C2, 0xA7C3],
[0xA7C4, 0xA794],
[0xA7C5, 0x282],
[0xA7C6, 0x1D8E],
[0xA7C7, 0xA7C8],
[0xA7C9, 0xA7CA],
[0xA7CB, 0x264],
[0xA7CC, 0xA7CD],
[0xA7D0, 0xA7D1],
[0xA7D6, 0xA7D7],
[0xA7D8, 0xA7D9],
[0xA7DA, 0xA7DB],
[0xA7DC, 0x19B],
[0xA7F5, 0xA7F6],
[0xAB70, 0x13A0],
[0xAB71, 0x13A1],
[0xAB72, 0x13A2],
[0xAB73, 0x13A3],
[0xAB74, 0x13A4],
[0xAB75, 0x13A5],
[0xAB76, 0x13A6],
[0xAB77, 0x13A7],
[0xAB78, 0x13A8],
[0xAB79, 0x13A9],
[0xAB7A, 0x13AA],
[0xAB7B, 0x13AB],
[0xAB7C, 0x13AC],
[0xAB7D, 0x13AD],
[0xAB7E, 0x13AE],
[0xAB7F, 0x13AF],
[0xAB80, 0x13B0],
[0xAB81, 0x13B1],
[0xAB82, 0x13B2],
[0xAB83, 0x13B3],
[0xAB84, 0x13B4],
[0xAB85, 0x13B5],
[0xAB86, 0x13B6],
[0xAB87, 0x13B7],
[0xAB88, 0x13B8],
[0xAB89, 0x13B9],
[0xAB8A, 0x13BA],
[0xAB8B, 0x13BB],
[0xAB8C, 0x13BC],
[0xAB8D, 0x13BD],
[0xAB8E, 0x13BE],
[0xAB8F, 0x13BF],
[0xAB90, 0x13C0],
[0xAB91, 0x13C1],
[0xAB92, 0x13C2],
[0xAB93, 0x13C3],
[0xAB94, 0x13C4],
[0xAB95, 0x13C5],
[0xAB96, 0x13C6],
[0xAB97, 0x13C7],
[0xAB98, 0x13C8],
[0xAB99, 0x13C9],
[0xAB9A, 0x13CA],
[0xAB9B, 0x13CB],
[0xAB9C, 0x13CC],
[0xAB9D, 0x13CD],
[0xAB9E, 0x13CE],
[0xAB9F, 0x13CF],
[0xABA0, 0x13D0],
[0xABA1, 0x13D1],
[0xABA2, 0x13D2],
[0xABA3, 0x13D3],
[0xABA4, 0x13D4],
[0xABA5, 0x13D5],
[0xABA6, 0x13D6],
[0xABA7, 0x13D7],
[0xABA8, 0x13D8],
[0xABA9, 0x13D9],
[0xABAA, 0x13DA],
[0xABAB, 0x13DB],
[0xABAC, 0x13DC],
[0xABAD, 0x13DD],
[0xABAE, 0x13DE],
[0xABAF, 0x13DF],
[0xABB0, 0x13E0],
[0xABB1, 0x13E1],
[0xABB2, 0x13E2],
[0xABB3, 0x13E3],
[0xABB4, 0x13E4],
[0xABB5, 0x13E5],
[0xABB6, 0x13E6],
[0xABB7, 0x13E7],
[0xABB8, 0x13E8],
[0xABB9, 0x13E9],
[0xABBA, 0x13EA],
[0xABBB, 0x13EB],
[0xABBC, 0x13EC],
[0xABBD, 0x13ED],
[0xABBE, 0x13EE],
[0xABBF, 0x13EF],
[0xFB05, 0xFB06],
[0xFF21, 0xFF41],
[0xFF22, 0xFF42],
[0xFF23, 0xFF43],
[0xFF24, 0xFF44],
[0xFF25, 0xFF45],
[0xFF26, 0xFF46],
[0xFF27, 0xFF47],
[0xFF28, 0xFF48],
[0xFF29, 0xFF49],
[0xFF2A, 0xFF4A],
[0xFF2B, 0xFF4B],
[0xFF2C, 0xFF4C],
[0xFF2D, 0xFF4D],
[0xFF2E, 0xFF4E],
[0xFF2F, 0xFF4F],
[0xFF30, 0xFF50],
[0xFF31, 0xFF51],
[0xFF32, 0xFF52],
[0xFF33, 0xFF53],
[0xFF34, 0xFF54],
[0xFF35, 0xFF55],
[0xFF36, 0xFF56],
[0xFF37, 0xFF57],
[0xFF38, 0xFF58],
[0xFF39, 0xFF59],
[0xFF3A, 0xFF5A],
[0x10400, 0x10428],
[0x10401, 0x10429],
[0x10402, 0x1042A],
[0x10403, 0x1042B],
[0x10404, 0x1042C],
[0x10405, 0x1042D],
[0x10406, 0x1042E],
[0x10407, 0x1042F],
[0x10408, 0x10430],
[0x10409, 0x10431],
[0x1040A, 0x10432],
[0x1040B, 0x10433],
[0x1040C, 0x10434],
[0x1040D, 0x10435],
[0x1040E, 0x10436],
[0x1040F, 0x10437],
[0x10410, 0x10438],
[0x10411, 0x10439],
[0x10412, 0x1043A],
[0x10413, 0x1043B],
[0x10414, 0x1043C],
[0x10415, 0x1043D],
[0x10416, 0x1043E],
[0x10417, 0x1043F],
[0x10418, 0x10440],
[0x10419, 0x10441],
[0x1041A, 0x10442],
[0x1041B, 0x10443],
[0x1041C, 0x10444],
[0x1041D, 0x10445],
[0x1041E, 0x10446],
[0x1041F, 0x10447],
[0x10420, 0x10448],
[0x10421, 0x10449],
[0x10422, 0x1044A],
[0x10423, 0x1044B],
[0x10424, 0x1044C],
[0x10425, 0x1044D],
[0x10426, 0x1044E],
[0x10427, 0x1044F],
[0x104B0, 0x104D8],
[0x104B1, 0x104D9],
[0x104B2, 0x104DA],
[0x104B3, 0x104DB],
[0x104B4, 0x104DC],
[0x104B5, 0x104DD],
[0x104B6, 0x104DE],
[0x104B7, 0x104DF],
[0x104B8, 0x104E0],
[0x104B9, 0x104E1],
[0x104BA, 0x104E2],
[0x104BB, 0x104E3],
[0x104BC, 0x104E4],
[0x104BD, 0x104E5],
[0x104BE, 0x104E6],
[0x104BF, 0x104E7],
[0x104C0, 0x104E8],
[0x104C1, 0x104E9],
[0x104C2, 0x104EA],
[0x104C3, 0x104EB],
[0x104C4, 0x104EC],
[0x104C5, 0x104ED],
[0x104C6, 0x104EE],
[0x104C7, 0x104EF],
[0x104C8, 0x104F0],
[0x104C9, 0x104F1],
[0x104CA, 0x104F2],
[0x104CB, 0x104F3],
[0x104CC, 0x104F4],
[0x104CD, 0x104F5],
[0x104CE, 0x104F6],
[0x104CF, 0x104F7],
[0x104D0, 0x104F8],
[0x104D1, 0x104F9],
[0x104D2, 0x104FA],
[0x104D3, 0x104FB],
[0x10570, 0x10597],
[0x10571, 0x10598],
[0x10572, 0x10599],
[0x10573, 0x1059A],
[0x10574, 0x1059B],
[0x10575, 0x1059C],
[0x10576, 0x1059D],
[0x10577, 0x1059E],
[0x10578, 0x1059F],
[0x10579, 0x105A0],
[0x1057A, 0x105A1],
[0x1057C, 0x105A3],
[0x1057D, 0x105A4],
[0x1057E, 0x105A5],
[0x1057F, 0x105A6],
[0x10580, 0x105A7],
[0x10581, 0x105A8],
[0x10582, 0x105A9],
[0x10583, 0x105AA],
[0x10584, 0x105AB],
[0x10585, 0x105AC],
[0x10586, 0x105AD],
[0x10587, 0x105AE],
[0x10588, 0x105AF],
[0x10589, 0x105B0],
[0x1058A, 0x105B1],
[0x1058C, 0x105B3],
[0x1058D, 0x105B4],
[0x1058E, 0x105B5],
[0x1058F, 0x105B6],
[0x10590, 0x105B7],
[0x10591, 0x105B8],
[0x10592, 0x105B9],
[0x10594, 0x105BB],
[0x10595, 0x105BC],
[0x10C80, 0x10CC0],
[0x10C81, 0x10CC1],
[0x10C82, 0x10CC2],
[0x10C83, 0x10CC3],
[0x10C84, 0x10CC4],
[0x10C85, 0x10CC5],
[0x10C86, 0x10CC6],
[0x10C87, 0x10CC7],
[0x10C88, 0x10CC8],
[0x10C89, 0x10CC9],
[0x10C8A, 0x10CCA],
[0x10C8B, 0x10CCB],
[0x10C8C, 0x10CCC],
[0x10C8D, 0x10CCD],
[0x10C8E, 0x10CCE],
[0x10C8F, 0x10CCF],
[0x10C90, 0x10CD0],
[0x10C91, 0x10CD1],
[0x10C92, 0x10CD2],
[0x10C93, 0x10CD3],
[0x10C94, 0x10CD4],
[0x10C95, 0x10CD5],
[0x10C96, 0x10CD6],
[0x10C97, 0x10CD7],
[0x10C98, 0x10CD8],
[0x10C99, 0x10CD9],
[0x10C9A, 0x10CDA],
[0x10C9B, 0x10CDB],
[0x10C9C, 0x10CDC],
[0x10C9D, 0x10CDD],
[0x10C9E, 0x10CDE],
[0x10C9F, 0x10CDF],
[0x10CA0, 0x10CE0],
[0x10CA1, 0x10CE1],
[0x10CA2, 0x10CE2],
[0x10CA3, 0x10CE3],
[0x10CA4, 0x10CE4],
[0x10CA5, 0x10CE5],
[0x10CA6, 0x10CE6],
[0x10CA7, 0x10CE7],
[0x10CA8, 0x10CE8],
[0x10CA9, 0x10CE9],
[0x10CAA, 0x10CEA],
[0x10CAB, 0x10CEB],
[0x10CAC, 0x10CEC],
[0x10CAD, 0x10CED],
[0x10CAE, 0x10CEE],
[0x10CAF, 0x10CEF],
[0x10CB0, 0x10CF0],
[0x10CB1, 0x10CF1],
[0x10CB2, 0x10CF2],
[0x10D50, 0x10D70],
[0x10D51, 0x10D71],
[0x10D52, 0x10D72],
[0x10D53, 0x10D73],
[0x10D54, 0x10D74],
[0x10D55, 0x10D75],
[0x10D56, 0x10D76],
[0x10D57, 0x10D77],
[0x10D58, 0x10D78],
[0x10D59, 0x10D79],
[0x10D5A, 0x10D7A],
[0x10D5B, 0x10D7B],
[0x10D5C, 0x10D7C],
[0x10D5D, 0x10D7D],
[0x10D5E, 0x10D7E],
[0x10D5F, 0x10D7F],
[0x10D60, 0x10D80],
[0x10D61, 0x10D81],
[0x10D62, 0x10D82],
[0x10D63, 0x10D83],
[0x10D64, 0x10D84],
[0x10D65, 0x10D85],
[0x118A0, 0x118C0],
[0x118A1, 0x118C1],
[0x118A2, 0x118C2],
[0x118A3, 0x118C3],
[0x118A4, 0x118C4],
[0x118A5, 0x118C5],
[0x118A6, 0x118C6],
[0x118A7, 0x118C7],
[0x118A8, 0x118C8],
[0x118A9, 0x118C9],
[0x118AA, 0x118CA],
[0x118AB, 0x118CB],
[0x118AC, 0x118CC],
[0x118AD, 0x118CD],
[0x118AE, 0x118CE],
[0x118AF, 0x118CF],
[0x118B0, 0x118D0],
[0x118B1, 0x118D1],
[0x118B2, 0x118D2],
[0x118B3, 0x118D3],
[0x118B4, 0x118D4],
[0x118B5, 0x118D5],
[0x118B6, 0x118D6],
[0x118B7, 0x118D7],
[0x118B8, 0x118D8],
[0x118B9, 0x118D9],
[0x118BA, 0x118DA],
[0x118BB, 0x118DB],
[0x118BC, 0x118DC],
[0x118BD, 0x118DD],
[0x118BE, 0x118DE],
[0x118BF, 0x118DF],
[0x16E40, 0x16E60],
[0x16E41, 0x16E61],
[0x16E42, 0x16E62],
[0x16E43, 0x16E63],
[0x16E44, 0x16E64],
[0x16E45, 0x16E65],
[0x16E46, 0x16E66],
[0x16E47, 0x16E67],
[0x16E48, 0x16E68],
[0x16E49, 0x16E69],
[0x16E4A, 0x16E6A],
[0x16E4B, 0x16E6B],
[0x16E4C, 0x16E6C],
[0x16E4D, 0x16E6D],
[0x16E4E, 0x16E6E],
[0x16E4F, 0x16E6F],
[0x16E50, 0x16E70],
[0x16E51, 0x16E71],
[0x16E52, 0x16E72],
[0x16E53, 0x16E73],
[0x16E54, 0x16E74],
[0x16E55, 0x16E75],
[0x16E56, 0x16E76],
[0x16E57, 0x16E77],
[0x16E58, 0x16E78],
[0x16E59, 0x16E79],
[0x16E5A, 0x16E7A],
[0x16E5B, 0x16E7B],
[0x16E5C, 0x16E7C],
[0x16E5D, 0x16E7D],
[0x16E5E, 0x16E7E],
[0x16E5F, 0x16E7F],
[0x1E900, 0x1E922],
[0x1E901, 0x1E923],
[0x1E902, 0x1E924],
[0x1E903, 0x1E925],
[0x1E904, 0x1E926],
[0x1E905, 0x1E927],
[0x1E906, 0x1E928],
[0x1E907, 0x1E929],
[0x1E908, 0x1E92A],
[0x1E909, 0x1E92B],
[0x1E90A, 0x1E92C],
[0x1E90B, 0x1E92D],
[0x1E90C, 0x1E92E],
[0x1E90D, 0x1E92F],
[0x1E90E, 0x1E930],
[0x1E90F, 0x1E931],
[0x1E910, 0x1E932],
[0x1E911, 0x1E933],
[0x1E912, 0x1E934],
[0x1E913, 0x1E935],
[0x1E914, 0x1E936],
[0x1E915, 0x1E937],
[0x1E916, 0x1E938],
[0x1E917, 0x1E939],
[0x1E918, 0x1E93A],
[0x1E919, 0x1E93B],
[0x1E91A, 0x1E93C],
[0x1E91B, 0x1E93D],
[0x1E91C, 0x1E93E],
[0x1E91D, 0x1E93F],
[0x1E91E, 0x1E940],
[0x1E91F, 0x1E941],
[0x1E920, 0x1E942],
[0x1E921, 0x1E943]
]);
mathiasbynens-regexpu-core-e35919f/data/iu-mappings.js 0000664 0000000 0000000 00000033604 14717712160 0023045 0 ustar 00root root 0000000 0000000 module.exports = new Map([
[0x4B, 0x212A],
[0x53, 0x17F],
[0x6B, 0x212A],
[0x73, 0x17F],
[0xB5, 0x39C],
[0xC5, 0x212B],
[0xDF, 0x1E9E],
[0xE5, 0x212B],
[0x17F, 0x53],
[0x1C4, 0x1C5],
[0x1C5, 0x1C4],
[0x1C7, 0x1C8],
[0x1C8, 0x1C7],
[0x1CA, 0x1CB],
[0x1CB, 0x1CA],
[0x1F1, 0x1F2],
[0x1F2, 0x1F1],
[0x345, 0x1FBE],
[0x390, 0x1FD3],
[0x392, 0x3D0],
[0x395, 0x3F5],
[0x398, 0x3F4],
[0x399, 0x1FBE],
[0x39A, 0x3F0],
[0x39C, 0xB5],
[0x3A0, 0x3D6],
[0x3A1, 0x3F1],
[0x3A3, 0x3C2],
[0x3A6, 0x3D5],
[0x3A9, 0x2126],
[0x3B0, 0x1FE3],
[0x3B8, 0x3F4],
[0x3C2, 0x3A3],
[0x3C9, 0x2126],
[0x3D0, 0x392],
[0x3D1, 0x3F4],
[0x3D5, 0x3A6],
[0x3D6, 0x3A0],
[0x3F0, 0x39A],
[0x3F1, 0x3A1],
[0x3F4, [
0x398,
0x3D1,
0x3B8
]],
[0x3F5, 0x395],
[0x412, 0x1C80],
[0x414, 0x1C81],
[0x41E, 0x1C82],
[0x421, 0x1C83],
[0x422, 0x1C85],
[0x42A, 0x1C86],
[0x462, 0x1C87],
[0x1C80, 0x412],
[0x1C81, 0x414],
[0x1C82, 0x41E],
[0x1C83, 0x421],
[0x1C84, 0x1C85],
[0x1C85, [
0x422,
0x1C84
]],
[0x1C86, 0x42A],
[0x1C87, 0x462],
[0x1C88, 0xA64A],
[0x1E60, 0x1E9B],
[0x1E9B, 0x1E60],
[0x1E9E, 0xDF],
[0x1F80, 0x1F88],
[0x1F81, 0x1F89],
[0x1F82, 0x1F8A],
[0x1F83, 0x1F8B],
[0x1F84, 0x1F8C],
[0x1F85, 0x1F8D],
[0x1F86, 0x1F8E],
[0x1F87, 0x1F8F],
[0x1F88, 0x1F80],
[0x1F89, 0x1F81],
[0x1F8A, 0x1F82],
[0x1F8B, 0x1F83],
[0x1F8C, 0x1F84],
[0x1F8D, 0x1F85],
[0x1F8E, 0x1F86],
[0x1F8F, 0x1F87],
[0x1F90, 0x1F98],
[0x1F91, 0x1F99],
[0x1F92, 0x1F9A],
[0x1F93, 0x1F9B],
[0x1F94, 0x1F9C],
[0x1F95, 0x1F9D],
[0x1F96, 0x1F9E],
[0x1F97, 0x1F9F],
[0x1F98, 0x1F90],
[0x1F99, 0x1F91],
[0x1F9A, 0x1F92],
[0x1F9B, 0x1F93],
[0x1F9C, 0x1F94],
[0x1F9D, 0x1F95],
[0x1F9E, 0x1F96],
[0x1F9F, 0x1F97],
[0x1FA0, 0x1FA8],
[0x1FA1, 0x1FA9],
[0x1FA2, 0x1FAA],
[0x1FA3, 0x1FAB],
[0x1FA4, 0x1FAC],
[0x1FA5, 0x1FAD],
[0x1FA6, 0x1FAE],
[0x1FA7, 0x1FAF],
[0x1FA8, 0x1FA0],
[0x1FA9, 0x1FA1],
[0x1FAA, 0x1FA2],
[0x1FAB, 0x1FA3],
[0x1FAC, 0x1FA4],
[0x1FAD, 0x1FA5],
[0x1FAE, 0x1FA6],
[0x1FAF, 0x1FA7],
[0x1FB3, 0x1FBC],
[0x1FBC, 0x1FB3],
[0x1FBE, [
0x345,
0x399
]],
[0x1FC3, 0x1FCC],
[0x1FCC, 0x1FC3],
[0x1FD3, 0x390],
[0x1FE3, 0x3B0],
[0x1FF3, 0x1FFC],
[0x1FFC, 0x1FF3],
[0x2126, [
0x3A9,
0x3C9
]],
[0x212A, 0x4B],
[0x212B, [
0xC5,
0xE5
]],
[0xA64A, 0x1C88],
[0xFB05, 0xFB06],
[0xFB06, 0xFB05],
[0x10400, 0x10428],
[0x10401, 0x10429],
[0x10402, 0x1042A],
[0x10403, 0x1042B],
[0x10404, 0x1042C],
[0x10405, 0x1042D],
[0x10406, 0x1042E],
[0x10407, 0x1042F],
[0x10408, 0x10430],
[0x10409, 0x10431],
[0x1040A, 0x10432],
[0x1040B, 0x10433],
[0x1040C, 0x10434],
[0x1040D, 0x10435],
[0x1040E, 0x10436],
[0x1040F, 0x10437],
[0x10410, 0x10438],
[0x10411, 0x10439],
[0x10412, 0x1043A],
[0x10413, 0x1043B],
[0x10414, 0x1043C],
[0x10415, 0x1043D],
[0x10416, 0x1043E],
[0x10417, 0x1043F],
[0x10418, 0x10440],
[0x10419, 0x10441],
[0x1041A, 0x10442],
[0x1041B, 0x10443],
[0x1041C, 0x10444],
[0x1041D, 0x10445],
[0x1041E, 0x10446],
[0x1041F, 0x10447],
[0x10420, 0x10448],
[0x10421, 0x10449],
[0x10422, 0x1044A],
[0x10423, 0x1044B],
[0x10424, 0x1044C],
[0x10425, 0x1044D],
[0x10426, 0x1044E],
[0x10427, 0x1044F],
[0x10428, 0x10400],
[0x10429, 0x10401],
[0x1042A, 0x10402],
[0x1042B, 0x10403],
[0x1042C, 0x10404],
[0x1042D, 0x10405],
[0x1042E, 0x10406],
[0x1042F, 0x10407],
[0x10430, 0x10408],
[0x10431, 0x10409],
[0x10432, 0x1040A],
[0x10433, 0x1040B],
[0x10434, 0x1040C],
[0x10435, 0x1040D],
[0x10436, 0x1040E],
[0x10437, 0x1040F],
[0x10438, 0x10410],
[0x10439, 0x10411],
[0x1043A, 0x10412],
[0x1043B, 0x10413],
[0x1043C, 0x10414],
[0x1043D, 0x10415],
[0x1043E, 0x10416],
[0x1043F, 0x10417],
[0x10440, 0x10418],
[0x10441, 0x10419],
[0x10442, 0x1041A],
[0x10443, 0x1041B],
[0x10444, 0x1041C],
[0x10445, 0x1041D],
[0x10446, 0x1041E],
[0x10447, 0x1041F],
[0x10448, 0x10420],
[0x10449, 0x10421],
[0x1044A, 0x10422],
[0x1044B, 0x10423],
[0x1044C, 0x10424],
[0x1044D, 0x10425],
[0x1044E, 0x10426],
[0x1044F, 0x10427],
[0x104B0, 0x104D8],
[0x104B1, 0x104D9],
[0x104B2, 0x104DA],
[0x104B3, 0x104DB],
[0x104B4, 0x104DC],
[0x104B5, 0x104DD],
[0x104B6, 0x104DE],
[0x104B7, 0x104DF],
[0x104B8, 0x104E0],
[0x104B9, 0x104E1],
[0x104BA, 0x104E2],
[0x104BB, 0x104E3],
[0x104BC, 0x104E4],
[0x104BD, 0x104E5],
[0x104BE, 0x104E6],
[0x104BF, 0x104E7],
[0x104C0, 0x104E8],
[0x104C1, 0x104E9],
[0x104C2, 0x104EA],
[0x104C3, 0x104EB],
[0x104C4, 0x104EC],
[0x104C5, 0x104ED],
[0x104C6, 0x104EE],
[0x104C7, 0x104EF],
[0x104C8, 0x104F0],
[0x104C9, 0x104F1],
[0x104CA, 0x104F2],
[0x104CB, 0x104F3],
[0x104CC, 0x104F4],
[0x104CD, 0x104F5],
[0x104CE, 0x104F6],
[0x104CF, 0x104F7],
[0x104D0, 0x104F8],
[0x104D1, 0x104F9],
[0x104D2, 0x104FA],
[0x104D3, 0x104FB],
[0x104D8, 0x104B0],
[0x104D9, 0x104B1],
[0x104DA, 0x104B2],
[0x104DB, 0x104B3],
[0x104DC, 0x104B4],
[0x104DD, 0x104B5],
[0x104DE, 0x104B6],
[0x104DF, 0x104B7],
[0x104E0, 0x104B8],
[0x104E1, 0x104B9],
[0x104E2, 0x104BA],
[0x104E3, 0x104BB],
[0x104E4, 0x104BC],
[0x104E5, 0x104BD],
[0x104E6, 0x104BE],
[0x104E7, 0x104BF],
[0x104E8, 0x104C0],
[0x104E9, 0x104C1],
[0x104EA, 0x104C2],
[0x104EB, 0x104C3],
[0x104EC, 0x104C4],
[0x104ED, 0x104C5],
[0x104EE, 0x104C6],
[0x104EF, 0x104C7],
[0x104F0, 0x104C8],
[0x104F1, 0x104C9],
[0x104F2, 0x104CA],
[0x104F3, 0x104CB],
[0x104F4, 0x104CC],
[0x104F5, 0x104CD],
[0x104F6, 0x104CE],
[0x104F7, 0x104CF],
[0x104F8, 0x104D0],
[0x104F9, 0x104D1],
[0x104FA, 0x104D2],
[0x104FB, 0x104D3],
[0x10570, 0x10597],
[0x10571, 0x10598],
[0x10572, 0x10599],
[0x10573, 0x1059A],
[0x10574, 0x1059B],
[0x10575, 0x1059C],
[0x10576, 0x1059D],
[0x10577, 0x1059E],
[0x10578, 0x1059F],
[0x10579, 0x105A0],
[0x1057A, 0x105A1],
[0x1057C, 0x105A3],
[0x1057D, 0x105A4],
[0x1057E, 0x105A5],
[0x1057F, 0x105A6],
[0x10580, 0x105A7],
[0x10581, 0x105A8],
[0x10582, 0x105A9],
[0x10583, 0x105AA],
[0x10584, 0x105AB],
[0x10585, 0x105AC],
[0x10586, 0x105AD],
[0x10587, 0x105AE],
[0x10588, 0x105AF],
[0x10589, 0x105B0],
[0x1058A, 0x105B1],
[0x1058C, 0x105B3],
[0x1058D, 0x105B4],
[0x1058E, 0x105B5],
[0x1058F, 0x105B6],
[0x10590, 0x105B7],
[0x10591, 0x105B8],
[0x10592, 0x105B9],
[0x10594, 0x105BB],
[0x10595, 0x105BC],
[0x10597, 0x10570],
[0x10598, 0x10571],
[0x10599, 0x10572],
[0x1059A, 0x10573],
[0x1059B, 0x10574],
[0x1059C, 0x10575],
[0x1059D, 0x10576],
[0x1059E, 0x10577],
[0x1059F, 0x10578],
[0x105A0, 0x10579],
[0x105A1, 0x1057A],
[0x105A3, 0x1057C],
[0x105A4, 0x1057D],
[0x105A5, 0x1057E],
[0x105A6, 0x1057F],
[0x105A7, 0x10580],
[0x105A8, 0x10581],
[0x105A9, 0x10582],
[0x105AA, 0x10583],
[0x105AB, 0x10584],
[0x105AC, 0x10585],
[0x105AD, 0x10586],
[0x105AE, 0x10587],
[0x105AF, 0x10588],
[0x105B0, 0x10589],
[0x105B1, 0x1058A],
[0x105B3, 0x1058C],
[0x105B4, 0x1058D],
[0x105B5, 0x1058E],
[0x105B6, 0x1058F],
[0x105B7, 0x10590],
[0x105B8, 0x10591],
[0x105B9, 0x10592],
[0x105BB, 0x10594],
[0x105BC, 0x10595],
[0x10C80, 0x10CC0],
[0x10C81, 0x10CC1],
[0x10C82, 0x10CC2],
[0x10C83, 0x10CC3],
[0x10C84, 0x10CC4],
[0x10C85, 0x10CC5],
[0x10C86, 0x10CC6],
[0x10C87, 0x10CC7],
[0x10C88, 0x10CC8],
[0x10C89, 0x10CC9],
[0x10C8A, 0x10CCA],
[0x10C8B, 0x10CCB],
[0x10C8C, 0x10CCC],
[0x10C8D, 0x10CCD],
[0x10C8E, 0x10CCE],
[0x10C8F, 0x10CCF],
[0x10C90, 0x10CD0],
[0x10C91, 0x10CD1],
[0x10C92, 0x10CD2],
[0x10C93, 0x10CD3],
[0x10C94, 0x10CD4],
[0x10C95, 0x10CD5],
[0x10C96, 0x10CD6],
[0x10C97, 0x10CD7],
[0x10C98, 0x10CD8],
[0x10C99, 0x10CD9],
[0x10C9A, 0x10CDA],
[0x10C9B, 0x10CDB],
[0x10C9C, 0x10CDC],
[0x10C9D, 0x10CDD],
[0x10C9E, 0x10CDE],
[0x10C9F, 0x10CDF],
[0x10CA0, 0x10CE0],
[0x10CA1, 0x10CE1],
[0x10CA2, 0x10CE2],
[0x10CA3, 0x10CE3],
[0x10CA4, 0x10CE4],
[0x10CA5, 0x10CE5],
[0x10CA6, 0x10CE6],
[0x10CA7, 0x10CE7],
[0x10CA8, 0x10CE8],
[0x10CA9, 0x10CE9],
[0x10CAA, 0x10CEA],
[0x10CAB, 0x10CEB],
[0x10CAC, 0x10CEC],
[0x10CAD, 0x10CED],
[0x10CAE, 0x10CEE],
[0x10CAF, 0x10CEF],
[0x10CB0, 0x10CF0],
[0x10CB1, 0x10CF1],
[0x10CB2, 0x10CF2],
[0x10CC0, 0x10C80],
[0x10CC1, 0x10C81],
[0x10CC2, 0x10C82],
[0x10CC3, 0x10C83],
[0x10CC4, 0x10C84],
[0x10CC5, 0x10C85],
[0x10CC6, 0x10C86],
[0x10CC7, 0x10C87],
[0x10CC8, 0x10C88],
[0x10CC9, 0x10C89],
[0x10CCA, 0x10C8A],
[0x10CCB, 0x10C8B],
[0x10CCC, 0x10C8C],
[0x10CCD, 0x10C8D],
[0x10CCE, 0x10C8E],
[0x10CCF, 0x10C8F],
[0x10CD0, 0x10C90],
[0x10CD1, 0x10C91],
[0x10CD2, 0x10C92],
[0x10CD3, 0x10C93],
[0x10CD4, 0x10C94],
[0x10CD5, 0x10C95],
[0x10CD6, 0x10C96],
[0x10CD7, 0x10C97],
[0x10CD8, 0x10C98],
[0x10CD9, 0x10C99],
[0x10CDA, 0x10C9A],
[0x10CDB, 0x10C9B],
[0x10CDC, 0x10C9C],
[0x10CDD, 0x10C9D],
[0x10CDE, 0x10C9E],
[0x10CDF, 0x10C9F],
[0x10CE0, 0x10CA0],
[0x10CE1, 0x10CA1],
[0x10CE2, 0x10CA2],
[0x10CE3, 0x10CA3],
[0x10CE4, 0x10CA4],
[0x10CE5, 0x10CA5],
[0x10CE6, 0x10CA6],
[0x10CE7, 0x10CA7],
[0x10CE8, 0x10CA8],
[0x10CE9, 0x10CA9],
[0x10CEA, 0x10CAA],
[0x10CEB, 0x10CAB],
[0x10CEC, 0x10CAC],
[0x10CED, 0x10CAD],
[0x10CEE, 0x10CAE],
[0x10CEF, 0x10CAF],
[0x10CF0, 0x10CB0],
[0x10CF1, 0x10CB1],
[0x10CF2, 0x10CB2],
[0x10D50, 0x10D70],
[0x10D51, 0x10D71],
[0x10D52, 0x10D72],
[0x10D53, 0x10D73],
[0x10D54, 0x10D74],
[0x10D55, 0x10D75],
[0x10D56, 0x10D76],
[0x10D57, 0x10D77],
[0x10D58, 0x10D78],
[0x10D59, 0x10D79],
[0x10D5A, 0x10D7A],
[0x10D5B, 0x10D7B],
[0x10D5C, 0x10D7C],
[0x10D5D, 0x10D7D],
[0x10D5E, 0x10D7E],
[0x10D5F, 0x10D7F],
[0x10D60, 0x10D80],
[0x10D61, 0x10D81],
[0x10D62, 0x10D82],
[0x10D63, 0x10D83],
[0x10D64, 0x10D84],
[0x10D65, 0x10D85],
[0x10D70, 0x10D50],
[0x10D71, 0x10D51],
[0x10D72, 0x10D52],
[0x10D73, 0x10D53],
[0x10D74, 0x10D54],
[0x10D75, 0x10D55],
[0x10D76, 0x10D56],
[0x10D77, 0x10D57],
[0x10D78, 0x10D58],
[0x10D79, 0x10D59],
[0x10D7A, 0x10D5A],
[0x10D7B, 0x10D5B],
[0x10D7C, 0x10D5C],
[0x10D7D, 0x10D5D],
[0x10D7E, 0x10D5E],
[0x10D7F, 0x10D5F],
[0x10D80, 0x10D60],
[0x10D81, 0x10D61],
[0x10D82, 0x10D62],
[0x10D83, 0x10D63],
[0x10D84, 0x10D64],
[0x10D85, 0x10D65],
[0x118A0, 0x118C0],
[0x118A1, 0x118C1],
[0x118A2, 0x118C2],
[0x118A3, 0x118C3],
[0x118A4, 0x118C4],
[0x118A5, 0x118C5],
[0x118A6, 0x118C6],
[0x118A7, 0x118C7],
[0x118A8, 0x118C8],
[0x118A9, 0x118C9],
[0x118AA, 0x118CA],
[0x118AB, 0x118CB],
[0x118AC, 0x118CC],
[0x118AD, 0x118CD],
[0x118AE, 0x118CE],
[0x118AF, 0x118CF],
[0x118B0, 0x118D0],
[0x118B1, 0x118D1],
[0x118B2, 0x118D2],
[0x118B3, 0x118D3],
[0x118B4, 0x118D4],
[0x118B5, 0x118D5],
[0x118B6, 0x118D6],
[0x118B7, 0x118D7],
[0x118B8, 0x118D8],
[0x118B9, 0x118D9],
[0x118BA, 0x118DA],
[0x118BB, 0x118DB],
[0x118BC, 0x118DC],
[0x118BD, 0x118DD],
[0x118BE, 0x118DE],
[0x118BF, 0x118DF],
[0x118C0, 0x118A0],
[0x118C1, 0x118A1],
[0x118C2, 0x118A2],
[0x118C3, 0x118A3],
[0x118C4, 0x118A4],
[0x118C5, 0x118A5],
[0x118C6, 0x118A6],
[0x118C7, 0x118A7],
[0x118C8, 0x118A8],
[0x118C9, 0x118A9],
[0x118CA, 0x118AA],
[0x118CB, 0x118AB],
[0x118CC, 0x118AC],
[0x118CD, 0x118AD],
[0x118CE, 0x118AE],
[0x118CF, 0x118AF],
[0x118D0, 0x118B0],
[0x118D1, 0x118B1],
[0x118D2, 0x118B2],
[0x118D3, 0x118B3],
[0x118D4, 0x118B4],
[0x118D5, 0x118B5],
[0x118D6, 0x118B6],
[0x118D7, 0x118B7],
[0x118D8, 0x118B8],
[0x118D9, 0x118B9],
[0x118DA, 0x118BA],
[0x118DB, 0x118BB],
[0x118DC, 0x118BC],
[0x118DD, 0x118BD],
[0x118DE, 0x118BE],
[0x118DF, 0x118BF],
[0x16E40, 0x16E60],
[0x16E41, 0x16E61],
[0x16E42, 0x16E62],
[0x16E43, 0x16E63],
[0x16E44, 0x16E64],
[0x16E45, 0x16E65],
[0x16E46, 0x16E66],
[0x16E47, 0x16E67],
[0x16E48, 0x16E68],
[0x16E49, 0x16E69],
[0x16E4A, 0x16E6A],
[0x16E4B, 0x16E6B],
[0x16E4C, 0x16E6C],
[0x16E4D, 0x16E6D],
[0x16E4E, 0x16E6E],
[0x16E4F, 0x16E6F],
[0x16E50, 0x16E70],
[0x16E51, 0x16E71],
[0x16E52, 0x16E72],
[0x16E53, 0x16E73],
[0x16E54, 0x16E74],
[0x16E55, 0x16E75],
[0x16E56, 0x16E76],
[0x16E57, 0x16E77],
[0x16E58, 0x16E78],
[0x16E59, 0x16E79],
[0x16E5A, 0x16E7A],
[0x16E5B, 0x16E7B],
[0x16E5C, 0x16E7C],
[0x16E5D, 0x16E7D],
[0x16E5E, 0x16E7E],
[0x16E5F, 0x16E7F],
[0x16E60, 0x16E40],
[0x16E61, 0x16E41],
[0x16E62, 0x16E42],
[0x16E63, 0x16E43],
[0x16E64, 0x16E44],
[0x16E65, 0x16E45],
[0x16E66, 0x16E46],
[0x16E67, 0x16E47],
[0x16E68, 0x16E48],
[0x16E69, 0x16E49],
[0x16E6A, 0x16E4A],
[0x16E6B, 0x16E4B],
[0x16E6C, 0x16E4C],
[0x16E6D, 0x16E4D],
[0x16E6E, 0x16E4E],
[0x16E6F, 0x16E4F],
[0x16E70, 0x16E50],
[0x16E71, 0x16E51],
[0x16E72, 0x16E52],
[0x16E73, 0x16E53],
[0x16E74, 0x16E54],
[0x16E75, 0x16E55],
[0x16E76, 0x16E56],
[0x16E77, 0x16E57],
[0x16E78, 0x16E58],
[0x16E79, 0x16E59],
[0x16E7A, 0x16E5A],
[0x16E7B, 0x16E5B],
[0x16E7C, 0x16E5C],
[0x16E7D, 0x16E5D],
[0x16E7E, 0x16E5E],
[0x16E7F, 0x16E5F],
[0x1E900, 0x1E922],
[0x1E901, 0x1E923],
[0x1E902, 0x1E924],
[0x1E903, 0x1E925],
[0x1E904, 0x1E926],
[0x1E905, 0x1E927],
[0x1E906, 0x1E928],
[0x1E907, 0x1E929],
[0x1E908, 0x1E92A],
[0x1E909, 0x1E92B],
[0x1E90A, 0x1E92C],
[0x1E90B, 0x1E92D],
[0x1E90C, 0x1E92E],
[0x1E90D, 0x1E92F],
[0x1E90E, 0x1E930],
[0x1E90F, 0x1E931],
[0x1E910, 0x1E932],
[0x1E911, 0x1E933],
[0x1E912, 0x1E934],
[0x1E913, 0x1E935],
[0x1E914, 0x1E936],
[0x1E915, 0x1E937],
[0x1E916, 0x1E938],
[0x1E917, 0x1E939],
[0x1E918, 0x1E93A],
[0x1E919, 0x1E93B],
[0x1E91A, 0x1E93C],
[0x1E91B, 0x1E93D],
[0x1E91C, 0x1E93E],
[0x1E91D, 0x1E93F],
[0x1E91E, 0x1E940],
[0x1E91F, 0x1E941],
[0x1E920, 0x1E942],
[0x1E921, 0x1E943],
[0x1E922, 0x1E900],
[0x1E923, 0x1E901],
[0x1E924, 0x1E902],
[0x1E925, 0x1E903],
[0x1E926, 0x1E904],
[0x1E927, 0x1E905],
[0x1E928, 0x1E906],
[0x1E929, 0x1E907],
[0x1E92A, 0x1E908],
[0x1E92B, 0x1E909],
[0x1E92C, 0x1E90A],
[0x1E92D, 0x1E90B],
[0x1E92E, 0x1E90C],
[0x1E92F, 0x1E90D],
[0x1E930, 0x1E90E],
[0x1E931, 0x1E90F],
[0x1E932, 0x1E910],
[0x1E933, 0x1E911],
[0x1E934, 0x1E912],
[0x1E935, 0x1E913],
[0x1E936, 0x1E914],
[0x1E937, 0x1E915],
[0x1E938, 0x1E916],
[0x1E939, 0x1E917],
[0x1E93A, 0x1E918],
[0x1E93B, 0x1E919],
[0x1E93C, 0x1E91A],
[0x1E93D, 0x1E91B],
[0x1E93E, 0x1E91C],
[0x1E93F, 0x1E91D],
[0x1E940, 0x1E91E],
[0x1E941, 0x1E91F],
[0x1E942, 0x1E920],
[0x1E943, 0x1E921]
]);
mathiasbynens-regexpu-core-e35919f/demo.js 0000664 0000000 0000000 00000000606 14717712160 0020623 0 ustar 00root root 0000000 0000000 'use strict';
const rewritePattern = require('./rewrite-pattern.js');
const parse = require('regjsparser').parse;
const generate = require('regjsgen').generate;
const regenerate = require('regenerate');
const pattern = String.raw`\p{RGI_Emoji}`;
const processedPattern = rewritePattern(pattern, 'v', {
'unicodeSetsFlag': 'transform'
});
console.log(JSON.stringify(processedPattern));
mathiasbynens-regexpu-core-e35919f/package.json 0000664 0000000 0000000 00000003101 14717712160 0021620 0 ustar 00root root 0000000 0000000 {
"name": "regexpu-core",
"version": "6.2.0",
"description": "regexpu’s core functionality (i.e. `rewritePattern(pattern, flag)`), capable of translating ES6 Unicode regular expressions to ES5.",
"homepage": "https://mths.be/regexpu",
"main": "rewrite-pattern.js",
"engines": {
"node": ">=4"
},
"keywords": [
"codegen",
"desugaring",
"ecmascript",
"es5",
"es6",
"harmony",
"javascript",
"refactoring",
"regex",
"regexp",
"regular expressions",
"rewriting",
"syntax",
"transformation",
"transpile",
"transpiler",
"unicode"
],
"license": "MIT",
"author": {
"name": "Mathias Bynens",
"url": "https://mathiasbynens.be/"
},
"repository": {
"type": "git",
"url": "https://github.com/mathiasbynens/regexpu-core.git"
},
"bugs": "https://github.com/mathiasbynens/regexpu-core/issues",
"files": [
"LICENSE-MIT.txt",
"rewrite-pattern.js",
"data/all-characters.js",
"data/character-class-escape-sets.js",
"data/i-bmp-mappings.js",
"data/iu-foldings.js",
"data/iu-mappings.js"
],
"scripts": {
"build": "node scripts/index.js",
"test": "node --test tests/tests.js",
"test-node6": "mocha tests",
"cover": "NODE_V8_COVERAGE=coverage node --test --experimental-test-coverage tests/tests.js"
},
"dependencies": {
"regenerate": "^1.4.2",
"regenerate-unicode-properties": "^10.2.0",
"regjsgen": "^0.8.0",
"regjsparser": "^0.12.0",
"unicode-match-property-ecmascript": "^2.0.0",
"unicode-match-property-value-ecmascript": "^2.1.0"
},
"devDependencies": {
"jsesc": "^3.0.2",
"@unicode/unicode-16.0.0": "^1.6.2"
}
}
mathiasbynens-regexpu-core-e35919f/property-escapes.md 0000664 0000000 0000000 00000021715 14717712160 0023174 0 ustar 00root root 0000000 0000000 # Unicode property escapes in _regexpu_
To enable support for [Unicode property escapes](https://github.com/mathiasbynens/es-regexp-unicode-property-escapes), set [the `unicodePropertyEscape` option](README.md#stable-regular-expression-features) to `transform`.
```js
rewritePattern('\\p{Script_Extensions=Anatolian_Hieroglyphs}', 'u', {
'unicodePropertyEscapes': 'transform'
});
// → '[\\u{14400}-\\u{14646}]'
```
If you’re targeting ES5 environments, consider enabling [the `unicodeFlag` option](README.md#stable-regular-expression-features).
```js
rewritePattern('\\p{Script_Extensions=Anatolian_Hieroglyphs}', 'u', {
'unicodePropertyEscape': 'transform',
'unicodeFlag': 'transform'
});
// → '(?:\\uD811[\\uDC00-\\uDE46])'
```
[An online demo is available.](https://mothereff.in/regexpu#input=var+regex+%3D+/%5Cp%7BScript_Extensions%3DGreek%7D/u%3B&unicodePropertyEscape=1)
What follows is an exhaustive overview of the Unicode properties and values that _regexpu_ supports in `\p{…}` and `\P{…}` expressions in regular expressions with the `u` flag.
## Non-binary properties
### `General_Category`
Possible values:
```sh
$ node -e 'require("regenerate-unicode-properties").get("General_Category").forEach(c => { console.log(`\\p{${c}}`); })'
\p{Cased_Letter}
\p{Close_Punctuation}
\p{Connector_Punctuation}
\p{Control}
\p{Currency_Symbol}
\p{Dash_Punctuation}
\p{Decimal_Number}
\p{Enclosing_Mark}
\p{Final_Punctuation}
\p{Format}
\p{Initial_Punctuation}
\p{Letter}
\p{Letter_Number}
\p{Line_Separator}
\p{Lowercase_Letter}
\p{Mark}
\p{Math_Symbol}
\p{Modifier_Letter}
\p{Modifier_Symbol}
\p{Nonspacing_Mark}
\p{Number}
\p{Open_Punctuation}
\p{Other}
\p{Other_Letter}
\p{Other_Number}
\p{Other_Punctuation}
\p{Other_Symbol}
\p{Paragraph_Separator}
\p{Private_Use}
\p{Punctuation}
\p{Separator}
\p{Space_Separator}
\p{Spacing_Mark}
\p{Surrogate}
\p{Symbol}
\p{Titlecase_Letter}
\p{Unassigned}
\p{Uppercase_Letter}
```
Note that the `General_Category=` prefix may be used, e.g. `\p{General_Category=Cased_Letter}`.
Category aliases may be used, e.g. `\p{Lc}` or `\p{General_Category=Lc}`, although IMHO it’s more readable to stick to the canonical category names listed above.
### `Script` & `Script_Extensions`
The sets of possible values for `Script` and `Script_Extensions` are identical:
```sh
$ node -e 'require("regenerate-unicode-properties").get("Script_Extensions").forEach(s => { console.log(`\\p{Script_Extensions=${s}}`); })'
\p{Script_Extensions=Adlam}
\p{Script_Extensions=Ahom}
\p{Script_Extensions=Anatolian_Hieroglyphs}
\p{Script_Extensions=Arabic}
\p{Script_Extensions=Armenian}
\p{Script_Extensions=Avestan}
\p{Script_Extensions=Balinese}
\p{Script_Extensions=Bamum}
\p{Script_Extensions=Bassa_Vah}
\p{Script_Extensions=Batak}
\p{Script_Extensions=Bengali}
\p{Script_Extensions=Bhaiksuki}
\p{Script_Extensions=Bopomofo}
\p{Script_Extensions=Brahmi}
\p{Script_Extensions=Braille}
\p{Script_Extensions=Buginese}
\p{Script_Extensions=Buhid}
\p{Script_Extensions=Canadian_Aboriginal}
\p{Script_Extensions=Carian}
\p{Script_Extensions=Caucasian_Albanian}
\p{Script_Extensions=Chakma}
\p{Script_Extensions=Cham}
\p{Script_Extensions=Cherokee}
\p{Script_Extensions=Chorasmian}
\p{Script_Extensions=Common}
\p{Script_Extensions=Coptic}
\p{Script_Extensions=Cuneiform}
\p{Script_Extensions=Cypriot}
\p{Script_Extensions=Cypro_Minoan}
\p{Script_Extensions=Cyrillic}
\p{Script_Extensions=Deseret}
\p{Script_Extensions=Devanagari}
\p{Script_Extensions=Dives_Akuru}
\p{Script_Extensions=Dogra}
\p{Script_Extensions=Duployan}
\p{Script_Extensions=Egyptian_Hieroglyphs}
\p{Script_Extensions=Elbasan}
\p{Script_Extensions=Elymaic}
\p{Script_Extensions=Ethiopic}
\p{Script_Extensions=Georgian}
\p{Script_Extensions=Glagolitic}
\p{Script_Extensions=Gothic}
\p{Script_Extensions=Grantha}
\p{Script_Extensions=Greek}
\p{Script_Extensions=Gujarati}
\p{Script_Extensions=Gunjala_Gondi}
\p{Script_Extensions=Gurmukhi}
\p{Script_Extensions=Han}
\p{Script_Extensions=Hangul}
\p{Script_Extensions=Hanifi_Rohingya}
\p{Script_Extensions=Hanunoo}
\p{Script_Extensions=Hatran}
\p{Script_Extensions=Hebrew}
\p{Script_Extensions=Hiragana}
\p{Script_Extensions=Imperial_Aramaic}
\p{Script_Extensions=Inherited}
\p{Script_Extensions=Inscriptional_Pahlavi}
\p{Script_Extensions=Inscriptional_Parthian}
\p{Script_Extensions=Javanese}
\p{Script_Extensions=Kaithi}
\p{Script_Extensions=Kannada}
\p{Script_Extensions=Katakana}
\p{Script_Extensions=Kawi}
\p{Script_Extensions=Kayah_Li}
\p{Script_Extensions=Kharoshthi}
\p{Script_Extensions=Khitan_Small_Script}
\p{Script_Extensions=Khmer}
\p{Script_Extensions=Khojki}
\p{Script_Extensions=Khudawadi}
\p{Script_Extensions=Lao}
\p{Script_Extensions=Latin}
\p{Script_Extensions=Lepcha}
\p{Script_Extensions=Limbu}
\p{Script_Extensions=Linear_A}
\p{Script_Extensions=Linear_B}
\p{Script_Extensions=Lisu}
\p{Script_Extensions=Lycian}
\p{Script_Extensions=Lydian}
\p{Script_Extensions=Mahajani}
\p{Script_Extensions=Makasar}
\p{Script_Extensions=Malayalam}
\p{Script_Extensions=Mandaic}
\p{Script_Extensions=Manichaean}
\p{Script_Extensions=Marchen}
\p{Script_Extensions=Masaram_Gondi}
\p{Script_Extensions=Medefaidrin}
\p{Script_Extensions=Meetei_Mayek}
\p{Script_Extensions=Mende_Kikakui}
\p{Script_Extensions=Meroitic_Cursive}
\p{Script_Extensions=Meroitic_Hieroglyphs}
\p{Script_Extensions=Miao}
\p{Script_Extensions=Modi}
\p{Script_Extensions=Mongolian}
\p{Script_Extensions=Mro}
\p{Script_Extensions=Multani}
\p{Script_Extensions=Myanmar}
\p{Script_Extensions=Nabataean}
\p{Script_Extensions=Nag_Mundari}
\p{Script_Extensions=Nandinagari}
\p{Script_Extensions=New_Tai_Lue}
\p{Script_Extensions=Newa}
\p{Script_Extensions=Nko}
\p{Script_Extensions=Nushu}
\p{Script_Extensions=Nyiakeng_Puachue_Hmong}
\p{Script_Extensions=Ogham}
\p{Script_Extensions=Ol_Chiki}
\p{Script_Extensions=Old_Hungarian}
\p{Script_Extensions=Old_Italic}
\p{Script_Extensions=Old_North_Arabian}
\p{Script_Extensions=Old_Permic}
\p{Script_Extensions=Old_Persian}
\p{Script_Extensions=Old_Sogdian}
\p{Script_Extensions=Old_South_Arabian}
\p{Script_Extensions=Old_Turkic}
\p{Script_Extensions=Old_Uyghur}
\p{Script_Extensions=Oriya}
\p{Script_Extensions=Osage}
\p{Script_Extensions=Osmanya}
\p{Script_Extensions=Pahawh_Hmong}
\p{Script_Extensions=Palmyrene}
\p{Script_Extensions=Pau_Cin_Hau}
\p{Script_Extensions=Phags_Pa}
\p{Script_Extensions=Phoenician}
\p{Script_Extensions=Psalter_Pahlavi}
\p{Script_Extensions=Rejang}
\p{Script_Extensions=Runic}
\p{Script_Extensions=Samaritan}
\p{Script_Extensions=Saurashtra}
\p{Script_Extensions=Sharada}
\p{Script_Extensions=Shavian}
\p{Script_Extensions=Siddham}
\p{Script_Extensions=SignWriting}
\p{Script_Extensions=Sinhala}
\p{Script_Extensions=Sogdian}
\p{Script_Extensions=Sora_Sompeng}
\p{Script_Extensions=Soyombo}
\p{Script_Extensions=Sundanese}
\p{Script_Extensions=Syloti_Nagri}
\p{Script_Extensions=Syriac}
\p{Script_Extensions=Tagalog}
\p{Script_Extensions=Tagbanwa}
\p{Script_Extensions=Tai_Le}
\p{Script_Extensions=Tai_Tham}
\p{Script_Extensions=Tai_Viet}
\p{Script_Extensions=Takri}
\p{Script_Extensions=Tamil}
\p{Script_Extensions=Tangsa}
\p{Script_Extensions=Tangut}
\p{Script_Extensions=Telugu}
\p{Script_Extensions=Thaana}
\p{Script_Extensions=Thai}
\p{Script_Extensions=Tibetan}
\p{Script_Extensions=Tifinagh}
\p{Script_Extensions=Tirhuta}
\p{Script_Extensions=Toto}
\p{Script_Extensions=Ugaritic}
\p{Script_Extensions=Vai}
\p{Script_Extensions=Vithkuqi}
\p{Script_Extensions=Wancho}
\p{Script_Extensions=Warang_Citi}
\p{Script_Extensions=Yezidi}
\p{Script_Extensions=Yi}
\p{Script_Extensions=Zanabazar_Square}
```
Note that script name aliases may be used as well, e.g. `\p{Script_Extensions=Aghb}`, although IMHO it’s more readable to stick to the canonical script names listed above.
## Binary properties
The following binary properties are supported:
```sh
$ node -e 'require("regenerate-unicode-properties").get("Binary_Property").forEach(p => { console.log(`\\p{${p}}`); })'
\p{ASCII}
\p{ASCII_Hex_Digit}
\p{Alphabetic}
\p{Any}
\p{Assigned}
\p{Bidi_Control}
\p{Bidi_Mirrored}
\p{Case_Ignorable}
\p{Cased}
\p{Changes_When_Casefolded}
\p{Changes_When_Casemapped}
\p{Changes_When_Lowercased}
\p{Changes_When_NFKC_Casefolded}
\p{Changes_When_Titlecased}
\p{Changes_When_Uppercased}
\p{Dash}
\p{Default_Ignorable_Code_Point}
\p{Deprecated}
\p{Diacritic}
\p{Emoji}
\p{Emoji_Component}
\p{Emoji_Modifier}
\p{Emoji_Modifier_Base}
\p{Emoji_Presentation}
\p{Extended_Pictographic}
\p{Extender}
\p{Grapheme_Base}
\p{Grapheme_Extend}
\p{Hex_Digit}
\p{IDS_Binary_Operator}
\p{IDS_Trinary_Operator}
\p{ID_Continue}
\p{ID_Start}
\p{Ideographic}
\p{Join_Control}
\p{Logical_Order_Exception}
\p{Lowercase}
\p{Math}
\p{Noncharacter_Code_Point}
\p{Pattern_Syntax}
\p{Pattern_White_Space}
\p{Quotation_Mark}
\p{Radical}
\p{Regional_Indicator}
\p{Sentence_Terminal}
\p{Soft_Dotted}
\p{Terminal_Punctuation}
\p{Unified_Ideograph}
\p{Uppercase}
\p{Variation_Selector}
\p{White_Space}
\p{XID_Continue}
\p{XID_Start}
```
Note that property name aliases may be used as well, e.g. `\p{AHex}`, although IMHO it’s more readable to stick to the canonical property names listed above.
mathiasbynens-regexpu-core-e35919f/rewrite-pattern.js 0000664 0000000 0000000 00000075213 14717712160 0023041 0 ustar 00root root 0000000 0000000 'use strict';
const generate = require('regjsgen').generate;
const parse = require('regjsparser').parse;
const regenerate = require('regenerate');
const unicodeMatchProperty = require('unicode-match-property-ecmascript');
const unicodeMatchPropertyValue = require('unicode-match-property-value-ecmascript');
const iuMappings = require('./data/iu-mappings.js');
const iBMPMappings = require('./data/i-bmp-mappings.js');
const iuFoldings = require('./data/iu-foldings.js');
const ESCAPE_SETS = require('./data/character-class-escape-sets.js');
const { UNICODE_SET, UNICODE_IV_SET } = require('./data/all-characters.js');
function flatMap(array, callback) {
const result = [];
array.forEach(item => {
const res = callback(item);
if (Array.isArray(res)) {
result.push.apply(result, res);
} else {
result.push(res);
}
});
return result;
}
function regenerateContainsAstral(regenerateData) {
const data = regenerateData.data;
return data.length >= 1 && data[data.length - 1] >= 0x10000;
}
// https://tc39.es/ecma262/#prod-SyntaxCharacter
const SYNTAX_CHARS = /[\\^$.*+?()[\]{}|]/g;
const ASTRAL_SET = regenerate().addRange(0x10000, 0x10FFFF);
const NEWLINE_SET = regenerate().add(
// `LineTerminator`s (https://mths.be/es6#sec-line-terminators):
0x000A, // Line Feed
0x000D, // Carriage Return
0x2028, // Line Separator
0x2029 // Paragraph Separator
);
// Prepare a Regenerate set containing all code points that are supposed to be
// matched by `/./u`. https://mths.be/es6#sec-atom
const DOT_SET_UNICODE = UNICODE_SET.clone() // all Unicode code points
.remove(NEWLINE_SET);
const getCharacterClassEscapeSet = (character, unicode, ignoreCase, shouldApplySCF) => {
if (unicode) {
if (ignoreCase) {
const result = ESCAPE_SETS.UNICODE_IGNORE_CASE.get(character);
if (shouldApplySCF) {
return ESCAPE_SETS.UNICODESET_IGNORE_CASE.get(character);
} else {
return result;
}
}
return ESCAPE_SETS.UNICODE.get(character);
}
return ESCAPE_SETS.REGULAR.get(character);
};
const getUnicodeDotSet = (dotAll) => {
return dotAll ? UNICODE_SET : DOT_SET_UNICODE;
};
const getUnicodePropertyValueSet = (property, value) => {
const path = value ?
`${ property }/${ value }` :
`Binary_Property/${ property }`;
try {
return require(`regenerate-unicode-properties/${ path }.js`);
} catch (exception) {
throw new Error(
`Failed to recognize value \`${ value }\` for property ` +
`\`${ property }\`.`
);
}
};
const handleLoneUnicodePropertyNameOrValue = (value) => {
// It could be a `General_Category` value or a binary property.
// Note: `unicodeMatchPropertyValue` throws on invalid values.
try {
const property = 'General_Category';
const category = unicodeMatchPropertyValue(property, value);
return getUnicodePropertyValueSet(property, category);
} catch (exception) {}
// It’s not a `General_Category` value, so check if it’s a property
// of strings.
try {
return getUnicodePropertyValueSet('Property_of_Strings', value);
} catch (exception) {}
// Lastly, check if it’s a binary property of single code points.
// Note: `unicodeMatchProperty` throws on invalid properties.
const property = unicodeMatchProperty(value);
return getUnicodePropertyValueSet(property);
};
const getUnicodePropertyEscapeSet = (value, isNegative, isUnicodeSetIgnoreCase) => {
const parts = value.split('=');
const firstPart = parts[0];
let set;
if (parts.length == 1) {
set = handleLoneUnicodePropertyNameOrValue(firstPart);
} else {
// The pattern consists of two parts, i.e. `Property=Value`.
const property = unicodeMatchProperty(firstPart);
const value = unicodeMatchPropertyValue(property, parts[1]);
set = getUnicodePropertyValueSet(property, value);
}
if (isNegative) {
if (set.strings) {
throw new Error('Cannot negate Unicode property of strings');
}
return {
characters: (isUnicodeSetIgnoreCase ? UNICODE_IV_SET : UNICODE_SET).clone().remove(set.characters),
strings: new Set()
};
}
return {
characters: set.characters.clone(),
strings: set.strings
// We need to escape strings like *️⃣ to make sure that they can be safely used in unions.
? new Set(set.strings.map(str => str.replace(SYNTAX_CHARS, '\\$&')))
: new Set()
};
};
const getUnicodePropertyEscapeCharacterClassData = (property, isNegative, isUnicodeSetIgnoreCase, shouldApplySCF) => {
const set = getUnicodePropertyEscapeSet(property, isNegative, isUnicodeSetIgnoreCase);
const data = getCharacterClassEmptyData();
const singleChars = shouldApplySCF ? regenerate(set.characters.toArray().map(ch => simpleCaseFolding(ch))) : set.characters;
const caseEqFlags = configGetCaseEqFlags();
if (caseEqFlags) {
for (const codepoint of singleChars.toArray()) {
const list = getCaseEquivalents(codepoint, caseEqFlags);
if (list) {
singleChars.add(list);
}
}
}
data.singleChars = singleChars;
if (set.strings.size > 0) {
data.longStrings = set.strings;
data.maybeIncludesStrings = true;
}
return data;
};
const CASE_EQ_FLAG_NONE = 0b00;
const CASE_EQ_FLAG_BMP = 0b01;
const CASE_EQ_FLAG_UNICODE = 0b10;
function configGetCaseEqFlags() {
let flags = CASE_EQ_FLAG_NONE;
if (config.modifiersData.i === true) {
if (config.transform.modifiers) {
flags |= CASE_EQ_FLAG_BMP;
if (config.flags.unicode || config.flags.unicodeSets) {
flags |= CASE_EQ_FLAG_UNICODE;
}
}
} else if (config.modifiersData.i === undefined) {
if (config.transform.unicodeFlag && config.flags.ignoreCase) {
flags |= CASE_EQ_FLAG_UNICODE;
}
}
return flags;
}
// Given a range of code points, add any case-equivalent code points in that range
// to a set.
regenerate.prototype.iuAddRange = function(min, max, caseEqFlags) {
const $this = this;
do {
const list = getCaseEquivalents(min, caseEqFlags);
if (list) {
$this.add(list);
}
} while (++min <= max);
return $this;
};
regenerate.prototype.iuRemoveRange = function(min, max, caseEqFlags) {
const $this = this;
do {
const list = getCaseEquivalents(min, caseEqFlags);
if (list) {
$this.remove(list);
}
} while (++min <= max);
return $this;
};
const update = (item, pattern) => {
let tree = parse(pattern, config.useUnicodeFlag ? 'u' : '', {
lookbehind: true,
namedGroups: true,
unicodePropertyEscape: true,
unicodeSet: true,
modifiers: true,
});
switch (tree.type) {
case 'characterClass':
case 'group':
case 'value':
// No wrapping needed.
break;
default:
// Wrap the pattern in a non-capturing group.
tree = wrap(tree, pattern);
}
Object.assign(item, tree);
};
const wrap = (tree, pattern) => {
// Wrap the pattern in a non-capturing group.
return {
'type': 'group',
'behavior': 'ignore',
'body': [tree],
'raw': `(?:${ pattern })`
};
};
/**
* Given any codepoint ch, returns false or an array of characters,
* such that for every c in the array,
* c != ch and Canonicalize(~, c) == Canonicalize(~, ch)
*
* where Canonicalize is defined in
* https://tc39.es/ecma262/#sec-runtime-semantics-canonicalize-ch
* @param {number} codePoint input code point
* @param {number} flags bitwise flags composed of CASE_EQ_FLAG_*
* @returns false | number[]
*/
const getCaseEquivalents = (codePoint, flags) => {
if (flags === CASE_EQ_FLAG_NONE) {
return false;
}
let result = ((flags & CASE_EQ_FLAG_UNICODE) ? iuMappings.get(codePoint) : undefined) || [];
if (typeof result === "number") result = [result];
if (flags & CASE_EQ_FLAG_BMP) {
for (const cp of [codePoint].concat(result)) {
// Fast path for ASCII characters
if (cp >= 0x41 && cp <= 0x5a) {
result.push(cp + 0x20);
} else if (cp >= 0x61 && cp <= 0x7a) {
result.push(cp - 0x20);
} else {
result = result.concat(iBMPMappings.get(cp) || []);
}
}
}
return result.length == 0 ? false : result;
};
// https://tc39.es/ecma262/#sec-maybesimplecasefolding
const simpleCaseFolding = (codePoint) => {
// Fast path for ASCII characters
if (codePoint <= 0x7F) {
if (codePoint >= 0x41 && codePoint <= 0x5A) {
return codePoint + 0x20;
}
return codePoint;
}
return iuFoldings.get(codePoint) || codePoint;
}
const buildHandler = (action) => {
switch (action) {
case 'union':
return {
single: (data, cp) => {
data.singleChars.add(cp);
},
regSet: (data, set2) => {
data.singleChars.add(set2);
},
range: (data, start, end) => {
data.singleChars.addRange(start, end);
},
iuRange: (data, start, end, caseEqFlags) => {
data.singleChars.iuAddRange(start, end, caseEqFlags);
},
nested: (data, nestedData) => {
data.singleChars.add(nestedData.singleChars);
for (const str of nestedData.longStrings) data.longStrings.add(str);
if (nestedData.maybeIncludesStrings) data.maybeIncludesStrings = true;
}
};
case 'union-negative': {
const regSet = (data, set2) => {
data.singleChars = UNICODE_SET.clone().remove(set2).add(data.singleChars);
};
return {
single: (data, cp) => {
const unicode = UNICODE_SET.clone();
data.singleChars = data.singleChars.contains(cp) ? unicode : unicode.remove(cp);
},
regSet: regSet,
range: (data, start, end) => {
data.singleChars = UNICODE_SET.clone().removeRange(start, end).add(data.singleChars);
},
iuRange: (data, start, end, caseEqFlags) => {
data.singleChars = UNICODE_SET.clone().iuRemoveRange(start, end, caseEqFlags).add(data.singleChars);
},
nested: (data, nestedData) => {
regSet(data, nestedData.singleChars);
if (nestedData.maybeIncludesStrings) throw new Error('ASSERTION ERROR');
}
};
}
case 'intersection': {
const regSet = (data, set2) => {
if (data.first) data.singleChars = set2;
else data.singleChars.intersection(set2);
};
return {
single: (data, cp) => {
data.singleChars = data.first || data.singleChars.contains(cp) ? regenerate(cp) : regenerate();
data.longStrings.clear();
data.maybeIncludesStrings = false;
},
regSet: (data, set) => {
regSet(data, set);
data.longStrings.clear();
data.maybeIncludesStrings = false;
},
range: (data, start, end) => {
if (data.first) data.singleChars.addRange(start, end);
else data.singleChars.intersection(regenerate().addRange(start, end));
data.longStrings.clear();
data.maybeIncludesStrings = false;
},
iuRange: (data, start, end, caseEqFlags) => {
if (data.first) data.singleChars.iuAddRange(start, end, caseEqFlags);
else data.singleChars.intersection(regenerate().iuAddRange(start, end, caseEqFlags));
data.longStrings.clear();
data.maybeIncludesStrings = false;
},
nested: (data, nestedData) => {
regSet(data, nestedData.singleChars);
if (data.first) {
data.longStrings = nestedData.longStrings;
data.maybeIncludesStrings = nestedData.maybeIncludesStrings;
} else {
for (const str of data.longStrings) {
if (!nestedData.longStrings.has(str)) data.longStrings.delete(str);
}
if (!nestedData.maybeIncludesStrings) data.maybeIncludesStrings = false;
}
}
};
}
case 'subtraction': {
const regSet = (data, set2) => {
if (data.first) data.singleChars.add(set2);
else data.singleChars.remove(set2);
};
return {
single: (data, cp) => {
if (data.first) data.singleChars.add(cp);
else data.singleChars.remove(cp);
},
regSet: regSet,
range: (data, start, end) => {
if (data.first) data.singleChars.addRange(start, end);
else data.singleChars.removeRange(start, end);
},
iuRange: (data, start, end, caseEqFlags) => {
if (data.first) data.singleChars.iuAddRange(start, end, caseEqFlags);
else data.singleChars.iuRemoveRange(start, end, caseEqFlags);
},
nested: (data, nestedData) => {
regSet(data, nestedData.singleChars);
if (data.first) {
data.longStrings = nestedData.longStrings;
data.maybeIncludesStrings = nestedData.maybeIncludesStrings;
} else {
for (const str of data.longStrings) {
if (nestedData.longStrings.has(str)) data.longStrings.delete(str);
}
}
}
};
}
// The `default` clause is only here as a safeguard; it should never be
// reached. Code coverage tools should ignore it.
/* node:coverage ignore next */
default:
throw new Error(`Unknown set action: ${ characterClassItem.kind }`);
}
};
const getCharacterClassEmptyData = () => ({
transformed: config.transform.unicodeFlag,
singleChars: regenerate(),
longStrings: new Set(),
hasEmptyString: false,
first: true,
maybeIncludesStrings: false
});
const concatCaseEquivalents = (codePoint, caseEqFlags) => {
const caseEquivalents = getCaseEquivalents(codePoint, caseEqFlags);
if (caseEquivalents) {
return [codePoint, ...caseEquivalents];
}
return [codePoint];
};
const computeClassStrings = (classStrings, regenerateOptions, caseEqFlags, shouldApplySCF) => {
let data = getCharacterClassEmptyData();
for (const string of classStrings.strings) {
if (string.characters.length === 1) {
const codePoint = shouldApplySCF ? simpleCaseFolding(string.characters[0].codePoint) : string.characters[0].codePoint
concatCaseEquivalents(codePoint, caseEqFlags).forEach((cp) => {
data.singleChars.add(cp);
});
} else {
let stringifiedString = '';
if (caseEqFlags) {
for (const ch of string.characters) {
const codePoint = shouldApplySCF ? simpleCaseFolding(ch.codePoint) : ch.codePoint;
const set = regenerate(concatCaseEquivalents(codePoint, caseEqFlags));
stringifiedString += set.toString(regenerateOptions);
}
} else {
for (const ch of string.characters) {
const codePoint = shouldApplySCF ? simpleCaseFolding(ch.codePoint) : ch.codePoint;
if (codePoint !== ch.codePoint) {
stringifiedString += regenerate(codePoint).toString(regenerateOptions);
} else {
stringifiedString += generate(ch);
}
}
}
data.longStrings.add(stringifiedString);
data.maybeIncludesStrings = true;
}
}
return data;
}
const computeCharacterClass = (characterClassItem, regenerateOptions, shouldApplySCF) => {
let data = getCharacterClassEmptyData();
let handlePositive;
let handleNegative;
let caseEqFlags = configGetCaseEqFlags();
switch (characterClassItem.kind) {
case 'union':
handlePositive = buildHandler('union');
handleNegative = buildHandler('union-negative');
break;
case 'intersection':
handlePositive = buildHandler('intersection');
handleNegative = buildHandler('subtraction');
if (config.transform.unicodeSetsFlag) data.transformed = true;
if (config.isIgnoreCaseMode) {
shouldApplySCF = true;
}
break;
case 'subtraction':
handlePositive = buildHandler('subtraction');
handleNegative = buildHandler('intersection');
if (config.transform.unicodeSetsFlag) data.transformed = true;
if (config.isIgnoreCaseMode) {
shouldApplySCF = true;
}
break;
// The `default` clause is only here as a safeguard; it should never be
// reached. Code coverage tools should ignore it.
/* node:coverage ignore next */
default:
throw new Error(`Unknown character class kind: ${ characterClassItem.kind }`);
}
for (const item of characterClassItem.body) {
switch (item.type) {
case 'value':
const codePoint = shouldApplySCF ? simpleCaseFolding(item.codePoint) : item.codePoint;
const list = concatCaseEquivalents(codePoint, caseEqFlags);
handlePositive.regSet(data, regenerate(list));
if (list.length > 1) {
data.transformed = true;
}
break;
case 'characterClassRange':
const min = item.min.codePoint;
const max = item.max.codePoint;
if (shouldApplySCF) {
let list = [];
for (let cp = min; cp <= max; cp++) {
list.push(simpleCaseFolding(cp));
}
handlePositive.regSet(data, regenerate(list));
} else {
handlePositive.range(data, min, max);
}
if (caseEqFlags) {
// If shouldApplySCF is true, it is still ok to call iuRange because
// the set [min, max] shares the same case equivalents with scf([min, max])
handlePositive.iuRange(data, min, max, caseEqFlags);
data.transformed = true;
}
break;
case 'characterClassEscape':
handlePositive.regSet(data, getCharacterClassEscapeSet(
item.value,
config.flags.unicode || config.flags.unicodeSets,
config.flags.ignoreCase,
shouldApplySCF
));
break;
case 'unicodePropertyEscape':
const nestedData = getUnicodePropertyEscapeCharacterClassData(
item.value,
item.negative,
config.flags.unicodeSets && config.isIgnoreCaseMode,
shouldApplySCF
);
handlePositive.nested(data, nestedData);
data.transformed =
data.transformed ||
config.transform.unicodePropertyEscapes ||
(config.transform.unicodeSetsFlag && (nestedData.maybeIncludesStrings || characterClassItem.kind !== "union" || item.negative));
break;
case 'characterClass':
const handler = item.negative ? handleNegative : handlePositive;
const res = computeCharacterClass(item, regenerateOptions, shouldApplySCF);
handler.nested(data, res);
data.transformed = true;
break;
case 'classStrings':
handlePositive.nested(data, computeClassStrings(item, regenerateOptions, caseEqFlags, shouldApplySCF));
data.transformed = true;
break;
// The `default` clause is only here as a safeguard; it should never be
// reached. Code coverage tools should ignore it.
/* node:coverage ignore next */
default:
throw new Error(`Unknown term type: ${ item.type }`);
}
data.first = false;
}
if (characterClassItem.negative && data.maybeIncludesStrings) {
throw new SyntaxError('Cannot negate set containing strings');
}
return data;
}
const processCharacterClass = (
characterClassItem,
regenerateOptions,
computed = computeCharacterClass(characterClassItem, regenerateOptions)
) => {
const negative = characterClassItem.negative;
const { singleChars, transformed, longStrings } = computed;
if (transformed) {
// If single chars already contains some astral character, regenerate (bmpOnly: true) will create valid regex strings
const bmpOnly = regenerateContainsAstral(singleChars);
const setStr = singleChars.toString(Object.assign({}, regenerateOptions, { bmpOnly: bmpOnly }));
if (negative) {
if (config.useUnicodeFlag) {
update(characterClassItem, `[^${setStr[0] === '[' ? setStr.slice(1, -1) : setStr}]`)
} else {
if (config.flags.unicode || config.flags.unicodeSets) {
if (config.flags.ignoreCase) {
const astralCharsSet = singleChars.clone().intersection(ASTRAL_SET);
// Assumption: singleChars do not contain lone surrogates.
// Regex like /[^\ud800]/u is not supported
const surrogateOrBMPSetStr = singleChars
.clone()
.remove(astralCharsSet)
.addRange(0xd800, 0xdfff)
.toString({ bmpOnly: true });
// Don't generate negative lookahead for astral characters
// because the case folding is not working anyway as we break
// code points into surrogate pairs.
const astralNegativeSetStr = ASTRAL_SET
.clone()
.remove(astralCharsSet)
.toString(regenerateOptions);
// The transform here does not support lone surrogates.
update(
characterClassItem,
`(?!${surrogateOrBMPSetStr})[^]|${astralNegativeSetStr}`
);
} else {
// Generate negative set directly when case folding is not involved.
const negativeSet = UNICODE_SET.clone().remove(singleChars);
update(characterClassItem, negativeSet.toString(regenerateOptions));
}
} else {
update(characterClassItem, `(?!${setStr})[^]`);
}
}
} else {
const hasEmptyString = longStrings.has('');
const pieces = Array.from(longStrings).sort((a, b) => b.length - a.length);
if (setStr !== '[]' || longStrings.size === 0) {
pieces.splice(pieces.length - (hasEmptyString ? 1 : 0), 0, setStr);
}
update(characterClassItem, pieces.join('|'));
}
}
return characterClassItem;
};
const assertNoUnmatchedReferences = (groups) => {
const unmatchedReferencesNames = Object.keys(groups.unmatchedReferences);
if (unmatchedReferencesNames.length > 0) {
throw new Error(`Unknown group names: ${unmatchedReferencesNames}`);
}
};
const processModifiers = (item, regenerateOptions, groups) => {
const enabling = item.modifierFlags.enabling;
const disabling = item.modifierFlags.disabling;
const oldData = Object.assign({}, config.modifiersData);
for (const flag of enabling) {
config.modifiersData[flag] = true;
}
for (const flag of disabling) {
config.modifiersData[flag] = false;
}
if (config.transform.modifiers) {
delete item.modifierFlags;
item.behavior = 'ignore';
}
item.body = item.body.map(term => {
return processTerm(term, regenerateOptions, groups);
});
config.modifiersData = oldData;
return item;
}
const processTerm = (item, regenerateOptions, groups) => {
switch (item.type) {
case 'dot':
if (config.transform.unicodeFlag) {
update(
item,
getUnicodeDotSet(config.isDotAllMode).toString(regenerateOptions)
);
} else if ((config.modifiersData.s != null ? config.modifiersData.s && config.transform.modifiers : config.transform.dotAllFlag)) {
// TODO: consider changing this at the regenerate level.
update(item, '[^]');
}
break;
case 'characterClass':
item = processCharacterClass(item, regenerateOptions);
break;
case 'unicodePropertyEscape':
const data = getUnicodePropertyEscapeCharacterClassData(item.value, item.negative, config.flags.unicodeSets && config.isIgnoreCaseMode);
if (data.maybeIncludesStrings) {
if (!config.flags.unicodeSets) {
throw new Error(
'Properties of strings are only supported when using the unicodeSets (v) flag.'
);
}
if (config.transform.unicodeSetsFlag) {
data.transformed = true;
item = processCharacterClass(item, regenerateOptions, data);
}
} else if (config.transform.unicodePropertyEscapes || configGetCaseEqFlags()) {
update(
item,
data.singleChars.toString(regenerateOptions)
);
}
break;
case 'characterClassEscape':
if (config.transform.unicodeFlag) {
update(
item,
getCharacterClassEscapeSet(
item.value,
/* config.transform.unicodeFlag implies config.flags.unicode */ true,
config.flags.ignoreCase
).toString(regenerateOptions)
);
}
break;
case 'group':
if (item.behavior == 'normal') {
groups.lastIndex++;
}
if (item.name) {
const name = item.name.value;
if (groups.namesConflicts[name]) {
throw new Error(
`Group '${ name }' has already been defined in this context.`
);
}
groups.namesConflicts[name] = true;
if (config.transform.namedGroups) {
delete item.name;
}
const index = groups.lastIndex;
if (!groups.names[name]) {
groups.names[name] = [];
}
groups.names[name].push(index);
if (groups.onNamedGroup) {
groups.onNamedGroup.call(null, name, index);
}
if (groups.unmatchedReferences[name]) {
delete groups.unmatchedReferences[name];
}
}
if (item.modifierFlags) {
return processModifiers(item, regenerateOptions, groups);
}
/* falls through */
case 'quantifier':
item.body = item.body.map(term => {
return processTerm(term, regenerateOptions, groups);
});
break;
case 'disjunction':
const outerNamesConflicts = groups.namesConflicts;
item.body = item.body.map(term => {
groups.namesConflicts = Object.create(outerNamesConflicts);
return processTerm(term, regenerateOptions, groups);
});
break;
case 'alternative':
item.body = flatMap(item.body, term => {
const res = processTerm(term, regenerateOptions, groups);
// Alternatives cannot contain alternatives; flatten them.
return res.type === 'alternative' ? res.body : res;
});
break;
case 'value':
const codePoint = item.codePoint;
const caseEqFlags = configGetCaseEqFlags();
const list = concatCaseEquivalents(codePoint, caseEqFlags);
if (list.length === 1 && item.kind === "symbol" && codePoint >= 0x20 && codePoint <= 0x7E) {
// skip regenerate when it is a printable ASCII symbol
break;
}
const set = regenerate(list);
update(item, set.toString(regenerateOptions));
break;
case 'reference':
if (item.name) {
const name = item.name.value;
const indexes = groups.names[name];
if (!indexes) {
groups.unmatchedReferences[name] = true;
}
if (config.transform.namedGroups) {
if (indexes) {
const body = indexes.map(index => ({
'type': 'reference',
'matchIndex': index,
'raw': '\\' + index,
}));
if (body.length === 1) {
return body[0];
}
return {
'type': 'alternative',
'body': body,
'raw': body.map(term => term.raw).join(''),
};
}
// This named reference comes before the group where it’s defined,
// so it’s always an empty match.
return {
'type': 'group',
'behavior': 'ignore',
'body': [],
'raw': '(?:)',
};
}
}
break;
case 'anchor':
if (config.modifiersData.m && config.transform.modifiers) {
if (item.kind == 'start') {
update(item, `(?:^|(?<=${NEWLINE_SET.toString()}))`);
} else if (item.kind == 'end') {
update(item, `(?:$|(?=${NEWLINE_SET.toString()}))`);
}
}
case 'empty':
// Nothing to do here.
break;
// The `default` clause is only here as a safeguard; it should never be
// reached. Code coverage tools should ignore it.
/* node:coverage ignore next */
default:
throw new Error(`Unknown term type: ${ item.type }`);
}
return item;
};
const config = {
'flags': {
'ignoreCase': false,
'unicode': false,
'unicodeSets': false,
'dotAll': false,
'multiline': false,
},
'transform': {
'dotAllFlag': false,
'unicodeFlag': false,
'unicodeSetsFlag': false,
'unicodePropertyEscapes': false,
'namedGroups': false,
'modifiers': false,
},
'modifiersData': {
'i': undefined,
's': undefined,
'm': undefined,
},
get useUnicodeFlag() {
return (this.flags.unicode || this.flags.unicodeSets) && !this.transform.unicodeFlag;
},
get isDotAllMode() {
return (this.modifiersData.s !== undefined ? this.modifiersData.s : this.flags.dotAll);
},
get isIgnoreCaseMode() {
return (this.modifiersData.i !== undefined ? this.modifiersData.i : this.flags.ignoreCase);
}
};
const validateOptions = (options) => {
if (!options) return;
for (const key of Object.keys(options)) {
const value = options[key];
switch (key) {
case 'dotAllFlag':
case 'unicodeFlag':
case 'unicodePropertyEscapes':
case 'unicodeSetsFlag':
case 'namedGroups':
if (value != null && value !== false && value !== 'transform') {
throw new Error(`.${key} must be false (default) or 'transform'.`);
}
break;
// todo: remove modifiers: 'parse' in regexpu-core v7
case 'modifiers':
if (value != null && value !== false && value !== 'parse' && value !== 'transform') {
throw new Error(`.${key} must be false (default), 'parse' or 'transform'.`);
}
break;
case 'onNamedGroup':
case 'onNewFlags':
if (value != null && typeof value !== 'function') {
throw new Error(`.${key} must be a function.`);
}
break;
default:
throw new Error(`.${key} is not a valid regexpu-core option.`);
}
}
};
const hasFlag = (flags, flag) => flags ? flags.includes(flag) : false;
const transform = (options, name) => options ? options[name] === 'transform' : false;
const rewritePattern = (pattern, flags, options) => {
validateOptions(options);
config.flags.unicode = hasFlag(flags, 'u');
config.flags.unicodeSets = hasFlag(flags, 'v');
config.flags.ignoreCase = hasFlag(flags, 'i');
config.flags.dotAll = hasFlag(flags, 's');
config.flags.multiline = hasFlag(flags, 'm');
config.transform.dotAllFlag = config.flags.dotAll && transform(options, 'dotAllFlag');
config.transform.unicodeFlag = (config.flags.unicode || config.flags.unicodeSets) && transform(options, 'unicodeFlag');
config.transform.unicodeSetsFlag = config.flags.unicodeSets && transform(options, 'unicodeSetsFlag');
// unicodeFlag: 'transform' implies unicodePropertyEscapes: 'transform'
config.transform.unicodePropertyEscapes = (config.flags.unicode || config.flags.unicodeSets) && (
transform(options, 'unicodeFlag') || transform(options, 'unicodePropertyEscapes')
);
config.transform.namedGroups = transform(options, 'namedGroups');
config.transform.modifiers = transform(options, 'modifiers');
config.modifiersData.i = undefined;
config.modifiersData.s = undefined;
config.modifiersData.m = undefined;
const regjsparserFeatures = {
// Enable every stable RegExp feature by default
'modifiers': true,
'unicodePropertyEscape': true,
'unicodeSet': true,
'namedGroups': true,
'lookbehind': true,
};
const regenerateOptions = {
'hasUnicodeFlag': config.useUnicodeFlag,
'bmpOnly': !config.flags.unicode && !config.flags.unicodeSets
};
const groups = {
'onNamedGroup': options && options.onNamedGroup,
'lastIndex': 0,
'names': Object.create(null), // { [name]: Array }
'namesConflicts': Object.create(null), // { [name]: true }
'unmatchedReferences': Object.create(null) // { [name]: true }
};
const tree = parse(pattern, flags, regjsparserFeatures);
if (config.transform.modifiers) {
if (/\(\?[a-z]*-[a-z]+:/.test(pattern)) {
// the pattern _likely_ contain inline disabled modifiers
// we need to traverse to make sure that they are actually modifiers and to collect them
const allDisabledModifiers = Object.create(null)
const itemStack = [tree];
let node;
while (node = itemStack.pop(), node != undefined) {
if (Array.isArray(node)) {
Array.prototype.push.apply(itemStack, node);
} else if (typeof node == 'object' && node != null) {
for (const key of Object.keys(node)) {
const value = node[key];
if (key == 'modifierFlags') {
for (const flag of value.disabling) {
allDisabledModifiers[flag] = true;
}
} else if (typeof value == 'object' && value != null) {
itemStack.push(value);
}
}
}
}
if (allDisabledModifiers.i) {
config.modifiersData.i = config.flags.ignoreCase;
}
if (allDisabledModifiers.m) {
config.modifiersData.m = config.flags.multiline;
}
if (allDisabledModifiers.s) {
config.modifiersData.s = config.flags.dotAll;
}
}
}
// Note: `processTerm` mutates `tree` and `groups`.
processTerm(tree, regenerateOptions, groups);
assertNoUnmatchedReferences(groups);
const onNewFlags = options && options.onNewFlags;
if (onNewFlags) {
let newFlags = flags.split('').filter((flag) => !config.modifiersData[flag]).join('');
if (config.transform.unicodeSetsFlag) {
newFlags = newFlags.replace('v', 'u');
}
if (config.transform.unicodeFlag) {
newFlags = newFlags.replace('u', '');
}
if (config.transform.dotAllFlag) {
newFlags = newFlags.replace('s', '');
}
onNewFlags(newFlags);
}
return generate(tree);
};
module.exports = rewritePattern;
mathiasbynens-regexpu-core-e35919f/scripts/ 0000775 0000000 0000000 00000000000 14717712160 0021026 5 ustar 00root root 0000000 0000000 mathiasbynens-regexpu-core-e35919f/scripts/all-characters.js 0000664 0000000 0000000 00000002016 14717712160 0024250 0 ustar 00root root 0000000 0000000 const fs = require('node:fs');
const regenerate = require('regenerate');
require('./utils/regenerate-plugin-to-code.js');
const commonMappings = require('@unicode/unicode-16.0.0/Case_Folding/C/code-points.js');
const simpleMappings = require('@unicode/unicode-16.0.0/Case_Folding/S/code-points.js');
// https://tc39.es/ecma262/#sec-allcharacters
const UNICODE_SET = regenerate().addRange(0x0, 0x10FFFF);
const UNICODE_IV_SET = regenerate().addRange(0x0, 0x10FFFF);
for (const cp of commonMappings.keys()) {
UNICODE_IV_SET.remove(cp);
}
for (const cp of simpleMappings.keys()) {
UNICODE_IV_SET.remove(cp);
}
const stringify = (name, set) => {
const source = 'exports.' + name + ' = ' + set.toCode();
return source;
};
const source = [
'// Generated using `npm run build`. Do not edit.\n' +
`'use strict';\n\nconst regenerate = require('regenerate');`,
stringify('UNICODE_SET', UNICODE_SET),
stringify('UNICODE_IV_SET', UNICODE_IV_SET)
].join('\n\n');
fs.writeFileSync('data/all-characters.js', source + '\n');
mathiasbynens-regexpu-core-e35919f/scripts/case-mappings.js 0000664 0000000 0000000 00000020612 14717712160 0024114 0 ustar 00root root 0000000 0000000 'use strict';
const fs = require('fs');
const jsesc = require('jsesc');
const hex = (number) => {
return `0x${ number.toString(16).toUpperCase() }`;
};
const writeMap = (fileName, map) => {
// Sort map by key.
const sortedMap = new Map([...map].sort((a, b) => a[0] - b[0]));
fs.writeFileSync(
fileName,
`module.exports = ${ jsesc(sortedMap, {
'compact': false,
'numbers': 'hexadecimal'
}) };\n`
);
}
// Given two code points, check if both are in the ASCII range and if one is
// the uppercased version of the other. In that case, ES5 engines know about
// this mapping, so it’s only needed to include one of the two in a
// case-insensitive regular expression.
const isES5CasedVariant = (a, b) => {
return (a < 0x80 && b < 0x80) &&
(oneWayMappings.get(a) == b || oneWayMappings.get(b) == a);
};
const extend = (map, key, value, callback) => {
if (map.has(key)) {
const currentValue = map.get(key);
if (Array.isArray(currentValue)) {
if (currentValue.indexOf(value) > -1) {
return;
}
if (callback) {
const skip = currentValue.some((codePoint) => {
return callback(codePoint, value);
});
if (skip) {
return;
}
}
currentValue.push(value);
} else {
if (currentValue == value) {
return;
}
if (callback) {
if (callback(currentValue, value)) {
return;
}
}
map.set(key, [currentValue, value]);
}
} else {
map.set(key, value);
}
};
// Create a new map containing all `mapping` and their inverse.
const flattenMapping = (mapping, extendFilter) => {
const result = new Map();
for (const [from, to] of mapping) {
if (Array.isArray(to)) {
for (const codePoint of to) {
extend(result, from, codePoint, extendFilter);
extend(result, codePoint, from, extendFilter);
}
} else {
extend(result, from, to, extendFilter);
extend(result, to, from, extendFilter);
}
}
return result;
};
const simpleUppercaseMapping = require('@unicode/unicode-16.0.0/Simple_Case_Mapping/Uppercase/symbols.js');
const specialUppercaseMapping = require('@unicode/unicode-16.0.0/Special_Casing/Uppercase/symbols.js');
const characterToUppercase = (character) => {
// Note: While the spec requires pulling in the Final_Sigma casing context data
// (can be accessed from ./Special_Casing/Uppercase--Final_Sigma/) to do a locale-
// insensitive full case conversion, we intentionally skip this data because
// Final_Sigma should not be activated when there is only one character in the string
return (
specialUppercaseMapping.get(character) ??
simpleUppercaseMapping.get(character) ??
character
);
};
// https://tc39.es/ecma262/#sec-runtime-semantics-canonicalize-ch
const canonicalize = (codepoint) => {
// when HasEitherUnicodeFlag is false and rer.[[IgnoreCase]] is true
const character = String.fromCodePoint(codepoint);
const u = characterToUppercase(character);
if (u.length !== 1) {
return codepoint;
}
const cu = u.codePointAt(0);
if (codepoint >= 0x7F && cu < 0x7F) {
return codepoint;
}
return cu;
}
// From :
//
// The status field is:
// C: common case folding, common mappings shared by both simple and full
// mappings.
// F: full case folding, mappings that cause strings to grow in length. Multiple
// characters are separated by spaces.
// S: simple case folding, mappings to single characters where different from F.
// T: special case for uppercase I and dotted uppercase I
// - For non-Turkic languages, this mapping is normally not used.
// - For Turkic languages (tr, az), this mapping can be used instead of the
// normal mapping for these characters. Note that the Turkic mappings do
// not maintain canonical equivalence without additional processing.
// See the discussions of case mapping in the Unicode Standard for more
// information.
//
// Usage:
// A. To do a simple case folding, use the mappings with status C + S.
// B. To do a full case folding, use the mappings with status C + F.
const commonMappings = require('@unicode/unicode-16.0.0/Case_Folding/C/code-points.js');
const simpleMappings = require('@unicode/unicode-16.0.0/Case_Folding/S/code-points.js');
// We want the `C` mappings in both directions (i.e. `A` should fold to `a`
// and `a` to `A`), and the `S` mappings in both directions (i.e. `ẞ` should
// fold to `ß` and `ß` to `ẞ`). Let’s start with the simple case folding (in
// one direction) first, then filter the set, and then deal with the inverse.
const oneWayMappings = new Map();
for (const [from, to] of commonMappings) {
oneWayMappings.set(from, to);
}
for (const [from, to] of simpleMappings) {
oneWayMappings.set(from, to);
}
// Note: various code points can fold into the same code point, so it’s not
// possible to simply invert `oneWayMappings` — some entries would be lost in
// the process.
// In case-insignificant matches when `Unicode` is `true` (i.e. when the `u`
// flag is enabled), all characters are implicitly case-folded using the
// simple mapping provided by the Unicode standard immediately before they
// are compared. The simple mapping always maps to a single code point, so it
// does not map, for example, `ß` (U+00DF) to `SS`. It may however map a code
// point outside the Basic Latin range to a character within, for example, `ſ`
// (U+017F) to `s`. Such characters are not mapped if `Unicode` is `false`.
// This prevents Unicode code points such as U+017F and U+212A from matching
// regular expressions such as `/[a‑z]/i`, but they will match `/[a‑z]/ui`.
// https://mths.be/es6#sec-runtime-semantics-canonicalize-abstract-operation
// Get the mappings that are unique to regular expressions that have both the
// `i` and `u` flags set. In addition to the above, this includes all mappings
// for astral code points.
const filteredMappings = new Map();
// The BMP mapping is used when we expand case folds wrapped in the (?:i) modifiers,
// we have to further expand case folds that ES5 engines might already support,
// because the output regex may not have the `i` flag set. For example,
// /\u212A/ui can be transformed to /[K\u212A]/i
// while /(?i:\u212A)a/u must be transformed to /[Kk\u212A]a/u, where we have
// to manually expand 'K' into 'Kk'.
const filteredBMPMappings = new Map();
for (const [from, to] of oneWayMappings) {
// Case folding is applied to both the pattern and the string being matched.
// Because of that e.g. `/[A-Z]/iu` matches U+017F and U+212A, just like
// `/[a-z]/iu` would, even though no symbol in the range from `A` to `Z`
// folds to U+017F or U+212A directly. Since we’re only transpiling regular
// expressions and not strings, we have to account for this in regular
// expressions only. This can be done as per this example:
// 1. `oneWayMappings` already maps `S` to `s`. (83 → 115)
// 2. `oneWayMappings` already maps `ſ` to `s`. (383 → 115)
// 3. So, in the generated mappings, make sure `S` maps to `ſ`. (83 → 383)
// Check if there are any other code points that map to the same `to` value.
for (const [otherFrom, otherTo] of oneWayMappings) {
if (otherFrom != from && otherTo == to) {
// Note: we could use `extend` here, but it’s not necessary as there can
// only be a single value for the key `from` at this point.
filteredMappings.set(from, otherFrom);
}
}
if (
// Include astral code points.
(from > 0xFFFF || to > 0xFFFF)
) {
extend(filteredMappings, from, to);
} else {
// https://mths.be/es6#sec-runtime-semantics-canonicalize-abstract-operation
if (canonicalize(from) !== canonicalize(to)) {
extend(filteredMappings, from, to);
} else if (from > 0x80 || to > 0x80) {
extend(filteredBMPMappings, from, to);
}
const stringFrom = String.fromCodePoint(from);
const stringTo = String.fromCodePoint(to);
const code = `/${
jsesc(stringFrom)
}/i.test(${
jsesc(stringTo, { 'wrap': true })
})`;
console.log(
`Skipping ${ hex(from) } → ${ hex(to) } since ${ code } is already \`true\`.`
);
// The following snippet was used to create https://mths.be/demo/regex-i.
// https://github.com/mathiasbynens/regexpu-core/issues/7#issuecomment-225894534
// console.log(
// `console.assert(${ code }, ${ JSON.stringify(code) });`
// );
}
}
const iuMappings = flattenMapping(filteredMappings, isES5CasedVariant);
const iBMPMappings = flattenMapping(filteredBMPMappings);
writeMap('data/i-bmp-mappings.js', iBMPMappings);
writeMap('data/iu-mappings.js', iuMappings);
writeMap('data/iu-foldings.js', oneWayMappings);
mathiasbynens-regexpu-core-e35919f/scripts/character-class-escape-sets.js 0000664 0000000 0000000 00000007502 14717712160 0026641 0 ustar 00root root 0000000 0000000 'use strict';
const fs = require('fs');
const jsesc = require('jsesc');
const regenerate = require('regenerate');
require('./utils/regenerate-plugin-to-code.js');
const Zs = require('@unicode/unicode-16.0.0/General_Category/Space_Separator/code-points.js');
const iuMappings = require('../data/iu-mappings.js');
const iuFoldings = require('../data/iu-foldings.js');
const { UNICODE_SET, UNICODE_IV_SET } = require('../data/all-characters.js');
const simpleCaseFolding = (codePoint) => {
return iuFoldings.get(codePoint) || codePoint;
};
const getCaseEquivalents = (codePoint) => {
return iuMappings.get(codePoint) || false;
};
// Without the `u` flag, the range stops at 0xFFFF.
// https://mths.be/es#sec-pattern-semantics
const BMP_SET = regenerate().addRange(0x0, 0xFFFF);
const ESCAPE_CHARS = {};
const ESCAPE_CHARS_UNICODE = {};
const ESCAPE_CHARS_UNICODE_IGNORE_CASE = {};
const ESCAPE_CHARS_UNICODESET_IGNORE_CASE = {};
const addCharacterClassEscape = (lower, set) => {
ESCAPE_CHARS[lower] = ESCAPE_CHARS_UNICODE[lower] = set;
const upper = lower.toUpperCase();
ESCAPE_CHARS[upper] = BMP_SET.clone().remove(set);
ESCAPE_CHARS_UNICODE[upper] = UNICODE_SET.clone().remove(set);
// Check if one or more symbols in this set fold to another one. If so,
// a copy of the set including the mapped symbols is created for use with
// regular expressions that have both the `u` and `i` flags set.
const codePoints = set.toArray();
const iuSet = regenerate();
let containsSimpleCaseFolding = false;
for (const codePoint of codePoints) {
let caseEquivalents = getCaseEquivalents(codePoint);
if (caseEquivalents) {
containsSimpleCaseFolding = true;
iuSet.add(caseEquivalents);
caseEquivalents = getCaseEquivalents(caseEquivalents);
if (caseEquivalents) {
iuSet.add(caseEquivalents);
}
}
}
const iuLowerSet = containsSimpleCaseFolding ?
iuSet.clone().add(set) :
set;
const iuUpperSet = UNICODE_SET.clone().remove(iuLowerSet);
ESCAPE_CHARS_UNICODE_IGNORE_CASE[lower] = iuLowerSet;
ESCAPE_CHARS_UNICODE_IGNORE_CASE[upper] = iuUpperSet;
ESCAPE_CHARS_UNICODESET_IGNORE_CASE[lower] = regenerate(
iuLowerSet.toArray().map(ch => simpleCaseFolding(ch))
);
ESCAPE_CHARS_UNICODESET_IGNORE_CASE[upper] = {
toCode() {
return 'UNICODE_IV_SET.clone().remove(' + ESCAPE_CHARS_UNICODESET_IGNORE_CASE[lower].toCode() + ')';
}
}
}
// Prepare a Regenerate set for every existing character class escape.
// https://mths.be/es#sec-characterclassescape
addCharacterClassEscape(
'd', // `\d` and `\D`
regenerate().addRange('0', '9')
);
addCharacterClassEscape(
's', // `\s` and `\S`
regenerate(
// https://mths.be/es#sec-white-space
0x0009,
0x000B,
0x000C,
0x0020,
0x00A0,
0xFEFF,
Zs,
// https://mths.be/es#sec-line-terminators
0x000A,
0x000D,
0x2028,
0x2029
)
);
addCharacterClassEscape(
'w', // `\w` and `\W`
regenerate('_').addRange('a', 'z').addRange('A', 'Z').addRange('0', '9')
);
/*----------------------------------------------------------------------------*/
const stringify = (name, object) => {
const source = 'exports.' + name + ' = new Map([\n\t' + Object.keys(object).map((character) => {
const set = object[character];
return '[' + jsesc(character, { 'wrap': true }) + ', ' + set.toCode() + ']';
}).join(',\n\t') + '\n]);';
return source;
};
const source = [
'// Generated using `npm run build`. Do not edit.\n' +
`'use strict';\n\nconst regenerate = require('regenerate');\nconst UNICODE_IV_SET = require('./all-characters.js').UNICODE_IV_SET`,
stringify('REGULAR', ESCAPE_CHARS),
stringify('UNICODE', ESCAPE_CHARS_UNICODE),
stringify('UNICODE_IGNORE_CASE', ESCAPE_CHARS_UNICODE_IGNORE_CASE),
stringify('UNICODESET_IGNORE_CASE', ESCAPE_CHARS_UNICODESET_IGNORE_CASE)
].join('\n\n');
// Save the precompiled sets to a static file.
fs.writeFileSync('data/character-class-escape-sets.js', source + '\n');
mathiasbynens-regexpu-core-e35919f/scripts/index.js 0000664 0000000 0000000 00000000153 14717712160 0022472 0 ustar 00root root 0000000 0000000 require('./all-characters.js');
require('./case-mappings.js');
require('./character-class-escape-sets.js'); mathiasbynens-regexpu-core-e35919f/scripts/utils/ 0000775 0000000 0000000 00000000000 14717712160 0022166 5 ustar 00root root 0000000 0000000 mathiasbynens-regexpu-core-e35919f/scripts/utils/regenerate-plugin-to-code.js 0000664 0000000 0000000 00000001661 14717712160 0027475 0 ustar 00root root 0000000 0000000 const regenerate = require('regenerate');
const codePointToString = (codePoint) => {
return '0x' + codePoint.toString(16).toUpperCase();
};
// Regenerate plugin that turns a set into some JavaScript source code that
// generates that set.
regenerate.prototype.toCode = function regenerateToCode() {
const data = this.data;
// Iterate over the data per `(start, end)` pair.
let index = 0;
let start;
let end;
const length = data.length;
const loneCodePoints = [];
const ranges = [];
while (index < length) {
start = data[index];
end = data[index + 1] - 1; // Note: the `- 1` makes `end` inclusive.
if (start == end) {
loneCodePoints.push(codePointToString(start));
} else {
ranges.push(
'addRange(' + codePointToString(start) +
', ' + codePointToString(end) + ')'
);
}
index += 2;
}
return 'regenerate(' + loneCodePoints.join(', ') + ')' +
(ranges.length ? '\n\t\t.' + ranges.join('\n\t\t.') : '');
}; mathiasbynens-regexpu-core-e35919f/tests/ 0000775 0000000 0000000 00000000000 14717712160 0020501 5 ustar 00root root 0000000 0000000 mathiasbynens-regexpu-core-e35919f/tests/fixtures/ 0000775 0000000 0000000 00000000000 14717712160 0022352 5 ustar 00root root 0000000 0000000 mathiasbynens-regexpu-core-e35919f/tests/fixtures/character-class.js 0000664 0000000 0000000 00000010530 14717712160 0025746 0 ustar 00root root 0000000 0000000 const characterClassFixtures = [
{
pattern: '[^K]', // LATIN CAPITAL LETTER K
flags: 'iu',
expected: '(?:(?![K\\u212A\\uD800-\\uDFFF])[^]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF])',
options: { unicodeFlag: 'transform' }
},
{
pattern: '[^k]', // LATIN SMALL LETTER K
flags: 'iu',
expected: '(?:(?![k\\u212A\\uD800-\\uDFFF])[^]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF])',
options: { unicodeFlag: 'transform' }
},
{
pattern: '[^\u212a]', // KELVIN SIGN
flags: 'iu',
expected: '(?:(?![K\\u212A\\uD800-\\uDFFF])[^]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF])',
options: { unicodeFlag: 'transform' }
},
{
pattern: '[^K]', // LATIN CAPITAL LETTER K
flags: 'iu',
expected: '[^K]',
options: {}
},
{
pattern: '[^k]', // LATIN SMALL LETTER K
flags: 'iu',
expected: '[^k]',
options: {}
},
{
pattern: '[^\u212a]', // KELVIN SIGN
flags: 'iu',
expected: '[^\u212a]',
options: {}
},
{
pattern: '[^\u{1D50E}]', // MATHEMATICAL FRAKTUR CAPITAL K
flags: 'iu',
expected: '(?:(?![\\uD800-\\uDFFF])[^]|[\\uD800-\\uD834\\uD836-\\uDBFF][\\uDC00-\\uDFFF]|\\uD835[\\uDC00-\\uDD0D\\uDD0F-\\uDFFF])',
options: { unicodeFlag: 'transform' }
},
{
pattern: '[^K]', // LATIN CAPITAL LETTER K
flags: 'u',
matches: ["k", "\u212a", "\u{12345}", "\uDAAA", "\uDDDD"],
nonMatches: ["K"],
expected: '(?:[\\0-JL-\\uD7FF\\uE000-\\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF])',
options: { unicodeFlag: 'transform' }
},
{
pattern: '[^k]', // LATIN SMALL LETTER K
flags: 'u',
matches: ["K", "\u212a", "\u{12345}", "\uDAAA", "\uDDDD"],
nonMatches: ["k"],
expected: '(?:[\\0-jl-\\uD7FF\\uE000-\\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF])',
options: { unicodeFlag: 'transform' }
},
{
pattern: '[^\u212a]', // KELVIN SIGN
flags: 'u',
matches: ["K", "k", "\u{12345}", "\uDAAA", "\uDDDD"],
nonMatches: ["\u212a"],
expected: '(?:[\\0-\\u2129\\u212B-\\uD7FF\\uE000-\\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF])',
options: { unicodeFlag: 'transform' }
},
{
pattern: '[^\u{1D50E}]', // MATHEMATICAL FRAKTUR CAPITAL K
flags: 'u',
matches: ["K", "k", "\u{12345}", "\u{1D50F}", "\uDAAA", "\uDDDD"],
nonMatches: ["\u{1D50E}"],
expected: '(?:[\\0-\\uD7FF\\uE000-\\uFFFF]|[\\uD800-\\uD834\\uD836-\\uDBFF][\\uDC00-\\uDFFF]|\\uD835[\\uDC00-\\uDD0D\\uDD0F-\\uDFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF])',
options: { unicodeFlag: 'transform' }
},
{
pattern: '[^K]', // LATIN CAPITAL LETTER K
flags: 'u',
expected: '[^K]',
options: {}
},
{
pattern: '[^k]', // LATIN SMALL LETTER K
flags: 'u',
expected: '[^k]',
options: {}
},
{
pattern: '[^\u212a]', // KELVIN SIGN
flags: 'u',
expected: '[^\u212a]',
options: {}
},
{
pattern: '[^\u{1D50E}]', // MATHEMATICAL FRAKTUR CAPITAL K
flags: 'u',
expected: '[^\u{1D50E}]',
options: {}
},
{
pattern: '^[^❤️]',
flags: 'u',
options: { unicodeFlag: 'transform' },
expected: '^(?:[\\0-\\u2763\\u2765-\\uD7FF\\uE000-\\uFE0E\\uFE10-\\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF])',
nonMatches: ['❤️']
},
{
pattern: '^[^🧡]',
flags: 'u',
options: { unicodeFlag: 'transform' },
expected: '^(?:[\\0-\\uD7FF\\uE000-\\uFFFF]|[\\uD800-\\uD83D\\uD83F-\\uDBFF][\\uDC00-\\uDFFF]|\\uD83E[\\uDC00-\\uDDE0\\uDDE2-\\uDFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF])',
nonMatches: ['🧡']
},
{
pattern: '[^💛]',
flags: 'u',
options: { unicodeFlag: 'transform' },
expected: '(?:[\\0-\\uD7FF\\uE000-\\uFFFF]|[\\uD800-\\uD83C\\uD83E-\\uDBFF][\\uDC00-\\uDFFF]|\\uD83D[\\uDC00-\\uDC9A\\uDC9C-\\uDFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF])',
nonMatches: ['💛']
},
{
pattern: '[^💚]',
flags: 'u',
options: { unicodeFlag: 'transform' },
expected: '(?:[\\0-\\uD7FF\\uE000-\\uFFFF]|[\\uD800-\\uD83C\\uD83E-\\uDBFF][\\uDC00-\\uDFFF]|\\uD83D[\\uDC00-\\uDC99\\uDC9B-\\uDFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF])',
nonMatches: ['💚']
}
];
exports.characterClassFixtures = characterClassFixtures;
mathiasbynens-regexpu-core-e35919f/tests/fixtures/dot-all-flag.js 0000664 0000000 0000000 00000001433 14717712160 0025154 0 ustar 00root root 0000000 0000000 const regenerate = require('regenerate');
const UNICODE_SET = regenerate().addRange(0x0, 0x10FFFF);
const UNICODE_PATTERN = UNICODE_SET.toString();
const dotAllFlagFixtures = [
{
'pattern': '.',
'flags': 's',
'expected': '[^]'
},
{
'pattern': '.',
'flags': 'gimsy',
'expected': '[^]'
},
{
'pattern': '.',
'flags': 's',
'expected': '[^]',
options: { unicodeFlag: 'transform' }
},
{
'pattern': '.',
'flags': 'gimsy',
'expected': '[^]',
options: { unicodeFlag: 'transform' }
},
{
'pattern': '.',
'flags': 'su',
'expected': UNICODE_PATTERN,
options: { unicodeFlag: 'transform' }
},
{
'pattern': '.',
'flags': 'gimsuy',
'expected': UNICODE_PATTERN,
options: { unicodeFlag: 'transform' }
}
];
exports.dotAllFlagFixtures = dotAllFlagFixtures;
mathiasbynens-regexpu-core-e35919f/tests/fixtures/modifiers.js 0000664 0000000 0000000 00000024346 14717712160 0024702 0 ustar 00root root 0000000 0000000 const IS_NODE_6 = process.version.startsWith('v6.');
const modifiersFixtures = [
// +i
{
'pattern': '(?i:a)',
'expected': '(?:[Aa])',
},
{
'pattern': '(?i:[a-z])',
'expected': '(?:[A-Za-z])',
},
{
'pattern': '(?i:[ab])',
'expected': '(?:[ABab])',
},
{
'pattern': '(?i:\\u212A)',
'matches': ['\u212A'],
'nonMatches': ['K', 'k'],
'expected': '(?:\\u212A)',
},
{
'pattern': '(?i:\\u212A)',
'flags': 'u',
'matches': ['K', 'k', '\u212A'],
'expected': '(?:[Kk\\u212A])',
},
{
'pattern': '(?i:k)',
'flags': 'u',
'expected': '(?:[Kk\\u212A])',
},
{
'pattern': '(?i:\\u2C2F)',
'matches': ['\u2C2F', '\u2C5F'],
'expected': '(?:[\\u2C2F\\u2C5F])'
},
{
'pattern': '(?i:[a-z])',
'flags': 'u',
'options': { unicodeFlag: 'transform', modifiers: 'transform' },
'expected': '(?:[A-Za-z\\u017F\\u212A])',
'expectedFlags': '',
},
{
'pattern': '(?i:[ks])',
'flags': 'u',
'options': { modifiers: 'transform' },
'expected': '(?:[KSks\\u017F\\u212A])',
'expectedFlags': 'u',
},
{
'pattern': '(?i:[\\q{ab|cd|abc}--\\q{abc}--\\q{cd}])',
'flags': 'v',
'options': { unicodeSetsFlag: 'transform', modifiers: 'transform' },
'expected': '(?:(?:[Aa][Bb]))',
'expectedFlags': 'u',
},
{
'pattern': '(?i:[\\q{ab|cd|abc}--\\q{abc}--\\q{cd}])',
'flags': 'v',
'options': { unicodeSetsFlag: 'transform', modifiers: false },
'expected': '(?i:(?:ab))',
'expectedFlags': 'u',
}, {
'pattern': '(?i:[\\q{ab|cd|abc}--\\q{abc}--\\q{cd}])',
'flags': 'v',
'options': { unicodeSetsFlag: 'transform', unicodeFlag: 'transform', modifiers: 'transform' },
'expected': '(?:(?:[Aa][Bb]))',
'expectedFlags': '',
},
{
'pattern': '(?i:є)',
'options': { modifiers: 'transform' },
'expected': '(?:[\\u0404\\u0454])',
},
{
'pattern': '(?i:[є-ґ])',
'options': { modifiers: 'transform' },
'matches': ['\u0462', '\u0463', '\u1C87'],
'expected': '(?:[\\u0404-\\u040F\\u0454-\\u0491\\u1C87])',
},
{
'pattern': '(?i:[Жщ])',
'options': { modifiers: 'transform' },
'expected': '(?:[\\u0416\\u0429\\u0436\\u0449])',
},
{
'pattern': '(?i:\\u{10570})',
'flags': 'u',
'options': { modifiers: 'transform' },
'expected': '(?:[\\u{10570}\\u{10597}])'
},
{
'pattern': '(?i:a.)',
'flags': 's',
'expected': '(?:[Aa].)',
'expectedFlags': 's'
},
{
'pattern': '(?i:a.)',
'flags': 's',
'options': { modifiers: 'transform', dotAllFlag: 'transform' },
'expected': '(?:[Aa][^])',
'expectedFlags': ''
},
!IS_NODE_6 && {
'pattern': '(?i:\\p{Lowercase_Letter})k',
'flags': 'u',
'options': { modifiers: 'transform' },
'matches': ['ck', 'Ck', 'δk', 'Δk', '\u{118A8}k', '\u{118C8}k'],
'nonMatches': ['cK', 'CK', 'δK', 'ΔK', '\u{118A8}K', '\u{118C8}K', 'c\u212A', 'C\u212A'],
'expectedFlags': 'u'
},
!IS_NODE_6 && {
'pattern': '(?i:\\p{Lowercase_Letter})k',
'flags': 'u',
'options': { unicodePropertyEscapes: 'transform', modifiers: 'transform' },
'matches': ['ck', 'Ck', 'δk', 'Δk', '\u{118A8}k', '\u{118C8}k'],
'nonMatches': ['cK', 'CK', 'δK', 'ΔK', '\u{118A8}K', '\u{118C8}K', 'c\u212A', 'C\u212A'],
'expectedFlags': 'u'
},
{
'pattern': '(?i:[\\p{Lowercase_Letter}&&\\p{ASCII}])a',
'flags': 'v',
'options': { unicodeSetsFlag: 'transform', modifiers: 'transform' },
'expected': '(?:[A-Za-z\\u017F\\u212A])a',
'expectedFlags': 'u'
},
{
'pattern': '(?i:[\\p{Lowercase_Letter}&&\\p{ASCII}])a',
'flags': 'v',
'options': { unicodeSetsFlag: 'transform', unicodePropertyEscapes: 'transform', modifiers: 'transform' },
'expected': '(?:[A-Za-z\\u017F\\u212A])a',
'expectedFlags': 'u'
},
{
'pattern': '(?i:[^\\P{Lowercase_Letter}])',
'flags': 'u',
'options': { unicodePropertyEscapes: 'transform', modifiers: 'transform' },
'matches': ['\u{0131}'],
'nonMatches': ['0', ',', 'k', 'K', '\u{212A}']
},
{
'pattern': '(?i:[^\\P{Lowercase_Letter}])',
'flags': 'v',
'options': { unicodeSetsFlag: 'transform', modifiers: 'transform' },
'matches': ['k', 'K', '\u{212A}', '\u{0131}'],
'nonMatches': ['0', ',']
},
{
'pattern': '(?i:[^\\P{Lowercase_Letter}])',
'flags': 'v',
'options': { unicodeSetsFlag: 'transform', unicodePropertyEscapes: 'transform', modifiers: 'transform' },
'matches': ['k', 'K', '\u{212A}', '\u{0131}'],
'nonMatches': ['0', ',']
},
{
// Unicode 16
'pattern': '(?i:\u1C89)',
'expected': '(?:[\\u1C89\\u1C8A])'
},
// +m
{
'pattern': '(?m:^[a-z])',
'expected': '(?:(?:^|(?<=[\\n\\r\\u2028\\u2029]))[a-z])',
},
{
'pattern': '(?m:^[a-z])',
'options': { modifiers: false },
'expected': '(?m:^[a-z])',
},
{
'pattern': '(?m:[a-z]$)',
'expected': '(?:[a-z](?:$|(?=[\\n\\r\\u2028\\u2029])))',
},
{
'pattern': '(?m:[a-z]$)',
'options': { modifiers: false },
'expected': '(?m:[a-z]$)',
},
// +s
{
'pattern': '(?s:.)',
'expected': '(?:[^])',
},
{
'pattern': '(?s:.)',
'options': { modifiers: false },
'expected': '(?s:.)',
},
// -i
{
'pattern': '(?-i:a)(a)',
'flags': 'i',
'expected': '(?:a)([Aa])',
'expectedFlags': '',
},
{
'pattern': '(?-i:[a-z])([a-z])',
'flags': 'i',
'expected': '(?:[a-z])([A-Za-z])',
'expectedFlags': '',
},
{
'pattern': '(?-i:[a-z])([a-z])',
'flags': 'iu',
'options': { unicodeFlag: 'transform', modifiers: 'transform' },
'expected': '(?:[a-z])([A-Za-z\\u017F\\u212A])',
'expectedFlags': '',
},
{
'pattern': '(?-i:[\\q{ab|cd|abc}--\\q{abc}--\\q{cd}])',
'flags': 'iv',
'options': { unicodeSetsFlag: 'transform', modifiers: 'transform' },
'expected': '(?:(?:ab))',
'expectedFlags': 'u',
},
{
'pattern': '(?-i:[\\q{ab|cd|abc}--\\q{abc}--\\q{cd}])',
'flags': 'iv',
'options': { unicodeSetsFlag: 'transform', modifiers: false },
'expected': '(?-i:(?:ab))',
'expectedFlags': 'iu',
}, {
'pattern': '(?-i:[\\q{ab|cd|abc}--\\q{abc}--\\q{cd}])',
'flags': 'iv',
'options': { unicodeSetsFlag: 'transform', unicodeFlag: 'transform', modifiers: 'transform' },
'expected': '(?:(?:ab))',
'expectedFlags': '',
},
{
'pattern': '(a(?-i:a))',
'expected': '(a(?:a))'
},
{
'pattern': '(a(?-i:a))',
'flags': 'i',
'expected': '([Aa](?:a))',
'expectedFlags': ''
},
{
'pattern': '\\p{Lowercase_Letter}(?-i:k)',
'flags': 'iu',
'options': { modifiers: 'transform' },
'matches': ['ck', 'Ck', 'δk', 'Δk', '\u{118A8}k', '\u{118C8}k'],
'nonMatches': ['cK', 'CK', 'δK', 'ΔK', '\u{118A8}K', '\u{118C8}K', 'c\u212A', 'C\u212A'],
'expectedFlags': 'u'
},
{
'pattern': '\\p{Lowercase_Letter}(?-i:k)',
'flags': 'iu',
'options': { unicodePropertyEscapes: 'transform', modifiers: 'transform' },
'matches': ['ck', 'Ck', 'δk', 'Δk', '\u{118A8}k', '\u{118C8}k'],
'nonMatches': ['cK', 'CK', 'δK', 'ΔK', '\u{118A8}K', '\u{118C8}K', 'c\u212A', 'C\u212A'],
'expectedFlags': 'u'
},
{
'pattern': '[\\p{Lowercase_Letter}&&\\p{ASCII}](?-i:a)',
'flags': 'iv',
'options': { unicodeSetsFlag: 'transform', modifiers: 'transform' },
'expected': '[A-Za-z\\u017F\\u212A](?:a)',
'expectedFlags': 'u'
},
{
'pattern': '[\\p{Lowercase_Letter}&&\\p{ASCII}](?-i:a)',
'flags': 'iv',
'options': { unicodeSetsFlag: 'transform', unicodePropertyEscapes: 'transform', modifiers: 'transform' },
'expected': '[A-Za-z\\u017F\\u212A](?:a)',
'expectedFlags': 'u'
},
{
'pattern': '(?i:[[AB]&&B])',
'options': { unicodeSetsFlag: 'transform', modifiers: 'transform' },
'flags': 'v',
'expected': '(?:[Bb])'
},
{
'pattern': '(?i:[[AB]&&B])',
'options': { modifiers: 'transform' },
'flags': 'v',
'expected': '(?:[Bb])'
},
{
'pattern': '(?i:[K&&k])',
'flags': 'v',
'expected': '(?:[Kk\\u212A])',
'expectedFlags': 'v'
},
{
'pattern': '(?i:[K--k])',
'flags': 'v',
'expected': '(?:[])',
'expectedFlags': 'v'
},
{
pattern: '(?i:[\\q{KK}&&\\q{kk}])',
flags: 'v',
expected: '(?:(?:[Kk\\u212A][Kk\\u212A]))',
expectedFlags: 'v',
},
{
pattern: '(?i:[\\q{KK}--\\q{k\\u212A}])',
flags: 'v',
expected: '(?:[])',
expectedFlags: 'v'
},
{
pattern: '(?i:[[J-Lj-l]--\\u212A])',
flags: 'v',
expected: '(?:[JLjl])',
expectedFlags: 'v'
},
// -m
{
'pattern': '(?-m:^[a-z])(^[a-z])',
'flags': 'm',
'expected': '(?:^[a-z])((?:^|(?<=[\\n\\r\\u2028\\u2029]))[a-z])',
'expectedFlags': '',
},
{
'pattern': '(?-m:[a-z]$)([a-z]$)',
'flags': 'm',
'expected': '(?:[a-z]$)([a-z](?:$|(?=[\\n\\r\\u2028\\u2029])))',
'expectedFlags': '',
},
{
'pattern': '(^a|(?-m:^b))',
'expected': '(^a|(?:^b))'
},
{
'pattern': '(^a|(?-m:^b))',
'flags': 'm',
'expected': '((?:^|(?<=[\\n\\r\\u2028\\u2029]))a|(?:^b))',
'expectedFlags': ''
},
// -s
{
'pattern': '(.(?-s:.))',
'expected': '(.(?:.))'
},
{
'pattern': '(.(?-s:.))',
'flags': 's',
'expected': '([^](?:.))',
'expectedFlags': ''
},
{
'pattern': '(.(?-s:.))',
'flags': 's',
'options': { dotAllFlag: 'transform', modifiers: 'transform' },
'expected': '([^](?:.))',
'expectedFlags': ''
},
{
'pattern': '(.(?-s:.))',
'flags': 'su',
'options': { dotAllFlag: 'transform', modifiers: 'transform' },
'expected': '([^](?:.))',
'expectedFlags': 'u'
},
{
'pattern': '(.(?-s:.))',
'flags': 'su',
'options': { dotAllFlag: 'transform', modifiers: 'transform', unicodeFlag: 'transform' },
'expected': '((?:[\\0-\\uD7FF\\uE000-\\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF])(?:(?:[\\0-\\t\\x0B\\f\\x0E-\\u2027\\u202A-\\uD7FF\\uE000-\\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF])))',
'expectedFlags': '',
'matches': ['\na'],
'nonMatches': ['a\n']
},
// +ims
{
'pattern': '(?ims:^[a-z])',
'flags': '',
'expected': '(?:(?:^|(?<=[\\n\\r\\u2028\\u2029]))[A-Za-z])',
'expectedFlags': '',
},
{
'pattern': '(?ims:^[a-z])',
'flags': '',
'expected': '(?ims:^[a-z])',
'expectedFlags': '',
'options': { 'modifiers': false }
},
// -ims
{
'pattern': '(?-ims:^[a-z].)(^[a-z].)',
'flags': 'ims',
'expected': '(?:^[a-z].)((?:^|(?<=[\\n\\r\\u2028\\u2029]))[A-Za-z][^])',
'expectedFlags': '',
},
{
'pattern': '(?-ims:^[a-z].)(^[a-z].)',
'expected': '(?:^[a-z].)(^[a-z].)',
'expectedFlags': '',
},
{
'pattern': '(?-ims:^[a-z].)(^[a-z].)',
'expected': '(?-ims:^[a-z].)(^[a-z].)',
'expectedFlags': '',
'options': { 'modifiers': false }
},
].filter(Boolean);
exports.modifiersFixtures = modifiersFixtures;
mathiasbynens-regexpu-core-e35919f/tests/fixtures/named-group.js 0000664 0000000 0000000 00000002455 14717712160 0025134 0 ustar 00root root 0000000 0000000 const namedGroupFixtures = [
{
'pattern': '(?)\\k',
'flags': '',
'expected': '()\\1',
'expectedGroups': [
['name', 1]
]
},
{
'pattern': '(?)(?)\\k\\k',
'flags': '',
'expected': '()()\\1\\2',
'expectedGroups': [
['name1', 1],
['name2', 2]
]
},
{
'pattern': '()(?)\\k',
'flags': '',
'expected': '()()\\2',
'expectedGroups': [
['name', 2]
]
},
{
'pattern': '(?)()\\1',
'flags': '',
'expected': '()()\\1'
},
{
'pattern': '\\k\\k(?)\\k',
'flags': '',
'expected': '(?:)(?:)()\\1'
},
{
'pattern': '(?\\k)',
'flags': '',
'expected': '(\\1)'
},
{
'pattern': '(?<$𐒤>a)b\\k<$𐒤>',
'flags': '',
'expected': '(a)b\\1'
},
{
'pattern': '(?<=a)(?f)\\k',
'flags': '',
'expected': '(?<=a)(?x)|(?y))\\k',
'flags': '',
'expected': '(?:(x)|(y))\\1\\2',
'expectedGroups': [
['a', 1],
['a', 2]
]
},
{
'pattern': '(?:(?x)\\k|(?y)\\k)',
'flags': '',
'expected': '(?:(x)\\1|(y)\\1\\2)',
'expectedGroups': [
['a', 1],
['a', 2]
]
}
];
exports.namedGroupFixtures = namedGroupFixtures;
mathiasbynens-regexpu-core-e35919f/tests/fixtures/unicode-property-escape.js 0000664 0000000 0000000 00000035662 14717712160 0027472 0 ustar 00root root 0000000 0000000 const unicodePropertyEscapeFixtures = [
{
pattern: '\\p{ASCII_Hex_Digit}',
expected: '[0-9A-Fa-f]'
},
{
pattern: '\\p{Script_Extensions=Anatolian_Hieroglyphs}',
expected: '(?:\\uD811[\\uDC00-\\uDE46])'
},
{
pattern: '\\p{ASCII_Hex_Digit}+',
expected: '[0-9A-Fa-f]+',
},
{
pattern: '\\p{Script_Extensions=Anatolian_Hieroglyphs}+',
expected: '(?:\\uD811[\\uDC00-\\uDE46])+',
},
{
pattern: '[\\p{ASCII_Hex_Digit}_]',
expected: '[0-9A-F_a-f]',
},
{
pattern: '[^\\p{ASCII_Hex_Digit}_]',
expected: '(?:[\\0-\\/:-@G-\\^`g-\\uD7FF\\uE000-\\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF])',
},
{
pattern: '[\\P{Script_Extensions=Anatolian_Hieroglyphs}]',
expected: '(?:[\\0-\\uFFFF]|[\\uD800-\\uD810\\uD812-\\uDBFF][\\uDC00-\\uDFFF]|\\uD811[\\uDE47-\\uDFFF])'
},
{
pattern: '[\\p{Script_Extensions=Anatolian_Hieroglyphs}_]',
expected: '(?:_|\\uD811[\\uDC00-\\uDE46])',
},
{
pattern: '[\\P{Script_Extensions=Anatolian_Hieroglyphs}_]',
expected: '(?:[\\0-\\uFFFF]|[\\uD800-\\uD810\\uD812-\\uDBFF][\\uDC00-\\uDFFF]|\\uD811[\\uDE47-\\uDFFF])',
},
{
pattern: '(?:\\p{ASCII_Hex_Digit})',
expected: '(?:[0-9A-Fa-f])',
},
{
pattern: '(?:\\p{Script_Extensions=Anatolian_Hieroglyphs})',
expected: '(?:(?:\\uD811[\\uDC00-\\uDE46]))',
},
{
pattern: '(?:\\p{Script_Extensions=Wancho})',
expected: '(?:(?:\\uD838[\\uDEC0-\\uDEF9\\uDEFF]))',
},
{
pattern: '[\\p{ASCII}]',
flags: 'iu',
expected: '[\\0-\\x7F\\u017F\\u212A]',
expectedFlags: 'iu',
matches: ['k', 'K', '\u{212A}'],
nonMatches: ['\u{0131}']
},
{
pattern: '[^\\P{Lowercase_Letter}]',
flags: 'iu',
matches: ['\u{0131}'],
nonMatches: ['0', ',', 'k', 'K', '\u{212A}']
},
// simplifies the output using Unicode code point escapes when not transforming the u flag
{
pattern: '\\p{Script_Extensions=Anatolian_Hieroglyphs}',
options: {
'unicodePropertyEscapes': 'transform',
},
expected: '[\\u{14400}-\\u{14646}]',
},
{
pattern: '[\\P{Script_Extensions=Anatolian_Hieroglyphs}]',
options: {
'unicodePropertyEscapes': 'transform',
},
expected: '[\\0-\\u{143FF}\\u{14647}-\\u{10FFFF}]',
},
// should transpile to minimal case-insensitive set
{
pattern: '\u03B8',
flags: 'iu',
options: {
'unicodeFlag': 'transform'
},
expected: '[\\u03B8\\u03F4]',
},
{
pattern: '\u03B8',
flags: 'iu',
options: {},
expected: '\\u03B8',
},
// should not replace `-` symbol when not in character class range
{
pattern: '-',
options: {},
expected: '-',
},
// should not transpile unicode property when unicodePropertyEscapes is not enabled
{
pattern: '\\p{ASCII_Hex_Digit}\\P{ASCII_Hex_Digit}',
options: {},
expected: '\\p{ASCII_Hex_Digit}\\P{ASCII_Hex_Digit}'
},
// throws on unknown binary properties
{
pattern: '\\p{UnknownBinaryProperty}',
throws: /Unknown property: UnknownBinaryProperty/
},
{
pattern: '\\P{UnknownBinaryProperty}',
throws: /Unknown property: UnknownBinaryProperty/
},
// throws on explicitly unsupported properties
// https://github.com/tc39/proposal-regexp-unicode-property-escapes/issues/27
{
pattern: '\\P{Composition_Exclusion}',
throws: /Unknown property: Composition_Exclusion/
},
{
pattern: '\\p{Expands_On_NFC}',
throws: /Unknown property: Expands_On_NFC/
},
{
pattern: '\\p{Expands_On_NFD}',
throws: /Unknown property: Expands_On_NFD/
},
{
pattern: '\\p{Expands_On_NFKC}',
throws: /Unknown property: Expands_On_NFKC/
},
{
pattern: '\\p{Expands_On_NFKD}',
throws: /Unknown property: Expands_On_NFKD/
},
{
pattern: '\\p{FC_NFKC_Closure}',
throws: /Unknown property: FC_NFKC_Closure/
},
{
pattern: '\\p{Full_Composition_Exclusion}',
throws: /Unknown property: Full_Composition_Exclusion/
},
{
pattern: '\\P{Grapheme_Link}',
throws: /Unknown property: Grapheme_Link/
},
{
pattern: '\\P{Hyphen}',
throws: /Unknown property: Hyphen/
},
{
pattern: '\\P{Other_Alphabetic}',
throws: /Unknown property: Other_Alphabetic/
},
{
pattern: '\\P{Other_Default_Ignorable_Code_Point}',
throws: /Unknown property: Other_Default_Ignorable_Code_Point/
},
{
pattern: '\\P{Other_Grapheme_Extend}',
throws: /Unknown property: Other_Grapheme_Extend/
},
{
pattern: '\\P{Other_ID_Continue}',
throws: /Unknown property: Other_ID_Continue/
},
{
pattern: '\\P{Other_ID_Start}',
throws: /Unknown property: Other_ID_Start/
},
{
pattern: '\\P{Other_Lowercase}',
throws: /Unknown property: Other_Lowercase/
},
{
pattern: '\\P{Other_Math}',
throws: /Unknown property: Other_Math/
},
{
pattern: '\\P{Other_Uppercase}',
throws: /Unknown property: Other_Uppercase/
},
{
pattern: '\\P{Prepended_Concatenation_Mark}',
throws: /Unknown property: Prepended_Concatenation_Mark/
},
// throws on non-binary properties without a value
{
pattern: '\\p{General_Category}',
throws: /Failed to recognize value `undefined` for property `General_Category`\./
},
// throws on unknown property values
{
pattern: '\\p{General_Category=UnknownCategory}',
throws: /Unknown value `UnknownCategory` for property `General_Category`\./
},
{
pattern: '\\P{General_Category=UnknownCategory}',
throws: /Unknown value `UnknownCategory` for property `General_Category`\./
},
// throws when loose matching is attempted
{
pattern: '\\p{gc=uppercaseletter}',
throws: /Unknown value `uppercaseletter` for property `General_Category`\./
},
{
pattern: '\\p{Block=Superscripts and Subscripts}',
throws: /Unknown property: Block/
},
{
pattern: '\\P{_-_lOwEr_C-A_S-E_-_}',
throws: /Unknown property: _-_lOwEr_C-A_S-E_-_/
}
];
const unicodePropertyEscapePathExpressionsFixtures = [
// https://unicode.org/reports/tr18/#RL1.2 item 1
{
'path': 'General_Category/Uppercase_Letter',
'expressions': [
'gc=Lu',
'gc=Uppercase_Letter',
'General_Category=Lu',
'General_Category=Uppercase_Letter',
'Lu',
'Uppercase_Letter'
]
},
// https://unicode.org/reports/tr18/#RL1.2 item 2a
{
'path': 'Script/Greek',
'expressions': [
'sc=Grek',
'sc=Greek',
'Script=Grek',
'Script=Greek'
]
},
{
'path': 'Script/Hiragana',
'expressions': [
'sc=Hira',
'sc=Hiragana',
'Script=Hira',
'Script=Hiragana'
]
},
{
'path': 'Script/Kawi',
'expressions': [
'sc=Kawi',
]
},
// https://unicode.org/reports/tr18/#RL1.2 item 2b
{
'path': 'Script_Extensions/Greek',
'expressions': [
'scx=Grek',
'scx=Greek',
'Script_Extensions=Grek',
'Script_Extensions=Greek'
]
},
// https://unicode.org/reports/tr18/#RL1.2 item 3
{
'path': 'Binary_Property/Alphabetic',
'expressions': [
'Alpha',
'Alphabetic'
]
},
// https://unicode.org/reports/tr18/#RL1.2 item 4
{
'path': 'Binary_Property/Uppercase',
'expressions': [
'Upper',
'Uppercase'
]
},
// https://unicode.org/reports/tr18/#RL1.2 item 5
{
'path': 'Binary_Property/Lowercase',
'expressions': [
'Lower',
'Lowercase'
]
},
// https://unicode.org/reports/tr18/#RL1.2 item 6
{
'path': 'Binary_Property/White_Space',
'expressions': [
'WSpace',
'White_Space'
]
},
// https://unicode.org/reports/tr18/#RL1.2 item 7
{
'path': 'Binary_Property/Noncharacter_Code_Point',
'expressions': [
'NChar',
'Noncharacter_Code_Point'
]
},
// https://unicode.org/reports/tr18/#RL1.2 item 8
{
'path': 'Binary_Property/Default_Ignorable_Code_Point',
'expressions': [
'DI',
'Default_Ignorable_Code_Point'
]
},
// https://unicode.org/reports/tr18/#RL1.2 item 9a
{
'path': 'Binary_Property/Any',
'expressions': [
'Any'
]
},
// https://unicode.org/reports/tr18/#RL1.2 item 9b
{
'path': 'Binary_Property/ASCII',
'expressions': [
'ASCII'
]
},
// https://unicode.org/reports/tr18/#RL1.2 item 9c
{
'path': 'Binary_Property/Assigned',
'expressions': [
'Assigned'
]
},
// https://unicode.org/reports/tr18/#RL2.7
{
'path': 'Binary_Property/ASCII_Hex_Digit',
'expressions': [
'ASCII_Hex_Digit',
'AHex'
]
},
// https://unicode.org/reports/tr18/#RL2.7
// {
// 'path': 'Bidi_Class/Arabic_Letter',
// 'expressions': [
// 'bc=AL',
// 'bc=Arabic_Letter',
// 'Bidi_Class=AL',
// 'Bidi_Class=Arabic_Letter'
// ]
// },
// https://unicode.org/reports/tr18/#RL2.7
{
'path': 'Binary_Property/Bidi_Control',
'expressions': [
'Bidi_C',
'Bidi_Control'
]
},
// https://unicode.org/reports/tr18/#RL2.7
{
'path': 'Binary_Property/Bidi_Mirrored',
'expressions': [
'Bidi_M',
'Bidi_Mirrored'
]
},
// https://unicode.org/reports/tr18/#RL2.7
{
'path': 'Binary_Property/Case_Ignorable',
'expressions': [
'CI',
'Case_Ignorable',
]
},
// https://unicode.org/reports/tr18/#RL2.7
{
'path': 'Binary_Property/Cased',
'expressions': [
'Cased'
]
},
// https://unicode.org/reports/tr18/#RL2.7
{
'path': 'Binary_Property/Changes_When_NFKC_Casefolded',
'expressions': [
'CWKCF',
'Changes_When_NFKC_Casefolded'
]
},
// https://unicode.org/reports/tr18/#RL2.7
{
'path': 'Binary_Property/Changes_When_Casefolded',
'expressions': [
'CWCF',
'Changes_When_Casefolded'
]
},
// https://unicode.org/reports/tr18/#RL2.7
{
'path': 'Binary_Property/Changes_When_Casemapped',
'expressions': [
'CWCM',
'Changes_When_Casemapped'
]
},
// https://unicode.org/reports/tr18/#RL2.7
{
'path': 'Binary_Property/Changes_When_Lowercased',
'expressions': [
'CWL',
'Changes_When_Lowercased'
]
},
// https://unicode.org/reports/tr18/#RL2.7
{
'path': 'Binary_Property/Changes_When_Titlecased',
'expressions': [
'CWT',
'Changes_When_Titlecased'
]
},
// https://unicode.org/reports/tr18/#RL2.7
{
'path': 'Binary_Property/Changes_When_Uppercased',
'expressions': [
'CWU',
'Changes_When_Uppercased'
]
},
// https://unicode.org/reports/tr18/#RL2.7
{
'path': 'Binary_Property/Dash',
'expressions': [
'Dash'
]
},
// https://unicode.org/reports/tr18/#RL2.7
{
'path': 'Binary_Property/Deprecated',
'expressions': [
'Dep',
'Deprecated'
]
},
// https://unicode.org/reports/tr18/#RL2.7
{
'path': 'Binary_Property/Diacritic',
'expressions': [
'Dia',
'Diacritic'
]
},
// https://unicode.org/reports/tr18/#RL2.7
{
'path': 'Binary_Property/Extender',
'expressions': [
'Ext',
'Extender'
]
},
// https://unicode.org/reports/tr18/#RL2.7
{
'path': 'Binary_Property/Grapheme_Base',
'expressions': [
'Gr_Base',
'Grapheme_Base'
]
},
// https://unicode.org/reports/tr18/#RL2.7
{
'path': 'Binary_Property/Grapheme_Extend',
'expressions': [
'Gr_Ext',
'Grapheme_Extend'
]
},
// https://unicode.org/reports/tr18/#RL2.7
{
'path': 'Binary_Property/Hex_Digit',
'expressions': [
'Hex',
'Hex_Digit'
]
},
// https://unicode.org/reports/tr18/#RL2.7
{
'path': 'Binary_Property/ID_Continue',
'expressions': [
'IDC',
'ID_Continue'
]
},
// https://unicode.org/reports/tr18/#RL2.7
{
'path': 'Binary_Property/ID_Start',
'expressions': [
'IDS',
'ID_Start'
]
},
// https://unicode.org/reports/tr18/#RL2.7
{
'path': 'Binary_Property/Ideographic',
'expressions': [
'Ideo',
'Ideographic'
]
},
// https://unicode.org/reports/tr18/#RL2.7
{
'path': 'Binary_Property/IDS_Binary_Operator',
'expressions': [
'IDSB',
'IDS_Binary_Operator'
]
},
// https://unicode.org/reports/tr18/#RL2.7
{
'path': 'Binary_Property/IDS_Trinary_Operator',
'expressions': [
'IDST',
'IDS_Trinary_Operator'
]
},
// https://unicode.org/reports/tr18/#RL2.7
{
'path': 'Binary_Property/Join_Control',
'expressions': [
'Join_C',
'Join_Control'
]
},
// https://unicode.org/reports/tr18/#RL2.7
{
'path': 'Binary_Property/Logical_Order_Exception',
'expressions': [
'LOE',
'Logical_Order_Exception'
]
},
// https://unicode.org/reports/tr18/#RL2.7
{
'path': 'Binary_Property/Math',
'expressions': [
'Math'
]
},
// https://unicode.org/reports/tr18/#RL2.7
{
'path': 'Binary_Property/Pattern_Syntax',
'expressions': [
'Pat_Syn',
'Pattern_Syntax'
]
},
// https://unicode.org/reports/tr18/#RL2.7
{
'path': 'Binary_Property/Pattern_White_Space',
'expressions': [
'Pat_WS',
'Pattern_White_Space'
]
},
// https://unicode.org/reports/tr18/#RL2.7
{
'path': 'Binary_Property/Quotation_Mark',
'expressions': [
'QMark',
'Quotation_Mark'
]
},
// https://unicode.org/reports/tr18/#RL2.7
{
'path': 'Binary_Property/Radical',
'expressions': [
'Radical'
]
},
{
'path': 'Binary_Property/Regional_Indicator',
'expressions': [
'RI',
'Regional_Indicator'
]
},
// https://unicode.org/reports/tr18/#RL2.7
{
'path': 'Binary_Property/Soft_Dotted',
'expressions': [
'SD',
'Soft_Dotted'
]
},
// https://unicode.org/reports/tr18/#RL2.7
{
'path': 'Binary_Property/Sentence_Terminal',
'expressions': [
'STerm',
'Sentence_Terminal'
]
},
// https://unicode.org/reports/tr18/#RL2.7
{
'path': 'Binary_Property/Terminal_Punctuation',
'expressions': [
'Term',
'Terminal_Punctuation'
]
},
// https://unicode.org/reports/tr18/#RL2.7
{
'path': 'Binary_Property/Unified_Ideograph',
'expressions': [
'UIdeo',
'Unified_Ideograph'
]
},
// https://unicode.org/reports/tr18/#RL2.7
{
'path': 'Binary_Property/Variation_Selector',
'expressions': [
'VS',
'Variation_Selector'
]
},
// https://unicode.org/reports/tr18/#RL2.7
{
'path': 'Binary_Property/XID_Continue',
'expressions': [
'XIDC',
'XID_Continue'
]
},
// https://unicode.org/reports/tr18/#RL2.7
{
'path': 'Binary_Property/XID_Start',
'expressions': [
'XIDS',
'XID_Start'
]
},
// https://unicode.org/reports/tr18/#RL2.7
// {
// 'path': 'Bidi_Paired_Bracket_Type/Open',
// 'expressions': [
// 'bpt=o',
// 'bpt=Open',
// 'Bidi_Paired_Bracket_Type=o',
// 'Bidi_Paired_Bracket_Type=Open'
// ]
// },
// https://unicode.org/reports/tr51/
{
'path': 'Binary_Property/Emoji',
'expressions': [
'Emoji'
]
},
// https://unicode.org/reports/tr51/
{
'path': 'Binary_Property/Emoji_Component',
'expressions': [
'Emoji_Component'
]
},
// https://unicode.org/reports/tr51/
{
'path': 'Binary_Property/Emoji_Modifier',
'expressions': [
'Emoji_Modifier'
]
},
// https://unicode.org/reports/tr51/
{
'path': 'Binary_Property/Emoji_Modifier_Base',
'expressions': [
'Emoji_Modifier_Base'
]
},
// https://unicode.org/reports/tr51/
{
'path': 'Binary_Property/Emoji_Presentation',
'expressions': [
'Emoji_Presentation'
]
},
// https://unicode.org/reports/tr51/proposed.html
{
'path': 'Binary_Property/Extended_Pictographic',
'expressions': [
'Extended_Pictographic'
]
},
{
'path': 'Script_Extensions/Yezidi',
'expressions': [
'scx=Yezi',
'scx=Yezidi',
'Script_Extensions=Yezi',
'Script_Extensions=Yezidi',
]
},
{
'path': 'Script_Extensions/Toto',
'expressions': [
'scx=Toto',
'Script_Extensions=Toto',
]
},
];
exports.unicodePropertyEscapeFixtures = unicodePropertyEscapeFixtures;
exports.unicodePropertyEscapePathExpressionsFixtures = unicodePropertyEscapePathExpressionsFixtures; mathiasbynens-regexpu-core-e35919f/tests/fixtures/unicode-set.js 0000664 0000000 0000000 00000152624 14717712160 0025141 0 ustar 00root root 0000000 0000000 const TRANSFORM_U = { unicodeFlag: 'transform', unicodeSetsFlag: 'transform' };
const Basic_Emoji = {
get all() { return `${this.strings}|[${this.chars}]` },
// node -e "process.stdout.write(require('regenerate-unicode-properties/Property_of_Strings/Basic_Emoji').strings.sort((a,b)=>b.length-a.length).join('|'))"
strings: "🅰️|🅱️|🅾️|🅿️|🈂️|🈷️|🌡️|🌤️|🌥️|🌦️|🌧️|🌨️|🌩️|🌪️|🌫️|🌬️|🌶️|🍽️|🎖️|🎗️|🎙️|🎚️|🎛️|🎞️|🎟️|🏋️|🏌️|🏍️|🏎️|🏔️|🏕️|🏖️|🏗️|🏘️|🏙️|🏚️|🏛️|🏜️|🏝️|🏞️|🏟️|🏳️|🏵️|🏷️|🐿️|👁️|📽️|🕉️|🕊️|🕯️|🕰️|🕳️|🕴️|🕵️|🕶️|🕷️|🕸️|🕹️|🖇️|🖊️|🖋️|🖌️|🖍️|🖐️|🖥️|🖨️|🖱️|🖲️|🖼️|🗂️|🗃️|🗄️|🗑️|🗒️|🗓️|🗜️|🗝️|🗞️|🗡️|🗣️|🗨️|🗯️|🗳️|🗺️|🛋️|🛍️|🛎️|🛏️|🛠️|🛡️|🛢️|🛣️|🛤️|🛥️|🛩️|🛰️|🛳️|©️|®️|‼️|⁉️|™️|ℹ️|↔️|↕️|↖️|↗️|↘️|↙️|↩️|↪️|⌨️|⏏️|⏭️|⏮️|⏯️|⏱️|⏲️|⏸️|⏹️|⏺️|Ⓜ️|▪️|▫️|▶️|◀️|◻️|◼️|☀️|☁️|☂️|☃️|☄️|☎️|☑️|☘️|☝️|☠️|☢️|☣️|☦️|☪️|☮️|☯️|☸️|☹️|☺️|♀️|♂️|♟️|♠️|♣️|♥️|♦️|♨️|♻️|♾️|⚒️|⚔️|⚕️|⚖️|⚗️|⚙️|⚛️|⚜️|⚠️|⚧️|⚰️|⚱️|⛈️|⛏️|⛑️|⛓️|⛩️|⛰️|⛱️|⛴️|⛷️|⛸️|⛹️|✂️|✈️|✉️|✌️|✍️|✏️|✒️|✔️|✖️|✝️|✡️|✳️|✴️|❄️|❇️|❣️|❤️|➡️|⤴️|⤵️|⬅️|⬆️|⬇️|〰️|〽️|㊗️|㊙️",
// node -e "process.stdout.write(JSON.stringify(require('regenerate-unicode-properties/Property_of_Strings/Basic_Emoji').characters.toString({hasUnicodeFlag:true})).slice(2,-2))"
chars: "\\u231A\\u231B\\u23E9-\\u23EC\\u23F0\\u23F3\\u25FD\\u25FE\\u2614\\u2615\\u2648-\\u2653\\u267F\\u2693\\u26A1\\u26AA\\u26AB\\u26BD\\u26BE\\u26C4\\u26C5\\u26CE\\u26D4\\u26EA\\u26F2\\u26F3\\u26F5\\u26FA\\u26FD\\u2705\\u270A\\u270B\\u2728\\u274C\\u274E\\u2753-\\u2755\\u2757\\u2795-\\u2797\\u27B0\\u27BF\\u2B1B\\u2B1C\\u2B50\\u2B55\\u{1F004}\\u{1F0CF}\\u{1F18E}\\u{1F191}-\\u{1F19A}\\u{1F201}\\u{1F21A}\\u{1F22F}\\u{1F232}-\\u{1F236}\\u{1F238}-\\u{1F23A}\\u{1F250}\\u{1F251}\\u{1F300}-\\u{1F320}\\u{1F32D}-\\u{1F335}\\u{1F337}-\\u{1F37C}\\u{1F37E}-\\u{1F393}\\u{1F3A0}-\\u{1F3CA}\\u{1F3CF}-\\u{1F3D3}\\u{1F3E0}-\\u{1F3F0}\\u{1F3F4}\\u{1F3F8}-\\u{1F43E}\\u{1F440}\\u{1F442}-\\u{1F4FC}\\u{1F4FF}-\\u{1F53D}\\u{1F54B}-\\u{1F54E}\\u{1F550}-\\u{1F567}\\u{1F57A}\\u{1F595}\\u{1F596}\\u{1F5A4}\\u{1F5FB}-\\u{1F64F}\\u{1F680}-\\u{1F6C5}\\u{1F6CC}\\u{1F6D0}-\\u{1F6D2}\\u{1F6D5}-\\u{1F6D7}\\u{1F6DC}-\\u{1F6DF}\\u{1F6EB}\\u{1F6EC}\\u{1F6F4}-\\u{1F6FC}\\u{1F7E0}-\\u{1F7EB}\\u{1F7F0}\\u{1F90C}-\\u{1F93A}\\u{1F93C}-\\u{1F945}\\u{1F947}-\\u{1F9FF}\\u{1FA70}-\\u{1FA7C}\\u{1FA80}-\\u{1FA89}\\u{1FA8F}-\\u{1FAC6}\\u{1FACE}-\\u{1FADC}\\u{1FADF}-\\u{1FAE9}\\u{1FAF0}-\\u{1FAF8}"
};
const Emoji = {
// node -e "process.stdout.write(JSON.stringify(require('regenerate-unicode-properties/Binary_Property/Emoji').characters.toString({hasUnicodeFlag:true})).slice(2,-2))"
chars: "#\\*0-9\\xA9\\xAE\\u203C\\u2049\\u2122\\u2139\\u2194-\\u2199\\u21A9\\u21AA\\u231A\\u231B\\u2328\\u23CF\\u23E9-\\u23F3\\u23F8-\\u23FA\\u24C2\\u25AA\\u25AB\\u25B6\\u25C0\\u25FB-\\u25FE\\u2600-\\u2604\\u260E\\u2611\\u2614\\u2615\\u2618\\u261D\\u2620\\u2622\\u2623\\u2626\\u262A\\u262E\\u262F\\u2638-\\u263A\\u2640\\u2642\\u2648-\\u2653\\u265F\\u2660\\u2663\\u2665\\u2666\\u2668\\u267B\\u267E\\u267F\\u2692-\\u2697\\u2699\\u269B\\u269C\\u26A0\\u26A1\\u26A7\\u26AA\\u26AB\\u26B0\\u26B1\\u26BD\\u26BE\\u26C4\\u26C5\\u26C8\\u26CE\\u26CF\\u26D1\\u26D3\\u26D4\\u26E9\\u26EA\\u26F0-\\u26F5\\u26F7-\\u26FA\\u26FD\\u2702\\u2705\\u2708-\\u270D\\u270F\\u2712\\u2714\\u2716\\u271D\\u2721\\u2728\\u2733\\u2734\\u2744\\u2747\\u274C\\u274E\\u2753-\\u2755\\u2757\\u2763\\u2764\\u2795-\\u2797\\u27A1\\u27B0\\u27BF\\u2934\\u2935\\u2B05-\\u2B07\\u2B1B\\u2B1C\\u2B50\\u2B55\\u3030\\u303D\\u3297\\u3299\\u{1F004}\\u{1F0CF}\\u{1F170}\\u{1F171}\\u{1F17E}\\u{1F17F}\\u{1F18E}\\u{1F191}-\\u{1F19A}\\u{1F1E6}-\\u{1F1FF}\\u{1F201}\\u{1F202}\\u{1F21A}\\u{1F22F}\\u{1F232}-\\u{1F23A}\\u{1F250}\\u{1F251}\\u{1F300}-\\u{1F321}\\u{1F324}-\\u{1F393}\\u{1F396}\\u{1F397}\\u{1F399}-\\u{1F39B}\\u{1F39E}-\\u{1F3F0}\\u{1F3F3}-\\u{1F3F5}\\u{1F3F7}-\\u{1F4FD}\\u{1F4FF}-\\u{1F53D}\\u{1F549}-\\u{1F54E}\\u{1F550}-\\u{1F567}\\u{1F56F}\\u{1F570}\\u{1F573}-\\u{1F57A}\\u{1F587}\\u{1F58A}-\\u{1F58D}\\u{1F590}\\u{1F595}\\u{1F596}\\u{1F5A4}\\u{1F5A5}\\u{1F5A8}\\u{1F5B1}\\u{1F5B2}\\u{1F5BC}\\u{1F5C2}-\\u{1F5C4}\\u{1F5D1}-\\u{1F5D3}\\u{1F5DC}-\\u{1F5DE}\\u{1F5E1}\\u{1F5E3}\\u{1F5E8}\\u{1F5EF}\\u{1F5F3}\\u{1F5FA}-\\u{1F64F}\\u{1F680}-\\u{1F6C5}\\u{1F6CB}-\\u{1F6D2}\\u{1F6D5}-\\u{1F6D7}\\u{1F6DC}-\\u{1F6E5}\\u{1F6E9}\\u{1F6EB}\\u{1F6EC}\\u{1F6F0}\\u{1F6F3}-\\u{1F6FC}\\u{1F7E0}-\\u{1F7EB}\\u{1F7F0}\\u{1F90C}-\\u{1F93A}\\u{1F93C}-\\u{1F945}\\u{1F947}-\\u{1F9FF}\\u{1FA70}-\\u{1FA7C}\\u{1FA80}-\\u{1FA89}\\u{1FA8F}-\\u{1FAC6}\\u{1FACE}-\\u{1FADC}\\u{1FADF}-\\u{1FAE9}\\u{1FAF0}-\\u{1FAF8}"
}
const RGI_Emoji = {
// The update command is a bit clumsy as the keycap *️⃣ should be escaped
// node -e "process.stdout.write(require('regenerate-unicode-properties/Property_of_Strings/RGI_Emoji').strings.map(str=>str.replaceAll('*', '\\\\*')).sort((a,b)=>b.length-a.length).join('|').replaceAll('\\\\', '\\\\\\\\'))"
strings: "👨🏻❤️💋👨🏻|👨🏻❤️💋👨🏼|👨🏻❤️💋👨🏽|👨🏻❤️💋👨🏾|👨🏻❤️💋👨🏿|👨🏼❤️💋👨🏻|👨🏼❤️💋👨🏼|👨🏼❤️💋👨🏽|👨🏼❤️💋👨🏾|👨🏼❤️💋👨🏿|👨🏽❤️💋👨🏻|👨🏽❤️💋👨🏼|👨🏽❤️💋👨🏽|👨🏽❤️💋👨🏾|👨🏽❤️💋👨🏿|👨🏾❤️💋👨🏻|👨🏾❤️💋👨🏼|👨🏾❤️💋👨🏽|👨🏾❤️💋👨🏾|👨🏾❤️💋👨🏿|👨🏿❤️💋👨🏻|👨🏿❤️💋👨🏼|👨🏿❤️💋👨🏽|👨🏿❤️💋👨🏾|👨🏿❤️💋👨🏿|👩🏻❤️💋👨🏻|👩🏻❤️💋👨🏼|👩🏻❤️💋👨🏽|👩🏻❤️💋👨🏾|👩🏻❤️💋👨🏿|👩🏻❤️💋👩🏻|👩🏻❤️💋👩🏼|👩🏻❤️💋👩🏽|👩🏻❤️💋👩🏾|👩🏻❤️💋👩🏿|👩🏼❤️💋👨🏻|👩🏼❤️💋👨🏼|👩🏼❤️💋👨🏽|👩🏼❤️💋👨🏾|👩🏼❤️💋👨🏿|👩🏼❤️💋👩🏻|👩🏼❤️💋👩🏼|👩🏼❤️💋👩🏽|👩🏼❤️💋👩🏾|👩🏼❤️💋👩🏿|👩🏽❤️💋👨🏻|👩🏽❤️💋👨🏼|👩🏽❤️💋👨🏽|👩🏽❤️💋👨🏾|👩🏽❤️💋👨🏿|👩🏽❤️💋👩🏻|👩🏽❤️💋👩🏼|👩🏽❤️💋👩🏽|👩🏽❤️💋👩🏾|👩🏽❤️💋👩🏿|👩🏾❤️💋👨🏻|👩🏾❤️💋👨🏼|👩🏾❤️💋👨🏽|👩🏾❤️💋👨🏾|👩🏾❤️💋👨🏿|👩🏾❤️💋👩🏻|👩🏾❤️💋👩🏼|👩🏾❤️💋👩🏽|👩🏾❤️💋👩🏾|👩🏾❤️💋👩🏿|👩🏿❤️💋👨🏻|👩🏿❤️💋👨🏼|👩🏿❤️💋👨🏽|👩🏿❤️💋👨🏾|👩🏿❤️💋👨🏿|👩🏿❤️💋👩🏻|👩🏿❤️💋👩🏼|👩🏿❤️💋👩🏽|👩🏿❤️💋👩🏾|👩🏿❤️💋👩🏿|🧑🏻❤️💋🧑🏼|🧑🏻❤️💋🧑🏽|🧑🏻❤️💋🧑🏾|🧑🏻❤️💋🧑🏿|🧑🏼❤️💋🧑🏻|🧑🏼❤️💋🧑🏽|🧑🏼❤️💋🧑🏾|🧑🏼❤️💋🧑🏿|🧑🏽❤️💋🧑🏻|🧑🏽❤️💋🧑🏼|🧑🏽❤️💋🧑🏾|🧑🏽❤️💋🧑🏿|🧑🏾❤️💋🧑🏻|🧑🏾❤️💋🧑🏼|🧑🏾❤️💋🧑🏽|🧑🏾❤️💋🧑🏿|🧑🏿❤️💋🧑🏻|🧑🏿❤️💋🧑🏼|🧑🏿❤️💋🧑🏽|🧑🏿❤️💋🧑🏾|🏴|🏴|🏴|👨🏻❤️👨🏻|👨🏻❤️👨🏼|👨🏻❤️👨🏽|👨🏻❤️👨🏾|👨🏻❤️👨🏿|👨🏻🤝👨🏼|👨🏻🤝👨🏽|👨🏻🤝👨🏾|👨🏻🤝👨🏿|👨🏼❤️👨🏻|👨🏼❤️👨🏼|👨🏼❤️👨🏽|👨🏼❤️👨🏾|👨🏼❤️👨🏿|👨🏼🤝👨🏻|👨🏼🤝👨🏽|👨🏼🤝👨🏾|👨🏼🤝👨🏿|👨🏽❤️👨🏻|👨🏽❤️👨🏼|👨🏽❤️👨🏽|👨🏽❤️👨🏾|👨🏽❤️👨🏿|👨🏽🤝👨🏻|👨🏽🤝👨🏼|👨🏽🤝👨🏾|👨🏽🤝👨🏿|👨🏾❤️👨🏻|👨🏾❤️👨🏼|👨🏾❤️👨🏽|👨🏾❤️👨🏾|👨🏾❤️👨🏿|👨🏾🤝👨🏻|👨🏾🤝👨🏼|👨🏾🤝👨🏽|👨🏾🤝👨🏿|👨🏿❤️👨🏻|👨🏿❤️👨🏼|👨🏿❤️👨🏽|👨🏿❤️👨🏾|👨🏿❤️👨🏿|👨🏿🤝👨🏻|👨🏿🤝👨🏼|👨🏿🤝👨🏽|👨🏿🤝👨🏾|👩🏻❤️👨🏻|👩🏻❤️👨🏼|👩🏻❤️👨🏽|👩🏻❤️👨🏾|👩🏻❤️👨🏿|👩🏻❤️👩🏻|👩🏻❤️👩🏼|👩🏻❤️👩🏽|👩🏻❤️👩🏾|👩🏻❤️👩🏿|👩🏻🤝👨🏼|👩🏻🤝👨🏽|👩🏻🤝👨🏾|👩🏻🤝👨🏿|👩🏻🤝👩🏼|👩🏻🤝👩🏽|👩🏻🤝👩🏾|👩🏻🤝👩🏿|👩🏼❤️👨🏻|👩🏼❤️👨🏼|👩🏼❤️👨🏽|👩🏼❤️👨🏾|👩🏼❤️👨🏿|👩🏼❤️👩🏻|👩🏼❤️👩🏼|👩🏼❤️👩🏽|👩🏼❤️👩🏾|👩🏼❤️👩🏿|👩🏼🤝👨🏻|👩🏼🤝👨🏽|👩🏼🤝👨🏾|👩🏼🤝👨🏿|👩🏼🤝👩🏻|👩🏼🤝👩🏽|👩🏼🤝👩🏾|👩🏼🤝👩🏿|👩🏽❤️👨🏻|👩🏽❤️👨🏼|👩🏽❤️👨🏽|👩🏽❤️👨🏾|👩🏽❤️👨🏿|👩🏽❤️👩🏻|👩🏽❤️👩🏼|👩🏽❤️👩🏽|👩🏽❤️👩🏾|👩🏽❤️👩🏿|👩🏽🤝👨🏻|👩🏽🤝👨🏼|👩🏽🤝👨🏾|👩🏽🤝👨🏿|👩🏽🤝👩🏻|👩🏽🤝👩🏼|👩🏽🤝👩🏾|👩🏽🤝👩🏿|👩🏾❤️👨🏻|👩🏾❤️👨🏼|👩🏾❤️👨🏽|👩🏾❤️👨🏾|👩🏾❤️👨🏿|👩🏾❤️👩🏻|👩🏾❤️👩🏼|👩🏾❤️👩🏽|👩🏾❤️👩🏾|👩🏾❤️👩🏿|👩🏾🤝👨🏻|👩🏾🤝👨🏼|👩🏾🤝👨🏽|👩🏾🤝👨🏿|👩🏾🤝👩🏻|👩🏾🤝👩🏼|👩🏾🤝👩🏽|👩🏾🤝👩🏿|👩🏿❤️👨🏻|👩🏿❤️👨🏼|👩🏿❤️👨🏽|👩🏿❤️👨🏾|👩🏿❤️👨🏿|👩🏿❤️👩🏻|👩🏿❤️👩🏼|👩🏿❤️👩🏽|👩🏿❤️👩🏾|👩🏿❤️👩🏿|👩🏿🤝👨🏻|👩🏿🤝👨🏼|👩🏿🤝👨🏽|👩🏿🤝👨🏾|👩🏿🤝👩🏻|👩🏿🤝👩🏼|👩🏿🤝👩🏽|👩🏿🤝👩🏾|🧑🏻❤️🧑🏼|🧑🏻❤️🧑🏽|🧑🏻❤️🧑🏾|🧑🏻❤️🧑🏿|🧑🏻🤝🧑🏻|🧑🏻🤝🧑🏼|🧑🏻🤝🧑🏽|🧑🏻🤝🧑🏾|🧑🏻🤝🧑🏿|🧑🏼❤️🧑🏻|🧑🏼❤️🧑🏽|🧑🏼❤️🧑🏾|🧑🏼❤️🧑🏿|🧑🏼🤝🧑🏻|🧑🏼🤝🧑🏼|🧑🏼🤝🧑🏽|🧑🏼🤝🧑🏾|🧑🏼🤝🧑🏿|🧑🏽❤️🧑🏻|🧑🏽❤️🧑🏼|🧑🏽❤️🧑🏾|🧑🏽❤️🧑🏿|🧑🏽🤝🧑🏻|🧑🏽🤝🧑🏼|🧑🏽🤝🧑🏽|🧑🏽🤝🧑🏾|🧑🏽🤝🧑🏿|🧑🏾❤️🧑🏻|🧑🏾❤️🧑🏼|🧑🏾❤️🧑🏽|🧑🏾❤️🧑🏿|🧑🏾🤝🧑🏻|🧑🏾🤝🧑🏼|🧑🏾🤝🧑🏽|🧑🏾🤝🧑🏾|🧑🏾🤝🧑🏿|🧑🏿❤️🧑🏻|🧑🏿❤️🧑🏼|🧑🏿❤️🧑🏽|🧑🏿❤️🧑🏾|🧑🏿🤝🧑🏻|🧑🏿🤝🧑🏼|🧑🏿🤝🧑🏽|🧑🏿🤝🧑🏾|🧑🏿🤝🧑🏿|👨❤️💋👨|👨👨👦👦|👨👨👧👦|👨👨👧👧|👨👩👦👦|👨👩👧👦|👨👩👧👧|👩❤️💋👨|👩❤️💋👩|👩👩👦👦|👩👩👧👦|👩👩👧👧|🧑🧑🧒🧒|🏃🏻♀️➡️|🏃🏻♂️➡️|🏃🏼♀️➡️|🏃🏼♂️➡️|🏃🏽♀️➡️|🏃🏽♂️➡️|🏃🏾♀️➡️|🏃🏾♂️➡️|🏃🏿♀️➡️|🏃🏿♂️➡️|👨🏻🦯➡️|👨🏻🦼➡️|👨🏻🦽➡️|👨🏼🦯➡️|👨🏼🦼➡️|👨🏼🦽➡️|👨🏽🦯➡️|👨🏽🦼➡️|👨🏽🦽➡️|👨🏾🦯➡️|👨🏾🦼➡️|👨🏾🦽➡️|👨🏿🦯➡️|👨🏿🦼➡️|👨🏿🦽➡️|👩🏻🦯➡️|👩🏻🦼➡️|👩🏻🦽➡️|👩🏼🦯➡️|👩🏼🦼➡️|👩🏼🦽➡️|👩🏽🦯➡️|👩🏽🦼➡️|👩🏽🦽➡️|👩🏾🦯➡️|👩🏾🦼➡️|👩🏾🦽➡️|👩🏿🦯➡️|👩🏿🦼➡️|👩🏿🦽➡️|🚶🏻♀️➡️|🚶🏻♂️➡️|🚶🏼♀️➡️|🚶🏼♂️➡️|🚶🏽♀️➡️|🚶🏽♂️➡️|🚶🏾♀️➡️|🚶🏾♂️➡️|🚶🏿♀️➡️|🚶🏿♂️➡️|🧎🏻♀️➡️|🧎🏻♂️➡️|🧎🏼♀️➡️|🧎🏼♂️➡️|🧎🏽♀️➡️|🧎🏽♂️➡️|🧎🏾♀️➡️|🧎🏾♂️➡️|🧎🏿♀️➡️|🧎🏿♂️➡️|🧑🏻🦯➡️|🧑🏻🦼➡️|🧑🏻🦽➡️|🧑🏼🦯➡️|🧑🏼🦼➡️|🧑🏼🦽➡️|🧑🏽🦯➡️|🧑🏽🦼➡️|🧑🏽🦽➡️|🧑🏾🦯➡️|🧑🏾🦼➡️|🧑🏾🦽➡️|🧑🏿🦯➡️|🧑🏿🦼➡️|🧑🏿🦽➡️|🫱🏻🫲🏼|🫱🏻🫲🏽|🫱🏻🫲🏾|🫱🏻🫲🏿|🫱🏼🫲🏻|🫱🏼🫲🏽|🫱🏼🫲🏾|🫱🏼🫲🏿|🫱🏽🫲🏻|🫱🏽🫲🏼|🫱🏽🫲🏾|🫱🏽🫲🏿|🫱🏾🫲🏻|🫱🏾🫲🏼|🫱🏾🫲🏽|🫱🏾🫲🏿|🫱🏿🫲🏻|🫱🏿🫲🏼|🫱🏿🫲🏽|🫱🏿🫲🏾|🏃♀️➡️|🏃♂️➡️|👨❤️👨|👨👦👦|👨👧👦|👨👧👧|👨👨👦|👨👨👧|👨👩👦|👨👩👧|👨🦯➡️|👨🦼➡️|👨🦽➡️|👩❤️👨|👩❤️👩|👩👦👦|👩👧👦|👩👧👧|👩👩👦|👩👩👧|👩🦯➡️|👩🦼➡️|👩🦽➡️|🚶♀️➡️|🚶♂️➡️|🧎♀️➡️|🧎♂️➡️|🧑🤝🧑|🧑🦯➡️|🧑🦼➡️|🧑🦽➡️|🧑🧑🧒|🧑🧒🧒|🏃🏻♀️|🏃🏻♂️|🏃🏻➡️|🏃🏼♀️|🏃🏼♂️|🏃🏼➡️|🏃🏽♀️|🏃🏽♂️|🏃🏽➡️|🏃🏾♀️|🏃🏾♂️|🏃🏾➡️|🏃🏿♀️|🏃🏿♂️|🏃🏿➡️|🏄🏻♀️|🏄🏻♂️|🏄🏼♀️|🏄🏼♂️|🏄🏽♀️|🏄🏽♂️|🏄🏾♀️|🏄🏾♂️|🏄🏿♀️|🏄🏿♂️|🏊🏻♀️|🏊🏻♂️|🏊🏼♀️|🏊🏼♂️|🏊🏽♀️|🏊🏽♂️|🏊🏾♀️|🏊🏾♂️|🏊🏿♀️|🏊🏿♂️|🏋🏻♀️|🏋🏻♂️|🏋🏼♀️|🏋🏼♂️|🏋🏽♀️|🏋🏽♂️|🏋🏾♀️|🏋🏾♂️|🏋🏿♀️|🏋🏿♂️|🏌🏻♀️|🏌🏻♂️|🏌🏼♀️|🏌🏼♂️|🏌🏽♀️|🏌🏽♂️|🏌🏾♀️|🏌🏾♂️|🏌🏿♀️|🏌🏿♂️|👁️🗨️|👨🏻⚕️|👨🏻⚖️|👨🏻✈️|👨🏻🌾|👨🏻🍳|👨🏻🍼|👨🏻🎓|👨🏻🎤|👨🏻🎨|👨🏻🏫|👨🏻🏭|👨🏻💻|👨🏻💼|👨🏻🔧|👨🏻🔬|👨🏻🚀|👨🏻🚒|👨🏻🦯|👨🏻🦰|👨🏻🦱|👨🏻🦲|👨🏻🦳|👨🏻🦼|👨🏻🦽|👨🏼⚕️|👨🏼⚖️|👨🏼✈️|👨🏼🌾|👨🏼🍳|👨🏼🍼|👨🏼🎓|👨🏼🎤|👨🏼🎨|👨🏼🏫|👨🏼🏭|👨🏼💻|👨🏼💼|👨🏼🔧|👨🏼🔬|👨🏼🚀|👨🏼🚒|👨🏼🦯|👨🏼🦰|👨🏼🦱|👨🏼🦲|👨🏼🦳|👨🏼🦼|👨🏼🦽|👨🏽⚕️|👨🏽⚖️|👨🏽✈️|👨🏽🌾|👨🏽🍳|👨🏽🍼|👨🏽🎓|👨🏽🎤|👨🏽🎨|👨🏽🏫|👨🏽🏭|👨🏽💻|👨🏽💼|👨🏽🔧|👨🏽🔬|👨🏽🚀|👨🏽🚒|👨🏽🦯|👨🏽🦰|👨🏽🦱|👨🏽🦲|👨🏽🦳|👨🏽🦼|👨🏽🦽|👨🏾⚕️|👨🏾⚖️|👨🏾✈️|👨🏾🌾|👨🏾🍳|👨🏾🍼|👨🏾🎓|👨🏾🎤|👨🏾🎨|👨🏾🏫|👨🏾🏭|👨🏾💻|👨🏾💼|👨🏾🔧|👨🏾🔬|👨🏾🚀|👨🏾🚒|👨🏾🦯|👨🏾🦰|👨🏾🦱|👨🏾🦲|👨🏾🦳|👨🏾🦼|👨🏾🦽|👨🏿⚕️|👨🏿⚖️|👨🏿✈️|👨🏿🌾|👨🏿🍳|👨🏿🍼|👨🏿🎓|👨🏿🎤|👨🏿🎨|👨🏿🏫|👨🏿🏭|👨🏿💻|👨🏿💼|👨🏿🔧|👨🏿🔬|👨🏿🚀|👨🏿🚒|👨🏿🦯|👨🏿🦰|👨🏿🦱|👨🏿🦲|👨🏿🦳|👨🏿🦼|👨🏿🦽|👩🏻⚕️|👩🏻⚖️|👩🏻✈️|👩🏻🌾|👩🏻🍳|👩🏻🍼|👩🏻🎓|👩🏻🎤|👩🏻🎨|👩🏻🏫|👩🏻🏭|👩🏻💻|👩🏻💼|👩🏻🔧|👩🏻🔬|👩🏻🚀|👩🏻🚒|👩🏻🦯|👩🏻🦰|👩🏻🦱|👩🏻🦲|👩🏻🦳|👩🏻🦼|👩🏻🦽|👩🏼⚕️|👩🏼⚖️|👩🏼✈️|👩🏼🌾|👩🏼🍳|👩🏼🍼|👩🏼🎓|👩🏼🎤|👩🏼🎨|👩🏼🏫|👩🏼🏭|👩🏼💻|👩🏼💼|👩🏼🔧|👩🏼🔬|👩🏼🚀|👩🏼🚒|👩🏼🦯|👩🏼🦰|👩🏼🦱|👩🏼🦲|👩🏼🦳|👩🏼🦼|👩🏼🦽|👩🏽⚕️|👩🏽⚖️|👩🏽✈️|👩🏽🌾|👩🏽🍳|👩🏽🍼|👩🏽🎓|👩🏽🎤|👩🏽🎨|👩🏽🏫|👩🏽🏭|👩🏽💻|👩🏽💼|👩🏽🔧|👩🏽🔬|👩🏽🚀|👩🏽🚒|👩🏽🦯|👩🏽🦰|👩🏽🦱|👩🏽🦲|👩🏽🦳|👩🏽🦼|👩🏽🦽|👩🏾⚕️|👩🏾⚖️|👩🏾✈️|👩🏾🌾|👩🏾🍳|👩🏾🍼|👩🏾🎓|👩🏾🎤|👩🏾🎨|👩🏾🏫|👩🏾🏭|👩🏾💻|👩🏾💼|👩🏾🔧|👩🏾🔬|👩🏾🚀|👩🏾🚒|👩🏾🦯|👩🏾🦰|👩🏾🦱|👩🏾🦲|👩🏾🦳|👩🏾🦼|👩🏾🦽|👩🏿⚕️|👩🏿⚖️|👩🏿✈️|👩🏿🌾|👩🏿🍳|👩🏿🍼|👩🏿🎓|👩🏿🎤|👩🏿🎨|👩🏿🏫|👩🏿🏭|👩🏿💻|👩🏿💼|👩🏿🔧|👩🏿🔬|👩🏿🚀|👩🏿🚒|👩🏿🦯|👩🏿🦰|👩🏿🦱|👩🏿🦲|👩🏿🦳|👩🏿🦼|👩🏿🦽|👮🏻♀️|👮🏻♂️|👮🏼♀️|👮🏼♂️|👮🏽♀️|👮🏽♂️|👮🏾♀️|👮🏾♂️|👮🏿♀️|👮🏿♂️|👰🏻♀️|👰🏻♂️|👰🏼♀️|👰🏼♂️|👰🏽♀️|👰🏽♂️|👰🏾♀️|👰🏾♂️|👰🏿♀️|👰🏿♂️|👱🏻♀️|👱🏻♂️|👱🏼♀️|👱🏼♂️|👱🏽♀️|👱🏽♂️|👱🏾♀️|👱🏾♂️|👱🏿♀️|👱🏿♂️|👳🏻♀️|👳🏻♂️|👳🏼♀️|👳🏼♂️|👳🏽♀️|👳🏽♂️|👳🏾♀️|👳🏾♂️|👳🏿♀️|👳🏿♂️|👷🏻♀️|👷🏻♂️|👷🏼♀️|👷🏼♂️|👷🏽♀️|👷🏽♂️|👷🏾♀️|👷🏾♂️|👷🏿♀️|👷🏿♂️|💁🏻♀️|💁🏻♂️|💁🏼♀️|💁🏼♂️|💁🏽♀️|💁🏽♂️|💁🏾♀️|💁🏾♂️|💁🏿♀️|💁🏿♂️|💂🏻♀️|💂🏻♂️|💂🏼♀️|💂🏼♂️|💂🏽♀️|💂🏽♂️|💂🏾♀️|💂🏾♂️|💂🏿♀️|💂🏿♂️|💆🏻♀️|💆🏻♂️|💆🏼♀️|💆🏼♂️|💆🏽♀️|💆🏽♂️|💆🏾♀️|💆🏾♂️|💆🏿♀️|💆🏿♂️|💇🏻♀️|💇🏻♂️|💇🏼♀️|💇🏼♂️|💇🏽♀️|💇🏽♂️|💇🏾♀️|💇🏾♂️|💇🏿♀️|💇🏿♂️|🕵🏻♀️|🕵🏻♂️|🕵🏼♀️|🕵🏼♂️|🕵🏽♀️|🕵🏽♂️|🕵🏾♀️|🕵🏾♂️|🕵🏿♀️|🕵🏿♂️|🙅🏻♀️|🙅🏻♂️|🙅🏼♀️|🙅🏼♂️|🙅🏽♀️|🙅🏽♂️|🙅🏾♀️|🙅🏾♂️|🙅🏿♀️|🙅🏿♂️|🙆🏻♀️|🙆🏻♂️|🙆🏼♀️|🙆🏼♂️|🙆🏽♀️|🙆🏽♂️|🙆🏾♀️|🙆🏾♂️|🙆🏿♀️|🙆🏿♂️|🙇🏻♀️|🙇🏻♂️|🙇🏼♀️|🙇🏼♂️|🙇🏽♀️|🙇🏽♂️|🙇🏾♀️|🙇🏾♂️|🙇🏿♀️|🙇🏿♂️|🙋🏻♀️|🙋🏻♂️|🙋🏼♀️|🙋🏼♂️|🙋🏽♀️|🙋🏽♂️|🙋🏾♀️|🙋🏾♂️|🙋🏿♀️|🙋🏿♂️|🙍🏻♀️|🙍🏻♂️|🙍🏼♀️|🙍🏼♂️|🙍🏽♀️|🙍🏽♂️|🙍🏾♀️|🙍🏾♂️|🙍🏿♀️|🙍🏿♂️|🙎🏻♀️|🙎🏻♂️|🙎🏼♀️|🙎🏼♂️|🙎🏽♀️|🙎🏽♂️|🙎🏾♀️|🙎🏾♂️|🙎🏿♀️|🙎🏿♂️|🚣🏻♀️|🚣🏻♂️|🚣🏼♀️|🚣🏼♂️|🚣🏽♀️|🚣🏽♂️|🚣🏾♀️|🚣🏾♂️|🚣🏿♀️|🚣🏿♂️|🚴🏻♀️|🚴🏻♂️|🚴🏼♀️|🚴🏼♂️|🚴🏽♀️|🚴🏽♂️|🚴🏾♀️|🚴🏾♂️|🚴🏿♀️|🚴🏿♂️|🚵🏻♀️|🚵🏻♂️|🚵🏼♀️|🚵🏼♂️|🚵🏽♀️|🚵🏽♂️|🚵🏾♀️|🚵🏾♂️|🚵🏿♀️|🚵🏿♂️|🚶🏻♀️|🚶🏻♂️|🚶🏻➡️|🚶🏼♀️|🚶🏼♂️|🚶🏼➡️|🚶🏽♀️|🚶🏽♂️|🚶🏽➡️|🚶🏾♀️|🚶🏾♂️|🚶🏾➡️|🚶🏿♀️|🚶🏿♂️|🚶🏿➡️|🤦🏻♀️|🤦🏻♂️|🤦🏼♀️|🤦🏼♂️|🤦🏽♀️|🤦🏽♂️|🤦🏾♀️|🤦🏾♂️|🤦🏿♀️|🤦🏿♂️|🤵🏻♀️|🤵🏻♂️|🤵🏼♀️|🤵🏼♂️|🤵🏽♀️|🤵🏽♂️|🤵🏾♀️|🤵🏾♂️|🤵🏿♀️|🤵🏿♂️|🤷🏻♀️|🤷🏻♂️|🤷🏼♀️|🤷🏼♂️|🤷🏽♀️|🤷🏽♂️|🤷🏾♀️|🤷🏾♂️|🤷🏿♀️|🤷🏿♂️|🤸🏻♀️|🤸🏻♂️|🤸🏼♀️|🤸🏼♂️|🤸🏽♀️|🤸🏽♂️|🤸🏾♀️|🤸🏾♂️|🤸🏿♀️|🤸🏿♂️|🤹🏻♀️|🤹🏻♂️|🤹🏼♀️|🤹🏼♂️|🤹🏽♀️|🤹🏽♂️|🤹🏾♀️|🤹🏾♂️|🤹🏿♀️|🤹🏿♂️|🤽🏻♀️|🤽🏻♂️|🤽🏼♀️|🤽🏼♂️|🤽🏽♀️|🤽🏽♂️|🤽🏾♀️|🤽🏾♂️|🤽🏿♀️|🤽🏿♂️|🤾🏻♀️|🤾🏻♂️|🤾🏼♀️|🤾🏼♂️|🤾🏽♀️|🤾🏽♂️|🤾🏾♀️|🤾🏾♂️|🤾🏿♀️|🤾🏿♂️|🦸🏻♀️|🦸🏻♂️|🦸🏼♀️|🦸🏼♂️|🦸🏽♀️|🦸🏽♂️|🦸🏾♀️|🦸🏾♂️|🦸🏿♀️|🦸🏿♂️|🦹🏻♀️|🦹🏻♂️|🦹🏼♀️|🦹🏼♂️|🦹🏽♀️|🦹🏽♂️|🦹🏾♀️|🦹🏾♂️|🦹🏿♀️|🦹🏿♂️|🧍🏻♀️|🧍🏻♂️|🧍🏼♀️|🧍🏼♂️|🧍🏽♀️|🧍🏽♂️|🧍🏾♀️|🧍🏾♂️|🧍🏿♀️|🧍🏿♂️|🧎🏻♀️|🧎🏻♂️|🧎🏻➡️|🧎🏼♀️|🧎🏼♂️|🧎🏼➡️|🧎🏽♀️|🧎🏽♂️|🧎🏽➡️|🧎🏾♀️|🧎🏾♂️|🧎🏾➡️|🧎🏿♀️|🧎🏿♂️|🧎🏿➡️|🧏🏻♀️|🧏🏻♂️|🧏🏼♀️|🧏🏼♂️|🧏🏽♀️|🧏🏽♂️|🧏🏾♀️|🧏🏾♂️|🧏🏿♀️|🧏🏿♂️|🧑🏻⚕️|🧑🏻⚖️|🧑🏻✈️|🧑🏻🌾|🧑🏻🍳|🧑🏻🍼|🧑🏻🎄|🧑🏻🎓|🧑🏻🎤|🧑🏻🎨|🧑🏻🏫|🧑🏻🏭|🧑🏻💻|🧑🏻💼|🧑🏻🔧|🧑🏻🔬|🧑🏻🚀|🧑🏻🚒|🧑🏻🦯|🧑🏻🦰|🧑🏻🦱|🧑🏻🦲|🧑🏻🦳|🧑🏻🦼|🧑🏻🦽|🧑🏼⚕️|🧑🏼⚖️|🧑🏼✈️|🧑🏼🌾|🧑🏼🍳|🧑🏼🍼|🧑🏼🎄|🧑🏼🎓|🧑🏼🎤|🧑🏼🎨|🧑🏼🏫|🧑🏼🏭|🧑🏼💻|🧑🏼💼|🧑🏼🔧|🧑🏼🔬|🧑🏼🚀|🧑🏼🚒|🧑🏼🦯|🧑🏼🦰|🧑🏼🦱|🧑🏼🦲|🧑🏼🦳|🧑🏼🦼|🧑🏼🦽|🧑🏽⚕️|🧑🏽⚖️|🧑🏽✈️|🧑🏽🌾|🧑🏽🍳|🧑🏽🍼|🧑🏽🎄|🧑🏽🎓|🧑🏽🎤|🧑🏽🎨|🧑🏽🏫|🧑🏽🏭|🧑🏽💻|🧑🏽💼|🧑🏽🔧|🧑🏽🔬|🧑🏽🚀|🧑🏽🚒|🧑🏽🦯|🧑🏽🦰|🧑🏽🦱|🧑🏽🦲|🧑🏽🦳|🧑🏽🦼|🧑🏽🦽|🧑🏾⚕️|🧑🏾⚖️|🧑🏾✈️|🧑🏾🌾|🧑🏾🍳|🧑🏾🍼|🧑🏾🎄|🧑🏾🎓|🧑🏾🎤|🧑🏾🎨|🧑🏾🏫|🧑🏾🏭|🧑🏾💻|🧑🏾💼|🧑🏾🔧|🧑🏾🔬|🧑🏾🚀|🧑🏾🚒|🧑🏾🦯|🧑🏾🦰|🧑🏾🦱|🧑🏾🦲|🧑🏾🦳|🧑🏾🦼|🧑🏾🦽|🧑🏿⚕️|🧑🏿⚖️|🧑🏿✈️|🧑🏿🌾|🧑🏿🍳|🧑🏿🍼|🧑🏿🎄|🧑🏿🎓|🧑🏿🎤|🧑🏿🎨|🧑🏿🏫|🧑🏿🏭|🧑🏿💻|🧑🏿💼|🧑🏿🔧|🧑🏿🔬|🧑🏿🚀|🧑🏿🚒|🧑🏿🦯|🧑🏿🦰|🧑🏿🦱|🧑🏿🦲|🧑🏿🦳|🧑🏿🦼|🧑🏿🦽|🧔🏻♀️|🧔🏻♂️|🧔🏼♀️|🧔🏼♂️|🧔🏽♀️|🧔🏽♂️|🧔🏾♀️|🧔🏾♂️|🧔🏿♀️|🧔🏿♂️|🧖🏻♀️|🧖🏻♂️|🧖🏼♀️|🧖🏼♂️|🧖🏽♀️|🧖🏽♂️|🧖🏾♀️|🧖🏾♂️|🧖🏿♀️|🧖🏿♂️|🧗🏻♀️|🧗🏻♂️|🧗🏼♀️|🧗🏼♂️|🧗🏽♀️|🧗🏽♂️|🧗🏾♀️|🧗🏾♂️|🧗🏿♀️|🧗🏿♂️|🧘🏻♀️|🧘🏻♂️|🧘🏼♀️|🧘🏼♂️|🧘🏽♀️|🧘🏽♂️|🧘🏾♀️|🧘🏾♂️|🧘🏿♀️|🧘🏿♂️|🧙🏻♀️|🧙🏻♂️|🧙🏼♀️|🧙🏼♂️|🧙🏽♀️|🧙🏽♂️|🧙🏾♀️|🧙🏾♂️|🧙🏿♀️|🧙🏿♂️|🧚🏻♀️|🧚🏻♂️|🧚🏼♀️|🧚🏼♂️|🧚🏽♀️|🧚🏽♂️|🧚🏾♀️|🧚🏾♂️|🧚🏿♀️|🧚🏿♂️|🧛🏻♀️|🧛🏻♂️|🧛🏼♀️|🧛🏼♂️|🧛🏽♀️|🧛🏽♂️|🧛🏾♀️|🧛🏾♂️|🧛🏿♀️|🧛🏿♂️|🧜🏻♀️|🧜🏻♂️|🧜🏼♀️|🧜🏼♂️|🧜🏽♀️|🧜🏽♂️|🧜🏾♀️|🧜🏾♂️|🧜🏿♀️|🧜🏿♂️|🧝🏻♀️|🧝🏻♂️|🧝🏼♀️|🧝🏼♂️|🧝🏽♀️|🧝🏽♂️|🧝🏾♀️|🧝🏾♂️|🧝🏿♀️|🧝🏿♂️|⛹🏻♀️|⛹🏻♂️|⛹🏼♀️|⛹🏼♂️|⛹🏽♀️|⛹🏽♂️|⛹🏾♀️|⛹🏾♂️|⛹🏿♀️|⛹🏿♂️|🏋️♀️|🏋️♂️|🏌️♀️|🏌️♂️|🏳️⚧️|🏳️🌈|🕵️♀️|🕵️♂️|😶🌫️|⛓️💥|⛹️♀️|⛹️♂️|❤️🔥|❤️🩹|🍄🟫|🍋🟩|🏃♀️|🏃♂️|🏃➡️|🏄♀️|🏄♂️|🏊♀️|🏊♂️|🏴☠️|🐕🦺|🐦🔥|🐻❄️|👨⚕️|👨⚖️|👨✈️|👨🌾|👨🍳|👨🍼|👨🎓|👨🎤|👨🎨|👨🏫|👨🏭|👨👦|👨👧|👨💻|👨💼|👨🔧|👨🔬|👨🚀|👨🚒|👨🦯|👨🦰|👨🦱|👨🦲|👨🦳|👨🦼|👨🦽|👩⚕️|👩⚖️|👩✈️|👩🌾|👩🍳|👩🍼|👩🎓|👩🎤|👩🎨|👩🏫|👩🏭|👩👦|👩👧|👩💻|👩💼|👩🔧|👩🔬|👩🚀|👩🚒|👩🦯|👩🦰|👩🦱|👩🦲|👩🦳|👩🦼|👩🦽|👮♀️|👮♂️|👯♀️|👯♂️|👰♀️|👰♂️|👱♀️|👱♂️|👳♀️|👳♂️|👷♀️|👷♂️|💁♀️|💁♂️|💂♀️|💂♂️|💆♀️|💆♂️|💇♀️|💇♂️|😮💨|😵💫|🙂↔️|🙂↕️|🙅♀️|🙅♂️|🙆♀️|🙆♂️|🙇♀️|🙇♂️|🙋♀️|🙋♂️|🙍♀️|🙍♂️|🙎♀️|🙎♂️|🚣♀️|🚣♂️|🚴♀️|🚴♂️|🚵♀️|🚵♂️|🚶♀️|🚶♂️|🚶➡️|🤦♀️|🤦♂️|🤵♀️|🤵♂️|🤷♀️|🤷♂️|🤸♀️|🤸♂️|🤹♀️|🤹♂️|🤼♀️|🤼♂️|🤽♀️|🤽♂️|🤾♀️|🤾♂️|🦸♀️|🦸♂️|🦹♀️|🦹♂️|🧍♀️|🧍♂️|🧎♀️|🧎♂️|🧎➡️|🧏♀️|🧏♂️|🧑⚕️|🧑⚖️|🧑✈️|🧑🌾|🧑🍳|🧑🍼|🧑🎄|🧑🎓|🧑🎤|🧑🎨|🧑🏫|🧑🏭|🧑💻|🧑💼|🧑🔧|🧑🔬|🧑🚀|🧑🚒|🧑🦯|🧑🦰|🧑🦱|🧑🦲|🧑🦳|🧑🦼|🧑🦽|🧑🧒|🧔♀️|🧔♂️|🧖♀️|🧖♂️|🧗♀️|🧗♂️|🧘♀️|🧘♂️|🧙♀️|🧙♂️|🧚♀️|🧚♂️|🧛♀️|🧛♂️|🧜♀️|🧜♂️|🧝♀️|🧝♂️|🧞♀️|🧞♂️|🧟♀️|🧟♂️|\\*️⃣|🇦🇨|🇦🇩|🇦🇪|🇦🇫|🇦🇬|🇦🇮|🇦🇱|🇦🇲|🇦🇴|🇦🇶|🇦🇷|🇦🇸|🇦🇹|🇦🇺|🇦🇼|🇦🇽|🇦🇿|🇧🇦|🇧🇧|🇧🇩|🇧🇪|🇧🇫|🇧🇬|🇧🇭|🇧🇮|🇧🇯|🇧🇱|🇧🇲|🇧🇳|🇧🇴|🇧🇶|🇧🇷|🇧🇸|🇧🇹|🇧🇻|🇧🇼|🇧🇾|🇧🇿|🇨🇦|🇨🇨|🇨🇩|🇨🇫|🇨🇬|🇨🇭|🇨🇮|🇨🇰|🇨🇱|🇨🇲|🇨🇳|🇨🇴|🇨🇵|🇨🇶|🇨🇷|🇨🇺|🇨🇻|🇨🇼|🇨🇽|🇨🇾|🇨🇿|🇩🇪|🇩🇬|🇩🇯|🇩🇰|🇩🇲|🇩🇴|🇩🇿|🇪🇦|🇪🇨|🇪🇪|🇪🇬|🇪🇭|🇪🇷|🇪🇸|🇪🇹|🇪🇺|🇫🇮|🇫🇯|🇫🇰|🇫🇲|🇫🇴|🇫🇷|🇬🇦|🇬🇧|🇬🇩|🇬🇪|🇬🇫|🇬🇬|🇬🇭|🇬🇮|🇬🇱|🇬🇲|🇬🇳|🇬🇵|🇬🇶|🇬🇷|🇬🇸|🇬🇹|🇬🇺|🇬🇼|🇬🇾|🇭🇰|🇭🇲|🇭🇳|🇭🇷|🇭🇹|🇭🇺|🇮🇨|🇮🇩|🇮🇪|🇮🇱|🇮🇲|🇮🇳|🇮🇴|🇮🇶|🇮🇷|🇮🇸|🇮🇹|🇯🇪|🇯🇲|🇯🇴|🇯🇵|🇰🇪|🇰🇬|🇰🇭|🇰🇮|🇰🇲|🇰🇳|🇰🇵|🇰🇷|🇰🇼|🇰🇾|🇰🇿|🇱🇦|🇱🇧|🇱🇨|🇱🇮|🇱🇰|🇱🇷|🇱🇸|🇱🇹|🇱🇺|🇱🇻|🇱🇾|🇲🇦|🇲🇨|🇲🇩|🇲🇪|🇲🇫|🇲🇬|🇲🇭|🇲🇰|🇲🇱|🇲🇲|🇲🇳|🇲🇴|🇲🇵|🇲🇶|🇲🇷|🇲🇸|🇲🇹|🇲🇺|🇲🇻|🇲🇼|🇲🇽|🇲🇾|🇲🇿|🇳🇦|🇳🇨|🇳🇪|🇳🇫|🇳🇬|🇳🇮|🇳🇱|🇳🇴|🇳🇵|🇳🇷|🇳🇺|🇳🇿|🇴🇲|🇵🇦|🇵🇪|🇵🇫|🇵🇬|🇵🇭|🇵🇰|🇵🇱|🇵🇲|🇵🇳|🇵🇷|🇵🇸|🇵🇹|🇵🇼|🇵🇾|🇶🇦|🇷🇪|🇷🇴|🇷🇸|🇷🇺|🇷🇼|🇸🇦|🇸🇧|🇸🇨|🇸🇩|🇸🇪|🇸🇬|🇸🇭|🇸🇮|🇸🇯|🇸🇰|🇸🇱|🇸🇲|🇸🇳|🇸🇴|🇸🇷|🇸🇸|🇸🇹|🇸🇻|🇸🇽|🇸🇾|🇸🇿|🇹🇦|🇹🇨|🇹🇩|🇹🇫|🇹🇬|🇹🇭|🇹🇯|🇹🇰|🇹🇱|🇹🇲|🇹🇳|🇹🇴|🇹🇷|🇹🇹|🇹🇻|🇹🇼|🇹🇿|🇺🇦|🇺🇬|🇺🇲|🇺🇳|🇺🇸|🇺🇾|🇺🇿|🇻🇦|🇻🇨|🇻🇪|🇻🇬|🇻🇮|🇻🇳|🇻🇺|🇼🇫|🇼🇸|🇽🇰|🇾🇪|🇾🇹|🇿🇦|🇿🇲|🇿🇼|🎅🏻|🎅🏼|🎅🏽|🎅🏾|🎅🏿|🏂🏻|🏂🏼|🏂🏽|🏂🏾|🏂🏿|🏃🏻|🏃🏼|🏃🏽|🏃🏾|🏃🏿|🏄🏻|🏄🏼|🏄🏽|🏄🏾|🏄🏿|🏇🏻|🏇🏼|🏇🏽|🏇🏾|🏇🏿|🏊🏻|🏊🏼|🏊🏽|🏊🏾|🏊🏿|🏋🏻|🏋🏼|🏋🏽|🏋🏾|🏋🏿|🏌🏻|🏌🏼|🏌🏽|🏌🏾|🏌🏿|🐈⬛|🐦⬛|👂🏻|👂🏼|👂🏽|👂🏾|👂🏿|👃🏻|👃🏼|👃🏽|👃🏾|👃🏿|👆🏻|👆🏼|👆🏽|👆🏾|👆🏿|👇🏻|👇🏼|👇🏽|👇🏾|👇🏿|👈🏻|👈🏼|👈🏽|👈🏾|👈🏿|👉🏻|👉🏼|👉🏽|👉🏾|👉🏿|👊🏻|👊🏼|👊🏽|👊🏾|👊🏿|👋🏻|👋🏼|👋🏽|👋🏾|👋🏿|👌🏻|👌🏼|👌🏽|👌🏾|👌🏿|👍🏻|👍🏼|👍🏽|👍🏾|👍🏿|👎🏻|👎🏼|👎🏽|👎🏾|👎🏿|👏🏻|👏🏼|👏🏽|👏🏾|👏🏿|👐🏻|👐🏼|👐🏽|👐🏾|👐🏿|👦🏻|👦🏼|👦🏽|👦🏾|👦🏿|👧🏻|👧🏼|👧🏽|👧🏾|👧🏿|👨🏻|👨🏼|👨🏽|👨🏾|👨🏿|👩🏻|👩🏼|👩🏽|👩🏾|👩🏿|👫🏻|👫🏼|👫🏽|👫🏾|👫🏿|👬🏻|👬🏼|👬🏽|👬🏾|👬🏿|👭🏻|👭🏼|👭🏽|👭🏾|👭🏿|👮🏻|👮🏼|👮🏽|👮🏾|👮🏿|👰🏻|👰🏼|👰🏽|👰🏾|👰🏿|👱🏻|👱🏼|👱🏽|👱🏾|👱🏿|👲🏻|👲🏼|👲🏽|👲🏾|👲🏿|👳🏻|👳🏼|👳🏽|👳🏾|👳🏿|👴🏻|👴🏼|👴🏽|👴🏾|👴🏿|👵🏻|👵🏼|👵🏽|👵🏾|👵🏿|👶🏻|👶🏼|👶🏽|👶🏾|👶🏿|👷🏻|👷🏼|👷🏽|👷🏾|👷🏿|👸🏻|👸🏼|👸🏽|👸🏾|👸🏿|👼🏻|👼🏼|👼🏽|👼🏾|👼🏿|💁🏻|💁🏼|💁🏽|💁🏾|💁🏿|💂🏻|💂🏼|💂🏽|💂🏾|💂🏿|💃🏻|💃🏼|💃🏽|💃🏾|💃🏿|💅🏻|💅🏼|💅🏽|💅🏾|💅🏿|💆🏻|💆🏼|💆🏽|💆🏾|💆🏿|💇🏻|💇🏼|💇🏽|💇🏾|💇🏿|💏🏻|💏🏼|💏🏽|💏🏾|💏🏿|💑🏻|💑🏼|💑🏽|💑🏾|💑🏿|💪🏻|💪🏼|💪🏽|💪🏾|💪🏿|🕴🏻|🕴🏼|🕴🏽|🕴🏾|🕴🏿|🕵🏻|🕵🏼|🕵🏽|🕵🏾|🕵🏿|🕺🏻|🕺🏼|🕺🏽|🕺🏾|🕺🏿|🖐🏻|🖐🏼|🖐🏽|🖐🏾|🖐🏿|🖕🏻|🖕🏼|🖕🏽|🖕🏾|🖕🏿|🖖🏻|🖖🏼|🖖🏽|🖖🏾|🖖🏿|🙅🏻|🙅🏼|🙅🏽|🙅🏾|🙅🏿|🙆🏻|🙆🏼|🙆🏽|🙆🏾|🙆🏿|🙇🏻|🙇🏼|🙇🏽|🙇🏾|🙇🏿|🙋🏻|🙋🏼|🙋🏽|🙋🏾|🙋🏿|🙌🏻|🙌🏼|🙌🏽|🙌🏾|🙌🏿|🙍🏻|🙍🏼|🙍🏽|🙍🏾|🙍🏿|🙎🏻|🙎🏼|🙎🏽|🙎🏾|🙎🏿|🙏🏻|🙏🏼|🙏🏽|🙏🏾|🙏🏿|🚣🏻|🚣🏼|🚣🏽|🚣🏾|🚣🏿|🚴🏻|🚴🏼|🚴🏽|🚴🏾|🚴🏿|🚵🏻|🚵🏼|🚵🏽|🚵🏾|🚵🏿|🚶🏻|🚶🏼|🚶🏽|🚶🏾|🚶🏿|🛀🏻|🛀🏼|🛀🏽|🛀🏾|🛀🏿|🛌🏻|🛌🏼|🛌🏽|🛌🏾|🛌🏿|🤌🏻|🤌🏼|🤌🏽|🤌🏾|🤌🏿|🤏🏻|🤏🏼|🤏🏽|🤏🏾|🤏🏿|🤘🏻|🤘🏼|🤘🏽|🤘🏾|🤘🏿|🤙🏻|🤙🏼|🤙🏽|🤙🏾|🤙🏿|🤚🏻|🤚🏼|🤚🏽|🤚🏾|🤚🏿|🤛🏻|🤛🏼|🤛🏽|🤛🏾|🤛🏿|🤜🏻|🤜🏼|🤜🏽|🤜🏾|🤜🏿|🤝🏻|🤝🏼|🤝🏽|🤝🏾|🤝🏿|🤞🏻|🤞🏼|🤞🏽|🤞🏾|🤞🏿|🤟🏻|🤟🏼|🤟🏽|🤟🏾|🤟🏿|🤦🏻|🤦🏼|🤦🏽|🤦🏾|🤦🏿|🤰🏻|🤰🏼|🤰🏽|🤰🏾|🤰🏿|🤱🏻|🤱🏼|🤱🏽|🤱🏾|🤱🏿|🤲🏻|🤲🏼|🤲🏽|🤲🏾|🤲🏿|🤳🏻|🤳🏼|🤳🏽|🤳🏾|🤳🏿|🤴🏻|🤴🏼|🤴🏽|🤴🏾|🤴🏿|🤵🏻|🤵🏼|🤵🏽|🤵🏾|🤵🏿|🤶🏻|🤶🏼|🤶🏽|🤶🏾|🤶🏿|🤷🏻|🤷🏼|🤷🏽|🤷🏾|🤷🏿|🤸🏻|🤸🏼|🤸🏽|🤸🏾|🤸🏿|🤹🏻|🤹🏼|🤹🏽|🤹🏾|🤹🏿|🤽🏻|🤽🏼|🤽🏽|🤽🏾|🤽🏿|🤾🏻|🤾🏼|🤾🏽|🤾🏾|🤾🏿|🥷🏻|🥷🏼|🥷🏽|🥷🏾|🥷🏿|🦵🏻|🦵🏼|🦵🏽|🦵🏾|🦵🏿|🦶🏻|🦶🏼|🦶🏽|🦶🏾|🦶🏿|🦸🏻|🦸🏼|🦸🏽|🦸🏾|🦸🏿|🦹🏻|🦹🏼|🦹🏽|🦹🏾|🦹🏿|🦻🏻|🦻🏼|🦻🏽|🦻🏾|🦻🏿|🧍🏻|🧍🏼|🧍🏽|🧍🏾|🧍🏿|🧎🏻|🧎🏼|🧎🏽|🧎🏾|🧎🏿|🧏🏻|🧏🏼|🧏🏽|🧏🏾|🧏🏿|🧑🏻|🧑🏼|🧑🏽|🧑🏾|🧑🏿|🧒🏻|🧒🏼|🧒🏽|🧒🏾|🧒🏿|🧓🏻|🧓🏼|🧓🏽|🧓🏾|🧓🏿|🧔🏻|🧔🏼|🧔🏽|🧔🏾|🧔🏿|🧕🏻|🧕🏼|🧕🏽|🧕🏾|🧕🏿|🧖🏻|🧖🏼|🧖🏽|🧖🏾|🧖🏿|🧗🏻|🧗🏼|🧗🏽|🧗🏾|🧗🏿|🧘🏻|🧘🏼|🧘🏽|🧘🏾|🧘🏿|🧙🏻|🧙🏼|🧙🏽|🧙🏾|🧙🏿|🧚🏻|🧚🏼|🧚🏽|🧚🏾|🧚🏿|🧛🏻|🧛🏼|🧛🏽|🧛🏾|🧛🏿|🧜🏻|🧜🏼|🧜🏽|🧜🏾|🧜🏿|🧝🏻|🧝🏼|🧝🏽|🧝🏾|🧝🏿|🫃🏻|🫃🏼|🫃🏽|🫃🏾|🫃🏿|🫄🏻|🫄🏼|🫄🏽|🫄🏾|🫄🏿|🫅🏻|🫅🏼|🫅🏽|🫅🏾|🫅🏿|🫰🏻|🫰🏼|🫰🏽|🫰🏾|🫰🏿|🫱🏻|🫱🏼|🫱🏽|🫱🏾|🫱🏿|🫲🏻|🫲🏼|🫲🏽|🫲🏾|🫲🏿|🫳🏻|🫳🏼|🫳🏽|🫳🏾|🫳🏿|🫴🏻|🫴🏼|🫴🏽|🫴🏾|🫴🏿|🫵🏻|🫵🏼|🫵🏽|🫵🏾|🫵🏿|🫶🏻|🫶🏼|🫶🏽|🫶🏾|🫶🏿|🫷🏻|🫷🏼|🫷🏽|🫷🏾|🫷🏿|🫸🏻|🫸🏼|🫸🏽|🫸🏾|🫸🏿|#️⃣|0️⃣|1️⃣|2️⃣|3️⃣|4️⃣|5️⃣|6️⃣|7️⃣|8️⃣|9️⃣|☝🏻|☝🏼|☝🏽|☝🏾|☝🏿|⛹🏻|⛹🏼|⛹🏽|⛹🏾|⛹🏿|✊🏻|✊🏼|✊🏽|✊🏾|✊🏿|✋🏻|✋🏼|✋🏽|✋🏾|✋🏿|✌🏻|✌🏼|✌🏽|✌🏾|✌🏿|✍🏻|✍🏼|✍🏽|✍🏾|✍🏿|🅰️|🅱️|🅾️|🅿️|🈂️|🈷️|🌡️|🌤️|🌥️|🌦️|🌧️|🌨️|🌩️|🌪️|🌫️|🌬️|🌶️|🍽️|🎖️|🎗️|🎙️|🎚️|🎛️|🎞️|🎟️|🏋️|🏌️|🏍️|🏎️|🏔️|🏕️|🏖️|🏗️|🏘️|🏙️|🏚️|🏛️|🏜️|🏝️|🏞️|🏟️|🏳️|🏵️|🏷️|🐿️|👁️|📽️|🕉️|🕊️|🕯️|🕰️|🕳️|🕴️|🕵️|🕶️|🕷️|🕸️|🕹️|🖇️|🖊️|🖋️|🖌️|🖍️|🖐️|🖥️|🖨️|🖱️|🖲️|🖼️|🗂️|🗃️|🗄️|🗑️|🗒️|🗓️|🗜️|🗝️|🗞️|🗡️|🗣️|🗨️|🗯️|🗳️|🗺️|🛋️|🛍️|🛎️|🛏️|🛠️|🛡️|🛢️|🛣️|🛤️|🛥️|🛩️|🛰️|🛳️|©️|®️|‼️|⁉️|™️|ℹ️|↔️|↕️|↖️|↗️|↘️|↙️|↩️|↪️|⌨️|⏏️|⏭️|⏮️|⏯️|⏱️|⏲️|⏸️|⏹️|⏺️|Ⓜ️|▪️|▫️|▶️|◀️|◻️|◼️|☀️|☁️|☂️|☃️|☄️|☎️|☑️|☘️|☝️|☠️|☢️|☣️|☦️|☪️|☮️|☯️|☸️|☹️|☺️|♀️|♂️|♟️|♠️|♣️|♥️|♦️|♨️|♻️|♾️|⚒️|⚔️|⚕️|⚖️|⚗️|⚙️|⚛️|⚜️|⚠️|⚧️|⚰️|⚱️|⛈️|⛏️|⛑️|⛓️|⛩️|⛰️|⛱️|⛴️|⛷️|⛸️|⛹️|✂️|✈️|✉️|✌️|✍️|✏️|✒️|✔️|✖️|✝️|✡️|✳️|✴️|❄️|❇️|❣️|❤️|➡️|⤴️|⤵️|⬅️|⬆️|⬇️|〰️|〽️|㊗️|㊙️",
// UTS #51: the characters in RGI_Emoji must come from Basic_Emoji set
chars: Basic_Emoji.chars,
}
const unicodeSetFixtures = [
{
pattern: '[[a-h]&&[f-z]]',
expected: '[f-h]'
},
{
pattern: '[[a-h]&&[f-z]&&[p-z]]',
expected: '[]'
},
{
pattern: '[[a-h]&&[b]]',
expected: 'b'
},
{
pattern: '[[a-h]&&b]',
expected: 'b'
},
{
pattern: '[[g-z]&&b]',
expected: '[]'
},
{
pattern: '[[a-h]&&[^f-z]]',
expected: '[a-e]'
},
{
pattern: '[[a-h]&&[^f-z]&&[p-z]]',
expected: '[]'
},
{
pattern: '[[a-h]&&[^f-z]&&[^p-z]]',
expected: '[a-e]'
},
{
pattern: '[[a-h]&&[^b]]',
expected: '[ac-h]'
},
{
pattern: '[[a-h]--[f-z]]',
expected: '[a-e]'
},
{
pattern: '[[a-h]--[f-z]--[p-z]]',
expected: '[a-e]'
},
{
pattern: '[[a-z]--[d-k]--[s-w]]',
expected: '[a-cl-rx-z]'
},
{
pattern: '[[a-h]--[b]]',
expected: '[ac-h]'
},
{
pattern: '[[b]--[a-h]]',
expected: '[]'
},
{
pattern: '[[a-h]--b]',
expected: '[ac-h]'
},
{
pattern: '[b--[a-h]]',
expected: '[]'
},
{
pattern: '[[g-z]--b]',
expected: '[g-z]'
},
{
pattern: '[b--[g-z]]',
expected: 'b'
},
{
pattern: '[[a-h]--[^f-z]]',
expected: '[f-h]'
},
{
pattern: '[[a-h]--[^f-z]--[p-z]]',
expected: '[f-h]'
},
{
pattern: '[[a-h]--[^f-z]--[^p-z]]',
expected: '[]'
},
{
pattern: '[[a-h]--[^b]]',
expected: 'b'
},
{
pattern: '[[a-z][f-h]]',
expected: '[a-z]'
},
{
pattern: '[^[a-z][f-h]]',
expected: '[^a-z]'
},
{
pattern: '[^[a-z][f-h]]',
matches: ["A", "\u{12345}", "\uDAAA", "\uDDDD"],
nonMatches: ["a", "z"],
expected: '(?:[\\0-`\\{-\\uD7FF\\uE000-\\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF])',
options: TRANSFORM_U
},
{
pattern: '[[^a-z][f-h]]',
matches: ["f", "A", "\u{12345}", "\uDAAA", "\uDDDD"],
nonMatches: ["a", "z"],
expected: '[\\0-`f-h\\{-\\u{10FFFF}]'
},
{
pattern: '[[^a-z][f-h]]',
matches: ["f", "A", "\u{12345}", "\uDAAA", "\uDDDD"],
nonMatches: ["a", "z"],
expected: '(?:[\\0-`f-h\\{-\\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF])',
options: TRANSFORM_U
},
{
pattern: '[\\q{A|AB|B|ABC|BC}ab]',
expected: '(?:ABC|AB|BC|[ABab])'
},
{
pattern: '[\\q{A|AB}a\\q{B|ABC|BC}b]',
expected: '(?:ABC|AB|BC|[ABab])'
},
{
pattern: '[\\q{A|AB}ab\\q{B|ABC|BC}]',
expected: '(?:ABC|AB|BC|[ABab])'
},
{
pattern: '[[\\q{A|AB}a]b\\q{B|ABC|BC}]',
expected: '(?:ABC|AB|BC|[ABab])'
},
{
pattern: '[\\q{👩🏿✈️|🚲|🇧🇪}]',
expected: '(?:👩🏿✈️|🇧🇪|\\u{1F6B2})'
},
{
pattern: '[ab\\q{}]',
expected: '(?:[ab]|)'
},
{
pattern: '[ab\\q{|}]',
expected: '(?:[ab]|)'
},
{
pattern: '[ab\\q{|A|AB}]',
expected: '(?:AB|[Aab]|)'
},
{
pattern: '[\\q{sA}asb]',
flags: 'iv',
expected: '(?:sA|[abs])',
expectedFlags: 'iu'
},
{
pattern: '[\\q{sA}asb]',
flags: 'iv',
options: TRANSFORM_U,
expected: '(?:[s\\u017F]A|[abs\\u017F])',
expectedFlags: 'i'
},
{
pattern: '[[ab\\q{cd}]--a]',
expected: '(?:cd|b)'
},
{
pattern: '[[ab\\q{cd}]--[ab]]',
expected: '(?:cd)'
},
{
pattern: '[[ab\\q{cd}]--[cd]]',
expected: '(?:cd|[ab])'
},
{
pattern: '[[ab\\q{cd}]--\\q{cd}]',
expected: '[ab]'
},
{
pattern: '[[ab\\q{cd}]--[a\\q{cd}]]',
expected: 'b'
},
{
pattern: '[[ab\\q{cd}]--[ab\\q{cd}]]',
expected: '[]'
},
{
pattern: '[[ab]--[ab\\q{cd}]]',
expected: '[]'
},
{
pattern: '[\\q{cd}--[ab\\q{cd}]]',
expected: '[]'
},
{
pattern: '[\\q{cd}--[ab\\q{dc}]]',
expected: '(?:cd)'
},
{
pattern: '[\\q{ab|cd|abc}--\\q{abc|cd}]',
expected: '(?:ab)'
},
{
pattern: '[\\q{ab|cd|abc}--\\q{abc}--\\q{cd}]',
expected: '(?:ab)'
},
{
pattern: '[a&&\\q{a}]',
expected: 'a'
},
{
pattern: '[a&&\\q{ab}]',
expected: '[]'
},
{
pattern: '[\\q{ab}&&\\q{ab}]',
expected: '(?:ab)'
},
{
pattern: '[\\q{ab|cd|abc}&&\\q{ab|bc|abc}]',
expected: '(?:abc|ab)'
},
{
pattern: '[[a\\q{ab}]&&\\q{ab}]',
expected: '(?:ab)'
},
{
pattern: '[[a\\q{ab}]&&a]',
expected: 'a'
},
{
pattern: '[^\\q{a}]',
expected: '[^a]'
},
{
pattern: '[^\\q{abc}]',
throws: /Cannot negate set containing strings/
},
{
pattern: '[^\\q{}]',
throws: /Cannot negate set containing strings/
},
{
pattern: '[^\\q{a|}]',
throws: /Cannot negate set containing strings/
},
{
pattern: '[^\\q{}--\\q{}]',
throws: /Cannot negate set containing strings/
},
{
pattern: '[^\\q{ab}--\\q{ab}]',
throws: /Cannot negate set containing strings/
},
{
pattern: '[^\\q{a}--\\q{ab}]',
expected: '[^a]'
},
{
pattern: '[^[\\q{ab}--\\q{ab}]]',
throws: /Cannot negate set containing strings/
},
{
pattern: '[^\\q{}&&a]',
expected: '[^]'
},
{
pattern: '[^\\q{ab}&&a]',
expected: '[^]'
},
{
pattern: '[^\\q{}&&\\q{}]',
throws: /Cannot negate set containing strings/
},
{
pattern: '[^\\q{ab}&&\\q{ab}]',
throws: /Cannot negate set containing strings/
},
{
pattern: '[^\\q{}&&\\q{ab}]',
throws: /Cannot negate set containing strings/
},
{
pattern: '\\p{Basic_Emoji}',
expected: `(?:${Basic_Emoji.all})`
},
{
pattern: '[\\p{Basic_Emoji}]',
expected: `(?:${Basic_Emoji.all})`
},
{
pattern: '[\\p{Basic_Emoji}&&\\p{Basic_Emoji}]',
expected: `(?:${Basic_Emoji.all})`
},
{
pattern: '[\\p{Basic_Emoji}&&[\\u{0}-\\u{10ffff}]]',
expected: `[${Basic_Emoji.chars}]`
},
{
pattern: '[\\p{Basic_Emoji}\\p{Emoji}]',
expected: `(?:${Basic_Emoji.strings}|[${Emoji.chars}])`
},
{
pattern: '[\\p{Basic_Emoji}&&\\q{🇮🇴|dog}]',
expected: '[]'
},
{
pattern: '[\\p{RGI_Emoji_Flag_Sequence}&&\\q{🇮🇴|dog}]',
expected: '🇮🇴'
},
{
pattern: '[\\p{Basic_Emoji}\\q{JavaScript|ECMAScript}]',
expected: `(?:JavaScript|ECMAScript|${Basic_Emoji.all})`
},
{
pattern: '[\\p{Basic_Emoji}&&\\q{😷|©️|dog}]',
expected: '(?:©️|\\u{1F637})'
},
{
pattern: '\\P{Basic_Emoji}',
throws: /Cannot negate Unicode property of strings/
},
{
pattern: '[^\\p{Basic_Emoji}]',
throws: /Cannot negate set containing strings/
},
{
pattern: '\\p{RGI_Emoji}',
expected: `(?:${RGI_Emoji.strings}|[${RGI_Emoji.chars}])`
},
{
// https://github.com/mathiasbynens/regexpu-core/issues/77
pattern: '[\\p{ASCII}--\\p{Control}]',
expected: '[ -~]',
},
{
pattern: '[\\p{ASCII}&&\\p{Control}]',
expected: '[\\0-\\x1F\\x7F]',
},
{
pattern: '\\P{ASCII}',
expected: '[\\x80-\\u{10FFFF}]',
options: { unicodeSetsFlag: "transform", unicodePropertyEscapes: "transform" }
},
{
pattern: '[\\p{ASCII}\\p{Decimal_Number}]',
expected: '[\\p{ASCII}\\p{Decimal_Number}]'
},
{
pattern: '[\\p{Lowercase_Letter}]',
expected: '[\\p{Lowercase_Letter}]'
},
{
pattern: '^[\\p{Script=Arabic}&&\\p{Number}]$',
expected: '^[\\u0660-\\u0669\\u06F0-\\u06F9\\u{10E60}-\\u{10E7E}]$'
},
{
pattern: '.',
flags: 'sv',
matches: ['\n'],
options: { unicodeSetsFlag: 'transform', dotAllFlag: 'transform' },
expected: '[^]'
},
{
pattern: '[\\p{ASCII}]',
flags: 'iv',
expected: '[\\p{ASCII}]',
expectedFlags: 'iu',
matches: ['k', 'K', '\u{212A}'],
nonMatches: ['\u{0131}']
},
{
pattern: '[^\\P{ASCII}]',
flags: 'iv',
expectedFlags: 'iu',
matches: ['k', 'K', '\u{212A}'],
nonMatches: ['\u{0131}']
},
{
pattern: '[^\\P{Lowercase_Letter}]',
flags: 'iv',
matches: ['k', 'K', '\u{212A}', '\u{0131}'],
nonMatches: ['0', ',']
},
{
pattern: '[K&&k]',
flags: 'iv',
expected: 'k',
expectedFlags: 'iu'
},
{
pattern: '[K&&\\u212A]',
flags: 'iv',
expected: 'k',
expectedFlags: 'iu'
},
{
pattern: '[K--k]',
flags: 'iv',
expected: '[]',
expectedFlags: 'iu'
},
{
pattern: '[K--\\q{k}]',
flags: 'iv',
expected: '[]',
expectedFlags: 'iu'
},
{
pattern: '[\\u212A--k]',
flags: 'iv',
expected: '[]',
expectedFlags: 'iu'
},
{
pattern: '[\\q{\\u212A}--k]',
flags: 'iv',
expected: '[]',
expectedFlags: 'iu'
},
{
pattern: '[K--\\u212A]',
flags: 'iv',
expected: '[]',
expectedFlags: 'iu'
},
{
pattern: '[\\q{K}--\\q{\\u212A}]',
flags: 'iv',
expected: '[]',
expectedFlags: 'iu'
},
{
pattern: '[\\q{KK}&&\\q{kk}]',
flags: 'iv',
expected: '(?:kk)',
expectedFlags: 'iu',
},
{
pattern: '[\\q{KK}--\\q{k\\u212A}]',
flags: 'iv',
expected: '[]',
expectedFlags: 'iu'
},
{
pattern: '[\\p{Lu}&&k]',
flags: 'iv',
expected: 'k',
expectedFlags: 'iu'
},
{
pattern: '[\\p{Lu}--k]',
flags: 'iv',
expectedFlags: 'iu',
nonMatches: ['K', 'k', '\u212A'],
},
{
pattern: '[[\\p{Lu}]--k]',
flags: 'iv',
expectedFlags: 'iu',
nonMatches: ['K', 'k', '\u212A'],
},
{
pattern: '[\\w--k]',
flags: 'iv',
expected: '[0-9_a-jl-z]',
expectedFlags: 'iu',
nonMatches: ['K', 'k', '\u212A'],
},
{
pattern: '[[\\w]--k]',
flags: 'iv',
expected: '[0-9_a-jl-z]',
expectedFlags: 'iu',
nonMatches: ['K', 'k', '\u212A'],
},
{
pattern: '[\\W--Σ]',
flags: 'iv',
nonMatches: ['Σ', 'σ'],
matches: ['Θ', 'θ'],
expectedFlags: 'iu'
},
{
pattern: '[[\\W]--Σ]',
flags: 'iv',
nonMatches: ['Σ', 'σ'],
matches: ['Θ', 'θ'],
expectedFlags: 'iu'
},
{
pattern: '[\\D--Σ]',
flags: 'iv',
nonMatches: ['Σ', 'σ'],
matches: ['Θ', 'θ'],
expectedFlags: 'iu'
},
{
pattern: '[[\\D]--Σ]',
flags: 'iv',
nonMatches: ['Σ', 'σ'],
matches: ['Θ', 'θ'],
expectedFlags: 'iu'
},
{
pattern: '[\\S--Σ]',
flags: 'iv',
nonMatches: ['Σ', 'σ'],
matches: ['Θ', 'θ'],
expectedFlags: 'iu'
},
{
pattern: '[[\\S]--Σ]',
flags: 'iv',
nonMatches: ['Σ', 'σ'],
matches: ['Θ', 'θ'],
expectedFlags: 'iu'
},
{
pattern: '[[J-Lj-l]--\\u212A]',
flags: 'iv',
expected: '[jl]',
expectedFlags: 'iu',
nonMatches: ['K', 'k', '\u212A'],
matches: ['j', 'J', 'l', 'L']
}
];
exports.unicodeSetFixtures = unicodeSetFixtures;
mathiasbynens-regexpu-core-e35919f/tests/fixtures/unicode.js 0000664 0000000 0000000 00000021172 14717712160 0024341 0 ustar 00root root 0000000 0000000 const FLAGS_WITH_UNICODE = 'u ui ug um uy uig uim uigm uigmy'.split(' ');
const FLAGS_WITH_UNICODE_WITH_I = 'ui uig uim uigm uigmy'.split(' ');
const FLAGS_WITH_UNICODE_WITHOUT_I = 'u ug um uy ugm ugmy'.split(' ');
// Note: the leading space is important.
const FLAGS_WITHOUT_UNICODE = ' i g m y ig im igm igmy'.split(' ');
const FLAGS = FLAGS_WITH_UNICODE.concat(FLAGS_WITHOUT_UNICODE);
const unicodeFixtures = [
{
'pattern': '.',
'flags': FLAGS_WITHOUT_UNICODE,
'transpiled': '.'
},
{
'pattern': '.',
'flags': FLAGS_WITH_UNICODE,
'transpiled': '(?:[\\0-\\t\\x0B\\f\\x0E-\\u2027\\u202A-\\uD7FF\\uE000-\\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF])'
},
{
'pattern': '\\s',
'flags': FLAGS_WITHOUT_UNICODE,
'transpiled': '[\\t-\\r \\xA0\\u1680\\u2000-\\u200A\\u2028\\u2029\\u202F\\u205F\\u3000\\uFEFF]'
},
{
'pattern': '\\s',
'flags': FLAGS_WITH_UNICODE,
'transpiled': '[\\t-\\r \\xA0\\u1680\\u2000-\\u200A\\u2028\\u2029\\u202F\\u205F\\u3000\\uFEFF]'
},
{
'pattern': '\\S',
'flags': FLAGS_WITHOUT_UNICODE,
'transpiled': '[\\0-\\x08\\x0E-\\x1F!-\\x9F\\xA1-\\u167F\\u1681-\\u1FFF\\u200B-\\u2027\\u202A-\\u202E\\u2030-\\u205E\\u2060-\\u2FFF\\u3001-\\uFEFE\\uFF00-\\uFFFF]'
},
{
'pattern': '\\S',
'flags': FLAGS_WITH_UNICODE,
'transpiled': '(?:[\\0-\\x08\\x0E-\\x1F!-\\x9F\\xA1-\\u167F\\u1681-\\u1FFF\\u200B-\\u2027\\u202A-\\u202E\\u2030-\\u205E\\u2060-\\u2FFF\\u3001-\\uD7FF\\uE000-\\uFEFE\\uFF00-\\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF])'
},
{
'pattern': '[\\s\\S]',
'flags': FLAGS_WITHOUT_UNICODE,
'transpiled': '[\\0-\\uFFFF]'
},
{
'pattern': '[\\s\\S]',
'flags': FLAGS_WITH_UNICODE,
'transpiled': '(?:[\\0-\\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF])'
},
{
'pattern': '\\d',
'flags': FLAGS_WITH_UNICODE,
'transpiled': '[0-9]'
},
{
'pattern': '\\D',
'flags': FLAGS_WITHOUT_UNICODE,
'transpiled': '[\\0-\\/:-\\uFFFF]'
},
{
'pattern': '\\D',
'flags': FLAGS_WITH_UNICODE,
'transpiled': '(?:[\\0-\\/:-\\uD7FF\\uE000-\\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF])'
},
{
'pattern': '[\\d\\D]',
'flags': FLAGS_WITHOUT_UNICODE,
'transpiled': '[\\0-\\uFFFF]'
},
{
'pattern': '[\\d\\D]',
'matches': ["a", "0", "\u{12345}", "\uDAAA", "\uDDDD"],
'flags': FLAGS_WITH_UNICODE,
'transpiled': '(?:[\\0-\\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF])'
},
{
'pattern': '\\w',
'flags': FLAGS_WITH_UNICODE_WITHOUT_I,
'transpiled': '[0-9A-Z_a-z]'
},
{
'pattern': '\\w',
'flags': FLAGS_WITH_UNICODE_WITH_I,
// Must match U+017F and U+212A.
'transpiled': '[0-9A-Z_a-z\\u017F\\u212A]'
},
{
'pattern': '\\W',
'flags': FLAGS_WITH_UNICODE_WITHOUT_I,
'transpiled': '(?:[\\0-\\/:-@\\[-\\^`\\{-\\uD7FF\\uE000-\\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF])'
},
{
'pattern': '\\W',
'flags': FLAGS_WITH_UNICODE_WITH_I,
// Must not match U+017F, U+212A, `K`, or `S` (unlike in ES6).
'transpiled': '(?:[\\0-\\/:-@\\[-\\^`\\{-\\u017E\\u0180-\\u2129\\u212B-\\uD7FF\\uE000-\\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF])'
},
{
'pattern': '[\\w\\W]',
'flags': FLAGS_WITHOUT_UNICODE,
'transpiled': '[\\0-\\uFFFF]'
},
{
'pattern': '[\\w\\W]',
'matches': ["a", "0", "\u{12345}", "\uDAAA", "\uDDDD"],
'flags': FLAGS_WITH_UNICODE,
'transpiled': '(?:[\\0-\\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF])'
},
{
'pattern': '[\\uD834\\uDF06-\\uD834\\uDF08a-z]',
'flags': FLAGS_WITH_UNICODE_WITHOUT_I,
'transpiled': '(?:[a-z]|\\uD834[\\uDF06-\\uDF08])'
},
{
'pattern': '[\\uD834\\uDF06-\\uD834\\uDF08a-z]',
'flags': FLAGS_WITH_UNICODE_WITHOUT_I,
'transpiled': '(?:[a-z]|\\uD834[\\uDF06-\\uDF08])'
},
{
'pattern': '[\\u{1D306}-\\u{1D308}a-z]',
'flags': FLAGS_WITH_UNICODE_WITHOUT_I,
'transpiled': '(?:[a-z]|\\uD834[\\uDF06-\\uDF08])'
},
{
'pattern': '[\\u{0000000000001D306}-\\u{000000000000000000000001D308}a-z]',
'flags': FLAGS_WITH_UNICODE_WITHOUT_I,
'transpiled': '(?:[a-z]|\\uD834[\\uDF06-\\uDF08])'
},
{
'pattern': '[\\u{1D306}-\\u{1D308}a-z]+',
'flags': FLAGS_WITH_UNICODE_WITHOUT_I,
'transpiled': '(?:[a-z]|\\uD834[\\uDF06-\\uDF08])+'
},
{
// `s` and `k` case-fold to U+017F and U+212A.
'pattern': '[\\u{1D306}-\\u{1D308}a-z]',
'flags': FLAGS_WITH_UNICODE_WITH_I,
'transpiled': '(?:[a-z\\u017F\\u212A]|\\uD834[\\uDF06-\\uDF08])'
},
{
// `s` and `k` case-fold to U+017F and U+212A.
'pattern': '[\\u{1D306}-\\u{1D308}a-z]+',
'flags': FLAGS_WITH_UNICODE_WITH_I,
'transpiled': '(?:[a-z\\u017F\\u212A]|\\uD834[\\uDF06-\\uDF08])+'
},
{
// `s` and `k` case-fold to U+017F and U+212A.
'pattern': '[a-z]',
'flags': FLAGS_WITH_UNICODE_WITH_I,
'transpiled': '[a-z\\u017F\\u212A]'
},
{
// `s` and `k` case-fold to U+017F and U+212A.
'pattern': '[A-Z]',
'flags': FLAGS_WITH_UNICODE_WITH_I,
'transpiled': '[A-Z\\u017F\\u212A]'
},
{
'pattern': '[\\u017F\\u212A]',
'flags': FLAGS_WITH_UNICODE_WITHOUT_I,
'transpiled': '[\\u017F\\u212A]'
},
{
'pattern': '[\\u017F\\u212A]',
'flags': FLAGS_WITH_UNICODE_WITH_I,
'transpiled': '[KS\\u017F\\u212A]'
},
{
'pattern': '\\uD806\\uDCDF',
'flags': FLAGS_WITH_UNICODE_WITHOUT_I,
'transpiled': '(?:\\uD806\\uDCDF)'
},
{
// U+118DF case-folds to U+118BF.
'pattern': '\\uD806\\uDCDF',
'flags': FLAGS_WITH_UNICODE_WITH_I,
'transpiled': '(?:\\uD806[\\uDCBF\\uDCDF])'
},
{
'pattern': '[^a]',
'flags': FLAGS_WITHOUT_UNICODE,
'transpiled': '(?:(?![a\\uD800-\\uDFFF])[^]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF])'
},
{
'pattern': '[^a]',
'matches': ['b', 'A', '\u{1D49C}', '\uDAAA', '\uDDDD'],
'nonMatches': ['a'],
'flags': FLAGS_WITH_UNICODE_WITHOUT_I,
'transpiled': '(?:[\\0-`b-\\uD7FF\\uE000-\\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF])'
},
{
'pattern': '[^a]',
'nonMatches': ['a', 'A'],
'flags': FLAGS_WITH_UNICODE_WITH_I,
'transpiled': '(?:(?![a\\uD800-\\uDFFF])[^]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF])'
},
{
'pattern': '[ab]+',
'flags': FLAGS,
'transpiled': '[ab]+'
},
{
'pattern': '^(?:ab|cd)$',
'flags': FLAGS,
'transpiled': '^(?:ab|cd)$'
},
{
// Without the `u` flag, the character class contains two entries: one for
// each surrogate half.
'pattern': '[\\uD834\\uDF06]',
'flags': FLAGS_WITHOUT_UNICODE,
'transpiled': '[\\uD834\\uDF06]'
},
{
// With the `u` flag, the character class contains a single entry: one for
// each code point.
'pattern': '[\\uD834\\uDF06]',
'flags': FLAGS_WITH_UNICODE,
'transpiled': '(?:\\uD834\\uDF06)'
},
{
'pattern': '\\uD834\\uDF06+',
'flags': FLAGS_WITHOUT_UNICODE,
'transpiled': '\\uD834\\uDF06+'
},
{
'pattern': '\\uD834\\uDF06+',
'flags': FLAGS_WITH_UNICODE,
'transpiled': '(?:\\uD834\\uDF06)+'
},
{
'pattern': '\\uD834\\uDF06+',
'flags': FLAGS_WITHOUT_UNICODE,
'transpiled': '\\uD834\\uDF06+'
},
{
'pattern': '\\uD834\\uDF06+',
'flags': FLAGS_WITH_UNICODE,
'transpiled': '(?:\\uD834\\uDF06)+'
},
{
// https://bugs.ecmascript.org/show_bug.cgi?id=3521#c3
'pattern': '\\u{D834}\\u{DF06}+',
'flags': FLAGS_WITH_UNICODE,
'transpiled': '(?:\\uD834(?![\\uDC00-\\uDFFF]))(?:(?:[^\\uD800-\\uDBFF]|^)\\uDF06)+'
},
{
'pattern': '\\uD834\\uDF06{2,4}',
'flags': FLAGS_WITHOUT_UNICODE,
'transpiled': '\\uD834\\uDF06{2,4}'
},
{
'pattern': '\\uD834\\uDF06{2,4}',
'flags': FLAGS_WITH_UNICODE,
'transpiled': '(?:\\uD834\\uDF06){2,4}'
},
{
'pattern': '\\uD834\\uDF06{2,4}',
'flags': FLAGS_WITHOUT_UNICODE,
'transpiled': '\\uD834\\uDF06{2,4}'
},
{
'pattern': '\\uD834\\uDF06{2,4}',
'flags': FLAGS_WITH_UNICODE,
'transpiled': '(?:\\uD834\\uDF06){2,4}'
},
{
'pattern': '(a)\\1',
'flags': FLAGS_WITH_UNICODE_WITHOUT_I,
'transpiled': '(a)\\1'
},
{
// https://github.com/mathiasbynens/regexpu/issues/18
'pattern': '[]',
'flags': FLAGS,
'transpiled': '[]'
},
{
// https://github.com/mathiasbynens/regexpu/issues/19
'pattern': '(\\1)+\\1\\1',
'flags': FLAGS,
'transpiled': '(\\1)+\\1\\1'
},
// https://github.com/mathiasbynens/regexpu-core/issues/7
{
'pattern': '\\u03B8',
'flags': FLAGS_WITH_UNICODE_WITH_I,
'transpiled': '[\\u03B8\\u03F4]'
},
// https://github.com/mathiasbynens/regexpu-core/issues/11
{
'pattern': '\\/',
'flags': FLAGS_WITHOUT_UNICODE,
'transpiled': '\\/'
},
{
'pattern': '\\/',
'flags': FLAGS_WITH_UNICODE,
'transpiled': '\\/'
},
];
exports.unicodeFixtures = unicodeFixtures;
mathiasbynens-regexpu-core-e35919f/tests/tests.js 0000664 0000000 0000000 00000030772 14717712160 0022212 0 ustar 00root root 0000000 0000000 'use strict';
const describe = global.describe || require("node:test").describe;
const it = global.it || require("node:test").it;
const assert = require('assert');
const regenerate = require('regenerate');
const rewritePattern = require('../rewrite-pattern.js');
const UNICODE_SET = regenerate().addRange(0x0, 0x10FFFF);
const IS_NODE_6 = process.version.startsWith('v6.');
const { unicodeFixtures } = require("./fixtures/unicode.js");
const { unicodePropertyEscapeFixtures, unicodePropertyEscapePathExpressionsFixtures } = require("./fixtures/unicode-property-escape.js");
const { dotAllFlagFixtures } = require("./fixtures/dot-all-flag.js");
const { namedGroupFixtures } = require("./fixtures/named-group.js");
const { characterClassFixtures } = require("./fixtures/character-class.js");
const { unicodeSetFixtures } = require("./fixtures/unicode-set.js");
const { modifiersFixtures } = require("./fixtures/modifiers.js");
/** For node 6 compat */
assert.match || (assert.match = function match(value, regex) { assert.ok(regex.exec(value) !== null, `${value} does not match ${regex.toString()}`) });
assert.doesNotMatch || (assert.doesNotMatch = function doesNotMatch(value, regex) { assert.ok(regex.exec(value) === null, `${value} does match ${regex.toString()}`) });
describe('rewritePattern { unicodeFlag }', () => {
const options = {
'unicodeFlag': 'transform'
};
for (const fixture of unicodeFixtures) {
const pattern = fixture.pattern;
for (const flag of fixture.flags) {
if (flag.includes('u')) {
it('rewrites `/' + pattern + '/' + flag + '` correctly', () => {
assert.equal(rewritePattern(pattern, flag, options), fixture.transpiled);
});
} else {
it('leaves `/' + pattern + '/' + flag + '` as-is', () => {
assert.equal(rewritePattern(pattern, flag, options), pattern);
});
}
}
}
});
const getPropertyValuePattern = (path) => {
const codePoints = require(`@unicode/unicode-16.0.0/${
path }/code-points.js`);
return {
'p': regenerate(codePoints).toString(),
'P': UNICODE_SET.clone().remove(codePoints).toString()
};
};
describe('unicodePropertyEscapes', () => {
const features = {
'unicodePropertyEscapes': 'transform',
'unicodeFlag': 'transform'
};
for (const fixture of unicodePropertyEscapeFixtures) {
const pattern = fixture.pattern;
const flags = fixture.flags || "u";
const options = fixture.options || features;
const transformUnicodeFlag = options.unicodeFlag === "transform";
const inputRE = `/${pattern}/${flags}`;
const expected = fixture.expected;
const throws = fixture.throws;
if (throws) {
if (expected) {
throw new Error(
`TEST ERROR: ${inputRE} cannot both throw and have an expected output.`
);
}
it(`throws for \`${inputRE}\` ${transformUnicodeFlag ? "without " : ""}using the u flag`, () => {
assert.throws(() => {
rewritePattern(pattern, flags, options);
}, throws);
});
} else {
it(`rewrites \`${inputRE}\` correctly ${transformUnicodeFlag ? "without " : ""}using the u flag`, () => {
let actualFlags = flags;
options.onNewFlags = (flags) => {
actualFlags = flags;
};
const transpiled = rewritePattern(pattern, flags, options);
if (expected !== undefined && transpiled != "(?:" + expected + ")") {
assert.strictEqual(transpiled, expected);
}
for (const match of fixture.matches || []) {
const transpiledRegex = new RegExp(transpiled, actualFlags);
assert.match(match, transpiledRegex);
}
for (const nonMatch of fixture.nonMatches || []) {
const transpiledRegex = new RegExp(transpiled, actualFlags);
assert.doesNotMatch(nonMatch, transpiledRegex);
}
});
}
}
// ignore unicodePropertyEscapePathExpressionsFixtures tests as @unicode/unicode-* library does not support node.js 6
if (IS_NODE_6) return;
for (const fixture of unicodePropertyEscapePathExpressionsFixtures) {
const expected = getPropertyValuePattern(fixture.path);
for (const pattern of fixture.expressions) {
const p = `\\p{${ pattern }}`;
it('rewrites `/' + p + '/u` correctly', () => {
const transpiled = rewritePattern(p, 'u', features);
if (transpiled != '(?:' + expected.p + ')') {
assert.equal(transpiled, expected.p);
}
});
const P = `\\P{${ pattern }}`;
it('rewrites `/' + P + '/u` correctly', () => {
const transpiled = rewritePattern(P, 'u', features);
if (transpiled != '(?:' + expected.P + ')') {
assert.equal(transpiled, expected.P);
}
});
}
}
});
describe('dotAllFlag', () => {
for (const fixture of dotAllFlagFixtures) {
const pattern = fixture.pattern;
const flags = fixture.flags;
const options = Object.assign({
'dotAllFlag': 'transform'
}, fixture.options);
it('rewrites `/' + pattern + '/' + flags + '` correctly', () => {
const transpiled = rewritePattern(pattern, flags, options);
const expected = fixture.expected;
if (transpiled != '(?:' + expected + ')') {
assert.strictEqual(transpiled, expected);
}
});
}
it('leaves `/./su` as-is', () => {
assert.equal(rewritePattern('.', 'su'), '.');
});
});
describe('namedGroups', () => {
for (const fixture of namedGroupFixtures) {
const {
pattern,
flags,
expected,
expectedGroups,
options = {}
} = fixture;
const groups = [];
Object.assign(options, {
namedGroups: 'transform',
'onNamedGroup': (name, index) => {
groups.push([ name, index ]);
}
});
it('rewrites `/' + pattern + '/' + flags + '` correctly', () => {
const transpiled = rewritePattern(pattern, flags, options);
assert.strictEqual(transpiled, expected);
if (expectedGroups) {
assert.deepStrictEqual(groups, expectedGroups);
}
});
}
it('onNamedGroup is optional', () => {
let transpiled;
const expected = '()';
assert.doesNotThrow(() => {
transpiled = rewritePattern('(?)', '', {
namedGroups: 'transform'
});
});
assert.strictEqual(transpiled, expected);
});
it('multiple groups with the same name in the same disjunction are disallowed', () => {
assert.throws(() => {
rewritePattern('(?)(?)', '', {
namedGroups: 'transform'
});
});
assert.throws(() => {
rewritePattern('(?)(?:a|(?))', '', {
namedGroups: 'transform'
});
});
assert.throws(() => {
rewritePattern('(?:b|(?))(?:a|(?))', '', {
namedGroups: 'transform'
});
});
});
it('multiple groups with the same name in the different disjunctions are allowed', () => {
assert.doesNotThrow(() => {
rewritePattern('(?)|(?)', '', {
namedGroups: 'transform'
});
});
assert.doesNotThrow(() => {
rewritePattern('(?:b|(?))|(?:a|(?))', '', {
namedGroups: 'transform'
});
});
});
it('named references must reference a group', () => {
assert.throws(() => {
rewritePattern('\\k', '', {
namedGroups: 'transform'
});
});
});
it('should not transpile when namedGroups is not enabled', () => {
const pattern = '(?)';
let transpiled;
assert.doesNotThrow(() => {
transpiled = rewritePattern(pattern, '');
});
assert.strictEqual(pattern, transpiled);
});
it('should support named group references when namedGroups is not enabled', () => {
const pattern = '(?)\\k';
let transpiled;
assert.doesNotThrow(() => {
transpiled = rewritePattern(pattern, '');
});
assert.strictEqual(pattern, transpiled);
});
it('should validate named group references when namedGroups is not enabled', () => {
assert.throws(() => rewritePattern('\\k', ''), /Unknown group names: foo/);
});
it('should call onNamedGroup even if namedGroups is not enabled', () => {
let called = false;
rewritePattern('(?)', '', {
onNamedGroup() {
called = true;
},
});
assert.strictEqual(called, true);
})
});
describe('character classes', () => {
for (const fixture of characterClassFixtures) {
const pattern = fixture.pattern;
const flags = fixture.flags;
const options = fixture.options;
const transformUnicodeFlag = options.unicodeFlag === 'transform';
it('rewrites `/' + pattern + '/' + flags + '` with' + (transformUnicodeFlag ? 'out' : '') + ' unicode correctly', () => {
let actualFlags = flags;
options.onNewFlags = (flags) => { actualFlags = flags };
const transpiled = rewritePattern(pattern, flags, options);
const expected = fixture.expected;
if (transpiled != '(?:' + expected + ')') {
assert.strictEqual(transpiled, expected);
}
for (const match of fixture.matches || []) {
const transpiledRegex = new RegExp(transpiled, actualFlags);
assert.match(match, transpiledRegex);
}
for (const nonMatch of fixture.nonMatches || []) {
const transpiledRegex = new RegExp(transpiled, actualFlags);
assert.doesNotMatch(nonMatch, transpiledRegex);
}
});
}
});
describe('unicodeSets (v) flag', () => {
// Re-use the unicode fixtures but replacing the input pattern's `u` flag with `v` flag
for (const fixture of unicodeFixtures) {
if (fixture.flags.includes("u")) {
for (let flag of fixture.flags) {
flag = flag.replace("u", "v");
const { pattern, transpiled: expected } = fixture;
const inputRE = `/${pattern}/${flag}`;
it(`rewrites \`${inputRE}\` correctly without using the u flag`, () => {
let actualFlags = flag;
const options = {
unicodeSetsFlag: "transform",
unicodeFlag: "transform",
onNewFlags(flags) {
actualFlags = flags;
}
};
const transpiled = rewritePattern(pattern, flag, options);
if (transpiled != "(?:" + expected + ")") {
assert.strictEqual(transpiled, expected);
}
for (const match of fixture.matches || []) {
const transpiledRegex = new RegExp(transpiled, actualFlags);
assert.match(match, transpiledRegex);
}
for (const nonMatch of fixture.nonMatches || []) {
const transpiledRegex = new RegExp(transpiled, actualFlags);
assert.doesNotMatch(nonMatch, transpiledRegex);
}
});
}
}
}
if (IS_NODE_6) return;
for (const fixture of unicodeSetFixtures) {
const pattern = fixture.pattern;
const flags = fixture.flags || 'v';
const options = fixture.options || { unicodeSetsFlag: 'transform' };
const transformUnicodeFlag = options.unicodeFlag === 'transform';
const inputRE = `/${pattern}/${flags}`;
const expected = fixture.expected;
const throws = fixture.throws;
if (throws) {
if (expected) {
throw new Error(`TEST ERROR: ${inputRE} cannot both throw and have an expected output.`);
}
it(`throws for \`${inputRE}\` ${transformUnicodeFlag ? 'without ' : ''}using the u flag`, () => {
assert.throws(() => {
rewritePattern(pattern, flags, options);
}, throws);
});
} else {
it(`rewrites \`${inputRE}\` correctly ${transformUnicodeFlag ? 'without ' : ''}using the u flag`, () => {
let actualFlags = flags;
options.onNewFlags = (flags) => { actualFlags = flags };
const transpiled = rewritePattern(pattern, flags, options);
if (expected !== undefined && transpiled != '(?:' + expected + ')') {
assert.strictEqual(transpiled, expected);
}
for (const match of fixture.matches || []) {
const transpiledRegex = new RegExp(transpiled, actualFlags);
assert.match(match, transpiledRegex);
}
for (const nonMatch of fixture.nonMatches || []) {
const transpiledRegex = new RegExp(transpiled, actualFlags);
assert.doesNotMatch(nonMatch, transpiledRegex);
}
});
}
}
it('Property of strings used without the v flag', () => {
assert.throws(() => {
rewritePattern('\\p{Basic_Emoji}', 'u')
}, /Properties of strings are only supported when using the unicodeSets \(v\) flag/);
})
});
describe('modifiers', () => {
for (const fixture of modifiersFixtures) {
const {
pattern,
flags = '',
expected,
options = {}
} = fixture;
let actualFlags = flags;
options.onNewFlags = (newFlags) => {
actualFlags = newFlags;
}
if (options.modifiers === undefined) {
options.modifiers = 'transform';
}
it('rewrites `/' + pattern + '/' + flags + '` correctly', () => {
const transpiled = rewritePattern(pattern, flags, options);
if (expected != undefined) {
assert.strictEqual(transpiled, expected);
}
if (fixture.expectedFlags != undefined) {
assert.strictEqual(actualFlags, fixture.expectedFlags);
}
for (const match of fixture.matches || []) {
const transpiledRegex = new RegExp(transpiled, actualFlags);
assert.match(match, transpiledRegex);
}
for (const nonMatch of fixture.nonMatches || []) {
const transpiledRegex = new RegExp(transpiled, actualFlags);
assert.doesNotMatch(nonMatch, transpiledRegex);
}
});
}
});