xml-model 1.2.0 → 1.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (131) hide show
  1. package/README.md +0 -1
  2. package/dist/_virtual/Reflect.js +8 -0
  3. package/dist/_virtual/Reflect2.js +5 -0
  4. package/{vite/dist → dist}/_virtual/_commonjsHelpers.js +10 -4
  5. package/dist/defaults.d.ts +1 -0
  6. package/dist/errors.d.ts +1 -0
  7. package/dist/index.d.ts +1 -0
  8. package/dist/middleware.d.ts +1 -0
  9. package/dist/model/built-ins.d.ts +1 -0
  10. package/dist/model/index.d.ts +1 -0
  11. package/dist/model/index.js +1 -0
  12. package/dist/model/property.d.ts +1 -0
  13. package/dist/model/registry.d.ts +1 -0
  14. package/dist/model/types.d.ts +1 -0
  15. package/dist/node_modules/reflect-metadata/Reflect.js +867 -0
  16. package/dist/types.d.ts +1 -0
  17. package/dist/util/is-regexp.d.ts +1 -0
  18. package/dist/util/kebab-case.d.ts +1 -0
  19. package/dist/util/merge-maps.d.ts +1 -0
  20. package/dist/xml/index.d.ts +1 -0
  21. package/dist/xml/xml-js.d.ts +1 -0
  22. package/package.json +4 -4
  23. package/vite/dist/index.js +2 -3
  24. package/vite/dist/node_modules/typescript-rtti/dist.esm/common/format.js +105 -0
  25. package/vite/dist/node_modules/typescript-rtti/dist.esm/common/index.js +55 -0
  26. package/vite/dist/node_modules/typescript-rtti/dist.esm/transformer/api-call-transformer.js +152 -0
  27. package/vite/dist/node_modules/typescript-rtti/dist.esm/transformer/common/class-analyzer.js +83 -0
  28. package/vite/dist/node_modules/typescript-rtti/dist.esm/transformer/common/compile-error.js +8 -0
  29. package/vite/dist/node_modules/typescript-rtti/dist.esm/transformer/common/import-analyzer.js +89 -0
  30. package/vite/dist/node_modules/typescript-rtti/dist.esm/transformer/common/interface-analyzer.js +58 -0
  31. package/vite/dist/node_modules/typescript-rtti/dist.esm/transformer/common/visitor-base.js +93 -0
  32. package/vite/dist/node_modules/typescript-rtti/dist.esm/transformer/declarations-emitter.js +31 -0
  33. package/vite/dist/node_modules/typescript-rtti/dist.esm/transformer/encode-parameter.js +64 -0
  34. package/vite/dist/node_modules/typescript-rtti/dist.esm/transformer/find-relative-path.js +41 -0
  35. package/vite/dist/node_modules/typescript-rtti/dist.esm/transformer/flags.js +43 -0
  36. package/vite/dist/node_modules/typescript-rtti/dist.esm/transformer/forward-ref.js +20 -0
  37. package/vite/dist/node_modules/typescript-rtti/dist.esm/transformer/get-exports-for-symbol.js +64 -0
  38. package/vite/dist/node_modules/typescript-rtti/dist.esm/transformer/index.js +130 -0
  39. package/vite/dist/node_modules/typescript-rtti/dist.esm/transformer/legacy-decorator.js +10 -0
  40. package/vite/dist/node_modules/typescript-rtti/dist.esm/transformer/legacy-type-encoder.js +82 -0
  41. package/vite/dist/node_modules/typescript-rtti/dist.esm/transformer/literal-node.js +9 -0
  42. package/vite/dist/node_modules/typescript-rtti/dist.esm/transformer/metadata-collector.js +56 -0
  43. package/vite/dist/node_modules/typescript-rtti/dist.esm/transformer/metadata-decorator.js +80 -0
  44. package/vite/dist/node_modules/typescript-rtti/dist.esm/transformer/metadata-emitter.js +425 -0
  45. package/vite/dist/node_modules/typescript-rtti/dist.esm/transformer/metadata-encoder.js +212 -0
  46. package/vite/dist/node_modules/typescript-rtti/dist.esm/transformer/rt-helper.js +96 -0
  47. package/vite/dist/node_modules/typescript-rtti/dist.esm/transformer/rtti-visitor-base.js +28 -0
  48. package/vite/dist/node_modules/typescript-rtti/dist.esm/transformer/serialize.js +31 -0
  49. package/vite/dist/node_modules/typescript-rtti/dist.esm/transformer/type-encoder.js +76 -0
  50. package/vite/dist/node_modules/typescript-rtti/dist.esm/transformer/type-literal.js +499 -0
  51. package/vite/dist/node_modules/typescript-rtti/dist.esm/transformer/utils.js +906 -0
  52. package/vite/dist/node_modules/typescript-rtti/dist.esm/transformer/workarounds.js +7 -0
  53. package/vite/dist/src/class-names.test.d.ts +9 -0
  54. package/vite/dist/src/defaults.d.ts +15 -0
  55. package/vite/dist/src/errors.d.ts +24 -0
  56. package/vite/dist/src/index.d.ts +8 -0
  57. package/vite/dist/src/middleware.d.ts +10 -0
  58. package/vite/dist/src/model/built-ins.d.ts +3 -0
  59. package/vite/dist/src/model/index.d.ts +21 -0
  60. package/vite/dist/src/model/property.d.ts +6 -0
  61. package/vite/dist/src/model/registry.d.ts +9 -0
  62. package/vite/dist/src/model/types.d.ts +74 -0
  63. package/vite/dist/src/model.test.d.ts +2 -0
  64. package/vite/dist/src/types.d.ts +17 -0
  65. package/vite/dist/src/util/is-regexp.d.ts +12 -0
  66. package/vite/dist/src/util/kebab-case.d.ts +16 -0
  67. package/vite/dist/src/util/merge-maps.d.ts +2 -0
  68. package/vite/dist/src/xml/index.d.ts +33 -0
  69. package/vite/dist/src/xml/xml-js.d.ts +7 -0
  70. package/vite/dist/_virtual/_commonjs-dynamic-modules.js +0 -7
  71. package/vite/dist/_virtual/_typescript.js +0 -5
  72. package/vite/dist/_virtual/api-call-transformer.js +0 -5
  73. package/vite/dist/_virtual/class-analyzer.js +0 -5
  74. package/vite/dist/_virtual/compile-error.js +0 -5
  75. package/vite/dist/_virtual/declarations-emitter.js +0 -5
  76. package/vite/dist/_virtual/encode-parameter.js +0 -5
  77. package/vite/dist/_virtual/find-relative-path.js +0 -5
  78. package/vite/dist/_virtual/flags.js +0 -5
  79. package/vite/dist/_virtual/format.js +0 -5
  80. package/vite/dist/_virtual/forward-ref.js +0 -5
  81. package/vite/dist/_virtual/get-exports-for-symbol.js +0 -5
  82. package/vite/dist/_virtual/import-analyzer.js +0 -5
  83. package/vite/dist/_virtual/index.js +0 -8
  84. package/vite/dist/_virtual/index2.js +0 -5
  85. package/vite/dist/_virtual/index3.js +0 -5
  86. package/vite/dist/_virtual/interface-analyzer.js +0 -5
  87. package/vite/dist/_virtual/legacy-decorator.js +0 -5
  88. package/vite/dist/_virtual/legacy-type-encoder.js +0 -5
  89. package/vite/dist/_virtual/literal-node.js +0 -5
  90. package/vite/dist/_virtual/metadata-collector.js +0 -5
  91. package/vite/dist/_virtual/metadata-decorator.js +0 -5
  92. package/vite/dist/_virtual/metadata-emitter.js +0 -5
  93. package/vite/dist/_virtual/metadata-encoder.js +0 -5
  94. package/vite/dist/_virtual/rt-helper.js +0 -5
  95. package/vite/dist/_virtual/rtti-visitor-base.js +0 -5
  96. package/vite/dist/_virtual/serialize.js +0 -5
  97. package/vite/dist/_virtual/type-encoder.js +0 -5
  98. package/vite/dist/_virtual/type-literal.js +0 -5
  99. package/vite/dist/_virtual/utils.js +0 -5
  100. package/vite/dist/_virtual/visitor-base.js +0 -5
  101. package/vite/dist/_virtual/workarounds.js +0 -5
  102. package/vite/dist/index.d.ts +0 -28
  103. package/vite/dist/node_modules/typescript-rtti/dist/common/format.js +0 -69
  104. package/vite/dist/node_modules/typescript-rtti/dist/common/index.js +0 -34
  105. package/vite/dist/node_modules/typescript-rtti/dist/transformer/api-call-transformer.js +0 -197
  106. package/vite/dist/node_modules/typescript-rtti/dist/transformer/common/class-analyzer.js +0 -124
  107. package/vite/dist/node_modules/typescript-rtti/dist/transformer/common/compile-error.js +0 -18
  108. package/vite/dist/node_modules/typescript-rtti/dist/transformer/common/import-analyzer.js +0 -130
  109. package/vite/dist/node_modules/typescript-rtti/dist/transformer/common/interface-analyzer.js +0 -98
  110. package/vite/dist/node_modules/typescript-rtti/dist/transformer/common/visitor-base.js +0 -132
  111. package/vite/dist/node_modules/typescript-rtti/dist/transformer/declarations-emitter.js +0 -72
  112. package/vite/dist/node_modules/typescript-rtti/dist/transformer/encode-parameter.js +0 -110
  113. package/vite/dist/node_modules/typescript-rtti/dist/transformer/find-relative-path.js +0 -51
  114. package/vite/dist/node_modules/typescript-rtti/dist/transformer/flags.js +0 -59
  115. package/vite/dist/node_modules/typescript-rtti/dist/transformer/forward-ref.js +0 -35
  116. package/vite/dist/node_modules/typescript-rtti/dist/transformer/get-exports-for-symbol.js +0 -75
  117. package/vite/dist/node_modules/typescript-rtti/dist/transformer/index.js +0 -174
  118. package/vite/dist/node_modules/typescript-rtti/dist/transformer/legacy-decorator.js +0 -20
  119. package/vite/dist/node_modules/typescript-rtti/dist/transformer/legacy-type-encoder.js +0 -123
  120. package/vite/dist/node_modules/typescript-rtti/dist/transformer/literal-node.js +0 -19
  121. package/vite/dist/node_modules/typescript-rtti/dist/transformer/metadata-collector.js +0 -96
  122. package/vite/dist/node_modules/typescript-rtti/dist/transformer/metadata-decorator.js +0 -99
  123. package/vite/dist/node_modules/typescript-rtti/dist/transformer/metadata-emitter.js +0 -475
  124. package/vite/dist/node_modules/typescript-rtti/dist/transformer/metadata-encoder.js +0 -261
  125. package/vite/dist/node_modules/typescript-rtti/dist/transformer/rt-helper.js +0 -113
  126. package/vite/dist/node_modules/typescript-rtti/dist/transformer/rtti-visitor-base.js +0 -39
  127. package/vite/dist/node_modules/typescript-rtti/dist/transformer/serialize.js +0 -46
  128. package/vite/dist/node_modules/typescript-rtti/dist/transformer/type-encoder.js +0 -96
  129. package/vite/dist/node_modules/typescript-rtti/dist/transformer/type-literal.js +0 -546
  130. package/vite/dist/node_modules/typescript-rtti/dist/transformer/utils.js +0 -922
  131. package/vite/dist/node_modules/typescript-rtti/dist/transformer/workarounds.js +0 -16
@@ -1,922 +0,0 @@
1
- import "../../../../_virtual/_commonjsHelpers.js";
2
- import { __exports as utils } from "../../../../_virtual/utils.js";
3
- import "../../../../_virtual/_typescript.js";
4
- import require$$0 from "typescript";
5
- var hasRequiredUtils;
6
- function requireUtils() {
7
- if (hasRequiredUtils) return utils;
8
- hasRequiredUtils = 1;
9
- (function(exports$1) {
10
- "use strict";
11
- var __importDefault = utils && utils.__importDefault || function(mod) {
12
- return mod && mod.__esModule ? mod : { "default": mod };
13
- };
14
- Object.defineProperty(exports$1, "__esModule", { value: true });
15
- exports$1.getAllowSyntheticDefaultImports = exports$1.getEmitScriptTarget = exports$1.getEmitModuleKind = exports$1.getExportEqualsImportKind = exports$1.getDefaultLikeExportWorker = exports$1.getNameForExportDefault = exports$1.getNameForExportedSymbol = exports$1.getDefaultLikeExportInfo = exports$1.getParentOfSymbol = exports$1.normalizeSlashes = exports$1.getRootLength = exports$1.getAnyExtensionFromPath = exports$1.equateStringsCaseSensitive = exports$1.equateStringsCaseInsensitive = exports$1.altDirectorySeparator = exports$1.directorySeparator = exports$1.getBaseFileName = exports$1.removeTrailingDirectorySeparator = exports$1.isAnyDirectorySeparator = exports$1.hasTrailingDirectorySeparator = exports$1.getDirectoryPath = exports$1.removeTrailingSlash = exports$1.externalModules = exports$1.isExternalOrCommonJsModule = exports$1.referenceImportedSymbol = exports$1.getDecorators = exports$1.getModifiers = exports$1.hasModifiers = exports$1.hasModifier = exports$1.propertyNameToString = exports$1.expressionForPropertyName = exports$1.propertyPrepend = exports$1.optionalExportRef = exports$1.getPropertyRoot = exports$1.replacePropertyRoot = exports$1.dottedNameToExpr = exports$1.serializeEntityNameAsExpression = exports$1.serializeEntityNameAsExpressionFallback = exports$1.setParent = exports$1.entityNameToString = exports$1.qualifiedNameToString = exports$1.cloneEntityNameAsExpr = exports$1.cloneQualifiedName = exports$1.isFlagType = exports$1.hasAnyFlag = exports$1.hasFlag = exports$1.getRootNameOfEntityName = exports$1.getRootNameOfQualifiedName = exports$1.isInterfaceType = exports$1.assert = void 0;
16
- exports$1.fileExists = exports$1.hasFilesystemAccess = exports$1.getTypeLocality = exports$1.isStatement = exports$1.resolveName = exports$1.setGlobalFlag = exports$1.hasGlobalFlag = exports$1.isNodeJS = exports$1.typeHasValue = exports$1.skipAlias = exports$1.isTypeOnlySymbol = exports$1.removeExtension = exports$1.tryRemoveExtension = exports$1.removeFileExtension = exports$1.isQuoteOrBacktick = exports$1.stripQuotes = exports$1.stringToToken = exports$1.getOwnKeys = exports$1.getEntries = exports$1.isContextualKeyword = exports$1.isKeyword = exports$1.isNonContextualKeyword = exports$1.isStringANonContextualKeyword = exports$1.isIdentifierPart = exports$1.isIdentifierStart = exports$1.moduleSpecifierToValidIdentifier = exports$1.isUnicodeIdentifierStart = exports$1.getRttiDocTagFromSignature = exports$1.getRttiDocTagFromNode = exports$1.removeSuffix = exports$1.moduleSymbolToValidIdentifier = exports$1.isExportAssignment = exports$1.isOuterExpression = exports$1.skipOuterExpressions = exports$1.isExportDefaultSymbol = exports$1.getLocalSymbolForExportDefault = exports$1.isExternalModule = exports$1.isInJSFile = void 0;
17
- const typescript_1 = __importDefault(require$$0);
18
- function assert(check) {
19
- if (!check())
20
- throw new Error(`Assertion failed: ${check.toString().replace(/.*?=> */, "")}`);
21
- }
22
- exports$1.assert = assert;
23
- function isInterfaceType(type) {
24
- return type.isClassOrInterface() && !type.isClass();
25
- }
26
- exports$1.isInterfaceType = isInterfaceType;
27
- function getRootNameOfQualifiedName(qualifiedName) {
28
- if (typescript_1.default.isQualifiedName(qualifiedName.left))
29
- return getRootNameOfQualifiedName(qualifiedName.left);
30
- else if (typescript_1.default.isIdentifier(qualifiedName.left))
31
- return qualifiedName.left.text;
32
- }
33
- exports$1.getRootNameOfQualifiedName = getRootNameOfQualifiedName;
34
- function getRootNameOfEntityName(entityName) {
35
- if (typescript_1.default.isQualifiedName(entityName)) {
36
- return getRootNameOfQualifiedName(entityName);
37
- } else if (typescript_1.default.isIdentifier(entityName)) {
38
- return entityName.text;
39
- }
40
- }
41
- exports$1.getRootNameOfEntityName = getRootNameOfEntityName;
42
- function hasFlag(flags, flag) {
43
- return (flags & flag) !== 0;
44
- }
45
- exports$1.hasFlag = hasFlag;
46
- function hasAnyFlag(flags, possibleFlags) {
47
- return possibleFlags.some((x) => hasFlag(flags, x));
48
- }
49
- exports$1.hasAnyFlag = hasAnyFlag;
50
- function isFlagType(type, flag) {
51
- return hasFlag(type.flags, flag);
52
- }
53
- exports$1.isFlagType = isFlagType;
54
- function cloneQualifiedName(qualifiedName, rootName) {
55
- let left;
56
- if (typescript_1.default.isIdentifier(qualifiedName.left)) {
57
- left = typescript_1.default.factory.createIdentifier(rootName);
58
- } else {
59
- left = cloneEntityNameAsExpr(qualifiedName.left, rootName);
60
- }
61
- return typescript_1.default.factory.createPropertyAccessExpression(left, cloneEntityNameAsExpr(qualifiedName.right));
62
- }
63
- exports$1.cloneQualifiedName = cloneQualifiedName;
64
- function cloneEntityNameAsExpr(entityName, rootName) {
65
- if (typescript_1.default.isQualifiedName(entityName))
66
- return cloneQualifiedName(entityName, rootName);
67
- else if (typescript_1.default.isIdentifier(entityName))
68
- return typescript_1.default.factory.createIdentifier(entityName.text);
69
- }
70
- exports$1.cloneEntityNameAsExpr = cloneEntityNameAsExpr;
71
- function qualifiedNameToString(qualifiedName) {
72
- return typescript_1.default.isIdentifier(qualifiedName.left) ? qualifiedName.left.text + "." + qualifiedName.right.text : entityNameToString(qualifiedName.left) + "." + qualifiedName.right.text;
73
- }
74
- exports$1.qualifiedNameToString = qualifiedNameToString;
75
- function entityNameToString(entityName) {
76
- if (typescript_1.default.isQualifiedName(entityName))
77
- return qualifiedNameToString(entityName);
78
- else if (typescript_1.default.isIdentifier(entityName))
79
- return entityName.text;
80
- }
81
- exports$1.entityNameToString = entityNameToString;
82
- function createCheckedValue(left, right) {
83
- return typescript_1.default.factory.createLogicalAnd(typescript_1.default.factory.createStrictInequality(typescript_1.default.factory.createTypeOfExpression(left), typescript_1.default.factory.createStringLiteral("undefined")), right);
84
- }
85
- function setParent(child, parent) {
86
- if (child && parent) {
87
- child.parent = parent;
88
- }
89
- return child;
90
- }
91
- exports$1.setParent = setParent;
92
- function serializeEntityNameAsExpressionFallback(node, context, currentLexicalScope) {
93
- if (node.kind === typescript_1.default.SyntaxKind.Identifier) {
94
- const copied = serializeEntityNameAsExpression(node, currentLexicalScope);
95
- return createCheckedValue(copied, copied);
96
- }
97
- if (node.left.kind === typescript_1.default.SyntaxKind.Identifier) {
98
- return createCheckedValue(serializeEntityNameAsExpression(node.left, currentLexicalScope), serializeEntityNameAsExpression(node, currentLexicalScope));
99
- }
100
- const left = serializeEntityNameAsExpressionFallback(node.left, context, currentLexicalScope);
101
- const temp = typescript_1.default.factory.createTempVariable(context.hoistVariableDeclaration);
102
- return typescript_1.default.factory.createLogicalAnd(typescript_1.default.factory.createLogicalAnd(left.left, typescript_1.default.factory.createStrictInequality(typescript_1.default.factory.createAssignment(temp, left.right), typescript_1.default.factory.createVoidZero())), typescript_1.default.factory.createPropertyAccessExpression(temp, node.right));
103
- }
104
- exports$1.serializeEntityNameAsExpressionFallback = serializeEntityNameAsExpressionFallback;
105
- function serializeEntityNameAsExpression(node, currentLexicalScope) {
106
- switch (node.kind) {
107
- case typescript_1.default.SyntaxKind.Identifier:
108
- const name = setParent(typescript_1.default.setTextRange(typescript_1.default.factory["cloneNode"](node), node), node.parent);
109
- name["original"] = void 0;
110
- setParent(name, typescript_1.default.getParseTreeNode(currentLexicalScope));
111
- return name;
112
- case typescript_1.default.SyntaxKind.QualifiedName:
113
- return serializeQualifiedNameAsExpression(node, currentLexicalScope);
114
- }
115
- }
116
- exports$1.serializeEntityNameAsExpression = serializeEntityNameAsExpression;
117
- function serializeQualifiedNameAsExpression(node, currentLexicalScope) {
118
- return typescript_1.default.factory.createPropertyAccessExpression(serializeEntityNameAsExpression(node.left, currentLexicalScope), node.right);
119
- }
120
- function dottedNameToExpr(dottedName) {
121
- return dottedName.split(".").map((ident) => typescript_1.default.factory.createIdentifier(ident)).reduce((pv, cv) => pv ? typescript_1.default.factory.createPropertyAccessExpression(pv, cv) : cv);
122
- }
123
- exports$1.dottedNameToExpr = dottedNameToExpr;
124
- function replacePropertyRoot(propertyExpr, newRootExpr) {
125
- if (typescript_1.default.isPropertyAccessExpression(propertyExpr.expression)) {
126
- return typescript_1.default.factory.createPropertyAccessExpression(replacePropertyRoot(propertyExpr.expression, newRootExpr), propertyExpr.name);
127
- } else {
128
- return typescript_1.default.factory.createPropertyAccessExpression(newRootExpr, propertyExpr.name);
129
- }
130
- }
131
- exports$1.replacePropertyRoot = replacePropertyRoot;
132
- function getPropertyRoot(propertyExpr) {
133
- if (typescript_1.default.isPropertyAccessExpression(propertyExpr.expression))
134
- return getPropertyRoot(propertyExpr.expression);
135
- return propertyExpr.expression;
136
- }
137
- exports$1.getPropertyRoot = getPropertyRoot;
138
- function optionalExportRef(object, expr) {
139
- let propertyName;
140
- let propertyAccess;
141
- if (typescript_1.default.isIdentifier(expr)) {
142
- propertyName = expr.text;
143
- } else if (typescript_1.default.isPropertyAccessExpression(expr)) {
144
- let propertyRoot = getPropertyRoot(expr);
145
- propertyAccess = expr;
146
- if (typescript_1.default.isIdentifier(propertyRoot)) {
147
- propertyName = propertyRoot.text;
148
- } else {
149
- throw new Error(`Property root should have been an identifier!`);
150
- }
151
- }
152
- let callExpr = typescript_1.default.factory.createCallExpression(typescript_1.default.factory.createPropertyAccessExpression(typescript_1.default.factory.createIdentifier("__RΦ"), "oe"), [], [
153
- object,
154
- typescript_1.default.factory.createStringLiteral(propertyName)
155
- ]);
156
- if (propertyAccess)
157
- return replacePropertyRoot(propertyAccess, callExpr);
158
- return callExpr;
159
- }
160
- exports$1.optionalExportRef = optionalExportRef;
161
- function propertyPrepend(expr, propAccess) {
162
- if (typescript_1.default.isIdentifier(propAccess)) {
163
- return typescript_1.default.factory.createPropertyAccessExpression(expr, propAccess);
164
- } else if (typescript_1.default.isPropertyAccessExpression(propAccess.expression)) {
165
- return typescript_1.default.factory.createPropertyAccessExpression(propertyPrepend(expr, propAccess.expression), propAccess.name);
166
- } else if (typescript_1.default.isIdentifier(propAccess.expression)) {
167
- return typescript_1.default.factory.createPropertyAccessExpression(typescript_1.default.factory.createPropertyAccessExpression(expr, propAccess.expression), propAccess.name);
168
- } else {
169
- console.dir(propAccess);
170
- throw new Error(`Unsupported expression type '${typescript_1.default.SyntaxKind[propAccess.kind]}'`);
171
- }
172
- }
173
- exports$1.propertyPrepend = propertyPrepend;
174
- function expressionForPropertyName(propName) {
175
- if (typescript_1.default.isComputedPropertyName(propName)) {
176
- return propName.expression;
177
- } else if (typescript_1.default.isIdentifier(propName)) {
178
- return typescript_1.default.factory.createStringLiteral(propName.text);
179
- } else if (typescript_1.default.isStringLiteral(propName)) {
180
- return typescript_1.default.factory.createStringLiteral(propName.text);
181
- } else if (typescript_1.default.isPrivateIdentifier(propName)) {
182
- return typescript_1.default.factory.createStringLiteral(propName.text);
183
- } else {
184
- throw new Error(`Unexpected property name node of type '${typescript_1.default.SyntaxKind[propName.kind]}'! Please file a bug!`);
185
- }
186
- }
187
- exports$1.expressionForPropertyName = expressionForPropertyName;
188
- function propertyNameToString(propName) {
189
- if (!propName)
190
- return `<undefined>`;
191
- if (propName.getSourceFile()) {
192
- return propName.getText();
193
- }
194
- if (typescript_1.default.isComputedPropertyName(propName)) {
195
- return `(computed property name)`;
196
- } else if (typescript_1.default.isIdentifier(propName)) {
197
- return propName.text;
198
- } else if (typescript_1.default.isStringLiteral(propName)) {
199
- return `"${propName.text}"`;
200
- } else if (typescript_1.default.isPrivateIdentifier(propName)) {
201
- return propName.text;
202
- } else {
203
- throw new Error(`Unexpected property name node of type '${typescript_1.default.SyntaxKind[propName.kind]}'! Please file a bug!`);
204
- }
205
- }
206
- exports$1.propertyNameToString = propertyNameToString;
207
- function hasModifier(modifiers, modifier) {
208
- var _a;
209
- return (_a = modifiers === null || modifiers === void 0 ? void 0 : modifiers.some((x) => x.kind === modifier)) !== null && _a !== void 0 ? _a : false;
210
- }
211
- exports$1.hasModifier = hasModifier;
212
- function hasModifiers(modifiersArray, modifiers) {
213
- return modifiers.every((modifier) => hasModifier(modifiersArray, modifier));
214
- }
215
- exports$1.hasModifiers = hasModifiers;
216
- function getModifiers(node) {
217
- var _a;
218
- return typescript_1.default.canHaveModifiers(node) ? (_a = typescript_1.default.getModifiers(node)) !== null && _a !== void 0 ? _a : [] : [];
219
- }
220
- exports$1.getModifiers = getModifiers;
221
- function getDecorators(node) {
222
- var _a;
223
- return typescript_1.default.canHaveDecorators(node) ? (_a = typescript_1.default.getDecorators(node)) !== null && _a !== void 0 ? _a : [] : [];
224
- }
225
- exports$1.getDecorators = getDecorators;
226
- function referenceImportedSymbol(ctx, modulePath, identifier, hasValue, importDecl) {
227
- let impo = ctx.importMap.get(`*:${modulePath}`);
228
- if (!impo) {
229
- ctx.importMap.set(`*:${modulePath}`, impo = {
230
- importDeclaration: importDecl !== null && importDecl !== void 0 ? importDecl : ctx.currentTopStatement,
231
- isDefault: false,
232
- isNamespace: true,
233
- localName: `LΦ_${ctx.freeImportReference++}`,
234
- modulePath,
235
- name: `*:${modulePath}`,
236
- refName: "",
237
- referenced: true
238
- });
239
- }
240
- impo.referenced = true;
241
- if (hasValue === true) {
242
- return typescript_1.default.factory.createPropertyAccessExpression(typescript_1.default.factory.createIdentifier(impo.localName), identifier);
243
- } else if (hasValue === false) {
244
- return typescript_1.default.factory.createPropertyAccessExpression(typescript_1.default.factory.createIdentifier(impo.localName), `IΦ${identifier}`);
245
- }
246
- return typescript_1.default.factory.createBinaryExpression(typescript_1.default.factory.createPropertyAccessExpression(typescript_1.default.factory.createIdentifier(impo.localName), identifier), typescript_1.default.factory.createToken(typescript_1.default.SyntaxKind.QuestionQuestionToken), typescript_1.default.factory.createPropertyAccessExpression(typescript_1.default.factory.createIdentifier(impo.localName), `IΦ${identifier}`));
247
- }
248
- exports$1.referenceImportedSymbol = referenceImportedSymbol;
249
- function isExternalOrCommonJsModule(file) {
250
- return (file["externalModuleIndicator"] || file["commonJsModuleIndicator"]) !== void 0;
251
- }
252
- exports$1.isExternalOrCommonJsModule = isExternalOrCommonJsModule;
253
- function* externalModules(program) {
254
- let checker = program.getTypeChecker();
255
- for (const ambient of checker.getAmbientModules()) {
256
- yield [
257
- ambient,
258
- /*sourceFile*/
259
- void 0
260
- ];
261
- }
262
- for (const sourceFile of program.getSourceFiles()) {
263
- if (isExternalOrCommonJsModule(sourceFile)) {
264
- yield [checker["getMergedSymbol"](sourceFile["symbol"]), sourceFile];
265
- }
266
- }
267
- }
268
- exports$1.externalModules = externalModules;
269
- function removeTrailingSlash(path) {
270
- return path.replace(/[/\\]+$/, "");
271
- }
272
- exports$1.removeTrailingSlash = removeTrailingSlash;
273
- function getDirectoryPath(path) {
274
- return removeTrailingSlash(removeTrailingSlash(path).replace(/[/\\][^/\\]+$/, ""));
275
- }
276
- exports$1.getDirectoryPath = getDirectoryPath;
277
- function hasTrailingDirectorySeparator(path) {
278
- return path.length > 0 && isAnyDirectorySeparator(path.charCodeAt(path.length - 1));
279
- }
280
- exports$1.hasTrailingDirectorySeparator = hasTrailingDirectorySeparator;
281
- function isAnyDirectorySeparator(charCode) {
282
- return charCode === 47 || charCode === 92;
283
- }
284
- exports$1.isAnyDirectorySeparator = isAnyDirectorySeparator;
285
- function removeTrailingDirectorySeparator(path) {
286
- if (hasTrailingDirectorySeparator(path)) {
287
- return path.substr(0, path.length - 1);
288
- }
289
- return path;
290
- }
291
- exports$1.removeTrailingDirectorySeparator = removeTrailingDirectorySeparator;
292
- function getBaseFileName(path, extensions, ignoreCase) {
293
- path = normalizeSlashes(path);
294
- const rootLength = getRootLength(path);
295
- if (rootLength === path.length)
296
- return "";
297
- path = removeTrailingDirectorySeparator(path);
298
- const name = path.slice(Math.max(getRootLength(path), path.lastIndexOf(exports$1.directorySeparator) + 1));
299
- const extension = extensions !== void 0 && ignoreCase !== void 0 ? getAnyExtensionFromPath(name, extensions, ignoreCase) : void 0;
300
- return extension ? name.slice(0, name.length - extension.length) : name;
301
- }
302
- exports$1.getBaseFileName = getBaseFileName;
303
- const backslashRegExp = /\\/g;
304
- exports$1.directorySeparator = "/";
305
- exports$1.altDirectorySeparator = "\\";
306
- const urlSchemeSeparator = "://";
307
- function equateStringsCaseInsensitive(a, b) {
308
- return a === b || a !== void 0 && b !== void 0 && a.toUpperCase() === b.toUpperCase();
309
- }
310
- exports$1.equateStringsCaseInsensitive = equateStringsCaseInsensitive;
311
- function equateStringsCaseSensitive(a, b) {
312
- return a === b;
313
- }
314
- exports$1.equateStringsCaseSensitive = equateStringsCaseSensitive;
315
- function getAnyExtensionFromPath(path, extensions, ignoreCase) {
316
- if (extensions) {
317
- return getAnyExtensionFromPathWorker(removeTrailingDirectorySeparator(path), extensions, ignoreCase ? equateStringsCaseInsensitive : equateStringsCaseSensitive);
318
- }
319
- const baseFileName = getBaseFileName(path);
320
- const extensionIndex = baseFileName.lastIndexOf(".");
321
- if (extensionIndex >= 0) {
322
- return baseFileName.substring(extensionIndex);
323
- }
324
- return "";
325
- }
326
- exports$1.getAnyExtensionFromPath = getAnyExtensionFromPath;
327
- function getAnyExtensionFromPathWorker(path, extensions, stringEqualityComparer) {
328
- if (typeof extensions === "string") {
329
- return tryGetExtensionFromPath(path, extensions, stringEqualityComparer) || "";
330
- }
331
- for (const extension of extensions) {
332
- const result = tryGetExtensionFromPath(path, extension, stringEqualityComparer);
333
- if (result)
334
- return result;
335
- }
336
- return "";
337
- }
338
- function tryGetExtensionFromPath(path, extension, stringEqualityComparer) {
339
- if (!extension.startsWith("."))
340
- extension = "." + extension;
341
- if (path.length >= extension.length && path.charCodeAt(path.length - extension.length) === 46) {
342
- const pathExtension = path.slice(path.length - extension.length);
343
- if (stringEqualityComparer(pathExtension, extension)) {
344
- return pathExtension;
345
- }
346
- }
347
- }
348
- function getRootLength(path) {
349
- const rootLength = getEncodedRootLength(path);
350
- return rootLength < 0 ? ~rootLength : rootLength;
351
- }
352
- exports$1.getRootLength = getRootLength;
353
- function isVolumeCharacter(charCode) {
354
- return charCode >= 97 && charCode <= 122 || charCode >= 65 && charCode <= 90;
355
- }
356
- function getFileUrlVolumeSeparatorEnd(url, start) {
357
- const ch0 = url.charCodeAt(start);
358
- if (ch0 === 58)
359
- return start + 1;
360
- if (ch0 === 37 && url.charCodeAt(start + 1) === 51) {
361
- const ch2 = url.charCodeAt(start + 2);
362
- if (ch2 === 97 || ch2 === 65)
363
- return start + 3;
364
- }
365
- return -1;
366
- }
367
- function getEncodedRootLength(path) {
368
- if (!path)
369
- return 0;
370
- const ch0 = path.charCodeAt(0);
371
- if (ch0 === 47 || ch0 === 92) {
372
- if (path.charCodeAt(1) !== ch0)
373
- return 1;
374
- const p1 = path.indexOf(ch0 === 47 ? exports$1.directorySeparator : exports$1.altDirectorySeparator, 2);
375
- if (p1 < 0)
376
- return path.length;
377
- return p1 + 1;
378
- }
379
- if (isVolumeCharacter(ch0) && path.charCodeAt(1) === 58) {
380
- const ch2 = path.charCodeAt(2);
381
- if (ch2 === 47 || ch2 === 92)
382
- return 3;
383
- if (path.length === 2)
384
- return 2;
385
- }
386
- const schemeEnd = path.indexOf(urlSchemeSeparator);
387
- if (schemeEnd !== -1) {
388
- const authorityStart = schemeEnd + urlSchemeSeparator.length;
389
- const authorityEnd = path.indexOf(exports$1.directorySeparator, authorityStart);
390
- if (authorityEnd !== -1) {
391
- const scheme = path.slice(0, schemeEnd);
392
- const authority = path.slice(authorityStart, authorityEnd);
393
- if (scheme === "file" && (authority === "" || authority === "localhost") && isVolumeCharacter(path.charCodeAt(authorityEnd + 1))) {
394
- const volumeSeparatorEnd = getFileUrlVolumeSeparatorEnd(path, authorityEnd + 2);
395
- if (volumeSeparatorEnd !== -1) {
396
- if (path.charCodeAt(volumeSeparatorEnd) === 47) {
397
- return ~(volumeSeparatorEnd + 1);
398
- }
399
- if (volumeSeparatorEnd === path.length) {
400
- return ~volumeSeparatorEnd;
401
- }
402
- }
403
- }
404
- return ~(authorityEnd + 1);
405
- }
406
- return ~path.length;
407
- }
408
- return 0;
409
- }
410
- function normalizeSlashes(path) {
411
- return path.replace(backslashRegExp, exports$1.directorySeparator);
412
- }
413
- exports$1.normalizeSlashes = normalizeSlashes;
414
- function getParentOfSymbol(symbol) {
415
- return symbol["parent"];
416
- }
417
- exports$1.getParentOfSymbol = getParentOfSymbol;
418
- function getDefaultLikeExportInfo(importingFile, moduleSymbol, checker, compilerOptions) {
419
- const exported = getDefaultLikeExportWorker(importingFile, moduleSymbol, checker, compilerOptions);
420
- if (!exported)
421
- return void 0;
422
- const { symbol, kind } = exported;
423
- const info = getDefaultExportInfoWorker(symbol, checker, compilerOptions);
424
- return info && Object.assign({ symbol, kind }, info);
425
- }
426
- exports$1.getDefaultLikeExportInfo = getDefaultLikeExportInfo;
427
- function getDefaultExportInfoWorker(defaultExport, checker, compilerOptions) {
428
- const localSymbol = getLocalSymbolForExportDefault(defaultExport);
429
- if (localSymbol)
430
- return { symbolForMeaning: localSymbol, name: localSymbol.name };
431
- const name = getNameForExportDefault(defaultExport);
432
- if (name !== void 0)
433
- return { symbolForMeaning: defaultExport, name };
434
- if (defaultExport.flags & typescript_1.default.SymbolFlags.Alias) {
435
- const aliased = checker.getImmediateAliasedSymbol(defaultExport);
436
- if (aliased && getParentOfSymbol(aliased)) {
437
- return getDefaultExportInfoWorker(aliased, checker, compilerOptions);
438
- }
439
- }
440
- if (defaultExport.escapedName !== typescript_1.default.InternalSymbolName.Default && defaultExport.escapedName !== typescript_1.default.InternalSymbolName.ExportEquals) {
441
- return { symbolForMeaning: defaultExport, name: defaultExport.getName() };
442
- }
443
- return { symbolForMeaning: defaultExport, name: getNameForExportedSymbol(defaultExport, compilerOptions.target) };
444
- }
445
- function getSymbolParentOrFail(symbol) {
446
- var _a;
447
- let parent = getParentOfSymbol(symbol);
448
- if (!parent) {
449
- throw new Error(`RTTI: Symbol parent was undefined. Flags: ${symbol.flags}. Declarations: ${(_a = symbol.declarations) === null || _a === void 0 ? void 0 : _a.map((d) => {
450
- const inJS = isInJSFile(d);
451
- const { expression } = d;
452
- return (inJS ? "[JS]" : "") + d.kind + (expression ? ` (expression: ${expression.kind})` : "");
453
- }).join(", ")}.`);
454
- }
455
- return parent;
456
- }
457
- function getNameForExportedSymbol(symbol, scriptTarget) {
458
- if (!(symbol.flags & typescript_1.default.SymbolFlags.Transient) && (symbol.escapedName === typescript_1.default.InternalSymbolName.ExportEquals || symbol.escapedName === typescript_1.default.InternalSymbolName.Default)) {
459
- if (!symbol.declarations)
460
- return void 0;
461
- for (let d of symbol.declarations) {
462
- if (isExportAssignment(d)) {
463
- let expr = skipOuterExpressions(d.expression);
464
- if (typescript_1.default.isIdentifier(expr))
465
- return expr.text;
466
- let x = moduleSymbolToValidIdentifier(getSymbolParentOrFail(symbol), scriptTarget);
467
- if (x)
468
- return x;
469
- }
470
- }
471
- return void 0;
472
- }
473
- return symbol.name;
474
- }
475
- exports$1.getNameForExportedSymbol = getNameForExportedSymbol;
476
- function getNameForExportDefault(symbol) {
477
- if (!symbol.declarations)
478
- return void 0;
479
- let firstDefined = symbol.declarations.find((x) => x !== void 0);
480
- for (let declaration of symbol.declarations) {
481
- if (typescript_1.default.isExportAssignment(declaration)) {
482
- let expr = skipOuterExpressions(declaration.expression);
483
- if (typescript_1.default.isIdentifier(expr))
484
- return expr.text;
485
- } else if (typescript_1.default.isExportSpecifier(declaration)) {
486
- if (declaration.name.text !== typescript_1.default.InternalSymbolName.Default)
487
- throw new Error("Expected the specifier to be a default export");
488
- return declaration.propertyName && declaration.propertyName.text;
489
- }
490
- }
491
- }
492
- exports$1.getNameForExportDefault = getNameForExportDefault;
493
- function getDefaultLikeExportWorker(importingFile, moduleSymbol, checker, compilerOptions) {
494
- const defaultExport = checker.tryGetMemberInModuleExports(typescript_1.default.InternalSymbolName.Default, moduleSymbol);
495
- if (defaultExport)
496
- return {
497
- symbol: defaultExport,
498
- kind: 1
499
- /* ImportKind.Default */
500
- };
501
- const exportEquals = checker.resolveExternalModuleSymbol(moduleSymbol);
502
- return exportEquals === moduleSymbol ? void 0 : { symbol: exportEquals, kind: getExportEqualsImportKind(importingFile, compilerOptions) };
503
- }
504
- exports$1.getDefaultLikeExportWorker = getDefaultLikeExportWorker;
505
- function getExportEqualsImportKind(importingFile, compilerOptions) {
506
- const allowSyntheticDefaults = getAllowSyntheticDefaultImports(compilerOptions);
507
- if (getEmitModuleKind(compilerOptions) >= typescript_1.default.ModuleKind.ES2015) {
508
- return allowSyntheticDefaults ? 1 : 2;
509
- }
510
- if (isInJSFile(importingFile)) {
511
- return isExternalModule(importingFile) ? 1 : 3;
512
- }
513
- for (const statement of importingFile.statements) {
514
- if (statement.kind === typescript_1.default.SyntaxKind.ImportEqualsDeclaration) {
515
- return 3;
516
- }
517
- }
518
- return allowSyntheticDefaults ? 1 : 3;
519
- }
520
- exports$1.getExportEqualsImportKind = getExportEqualsImportKind;
521
- function getEmitModuleKind(compilerOptions) {
522
- return typeof compilerOptions.module === "number" ? compilerOptions.module : getEmitScriptTarget(compilerOptions) >= typescript_1.default.ScriptTarget.ES2015 ? typescript_1.default.ModuleKind.ES2015 : typescript_1.default.ModuleKind.CommonJS;
523
- }
524
- exports$1.getEmitModuleKind = getEmitModuleKind;
525
- function getEmitScriptTarget(compilerOptions) {
526
- return compilerOptions.target || typescript_1.default.ScriptTarget.ES3;
527
- }
528
- exports$1.getEmitScriptTarget = getEmitScriptTarget;
529
- function getAllowSyntheticDefaultImports(compilerOptions) {
530
- const moduleKind = getEmitModuleKind(compilerOptions);
531
- return compilerOptions.allowSyntheticDefaultImports !== void 0 ? compilerOptions.allowSyntheticDefaultImports : compilerOptions.esModuleInterop || moduleKind === typescript_1.default.ModuleKind.System;
532
- }
533
- exports$1.getAllowSyntheticDefaultImports = getAllowSyntheticDefaultImports;
534
- function isInJSFile(node) {
535
- return !!node && !!(node.flags & typescript_1.default.NodeFlags.JavaScriptFile);
536
- }
537
- exports$1.isInJSFile = isInJSFile;
538
- function isExternalModule(file) {
539
- return file.externalModuleIndicator !== void 0;
540
- }
541
- exports$1.isExternalModule = isExternalModule;
542
- function getLocalSymbolForExportDefault(symbol) {
543
- if (!isExportDefaultSymbol(symbol))
544
- return void 0;
545
- if (!symbol.declarations)
546
- return void 0;
547
- for (const decl of symbol.declarations) {
548
- if (decl.localSymbol)
549
- return decl.localSymbol;
550
- }
551
- return void 0;
552
- }
553
- exports$1.getLocalSymbolForExportDefault = getLocalSymbolForExportDefault;
554
- function isExportDefaultSymbol(symbol) {
555
- var _a, _b;
556
- if (!symbol.declarations)
557
- return false;
558
- return symbol && ((_b = (_a = symbol.declarations) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0) > 0 && hasModifier(typescript_1.default.canHaveModifiers(symbol.declarations[0]) ? typescript_1.default.getModifiers(symbol.declarations[0]) : [], typescript_1.default.SyntaxKind.DefaultKeyword);
559
- }
560
- exports$1.isExportDefaultSymbol = isExportDefaultSymbol;
561
- function skipOuterExpressions(node, kinds = typescript_1.default.OuterExpressionKinds.All) {
562
- while (isOuterExpression(node, kinds)) {
563
- node = node.expression;
564
- }
565
- return node;
566
- }
567
- exports$1.skipOuterExpressions = skipOuterExpressions;
568
- function isOuterExpression(node, kinds = typescript_1.default.OuterExpressionKinds.All) {
569
- switch (node.kind) {
570
- case typescript_1.default.SyntaxKind.ParenthesizedExpression:
571
- return (kinds & typescript_1.default.OuterExpressionKinds.Parentheses) !== 0;
572
- case typescript_1.default.SyntaxKind.TypeAssertionExpression:
573
- case typescript_1.default.SyntaxKind.AsExpression:
574
- return (kinds & typescript_1.default.OuterExpressionKinds.TypeAssertions) !== 0;
575
- case typescript_1.default.SyntaxKind.NonNullExpression:
576
- return (kinds & typescript_1.default.OuterExpressionKinds.NonNullAssertions) !== 0;
577
- case typescript_1.default.SyntaxKind.PartiallyEmittedExpression:
578
- return (kinds & typescript_1.default.OuterExpressionKinds.PartiallyEmittedExpressions) !== 0;
579
- }
580
- return false;
581
- }
582
- exports$1.isOuterExpression = isOuterExpression;
583
- function isExportAssignment(node) {
584
- return node.kind === typescript_1.default.SyntaxKind.ExportAssignment;
585
- }
586
- exports$1.isExportAssignment = isExportAssignment;
587
- function moduleSymbolToValidIdentifier(moduleSymbol, target) {
588
- return moduleSpecifierToValidIdentifier(removeFileExtension(stripQuotes(moduleSymbol.name)), target);
589
- }
590
- exports$1.moduleSymbolToValidIdentifier = moduleSymbolToValidIdentifier;
591
- function removeSuffix(str, suffix) {
592
- return str.endsWith(suffix) ? str.slice(0, str.length - suffix.length) : str;
593
- }
594
- exports$1.removeSuffix = removeSuffix;
595
- function getRttiDocTagFromNode(element, tagName) {
596
- let tags = typescript_1.default.getJSDocTags(element);
597
- if (!tags)
598
- return void 0;
599
- let match = tags.find((x) => x.tagName.text === "rtti" && typeof x.comment === "string" && (x.comment.startsWith(`:${tagName} `) || x.comment === `:${tagName}`));
600
- if (!match)
601
- return void 0;
602
- return match.comment.slice(`:${tagName} `.length);
603
- }
604
- exports$1.getRttiDocTagFromNode = getRttiDocTagFromNode;
605
- function getRttiDocTagFromSignature(signature, tagName) {
606
- let jsDocTags = signature.getJsDocTags();
607
- if (!jsDocTags)
608
- return void 0;
609
- let tag = jsDocTags.find((x) => {
610
- var _a;
611
- return x.name === "rtti" && ((_a = x.text[0]) === null || _a === void 0 ? void 0 : _a.text.startsWith(`:${tagName} `));
612
- });
613
- if (!tag)
614
- return void 0;
615
- let comment = tag.text[0].text;
616
- let value = comment.slice(`:${tagName} `.length);
617
- return value;
618
- }
619
- exports$1.getRttiDocTagFromSignature = getRttiDocTagFromSignature;
620
- const unicodeES3IdentifierStart = [170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 543, 546, 563, 592, 685, 688, 696, 699, 705, 720, 721, 736, 740, 750, 750, 890, 890, 902, 902, 904, 906, 908, 908, 910, 929, 931, 974, 976, 983, 986, 1011, 1024, 1153, 1164, 1220, 1223, 1224, 1227, 1228, 1232, 1269, 1272, 1273, 1329, 1366, 1369, 1369, 1377, 1415, 1488, 1514, 1520, 1522, 1569, 1594, 1600, 1610, 1649, 1747, 1749, 1749, 1765, 1766, 1786, 1788, 1808, 1808, 1810, 1836, 1920, 1957, 2309, 2361, 2365, 2365, 2384, 2384, 2392, 2401, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2524, 2525, 2527, 2529, 2544, 2545, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2649, 2652, 2654, 2654, 2674, 2676, 2693, 2699, 2701, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2749, 2749, 2768, 2768, 2784, 2784, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2870, 2873, 2877, 2877, 2908, 2909, 2911, 2913, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 2997, 2999, 3001, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123, 3125, 3129, 3168, 3169, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3294, 3294, 3296, 3297, 3333, 3340, 3342, 3344, 3346, 3368, 3370, 3385, 3424, 3425, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3585, 3632, 3634, 3635, 3648, 3654, 3713, 3714, 3716, 3716, 3719, 3720, 3722, 3722, 3725, 3725, 3732, 3735, 3737, 3743, 3745, 3747, 3749, 3749, 3751, 3751, 3754, 3755, 3757, 3760, 3762, 3763, 3773, 3773, 3776, 3780, 3782, 3782, 3804, 3805, 3840, 3840, 3904, 3911, 3913, 3946, 3976, 3979, 4096, 4129, 4131, 4135, 4137, 4138, 4176, 4181, 4256, 4293, 4304, 4342, 4352, 4441, 4447, 4514, 4520, 4601, 4608, 4614, 4616, 4678, 4680, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4742, 4744, 4744, 4746, 4749, 4752, 4782, 4784, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4814, 4816, 4822, 4824, 4846, 4848, 4878, 4880, 4880, 4882, 4885, 4888, 4894, 4896, 4934, 4936, 4954, 5024, 5108, 5121, 5740, 5743, 5750, 5761, 5786, 5792, 5866, 6016, 6067, 6176, 6263, 6272, 6312, 7680, 7835, 7840, 7929, 7936, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8319, 8319, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8493, 8495, 8497, 8499, 8505, 8544, 8579, 12293, 12295, 12321, 12329, 12337, 12341, 12344, 12346, 12353, 12436, 12445, 12446, 12449, 12538, 12540, 12542, 12549, 12588, 12593, 12686, 12704, 12727, 13312, 19893, 19968, 40869, 40960, 42124, 44032, 55203, 63744, 64045, 64256, 64262, 64275, 64279, 64285, 64285, 64287, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65136, 65138, 65140, 65140, 65142, 65276, 65313, 65338, 65345, 65370, 65382, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500];
621
- const unicodeES3IdentifierPart = [170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 543, 546, 563, 592, 685, 688, 696, 699, 705, 720, 721, 736, 740, 750, 750, 768, 846, 864, 866, 890, 890, 902, 902, 904, 906, 908, 908, 910, 929, 931, 974, 976, 983, 986, 1011, 1024, 1153, 1155, 1158, 1164, 1220, 1223, 1224, 1227, 1228, 1232, 1269, 1272, 1273, 1329, 1366, 1369, 1369, 1377, 1415, 1425, 1441, 1443, 1465, 1467, 1469, 1471, 1471, 1473, 1474, 1476, 1476, 1488, 1514, 1520, 1522, 1569, 1594, 1600, 1621, 1632, 1641, 1648, 1747, 1749, 1756, 1759, 1768, 1770, 1773, 1776, 1788, 1808, 1836, 1840, 1866, 1920, 1968, 2305, 2307, 2309, 2361, 2364, 2381, 2384, 2388, 2392, 2403, 2406, 2415, 2433, 2435, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2492, 2492, 2494, 2500, 2503, 2504, 2507, 2509, 2519, 2519, 2524, 2525, 2527, 2531, 2534, 2545, 2562, 2562, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2620, 2620, 2622, 2626, 2631, 2632, 2635, 2637, 2649, 2652, 2654, 2654, 2662, 2676, 2689, 2691, 2693, 2699, 2701, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2748, 2757, 2759, 2761, 2763, 2765, 2768, 2768, 2784, 2784, 2790, 2799, 2817, 2819, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2870, 2873, 2876, 2883, 2887, 2888, 2891, 2893, 2902, 2903, 2908, 2909, 2911, 2913, 2918, 2927, 2946, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 2997, 2999, 3001, 3006, 3010, 3014, 3016, 3018, 3021, 3031, 3031, 3047, 3055, 3073, 3075, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123, 3125, 3129, 3134, 3140, 3142, 3144, 3146, 3149, 3157, 3158, 3168, 3169, 3174, 3183, 3202, 3203, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3262, 3268, 3270, 3272, 3274, 3277, 3285, 3286, 3294, 3294, 3296, 3297, 3302, 3311, 3330, 3331, 3333, 3340, 3342, 3344, 3346, 3368, 3370, 3385, 3390, 3395, 3398, 3400, 3402, 3405, 3415, 3415, 3424, 3425, 3430, 3439, 3458, 3459, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3530, 3530, 3535, 3540, 3542, 3542, 3544, 3551, 3570, 3571, 3585, 3642, 3648, 3662, 3664, 3673, 3713, 3714, 3716, 3716, 3719, 3720, 3722, 3722, 3725, 3725, 3732, 3735, 3737, 3743, 3745, 3747, 3749, 3749, 3751, 3751, 3754, 3755, 3757, 3769, 3771, 3773, 3776, 3780, 3782, 3782, 3784, 3789, 3792, 3801, 3804, 3805, 3840, 3840, 3864, 3865, 3872, 3881, 3893, 3893, 3895, 3895, 3897, 3897, 3902, 3911, 3913, 3946, 3953, 3972, 3974, 3979, 3984, 3991, 3993, 4028, 4038, 4038, 4096, 4129, 4131, 4135, 4137, 4138, 4140, 4146, 4150, 4153, 4160, 4169, 4176, 4185, 4256, 4293, 4304, 4342, 4352, 4441, 4447, 4514, 4520, 4601, 4608, 4614, 4616, 4678, 4680, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4742, 4744, 4744, 4746, 4749, 4752, 4782, 4784, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4814, 4816, 4822, 4824, 4846, 4848, 4878, 4880, 4880, 4882, 4885, 4888, 4894, 4896, 4934, 4936, 4954, 4969, 4977, 5024, 5108, 5121, 5740, 5743, 5750, 5761, 5786, 5792, 5866, 6016, 6099, 6112, 6121, 6160, 6169, 6176, 6263, 6272, 6313, 7680, 7835, 7840, 7929, 7936, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8255, 8256, 8319, 8319, 8400, 8412, 8417, 8417, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8493, 8495, 8497, 8499, 8505, 8544, 8579, 12293, 12295, 12321, 12335, 12337, 12341, 12344, 12346, 12353, 12436, 12441, 12442, 12445, 12446, 12449, 12542, 12549, 12588, 12593, 12686, 12704, 12727, 13312, 19893, 19968, 40869, 40960, 42124, 44032, 55203, 63744, 64045, 64256, 64262, 64275, 64279, 64285, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65056, 65059, 65075, 65076, 65101, 65103, 65136, 65138, 65140, 65140, 65142, 65276, 65296, 65305, 65313, 65338, 65343, 65343, 65345, 65370, 65381, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500];
622
- const unicodeES5IdentifierStart = [170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 705, 710, 721, 736, 740, 748, 748, 750, 750, 880, 884, 886, 887, 890, 893, 902, 902, 904, 906, 908, 908, 910, 929, 931, 1013, 1015, 1153, 1162, 1319, 1329, 1366, 1369, 1369, 1377, 1415, 1488, 1514, 1520, 1522, 1568, 1610, 1646, 1647, 1649, 1747, 1749, 1749, 1765, 1766, 1774, 1775, 1786, 1788, 1791, 1791, 1808, 1808, 1810, 1839, 1869, 1957, 1969, 1969, 1994, 2026, 2036, 2037, 2042, 2042, 2048, 2069, 2074, 2074, 2084, 2084, 2088, 2088, 2112, 2136, 2208, 2208, 2210, 2220, 2308, 2361, 2365, 2365, 2384, 2384, 2392, 2401, 2417, 2423, 2425, 2431, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2493, 2493, 2510, 2510, 2524, 2525, 2527, 2529, 2544, 2545, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2649, 2652, 2654, 2654, 2674, 2676, 2693, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2749, 2749, 2768, 2768, 2784, 2785, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2869, 2873, 2877, 2877, 2908, 2909, 2911, 2913, 2929, 2929, 2947, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 3001, 3024, 3024, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123, 3125, 3129, 3133, 3133, 3160, 3161, 3168, 3169, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3261, 3261, 3294, 3294, 3296, 3297, 3313, 3314, 3333, 3340, 3342, 3344, 3346, 3386, 3389, 3389, 3406, 3406, 3424, 3425, 3450, 3455, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3585, 3632, 3634, 3635, 3648, 3654, 3713, 3714, 3716, 3716, 3719, 3720, 3722, 3722, 3725, 3725, 3732, 3735, 3737, 3743, 3745, 3747, 3749, 3749, 3751, 3751, 3754, 3755, 3757, 3760, 3762, 3763, 3773, 3773, 3776, 3780, 3782, 3782, 3804, 3807, 3840, 3840, 3904, 3911, 3913, 3948, 3976, 3980, 4096, 4138, 4159, 4159, 4176, 4181, 4186, 4189, 4193, 4193, 4197, 4198, 4206, 4208, 4213, 4225, 4238, 4238, 4256, 4293, 4295, 4295, 4301, 4301, 4304, 4346, 4348, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4744, 4746, 4749, 4752, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4822, 4824, 4880, 4882, 4885, 4888, 4954, 4992, 5007, 5024, 5108, 5121, 5740, 5743, 5759, 5761, 5786, 5792, 5866, 5870, 5872, 5888, 5900, 5902, 5905, 5920, 5937, 5952, 5969, 5984, 5996, 5998, 6e3, 6016, 6067, 6103, 6103, 6108, 6108, 6176, 6263, 6272, 6312, 6314, 6314, 6320, 6389, 6400, 6428, 6480, 6509, 6512, 6516, 6528, 6571, 6593, 6599, 6656, 6678, 6688, 6740, 6823, 6823, 6917, 6963, 6981, 6987, 7043, 7072, 7086, 7087, 7098, 7141, 7168, 7203, 7245, 7247, 7258, 7293, 7401, 7404, 7406, 7409, 7413, 7414, 7424, 7615, 7680, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8305, 8305, 8319, 8319, 8336, 8348, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8493, 8495, 8505, 8508, 8511, 8517, 8521, 8526, 8526, 8544, 8584, 11264, 11310, 11312, 11358, 11360, 11492, 11499, 11502, 11506, 11507, 11520, 11557, 11559, 11559, 11565, 11565, 11568, 11623, 11631, 11631, 11648, 11670, 11680, 11686, 11688, 11694, 11696, 11702, 11704, 11710, 11712, 11718, 11720, 11726, 11728, 11734, 11736, 11742, 11823, 11823, 12293, 12295, 12321, 12329, 12337, 12341, 12344, 12348, 12353, 12438, 12445, 12447, 12449, 12538, 12540, 12543, 12549, 12589, 12593, 12686, 12704, 12730, 12784, 12799, 13312, 19893, 19968, 40908, 40960, 42124, 42192, 42237, 42240, 42508, 42512, 42527, 42538, 42539, 42560, 42606, 42623, 42647, 42656, 42735, 42775, 42783, 42786, 42888, 42891, 42894, 42896, 42899, 42912, 42922, 43e3, 43009, 43011, 43013, 43015, 43018, 43020, 43042, 43072, 43123, 43138, 43187, 43250, 43255, 43259, 43259, 43274, 43301, 43312, 43334, 43360, 43388, 43396, 43442, 43471, 43471, 43520, 43560, 43584, 43586, 43588, 43595, 43616, 43638, 43642, 43642, 43648, 43695, 43697, 43697, 43701, 43702, 43705, 43709, 43712, 43712, 43714, 43714, 43739, 43741, 43744, 43754, 43762, 43764, 43777, 43782, 43785, 43790, 43793, 43798, 43808, 43814, 43816, 43822, 43968, 44002, 44032, 55203, 55216, 55238, 55243, 55291, 63744, 64109, 64112, 64217, 64256, 64262, 64275, 64279, 64285, 64285, 64287, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65136, 65140, 65142, 65276, 65313, 65338, 65345, 65370, 65382, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500];
623
- const unicodeES5IdentifierPart = [170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 705, 710, 721, 736, 740, 748, 748, 750, 750, 768, 884, 886, 887, 890, 893, 902, 902, 904, 906, 908, 908, 910, 929, 931, 1013, 1015, 1153, 1155, 1159, 1162, 1319, 1329, 1366, 1369, 1369, 1377, 1415, 1425, 1469, 1471, 1471, 1473, 1474, 1476, 1477, 1479, 1479, 1488, 1514, 1520, 1522, 1552, 1562, 1568, 1641, 1646, 1747, 1749, 1756, 1759, 1768, 1770, 1788, 1791, 1791, 1808, 1866, 1869, 1969, 1984, 2037, 2042, 2042, 2048, 2093, 2112, 2139, 2208, 2208, 2210, 2220, 2276, 2302, 2304, 2403, 2406, 2415, 2417, 2423, 2425, 2431, 2433, 2435, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2492, 2500, 2503, 2504, 2507, 2510, 2519, 2519, 2524, 2525, 2527, 2531, 2534, 2545, 2561, 2563, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2620, 2620, 2622, 2626, 2631, 2632, 2635, 2637, 2641, 2641, 2649, 2652, 2654, 2654, 2662, 2677, 2689, 2691, 2693, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2748, 2757, 2759, 2761, 2763, 2765, 2768, 2768, 2784, 2787, 2790, 2799, 2817, 2819, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2869, 2873, 2876, 2884, 2887, 2888, 2891, 2893, 2902, 2903, 2908, 2909, 2911, 2915, 2918, 2927, 2929, 2929, 2946, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 3001, 3006, 3010, 3014, 3016, 3018, 3021, 3024, 3024, 3031, 3031, 3046, 3055, 3073, 3075, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123, 3125, 3129, 3133, 3140, 3142, 3144, 3146, 3149, 3157, 3158, 3160, 3161, 3168, 3171, 3174, 3183, 3202, 3203, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3260, 3268, 3270, 3272, 3274, 3277, 3285, 3286, 3294, 3294, 3296, 3299, 3302, 3311, 3313, 3314, 3330, 3331, 3333, 3340, 3342, 3344, 3346, 3386, 3389, 3396, 3398, 3400, 3402, 3406, 3415, 3415, 3424, 3427, 3430, 3439, 3450, 3455, 3458, 3459, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3530, 3530, 3535, 3540, 3542, 3542, 3544, 3551, 3570, 3571, 3585, 3642, 3648, 3662, 3664, 3673, 3713, 3714, 3716, 3716, 3719, 3720, 3722, 3722, 3725, 3725, 3732, 3735, 3737, 3743, 3745, 3747, 3749, 3749, 3751, 3751, 3754, 3755, 3757, 3769, 3771, 3773, 3776, 3780, 3782, 3782, 3784, 3789, 3792, 3801, 3804, 3807, 3840, 3840, 3864, 3865, 3872, 3881, 3893, 3893, 3895, 3895, 3897, 3897, 3902, 3911, 3913, 3948, 3953, 3972, 3974, 3991, 3993, 4028, 4038, 4038, 4096, 4169, 4176, 4253, 4256, 4293, 4295, 4295, 4301, 4301, 4304, 4346, 4348, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4744, 4746, 4749, 4752, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4822, 4824, 4880, 4882, 4885, 4888, 4954, 4957, 4959, 4992, 5007, 5024, 5108, 5121, 5740, 5743, 5759, 5761, 5786, 5792, 5866, 5870, 5872, 5888, 5900, 5902, 5908, 5920, 5940, 5952, 5971, 5984, 5996, 5998, 6e3, 6002, 6003, 6016, 6099, 6103, 6103, 6108, 6109, 6112, 6121, 6155, 6157, 6160, 6169, 6176, 6263, 6272, 6314, 6320, 6389, 6400, 6428, 6432, 6443, 6448, 6459, 6470, 6509, 6512, 6516, 6528, 6571, 6576, 6601, 6608, 6617, 6656, 6683, 6688, 6750, 6752, 6780, 6783, 6793, 6800, 6809, 6823, 6823, 6912, 6987, 6992, 7001, 7019, 7027, 7040, 7155, 7168, 7223, 7232, 7241, 7245, 7293, 7376, 7378, 7380, 7414, 7424, 7654, 7676, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8204, 8205, 8255, 8256, 8276, 8276, 8305, 8305, 8319, 8319, 8336, 8348, 8400, 8412, 8417, 8417, 8421, 8432, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8493, 8495, 8505, 8508, 8511, 8517, 8521, 8526, 8526, 8544, 8584, 11264, 11310, 11312, 11358, 11360, 11492, 11499, 11507, 11520, 11557, 11559, 11559, 11565, 11565, 11568, 11623, 11631, 11631, 11647, 11670, 11680, 11686, 11688, 11694, 11696, 11702, 11704, 11710, 11712, 11718, 11720, 11726, 11728, 11734, 11736, 11742, 11744, 11775, 11823, 11823, 12293, 12295, 12321, 12335, 12337, 12341, 12344, 12348, 12353, 12438, 12441, 12442, 12445, 12447, 12449, 12538, 12540, 12543, 12549, 12589, 12593, 12686, 12704, 12730, 12784, 12799, 13312, 19893, 19968, 40908, 40960, 42124, 42192, 42237, 42240, 42508, 42512, 42539, 42560, 42607, 42612, 42621, 42623, 42647, 42655, 42737, 42775, 42783, 42786, 42888, 42891, 42894, 42896, 42899, 42912, 42922, 43e3, 43047, 43072, 43123, 43136, 43204, 43216, 43225, 43232, 43255, 43259, 43259, 43264, 43309, 43312, 43347, 43360, 43388, 43392, 43456, 43471, 43481, 43520, 43574, 43584, 43597, 43600, 43609, 43616, 43638, 43642, 43643, 43648, 43714, 43739, 43741, 43744, 43759, 43762, 43766, 43777, 43782, 43785, 43790, 43793, 43798, 43808, 43814, 43816, 43822, 43968, 44010, 44012, 44013, 44016, 44025, 44032, 55203, 55216, 55238, 55243, 55291, 63744, 64109, 64112, 64217, 64256, 64262, 64275, 64279, 64285, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65024, 65039, 65056, 65062, 65075, 65076, 65101, 65103, 65136, 65140, 65142, 65276, 65296, 65305, 65313, 65338, 65343, 65343, 65345, 65370, 65382, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500];
624
- const unicodeESNextIdentifierStart = [65, 90, 97, 122, 170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 705, 710, 721, 736, 740, 748, 748, 750, 750, 880, 884, 886, 887, 890, 893, 895, 895, 902, 902, 904, 906, 908, 908, 910, 929, 931, 1013, 1015, 1153, 1162, 1327, 1329, 1366, 1369, 1369, 1376, 1416, 1488, 1514, 1519, 1522, 1568, 1610, 1646, 1647, 1649, 1747, 1749, 1749, 1765, 1766, 1774, 1775, 1786, 1788, 1791, 1791, 1808, 1808, 1810, 1839, 1869, 1957, 1969, 1969, 1994, 2026, 2036, 2037, 2042, 2042, 2048, 2069, 2074, 2074, 2084, 2084, 2088, 2088, 2112, 2136, 2144, 2154, 2208, 2228, 2230, 2237, 2308, 2361, 2365, 2365, 2384, 2384, 2392, 2401, 2417, 2432, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2493, 2493, 2510, 2510, 2524, 2525, 2527, 2529, 2544, 2545, 2556, 2556, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2649, 2652, 2654, 2654, 2674, 2676, 2693, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2749, 2749, 2768, 2768, 2784, 2785, 2809, 2809, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2869, 2873, 2877, 2877, 2908, 2909, 2911, 2913, 2929, 2929, 2947, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 3001, 3024, 3024, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3129, 3133, 3133, 3160, 3162, 3168, 3169, 3200, 3200, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3261, 3261, 3294, 3294, 3296, 3297, 3313, 3314, 3333, 3340, 3342, 3344, 3346, 3386, 3389, 3389, 3406, 3406, 3412, 3414, 3423, 3425, 3450, 3455, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3585, 3632, 3634, 3635, 3648, 3654, 3713, 3714, 3716, 3716, 3718, 3722, 3724, 3747, 3749, 3749, 3751, 3760, 3762, 3763, 3773, 3773, 3776, 3780, 3782, 3782, 3804, 3807, 3840, 3840, 3904, 3911, 3913, 3948, 3976, 3980, 4096, 4138, 4159, 4159, 4176, 4181, 4186, 4189, 4193, 4193, 4197, 4198, 4206, 4208, 4213, 4225, 4238, 4238, 4256, 4293, 4295, 4295, 4301, 4301, 4304, 4346, 4348, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4744, 4746, 4749, 4752, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4822, 4824, 4880, 4882, 4885, 4888, 4954, 4992, 5007, 5024, 5109, 5112, 5117, 5121, 5740, 5743, 5759, 5761, 5786, 5792, 5866, 5870, 5880, 5888, 5900, 5902, 5905, 5920, 5937, 5952, 5969, 5984, 5996, 5998, 6e3, 6016, 6067, 6103, 6103, 6108, 6108, 6176, 6264, 6272, 6312, 6314, 6314, 6320, 6389, 6400, 6430, 6480, 6509, 6512, 6516, 6528, 6571, 6576, 6601, 6656, 6678, 6688, 6740, 6823, 6823, 6917, 6963, 6981, 6987, 7043, 7072, 7086, 7087, 7098, 7141, 7168, 7203, 7245, 7247, 7258, 7293, 7296, 7304, 7312, 7354, 7357, 7359, 7401, 7404, 7406, 7411, 7413, 7414, 7418, 7418, 7424, 7615, 7680, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8305, 8305, 8319, 8319, 8336, 8348, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8472, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8505, 8508, 8511, 8517, 8521, 8526, 8526, 8544, 8584, 11264, 11310, 11312, 11358, 11360, 11492, 11499, 11502, 11506, 11507, 11520, 11557, 11559, 11559, 11565, 11565, 11568, 11623, 11631, 11631, 11648, 11670, 11680, 11686, 11688, 11694, 11696, 11702, 11704, 11710, 11712, 11718, 11720, 11726, 11728, 11734, 11736, 11742, 12293, 12295, 12321, 12329, 12337, 12341, 12344, 12348, 12353, 12438, 12443, 12447, 12449, 12538, 12540, 12543, 12549, 12591, 12593, 12686, 12704, 12730, 12784, 12799, 13312, 19893, 19968, 40943, 40960, 42124, 42192, 42237, 42240, 42508, 42512, 42527, 42538, 42539, 42560, 42606, 42623, 42653, 42656, 42735, 42775, 42783, 42786, 42888, 42891, 42943, 42946, 42950, 42999, 43009, 43011, 43013, 43015, 43018, 43020, 43042, 43072, 43123, 43138, 43187, 43250, 43255, 43259, 43259, 43261, 43262, 43274, 43301, 43312, 43334, 43360, 43388, 43396, 43442, 43471, 43471, 43488, 43492, 43494, 43503, 43514, 43518, 43520, 43560, 43584, 43586, 43588, 43595, 43616, 43638, 43642, 43642, 43646, 43695, 43697, 43697, 43701, 43702, 43705, 43709, 43712, 43712, 43714, 43714, 43739, 43741, 43744, 43754, 43762, 43764, 43777, 43782, 43785, 43790, 43793, 43798, 43808, 43814, 43816, 43822, 43824, 43866, 43868, 43879, 43888, 44002, 44032, 55203, 55216, 55238, 55243, 55291, 63744, 64109, 64112, 64217, 64256, 64262, 64275, 64279, 64285, 64285, 64287, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65136, 65140, 65142, 65276, 65313, 65338, 65345, 65370, 65382, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500, 65536, 65547, 65549, 65574, 65576, 65594, 65596, 65597, 65599, 65613, 65616, 65629, 65664, 65786, 65856, 65908, 66176, 66204, 66208, 66256, 66304, 66335, 66349, 66378, 66384, 66421, 66432, 66461, 66464, 66499, 66504, 66511, 66513, 66517, 66560, 66717, 66736, 66771, 66776, 66811, 66816, 66855, 66864, 66915, 67072, 67382, 67392, 67413, 67424, 67431, 67584, 67589, 67592, 67592, 67594, 67637, 67639, 67640, 67644, 67644, 67647, 67669, 67680, 67702, 67712, 67742, 67808, 67826, 67828, 67829, 67840, 67861, 67872, 67897, 67968, 68023, 68030, 68031, 68096, 68096, 68112, 68115, 68117, 68119, 68121, 68149, 68192, 68220, 68224, 68252, 68288, 68295, 68297, 68324, 68352, 68405, 68416, 68437, 68448, 68466, 68480, 68497, 68608, 68680, 68736, 68786, 68800, 68850, 68864, 68899, 69376, 69404, 69415, 69415, 69424, 69445, 69600, 69622, 69635, 69687, 69763, 69807, 69840, 69864, 69891, 69926, 69956, 69956, 69968, 70002, 70006, 70006, 70019, 70066, 70081, 70084, 70106, 70106, 70108, 70108, 70144, 70161, 70163, 70187, 70272, 70278, 70280, 70280, 70282, 70285, 70287, 70301, 70303, 70312, 70320, 70366, 70405, 70412, 70415, 70416, 70419, 70440, 70442, 70448, 70450, 70451, 70453, 70457, 70461, 70461, 70480, 70480, 70493, 70497, 70656, 70708, 70727, 70730, 70751, 70751, 70784, 70831, 70852, 70853, 70855, 70855, 71040, 71086, 71128, 71131, 71168, 71215, 71236, 71236, 71296, 71338, 71352, 71352, 71424, 71450, 71680, 71723, 71840, 71903, 71935, 71935, 72096, 72103, 72106, 72144, 72161, 72161, 72163, 72163, 72192, 72192, 72203, 72242, 72250, 72250, 72272, 72272, 72284, 72329, 72349, 72349, 72384, 72440, 72704, 72712, 72714, 72750, 72768, 72768, 72818, 72847, 72960, 72966, 72968, 72969, 72971, 73008, 73030, 73030, 73056, 73061, 73063, 73064, 73066, 73097, 73112, 73112, 73440, 73458, 73728, 74649, 74752, 74862, 74880, 75075, 77824, 78894, 82944, 83526, 92160, 92728, 92736, 92766, 92880, 92909, 92928, 92975, 92992, 92995, 93027, 93047, 93053, 93071, 93760, 93823, 93952, 94026, 94032, 94032, 94099, 94111, 94176, 94177, 94179, 94179, 94208, 100343, 100352, 101106, 110592, 110878, 110928, 110930, 110948, 110951, 110960, 111355, 113664, 113770, 113776, 113788, 113792, 113800, 113808, 113817, 119808, 119892, 119894, 119964, 119966, 119967, 119970, 119970, 119973, 119974, 119977, 119980, 119982, 119993, 119995, 119995, 119997, 120003, 120005, 120069, 120071, 120074, 120077, 120084, 120086, 120092, 120094, 120121, 120123, 120126, 120128, 120132, 120134, 120134, 120138, 120144, 120146, 120485, 120488, 120512, 120514, 120538, 120540, 120570, 120572, 120596, 120598, 120628, 120630, 120654, 120656, 120686, 120688, 120712, 120714, 120744, 120746, 120770, 120772, 120779, 123136, 123180, 123191, 123197, 123214, 123214, 123584, 123627, 124928, 125124, 125184, 125251, 125259, 125259, 126464, 126467, 126469, 126495, 126497, 126498, 126500, 126500, 126503, 126503, 126505, 126514, 126516, 126519, 126521, 126521, 126523, 126523, 126530, 126530, 126535, 126535, 126537, 126537, 126539, 126539, 126541, 126543, 126545, 126546, 126548, 126548, 126551, 126551, 126553, 126553, 126555, 126555, 126557, 126557, 126559, 126559, 126561, 126562, 126564, 126564, 126567, 126570, 126572, 126578, 126580, 126583, 126585, 126588, 126590, 126590, 126592, 126601, 126603, 126619, 126625, 126627, 126629, 126633, 126635, 126651, 131072, 173782, 173824, 177972, 177984, 178205, 178208, 183969, 183984, 191456, 194560, 195101];
625
- const unicodeESNextIdentifierPart = [48, 57, 65, 90, 95, 95, 97, 122, 170, 170, 181, 181, 183, 183, 186, 186, 192, 214, 216, 246, 248, 705, 710, 721, 736, 740, 748, 748, 750, 750, 768, 884, 886, 887, 890, 893, 895, 895, 902, 906, 908, 908, 910, 929, 931, 1013, 1015, 1153, 1155, 1159, 1162, 1327, 1329, 1366, 1369, 1369, 1376, 1416, 1425, 1469, 1471, 1471, 1473, 1474, 1476, 1477, 1479, 1479, 1488, 1514, 1519, 1522, 1552, 1562, 1568, 1641, 1646, 1747, 1749, 1756, 1759, 1768, 1770, 1788, 1791, 1791, 1808, 1866, 1869, 1969, 1984, 2037, 2042, 2042, 2045, 2045, 2048, 2093, 2112, 2139, 2144, 2154, 2208, 2228, 2230, 2237, 2259, 2273, 2275, 2403, 2406, 2415, 2417, 2435, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2492, 2500, 2503, 2504, 2507, 2510, 2519, 2519, 2524, 2525, 2527, 2531, 2534, 2545, 2556, 2556, 2558, 2558, 2561, 2563, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2620, 2620, 2622, 2626, 2631, 2632, 2635, 2637, 2641, 2641, 2649, 2652, 2654, 2654, 2662, 2677, 2689, 2691, 2693, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2748, 2757, 2759, 2761, 2763, 2765, 2768, 2768, 2784, 2787, 2790, 2799, 2809, 2815, 2817, 2819, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2869, 2873, 2876, 2884, 2887, 2888, 2891, 2893, 2902, 2903, 2908, 2909, 2911, 2915, 2918, 2927, 2929, 2929, 2946, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 3001, 3006, 3010, 3014, 3016, 3018, 3021, 3024, 3024, 3031, 3031, 3046, 3055, 3072, 3084, 3086, 3088, 3090, 3112, 3114, 3129, 3133, 3140, 3142, 3144, 3146, 3149, 3157, 3158, 3160, 3162, 3168, 3171, 3174, 3183, 3200, 3203, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3260, 3268, 3270, 3272, 3274, 3277, 3285, 3286, 3294, 3294, 3296, 3299, 3302, 3311, 3313, 3314, 3328, 3331, 3333, 3340, 3342, 3344, 3346, 3396, 3398, 3400, 3402, 3406, 3412, 3415, 3423, 3427, 3430, 3439, 3450, 3455, 3458, 3459, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3530, 3530, 3535, 3540, 3542, 3542, 3544, 3551, 3558, 3567, 3570, 3571, 3585, 3642, 3648, 3662, 3664, 3673, 3713, 3714, 3716, 3716, 3718, 3722, 3724, 3747, 3749, 3749, 3751, 3773, 3776, 3780, 3782, 3782, 3784, 3789, 3792, 3801, 3804, 3807, 3840, 3840, 3864, 3865, 3872, 3881, 3893, 3893, 3895, 3895, 3897, 3897, 3902, 3911, 3913, 3948, 3953, 3972, 3974, 3991, 3993, 4028, 4038, 4038, 4096, 4169, 4176, 4253, 4256, 4293, 4295, 4295, 4301, 4301, 4304, 4346, 4348, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4744, 4746, 4749, 4752, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4822, 4824, 4880, 4882, 4885, 4888, 4954, 4957, 4959, 4969, 4977, 4992, 5007, 5024, 5109, 5112, 5117, 5121, 5740, 5743, 5759, 5761, 5786, 5792, 5866, 5870, 5880, 5888, 5900, 5902, 5908, 5920, 5940, 5952, 5971, 5984, 5996, 5998, 6e3, 6002, 6003, 6016, 6099, 6103, 6103, 6108, 6109, 6112, 6121, 6155, 6157, 6160, 6169, 6176, 6264, 6272, 6314, 6320, 6389, 6400, 6430, 6432, 6443, 6448, 6459, 6470, 6509, 6512, 6516, 6528, 6571, 6576, 6601, 6608, 6618, 6656, 6683, 6688, 6750, 6752, 6780, 6783, 6793, 6800, 6809, 6823, 6823, 6832, 6845, 6912, 6987, 6992, 7001, 7019, 7027, 7040, 7155, 7168, 7223, 7232, 7241, 7245, 7293, 7296, 7304, 7312, 7354, 7357, 7359, 7376, 7378, 7380, 7418, 7424, 7673, 7675, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8255, 8256, 8276, 8276, 8305, 8305, 8319, 8319, 8336, 8348, 8400, 8412, 8417, 8417, 8421, 8432, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8472, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8505, 8508, 8511, 8517, 8521, 8526, 8526, 8544, 8584, 11264, 11310, 11312, 11358, 11360, 11492, 11499, 11507, 11520, 11557, 11559, 11559, 11565, 11565, 11568, 11623, 11631, 11631, 11647, 11670, 11680, 11686, 11688, 11694, 11696, 11702, 11704, 11710, 11712, 11718, 11720, 11726, 11728, 11734, 11736, 11742, 11744, 11775, 12293, 12295, 12321, 12335, 12337, 12341, 12344, 12348, 12353, 12438, 12441, 12447, 12449, 12538, 12540, 12543, 12549, 12591, 12593, 12686, 12704, 12730, 12784, 12799, 13312, 19893, 19968, 40943, 40960, 42124, 42192, 42237, 42240, 42508, 42512, 42539, 42560, 42607, 42612, 42621, 42623, 42737, 42775, 42783, 42786, 42888, 42891, 42943, 42946, 42950, 42999, 43047, 43072, 43123, 43136, 43205, 43216, 43225, 43232, 43255, 43259, 43259, 43261, 43309, 43312, 43347, 43360, 43388, 43392, 43456, 43471, 43481, 43488, 43518, 43520, 43574, 43584, 43597, 43600, 43609, 43616, 43638, 43642, 43714, 43739, 43741, 43744, 43759, 43762, 43766, 43777, 43782, 43785, 43790, 43793, 43798, 43808, 43814, 43816, 43822, 43824, 43866, 43868, 43879, 43888, 44010, 44012, 44013, 44016, 44025, 44032, 55203, 55216, 55238, 55243, 55291, 63744, 64109, 64112, 64217, 64256, 64262, 64275, 64279, 64285, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65024, 65039, 65056, 65071, 65075, 65076, 65101, 65103, 65136, 65140, 65142, 65276, 65296, 65305, 65313, 65338, 65343, 65343, 65345, 65370, 65382, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500, 65536, 65547, 65549, 65574, 65576, 65594, 65596, 65597, 65599, 65613, 65616, 65629, 65664, 65786, 65856, 65908, 66045, 66045, 66176, 66204, 66208, 66256, 66272, 66272, 66304, 66335, 66349, 66378, 66384, 66426, 66432, 66461, 66464, 66499, 66504, 66511, 66513, 66517, 66560, 66717, 66720, 66729, 66736, 66771, 66776, 66811, 66816, 66855, 66864, 66915, 67072, 67382, 67392, 67413, 67424, 67431, 67584, 67589, 67592, 67592, 67594, 67637, 67639, 67640, 67644, 67644, 67647, 67669, 67680, 67702, 67712, 67742, 67808, 67826, 67828, 67829, 67840, 67861, 67872, 67897, 67968, 68023, 68030, 68031, 68096, 68099, 68101, 68102, 68108, 68115, 68117, 68119, 68121, 68149, 68152, 68154, 68159, 68159, 68192, 68220, 68224, 68252, 68288, 68295, 68297, 68326, 68352, 68405, 68416, 68437, 68448, 68466, 68480, 68497, 68608, 68680, 68736, 68786, 68800, 68850, 68864, 68903, 68912, 68921, 69376, 69404, 69415, 69415, 69424, 69456, 69600, 69622, 69632, 69702, 69734, 69743, 69759, 69818, 69840, 69864, 69872, 69881, 69888, 69940, 69942, 69951, 69956, 69958, 69968, 70003, 70006, 70006, 70016, 70084, 70089, 70092, 70096, 70106, 70108, 70108, 70144, 70161, 70163, 70199, 70206, 70206, 70272, 70278, 70280, 70280, 70282, 70285, 70287, 70301, 70303, 70312, 70320, 70378, 70384, 70393, 70400, 70403, 70405, 70412, 70415, 70416, 70419, 70440, 70442, 70448, 70450, 70451, 70453, 70457, 70459, 70468, 70471, 70472, 70475, 70477, 70480, 70480, 70487, 70487, 70493, 70499, 70502, 70508, 70512, 70516, 70656, 70730, 70736, 70745, 70750, 70751, 70784, 70853, 70855, 70855, 70864, 70873, 71040, 71093, 71096, 71104, 71128, 71133, 71168, 71232, 71236, 71236, 71248, 71257, 71296, 71352, 71360, 71369, 71424, 71450, 71453, 71467, 71472, 71481, 71680, 71738, 71840, 71913, 71935, 71935, 72096, 72103, 72106, 72151, 72154, 72161, 72163, 72164, 72192, 72254, 72263, 72263, 72272, 72345, 72349, 72349, 72384, 72440, 72704, 72712, 72714, 72758, 72760, 72768, 72784, 72793, 72818, 72847, 72850, 72871, 72873, 72886, 72960, 72966, 72968, 72969, 72971, 73014, 73018, 73018, 73020, 73021, 73023, 73031, 73040, 73049, 73056, 73061, 73063, 73064, 73066, 73102, 73104, 73105, 73107, 73112, 73120, 73129, 73440, 73462, 73728, 74649, 74752, 74862, 74880, 75075, 77824, 78894, 82944, 83526, 92160, 92728, 92736, 92766, 92768, 92777, 92880, 92909, 92912, 92916, 92928, 92982, 92992, 92995, 93008, 93017, 93027, 93047, 93053, 93071, 93760, 93823, 93952, 94026, 94031, 94087, 94095, 94111, 94176, 94177, 94179, 94179, 94208, 100343, 100352, 101106, 110592, 110878, 110928, 110930, 110948, 110951, 110960, 111355, 113664, 113770, 113776, 113788, 113792, 113800, 113808, 113817, 113821, 113822, 119141, 119145, 119149, 119154, 119163, 119170, 119173, 119179, 119210, 119213, 119362, 119364, 119808, 119892, 119894, 119964, 119966, 119967, 119970, 119970, 119973, 119974, 119977, 119980, 119982, 119993, 119995, 119995, 119997, 120003, 120005, 120069, 120071, 120074, 120077, 120084, 120086, 120092, 120094, 120121, 120123, 120126, 120128, 120132, 120134, 120134, 120138, 120144, 120146, 120485, 120488, 120512, 120514, 120538, 120540, 120570, 120572, 120596, 120598, 120628, 120630, 120654, 120656, 120686, 120688, 120712, 120714, 120744, 120746, 120770, 120772, 120779, 120782, 120831, 121344, 121398, 121403, 121452, 121461, 121461, 121476, 121476, 121499, 121503, 121505, 121519, 122880, 122886, 122888, 122904, 122907, 122913, 122915, 122916, 122918, 122922, 123136, 123180, 123184, 123197, 123200, 123209, 123214, 123214, 123584, 123641, 124928, 125124, 125136, 125142, 125184, 125259, 125264, 125273, 126464, 126467, 126469, 126495, 126497, 126498, 126500, 126500, 126503, 126503, 126505, 126514, 126516, 126519, 126521, 126521, 126523, 126523, 126530, 126530, 126535, 126535, 126537, 126537, 126539, 126539, 126541, 126543, 126545, 126546, 126548, 126548, 126551, 126551, 126553, 126553, 126555, 126555, 126557, 126557, 126559, 126559, 126561, 126562, 126564, 126564, 126567, 126570, 126572, 126578, 126580, 126583, 126585, 126588, 126590, 126590, 126592, 126601, 126603, 126619, 126625, 126627, 126629, 126633, 126635, 126651, 131072, 173782, 173824, 177972, 177984, 178205, 178208, 183969, 183984, 191456, 194560, 195101, 917760, 917999];
626
- function isUnicodeIdentifierStart(code, languageVersion) {
627
- return languageVersion >= typescript_1.default.ScriptTarget.ES2015 ? lookupInUnicodeMap(code, unicodeESNextIdentifierStart) : languageVersion === typescript_1.default.ScriptTarget.ES5 ? lookupInUnicodeMap(code, unicodeES5IdentifierStart) : lookupInUnicodeMap(code, unicodeES3IdentifierStart);
628
- }
629
- exports$1.isUnicodeIdentifierStart = isUnicodeIdentifierStart;
630
- function lookupInUnicodeMap(code, map) {
631
- if (code < map[0]) {
632
- return false;
633
- }
634
- let lo = 0;
635
- let hi = map.length;
636
- let mid;
637
- while (lo + 1 < hi) {
638
- mid = lo + (hi - lo) / 2;
639
- mid -= mid % 2;
640
- if (map[mid] <= code && code <= map[mid + 1]) {
641
- return true;
642
- }
643
- if (code < map[mid]) {
644
- hi = mid;
645
- } else {
646
- lo = mid + 2;
647
- }
648
- }
649
- return false;
650
- }
651
- function moduleSpecifierToValidIdentifier(moduleSpecifier, target) {
652
- const baseName = getBaseFileName(removeSuffix(moduleSpecifier, "/index"));
653
- let res = "";
654
- let lastCharWasValid = true;
655
- const firstCharCode = baseName.charCodeAt(0);
656
- if (isIdentifierStart(firstCharCode, target)) {
657
- res += String.fromCharCode(firstCharCode);
658
- } else {
659
- lastCharWasValid = false;
660
- }
661
- for (let i = 1; i < baseName.length; i++) {
662
- const ch = baseName.charCodeAt(i);
663
- const isValid = isIdentifierPart(ch, target);
664
- if (isValid) {
665
- let char = String.fromCharCode(ch);
666
- if (!lastCharWasValid) {
667
- char = char.toUpperCase();
668
- }
669
- res += char;
670
- }
671
- lastCharWasValid = isValid;
672
- }
673
- return !isStringANonContextualKeyword(res) ? res || "_" : `_${res}`;
674
- }
675
- exports$1.moduleSpecifierToValidIdentifier = moduleSpecifierToValidIdentifier;
676
- function isIdentifierStart(ch, languageVersion) {
677
- return ch >= 65 && ch <= 90 || ch >= 97 && ch <= 122 || ch === 36 || ch === 95 || ch > 127 && isUnicodeIdentifierStart(ch, languageVersion);
678
- }
679
- exports$1.isIdentifierStart = isIdentifierStart;
680
- function isIdentifierPart(ch, languageVersion, identifierVariant) {
681
- return ch >= 65 && ch <= 90 || ch >= 97 && ch <= 122 || ch >= 48 && ch <= 57 || ch === 36 || ch === 95 || // "-" and ":" are valid in JSX Identifiers
682
- (identifierVariant === typescript_1.default.LanguageVariant.JSX ? ch === 45 || ch === 58 : false) || ch > 127 && isUnicodeIdentifierPart(ch, languageVersion);
683
- }
684
- exports$1.isIdentifierPart = isIdentifierPart;
685
- function isUnicodeIdentifierPart(code, languageVersion) {
686
- return languageVersion >= typescript_1.default.ScriptTarget.ES2015 ? lookupInUnicodeMap(code, unicodeESNextIdentifierPart) : languageVersion === typescript_1.default.ScriptTarget.ES5 ? lookupInUnicodeMap(code, unicodeES5IdentifierPart) : lookupInUnicodeMap(code, unicodeES3IdentifierPart);
687
- }
688
- const textToKeywordObj = {
689
- abstract: typescript_1.default.SyntaxKind.AbstractKeyword,
690
- any: typescript_1.default.SyntaxKind.AnyKeyword,
691
- as: typescript_1.default.SyntaxKind.AsKeyword,
692
- asserts: typescript_1.default.SyntaxKind.AssertsKeyword,
693
- bigint: typescript_1.default.SyntaxKind.BigIntKeyword,
694
- boolean: typescript_1.default.SyntaxKind.BooleanKeyword,
695
- break: typescript_1.default.SyntaxKind.BreakKeyword,
696
- case: typescript_1.default.SyntaxKind.CaseKeyword,
697
- catch: typescript_1.default.SyntaxKind.CatchKeyword,
698
- class: typescript_1.default.SyntaxKind.ClassKeyword,
699
- continue: typescript_1.default.SyntaxKind.ContinueKeyword,
700
- const: typescript_1.default.SyntaxKind.ConstKeyword,
701
- ["constructor"]: typescript_1.default.SyntaxKind.ConstructorKeyword,
702
- debugger: typescript_1.default.SyntaxKind.DebuggerKeyword,
703
- declare: typescript_1.default.SyntaxKind.DeclareKeyword,
704
- default: typescript_1.default.SyntaxKind.DefaultKeyword,
705
- delete: typescript_1.default.SyntaxKind.DeleteKeyword,
706
- do: typescript_1.default.SyntaxKind.DoKeyword,
707
- else: typescript_1.default.SyntaxKind.ElseKeyword,
708
- enum: typescript_1.default.SyntaxKind.EnumKeyword,
709
- export: typescript_1.default.SyntaxKind.ExportKeyword,
710
- extends: typescript_1.default.SyntaxKind.ExtendsKeyword,
711
- false: typescript_1.default.SyntaxKind.FalseKeyword,
712
- finally: typescript_1.default.SyntaxKind.FinallyKeyword,
713
- for: typescript_1.default.SyntaxKind.ForKeyword,
714
- from: typescript_1.default.SyntaxKind.FromKeyword,
715
- function: typescript_1.default.SyntaxKind.FunctionKeyword,
716
- get: typescript_1.default.SyntaxKind.GetKeyword,
717
- if: typescript_1.default.SyntaxKind.IfKeyword,
718
- implements: typescript_1.default.SyntaxKind.ImplementsKeyword,
719
- import: typescript_1.default.SyntaxKind.ImportKeyword,
720
- in: typescript_1.default.SyntaxKind.InKeyword,
721
- infer: typescript_1.default.SyntaxKind.InferKeyword,
722
- instanceof: typescript_1.default.SyntaxKind.InstanceOfKeyword,
723
- interface: typescript_1.default.SyntaxKind.InterfaceKeyword,
724
- intrinsic: typescript_1.default.SyntaxKind.IntrinsicKeyword,
725
- is: typescript_1.default.SyntaxKind.IsKeyword,
726
- keyof: typescript_1.default.SyntaxKind.KeyOfKeyword,
727
- let: typescript_1.default.SyntaxKind.LetKeyword,
728
- module: typescript_1.default.SyntaxKind.ModuleKeyword,
729
- namespace: typescript_1.default.SyntaxKind.NamespaceKeyword,
730
- never: typescript_1.default.SyntaxKind.NeverKeyword,
731
- new: typescript_1.default.SyntaxKind.NewKeyword,
732
- null: typescript_1.default.SyntaxKind.NullKeyword,
733
- number: typescript_1.default.SyntaxKind.NumberKeyword,
734
- object: typescript_1.default.SyntaxKind.ObjectKeyword,
735
- package: typescript_1.default.SyntaxKind.PackageKeyword,
736
- private: typescript_1.default.SyntaxKind.PrivateKeyword,
737
- protected: typescript_1.default.SyntaxKind.ProtectedKeyword,
738
- public: typescript_1.default.SyntaxKind.PublicKeyword,
739
- readonly: typescript_1.default.SyntaxKind.ReadonlyKeyword,
740
- require: typescript_1.default.SyntaxKind.RequireKeyword,
741
- global: typescript_1.default.SyntaxKind.GlobalKeyword,
742
- return: typescript_1.default.SyntaxKind.ReturnKeyword,
743
- set: typescript_1.default.SyntaxKind.SetKeyword,
744
- static: typescript_1.default.SyntaxKind.StaticKeyword,
745
- string: typescript_1.default.SyntaxKind.StringKeyword,
746
- super: typescript_1.default.SyntaxKind.SuperKeyword,
747
- switch: typescript_1.default.SyntaxKind.SwitchKeyword,
748
- symbol: typescript_1.default.SyntaxKind.SymbolKeyword,
749
- this: typescript_1.default.SyntaxKind.ThisKeyword,
750
- throw: typescript_1.default.SyntaxKind.ThrowKeyword,
751
- true: typescript_1.default.SyntaxKind.TrueKeyword,
752
- try: typescript_1.default.SyntaxKind.TryKeyword,
753
- type: typescript_1.default.SyntaxKind.TypeKeyword,
754
- typeof: typescript_1.default.SyntaxKind.TypeOfKeyword,
755
- undefined: typescript_1.default.SyntaxKind.UndefinedKeyword,
756
- unique: typescript_1.default.SyntaxKind.UniqueKeyword,
757
- unknown: typescript_1.default.SyntaxKind.UnknownKeyword,
758
- var: typescript_1.default.SyntaxKind.VarKeyword,
759
- void: typescript_1.default.SyntaxKind.VoidKeyword,
760
- while: typescript_1.default.SyntaxKind.WhileKeyword,
761
- with: typescript_1.default.SyntaxKind.WithKeyword,
762
- yield: typescript_1.default.SyntaxKind.YieldKeyword,
763
- async: typescript_1.default.SyntaxKind.AsyncKeyword,
764
- await: typescript_1.default.SyntaxKind.AwaitKeyword,
765
- of: typescript_1.default.SyntaxKind.OfKeyword
766
- };
767
- function isStringANonContextualKeyword(name) {
768
- const token = stringToToken(name);
769
- return token !== void 0 && isNonContextualKeyword(token);
770
- }
771
- exports$1.isStringANonContextualKeyword = isStringANonContextualKeyword;
772
- function isNonContextualKeyword(token) {
773
- return isKeyword(token) && !isContextualKeyword(token);
774
- }
775
- exports$1.isNonContextualKeyword = isNonContextualKeyword;
776
- function isKeyword(token) {
777
- return typescript_1.default.SyntaxKind.FirstKeyword <= token && token <= typescript_1.default.SyntaxKind.LastKeyword;
778
- }
779
- exports$1.isKeyword = isKeyword;
780
- function isContextualKeyword(token) {
781
- return typescript_1.default.SyntaxKind.FirstContextualKeyword <= token && token <= typescript_1.default.SyntaxKind.LastContextualKeyword;
782
- }
783
- exports$1.isContextualKeyword = isContextualKeyword;
784
- function getEntries(obj) {
785
- return obj ? _entries(obj) : [];
786
- }
787
- exports$1.getEntries = getEntries;
788
- const hasOwnProperty = Object.prototype.hasOwnProperty;
789
- function getOwnKeys(map) {
790
- const keys = [];
791
- for (const key in map) {
792
- if (hasOwnProperty.call(map, key)) {
793
- keys.push(key);
794
- }
795
- }
796
- return keys;
797
- }
798
- exports$1.getOwnKeys = getOwnKeys;
799
- const _entries = Object.entries || ((obj) => {
800
- const keys = getOwnKeys(obj);
801
- const result = Array(keys.length);
802
- for (let i = 0; i < keys.length; i++) {
803
- result[i] = [keys[i], obj[keys[i]]];
804
- }
805
- return result;
806
- });
807
- const textToToken = new Map(getEntries(Object.assign(Object.assign({}, textToKeywordObj), { "{": typescript_1.default.SyntaxKind.OpenBraceToken, "}": typescript_1.default.SyntaxKind.CloseBraceToken, "(": typescript_1.default.SyntaxKind.OpenParenToken, ")": typescript_1.default.SyntaxKind.CloseParenToken, "[": typescript_1.default.SyntaxKind.OpenBracketToken, "]": typescript_1.default.SyntaxKind.CloseBracketToken, ".": typescript_1.default.SyntaxKind.DotToken, "...": typescript_1.default.SyntaxKind.DotDotDotToken, ";": typescript_1.default.SyntaxKind.SemicolonToken, ",": typescript_1.default.SyntaxKind.CommaToken, "<": typescript_1.default.SyntaxKind.LessThanToken, ">": typescript_1.default.SyntaxKind.GreaterThanToken, "<=": typescript_1.default.SyntaxKind.LessThanEqualsToken, ">=": typescript_1.default.SyntaxKind.GreaterThanEqualsToken, "==": typescript_1.default.SyntaxKind.EqualsEqualsToken, "!=": typescript_1.default.SyntaxKind.ExclamationEqualsToken, "===": typescript_1.default.SyntaxKind.EqualsEqualsEqualsToken, "!==": typescript_1.default.SyntaxKind.ExclamationEqualsEqualsToken, "=>": typescript_1.default.SyntaxKind.EqualsGreaterThanToken, "+": typescript_1.default.SyntaxKind.PlusToken, "-": typescript_1.default.SyntaxKind.MinusToken, "**": typescript_1.default.SyntaxKind.AsteriskAsteriskToken, "*": typescript_1.default.SyntaxKind.AsteriskToken, "/": typescript_1.default.SyntaxKind.SlashToken, "%": typescript_1.default.SyntaxKind.PercentToken, "++": typescript_1.default.SyntaxKind.PlusPlusToken, "--": typescript_1.default.SyntaxKind.MinusMinusToken, "<<": typescript_1.default.SyntaxKind.LessThanLessThanToken, "</": typescript_1.default.SyntaxKind.LessThanSlashToken, ">>": typescript_1.default.SyntaxKind.GreaterThanGreaterThanToken, ">>>": typescript_1.default.SyntaxKind.GreaterThanGreaterThanGreaterThanToken, "&": typescript_1.default.SyntaxKind.AmpersandToken, "|": typescript_1.default.SyntaxKind.BarToken, "^": typescript_1.default.SyntaxKind.CaretToken, "!": typescript_1.default.SyntaxKind.ExclamationToken, "~": typescript_1.default.SyntaxKind.TildeToken, "&&": typescript_1.default.SyntaxKind.AmpersandAmpersandToken, "||": typescript_1.default.SyntaxKind.BarBarToken, "?": typescript_1.default.SyntaxKind.QuestionToken, "??": typescript_1.default.SyntaxKind.QuestionQuestionToken, "?.": typescript_1.default.SyntaxKind.QuestionDotToken, ":": typescript_1.default.SyntaxKind.ColonToken, "=": typescript_1.default.SyntaxKind.EqualsToken, "+=": typescript_1.default.SyntaxKind.PlusEqualsToken, "-=": typescript_1.default.SyntaxKind.MinusEqualsToken, "*=": typescript_1.default.SyntaxKind.AsteriskEqualsToken, "**=": typescript_1.default.SyntaxKind.AsteriskAsteriskEqualsToken, "/=": typescript_1.default.SyntaxKind.SlashEqualsToken, "%=": typescript_1.default.SyntaxKind.PercentEqualsToken, "<<=": typescript_1.default.SyntaxKind.LessThanLessThanEqualsToken, ">>=": typescript_1.default.SyntaxKind.GreaterThanGreaterThanEqualsToken, ">>>=": typescript_1.default.SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken, "&=": typescript_1.default.SyntaxKind.AmpersandEqualsToken, "|=": typescript_1.default.SyntaxKind.BarEqualsToken, "^=": typescript_1.default.SyntaxKind.CaretEqualsToken, "||=": typescript_1.default.SyntaxKind.BarBarEqualsToken, "&&=": typescript_1.default.SyntaxKind.AmpersandAmpersandEqualsToken, "??=": typescript_1.default.SyntaxKind.QuestionQuestionEqualsToken, "@": typescript_1.default.SyntaxKind.AtToken, "`": typescript_1.default.SyntaxKind.BacktickToken })));
808
- function stringToToken(s) {
809
- return textToToken.get(s);
810
- }
811
- exports$1.stringToToken = stringToToken;
812
- function stripQuotes(name) {
813
- const length = name.length;
814
- if (length >= 2 && name.charCodeAt(0) === name.charCodeAt(length - 1) && isQuoteOrBacktick(name.charCodeAt(0))) {
815
- return name.substring(1, length - 1);
816
- }
817
- return name;
818
- }
819
- exports$1.stripQuotes = stripQuotes;
820
- function isQuoteOrBacktick(charCode) {
821
- return charCode === 39 || charCode === 34 || charCode === 96;
822
- }
823
- exports$1.isQuoteOrBacktick = isQuoteOrBacktick;
824
- const extensionsToRemove = [typescript_1.default.Extension.Dts, typescript_1.default.Extension.Ts, typescript_1.default.Extension.Js, typescript_1.default.Extension.Tsx, typescript_1.default.Extension.Jsx, typescript_1.default.Extension.Json];
825
- function removeFileExtension(path) {
826
- for (const ext of extensionsToRemove) {
827
- const extensionless = tryRemoveExtension(path, ext);
828
- if (extensionless !== void 0) {
829
- return extensionless;
830
- }
831
- }
832
- return path;
833
- }
834
- exports$1.removeFileExtension = removeFileExtension;
835
- function tryRemoveExtension(path, extension) {
836
- return path.endsWith(extension) ? removeExtension(path, extension) : void 0;
837
- }
838
- exports$1.tryRemoveExtension = tryRemoveExtension;
839
- function removeExtension(path, extension) {
840
- return path.substring(0, path.length - extension.length);
841
- }
842
- exports$1.removeExtension = removeExtension;
843
- function isTypeOnlySymbol(s, checker) {
844
- return !(skipAlias(s, checker).flags & typescript_1.default.SymbolFlags.Value);
845
- }
846
- exports$1.isTypeOnlySymbol = isTypeOnlySymbol;
847
- function skipAlias(symbol, checker) {
848
- return symbol.flags & typescript_1.default.SymbolFlags.Alias ? checker.getAliasedSymbol(symbol) : symbol;
849
- }
850
- exports$1.skipAlias = skipAlias;
851
- function typeHasValue(type) {
852
- var _a, _b;
853
- return type.isClass() || ((_a = type.symbol) === null || _a === void 0 ? void 0 : _a.name) === "Promise" || !!((_b = type.symbol) === null || _b === void 0 ? void 0 : _b.valueDeclaration);
854
- }
855
- exports$1.typeHasValue = typeHasValue;
856
- function isNodeJS() {
857
- return Object.prototype.toString.call(typeof process !== "undefined" ? process : 0) === "[object process]";
858
- }
859
- exports$1.isNodeJS = isNodeJS;
860
- function hasGlobalFlag(name) {
861
- return !!globalThis[name];
862
- }
863
- exports$1.hasGlobalFlag = hasGlobalFlag;
864
- function setGlobalFlag(name, value) {
865
- globalThis[name] = value;
866
- }
867
- exports$1.setGlobalFlag = setGlobalFlag;
868
- function resolveName(checker, location, name, meaning, excludeGlobals) {
869
- return checker.resolveName(name, location, meaning, excludeGlobals);
870
- }
871
- exports$1.resolveName = resolveName;
872
- function isStatement(node) {
873
- return typescript_1.default["isStatement"](node);
874
- }
875
- exports$1.isStatement = isStatement;
876
- function getTypeLocality(ctx, type, typeNode) {
877
- var _a, _b;
878
- if (!type.symbol)
879
- return "global";
880
- let typeSourceFile = (_b = (_a = type.symbol.declarations) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.getSourceFile();
881
- if (!typeSourceFile || ctx.program.isSourceFileDefaultLibrary(typeSourceFile))
882
- return "global";
883
- let isLocal = typeSourceFile === ctx.sourceFile;
884
- let resolvedGlobalSymbol = resolveName(ctx.checker, typeNode, type.symbol.name, typescript_1.default.SymbolFlags.Value, false);
885
- let resolvedNonGlobalSymbol = resolveName(ctx.checker, typeNode, type.symbol.name, typescript_1.default.SymbolFlags.Value, true);
886
- if (resolvedGlobalSymbol && !resolvedNonGlobalSymbol && resolvedGlobalSymbol === type.symbol)
887
- return "global";
888
- return isLocal ? "local" : "imported";
889
- }
890
- exports$1.getTypeLocality = getTypeLocality;
891
- function hasFilesystemAccess() {
892
- if (isNodeJS()) {
893
- let fsx;
894
- try {
895
- fsx = require("fs");
896
- } catch (e) {
897
- }
898
- return !!fsx;
899
- }
900
- return false;
901
- }
902
- exports$1.hasFilesystemAccess = hasFilesystemAccess;
903
- function fileExists(filename) {
904
- if (isNodeJS()) {
905
- let fsx;
906
- try {
907
- fsx = require("fs");
908
- } catch (e) {
909
- }
910
- if (fsx)
911
- return fsx.existsSync(filename);
912
- }
913
- throw new Error(`No filesystem access available in this environment! Should guard using hasFilesystem()! This is a bug.`);
914
- }
915
- exports$1.fileExists = fileExists;
916
- })(utils);
917
- return utils;
918
- }
919
- export {
920
- requireUtils as __require
921
- };
922
- //# sourceMappingURL=utils.js.map