Jesus sucks

This commit is contained in:
2024-12-17 13:23:11 -08:00
parent 3a3382ffff
commit b2dbf46d28
13060 changed files with 1310035 additions and 1 deletions

21
backend/frontend/node_modules/regjsparser/LICENSE.BSD generated vendored Normal file
View File

@@ -0,0 +1,21 @@
Copyright (c) Julian Viereck and Contributors, All Rights Reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

47
backend/frontend/node_modules/regjsparser/README.md generated vendored Normal file
View File

@@ -0,0 +1,47 @@
# RegJSParser
Parsing the JavaScript's RegExp in JavaScript.
## Installation
```bash
npm install regjsparser
```
## Usage
```js
var parse = require('regjsparser').parse;
var parseTree = parse('^a'); // /^a/
console.log(parseTree);
// Toggle on/off additional features:
var parseTree = parse('^a', '', {
// SEE: https://github.com/jviereck/regjsparser/pull/78
unicodePropertyEscape: true,
// SEE: https://github.com/jviereck/regjsparser/pull/83
namedGroups: true,
// SEE: https://github.com/jviereck/regjsparser/pull/89
lookbehind: true
});
console.log(parseTree);
```
## Testing
To run the tests, run the following command:
```bash
npm test
```
To create a new reference file, execute…
```bash
node test/update-fixtures.js
```
…from the repo top directory.

46
backend/frontend/node_modules/regjsparser/package.json generated vendored Normal file
View File

@@ -0,0 +1,46 @@
{
"name": "regjsparser",
"version": "0.12.0",
"author": "'Julian Viereck' <julian.viereck@gmail.com>",
"license": "BSD-2-Clause",
"main": "./parser",
"types": "./parser.d.ts",
"bin": {
"regjsparser": "bin/parser"
},
"homepage": "https://github.com/jviereck/regjsparser",
"repository": {
"type": "git",
"url": "git+ssh://git@github.com/jviereck/regjsparser.git"
},
"scripts": {
"lint": "eslint --max-warnings 0 .",
"test": "run-p test:* lint",
"test:src": "node test/index.js",
"test:types": "tsc test/types.ts --noEmit",
"bench:baseline": "node ./tools/bench/index.mjs baseline",
"bench:current": "node ./tools/bench/index.mjs current",
"bench": "run-s bench:*"
},
"files": [
"bin/",
"LICENSE.BSD",
"parser.js",
"parser.d.ts",
"README.md"
],
"dependencies": {
"jsesc": "~3.0.2"
},
"devDependencies": {
"@unicode/unicode-16.0.0": "^1.6.0",
"eslint": "^9.10.0",
"eslint-plugin-regexp": "^2.6.0",
"globals": "^15.9.0",
"npm-run-all": "^4.1.5",
"regenerate": "~1.0.1",
"regjsparser": "^0.11.2",
"tinybench": "^2.9.0",
"typescript": "^4.5.2"
}
}

182
backend/frontend/node_modules/regjsparser/parser.d.ts generated vendored Normal file
View File

@@ -0,0 +1,182 @@
type _If<Test, Then, Else> = Test extends true ? Then : Else;
export type Features = {
lookbehind?: boolean;
namedGroups?: boolean;
unicodePropertyEscape?: boolean;
unicodeSet?: boolean;
modifiers?: boolean;
};
export type AstNodeType =
| "alternative"
| "anchor"
| "characterClass"
| "characterClassEscape"
| "characterClassRange"
| "disjunction"
| "dot"
| "group"
| "quantifier"
| "reference"
| "unicodePropertyEscape"
| "value";
export type Base<T extends AstNodeType> = {
range: [number, number];
raw: string;
type: T;
};
export type AstNode<F extends Features = {}> =
| Alternative<F>
| Anchor
| CharacterClass<F>
| CharacterClassEscape
| CharacterClassRange
| Disjunction<F>
| Dot
| Group<F>
| Quantifier<F>
| Reference<F>
| _If<F["unicodePropertyEscape"], UnicodePropertyEscape, never>
| Value;
export type RootNode<F extends Features = {}> = Exclude<
AstNode<F>,
CharacterClassRange
>;
export type Anchor = Base<"anchor"> & {
kind: "boundary" | "end" | "not-boundary" | "start";
};
export type CharacterClassEscape = Base<"characterClassEscape"> & {
value: 'd' | 'D' | 'w' | 'W' | 's' | 'S';
};
export type Value = Base<"value"> & {
codePoint: number;
kind:
| "controlLetter"
| "hexadecimalEscape"
| "identifier"
| "null"
| "octal"
| "singleEscape"
| "symbol"
| "unicodeCodePointEscape"
| "unicodeEscape";
};
export type Identifier = Base<"value"> & {
value: string;
};
export type Alternative<F extends Features = {}> = Base<"alternative"> & {
body: RootNode<F>[];
};
export type CharacterClassRange = Base<"characterClassRange"> & {
max: Value;
min: Value;
};
export type UnicodePropertyEscape = Base<"unicodePropertyEscape"> & {
negative: boolean;
value: string;
};
export type CharacterClassBody =
| CharacterClassEscape
| CharacterClassRange
| UnicodePropertyEscape
| Value;
export type CharacterClass<F extends Features = {}> = Base<"characterClass"> & {
body: CharacterClassBody[];
negative: boolean;
kind: "union" | _If<F["unicodeSet"], "intersection" | "subtraction", never>;
};
export type ModifierFlags = {
enabling: string;
disabling: string;
};
export type NonCapturingGroup<F extends Features = {}> = Base<"group"> &
(
| {
behavior:
| "lookahead"
| "lookbehind"
| "negativeLookahead"
| "negativeLookbehind";
body: RootNode<F>[];
}
| ({
behavior: "ignore";
body: RootNode<F>[];
} & _If<
F["modifiers"],
{
modifierFlags?: ModifierFlags;
},
{
modifierFlags: undefined;
}
>)
);
export type CapturingGroup<F extends Features = {}> = Base<"group"> & {
behavior: "normal";
body: RootNode<F>[];
} & _If<
F["namedGroups"],
{
name?: Identifier;
},
{
name: undefined;
}
>;
export type Group<F extends Features = {}> =
| CapturingGroup<F>
| NonCapturingGroup<F>;
export type Quantifier<F extends Features = {}> = Base<"quantifier"> & {
body: [RootNode<F>];
greedy: boolean;
max?: number;
min: number;
symbol?: "?" | "*" | "+";
};
export type Disjunction<F extends Features = {}> = Base<"disjunction"> & {
body: [RootNode<F>, RootNode<F>, ...RootNode<F>[]];
};
export type Dot = Base<"dot">;
export type NamedReference = Base<"reference"> & {
matchIndex: undefined;
name: Identifier;
};
export type IndexReference = Base<"reference"> & {
matchIndex: number;
name: undefined;
};
export type Reference<F extends Features = {}> = _If<
F["namedGroups"],
IndexReference | NamedReference,
IndexReference
>;
export function parse<F extends Features = {}>(
str: string,
flags: string,
features?: F
): RootNode<F>;

1825
backend/frontend/node_modules/regjsparser/parser.js generated vendored Normal file

File diff suppressed because one or more lines are too long