puzzle-lib 1.6.0 → 1.7.0
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.
- package/build/src/Braille/BrailleCharacter.d.ts +15 -15
- package/build/src/Braille/BrailleCharacter.js +39 -38
- package/build/src/Braille/BrailleCharacter.js.map +1 -1
- package/build/src/Braille/BrailleData.d.ts +6 -6
- package/build/src/Braille/BrailleData.js +65 -65
- package/build/src/Braille/BrailleData.js.map +1 -1
- package/build/src/Braille/BrailleDot.d.ts +9 -9
- package/build/src/Braille/BrailleDot.js +13 -13
- package/build/src/Braille/BrailleDot.js.map +1 -1
- package/build/src/Braille/BrailleEncoding.d.ts +54 -54
- package/build/src/Braille/BrailleEncoding.js +66 -65
- package/build/src/Braille/BrailleEncoding.js.map +1 -1
- package/build/src/Braille/BrailleStream.d.ts +18 -18
- package/build/src/Braille/BrailleStream.js +75 -75
- package/build/src/Braille/BrailleStream.js.map +1 -1
- package/build/src/Cipher/AutoKeyString.d.ts +4 -4
- package/build/src/Cipher/AutoKeyString.js +34 -34
- package/build/src/Cipher/CaesarString.d.ts +8 -8
- package/build/src/Cipher/CaesarString.js +32 -31
- package/build/src/Cipher/CaesarString.js.map +1 -1
- package/build/src/Cipher/CaesarUtils.d.ts +13 -13
- package/build/src/Cipher/CaesarUtils.js +57 -57
- package/build/src/Cipher/CaesarUtils.js.map +1 -1
- package/build/src/Cipher/KeyedCipherStringBase.d.ts +12 -12
- package/build/src/Cipher/KeyedCipherStringBase.js +30 -28
- package/build/src/Cipher/KeyedCipherStringBase.js.map +1 -1
- package/build/src/Cipher/VigenereString.d.ts +4 -4
- package/build/src/Cipher/VigenereString.js +21 -21
- package/build/src/Common/CharacterImage.d.ts +6 -6
- package/build/src/Common/CharacterImage.js +12 -10
- package/build/src/Common/CharacterImage.js.map +1 -1
- package/build/src/Common/EncodingCategory.d.ts +8 -8
- package/build/src/Common/EncodingCategory.js +12 -12
- package/build/src/Common/EncodingCategory.js.map +1 -1
- package/build/src/Common/EncodingCharacterBase.d.ts +23 -23
- package/build/src/Common/EncodingCharacterBase.js +54 -52
- package/build/src/Common/EncodingCharacterBase.js.map +1 -1
- package/build/src/Common/EncodingDataBase.d.ts +7 -7
- package/build/src/Common/EncodingDataBase.js +27 -29
- package/build/src/Common/EncodingDataBase.js.map +1 -1
- package/build/src/Common/EncodingEntry.d.ts +8 -8
- package/build/src/Common/EncodingEntry.js +17 -14
- package/build/src/Common/EncodingEntry.js.map +1 -1
- package/build/src/Common/EncodingLookupResult.d.ts +6 -6
- package/build/src/Common/EncodingLookupResult.js +11 -13
- package/build/src/Common/EncodingLookupResult.js.map +1 -1
- package/build/src/Common/Helpers.d.ts +4 -4
- package/build/src/Common/Helpers.js +16 -16
- package/build/src/Common/InlineSvg.d.ts +7 -7
- package/build/src/Common/InlineSvg.js +17 -14
- package/build/src/Common/InlineSvg.js.map +1 -1
- package/build/src/Conversion/CharacterAutoConvert.d.ts +10 -10
- package/build/src/Conversion/CharacterAutoConvert.js +88 -88
- package/build/src/Conversion/CharacterAutoConvert.js.map +1 -1
- package/build/src/Conversion/CharacterConversion.d.ts +8 -8
- package/build/src/Conversion/CharacterConversion.js +50 -50
- package/build/src/Conversion/CharacterEncoding.d.ts +9 -9
- package/build/src/Conversion/CharacterEncoding.js +13 -13
- package/build/src/Conversion/CharacterEncoding.js.map +1 -1
- package/build/src/Conversion/CharacterTableEntry.d.ts +10 -10
- package/build/src/Conversion/CharacterTableEntry.js +25 -19
- package/build/src/Conversion/CharacterTableEntry.js.map +1 -1
- package/build/src/Conversion/SignificantFigures.d.ts +7 -7
- package/build/src/Conversion/SignificantFigures.js +50 -50
- package/build/src/Conversion/StringAutoConvert.d.ts +6 -6
- package/build/src/Conversion/StringAutoConvert.js +46 -46
- package/build/src/Morse/MorseCharacter.d.ts +22 -22
- package/build/src/Morse/MorseCharacter.js +97 -96
- package/build/src/Morse/MorseCharacter.js.map +1 -1
- package/build/src/Morse/MorseData.d.ts +6 -6
- package/build/src/Morse/MorseData.js +70 -70
- package/build/src/Morse/MorseData.js.map +1 -1
- package/build/src/Morse/MorseEncoding.d.ts +59 -59
- package/build/src/Morse/MorseEncoding.js +94 -94
- package/build/src/Morse/MorseEncoding.js.map +1 -1
- package/build/src/Morse/MorseString.d.ts +10 -10
- package/build/src/Morse/MorseString.js +67 -66
- package/build/src/Morse/MorseString.js.map +1 -1
- package/build/src/Nato/NatoCharacter.d.ts +5 -5
- package/build/src/Nato/NatoCharacter.js +12 -10
- package/build/src/Nato/NatoCharacter.js.map +1 -1
- package/build/src/Nato/NatoData.d.ts +7 -7
- package/build/src/Nato/NatoData.js +49 -51
- package/build/src/Nato/NatoData.js.map +1 -1
- package/build/src/NavalFlags/NavalFlags.d.ts +7 -7
- package/build/src/NavalFlags/NavalFlags.js +75 -77
- package/build/src/NavalFlags/NavalFlags.js.map +1 -1
- package/build/src/Resistor/Resistor.d.ts +24 -24
- package/build/src/Resistor/Resistor.js +86 -86
- package/build/src/Resistor/Resistor.js.map +1 -1
- package/build/src/Resistor/ResistorColorEntry.d.ts +12 -12
- package/build/src/Resistor/ResistorColorEntry.js +36 -31
- package/build/src/Resistor/ResistorColorEntry.js.map +1 -1
- package/build/src/Semaphore/SemaphoreCharacter.d.ts +20 -20
- package/build/src/Semaphore/SemaphoreCharacter.js +75 -75
- package/build/src/Semaphore/SemaphoreCharacter.js.map +1 -1
- package/build/src/Semaphore/SemaphoreData.d.ts +6 -6
- package/build/src/Semaphore/SemaphoreData.js +53 -53
- package/build/src/Semaphore/SemaphoreData.js.map +1 -1
- package/build/src/Semaphore/SemaphoreDegrees.d.ts +5 -5
- package/build/src/Semaphore/SemaphoreDegrees.js +26 -26
- package/build/src/Semaphore/SemaphoreDirection.d.ts +11 -11
- package/build/src/Semaphore/SemaphoreDirection.js +15 -15
- package/build/src/Semaphore/SemaphoreDirection.js.map +1 -1
- package/build/src/Semaphore/SemaphoreEncoding.d.ts +40 -40
- package/build/src/Semaphore/SemaphoreEncoding.js +48 -47
- package/build/src/Semaphore/SemaphoreEncoding.js.map +1 -1
- package/build/src/Semaphore/SemaphoreStream.d.ts +17 -17
- package/build/src/Semaphore/SemaphoreStream.js +73 -72
- package/build/src/Semaphore/SemaphoreStream.js.map +1 -1
- package/build/src/WordSearch/Point.d.ts +4 -4
- package/build/src/WordSearch/Point.js +2 -2
- package/build/src/WordSearch/Result.d.ts +6 -6
- package/build/src/WordSearch/Result.js +12 -10
- package/build/src/WordSearch/Result.js.map +1 -1
- package/build/src/WordSearch/WordSearchDirection.d.ts +6 -6
- package/build/src/WordSearch/WordSearchDirection.js +10 -10
- package/build/src/WordSearch/WordSearchDirection.js.map +1 -1
- package/build/src/WordSearch/WordSearchSolver.d.ts +27 -27
- package/build/src/WordSearch/WordSearchSolver.js +232 -222
- package/build/src/WordSearch/WordSearchSolver.js.map +1 -1
- package/build/src/index.d.ts +35 -35
- package/build/src/index.js +72 -72
- package/package.json +5 -5
- package/src/Braille/BrailleCharacter.ts +1 -1
- package/src/Braille/BrailleData.ts +16 -16
- package/src/Cipher/AutoKeyString.ts +1 -1
- package/src/Cipher/CaesarUtils.ts +1 -1
- package/src/Cipher/VigenereString.ts +1 -1
- package/src/Common/EncodingDataBase.ts +1 -1
- package/src/Conversion/CharacterAutoConvert.ts +1 -1
- package/src/Conversion/CharacterConversion.ts +5 -5
- package/src/Conversion/SignificantFigures.ts +1 -1
- package/src/Conversion/StringAutoConvert.ts +2 -2
- package/src/Morse/MorseData.ts +18 -18
- package/src/Morse/MorseString.ts +12 -12
- package/src/Nato/NatoData.ts +1 -1
- package/src/NavalFlags/NavalFlags.ts +52 -52
- package/src/Resistor/Resistor.ts +9 -9
- package/src/Resistor/ResistorColorEntry.ts +1 -1
- package/src/Semaphore/SemaphoreCharacter.ts +5 -5
- package/src/Semaphore/SemaphoreData.ts +1 -1
- package/src/WordSearch/WordSearchSolver.ts +1 -1
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.VigenereString = void 0;
|
|
4
|
-
const CaesarUtils_1 = require("./CaesarUtils");
|
|
5
|
-
const KeyedCipherStringBase_1 = require("./KeyedCipherStringBase");
|
|
6
|
-
class VigenereString extends KeyedCipherStringBase_1.KeyedCipherStringBase {
|
|
7
|
-
convert(decrypt) {
|
|
8
|
-
const rotStr = [];
|
|
9
|
-
let keyIndex = 0;
|
|
10
|
-
for (const ch of this._text) {
|
|
11
|
-
if (CaesarUtils_1.CaesarUtils.isAlpha(ch)) {
|
|
12
|
-
rotStr.push(CaesarUtils_1.CaesarUtils.rotateLetterWithKey(ch, this._key, keyIndex++, decrypt));
|
|
13
|
-
}
|
|
14
|
-
else {
|
|
15
|
-
rotStr.push(ch);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
return rotStr.join('');
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
exports.VigenereString = VigenereString;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VigenereString = void 0;
|
|
4
|
+
const CaesarUtils_1 = require("./CaesarUtils");
|
|
5
|
+
const KeyedCipherStringBase_1 = require("./KeyedCipherStringBase");
|
|
6
|
+
class VigenereString extends KeyedCipherStringBase_1.KeyedCipherStringBase {
|
|
7
|
+
convert(decrypt) {
|
|
8
|
+
const rotStr = [];
|
|
9
|
+
let keyIndex = 0;
|
|
10
|
+
for (const ch of this._text) {
|
|
11
|
+
if (CaesarUtils_1.CaesarUtils.isAlpha(ch)) {
|
|
12
|
+
rotStr.push(CaesarUtils_1.CaesarUtils.rotateLetterWithKey(ch, this._key, keyIndex++, decrypt));
|
|
13
|
+
}
|
|
14
|
+
else {
|
|
15
|
+
rotStr.push(ch);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
return rotStr.join('');
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.VigenereString = VigenereString;
|
|
22
22
|
//# sourceMappingURL=VigenereString.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { InlineSvg } from './InlineSvg';
|
|
2
|
-
export declare class CharacterImage {
|
|
3
|
-
readonly character: string;
|
|
4
|
-
readonly image: InlineSvg;
|
|
5
|
-
constructor(character: string, image: InlineSvg);
|
|
6
|
-
}
|
|
1
|
+
import { InlineSvg } from './InlineSvg';
|
|
2
|
+
export declare class CharacterImage {
|
|
3
|
+
readonly character: string;
|
|
4
|
+
readonly image: InlineSvg;
|
|
5
|
+
constructor(character: string, image: InlineSvg);
|
|
6
|
+
}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CharacterImage = void 0;
|
|
4
|
-
class CharacterImage {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CharacterImage = void 0;
|
|
4
|
+
class CharacterImage {
|
|
5
|
+
character;
|
|
6
|
+
image;
|
|
7
|
+
constructor(character, image) {
|
|
8
|
+
this.character = character;
|
|
9
|
+
this.image = image;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
exports.CharacterImage = CharacterImage;
|
|
11
13
|
//# sourceMappingURL=CharacterImage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CharacterImage.js","sourceRoot":"","sources":["../../../src/Common/CharacterImage.ts"],"names":[],"mappings":";;;AAEA,MAAa,cAAc;
|
|
1
|
+
{"version":3,"file":"CharacterImage.js","sourceRoot":"","sources":["../../../src/Common/CharacterImage.ts"],"names":[],"mappings":";;;AAEA,MAAa,cAAc;IAChB,SAAS,CAAS;IAClB,KAAK,CAAY;IAE1B,YAAY,SAAiB,EAAE,KAAgB;QAC7C,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;CACF;AARD,wCAQC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export declare enum EncodingCategory {
|
|
2
|
-
None = 0,
|
|
3
|
-
Letter = 2,
|
|
4
|
-
Number = 4,
|
|
5
|
-
Formatting = 8,
|
|
6
|
-
Punctuation = 16,
|
|
7
|
-
All = 255
|
|
8
|
-
}
|
|
1
|
+
export declare enum EncodingCategory {
|
|
2
|
+
None = 0,
|
|
3
|
+
Letter = 2,
|
|
4
|
+
Number = 4,
|
|
5
|
+
Formatting = 8,
|
|
6
|
+
Punctuation = 16,
|
|
7
|
+
All = 255
|
|
8
|
+
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.EncodingCategory = void 0;
|
|
4
|
-
var EncodingCategory;
|
|
5
|
-
(function (EncodingCategory) {
|
|
6
|
-
EncodingCategory[EncodingCategory["None"] = 0] = "None";
|
|
7
|
-
EncodingCategory[EncodingCategory["Letter"] = 2] = "Letter";
|
|
8
|
-
EncodingCategory[EncodingCategory["Number"] = 4] = "Number";
|
|
9
|
-
EncodingCategory[EncodingCategory["Formatting"] = 8] = "Formatting";
|
|
10
|
-
EncodingCategory[EncodingCategory["Punctuation"] = 16] = "Punctuation";
|
|
11
|
-
EncodingCategory[EncodingCategory["All"] = 255] = "All";
|
|
12
|
-
})(EncodingCategory
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EncodingCategory = void 0;
|
|
4
|
+
var EncodingCategory;
|
|
5
|
+
(function (EncodingCategory) {
|
|
6
|
+
EncodingCategory[EncodingCategory["None"] = 0] = "None";
|
|
7
|
+
EncodingCategory[EncodingCategory["Letter"] = 2] = "Letter";
|
|
8
|
+
EncodingCategory[EncodingCategory["Number"] = 4] = "Number";
|
|
9
|
+
EncodingCategory[EncodingCategory["Formatting"] = 8] = "Formatting";
|
|
10
|
+
EncodingCategory[EncodingCategory["Punctuation"] = 16] = "Punctuation";
|
|
11
|
+
EncodingCategory[EncodingCategory["All"] = 255] = "All";
|
|
12
|
+
})(EncodingCategory || (exports.EncodingCategory = EncodingCategory = {}));
|
|
13
13
|
//# sourceMappingURL=EncodingCategory.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EncodingCategory.js","sourceRoot":"","sources":["../../../src/Common/EncodingCategory.ts"],"names":[],"mappings":";;;AAAA,IAAY,gBASX;AATD,WAAY,gBAAgB;IAC1B,uDAAI,CAAA;IAEJ,2DAAe,CAAA;IACf,2DAAe,CAAA;IACf,mEAAmB,CAAA;IACnB,sEAAoB,CAAA;IAEpB,uDAAU,CAAA;AACZ,CAAC,EATW,gBAAgB,
|
|
1
|
+
{"version":3,"file":"EncodingCategory.js","sourceRoot":"","sources":["../../../src/Common/EncodingCategory.ts"],"names":[],"mappings":";;;AAAA,IAAY,gBASX;AATD,WAAY,gBAAgB;IAC1B,uDAAI,CAAA;IAEJ,2DAAe,CAAA;IACf,2DAAe,CAAA;IACf,mEAAmB,CAAA;IACnB,sEAAoB,CAAA;IAEpB,uDAAU,CAAA;AACZ,CAAC,EATW,gBAAgB,gCAAhB,gBAAgB,QAS3B"}
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { EncodingCategory } from '../Common/EncodingCategory';
|
|
2
|
-
import { EncodingEntry } from '../Common/EncodingEntry';
|
|
3
|
-
import { EncodingDataBase } from './EncodingDataBase';
|
|
4
|
-
export declare abstract class EncodingCharacterBase<T extends number> {
|
|
5
|
-
private _category;
|
|
6
|
-
private _data;
|
|
7
|
-
private _lookup;
|
|
8
|
-
constructor(data: EncodingDataBase<T>, category: EncodingCategory);
|
|
9
|
-
get category(): EncodingCategory;
|
|
10
|
-
set category(value: EncodingCategory);
|
|
11
|
-
clear(): void;
|
|
12
|
-
empty(): boolean;
|
|
13
|
-
getExactMatches(): Array<EncodingEntry<T>>;
|
|
14
|
-
getPotentialMatches(): Array<EncodingEntry<T>>;
|
|
15
|
-
toString(): string;
|
|
16
|
-
valid(): boolean;
|
|
17
|
-
valueOf(): T;
|
|
18
|
-
protected invalidateLookup(): void;
|
|
19
|
-
protected abstract onClear(): void;
|
|
20
|
-
protected abstract onEmpty(): boolean;
|
|
21
|
-
protected abstract getEncoding(): T;
|
|
22
|
-
private ensureLookup;
|
|
23
|
-
}
|
|
1
|
+
import { EncodingCategory } from '../Common/EncodingCategory';
|
|
2
|
+
import { EncodingEntry } from '../Common/EncodingEntry';
|
|
3
|
+
import { EncodingDataBase } from './EncodingDataBase';
|
|
4
|
+
export declare abstract class EncodingCharacterBase<T extends number> {
|
|
5
|
+
private _category;
|
|
6
|
+
private _data;
|
|
7
|
+
private _lookup;
|
|
8
|
+
constructor(data: EncodingDataBase<T>, category: EncodingCategory);
|
|
9
|
+
get category(): EncodingCategory;
|
|
10
|
+
set category(value: EncodingCategory);
|
|
11
|
+
clear(): void;
|
|
12
|
+
empty(): boolean;
|
|
13
|
+
getExactMatches(): Array<EncodingEntry<T>>;
|
|
14
|
+
getPotentialMatches(): Array<EncodingEntry<T>>;
|
|
15
|
+
toString(): string;
|
|
16
|
+
valid(): boolean;
|
|
17
|
+
valueOf(): T;
|
|
18
|
+
protected invalidateLookup(): void;
|
|
19
|
+
protected abstract onClear(): void;
|
|
20
|
+
protected abstract onEmpty(): boolean;
|
|
21
|
+
protected abstract getEncoding(): T;
|
|
22
|
+
private ensureLookup;
|
|
23
|
+
}
|
|
@@ -1,53 +1,55 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.EncodingCharacterBase = void 0;
|
|
4
|
-
class EncodingCharacterBase {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
this.
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EncodingCharacterBase = void 0;
|
|
4
|
+
class EncodingCharacterBase {
|
|
5
|
+
_category;
|
|
6
|
+
_data;
|
|
7
|
+
_lookup = null;
|
|
8
|
+
constructor(data, category) {
|
|
9
|
+
this._data = data;
|
|
10
|
+
this._category = category;
|
|
11
|
+
this.invalidateLookup();
|
|
12
|
+
}
|
|
13
|
+
get category() {
|
|
14
|
+
return this._category;
|
|
15
|
+
}
|
|
16
|
+
set category(value) {
|
|
17
|
+
if (this._category !== value) {
|
|
18
|
+
this._category = value;
|
|
19
|
+
this.invalidateLookup();
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
clear() {
|
|
23
|
+
this.onClear();
|
|
24
|
+
this.invalidateLookup();
|
|
25
|
+
}
|
|
26
|
+
empty() {
|
|
27
|
+
return this.onEmpty();
|
|
28
|
+
}
|
|
29
|
+
getExactMatches() {
|
|
30
|
+
return this.ensureLookup().exact;
|
|
31
|
+
}
|
|
32
|
+
getPotentialMatches() {
|
|
33
|
+
return this.ensureLookup().partial;
|
|
34
|
+
}
|
|
35
|
+
toString() {
|
|
36
|
+
return this.ensureLookup().exactString;
|
|
37
|
+
}
|
|
38
|
+
valid() {
|
|
39
|
+
return this.ensureLookup().exact.length > 0;
|
|
40
|
+
}
|
|
41
|
+
valueOf() {
|
|
42
|
+
return this.getEncoding();
|
|
43
|
+
}
|
|
44
|
+
invalidateLookup() {
|
|
45
|
+
this._lookup = null;
|
|
46
|
+
}
|
|
47
|
+
ensureLookup() {
|
|
48
|
+
if (!this._lookup) {
|
|
49
|
+
this._lookup = this._data.lookup(this.getEncoding(), this._category);
|
|
50
|
+
}
|
|
51
|
+
return this._lookup;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
exports.EncodingCharacterBase = EncodingCharacterBase;
|
|
53
55
|
//# sourceMappingURL=EncodingCharacterBase.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EncodingCharacterBase.js","sourceRoot":"","sources":["../../../src/Common/EncodingCharacterBase.ts"],"names":[],"mappings":";;;AAKA,MAAsB,qBAAqB;
|
|
1
|
+
{"version":3,"file":"EncodingCharacterBase.js","sourceRoot":"","sources":["../../../src/Common/EncodingCharacterBase.ts"],"names":[],"mappings":";;;AAKA,MAAsB,qBAAqB;IACjC,SAAS,CAAmB;IAC5B,KAAK,CAAsB;IAC3B,OAAO,GAAmC,IAAI,CAAC;IAEvD,YAAY,IAAyB,EAAE,QAA0B;QAC/D,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;QAClB,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;QAC1B,IAAI,CAAC,gBAAgB,EAAE,CAAC;IAC1B,CAAC;IAED,IAAI,QAAQ;QACV,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IAED,IAAI,QAAQ,CAAC,KAAuB;QAClC,IAAI,IAAI,CAAC,SAAS,KAAK,KAAK,EAAE;YAC5B,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;YACvB,IAAI,CAAC,gBAAgB,EAAE,CAAC;SACzB;IACH,CAAC;IAED,KAAK;QACH,IAAI,CAAC,OAAO,EAAE,CAAC;QACf,IAAI,CAAC,gBAAgB,EAAE,CAAC;IAC1B,CAAC;IAED,KAAK;QACH,OAAO,IAAI,CAAC,OAAO,EAAE,CAAC;IACxB,CAAC;IAED,eAAe;QACb,OAAO,IAAI,CAAC,YAAY,EAAE,CAAC,KAAK,CAAC;IACnC,CAAC;IAED,mBAAmB;QACjB,OAAO,IAAI,CAAC,YAAY,EAAE,CAAC,OAAO,CAAC;IACrC,CAAC;IAED,QAAQ;QACN,OAAO,IAAI,CAAC,YAAY,EAAE,CAAC,WAAW,CAAC;IACzC,CAAC;IAED,KAAK;QACH,OAAO,IAAI,CAAC,YAAY,EAAE,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;IAC9C,CAAC;IAED,OAAO;QACL,OAAO,IAAI,CAAC,WAAW,EAAE,CAAC;IAC5B,CAAC;IAES,gBAAgB;QACxB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;IACtB,CAAC;IAMO,YAAY;QAClB,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE;YACjB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;SACtE;QAED,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;CACF;AAlED,sDAkEC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { EncodingCategory } from './EncodingCategory';
|
|
2
|
-
import { EncodingLookupResult } from './EncodingLookupResult';
|
|
3
|
-
export declare abstract class EncodingDataBase<T extends number> {
|
|
4
|
-
private readonly _entries;
|
|
5
|
-
lookup(encoding: T, category?: EncodingCategory): EncodingLookupResult<T>;
|
|
6
|
-
protected addToList(encoding: T, category: EncodingCategory, display: string): void;
|
|
7
|
-
}
|
|
1
|
+
import { EncodingCategory } from './EncodingCategory';
|
|
2
|
+
import { EncodingLookupResult } from './EncodingLookupResult';
|
|
3
|
+
export declare abstract class EncodingDataBase<T extends number> {
|
|
4
|
+
private readonly _entries;
|
|
5
|
+
lookup(encoding: T, category?: EncodingCategory): EncodingLookupResult<T>;
|
|
6
|
+
protected addToList(encoding: T, category: EncodingCategory, display: string): void;
|
|
7
|
+
}
|
|
@@ -1,30 +1,28 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.EncodingDataBase = void 0;
|
|
4
|
-
const EncodingCategory_1 = require("./EncodingCategory");
|
|
5
|
-
const EncodingEntry_1 = require("./EncodingEntry");
|
|
6
|
-
const EncodingLookupResult_1 = require("./EncodingLookupResult");
|
|
7
|
-
class EncodingDataBase {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
29
|
-
exports.EncodingDataBase = EncodingDataBase;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EncodingDataBase = void 0;
|
|
4
|
+
const EncodingCategory_1 = require("./EncodingCategory");
|
|
5
|
+
const EncodingEntry_1 = require("./EncodingEntry");
|
|
6
|
+
const EncodingLookupResult_1 = require("./EncodingLookupResult");
|
|
7
|
+
class EncodingDataBase {
|
|
8
|
+
_entries = [];
|
|
9
|
+
lookup(encoding, category = EncodingCategory_1.EncodingCategory.All) {
|
|
10
|
+
const result = new EncodingLookupResult_1.EncodingLookupResult();
|
|
11
|
+
for (const entry of this._entries) {
|
|
12
|
+
if ((entry.category & category) !== 0) {
|
|
13
|
+
if (entry.encoding === encoding) {
|
|
14
|
+
result.exact.push(entry);
|
|
15
|
+
}
|
|
16
|
+
else if ((entry.encoding & encoding) === encoding) {
|
|
17
|
+
result.partial.push(entry);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
return result;
|
|
22
|
+
}
|
|
23
|
+
addToList(encoding, category, display) {
|
|
24
|
+
this._entries.push(new EncodingEntry_1.EncodingEntry(encoding, category, display));
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
exports.EncodingDataBase = EncodingDataBase;
|
|
30
28
|
//# sourceMappingURL=EncodingDataBase.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EncodingDataBase.js","sourceRoot":"","sources":["../../../src/Common/EncodingDataBase.ts"],"names":[],"mappings":";;;AAAA,yDAAoD;AACpD,mDAA8C;AAC9C,iEAA4D;AAE5D,MAAsB,gBAAgB;
|
|
1
|
+
{"version":3,"file":"EncodingDataBase.js","sourceRoot":"","sources":["../../../src/Common/EncodingDataBase.ts"],"names":[],"mappings":";;;AAAA,yDAAoD;AACpD,mDAA8C;AAC9C,iEAA4D;AAE5D,MAAsB,gBAAgB;IACnB,QAAQ,GAA4B,EAAE,CAAC;IAExD,MAAM,CAAC,QAAW,EAAE,WAA6B,mCAAgB,CAAC,GAAG;QACnE,MAAM,MAAM,GAAG,IAAI,2CAAoB,EAAK,CAAC;QAE7C,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,QAAQ,EAAE;YACjC,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAG,QAAQ,CAAC,KAAK,CAAC,EAAE;gBACrC,IAAI,KAAK,CAAC,QAAQ,KAAK,QAAQ,EAAE;oBAC/B,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;iBAC1B;qBAAM,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAG,QAAQ,CAAC,KAAK,QAAQ,EAAE;oBACnD,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;iBAC5B;aACF;SACF;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;IAES,SAAS,CACjB,QAAW,EACX,QAA0B,EAC1B,OAAe;QAEf,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,6BAAa,CAAI,QAAQ,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAC;IACxE,CAAC;CACF;AA1BD,4CA0BC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { EncodingCategory } from './EncodingCategory';
|
|
2
|
-
export declare class EncodingEntry<T> {
|
|
3
|
-
readonly encoding: T;
|
|
4
|
-
readonly category: EncodingCategory;
|
|
5
|
-
readonly display: string;
|
|
6
|
-
constructor(encoding: T, category: EncodingCategory, display: string);
|
|
7
|
-
toString(): string;
|
|
8
|
-
}
|
|
1
|
+
import { EncodingCategory } from './EncodingCategory';
|
|
2
|
+
export declare class EncodingEntry<T> {
|
|
3
|
+
readonly encoding: T;
|
|
4
|
+
readonly category: EncodingCategory;
|
|
5
|
+
readonly display: string;
|
|
6
|
+
constructor(encoding: T, category: EncodingCategory, display: string);
|
|
7
|
+
toString(): string;
|
|
8
|
+
}
|
|
@@ -1,15 +1,18 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.EncodingEntry = void 0;
|
|
4
|
-
class EncodingEntry {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EncodingEntry = void 0;
|
|
4
|
+
class EncodingEntry {
|
|
5
|
+
encoding;
|
|
6
|
+
category;
|
|
7
|
+
display;
|
|
8
|
+
constructor(encoding, category, display) {
|
|
9
|
+
this.encoding = encoding;
|
|
10
|
+
this.category = category;
|
|
11
|
+
this.display = display;
|
|
12
|
+
}
|
|
13
|
+
toString() {
|
|
14
|
+
return this.display;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
exports.EncodingEntry = EncodingEntry;
|
|
15
18
|
//# sourceMappingURL=EncodingEntry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EncodingEntry.js","sourceRoot":"","sources":["../../../src/Common/EncodingEntry.ts"],"names":[],"mappings":";;;AAEA,MAAa,aAAa;
|
|
1
|
+
{"version":3,"file":"EncodingEntry.js","sourceRoot":"","sources":["../../../src/Common/EncodingEntry.ts"],"names":[],"mappings":";;;AAEA,MAAa,aAAa;IACf,QAAQ,CAAI;IACZ,QAAQ,CAAmB;IAC3B,OAAO,CAAS;IAEzB,YAAY,QAAW,EAAE,QAA0B,EAAE,OAAe;QAClE,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAED,QAAQ;QACN,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;CACF;AAdD,sCAcC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { EncodingEntry } from './EncodingEntry';
|
|
2
|
-
export declare class EncodingLookupResult<T> {
|
|
3
|
-
readonly exact: Array<EncodingEntry<T>>;
|
|
4
|
-
readonly partial: Array<EncodingEntry<T>>;
|
|
5
|
-
get exactString(): string;
|
|
6
|
-
}
|
|
1
|
+
import { EncodingEntry } from './EncodingEntry';
|
|
2
|
+
export declare class EncodingLookupResult<T> {
|
|
3
|
+
readonly exact: Array<EncodingEntry<T>>;
|
|
4
|
+
readonly partial: Array<EncodingEntry<T>>;
|
|
5
|
+
get exactString(): string;
|
|
6
|
+
}
|
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.EncodingLookupResult = void 0;
|
|
4
|
-
class EncodingLookupResult {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
exports.EncodingLookupResult = EncodingLookupResult;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EncodingLookupResult = void 0;
|
|
4
|
+
class EncodingLookupResult {
|
|
5
|
+
exact = [];
|
|
6
|
+
partial = [];
|
|
7
|
+
get exactString() {
|
|
8
|
+
return this.exact.map(value => value.toString()).join('/');
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
exports.EncodingLookupResult = EncodingLookupResult;
|
|
14
12
|
//# sourceMappingURL=EncodingLookupResult.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EncodingLookupResult.js","sourceRoot":"","sources":["../../../src/Common/EncodingLookupResult.ts"],"names":[],"mappings":";;;AAEA,MAAa,oBAAoB;
|
|
1
|
+
{"version":3,"file":"EncodingLookupResult.js","sourceRoot":"","sources":["../../../src/Common/EncodingLookupResult.ts"],"names":[],"mappings":";;;AAEA,MAAa,oBAAoB;IACtB,KAAK,GAA4B,EAAE,CAAC;IACpC,OAAO,GAA4B,EAAE,CAAC;IAE/C,IAAI,WAAW;QACb,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC7D,CAAC;CACF;AAPD,oDAOC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare class Helpers {
|
|
2
|
-
static assert(condition: boolean): void;
|
|
3
|
-
static assertMsg(condition: boolean, message: string): void;
|
|
4
|
-
}
|
|
1
|
+
export declare class Helpers {
|
|
2
|
+
static assert(condition: boolean): void;
|
|
3
|
+
static assertMsg(condition: boolean, message: string): void;
|
|
4
|
+
}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Helpers = void 0;
|
|
4
|
-
class Helpers {
|
|
5
|
-
static assert(condition) {
|
|
6
|
-
if (!condition) {
|
|
7
|
-
throw new Error();
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
static assertMsg(condition, message) {
|
|
11
|
-
if (!condition) {
|
|
12
|
-
throw new Error(message);
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
exports.Helpers = Helpers;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Helpers = void 0;
|
|
4
|
+
class Helpers {
|
|
5
|
+
static assert(condition) {
|
|
6
|
+
if (!condition) {
|
|
7
|
+
throw new Error();
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
static assertMsg(condition, message) {
|
|
11
|
+
if (!condition) {
|
|
12
|
+
throw new Error(message);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
exports.Helpers = Helpers;
|
|
17
17
|
//# sourceMappingURL=Helpers.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export declare class InlineSvg {
|
|
2
|
-
private readonly inlineSvg;
|
|
3
|
-
private readonly viewBoxWidth;
|
|
4
|
-
private readonly viewBoxHeight;
|
|
5
|
-
constructor(inlineSvg: string, viewBoxWidth: number, viewBoxHeight: number);
|
|
6
|
-
render(): string;
|
|
7
|
-
}
|
|
1
|
+
export declare class InlineSvg {
|
|
2
|
+
private readonly inlineSvg;
|
|
3
|
+
private readonly viewBoxWidth;
|
|
4
|
+
private readonly viewBoxHeight;
|
|
5
|
+
constructor(inlineSvg: string, viewBoxWidth: number, viewBoxHeight: number);
|
|
6
|
+
render(): string;
|
|
7
|
+
}
|
|
@@ -1,15 +1,18 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.InlineSvg = void 0;
|
|
4
|
-
class InlineSvg {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.InlineSvg = void 0;
|
|
4
|
+
class InlineSvg {
|
|
5
|
+
inlineSvg;
|
|
6
|
+
viewBoxWidth;
|
|
7
|
+
viewBoxHeight;
|
|
8
|
+
constructor(inlineSvg, viewBoxWidth, viewBoxHeight) {
|
|
9
|
+
this.inlineSvg = inlineSvg;
|
|
10
|
+
this.viewBoxWidth = viewBoxWidth;
|
|
11
|
+
this.viewBoxHeight = viewBoxHeight;
|
|
12
|
+
}
|
|
13
|
+
render() {
|
|
14
|
+
return `<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="100%" height="100%" viewBox="0 0 ${this.viewBoxWidth} ${this.viewBoxHeight}">${this.inlineSvg}</svg>`;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
exports.InlineSvg = InlineSvg;
|
|
15
18
|
//# sourceMappingURL=InlineSvg.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InlineSvg.js","sourceRoot":"","sources":["../../../src/Common/InlineSvg.ts"],"names":[],"mappings":";;;AAAA,MAAa,SAAS;
|
|
1
|
+
{"version":3,"file":"InlineSvg.js","sourceRoot":"","sources":["../../../src/Common/InlineSvg.ts"],"names":[],"mappings":";;;AAAA,MAAa,SAAS;IACH,SAAS,CAAS;IAClB,YAAY,CAAS;IACrB,aAAa,CAAS;IAEvC,YAAY,SAAiB,EAAE,YAAoB,EAAE,aAAqB;QACxE,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;IACrC,CAAC;IAED,MAAM;QACJ,OAAO,iGAAiG,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,aAAa,KAAK,IAAI,CAAC,SAAS,QAAQ,CAAC;IAC7K,CAAC;CACF;AAdD,8BAcC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { CharacterEncoding } from './CharacterEncoding';
|
|
2
|
-
export declare class CharacterAutoConvert {
|
|
3
|
-
static convertCharacter(input: string, forcedCharacterEncoding?: CharacterEncoding): string;
|
|
4
|
-
static asciiPrintable(index: number): string;
|
|
5
|
-
static determineCharacterEncoding(input: string): CharacterEncoding;
|
|
6
|
-
private static readonly BINARY_REGEX;
|
|
7
|
-
private static appearsBinary;
|
|
8
|
-
private static readonly TERNARY_REGEX;
|
|
9
|
-
private static appearsTernary;
|
|
10
|
-
}
|
|
1
|
+
import { CharacterEncoding } from './CharacterEncoding';
|
|
2
|
+
export declare class CharacterAutoConvert {
|
|
3
|
+
static convertCharacter(input: string, forcedCharacterEncoding?: CharacterEncoding): string;
|
|
4
|
+
static asciiPrintable(index: number): string;
|
|
5
|
+
static determineCharacterEncoding(input: string): CharacterEncoding;
|
|
6
|
+
private static readonly BINARY_REGEX;
|
|
7
|
+
private static appearsBinary;
|
|
8
|
+
private static readonly TERNARY_REGEX;
|
|
9
|
+
private static appearsTernary;
|
|
10
|
+
}
|