Fixed code spacing and formatting
This commit is contained in:
parent
db662a7662
commit
23ddb87c9f
@ -38,23 +38,23 @@ class Lorenz extends Operation {
|
||||
"value": [
|
||||
{
|
||||
name: "KH Pattern",
|
||||
off: [19,20,21,22,23,24,25,26,27,28,29,30],
|
||||
off: [19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30]
|
||||
},
|
||||
{
|
||||
name: "ZMUG Pattern",
|
||||
off: [19,20,21,22,23,24,25,26,27,28,29,30]
|
||||
off: [19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30]
|
||||
},
|
||||
{
|
||||
name: "BREAM Pattern",
|
||||
off: [19,20,21,22,23,24,25,26,27,28,29,30]
|
||||
off: [19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30]
|
||||
},
|
||||
{
|
||||
name: "No Pattern",
|
||||
off: [19,20,21,22,23,24,25,26,27,28,29,30]
|
||||
off: [19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30]
|
||||
},
|
||||
{
|
||||
name: "Custom",
|
||||
on: [19,20,21,22,23,24,25,26,27,28,29,30]
|
||||
on: [19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30]
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -229,7 +229,7 @@ class Lorenz extends Operation {
|
||||
mode = args[3],
|
||||
format = args[6];
|
||||
|
||||
var intype = args[4],
|
||||
let intype = args[4],
|
||||
outtype = args[5],
|
||||
s1 = args[7],
|
||||
s2 = args[8],
|
||||
@ -273,59 +273,60 @@ class Lorenz extends Operation {
|
||||
if (x5<1 || x5>23) throw new OperationError("Χ5 start must be between 1 and 23");
|
||||
|
||||
// Initialise chosen wheel pattern
|
||||
if(pattern=="Custom") {
|
||||
var re = new RegExp("^[\.xX]*$");
|
||||
if (lugs1.length != 43 || !re.test(lugs1) ) throw new OperationError("Ψ1 custom lugs must be 43 long and can only include . or x ");
|
||||
if (lugs2.length != 47 || !re.test(lugs2) ) throw new OperationError("Ψ2 custom lugs must be 47 long and can only include . or x");
|
||||
if (lugs3.length != 51 || !re.test(lugs3) ) throw new OperationError("Ψ3 custom lugs must be 51 long and can only include . or x");
|
||||
if (lugs4.length != 53 || !re.test(lugs4) ) throw new OperationError("Ψ4 custom lugs must be 53 long and can only include . or x");
|
||||
if (lugs5.length != 59 || !re.test(lugs5) ) throw new OperationError("Ψ5 custom lugs must be 59 long and can only include . or x");
|
||||
if (lugm37.length != 37 || !re.test(lugm37) ) throw new OperationError("M37 custom lugs must be 37 long and can only include . or x");
|
||||
if (lugm61.length != 61 || !re.test(lugm61) ) throw new OperationError("M61 custom lugs must be 61 long and can only include . or x");
|
||||
if (lugx1.length != 41 || !re.test(lugx1) ) throw new OperationError("Χ1 custom lugs must be 41 long and can only include . or x");
|
||||
if (lugx2.length != 31 || !re.test(lugx2) ) throw new OperationError("Χ2 custom lugs must be 31 long and can only include . or x");
|
||||
if (lugx3.length != 29 || !re.test(lugx3) ) throw new OperationError("Χ3 custom lugs must be 29 long and can only include . or x");
|
||||
if (lugx4.length != 26 || !re.test(lugx4) ) throw new OperationError("Χ4 custom lugs must be 26 long and can only include . or x");
|
||||
if (lugx5.length != 23 || !re.test(lugx5) ) throw new OperationError("Χ5 custom lugs must be 23 long and can only include . or x");
|
||||
var chosenSetting = INIT_PATTERNS["No Pattern"];
|
||||
chosenSetting["S"][1] = this.readLugs(lugs1);
|
||||
chosenSetting["S"][2] = this.readLugs(lugs2);
|
||||
chosenSetting["S"][3] = this.readLugs(lugs3);
|
||||
chosenSetting["S"][4] = this.readLugs(lugs4);
|
||||
chosenSetting["S"][5] = this.readLugs(lugs5);
|
||||
chosenSetting["M"][1] = this.readLugs(lugm37);
|
||||
chosenSetting["M"][2] = this.readLugs(lugm61);
|
||||
chosenSetting["X"][1] = this.readLugs(lugx1);
|
||||
chosenSetting["X"][2] = this.readLugs(lugx2);
|
||||
chosenSetting["X"][3] = this.readLugs(lugx3);
|
||||
chosenSetting["X"][4] = this.readLugs(lugx4);
|
||||
chosenSetting["X"][5] = this.readLugs(lugx5);
|
||||
let chosenSetting = '';
|
||||
if (pattern === "Custom") {
|
||||
let re = new RegExp("^[.xX]*$");
|
||||
if (lugs1.length !== 43 || !re.test(lugs1)) throw new OperationError("Ψ1 custom lugs must be 43 long and can only include . or x ");
|
||||
if (lugs2.length !== 47 || !re.test(lugs2)) throw new OperationError("Ψ2 custom lugs must be 47 long and can only include . or x");
|
||||
if (lugs3.length !== 51 || !re.test(lugs3)) throw new OperationError("Ψ3 custom lugs must be 51 long and can only include . or x");
|
||||
if (lugs4.length !== 53 || !re.test(lugs4)) throw new OperationError("Ψ4 custom lugs must be 53 long and can only include . or x");
|
||||
if (lugs5.length !== 59 || !re.test(lugs5)) throw new OperationError("Ψ5 custom lugs must be 59 long and can only include . or x");
|
||||
if (lugm37.length !== 37 || !re.test(lugm37)) throw new OperationError("M37 custom lugs must be 37 long and can only include . or x");
|
||||
if (lugm61.length !== 61 || !re.test(lugm61)) throw new OperationError("M61 custom lugs must be 61 long and can only include . or x");
|
||||
if (lugx1.length !== 41 || !re.test(lugx1)) throw new OperationError("Χ1 custom lugs must be 41 long and can only include . or x");
|
||||
if (lugx2.length !== 31 || !re.test(lugx2)) throw new OperationError("Χ2 custom lugs must be 31 long and can only include . or x");
|
||||
if (lugx3.length !== 29 || !re.test(lugx3)) throw new OperationError("Χ3 custom lugs must be 29 long and can only include . or x");
|
||||
if (lugx4.length !== 26 || !re.test(lugx4)) throw new OperationError("Χ4 custom lugs must be 26 long and can only include . or x");
|
||||
if (lugx5.length !== 23 || !re.test(lugx5)) throw new OperationError("Χ5 custom lugs must be 23 long and can only include . or x");
|
||||
chosenSetting = INIT_PATTERNS["No Pattern"];
|
||||
chosenSetting.S[1] = this.readLugs(lugs1);
|
||||
chosenSetting.S[2] = this.readLugs(lugs2);
|
||||
chosenSetting.S[3] = this.readLugs(lugs3);
|
||||
chosenSetting.S[4] = this.readLugs(lugs4);
|
||||
chosenSetting.S[5] = this.readLugs(lugs5);
|
||||
chosenSetting.M[1] = this.readLugs(lugm37);
|
||||
chosenSetting.M[2] = this.readLugs(lugm61);
|
||||
chosenSetting.X[1] = this.readLugs(lugx1);
|
||||
chosenSetting.X[2] = this.readLugs(lugx2);
|
||||
chosenSetting.X[3] = this.readLugs(lugx3);
|
||||
chosenSetting.X[4] = this.readLugs(lugx4);
|
||||
chosenSetting.X[5] = this.readLugs(lugx5);
|
||||
} else {
|
||||
var chosenSetting = INIT_PATTERNS[pattern];
|
||||
chosenSetting = INIT_PATTERNS[pattern];
|
||||
}
|
||||
var chiSettings = chosenSetting["X"]; // Pin settings for Chi links (X)
|
||||
var psiSettings = chosenSetting["S"]; // Pin settings for Psi links (S)
|
||||
var muSettings = chosenSetting["M"]; // Pin settings for Motor links (M)
|
||||
var chiSettings = chosenSetting.X; // Pin settings for Chi links (X)
|
||||
var psiSettings = chosenSetting.S; // Pin settings for Psi links (S)
|
||||
var muSettings = chosenSetting.M; // Pin settings for Motor links (M)
|
||||
|
||||
var ita2 = "";
|
||||
if(mode == "Send") {
|
||||
let ita2 = "";
|
||||
if (mode === "Send") {
|
||||
|
||||
// Convert input text to ITA2 (including figure/letter shifts)
|
||||
ita2 = Array.prototype.map.call(input, function(character) {
|
||||
var letter = character.toUpperCase();
|
||||
let letter = character.toUpperCase();
|
||||
|
||||
if(intype == "Plaintext") {
|
||||
if (intype === "Plaintext") {
|
||||
if (validChars.indexOf(letter) === -1) throw new OperationError("Invalid Plaintext character : "+letter);
|
||||
|
||||
if( !figShifted && figShiftedChars.indexOf(letter) !== -1 ) {
|
||||
if(!figShifted && figShiftedChars.indexOf(letter) !== -1) {
|
||||
// in letters mode and next char needs to be figure shifted
|
||||
figShifted = true;
|
||||
return "55" + figShiftArr[letter];
|
||||
} else if( figShifted ) {
|
||||
} else if (figShifted) {
|
||||
// in figures mode and next char needs to be letter shifted
|
||||
if(letter=="\n") return "34";
|
||||
if(letter=="\r") return "4";
|
||||
if( figShiftedChars.indexOf(letter) === -1 ) {
|
||||
if (letter==="\n") return "34";
|
||||
if (letter==="\r") return "4";
|
||||
if (figShiftedChars.indexOf(letter) === -1) {
|
||||
figShifted = false;
|
||||
return "88" + letter;
|
||||
} else {
|
||||
@ -333,17 +334,17 @@ class Lorenz extends Operation {
|
||||
}
|
||||
|
||||
} else {
|
||||
if(letter=="\n") return "34";
|
||||
if(letter=="\r") return "4";
|
||||
if (letter==="\n") return "34";
|
||||
if (letter==="\r") return "4";
|
||||
return letter;
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
if (validITA2.indexOf(letter) === -1) {
|
||||
var errltr = letter;
|
||||
if(errltr=="\n") errltr = "Carriage Return";
|
||||
if(errltr==" ") errltr = "Space";
|
||||
let errltr = letter;
|
||||
if (errltr==="\n") errltr = "Carriage Return";
|
||||
if (errltr===" ") errltr = "Space";
|
||||
throw new OperationError("Invalid ITA2 character : "+errltr);
|
||||
}
|
||||
return letter;
|
||||
@ -356,11 +357,11 @@ class Lorenz extends Operation {
|
||||
|
||||
// Receive input should always be ITA2
|
||||
ita2 = Array.prototype.map.call(input, function(character) {
|
||||
var letter = character.toUpperCase();
|
||||
let letter = character.toUpperCase();
|
||||
if (validITA2.indexOf(letter) === -1) {
|
||||
var errltr = letter;
|
||||
if(errltr=="\n") errltr = "Carriage Return";
|
||||
if(errltr==" ") errltr = "Space";
|
||||
if (errltr==="\n") errltr = "Carriage Return";
|
||||
if(errltr===" ") errltr = "Space";
|
||||
throw new OperationError("Invalid ITA2 character : "+errltr);
|
||||
}
|
||||
return letter;
|
||||
@ -370,21 +371,20 @@ class Lorenz extends Operation {
|
||||
|
||||
const ita2Input = ita2.join("");
|
||||
|
||||
var thisPsi = [];
|
||||
var thisChi = [];
|
||||
var thisMu = [];
|
||||
var m61lug = muSettings[1][m61-1];
|
||||
var m37lug = muSettings[2][m37-1];
|
||||
var p5 = [0,0,0];
|
||||
let thisPsi = [];
|
||||
let thisChi = [];
|
||||
let m61lug = muSettings[1][m61-1];
|
||||
let m37lug = muSettings[2][m37-1];
|
||||
let p5 = [0,0,0];
|
||||
|
||||
const self = this;
|
||||
const letters = Array.prototype.map.call(ita2Input, function(character) {
|
||||
const letter = character.toUpperCase();
|
||||
|
||||
var x2bptr = x2+1;
|
||||
if(x2bptr==32) x2bptr=1;
|
||||
var s1bptr = s1+1;
|
||||
if(s1bptr==44) s1bptr=1;
|
||||
let x2bptr = x2+1;
|
||||
if (x2bptr===32) x2bptr=1;
|
||||
let s1bptr = s1+1;
|
||||
if (s1bptr===44) s1bptr=1;
|
||||
|
||||
thisChi = [
|
||||
chiSettings[1][x1-1],
|
||||
@ -402,58 +402,53 @@ class Lorenz extends Operation {
|
||||
psiSettings[5][s5-1]
|
||||
];
|
||||
|
||||
thisMu = [
|
||||
muSettings[1][m61-1],
|
||||
muSettings[2][m37-1]
|
||||
];
|
||||
|
||||
if (typeof ITA2_TABLE[letter] == "undefined") {
|
||||
return "";
|
||||
}
|
||||
|
||||
var xorSum = [];
|
||||
let xorSum = [];
|
||||
for(var i=0;i<=4;i++) {
|
||||
xorSum[i] = ITA2_TABLE[letter][i] ^ thisPsi[i] ^ thisChi[i];
|
||||
}
|
||||
const resultStr = xorSum.join("");
|
||||
|
||||
// Move Chi wheels one back after each letter
|
||||
if(--x1 < 1) x1 = 41;
|
||||
if(--x2 < 1) x2 = 31;
|
||||
if(--x3 < 1) x3 = 29;
|
||||
if(--x4 < 1) x4 = 26;
|
||||
if(--x5 < 1) x5 = 23;
|
||||
if (--x1 < 1) x1 = 41;
|
||||
if (--x2 < 1) x2 = 31;
|
||||
if (--x3 < 1) x3 = 29;
|
||||
if (--x4 < 1) x4 = 26;
|
||||
if (--x5 < 1) x5 = 23;
|
||||
|
||||
// Motor wheel (61 pin) also moves one each letter
|
||||
if(--m61 < 1) m61 = 61;
|
||||
if (--m61 < 1) m61 = 61;
|
||||
|
||||
// If M61 is set, we also move M37
|
||||
if(m61lug == 1) {
|
||||
if(--m37 < 1) m37 = 37;
|
||||
if (m61lug === 1) {
|
||||
if (--m37 < 1) m37 = 37;
|
||||
}
|
||||
|
||||
var basicmotor = m37lug;
|
||||
var totalmotor = basicmotor;
|
||||
var lim = 0;
|
||||
let basicmotor = m37lug;
|
||||
let totalmotor = basicmotor;
|
||||
let lim = 0;
|
||||
|
||||
p5[2] = p5[1];
|
||||
p5[1] = p5[0];
|
||||
if(mode=="Send") {
|
||||
if (mode==="Send") {
|
||||
p5[0] = ITA2_TABLE[letter][4];
|
||||
} else {
|
||||
p5[0] = xorSum[4];
|
||||
}
|
||||
|
||||
// Limitations here
|
||||
if(model=='SZ42a') {
|
||||
if (model==='SZ42a') {
|
||||
// Chi 2 one back lim - The active character of chi 2 (2nd Chi wheel) in the previous position
|
||||
lim = chiSettings[2][x2bptr-1];
|
||||
if(kt) {
|
||||
if(lim==p5[2]) { lim = 0; } else { lim=1; } //p5 back 2
|
||||
if (lim===p5[2]) { lim = 0; } else { lim=1; } //p5 back 2
|
||||
}
|
||||
|
||||
// If basic motor = 0 and limitation = 1, Total motor = 0 [no move], otherwise, total motor = 1 [move]
|
||||
if(basicmotor==0 && lim==1) {
|
||||
if (basicmotor===0 && lim===1) {
|
||||
totalmotor = 0;
|
||||
} else {
|
||||
totalmotor = 1;
|
||||
@ -464,18 +459,18 @@ class Lorenz extends Operation {
|
||||
const x2b1lug = chiSettings[2][x2bptr-1];
|
||||
const s1b1lug = psiSettings[1][s1bptr-1];
|
||||
lim = 1;
|
||||
if(x2b1lug==s1b1lug) lim=0;
|
||||
if (x2b1lug===s1b1lug) lim=0;
|
||||
if(kt) {
|
||||
if(lim==p5[2]) { lim=0; } else { lim=1; } //p5 back 2
|
||||
if (lim===p5[2]) { lim=0; } else { lim=1; } //p5 back 2
|
||||
}
|
||||
// If basic motor = 0 and limitation = 1, Total motor = 0 [no move], otherwise, total motor = 1 [move]
|
||||
if(basicmotor==0 && lim==1) {
|
||||
if (basicmotor===0 && lim===1) {
|
||||
totalmotor = 0;
|
||||
} else {
|
||||
totalmotor = 1;
|
||||
}
|
||||
|
||||
} else if(model=="SZ40") {
|
||||
} else if (model==="SZ40") {
|
||||
// SZ40
|
||||
totalmotor = basicmotor;
|
||||
} else {
|
||||
@ -483,7 +478,7 @@ class Lorenz extends Operation {
|
||||
}
|
||||
|
||||
// increment Psi wheels when current totalmotor active
|
||||
if(totalmotor == 1) {
|
||||
if (totalmotor === 1) {
|
||||
if(--s1 < 1) s1 = 43;
|
||||
if(--s2 < 1) s2 = 47;
|
||||
if(--s3 < 1) s3 = 51;
|
||||
@ -494,43 +489,43 @@ class Lorenz extends Operation {
|
||||
m61lug = muSettings[1][m61-1];
|
||||
m37lug = muSettings[2][m37-1];
|
||||
|
||||
var rtnstr = self.REVERSE_ITA2_TABLE[resultStr];
|
||||
if(format=="5/8/9") {
|
||||
if(rtnstr=="+") rtnstr="5";
|
||||
if(rtnstr=="-") rtnstr="8";
|
||||
if(rtnstr==".") rtnstr="9";
|
||||
let rtnstr = self.REVERSE_ITA2_TABLE[resultStr];
|
||||
if (format==="5/8/9") {
|
||||
if (rtnstr==="+") rtnstr="5";
|
||||
if (rtnstr==="-") rtnstr="8";
|
||||
if (rtnstr===".") rtnstr="9";
|
||||
}
|
||||
return rtnstr;
|
||||
});
|
||||
|
||||
var ita2output = letters.join("");
|
||||
var output = "";
|
||||
let ita2output = letters.join("");
|
||||
let output = "";
|
||||
|
||||
if(mode == "Receive") {
|
||||
if (mode === "Receive") {
|
||||
|
||||
figShifted = false;
|
||||
|
||||
// Convert output ITA2 to plaintext (including figure/letter shifts)
|
||||
const out = Array.prototype.map.call(ita2output, function(letter) {
|
||||
|
||||
if(outtype == "Plaintext") {
|
||||
if (outtype === "Plaintext") {
|
||||
|
||||
if( letter == "5" || letter == "+" ) {
|
||||
if (letter === "5" || letter === "+") {
|
||||
figShifted = true;
|
||||
return;
|
||||
} else if( letter == "8" || letter == "-" ) {
|
||||
} else if (letter === "8" || letter === "-") {
|
||||
figShifted = false;
|
||||
return;
|
||||
} else if( letter == "9" ) {
|
||||
} else if (letter === "9") {
|
||||
return " ";
|
||||
} else if( letter == "3" ) {
|
||||
} else if (letter === "3") {
|
||||
return "\n";
|
||||
} else if( letter == "4" ) {
|
||||
} else if (letter === "4") {
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
if(figShifted) {
|
||||
if (figShifted) {
|
||||
return self.REVERSE_FIGSHIFT_TABLE[letter];
|
||||
} else {
|
||||
return letter;
|
||||
@ -569,7 +564,7 @@ class Lorenz extends Operation {
|
||||
}
|
||||
|
||||
readLugs(lugstr) {
|
||||
var arr = Array.prototype.map.call(lugstr, function(lug) {
|
||||
let arr = Array.prototype.map.call(lugstr, function(lug) {
|
||||
if(lug==".") {
|
||||
return 0;
|
||||
} else {
|
||||
@ -625,116 +620,116 @@ const validITA2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ34589+-./";
|
||||
const figShiftedChars = "1234567890+-'()/:=?,."
|
||||
|
||||
const figShiftArr = {
|
||||
"1" : "Q",
|
||||
"2" : "W",
|
||||
"3" : "E",
|
||||
"4" : "R",
|
||||
"5" : "T",
|
||||
"6" : "Y",
|
||||
"7" : "U",
|
||||
"8" : "I",
|
||||
"9" : "O",
|
||||
"0" : "P",
|
||||
" " : "9",
|
||||
"-" : "A",
|
||||
"?" : "B",
|
||||
":" : "C",
|
||||
"#" : "D",
|
||||
"%" : "F",
|
||||
"@" : "G",
|
||||
"£" : "H",
|
||||
"(" : "K",
|
||||
")" : "L",
|
||||
"." : "M",
|
||||
"," : "N",
|
||||
"'" : "S",
|
||||
"=" : "V",
|
||||
"/" : "X",
|
||||
"+" : "Z",
|
||||
"\n" : "3",
|
||||
"\r" : "4"
|
||||
"1": "Q",
|
||||
"2": "W",
|
||||
"3": "E",
|
||||
"4": "R",
|
||||
"5": "T",
|
||||
"6": "Y",
|
||||
"7": "U",
|
||||
"8": "I",
|
||||
"9": "O",
|
||||
"0": "P",
|
||||
" ": "9",
|
||||
"-": "A",
|
||||
"?": "B",
|
||||
":": "C",
|
||||
"#": "D",
|
||||
"%": "F",
|
||||
"@": "G",
|
||||
"£": "H",
|
||||
"(": "K",
|
||||
")": "L",
|
||||
".": "M",
|
||||
",": "N",
|
||||
"'": "S",
|
||||
"=": "V",
|
||||
"/": "X",
|
||||
"+": "Z",
|
||||
"\n": "3",
|
||||
"\r": "4"
|
||||
};
|
||||
|
||||
const INIT_PATTERNS = {
|
||||
"No Pattern" : {
|
||||
"X" : {
|
||||
1 : [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
|
||||
2 : [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
|
||||
3 : [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
|
||||
4 : [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
|
||||
5 : [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
|
||||
"No Pattern": {
|
||||
"X": {
|
||||
1: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
|
||||
2: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
|
||||
3: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
|
||||
4: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
|
||||
5: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
|
||||
},
|
||||
"S" : {
|
||||
1 : [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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